Bug #5416 - sorting by question column in overview report plugin broken - please test

This commit is contained in:
skodak
2006-05-25 09:59:06 +00:00
parent 97ae5efdf0
commit db9529f65f
+1 -1
View File
@@ -308,7 +308,7 @@ class quiz_report extends quiz_default_report {
if(!$questionsort) {
$qid = intval(substr($sortpart, 1));
$select .= ', grade ';
$from .= 'LEFT JOIN '.$CFG->prefix.'question_sessions qns ON qns.attemptid = qa.attemptuniqueid '.
$from .= ' LEFT JOIN '.$CFG->prefix.'question_sessions qns ON qns.attemptid = qa.id '.
'LEFT JOIN '.$CFG->prefix.'question_states qs ON qs.id = qns.newgraded ';
$where .= ' AND ('.sql_isnull('qns.questionid').' OR qns.questionid = '.$qid.')';
$newsort[] = 'grade '.(strpos($sortpart, 'ASC')? 'ASC' : 'DESC');