|
Moodle
2.2.1
http://www.collinsharper.com
|
Automated backups CLI cron
This script executes
cli
CLI cron
This script looks through all the module directories for cron.php files and runs them. These files can contain cleanup functions, email functions or anything that needs to be run on a regular basis.
cli
This script creates config.php file and prepares database.
This script is not intended for beginners! Potential problems:
cli
This installs Moodle into empty database, config.php must already exist.
This script is intended for advanced usage such as in Debian packages.
cli
Enable or disable maintenance mode
cli
MySQL engine conversion tool.
cli
cli
This script allows you to reset any local user password.
cli
Web cron
This script looks through all the module directories for cron.php files and runs them. These files can contain cleanup functions, email functions or anything that needs to be run on a regular basis.
This file is best run from cron on the host system (ie outside PHP). It is strongly recommended to add password protection via admin settings.
eg wget -q -O /dev/null 'http: *moodle.somewhere.edu/admin/cron.php?password=SeCreT666'
It is also possible to use CLI script admin/cli/cron.php instead, you can not call this script from command line any more.
admin
Enrol config manipulation script.
enrol
This file is the admin frontend to execute all the checks available in the environment.xml file. It includes database, php and php_extensions. Also, it's possible to update the xml file from moodle.org be able to check more and more versions.
admin
Main administration script.
Page to allow the administrator to delete networked hosts, with a confirm message
mnet
This file contains two forms for adding/editing mnet hosts, used by peers.php
mnet
Page to allow the administrator to configure networked hosts, and add new ones
mnet
Allows the admin to configure a list of profile fields that are sent/recieved
mnet
This page is for configuring which services are published/subscribed on a host
mnet
The form for configuring which services are subscribed and published on a host
mnet
Tabs to be included on the pages for configuring a single host $mnet_peer object must be set and bootstrapped $currenttab string must be set
mnet
A service browser for remote Moodles
This script 'remotely' executes the reflection methods on a remote Moodle, and publishes the details of the available services
mnet
UI for general plugins management
admin
This script triggers a full purging of system caches, this is useful mostly for developers who did not disable the caching.
Renderer for core_admin subsystem
admin
Resets the emoticons mapping into the default value
Lets you site administrators
role
Allow overriding of roles by other roles
role
Lets you assign roles to users in a particular context.
role
Shows the result of has_capability for every capability for a user in a context.
role
Lets the user edit role definitions.
Responds to actions: add - add a new role duplicate - like add, only initialise the new role by using an existing one. edit - edit the definition of a role view - view the definition of a role
role
Library code used by the roles administration interfaces.
Responds to actions: add - add a new role duplicate - like add, only initialise the new role by using an existing one. edit - edit the definition of a role view - view the definition of a role
role
Lets the user define and edit roles.
Responds to actions: [blank] - list roles. delete - delete a role (with are-you-sure) moveup - change the sort order movedown - change the sort order reset - set a role's permissions back to the default for that legacy role type.
For all but the first two of those, you also need a roleid parameter, and possibly some other data.
role
Defines the tab bar used on the manage/allow assign/allow overrides pages.
role
Lets you override role definitions in contexts.
role
This script serves draft files of current user
role
User roles report list all the users who have been assigned a particular role in all contexts.
role
Tracking of processed users.
This class prints user information into a html table.
admin
script for bulk user multi cohort add
user
form for bulk user multi cohort add
user
Provides base converter classes
backup-convert
Provides Common Cartridge v1 converter class
backup-convert
Provides imscc11_export_converter class
backup-convert
Provides Common Cartridge v1.1 converter class
backup-convert
Unit tests for the moodle1 converter
backup-convert
backup-moodle2
backup-convert
Utility helper for automated backups run through cron.
backup
Provides convert_helper and convert_helper_exception classes
backup-convert
Unit tests for backup/util/helper/convert_helper.class.php
backup-convert
Makes sure that all general code needed by backup-convert code is included
backup-convert
Defines the base class form used by blocks/edit.php to edit block instance configuration.
It works with the block_edit_form class, or rather the particular subclass defined by this block, to do the editing.
block
This file contains the parent class for moodle blocks, block_base.
block http://www.gnu.org/copyleft/gpl.html GNU Public License
This is an empty file which is used in order to prevent error logs in the serverlog.
Sometimes developer forgets to postprocess files when saving submitted form data or forget to replace the file placeholders with the current area information.
file
Cohort related management functions, this file needs to be included manually.
cohort
External course API
course
Library of useful functions
course
Duplicates a given course module
The script backups and restores a single activity as if it was imported from the same course, using the default import settings. The newly created copy of the activity is then moved right below the original one.
course
This script serves draft files of current user
file
This file processes AJAX enrolment actions and returns JSON
The general idea behind this file is that any errors should throw exceptions which will be returned and acted upon by the calling AJAX script.
enrol
Bulk user enrolment processing.
enrol
This file contains form for bulk changing user enrolments.
enrol
External course participation api.
This api is mostly read only, the actual enrol and unenrol support is in each enrol plugin.
enrol
This page shows all course enrolment options for current user.
enrol
Main course enrolment management UI.
enrol
This file contains the course_enrolment_manager class which is used to interface with the functions that exist in enrollib.php in relation to a single course.
enrol
List and modify users that are not enrolled but still have a role in course.
enrol
This is the main renderer for the enrol section.
enrol
Main course enrolment table
This table is used to display the enrolment information for a course. It requires that a course enrolment manager be provided during constuct with provides all of the information for the table. The control then produces the table, the paging, and the associated JS actions for the page.
enrol
Completely unenrol a user from a course.
Please note when unenrolling a user all of their grades are removed as well, most ppl actually expect enrolments to be suspended only...
enrol
Main course enrolment management UI, this is not compatible with frontpage course.
enrol
Various enrol UI forms
enrol
This script fetches legacy course files in dataroot directory, it is enabled only if course->legacyfiles == 2. DO not link to this file in new code.
Syntax: file.php/courseid/dir/dir/dir/filename.ext file.php/courseid/dir/dir/dir/filename.ext?forcedownload=1 (download instead of inline) file.php/courseid/dir (returns index.html from dir) Workaround: file.php?file=/courseid/dir/dir/dir/filename.ext
file
File manager support
file
Moodle file tree viewer based on YUI2 Treeview
file
Rendering of files viewer related widgets.
file
A Moodle form base class for editing local filter settings.
http://www.gnu.org/copyleft/gpl.html GNU Public License
filter
Lets users configure which filters are active in a sub-context.
http://www.gnu.org/copyleft/gpl.html GNU Public License
filter
Common classes used by gradingform plugintypes are defined here
grading
Advanced grading methods support
grading
A single gradable area management page
This page alows the user to set the current active method in the given area, provides access to the plugin editor and allows user to save the current form as a template or re-use some existing form.
grading
Allows to choose a form from the list of available templates
grading
Defines forms used by pick.php
grading
Renderer for core_grading subsystem
grading
Unit tests for the advanced grading subsystem
grading
Displays help via AJAX call or in a new page
Use core_renderer::help_icon() or addHelpButton() to display the help icon.
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Moodle frontpage.
This script prints basic CSS for the installer
install
This script creates config.php file during installation.
install
Displays IP address on map.
This script is not compatible with IPv6.
iplookup
IP Lookup utility functions
iplookup
Strings for core subsystem 'blog'
blog
Strings for core component 'bulkusers'
bulkusers
Strings for component 'core_enrol', language 'en', branch 'MOODLE_20_STABLE'
enrol
Strings for the advanced grading methods subsystem
grading
Defines names of plugin types and some strings used at the plugin managment
plugin
This file contains functions for managing user access
Public API vs internals
General users probably only care about
Context handling
Whether the user can do something...
What courses has this user access to?
What users can do X in this context?
Modify roles
Advanced - for internal use only
Name conventions
"ctx" means context
accessdata
Access control data is held in the "accessdata" array which - for the logged-in user, will be in $USER->access
For other users can be generated and passed around (but may also be cached against userid in $ACCESSLIB_PRIVATE->accessdatabyuser).
$accessdata is a multidimensional array, holding role assignments (RAs), role-capabilities-perm sets (role defs) and a list of courses we have loaded data for.
Things are keyed on "contextpaths" (the path field of the context table) for fast walking up/down the tree. $accessdata['ra'][$contextpath] = array($roleid=>$roleid) [$contextpath] = array($roleid=>$roleid) [$contextpath] = array($roleid=>$roleid)
Role definitions are stored like this (no cap merge is done - so it's compact)
$accessdata['rdef']["$contextpath:$roleid"]['mod/forum:viewpost'] = 1 ['mod/forum:editallpost'] = -1 ['mod/forum:startdiscussion'] = -1000
See how has_capability_in_accessdata() walks up the tree.
First we only load rdef and ra down to the course level, but not below. This keeps accessdata small and compact. Below-the-course ra/rdef are loaded as needed. We keep track of which courses we have loaded ra/rdef in $accessdata['loaded'] = array($courseid1=>1, $courseid2=>1)
Stale accessdata
For the logged-in user, accessdata is long-lived.
On each pageload we load $ACCESSLIB_PRIVATE->dirtycontexts which lists context paths affected by changes. Any check at-or-below a dirty context will trigger a transparent reload of accessdata.
Changes at the system level will force the reload for everyone.
Default role caps The default role assignment is not in the DB, so we add it manually to accessdata.
This means that functions that work directly off the DB need to ensure that the default role caps are dealt with appropriately.
role
Functions and classes used during installation, upgrades and for admin settings.
ADMIN SETTINGS TREE INTRODUCTION
This file performs the following tasks: -it defines the necessary objects and interfaces to build the Moodle admin hierarchy -it defines the admin_externalpage_setup()
ADMIN_SETTING OBJECTS
Moodle settings are represented by objects that inherit from the admin_setting class. These objects encapsulate how to read a setting, how to write a new value to a setting, and how to appropriately display the HTML to modify the setting.
ADMIN_SETTINGPAGE OBJECTS
The admin_setting objects are then grouped into admin_settingpages. The latter appear in the Moodle admin tree block. All interaction with admin_settingpage objects is handled by the admin/settings.php file.
ADMIN_EXTERNALPAGE OBJECTS
There are some settings in Moodle that are too complex to (efficiently) handle with admin_settingpages. (Consider, for example, user management and displaying lists of users.) In this case, we use the admin_externalpage object. This object places a link to an external PHP file in the admin tree block.
If you're using an admin_externalpage object for some settings, you can take advantage of the admin_externalpage_* functions. For example, suppose you wanted to add a foo.php file into admin. First off, you add the following line to admin/settings/first.php (at the end of the file) or to some other file in admin/settings: $ADMIN->add('userinterface', new admin_externalpage('foo', get_string('foo'), $CFG->wwwdir . '/' . '$CFG->admin . '/foo.php', 'some_role_permission'));
Next, in foo.php, your file structure would resemble the following: require(dirname(dirname(dirname(__FILE__))).'/config.php'); require_once($CFG->libdir.'/adminlib.php'); admin_externalpage_setup('foo'); // functionality like processing form submissions goes here echo $OUTPUT->header(); // your HTML goes here echo $OUTPUT->footer();
The admin_externalpage_setup() function call ensures the user is logged in, and makes sure that they have the proper role permission to access the page. It also configures all $PAGE properties needed for navigation.
ADMIN_CATEGORY OBJECTS
Above and beyond all this, we have admin_category objects. These objects appear as folders in the admin tree block. They contain admin_settingpage's, admin_externalpage's, and other admin_category's.
OTHER NOTES
admin_settingpage's, admin_externalpage's, and admin_category's all inherit from part_of_admin_tree (a pseudointerface). This interface insists that a class has a check_access method for access permissions, a locate method used to find a specific node in the admin tree and find parent path.
admin_category's inherit from parentable_part_of_admin_tree. This pseudo- interface ensures that the class implements a recursive add function which accepts a part_of_admin_tree object and searches for the proper place to put it. parentable_part_of_admin_tree implies part_of_admin_tree.
Please note that the $this->name field of any part_of_admin_tree must be UNIQUE throughout the ENTIRE admin tree.
The $this->name field of an admin_setting object (which is *not* part_of_ admin_tree) must be unique on the respective admin_settingpage where it is used.
Original author: Vincenzo K. Marcovecchio Maintainer: Petr Skoda
admin
Multiple plugin authentication Support library
2006-08-28 File created, AUTH return values defined.
auth
Block Class and Functions
This file defines the block_manager class,
block
Command line utility functions and classes
cli
Contains a class used for tracking whether activities have been completed by students ('completion')
Completion top-level options (admin setting enablecompletion)
completion
This library includes all the necessary stuff to use the one-click download and install feature of Moodle, used to keep updated some items like languages, pear, enviroment... i.e, components.
It has been developed harcoding some important limits that are explained below:
General Usage:
To install one component: require_once($CFG->libdir.'/componentlib.class.php'); if ($cd = new component_installer('http://download.moodle.org', 'langpack/2.0', 'es.zip', 'languages.md5', 'lang')) { $status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED) switch ($status) { case COMPONENT_ERROR: if ($cd->get_error() == 'remotedownloaderror') { $a = new stdClass(); $a->url = 'http://download.moodle.org/langpack/2.0/es.zip'; $a->dest= $CFG->dataroot.'/lang'; print_error($cd->get_error(), 'error', '', $a); } else { print_error($cd->get_error(), 'error'); } break; case COMPONENT_UPTODATE: //Print error string or whatever you want to do break; case COMPONENT_INSTALLED: //Print/do whatever you want break; default: //We shouldn't reach this point } } else { //We shouldn't reach this point }
To switch of component (maintaining the rest of settings): $status = $cd->change_zip_file('en.zip'); //returns boolean false on error
To retrieve all the components in one remote md5 file $components = $cd->get_all_components_md5(); //returns boolean false on error, array instead
To check if current component needs to be updated $status = $cd->need_upgrade(); //returns COMPONENT_(ERROR | UPTODATE | NEEDUPDATE)
To get the 3rd field of the md5 file (optional) $field = $cd->get_extra_md5_field(); //returns string (empty if not exists)
For all the error situations the $cd->get_error() method should return always the key of the error to be retrieved by one standard get_string() call against the error.php lang file.
That's all!
Used for tracking conditions that apply before activities are displayed to students ('conditional availability').
condition
Minimalistic library, usable even when no other moodle libs are loaded.
The only library that gets loaded if you define ABORT_AFTER_CONFIG before including main config.php. You can resume normal script operation if you define ABORT_AFTER_CONFIG_CANCEL and require the setup.php
Cron functions.
admin
This is a one-line short description of the file
You can have a rather longer description of the file as well, if you like, and it can span multiple lines.
lib
This is a one-line short description of the file
This library contains a collection of functions able to perform some custom checks executed by environmental tests (automatically executed on install & upgrade and under petition in the admin block).
Any function in this library must return:
admin
Library of functions for database manipulation.
Other main libraries:
lib
Capability definitions for Moodle core.
The capabilities are loaded into the database table when the module is installed or updated. Whenever the capability definitions are updated, the module version number should be bumped up.
The system has four possible values for a capability: CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
CAPABILITY NAMING CONVENTION
It is important that capability names are unique. The naming convention for capabilities that are specific to modules and blocks is as follows: [mod/block]/<plugin_name>:<capabilityname>
component_name should be the same as the directory name of the mod or block.
Core moodle capabilities are defined thus: moodle/<capabilityclass>:<capabilityname>
Examples: mod/forum:viewpost block/recent_activity:view moodle/site:deleteuser
The variable name for the capability definitions array is $capabilities
role
Definition of core event handler and description of all events throws from core.
event
This file is executed right after the install.xml
admin
Definition of log events
admin
Defines message providers (types of messages being sent)
message
Core external functions and service definitions.
webservice
This file keeps track of upgrades to Moodle.
Sometimes, changes between versions involve alterations to database structures and other major things that may break installations.
The upgrade function in this file will attempt to perform all the necessary actions to upgrade your older installation to the current version.
If there's something it cannot do itself, it will tell you what you need to do.
The commands in here will all be database-neutral, using the methods of database_manager class
Please do not forget to use upgrade_set_timeout() before any action that may take longer time to finish.
admin
Upgrade helper functions
This file is used for special upgrade functions - for example groups and gradebook. These functions must use SQL and database related functions only- no other Moodle API, because it might depend on db structures that are not yet present during upgrade. (Do not use functions from accesslib.php, grades classes or group functions at all!)
admin
Database manager instance is responsible for all database structure modifications.
ddl
MSSQL specific SQL code generator.
ddl
Mysql specific SQL code generator.
ddl
Oracle specific SQL code generator.
ddl
PostgreSQL specific SQL code generator.
ddl
This class represent the base generator class where all the needed functions to generate proper SQL are defined.
The rest of classes will inherit, by default, the same logic. Functions will be overridden as needed to generate correct SQL.
ddl
Experimental SQLite specific SQL code generator.
ddl
This library includes all the required functions used to handle the DB structure (DDL) independently of the underlying RDBMS in use.
This library includes all the required functions used to handle the DB structure (DDL) independently of the underlying RDBMS in use. All the functions rely on the XMLDBDriver classes to be able to generate the correct SQL syntax needed by each DB.
To define any structure to be created we'll use the schema defined by the XMLDB classes, for tables, fields, indexes, keys and other statements instead of direct handling of SQL sentences.
This library should be used, exclusively, by the installation and upgrade process of Moodle.
For further documentation, visit http://docs.moodle.org/en/DDL_functions
ddl
deprecatedlib.php - Old functions retained only for backward compatibility
Old functions retained only for backward compatibility. New code should not use any of these functions.
deprecated
Database column information.
dml
Abstract database driver class.
dml
Abstract recordset.
dml
Generic temptables object store
Provides support to databases lacking some "expected behaviour" related with some operations with temporary tables like:
Basically it works as a simple store of created temporary tables, providing some simple getters/setters methods. Each database can extend it for its own purposes (for example, return correct name, see the mssql implementation)
The unique instance of the object by database connection is shared by the database and the sql_generator, so both are able to use its facilities, with the final goal of doing temporary tables support 100% cross-db and transparent within the DB API.
Only drivers needing it will use this store. Neither moodle_database (abstract) or databases like postgres need this, because they don't lack any temp functionality.
dml
Delegated database transaction support.
dml
Native mssql class representing moodle database interface.
dml
MSSQL specific recordset.
dml
MSSQL specific temptables store. Needed because temporary tables are named differently than normal tables. Also used to be able to retrieve temp table names included in the get_tables() method of the DB.
dml
Native mysqli class representing moodle database interface.
dml
Mysqli specific recordset.
dml
MYSQL specific temptables store. Needed because temporary tables are named differently than normal tables. Also used to be able to retrieve temp table names included in the get_tables() method of the DB.
dml
Native oci class representing moodle database interface.
dml
Oracle specific recordset.
dml
OCI specific temptables store. Needed because temporary tables in Oracle are global (to all sessions), so we need to rename them on the fly in order to get local (different for each session) table names. Also used to be able to retrieve temp table names included in the get_tables() method of the DB.
dml
Experimental pdo database class
dml
Experimental pdo recordset
dml
Native pgsql class representing moodle database interface.
dml
Native postgresql recordset.
dml
PGSQL specific temptables store. Needed because temporary tables are named differently than normal tables. Also used to be able to retrieve temp table names included in the get_tables() method of the DB.
dml
dml
Experimental pdo database class.
dml
Native sqlsrv class representing moodle database interface.
dml
sqlsrv specific recorset.
dml
sqlsrv specific temptables store. Needed because temporary tables are named differently than normal tables. Also used to be able to retrieve temp table names included in the get_tables() method of the DB.
dml
This library contains all the Data Manipulation Language (DML) functions used to interact with the DB
This library contains all the Data Manipulation Language (DML) functions used to interact with the DB. All the dunctions in this library must be generic and work against the major number of RDBMS possible. This is the list of currently supported and tested DBs: mysql, postresql, mssql, oracle
This library is automatically included by Moodle core so you never need to include it yourself.
For more info about the functions available in this library, please visit: http://docs.moodle.org/en/DML_functions (feel free to modify, improve and document such page, thanks!)
dml
General database export class
dtl
General database importer class
dtl
General database mover class
dtl
XML format exporter class to file storage
dtl
XML format importer class from file storage
dtl
XML format exporter class to memory storage
dtl
XML format importer class from memory storage
dtl
XML format exporter class
dtl
XML format importer class
dtl
DTL == Database Transfer Library
This library includes all the required functions used to handle transfer of data from one database to another.
dtl
This class abstracts eaccelerator/turckmmcache API to provide
Note: do NOT store booleans here. For compatibility with memcached, a false value is indistinguisable from a "not found in cache" response.
lib
Utility classes and functions for text editor integration.
editor
This library includes the basic parts of enrol api. It is available on each page.
enrol
This library includes all the necessary stuff to execute some standard tests of required versions and libraries to run Moodle. It can be used from the admin interface, and both at install and upgrade.
All the info is stored in the admin/environment.xml file, supporting to have an updated version in dataroot/environment
admin
Library of functions for events manipulation.
The public API is all at the end of this file.
event
lib
Support for external API
webservice
Utility class for browsing of files.
filebrowser
This class provides the main entry point for other code wishing to get information about files.
The whole file storage for a Moodle site can be seen as a huge virtual tree. The spine of the tree is the tree of contexts (system, course-categories, courses, modules, also users). Then, within each context, there may be any number of file areas, and a file area contains folders and files. The various file_info subclasses return info about the things in this tree. They should be obtained from an instance of this class.
This virtual tree is different for each user depending of his/her current permissions. Some branches such as draft areas are hidden, but accessible.
Always use this abstraction when you need to access module files from core code.
filebrowser
Base for all file browsing classes.
filebrowser
Base class for things in the tree navigated by
filebrowser
Utility class for browsing of course files.
filebrowser
Represents a course context in the tree navigated by
filebrowser
Subclass of file_info_stored for files in the course files area.
filebrowser
Represents a course category context in the tree navigated by
filebrowser
Implementation of course section backup area
filebrowser
Utility class for browsing of curse category files.
filebrowser
Utility class for browsing of module files.
filebrowser
Represents a module context in the tree navigated by
filebrowser
Utility class for browsing of system files.
filebrowser
Represents the system context in the tree navigated by
filebrowser
Utility class for browsing of user files.
filebrowser
Represents a user context in the tree navigated by
filebrowser
Utility class for browsing of stored files.
filebrowser
Represents an actual file or folder - a row in the file table - in the tree navigated by
filebrowser
Class simulating empty directories.
filebrowser
Represents the root directory of an empty file area in the tree navigated by
filebrowser
Functions for file handling.
file
RESTful cURL class
This is a wrapper class for curl, it is quite easy to use: $c = new curl; // enable cache $c = new curl(array('cache'=>true)); // enable cookie $c = new curl(array('cookie'=>true)); // enable proxy $c = new curl(array('proxy'=>true));
// HTTP GET Method $html = $c->get('http://example.com'); // HTTP POST Method $html = $c->post('http://example.com/', array('q'=>'words', 'name'=>'moodle')); // HTTP PUT Method $html = $c->put('http://example.com/', array('file'=>'/var/www/test.txt');
file
This class is used by cURL class, use case:
$CFG->repositorycacheexpire = 120; $CFG->curlcache = 120;
$c = new curl(array('cache'=>true), 'module_cache'=>'repository'); $ret = $c->get('http://www.google.com');
file
This class is used to parse lib/file/file_types.mm which help get file extensions by file types. The file_types.mm file can be edited by freemind in graphic environment.
file
This function delegates file serving to individual plugins
| string | $relativepath | |
| bool | $forcedownload |
file
Abstraction of general file archives.
filestorage
Each file archive type must extend this class.
filestorage
File handling related exceptions.
filestorage
Basic file related exception class
filestorage
Can not create file exception
filestorage
No file access exception.
filestorage
Hash file content problem exception.
filestorage
Abstraction of general file packer.
filestorage
Abstract class for archiving of files.
filestorage
Core file storage class definition.
filestorage
Definition of a class stored_file.
filestorage
Implementation of zip file archive.
filestorage
zip file archive class.
filestorage
Implementation of zip packer.
filestorage
Utility class - handles all zipping and unzipping operations.
filestorage
Library functions for managing text filter plugins.
filter
Class to manage the filtering of strings. It is intended that this class is only used by weblib.php. Client code should probably be using the format_text and format_string functions.
This class is a singleton.
filter
Filter manager subclass that does nothing. Having this simplifies the logic of format_text, etc.
filter
Filter manager subclass that tacks how much work it does.
filter
Base class for text filters. You just need to override this class and implement the filter method.
filter
moodle_text_filter implementation that encapsulates an old-style filter that only defines a function, not a class.
will be out in 2.3, see MDL-29996
filter
This is just a little object to define a phrase and some instructions for how to process it. Filters can create an array of these to pass to the filter_phrases function below.
filter
formslib.php - library of classes for creating forms in Moodle, based on PEAR QuickForms.
To use formslib then you will want to create a new file purpose_form.php eg. edit_form.php and you want to name your class something like {modulename}_{purpose}_form. Your class will extend moodleform overriding abstract classes definition and optionally defintion_after_data and validation.
See examples of use of this library in course/edit.php and course/edit_form.php
A few notes : 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.
form
gdlib.php - Collection of routines in Moodle related to processing images using GD
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
lib
Simple implementation of some Google API functions for Moodle.
Definitions of constants for gradebook
grade
Definitions of constants for gradebook
grade
Definitions of grade grade class
grade
Definitions of grade item class
grade
Definitions of grade object class
grade
Definitions of grade outcome class
grade
Definitions of grade scale class
grade
Library of functions for gradebook - both public and internal
grade
Graph Class. PHP Class to draw line, point, bar, and area graphs, including numeric x-axis and double y-axis. Version: 1.6.3 Copyright (C) 2000 Herman Veluwenkamp
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copy of GNU Lesser General Public License at: http://www.gnu.org/copyleft/lesser.txt Contact author at: hermanV@mindless.com
lib
group
Functions to support installation process
install
This file is serving optimised JS
lib
ldaplib.php - LDAP functions & data library
Library file of miscellaneous general-purpose LDAP functions and data structures, useful for both ldap authentication (or ldap based authentication like CAS) and enrolment plugins.
lib
A namespace contains license specific functions
lib
Classes for displaying and editing a nested list of items.
Handles functionality for :
Construction of nested list from db records with some key pointing to a parent id. Display of list with or without editing icons with optional pagination. Reordering of items works across pages. Processing of editing actions on list.
lib
lib
lib
messagelib.php - Contains generic messaging functions for the message system
message
modinfolib.php - Functions/classes relating to cached information about module instances on a course.
lib http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
moodlelib.php - Moodle main library
Main library file of miscellaneous general-purpose Moodle functions. Other main libraries:
lib
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
navigation
Major Contributors:
lib
Classes representing JS event handlers, used by output components.
Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML for an overview.
lib
Classes representing HTML elements, used by $OUTPUT methods
Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML for an overview.
lib
Interface and classes for creating appropriate renderers for various parts of Moodle.
Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML for an overview.
lib
Functions for generating the HTML that Moodle should output.
Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML for an overview.
lib
Classes for rendering HTML output for Moodle.
Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML for an overview.
lib
Library functions to facilitate the use of JavaScript in Moodle.
lib
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 repository of information about the page we are building up to send back to the user.
lib
lib
lib
lib
Defines classes used for plugins management
This library provides a unified interface to various plugin types in Moodle. It is mainly used by the plugins management admin page and the plugins check page during the upgrade.
admin
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains the base classes for places in moodle that want to add export functionality to subclass from. See http://docs.moodle.org/dev/Adding_a_Portfolio_Button_to_a_page
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains all the defined constants to do with portfolios.
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains all the portfolio exception classes.
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains the class definition for the exporter object.
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains the LEAP2a writer used by portfolio_format_leap2a
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains all the class definitions of the export formats. They are implemented in php classes rather than just a simpler hash Because it provides an easy way to do subtyping using php inheritance.
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains all the form definitions used by the portfolio code.
Moodle - Modular Object-Oriented Dynamic Learning Environment http://moodle.org Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
portfolio
This file contains the base classes for portfolio plugins to inherit from: portfolio_plugin_pull_base and portfolio_plugin_push_base which both in turn inherit from portfolio_plugin_base. See http://docs.moodle.org/dev/Writing_a_Portfolio_Plugin
This file contains all global functions to do with manipulating portfolios everything else that is logically namespaced by class is in its own file in lib/portfolio/ directory.
Major Contributors
portfolio
Recourse module like helper functions
lib
This file contains all the common stuff to be used in RSS System
rss
search
session
Moodle session abstraction
session
Fallback session handler when standard session init fails. This prevents repeated attempts to init faulty handler.
session
Class handling all session and cookies related stuff.
session
Legacy moodle sessions stored in files, not recommended any more.
session
Recommended moodle session storage.
session
setup.php - Sets up sessions, connects to databases and so on
Normally this is only called by the main config.php file Normally this file does not need to be edited.
lib
These functions are required very early in the Moodle setup process, before any of the main libraries are loaded.
lib
Simple class. It is usually used instead of stdClass because it looks more familiar to Java developers ;-) Do not use for type checking of function parameters. Please use stdClass instead.
lib
Base Moodle Exception class
Although this class is defined here, you cannot throw a moodle_exception until after moodlelib.php has been included (which will happen very soon).
lib
Course/activity access exception.
This exception is thrown from require_login()
lib
Exceptions indicating user does not have permissions to do something and the execution can not continue.
lib
Exception indicating programming error, must be fixed by a programer. For example a core API might throw this type of exception if a plugin calls it incorrectly.
lib
Exception indicating malformed parameter problem. This exception is not supposed to be thrown when processing user submitted data in forms. It is more suitable for WS and other low level stuff.
lib
An exception that indicates something really weird happened. For example, if you do switch ($context->contextlevel), and have one case for each CONTEXT_... constant. You might throw an invalid_state_exception in the default case, to just in case something really weird is going on, and $context->contextlevel is invalid - rather than ignoring this possibility.
lib
An exception that indicates incorrect permissions in $CFG->dataroot
lib
An exception that indicates that file can not be served
lib
Test event handler definition used only from unit tests.
event
Full functional accesslib test
It is implemented as one test case because it would take hours to prepare the fake test site for each test, at the same time we have to work around multiple problems in UnitTestCaseUsingDatabase.
Tests events subsystems
event
Tests our HTMLPurifier hacks
lib
Unit tests for lib/outputcomponents.php.
Unit tests for the HTMLPurifier integration
simpletest
Functions to support installation process
lib
Unit tests for our utf-8 aware text processing
lib
Unit tests for our utf-8 aware collator.
Used for sorting.
lib
Simple class used to work with the unit test.
lib
Web services wrapper library script
Since Moodle 2.0 we rely only on native PHP Soap extension, the original name of this file was lib/soap/phpsoap.php
lib
stats
lib
lib
This class is used to manipulate strings under Moodle 1.6 an later. As utf-8 text become mandatory a pool of safe functions under this encoding become necessary. The name of the methods is exactly the same than their PHP originals.
A big part of this class acts as a wrapper over the Typo3 charset library, really a cool group of utilities to handle texts and encoding conversion.
Take a look to its own copyright and license details.
IMPORTANT Note: Typo3 libraries always expect lowercase charsets to use 100% its capabilities so, don't forget to make the conversion from every wrapper function!
lib
A collator class with static methods that can be used for sorting.
lib
Abstract class to aid the sorting of objects with respect to proper language comparison using collator
lib
A comparison helper for comparing properties of two objects
lib
A comparison helper for comparing the result of a method on two objects
lib
Various upgrade/install related functions and classes.
upgrade
Exception indicating unknown error during upgrade.
upgrade
Exception indicating downgrade error during upgrade.
upgrade
upgrade
uploadlib.php - This class handles all aspects of fileuploading
file
Library of functions for web output
Library of all general-purpose Moodle PHP functions and constants that produce HTML output
Other main libraries:
lib
Utility function to convert wiki-like to Markdown format
lib
profiling
xmlize.php - xmlize() is by Hans Anderson, http://www.hansanderson.com/contact/
Ye Ole "Feel Free To Use it However" License [PHP, BSD, GPL]. some code in xml_depth is based on code written by other PHPers as well as one Perl script. Poor programming practice and organization on my part is to blame for the credit these people aren't receiving. None of the code was copyrighted, though.
lib
Change password page.
auth
Change password form definition.
auth
Confirm self registered user.
auth
Forgot password routine.
Finds the user and calls the appropriate routine for their authentication type.
auth
Reset forgotten password form definition.
auth
Main login page.
auth
Logs the user out and sends them to the home page
auth
Magic that deals restored users without passwords.
auth
user signup page.
auth
User sign-up form.
auth
This script delegates file serving to individual plugins
file
A page to display a list of ratings for a given item (forum post etc)
rating
A class representing a single rating and containing some static methods for manipulating ratings
rating
This page receives non-ajax rating submissions
It is similar to rate_ajax.php. Unlike rate_ajax.php a return url is required.
rating
This page receives ajax rating submissions
It is similar to rate.php. Unlike rate.php a return url is NOT required.
rating
Draft file ajax file manager
repository
This file is used to manage draft files in non-javascript browsers
repository
This file is used to browse repositories in non-javascript mode
repository
This file contains classes used to manage the repository plugins in Moodle and was introduced as part of the changes occuring in Moodle 2.0
repository
This file is used to manage repositories
repository
The Web service script that is called from the filepicker front end
repository
Repository instance callback script
repository
tag
Moodle tag library
Tag strings : you can use any character in tags, except the comma (which is the separator) and the '\' (backslash). Note that many spaces (or other blank characters) will get "compressed" into one. A tag string is always a rawurlencode'd string. This is the same behavior as http://del.icio.us.
A "record" is a php array (note that an object will work too) that contains the following variables :
TODO: turn this into a full-fledged categorization system. This could start by modifying (removing, probably) the 'tag type' to use another table describing the relationship between tags (parents, sibling, etc.), which could then be merged with the 'course categorization' system...
BASIC INSTRUCTIONS :
Tag set will create tags that need to be created.
tag
BC user image location
file
BC group image location
file
MOODLE VERSION INFORMATION
This file defines the current version of the core Moodle code being used. This is compared against the values stored in the database to determine whether upgrades should be performed (see lib/db/*.php)
external API for mobile web services
webservice
A script to serve files from web service client
file