Merge branch 'w33_MDL-28982_m22_sqlfullname' of git://github.com/skodak/moodle
authorAparup Banerjee <aparup@moodle.com>
Tue, 23 Aug 2011 19:03:50 +0000 (03:03 +0800)
committerAparup Banerjee <aparup@moodle.com>
Tue, 23 Aug 2011 19:03:50 +0000 (03:03 +0800)
mod/quiz/report/grading/report.php

index 44c420f..81628dd 100644 (file)
@@ -520,7 +520,7 @@ class quiz_grading_report extends quiz_default_report {
      */
     protected function get_usage_ids_where_question_in_state($summarystate, $slot,
             $questionid = null, $orderby = 'random', $page = 0, $pagesize = null) {
-        global $CFG;
+        global $CFG, $DB;
         $dm = new question_engine_data_mapper();
 
         if ($pagesize && $orderby != 'random') {
@@ -544,7 +544,7 @@ class quiz_grading_report extends quiz_default_report {
         } else if ($orderby == 'student' || $orderby == 'idnumber') {
             $qubaids->from .= " JOIN {user} u ON quiza.userid = u.id ";
             if ($orderby == 'student') {
-                $orderby = sql_fullname('u.firstname', 'u.lastname');
+                $orderby = $DB->sql_fullname('u.firstname', 'u.lastname');
             }
         }