Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_question\statistics\responses\analysis_for_question_all_tries Class Reference

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

Inheritance diagram for core_question\statistics\responses\analysis_for_question_all_tries:
core_question\statistics\responses\analysis_for_question

Public Member Functions

 cache ($qubaids, $whichtries, $questionid, $calculationtime=null)
 Save the analysis to the DB, first cleaning up any old ones.
 
 count_response_parts ($variantno, $responsepartsforeachtry)
 Constructor.
 
 get_analysis_for_subpart ($variantno, $subpartid)
 Get the response counts etc.
 
 get_maximum_tries ()
 What is the highest number of tries at this question?
 
 get_subpart_ids ($variantno)
 Unique ids for sub parts.
 
 get_variant_nos ()
 Variant nos found in this question's attempt data.
 
 has_actual_responses ()
 
 has_multiple_response_classes ()
 Used to work out what kind of table is needed to display stats.
 
 has_multiple_tries_data ()
 
 has_subparts ()
 Used to work out what kind of table is needed to display stats.
 

Protected Member Functions

 initialise_stats_for_variant ($variantno)
 Initialise data structure for response analysis of one variant.
 

Protected Attributes

array[] $possibleresponses = array()
 See description above in constructor method.
 
array[] $subparts = array()
 A multidimensional array whose first index is variant no and second index is subpart id, array contents are of type analysis_for_subpart.
 

Detailed Description

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 core_question::statistics::responses::analysis_for_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

Member Function Documentation

◆ cache()

core_question\statistics\responses\analysis_for_question::cache ( $qubaids,
$whichtries,
$questionid,
$calculationtime = null )
inherited

Save the analysis to the DB, first cleaning up any old ones.

Parameters
qubaid_condition$qubaidswhich question usages have been analysed.
string$whichtrieswhich tries have been analysed?
int$questionidwhich question.
int | null$calculationtimetime when the analysis was done. (Defaults to time()).

◆ count_response_parts()

core_question\statistics\responses\analysis_for_question_all_tries::count_response_parts ( $variantno,
$responsepartsforeachtry )

Constructor.

Parameters
int$variantnovariant number
array[]$responsepartsforeachtryfor question with multiple tries we expect an array with first index being try no then second index is subpartid and values are question_classified_response

Reimplemented from core_question\statistics\responses\analysis_for_question.

◆ get_analysis_for_subpart()

core_question\statistics\responses\analysis_for_question::get_analysis_for_subpart ( $variantno,
$subpartid )
inherited

Get the response counts etc.

for variant $variantno, question sub part $subpartid.

Or if there is no recorded analysis yet then initialise the data structure for that part of the analysis and return the initialised analysis objects.

Parameters
int$variantno
string$subpartidid for sub part.
Return values
analysis_for_subpart

◆ get_maximum_tries()

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

What is the highest number of tries at this question?

Return values
inttry number

Reimplemented from core_question\statistics\responses\analysis_for_question.

◆ get_subpart_ids()

core_question\statistics\responses\analysis_for_question::get_subpart_ids ( $variantno)
inherited

Unique ids for sub parts.

Parameters
int$variantno
Return values
string[]

◆ get_variant_nos()

core_question\statistics\responses\analysis_for_question::get_variant_nos ( )
inherited

Variant nos found in this question's attempt data.

Return values
int[]

◆ has_actual_responses()

core_question\statistics\responses\analysis_for_question::has_actual_responses ( )
inherited
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_question::has_multiple_response_classes ( )
inherited

Used to work out what kind of table is needed to display stats.

Return values
boolwhether this question has (a subpart with) more than one response class.

◆ has_multiple_tries_data()

core_question\statistics\responses\analysis_for_question_all_tries::has_multiple_tries_data ( )
Return values
boolDoes this response analysis include counts for responses for multiple tries of the question?

Reimplemented from core_question\statistics\responses\analysis_for_question.

◆ has_subparts()

core_question\statistics\responses\analysis_for_question::has_subparts ( )
inherited

Used to work out what kind of table is needed to display stats.

Return values
boolwhether this analysis has more than one subpart.

◆ initialise_stats_for_variant()

core_question\statistics\responses\analysis_for_question::initialise_stats_for_variant ( $variantno)
protectedinherited

Initialise data structure for response analysis of one variant.

Parameters
int$variantno

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