Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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)
 
 count_response_parts ($variantno, $responsepartsforeachtry)
 Constructor. More...
 
 get_analysis_for_subpart ($variantno, $subpartid)
 Get the response counts etc. More...
 
 get_maximum_tries ()
 What is the highest number of tries at this question? More...
 
 get_subpart_ids ($variantno)
 Unique ids for sub parts. More...
 
 get_variant_nos ()
 Variant nos found in this question's attempt data. More...
 
 has_actual_responses ()
 
 has_multiple_response_classes ()
 Used to work out what kind of table is needed to display stats. More...
 
 has_multiple_tries_data ()
 
 has_subparts ()
 Used to work out what kind of table is needed to display stats. More...
 

Protected Member Functions

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

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 
)
inherited
Parameters
qubaid_condition$qubaidswhich question usages have been analysed.
string$whichtrieswhich tries have been analysed?
int$questionidwhich question.

◆ 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: