More little fixups for week 0
This commit is contained in:
@@ -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
@@ -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":
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user