Moodle  2.2.1
http://www.collinsharper.com
workshop_submission_base Class Reference
Inheritance diagram for workshop_submission_base:

Public Member Functions

 __construct (stdClass $submission, $showauthor=false)
 anonymize ()
 is_anonymous ()

Protected Attributes

 $anonymous
 $fields = array()

Detailed Description

Common base class for submissions and example submissions rendering

Subclasses of this class convert raw submission record from workshop_submissions table (as returned by {

See also:
workshop::get_submission_by_id()} for example) into renderable objects.

Definition at line 2556 of file locallib.php.


Constructor & Destructor Documentation

__construct ( stdClass $  submission,
showauthor = false 
)

Copies the properties of the given database record into properties of $this instance

Parameters:
stdClass$submissionfull record
bool$showauthorshow the author-related information
array$optionsadditional properties

Definition at line 2571 of file locallib.php.


Member Function Documentation

anonymize ( )

Unsets all author-related properties so that the renderer does not have access to them

Usually this is called by the contructor but can be called explicitely, too.

Definition at line 2595 of file locallib.php.

Does the submission object contain author-related information?

Returns:
null|boolean

Reimplemented in workshop_example_submission_summary.

Definition at line 2608 of file locallib.php.

Here is the caller graph for this function:


Field Documentation

$anonymous [protected]

Definition at line 2559 of file locallib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations