2007-09-26 09:42:28 +00:00
|
|
|
<?php //$Id$
|
|
|
|
|
|
|
|
$nomoodlecookie = true; // session not used here
|
|
|
|
require '../../../config.php';
|
|
|
|
|
|
|
|
$id = required_param('id', PARAM_INT); // course id
|
2007-09-27 06:51:54 +00:00
|
|
|
if (!$course = get_record('course', 'id', $id)) {
|
|
|
|
print_error('nocourseid');
|
|
|
|
}
|
2007-09-26 09:42:28 +00:00
|
|
|
|
|
|
|
require_user_key_login('grade/import', $id); // we want different keys for each course
|
|
|
|
|
|
|
|
if (empty($CFG->gradepublishing)) {
|
|
|
|
error('Grade publishing disabled');
|
|
|
|
}
|
|
|
|
|
2007-09-27 06:51:54 +00:00
|
|
|
$context = get_context_instance(CONTEXT_COURSE, $id);
|
2007-09-27 06:56:51 +00:00
|
|
|
require_capability('gradeimport/xml:publish', $context);
|
2007-09-27 06:51:54 +00:00
|
|
|
|
2007-09-26 09:42:28 +00:00
|
|
|
// use the same page parameters as import.php and append &key=sdhakjsahdksahdkjsahksadjksahdkjsadhksa
|
|
|
|
require 'import.php';
|
|
|
|
|
|
|
|
?>
|