Counts a class of responses for this sub part of the question.
More...
|
| __construct ($possibleresponse, $responseclassid) |
| Constructor, just an easy way to set the fields.
|
|
| add_response ($response, $fraction) |
| Add an actual response to the data structure.
|
|
| cache ($qubaids, $whichtries, $questionid, $variantno, $subpartid, $calculationtime=null) |
| Cache analysis for class.
|
|
| count_response ($actualresponse, $fraction, $try) |
| Keep a count of a response to this question sub part that falls within this class.
|
|
| data_for_question_response_table ($responseclasscolumn, $partid) |
| Return the data to display in the response analysis table.
|
|
| get_maximum_tries () |
| What is the highest try number that an actual response of this response class has been seen?
|
|
| has_actual_responses () |
| Are there actual responses to sub parts that where classified into this class?
|
|
| set_response_count ($response, $try, $count) |
| Used when loading cached counts.
|
|
|
| get_response ($response) |
| Get the data structure used to count the responses that match an actual response within this class of responses.
|
|
| get_responses () |
| Return array of the actual responses to this sub part that were classified into this class.
|
|
|
analysis_for_actual_response[] | $actualresponses = array() |
| key is the actual response represented as a string as it will be displayed in report.
|
|
string | $fraction |
| the (partial) credit awarded for this responses.
|
|
string | $modelresponse |
| represent this class in the response analysis table.
|
|
string | $responseclassid |
| must be unique for each response class within this sub part.
|
|
Counts a class of responses for this sub part of the question.
No response is one possible class of response to a question.
- Copyright
- 2014 The Open University
- Author
- James Pratt me@ja.nosp@m.miep.nosp@m..org
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_question\statistics\responses\analysis_for_class::__construct |
( |
| $possibleresponse, |
|
|
| $responseclassid ) |
Constructor, just an easy way to set the fields.
- Parameters
-
◆ add_response()
core_question\statistics\responses\analysis_for_class::add_response |
( |
| $response, |
|
|
| $fraction ) |
Add an actual response to the data structure.
- Parameters
-
string | $response | A string representing the actual response. |
float | $fraction | The fraction of grade awarded for this response. |
◆ cache()
core_question\statistics\responses\analysis_for_class::cache |
( |
| $qubaids, |
|
|
| $whichtries, |
|
|
| $questionid, |
|
|
| $variantno, |
|
|
| $subpartid, |
|
|
| $calculationtime = null ) |
Cache analysis for class.
- Parameters
-
qubaid_condition | $qubaids | which question usages have been analysed. |
string | $whichtries | which tries have been analysed? |
int | $questionid | which question. |
int | $variantno | which variant. |
string | $subpartid | which sub part. |
int | null | $calculationtime | time when the analysis was done. (Defaults to time()). |
◆ count_response()
core_question\statistics\responses\analysis_for_class::count_response |
( |
| $actualresponse, |
|
|
| $fraction, |
|
|
| $try ) |
Keep a count of a response to this question sub part that falls within this class.
- Parameters
-
string | $actualresponse | |
float | null | $fraction | |
int | $try | |
- Return values
-
◆ data_for_question_response_table()
core_question\statistics\responses\analysis_for_class::data_for_question_response_table |
( |
| $responseclasscolumn, |
|
|
| $partid ) |
Return the data to display in the response analysis table.
- Parameters
-
bool | $responseclasscolumn | |
string | $partid | |
- Return values
-
◆ get_maximum_tries()
core_question\statistics\responses\analysis_for_class::get_maximum_tries |
( |
| ) |
|
What is the highest try number that an actual response of this response class has been seen?
- Return values
-
◆ get_response()
core_question\statistics\responses\analysis_for_class::get_response |
( |
| $response | ) |
|
|
protected |
Get the data structure used to count the responses that match an actual response within this class of responses.
- Parameters
-
- Return values
-
analysis_for_actual_response | the instance for keeping count of tries for $response. |
◆ get_responses()
core_question\statistics\responses\analysis_for_class::get_responses |
( |
| ) |
|
|
protected |
Return array of the actual responses to this sub part that were classified into this class.
- Return values
-
string[] | the actual responses we are counting tries at. |
◆ has_actual_responses()
core_question\statistics\responses\analysis_for_class::has_actual_responses |
( |
| ) |
|
Are there actual responses to sub parts that where classified into this class?
- Return values
-
bool | whether this analysis has a response class with more than one different actual response, or if the actual response is different from the model response. |
◆ set_response_count()
core_question\statistics\responses\analysis_for_class::set_response_count |
( |
| $response, |
|
|
| $try, |
|
|
| $count ) |
Used when loading cached counts.
- Parameters
-
string | $response | |
int | $try | the try number, will be zero if not keeping track of try. |
int | $count | the count |
The documentation for this class was generated from the following file:
- question/classes/statistics/responses/analysis_for_class.php