More little fixups for week 0

This commit is contained in:
moodler
2002-12-22 06:45:09 +00:00
parent 1523be781f
commit 19801b2b21
3 changed files with 9 additions and 18 deletions
-9
View File
@@ -8,15 +8,6 @@
include_once("$CFG->dirroot/mod/forum/lib.php");
if (! $sections = get_all_sections($course->id) ) {
$section->course = $course->id; // Create a default section.
$section->section = 0;
$section->id = insert_record("course_sections", $section);
if (! $sections = get_all_sections($course->id) ) {
error("Error finding or creating section structures for this course");
}
}
if (isset($topic)) {
if ($topic == "all") {
unset($USER->topic);
+9 -1
View File
@@ -54,7 +54,15 @@
update_course_icon($course->id));
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
$sections = get_all_sections($course->id);
if (! $sections = get_all_sections($course->id)) {
$section->course = $course->id; // Create a default section.
$section->section = 0;
$section->id = insert_record("course_sections", $section);
if (! $sections = get_all_sections($course->id) ) {
error("Error finding or creating section structures for this course");
}
}
switch ($course->format) {
case "weeks":
-8
View File
@@ -4,14 +4,6 @@
include_once("$CFG->dirroot/mod/forum/lib.php");
if (! $sections = get_all_sections($course->id)) {
$section->course = $course->id; // Create a default section.
$section->section = 0;
$section->id = insert_record("course_sections", $section);
if (! $sections = get_all_sections($course->id) ) {
error("Error finding or creating section structures for this course");
}
}
if (isset($week)) {
if ($week == "all") {