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:
jamiesensei 2008-09-15 11:13:31 +00:00
parent ca0174ccce
commit d3e99e85d4
2 changed files with 30 additions and 4 deletions

View File

@ -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 .'&amp;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);

View File

@ -1081,6 +1081,10 @@ table.quizreviewsummary td.cell {
background-color: #fcc;
}
#mod-quiz-report .dubious{
background-color: #fcc;
}
/***
*** Modules: Resource
***/