Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]
(no description)
File Size: | 244 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
calculated:: (7 methods):
__construct()
s()
avg()
get_field()
get_formatted_quiz_info_data()
cache()
populate_from_record()
Class: calculated - X-Ref
The statistics calculator returns an instance of this class which contains the calculated statistics.__construct($whichattempts = null) X-Ref |
param: string $whichattempts which attempts to use, represented internally as one of the constants as used in |
s() X-Ref |
Count of attempts selected by $this->whichattempts return: int |
avg() X-Ref |
Average grade for the attempts selected by $this->whichattempts return: float |
get_field($field) X-Ref |
Get the right field name to fetch a stat for these attempts that is calculated for more than one $whichattempts (count or avg). param: string $field name of field return: int|float |
get_formatted_quiz_info_data($course, $cm, $quiz) X-Ref |
param: $course param: $cm param: $quiz return: array to display in table or spreadsheet. |
cache($qubaids) X-Ref |
Cache the stats contained in this class. param: $qubaids \qubaid_condition |
populate_from_record($record) X-Ref |
Given a record from 'quiz_statistics' table load the data into the properties of this class. param: $record \stdClass from db. |