Permalink
Browse files

Merge branch 'MDL-30646_22' of git://github.com/timhunt/moodle into M…

…OODLE_22_STABLE
  • Loading branch information...
2 parents a8fb78b + 76ffac7 commit 6005434b55c2ec09da8644a8601cf8ff9086d39c Sam Hemelryk committed Dec 20, 2011
Showing with 6 additions and 2 deletions.
  1. +4 −0 mod/quiz/editlib.php
  2. +2 −2 question/editlib.php
View
4 mod/quiz/editlib.php
@@ -1106,6 +1106,10 @@ protected function wanted_columns() {
'editaction', 'previewaction');
}
+ protected function default_sort() {
+ return array('qtype' => 1, 'questionnametext' => 1);
+ }
+
/**
* Let the question bank display know whether the quiz has been attempted,
* hence whether some bits of UI, like the add this question to the quiz icon,
View
4 question/editlib.php
@@ -965,7 +965,7 @@ protected function init_sort() {
}
/**
- * Deal with a sort name of the forum columnname, or colname_subsort by
+ * Deal with a sort name of the form columnname, or colname_subsort by
* breaking it up, validating the bits that are presend, and returning them.
* If there is no subsort, then $subsort is returned as ''.
* @return array array($colname, $subsort).
@@ -1102,7 +1102,7 @@ protected function build_query_sql($category, $recurse, $showhidden) {
$sorts = array();
foreach ($this->sort as $sort => $order) {
list($colname, $subsort) = $this->parse_subsort($sort);
- $sorts[] = $this->knowncolumntypes[$colname]->sort_expression($order < 0, $subsort);
+ $sorts[] = $this->requiredcolumns[$colname]->sort_expression($order < 0, $subsort);
}
/// Build the where clause.

0 comments on commit 6005434

Please sign in to comment.