Skip to content

Commit

Permalink
Log actions must be strored to DB without &
Browse files Browse the repository at this point in the history
print_log() takes care of it! Bug 3853.
(http://moodle.org/bugs/bug.php?op=show&bugid=3853)
  • Loading branch information
stronk7 committed Nov 23, 2005
1 parent 8cd04c6 commit 20cfdce
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions mod/forum/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions mod/quiz/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions mod/quiz/restorelibpre15.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion mod/survey/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions mod/workshop/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 20cfdce

Please sign in to comment.