Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
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

◆ 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

◆ 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

◆ 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: