Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250605) (9223e346c3e)
qbank_statistics\helper Class Reference

Static Public Member Functions

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.
 

Public Attributes

since __FUNCTION__
 
since : '4.3'
 
since : '4.3'
 
since : '4.3'
 
since mdl: '<a class="el" href="https: final: true )] public static function calculate_average_question_facility(int $questionid): ?float { core\deprecation::emit_deprecation_if_present([self::class
 

Member Function Documentation

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