Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
core_question\statistics\responses\analysis_for_subpart Class Reference

Representing the analysis of each of the sub parts of each variant of the question. More...

Public Member Functions

 __construct (array $responseclasses=null)
 Takes an array of possible_responses as returned from question_type::get_possible_responses(). More...
 
 cache ($qubaids, $whichtries, $questionid, $variantno, $subpartid)
 Cache analysis for sub part. More...
 
 count_response ($subpart, $try=0)
 Count a part of a response. More...
 
 get_maximum_tries ()
 What is the highest try number for this sub part? More...
 
 get_response_class ($classid)
 Get the instance of the class handling the analysis of $classid for this sub part. More...
 
 get_response_class_ids ()
 Unique ids for response classes. More...
 
 has_actual_responses ()
 Has actual responses different to the model response for this class? More...
 
 has_multiple_response_classes ()
 Whether there is more than one response class for responses in this question sub part? More...
 

Protected Attributes

analysis_for_class[] $responseclasses
 

Detailed Description

Representing the analysis of each of the sub parts of each variant of the question.

Author
James Pratt me@ja.nosp@m.miep.nosp@m..org
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_question\statistics\responses\analysis_for_subpart::__construct ( array  $responseclasses = null)

Takes an array of possible_responses as returned from question_type::get_possible_responses().

Parameters
question_possible_response[]$responseclassesas returned from question_type::get_possible_responses().

Member Function Documentation

◆ cache()

core_question\statistics\responses\analysis_for_subpart::cache (   $qubaids,
  $whichtries,
  $questionid,
  $variantno,
  $subpartid 
)

Cache analysis for sub part.

Parameters
qubaid_condition$qubaidswhich question usages have been analysed.
string$whichtrieswhich tries have been analysed?
int$questionidwhich question.
int$variantnowhich variant.
string$subpartidwhich sub part.

◆ count_response()

core_question\statistics\responses\analysis_for_subpart::count_response (   $subpart,
  $try = 0 
)

Count a part of a response.

Parameters
question_classified_response$subpart
int$trythe try number or zero if not keeping track of try number

◆ get_maximum_tries()

core_question\statistics\responses\analysis_for_subpart::get_maximum_tries ( )

What is the highest try number for this sub part?

Return values
intmax tries

◆ get_response_class()

core_question\statistics\responses\analysis_for_subpart::get_response_class (   $classid)

Get the instance of the class handling the analysis of $classid for this sub part.

Parameters
string$classidid for response class.
Return values
analysis_for_class

◆ get_response_class_ids()

core_question\statistics\responses\analysis_for_subpart::get_response_class_ids ( )

Unique ids for response classes.

Return values
string[]

◆ has_actual_responses()

core_question\statistics\responses\analysis_for_subpart::has_actual_responses ( )

Has actual responses different to the model response for this class?

Return values
boolwhether this analysis has a response class with more than one different actual response, or if the actual response is different from the model response.

◆ has_multiple_response_classes()

core_question\statistics\responses\analysis_for_subpart::has_multiple_response_classes ( )

Whether there is more than one response class for responses in this question sub part?

Return values
boolAre there?

The documentation for this class was generated from the following file: