Permalink
Browse files

Log actions must be strored to DB without &

print_log() takes care of it! Bug 3853.
(http://moodle.org/bugs/bug.php?op=show&bugid=3853)
  • Loading branch information...
1 parent 8cd04c6 commit 20cfdcef312c9ea23b1210ad275e6651ed201fa0 stronk7 committed Nov 23, 2005
View
@@ -763,7 +763,7 @@ function forum_restore_logs($restore,$log) {
//Get the post record from database
$dbpos = get_record("forum_posts","id","$pos->new_id");
if ($dbpos) {
- $log->url = "discuss.php?d=".$dbpos->discussion."&parent=".$pos->new_id;
+ $log->url = "discuss.php?d=".$dbpos->discussion."&parent=".$pos->new_id;
$log->info = $pos->new_id;
$status = true;
}
@@ -793,7 +793,7 @@ function forum_restore_logs($restore,$log) {
//Get the post record from database
$dbpos = get_record("forum_posts","id","$pos->new_id");
if ($dbpos) {
- $log->url = "discuss.php?d=".$dbpos->discussion."&parent=".$pos->new_id;
+ $log->url = "discuss.php?d=".$dbpos->discussion."&parent=".$pos->new_id;
$log->info = $pos->new_id;
$status = true;
}
@@ -813,7 +813,7 @@ function forum_restore_logs($restore,$log) {
}
break;
case "search":
- $log->url = "search.php?id=".$log->course."&search=".urlencode($log->info);
+ $log->url = "search.php?id=".$log->course."&search=".urlencode($log->info);
$status = true;
break;
default:
@@ -806,7 +806,7 @@ function glossary_restore_logs($restore,$log) {
//Get the new_id of the glossary_entry (to recode the info and url field)
$ent = backup_getid($restore->backup_unique_code,"glossary_entries",$log->info);
if ($ent) {
- $log->url = "view.php?id=".$log->cmid."&mode=entry&hook=".$ent->new_id;
+ $log->url = "view.php?id=".$log->cmid."&mode=entry&hook=".$ent->new_id;
$log->info = $ent->new_id;
$status = true;
}
View
@@ -2069,7 +2069,7 @@ function quiz_restore_logs($restore,$log) {
//Get the new_id of the attempt (to recode the url field)
$att = backup_getid($restore->backup_unique_code,"quiz_attempts",$attid);
if ($att) {
- $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
+ $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
$log->info = $mod->new_id;
$status = true;
}
@@ -2086,7 +2086,7 @@ function quiz_restore_logs($restore,$log) {
//Get the new_id of the attempt (to recode the url field)
$att = backup_getid($restore->backup_unique_code,"quiz_attempts",$attid);
if ($att) {
- $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
+ $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
$log->info = $mod->new_id;
$status = true;
}
@@ -2103,7 +2103,7 @@ function quiz_restore_logs($restore,$log) {
//Get the new_id of the attempt (to recode the url field)
$att = backup_getid($restore->backup_unique_code,"quiz_attempts",$attid);
if ($att) {
- $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
+ $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
$log->info = $mod->new_id;
$status = true;
}
@@ -1896,7 +1896,7 @@ function quiz_restore_pre15_logs($restore,$log) {
//Get the new_id of the attempt (to recode the url field)
$att = backup_getid($restore->backup_unique_code,"quiz_attempts",$attid);
if ($att) {
- $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
+ $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
$log->info = $mod->new_id;
$status = true;
}
@@ -1913,7 +1913,7 @@ function quiz_restore_pre15_logs($restore,$log) {
//Get the new_id of the attempt (to recode the url field)
$att = backup_getid($restore->backup_unique_code,"quiz_attempts",$attid);
if ($att) {
- $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
+ $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
$log->info = $mod->new_id;
$status = true;
}
@@ -1930,7 +1930,7 @@ function quiz_restore_pre15_logs($restore,$log) {
//Get the new_id of the attempt (to recode the url field)
$att = backup_getid($restore->backup_unique_code,"quiz_attempts",$attid);
if ($att) {
- $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
+ $log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
$log->info = $mod->new_id;
$status = true;
}
@@ -383,7 +383,7 @@ function survey_restore_logs($restore,$log) {
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->url = "download.php?id=".$log->cmid."&type=".$filetype;
$log->info = $mod->new_id;
$status = true;
}
@@ -910,7 +910,7 @@ function workshop_restore_logs($restore,$log) {
//Get the new_id of the workshop assessments
$ass = backup_getid($restore->backup_unique_code,"workshop_assessments",$log->info);
if ($ass) {
- $log->url = "assessments.php?action=viewassessment&id=".$log->cmid."&aid=".$ass->new_id;
+ $log->url = "assessments.php?action=viewassessment&id=".$log->cmid."&aid=".$ass->new_id;
$log->info = $ass->new_id;
$status = true;
}
@@ -921,7 +921,7 @@ function workshop_restore_logs($restore,$log) {
//Get the new_id of the workshop assessments
$ass = backup_getid($restore->backup_unique_code,"workshop_assessments",$log->info);
if ($ass) {
- $log->url = "assessments.php?action=viewassessment&id=".$log->cmid."&aid=".$ass->new_id;
+ $log->url = "assessments.php?action=viewassessment&id=".$log->cmid."&aid=".$ass->new_id;
$log->info = $ass->new_id;
$status = true;
}

0 comments on commit 20cfdce

Please sign in to comment.