MDL-33837 picking file from server files should not copy 'Main file' property
authorMarina Glancy <marina@moodle.com>
Wed, 27 Jun 2012 02:49:34 +0000 (10:49 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 3 Jul 2012 02:24:43 +0000 (10:24 +0800)
repository/repository_ajax.php

index 6919b3e..c9863c4 100644 (file)
@@ -230,6 +230,7 @@ switch ($action) {
             $record->timecreated = $now;
             $record->timemodified = $now;
             $record->userid = $USER->id;
+            $record->sortorder = 0;
 
             // If file is already a reference, set $source = file source, $repo = file repository
             if ($repo->has_moodle_files()) {