mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-63186 quiz_statistics: Highlight the summary row if is dubious
The summary row should be highlighted if any of the summarised rows are dubious. Part of MDL-62610
This commit is contained in:
parent
666889f0f8
commit
b5fff70bdd
1 changed files with 10 additions and 2 deletions
|
@ -496,11 +496,19 @@ class quiz_statistics_table extends flexible_table {
|
|||
* @return bool is this question possibly not pulling it's weight?
|
||||
*/
|
||||
protected function is_dubious_question($questionstat) {
|
||||
if (!is_numeric($questionstat->discriminativeefficiency)) {
|
||||
if ($this->is_random_question_summary($questionstat)) {
|
||||
// We only care about the minimum value here.
|
||||
// If the minimum value is less than the threshold, then we know that there is at least one value below the threshold.
|
||||
list($discriminativeefficiency) = $questionstat->get_min_max_of('discriminativeefficiency');
|
||||
} else {
|
||||
$discriminativeefficiency = $questionstat->discriminativeefficiency;
|
||||
}
|
||||
|
||||
if (!is_numeric($discriminativeefficiency)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $questionstat->discriminativeefficiency < 15;
|
||||
return $discriminativeefficiency < 15;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue