Added support to survey-download action in restore.

This commit is contained in:
stronk7 2005-04-10 16:54:05 +00:00
parent c3cc897b83
commit da423e13df

View file

@ -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;