]> git.mjollnir.org Git - moodle.git/commitdiff
Slight fix to change some mod->course_module to mod->coursemodule for consistency
authormartin <martin>
Sat, 1 Jun 2002 06:37:04 +0000 (06:37 +0000)
committermartin <martin>
Sat, 1 Jun 2002 06:37:04 +0000 (06:37 +0000)
course/mod.php

index cd871f9a75e1d3cfc023978e3bda384c2dbd211a..5f36cfd9ae0d78da5d8753b60f098ae5a57fec31 100644 (file)
                 // course_modules and course_weeks each contain a reference 
                 // to each other, so we have to update one of them twice.
 
-                if (! $mod->course_module = add_course_module($mod) ) {
+                if (! $mod->coursemodule = add_course_module($mod) ) {
                     error("Could not add a new course module");
                 }
                 if (! $weekid = add_mod_to_week($mod) ) {
                     error("Could not add the new course module to that week");
                 }
-                if (! set_field("course_modules", "week", $weekid, "id", $mod->course_module)) {
+                if (! set_field("course_modules", "week", $weekid, "id", $mod->coursemodule)) {
                     error("Could not update the course module with the correct week");
                 }   
                 add_to_log($mod->course, "course", "add mod", "../mod/$mod->modulename/view.php?id=$mod->coursemodule", "$mod->modulename $mod->instance"); 
@@ -245,9 +245,9 @@ function add_mod_to_week($mod) {
                               WHERE course = '$mod->course' AND week = '$mod->week'") ) {
 
         if ($cw->sequence) {
-            $newsequence = "$cw->sequence,$mod->course_module";
+            $newsequence = "$cw->sequence,$mod->coursemodule";
         } else {
-            $newsequence = "$mod->course_module";
+            $newsequence = "$mod->coursemodule";
         }
         if (!$rs = $db->Execute("UPDATE course_weeks SET sequence = '$newsequence' WHERE id = '$cw->id'")) {
             return 0;
@@ -260,7 +260,7 @@ function add_mod_to_week($mod) {
                                  SET course   = '$mod->course', 
                                      week     = '$mod->week',
                                      summary  = '',
-                                     sequence = '$mod->course_module' ")) {
+                                     sequence = '$mod->coursemodule' ")) {
             return 0;
         }
         // Get it out again - this is the most compatible way to determine the ID