require_once 'lib.php';
require_once $CFG->libdir.'/filelib.php';
-$url = required_param('url', PARAM_URL); // only real urls here
+$gradesurl = required_param('url', PARAM_URL); // only real urls here
$id = required_param('id', PARAM_INT); // course id
$feedback = optional_param('feedback', 0, PARAM_BOOL);
-$url = new moodle_url('/grade/import/xml/import.php', array('id'=>$id,'url'=>$url));
+$url = new moodle_url('/grade/import/xml/import.php', array('id' => $id,'url' => $gradesurl));
if ($feedback !== 0) {
$url->param('feedback', $feedback);
}
core_php_time_limit::raise();
raise_memory_limit(MEMORY_EXTRA);
-$text = download_file_content($url);
+$text = download_file_content($gradesurl);
if ($text === false) {
print_error('cannotreadfile', 'error',
- $CFG->wwwroot . '/grade/import/xml/index.php?id=' . $id, $url);
+ $CFG->wwwroot . '/grade/import/xml/index.php?id=' . $id, $gradesurl);
}
$error = '';