mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
MDL-16502 "highlight questions that appear not to be working very well according to statistics"
There is a function is_dubious_question on the statistics table passed all the stats for that question and other question data and that returns a bool.
This commit is contained in:
parent
ca0174ccce
commit
d3e99e85d4
@ -88,15 +88,37 @@ class quiz_report_statistics_table extends flexible_table {
|
||||
|
||||
|
||||
function col_name($question){
|
||||
if (!$this->is_downloading() && $question->qtype!='random'){
|
||||
$tooltip = get_string('detailedanalysis', 'quiz_statistics');
|
||||
$url = $this->baseurl .'&qid='.$question->id;
|
||||
return "<a title=\"$tooltip\" href=\"$url\">".$question->name."</a>";
|
||||
if (!$this->is_downloading()){
|
||||
if ($question->qtype!='random'){
|
||||
$tooltip = get_string('detailedanalysis', 'quiz_statistics');
|
||||
$url = $this->baseurl .'&qid='.$question->id;
|
||||
$html = "<a title=\"$tooltip\" href=\"$url\">".$question->name."</a>";
|
||||
} else {
|
||||
$html = $question->name;
|
||||
}
|
||||
if ($this->is_dubious_question($question)){
|
||||
return "<div class=\"dubious\">$html</div>";
|
||||
} else {
|
||||
return $html;
|
||||
}
|
||||
} else {
|
||||
return $question->name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object question the question object with a property _stats which
|
||||
* includes all the stats for the question.
|
||||
* @return boolean is this question possibly not pulling it's weight?
|
||||
*/
|
||||
function is_dubious_question($question){
|
||||
if (!is_numeric($question->_stats->discriminativeefficiency)){
|
||||
return false;
|
||||
} else {
|
||||
return $question->_stats->discriminativeefficiency < 15;
|
||||
}
|
||||
}
|
||||
|
||||
function col_icon($question){
|
||||
return print_question_icon($question, true);
|
||||
|
@ -1081,6 +1081,10 @@ table.quizreviewsummary td.cell {
|
||||
background-color: #fcc;
|
||||
}
|
||||
|
||||
#mod-quiz-report .dubious{
|
||||
background-color: #fcc;
|
||||
}
|
||||
|
||||
/***
|
||||
*** Modules: Resource
|
||||
***/
|
||||
|
Loading…
x
Reference in New Issue
Block a user