diff --git a/course/social.php b/course/format/social.php similarity index 100% rename from course/social.php rename to course/format/social.php diff --git a/course/topics.php b/course/format/topics.php similarity index 100% rename from course/topics.php rename to course/format/topics.php diff --git a/course/weeks.php b/course/format/weeks.php similarity index 100% rename from course/weeks.php rename to course/format/weeks.php diff --git a/course/view.php b/course/view.php index c4b78f6fa9d..1a771ef0249 100644 --- a/course/view.php +++ b/course/view.php @@ -86,20 +86,7 @@ } } - - switch ($course->format) { - case "weeks": - include("weeks.php"); - break; - case "social": - include("social.php"); - break; - case "topics": - include("topics.php"); - break; - default: - error("Course format not defined yet!"); - } + require("format/$course->format.php"); // Include the actual course format print_footer();