course publication MDL-19315 fix warning bug during backup upload + send right ws token to the hub

This commit is contained in:
jerome mouneyrac 2010-05-26 06:13:58 +00:00
parent 78f00eab26
commit 804360f9e1

View File

@ -170,15 +170,18 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
// send backup
if ($share) {
foreach ($courseids as $courseid) {
$params = array();
$params['filetype'] = BACKUP_FILE_TYPE;
$params['courseid'] = $courseid;
$params['file'] = $backupfile;
$params['token'] = $registeredhub->token;
$curl->post($huburl."/local/hub/webservice/upload.php", $params);
}
}
//TODO: Delete the backup from user_tohub
//Delete the backup from user_tohub
$backupfile->delete();
//redirect to the index publis page