This table shows statistics about a particular question.
More...
|
| __construct ($qid) |
| Constructor.
|
|
| other_cols ($colname, $response) |
| If there is not a col_{column name} method then we call this method.
|
|
| question_setup ($reporturl, $questiondata, $s, $responseanalysis) |
| Set up columns and column names and other table settings.
|
|
|
| col_fraction ($response) |
| The mark fraction that this response earns.
|
|
| col_frequency ($response) |
| The frequency with which this response was given.
|
|
| format_percentage ($fraction) |
| Take a float where 1 represents 100% and return a string representing the percentage.
|
|
|
stdClass | $questiondata |
| full question object for this question.
|
|
int | $s |
| no of attempts.
|
|
This table shows statistics about a particular question.
Lists the responses that students made to this question, with frequency counts.
The responses may be grouped, either by sub-part of the question, or by the answer they match.
- Copyright
- 2014 Open University
- Author
- James Pratt me@ja.nosp@m.miep.nosp@m..org
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
quiz_statistics_question_table::__construct |
( |
| $qid | ) |
|
Constructor.
- Parameters
-
int | $qid | the id of the particular question whose statistics are being displayed. |
◆ col_fraction()
quiz_statistics_question_table::col_fraction |
( |
| $response | ) |
|
|
protected |
The mark fraction that this response earns.
- Parameters
-
stdClass | $response | containst the data to display. |
- Return values
-
string | contents of this table cell. |
◆ col_frequency()
quiz_statistics_question_table::col_frequency |
( |
| $response | ) |
|
|
protected |
The frequency with which this response was given.
- Parameters
-
stdClass | $response | contains the data to display. |
- Return values
-
string | contents of this table cell. |
◆ format_percentage()
quiz_statistics_question_table::format_percentage |
( |
| $fraction | ) |
|
|
protected |
Take a float where 1 represents 100% and return a string representing the percentage.
- Parameters
-
float | $fraction | The fraction. |
- Return values
-
string | The fraction as a percentage. |
◆ other_cols()
quiz_statistics_question_table::other_cols |
( |
| $colname, |
|
|
| $response ) |
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.
- Parameters
-
string | $colname | The name of this column. |
stdClass | $response | The raw data for this row. |
- Return values
-
string|null | The value for this cell of the table or null means use raw data. |
◆ question_setup()
quiz_statistics_question_table::question_setup |
( |
| $reporturl, |
|
|
| $questiondata, |
|
|
| $s, |
|
|
| $responseanalysis ) |
Set up columns and column names and other table settings.
- Parameters
-
The documentation for this class was generated from the following file:
- mod/quiz/report/statistics/statistics_question_table.php