Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.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