Class calculated_question_summary.
More...
|
| __construct ($question, $slot, $subqstats) |
| calculated_question_summary constructor.
|
|
| break_down_by_variant () |
| This is a summary stat so never breakdown by variant.
|
|
| cache ($qubaids, $timemodified=null) |
| Cache calculated stats stored in this object in 'question_statistics' table.
|
|
| clear_variants () |
| Delete the data structure for storing variant stats.
|
|
| get_min_max_of ($attribute) |
| Returns the minimum and maximum values of the given attribute in the summarised calculated stats.
|
|
| get_sub_question_ids () |
| Get any sub question ids for this question.
|
|
| get_variants () |
| Array of variants that have appeared in the attempt data for this question.
|
|
| populate_from_record ($record) |
| Load properties of this class from db record.
|
|
| random_selector_string () |
| Used to determine which random questions pull sub questions from the same pools.
|
|
| sort_variants () |
| Sort the variants of this question by variant number.
|
|
|
| $covariance |
|
| $covariancemax |
|
| $covariancemaxsum = 0 |
|
| $covariancesum = 0 |
|
| $covariancewithoverallmark |
|
| $covariancewithoverallmarksum = 0 |
|
float | $discriminationindex |
|
float | $discriminativeefficiency |
|
float | $effectiveweight |
| effective weight of this question.
|
|
float | $facility |
|
| $markarray = array() |
|
| $markaverage |
|
| $markvariance |
|
| $markvariancesum = 0 |
|
float | $maxmark |
| max mark achievable for this question.
|
|
string | $minmedianmaxnotice = '' |
| if this stat has been picked as a min, median or maximum facility value then this string says which stat this is.
|
|
bool | $negcovar |
| is covariance of this questions mark with other question marks negative?
|
|
| $othermarkaverage |
|
| $othermarksarray = array() |
|
| $othermarkvariance |
|
| $othermarkvariancesum = 0 |
|
string | $positions |
| comma separated list of the positions in which this question appears.
|
|
object | $question |
| full question data
|
|
| $questionid |
|
null float | $randomguessscore = null |
| The average score that students would have got by guessing randomly.
|
|
int | $s = 0 |
| total attempts at this question.
|
|
float | $sd |
| standard deviation
|
|
| $slot = null |
|
int | $subqdisplayorder |
| only set immediately before display in the table.
|
|
bool | $subquestion = false |
| is this a sub question.
|
|
| $subquestions = '' |
|
float | $summarksaverage |
| The average for all attempts, of the sum of the marks for all positions in which this item appeared.
|
|
integer | $timemodified |
| Set if this record has been retrieved from cache.
|
|
| $totalmarks = 0 |
|
| $totalothermarks = 0 |
|
float | $totalsummarks = 0 |
| The total of marks achieved for all positions in all attempts where this item was seen.
|
|
null integer | $variant = null |
| if this property is not null then this is the stats for a variant of a question or when inherited by calculated_for_subquestion and not null then this is the stats for a variant of a sub question.
|
|
calculated[] | $variantstats = array() |
| An array of calculated stats for each variant of the question.
|
|
|
| get_min_max_of_sd () |
| Returns the minimum and maximum values of the standard deviation in the summarised calculated stats.
|
|
| max (float $value1=null, float $value2=null) |
| Find higher value.
|
|
| min (float $value1=null, float $value2=null) |
| Find lower value.
|
|
|
| $fieldsindb |
|
calculated[] | $subqstats |
| The instances storing the calculated stats of the questions that are being summarised.
|
|
Class calculated_question_summary.
This class is used to indicate the statistics for a random question slot should be rendered with a link to a summary of the displayed questions.
It's used in the limited view of the statistics calculation in lieu of adding the stats for each subquestion individually.
- Copyright
- 2018 Ryan Wyllie ryan@.nosp@m.mood.nosp@m.le.co.nosp@m.m
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_question\statistics\questions\calculated_question_summary::__construct |
( |
| $question, |
|
|
| $slot, |
|
|
| $subqstats ) |
calculated_question_summary constructor.
- Parameters
-
stdClass | $question | |
int | $slot | |
calculated[] | $subqstats | The instances of the calculated stats of the questions that are being summarised. |
Reimplemented from core_question\statistics\questions\calculated.
◆ break_down_by_variant()
core_question\statistics\questions\calculated_question_summary::break_down_by_variant |
( |
| ) |
|
◆ cache()
core_question\statistics\questions\calculated::cache |
( |
| $qubaids, |
|
|
| $timemodified = null ) |
|
inherited |
Cache calculated stats stored in this object in 'question_statistics' table.
- Parameters
-
qubaid_condition | $qubaids | |
int | null | $timemodified | the modified time to store. Defaults to the current time. |
◆ get_min_max_of()
core_question\statistics\questions\calculated_question_summary::get_min_max_of |
( |
| $attribute | ) |
|
Returns the minimum and maximum values of the given attribute in the summarised calculated stats.
- Parameters
-
string | $attribute | The attribute that we are looking for its extremums. |
- Return values
-
array | An array of [min,max] |
◆ get_min_max_of_sd()
core_question\statistics\questions\calculated_question_summary::get_min_max_of_sd |
( |
| ) |
|
|
protected |
Returns the minimum and maximum values of the standard deviation in the summarised calculated stats.
- Return values
-
array | An array of [min,max] |
◆ get_sub_question_ids()
core_question\statistics\questions\calculated::get_sub_question_ids |
( |
| ) |
|
|
inherited |
Get any sub question ids for this question.
- Return values
-
int[] | array of sub-question ids or empty array if there are none. |
◆ get_variants()
core_question\statistics\questions\calculated::get_variants |
( |
| ) |
|
|
inherited |
Array of variants that have appeared in the attempt data for this question.
Or an empty array if there is only one variant.
- Return values
-
◆ max()
core_question\statistics\questions\calculated_question_summary::max |
( |
float | $value1 = null, |
|
|
float | $value2 = null ) |
|
protected |
Find higher value.
A zero value is almost considered equal to zero in comparisons. The only difference is that when being compared to zero, zero is higher than null.
- Parameters
-
float | null | $value1 | |
float | null | $value2 | |
- Return values
-
◆ min()
core_question\statistics\questions\calculated_question_summary::min |
( |
float | $value1 = null, |
|
|
float | $value2 = null ) |
|
protected |
Find lower value.
A zero value is almost considered equal to zero in comparisons. The only difference is that when being compared to zero, zero is lower than null.
- Parameters
-
float | null | $value1 | |
float | null | $value2 | |
- Return values
-
◆ populate_from_record()
core_question\statistics\questions\calculated::populate_from_record |
( |
| $record | ) |
|
|
inherited |
Load properties of this class from db record.
- Parameters
-
object | $record | Given a record from 'question_statistics' copy stats from record to properties. |
◆ random_selector_string()
core_question\statistics\questions\calculated::random_selector_string |
( |
| ) |
|
|
inherited |
Used to determine which random questions pull sub questions from the same pools.
Where pool means category and possibly all the sub categories of that category.
- Return values
-
null|string | represents the pool of questions from which this question draws if it is random, or null if not. |
◆ $fieldsindb
core_question\statistics\questions\calculated::$fieldsindb |
|
protectedinherited |
Initial value:= array('questionid', 'slot', 'subquestion', 's', 'effectiveweight', 'negcovar', 'discriminationindex',
'discriminativeefficiency', 'sd', 'facility', 'subquestions', 'maxmark', 'positions', 'randomguessscore', 'variant')
◆ $minmedianmaxnotice
string core_question\statistics\questions\calculated::$minmedianmaxnotice = '' |
|
inherited |
if this stat has been picked as a min, median or maximum facility value then this string says which stat this is.
Prepended to question name for display.
◆ $randomguessscore
null float core_question\statistics\questions\calculated::$randomguessscore = null |
|
inherited |
The average score that students would have got by guessing randomly.
Or null if not calculable.
◆ $subqdisplayorder
int core_question\statistics\questions\calculated_question_summary::$subqdisplayorder |
only set immediately before display in the table.
The order of display in the table.
◆ $timemodified
integer core_question\statistics\questions\calculated::$timemodified |
|
inherited |
Set if this record has been retrieved from cache.
This is the time that the statistics were calculated.
◆ $variantstats
calculated [] core_question\statistics\questions\calculated::$variantstats = array() |
|
inherited |
An array of calculated stats for each variant of the question.
Even when there is just one variant we still calculate this data as there is no way to know if there are variants before we have finished going through the attempt data one time.
$variants
The documentation for this class was generated from the following file:
- question/classes/statistics/questions/calculated_question_summary.php