Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
qbank_statistics\helper Class Reference

Static Public Member Functions

static calculate_average_question_discrimination_index (int $questionid)
 Calculate average discriminative efficiency.
 
static calculate_average_question_discriminative_efficiency (int $questionid)
 Calculate average discriminative efficiency.
 
static calculate_average_question_facility (int $questionid)
 Calculate average facility index.
 
static format_discrimination_index (?float $value)
 Format discrimination index (Needs checking?).
 
static format_percentage (?float $number, bool $fraction=true, int $decimals=2)
 Format a number to a localised percentage with specified decimal points.
 

Member Function Documentation

◆ calculate_average_question_discrimination_index()

static qbank_statistics\helper::calculate_average_question_discrimination_index ( int $questionid)
static

Calculate average discriminative efficiency.

Parameters
int$questionidquestion id
Return values
float|null
Deprecated
since Moodle 4.3 please use the method from statistics_bulk_loader.
Todo
MDL-78090 Final deprecation in Moodle 4.7

◆ calculate_average_question_discriminative_efficiency()

static qbank_statistics\helper::calculate_average_question_discriminative_efficiency ( int $questionid)
static

Calculate average discriminative efficiency.

Parameters
int$questionidquestion id
Return values
float|null
Deprecated
since Moodle 4.3 please use the method from statistics_bulk_loader.
Todo
MDL-78090 Final deprecation in Moodle 4.7

◆ calculate_average_question_facility()

static qbank_statistics\helper::calculate_average_question_facility ( int $questionid)
static

Calculate average facility index.

Parameters
int$questionid
Return values
float|null
Deprecated
since Moodle 4.3 please use the method from statistics_bulk_loader.
Todo
MDL-78090 Final deprecation in Moodle 4.7

◆ format_discrimination_index()

static qbank_statistics\helper::format_discrimination_index ( ?float $value)
static

Format discrimination index (Needs checking?).

Parameters
float | null$valuestats value
Return values
array

◆ format_percentage()

static qbank_statistics\helper::format_percentage ( ?float $number,
bool $fraction = true,
int $decimals = 2 )
static

Format a number to a localised percentage with specified decimal points.

Parameters
float | null$numberThe number being formatted
bool$fractionAn indicator for whether the number is a fraction or is already multiplied by 100
int$decimalsSets the number of decimal points
Return values
string
Exceptions
coding_exception

The documentation for this class was generated from the following file: