Merge branch 'MDL-31000-master-3' of git://git.luns.net.uk/moodle
[moodle.git] / repository / lib.php
index 5db4888..8652aa9 100644 (file)
@@ -826,6 +826,7 @@ abstract class repository {
             $options['visible'] = $record->visible;
             $options['type']    = $record->repositorytype;
             $options['typeid']  = $record->typeid;
+            $options['sortorder'] = $record->sortorder;
             // tell instance what file types will be accepted by file picker
             $classname = 'repository_' . $record->repositorytype;
 
@@ -1451,6 +1452,7 @@ abstract class repository {
         $meta->icon = $OUTPUT->pix_url('icon', 'repository_'.$meta->type)->out(false);
         $meta->supported_types = $ft->get_extensions($this->supported_filetypes());
         $meta->return_types = $this->supported_returntypes();
+        $meta->sortorder = $this->options['sortorder'];
         return $meta;
     }