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


Public Member Functions | |
| display ($quiz, $cm, $course) | |
| format_text ($text, $format, $qa, $component, $filearea, $itemid, $clean=false) | |
| format_questiontext ($qa) | |
Data Fields | |
| const | TIME_TO_CACHE_STATS = 900 |
Protected Member Functions | |
| output_individual_question_data ($quiz, $question) | |
| render_question_text ($question) | |
| output_individual_question_response_analysis ($question, $reporturl, $quizstats) | |
| output_quiz_structure_analysis_table ($s, $questions, $subquestions) | |
| get_formatted_quiz_info_data ($course, $cm, $quiz, $quizstats) | |
| output_quiz_info_table ($quizinfo) | |
| download_quiz_info_table ($quizinfo) | |
| output_statistics_graph ($quizstatsid, $s) | |
| get_emtpy_stats ($questions, $firstattemptscount=0, $allattemptscount=0) | |
| compute_stats ($quizid, $currentgroup, $nostudentsingroup, $useallattempts, $groupstudents, $questions) | |
| try_loading_cached_stats ($quiz, $currentgroup, $nostudentsingroup, $useallattempts, $groupstudents, $questions) | |
| cache_stats ($quizid, $currentgroup, $quizstats, $questions, $subquestions) | |
| get_quiz_and_questions_stats ($quiz, $currentgroup, $nostudentsingroup, $useallattempts, $groupstudents, $questions) | |
| analyse_responses ($quizstatisticsid, $quizid, $currentgroup, $nostudentsingroup, $useallattempts, $groupstudents, $questions, $subquestions) | |
| everything_download_options () | |
| output_caching_info ($quizstats, $quizid, $currentgroup, $groupstudents, $useallattempts, $reporturl) | |
| clear_cached_data ($quizid, $currentgroup, $useallattempts) | |
| using_attempts_string ($useallattempts) | |
Protected Attributes | |
| $table | |
The quiz statistics report provides summary information about each question in a quiz, compared to the whole quiz. It also provides a drill-down to more detailed information about each question.
Definition at line 44 of file report.php.
| analyse_responses | ( | $ | quizstatisticsid, |
| $ | quizid, | ||
| $ | currentgroup, | ||
| $ | nostudentsingroup, | ||
| $ | useallattempts, | ||
| $ | groupstudents, | ||
| $ | questions, | ||
| $ | subquestions | ||
| ) | [protected] |
Definition at line 935 of file report.php.


| cache_stats | ( | $ | quizid, |
| $ | currentgroup, | ||
| $ | quizstats, | ||
| $ | questions, | ||
| $ | subquestions | ||
| ) | [protected] |
Store the statistics in the cache tables in the database.
| object | $quizid | the quiz id. |
| int | $currentgroup | the current group. 0 for none. |
| bool | $useallattempts | use all attempts, or just first attempts. |
| object | $quizstats | The statistics for overall attempt scores. |
| array | $questions | The questions, with an additional _stats field. |
| array | $subquestions | The subquestions, if any, with an additional _stats field. |
Definition at line 859 of file report.php.

| clear_cached_data | ( | $ | quizid, |
| $ | currentgroup, | ||
| $ | useallattempts | ||
| ) | [protected] |
Clear the cached data for a particular report configuration. This will trigger a re-computation the next time the report is displayed.
| int | $quizid | the quiz id. |
| int | $currentgroup | a group id, or 0. |
| bool | $useallattempts | whether all attempts, or just first attempts are included. |
Definition at line 1042 of file report.php.

| compute_stats | ( | $ | quizid, |
| $ | currentgroup, | ||
| $ | nostudentsingroup, | ||
| $ | useallattempts, | ||
| $ | groupstudents, | ||
| $ | questions | ||
| ) | [protected] |
Compute the quiz statistics.
| object | $quizid | the quiz id. |
| int | $currentgroup | the current group. 0 for none. |
| bool | $nostudentsingroup | true if there a no students. |
| bool | $useallattempts | use all attempts, or just first attempts. |
| array | $groupstudents | students in this group. |
| array | $questions | question definitions. |
Definition at line 637 of file report.php.


| display | ( | $ | quiz, |
| $ | cm, | ||
| $ | course | ||
| ) |
Display the report.
Reimplemented from quiz_default_report.
Definition at line 54 of file report.php.

| download_quiz_info_table | ( | $ | quizinfo | ) | [protected] |
Download the table of overall quiz statistics.
| array | $quizinfo | as returned by get_formatted_quiz_info_data(). |
Definition at line 553 of file report.php.


| everything_download_options | ( | ) | [protected] |
Definition at line 969 of file report.php.


| format_questiontext | ( | $ | qa | ) |
Definition at line 333 of file report.php.

