From bec167f34affc0c61c95e8a9b7fa0cd09c487294 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 29 Aug 2010 10:00:18 +0000 Subject: [PATCH] MDL-16094 preventing execution of question code that is trying to access dataroot files - we must use new api instead --- question/contextmove.php | 5 ++++- question/contextmoveq.php | 3 +++ question/format.php | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/question/contextmove.php b/question/contextmove.php index b419de9939c..8dbce82ed2a 100644 --- a/question/contextmove.php +++ b/question/contextmove.php @@ -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(); diff --git a/question/contextmoveq.php b/question/contextmoveq.php index 9f0be647f60..065752e7219 100644 --- a/question/contextmoveq.php +++ b/question/contextmoveq.php @@ -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)){ diff --git a/question/format.php b/question/format.php index cc0203f3f0e..e37495b8363 100644 --- a/question/format.php +++ b/question/format.php @@ -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";