|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| calculate_all_expressions () | |
This interface defines the method that a quetsion type must implement if it is to work with qtype_calculated_question_helper.
As well as this method, the class that implements this interface must have fields public $datasetloader; // of type qtype_calculated_dataset_loader public $vs; // of type qtype_calculated_variable_substituter
Definition at line 104 of file question.php.
Replace all the expression in the question definition with the values computed from the selected dataset by calling $this->vs->calculate() and $this->vs->replace_expressions_in_text() on the parts of the question that require it.
Implemented in qtype_calculatedmulti_multi_question, qtype_calculatedmulti_single_question, and qtype_calculated_question.
