MDL-28982 fix DML use

This commit is contained in:
Petr Skoda 2011-08-21 15:38:46 +02:00
parent 4f3632441a
commit 1c8c6c34fd

View 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');
}
}