Makes some protected methods of attempts_report public to facilitate testing.  
 More...
|  | 
|  | delete_selected_attempts ($quiz, $cm, $attemptids, core\dml\sql_join $allowedjoins) | 
|  | Testable delete_selected_attempts function. 
 | 
|  | 
|  | display ($cm, $course, $quiz) | 
|  | Override this function to displays the report. 
 | 
|  | 
|  | get_current_group ($cm, $course, $context) | 
|  | Get the current group for the user user looking at the report. 
 | 
|  | 
|  | init ($mode, $formclass, $quiz, $cm, $course) | 
|  | Initialise various aspects of this report. 
 | 
|  | 
|  | print_header_and_tabs ($cm, $course, $quiz, $reportmode='overview') | 
|  | Initialise some parts of $PAGE and start output. 
 | 
|  | 
|  | 
| string const | ALL_WITH = 'all_with' | 
|  | constant used for the options, means all users with attempts. 
 | 
|  | 
| int const | DEFAULT_PAGE_SIZE = 30 | 
|  | default page size for reports. 
 | 
|  | 
| string const | ENROLLED_ALL = 'enrolled_any' | 
|  | constant used for the options, means all enrolled users. 
 | 
|  | 
| string const | ENROLLED_WITH = 'enrolled_with' | 
|  | constant used for the options, means only enrolled users with attempts. 
 | 
|  | 
| string const | ENROLLED_WITHOUT = 'enrolled_without' | 
|  | constant used for the options, means only enrolled users without attempts. 
 | 
|  | 
| int const | NO_GROUPS_ALLOWED = -2 | 
|  | special value used in place of groupid, to mean the use cannot access any groups. 
 | 
|  | 
|  | 
|  | add_grade_columns ($quiz, $usercanseegrades, &$columns, &$headers, $includefeedback=true) | 
|  | Add all the grade and feedback columns, if applicable, to the $columns and $headers arrays. 
 | 
|  | 
|  | add_state_column (&$columns, &$headers) | 
|  | Add the state column to the $columns and $headers arrays. 
 | 
|  | 
|  | add_time_columns (&$columns, &$headers) | 
|  | Add all the time-related columns to the $columns and $headers arrays. 
 | 
|  | 
|  | add_user_columns ($table, &$columns, &$headers) | 
|  | Add all the user-related columns to the $columns and $headers arrays. 
 | 
|  | 
|  | configure_user_columns ($table) | 
|  | Set the display options for the user-related columns in the table. 
 | 
|  | 
|  | get_base_url () | 
|  | Get the base URL for this report. 
 | 
|  | 
|  | get_students_joins ($cm, $course=null) | 
|  | Get sql fragments (joins) which can be used to build queries that will select an appropriate set of students to show in the reports. 
 | 
|  | 
|  | print_standard_header_and_messages ($cm, $course, $quiz, $options, $currentgroup, $hasquestions, $hasstudents) | 
|  | Outputs the things you commonly want at the top of a quiz report. 
 | 
|  | 
|  | process_actions ($quiz, $cm, $currentgroup, core\dml\sql_join $groupstudentsjoins, core\dml\sql_join $allowedjoins, $redirecturl) | 
|  | Process any submitted actions. 
 | 
|  | 
|  | set_up_table_columns ($table, $columns, $headers, $reporturl, attempts_report_options $options, $collapsible) | 
|  | Set up the table. 
 | 
|  | 
|  | 
| context_module | $context | 
|  | the quiz context. 
 | 
|  | 
| attempts_report_options_form | $form | 
|  | The settings form to use. 
 | 
|  | 
| bool | $hasgroupstudents | 
|  | 
| string | $mode | 
|  | the mode this report is. 
 | 
|  | 
| string | $qmsubselect | 
|  | SQL fragment for selecting the attempt that gave the final grade, if applicable. 
 | 
|  | 
| quiz_settings null | $quizobj = null | 
|  | quiz settings object. 
 | 
