MDL-24042 mod/data is using weaker require_course_login instead of standard require_l...
authorPetr Skoda <skodak@moodle.org>
Sun, 3 Oct 2010 13:15:49 +0000 (13:15 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 3 Oct 2010 13:15:49 +0000 (13:15 +0000)
mod/data/lib.php

index 197c3fe..90e835d 100755 (executable)
@@ -2049,7 +2049,7 @@ abstract class data_preset_importer {
         $fs = $fileobj = null;
         if (!is_directory_a_preset($this->directory)) {
             //maybe the user requested a preset stored in the Moodle file storage
-            
+
             $fs = get_file_storage();
             $files = $fs->get_area_files(DATA_PRESET_CONTEXT, DATA_PRESET_COMPONENT, DATA_PRESET_FILEAREA);
 
@@ -2731,7 +2731,7 @@ function data_pluginfile($course, $cm, $context, $filearea, $args, $forcedownloa
         return false;
     }
 
-    require_login($course, false, $cm);
+    require_course_login($course, true, $cm);
 
     if ($filearea === 'content') {
         $contentid = (int)array_shift($args);