Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More little fixups for week 0

  • Loading branch information...
commit 19801b2b21e39c1f4bbd15a5e5f65c1a46a67690 1 parent 1523be7
moodler authored
Showing with 9 additions and 18 deletions.
  1. +0 −9 course/topics.php
  2. +9 −1 course/view.php
  3. +0 −8 course/weeks.php
View
9 course/topics.php
@@ -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);
View
10 course/view.php
@@ -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":
View
8 course/weeks.php
@@ -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") {
Please sign in to comment.
Something went wrong with that request. Please try again.