From 9ccbad71e3285c9d28352f1770c216c65e3432d4 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 25 Jun 2002 11:57:00 +0000 Subject: [PATCH] Whoops forgot some more 'week's --- index.php | 2 +- lib/moodlelib.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 4cfd8801b3..5f25c35c14 100644 --- a/index.php +++ b/index.php @@ -42,7 +42,7 @@ } } if ($USER->editing) { - echo "

wwwroot/course/mod.php?id=$site->id&week=0&add=reading\">Add Reading...

"; + echo "

wwwroot/course/mod.php?id=$site->id§ion=0&add=reading\">Add Reading...

"; } else { echo "

"; } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index f3871319b8..7fd6c0928f 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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"); -- 2.39.5