original_string: public static function get_attempt_summary($attemptid, $preflightdata = array()) {
  
          $warnings = array();
  
          $params = array(
              'attemptid' => $attemptid,
              'preflightdata' => $preflightdata,
          );
          $params = self::validate_parameters(self::get_attempt_summary_parameters(), $params);
  
          list($attemptobj, $messages) = self::validate_attempt($params, true, false);
  
          $result = array();
          $result['warnings'] = $warnings;
          $result['questions'] = self::get_attempt_questions_data($attemptobj, false, 'all');
  
          return $result;
      }
code: public static function get_attempt_summary($attemptid, $preflightdata = array()) {
  
          $warnings = array();
  
          $params = array(
              'attemptid' => $attemptid,
              'preflightdata' => $preflightdata,
          );
          $params = self::validate_parameters(self::get_attempt_summary_parameters(), $params);
  
          list($attemptobj, $messages) = self::validate_attempt($params, true, false);
  
          $result = array();
          $result['warnings'] = $warnings;
          $result['questions'] = self::get_attempt_questions_data($attemptobj, false, 'all');
  
          return $result;
      }
code_tokens: public static function get_attempt_summary ( $ attemptid , $ preflightdata = array ( ) ) { $ warnings = array ( ) ; $ params = array ( 'attemptid' => $ attemptid , 'preflightdata' => $ preflightdata , ) ; $ params = self :: validate_parameters ( self :: get_attempt_summary_parameters ( ) , $ params ) ; list ( $ attemptobj , $ messages ) = self :: validate_attempt ( $ params , true , false ) ; $ result = array ( ) ; $ result [ 'warnings' ] = $ warnings ; $ result [ 'questions' ] = self :: get_attempt_questions_data ( $ attemptobj , false , 'all' ) ; return $ result ; }
docstring: Returns a summary of a quiz attempt before it is submitted.
  
  @param int $attemptid attempt id
  @param int $preflightdata preflight required data (like passwords)
  @return array of warnings and the attempt summary data for each question
  @since Moodle 3.1
docstring_tokens: Returns a summary of a quiz attempt before it is submitted .