mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Bug #5416 - sorting by question column in overview report plugin broken - please test; merged from MOODLE_16_STABLE
This commit is contained in:
parent
de5f96195c
commit
be41c83691
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ class quiz_report extends quiz_default_report {
|
||||||
if(!$questionsort) {
|
if(!$questionsort) {
|
||||||
$qid = intval(substr($sortpart, 1));
|
$qid = intval(substr($sortpart, 1));
|
||||||
$select .= ', grade ';
|
$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 ';
|
'LEFT JOIN '.$CFG->prefix.'question_states qs ON qs.id = qns.newgraded ';
|
||||||
$where .= ' AND ('.sql_isnull('qns.questionid').' OR qns.questionid = '.$qid.')';
|
$where .= ' AND ('.sql_isnull('qns.questionid').' OR qns.questionid = '.$qid.')';
|
||||||
$newsort[] = 'grade '.(strpos($sortpart, 'ASC')? 'ASC' : 'DESC');
|
$newsort[] = 'grade '.(strpos($sortpart, 'ASC')? 'ASC' : 'DESC');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue