MDL-73350 qbank_statistics: Discrimination index column update
This implementation changes a little logic where the discrimination index shows an empty row if there is no attempts been made to a question rather than showing very likely.
This commit is contained in:
@@ -204,7 +204,10 @@ class helper {
|
||||
* @return array
|
||||
*/
|
||||
public static function format_discrimination_index(?float $value): array {
|
||||
if (is_null($value) || $value < self::NEED_FOR_REVISION_LOWER_THRESHOLD) {
|
||||
if (is_null($value)) {
|
||||
$content = get_string('emptyvalue', 'qbank_statistics');
|
||||
$classes = '';
|
||||
} else if ($value < self::NEED_FOR_REVISION_LOWER_THRESHOLD) {
|
||||
$content = get_string('verylikely', 'qbank_statistics');
|
||||
$classes = 'alert-danger';
|
||||
} else if ($value < self::NEED_FOR_REVISION_UPPER_THRESHOLD) {
|
||||
|
||||
@@ -38,3 +38,4 @@ $string['verylikely'] = 'Very likely';
|
||||
$string['likely'] = 'Likely';
|
||||
$string['unlikely'] = 'Unlikely';
|
||||
$string['na'] = 'N/A';
|
||||
$string['emptyvalue'] = '-';
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'qbank_statistics';
|
||||
$plugin->version = 2021092000;
|
||||
$plugin->version = 2021121500;
|
||||
$plugin->requires = 2021052500;
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
Reference in New Issue
Block a user