From cf3f6bcc2c7de689ace31fed3481d6377072cfd3 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 11 Dec 2002 06:31:59 +0000 Subject: [PATCH] Removed makeclass stuff completely. It's now in contrib/crown_college --- lib/makeclass.php | 42 ------------------------------------------ lib/setup.php | 6 ++---- 2 files changed, 2 insertions(+), 46 deletions(-) delete mode 100644 lib/makeclass.php diff --git a/lib/makeclass.php b/lib/makeclass.php deleted file mode 100644 index 29bcf4abb3..0000000000 --- a/lib/makeclass.php +++ /dev/null @@ -1,42 +0,0 @@ -libdir -// -// /// Call moodle functions like this -// moodle::isteacher($courseID); - - -require_once("../config.php"); - -function makeClassFromFile($file, $classname) { - global $CFG; - - $file = "$CFG->libdir/$file"; - - # sanity checks - assert('is_file($file)'); - assert('!class_exists($classname)'); - - # Load the file into an array, strip out php tags at beginning and end, - # This assumes that the php start and end tags are each on one line at the - # beginning and end of the file, and the rest of the file consists only of - # comments and functions. - $functions = file($file); - $functions = array_slice($functions, 1, -1); - $functions = join('', $functions); - - eval ("class $classname { $functions }"); -} - diff --git a/lib/setup.php b/lib/setup.php index cee833b4dd..97a155de3b 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -26,10 +26,8 @@ /// Load up standard libraries - if (!isset($external_moodle_access)) { // See lib/makeclass.php - require("$CFG->libdir/weblib.php"); // Standard web page functions - require("$CFG->libdir/moodlelib.php"); // Various Moodle functions - } + require("$CFG->libdir/weblib.php"); // Standard web page functions + require("$CFG->libdir/moodlelib.php"); // Various Moodle functions /// Set error reporting back to normal -- 2.39.5