See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 402] [Versions 39 and 403]
Quiz statistics report, table for showing response analysis for a particular question (or sub question).
Author: | James Pratt <me@jamiep.org> |
Copyright: | 2014 Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 186 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
quiz_statistics_question_table:: (6 methods):
__construct()
question_setup()
format_percentage()
col_fraction()
col_frequency()
other_cols()
Class: quiz_statistics_question_table - X-Ref
This table shows statistics about a particular question.__construct($qid) X-Ref |
Constructor. param: int $qid the id of the particular question whose statistics are being |
question_setup($reporturl, $questiondata, $s, $responseanalysis) X-Ref |
Set up columns and column names and other table settings. param: moodle_url $reporturl param: object $questiondata param: integer $s number of attempts on this question. param: \core_question\statistics\responses\analysis_for_question $responseanalysis |
format_percentage($fraction) X-Ref |
Take a float where 1 represents 100% and return a string representing the percentage. param: float $fraction The fraction. return: string The fraction as a percentage. |
col_fraction($response) X-Ref |
The mark fraction that this response earns. param: object $response containst the data to display. return: string contents of this table cell. |
col_frequency($response) X-Ref |
The frequency with which this response was given. param: object $response contains the data to display. return: string contents of this table cell. |
other_cols($colname, $response) X-Ref |
If there is not a col_{column name} method then we call this method. If it returns null that means just output the property as in the table raw data. If this returns none null then this is the output for this cell of the table. param: string $colname The name of this column. param: object $response The raw data for this row. return: string|null The value for this cell of the table or null means use raw data. |