]> git.mjollnir.org Git - moodle.git/commitdiff
Added support for "choose" and "choose again" action logs. :-)
authorstronk7 <stronk7>
Tue, 17 Feb 2004 16:19:58 +0000 (16:19 +0000)
committerstronk7 <stronk7>
Tue, 17 Feb 2004 16:19:58 +0000 (16:19 +0000)
mod/choice/restorelib.php

index ddca3f52d2fe477d6fb76b09a366450516a2c3d3..c817bf5005e085b0454cf4c9c550a0890a6c17a2 100644 (file)
                 }
             }
             break;
+        case "choose":
+            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 = "view.php?id=".$log->cmid;
+                    $log->info = $mod->new_id;
+                    $status = true;
+                }
+            }
+            break;
+        case "choose again":
+            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 = "view.php?id=".$log->cmid;
+                    $log->info = $mod->new_id;
+                    $status = true;
+                }
+            }
+            break;
         case "view":
             if ($log->cmid) {
                 //Get the new_id of the module (to recode the info field)