]> git.mjollnir.org Git - moodle.git/commitdiff
Some minor changes in order to avoid some notices...
authorstronk7 <stronk7>
Sun, 25 Jun 2006 10:16:45 +0000 (10:16 +0000)
committerstronk7 <stronk7>
Sun, 25 Jun 2006 10:16:45 +0000 (10:16 +0000)
grade/lib.php

index 13ef4a203089fcc8ef5b4eafe7ea3c237aeb2c4a..f99521f7cb4159783aceabb1efb2312628408526 100644 (file)
@@ -1,10 +1,15 @@
 <?php // $Id$
 
-require_once('../config.php');
+if (!defined('MOODLE_INTERNAL')) {
+            die('Direct access to this script is forbidden.');    ///  It must be included from a Moodle page
+}
+
 require_once($CFG->dirroot.'/course/lib.php');
 
 define('UNCATEGORISED', 'uncategorised');
 
+global $GRADEPREFS, $GRADEPREFSDEFAULTS;    // This variables are going to be global... :-/
+
 $GRADEPREFS = array('use_advanced',                // Only add new preferences to the end of this array!
                     'use_weighted_for_letter',     // as the order counts and will affect backward compatibility
                     'display_weighted',