MDL-30828 mod_feedback: fixed sorting when viewing responses

This commit is contained in:
Andrew Davis
2012-01-20 15:57:09 +07:00
parent 1aff7bbb74
commit cfc8537034
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -879,8 +879,11 @@ function feedback_get_complete_users($cm, $group = false, $where = '', array $pa
}
$ufields = user_picture::fields('u');
$sql = 'SELECT DISTINCT '.$ufields.' FROM {user} u, {feedback_completed} c '.$fromgroup.'
WHERE '.$where.' anonymous_response = :anon AND u.id = c.userid AND c.feedback = :instance
$sql = 'SELECT DISTINCT '.$ufields.', c.timemodified as completed_timemodified
FROM {user} u, {feedback_completed} c '.$fromgroup.'
WHERE '.$where.' anonymous_response = :anon
AND u.id = c.userid
AND c.feedback = :instance
'.$wheregroup.$sortsql;
if ($startpage === false OR $pagecount === false) {