Permalink
Browse files

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

  • Loading branch information...
1 parent 8075bd8 commit 57f2278c695bdc48d7b9168a709c9eb33f9e9dfc @timhunt timhunt committed May 4, 2012
Showing with 4 additions and 0 deletions.
  1. +2 −0 mod/quiz/editlib.php
  2. +2 −0 question/editlib.php
View
2 mod/quiz/editlib.php
@@ -1141,6 +1141,8 @@ protected function wanted_columns() {
}
protected function default_sort() {
+ $this->requiredcolumns['qtype'] = $this->knowncolumntypes['qtype'];
+ $this->requiredcolumns['questionnametext'] = $this->knowncolumntypes['questionnametext'];
return array('qtype' => 1, 'questionnametext' => 1);
}
View
2 question/editlib.php
@@ -1033,6 +1033,8 @@ protected function sort_to_params($sorts) {
}
protected function default_sort() {
+ $this->requiredcolumns['qtype'] = $this->knowncolumntypes['qtype'];
+ $this->requiredcolumns['questionname'] = $this->knowncolumntypes['questionname'];
return array('qtype' => 1, 'questionname' => 1);
}

0 comments on commit 57f2278

Please sign in to comment.