original_string: public static function get_quiz_required_qtypes($quizid) {
          global $DB, $USER;
  
          $warnings = array();
  
          $params = array(
              'quizid' => $quizid
          );
          $params = self::validate_parameters(self::get_quiz_required_qtypes_parameters(), $params);
  
          list($quiz, $course, $cm, $context) = self::validate_quiz($params['quizid']);
  
          $quizobj = quiz::create($cm->instance, $USER->id);
          $quizobj->preload_questions();
          $quizobj->load_questions();
  
          // Question types used.
          $result = array();
          $result['questiontypes'] = $quizobj->get_all_question_types_used(true);
          $result['warnings'] = $warnings;
          return $result;
      }
code: public static function get_quiz_required_qtypes($quizid) {
          global $DB, $USER;
  
          $warnings = array();
  
          $params = array(
              'quizid' => $quizid
          );
          $params = self::validate_parameters(self::get_quiz_required_qtypes_parameters(), $params);
  
          list($quiz, $course, $cm, $context) = self::validate_quiz($params['quizid']);
  
          $quizobj = quiz::create($cm->instance, $USER->id);
          $quizobj->preload_questions();
          $quizobj->load_questions();
  
          // Question types used.
          $result = array();
          $result['questiontypes'] = $quizobj->get_all_question_types_used(true);
          $result['warnings'] = $warnings;
          return $result;
      }
code_tokens: public static function get_quiz_required_qtypes ( $ quizid ) { global $ DB , $ USER ; $ warnings = array ( ) ; $ params = array ( 'quizid' => $ quizid ) ; $ params = self :: validate_parameters ( self :: get_quiz_required_qtypes_parameters ( ) , $ params ) ; list ( $ quiz , $ course , $ cm , $ context ) = self :: validate_quiz ( $ params [ 'quizid' ] ) ; $ quizobj = quiz :: create ( $ cm -> instance , $ USER -> id ) ; $ quizobj -> preload_questions ( ) ; $ quizobj -> load_questions ( ) ; // Question types used. $ result = array ( ) ; $ result [ 'questiontypes' ] = $ quizobj -> get_all_question_types_used ( true ) ; $ result [ 'warnings' ] = $ warnings ; return $ result ; }
docstring: Return the potential question types that would be required for a given quiz.
  Please note that for random question types we return the potential question types in the category choosen.
  
  @param int $quizid quiz instance id
  @return array of warnings and the access information
  @since Moodle 3.1
  @throws  moodle_quiz_exception
docstring_tokens: Return the potential question types that would be required for a given quiz . Please note that for random question types we return the potential question types in the category choosen .