MDL-68483 contentbank: order contents by name
authorSara Arjona <sara@moodle.com>
Wed, 29 Apr 2020 14:11:47 +0000 (16:11 +0200)
committerSara Arjona <sara@moodle.com>
Wed, 13 May 2020 11:31:29 +0000 (13:31 +0200)
contentbank/classes/contentbank.php

index 35499ce..e34dfa2 100644 (file)
@@ -193,7 +193,7 @@ class contentbank {
             $params['name'] = '%' . $DB->sql_like_escape($search) . '%';
         }
 
-        $records = $DB->get_records_select('contentbank_content', $sql, $params);
+        $records = $DB->get_records_select('contentbank_content', $sql, $params, 'name ASC');
         foreach ($records as $record) {
             $contentclass = "\\$record->contenttype\\content";
             $content = new $contentclass($record);