From ad3b37cf8755624652be70e7c106729cf2162564 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Fri, 4 May 2012 17:23:49 +0100 Subject: [PATCH] MDL-31814 question bank: fix possible error with sort columns. --- mod/quiz/editlib.php | 2 ++ question/editlib.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index b5128c66869..be6b9fe5e35 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -1141,6 +1141,8 @@ class quiz_question_bank_view extends question_bank_view { } protected function default_sort() { + $this->requiredcolumns['qtype'] = $this->knowncolumntypes['qtype']; + $this->requiredcolumns['questionnametext'] = $this->knowncolumntypes['questionnametext']; return array('qtype' => 1, 'questionnametext' => 1); } diff --git a/question/editlib.php b/question/editlib.php index 4b98bdd7991..7125b3f4138 100644 --- a/question/editlib.php +++ b/question/editlib.php @@ -1033,6 +1033,8 @@ class question_bank_view { } protected function default_sort() { + $this->requiredcolumns['qtype'] = $this->knowncolumntypes['qtype']; + $this->requiredcolumns['questionname'] = $this->knowncolumntypes['questionname']; return array('qtype' => 1, 'questionname' => 1); }