Class to display an attempt tesult in mod_h5pactivity.
More...
|
const | CHECKED = 3 |
| Checked answer state.
|
|
const | CORRECT = 1 |
| Correct answer state.
|
|
const | FAIL = 6 |
| Pass answer state.
|
|
const | INCORRECT = 2 |
| Incorrect answer state.
|
|
const | PASS = 5 |
| Pass answer state.
|
|
const | TEXT = 8 |
| Text answer state.
|
|
const | UNCHECKED = 4 |
| Unchecked answer state.
|
|
const | UNKNOWN = 7 |
| Unkown answer state.
|
|
|
mixed | $additionals |
| additional decoded data
|
|
mixed | $correctpattern = [] |
| correctpattern decoded data
|
|
mixed | $response |
| response decoded data
|
|
stdClass | $result |
| result record
|
|
Class to display an attempt tesult in mod_h5pactivity.
- Copyright
- 2020 Ferran Recio
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
mod_h5pactivity\output\result::__construct |
( |
stdClass |
$result | ) |
|
|
protected |
Constructor.
- Parameters
-
stdClass | $result | a h5pactivity_attempts_results record |
◆ create_from_record()
static mod_h5pactivity\output\result::create_from_record |
( |
stdClass |
$result | ) |
|
|
static |
return the correct result output depending on the interactiontype
- Parameters
-
stdClass | $result | h5pactivity_attempts_results record |
- Return values
-
result|null | the result output class if any |
◆ export_for_template()
mod_h5pactivity\output\result::export_for_template |
( |
renderer_base |
$output | ) |
|
◆ export_options()
mod_h5pactivity\output\result::export_options |
( |
| ) |
|
|
protected |
◆ get_answer()
mod_h5pactivity\output\result::get_answer |
( |
int |
$state, |
|
|
string |
$answer = null |
|
) |
| |
|
protected |
Return an answer data to show results.
- Parameters
-
int | $state | the answer state |
string | $answer | the extra text to display (default null) |
- Return values
-
stdClass | with "answer" text and the state attribute to be displayed |
◆ get_answerlabel()
mod_h5pactivity\output\result::get_answerlabel |
( |
| ) |
|
|
protected |
Return a label for result user attempt answer.
Specific result types can override this method to customize the result options table header.
- Return values
-
string | to use in options table |
◆ get_correctlabel()
mod_h5pactivity\output\result::get_correctlabel |
( |
| ) |
|
|
protected |
Return a label for result user correct answer.
Specific result types can override this method to customize the result options table header.
- Return values
-
string | to use in options table |
Reimplemented in mod_h5pactivity\output\result\sequencing.
◆ get_description()
mod_h5pactivity\output\result::get_description |
( |
stdClass |
$data | ) |
|
|
protected |
Extract description from data element.
- Parameters
-
stdClass | $data | additional attribute to parse |
- Return values
-
string | the resulting string |
◆ get_descriptions()
mod_h5pactivity\output\result::get_descriptions |
( |
array |
$data | ) |
|
|
protected |
Extract descriptions from array.
- Parameters
-
array | $data | additional attribute to parse |
- Return values
-
string[] | the resulting strings |
◆ get_optionslabel()
mod_h5pactivity\output\result::get_optionslabel |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file: