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. More...
|
|
| add_response ($response, $fraction) |
| Add an actual response to the data structure. More...
|
|
| cache ($qubaids, $whichtries, $questionid, $variantno, $subpartid) |
| Cache analysis for class. More...
|
|
| count_response ($actualresponse, $fraction, $try) |
| Keep a count of a response to this question sub part that falls within this class. More...
|
|
| data_for_question_response_table ($responseclasscolumn, $partid) |
| Return the data to display in the response analysis table. More...
|
|
| get_maximum_tries () |
| What is the highest try number that an actual response of this response class has been seen? More...
|
|
| has_actual_responses () |
| Are there actual responses to sub parts that where classified into this class? More...
|
|
| set_response_count ($response, $try, $count) |
| Used when loading cached counts. More...
|
|
|
| get_response ($response) |
| Get the data structure used to count the responses that match an actual response within this class of responses. More...
|
|
| get_responses () |
| Return array of the actual responses to this sub part that were classified into this class. More...
|
|
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 |
|
) |
| |
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. |
◆ 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
-
◆ 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: