]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14617 removed old legacy function emulations
authorskodak <skodak>
Thu, 1 May 2008 22:03:15 +0000 (22:03 +0000)
committerskodak <skodak>
Thu, 1 May 2008 22:03:15 +0000 (22:03 +0000)
mod/hotpot/lib.php

index fcea20a8d208bc264ff7f4ff2a29fef5be31ae19..a4b2a63c4293aeed299465b441cfebadecf9e128 100644 (file)
@@ -2400,89 +2400,6 @@ function hotpot_get_post_actions() {
     return array('attempt','review','submit');
 }
 
-if (!function_exists('file_get_contents')) {
-    // add this function for php version<4.3
-    function file_get_contents($filepath) {
-        $contents = file($filepath);
-        if (is_array($contents)) {
-             $contents = implode('', $contents);
-        }
-        return $contents;
-    }
-}
-if (!function_exists('html_entity_decode')) {
-    // add this function for php version<4.3
-    function html_entity_decode($str) {
-        $t = get_html_translation_table(HTML_ENTITIES);
-        $t = array_flip($t);
-        return strtr($str, $t);
-    }
-
-}
-
-// required for Moodle 1.x
-if (!isset($CFG->pixpath)) {
-    $CFG->pixpath = "$CFG->wwwroot/pix";
-}
-
-if (!function_exists('fullname')) {
-    // add this function for Moodle 1.x
-    function fullname($user) {
-        return "$user->firstname $user->lastname";
-    }
-}
-if (!function_exists('get_user_preferences')) {
-    // add this function for Moodle 1.x
-    function get_user_preferences($name=NULL, $default=NULL, $userid=NULL) {
-        return $default;
-    }
-}
-if (!function_exists('set_user_preference')) {
-    // add this function for Moodle 1.x
-    function set_user_preference($name, $value, $otheruser=NULL) {
-        return false;
-    }
-}
-if (!function_exists('get_coursemodule_from_id')) {
-    // add this function for Moodle < 1.5.4
-    function get_coursemodule_from_id($modulename, $cmid, $courseid=0) {
-        global $CFG;
-        return get_record_sql("
-            SELECT 
-                cm.*, m.name, md.name as modname
-            FROM 
-                {$CFG->prefix}course_modules cm,
-                {$CFG->prefix}modules md,
-                {$CFG->prefix}$modulename m
-            WHERE 
-                ".($courseid ? "cm.course = '$courseid' AND " : '')."
-                cm.id = '$cmid' AND
-                cm.instance = m.id AND
-                md.name = '$modulename' AND
-                md.id = cm.module
-        ");
-    }
-}
-if (!function_exists('get_coursemodule_from_instance')) {
-    // add this function for Moodle < 1.5.4
-    function get_coursemodule_from_instance($modulename, $instance, $courseid=0) {
-        global $CFG;
-        return get_record_sql("
-            SELECT 
-                cm.*, m.name, md.name as modname
-            FROM 
-                {$CFG->prefix}course_modules cm,
-                {$CFG->prefix}modules md,
-                {$CFG->prefix}$modulename m
-            WHERE 
-                ".($courseid ? "cm.course = '$courseid' AND" : '')."
-                cm.instance = m.id AND
-                md.name = '$modulename' AND
-                md.id = cm.module AND
-                m.id = '$instance'
-        ");
-    }
-}
 function hotpot_utf8_to_html_entity($char) {
     // http://www.zend.com/codex.php?id=835&single=1