Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

(no description)

Author: James Pratt me@jamiep.org
Copyright: 2013 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 175 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

analysis_for_actual_response:: (6 methods):
  __construct()
  increment_count()
  set_count()
  cache()
  data_for_question_response_table()
  get_maximum_tries()


Class: analysis_for_actual_response  - X-Ref

The leafs of the analysis data structure.

- 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}.

__construct($response, $fraction)   X-Ref

param: string $response
param: float  $fraction

increment_count($try = 0)   X-Ref
Used to count the occurrences of response sub parts.

param: int $try the try number, or 0 if only keeping one count, not a count for each try.

set_count($try, $count)   X-Ref
Used to set the count of occurrences of response sub parts, when loading count from cache.

param: int $try the try number, or 0 if only keeping one count, not a count for each try.
param: int $count

cache($qubaids, $whichtries, $questionid, $variantno, $subpartid, $responseclassid)   X-Ref
Cache analysis for class.

param: \qubaid_condition $qubaids    which question usages have been analysed.
param: string            $whichtries which tries have been analysed?
param: int               $questionid which question.
param: int               $variantno  which variant.
param: string            $subpartid which sub part is this actual response in?
param: string            $responseclassid which response class is this actual response in?

data_for_question_response_table($partid, $modelresponse)   X-Ref
Returns an object with a property for each column of the question response analysis table.

param: string $partid
param: string $modelresponse
return: object

get_maximum_tries()   X-Ref
What is the highest try number that this response has been seen?

return: int try number