Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402]
(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: | 217 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
analysis_for_class:: (10 methods):
__construct()
count_response()
cache()
add_response()
set_response_count()
has_actual_responses()
data_for_question_response_table()
get_maximum_tries()
get_responses()
get_response()
Class: analysis_for_class - X-Ref
Counts a class of responses for this sub part of the question.__construct($possibleresponse, $responseclassid) X-Ref |
Constructor, just an easy way to set the fields. param: \question_possible_response $possibleresponse param: string $responseclassid |
count_response($actualresponse, $fraction, $try) X-Ref |
Keep a count of a response to this question sub part that falls within this class. param: string $actualresponse param: float|null $fraction param: int $try return: \core_question\statistics\responses\analysis_for_actual_response |
cache($qubaids, $whichtries, $questionid, $variantno, $subpartid, $calculationtime = null) 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. param: int|null $calculationtime time when the analysis was done. (Defaults to time()). |
add_response($response, $fraction) X-Ref |
Add an actual response to the data structure. param: string $response A string representing the actual response. param: float $fraction The fraction of grade awarded for this response. |
set_response_count($response, $try, $count) X-Ref |
Used when loading cached counts. param: string $response param: int $try the try number, will be zero if not keeping track of try. param: int $count the count |
has_actual_responses() X-Ref |
Are there actual responses to sub parts that where classified into this class? return: bool whether this analysis has a response class with more than one |
data_for_question_response_table($responseclasscolumn, $partid) X-Ref |
Return the data to display in the response analysis table. param: bool $responseclasscolumn param: string $partid return: object[] |
get_maximum_tries() X-Ref |
What is the highest try number that an actual response of this response class has been seen? return: int try number |
get_responses() X-Ref |
Return array of the actual responses to this sub part that were classified into this class. return: string[] the actual responses we are counting tries at. |
get_response($response) X-Ref |
Get the data structure used to count the responses that match an actual response within this class of responses. param: string $response return: analysis_for_actual_response the instance for keeping count of tries for $response. |