|  | 
| boolean | $showgrades = null | 
|  | caches the results of { 
 | 
|  | 
Makes some protected methods of attempts_report public to facilitate testing. 
- Copyright
- 2020 Huong Nguyen huong.nosp@m.nv13.nosp@m.@gmai.nosp@m.l.co.nosp@m.m 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later Makes some protected methods of attempts_report public to facilitate testing.
- Copyright
- 2020 Huong Nguyen huong.nosp@m.nv13.nosp@m.@gmai.nosp@m.l.co.nosp@m.m 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ add_grade_columns()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::add_grade_columns | ( |  | $quiz, |  
          |  |  |  | $usercanseegrades, |  
          |  |  | & | $columns, |  
          |  |  | & | $headers, |  
          |  |  |  | $includefeedback = true ) |  | protectedinherited | 
 
Add all the grade and feedback columns, if applicable, to the $columns and $headers arrays. 
- Parameters
- 
  
    | stdClass | $quiz | the quiz settings. |  | bool | $usercanseegrades | whether the user is allowed to see grades for this quiz. |  | array | $columns | the list of columns. Added to. |  | array | $headers | the columns headings. Added to. |  | bool | $includefeedback | whether to include the feedbacktext columns |  
 
 
 
◆ add_state_column()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::add_state_column | ( | & | $columns, |  
          |  |  | & | $headers ) |  | protectedinherited | 
 
Add the state column to the $columns and $headers arrays. 
- Parameters
- 
  
    | array | $columns | the list of columns. Added to. |  | array | $headers | the columns headings. Added to. |  
 
 
 
◆ add_time_columns()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::add_time_columns | ( | & | $columns, |  
          |  |  | & | $headers ) |  | protectedinherited | 
 
Add all the time-related columns to the $columns and $headers arrays. 
- Parameters
- 
  
    | array | $columns | the list of columns. Added to. |  | array | $headers | the columns headings. Added to. |  
 
 
 
◆ add_user_columns()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::add_user_columns | ( |  | $table, |  
          |  |  | & | $columns, |  
          |  |  | & | $headers ) |  | protectedinherited | 
 
Add all the user-related columns to the $columns and $headers arrays. 
- Parameters
- 
  
    | table_sql | $table | the table being constructed. |  | array | $columns | the list of columns. Added to. |  | array | $headers | the columns headings. Added to. |  
 
 
 
◆ configure_user_columns()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::configure_user_columns | ( |  | $table | ) |  |  | protectedinherited | 
 
Set the display options for the user-related columns in the table. 
- Parameters
- 
  
  
 
 
◆ delete_selected_attempts()
      
        
          | testable_quiz_attempts_report::delete_selected_attempts | ( |  | $quiz, | 
        
          |  |  |  | $cm, | 
        
          |  |  |  | $attemptids, | 
        
          |  |  | core\dml\sql_join | $allowedjoins ) | 
      
 
 
◆ display()
      
        
          | testable_quiz_attempts_report::display | ( |  | $cm, | 
        
          |  |  |  | $course, | 
        
          |  |  |  | $quiz ) | 
      
 
Override this function to displays the report. 
- Parameters
- 
  
    | stdClass | $cm | the course-module for this quiz. |  | stdClass | $course | the course we are in. |  | stdClass | $quiz | this quiz. |  
 
Reimplemented from mod_quiz\local\reports\report_base.
 
 
◆ get_base_url()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::get_base_url | ( |  | ) |  |  | protectedinherited | 
 
Get the base URL for this report. 
- Return values
- 
  
  
 
 
◆ get_current_group()
  
  | 
        
          | mod_quiz\local\reports\report_base::get_current_group | ( |  | $cm, |  
          |  |  |  | $course, |  
          |  |  |  | $context ) |  | inherited | 
 
Get the current group for the user user looking at the report. 
- Parameters
- 
  
    | stdClass | $cm | the course_module information. |  | stdClass | $course | the course settings. |  | context | $context | the quiz context. |  
 
- Return values
- 
  
    | int | the current group id, if applicable. 0 for all users, NO_GROUPS_ALLOWED if the user cannot see any group. |  
 
 
 
◆ get_students_joins()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::get_students_joins | ( |  | $cm, |  
          |  |  |  | $course = null ) |  | protectedinherited | 
 
Get sql fragments (joins) which can be used to build queries that will select an appropriate set of students to show in the reports. 
- Parameters
- 
  
    | stdClass | $cm | the course module. |  | stdClass | $course | the course settings. |  
 
- Return values
- 
  
    | array | with four elements: 0 => integer the current group id (0 for none). 1 => core\dml\sql_join Contains joins, wheres, params for all the students in this course. 2 => core\dml\sql_join Contains joins, wheres, params for all the students in the current group. 3 => core\dml\sql_join Contains joins, wheres, params for all the students to show in the report. Will be the same as either element 1 or 2. |  
 
 
 
◆ init()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::init | ( |  | $mode, |  
          |  |  |  | $formclass, |  
          |  |  |  | $quiz, |  
          |  |  |  | $cm, |  
          |  |  |  | $course ) |  | inherited | 
 
Initialise various aspects of this report. 
- Parameters
- 
  
    | string | $mode |  |  | string | $formclass |  |  | stdClass | $quiz |  |  | stdClass | $cm |  |  | stdClass | $course |  |  
 
- Return values
- 
  
    | array | with four elements: 0 => integer the current group id (0 for none). 1 => core\dml\sql_join Contains joins, wheres, params for all the students in this course. 2 => core\dml\sql_join Contains joins, wheres, params for all the students in the current group. 3 => core\dml\sql_join Contains joins, wheres, params for all the students to show in the report. Will be the same as either element 1 or 2. |  
 
 
 
◆ print_header_and_tabs()
  
  | 
        
          | mod_quiz\local\reports\report_base::print_header_and_tabs | ( |  | $cm, |  
          |  |  |  | $course, |  
          |  |  |  | $quiz, |  
          |  |  |  | $reportmode = 'overview' ) |  | inherited | 
 
Initialise some parts of $PAGE and start output. 
- Parameters
- 
  
    | stdClass | $cm | the course_module information. |  | stdClass | $course | the course settings. |  | stdClass | $quiz | the quiz settings. |  | string | $reportmode | the report name. |  
 
Reimplemented in quiz_grading_report.
 
 
◆ print_standard_header_and_messages()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::print_standard_header_and_messages | ( |  | $cm, |  
          |  |  |  | $course, |  
          |  |  |  | $quiz, |  
          |  |  |  | $options, |  
          |  |  |  | $currentgroup, |  
          |  |  |  | $hasquestions, |  
          |  |  |  | $hasstudents ) |  | protectedinherited | 
 
Outputs the things you commonly want at the top of a quiz report. 
Calls through to {
- See also
- print_header_and_tabs()} and then outputs the standard group selector, number of attempts summary, and messages to cover common cases when the report can't be shown.
- Parameters
- 
  
    | stdClass | $cm | the course_module information. |  | stdClass | $course | the course settings. |  | stdClass | $quiz | the quiz settings. |  | attempts_report_options | $options | the current report settings. |  | int | $currentgroup | the current group. |  | bool | $hasquestions | whether there are any questions in the quiz. |  | bool | $hasstudents | whether there are any relevant students. |  
 
 
 
◆ process_actions()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::process_actions | ( |  | $quiz, |  
          |  |  |  | $cm, |  
          |  |  |  | $currentgroup, |  
          |  |  | core\dml\sql_join | $groupstudentsjoins, |  
          |  |  | core\dml\sql_join | $allowedjoins, |  
          |  |  |  | $redirecturl ) |  | protectedinherited | 
 
Process any submitted actions. 
- Parameters
- 
  
    | stdClass | $quiz | the quiz settings. |  | stdClass | $cm | the cm object for the quiz. |  | int | $currentgroup | the currently selected group. |  | core\dml\sql_join | $groupstudentsjoins | (joins, wheres, params) the students in the current group. |  | core\dml\sql_join | $allowedjoins | (joins, wheres, params) the users whose attempt this user is allowed to modify. |  | moodle_url | $redirecturl | where to redircet to after a successful action. |  
 
Reimplemented in quiz_overview_report.
 
 
◆ set_up_table_columns()
  
  | 
        
          | mod_quiz\local\reports\attempts_report::set_up_table_columns | ( |  | $table, |  
          |  |  |  | $columns, |  
          |  |  |  | $headers, |  
          |  |  |  | $reporturl, |  
          |  |  | attempts_report_options | $options, |  
          |  |  |  | $collapsible ) |  | protectedinherited | 
 
Set up the table. 
- Parameters
- 
  
    | table_sql | $table | the table being constructed. |  | array | $columns | the list of columns. |  | array | $headers | the columns headings. |  | moodle_url | $reporturl | the URL of this report. |  | attempts_report_options | $options | the display options. |  | bool | $collapsible | whether to allow columns in the report to be collapsed. |  
 
 
 
◆ $quizobj
  
  | 
        
          | quiz_settings null mod_quiz\local\reports\attempts_report::$quizobj = null |  | protectedinherited | 
 
quiz settings object. 
Set in the init method. 
 
 
◆ $showgrades
  
  | 
        
          | boolean mod_quiz\local\reports\attempts_report::$showgrades = null |  | protectedinherited | 
 
caches the results of { 
- See also
- should_show_grades()}. 
 
 
The documentation for this class was generated from the following file: