MDL-30828 mod_feedback: fixed sorting when viewing responses
authorAndrew Davis <andrew@moodle.com>
Wed, 28 Dec 2011 08:28:17 +0000 (15:28 +0700)
committerAndrew Davis <andrew@moodle.com>
Tue, 31 Jan 2012 02:05:09 +0000 (09:05 +0700)
mod/feedback/lib.php
mod/feedback/show_entries.php

index 10c033e..2fc64ce 100644 (file)
@@ -958,7 +958,7 @@ function feedback_get_complete_users($cm,
     }
 
     $ufields = user_picture::fields('u');
-    $sql = 'SELECT DISTINCT '.$ufields.'
+    $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
index 945a23a..00c3d0b 100644 (file)
@@ -122,7 +122,7 @@ if ($do_show == 'showentries') {
         $baseurl = new moodle_url('/mod/feedback/show_entries.php');
         $baseurl->params(array('id'=>$id, 'do_show'=>$do_show, 'showall'=>$showall));
 
-        $tablecolumns = array('userpic', 'fullname', 'c.timemodified');
+        $tablecolumns = array('userpic', 'fullname', 'completed_timemodified');
         $tableheaders = array(get_string('userpic'), get_string('fullnameuser'), get_string('date'));
 
         if (has_capability('mod/feedback:deletesubmissions', $context)) {