Adding support to the forum user report action

in restore. Bug 3854.
(http://moodle.org/bugs/bug.php?op=show&bugid=3854)

Merged from MOODLE_16_STABLE
This commit is contained in:
stronk7
2006-06-03 17:51:20 +00:00
parent 75d9b88f3d
commit 1fa6d46069
+11
View File
@@ -866,6 +866,17 @@
$log->url = "search.php?id=".$log->course."&search=".urlencode($log->info);
$status = true;
break;
case "user report":
//recode the info field (it's the user id)
$user = backup_getid($restore->backup_unique_code,"user",$log->info);
if ($user) {
$log->info = $user->new_id;
//Now, extract the mode from the url field
$mode = substr(strrchr($log->url,"="),1);
$log->url = "user.php?course=".$log->course."&id=".$log->info."&mode=".$mode;
$status = true;
}
break;
default:
if (!defined('RESTORE_SILENTLY')) {
echo "action (".$log->module."-".$log->action.") unknown. Not restored<br />"; //Debug