MDL-27684 repository: make require_login() throws exception instead of redirect
authorMohamed Alsharaf <mohamed.alsharaf@gmail.com>
Tue, 30 Jul 2013 02:01:26 +0000 (14:01 +1200)
committerMohamed Alsharaf <mohamed.alsharaf@gmail.com>
Fri, 13 Sep 2013 04:01:55 +0000 (16:01 +1200)
repository/repository_ajax.php

index 162bbe3..69c5f7e 100644 (file)
@@ -53,7 +53,7 @@ $linkexternal  = optional_param('linkexternal', '', PARAM_ALPHA);
 $usefilereference  = optional_param('usefilereference', false, PARAM_BOOL);
 
 list($context, $course, $cm) = get_context_info_array($contextid);
-require_login($course, false, $cm);
+require_login($course, false, $cm, false, true);
 $PAGE->set_context($context);
 
 echo $OUTPUT->header(); // send headers