mirror of
https://github.com/moodle/moodle.git
synced 2025-01-22 08:11:26 +01:00
Now "attempt", "submit" and "review" actions
use the q=xxx&attempt=yyyy syntax instead of id=xxxx&attempt=yyyy (not working old one) It's necessary to change the "review" add_to_log() call to use this sintax. It uses the old (nor working) one. I wait to Martin to do this, because I've sent one email about this. For info, the line to correct is number 57 in review.php from: add_to_log($course->id, "quiz", "review", "review.php?id=$cm->id&attempt=$attempt->id", "$quiz->id", "$cm->id"); to: add_to_log($course->id, "quiz", "review", "review.php?q=$quiz->id&attempt=$attempt->id", "$quiz->id", "$cm->id"); Ciao :-)
This commit is contained in:
parent
4c918350d6
commit
10672458f9
@ -1604,22 +1604,34 @@
|
||||
//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) {
|
||||
$log->url = "attempt.php?id=".$log->cmid;
|
||||
//Extract the attempt id from the url field
|
||||
$attid = substr(strrchr($log->url,"="),1);
|
||||
//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?q=".$mod->new_id."&attempt=".$att->new_id;
|
||||
$log->info = $mod->new_id;
|
||||
$status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "submit":
|
||||
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) {
|
||||
$log->url = "attempt.php?id=".$log->cmid;
|
||||
//Extract the attempt id from the url field
|
||||
$attid = substr(strrchr($log->url,"="),1);
|
||||
//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?q=".$mod->new_id."&attempt=".$att->new_id;
|
||||
$log->info = $mod->new_id;
|
||||
$status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "review":
|
||||
if ($log->cmid) {
|
||||
@ -1630,8 +1642,8 @@
|
||||
$attid = substr(strrchr($log->url,"="),1);
|
||||
//Get the new_id of the attempt (to recode the url field)
|
||||
$att = backup_getid($restore->backup_unique_code,"quiz_attempts",$attid);
|
||||
if ($mod) {
|
||||
$log->url = "review.php?id=".$log->cmid."&attempt=".$att->new_id;
|
||||
if ($att) {
|
||||
$log->url = "review.php?q=".$mod->new_id."&attempt=".$att->new_id;
|
||||
$log->info = $mod->new_id;
|
||||
$status = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user