]> git.mjollnir.org Git - moodle.git/commitdiff
Moving course formats into subdirectory.
authormoodler <moodler>
Fri, 13 Jun 2003 08:41:57 +0000 (08:41 +0000)
committermoodler <moodler>
Fri, 13 Jun 2003 08:41:57 +0000 (08:41 +0000)
This is the first step towards more pluggable course formats that can
be just dropped in to the system.

course/format/social.php [moved from course/social.php with 100% similarity]
course/format/topics.php [moved from course/topics.php with 100% similarity]
course/format/weeks.php [moved from course/weeks.php with 100% similarity]
course/view.php

similarity index 100%
rename from course/social.php
rename to course/format/social.php
similarity index 100%
rename from course/topics.php
rename to course/format/topics.php
similarity index 100%
rename from course/weeks.php
rename to course/format/weeks.php
index c4b78f6fa9d7fda81b08a3b1670c9bddf0143bdf..1a771ef02496ab0d486eeb6ed347f097d03b5315 100644 (file)
         }
     }
 
-
-    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();