original_string: protected function init($mode, $formclass, $quiz, $cm, $course) {
          $this->mode = $mode;
  
          $this->context = context_module::instance($cm->id);
  
          list($currentgroup, $studentsjoins, $groupstudentsjoins, $allowedjoins) = $this->get_students_joins(
                  $cm, $course);
  
          $this->qmsubselect = quiz_report_qm_filter_select($quiz);
  
          $this->form = new $formclass($this->get_base_url(),
                  array('quiz' => $quiz, 'currentgroup' => $currentgroup, 'context' => $this->context));
  
          return array($currentgroup, $studentsjoins, $groupstudentsjoins, $allowedjoins);
      }
code: protected function init($mode, $formclass, $quiz, $cm, $course) {
          $this->mode = $mode;
  
          $this->context = context_module::instance($cm->id);
  
          list($currentgroup, $studentsjoins, $groupstudentsjoins, $allowedjoins) = $this->get_students_joins(
                  $cm, $course);
  
          $this->qmsubselect = quiz_report_qm_filter_select($quiz);
  
          $this->form = new $formclass($this->get_base_url(),
                  array('quiz' => $quiz, 'currentgroup' => $currentgroup, 'context' => $this->context));
  
          return array($currentgroup, $studentsjoins, $groupstudentsjoins, $allowedjoins);
      }
code_tokens: protected function init ( $ mode , $ formclass , $ quiz , $ cm , $ course ) { $ this -> mode = $ mode ; $ this -> context = context_module :: instance ( $ cm -> id ) ; list ( $ currentgroup , $ studentsjoins , $ groupstudentsjoins , $ allowedjoins ) = $ this -> get_students_joins ( $ cm , $ course ) ; $ this -> qmsubselect = quiz_report_qm_filter_select ( $ quiz ) ; $ this -> form = new $ formclass ( $ this -> get_base_url ( ) , array ( 'quiz' => $ quiz , 'currentgroup' => $ currentgroup , 'context' => $ this -> context ) ) ; return array ( $ currentgroup , $ studentsjoins , $ groupstudentsjoins , $ allowedjoins ) ; }
docstring: Initialise various aspects of this report.
  
  @param string $mode
  @param string $formclass
  @param object $quiz
  @param object $cm
  @param object $course
  @return 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.
docstring_tokens: Initialise various aspects of this report .