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

Public Member Functions

 __construct (stdClass $record, array $options=array())
 add_action (moodle_url $url, $label, $method= 'get')

Data Fields

 $title = ''
 $form
 $url
 $realgrade = null
 $maxgrade
 $reviewer = null
 $author = null
 $actions = array()

Protected Member Functions

 validate_raw_record (stdClass $record)

Protected Attributes

 $fields = array()

Detailed Description

Common base class for assessments rendering

Subclasses of this class convert raw assessment record from workshop_assessments table (as returned by {

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

Definition at line 2755 of file locallib.php.


Constructor & Destructor Documentation

__construct ( stdClass $  record,
array options = array() 
)

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

The $options keys are: showreviewer, showauthor

Parameters:
stdClass$assessmentfull record
array$optionsadditional properties

Definition at line 2791 of file locallib.php.

Here is the call graph for this function:


Member Function Documentation

add_action ( moodle_url url,
label,
method = 'get' 
)

Adds a new action

Parameters:
moodle_url$urlaction URL
string$labelaction label
string$methodget|post

Definition at line 2821 of file locallib.php.

validate_raw_record ( stdClass $  record) [protected]

Makes sure that we can cook the renderable component from the passed raw database record

Parameters:
stdClass$assessmentfull assessment record
Exceptions:
coding_exceptionif the caller passed unexpected data

Reimplemented in workshop_example_reference_assessment, and workshop_example_assessment.

Definition at line 2837 of file locallib.php.

Here is the caller graph for this function:


Field Documentation

$actions = array()

Definition at line 2779 of file locallib.php.

$author = null

Definition at line 2776 of file locallib.php.

$fields = array() [protected]

Reimplemented in workshop_assessment.

Definition at line 2782 of file locallib.php.

$form

Definition at line 2761 of file locallib.php.

$maxgrade

Definition at line 2770 of file locallib.php.

$realgrade = null

Definition at line 2767 of file locallib.php.

$reviewer = null

Definition at line 2773 of file locallib.php.

$title = ''

Definition at line 2758 of file locallib.php.

$url

Definition at line 2764 of file locallib.php.


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