Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

This file contains a class to analyse all the responses for multiple tries at a particular question.

Author: Jamie Pratt <me@jamiep.org>
Copyright: 2014 Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 84 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

analysis_for_question_all_tries:: (3 methods):
  count_response_parts()
  has_multiple_tries_data()
  get_maximum_tries()


Class: analysis_for_question_all_tries  - X-Ref

Analysis for possible responses for parts of a question with multiple submitted responses.

If the analysis was for a single try it would be handled by {@link \core_question\statistics\responses\analysis_for_question}.

- There is a separate data structure for each question or sub question's analysis
{@link \core_question\statistics\responses\analysis_for_question}
or {@link \core_question\statistics\responses\analysis_for_question_all_tries}.
- There are separate analysis for each variant in this top level instance.
- Then there are class instances representing the analysis of each of the sub parts of each variant of the question.
{@link \core_question\statistics\responses\analysis_for_subpart}.
- Then within the sub part analysis there are response class analysis
{@link \core_question\statistics\responses\analysis_for_class}.
- Then within each class analysis there are analysis for each actual response
{@link \core_question\statistics\responses\analysis_for_actual_response}.

count_response_parts($variantno, $responsepartsforeachtry)   X-Ref
Constructor.

param: int      $variantno               variant number
param: \array[] $responsepartsforeachtry for question with multiple tries we expect an array with first index being try no

has_multiple_tries_data()   X-Ref
No description

get_maximum_tries()   X-Ref
What is the highest number of tries at this question?

return: int try number