* It works with the {@link block_edit_form} class, or rather the particular
* subclass defined by this block, to do the editing.
*
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage block
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if (!defined('MOODLE_INTERNAL')) {
/**
* This file contains the parent class for moodle blocks, block_base.
*
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package blocks
+ * @package core
+ * @subpackage block
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
/// Constants
* DB need to ensure that the default role caps
* are dealt with appropriately.
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage role
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** permission definitions */
define('CAP_INHERIT', 0);
/** permission definitions */
* Original author: Vincenzo K. Marcovecchio
* Maintainer: Petr Skoda
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage admin
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/// Add libraries
require_once($CFG->libdir.'/ddllib.php');
require_once($CFG->libdir.'/xmlize.php');
*
* 2006-08-28 File created, AUTH return values defined.
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage auth
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Returned when the login was successful.
*/
*
* This file defines the {@link block_manager} class,
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage block
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**#@+
* @deprecated since Moodle 2.0. No longer used.
*/
/**
* Turns the display of normal blocks either on or off.
- *
+ *
* @param bool $setting
*/
public function show_only_fake_blocks($setting = true) {
/**
* Command line utility functions and classes
*
- * @package moodlecore
+ * @package core
* @subpackage cli
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Get input from user
* @param string $prompt text prompt, should include possible options
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-require_once $CFG->libdir.'/completion/completion_aggregation.php';
-require_once $CFG->libdir.'/completion/completion_criteria.php';
-require_once $CFG->libdir.'/completion/completion_completion.php';
-require_once $CFG->libdir.'/completion/completion_criteria_completion.php';
-
-
/**
* Contains a class used for tracking whether activities have been completed
* by students ('completion')
*
* Completion top-level options (admin setting enablecompletion)
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage completion
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
+require_once $CFG->libdir.'/completion/completion_aggregation.php';
+require_once $CFG->libdir.'/completion/completion_criteria.php';
+require_once $CFG->libdir.'/completion/completion_completion.php';
+require_once $CFG->libdir.'/completion/completion_criteria_completion.php';
+
+
/** The completion system is enabled in this site/course */
define('COMPLETION_ENABLED', 1);
/** The completion system is not enabled in this site/course */
* @package moodlecore
*/
class completion_info {
- /**
+ /**
* Course object passed during construction
* @access private
* @var object
*
* That's all!
*
- * @package moodlecore
+ * @package core
* @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* @global object $CFG
* @name $CFG
* Used for tracking conditions that apply before activities are displayed
* to students ('conditional availability').
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage completion
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** The activity is not displayed to students at all when conditions aren't met. */
define('CONDITION_STUDENTVIEW_HIDE',0);
/** The activity is displayed to students as a greyed-out name, with informational
* before including main config.php. You can resume normal script operation
* if you define ABORT_AFTER_CONFIG_CANCEL and require the setup.php
*
- * @package moodlecore
- * @copyright 2009 petr Skoda (skodak)
+ * @package core
+ * @copyright 2009 Petr Skoda (skodak)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* @return boolean, true if compression enabled
*/
function min_enable_zlib_compression() {
-
+
if (headers_sent()) {
return false;
}
}
}
}
-
+
@ini_set('output_handler', '');
/*
* so let's try some bigger sizes.
*/
@ini_set('zlib.output_compression', 65536);
-
+
return true;
}
\ No newline at end of file
* You can have a rather longer description of the file as well,
* if you like, and it can span multiple lines.
*
- * @copyright Petr Skoda
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package moodlecore
+ * @package core
+ * @subpackage lib
+ * @copyright Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Utitily class for importing of CSV files.
* @copyright Petr Skoda
* - true: if passed
* - false: if failed
*
- * @package moodlecore
- * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage admin
+ * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* This function will look for the risky PHP setting register_globals
* in order to inform about. MDL-12914
* - weblib.php - functions that produce web output
* - moodlelib.php - general-purpose Moodle functions
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* The maximum courses in a category
* MAX_COURSES_IN_CATEGORY * MAX_COURSE_CATEGORIES must not be more than max integer!
*
* For further documentation, visit {@link http://docs.moodle.org/en/DDL_functions}
*
- * @package moodlecore
- * @subpackage DDL
+ * @package core
+ * @subpackage ddl
* @copyright 2001-3001 Eloy Lafuente (stronk7) http://contiento.com
* 2008 Petr Skoda http://skodak.org
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
// Add required library
require_once($CFG->libdir.'/xmlize.php');
* Old functions retained only for backward compatibility. New code should not
* use any of these functions.
*
- * @package moodlecore
+ * @package core
* @subpackage deprecated
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @deprecated
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Given a physical path to a file, returns the URL through which it can be reached in Moodle.
*
* http://docs.moodle.org/en/DML_functions
* (feel free to modify, improve and document such page, thanks!)
*
- * @package moodlecore
- * @subpackage DML
+ * @package core
+ * @subpackage dml
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
// Require the essential
require_once($CFG->libdir.'/dml/moodle_database.php');
* This library includes all the required functions used to handle
* transfer of data from one database to another.
*
- * @package moodlecore
- * @subpackage DTL
+ * @package core
+ * @subpackage dtl
* @copyright 2008 Andrei Bautu
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
// Require {@link ddllib.php}
require_once($CFG->libdir.'/ddllib.php');
// Require {@link database_exporter.php}
* memcached, a false value is indistinguisable from a
* "not found in cache" response.
*
- * @copyright Martin Langhoff <martin@catalyst.net.nz>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package moodlecore
+ * @package core
+ * @subpackage lib
+ * @copyright Martin Langhoff <martin@catalyst.net.nz>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
*
* @copyright Martin Langhoff <martin@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Returns users preferred editor for given format
*
* This library includes the basic parts of enrol api.
* It is available on each page.
*
- * @package moodlecore
- * @copyright 2010 Petr Skoda {@link http://skodak.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage enrol
+ * @copyright 2010 Petr Skoda {@link http://skodak.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
/** Course enrol instance enabled. (used in enrol->status) */
define('ENROL_INSTANCE_ENABLED', 0);
* All the info is stored in the admin/environment.xml file,
* supporting to have an updated version in dataroot/environment
*
- * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package moodlecore
+ * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage admin
*/
+defined('MOODLE_INTERNAL') || die();
+
/// Add required files
/**
- * Inlucde the nessecary
+ * Include the necessary
*/
require_once($CFG->libdir.'/xmlize.php');
-/// Define a buch of XML processing errors
+/// Define a bunch of XML processing errors
/** XML Processing Error */
define('NO_ERROR', 0);
/** XML Processing Error */
*
* The public API is all at the end of this file.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package moodlecore
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage event
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Loads the events definitions for the component (from file). If no
* events are defined for the component, we simply return an empty array.
/**
* excellib.class.php
*
- * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package moodlecore
+ * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
*/
-/** setup.php icludes our hacked pear libs first */
+defined('MOODLE_INTERNAL') || die();
+
+/** setup.php includes our hacked pear libs first */
require_once 'Spreadsheet/Excel/Writer.php';
/**
/**
* Support for external API
*
- * @package moodlecore
+ * @package core
* @subpackage webservice
* @copyright 2009 Moodle Pty Ltd (http://moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
/**
* Returns detailed function information
public function __construct($type, $desc='', $required=VALUE_REQUIRED,
$default=null, $allownull=NULL_ALLOWED) {
parent::__construct($desc, $required, $default);
- $this->type = $type;
+ $this->type = $type;
$this->allownull = $allownull;
}
}
/**
* Functions for file handling.
*
- * @package moodlecore
+ * @package core
* @subpackage file
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
/**
* Library functions for managing text filter plugins.
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage filter
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** The states a filter can be in, stored in the filter_active table. */
define('TEXTFILTER_ON', 1);
/** The states a filter can be in, stored in the filter_active table. */
* See examples of use of this library in course/edit.php and course/edit_form.php
*
* A few notes :
- * form defintion is used for both printing of form and processing and should be the same
+ * form definition is used for both printing of form and processing and should be the same
* for both or you may lose some submitted data which won't be let through.
* you should be using setType for every form element except select, radio or checkbox
* elements, these elements clean themselves.
*
*
- * @copyright Jamie Pratt <me@jamiep.org>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package moodlecore
+ * @copyright Jamie Pratt <me@jamiep.org>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage form
*/
-/** setup.php icludes our hacked pear libs first */
+defined('MOODLE_INTERNAL') || die();
+
+/** setup.php includes our hacked pear libs first */
require_once 'HTML/QuickForm.php';
require_once 'HTML/QuickForm/DHTMLRulesTableless.php';
require_once 'HTML/QuickForm/Renderer/Tableless.php';
* gdlib.php - Collection of routines in Moodle related to
* processing images using GD
*
- * @package moodlecore
+ * @package core
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
*
* long description
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- * @package moodlecore
+ * @package core
* @subpackage lib
* @copyright Dan Poltawski <talktodan@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* Simple implementation of some Google API functions for Moodle.
*/
+defined('MOODLE_INTERNAL') || die();
+
/** Include essential file */
require_once($CFG->libdir.'/filelib.php');
/**
* Library of functions for gradebook - both public and internal
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage grade
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
- /** Include essential files */
+defined('MOODLE_INTERNAL') || die();
+
+/** Include essential files */
require_once($CFG->libdir . '/grade/constants.php');
require_once($CFG->libdir . '/grade/grade_category.php');
*
* Copy of GNU Lesser General Public License at: http://www.gnu.org/copyleft/lesser.txt
* Contact author at: hermanV@mindless.com
- *
- * @package moodlecore
+ *
+ * @package core
+ * @subpackage lib
*/
+defined('MOODLE_INTERNAL') || die();
+
/* This file contains modifications by Martin Dougiamas
* as part of Moodle (http://moodle.com). Modified lines
* are marked with "Moodle".
$axis_colour = $this->parameter['axis_colour'];
$axis_angle = $this->parameter['y_axis_angle'];
$y_tick_labels = $this->y_tick_labels;
-
+
$this->calculated['y_axis_left']['has_data'] = FALSE;
$this->calculated['y_axis_right']['has_data'] = FALSE;
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package moodlecore
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage group
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Groups not used in course or activity
*/
/**
* This file is serving optimised JS
*
- * @package moodlecore
- * @copyright 2010 Petr Skoda (skodak)
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2010 Petr Skoda (skodak)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// we need just the values from config.php and minlib.php
* data structures, useful for both ldap authentication (or ldap based
* authentication like CAS) and enrolment plugins.
*
- * @author Iñaki Arenaza
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
- * @copyright 2010 onwards Iñaki Arenaza
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @author I�aki Arenaza
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @copyright 2010 onwards I�aki Arenaza
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
// rootDSE is defined as the root of the directory data tree on a directory server.
if (!defined('ROOTDSE')) {
define ('ROOTDSE', '');
/**
* A namespace contains license specific functions
*
- * @since 2.0
- * @package moodlecore
- * @subpackage moodlecore
- * @copyright 2010 Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package core
+ * @subpackage lib
+ * @copyright 2010 Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
class license_manager {
/**
* Adding a new license type
* Reordering of items works across pages.
* Processing of editing actions on list.
*
- * @package moodlecore
- * @copyright Jamie Pratt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright Jamie Pratt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Clues to reading this code:
*
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @copyright Petr Skoda (skodak)
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright Petr Skoda (skodak)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** @see evalmath/evalmath.class.php */
require_once $CFG->dirroot.'/lib/evalmath/evalmath.class.php';
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @copyright Martin Langhoff <martin@catalyst.net.nz>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright Martin Langhoff <martin@catalyst.net.nz>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* This class abstracts PHP's PECL memcached
* API to provide
/**
* messagelib.php - Contains generic messaging functions for the message system
*
- * @package moodlecore
- * @copyright Luis Rodrigues and Martin Dougiamas
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage message
+ * @copyright Luis Rodrigues and Martin Dougiamas
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Called when a message provider wants to send a message.
* This functions checks the user's processor configuration to send the given type of message,
* - weblib.php - functions that produce web output
* - datalib.php - functions that access the database
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/// CONSTANTS (Encased in phpdoc proper comments)/////////////////////////
/// Date and time constants ///
* This file contains classes used to manage the navigation structures in Moodle
* and was introduced as part of the changes occuring in Moodle 2.0
*
- * @since 2.0
- * @package moodlecore
+ * @since 2.0
+ * @package core
* @subpackage navigation
- * @copyright 2009 Sam Hemelryk
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 Sam Hemelryk
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* The name that will be used to separate the navigation cache within SESSION
*/
* - Eloy Lafuente (stronk7) {@link http://contiento.com}
* - Petr Skoda (skodak)
*
- * @package moodlecore
- * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* The xml used here is derived from output of KSpread 1.6.1
*
* Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
* for an overview.
*
- * @package moodlecore
- * @copyright 2009 Nicolas Connault
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2009 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Helper class used by other components that involve an action on the page (URL or JS).
*
$this->params[$var] = $params[$var];
}
}
-
+
$attributes = array('url' => $url->out(false), 'name' => $name, 'options' => $this->get_js_options($params));
parent::__construct($event, $this->jsfunction, $attributes);
}
* Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
* for an overview.
*
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
/**
* Interface marking other classes as suitable for renderer_base::render()
* Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
* for an overview.
*
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** General rendering target, usually normal browser page */
define('RENDERER_TARGET_GENERAL', 'general');
* Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
* for an overview.
*
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
require_once($CFG->libdir.'/outputcomponents.php');
require_once($CFG->libdir.'/outputactions.php');
require_once($CFG->libdir.'/outputfactories.php');
* Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
* for an overview.
*
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Simple base class for Moodle renderers.
*
* @return string
*/
protected function render_image_gallery(image_gallery $imagegallery) {
- $this->page->requires->yui_module(array('gallery-lightbox','gallery-lightbox-skin'),
+ $this->page->requires->yui_module(array('gallery-lightbox','gallery-lightbox-skin'),
'Y.Lightbox.init', null, '2010.04.08-12-35');
if (count($imagegallery->images) == 0) {
return '';
/**
* Library functions to facilitate the use of JavaScript in Moodle.
*
- * @package moodlecore
- * @copyright 2009 Tim Hunt, 2010 Petr Skoda
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2009 Tim Hunt, 2010 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
// note: you can find history of this file in lib/ajax/ajaxlib.php
/**
/**
* This file contains the moodle_page class. There is normally a single instance
- * of this class in the $PAGE global variable. This class is a central reporitory
+ * of this class in the $PAGE global variable. This class is a central repository
* of information about the page we are building up to send back to the user.
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
/**
* $PAGE is a central store of information about the current page we are
* @var bool
*/
protected $_legacythemeinuse = false;
-
+
/// Magic getter methods =============================================================
/// Due to the __get magic below, you normally do not call these as $PAGE->magic_get_x
/// methods, but instead use the $PAGE->x syntax.
* default to the admin-selected legacy theme
*
* @return true if legacy theme should be used, otherwise false
- *
+ *
*/
protected function browser_is_outdated() {
foreach($this->_legacybrowsers as $browser => $version) {
}
return false;
}
-
+
/**
* Sets ->pagetype from the script name. For example, if the script that was
* run is mod/quiz/view.php, ->pagetype will be set to 'mod-quiz-view'.
* Major Contributors
* - Penny Leach <penny@catalyst.net.nz>
*
- * @package moodlecore
+ * @package core
* @subpackage portfolio
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
// require some of the sublibraries first.
// this is not an exhaustive list, the others are pulled in as they're needed
// so we don't have to always include everything unnecessarily for performance
* Major Contributors
* - Alex Smith, Julian Sedding and Gustav Delius {@link http://maths.york.ac.uk/serving_maths}
*
- * @package moodlecore
+ * @package core
* @subpackage question
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/// CONSTANTS ///////////////////////////////////
/**#@+
foreach ($categoriesarray as $contextstring => $optgroup){
$group = array();
foreach ($optgroup as $key=>$value) {
- $key = str_replace($CFG->wwwroot, '', $key);
- $group[$key] = $value;
+ $key = str_replace($CFG->wwwroot, '', $key);
+ $group[$key] = $value;
}
$popupcats[] = array($contextstring=>$group);
}
/**
* Recourse module like helper functions
*
- * @package moodlecore
- * @copyright 2009 Petr Skoda (http://skodak.org)
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 2009 Petr Skoda (http://skodak.org)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** Try the best way */
define('RESOURCELIB_DISPLAY_AUTO', 0);
/** Display using object tag */
/**
* This file contains all the common stuff to be used in RSS System
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage rss
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
function rss_add_http_header($context, $componentname, $componentinstance, $title) {
global $PAGE, $USER;
$rsspath = rss_get_url($context->id, $USER->id, $componentname, $componentinstance->id);
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage search
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** @see lexer.php */
require_once($CFG->libdir.'/lexer.php');
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage session
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Factory method returning moodle_session object.
* @return moodle_session
* Normally this is only called by the main config.php file
* Normally this file does not need to be edited.
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* setup process, before any of the main libraries are
* loaded.
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/// Debug levels ///
/** no warnings at all */
define ('DEBUG_NONE', 0);
* ones, provide code coverage analysis to already existing tests. Also there are some
* utility functions designed to make the coverage control easier.
*
- * @package moodlecore
+ * @package core
* @subpackage simpletestcoverage
- * @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Includes
*/
* Major Contirbutors
* - T.J.Hunt@open.ac.uk
*
- * @package moodlecore
+ * @package core
* @subpackage simpletestex
- * @copyright © 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright © 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Includes
*/
* Since Moodle 2.0 we rely only on native PHP Soap extension,
* the original name of this file was lib/soap/phpsoap.php
*
- * @package moodlecore
- * @author Alex Smith and others members of the Serving Mathematics project
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * {@link http://maths.york.ac.uk/serving_maths}
- * and others
+ * @package core
+ * @subpackage lib
+ * @author Alex Smith and others members of the Serving Mathematics project
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * {@link http://maths.york.ac.uk/serving_maths}
+ * and others
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Create a new SoapClient object
*
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage stats
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** THESE CONSTANTS ARE USED FOR THE REPORTING PAGE. */
define('STATS_REPORT_LOGINS',1); // double impose logins and unique logins on a line graph. site course only.
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** TABLE_VAR_SORT = 1 */
define('TABLE_VAR_SORT', 1);
/** TABLE_VAR_HIDE = 2 */
$fsortorder = get_string('asc');
$lsortorder = get_string('asc');
}
-
+
$override = new object();
$override->firstname = 'firstname';
$override->lastname = 'lastname';
} else {
$this->headers[$index] = '<a href="'.$this->baseurl.$this->request[TABLE_VAR_SORT].'=lastname">'.get_string('lastname').get_accesshide(get_string('sortby').' '.get_string('lastname').' '.$lsortorder).'</a> '.$icon_sort_last.' / '.
'<a href="'.$this->baseurl.$this->request[TABLE_VAR_SORT].'=firstname">'.get_string('firstname').get_accesshide(get_string('sortby').' '.get_string('firstname').' '.$fsortorder).'</a> '.$icon_sort_first;
- }
+ }
}
break;
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* As we implement the singleton pattern to use this class (only one instance
* is shared globally), we need this helper function
/**
* Various upgrade/install related functions and classes.
*
- * @package moodlecore
+ * @package core
* @subpackage upgrade
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/** UPGRADE_LOG_NORMAL = 0 */
define('UPGRADE_LOG_NORMAL', 0);
/** UPGRADE_LOG_NOTICE = 1 */
/**
* uploadlib.php - This class handles all aspects of fileuploading
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage file
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* This class handles all aspects of fileuploading
*
* - datalib.php - functions that access the database.
* - moodlelib.php - general-purpose Moodle functions.
*
- * @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/// Constants
/// Define text formatting types ... eventually we can add Wiki, BBcode etc
/**
* Utility function to convert wiki-like to Markdown format
*
- * @package moodlecore
- * @copyright Howard Miller, 2005
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core
+ * @subpackage lib
+ * @copyright Howard Miller, 2005
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**#@+
* state defines
*/
//debug($bits);
$version = array_shift($bits);
if ($version == 'moodle') {
+ //TODO: this is a ugly hack because we should not load any libs here!
+ define('MOODLE_INTERNAL', true);
require_once($CFG->libdir.'/moodlelib.php');
$frankenstyle = array_shift($bits);
$filename = array_pop($bits);
$version = array_shift($parts);
if ($version == 'moodle' && count($parts) >= 3) {
+ //TODO: this is a ugly hack because we should not load any libs here!
+ define('MOODLE_INTERNAL', true);
require_once($CFG->libdir.'/moodlelib.php');
$frankenstyle = array_shift($parts);
$module = array_shift($parts);