Merge branch 'MDL-33400' of git://github.com/nebgor/moodle
This commit is contained in:
+11
-4
@@ -1853,12 +1853,19 @@ function question_pluginfile($course, $context, $component, $filearea, $args, $f
|
||||
include_once("$dir/lib.php");
|
||||
|
||||
$filefunction = $module . '_question_pluginfile';
|
||||
if (!function_exists($filefunction)) {
|
||||
send_file_not_found();
|
||||
if (function_exists($filefunction)) {
|
||||
$filefunction($course, $context, $component, $filearea, $qubaid, $slot,
|
||||
$args, $forcedownload, $options);
|
||||
}
|
||||
|
||||
$filefunction($course, $context, $component, $filearea, $qubaid, $slot,
|
||||
$args, $forcedownload, $options);
|
||||
//okay, we're here so lets check for function without 'mod_'.
|
||||
if(strpos($module, 'mod_') == 0) {
|
||||
$filefunctionold = substr($module, 3) . '_question_pluginfile';
|
||||
if (function_exists($filefunctionold)) {
|
||||
$filefunctionold($course, $context, $component, $filearea, $qubaid, $slot,
|
||||
$args, $forcedownload, $options);
|
||||
}
|
||||
}
|
||||
|
||||
send_file_not_found();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user