mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Added support to survey-download action in restore.
This commit is contained in:
parent
c3cc897b83
commit
da423e13df
1 changed files with 13 additions and 0 deletions
|
@ -272,6 +272,19 @@
|
||||||
$log->url = "index.php?id=".$log->course;
|
$log->url = "index.php?id=".$log->course;
|
||||||
$status = true;
|
$status = true;
|
||||||
break;
|
break;
|
||||||
|
case "download":
|
||||||
|
if ($log->cmid) {
|
||||||
|
//Get the new_id of the module (to recode the info field)
|
||||||
|
$mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);
|
||||||
|
if ($mod) {
|
||||||
|
//Rebuild the url, extracting the type (txt, xls)
|
||||||
|
$filetype = substr($log->url,-3);
|
||||||
|
$log->url = "download.php?id=".$log->cmid."&type=".$filetype;
|
||||||
|
$log->info = $mod->new_id;
|
||||||
|
$status = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br />"; //Debug
|
echo "action (".$log->module."-".$log->action.") unknow. Not restored<br />"; //Debug
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue