Merge branch 'MDL-36806' of git://github.com/timhunt/moodle

This commit is contained in:
Dan Poltawski 2012-11-27 13:26:38 +08:00
commit 513c64c303
2 changed files with 6 additions and 3 deletions

View file

@ -1804,10 +1804,10 @@ function question_pluginfile($course, $context, $component, $filearea, $args, $f
send_file_not_found();
}
list($context, $course, $cm) = get_context_info_array($context->id);
require_login($course, false, $cm);
if ($filearea === 'export') {
list($context, $course, $cm) = get_context_info_array($context->id);
require_login($course, false, $cm);
require_once($CFG->dirroot . '/question/editlib.php');
$contexts = new question_edit_contexts($context);
// check export capability