Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-31814 question bank: fix possible error with sort columns.

  • Loading branch information...
commit 57f2278c695bdc48d7b9168a709c9eb33f9e9dfc 1 parent 8075bd8
Tim Hunt authored May 04, 2012
2  mod/quiz/editlib.php
@@ -1141,6 +1141,8 @@ protected function wanted_columns() {
1141 1141
     }
1142 1142
 
1143 1143
     protected function default_sort() {
  1144
+        $this->requiredcolumns['qtype'] = $this->knowncolumntypes['qtype'];
  1145
+        $this->requiredcolumns['questionnametext'] = $this->knowncolumntypes['questionnametext'];
1144 1146
         return array('qtype' => 1, 'questionnametext' => 1);
1145 1147
     }
1146 1148
 
2  question/editlib.php
@@ -1033,6 +1033,8 @@ protected function sort_to_params($sorts) {
1033 1033
     }
1034 1034
 
1035 1035
     protected function default_sort() {
  1036
+        $this->requiredcolumns['qtype'] = $this->knowncolumntypes['qtype'];
  1037
+        $this->requiredcolumns['questionname'] = $this->knowncolumntypes['questionname'];
1036 1038
         return array('qtype' => 1, 'questionname' => 1);
1037 1039
     }
1038 1040
 

0 notes on commit 57f2278

Please sign in to comment.
Something went wrong with that request. Please try again.