| format_text | ( | $ | text, |
| $ | format, | ||
| $ | qa, | ||
| $ | component, | ||
| $ | filearea, | ||
| $ | itemid, | ||
| $ | clean = false |
||
| ) |
| get_emtpy_stats | ( | $ | questions, |
| $ | firstattemptscount = 0, |
||
| $ | allattemptscount = 0 |
||
| ) | [protected] |
Return the stats data for when there are no stats to show.
| array | $questions | question definitions. |
| int | $firstattemptscount | number of first attempts (optional). |
| int | $firstattemptscount | total number of attempts (optional). |
Definition at line 609 of file report.php.

| get_formatted_quiz_info_data | ( | $ | course, |
| $ | cm, | ||
| $ | quiz, | ||
| $ | quizstats | ||
| ) | [protected] |
Definition at line 462 of file report.php.


| get_quiz_and_questions_stats | ( | $ | quiz, |
| $ | currentgroup, | ||
| $ | nostudentsingroup, | ||
| $ | useallattempts, | ||
| $ | groupstudents, | ||
| $ | questions | ||
| ) | [protected] |
Get the quiz and question statistics, either by loading the cached results, or by recomputing them.
| object | $quiz | the quiz settings. |
| int | $currentgroup | the current group. 0 for none. |
| bool | $nostudentsingroup | true if there a no students. |
| bool | $useallattempts | use all attempts, or just first attempts. |
| array | $groupstudents | students in this group. |
| array | $questions | question definitions. |
Definition at line 908 of file report.php.


| output_caching_info | ( | $ | quizstats, |
| $ | quizid, | ||
| $ | currentgroup, | ||
| $ | groupstudents, | ||
| $ | useallattempts, | ||
| $ | reporturl | ||
| ) | [protected] |
Generate the snipped of HTML that says when the stats were last caculated, with a recalcuate now button.
| object | $quizstats | the overall quiz statistics. |
| int | $quizid | the quiz id. |
| int | $currentgroup | the id of the currently selected group, or 0. |
| array | $groupstudents | ids of students in the group. |
| bool | $useallattempts | whether to use all attempts, instead of just first attempts. |
Definition at line 996 of file report.php.


| output_individual_question_data | ( | $ | quiz, |
| $ | question | ||
| ) | [protected] |
Display the statistical and introductory information about a question. Only called when not downloading.
| object | $quiz | the quiz settings. |
| object | $question | the question to report on. |
| moodle_url | $reporturl | the URL to resisplay this report. |
| object | $quizstats | Holds the quiz statistics. |
Definition at line 266 of file report.php.


| output_individual_question_response_analysis | ( | $ | question, |
| $ | reporturl, | ||
| $ | quizstats | ||
| ) | [protected] |
Display the response analysis for a question.
| object | $question | the question to report on. |
| moodle_url | $reporturl | the URL to resisplay this report. |
| object | $quizstats | Holds the quiz statistics. |
Definition at line 359 of file report.php.


| output_quiz_info_table | ( | $ | quizinfo | ) | [protected] |
Output the table of overall quiz statistics.
| array | $quizinfo | as returned by get_formatted_quiz_info_data(). |
Definition at line 534 of file report.php.

| output_quiz_structure_analysis_table | ( | $ | s, |
| $ | questions, | ||
| $ | subquestions | ||
| ) | [protected] |
Output the table that lists all the questions in the quiz with their statistics.
| int | $s | number of attempts. |
| array | $questions | the questions in the quiz. |
| array | $subquestions | the subquestions of any random questions. |
Definition at line 438 of file report.php.

| output_statistics_graph | ( | $ | quizstatsid, |
| $ | s | ||
| ) | [protected] |
Output the HTML needed to show the statistics graph.
| int | $quizstatsid | the id of the statistics to show in the graph. |
Definition at line 583 of file report.php.


| render_question_text | ( | $ | question | ) | [protected] |
| object | $question | question data. |
Definition at line 342 of file report.php.


| try_loading_cached_stats | ( | $ | quiz, |
| $ | currentgroup, | ||
| $ | nostudentsingroup, | ||
| $ | useallattempts, | ||
| $ | groupstudents, | ||
| $ | questions | ||
| ) | [protected] |
Load the cached statistics from the database.
| object | $quiz | the quiz settings |
| int | $currentgroup | the current group. 0 for none. |
| bool | $nostudentsingroup | true if there a no students. |
| bool | $useallattempts | use all attempts, or just first attempts. |
| array | $groupstudents | students in this group. |
| array | $questions | question definitions. |
Definition at line 804 of file report.php.


| using_attempts_string | ( | $ | useallattempts | ) | [protected] |
| bool | $useallattempts | whether we are using all attempts. |
Definition at line 1066 of file report.php.

$table [protected] |
Definition at line 49 of file report.php.
| const TIME_TO_CACHE_STATS = 900 |
Definition at line 46 of file report.php.