Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b90f98d
)
MDL-49366 questions: avoid PHP notices from bad pluginfile URLs
author
Tim Hunt
<T.J.Hunt@open.ac.uk>
Tue, 3 Mar 2015 18:35:21 +0000
(18:35 +0000)
committer
Tim Hunt
<T.J.Hunt@open.ac.uk>
Thu, 5 Mar 2015 12:18:20 +0000
(12:18 +0000)
lib/questionlib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/questionlib.php
b/lib/questionlib.php
index
eb7c577
..
912557c
100644
(file)
--- a/
lib/questionlib.php
+++ b/
lib/questionlib.php
@@
-1833,6
+1833,9
@@
function question_pluginfile($course, $context, $component, $filearea, $args, $f
$module = $DB->get_field('question_usages', 'component',
array('id' => $qubaid));
+ if (!$module) {
+ send_file_not_found();
+ }
if ($module === 'core_question_preview') {
require_once($CFG->dirroot . '/question/previewlib.php');