]> git.mjollnir.org Git - moodle.git/commitdiff
Whoops forgot some more 'week's
authormartin <martin>
Tue, 25 Jun 2002 11:57:00 +0000 (11:57 +0000)
committermartin <martin>
Tue, 25 Jun 2002 11:57:00 +0000 (11:57 +0000)
index.php
lib/moodlelib.php

index 4cfd8801b398e83312a0dd6318cc62dcfb87a98b..5f25c35c14429672d26dfde8ae66a3c93d5f2c5d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -42,7 +42,7 @@
                  }
              }
              if ($USER->editing) {
-                 echo "<P align=right><A HREF=\"$CFG->wwwroot/course/mod.php?id=$site->id&week=0&add=reading\">Add Reading</A>...</P>";
+                 echo "<P align=right><A HREF=\"$CFG->wwwroot/course/mod.php?id=$site->id&section=0&add=reading\">Add Reading</A>...</P>";
              } else {
                  echo "<BR><BR>";
              }
index f3871319b829df7fbe41e4f8b37b07164d93e514..7fd6c0928f84227903c71cda724c2bb40c012875 100644 (file)
@@ -973,16 +973,16 @@ function get_coursemodule_from_instance($modulename, $instance, $course) {
 
 }
 
-function get_all_instances_in_course($modulename, $course, $sort="cw.week") {
+function get_all_instances_in_course($modulename, $course, $sort="cw.section") {
 // Returns an array of all the active instances of a particular
 // module in a given course.   Returns false on any errors.
 
-    return get_records_sql("SELECT m.*,cw.week,cm.id as coursemodule 
-                            FROM course_modules cm, course_weeks cw, modules md, $modulename m 
+    return get_records_sql("SELECT m.*,cw.section,cm.id as coursemodule 
+                            FROM course_modules cm, course_sections cw, modules md, $modulename m 
                             WHERE cm.course = '$course' AND 
                                   cm.instance = m.id AND 
                                   cm.deleted = '0' AND
-                                  cm.week = cw.id AND 
+                                  cm.section = cw.id AND 
                                   md.name = '$modulename' AND 
                                   md.id = cm.module
                             ORDER BY $sort");