|
static | load_aggregate_statistics (array $questionids, array $requiredstatistics) |
| Load and aggregate the requested statistics for all the places where the given questions are used.
|
|
◆ extract_item_value()
Extract the value for one question and one type of statistic from a set of statistics.
- Parameters
-
all_calculated_for_qubaid_condition | $statistics | the batch of statistics. |
int | $questionid | a question id. |
string | $item | one of the field names in all_calculated_for_qubaid_condition, e.g. 'facility'. |
- Return values
-
float|null | the required value. |
◆ get_all_places_where_questions_were_attempted()
static core_question\local\statistics\statistics_bulk_loader::get_all_places_where_questions_were_attempted |
( |
array | $questionids | ) |
|
|
staticprotected |
For a list of questions find all the places, defined by (component, contextid), where there are attempts.
- Parameters
-
int[] | $questionids | array of question ids that we are interested in. |
- Return values
-
stdClass[] | list of objects with fields ->component and ->contextid. |
◆ load_aggregate_statistics()
static core_question\local\statistics\statistics_bulk_loader::load_aggregate_statistics |
( |
array | $questionids, |
|
|
array | $requiredstatistics ) |
|
static |
Load and aggregate the requested statistics for all the places where the given questions are used.
The returned array will contain a values for each questionid and field, which will be null if the value is not available.
- Parameters
-
int[] | $questionids | array of question ids. |
string[] | $requiredstatistics | array of the fields required, e.g. ['facility', 'discriminationindex']. |
- Return values
-
float[][] | if a value is not available, it will be set to null. |
◆ load_statistics_for_place()
static core_question\local\statistics\statistics_bulk_loader::load_statistics_for_place |
( |
string | $component, |
|
|
context | $context ) |
|
staticprotected |
Load the question statistics for all the attempts belonging to a particular component in a particular context.
- Parameters
-
string | $component | frankenstyle component name, e.g. 'mod_quiz'. |
context | $context | the context to load the statistics for. |
- Return values
-
all_calculated_for_qubaid_condition|null | question statistics. |
The documentation for this class was generated from the following file:
- question/classes/local/statistics/statistics_bulk_loader.php