mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Whoops forgot some more 'week's
This commit is contained in:
parent
b5fe4c935d
commit
9ccbad71e3
@ -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§ion=0&add=reading\">Add Reading</A>...</P>";
|
||||
} else {
|
||||
echo "<BR><BR>";
|
||||
}
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user