mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
course publication MDL-19315 fix warning bug during backup upload + send right ws token to the hub
This commit is contained in:
parent
78f00eab26
commit
804360f9e1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user