MDL-16094 preventing execution of question code that is trying to access dataroot files - we must use new api instead

This commit is contained in:
Petr Skoda
2010-08-29 10:00:18 +00:00
parent 389d17f9cc
commit bec167f34a
3 changed files with 10 additions and 1 deletions
+4 -1
View File
@@ -12,6 +12,9 @@
require_once($CFG->dirroot."/question/editlib.php");
require_once($CFG->dirroot."/question/contextmove_form.php");
//TODO: MDL-16094
throw new coding_exception('contextmove.php was not converted to new file api yet, sorry - see MDL-16094');
list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
question_edit_setup('categories', '/question/contextmove.php');
@@ -192,7 +195,7 @@
$PAGE->set_url($thispageurl->out());
$PAGE->navbar->add($streditingcategories, $thispageurl->out());
$PAGE->navbar->add(get_string('movingcategory', 'question'));
$PAGE->navbar->add(get_string('movingcategory', 'question'));
$PAGE->set_header($COURSE->fullname);
echo $OUTPUT->header();
+3
View File
@@ -12,6 +12,9 @@ require_once(dirname(__FILE__) . '/../config.php');
require_once(dirname(__FILE__) . '/editlib.php');
require_once($CFG->dirroot.'/question/contextmoveq_form.php');
//TODO: MDL-16094
throw new coding_exception('contextmoveq.php was not converted to new file api yet, sorry - see MDL-16094');
$ids = required_param('ids', PARAM_SEQUENCE); // question ids
if (!$cmid = optional_param('cmid', 0, PARAM_INT)){
+3
View File
@@ -557,6 +557,9 @@ class qformat_default {
function importimagefile( $path, $base64 ) {
global $CFG;
//TODO: MDL-16094
throw new coding_exception('importimagefile() was not converted to new file api yet, sorry - see MDL-16094');
// all this to get the destination directory
// and filename!
$fullpath = "{$CFG->dataroot}/{$this->course->id}/$path";