From deca24d5f4e2f57aa5382d52be9d04e77dfda52b Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 13 Jun 2003 08:41:57 +0000 Subject: [PATCH] Moving course formats into subdirectory. This is the first step towards more pluggable course formats that can be just dropped in to the system. --- course/{ => format}/social.php | 0 course/{ => format}/topics.php | 0 course/{ => format}/weeks.php | 0 course/view.php | 15 +-------------- 4 files changed, 1 insertion(+), 14 deletions(-) rename course/{ => format}/social.php (100%) rename course/{ => format}/topics.php (100%) rename course/{ => format}/weeks.php (100%) 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 c4b78f6fa9..1a771ef024 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(); -- 2.39.5