mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-36806' of git://github.com/timhunt/moodle
This commit is contained in:
commit
513c64c303
2 changed files with 6 additions and 3 deletions
|
@ -1804,10 +1804,10 @@ function question_pluginfile($course, $context, $component, $filearea, $args, $f
|
|||
send_file_not_found();
|
||||
}
|
||||
|
||||
if ($filearea === 'export') {
|
||||
list($context, $course, $cm) = get_context_info_array($context->id);
|
||||
require_login($course, false, $cm);
|
||||
|
||||
if ($filearea === 'export') {
|
||||
require_once($CFG->dirroot . '/question/editlib.php');
|
||||
$contexts = new question_edit_contexts($context);
|
||||
// check export capability
|
||||
|
|
|
@ -231,6 +231,9 @@ function question_preview_question_pluginfile($course, $context, $component,
|
|||
$filearea, $qubaid, $slot, $args, $forcedownload, $fileoptions) {
|
||||
global $USER, $DB, $CFG;
|
||||
|
||||
list($context, $course, $cm) = get_context_info_array($context->id);
|
||||
require_login($course, false, $cm);
|
||||
|
||||
$quba = question_engine::load_questions_usage_by_activity($qubaid);
|
||||
|
||||
if (!question_has_capability_on($quba->get_question($slot), 'use')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue