Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403]
Data structure to count responses for each of the sub parts of a question.
Author: | James Pratt me@jamiep.org |
Copyright: | 2014 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 159 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
analysis_for_subpart:: (3 methods):
__construct()
get_response_class_ids()
get_response_class()
id:: (5 methods):
has_multiple_response_classes()
count_response()
cache()
has_actual_responses()
get_maximum_tries()
Class: analysis_for_subpart - X-Ref
Representing the analysis of each of the sub parts of each variant of the question.__construct(array $responseclasses = null) X-Ref |
Takes an array of possible_responses as returned from {@link \question_type::get_possible_responses()}. param: \question_possible_response[] $responseclasses as returned from {@link \question_type::get_possible_responses()}. |
get_response_class_ids() X-Ref |
Unique ids for response classes. return: string[] |
get_response_class($classid) X-Ref |
Get the instance of the class handling the analysis of $classid for this sub part. param: string $classid id for response class. return: analysis_for_class |
has_multiple_response_classes() X-Ref |
Whether there is more than one response class for responses in this question sub part? return: bool Are there? |
count_response($subpart, $try = 0) X-Ref |
Count a part of a response. param: \question_classified_response $subpart param: int $try the try number or zero if not keeping track of try number |
cache($qubaids, $whichtries, $questionid, $variantno, $subpartid, $calculationtime = null) X-Ref |
Cache analysis for sub part. 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. param: int|null $calculationtime time when the analysis was done. (Defaults to time()). |
has_actual_responses() X-Ref |
Has actual responses different to the model response for this class? return: bool whether this analysis has a response class with more than one |
get_maximum_tries() X-Ref |
What is the highest try number for this sub part? return: int max tries |