Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Topics | |
admin | |
analytics | |
cache | |
check | |
comment | |
csv | |
dml | |
event | |
external | |
files | |
lock | |
log | |
message | |
navigation | |
output | |
page | |
phpunit | |
preference | |
privacy | |
string | |
table | |
task | |
test | |
upgrade | |
Directories | |
directory | analytics |
| |
directory | analytics |
| |
directory | analytics |
| |
directory | content |
| |
directory | dataformat |
| |
directory | favourites |
| |
directory | local |
| |
directory | local |
| |
directory | media |
| |
directory | mod |
| |
directory | navigation |
| |
directory | output |
| |
directory | privacy |
| |
directory | reportbuilder |
| |
directory | reportbuilder |
| |
directory | reportbuilder |
| |
directory | reportbuilder |
| |
Namespaces | |
namespace | core |
| |
namespace | core\access |
Helper functions to implement the complex get_user_capability_course function. | |
namespace | core\analytics\analyser |
Courses analyser working at course level (insights for the course teachers). | |
namespace | core\analytics\indicator |
Any access after the official end of the course. | |
namespace | core\analytics\time_splitting |
10 parts time splitting method. | |
namespace | core\check\performance |
Backups check. | |
namespace | core\content\export |
| |
namespace | core\content\export\exportable_items |
| |
namespace | core\content\export\exporters |
Activity module exporter for the content API. | |
namespace | core\dataformat |
Base class for dataformat. | |
namespace | core\event |
| |
namespace | core\external |
Class for exporting summary information for a course category. | |
namespace | core\files |
Contains a class providing functions used to check the allowed/blocked host/ports for curl. | |
namespace | core\form |
Moodle 404 Error page feedback form. | |
namespace | core\hook |
| |
namespace | core\hook\navigation |
| |
namespace | core\hub |
Class communication. | |
namespace | core\local\cli |
CLI script shutdown helper class. | |
namespace | core\local\guzzle |
| |
namespace | core\lock |
| |
namespace | core\log |
Dummy storage manager, returns nothing. | |
namespace | core\moodlenet |
| |
namespace | core\oauth2 |
Loads/stores oauth2 access tokens in DB for system accounts in order to use a single token across multiple sessions. | |
namespace | core\oauth2\client |
| |
namespace | core\oauth2\discovery |
| |
namespace | core\oauth2\service |
| |
namespace | core\output |
| |
namespace | core\output\dynamic_tabs |
| |
namespace | core\plugininfo |
Defines classes used for plugin info. | |
namespace | core\progress |
| |
namespace | core\reportbuilder\local\entities |
| |
namespace | core\session |
Database based session handler. | |
namespace | core\session\utility |
| |
namespace | core\task |
Adhoc task abstract class. | |
namespace | core\update |
The class core\update\api is defined here. | |
namespace | core\upgrade |
PayPal enrolment plugin utility class. | |
namespace | core_admin\form |
Form for selective purging of caches. | |
namespace | core_admin\local\settings |
Auto complete admin setting. | |
namespace | core_badges |
Communicate with backpacks. | |
namespace | core_badges\form |
Form class for mybackpack.php. | |
namespace | core_badges\output |
Issued badge renderable. | |
namespace | core_course\analytics\indicator |
Activities due indicator. | |
namespace | core_course\cache |
| |
namespace | core_course\local\entity |
Activity Chooser footer data class. | |
namespace | core_course\local\exporters |
Contains the course_content_item_exporter class. | |
namespace | core_course\local\repository |
Contains class caching_content_item_repository, for fetching content_items, with additional caching. | |
namespace | core_course\local\service |
Contains the content_item_service class. | |
namespace | core_course\output |
| |
namespace | core_h5p\event |
H5P deleted event class. | |
namespace | core_question\statistics\questions |
A collection of all the question statistics calculated for an activity instance ie. | |
namespace | core_user |
| |
namespace | core_user\analytics\target |
Upcoming activities due target. | |
namespace | core_user\external |
| |
namespace | mod_quiz\event |
The mod_quiz attempt abandoned event. | |
namespace | Moodle\BehatExtension\Context |
| |
namespace | Moodle\BehatExtension\Context\ContextClass |
| |
namespace | Moodle\BehatExtension\Context\Initializer |
| |
namespace | Moodle\BehatExtension\Context\Step |
| |
namespace | Moodle\BehatExtension\Definition\Cli |
| |
namespace | Moodle\BehatExtension\Definition\Printer |
| |
namespace | Moodle\BehatExtension\Driver |
| |
namespace | Moodle\BehatExtension\EventDispatcher\Tester |
| |
namespace | Moodle\BehatExtension\Exception |
| |
namespace | Moodle\BehatExtension\Output\Formatter |
| |
namespace | Moodle\BehatExtension\Output\Printer |
| |
namespace | Moodle\BehatExtension\ServiceContainer |
| |
Classes | |
class | alignment_form |
Form to edit alignment. More... | |
class | async_helper |
Helper functions for asynchronous backups and restores. More... | |
class | auth_plugin_base |
Abstract authentication plugin. More... | |
class | award_criteria |
Award criteria abstract definition. More... | |
class | award_criteria_activity |
Badge award criteria – award on activity completion. More... | |
class | award_criteria_badge |
Badge award criteria – award on badge completion. More... | |
class | award_criteria_cohort |
Badge award criteria – award on cohort membership. More... | |
class | award_criteria_competency |
Badge award criteria – award on competency completion. More... | |
class | award_criteria_course |
Badge award criteria – award on course completion. More... | |
class | award_criteria_courseset |
Badge award criteria – award on courseset completion. More... | |
class | award_criteria_manual |
Manual badge award criteria. More... | |
class | award_criteria_overall |
Overall badge award criteria. More... | |
class | award_criteria_profile |
Profile completion badge award criteria. More... | |
class | backup_cron_automated_helper |
This class is an abstract class with methods that can be called to aid the running of automated backups over cron. More... | |
class | badge_award_selector_base |
class | badge_existing_users_selector |
A user selector control for existing users to award badge. More... | |
class | badge_potential_users_selector |
A user selector control for potential users to award badge. More... | |
class | badges_preferences_form |
class | base_converter |
Base converter class. More... | |
class | behat_config_util |
Behat configuration manager. More... | |
class | block_manager |
This class keeps track of the block that should appear on a moodle_page. More... | |
class | block_not_on_page_exception |
Exception thrown when someone tried to do something with a block that does not exist on a page. More... | |
class | bootstrap_renderer |
This class solves the problem of how to initialise $OUTPUT. More... | |
class | cached_cm_info |
Class that is the return value for the _get_coursemodule_info module API function. More... | |
class | calc_formula |
This class abstracts evaluation of spreadsheet formulas. More... | |
class | cm_info |
Data about a single module on a course. More... | |
class | coding_exception |
Exception indicating programming error, must be fixed by a programer. More... | |
class | combined_progress_trace |
Special type of trace that can be used for redirecting to multiple other traces. More... | |
class | component_installer |
This class is used to check, download and install items from download.moodle.org to the moodledata directory. More... | |
class | convert_exception |
General convert-related exception. More... | |
class | convert_factory |
Factory class to create new instances of backup converters. More... | |
class | convert_helper |
Provides various functionality via its static methods. More... | |
class | convert_helper_exception |
General convert_helper related exception. More... | |
class | core\access\get_user_capability_course_helper |
Helper functions to implement the complex get_user_capability_course function. More... | |
class | core\activity_dates |
Class for fetching the important dates of an activity module for a given module instance and a user. More... | |
class | core\analytics\analyser\courses |
Courses analyser working at course level (insights for the course teachers). More... | |
class | core\analytics\analyser\site_courses |
Site courses analyser working at system level (insights for the site admin). More... | |
class | core\analytics\analyser\student_enrolments |
Student enrolments analyser. More... | |
class | core\analytics\analyser\users |
Users analyser (insights for users). More... | |
class | core\analytics\indicator\any_access_after_end |
Any access after the official end of the course. More... | |
class | core\analytics\indicator\any_access_before_start |
Any access before the official start of the course. More... | |
class | core\analytics\indicator\any_course_access |
Any access indicator. More... | |
class | core\analytics\indicator\any_write_action |
Write actions indicator. More... | |
class | core\analytics\indicator\any_write_action_in_course |
Write actions in a course indicator. More... | |
class | core\analytics\indicator\read_actions |
Read actions indicator. More... | |
class | core\analytics\time_splitting\deciles |
10 parts time splitting method. More... | |
class | core\analytics\time_splitting\deciles_accum |
Range processor splitting the course in ten parts and accumulating data. More... | |
class | core\analytics\time_splitting\no_splitting |
No time splitting method. More... | |
class | core\analytics\time_splitting\quarters |
Quarters time splitting method. More... | |
class | core\analytics\time_splitting\quarters_accum |
Range processor splitting the course in quarters and accumulating data. More... | |
class | core\analytics\time_splitting\single_range |
Single time splitting method. More... | |
class | core\chart_axis |
Chart axis class. More... | |
class | core\chart_bar |
Chart bar class. More... | |
class | core\chart_base |
Chart base class. More... | |
class | core\chart_line |
Chart line class. More... | |
class | core\chart_pie |
Chart pie class. More... | |
class | core\chart_series |
Chart series class. More... | |
class | core\check\performance\debugging |
Debugging check. More... | |
class | core\content\export\exportable_item |
An object used to represent content which can be served. More... | |
class | core\content\export\exportable_items\exportable_filearea |
The definition of a set of files in a filearea to be exported. More... | |
class | core\content\export\exportable_items\exportable_stored_file |
An object used to represent content which can be served. More... | |
class | core\content\export\exportable_items\exportable_textarea |
The definition of a text area which can be exported. More... | |
class | core\content\export\exported_item |
This class describes the files which were exported, and any text content that those files were contained in. More... | |
class | core\content\export\exporters\abstract_mod_exporter |
Activity module exporter for the content API. More... | |
class | core\content\export\exporters\component_exporter |
A class to help define, describe, and export content in a specific context. More... | |
class | core\content\export\exporters\course_exporter |
The course exporter. More... | |
class | core\content\export\zipwriter |
Zip writer wrapper. More... | |
class | core\cron |
Cron and adhoc task functionality. More... | |
class | core\dataformat |
Dataformat utility class. More... | |
class | core\dataformat\base |
Base class for dataformat. More... | |
class | core\dataformat\spout_base |
Common Spout class for dataformat. More... | |
class | core\encryption |
Class used to encrypt or decrypt data. More... | |
class | core\event\antivirus_scan_data_error |
Antivirus scan data error event. More... | |
class | core\event\antivirus_scan_file_error |
Antivirus scan file error event. More... | |
class | core\event\assessable_submitted |
Abstract assessable submitted event class. More... | |
class | core\event\assessable_uploaded |
Abstract assessable uploaded event class. More... | |
class | core\event\badge_awarded |
Event triggered after a badge is awarded to a user. More... | |
class | core\event\badge_criteria_created |
Event triggered after criteria is created for a badge. More... | |
class | core\event\badge_criteria_deleted |
Event triggered after criteria is deleted from a badge. More... | |
class | core\event\badge_criteria_updated |
Event triggered after criteria is updated to a badge. More... | |
class | core\event\badge_deleted |
Event triggered after a badge is deleted. More... | |
class | core\event\badge_listing_viewed |
Event triggered after a badge is viewed. More... | |
class | core\event\badge_revoked |
Event triggered after a badge is revoked from a user. More... | |
class | core\event\base |
Base event class. More... | |
class | core\event\blog_association_deleted |
Class for event to be triggered when a new blog entry is deleted with a context. More... | |
class | core\event\blog_comment_created |
The blog comment created event class. More... | |
class | core\event\blog_comment_deleted |
The blog comment deleted event class. More... | |
class | core\event\blog_entries_viewed |
Class for event to be triggered when blog entries are viewed. More... | |
class | core\event\blog_external_removed |
Class for event to be triggered when an external blog is removed from moodle. More... | |
class | core\event\blog_external_viewed |
Class for event to be triggered when an external blog is viewed to moodle. More... | |
class | core\event\calendar_subscription_created |
Event triggered after a calendar subscription is added. More... | |
class | core\event\calendar_subscription_deleted |
Event triggered after a calendar subscription is deleted. More... | |
class | core\event\calendar_subscription_updated |
Event triggered after a calendar subscription is updated. More... | |
class | core\event\capability_assigned |
Capability assigned event class. More... | |
class | core\event\capability_unassigned |
Capability unassigned event class. More... | |
class | core\event\cohort_created |
Cohort created event class. More... | |
class | core\event\cohort_deleted |
Cohort deleted event class. More... | |
class | core\event\cohort_updated |
Cohort updated event class. More... | |
class | core\event\comments_viewed |
Abstract comments viewed event class. More... | |
class | core\event\config_log_created |
Event class for when an admin config log is created. More... | |
class | core\event\contentbank_content_created |
Content bank content created class. More... | |
class | core\event\contentbank_content_deleted |
Content bank content deleted class. More... | |
class | core\event\contentbank_content_updated |
Content bank content updated class. More... | |
class | core\event\contentbank_content_uploaded |
Content bank content uploaded class. More... | |
class | core\event\contentbank_content_viewed |
Content bank content updated class. More... | |
class | core\event\course_backup_created |
Course backup created event class. More... | |
class | core\event\course_category_created |
Course category created event class. More... | |
class | core\event\course_category_updated |
Course category updated event class. More... | |
class | core\event\course_category_viewed |
Course category viewed event class. More... | |
class | core\event\course_completed |
Course completed event class. More... | |
class | core\event\course_completion_updated |
Course module completion updated event class. More... | |
class | core\event\course_information_viewed |
Course information viewed event class. More... | |
class | core\event\course_module_deleted |
Class course_module_deleted. More... | |
class | core\event\course_module_instance_list_viewed |
Course module instance list viewed event class. More... | |
class | core\event\course_module_instances_list_viewed |
This class has been deprecated, please use core\event\course_module_instance_list_viewed. More... | |
class | core\event\course_module_viewed |
Abstract Course module viewed event class. More... | |
class | core\event\course_resources_list_viewed |
Event for viewing the list of course resources. More... | |
class | core\event\course_section_deleted |
Course section deleted event class. More... | |
class | core\event\course_updated |
Course updated event class. More... | |
class | core\event\course_user_report_viewed |
Course user report viewed event class. More... | |
class | core\event\course_viewed |
Course viewed event class. More... | |
class | core\event\dashboard_reset |
Dashboard reset event class. More... | |
class | core\event\dashboard_viewed |
Dashboard viewed event class. More... | |
class | core\event\dashboards_reset |
Dashboards reset event class. More... | |
class | core\event\database_text_field_content_replaced |
The database text field content replaced event class. More... | |
class | core\event\grade_exported |
Abstract grade report exported event class. More... | |
class | core\event\grade_item_deleted |
Grade item deleted event class. More... | |
class | core\event\grade_item_updated |
Grade item updated event class. More... | |
class | core\event\grade_letter_created |
Grade letter created event class. More... | |
class | core\event\grade_letter_deleted |
Grade letter deleted event class. More... | |
class | core\event\grade_letter_updated |
Grade letter updated event class. More... | |
class | core\event\grade_report_viewed |
Grade report viewed event class. More... | |
class | core\event\group_created |
Group created event class. More... | |
class | core\event\group_deleted |
Group deleted event class. More... | |
class | core\event\group_message_sent |
Group message sent event class. More... | |
class | core\event\grouping_deleted |
Grouping deleted event class. More... | |
class | core\event\grouping_group_assigned |
Group assigned to grouping event class. More... | |
class | core\event\grouping_group_unassigned |
Group unassigned from grouping event class. More... | |
class | core\event\grouping_updated |
Grouping updated event class. More... | |
class | core\event\manager |
New event manager class. More... | |
class | core\event\message_deleted |
Message deleted event class. More... | |
class | core\event\message_sent |
Message sent event class. More... | |
class | core\event\message_viewed |
Message viewed event class. More... | |
class | core\event\moodlenet_resource_exported |
MoodleNet send attempt event. More... | |
class | core\event\mycourses_viewed |
My courses viewed event class. More... | |
class | core\event\notes_viewed |
Class note_viewed. More... | |
class | core\event\notification_sent |
Notification sent event class. More... | |
class | core\event\qbank_plugin_base |
Question bank plugin event. More... | |
class | core\event\qbank_plugin_disabled |
Question bank plugin was disabled. More... | |
class | core\event\qbank_plugin_enabled |
Question bank plugin was enabled. More... | |
class | core\event\question_base |
Base class for question events. More... | |
class | core\event\question_category_base |
Base class for question category events. More... | |
class | core\event\question_category_created |
Question category created event class. More... | |
class | core\event\question_category_deleted |
Question category deleted event class. More... | |
class | core\event\question_category_moved |
Question category moved event class. More... | |
class | core\event\question_category_updated |
Question category updated event class. More... | |
class | core\event\question_category_viewed |
Question category viewed event class. More... | |
class | core\event\question_created |
Question created event class. More... | |
class | core\event\question_deleted |
Question deleted event class. More... | |
class | core\event\question_moved |
Question moved event class. More... | |
class | core\event\question_updated |
Question updated event class. More... | |
class | core\event\question_viewed |
Question previewed event class. More... | |
class | core\event\questions_exported |
Question category exported event class. More... | |
class | core\event\questions_imported |
Question category imported event class. More... | |
class | core\event\recent_activity_viewed |
Event for recent activity page. More... | |
class | core\event\role_allow_assign_updated |
Role assignments updated event class. More... | |
class | core\event\role_allow_override_updated |
Role allow override updated event class. More... | |
class | core\event\role_allow_switch_updated |
Role allow switch updated event class. More... | |
class | core\event\role_allow_view_updated |
Role allow view updated event class. More... | |
class | core\event\role_capabilities_updated |
Role updated event class. More... | |
class | core\event\scale_created |
Scale created event class. More... | |
class | core\event\scale_deleted |
Scale deleted event class. More... | |
class | core\event\scale_updated |
Scale updated event class. More... | |
class | core\event\search_indexed |
Event when new data has been indexed. More... | |
class | core\event\search_results_viewed |
Search results viewed. More... | |
class | core\event\tag_collection_created |
Tag collection created event class. More... | |
class | core\event\tag_collection_deleted |
Tag collection deleted event class. More... | |
class | core\event\tag_collection_updated |
Tag collection updated event class. More... | |
class | core\event\tag_created |
Tag created event class. More... | |
class | core\event\tag_deleted |
Tag deleted event class. More... | |
class | core\event\tag_flagged |
Tag flagged event class. More... | |
class | core\event\tag_unflagged |
Tag unflagged event. More... | |
class | core\event\tag_updated |
Tag updated event. More... | |
class | core\event\unknown_logged |
Unknown event class. More... | |
class | core\event\url_blocked |
URL blocked event class. More... | |
class | core\event\user_deleted |
User deleted event class. More... | |
class | core\event\user_enrolment_created |
Event class for when user is enrolled in a course. More... | |
class | core\event\user_enrolment_updated |
Event class for when user enrolment is updated. More... | |
class | core\event\user_graded |
Event triggered after teacher edits manual grade or overrides activity/aggregated grade. More... | |
class | core\event\user_list_viewed |
Defines the user list viewed event. More... | |
class | core\event\user_loggedout |
Event when user logout. More... | |
class | core\event\user_login_failed |
User login failed event class. More... | |
class | core\event\user_password_policy_failed |
Event when user's current password fails the password policy. More... | |
class | core\event\user_password_updated |
Event when user password is changed or reset. More... | |
class | core\event\userfeedback_give |
Class userfeedback_give. More... | |
class | core\event\userfeedback_remind |
Class userfeedback_remind. More... | |
class | core\event\virus_infected_data_detected |
Data infected event. More... | |
class | core\event\virus_infected_file_detected |
Fle infected event. More... | |
class | core\event\webservice_service_created |
Web service service created event class. More... | |
class | core\event\webservice_service_deleted |
Web service service deleted event class. More... | |
class | core\event\webservice_service_updated |
Web service service updated event class. More... | |
class | core\event\webservice_token_created |
Web service token created event class. More... | |
class | core\event\webservice_token_sent |
Webservice token sent event class. More... | |
class | core\external\coursecat_summary_exporter |
Class for exporting a course summary from an stdClass. More... | |
class | core\external\dynamic_tabs_get_content |
External method for getting tab contents. More... | |
class | core\external\editmode |
Web service to change the edit mode. More... | |
class | core\external\moodlenet_auth_check |
The external API to check whether a user has authorized for a given MoodleNet OAuth 2 issuer. More... | |
class | core\external\moodlenet_get_share_info_activity |
The external API to het the activity information for MoodleNet sharing. More... | |
class | core\external\moodlenet_get_shared_course_info |
The external API to get MoodleNet information about the course to be shared. More... | |
class | core\external\moodlenet_send_activity |
The external API to send activity to MoodleNet. More... | |
class | core\external\moodlenet_send_course |
The external API to send course to MoodleNet. More... | |
class | core\external\paged_content_exporter |
Paged Content exporter. More... | |
class | core\external\persistent_exporter |
Abstract exporter based on the persistent model. More... | |
class | core\external\record_userfeedback_action |
The external API to record users action on the feedback notification. More... | |
class | core\files\curl_security_helper |
Host and port checking for curl. More... | |
class | core\files\curl_security_helper_base |
Security helper for the curl class. More... | |
class | core\form\error_feedback |
Moodle 404 Error page feedback form. More... | |
interface | core\hook\deprecated_callback_replacement |
Interface for describing of lib.php callbacks that were deprecated by the hook. More... | |
interface | core\hook\described_hook |
Interface for a hook to provide a description of itself for administrator information. More... | |
interface | core\hook\discovery_agent |
This interface describes a class which can discover all hook classes of a plugin. More... | |
class | core\hook\manager |
Hook manager implementing "Dispatcher" and "Event Provider" from PSR-14. More... | |
class | core\hook\navigation\primary_extend |
Allows plugins to insert nodes into site primary navigation. More... | |
class | core\hooks |
Standard hook discovery agent for Moodle which lists all non-abstract classes in hooks namespace of core and all plugins unless there is a hook discovery agent in a plugin. More... | |
class | core\http_client |
Guzzle Integration for Moodle. More... | |
class | core\hub\api |
Provides methods to communicate with the hub (sites directory) web services. More... | |
class | core\hub\registration |
Methods to use when registering the site at the moodle sites directory. More... | |
class | core\hub\site_registration_form |
The site registration form. More... | |
class | core\invalid_persistent_exception |
Invalid persistent exception class. More... | |
class | core\ip_utils |
Static helper class providing some useful internet-protocol-related functions. More... | |
class | core\local\cli\shutdown |
CLI script shutdown helper class. More... | |
class | core\local\guzzle\cache_handler |
Class to handle and generates CacheItemPoolInterface objects. More... | |
class | core\local\guzzle\cache_item |
Class to define an interface for interacting with objects inside a cache. More... | |
class | core\local\guzzle\cache_storage |
Cache storage handler to handle cache objects, TTL etc. More... | |
class | core\local\guzzle\check_request |
Class to check request against curl security helper. More... | |
class | core\local\guzzle\redirect_middleware |
Class to check that each URL is valid in a redirect. More... | |
class | core\locale |
Helper utility to interact with Locales. More... | |
class | core\lock\lock_utils |
Lock utilities. More... | |
class | core\log\dummy_manager |
interface | core\log\manager |
Interface describing log readers. More... | |
interface | core\log\reader |
interface | core\log\sql_internal_table_reader |
Sql internal table reader. More... | |
interface | core\log\sql_reader |
Log iterator reader interface. More... | |
class | core\moodlenet\activity_packager |
Packager to prepare appropriate backup of an activity to share to MoodleNet. More... | |
class | core\moodlenet\activity_sender |
API for sharing Moodle LMS activities to MoodleNet instances. More... | |
class | core\moodlenet\course_packager |
Packager to prepare appropriate backup of a course to share to MoodleNet. More... | |
class | core\moodlenet\course_partial_packager |
Packager to prepare appropriate backup of a number of activities in a course to share to MoodleNet. More... | |
class | core\moodlenet\course_partial_sender |
API for sharing a number of Moodle LMS activities as a course backup to MoodleNet instances. More... | |
class | core\moodlenet\course_sender |
API for sharing Moodle LMS courses to MoodleNet instances. More... | |
class | core\moodlenet\helpers |
Helper for tests related to MoodleNet integration. More... | |
class | core\moodlenet\moodlenet_client |
MoodleNet client which handles direct outbound communication with MoodleNet instances. More... | |
class | core\moodlenet\resource_packager |
Base packager to prepare appropriate backup of a resource to share to MoodleNet. More... | |
class | core\moodlenet\resource_sender |
API for sharing Moodle LMS resources to MoodleNet instances. More... | |
class | core\moodlenet\share_progress_table |
MoodleNet share progress table. More... | |
class | core\moodlenet\share_recorder |
Record the sharing of content to MoodleNet. More... | |
class | core\moodlenet\utilities |
Class containing static utilities (such as various checks) required by the MoodleNet API. More... | |
class | core\notification |
class | core\oauth2\access_token |
Loads/stores oauth2 access tokens in DB for system accounts in order to use a single token across multiple sessions. More... | |
class | core\oauth2\api |
Static list of api methods for system oauth2 configuration. More... | |
class | core\oauth2\client |
Configurable oauth2 client class. More... | |
class | core\oauth2\client\clever |
Class clever - Custom client handler to fetch data from Clever. More... | |
class | core\oauth2\client\linkedin |
Class linkedin - Custom client handler to fetch data from linkedin. More... | |
class | core\oauth2\discovery\auth_server_config_reader |
Simple reader class, allowing OAuth 2 Authorization Server Metadata to be read from an auth server's well-known. More... | |
class | core\oauth2\discovery\base_definition |
Class for provider discovery definition, to allow services easily discover and process information. More... | |
class | core\oauth2\discovery\imsbadgeconnect |
Class for IMS Open Badge Connect API (aka OBv2.1) discovery definition. More... | |
class | core\oauth2\discovery\openidconnect |
Class for Open ID Connect discovery definition. More... | |
class | core\oauth2\endpoint |
Class for loading/storing oauth2 endpoints from the DB. More... | |
class | core\oauth2\issuer |
Class for loading/storing issuer from the DB. More... | |
class | core\oauth2\refresh_system_tokens_task |
Task to refresh system tokens regularly. More... | |
class | core\oauth2\rest |
Rest API base class mapping rest api methods to endpoints with http methods, args and post body. More... | |
class | core\oauth2\rest_exception |
Rest Exception class containing error code and message. More... | |
class | core\oauth2\service\clever |
Class for Clever OAuth service, with the specific methods related to it. More... | |
class | core\oauth2\service\custom |
Class for Custom services, with the specific methods related to it. More... | |
class | core\oauth2\service\facebook |
Class for Facebook oAuth service, with the specific methods related to it. More... | |
class | core\oauth2\service\google |
Class for Google oAuth service, with the specific methods related to it. More... | |
class | core\oauth2\service\imsobv2p1 |
Class for IMS Open Badges v2.1 oAuth service, with the specific methods related to it. More... | |
interface | core\oauth2\service\issuer_interface |
Interface for services, with the methods to be implemented by all the issuer implementing it. More... | |
class | core\oauth2\service\linkedin |
Class linkedin. More... | |
class | core\oauth2\service\microsoft |
Class for Microsoft oAuth service, with the specific methods related to it. More... | |
class | core\oauth2\service\moodlenet |
MoodleNet OAuth 2 configuration. More... | |
class | core\oauth2\service\nextcloud |
Class for Nextcloud oAuth service, with the specific methods related to it. More... | |
class | core\oauth2\system_account |
Class for loading/storing oauth2 refresh tokens from the DB. More... | |
class | core\oauth2\user_field_mapping |
Class for loading/storing oauth2 user field mappings from the DB. More... | |
class | core\output\checkbox_toggleall |
The checkbox-toggleall renderable class. More... | |
class | core\output\choicelist |
A generic user choice output class. More... | |
class | core\output\chooser |
The chooser renderable class. More... | |
class | core\output\chooser_item |
The chooser_item renderable class. More... | |
class | core\output\chooser_section |
The chooser_section renderable class. More... | |
class | core\output\datafilter |
The filter renderable class. More... | |
class | core\output\dynamic_tabs |
Class dynamic tabs. More... | |
class | core\output\dynamic_tabs\base |
Class tab_base. More... | |
class | core\output\external |
This class contains a list of webservice functions related to output. More... | |
interface | core\output\named_templatable |
A subset of templatable which provides the name of the template to use. More... | |
class | core\output\participants_action_bar |
Class responsible for generating the action bar (tertiary nav) elements in the participants page and related pages. More... | |
interface | core\output\url_rewriter |
URL rewriter interface. More... | |
class | core\persistent |
Abstract class for core objects saved to the DB. More... | |
class | core\plugininfo\auth |
Class for authentication plugins. More... | |
class | core\plugininfo\availability |
Class for availability plugins. More... | |
class | core\plugininfo\base |
Base class providing access to the information about a plugin. More... | |
class | core\plugininfo\block |
Class for page side blocks. More... | |
class | core\plugininfo\cachelock |
Class for admin tool plugins. More... | |
class | core\plugininfo\cachestore |
Class for cache store plugins. More... | |
class | core\plugininfo\calendartype |
Class for calendar type plugins. More... | |
class | core\plugininfo\communication |
Class for communication provider. More... | |
class | core\plugininfo\coursereport |
Class for admin tool plugins. More... | |
class | core\plugininfo\customfield |
Class for admin tool plugins. More... | |
class | core\plugininfo\dataformat |
Class for dataformats. More... | |
class | core\plugininfo\editor |
Class for HTML editors. More... | |
class | core\plugininfo\enrol |
Class for enrolment plugins. More... | |
class | core\plugininfo\fileconverter |
Class for document converter plugins. More... | |
class | core\plugininfo\filter |
Class for text filters. More... | |
class | core\plugininfo\format |
Class for course formats. More... | |
class | core\plugininfo\general |
General class for all plugin types that do not have their own class. More... | |
class | core\plugininfo\gradeexport |
Class for admin tool plugins. More... | |
class | core\plugininfo\gradeimport |
Class for admin tool plugins. More... | |
class | core\plugininfo\gradereport |
Class for admin tool plugins. More... | |
class | core\plugininfo\gradingform |
Class for admin tool plugins. More... | |
class | core\plugininfo\h5plib |
Class for H5P libraries. More... | |
class | core\plugininfo\local |
Class for local plugins. More... | |
class | core\plugininfo\media |
Class for media plugins. More... | |
class | core\plugininfo\message |
Class for messaging processors. More... | |
class | core\plugininfo\mlbackend |
Class for analytics machine learning backend plugins. More... | |
class | core\plugininfo\mnetservice |
Class representing an MNet service. More... | |
class | core\plugininfo\mod |
Class for activity modules. More... | |
class | core\plugininfo\orphaned |
Orphaned subplugins class. More... | |
class | core\plugininfo\plagiarism |
Class for plagiarism plugins. More... | |
class | core\plugininfo\portfolio |
Class for portfolios. More... | |
class | core\plugininfo\profilefield |
Class for admin tool plugins. More... | |
class | core\plugininfo\qbank |
Base class for qbank plugins. More... | |
class | core\plugininfo\qbehaviour |
Class for question behaviours. More... | |
class | core\plugininfo\qformat |
Class for question types. More... | |
class | core\plugininfo\qtype |
Class for question types. More... | |
class | core\plugininfo\report |
Class for admin tool plugins. More... | |
class | core\plugininfo\repository |
Class for repositories. More... | |
class | core\plugininfo\search |
Class for search plugins. More... | |
class | core\plugininfo\theme |
Class for themes. More... | |
class | core\plugininfo\tool |
Class for admin tool plugins. More... | |
class | core\plugininfo\webservice |
Class for webservice protocols. More... | |
class | core\progress\db_updater |
Progress handler that updates a database table with the progress. More... | |
class | core\progress\none |
Progress handler that ignores progress entirely. More... | |
class | core\report_helper |
A helper class with static methods to help report plugins. More... | |
class | core\reportbuilder\local\entities\context |
Context entity. More... | |
class | core\session\database |
Database based session handler. More... | |
class | core\session\exception |
Session related exception class. More... | |
class | core\session\external |
This class contains a list of webservice functions related to session. More... | |
class | core\session\file |
File based session handler. More... | |
class | core\session\handler |
Session handler base. More... | |
class | core\session\manager |
Session manager, this is the public Moodle API for sessions. More... | |
class | core\session\memcached |
Memcached based session handler. More... | |
class | core\session\redis |
Redis based session handler. More... | |
class | core\session\utility\cookie_helper |
Helper class providing utils dealing with cookies, particularly 3rd party cookies. More... | |
class | core\task\analytics_cleanup_task |
Delete stale records from analytics tables. More... | |
class | core\task\asynchronous_backup_task |
Adhoc task that performs asynchronous backups. More... | |
class | core\task\asynchronous_copy_task |
Adhoc task that performs asynchronous course copies. More... | |
class | core\task\asynchronous_restore_task |
Adhoc task that performs asynchronous restores. More... | |
class | core\task\automated_backup_report_task |
Report task for core automation backup. More... | |
class | core\task\automated_backup_task |
Simple task to run the backup cron. More... | |
class | core\task\badges_adhoc_task |
Class badges_adhoc_task. More... | |
class | core\task\badges_cron_task |
Simple task to run the badges cron. More... | |
class | core\task\badges_message_task |
Simple task to run the badges cron. More... | |
class | core\task\blog_cron_task |
Simple task to run the blog cron. More... | |
class | core\task\build_installed_themes_task |
Class that builds and caches all of the site's installed themes. More... | |
class | core\task\cache_cleanup_task |
Simple task to delete old cache records. More... | |
class | core\task\cache_cron_task |
Simple task to run the cache cron. More... | |
class | core\task\calendar_cron_task |
Simple task to run the calendar cron. More... | |
class | core\task\calendar_fix_orphaned_events |
Class handling fixing of events that have had their userid lost. More... | |
class | core\task\check_for_updates_task |
Simple task to run the registration cron. More... | |
class | core\task\clean_up_deleted_search_area_task |
Class that cleans up data related to deleted search area. More... | |
class | core\task\completion_daily_task |
Simple task to run the daily completion cron. More... | |
class | core\task\completion_regular_task |
Simple task to run the regular completion cron. More... | |
class | core\task\context_cleanup_task |
Simple task to delete old context records. More... | |
class | core\task\course_backup_task |
Adhoc task that performs single automated course backup. More... | |
class | core\task\create_contexts_task |
Simple task to create missing contexts at all levels. More... | |
class | core\task\database_logger |
Database logger for task logging. More... | |
class | core\task\delete_incomplete_users_task |
Simple task to delete user accounts for users who have not completed their profile in time. More... | |
class | core\task\delete_unconfirmed_users_task |
Simple task to delete user accounts for users who have not confirmed in time. More... | |
class | core\task\file_temp_cleanup_task |
Simple task to delete temp files older than 1 week. More... | |
class | core\task\file_trash_cleanup_task |
Simple task to run the file trash cleanup cron. More... | |
class | core\task\fix_file_timestamps_task |
Retroactively fixes file timestamps that are older than the containing folder record. More... | |
class | core\task\grade_cron_task |
Simple task to run the grade cron. More... | |
class | core\task\grade_history_cleanup_task |
Simple task to clean grade history tables. More... | |
class | core\task\h5p_get_content_types_task |
A task to get the latest content types from the official H5P repository. More... | |
class | core\task\hide_ended_courses_task |
Simple task to automatically set the course visibility to hidden when the course end date matches the current day. More... | |
class | core\task\messaging_cleanup_task |
Simple task to delete old messaging records. More... | |
class | core\task\password_reset_cleanup_task |
Simple task to delete old password reset records. More... | |
class | core\task\plagiarism_cron_task |
Simple task to run the plagiarism cron. More... | |
class | core\task\portfolio_cron_task |
Simple task to run the portfolio cron. More... | |
class | core\task\question_preview_cleanup_task |
A task to cleanup old question previews. More... | |
class | core\task\refresh_mod_calendar_events_task |
Class that updates all of the existing calendar events for modules that implement the *_refresh_events() hook. More... | |
class | core\task\registration_cron_task |
Simple task to run the registration cron. More... | |
class | core\task\search_index_task |
Runs global search indexing. More... | |
class | core\task\search_optimize_task |
Runs search index optimization. More... | |
class | core\task\send_failed_login_notifications_task |
Simple task to send notifications about failed login attempts. More... | |
class | core\task\send_login_notifications |
Adhoc task that send login notifications. More... | |
class | core\task\send_new_user_passwords_task |
Simple task to create accounts and send password emails for new users. More... | |
class | core\task\session_cleanup_task |
Simple task to cleanup user sessions from a scheduled task. More... | |
class | core\task\show_started_courses_task |
Simple task to automatically set the course visibility to shown when the course start date matches the current day. More... | |
class | core\task\stats_cron_task |
Simple task to run the stats cron. More... | |
class | core\task\tag_cron_task |
Simple task to run the tag cron. More... | |
class | core\task\task_lock_cleanup_task |
Adhoc task metadata cleanup task. More... | |
class | core\task\task_log_cleanup_task |
A task to cleanup log entries for tasks. More... | |
class | core\update\api |
General purpose client for https://download.moodle.org/api/. More... | |
class | core\update\checker |
Singleton class that handles checking for available updates. More... | |
class | core\update\checker_exception |
General exception thrown by the core::update::checker class. More... | |
class | core\update\code_manager |
General purpose class managing the plugins source code files deployment. More... | |
class | core\update\info |
Defines the structure of objects returned by core::update::checker::get_update_info(). More... | |
class | core\upgrade\util |
Core upgrade utility class. More... | |
class | core\uuid |
V4 UUID generator class. More... | |
class | core_admin\form\purge_caches |
Form for selecting which caches to purge on admin/purgecaches.php. More... | |
class | core_admin\form\testoutgoingmailconf_form |
Test mail form. More... | |
class | core_admin\local\settings\setting_scheduled_task_status |
This admin setting tells whether a given scheduled task is enabled, providing a link to its configuration page. More... | |
class | core_admin_renderer |
Standard HTML output renderer for core_admin subsystem. More... | |
class | core_badges\badge |
Class that represents badge. More... | |
class | core_badges\form\backpack |
Form to edit backpack initial details. More... | |
class | core_badges\form\badge |
Form to edit badge details. More... | |
class | core_badges\form\collections |
Form to select backpack collections. More... | |
class | core_badges\form\message |
Form to edit badge message. More... | |
class | core_badges\helper |
Badge helper library. More... | |
class | core_badges\output\badge_alignments |
Link to external resources this badge is aligned with. More... | |
class | core_badges\output\badge_collection |
Collection of all badges for view.php page. More... | |
class | core_badges\output\badge_management |
Collection of badges used at the index.php page. More... | |
class | core_badges\output\badge_recipients |
Badge recipients rendering class. More... | |
class | core_badges\output\badge_related |
Collection of all related badges. More... | |
class | core_badges\output\badge_user_collection |
Collection of user badges used at the mybadges.php page. More... | |
class | core_badges\output\external_badge |
An external badges for external.php page. More... | |
class | core_badges\output\issued_badge |
An issued badges for badge.php page. More... | |
class | core_badges_assertion |
Open Badges Assertions specification 1.0 More... | |
class | core_badges_renderer |
Standard HTML output renderer for badges. More... | |
class | core_collator |
A collator class with static methods that can be used for sorting. More... | |
class | core_component |
Collection of components related methods. More... | |
class | core_course\analytics\indicator\activities_due |
Activities due indicator. More... | |
class | core_course\cache\course_image |
Class to describe cache data source for course image. More... | |
class | core_course\local\entity\activity_chooser_footer |
A class to represent the Activity Chooser footer data. More... | |
class | core_course\local\entity\content_item |
The content_item class. More... | |
class | core_course\local\entity\lang_string_title |
The lang_string_title class of value object, providing access to the value of a lang string. More... | |
class | core_course\local\entity\string_title |
The string_title class of value object, which provides access to a simple string. More... | |
interface | core_course\local\entity\title |
class | core_course\local\exporters\course_content_item_exporter |
The course_content_item_exporter class. More... | |
class | core_course\local\exporters\course_content_items_exporter |
The course_content_items_exporter class. More... | |
class | core_course\local\repository\caching_content_item_readonly_repository |
The class caching_content_item_repository, for fetching content_items, with additional caching. More... | |
class | core_course\local\repository\content_item_readonly_repository |
The class content_item_repository, for reading content_items. More... | |
interface | core_course\local\repository\content_item_readonly_repository_interface |
class | core_course\output\category_action_bar |
Class responsible for generating the action bar (tertiary nav) elements in an individual category page. More... | |
class | core_course\output\manage_categories_action_bar |
Class responsible for generating the action bar (tertiary nav) elements in the category management page. More... | |
class | core_course_category |
Class to store, cache, render and manage course category. More... | |
class | core_course_list_element |
Class to store information about one course in a list of courses. More... | |
class | core_cssparser |
Moodle CSS parser. More... | |
class | core_date |
Core date and time related code. More... | |
class | core_files_renderer |
Rendering of files viewer related widgets. More... | |
class | core_filetypes |
Class to manage the custom filetypes list that is stored in a config variable. More... | |
class | core_geopattern |
class | core_minify |
Collection of JS and CSS compression methods. More... | |
class | core_php_time_limit |
Utility class to manage PHP time limit. More... | |
class | core_plugin_manager |
Defines classes used for plugins management. More... | |
class | core_qrcode |
Class for generating QR codes. More... | |
class | core_question\statistics\questions\calculated |
This class is used to return the stats as calculated by core_question::statistics::questions::calculator. More... | |
class | core_question\statistics\questions\calculator |
This class has methods to compute the question statistics from the raw data. More... | |
class | core_requirejs |
Collection of requirejs related methods. More... | |
class | core_rtlcss |
Moodle RTLCSS class. More... | |
class | core_scss |
Moodle SCSS compiler class. More... | |
class | core_shutdown_manager |
Shutdown management class. More... | |
interface | core_string_manager |
Interface for string manager. More... | |
class | core_string_manager_install |
Fetches minimum strings for installation. More... | |
class | core_string_manager_standard |
Standard string_manager implementation. More... | |
class | core_user |
User class to access user details. More... | |
class | core_user\analytics\target\upcoming_activities_due |
Upcoming activities due target. More... | |
class | core_user\devicekey |
Update public key against registered user device. More... | |
class | core_user\external\update_user_device_public_key |
Update public key against registered user device. More... | |
class | core_useragent |
Environment class to aid with the detection and establishment of the working environment. More... | |
class | core_userfeedback |
This Class contains helper functions for user feedback functionality. More... | |
class | core_xml_parser |
Class for parsing xml files. More... | |
class | course_modinfo |
Information about a course that is cached in the course table 'modinfo' field (and then in memory) in order to reduce the need for other database queries. More... | |
class | course_reset_form |
Defines the course reset settings form. More... | |
class | dbtransfer_exception |
Exception class for db transfer. More... | |
class | ddl_change_structure_exception |
Error during changing db structure. More... | |
class | ddl_dependency_exception |
Error changing db structure, caused by some dependency found like trying to modify one field having related indexes. More... | |
class | ddl_exception |
DDL exception class, use instead of throw new moodle_exception() and "return false;" in ddl code. More... | |
class | ddl_field_missing_exception |
Table does not exist problem exception. More... | |
class | ddl_table_missing_exception |
Table does not exist problem exception. More... | |
class | dndupload_ajax_processor |
Processes the upload, creating the course module and returning the result. More... | |
class | dndupload_handler |
Stores all the information about the available dndupload handlers. More... | |
class | edit_criteria_form |
Form to edit badge criteria. More... | |
class | edit_relatedbadge_form |
Form to edit badge details. More... | |
class | endorsement_form |
Form to edit endorsement. More... | |
class | enrol_plugin |
Enrolment plugins abstract class. More... | |
class | environment_results |
Helper Class to return results to caller. More... | |
class | error_log_progress_trace |
This subclass of progress_trace outputs to error log. More... | |
class | file_serving_exception |
An exception that indicates that file can not be served. More... | |
class | files_tree_viewer |
Data structure representing a general moodle file tree viewer. More... | |
class | filter_local_settings_form |
class | filter_manager |
Class to manage the filtering of strings. More... | |
class | filterobject |
This is just a little object to define a phrase and some instructions for how to process it. More... | |
class | flexible_table |
class | flickr_client |
Simple Flickr API client implementing the features needed by Moodle. More... | |
class | google_docs |
Class for manipulating google documents through the google data api. More... | |
class | google_oauth |
OAuth 2.0 client for Google Services. More... | |
class | html_list_progress_trace |
HTML List Progress Tree. More... | |
class | html_progress_trace |
This subclass of progress_trace outputs as HTML. More... | |
class | imscc11_backup_convert |
class | imscc11_convert_exception |
Exception thrown by this converter. More... | |
class | imscc11_converter |
class | imscc11_export_converter |
class | imscc11_store_backup_file |
class | imscc11_zip_contents |
class | imscc1_convert_exception |
Exception thrown by this converter. More... | |
class | imscc1_converter |
class | invalid_dataroot_permissions |
An exception that indicates incorrect permissions in $CFG->dataroot. More... | |
class | invalid_parameter_exception |
Exception indicating malformed parameter problem. More... | |
class | invalid_response_exception |
Exception indicating malformed response problem. More... | |
class | invalid_state_exception |
An exception that indicates something really weird happened. More... | |
class | lang_installer |
End of component_installer class. More... | |
class | lang_installer_exception |
Exception thrown by lang_installer. More... | |
class | license_manager |
class | list_item |
class | login_change_password_form |
class | login_forgot_password_form |
Reset forgotten password form definition. More... | |
class | login_set_password_form |
Set forgotten password form definition. More... | |
class | login_signup_form |
class | mnet_profile_form |
small form to allow the administrator to configure (override) which profile fields are sent/imported over mnet More... | |
class | mnet_review_host_form |
The second step of the form - reviewing the host details This is also the same form that is used for editing an existing host. More... | |
class | mnet_services_form |
class | mnet_simple_host_form |
The very basic first step add new host form - just wwwroot & application The second form is loaded up with the information from this one. More... | |
class | Moodle\BehatExtension\Context\ContextClass\ClassResolver |
Moodle behat context class resolver. More... | |
class | Moodle\BehatExtension\Context\Initializer\MoodleAwareInitializer |
MoodleContext initializer. More... | |
class | Moodle\BehatExtension\Context\MoodleContext |
Moodle contexts loader. More... | |
class | Moodle\BehatExtension\Context\Step\ChainedStep |
Chained Step base class. More... | |
class | Moodle\BehatExtension\Context\Step\Given |
Chained Given step. More... | |
class | Moodle\BehatExtension\Context\Step\Then |
Chained Then ChainedStep. More... | |
class | Moodle\BehatExtension\Context\Step\When |
Chained When step. More... | |
class | Moodle\BehatExtension\Definition\Cli\AvailableDefinitionsController |
Available definition controller, for calling moodle information printer. More... | |
class | Moodle\BehatExtension\Definition\Printer\ConsoleDefinitionInformationPrinter |
Moodle console definition information printer. More... | |
class | Moodle\BehatExtension\Driver\WebDriver |
WebDriver Driver to allow extra selenium capabilities required by Moodle. More... | |
class | Moodle\BehatExtension\Driver\WebDriverFactory |
Driver factory for the Moodle WebDriver. More... | |
class | Moodle\BehatExtension\EventDispatcher\Tester\ChainedStepTester |
Override step tester to ensure chained steps gets executed. More... | |
class | Moodle\BehatExtension\EventDispatcher\Tester\MoodleEventDispatchingStepTester |
Step tester dispatching BEFORE/AFTER events during tests. More... | |
class | Moodle\BehatExtension\Exception\SkippedException |
Skipped exception (throw this to mark step as "skipped"). More... | |
class | Moodle\BehatExtension\Output\Formatter\MoodleListFormatter |
Feature step counter for distributing features between parallel runs. More... | |
class | Moodle\BehatExtension\Output\Formatter\MoodleProgressFormatterFactory |
Moodle behat context class resolver. More... | |
class | Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter |
Feature step counter for distributing features between parallel runs. More... | |
class | Moodle\BehatExtension\Output\Formatter\MoodleStepcountFormatter |
Feature step counter for distributing features between parallel runs. More... | |
class | Moodle\BehatExtension\Output\Printer\MoodleProgressPrinter |
Prints hooks in a pretty fashion. More... | |
class | moodle_exception |
Base Moodle Exception class. More... | |
class | moodle_list |
Clues to reading this code: More... | |
class | moodle_text_filter |
Base class for text filters. More... | |
class | moodle_url |
Class for creating and manipulating urls. More... | |
class | MoodleExcelFormat |
Define and operate over one Format. More... | |
class | MoodleExcelWorkbook |
Define and operate over one Moodle Workbook. More... | |
class | MoodleExcelWorksheet |
Define and operate over one Worksheet. More... | |
class | MoodleODSCell |
ODS Cell abstraction. More... | |
class | MoodleODSFormat |
ODS cell format abstraction. More... | |
class | MoodleODSWorkbook |
ODS workbook abstraction. More... | |
class | MoodleODSWorksheet |
ODS Worksheet abstraction. More... | |
class | MoodleODSWriter |
ODS file writer. More... | |
class | null_filter_manager |
Filter manager subclass that does nothing. More... | |
class | null_progress_trace |
This subclass of progress_trace does not ouput anything. More... | |
class | performance_measuring_filter_manager |
Filter manager subclass that tracks how much work it does. More... | |
class | PNG_MetaDataHandler |
Information on PNG file chunks can be found at http://www.w3.org/TR/PNG/#11Chunks Some other info on PNG that I used http://garethrees.org/2007/11/14/pngcrush/. More... | |
class | progress_trace |
Progress trace class. More... | |
class | progress_trace_buffer |
Special type of trace that can be used for catching of output of other traces. More... | |
class | question_behaviour_type |
This class represents the type of behaviour, rather than the instance of the behaviour which control a particular question attempt. More... | |
class | question_behaviour_type_fallback |
This class exists to allow behaviours that worked in Moodle 2.3 to continue to work. More... | |
class | require_login_exception |
Course/activity access exception. More... | |
class | require_login_session_timeout_exception |
Session timeout exception. More... | |
class | required_capability_exception |
Exceptions indicating user does not have permissions to do something and the execution can not continue. More... | |
class | search_lexer |
This class does the heavy lifting of lexing the search string into tokens. More... | |
class | search_parser |
This class takes care of sticking the proper token type/value pairs into the parsed token array. More... | |
class | search_token |
Class to hold token/value pairs after they're parsed. More... | |
class | section_info |
Data about a single section on a course. More... | |
class | table_dataformat_export_format |
Dataformat exporter. More... | |
class | table_default_export_format_parent |
class | table_sql |
class | text_progress_trace |
This subclass of progress_trace outputs to plain text. More... | |
class | texteditor |
Base abstract text editor class. More... | |
class | upload_manager |
This class handles all aspects of fileuploading. More... | |
class | user_bulk_action_form |
Bulk user action form. More... | |
class | user_bulk_cohortadd_form |
class | user_bulk_form |
Bulk user form. More... | |
class | webservice_parameter_exception |
Web service parameter exception class. More... | |
class | WikiToMarkdown |
#- More... | |
class | xml_format_exception |
Functions | |
filter_manager::__construct () | |
Constructor. | |
filterobject::__construct ($phrase, $hreftagbegin='< span class="highlight">', $hreftagend='</span >', $casesensitive=false, $fullmatch=false, $replacementphrase=null, $replacementcallback=null, array $replacementcallbackdata=null) | |
Constructor. | |
moodle_text_filter::__construct ($context, array $localconfig) | |
Set any context-specific configuration for this filter. | |
abort_all_db_transactions () | |
Unconditionally abort all database transactions, this function should be called from exception handlers only. | |
add_event () | |
CALENDAR MANAGEMENT ////////////////////////////////////////////////////////////////. | |
add_mod_to_section () | |
add_to_log () | |
addslashes_js ($var) | |
Does proper javascript quoting. | |
ajaxenabled () | |
allow_assign () | |
allow_override () | |
allow_switch () | |
filter_manager::apply_filter_chain ($text, $filterchain, array $options=array(), array $skipfilters=null) | |
Apply a list of filters to some content. | |
badge_assemble_notification (stdClass $badge) | |
Creates single message for all notification and sends it out. | |
badge_award_criteria_competency_has_records_for_competencies ($competencyids) | |
Check if any badge has records for competencies. | |
badge_message_from_template ($message, $params) | |
Replaces variables in a message template and returns text ready to be emailed to a user. | |
badges_add_course_navigation (navigation_node $coursenode, stdClass $course) | |
Extends the course administration navigation with the Badges page. | |
badges_award_handle_manual_criteria_review (stdClass $data) | |
Triggered when badge is manually awarded. | |
badges_bake ($hash, $badgeid, $userid=0, $pathhash=false) | |
Bake issued badge. | |
badges_calculate_message_schedule ($schedule) | |
Caclulates date for the next message digest to badge creators. | |
badges_change_sortorder_backpacks (int $backpackid, int $direction) | |
Moves the backpack in the list one position up or down. | |
badges_check_backpack_accessibility () | |
badges_create_site_backpack ($data) | |
Create the site backpack with this data. | |
badges_delete_site_backpack ($id) | |
Delete the backpack with this id. | |
badges_disconnect_user_backpack ($userid) | |
Disconnect from the user backpack by deleting the user preferences. | |
badges_download ($userid) | |
Download all user badges in zip archive. | |
badges_external_create_mapping ($sitebackpackid, $type, $internalid, $externalid) | |
Save the info about which objects we connected with a backpack before. | |
badges_external_delete_mapping ($sitebackpackid, $type, $internalid) | |
Delete a specific external mapping information for a backpack. | |
badges_external_delete_mappings ($sitebackpackid) | |
Delete all external mapping information for a backpack. | |
badges_external_get_mapping ($sitebackpackid, $type, $internalid, $param='externalid') | |
Used to remember which objects we connected with a backpack before. | |
badges_generate_badgr_open_url ($backpack, $type, $externalid) | |
Generate a public badgr URL that conforms to OBv2. | |
badges_get_badge_api_versions () | |
List the supported badges api versions. | |
badges_get_badge_by_hash (string $hash) | |
Get badge by hash. | |
badges_get_badges ($type, $courseid=0, $sort='', $dir='', $page=0, $perpage=BADGE_PERPAGE, $user=0) | |
Get all badges. | |
badges_get_default_issuer () | |
Get the default issuer for a badge from this site. | |
badges_get_issued_badge_info () | |
badges_get_oauth2_service_options () | |
Get OAuth2 services for the external backpack. | |
badges_get_site_backpack ($id, int $userid=0) | |
Get a site backpacks by id for a particular user or site (if userid is 0) | |
badges_get_site_backpacks () | |
List the backpacks at site level. | |
badges_get_site_primary_backpack () | |
Get the primary backpack for the site. | |
badges_get_user_backpack (?int $userid=0) | |
Get the user backpack for the currently logged in user OR the provided user. | |
badges_get_user_badges ($userid, $courseid=0, $page=0, $perpage=0, $search='', $onlypublic=false) | |
Get badges for a specific user. | |
badges_handle_course_deletion ($courseid) | |
Handles what happens to the course badges when a course is deleted. | |
badges_list_criteria ($enabled=true) | |
Return all the enabled criteria types for this site. | |
badges_local_backpack_js () | |
badges_notify_badge_award (badge $badge, $userid, $issued, $filepathhash) | |
Sends notifications to users about awarded badges. | |
badges_open_badges_backpack_api (?int $backpackid=null) | |
Is any backpack enabled that supports open badges V1? | |
badges_prepare_badge_for_external (stdClass $badge, stdClass $user) | |
Update badge instance to external functions. | |
badges_process_badge_image (badge $badge, $iconfile) | |
Process badge image from form data. | |
badges_save_backpack_credentials (stdClass $data) | |
Create a backpack with the provided details. | |
badges_save_external_backpack (stdClass $data) | |
Perform the actual create/update of external bakpacks. | |
badges_send_verification_email ($email, $backpackid, $backpackpassword) | |
Create and send a verification email to the email address supplied. | |
badges_setup_backpack_js () | |
badges_update_site_backpack ($id, $data) | |
Update the backpack with this id. | |
badges_user_has_backpack ($userid) | |
Checks if user has external backpack connected. | |
badges_verify_backpack (int $backpackid) | |
Attempt to authenticate with a backpack credentials and return an error if the authentication fails. | |
badges_verify_site_backpack () | |
Attempt to authenticate with the site backpack credentials and return an error if the authentication fails. | |
block_add_block_ui ($page, $output) | |
Functions update the blocks if required by the request parameters ==========. | |
block_instance ($blockname, $instance=NULL, $page=NULL) | |
Creates a new instance of the specified block class. | |
block_instance_by_id ($blockinstanceid) | |
Returns a new instance of the specified block instance id. | |
block_load_class ($blockname) | |
Load the block class for a particular type of block. | |
block_method_result ($blockname, $method, $param=NULL) | |
Helper functions for working with block classes ============================. | |
blocks_add_default_course_blocks ($course) | |
Add the default blocks to a course. | |
blocks_add_default_system_blocks () | |
Add the default system-context blocks. | |
blocks_delete_all_for_context ($contextid) | |
Delete all the blocks that belong to a particular context. | |
blocks_delete_instance ($instance, $nolongerused=false, $skipblockstables=false) | |
Delete a block, and associated data. | |
blocks_delete_instances ($instanceids) | |
Delete multiple blocks at once. | |
blocks_find_block ($blockid, $blocksarray) | |
Find a given block by its blockid within a provide array. | |
blocks_get_default_site_course_blocks () | |
blocks_get_record ($blockid=NULL, $notusedanymore=false) | |
Get the block record for a particular blockid - that is, a particular type os block. | |
blocks_name_allowed_in_format ($name, $pageformat) | |
Check that a given name is in a permittable format. | |
blocks_parse_default_blocks_list ($blocksstr) | |
Parse a list of default blocks. | |
blocks_remove_inappropriate ($course) | |
Actually delete from the database any blocks that are currently on this page, but which should not be there according to blocks_name_allowed_in_format. | |
blocks_set_visibility ($instance, $page, $newvisibility) | |
Set a block to be visible or hidden on a particular page. | |
blog_get_context_url () | |
break_up_long_words ($string, $maxsize=20, $cutchar=' ') | |
Given some normal text this function will break up any long words to a given size by inserting the given character. | |
build_context_path () | |
build_logs_array () | |
build_navigation () | |
calculate_user_dst_table () | |
calendar_cron () | |
calendar_get_all_allowed_types () | |
calendar_get_block_upcoming () | |
calendar_get_mini () | |
calendar_get_upcoming () | |
calendar_import_icalendar_events ($ical, $unused=null, $subscriptionid=null) | |
Import events from an iCalendar object into a course calendar. | |
calendar_normalize_tz () | |
calendar_preferences_button () | |
calendar_print_month_selector () | |
calendar_process_subscription_row ($subscriptionid, $pollinterval, $action) | |
Update a subscription from the form data in one of the rows in the existing subscriptions table. | |
calendar_wday_name () | |
can_use_html_editor () | |
can_use_rotated_text () | |
category_delete_full () | |
category_delete_move () | |
check_browser_operating_system () | |
check_browser_version () | |
check_dir_exists ($dir, $create=true, $recursive=true) | |
Function to check if a directory exists and by default create it if not exists. | |
check_gd_version () | |
check_moodle_environment ($version, $env_select=ENV_SELECT_NEWER) | |
This function checks all the requirements defined in environment.xml. | |
choose_from_menu () | |
clam_change_log () | |
clam_handle_infected_file () | |
clam_log_infected () | |
clam_log_upload () | |
clam_message_admins () | |
clam_replace_infected_file () | |
clam_scan_moodle_file () | |
clean_text ($text, $format=FORMAT_HTML, $options=array()) | |
Cleans raw text removing nasties. | |
cleanup_contexts () | |
cli_error ($text, $errorcode=1) | |
Write to standard error output and exit with the given code. | |
cli_get_params (array $longoptions, array $shortmapping=null) | |
Returns cli script parameters. | |
cli_heading ($string, $return=false) | |
Print or return section heading string. | |
cli_input ($prompt, $default='', array $options=null, $casesensitiveoptions=false) | |
Get input from user. | |
cli_logo ($padding=2, $return=false) | |
Print an ASCII version of the Moodle logo. | |
cli_problem ($text) | |
Write error notification. | |
cli_separator ($return=false) | |
Print or return section separator string. | |
cli_set_process_title_suffix (string $suffix) | |
This sets the cli process title suffix. | |
cli_write ($text, $stream=STDOUT) | |
Command line utility functions and classes. | |
cli_writeln ($text, $stream=STDOUT) | |
Write a text followed by an end of line symbol to the given stream. | |
close_window ($delay=0, $reloadopener=false) | |
Try and close the current window using JavaScript, either immediately, or after a delay. | |
cohort_get_visible_list () | |
completion_cron () | |
confirm_sesskey ($sesskey=NULL) | |
Check the sesskey and return true of false for whether it is valid. | |
content_to_text ($content, $contentformat) | |
Converts texts or strings to plain text. | |
context_instance_preload () | |
context_instance_preload_sql () | |
context_moved () | |
convert_tabrows_to_tree () | |
convert_tree_to_html () | |
core_login_extend_change_password_form ($mform, $user) | |
Plugins can extend forms. | |
core_login_extend_forgot_password_form ($mform) | |
Inject form elements into forgot_password_form. | |
core_login_extend_set_password_form ($mform, $user) | |
Inject form elements into set_password_form. | |
core_login_extend_signup_form ($mform) | |
Inject form elements into signup_form. | |
core_login_generate_password_reset ($user) | |
Create a new record in the database to track a new password set request for user. | |
core_login_get_return_url () | |
Determine where a user should be redirected after they have been logged in. | |
core_login_post_change_password_requests ($data) | |
Plugins can perform post submission actions. | |
core_login_post_forgot_password_requests ($data) | |
Post forgot_password_form submission actions. | |
core_login_post_set_password_requests ($data, $user) | |
Post set_password_form submission actions. | |
core_login_post_signup_requests ($data) | |
Post signup_form submission actions. | |
core_login_pre_signup_requests () | |
Plugins can create pre sign up requests. | |
core_login_process_password_reset ($username, $email) | |
Process the password reset for the given user (via username or email). | |
core_login_process_password_reset_request () | |
Processes a user's request to set a new password in the event they forgot the old one. | |
core_login_process_password_set ($token) | |
This function processes a user's submitted token to validate the request to set a new password. | |
core_login_validate_extend_change_password_form ($data, $user) | |
Plugins can add additional validation to forms. | |
core_login_validate_extend_forgot_password_form ($data) | |
Inject validation into forgot_password_form. | |
core_login_validate_extend_set_password_form ($data, $user) | |
Inject validation into set_password_form. | |
core_login_validate_extend_signup_form ($data) | |
Inject validation into signup_form. | |
core_login_validate_forgot_password_data ($data) | |
Validates the forgot password form data. | |
core_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) | |
Defines core nodes for my profile navigation tree. | |
count_enrolled_users (context $context, $withcapability='', $groupids=0, $onlyactive=false) | |
Counts list of users enrolled into course (as per above function) | |
count_login_failures () | |
course_category_hide () | |
course_category_show () | |
course_get_cm_rename_action () | |
course_scale_used () | |
coursemodule_visible_for_user () | |
coursetag_delete_course_tags () | |
coursetag_delete_keyword () | |
coursetag_get_all_tags () | |
coursetag_get_jscript () | |
coursetag_get_jscript_links () | |
coursetag_get_records () | |
coursetag_get_tagged_courses () | |
coursetag_get_tags () | |
coursetag_store_keywords () | |
create_contexts () | |
create_course_category () | |
cron_bc_hack_plugin_functions () | |
cron_execute_plugin_type () | |
cron_prepare_core_renderer ($restore=false) | |
Prepare the output renderer for the cron run. | |
cron_run (?int $keepalive=null) | |
Execute cron tasks. | |
cron_run_adhoc_tasks (int $timenow, $keepalive=0, $checklimits=true) | |
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits. | |
cron_run_inner_adhoc_task (\core\task\adhoc_task $task) | |
Shared code that handles running of a single adhoc task within the cron. | |
cron_run_inner_scheduled_task (\core\task\task_base $task) | |
Shared code that handles running of a single scheduled task within the cron. | |
cron_run_scheduled_tasks (int $timenow) | |
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits. | |
cron_run_single_task () | |
cron_set_process_title (string $title) | |
Sets the process title. | |
cron_setup_user ($user=null, $course=null, $leavepagealone=false) | |
Sets up current user and course environment (lang, etc.) in cron. | |
cron_trace_time_and_memory () | |
Output some standard information during cron runs. | |
css_is_colour () | |
css_is_width () | |
css_minify_css () | |
css_send_cached_css ($csspath, $etag) | |
Sends a cached CSS file. | |
css_send_cached_css_content ($csscontent, $etag) | |
Sends a cached CSS content. | |
css_send_css_not_found () | |
Sends a 404 message about CSS not being found. | |
css_send_temporary_css ($css) | |
Sends CSS directly and disables all caching. | |
css_send_uncached_css ($css) | |
Sends CSS directly without caching it. | |
css_send_unmodified ($lastmodified, $etag) | |
Send file not modified headers. | |
css_sort_by_count () | |
if(!defined( 'THEME_DESIGNER_CACHE_LIFETIME')) | css_store_css (theme_config $theme, $csspath, $csscontent) |
Stores CSS in a file at the given path. | |
css_write_file ($filename, $content) | |
Writes a CSS file. | |
current_theme () | |
data_submitted () | |
Determine if there is data waiting to be processed from a form. | |
debugging ($message='', $level=DEBUG_NORMAL, $backtrace=null) | |
Standard Debugging Function. | |
dedupe_user_access () | |
default_error_handler ($errno, $errstr, $errfile, $errline) | |
Default error handler, prevents some white screens. | |
default_exception_handler ($ex) | |
Default exception handler. | |
default_page_type_list ($pagetype, $parentcontext=null, $currentcontext=null) | |
Generates a default page type list when a more appropriate callback cannot be decided upon. | |
delete_context () | |
delete_course_module () | |
delete_event () | |
detect_munged_arguments () | |
display_auth_lock_options ($settings, $auth, $userfields, $helptext, $mapremotefields, $updateremotefields, $customfields=array()) | |
Helper function used to print locking for auth plugins on admin pages. | |
dndupload_add_to_course ($course, $modnames) | |
Add the Javascript to enable drag and drop upload to a course page. | |
download_as_dataformat ($filename, $dataformat, $columns, $iterator, $callback=null) | |
dataformatlib.php - Contains core dataformat related functions. | |
dst_changes_for_year () | |
during_initial_install () | |
Indicates whether we are in the middle of the initial Moodle install. | |
editors_get_available () | |
Get the list of available editors. | |
editors_get_enabled () | |
Returns list of enabled text editors. | |
editors_get_preferred_editor ($format=NULL) | |
Returns users preferred editor for given format. | |
editors_get_preferred_format () | |
Returns users preferred text format. | |
editors_head_setup () | |
Setup all JS and CSS needed for editors. | |
enrol_accessing_via_instance (stdClass $instance) | |
Is current user accessing course via this enrolment method? | |
enrol_add_course_navigation (navigation_node $coursenode, $course) | |
Add navigation nodes. | |
enrol_calculate_duration ($timestart, $timeend) | |
Calculate duration base on start time and end time. | |
enrol_check_plugins ($user, bool $ignoreintervalcheck=true) | |
Check all the login enrolment information for the given user object by querying the enrolment plugins This function may be very slow, use only once after log-in or login-as. | |
enrol_cohort_can_view_cohort () | |
enrol_cohort_enrol_all_users () | |
enrol_cohort_get_cohorts () | |
enrol_cohort_search_cohorts () | |
enrol_course_delete ($course, $userid=null) | |
Called when course is about to be deleted. | |
enrol_course_edit_form (MoodleQuickForm $mform, $data, $context) | |
This function adds necessary enrol plugins UI into the course edit form. | |
enrol_course_edit_validation (array $data, $context) | |
Validate course edit form data. | |
enrol_course_updated ($inserted, $course, $data) | |
Update enrol instances after course edit form submission. | |
enrol_get_all_users_courses ($userid, $onlyactive=false, $fields=null, $sort=null) | |
Returns list of courses user is enrolled into without performing any capability checks. | |
enrol_get_course_by_user_enrolment_id ($ueid) | |
Returns the course where a user enrolment belong to. | |
enrol_get_course_description_texts ($course) | |
Returns course enrolment detailed information. | |
enrol_get_course_info_icons ($course, array $instances=NULL) | |
Returns course enrolment information icons. | |
enrol_get_course_users ($courseid=false, $onlyactive=false, $usersfilter=[], $uefilter=[], $usergroups=[]) | |
Return all users enrolled in a course. | |
enrol_get_course_users_roles (int $courseid) | |
Returns list of roles per users into course. | |
enrol_get_courses_sortingsql ($sort=null) | |
Returns SQL ORDER arguments which reflect the admin settings to sort my courses. | |
enrol_get_enrolment_end ($courseid, $userid) | |
This function returns the end of current active user enrolment. | |
enrol_get_instances ($courseid, $enabled) | |
Returns enrolment instances in given course. | |
enrol_get_my_courses ($fields=null, $sort=null, $limit=0, $courseids=[], $allaccessible=false, $offset=0, $excludecourses=[]) | |
Returns list of courses current $USER is enrolled in and can access. | |
enrol_get_period_list () | |
Get the list of options for the enrolment period dropdown. | |
enrol_get_plugin ($name) | |
Returns instance of enrol plugin. | |
enrol_get_plugins ($enabled) | |
Returns instances of enrol plugins. | |
moodle_database | enrol_get_shared_courses ($user1, $user2, $preloadcontexts=false, $checkexistsonly=false) |
Returns any courses shared by the two users. | |
enrol_get_users_courses ($userid, $onlyactive=false, $fields=null, $sort=null) | |
Returns list of courses user is enrolled into. | |
enrol_is_enabled ($enrol) | |
Checks if a given plugin is in the list of enabled enrolment plugins. | |
enrol_output_fragment_user_enrolment_form ($args) | |
Serve the user enrolment form as a fragment. | |
enrol_selfenrol_available ($courseid) | |
Is there a chance users might self enrol. | |
enrol_send_welcome_email_options () | |
Send welcome email "from" options. | |
enrol_sharing_course ($user1, $user2) | |
Do these two students share any course? | |
enrol_try_internal_enrol ($courseid, $userid, $roleid=null, $timestart=0, $timeend=0) | |
Try to enrol user via default internal auth plugin. | |
enrol_user_delete ($user) | |
Called when user is about to be deleted. | |
enrol_user_sees_own_courses ($user=null) | |
Can user access at least one enrolled course? | |
object | environment_check ($version, $env_select) |
This function will check for everything (DB, PHP and PHP extensions for now) returning an array of environment_result objects. | |
environment_check_database ($version, $env_select) | |
This function will check if database requirements are satisfied. | |
environment_check_moodle ($version, $env_select) | |
This function will check if Moodle requirements are satisfied. | |
environment_check_pcre_unicode ($version, $env_select) | |
Looks for buggy PCRE implementation, we need unicode support in Moodle... | |
environment_check_php ($version, $env_select) | |
This function will check if php requirements are satisfied. | |
environment_check_php_extensions ($version, $env_select) | |
This function will check if php extensions requirements are satisfied. | |
environment_check_php_settings ($version, $env_select) | |
This function will check if php extensions requirements are satisfied. | |
environment_check_unicode ($version, $env_select) | |
This function will check if unicode database requirements are satisfied. | |
environment_custom_checks ($version, $env_select) | |
This function will do the custom checks. | |
environment_get_errors ($environment_results) | |
Returns array of critical errors in plain text format. | |
environment_verify_plugin ($plugin, $pluginxml) | |
Checks if a plugin tag has a name attribute and it matches the plugin being tested. | |
error () | |
events_cleanup () | |
events_cron () | |
events_dequeue () | |
events_dispatch () | |
events_get_cached () | |
events_get_handlers () | |
events_is_registered () | |
events_load_def () | |
events_pending_count () | |
events_process_queued_handler () | |
events_queue_handler () | |
events_trigger () | |
events_trigger_legacy () | |
events_uninstall () | |
events_update_definition () | |
external_function_info () | |
extract_draft_file_urls_from_text ($text, $forcehttps=false, $contextid=null, $component=null, $filearea=null, $itemid=null, $filename=null) | |
Factory method for extracting draft file links from arbitrary text using regular expressions. | |
fetch_context_capabilities () | |
static | fill_classmap_renames_cache () |
Records all class renames that have been made to facilitate autoloading. | |
moodle_text_filter::filter ($text, array $options=array()) | |
Override this function to actually implement the filtering. | |
moodle_text_filter::filter_stage_post_clean (string $text, array $options) | |
Filter HTML text at the very end after text is sanitised. | |
moodle_text_filter::filter_stage_pre_clean (string $text, array $options) | |
Filter HTML text before sanitising text. | |
moodle_text_filter::filter_stage_pre_format (string $text, array $options) | |
Filter text before changing format to HTML. | |
moodle_text_filter::filter_stage_string (string $text, array $options) | |
Filter simple text coming from format_string(). | |
filter_manager::filter_string ($string, $context) | |
Filter a piece of string. | |
null_filter_manager::filter_string ($string, $context) | |
As for the equivalent filter_manager method. | |
performance_measuring_filter_manager::filter_string ($string, $context) | |
Filter a piece of string. | |
filter_manager::filter_text ($text, $context, array $options=array(), array $skipfilters=null) | |
Filter some text. | |
filter_text () | |
null_filter_manager::filter_text ($text, $context, array $options=array(), array $skipfilters=null) | |
As for the equivalent filter_manager method. | |
performance_measuring_filter_manager::filter_text ($text, $context, array $options=array(), array $skipfilters=null) | |
Filter some text. | |
fix_align_rtl ($align) | |
Returns swapped left<=> right if in RTL environment. | |
format_backtrace ($callers, $plaintext=false) | |
Formats a backtrace ready for output. | |
format_module_intro ($module, $activity, $cmid, $filter=true) | |
Formats activity intro text. | |
format_string ($string, $striplinks=true, $options=null) | |
Given a simple string, this function returns the string processed by enabled string filters if $CFG->filterall is enabled. | |
format_text ($text, $format=FORMAT_MOODLE, $options=null, $courseiddonotuse=null) | |
Given text in a variety of format codings, this function returns the text as safe HTML. | |
format_text_email ($text, $format) | |
Given text in a variety of format codings, this function returns the text as plain text suitable for plain email. | |
format_text_menu () | |
Just returns an array of text formats suitable for a popup menu. | |
format_weeks_get_section_dates () | |
formerr () | |
generate_email_supportuser () | |
generate_image_thumbnail ($filepath, $width, $height) | |
Generates a thumbnail for the given image. | |
generate_image_thumbnail_from_image ($original, $imageinfo, $width, $height) | |
Generates a thumbnail for the given image string. | |
generate_image_thumbnail_from_string ($filedata, $width, $height) | |
Generates a thumbnail for the given image string. | |
generate_page_type_patterns ($pagetype, $parentcontext=null, $currentcontext=null) | |
Given a specific page type, parent context and currect context, return all the page type patterns that might be used by this block. | |
generate_uuid () | |
get_accesshide ($text, $elem='span', $class='', $attrs='') | |
Return a HTML element with the class "accesshide", for accessibility. | |
static | get_all_component_hash (?array $components=null) |
Returns hash of all core + plugin /db/ directories. | |
static | get_all_directory_hashes (?array $directories=null) |
Get the hashes of all core + plugin /db/ directories. | |
get_all_mods () | |
get_all_sections () | |
get_all_subcategories () | |
get_all_user_name_fields () | |
static | get_all_versions () |
Returns hash of all versions including core and all plugins. | |
static | get_all_versions_hash () |
Returns hash of all versions including core and all plugins. | |
get_array_of_activities (int $courseid, bool $usecache=false) | |
For a given course, returns an array of course activity objects Each item in the array contains he following properties: | |
get_backpack_settings ($userid, $refresh=false) | |
Returns external backpack settings and badges from this backpack. | |
get_backup_temp_directory ($directory) | |
Get the full path of a directory under $CFG->backuptempdir. | |
get_browser_version_classes () | |
get_categories () | |
get_category_courses_array () | |
get_category_courses_array_recursively () | |
get_child_categories () | |
get_child_contexts () | |
get_clam_error_code () | |
static | get_component_classes_in_namespace ($component=null, $namespace='') |
Returns all classes in a component matching the provided namespace. | |
static | get_component_directory ($component) |
Return exact absolute path to a plugin directory. | |
static | get_component_from_classname (string $classname) |
Fetch the component name from a Moodle PSR-like namespace. | |
static | get_component_list () |
Returns a list of frankenstyle component names and their paths, for all components (plugins and subsystems). | |
static | get_component_names (bool $includecore=false,) |
Returns a list of frankenstyle component names, including all plugins, subplugins, and subsystems. | |
get_context_instance ($contextlevel, $instance=0, $strictness=IGNORE_MISSING) | |
Get the context instance as an object. | |
get_context_instance_by_id () | |
get_context_url () | |
get_contextlevel_name () | |
static | get_core_api_names () |
Returns the list of available API names. | |
static | get_core_apis () |
List all core APIs and their attributes. | |
get_core_subsystems ($fullpaths=false) | |
List all core subsystems and their location. | |
static | get_core_subsystems () |
List all core subsystems and their location. | |
get_course_and_cm_from_cmid ($cmorid, $modulename='', $courseorid=0, $userid=0) | |
Efficiently retrieves the $course (stdclass) and $cm (cm_info) objects, given a cmid. | |
get_course_and_cm_from_instance ($instanceorid, $modulename, $courseorid=0, $userid=0) | |
Efficiently retrieves the $course (stdclass) and $cm (cm_info) objects, given an instance id or record and module name. | |
get_course_category () | |
get_course_category_tree () | |
get_course_context () | |
get_course_participants () | |
get_course_section () | |
get_courseid_from_context () | |
get_courses_page () | |
get_courses_wmanagers () | |
get_current_group () | |
get_device_cfg_var_name () | |
get_device_type () | |
get_device_type_list () | |
get_docs_url ($path=null) | |
Returns the Moodle Docs URL in the users language for a given 'More help' link. | |
get_enrolled_join (context $context, $useridcolumn, $onlyactive=false, $onlysuspended=false, $enrolid=0) | |
Returns array with sql joins and parameters returning all ids of users enrolled into course. | |
get_enrolled_sql (context $context, $withcapability='', $groupids=0, $onlyactive=false, $onlysuspended=false, $enrolid=0) | |
Returns array with sql code and parameters returning all ids of users enrolled into course. | |
get_enrolled_users (context $context, $withcapability='', $groupids=0, $userfields='u.*', $orderby=null, $limitfrom=0, $limitnum=0, $onlyactive=false) | |
Returns list of users enrolled into course. | |
get_enrolled_with_capabilities_join (context $context, $prefix='', $capability='', $groupids=0, $onlyactive=false, $onlysuspended=false, $enrolid=0) | |
Returns an array of joins, wheres and params that will limit the group of users to only those enrolled and with given capability (if specified). | |
get_environment_for_version ($version, $env_select) | |
This function will return the xmlized data belonging to one Moodle version. | |
get_exception_info ($ex) | |
Returns detailed information about specified exception. | |
get_extra_user_fields () | |
get_extra_user_fields_sql () | |
get_fast_modinfo ($courseorid, $userid=0, $resetonly=false) | |
Returns reference to full info about modules in course (including visibility). | |
get_file_argument () | |
Extracts file argument either from file parameter or PATH_INFO. | |
get_file_url () | |
get_formatted_help_string ($identifier, $component, $ajax=false, $a=null) | |
Get the value of a help string fully prepared for display in the current language. | |
get_generic_section_name () | |
get_group_picture_url ($group, $courseid, $large=false, $includetoken=false) | |
Return the url to the group picture. | |
get_html_lang ($dir=false) | |
Return a string containing 'lang', xml:lang and optionally 'dir' HTML attributes. | |
get_html_lang_attribute_value (string $langcode) | |
Converts a language code to hyphen-separated format in accordance to the BCP47 syntax . | |
get_last_soap_messages ($connection) | |
get_latest_version_available ($version, $env_select) | |
This function will return the most recent version in the environment.xml file previous or equal to the version requested. | |
get_level ($element) | |
Here all the restrict functions are coded to be used by the environment checker. | |
get_list_of_environment_versions ($contents) | |
This function will return the list of Moodle versions available. | |
get_list_of_timezones () | |
get_local_referer ($stripquery=true) | |
Returns the cleaned local URL of the HTTP_REFERER less the URL query string parameters if required. | |
get_logs () | |
get_logs_usercourse () | |
get_logs_userday () | |
get_module_metadata () | |
get_moodle_cookie () | |
Gets a moodle cookie with a weakly encrypted username. | |
static | core\event::get_other_mapping () |
Used for maping events on restore. | |
get_parent_contextid () | |
get_parent_contexts () | |
performance_measuring_filter_manager::get_performance_summary () | |
Return performance information, in the form required by get_performance_info(). | |
static | get_plugin_directory ($plugintype, $pluginname) |
Returns the exact absolute path to plugin directory. | |
static | get_plugin_list ($plugintype) |
Get list of plugins of given type. | |
static | get_plugin_list_with_class ($plugintype, $class, $file=null) |
Get a list of all the plugins of a given type that define a certain class in a certain file. | |
static | get_plugin_list_with_file ($plugintype, $file, $include=false) |
Get a list of all the plugins of a given type that contain a particular file. | |
get_plugin_list_with_file () | |
get_plugin_types ($fullpaths=true) | |
Lists all plugin types. | |
static | get_plugin_types () |
Get list of available plugin types together with their location. | |
static | get_plugin_types_with_subplugins () |
Returns list of plugin types that allow subplugins. | |
get_print_section_cm_text () | |
get_real_size ($size=0) | |
Converts numbers like 10M into bytes. | |
get_recent_enrolments () | |
get_records_csv () | |
get_referer () | |
get_related_contexts_string () | |
get_request_storage_directory ($exceptiononerror=true, bool $forcecreate=false) | |
Get a per-request storage directory in the tempdir. | |
get_role_context_caps () | |
get_roles_on_exact_context () | |
get_roles_with_assignment_on_context () | |
get_selected_theme_for_device_type () | |
get_separator () | |
Return the breadcrumb trail navigation separator. | |
filter_manager::get_string_filters ($context) | |
Get all the filters that apply to a given context for calls to format_string. | |
static | get_subplugins ($component) |
Return all subplugins of this component. | |
static | get_subsystem_directory ($subsystem) |
Returns the exact absolute path to plugin directory. | |
static | get_subtype_parent ($type) |
Returns parent of this subplugin type. | |
get_system_context ($cache=true) | |
Returns system context or null if can not be created yet. | |
filter_manager::get_text_filters ($context) | |
Get all the filters that apply to a given context for calls to format_text. | |
get_texteditor ($editorname) | |
Returns instance of text editor. | |
get_timezone_offset () | |
get_timezone_record () | |
core\task::get_trace () | |
Get the progress_trace. | |
get_user_access_sitewide () | |
get_user_courses_bycap () | |
get_user_device_type () | |
get_user_field_name () | |
get_user_timezone_offset () | |
grade_print_tabs ($active_type, $active_plugin, $plugin_info, $return=false) | |
Print grading plugin selection tab-based navigation. | |
groupmode () | |
groups_course_module_visible () | |
groups_filter_users_by_course_module_visible () | |
groups_get_all_groups_for_courses () | |
handle_soap_wsdl_request ($wsdlfile, $address=false) | |
static | has_monologo_icon (string $plugintype, string $pluginname) |
Checks for the presence of monologo icons within a plugin. | |
moodle_text_filter::hash () | |
hash_local_config_cache () | |
Calculate a proper hash to be able to invalidate stale cached configs. | |
hide_event () | |
highlight ($needle, $haystack, $matchcase=false, $prefix='< span class="highlight">', $suffix='</span >') | |
This function will highlight search words in a given string. | |
highlightfast ($needle, $haystack) | |
This function will highlight instances of $needle in $haystack. | |
html_to_text ($html, $width=75, $dolinks=true) | |
Given HTML text, make it into plain text using external function. | |
httpsrequired () | |
imagecopybicubic ($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) | |
Copies a rectangular portion of the source image to another rectangle in the destination image. | |
ini_get_bool ($ini_get_arg) | |
This function makes the return value of ini_get consistent if you are setting server directives through the .htaccess file in apache. | |
init_performance_info () | |
Initializes our performance info early. | |
initialise_fullme () | |
Initialises $FULLME and friends. | |
initialise_fullme_cli () | |
Initialises $FULLME and friends for command line scripts. | |
initialise_local_config_cache () | |
Cache any immutable config locally to avoid constant DB lookups. | |
install_cli_database (array $options, $interactive) | |
Install Moodle DB, config.php must exist, there must not be any tables in db yet. | |
install_db_validate ($database, $dbhost, $dbuser, $dbpass, $dbname, $prefix, $dboptions) | |
This is in function because we want the /install.php to parse in PHP4. | |
install_generate_configphp ($database, $cfg) | |
Returns content of config.php file. | |
install_guess_wwwroot () | |
Tries to detect the right www root setting. | |
install_helpbutton ($url, $title='') | |
Print help button. | |
install_ini_get_bool ($ini_get_arg) | |
Copy of. | |
install_init_dataroot ($dataroot, $dirpermissions) | |
Creates dataroot if not exists yet, makes sure it is writable, add lang directory and add .htaccess just in case it works. | |
object | install_print_footer ($config, $reload=false) |
Prints installation page header, we can not use weblib yet in installer. | |
object | install_print_header ($config, $stagename, $heading, $stagetext, $stageclass="alert-info") |
Prints installation page header, we can not use weblib yet in installer. | |
object | install_print_help_page ($help) |
Prints complete help page used during installation. | |
static | filter_manager::instance () |
Factory method. | |
static | invalidate_opcode_php_cache ($file) |
Invalidate opcode cache for given file, this is intended for php files that are stored in dataroot. | |
iplookup_find_location ($ip) | |
Returns location information. | |
static | is_core_api ($apiname) |
Return true if apiname is a core API. | |
static | is_core_subsystem ($subsystemname) |
Return true if subsystemname is core subsystem. | |
is_course_participant () | |
is_early_init ($backtrace) | |
This function encapsulates the tests for whether an exception was thrown in early init – either during setup.php or during init of $OUTPUT. | |
is_enrolled (context $context, $user=null, $withcapability='', $onlyactive=false) | |
Returns true if user is enrolled (is participating) in course this is intended for students and teachers. | |
is_https () | |
Determines whether or not the Moodle site is being served over HTTPS. | |
is_in_popup () | |
Returns true if the page is displayed in a popup window. | |
is_major_upgrade_required () | |
Check whether a major upgrade is needed. | |
is_moodle_cookie_secure () | |
Determine wether the secure flag should be set on cookies. | |
static | is_valid_plugin_name ($plugintype, $pluginname) |
This method validates a plug name. | |
is_web_crawler () | |
core\hook::isPropagationStopped () | |
Is propagation stopped? | |
js_minify () | |
ldap_addslashes ($text) | |
Quote control characters in AttributeValue parts of a RelativeDistinguishedName used in LDAP distinguished names - See RFC 4514/2253. | |
ldap_connect_moodle ($host_url, $ldap_version, $user_type, $bind_dn, $bind_pw, $opt_deref, &$debuginfo, $start_tls=false) | |
Tries connect to specified ldap servers. | |
ldap_filter_addslashes ($text) | |
Quote control characters in texts used in LDAP filters - see RFC 4515/2254. | |
ldap_find_userdn ($ldapconnection, $username, $contexts, $objectclass, $search_attrib, $search_sub) | |
Search specified contexts for username and return the user dn like: cn=username,ou=suborg,o=org. | |
if(!defined('LDAP_DN_SPECIAL_CHARS')) if(!defined( 'LDAP_DN_SPECIAL_CHARS_QUOTED_NUM')) if(!defined('LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA')) if(!defined( 'LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA_REGEX')) | ldap_get_dn_special_chars () |
The order of the special characters in these arrays IS IMPORTANT. | |
ldap_get_entries_moodle ($ldapconnection, $searchresult) | |
Returns values like ldap_get_entries but is binary compatible and returns all attributes as array. | |
ldap_getdefaults () | |
Initializes needed variables for ldap-module. | |
ldap_isgroupmember ($ldapconnection, $userid, $group_dns, $member_attrib) | |
Checks if user belongs to specific group(s) or is in a subtree. | |
ldap_normalise_objectclass ($objectclass, $default=' *') | |
Normalise the supplied objectclass filter. | |
ldap_paged_results_supported ($ldapversion, $ldapconnection=null) | |
Check if we can use paged results (see RFC 2696). | |
ldap_stripslashes ($text) | |
Unquote control characters in AttributeValue parts of a RelativeDistinguishedName used in LDAP distinguished names - See RFC 4514/2253. | |
if(!defined( 'ROOTDSE')) if(!defined('LDAP_PAGED_RESULTS_CONTROL')) if(!defined( 'LDAP_DEFAULT_PAGESIZE')) | ldap_supported_usertypes () |
Returns predefined user types. | |
link_arrow_left ($text, $url='', $accesshide=false, $addclass='', $addparams=[]) | |
Return the left arrow with text ('previous'), and optionally embedded in a link. | |
link_arrow_right ($text, $url='', $accesshide=false, $addclass='', $addparams=[]) | |
Return the right arrow with text ('next'), and optionally embedded in a link. | |
load_course_context () | |
load_environment_xml ($env_select=ENV_SELECT_NEWER) | |
This function will load the environment.xml file and xmlize it. | |
filter_manager::load_filters ($context) | |
Load all the filters required by this context. | |
static | load_renamed_classes (?string $fulldir) |
Loads the db/renamedclasses.php file from the given directory. | |
load_role_access_by_context () | |
core\task::log ($message, $depth=1) | |
Log a message to the progress tracer. | |
core\task::log_finish ($message, $depth=0) | |
Log an end message to the progress tracer. | |
core\task::log_start ($message, $depth=0) | |
Log a start message to the progress tracer. | |
login_attempt_failed ($user) | |
To be called after failed user login. | |
login_attempt_valid ($user) | |
To be called after valid user login. | |
login_captcha_enabled () | |
Returns whether the captcha element is enabled for the login form, and the admin settings fulfil its requirements. | |
login_is_lockedout ($user) | |
Verify if user is locked out. | |
login_lock_account ($user) | |
Lockout user and send notification email. | |
login_unlock_account ($user, bool $notify=false) | |
Unlock user account and reset timers. | |
make_backup_temp_directory ($directory, $exceptiononerror=true) | |
Create a directory under $CFG->backuptempdir and make sure it is writable. | |
make_cache_directory ($directory, $exceptiononerror=true) | |
Create a directory under cachedir and make sure it is writable. | |
make_categories_list () | |
make_categories_options () | |
make_editing_buttons () | |
filter_manager::make_filter_object ($filtername, $context, $localconfig) | |
Factory method for creating a filter. | |
performance_measuring_filter_manager::make_filter_object ($filtername, $context, $localconfig) | |
Factory method for creating a filter. | |
make_localcache_directory ($directory, $exceptiononerror=true) | |
Create a directory under localcachedir and make sure it is writable. | |
make_request_directory (bool $exceptiononerror=true, bool $forcecreate=false) | |
Create a per-request directory and make sure it is writable. | |
make_soap_fault ($faultcode, $faultstring, $faultactor='', $detail='', $faultname='', $headerfault='') | |
make_temp_directory ($directory, $exceptiononerror=true) | |
Create a directory under tempdir and make sure it is writable. | |
make_unique_writable_directory ($basedir, $exceptiononerror=true) | |
Create a new unique directory within the specified directory. | |
make_upload_directory ($directory, $exceptiononerror=true) | |
Create a directory under dataroot and make sure it is writable. | |
mark_context_dirty () | |
markdown_to_html ($text) | |
Given Markdown formatted text, make it into XHTML using external function. | |
matching_page_type_patterns ($pagetype) | |
Given a specific page type, return all the page type patterns that might match it. | |
matching_page_type_patterns_from_pattern ($pattern) | |
Give an specific pattern, return all the page type patterns that would also match it. | |
mdie ($msg='', $errorcode=1) | |
Print an error to STDOUT and exit with a non-zero code. | |
me () | |
Returns the name of the current script, WITH the querystring portion. | |
merge_query_params (array &$target, array $values) | |
Merge parsed POST chunks. | |
message_add_contact () | |
message_block_contact () | |
message_can_delete_message () | |
message_can_post_message () | |
message_contact_link () | |
message_count_blocked_users () | |
message_count_messages () | |
message_count_unread_messages () | |
message_current_user_is_involved () | |
message_delete_message () | |
message_get_blocked_users () | |
message_get_contact () | |
message_get_contact_add_remove_link () | |
message_get_contact_block_link () | |
message_get_contacts () | |
message_get_course_contexts () | |
message_get_fragment () | |
message_get_history () | |
message_get_recent_conversations ($userorid, $limitfrom=0, $limitto=100) | |
message_get_recent_notifications () | |
message_history_link () | |
message_is_user_blocked () | |
message_is_user_non_contact_blocked () | |
message_mark_message_read () | |
message_mark_messages_read () | |
message_move_userfrom_unread2read () | |
message_remove_contact () | |
message_remove_url_params () | |
message_search () | |
message_shorten_message () | |
message_unblock_contact () | |
min_clean_param ($value, $type) | |
Minimalistic parameter cleaning function. | |
min_enable_zlib_compression () | |
This method tries to enable output compression if possible. | |
min_fix_utf8 ($value) | |
Minimalistic UTF-8 sanitisation. | |
min_get_maximum_revision () | |
Get the highest possible currently valid revision number. | |
min_get_minimum_revision () | |
Get the lowest possible currently valid revision number. | |
min_get_slash_argument ($clean=true) | |
Returns the slashargument part of the URL. | |
min_is_revision_valid_and_current (int $revision) | |
Helper function to determine if the given revision number is valid. | |
min_optional_param ($name, $default, $type) | |
Minimalistic library, usable even when no other moodle libs are loaded. | |
mod_page_type_list ($pagetype, $parentcontext=null, $currentcontext=null) | |
Generates the page type list for a module by either locating and using the modules callback or by generating a default list. | |
moodle_minimum_php_version_is_met ($haltexecution=false) | |
Tests the current PHP version against Moodle's minimum requirement. | |
moodle_require_minimum_php_version () | |
A set of PHP-compatible convenience functions to check Moodle minimum PHP version in a unified place. | |
move_category () | |
my_page_type_list ($pagetype, $parentcontext=null, $currentcontext=null) | |
Generates the page type list for the my moodle page. | |
mygroupid () | |
navmenu () | |
navmenulist ($course, $sections, $modinfo, $strsection, $strjumpto, $width=50, $cmid=0) | |
Returns a popup menu with course activity modules. | |
static | normalize_component ($component) |
Normalize the component name using the "frankenstyle" rules. | |
static | normalize_componentname ($componentname) |
Normalize the component name. | |
normalize_version ($version) | |
This function will normalize any version to just a serie of numbers separated by dots. | |
notice ($message, $link='', $course=null) | |
Print a message and exit. | |
notify () | |
obfuscate_email ($email) | |
Given an email address, this function will return an obfuscated version of it. | |
obfuscate_mailto ($email, $label='', $dimmed=false, $subject='', $body='') | |
This function uses the obfuscate_email() and obfuscate_text() to generate a fully obfuscated email link, ready to use. | |
obfuscate_text ($plaintext) | |
This function takes some text and replaces about half of the characters with HTML entity equivalents. | |
p ($var) | |
Add quotes to HTML characters. | |
page_doc_link ($text='') | |
Returns a string containing a link to the user documentation for the current page. | |
page_get_doc_link_path (moodle_page $page) | |
Returns the path to use when constructing a link to the docs. | |
password_compat_not_supported () | |
plagiarism_get_file_results ($cmid, $userid, $file) | |
returns array of plagiarism details about specified file | |
plagiarism_get_form_elements_module () | |
if(!defined( 'MOODLE_INTERNAL')) | plagiarism_get_links ($linkarray) |
plagiarismlib.php - Contains core Plagiarism related functions. | |
plagiarism_load_available_plugins () | |
Helper function - also loads lib file of plagiarism plugin. | |
plagiarism_print_disclosure ($cmid) | |
Function that prints the student disclosure notifying that the files will be checked for plagiarism. | |
plagiarism_save_form_elements () | |
plagiarism_update_status ($course, $cm) | |
Allows a plagiarism plugin to print a button/link at the top of activity overview report pages. | |
preload_course_contexts () | |
prevent_form_autofill_password () | |
object | print_arrow ($direction='up', $strsort=null, $return=false) |
Returns an image of an up or down arrow, used for column sorting. | |
print_badge_image (badge $badge, stdClass $context, $size='small') | |
Print badge image. | |
print_category_info () | |
print_checkbox () | |
print_collapsible_region ($contents, $classes, $id, $caption, $userpref='', $default=false, $return=false) | |
Print (or return) a collapsible region, that has a caption that can be clicked to expand or collapse the region. | |
print_collapsible_region_end ($return=false) | |
Close a region started with print_collapsible_region_start. | |
print_collapsible_region_start ($classes, $id, $caption, $userpref='', $default=false, $return=false, $extracontent=null) | |
Print (or return) the start of a collapsible region. | |
print_container () | |
print_container_end () | |
print_container_start () | |
print_context_name () | |
print_continue () | |
print_course () | |
print_course_search () | |
print_courses () | |
print_error ($errorcode, $module='error', $link='', $a=null, $debuginfo=null) | |
Abort execution by throwing of a general exception, default exception handler displays the error message in most cases. | |
print_grade_menu ($courseid, $name, $current, $includenograde=true, $return=false) | |
Prints a grade menu (as part of an existing form) with help showing all possible numerical grades and scales. | |
print_grade_plugin_selector ($plugin_info, $active_type, $active_plugin, $return=false) | |
Print grading plugin selection popup form. | |
print_group_picture ($group, $courseid, $large=false, $return=false, $link=true, $includetoken=false) | |
Print a specified group's avatar. | |
print_header () | |
print_header_simple () | |
print_location_comment ($file, $line, $return=false) | |
Outputs a HTML comment to the browser. | |
print_log () | |
print_log_csv () | |
print_log_ods () | |
print_log_xls () | |
print_maintenance_message () | |
Prints a maintenance message from $CFG->maintenance_message or default if empty. | |
print_mnet_log () | |
print_my_moodle () | |
print_navigation () | |
print_overview () | |
print_password_policy () | |
Returns a localized sentence in the current language summarizing the current password policy. | |
print_recent_activity () | |
print_recent_activity_note ($time, $user, $text, $link, $return=false, $viewfullnames=null) | |
Display a recent activity note. | |
print_remote_course () | |
print_remote_host () | |
print_scale_menu_helpbutton () | |
print_section () | |
print_section_add_menus () | |
print_side_block () | |
print_tabs ($tabrows, $selected=null, $inactive=null, $activated=null, $return=false) | |
Returns a string containing a nested list, suitable for formatting into tabs with CSS. | |
print_textarea () | |
print_whole_category_list () | |
process_environment_bypass ($xml, &$result) | |
This function will post-process the result record by executing the specified function, modifying it as necessary, also a custom message will be added to the result object to be printed by the display layer. | |
process_environment_messages ($xml, &$result) | |
This function will detect if there is some message available to be added to the result in order to clarify enviromental details. | |
process_environment_restrict ($xml, &$result) | |
This function will post-process the result record by executing the specified function, modifying it as necessary, also a custom message will be added to the result object to be printed by the display layer. | |
process_environment_result ($element, &$result) | |
Once the result has been determined, look in the XML for any messages, or other things that should be done depending on the outcome. | |
process_manual_award ($recipientid, $issuerid, $issuerrole, $badgeid) | |
process_manual_revoke ($recipientid, $issuerid, $issuerrole, $badgeid) | |
Manually revoke awarded badges. | |
process_new_icon ($context, $component, $filearea, $itemid, $originalfile, $preferpng=false) | |
Stores optimised icon images in icon file area. | |
profile_display_badges () | |
profile_display_fields () | |
profile_edit_category () | |
profile_edit_field () | |
proxy_log_callback ($code) | |
Add http stream instrumentation. | |
purify_html ($text, $options=array()) | |
KSES replacement cleaning function - uses HTML Purifier. | |
put_records_csv () | |
qualified_me () | |
Guesses the full URL of the current script. | |
question_add_tops () | |
question_is_only_toplevel_category_in_context () | |
raise_memory_limit ($newlimit) | |
Function to raise the memory limit to a new value. | |
random_bytes_emulate ($length) | |
Try to generate cryptographically secure pseudo-random bytes. | |
rebuild_contexts () | |
moodle_database | rebuild_course_cache (int $courseid=0, bool $clearonly=false, bool $partialrebuild=false) |
Rebuilds or resets the cached list of course activities stored in MUC. | |
rebuildnolinktag ($text) | |
This function is used to rebuild the <nolink> tag because some formats (PLAIN and WIKI) will transform it to html entities. | |
recaptcha_check_response ($verifyurl, $privkey, $remoteip, $response) | |
Calls an HTTP POST function to verify if the user's response was correct. | |
recaptcha_get_challenge_html ($apiurl, $pubkey, $lang=null, bool $compactmode=false) | |
Gets the challenge HTML This is called from the browser, and the resulting reCAPTCHA HTML widget is embedded within the HTML form it was called from. | |
recaptcha_lang ($lang=null) | |
Returns the language code the reCAPTCHA element should use. | |
redirect ($url, $message='', $delay=null, $messagetype=core\output\notification::NOTIFY_INFO) | |
Redirects the user to another page, after printing a notice. | |
redirect_if_major_upgrade_required () | |
Redirect to the Notifications page if a major upgrade is required, and terminate the current user session. | |
reduce_memory_limit ($newlimit) | |
Function to reduce the memory limit to a new value. | |
replace_ampersands_not_followed_by_entity ($string) | |
Given a string, performs a negative lookahead looking for any ampersand character that is not followed by a proper HTML entity. | |
report_insights_context_insights (\context $context) | |
require_phpunit_isolation () | |
A helper function for deprecated files to use to ensure that, when they are included for unit tests, they are run in an isolated process. | |
require_sesskey () | |
Check the session key using confirm_sesskey(), and cause a fatal error if it does not match. | |
static | filter_manager::reset_caches () |
Resets the caches, usually to be called between unit tests. | |
reset_login_count () | |
reset_text_filters_cache ($phpunitreset=false) | |
Resets some data related to filters, called during upgrade or when general filter settings change. | |
resize_image ($filepath, $width, $height, $forcecanvas=false) | |
Resize an image from an image path. | |
resize_image_from_image ($original, $imageinfo, $width, $height, $forcecanvas=false) | |
Resize an image from an image object. | |
resourcelib_embed_general ($fullurl, $title, $clicktoopen, $mimetype) | |
Returns general link or file embedding html. | |
resourcelib_embed_image ($fullurl, $title) | |
Returns image embedding html. | |
resourcelib_embed_pdf ($fullurl, $title, $clicktoopen) | |
Returns general link or pdf embedding html. | |
resourcelib_get_displayoptions (array $enabled, $current=null) | |
Returns list of available display options. | |
resourcelib_get_extension ($fullurl) | |
Looks for the extension. | |
resourcelib_guess_url_mimetype ($fullurl) | |
Tries to guess correct mimetype for arbitrary URL. | |
resourcelib_try_file_migration ($filepath, $cmid, $courseid, $component, $filearea, $itemid) | |
Try on demand migration of file from old course files. | |
restrict_php_version (&$result, $version) | |
Check if the current PHP version is greater than or equal to an unsupported version. | |
restrict_php_version_7 (&$result) | |
Check if the current PHP version is greater than or equal to PHP version 7. | |
restrict_php_version_71 (&$result) | |
Check if the current PHP version is greater than or equal to PHP version 7.1. | |
restrict_php_version_72 (&$result) | |
Check if the current PHP version is greater than or equal to PHP version 7.2. | |
restrict_php_version_73 (&$result) | |
Check if the current PHP version is greater than or equal to PHP version 7.3. | |
restrict_php_version_74 (&$result) | |
Check if the current PHP version is greater than or equal to PHP version 7.4. | |
restrict_php_version_80 ($result) | |
Check if the current PHP version is greater than or equal to PHP version 8.0. | |
restrict_php_version_81 ($result) | |
Check if the current PHP version is greater than or equal to PHP version 8.1. | |
restrict_php_version_82 ($result) | |
Check if the current PHP version is greater than or equal to PHP version 8.2. | |
restrict_php_version_83 ($result) | |
Check if the current PHP version is greater than or equal to PHP version 8.3. | |
right_to_left () | |
Returns true if the user is using a right-to-left language. | |
s ($var) | |
Add quotes to HTML characters. | |
object | search_generate_SQL ($parsetree, $datafield, $metafield, $mainidfield, $useridfield, $userfirstnamefield, $userlastnamefield, $timefield, $instancefield, $tagfields=[]) |
Primitive function to generate a SQL string from a parse tree. | |
search_generate_text_SQL ($parsetree, $datafield, $metafield, $mainidfield, $useridfield, $userfirstnamefield, $userlastnamefield, $timefield, $instancefield) | |
Primitive function to generate a SQL string from a parse tree using TEXT indexes. | |
send_headers ($contenttype, $cacheable=true) | |
Send the HTTP headers that Moodle requires. | |
serialise_tool_proxy () | |
session_get_instance () | |
session_get_realuser () | |
session_is_legacy () | |
session_is_loggedinas () | |
session_kill () | |
session_kill_all () | |
session_kill_user () | |
session_loginas () | |
session_set_user () | |
session_touch () | |
sesskey () | |
Makes sure that $USER->sesskey exists, if $USER itself exists. | |
set_access_log_user () | |
Webserver access user logging. | |
set_current_group () | |
set_debugging ($level, $debugdisplay=null) | |
Alter debugging level for the current request, the change is not saved in database. | |
set_moodle_cookie ($username) | |
Sets a moodle cookie with a weakly encrypted username. | |
set_user_device_type () | |
moodle_text_filter::setup ($page, $context) | |
Setup page with filter requirements and other prepare stuff. | |
setup_get_remote_url () | |
Get the URL that PHP/the web server thinks it is serving. | |
filter_manager::setup_page_for_filters ($page, $context) | |
Setup page with filters requirements and other prepare stuff. | |
filter_manager::setup_page_for_globally_available_filters ($page) | |
Setup the page for globally available filters. | |
setup_validate_php_configuration () | |
This function verifies the sanity of PHP configuration and stops execution if anything critical found. | |
show_event () | |
signup_captcha_enabled () | |
Returns whether or not the captcha element is enabled, and the admin settings fulfil its requirements. | |
signup_get_user_confirmation_authplugin () | |
Check if user confirmation is enabled on this site and return the auth plugin handling registration if enabled. | |
signup_is_enabled () | |
Check if sign-up is enabled in the site. | |
signup_setup_new_user ($user) | |
Add the missing fields to a user that is going to be created. | |
signup_validate_data ($data, $files) | |
Validates the standard sign-up data (except recaptcha that is validated by the form element). | |
site_scale_used () | |
skip_main_destination () | |
soap_call ($connection, $call, $params) | |
Make a call to a SoapClient. | |
soap_connect ($wsdl, $trace=false) | |
Create a new SoapClient object. | |
soap_encode ($value, $name, $type, $namespace, $encode=XSD_STRING) | |
soap_encode_array ($value, $name, $type, $namespace) | |
soap_encode_object ($value, $name, $type, $namespace) | |
soap_serve ($wsdl, $functions) | |
stats_check_uptodate ($courseid=0) | |
stats_clean_old () | |
Remove old stats data. | |
stats_compare_times ($a, $b) | |
stats_cron_daily ($maxdays=1) | |
Execute daily statistics gathering. | |
stats_cron_monthly () | |
Execute monthly statistics gathering. | |
stats_cron_weekly () | |
Execute weekly statistics gathering. | |
stats_fix_zeros ($stats, $timeafter, $timestr, $line2=true, $line3=false) | |
Fix missing entries in the statistics. | |
stats_get_action_names ($str) | |
stats_get_base_daily ($time=0) | |
Start of day. | |
stats_get_base_monthly ($time=0) | |
Start of month. | |
stats_get_base_weekly ($time=0) | |
Start of week. | |
stats_get_next_day_start ($time) | |
Start of next day. | |
stats_get_next_month_start ($time) | |
Start of next month. | |
stats_get_next_week_start ($time) | |
Start of next week. | |
stats_get_parameters ($time, $report, $courseid, $mode, $roleid=0) | |
stats_get_post_actions () | |
stats_get_report_options ($courseid, $mode) | |
stats_get_start_from ($str) | |
Return starting date of stats processing. | |
stats_get_time_options ($now, $lastweekend, $lastmonthend, $earliestday, $earliestweek, $earliestmonth) | |
stats_get_view_actions () | |
stats_progress ($ident) | |
Print daily cron progress. | |
stats_run_query ($sql, $parameters=array()) | |
Execute individual daily statistics queries. | |
stats_temp_table_clean () | |
Deletes summary logs table for stats calculation. | |
stats_temp_table_create () | |
Create temporary tables to speed up log generation. | |
stats_temp_table_drop () | |
Deletes summary logs table for stats calculation. | |
stats_temp_table_fill ($timestart, $timeend) | |
Fills the temporary stats tables with new data. | |
stats_temp_table_setup () | |
Fills the temporary stats tables with new data. | |
core\hook::stop_propagation () | |
Allows plugins to notify the hook dispatcher that hook propagation should be stopped. | |
strip_links ($string) | |
Given a string, replaces all . | |
strip_pluginfile_content ($source) | |
Removes the usage of Moodle files from a text. | |
strip_querystring ($url) | |
Remove query string from url. | |
tag_add () | |
tag_assign () | |
tag_autocomplete () | |
tag_bulk_delete_instances () | |
tag_cleanup () | |
tag_cloud_sort () | |
tag_compute_correlations () | |
tag_cron () | |
tag_delete () | |
tag_delete_instance () | |
tag_delete_instances () | |
tag_description_set () | |
tag_display_name () | |
tag_find_records () | |
tag_find_tags () | |
tag_get () | |
tag_get_correlated () | |
tag_get_id () | |
tag_get_name () | |
tag_get_related_tags () | |
tag_get_related_tags_csv () | |
tag_get_tags () | |
tag_get_tags_array () | |
tag_get_tags_csv () | |
tag_get_tags_ids () | |
tag_normalize () | |
tag_print_cloud () | |
tag_print_description_box () | |
tag_print_management_box () | |
tag_print_search_box () | |
tag_print_search_results () | |
tag_print_tagged_users_table () | |
tag_print_user_box () | |
tag_print_user_list () | |
tag_process_computed_correlation () | |
tag_record_count () | |
tag_record_tagged_with () | |
tag_rename () | |
tag_set () | |
tag_set_add () | |
tag_set_delete () | |
tag_set_flag () | |
tag_type_set () | |
tag_unset_flag () | |
filter_manager::text_filtering_hash () | |
null_filter_manager::text_filtering_hash () | |
As for the equivalent filter_manager method. | |
text_to_html ($text, $smileyignored=null, $para=true, $newlines=true) | |
Given plain text, makes it into HTML as nicely as possible. | |
textlib_get_instance () | |
theme_get_locked_theme_for_device ($device) | |
Returns the theme named defined in config.php for the given device. | |
theme_is_device_locked ($device) | |
Checks if the given device has a theme defined in config.php. | |
trusttext_active () | |
Is trusttext feature active? | |
trusttext_pre_edit ($object, $field, $context) | |
Must be called before editing of all texts with trust flag. | |
trusttext_trusted ($context) | |
Is current user trusted to enter no dangerous XSS in this context? | |
filter_manager::unload_all_filters () | |
Unloads all filters and other cached information. | |
performance_measuring_filter_manager::unload_all_filters () | |
Unloads all filters and other cached information. | |
unzip_file () | |
update_category_button () | |
update_event () | |
update_log_display_entry () | |
update_login_count () | |
update_module_button () | |
update_timezone_records () | |
upgrade_ensure_not_running ($warningonly=false) | |
Makes sure that upgrade process is not running. | |
user_get_participants () | |
user_get_participants_sql () | |
user_get_total_participants () | |
useredit_shared_definition_preferences () | |
validate_email ($address) | |
Validates an email to make sure it makes sense. | |
validate_login_captcha (string|bool $captcha) | |
Check the submitted captcha is valid or not. | |
wikify_links ($string) | |
This expression turns links into something nice in a text format. | |
workaround_max_input_vars () | |
Try to work around the 'max_input_vars' restriction if necessary. | |
xmlize ($data, $whitespace=1, $encoding='UTF-8', $reporterrors=false) | |
XML parsing function calles into class. | |
zip_files () | |
Variables | |
$branch = '403' | |
$capabilities | |
bool | filterobject::$casesensitive |
whether the match needs to be case sensitive. | |
global | $CFG |
$CFG = new stdClass() | |
global object | $CFG |
$CFG | |
global | core\hub::$CFG |
global | core\task::$CFG |
global | core_admin\local\settings::$CFG |
if(file_exists('install/distrolib.php')) | $config = new stdClass() |
$configfile = './config.php' | |
$content = '' | |
context | moodle_text_filter::$context |
The context we are in. | |
global | $COURSE |
$COURSE = new stdClass() | |
$distro = null | |
if(file_exists(__DIR__.'/../config.php')) | $files = array('boost/style/moodle.css') |
This script prints basic CSS for the installer. | |
int | performance_measuring_filter_manager::$filterscreated = 0 |
number of filter objects created. | |
bool | filterobject::$fullmatch |
whether to match complete words. | |
$hint_admindir = '' | |
$hint_database = '' | |
$hint_dataroot = '' | |
string | filterobject::$hreftagbegin |
HTML to insert before any match. | |
string | filterobject::$hreftagend |
HTML to insert after any match. | |
$languages = get_string_manager()->get_list_of_translations() | |
array | moodle_text_filter::$localconfig |
Any local configuration for this filter in this context. | |
$maturity = MATURITY_STABLE | |
$memlimit = @ini_get('memory_limit') | |
if($hassiteconfig) | $pages = array() |
string | filterobject::$phrase |
this is the phrase that should be matched. | |
foreach($pages as $page) if( $hassiteconfig) if($hassiteconfig) | $plugins = core_plugin_manager::instance()->get_plugins_of_type('tool') |
Add all admin tools. | |
$release = '4.3.6 (Build: 20240812)' | |
$renamedclasses | |
null callable | filterobject::$replacementcallback |
hold a replacement function to be called. | |
null array | filterobject::$replacementcallbackdata |
data to be passed to $replacementcallback. | |
null string | filterobject::$replacementphrase |
replacement text to go inside begin and end. | |
global | $SESSION |
static filter_manager | filter_manager::$singletoninstance |
Holds the singleton instance. | |
global | $SITE |
This file defines settingpages and externalpages under the "badges" section. | |
global | $SITE |
$SITE = $COURSE | |
array | filter_manager::$stringfilternames = array() |
Exploded version of $CFG->stringfilters. | |
moodle_text_filter[][] | filter_manager::$stringfilters = array() |
This list of active filters, by context, for filtering strings. | |
int | performance_measuring_filter_manager::$stringsfiltered = 0 |
number of calls to filter_string. | |
$strmnetedithost = get_string('reviewhostdetails', 'mnet') | |
if(!defined('MOODLE_INTERNAL')) | $strmnetservices = get_string('mnetservices', '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. | |
$tabs = array() | |
$tagareas | |
moodle_text_filter[][] | filter_manager::$textfilters = array() |
This list of active filters, by context, for filtering content. | |
int | performance_measuring_filter_manager::$textsfiltered = 0 |
number of calls to filter_text. | |
stdClass | core\task::$tracestats = null |
global | $USER |
$version = 2023100906.00 | |
null string | filterobject::$workregexp = null |
once initialised, holds the regexp for matching this phrase. | |
null string | filterobject::$workreplacementphrase = null |
once initialised, holds the mangled HTML to replace the regexp with. | |
color | __pad0__ |
background | __pad1__ |
margin | __pad2__ |
padding | __pad3__ |
margin | __pad4__ |
border | __pad5__ |
margin | __pad6__ |
padding | __pad7__ |
$config | admin = 'admin' |
$CFG | admin = $config->admin |
const | AJAX_SCRIPT false |
text | align |
const | ALLOW_GET_PARAMETERS true |
const | ANY_VERSION 'any' |
Any version - special value that can be used in $plugin->dependencies in version.php files. | |
font | Arial |
const | AUTH_CONFIRM_ALREADY 2 |
const | AUTH_CONFIRM_ERROR 3 |
const | AUTH_CONFIRM_FAIL 0 |
Authentication - error codes for user confirm. | |
const | AUTH_CONFIRM_OK 1 |
const | AUTH_DENIED 2 |
Returned when the login was denied (a reason for AUTH_FAIL). | |
const | AUTH_ERROR 4 |
Returned when some error occurred (a reason for AUTH_FAIL). | |
const | AUTH_FAIL 1 |
Returned when the login was unsuccessful. | |
const | AUTH_LOGIN_FAILED 3 |
Can not login, most probably password did not match. | |
const | AUTH_LOGIN_FAILED_RECAPTCHA 6 |
Can not login, failed reCaptcha challenge. | |
const | AUTH_LOGIN_LOCKOUT 4 |
Can not login because user is locked out. | |
const | AUTH_LOGIN_NOUSER 1 |
Can not login because user does not exist. | |
const | AUTH_LOGIN_OK 0 |
Login attempt successful. | |
const | AUTH_LOGIN_SUSPENDED 2 |
Can not login because user is suspended. | |
const | AUTH_LOGIN_UNAUTHORISED 5 |
Can not login becauser user is not authorised. | |
const | AUTH_OK 0 |
Returned when the login was successful. | |
const | AUTH_REMOVEUSER_FULLDELETE 2 |
const | AUTH_REMOVEUSER_KEEP 0 |
const | AUTH_REMOVEUSER_SUSPEND 1 |
const | BACKPACK_MOVE_DOWN 1 |
const | BACKPACK_MOVE_UP -1 |
$CFG | backuptempdir = $CFG->tempdir.'/backup' |
const | BADGE_BACKPACKAPIURL 'https://backpack.openbadges.org' |
const | BADGE_BACKPACKWEBURL 'https://backpack.openbadges.org' |
const | BADGE_CRITERIA_AGGREGATION_ALL 1 |
const | BADGE_CRITERIA_AGGREGATION_ANY 2 |
const | BADGE_CRITERIA_TYPE_ACTIVITY 1 |
const | BADGE_CRITERIA_TYPE_BADGE 7 |
const | BADGE_CRITERIA_TYPE_COHORT 8 |
const | BADGE_CRITERIA_TYPE_COMPETENCY 9 |
const | BADGE_CRITERIA_TYPE_COURSE 4 |
const | BADGE_CRITERIA_TYPE_COURSESET 5 |
const | BADGE_CRITERIA_TYPE_MANUAL 2 |
const | BADGE_CRITERIA_TYPE_OVERALL 0 |
const | BADGE_CRITERIA_TYPE_PROFILE 6 |
const | BADGE_CRITERIA_TYPE_SOCIAL 3 |
const | BADGE_MESSAGE_ALWAYS 1 |
const | BADGE_MESSAGE_DAILY 2 |
const | BADGE_MESSAGE_MONTHLY 4 |
const | BADGE_MESSAGE_NEVER 0 |
const | BADGE_MESSAGE_WEEKLY 3 |
const | BADGE_PERPAGE 50 |
const | BADGE_STATUS_ACTIVE 1 |
const | BADGE_STATUS_ACTIVE_LOCKED 3 |
const | BADGE_STATUS_ARCHIVED 4 |
const | BADGE_STATUS_INACTIVE 0 |
const | BADGE_STATUS_INACTIVE_LOCKED 2 |
const | BADGE_TYPE_COURSE 2 |
const | BADGE_TYPE_SITE 1 |
const | BADGRIO_BACKPACKAPIURL 'https://api.badgr.io/v2' |
const | BADGRIO_BACKPACKWEBURL 'https://badgr.io' |
font | BlinkMacSystemFont |
const | BLOCK_ADDBLOCK_POSITION_CUSTOM -1 |
const | BLOCK_ADDBLOCK_POSITION_DEFAULT 0 |
const | BLOCK_ADDBLOCK_POSITION_FLATNAV 1 |
const | BLOCK_POS_LEFT 'side-pre' |
#+ Default names for the block regions in the standard theme. | |
const | BLOCK_POS_RIGHT 'side-post' |
const | BUI_CONTEXTS_CURRENT 0 |
const | BUI_CONTEXTS_CURRENT_SUBS 1 |
const | BUI_CONTEXTS_ENTIRE_SITE 2 |
const | BUI_CONTEXTS_FRONTPAGE_ONLY 0 |
#- | |
const | BUI_CONTEXTS_FRONTPAGE_SUBS 1 |
const | CACHE_DISABLE_ALL true |
$CFG | cachedir = $CFG->dataroot.'/cache' |
const | CLI_SCRIPT (file_exists($configfile)) false |
background | color |
const | COMPONENT_ERROR 0 |
const | COMPONENT_INSTALLED 3 |
const | COMPONENT_NEEDUPDATE 2 |
const | COMPONENT_UPTODATE 1 |
const | CUSTOM_CHECK_FILE_MISSING 13 |
XML Processing Error. | |
const | CUSTOM_CHECK_FUNCTION_MISSING 14 |
XML Processing Error. | |
alert | danger |
$config | dataroot = empty($distro->dataroot) ? null : $distro->dataroot |
$CFG | dataroot = $config->dataroot |
$config | dbhost = empty($distro->dbhost) ? 'localhost' : $distro->dbhost |
$config | dbname = 'moodle' |
$config | dbpass = '' |
$config | dbport = empty($distro->dbport) ? '' : $distro->dbport |
$config | dbsocket = empty($distro->dbsocket) ? '' : $distro->dbsocket |
$config | dbtype = empty($distro->dbtype) ? '' : $distro->dbtype |
$config | dbuser = empty($distro->dbuser) ? '' : $distro->dbuser |
$CFG | debug = (E_ALL | E_STRICT) |
const | DEBUG_ALL E_ALL & ~E_STRICT |
All problems except strict PHP warnings. | |
const | DEBUG_DEVELOPER E_ALL | E_STRICT |
DEBUG_ALL with all debug messages and strict warnings. | |
const | DEBUG_MINIMAL E_ERROR | E_PARSE |
Fatal errors only. | |
const | DEBUG_NONE 0 |
No warnings and errors at all. | |
const | DEBUG_NORMAL E_ERROR | E_PARSE | E_WARNING | E_NOTICE |
Errors, warnings and notices. | |
$CFG | debugdeveloper = true |
$CFG | debugdisplay = true |
die | |
$CFG | directorypermissions = isset($distro->directorypermissions) ? $distro->directorypermissions : 00777 |
$CFG | dirroot = __DIR__ |
$CFG | docroot = 'https://docs.moodle.org' |
$CFG | early_install_lang = true |
if(isset($mnet_peer->id) && $mnet_peer->id > 0) | else |
if(isset($_REQUEST['lang'])) | else |
This script creates config.php file during installation. | |
if(isset($_REQUEST['admin'])) | else |
if(!function_exists( 'iconv')) if(PHP_INT_SIZE > 4) | else |
if(!empty($_POST)) | else |
if(defined('COMPONENT_CLASSLOADER')) | else |
if($distro) | else |
const | ENROL_ACTION_EDIT 'editenrolment' |
Edit enrolment action. | |
const | ENROL_ACTION_UNENROL 'unenrol' |
Unenrol action. | |
const | ENROL_DO_NOT_SEND_EMAIL 0 |
Do not send email. | |
const | ENROL_EXT_REMOVED_KEEP 1 |
When user disappears from external source, the enrolment is kept as is - one way sync. | |
const | ENROL_EXT_REMOVED_SUSPEND 2 |
When user disappears from external source, user enrolment is suspended, roles are kept as is. | |
const | ENROL_EXT_REMOVED_SUSPENDNOROLES 3 |
When user disappears from external source, the enrolment is suspended and roles assigned by enrol instance are removed. | |
const | ENROL_EXT_REMOVED_UNENROL 0 |
When user disappears from external source, the enrolment is completely removed. | |
const | ENROL_INSTANCE_DISABLED 1 |
Course enrol instance disabled, user may enter course if other enrol instance enabled. | |
const | ENROL_INSTANCE_ENABLED 0 |
Course enrol instance enabled. | |
const | ENROL_MAX_TIMESTAMP 2147483647 |
The timestamp indicating forever. | |
const | ENROL_REQUIRE_LOGIN_CACHE_PERIOD 1800 |
const | ENROL_RESTORE_TYPE 'enrolrestore' |
const | ENROL_SEND_EMAIL_FROM_COURSE_CONTACT 1 |
Send email from course contact. | |
const | ENROL_SEND_EMAIL_FROM_KEY_HOLDER 2 |
Send email from enrolment key holder. | |
const | ENROL_SEND_EMAIL_FROM_NOREPLY 3 |
Send email from no reply address. | |
const | ENROL_USER_ACTIVE 0 |
User is active participant (used in user_enrolments->status) | |
const | ENROL_USER_SUSPENDED 1 |
User participation in course is suspended (used in user_enrolments->status) | |
const | ENV_SELECT_DATAROOT 1 |
To enforce the use of the file under dataroot. | |
const | ENV_SELECT_NEWER 0 |
Define algorithm used to select the xml file. | |
const | ENV_SELECT_RELEASE 2 |
To enforce the use of the file under admin (release) | |
font | family |
Moodle Generic plain page. | |
$CFG | filepermissions = ($CFG->directorypermissions & 0666) |
foreach ( $languages as $name=> $value) = core_plugin_manager::instance()->get_plugins_of_type('local') | |
Add all local plugins - must be always last! | |
const | FORMAT_HTML '1' |
Plain HTML (with some tags stripped). | |
const | FORMAT_MARKDOWN '4' |
Markdown-formatted text http://daringfireball.net/projects/markdown/. | |
const | FORMAT_MOODLE '0' |
Does all sorts of transformations and filtering. | |
const | FORMAT_PLAIN '2' |
Plain text (even tags are printed in full). | |
const | FORMAT_WIKI '3' |
Wiki-formatted text. | |
h1 | |
line | height |
**ingroup core **copyright Darko Miletic< dmiletic @moodlerooms.com > *license | http |
**ingroup core **copyright Darko Miletic< dmiletic @moodlerooms.com > *license | http |
$CFG | httpswwwroot = $CFG->wwwroot |
$COURSE | id = 1 |
if (!defined( 'MOODLE_INTERNAL')) | |
Allows the admin to configure a list of profile fields that are sent/recieved. | |
if (!defined( 'MOODLE_INTERNAL')) | |
The form for configuring which services are subscribed and published on a host. | |
if (!defined( 'MOODLE_INTERNAL')) | |
Form class for editing badges preferences. | |
if (!empty( $memlimit) and $memlimit !=-1) | |
const | IGNORE_COMPONENT_CACHE true |
const | INCORRECT_FEEDBACK_FOR_OPTIONAL 17 |
XML Processing Error. | |
const | INCORRECT_FEEDBACK_FOR_REQUIRED 16 |
XML Processing Error. | |
const | INSTALL_DATABASE 5 |
INSTALL_DATABASE = 5. | |
const | INSTALL_DATABASETYPE 4 |
INSTALL_DATABASETYPE = 4. | |
const | INSTALL_DOWNLOADLANG 3 |
INSTALL_DOWNLOADLANG = 3. | |
const | INSTALL_ENVIRONMENT 1 |
INSTALL_ENVIRONMENT = 1. | |
const | INSTALL_PATHS 2 |
INSTALL_PATHS = 2. | |
const | INSTALL_SAVE 6 |
INSTALL_SAVE = 6. | |
const | INSTALL_WELCOME 0 |
INSTALL_WELCOME = 0. | |
$config | lang = $lang |
$CFG | lang = $config->lang |
$CFG | langlocalroot = $CFG->dataroot.'/lang' |
$CFG | langotherroot = $CFG->dataroot.'/lang' |
$CFG | libdir = "$CFG->dirroot/lib" |
const | LIST_DEFINITION 4 |
const | LIST_NONE 1 |
#- | |
const | LIST_ORDERED 3 |
const | LIST_UNORDERED 2 |
$CFG | localcachedir = $CFG->dataroot.'/localcache' |
trait | core\task::logging_trait |
This trait includes functions to assist with logging in tasks. | |
const | MATURITY_ALPHA 50 |
Software maturity level - internals can be tested using white box techniques. | |
const | MATURITY_BETA 100 |
Software maturity level - feature complete, ready for preview and testing. | |
const | MATURITY_RC 150 |
Software maturity level - tested, will be released unless there are fatal bugs. | |
const | MATURITY_STABLE 200 |
Software maturity level - ready for production deployment. | |
const | MDL_PERF false |
const | MDL_PERF_TEST false |
const | MDL_PERFINC false |
const | MDL_PERFTOFOOT false |
const | MDL_PERFTOLOG false |
const | MEMORY_EXTRA -3 |
Large memory limit for given platform - used in cron, upgrade, and other places that need a lot of memory. | |
const | MEMORY_HUGE -4 |
Extremely large memory limit - not recommended for standard scripts. | |
const | MEMORY_STANDARD -2 |
Standard memory limit for given platform. | |
const | MEMORY_UNLIMITED -1 |
Remove any memory limits. | |
const | MOODLE_INTERNAL true |
Used by library scripts to check they are being called by Moodle. | |
const | NO_CUSTOM_CHECK_FOUND 12 |
XML Processing Error. | |
const | NO_DATABASE_SECTION_FOUND 2 |
XML Processing Error. | |
const | NO_DATABASE_VENDOR_MYSQL_FOUND 4 |
XML Processing Error. | |
const | NO_DATABASE_VENDOR_POSTGRES_FOUND 5 |
XML Processing Error. | |
const | NO_DATABASE_VENDOR_VERSION_FOUND 10 |
XML Processing Error. | |
const | NO_DATABASE_VENDORS_FOUND 3 |
XML Processing Error. | |
const | NO_ERROR 0 |
Add required files. | |
const | NO_MOODLE_COOKIES true |
This file is used to call any registered externallib function in Moodle. | |
const | NO_PHP_EXTENSIONS_NAME_FOUND 9 |
XML Processing Error. | |
const | NO_PHP_EXTENSIONS_SECTION_FOUND 8 |
XML Processing Error. | |
const | NO_PHP_SECTION_FOUND 6 |
XML Processing Error. | |
const | NO_PHP_SETTINGS_NAME_FOUND 15 |
XML Processing Error. | |
const | NO_PHP_VERSION_FOUND 7 |
XML Processing Error. | |
const | NO_UNICODE_SECTION_FOUND 11 |
XML Processing Error. | |
const | NO_VERSION_DATA_FOUND 1 |
XML Processing Error. | |
const | OPEN_BADGES_V1 1 |
const | OPEN_BADGES_V2 2 |
const | OPEN_BADGES_V2_CONTEXT 'https://w3id.org/openbadges/v2' |
const | OPEN_BADGES_V2_TYPE_ASSERTION 'Assertion' |
const | OPEN_BADGES_V2_TYPE_AUTHOR 'Author' |
const | OPEN_BADGES_V2_TYPE_BADGE 'BadgeClass' |
const | OPEN_BADGES_V2_TYPE_ENDORSEMENT 'Endorsement' |
const | OPEN_BADGES_V2_TYPE_ISSUER 'Issuer' |
const | OPEN_BADGES_V2P1 2.1 |
$CFG | ostype = (stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'darwin')) ? 'WINDOWS' : 'UNIX' |
border | padding |
const | PHPUNIT_TEST false |
$config | prefix = 'mdl_' |
const | PWRESET_STATUS_ALREADYSENT 4 |
const | PWRESET_STATUS_NOEMAILSENT 1 |
const | PWRESET_STATUS_OTHEREMAILSENT 3 |
const | PWRESET_STATUS_TOKENSENT 2 |
const | RECAPTCHA_API_URL 'https://www.recaptcha.net/recaptcha/api.js' |
The reCAPTCHA URL's. | |
const | RECAPTCHA_VERIFY_URL 'https://www.recaptcha.net/recaptcha/api/siteverify' |
const | RESOURCELIB_DISPLAY_AUTO 0 |
Try the best way. | |
const | RESOURCELIB_DISPLAY_DOWNLOAD 4 |
Force download of file instead of display. | |
const | RESOURCELIB_DISPLAY_EMBED 1 |
Display using object tag. | |
const | RESOURCELIB_DISPLAY_FRAME 2 |
Display inside frame. | |
const | RESOURCELIB_DISPLAY_NEW 3 |
Display normal link in new window. | |
const | RESOURCELIB_DISPLAY_OPEN 5 |
Open directly. | |
const | RESOURCELIB_DISPLAY_POPUP 6 |
Open in "emulated" pop-up without navigation. | |
const | RESOURCELIB_LEGACYFILES_ACTIVE 2 |
Legacy files conversion in progress. | |
const | RESOURCELIB_LEGACYFILES_DONE 1 |
Legacy files conversion marked as completed. | |
const | RESOURCELIB_LEGACYFILES_NO 0 |
Legacy files not needed or new resource. | |
font | Roboto |
$CFG | running_installer = true |
font sans | serif |
const | SITEID 1 |
font sans font | size |
if(isset($_GET['help'])) if(is_null( $CFG->dataroot)) if($config->stage< INSTALL_WELCOME) if( $config->stage > INSTALL_SAVE) if($config->stage==INSTALL_SAVE) if( $config->stage==INSTALL_DOWNLOADLANG) if($config->stage==INSTALL_DOWNLOADLANG) if( $config->stage==INSTALL_DATABASETYPE) if($config->stage==INSTALL_DOWNLOADLANG) if( $config->stage==INSTALL_DATABASE) if($config->stage==INSTALL_DATABASETYPE) if( $config->stage==INSTALL_ENVIRONMENT or $config->stage==INSTALL_PATHS) if($config->stage==INSTALL_PATHS) $config | stage = INSTALL_WELCOME |
const | STATE_BLOCKQUOTE 3 |
const | STATE_NONE 1 |
#+ state defines | |
const | STATE_NOTIKI 5 |
const | STATE_PARAGRAPH 2 |
const | STATE_PREFORM 4 |
const | STATS_MODE_DETAILED 2 |
const | STATS_MODE_GENERAL 1 |
const | STATS_MODE_RANKED 3 |
const | STATS_PLACEHOLDER_OUTPUT '.' |
const | STATS_REPORT_ACTIVE_COURSES 11 |
const | STATS_REPORT_ACTIVE_COURSES_WEIGHTED 12 |
const | STATS_REPORT_ACTIVITY 4 |
const | STATS_REPORT_ACTIVITYBYROLE 5 |
const | STATS_REPORT_LOGINS 1 |
THESE CONSTANTS ARE USED FOR THE REPORTING PAGE. | |
const | STATS_REPORT_PARTICIPATORY_COURSES 13 |
const | STATS_REPORT_PARTICIPATORY_COURSES_RW 14 |
const | STATS_REPORT_READS 2 |
const | STATS_REPORT_USER_ACTIVITY 7 |
const | STATS_REPORT_USER_ALLACTIVITY 8 |
const | STATS_REPORT_USER_LOGINS 9 |
const | STATS_REPORT_USER_VIEW 10 |
const | STATS_REPORT_WRITES 3 |
const | STATS_TIME_LAST10MONTHS 30 |
const | STATS_TIME_LAST11MONTHS 31 |
const | STATS_TIME_LAST2MONTHS 12 |
const | STATS_TIME_LAST2WEEKS 2 |
const | STATS_TIME_LAST3MONTHS 13 |
const | STATS_TIME_LAST3WEEKS 3 |
const | STATS_TIME_LAST4MONTHS 14 |
const | STATS_TIME_LAST4WEEKS 4 |
const | STATS_TIME_LAST5MONTHS 15 |
const | STATS_TIME_LAST6MONTHS 16 |
const | STATS_TIME_LAST7MONTHS 27 |
const | STATS_TIME_LAST8MONTHS 28 |
const | STATS_TIME_LAST9MONTHS 29 |
const | STATS_TIME_LASTWEEK 1 |
const | STATS_TIME_LASTYEAR 32 |
trait | core\hook::stoppable_trait |
Moodle specific implementation of Psr\EventDispatcher\StoppableEventInterface interface from PSR-14. | |
**Library file of miscellaneous general purpose LDAP functions and *data | structures |
const | TABLE_P_BOTTOM 2 |
const | TABLE_P_TOP 1 |
#- | |
const | TABLE_SHOW_ALL_PAGE_SIZE 5000 |
#- | |
const | TABLE_VAR_DIR 8 |
const | TABLE_VAR_HIDE 2 |
const | TABLE_VAR_IFIRST 4 |
const | TABLE_VAR_ILAST 5 |
const | TABLE_VAR_PAGE 6 |
const | TABLE_VAR_RESET 7 |
const | TABLE_VAR_SHOW 3 |
const | TABLE_VAR_SORT 1 |
#+ These constants relate to the table's handling of URL parameters. | |
$CFG | target_release = $release |
$CFG | tempdir = $CFG->dataroot.'/temp' |
const | TEXTFILTER_DISABLED -9999 |
The states a filter can be in, stored in the filter_active table. | |
const | TEXTFILTER_EXCL_SEPARATOR chr(0x1F) . '%' . chr(0x1F) |
Define one exclusive separator that we'll use in the temp saved tags keys. | |
const | TEXTFILTER_INHERIT 0 |
The states a filter can be in, stored in the filter_active table. | |
const | TEXTFILTER_OFF -1 |
The states a filter can be in, stored in the filter_active table. | |
const | TEXTFILTER_ON 1 |
The states a filter can be in, stored in the filter_active table. | |
const | TOKEN_DATEFROM "6" |
const | TOKEN_DATETO "7" |
const | TOKEN_EXACT "2" |
const | TOKEN_INSTANCE "8" |
const | TOKEN_META "1" |
const | TOKEN_NEGATE "3" |
const | TOKEN_STRING "4" |
const | TOKEN_TAGS "9" |
const | TOKEN_USER "0" |
Constants for the various types of tokens. | |
const | TOKEN_USERID "5" |
margin | top |
$CFG | umaskpermissions = (($CFG->directorypermissions & 0777) ^ 0777) |
const | URL_MATCH_BASE 0 |
A moodle_url comparison using this flag will return true if the base URLs match, params are ignored. | |
const | URL_MATCH_EXACT 2 |
A moodle_url comparison using this flag will return true if the two URLs are identical, except for the order of the params. | |
const | URL_MATCH_PARAMS 1 |
A moodle_url comparison using this flag will return true if the base URLs match and the params of url1 are part of url2. | |
font | weight |
max | width |
$CFG | wwwroot = install_guess_wwwroot() |
filter_get_name ($filter) | |
Look up the name of this filter. | |
filter_get_all_installed () | |
Get the names of all the filters installed in this Moodle. | |
filter_set_global_state ($filtername, $state, $move=0) | |
Set the global activated state for a text filter. | |
filter_get_active_state (string $filtername, $contextid=null) | |
Returns the active state for a filter in the given context. | |
filter_is_enabled ($filtername) | |
filter_get_globally_enabled () | |
Return a list of all the filters that may be in use somewhere. | |
filter_get_globally_enabled_filters_with_config () | |
Get the globally enabled filters. | |
filter_get_string_filters () | |
Return the names of the filters that should also be applied to strings (when they are enabled). | |
filter_set_applies_to_strings ($filter, $applytostrings) | |
Sets whether a particular active filter should be applied to all strings by format_string, or just used by format_text. | |
filter_set_local_state ($filter, $contextid, $state) | |
Set the local activated state for a text filter. | |
filter_set_local_config ($filter, $contextid, $name, $value) | |
Set a particular local config variable for a filter in a context. | |
filter_unset_local_config ($filter, $contextid, $name) | |
Remove a particular local config variable for a filter in a context. | |
filter_get_local_config ($filter, $contextid) | |
Get local config variables for a filter in a context. | |
filter_get_all_local_settings ($contextid) | |
This function is for use by backup. | |
filter_get_active_in_context ($context) | |
Get the list of active filters, in the order that they should be used for a particular context, along with any local configuration variables. | |
filter_preload_activities (course_modinfo $modinfo) | |
Preloads the list of active filters for all activities (modules) on the course using two database queries. | |
filter_get_available_in_context ($context) | |
List all of the filters that are available in this context, and what the local and inherited states of that filter are. | |
filter_get_global_states () | |
This function is for use by the filter administration page. | |
filter_delete_all_for_filter ($filter) | |
Delete all the data in the database relating to a filter, prior to deleting it. | |
filter_delete_all_for_context ($contextid) | |
Delete all the data in the database relating to a context, used when contexts are deleted. | |
filter_has_global_settings ($filter) | |
Does this filter have a global settings page in the admin tree? (The settings page for a filter must be called, for example, filtersettingfiltertex.) | |
filter_has_local_settings ($filter) | |
Does this filter have local (per-context) settings? | |
filter_context_may_have_filter_settings ($context) | |
Certain types of context (block and user) may not have local filter settings. | |
filter_phrases ($text, $linkarray, $ignoretagsopen=null, $ignoretagsclose=null, $overridedefaultignore=false, $linkarrayalreadyprepared=false) | |
Process phrases intelligently found within a HTML text (such as adding links). | |
filter_prepare_phrases_for_filtering (array $linkarray) | |
Prepare a list of link for processing with filter_phrases(). | |
filter_prepare_phrase_for_replacement (filterobject $linkobject) | |
Fill in the remaining ->work... fields, that would be needed to replace the phrase. | |
filter_remove_duplicates ($linkarray) | |
Remove duplicate from a list of filterobject. | |
filter_save_ignore_tags (&$text, $filterignoretagsopen, $filterignoretagsclose, &$ignoretags) | |
Extract open/lose tags and their contents to avoid being processed by filters. | |
filter_save_tags (&$text, &$tags) | |
Extract tags (any text enclosed by < and > to avoid being processed by filters. | |
filter_add_javascript ($text) | |
Add missing openpopup javascript to HTML files. | |
|
protected |
Constructor.
Protected. Use instance() instead.
filterobject::__construct | ( | $phrase, | |
$hreftagbegin = '<span class="highlight">', | |||
$hreftagend = '</span>', | |||
$casesensitive = false, | |||
$fullmatch = false, | |||
$replacementphrase = null, | |||
$replacementcallback = null, | |||
array | $replacementcallbackdata = null ) |
Constructor.
string | $phrase | this is the phrase that should be matched. |
string | $hreftagbegin | HTML to insert before any match. Default ''. |
string | $hreftagend | HTML to insert after any match. Default ''. |
bool | $casesensitive | whether the match needs to be case sensitive |
bool | $fullmatch | whether to match complete words. If true, 'T' won't be matched in 'Tim'. |
mixed | $replacementphrase | replacement text to go inside begin and end. If not set, the body of the replacement will be the original phrase. |
callback | $replacementcallback | if set, then this will be called just before $hreftagbegin, $hreftagend and $replacementphrase are needed, so they can be computed only if required. The call made is list($linkobject->hreftagbegin, $linkobject->hreftagend, $linkobject->replacementphrase) = call_user_func_array($linkobject->replacementcallback, $linkobject->replacementcallbackdata); so the return should be an array [$hreftagbegin, $hreftagend, $replacementphrase], the last of which may be null. |
array | $replacementcallbackdata | data to be passed to $replacementcallback (optional). |
moodle_text_filter::__construct | ( | $context, | |
array | $localconfig ) |
Set any context-specific configuration for this filter.
context | $context | The current context. |
array | $localconfig | Any context-specific configuration for this filter. |
abort_all_db_transactions | ( | ) |
Unconditionally abort all database transactions, this function should be called from exception handlers only.
void |
add_event | ( | ) |
CALENDAR MANAGEMENT ////////////////////////////////////////////////////////////////.
add_mod_to_section | ( | ) |
add_to_log | ( | ) |
addslashes_js | ( | $var | ) |
Does proper javascript quoting.
Do not use addslashes anymore, because it does not work when magic_quotes_sybase is enabled.
mixed | $var | String, Array, or Object to add slashes to |
mixed | quoted result |
ajaxenabled | ( | ) |
allow_assign | ( | ) |
allow_override | ( | ) |
allow_switch | ( | ) |
|
protected |
Apply a list of filters to some content.
string | $text | |
moodle_text_filter[] | $filterchain | array filter name => filter object. |
array | $options | options passed to the filters. |
array | $skipfilters | of filter names. Any filters that should not be applied to this text. |
string\$text |
badge_assemble_notification | ( | stdClass | $badge | ) |
Creates single message for all notification and sends it out.
object | $badge | A badge which is notified about. |
badge_award_criteria_competency_has_records_for_competencies | ( | $competencyids | ) |
Check if any badge has records for competencies.
array | $competencyids | Array of competencies ids. |
boolean | Return true if competencies were found in any badge. |
badge_message_from_template | ( | $message, | |
$params ) |
Replaces variables in a message template and returns text ready to be emailed to a user.
string | $message | Message body. |
string | Message with replaced values |
badges_add_course_navigation | ( | navigation_node | $coursenode, |
stdClass | $course ) |
Extends the course administration navigation with the Badges page.
navigation_node | $coursenode | |
object | $course |
badges_award_handle_manual_criteria_review | ( | stdClass | $data | ) |
Triggered when badge is manually awarded.
object | $data |
boolean |
badges_bake | ( | $hash, | |
$badgeid, | |||
$userid = 0, | |||
$pathhash = false ) |
Bake issued badge.
string | $hash | Unique hash of an issued badge. |
int | $badgeid | ID of the original badge. |
int | $userid | ID of badge recipient (optional). |
boolean | $pathhash | Return file pathhash instead of image url (optional). |
string|url | Returns either new file path hash or new file URL |
badges_calculate_message_schedule | ( | $schedule | ) |
Caclulates date for the next message digest to badge creators.
in | $schedule | Type of message schedule BADGE_MESSAGE_DAILY|BADGE_MESSAGE_WEEKLY|BADGE_MESSAGE_MONTHLY. |
int | Timestamp for next cron |
badges_change_sortorder_backpacks | ( | int | $backpackid, |
int | $direction ) |
Moves the backpack in the list one position up or down.
int | $backpackid | The backpack identifier to be moved. |
int | $direction | The direction (BACKPACK_MOVE_UP/BACKPACK_MOVE_DOWN) where to move the backpack. |
moodle_exception | if attempting to use invalid direction value. |
badges_check_backpack_accessibility | ( | ) |
badges_create_site_backpack | ( | $data | ) |
Create the site backpack with this data.
stdClass | $data | The new backpack data. |
boolean |
badges_delete_site_backpack | ( | $id | ) |
Delete the backpack with this id.
integer | $id | The backpack to delete. |
boolean |
badges_disconnect_user_backpack | ( | $userid | ) |
Disconnect from the user backpack by deleting the user preferences.
integer | $userid | The user to diconnect. |
boolean |
badges_download | ( | $userid | ) |
Download all user badges in zip archive.
int | $userid | ID of badge owner. |
badges_external_create_mapping | ( | $sitebackpackid, | |
$type, | |||
$internalid, | |||
$externalid ) |
Save the info about which objects we connected with a backpack before.
integer | $sitebackpackid | The site backpack to connect to. |
string | $type | The type of this remote object. |
string | $internalid | The id for this object on the Moodle site. |
string | $externalid | The id of this object on the remote site. |
boolean |
badges_external_delete_mapping | ( | $sitebackpackid, | |
$type, | |||
$internalid ) |
Delete a specific external mapping information for a backpack.
integer | $sitebackpackid | The site backpack to connect to. |
string | $type | The type of this remote object. |
string | $internalid | The id for this object on the Moodle site. |
boolean |
badges_external_delete_mappings | ( | $sitebackpackid | ) |
Delete all external mapping information for a backpack.
integer | $sitebackpackid | The site backpack to connect to. |
boolean |
badges_external_get_mapping | ( | $sitebackpackid, | |
$type, | |||
$internalid, | |||
$param = 'externalid' ) |
Used to remember which objects we connected with a backpack before.
integer | $sitebackpackid | The site backpack to connect to. |
string | $type | The type of this remote object. |
string | $internalid | The id for this object on the Moodle site. |
string | $param | The param we need to return. Defaults to the externalid. |
mixed | The id or false if it doesn't exist. |
badges_generate_badgr_open_url | ( | $backpack, | |
$type, | |||
$externalid ) |
Generate a public badgr URL that conforms to OBv2.
This is done because badgr responses do not currently conform to the spec.
WARNING: This is an extremely hacky way of implementing this and should be removed once the standards are conformed to.
stdClass | $backpack | The Badgr backpack we are pushing to |
string | $type | The type of object we are dealing with either Issuer, Assertion OR Badge. |
string | $externalid | The externalid as provided by the backpack |
string | The public URL to access Badgr objects |
badges_get_badge_api_versions | ( | ) |
List the supported badges api versions.
array(version) |
badges_get_badge_by_hash | ( | string | $hash | ) |
Get badge by hash.
string | $hash |
object|bool |
badges_get_badges | ( | $type, | |
$courseid = 0, | |||
$sort = '', | |||
$dir = '', | |||
$page = 0, | |||
$perpage = BADGE_PERPAGE, | |||
$user = 0 ) |
Get all badges.
int | Type of badges to return | |
int | Course ID for course badges | |
string | $sort | An SQL field to sort by |
string | $dir | The sort direction ASC|DESC |
int | $page | The page or records to return |
int | $perpage | The number of records to return per page |
int | $user | User specific search |
array\$badge | Array of records matching criteria |
badges_get_default_issuer | ( | ) |
Get the default issuer for a badge from this site.
array |
badges_get_issued_badge_info | ( | ) |
badges_get_oauth2_service_options | ( | ) |
Get OAuth2 services for the external backpack.
array |
coding_exception |
badges_get_site_backpack | ( | $id, | |
int | $userid = 0 ) |
Get a site backpacks by id for a particular user or site (if userid is 0)
int | $id | The backpack id. |
int | $userid | The owner of the backpack, 0 if it's a sitewide backpack else a user's site backpack |
stdClass |
badges_get_site_backpacks | ( | ) |
List the backpacks at site level.
array(stdClass) |
badges_get_site_primary_backpack | ( | ) |
Get the primary backpack for the site.
stdClass |
badges_get_user_backpack | ( | ?int | $userid = 0 | ) |
Get the user backpack for the currently logged in user OR the provided user.
int | null | $userid | The user whose backpack you're requesting for. If null, get the logged in user's backpack |
mixed | The user's backpack or none. |
dml_exception |
badges_get_user_badges | ( | $userid, | |
$courseid = 0, | |||
$page = 0, | |||
$perpage = 0, | |||
$search = '', | |||
$onlypublic = false ) |
Get badges for a specific user.
int | $userid | User ID |
int | $courseid | Badges earned by a user in a specific course |
int | $page | The page or records to return |
int | $perpage | The number of records to return per page |
string | $search | A simple string to search for |
bool | $onlypublic | Return only public badges |
array | of badges ordered by decreasing date of issue |
badges_handle_course_deletion | ( | $courseid | ) |
Handles what happens to the course badges when a course is deleted.
int | $courseid | course ID. |
void. |
badges_list_criteria | ( | $enabled = true | ) |
Return all the enabled criteria types for this site.
boolean | $enabled |
array |
badges_local_backpack_js | ( | ) |
badges_notify_badge_award | ( | badge | $badge, |
$userid, | |||
$issued, | |||
$filepathhash ) |
Sends notifications to users about awarded badges.
core_badges\badge | $badge | Badge that was issued |
int | $userid | Recipient ID |
string | $issued | Unique hash of an issued badge |
string | $filepathhash | File path hash of an issued badge for attachments |
badges_open_badges_backpack_api | ( | ?int | $backpackid = null | ) |
Is any backpack enabled that supports open badges V1?
int | null | $backpackid | Check the version of the given id OR if null the sitewide backpack |
boolean |
badges_prepare_badge_for_external | ( | stdClass | $badge, |
stdClass | $user ) |
Update badge instance to external functions.
stdClass | $badge | |
stdClass | $user |
object |
badges_process_badge_image | ( | badge | $badge, |
$iconfile ) |
Process badge image from form data.
badge | $badge | Badge object |
string | $iconfile | Original file |
badges_save_backpack_credentials | ( | stdClass | $data | ) |
Create a backpack with the provided details.
Stores the auth details of the backpack
stdClass | $data | Backpack specific data. |
int | The id of the external backpack that the credentials correspond to |
badges_save_external_backpack | ( | stdClass | $data | ) |
Perform the actual create/update of external bakpacks.
Any checks on the validity of the id will need to be performed before it reaches this function.
stdClass | $data | The backpack data we are updating/inserting |
int | Returns the id of the new/updated record |
badges_send_verification_email | ( | $email, | |
$backpackid, | |||
$backpackpassword ) |
Create and send a verification email to the email address supplied.
Since we're not sending this email to a user, email_to_user can't be used but this function borrows largely the code from that process.
string | the email address to send the verification email to. | |
int | $backpackid | the id of the backpack to connect to |
string | $backpackpassword | the user entered password to connect to this backpack |
true | if the email was sent successfully, false otherwise. |
badges_setup_backpack_js | ( | ) |
badges_update_site_backpack | ( | $id, | |
$data ) |
Update the backpack with this id.
integer | $id | The backpack to edit |
stdClass | $data | The new backpack data. |
boolean |
badges_user_has_backpack | ( | $userid | ) |
Checks if user has external backpack connected.
int | $userid | ID of a user. |
bool | True|False whether backpack connection exists. |
badges_verify_backpack | ( | int | $backpackid | ) |
Attempt to authenticate with a backpack credentials and return an error if the authentication fails.
If external backpacks are not enabled or the backpack version is different from OBv2, this will not perform any test.
int | $backpackid | Backpack identifier to verify. |
string | The result of the verification process. |
badges_verify_site_backpack | ( | ) |
Attempt to authenticate with the site backpack credentials and return an error if the authentication fails.
If external backpacks are not enabled, this will not perform any test.
string |
block_add_block_ui | ( | $page, | |
$output ) |
Functions update the blocks if required by the request parameters ==========.
Return a block_contents representing the add a new block UI, if this user is allowed to see it.
block_contents | an appropriate block_contents, or null if the user cannot add any blocks here. |
block_instance | ( | $blockname, | |
$instance = NULL, | |||
$page = NULL ) |
Creates a new instance of the specified block class.
string | $blockname | the name of the block. |
stdClass | $instance | block_instances DB table row (optional). |
moodle_page | $page | the page this block is appearing on. |
block_base | the requested block instance. |
block_instance_by_id | ( | $blockinstanceid | ) |
Returns a new instance of the specified block instance id.
int | $blockinstanceid |
block_base | the requested block instance. |
block_load_class | ( | $blockname | ) |
Load the block class for a particular type of block.
string | $blockname | the name of the block. |
boolean | success or failure. |
block_method_result | ( | $blockname, | |
$method, | |||
$param = NULL ) |
Helper functions for working with block classes ============================.
Call a class method (one that does not require a block instance) on a block class.
string | $blockname | the name of the block. |
string | $method | the method name. |
array | $param | parameters to pass to the method. |
mixed | whatever the method returns. |
blocks_add_default_course_blocks | ( | $course | ) |
Add the default blocks to a course.
object | $course | a course object. |
blocks_add_default_system_blocks | ( | ) |
Add the default system-context blocks.
E.g. the admin tree.
blocks_delete_all_for_context | ( | $contextid | ) |
Delete all the blocks that belong to a particular context.
int | $contextid | the context id. |
blocks_delete_instance | ( | $instance, | |
$nolongerused = false, | |||
$skipblockstables = false ) |
Delete a block, and associated data.
object | $instance | a row from the block_instances table |
bool | $nolongerused | legacy parameter. Not used, but kept for backwards compatibility. |
bool | $skipblockstables | for internal use only. Makes |
blocks_delete_instances | ( | $instanceids | ) |
Delete multiple blocks at once.
array | $instanceids | A list of block instance ID. |
blocks_find_block | ( | $blockid, | |
$blocksarray ) |
Find a given block by its blockid within a provide array.
int | $blockid | |
array | $blocksarray |
bool|object | Instance if found else false |
blocks_get_default_site_course_blocks | ( | ) |
array | the blocks that should be added to the site course by default. |
blocks_get_record | ( | $blockid = NULL, | |
$notusedanymore = false ) |
Get the block record for a particular blockid - that is, a particular type os block.
$int | blockid block type id. If null, an array of all block types is returned. | |
bool | $notusedanymore | No longer used. |
array|object | row from block table, or all rows. |
blocks_name_allowed_in_format | ( | $name, | |
$pageformat ) |
Check that a given name is in a permittable format.
string | $name | |
string | $pageformat |
bool |
blocks_parse_default_blocks_list | ( | $blocksstr | ) |
Parse a list of default blocks.
See config-dist for a description of the format.
string | $blocksstr | Determines the starting point that the blocks are added in the region. |
array | the parsed list of default blocks |
blocks_remove_inappropriate | ( | $course | ) |
Actually delete from the database any blocks that are currently on this page, but which should not be there according to blocks_name_allowed_in_format.
$course |
blocks_set_visibility | ( | $instance, | |
$page, | |||
$newvisibility ) |
Set a block to be visible or hidden on a particular page.
object | $instance | a row from the block_instances, preferably LEFT JOINed with the block_positions table as return by block_manager. |
moodle_page | $page | the back to set the visibility with respect to. |
integer | $newvisibility | 1 for visible, 0 for hidden. |
blog_get_context_url | ( | ) |
break_up_long_words | ( | $string, | |
$maxsize = 20, | |||
$cutchar = ' ' ) |
Given some normal text this function will break up any long words to a given size by inserting the given character.
It's multibyte savvy and doesn't change anything inside html tags.
string | $string | the string to be modified |
int | $maxsize | maximum length of the string to be returned |
string | $cutchar | the string used to represent word breaks |
string |
build_context_path | ( | ) |
build_logs_array | ( | ) |
build_navigation | ( | ) |
calculate_user_dst_table | ( | ) |
calendar_cron | ( | ) |
calendar_get_all_allowed_types | ( | ) |
calendar_get_block_upcoming | ( | ) |
calendar_get_mini | ( | ) |
calendar_get_upcoming | ( | ) |
calendar_import_icalendar_events | ( | $ical, | |
$unused = null, | |||
$subscriptionid = null ) |
Import events from an iCalendar object into a course calendar.
iCalendar | $ical | The iCalendar object. |
int | $unused | Deprecated |
int | $subscriptionid | The subscription ID. |
string | A log of the import progress, including errors. |
calendar_normalize_tz | ( | ) |
calendar_preferences_button | ( | ) |
calendar_print_month_selector | ( | ) |
calendar_process_subscription_row | ( | $subscriptionid, | |
$pollinterval, | |||
$action ) |
Update a subscription from the form data in one of the rows in the existing subscriptions table.
int | $subscriptionid | The ID of the subscription we are acting upon. |
int | $pollinterval | The poll interval to use. |
int | $action | The action to be performed. One of update or remove. |
dml_exception | if invalid subscriptionid is provided |
string | A log of the import progress, including errors |
calendar_wday_name | ( | ) |
can_use_html_editor | ( | ) |
can_use_rotated_text | ( | ) |
category_delete_full | ( | ) |
category_delete_move | ( | ) |
check_browser_operating_system | ( | ) |
check_browser_version | ( | ) |
check_dir_exists | ( | $dir, | |
$create = true, | |||
$recursive = true ) |
Function to check if a directory exists and by default create it if not exists.
Previously this was accepting paths only from dataroot, but we now allow files outside of dataroot if you supply custom paths for some settings in config.php. This function does not verify that the directory is writable.
NOTE: this function uses current file stat cache, please use clearstatcache() before this if you expect that the directories may have been removed recently from a different request.
string | $dir | absolute directory path |
boolean | $create | directory if does not exist |
boolean | $recursive | create directory recursively |
boolean | true if directory exists or created, false otherwise |
check_gd_version | ( | ) |
check_moodle_environment | ( | $version, | |
$env_select = ENV_SELECT_NEWER ) |
This function checks all the requirements defined in environment.xml.
string | $version | version to check. |
int | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. Default ENV_SELECT_NEWER (BC) |
array | with two elements. The first element true/false, depending on on whether the check passed. The second element is an array of environment_results objects that has detailed information about the checks and which ones passed. |
choose_from_menu | ( | ) |
clam_change_log | ( | ) |
clam_handle_infected_file | ( | ) |
clam_log_infected | ( | ) |
clam_log_upload | ( | ) |
clam_message_admins | ( | ) |
clam_replace_infected_file | ( | ) |
clam_scan_moodle_file | ( | ) |
clean_text | ( | $text, | |
$format = FORMAT_HTML, | |||
$options = array() ) |
Cleans raw text removing nasties.
Given raw text (eg typed in by a user) this function cleans it up and removes any nasty tags that could mess up Moodle pages through XSS attacks.
The result must be used as a HTML text fragment, this function can not cleanup random parts of html tags such as url or src attributes.
NOTE: the format parameter was deprecated because we can safely clean only HTML.
string | $text | The text to be cleaned |
int | string | $format | deprecated parameter, should always contain FORMAT_HTML or FORMAT_MOODLE |
array | $options | Array of options; currently only option supported is 'allowid' (if true, does not remove id attributes when cleaning) |
string | The cleaned up text |
cleanup_contexts | ( | ) |
cli_error | ( | $text, | |
$errorcode = 1 ) |
Write to standard error output and exit with the given code.
string | $text | |
int | $errorcode |
void | (does not return) |
cli_get_params | ( | array | $longoptions, |
array | $shortmapping = null ) |
Returns cli script parameters.
array | $longoptions | array of –style options ex:('verbose'=>false) |
array | $shortmapping | array describing mapping of short to long style options ex:('h'=>'help', 'v'=>'verbose') |
array | array of arrays, options, unrecognised as optionlongname=>value |
cli_heading | ( | $string, | |
$return = false ) |
Print or return section heading string.
string | $string | text |
bool | $return | false means print, true return as string |
mixed | void or string |
cli_input | ( | $prompt, | |
$default = '', | |||
array | $options = null, | ||
$casesensitiveoptions = false ) |
Get input from user.
string | $prompt | text prompt, should include possible options |
string | $default | default value when enter pressed |
array | $options | list of allowed options, empty means any text |
bool | $casesensitive | true if options are case sensitive |
string | entered text |
cli_logo | ( | $padding = 2, | |
$return = false ) |
Print an ASCII version of the Moodle logo.
int | $padding | left padding of the logo |
bool | $return | should we print directly (false) or return the string (true) |
mixed | void or string |
cli_problem | ( | $text | ) |
Write error notification.
$text |
void |
cli_separator | ( | $return = false | ) |
Print or return section separator string.
bool | $return | false means print, true return as string |
mixed | void or string |
cli_set_process_title_suffix | ( | string | $suffix | ) |
This sets the cli process title suffix.
An example is appending current Task API info so a sysadmin can immediately see what task a cron process is running at any given moment.
string | $suffix | process suffix |
cli_write | ( | $text, | |
$stream = STDOUT ) |
Command line utility functions and classes.
string | $text | text to be written |
resource | $stream | output stream to be written to, defaults to STDOUT |
cli_writeln | ( | $text, | |
$stream = STDOUT ) |
Write a text followed by an end of line symbol to the given stream.
string | $text | text to be written |
resource | $stream | output stream to be written to, defaults to STDOUT |
close_window | ( | $delay = 0, | |
$reloadopener = false ) |
Try and close the current window using JavaScript, either immediately, or after a delay.
Echo's out the resulting XHTML & javascript
integer | $delay | a delay in seconds before closing the window. Default 0. |
boolean | $reloadopener | if true, we will see if this window was a pop-up, and try to reload the parent window before this one closes. |
cohort_get_visible_list | ( | ) |
completion_cron | ( | ) |
confirm_sesskey | ( | $sesskey = NULL | ) |
Check the sesskey and return true of false for whether it is valid.
(You might like to imagine this function is called sesskey_is_valid().)
Every script that lets the user perform a significant action (that is, changes data in the database) should check the sesskey before doing the action. Depending on your code flow, you may want to use the require_sesskey() helper function.
string | $sesskey | The sesskey value to check (optional). Normally leave this blank and this function will do required_param('sesskey', ...). |
bool | whether the sesskey sent in the request matches the one stored in the session. |
content_to_text | ( | $content, | |
$contentformat ) |
Converts texts or strings to plain text.
string | $content | The text as entered by the user |
int | false | $contentformat | False for strings or the text format: FORMAT_MOODLE/FORMAT_HTML/FORMAT_PLAIN/FORMAT_MARKDOWN |
string | Plain text. |
context_instance_preload | ( | ) |
context_instance_preload_sql | ( | ) |
context_moved | ( | ) |
convert_tabrows_to_tree | ( | ) |
convert_tree_to_html | ( | ) |
core_login_extend_change_password_form | ( | $mform, | |
$user ) |
Plugins can extend forms.
Inject form elements into change_password_form.
mform | $mform | the form to inject elements into. |
stdClass | $user | the user object to use for context. |
core_login_extend_forgot_password_form | ( | $mform | ) |
Inject form elements into forgot_password_form.
mform | $mform | the form to inject elements into. |
core_login_extend_set_password_form | ( | $mform, | |
$user ) |
Inject form elements into set_password_form.
mform | $mform | the form to inject elements into. |
stdClass | $user | the user object to use for context. |
core_login_extend_signup_form | ( | $mform | ) |
Inject form elements into signup_form.
mform | $mform | the form to inject elements into. |
core_login_generate_password_reset | ( | $user | ) |
Create a new record in the database to track a new password set request for user.
object | $user | the user record, the requester would like a new password set for. |
record | created. |
core_login_get_return_url | ( | ) |
Determine where a user should be redirected after they have been logged in.
string | url the user should be redirected to. |
core_login_post_change_password_requests | ( | $data | ) |
Plugins can perform post submission actions.
Post change_password_form submission actions.
stdClass | $data | the data object from the submitted form. |
core_login_post_forgot_password_requests | ( | $data | ) |
Post forgot_password_form submission actions.
stdClass | $data | the data object from the submitted form. |
core_login_post_set_password_requests | ( | $data, | |
$user ) |
Post set_password_form submission actions.
stdClass | $data | the data object from the submitted form. |
stdClass | $user | the user object for set_password context. |
core_login_post_signup_requests | ( | $data | ) |
Post signup_form submission actions.
stdClass | $data | the data object from the submitted form. |
core_login_process_password_reset | ( | $username, | |
$email ) |
Process the password reset for the given user (via username or email).
string | $username | the user name |
string | the user email |
array | an array containing fields indicating the reset status, a info notice and redirect URL. |
core_login_process_password_reset_request | ( | ) |
Processes a user's request to set a new password in the event they forgot the old one.
If no user identifier has been supplied, it displays a form where they can submit their identifier. Where they have supplied identifier, the function will check their status, and send email as appropriate.
core_login_process_password_set | ( | $token | ) |
This function processes a user's submitted token to validate the request to set a new password.
If the user's token is validated, they are prompted to set a new password.
string | $token | the one-use identifier which should verify the password reset request as being valid. |
void |
core_login_validate_extend_change_password_form | ( | $data, | |
$user ) |
Plugins can add additional validation to forms.
Inject validation into change_password_form.
array | $data | the data array from submitted form values. |
stdClass | $user | the user object to use for context. |
array\$errors | the updated array of errors from validation. |
core_login_validate_extend_forgot_password_form | ( | $data | ) |
Inject validation into forgot_password_form.
array | $data | the data array from submitted form values. |
array\$errors | the updated array of errors from validation. |
core_login_validate_extend_set_password_form | ( | $data, | |
$user ) |
Inject validation into set_password_form.
array | $data | the data array from submitted form values. |
stdClass | $user | the user object to use for context. |
array\$errors | the updated array of errors from validation. |
core_login_validate_extend_signup_form | ( | $data | ) |
Inject validation into signup_form.
array | $data | the data array from submitted form values. |
array\$errors | the updated array of errors from validation. |
core_login_validate_forgot_password_data | ( | $data | ) |
Validates the forgot password form data.
This is used by the forgot_password_form and by the core_auth_request_password_rest WS.
array | $data | array containing the data to be validated (email and username) |
array | array of errors compatible with mform |
core_myprofile_navigation | ( | core_user\output\myprofile\tree | $tree, |
$user, | |||
$iscurrentuser, | |||
$course ) |
Defines core nodes for my profile navigation tree.
core_user\output\myprofile\tree | $tree | Tree object |
stdClass | $user | user object |
bool | $iscurrentuser | is the user viewing profile, current user ? |
stdClass | $course | course object |
bool |
count_enrolled_users | ( | context | $context, |
$withcapability = '', | |||
$groupids = 0, | |||
$onlyactive = false ) |
Counts list of users enrolled into course (as per above function)
context | $context | |
string | $withcapability | |
int | array | $groupids | The groupids, 0 or [] means all groups and USERSWITHOUTGROUP no group |
bool | $onlyactive | consider only active enrolments in enabled plugins and time restrictions |
int | number of users enrolled into course |
count_login_failures | ( | ) |
course_category_hide | ( | ) |
course_category_show | ( | ) |
course_get_cm_rename_action | ( | ) |
course_scale_used | ( | ) |
coursemodule_visible_for_user | ( | ) |
coursetag_delete_course_tags | ( | ) |
coursetag_delete_keyword | ( | ) |
coursetag_get_all_tags | ( | ) |
coursetag_get_jscript | ( | ) |
coursetag_get_jscript_links | ( | ) |
coursetag_get_records | ( | ) |
coursetag_get_tagged_courses | ( | ) |
coursetag_get_tags | ( | ) |
coursetag_store_keywords | ( | ) |
create_contexts | ( | ) |
create_course_category | ( | ) |
cron_bc_hack_plugin_functions | ( | ) |
cron_execute_plugin_type | ( | ) |
cron_prepare_core_renderer | ( | $restore = false | ) |
Prepare the output renderer for the cron run.
This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing any other.
bool | $restore | Whether to restore the original PAGE and OUTPUT |
cron_run | ( | ?int | $keepalive = null | ) |
Execute cron tasks.
int | null | $keepalive | The keepalive time for this cron run. |
cron_run_adhoc_tasks | ( | int | $timenow, |
$keepalive = 0, | |||
$checklimits = true ) |
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits.
int | $timenow | The time this process started. |
int | $keepalive | Keep this function alive for N seconds and poll for new adhoc tasks. |
bool | $checklimits | Should we check limits? |
cron_run_inner_adhoc_task | ( | \core\task\adhoc_task | $task | ) |
Shared code that handles running of a single adhoc task within the cron.
core\task\adhoc_task | $task |
cron_run_inner_scheduled_task | ( | \core\task\task_base | $task | ) |
Shared code that handles running of a single scheduled task within the cron.
Not intended for calling directly outside of this library!
core\task\task_base | $task |
cron_run_scheduled_tasks | ( | int | $timenow | ) |
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits.
int | $timenow | The time this process started. |
cron_run_single_task | ( | ) |
cron_set_process_title | ( | string | $title | ) |
Sets the process title.
This makes it very easy for a sysadmin to immediately see what task a cron process is running at any given moment.
string | $title | process status title |
cron_setup_user | ( | $user = null, | |
$course = null, | |||
$leavepagealone = false ) |
Sets up current user and course environment (lang, etc.) in cron.
Do not use outside of cron script!
stdClass | $user | full user object, null means default cron user (admin), value 'reset' means reset internal static caches. |
stdClass | $course | full course record, null means $SITE |
bool | $leavepagealone | If specified, stops it messing with global page object |
void |
cron_trace_time_and_memory | ( | ) |
Output some standard information during cron runs.
Specifically current time and memory usage. This method also does gc_collect_cycles() (before displaying memory usage) to try to help PHP manage memory better.
css_is_colour | ( | ) |
css_is_width | ( | ) |
css_minify_css | ( | ) |
css_send_cached_css | ( | $csspath, | |
$etag ) |
Sends a cached CSS file.
This function sends the cached CSS file. Remember it is generated on the first request, then optimised/minified, and finally cached for serving.
string | $csspath | The path to the CSS file we want to serve. |
string | $etag | The revision to make sure we utilise any caches. |
css_send_cached_css_content | ( | $csscontent, | |
$etag ) |
Sends a cached CSS content.
string | $csscontent | The actual CSS markup. |
string | $etag | The revision to make sure we utilise any caches. |
css_send_temporary_css | ( | $css | ) |
Sends CSS directly and disables all caching.
The Content-Length of the body is also included, but the script is not ended.
string | $css | The CSS content to send |
css_send_uncached_css | ( | $css | ) |
Sends CSS directly without caching it.
This function takes a raw CSS string, optimises it if required, and then serves it. Turning both themedesignermode and CSS optimiser on at the same time is awful for performance because of the optimiser running here. However it was done so that theme designers could utilise the optimised output during development to help them optimise their CSS... not that they should write lazy CSS.
string | $css |
css_send_unmodified | ( | $lastmodified, | |
$etag ) |
Send file not modified headers.
int | $lastmodified | |
string | $etag |
css_sort_by_count | ( | ) |
if(!defined('THEME_DESIGNER_CACHE_LIFETIME')) css_store_css | ( | theme_config | $theme, |
$csspath, | |||
$csscontent ) |
Stores CSS in a file at the given path.
This function either succeeds or throws an exception.
theme_config | $theme | The theme that the CSS belongs to. |
string | $csspath | The path to store the CSS at. |
string | $csscontent | the complete CSS in one string. |
css_write_file | ( | $filename, | |
$content ) |
Writes a CSS file.
string | $filename | |
string | $content |
current_theme | ( | ) |
data_submitted | ( | ) |
Determine if there is data waiting to be processed from a form.
Used on most forms in Moodle to check for data Returns the data as an object, if it's found. This object can be used in foreach loops without casting because it's cast to (array) automatically
Checks that submitted POST data exists and returns it as object.
mixed | false or object |
debugging | ( | $message = '', | |
$level = DEBUG_NORMAL, | |||
$backtrace = null ) |
Standard Debugging Function.
Returns true if the current site debugging settings are equal or above specified level. If passed a parameter it will emit a debugging notice similar to trigger_error(). The routing of notices is controlled by $CFG->debugdisplay eg use like this:
1) debugging('a normal debug notice'); 2) debugging('something really picky', DEBUG_ALL); 3) debugging('annoying debug message only for developers', DEBUG_DEVELOPER); 4) if (debugging()) { perform extra debugging operations (do not use print or echo) }
In code blocks controlled by debugging() (such as example 4) any output should be routed via debugging() itself, or the lower-level trigger_error() or error_log(). Using echo or print will break XHTML JS and HTTP headers.
It is also possible to define NO_DEBUG_DISPLAY which redirects the message to error_log.
string | $message | a message to print |
int | $level | the level at which this debugging statement should show |
array | $backtrace | use different backtrace |
bool |
dedupe_user_access | ( | ) |
default_error_handler | ( | $errno, | |
$errstr, | |||
$errfile, | |||
$errline ) |
Default error handler, prevents some white screens.
int | $errno | |
string | $errstr | |
string | $errfile | |
int | $errline |
bool | false means use default error handler |
default_exception_handler | ( | $ex | ) |
Default exception handler.
Exception | $ex |
void | -does not return. Terminates execution! |
default_page_type_list | ( | $pagetype, | |
$parentcontext = null, | |||
$currentcontext = null ) |
Generates a default page type list when a more appropriate callback cannot be decided upon.
string | $pagetype | |
stdClass | $parentcontext | |
stdClass | $currentcontext |
array |
delete_context | ( | ) |
delete_course_module | ( | ) |
delete_event | ( | ) |
detect_munged_arguments | ( | ) |
display_auth_lock_options | ( | $settings, | |
$auth, | |||
$userfields, | |||
$helptext, | |||
$mapremotefields, | |||
$updateremotefields, | |||
$customfields = array() ) |
Helper function used to print locking for auth plugins on admin pages.
admin_settingpage | $settings | Moodle admin settings instance |
string | $auth | authentication plugin shortname |
array | $userfields | user profile fields |
string | $helptext | help text to be displayed at top of form |
boolean | $mapremotefields | Map fields or lock only. |
boolean | $updateremotefields | Allow remote updates |
array | $customfields | list of custom profile fields |
dndupload_add_to_course | ( | $course, | |
$modnames ) |
Add the Javascript to enable drag and drop upload to a course page.
object | $course | The currently displayed course |
array | $modnames | The list of enabled (visible) modules on this site |
void |
download_as_dataformat | ( | $filename, | |
$dataformat, | |||
$columns, | |||
$iterator, | |||
$callback = null ) |
dataformatlib.php - Contains core dataformat related functions.
string | $filename | The base filename without an extension |
string | $dataformat | A dataformat name |
array | $columns | An ordered map of column keys and labels |
Iterator | $iterator | An iterator over the records, usually a RecordSet |
callable | $callback | An option function applied to each record before writing |
coding_exception |
dst_changes_for_year | ( | ) |
during_initial_install | ( | ) |
Indicates whether we are in the middle of the initial Moodle install.
Very occasionally it is necessary avoid running certain bits of code before the Moodle installation has completed. The installed flag is set in admin/index.php after Moodle core and all the plugins have been installed, but just before the person doing the initial install is asked to choose the admin password.
boolean | true if the initial install is not complete. |
editors_get_available | ( | ) |
Get the list of available editors.
array | Array ('editorname'=>'localised editor name') |
editors_get_enabled | ( | ) |
Returns list of enabled text editors.
array | of name=>texteditor |
editors_get_preferred_editor | ( | $format = NULL | ) |
Returns users preferred editor for given format.
int | $format | text format or null of none |
texteditor | object |
editors_get_preferred_format | ( | ) |
Returns users preferred text format.
int | standard text format |
editors_head_setup | ( | ) |
Setup all JS and CSS needed for editors.
void |
enrol_accessing_via_instance | ( | stdClass | $instance | ) |
Is current user accessing course via this enrolment method?
This is intended for operations that are going to affect enrol instances.
stdClass | $instance | enrol instance |
bool |
enrol_add_course_navigation | ( | navigation_node | $coursenode, |
$course ) |
enrol_calculate_duration | ( | $timestart, | |
$timeend ) |
Calculate duration base on start time and end time.
int | $timestart | Time start |
int | $timeend | Time end |
float|int | Calculated duration |
enrol_check_plugins | ( | $user, | |
bool | $ignoreintervalcheck = true ) |
Check all the login enrolment information for the given user object by querying the enrolment plugins This function may be very slow, use only once after log-in or login-as.
stdClass | $user | User object. |
bool | $ignoreintervalcheck | Force to ignore checking configured sync intervals. |
void |
enrol_cohort_can_view_cohort | ( | ) |
enrol_cohort_enrol_all_users | ( | ) |
enrol_cohort_get_cohorts | ( | ) |
enrol_cohort_search_cohorts | ( | ) |
enrol_course_delete | ( | $course, | |
$userid = null ) |
Called when course is about to be deleted.
If a user id is passed, only enrolments that the user has permission to un-enrol will be removed, otherwise all enrolments in the course will be removed.
stdClass | $course | |
int | null | $userid |
void |
enrol_course_edit_form | ( | MoodleQuickForm | $mform, |
$data, | |||
$context ) |
This function adds necessary enrol plugins UI into the course edit form.
MoodleQuickForm | $mform | |
object | $data | course edit form data |
object | $context | context of existing course or parent category if course does not exist |
void |
enrol_course_edit_validation | ( | array | $data, |
$context ) |
Validate course edit form data.
array | $data | raw form data |
object | $context | context of existing course or parent category if course does not exist |
array | errors array |
enrol_course_updated | ( | $inserted, | |
$course, | |||
$data ) |
Update enrol instances after course edit form submission.
bool | $inserted | true means new course added, false course already existed |
object | $course | |
object | $data | form data |
void |
enrol_get_all_users_courses | ( | $userid, | |
$onlyactive = false, | |||
$fields = null, | |||
$sort = null ) |
Returns list of courses user is enrolled into without performing any capability checks.
The $fields param is a list of field names to ADD so name just the fields you really need, which will be added and uniq'd.
int | $userid | User whose courses are returned, defaults to the current user. |
bool | $onlyactive | Return only active enrolments in courses user may see. |
string | array | $fields | Extra fields to be returned (array or comma-separated list). |
string | null | $sort | Comma separated list of fields to sort by, defaults to respecting navsortmycoursessort. |
array |
enrol_get_course_by_user_enrolment_id | ( | $ueid | ) |
Returns the course where a user enrolment belong to.
int | $ueid | user_enrolments id |
stdClass |
enrol_get_course_description_texts | ( | $course | ) |
Returns course enrolment detailed information.
object | $course |
array | of html fragments - can be used to construct lists |
enrol_get_course_info_icons | ( | $course, | |
array | $instances = NULL ) |
Returns course enrolment information icons.
object | $course | |
array | $instances | enrol instances of this course, improves performance |
array | of pix_icon |
enrol_get_course_users | ( | $courseid = false, | |
$onlyactive = false, | |||
$usersfilter = [], | |||
$uefilter = [], | |||
$usergroups = [] ) |
Return all users enrolled in a course.
int | $courseid | Course id or false if using $uefilter (user enrolment ids may belong to different courses) |
bool | $onlyactive | consider only active enrolments in enabled plugins and time restrictions |
array | $usersfilter | Limit the results obtained to this list of user ids. $uefilter compatibility not guaranteed. |
array | $uefilter | Limit the results obtained to this list of user enrolment ids. $usersfilter compatibility not guaranteed. |
array | $usergroups | Limit the results of users to the ones that belong to one of the submitted group ids. |
stdClass[] |
enrol_get_course_users_roles | ( | int | $courseid | ) |
Returns list of roles per users into course.
int | $courseid | Course id. |
array | Array[$userid][$roleid] = role_assignment. |
enrol_get_courses_sortingsql | ( | $sort = null | ) |
Returns SQL ORDER arguments which reflect the admin settings to sort my courses.
string | null | $sort | SQL ORDER arguments which were originally requested (optionally). |
string | SQL ORDER arguments. |
enrol_get_enrolment_end | ( | $courseid, | |
$userid ) |
This function returns the end of current active user enrolment.
It deals correctly with multiple overlapping user enrolments.
int | $courseid | |
int | $userid |
int|bool | timestamp when active enrolment ends, false means no active enrolment now, 0 means never |
enrol_get_instances | ( | $courseid, | |
$enabled ) |
Returns enrolment instances in given course.
int | $courseid | |
bool | $enabled |
array | of enrol instances |
enrol_get_my_courses | ( | $fields = null, | |
$sort = null, | |||
$limit = 0, | |||
$courseids = [], | |||
$allaccessible = false, | |||
$offset = 0, | |||
$excludecourses = [] ) |
Returns list of courses current $USER is enrolled in and can access.
The $fields param is a list of field names to ADD so name just the fields you really need, which will be added and uniq'd.
If $allaccessible is true, this will additionally return courses that the current user is not enrolled in, but can access because they are open to the user for other reasons (course view permission, currently viewing course as a guest, or course allows guest access without password).
string | array | $fields | Extra fields to be returned (array or comma-separated list). |
string | null | $sort | Comma separated list of fields to sort by, defaults to respecting navsortmycoursessort. Allowed prefixes for sort fields are: "ul" for the user_lastaccess table, "c" for the courses table, "ue" for the user_enrolments table. |
int | $limit | max number of courses |
array | $courseids | the list of course ids to filter by |
bool | $allaccessible | Include courses user is not enrolled in, but can access |
int | $offset | Offset the result set by this number |
array | $excludecourses | IDs of hidden courses to exclude from search |
array |
enrol_get_period_list | ( | ) |
Get the list of options for the enrolment period dropdown.
array | List of options for the enrolment period dropdown |
enrol_get_plugin | ( | $name | ) |
Returns instance of enrol plugin.
string | $name | name of enrol plugin ('manual', 'guest', ...) |
enrol_plugin |
enrol_get_plugins | ( | $enabled | ) |
Returns instances of enrol plugins.
bool | $enabled | return enabled only |
array | of enrol plugins name=>instance |
moodle_database enrol_get_shared_courses | ( | $user1, | |
$user2, | |||
$preloadcontexts = false, | |||
$checkexistsonly = false ) |
Returns any courses shared by the two users.
The courses has to be visible and enrolments has to be active, timestart and timeend restrictions are ignored.
$DB
stdClass | int | $user1 | |
stdClass | int | $user2 | |
bool | $preloadcontexts | If set to true contexts for the returned courses will be preloaded. |
bool | $checkexistsonly | If set to true then this function will return true if the users share any courses and false if not. |
array|bool | An array of courses that both users are enrolled in OR if $checkexistsonly set returns true if the users share any courses and false if not. |
enrol_get_users_courses | ( | $userid, | |
$onlyactive = false, | |||
$fields = null, | |||
$sort = null ) |
Returns list of courses user is enrolled into.
Note: Use enrol_get_all_users_courses() if you need the list without any capability checks.
The $fields param is a list of field names to ADD so name just the fields you really need, which will be added and uniq'd.
int | $userid | User whose courses are returned, defaults to the current user. |
bool | $onlyactive | Return only active enrolments in courses user may see. |
string | array | $fields | Extra fields to be returned (array or comma-separated list). |
string | null | $sort | Comma separated list of fields to sort by, defaults to respecting navsortmycoursessort. |
array |
enrol_is_enabled | ( | $enrol | ) |
Checks if a given plugin is in the list of enabled enrolment plugins.
string | $enrol | Enrolment plugin name |
boolean | Whether the plugin is enabled |
enrol_output_fragment_user_enrolment_form | ( | $args | ) |
Serve the user enrolment form as a fragment.
array | $args | List of named arguments for the fragment loader. |
string |
enrol_selfenrol_available | ( | $courseid | ) |
Is there a chance users might self enrol.
int | $courseid |
bool |
enrol_send_welcome_email_options | ( | ) |
Send welcome email "from" options.
array | list of from options |
enrol_sharing_course | ( | $user1, | |
$user2 ) |
Do these two students share any course?
The courses has to be visible and enrolments has to be active, timestart and timeend restrictions are ignored.
This function calls {
stdClass | int | $user1 | |
stdClass | int | $user2 |
bool |
enrol_try_internal_enrol | ( | $courseid, | |
$userid, | |||
$roleid = null, | |||
$timestart = 0, | |||
$timeend = 0 ) |
Try to enrol user via default internal auth plugin.
For now this is always using the manual enrol plugin...
$courseid | |
$userid | |
$roleid | |
$timestart | |
$timeend |
bool | success |
enrol_user_delete | ( | $user | ) |
Called when user is about to be deleted.
object | $user |
void |
enrol_user_sees_own_courses | ( | $user = null | ) |
Can user access at least one enrolled course?
Cheat if necessary, but find out as fast as possible!
int | stdClass | $user | null means use current user |
bool |
object environment_check | ( | $version, | |
$env_select ) |
This function will check for everything (DB, PHP and PHP extensions for now) returning an array of environment_result objects.
string | $version | xml version we are going to use to test this server |
int | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. |
environment_results[] | array of results encapsulated in one environment_result object |
environment_check_database | ( | $version, | |
$env_select ) |
This function will check if database requirements are satisfied.
@uses NO_VERSION_DATA_FOUND @uses NO_DATABASE_SECTION_FOUND @uses NO_DATABASE_VENDORS_FOUND @uses NO_DATABASE_VENDOR_MYSQL_FOUND @uses NO_DATABASE_VENDOR_POSTGRES_FOUND @uses NO_DATABASE_VENDOR_VERSION_FOUND
string | $version | xml version we are going to use to test this server |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
object | results encapsulated in one environment_result object |
environment_check_moodle | ( | $version, | |
$env_select ) |
This function will check if Moodle requirements are satisfied.
@uses NO_VERSION_DATA_FOUND
string | $version | xml version we are going to use to test this server |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
object | results encapsulated in one environment_result object |
environment_check_pcre_unicode | ( | $version, | |
$env_select ) |
Looks for buggy PCRE implementation, we need unicode support in Moodle...
string | $version | xml version we are going to use to test this server |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
stdClass | results encapsulated in one environment_result object, null if irrelevant |
environment_check_php | ( | $version, | |
$env_select ) |
This function will check if php requirements are satisfied.
@uses NO_VERSION_DATA_FOUND @uses NO_PHP_SECTION_FOUND @uses NO_PHP_VERSION_FOUND
string | $version | xml version we are going to use to test this server |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
object | results encapsulated in one environment_result object |
environment_check_php_extensions | ( | $version, | |
$env_select ) |
This function will check if php extensions requirements are satisfied.
@uses NO_VERSION_DATA_FOUND @uses NO_PHP_EXTENSIONS_SECTION_FOUND @uses NO_PHP_EXTENSIONS_NAME_FOUND
string | $version | xml version we are going to use to test this server |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
array | array of results encapsulated in one environment_result object |
environment_check_php_settings | ( | $version, | |
$env_select ) |
This function will check if php extensions requirements are satisfied.
@uses NO_VERSION_DATA_FOUND @uses NO_PHP_SETTINGS_NAME_FOUND
string | $version | xml version we are going to use to test this server |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
array | array of results encapsulated in one environment_result object |
environment_check_unicode | ( | $version, | |
$env_select ) |
This function will check if unicode database requirements are satisfied.
@uses NO_VERSION_DATA_FOUND @uses NO_UNICODE_SECTION_FOUND
string | $version | xml version we are going to use to test this server |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
object | results encapsulated in one environment_result object |
environment_custom_checks | ( | $version, | |
$env_select ) |
This function will do the custom checks.
@uses CUSTOM_CHECK_FUNCTION_MISSING @uses CUSTOM_CHECK_FILE_MISSING @uses NO_CUSTOM_CHECK_FOUND
string | $version | xml version we are going to use to test this server. |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
array | array of results encapsulated in environment_result objects. |
environment_get_errors | ( | $environment_results | ) |
Returns array of critical errors in plain text format.
array | $environment_results | array of results gathered |
array | errors |
environment_verify_plugin | ( | $plugin, | |
$pluginxml ) |
Checks if a plugin tag has a name attribute and it matches the plugin being tested.
string | $plugin | the name of the plugin. |
array | $pluginxml | the xmlised structure for the plugin tag being tested. |
boolean | true if the name attribute exists and matches the plugin being tested. |
error | ( | ) |
events_cleanup | ( | ) |
events_cron | ( | ) |
events_dequeue | ( | ) |
events_dispatch | ( | ) |
events_get_cached | ( | ) |
events_get_handlers | ( | ) |
events_is_registered | ( | ) |
events_load_def | ( | ) |
events_pending_count | ( | ) |
events_process_queued_handler | ( | ) |
events_queue_handler | ( | ) |
events_trigger | ( | ) |
events_trigger_legacy | ( | ) |
events_uninstall | ( | ) |
events_update_definition | ( | ) |
external_function_info | ( | ) |
extract_draft_file_urls_from_text | ( | $text, | |
$forcehttps = false, | |||
$contextid = null, | |||
$component = null, | |||
$filearea = null, | |||
$itemid = null, | |||
$filename = null ) |
Factory method for extracting draft file links from arbitrary text using regular expressions.
Only text is required; other file fields may be passed to filter.
string | $text | Some html content. |
bool | $forcehttps | force https urls. |
int | $contextid | This parameter and the next three identify the file area to save to. |
string | $component | The component name. |
string | $filearea | The filearea. |
int | $itemid | The item id for the filearea. |
string | $filename | The specific filename of the file. |
array |
fetch_context_capabilities | ( | ) |
|
abstract |
Override this function to actually implement the filtering.
Filter developers must make sure that filtering done after text cleaning does not introduce security vulnerabilities.
string | $text | some HTML content to process. |
array | $options | options passed to the filters |
string | the HTML content after the filtering has been applied. |
Reimplemented in filter_activitynames, filter_algebra, filter_codehighlighter, filter_displayh5p, filter_emoticon, filter_glossary, filter_mathjaxloader, filter_mediaplugin, filter_multilang, filter_tidy, and filter_urltolink.
filter_add_javascript | ( | $text | ) |
Add missing openpopup javascript to HTML files.
string | $text |
string |
filter_context_may_have_filter_settings | ( | $context | ) |
Certain types of context (block and user) may not have local filter settings.
the function checks a context to see whether it may have local config.
object | $context | a context. |
boolean | whether this context may have local filter settings. |
filter_delete_all_for_context | ( | $contextid | ) |
Delete all the data in the database relating to a context, used when contexts are deleted.
integer | $contextid | The id of the context being deleted. |
filter_delete_all_for_filter | ( | $filter | ) |
Delete all the data in the database relating to a filter, prior to deleting it.
string | $filter | The filter name, for example 'tex'. |
filter_get_active_in_context | ( | $context | ) |
Get the list of active filters, in the order that they should be used for a particular context, along with any local configuration variables.
context | $context | a context |
array | an array where the keys are the filter names, for example 'tex' and the values are any local configuration for that filter, as an array of name => value pairs from the filter_config table. In a lot of cases, this will be an empty array. So, an example return value for this function might be array(tex' => array()) |
filter_get_active_state | ( | string | $filtername, |
$contextid = null ) |
Returns the active state for a filter in the given context.
string | $filtername | The filter name, for example 'tex'. |
integer | $contextid | The id of the context to get the data for. |
int | value of active field for the given filter. |
filter_get_all_installed | ( | ) |
Get the names of all the filters installed in this Moodle.
array | path => filter name from the appropriate lang file. e.g. array('tex' => 'TeX Notation'); sorted in alphabetical order of name. |
filter_get_all_local_settings | ( | $contextid | ) |
This function is for use by backup.
Gets all the filter information specific to one context.
int | $contextid |
array | Array with two elements. The first element is an array of objects with fields filter and active. These come from the filter_active table. The second element is an array of objects with fields filter, name and value from the filter_config table. |
filter_get_available_in_context | ( | $context | ) |
List all of the filters that are available in this context, and what the local and inherited states of that filter are.
context | $context | a context that is not the system context. |
array | an array with filter names, for example 'tex' as keys. and and the values are objects with fields: ->filter filter name, same as the key. ->localstate TEXTFILTER_ON/OFF/INHERIT ->inheritedstate TEXTFILTER_ON/OFF - the state that will be used if localstate is set to TEXTFILTER_INHERIT. |
filter_get_global_states | ( | ) |
This function is for use by the filter administration page.
array | 'filtername' => object with fields 'filter' (=filtername), 'active' and 'sortorder' |
filter_get_globally_enabled | ( | ) |
Return a list of all the filters that may be in use somewhere.
array | where the keys and values are both the filter name, like 'tex'. |
filter_get_globally_enabled_filters_with_config | ( | ) |
Get the globally enabled filters.
This returns the filters which could be used in any context. Essentially the filters which are not disabled for the entire site.
array | Keys are filter names, and values the config. |
filter_get_local_config | ( | $filter, | |
$contextid ) |
Get local config variables for a filter in a context.
Normally (when your filter is running) you don't need to call this, becuase the config is fetched for you automatically. You only need this, for example, when you are getting the config so you can show the user an editing from.
string | $filter | The filter name, for example 'tex'. |
integer | $contextid | The ID of the context to get the local config for. |
array | of name => value pairs. |
filter_get_name | ( | $filter | ) |
Look up the name of this filter.
string | $filter | the filter name |
string | the human-readable name for this filter. |
filter_get_string_filters | ( | ) |
Return the names of the filters that should also be applied to strings (when they are enabled).
array | where the keys and values are both the filter name, like 'tex'. |
filter_has_global_settings | ( | $filter | ) |
Does this filter have a global settings page in the admin tree? (The settings page for a filter must be called, for example, filtersettingfiltertex.)
string | $filter | The filter name, for example 'tex'. |
boolean | Whether there should be a 'Settings' link on the config page. |
filter_has_local_settings | ( | $filter | ) |
Does this filter have local (per-context) settings?
string | $filter | The filter name, for example 'tex'. |
boolean | Whether there should be a 'Settings' link on the manage filters in context page. |
filter_is_enabled | ( | $filtername | ) |
string | $filtername | The filter name, for example 'tex'. |
boolean | is this filter allowed to be used on this site. That is, the admin has set the global 'active' setting to On, or Off, but available. |
filter_phrases | ( | $text, | |
$linkarray, | |||
$ignoretagsopen = null, | |||
$ignoretagsclose = null, | |||
$overridedefaultignore = false, | |||
$linkarrayalreadyprepared = false ) |
Process phrases intelligently found within a HTML text (such as adding links).
string | $text | the text that we are filtering |
filterobject[] | $linkarray | an array of filterobjects |
array | $ignoretagsopen | an array of opening tags that we should ignore while filtering |
array | $ignoretagsclose | an array of corresponding closing tags |
bool | $overridedefaultignore | True to only use tags provided by arguments |
bool | $linkarrayalreadyprepared | True to say that filter_prepare_phrases_for_filtering has already been called for $linkarray. Default false. |
string |
filter_preload_activities | ( | course_modinfo | $modinfo | ) |
Preloads the list of active filters for all activities (modules) on the course using two database queries.
course_modinfo | $modinfo | Course object from get_fast_modinfo |
filter_prepare_phrase_for_replacement | ( | filterobject | $linkobject | ) |
Fill in the remaining ->work... fields, that would be needed to replace the phrase.
filterobject | $linkobject | the link object on which to set additional fields. |
filter_prepare_phrases_for_filtering | ( | array | $linkarray | ) |
Prepare a list of link for processing with filter_phrases().
filterobject[] | $linkarray | the links that will be passed to filter_phrases(). |
filterobject[] | the updated list of links with necessary pre-processing done. |
filter_remove_duplicates | ( | $linkarray | ) |
Remove duplicate from a list of filterobject.
filterobject[] | $linkarray | a list of filterobject. |
filterobject[] | the same list, but with dupicates removed. |
filter_save_ignore_tags | ( | & | $text, |
$filterignoretagsopen, | |||
$filterignoretagsclose, | |||
& | $ignoretags ) |
Extract open/lose tags and their contents to avoid being processed by filters.
Useful to extract pieces of code like ... tags. It returns the text converted with some <#xTEXTFILTER_EXCL_SEPARATORx#> codes replacing the extracted text. Such extracted texts are returned in the ignoretags array (as values), with codes as keys.
string | $text | the text that we are filtering (in/out) |
array | $filterignoretagsopen | an array of open tags to start searching |
array | $filterignoretagsclose | an array of close tags to end searching |
array | $ignoretags | an array of saved strings useful to rebuild the original text (in/out) |
filter_save_tags | ( | & | $text, |
& | $tags ) |
Extract tags (any text enclosed by < and > to avoid being processed by filters.
It returns the text converted with some <xTEXTFILTER_EXCL_SEPARATORx%> codes replacing the extracted text. Such extracted texts are returned in the tags array (as values), with codes as keys.
string | $text | the text that we are filtering (in/out) |
array | $tags | an array of saved strings useful to rebuild the original text (in/out) |
filter_set_applies_to_strings | ( | $filter, | |
$applytostrings ) |
Sets whether a particular active filter should be applied to all strings by format_string, or just used by format_text.
string | $filter | The filter name, for example 'tex'. |
boolean | $applytostrings | if true, this filter will apply to format_string and format_text, when it is enabled. |
filter_set_global_state | ( | $filtername, | |
$state, | |||
$move = 0 ) |
Set the global activated state for a text filter.
string | $filtername | The filter name, for example 'tex'. |
int | $state | One of the values TEXTFILTER_ON, TEXTFILTER_OFF or TEXTFILTER_DISABLED. |
int | $move | -1 means up, 0 means the same, 1 means down |
filter_set_local_config | ( | $filter, | |
$contextid, | |||
$name, | |||
$value ) |
Set a particular local config variable for a filter in a context.
string | $filter | The filter name, for example 'tex'. |
integer | $contextid | The id of the context to get the local config for. |
string | $name | the setting name. |
string | $value | the corresponding value. |
filter_set_local_state | ( | $filter, | |
$contextid, | |||
$state ) |
Set the local activated state for a text filter.
string | $filter | The filter name, for example 'tex'. |
integer | $contextid | The id of the context to get the local config for. |
integer | $state | One of the values TEXTFILTER_ON, TEXTFILTER_OFF or TEXTFILTER_INHERIT. |
void |
moodle_text_filter::filter_stage_post_clean | ( | string | $text, |
array | $options ) |
Filter HTML text at the very end after text is sanitised.
NOTE: this is called even if $options['noclean'] is true and text is not cleaned.
string | $text | |
array | $options |
string |
moodle_text_filter::filter_stage_pre_clean | ( | string | $text, |
array | $options ) |
Filter HTML text before sanitising text.
NOTE: this is called even if $options['noclean'] is true and text is not cleaned.
string | $text | |
array | $options |
string |
moodle_text_filter::filter_stage_pre_format | ( | string | $text, |
array | $options ) |
Filter text before changing format to HTML.
string | $text | |
array | $options |
string |
moodle_text_filter::filter_stage_string | ( | string | $text, |
array | $options ) |
Filter simple text coming from format_string().
Note that unless $CFG->formatstringstriptags is disabled HTML tags are not expected in returned value.
string | $text | |
array | $options |
string |
filter_manager::filter_string | ( | $string, | |
$context ) |
Filter a piece of string.
string | $string | The text to filter |
context | $context | the context. |
string | resulting string |
Reimplemented in performance_measuring_filter_manager.
null_filter_manager::filter_string | ( | $string, | |
$context ) |
As for the equivalent filter_manager method.
string | $string | The text to filter |
context | $context | not used. |
string | resulting string |
performance_measuring_filter_manager::filter_string | ( | $string, | |
$context ) |
Filter a piece of string.
string | $string | The text to filter |
context | $context | the context. |
string | resulting string |
Reimplemented from filter_manager.
filter_manager::filter_text | ( | $text, | |
$context, | |||
array | $options = array(), | ||
array | $skipfilters = null ) |
Filter some text.
string | $text | The text to filter |
context | $context | the context. |
array | $options | options passed to the filters |
array | $skipfilters | of filter names. Any filters that should not be applied to this text. |
string | resulting text |
Reimplemented in performance_measuring_filter_manager.
filter_text | ( | ) |
null_filter_manager::filter_text | ( | $text, | |
$context, | |||
array | $options = array(), | ||
array | $skipfilters = null ) |
As for the equivalent filter_manager method.
string | $text | The text to filter |
context | $context | not used. |
array | $options | not used |
array | $skipfilters | not used |
string | resulting text. |
performance_measuring_filter_manager::filter_text | ( | $text, | |
$context, | |||
array | $options = array(), | ||
array | $skipfilters = null ) |
Filter some text.
string | $text | The text to filter |
context | $context | the context. |
array | $options | options passed to the filters |
array | $skipfilters | of filter names. Any filters that should not be applied to this text. |
string | resulting text |
Reimplemented from filter_manager.
filter_unset_local_config | ( | $filter, | |
$contextid, | |||
$name ) |
Remove a particular local config variable for a filter in a context.
string | $filter | The filter name, for example 'tex'. |
integer | $contextid | The id of the context to get the local config for. |
string | $name | the setting name. |
fix_align_rtl | ( | $align | ) |
Returns swapped left<=> right if in RTL environment.
Part of RTL Moodles support.
string | $align | align to check |
string |
format_backtrace | ( | $callers, | |
$plaintext = false ) |
Formats a backtrace ready for output.
This function does not include function arguments because they could contain sensitive information not suitable to be exposed in a response.
array | $callers | backtrace array, as returned by debug_backtrace(). |
boolean | $plaintext | if false, generates HTML, if true generates plain text. |
string | formatted backtrace, ready for output. |
format_module_intro | ( | $module, | |
$activity, | |||
$cmid, | |||
$filter = true ) |
Formats activity intro text.
string | $module | name of module |
object | $activity | instance of activity |
int | $cmid | course module id |
bool | $filter | filter resulting html text |
string |
format_string | ( | $string, | |
$striplinks = true, | |||
$options = null ) |
Given a simple string, this function returns the string processed by enabled string filters if $CFG->filterall is enabled.
This function should be used to print short strings (non html) that need filter processing e.g. activity titles, post subjects, glossary concepts.
@staticvar bool $strcache
string | $string | The string to be filtered. Should be plain text, expect possibly for multilang tags. |
boolean | $striplinks | To strip any link in the result text. Moodle 1.8 default changed from false to true! MDL-8713 |
array | $options | options array/object or courseid |
string |
format_text | ( | $text, | |
$format = FORMAT_MOODLE, | |||
$options = null, | |||
$courseiddonotuse = null ) |
Given text in a variety of format codings, this function returns the text as safe HTML.
This function should mainly be used for long strings like posts, answers, glossary items etc. For short strings format_string().
Options: trusted : If true the string won't be cleaned. Default false required noclean=true. noclean : If true the string won't be cleaned, unless $CFG->forceclean is set. Default false required trusted=true. nocache : If true the strign will not be cached and will be formatted every call. Default false. filter : If true the string will be run through applicable filters as well. Default true. para : If true then the returned string will be wrapped in div tags. Default true. newlines : If true then lines newline breaks will be converted to HTML newline breaks. Default true. context : The context that will be used for filtering. overflowdiv : If set to true the formatted text will be encased in a div with the class no-overflow before being returned. Default false. allowid : If true then id attributes will not be removed, even when using htmlpurifier. Default false. blanktarget : If true all tags will have target="_blank" added unless target is explicitly specified.
@staticvar array $croncache
string | $text | The text to be formatted. This is raw text originally from user input. |
int | $format | Identifier of the text format to be used [FORMAT_MOODLE, FORMAT_HTML, FORMAT_PLAIN, FORMAT_MARKDOWN] |
stdClass | array | $options | text formatting options |
int | $courseiddonotuse | deprecated course id, use context option instead |
string |
format_text_email | ( | $text, | |
$format ) |
Given text in a variety of format codings, this function returns the text as plain text suitable for plain email.
string | $text | The text to be formatted. This is raw text originally from user input. |
int | $format | Identifier of the text format to be used [FORMAT_MOODLE, FORMAT_HTML, FORMAT_PLAIN, FORMAT_WIKI, FORMAT_MARKDOWN] |
string |
format_text_menu | ( | ) |
Just returns an array of text formats suitable for a popup menu.
array |
format_weeks_get_section_dates | ( | ) |
formerr | ( | ) |
generate_email_supportuser | ( | ) |
generate_image_thumbnail | ( | $filepath, | |
$width, | |||
$height ) |
Generates a thumbnail for the given image.
If the GD library has at least version 2 and PNG support is available, the returned data is the content of a transparent PNG file containing the thumbnail. Otherwise, the function returns contents of a JPEG file with black background containing the thumbnail.
string | $filepath | the full path to the original image file |
int | $width | the width of the requested thumbnail |
int | $height | the height of the requested thumbnail |
string|bool | false if a problem occurs, the thumbnail image data otherwise |
generate_image_thumbnail_from_image | ( | $original, | |
$imageinfo, | |||
$width, | |||
$height ) |
Generates a thumbnail for the given image string.
If the GD library has at least version 2 and PNG support is available, the returned data is the content of a transparent PNG file containing the thumbnail. Otherwise, the function returns contents of a JPEG file with black background containing the thumbnail.
resource | $original | The image to work on. |
array | $imageinfo | Contains [0] => originalwidth, [1] => originalheight. |
int | $width | The width of the requested thumbnail. |
int | $height | The height of the requested thumbnail. |
string|bool | False if a problem occurs, the thumbnail image data otherwise. |
generate_image_thumbnail_from_string | ( | $filedata, | |
$width, | |||
$height ) |
Generates a thumbnail for the given image string.
If the GD library has at least version 2 and PNG support is available, the returned data is the content of a transparent PNG file containing the thumbnail. Otherwise, the function returns contents of a JPEG file with black background containing the thumbnail.
string | $filedata | The image content as a string |
int | $width | the width of the requested thumbnail |
int | $height | the height of the requested thumbnail |
string|bool | false if a problem occurs, the thumbnail image data otherwise |
generate_page_type_patterns | ( | $pagetype, | |
$parentcontext = null, | |||
$currentcontext = null ) |
Given a specific page type, parent context and currect context, return all the page type patterns that might be used by this block.
string | $pagetype | for example 'course-view-weeks' or 'mod-quiz-view'. |
stdClass | $parentcontext | Block's parent context |
stdClass | $currentcontext | Current context of block |
array | an array of all the page type patterns that might match this page type. |
generate_uuid | ( | ) |
get_accesshide | ( | $text, | |
$elem = 'span', | |||
$class = '', | |||
$attrs = '' ) |
Return a HTML element with the class "accesshide", for accessibility.
Please use cautiously - where possible, text should be visible!
string | $text | Plain text. |
string | $elem | Lowercase element name, default "span". |
string | $class | Additional classes for the element. |
string | $attrs | Additional attributes string in the form, "name='value' name2='value2'" |
string | HTML string. |
|
static |
Returns hash of all core + plugin /db/ directories.
This is relatively slow and not fully cached, use with care!
array | null | $components | optional component directory => hash array to use. Only used in PHPUnit. |
string | sha1 hash. |
|
static |
Get the hashes of all core + plugin /db/ directories.
array | null | $directories | optional component directory array to hash. Only used in PHPUnit. |
array | of directory => hash. |
get_all_mods | ( | ) |
get_all_sections | ( | ) |
get_all_subcategories | ( | ) |
get_all_user_name_fields | ( | ) |
|
static |
Returns hash of all versions including core and all plugins.
This is relatively slow and not fully cached, use with care!
array | as (string)plugintype_pluginname => (int)version |
|
static |
Returns hash of all versions including core and all plugins.
This is relatively slow and not fully cached, use with care!
string | sha1 hash |
get_array_of_activities | ( | int | $courseid, |
bool | $usecache = false ) |
For a given course, returns an array of course activity objects Each item in the array contains he following properties:
int | $courseid | course id |
bool | $usecache | get activities from cache if modinfo exists when $usecache is true |
array | list of activities |
get_backpack_settings | ( | $userid, | |
$refresh = false ) |
Returns external backpack settings and badges from this backpack.
This function first checks if badges for the user are cached and tries to retrieve them from the cache. Otherwise, badges are obtained through curl request to the backpack.
int | $userid | Backpack user ID. |
boolean | $refresh | Refresh badges collection in cache. |
null|object | Returns null is there is no backpack or object with backpack settings. |
get_backup_temp_directory | ( | $directory | ) |
Get the full path of a directory under $CFG->backuptempdir.
string | $directory | the relative path of the directory under $CFG->backuptempdir |
string|false | Returns full path to directory given a valid string; otherwise, false. |
get_browser_version_classes | ( | ) |
get_categories | ( | ) |
get_category_courses_array | ( | ) |
get_category_courses_array_recursively | ( | ) |
get_child_categories | ( | ) |
get_child_contexts | ( | ) |
get_clam_error_code | ( | ) |
|
static |
Returns all classes in a component matching the provided namespace.
It checks that the class exists.
e.g. get_component_classes_in_namespace('mod_forum', 'event')
string | null | $component | A valid moodle component (frankenstyle) or null if searching all components |
string | $namespace | Namespace from the component name or empty string if all $component classes. |
array | The full class name as key and the class path as value, empty array if $component is null and $namespace is empty. |
|
static |
Return exact absolute path to a plugin directory.
string | $component | name such as 'moodle', 'mod_forum' |
string | full path to component directory; NULL if not found |
string | $component | name such as 'moodle', 'mod_forum' |
string | full path to component directory; NULL if not found |
|
static |
Fetch the component name from a Moodle PSR-like namespace.
Note: Classnames in the flat underscore_class_name_format are not supported.
string | $classname |
null|string | The component name, or null if a matching component was not found |
|
static |
Returns a list of frankenstyle component names and their paths, for all components (plugins and subsystems).
E.g. [ 'mod' => [ 'mod_forum' => FORUM_PLUGIN_PATH, ... ], ... 'core' => [ 'core_comment' => COMMENT_SUBSYSTEM_PATH, ... ] ]
array | an associative array of components and their corresponding paths. |
|
static |
Returns a list of frankenstyle component names, including all plugins, subplugins, and subsystems.
Note: By default the 'core' subsystem is not included.
bool | $includecore | Whether to include the 'core' subsystem |
string[] | the list of frankenstyle component names. |
get_context_instance | ( | $contextlevel, | |
$instance = 0, | |||
$strictness = IGNORE_MISSING ) |
Get the context instance as an object.
This function will create the context instance if it does not exist yet.
integer | $contextlevel | The context level, for example CONTEXT_COURSE, or CONTEXT_MODULE. |
integer | $instance | The instance id. For $level = CONTEXT_COURSE, this would be $course->id, for $level = CONTEXT_MODULE, this would be $cm->id. And so on. Defaults to 0 |
int | $strictness | IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found; MUST_EXIST means throw exception if no record or multiple records found |
context | The context object. |
get_context_instance_by_id | ( | ) |
get_context_url | ( | ) |
get_contextlevel_name | ( | ) |
|
static |
Returns the list of available API names.
string[] | the list of available API names. |
|
static |
List all core APIs and their attributes.
This is a list of all the existing / allowed APIs in moodle, each one with the following attributes:
stdClass[] | array of APIs (as keys) with their attributes as object instances. |
get_core_subsystems | ( | $fullpaths = false | ) |
List all core subsystems and their location.
This is a list of components that are part of the core and their language strings are defined in /lang/en/<<subsystem>>.php. If a given plugin is not listed here and it does not have proper plugintype prefix, then it is considered as course activity module.
The location is optionally dirroot relative path. NULL means there is no special directory for this subsystem. If the location is set, the subsystem's renderer.php is expected to be there.
bool | $fullpaths | false means relative paths from dirroot, use true for performance reasons |
array | of (string)name => (string|null)location |
|
static |
List all core subsystems and their location.
This is a list of components that are part of the core and their language strings are defined in /lang/en/<<subsystem>>.php. If a given plugin is not listed here and it does not have proper plugintype prefix, then it is considered as course activity module.
The location is absolute file path to dir. NULL means there is no special directory for this subsystem. If the location is set, the subsystem's renderer.php is expected to be there.
array | of (string)name => (string|null)full dir location |
get_course_and_cm_from_cmid | ( | $cmorid, | |
$modulename = '', | |||
$courseorid = 0, | |||
$userid = 0 ) |
Efficiently retrieves the $course (stdclass) and $cm (cm_info) objects, given a cmid.
If module name is also provided, it will ensure the cm is of that type.
Usage: list($course, $cm) = get_course_and_cm_from_cmid($cmid, 'forum');
Using this method has a performance advantage because it works by loading modinfo for the course - which will then be cached and it is needed later in most requests. It also guarantees that the $cm object is a cm_info and not a stdclass.
The $course object can be supplied if already known and will speed up this function - although it is more efficient to use this function to get the course if you are starting from a cmid.
To avoid security problems and obscure bugs, you should always specify $modulename if the cmid value came from user input.
By default this obtains information (for example, whether user can access the activity) for current user, but you can specify a userid if required.
stdClass | int | $cmorid | Id of course-module, or database object |
string | $modulename | Optional modulename (improves security) |
stdClass | int | $courseorid | Optional course object if already loaded |
int | $userid | Optional userid (default = current) |
array | Array with 2 elements $course and $cm |
moodle_exception | If the item doesn't exist or is of wrong module name |
get_course_and_cm_from_instance | ( | $instanceorid, | |
$modulename, | |||
$courseorid = 0, | |||
$userid = 0 ) |
Efficiently retrieves the $course (stdclass) and $cm (cm_info) objects, given an instance id or record and module name.
Usage: list($course, $cm) = get_course_and_cm_from_instance($forum, 'forum');
Using this method has a performance advantage because it works by loading modinfo for the course - which will then be cached and it is needed later in most requests. It also guarantees that the $cm object is a cm_info and not a stdclass.
The $course object can be supplied if already known and will speed up this function - although it is more efficient to use this function to get the course if you are starting from an instance id.
By default this obtains information (for example, whether user can access the activity) for current user, but you can specify a userid if required.
stdclass | int | $instanceorid | Id of module instance, or database object |
string | $modulename | Modulename (required) |
stdClass | int | $courseorid | Optional course object if already loaded |
int | $userid | Optional userid (default = current) |
array | Array with 2 elements $course and $cm |
moodle_exception | If the item doesn't exist or is of wrong module name |
get_course_category | ( | ) |
get_course_category_tree | ( | ) |
get_course_context | ( | ) |
get_course_participants | ( | ) |
get_course_section | ( | ) |
get_courseid_from_context | ( | ) |
get_courses_page | ( | ) |
get_courses_wmanagers | ( | ) |
get_current_group | ( | ) |
get_device_cfg_var_name | ( | ) |
get_device_type | ( | ) |
get_device_type_list | ( | ) |
get_docs_url | ( | $path = null | ) |
Returns the Moodle Docs URL in the users language for a given 'More help' link.
There are three cases:
This is the only option that should be used in standard Moodle code. The other two options have been implemented because they are useful for third-party plugins.
string | $path | the place to link to. See above for details. |
string | The MoodleDocs URL in the user's language. for example $path} |
get_enrolled_join | ( | context | $context, |
$useridcolumn, | |||
$onlyactive = false, | |||
$onlysuspended = false, | |||
$enrolid = 0 ) |
Returns array with sql joins and parameters returning all ids of users enrolled into course.
This function is using 'ej[0-9]+_' prefix for table names and parameters.
coding_exception |
context | $context | |
string | $useridcolumn | User id column used the calling query, e.g. u.id |
bool | $onlyactive | consider only active enrolments in enabled plugins and time restrictions |
bool | $onlysuspended | inverse of onlyactive, consider only suspended enrolments |
int | $enrolid | The enrolment ID. If not 0, only users enrolled using this enrolment method will be returned. |
core\dml\sql_join | Contains joins, wheres, params |
get_enrolled_sql | ( | context | $context, |
$withcapability = '', | |||
$groupids = 0, | |||
$onlyactive = false, | |||
$onlysuspended = false, | |||
$enrolid = 0 ) |
Returns array with sql code and parameters returning all ids of users enrolled into course.
This function is using 'eu[0-9]+_' prefix for table names and parameters.
context | $context | |
string | $withcapability | |
int | array | $groupids | The groupids, 0 or [] means all groups and USERSWITHOUTGROUP no group |
bool | $onlyactive | consider only active enrolments in enabled plugins and time restrictions |
bool | $onlysuspended | inverse of onlyactive, consider only suspended enrolments |
int | $enrolid | The enrolment ID. If not 0, only users enrolled using this enrolment method will be returned. |
array | list($sql, $params) |
get_enrolled_users | ( | context | $context, |
$withcapability = '', | |||
$groupids = 0, | |||
$userfields = 'u.*', | |||
$orderby = null, | |||
$limitfrom = 0, | |||
$limitnum = 0, | |||
$onlyactive = false ) |
Returns list of users enrolled into course.
context | $context | |
string | $withcapability | |
int | array | $groupids | The groupids, 0 or [] means all groups and USERSWITHOUTGROUP no group |
string | $userfields | requested user record fields |
string | $orderby | |
int | $limitfrom | return a subset of records, starting at this point (optional, required if $limitnum is set). |
int | $limitnum | return a subset comprising this many records (optional, required if $limitfrom is set). |
bool | $onlyactive | consider only active enrolments in enabled plugins and time restrictions |
array | of user records |
get_enrolled_with_capabilities_join | ( | context | $context, |
$prefix = '', | |||
$capability = '', | |||
$groupids = 0, | |||
$onlyactive = false, | |||
$onlysuspended = false, | |||
$enrolid = 0 ) |
Returns an array of joins, wheres and params that will limit the group of users to only those enrolled and with given capability (if specified).
Note this join will return duplicate rows for users who have been enrolled several times (e.g. as manual enrolment, and as self enrolment). You may need to use a SELECT DISTINCT in your query (see get_enrolled_sql for example).
In case is guaranteed some of the joins never match any rows, the resulting join_sql->cannotmatchanyrows will be true. This happens when the capability is prohibited.
context | $context | |
string | $prefix | optional, a prefix to the user id column |
string | array | $capability | optional, may include a capability name, or array of names. If an array is provided then this is the equivalent of a logical 'OR', i.e. the user needs to have one of these capabilities. |
int | array | $groupids | The groupids, 0 or [] means all groups and USERSWITHOUTGROUP no group |
bool | $onlyactive | consider only active enrolments in enabled plugins and time restrictions |
bool | $onlysuspended | inverse of onlyactive, consider only suspended enrolments |
int | $enrolid | The enrolment ID. If not 0, only users enrolled using this enrolment method will be returned. |
core\dml\sql_join | Contains joins, wheres, params and cannotmatchanyrows |
get_environment_for_version | ( | $version, | |
$env_select ) |
This function will return the xmlized data belonging to one Moodle version.
string | $version | top version from which we start to look backwards |
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
mixed | the xmlized structure or false on error |
get_exception_info | ( | $ex | ) |
Returns detailed information about specified exception.
Throwable | $ex | any sort of exception or throwable. |
stdClass | standardised info to display. Fields are clear if you look at the end of this function. |
get_extra_user_fields | ( | ) |
get_extra_user_fields_sql | ( | ) |
get_fast_modinfo | ( | $courseorid, | |
$userid = 0, | |||
$resetonly = false ) |
Returns reference to full info about modules in course (including visibility).
Cached and as fast as possible (0 or 1 db query).
use get_fast_modinfo($courseid, 0, true) to reset the static cache for particular course use get_fast_modinfo(0, 0, true) to reset the static cache for all courses
use rebuild_course_cache($courseid, true) to reset the application AND static cache for particular course when it's contents has changed
int | stdClass | $courseorid | object from DB table 'course' (must have field 'id' and recommended to have field 'cacherev') or just a course id. Just course id is enough when calling get_fast_modinfo() for current course or site or when calling for any other course for the second time. |
int | $userid | User id to populate 'availble' and 'uservisible' attributes of modules and sections. Set to 0 for current user (default). Set to -1 to avoid calculation of dynamic user-depended data. |
bool | $resetonly | whether we want to get modinfo or just reset the cache |
course_modinfo|null | Module information for course, or null if resetting |
moodle_exception | when course is not found (nothing is thrown if resetting) |
get_file_argument | ( | ) |
Extracts file argument either from file parameter or PATH_INFO.
Note: $scriptname parameter is not needed anymore
string | file path (only safe characters) |
get_file_url | ( | ) |
get_formatted_help_string | ( | $identifier, | |
$component, | |||
$ajax = false, | |||
$a = null ) |
Get the value of a help string fully prepared for display in the current language.
string | $identifier | The identifier of the string to search for. |
string | $component | The module the string is associated with. |
boolean | $ajax | Whether this help is called from an AJAX script. This is used to influence text formatting and determines which format to output the doclink in. |
string | object | array | $a | An object, string or number that can be used within translation strings |
stdClass | An object containing:
|
get_generic_section_name | ( | ) |
get_group_picture_url | ( | $group, | |
$courseid, | |||
$large = false, | |||
$includetoken = false ) |
Return the url to the group picture.
stdClass | $group | A group object. |
int | $courseid | The course ID for the group. |
bool | $large | A large or small group picture? Default is small. |
boolean | $includetoken | Whether to use a user token when displaying this group image. True indicates to generate a token for current user, and integer value indicates to generate a token for the user whose id is the value indicated. If the group picture is included in an e-mail or some other location where the audience is a specific user who will not be logged in when viewing, then we use a token to authenticate the user. |
moodle_url | Returns the url for the group picture. |
get_html_lang | ( | $dir = false | ) |
Return a string containing 'lang', xml:lang and optionally 'dir' HTML attributes.
Internationalisation, for print_header and backup/restorelib.
bool | $dir | Default false |
string | Attributes |
get_html_lang_attribute_value | ( | string | $langcode | ) |
Converts a language code to hyphen-separated format in accordance to the BCP47 syntax
.
For additional information, check out MDN web docs - lang
.
string | $langcode | The language code to convert. |
string |
get_latest_version_available | ( | $version, | |
$env_select ) |
This function will return the most recent version in the environment.xml file previous or equal to the version requested.
string | $version | top version from which we start to look backwards |
int | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. |
string|bool | string more recent version or false if not found |
get_level | ( | $element | ) |
Here all the restrict functions are coded to be used by the environment checker.
All those functions will receive the result object and will return it modified as needed (status and bypass string)
array | $element | the element from the environment.xml file that should have either a level="required" or level="optional" attribute. |
string | "required" or "optional". |
get_list_of_environment_versions | ( | $contents | ) |
This function will return the list of Moodle versions available.
array | of versions |
get_list_of_timezones | ( | ) |
get_local_referer | ( | $stripquery = true | ) |
Returns the cleaned local URL of the HTTP_REFERER less the URL query string parameters if required.
bool | $stripquery | if true, also removes the query part of the url. |
string | The resulting referer or empty string. |
get_logs | ( | ) |
get_logs_usercourse | ( | ) |
get_logs_userday | ( | ) |
get_module_metadata | ( | ) |
get_moodle_cookie | ( | ) |
Gets a moodle cookie with a weakly encrypted username.
string | username |
|
static |
Used for maping events on restore.
bool |
get_parent_contextid | ( | ) |
get_parent_contexts | ( | ) |
performance_measuring_filter_manager::get_performance_summary | ( | ) |
Return performance information, in the form required by get_performance_info().
array | the performance info. |
|
static |
Returns the exact absolute path to plugin directory.
string | $plugintype | type of plugin |
string | $pluginname | name of the plugin |
string | full path to plugin directory; null if not found |
string | $plugintype | type of plugin |
string | $name | name of the plugin |
string | full path to plugin directory; NULL if not found |
|
static |
Get list of plugins of given type.
Use when listing real plugins of one type.
string | $plugintype |
array | as (string)pluginname => (string)fulldir |
string | $plugintype | type of plugin |
array | name=>fulllocation pairs of plugins of given type |
|
static |
Get a list of all the plugins of a given type that define a certain class in a certain file.
The plugin component names and class names are returned.
string | $plugintype | the type of plugin, e.g. 'mod' or 'report'. |
string | $class | the part of the name of the class after the frankenstyle prefix. e.g 'thing' if you are looking for classes with names like report_courselist_thing. If you are looking for classes with the same name as the plugin name (e.g. qtype_multichoice) then pass ''. Frankenstyle namespaces are also supported. |
string | $file | the name of file within the plugin that defines the class. |
array | with frankenstyle plugin names as keys (e.g. 'report_courselist', 'mod_forum') and the class names as values (e.g. 'report_courselist_thing', 'qtype_multichoice'). |
The plugin component names and class names are returned.
string | $plugintype | the type of plugin, e.g. 'mod' or 'report'. |
string | $class | the part of the name of the class after the frankenstyle prefix. e.g 'thing' if you are looking for classes with names like report_courselist_thing. If you are looking for classes with the same name as the plugin name (e.g. qtype_multichoice) then pass ''. |
string | $file | the name of file within the plugin that defines the class. |
array | with frankenstyle plugin names as keys (e.g. 'report_courselist', 'mod_forum') and the class names as values (e.g. 'report_courselist_thing', 'qtype_multichoice'). |
|
static |
Get a list of all the plugins of a given type that contain a particular file.
string | $plugintype | the type of plugin, e.g. 'mod' or 'report'. |
string | $file | the name of file that must be present in the plugin. (e.g. 'view.php', 'db/install.xml'). |
bool | $include | if true (default false), the file will be include_once-ed if found. |
array | with plugin name as keys (e.g. 'forum', 'courselist') and the path to the file relative to dirroot as value (e.g. "$CFG->dirroot/mod/forum/view.php"). |
get_plugin_list_with_file | ( | ) |
get_plugin_types | ( | $fullpaths = true | ) |
Lists all plugin types.
bool | $fullpaths | false means relative paths from dirroot |
array | Array of strings - name=>location |
|
static |
Get list of available plugin types together with their location.
array | as (string)plugintype => (string)fulldir |
|
static |
Returns list of plugin types that allow subplugins.
array | as (string)plugintype => (string)fulldir |
get_print_section_cm_text | ( | ) |
get_real_size | ( | $size = 0 | ) |
Converts numbers like 10M into bytes.
string | $size | The size to be converted |
int |
get_recent_enrolments | ( | ) |
get_records_csv | ( | ) |
get_referer | ( | ) |
get_related_contexts_string | ( | ) |
get_request_storage_directory | ( | $exceptiononerror = true, | |
bool | $forcecreate = false ) |
Get a per-request storage directory in the tempdir.
The directory is automatically cleaned up during the shutdown handler.
bool | $exceptiononerror | throw exception if error encountered |
bool | $forcecreate | Force creation of a new parent directory |
string | Returns full path to directory if successful, false if not; may throw exception |
get_role_context_caps | ( | ) |
get_roles_on_exact_context | ( | ) |
get_roles_with_assignment_on_context | ( | ) |
get_selected_theme_for_device_type | ( | ) |
get_separator | ( | ) |
Return the breadcrumb trail navigation separator.
string | HTML string. |
|
protected |
Get all the filters that apply to a given context for calls to format_string.
context | $context | the context. |
moodle_text_filter[] | A text filter |
|
static |
Return all subplugins of this component.
string | $component,. |
array\$subtype,=>array($component,..),null | if no subtypes defined |
|
static |
Returns the exact absolute path to plugin directory.
string | $subsystem | type of core subsystem |
string | full path to subsystem directory; null if not found |
|
static |
Returns parent of this subplugin type.
string | $type |
string | parent component or null |
get_system_context | ( | $cache = true | ) |
Returns system context or null if can not be created yet.
bool | $cache | use caching |
context | system context (null if context table not created yet) |
|
protected |
Get all the filters that apply to a given context for calls to format_text.
context | $context |
moodle_text_filter[] | A text filter |
get_texteditor | ( | $editorname | ) |
Returns instance of text editor.
string | $editorname | name of editor (textarea, tiny, ...) |
object|bool | texeditor instance or false if does not exist |
get_timezone_offset | ( | ) |
get_timezone_record | ( | ) |
|
protected |
Get the progress_trace.
progress_trace |
get_user_access_sitewide | ( | ) |
get_user_courses_bycap | ( | ) |
get_user_device_type | ( | ) |
get_user_field_name | ( | ) |
get_user_timezone_offset | ( | ) |
grade_print_tabs | ( | $active_type, | |
$active_plugin, | |||
$plugin_info, | |||
$return = false ) |
Print grading plugin selection tab-based navigation.
string | $active_type | type of plugin on current page - import, export, report or edit |
string | $active_plugin | active plugin type - grader, user, cvs, ... |
array | $plugin_info | Array of plugins |
boolean | $return | return as string |
nothing | or string if $return true |
groupmode | ( | ) |
groups_course_module_visible | ( | ) |
groups_filter_users_by_course_module_visible | ( | ) |
groups_get_all_groups_for_courses | ( | ) |
|
static |
Checks for the presence of monologo icons within a plugin.
Only checks monologo icons in PNG and SVG formats as they are formats that can have transparent background.
string | $plugintype | The plugin type. |
string | $pluginname | The plugin name. |
bool | True if the plugin has a monologo icon |
moodle_text_filter::hash | ( | ) |
hash_local_config_cache | ( | ) |
Calculate a proper hash to be able to invalidate stale cached configs.
Only to be used to verify bootstrap.php status.
string | md5 hash of all the sensible bits deciding if cached config is stale or no. |
hide_event | ( | ) |
highlight | ( | $needle, | |
$haystack, | |||
$matchcase = false, | |||
$prefix = '<span class="highlight">', | |||
$suffix = '</span>' ) |
This function will highlight search words in a given string.
It cares about HTML and will not ruin links. It's best to use this function after performing any conversions to HTML.
string | $needle | The search string. Syntax like "word1 +word2 -word3" is dealt with correctly. |
string | $haystack | The string (HTML) within which to highlight the search terms. |
boolean | $matchcase | whether to do case-sensitive. Default case-insensitive. |
string | $prefix | the string to put before each search term found. |
string | $suffix | the string to put after each search term found. |
string | The highlighted HTML. |
highlightfast | ( | $needle, | |
$haystack ) |
This function will highlight instances of $needle in $haystack.
It's faster that the above function highlight() and doesn't care about HTML or anything.
string | $needle | The string to search for |
string | $haystack | The string to search for $needle in |
string | The highlighted HTML |
html_to_text | ( | $html, | |
$width = 75, | |||
$dolinks = true ) |
Given HTML text, make it into plain text using external function.
string | $html | The text to be converted. |
integer | $width | Width to wrap the text at. (optional, default 75 which is a good value for email. 0 means do not limit line length.) |
boolean | $dolinks | By default, any links in the HTML are collected, and printed as a list at the end of the HTML. If you don't want that, set this argument to false. |
string | plain text equivalent of the HTML. |
httpsrequired | ( | ) |
imagecopybicubic | ( | $dst_img, | |
$src_img, | |||
$dst_x, | |||
$dst_y, | |||
$src_x, | |||
$src_y, | |||
$dst_w, | |||
$dst_h, | |||
$src_w, | |||
$src_h ) |
Copies a rectangular portion of the source image to another rectangle in the destination image.
This function calls imagecopyresampled() if it is available and GD version is 2 at least. Otherwise it reimplements the same behaviour. See the PHP manual page for more info.
@externalurl http://php.net/manual/en/function.imagecopyresampled.php
resource | GdImage | $dst_img | the destination GD image resource |
resource | GdImage | $src_img | the source GD image resource |
int | $dst_x | vthe X coordinate of the upper left corner in the destination image |
int | $dst_y | the Y coordinate of the upper left corner in the destination image |
int | $src_x | the X coordinate of the upper left corner in the source image |
int | $src_y | the Y coordinate of the upper left corner in the source image |
int | $dst_w | the width of the destination rectangle |
int | $dst_h | the height of the destination rectangle |
int | $src_w | the width of the source rectangle |
int | $src_h | the height of the source rectangle |
bool | tru on success, false otherwise |
ini_get_bool | ( | $ini_get_arg | ) |
This function makes the return value of ini_get consistent if you are setting server directives through the .htaccess file in apache.
Current behavior for value set from php.ini On = 1, Off = [blank] Current behavior for value set from .htaccess On = On, Off = Off Contributed by jdell @ unr.edu
string | $ini_get_arg | The argument to get |
bool | True for on false for not |
init_performance_info | ( | ) |
Initializes our performance info early.
Pairs up with get_performance_info() which is actually in moodlelib.php. This function is here so that we can call it before all the libs are pulled in.
@uses $PERF
initialise_fullme | ( | ) |
Initialises $FULLME and friends.
Private function. Should only be called from setup.php.
initialise_fullme_cli | ( | ) |
Initialises $FULLME and friends for command line scripts.
This is a private method for use by initialise_fullme.
initialise_local_config_cache | ( | ) |
Cache any immutable config locally to avoid constant DB lookups.
Only to be used only from lib/setup.php
install_cli_database | ( | array | $options, |
$interactive ) |
Install Moodle DB, config.php must exist, there must not be any tables in db yet.
array | $options | adminpass is mandatory |
bool | $interactive |
void |
install_db_validate | ( | $database, | |
$dbhost, | |||
$dbuser, | |||
$dbpass, | |||
$dbname, | |||
$prefix, | |||
$dboptions ) |
This is in function because we want the /install.php to parse in PHP4.
object | $database | |
string | $dbhsot | |
string | $dbuser | |
string | $dbpass | |
string | $dbname | |
string | $prefix | |
mixed | $dboptions |
string |
install_generate_configphp | ( | $database, | |
$cfg ) |
Returns content of config.php file.
Uses PHP_EOL for generating proper end of lines for the given platform.
moodle_database | $database | database instance |
object | $cfg | copy of $CFG |
string |
install_guess_wwwroot | ( | ) |
Tries to detect the right www root setting.
string | detected www root |
install_helpbutton | ( | $url, | |
$title = '' ) |
Print help button.
string | $url | |
string | $titel |
void |
install_ini_get_bool | ( | $ini_get_arg | ) |
install_init_dataroot | ( | $dataroot, | |
$dirpermissions ) |
Creates dataroot if not exists yet, makes sure it is writable, add lang directory and add .htaccess just in case it works.
string | $dataroot | full path to dataroot |
int | $dirpermissions |
bool | success |
object install_print_footer | ( | $config, | |
$reload = false ) |
Prints installation page header, we can not use weblib yet in installer.
stdClass | $config | |
bool | $reload | print reload button instead of next |
void |
object install_print_header | ( | $config, | |
$stagename, | |||
$heading, | |||
$stagetext, | |||
$stageclass = "alert-info" ) |
Prints installation page header, we can not use weblib yet in installer.
stdClass | $config | |
string | $stagename | |
string | $heading | |
string | $stagetext | |
string | $stageclass |
void |
object install_print_help_page | ( | $help | ) |
Prints complete help page used during installation.
Does not return.
string | $help |
|
static |
Factory method.
Use this to get the filter manager.
filter_manager | the singleton instance. |
|
static |
Invalidate opcode cache for given file, this is intended for php files that are stored in dataroot.
Note: we need it here because this class must be self-contained.
string | $file |
iplookup_find_location | ( | $ip | ) |
Returns location information.
string | $ip |
array |
|
static |
Return true if apiname is a core API.
string | $apiname | name of the API. |
bool | true if core API. |
|
static |
Return true if subsystemname is core subsystem.
string | $subsystemname | name of the subsystem. |
bool | true if core subsystem. |
is_course_participant | ( | ) |
is_early_init | ( | $backtrace | ) |
This function encapsulates the tests for whether an exception was thrown in early init – either during setup.php or during init of $OUTPUT.
If another exception is thrown then, and if we do not take special measures, we would just get a very cryptic message "Exception thrown without a stack frame in Unknown on line 0". That makes debugging very hard, so we do take special measures in default_exception_handler, with the help of this function.
array | $backtrace | the stack trace to analyse. |
boolean | whether the stack trace is somewhere in output initialisation. |
is_enrolled | ( | context | $context, |
$user = null, | |||
$withcapability = '', | |||
$onlyactive = false ) |
Returns true if user is enrolled (is participating) in course this is intended for students and teachers.
Since 2.2 the result for active enrolments and current user are cached.
context | $context | |
int | stdClass | $user | if null $USER is used, otherwise user object or id expected |
string | $withcapability | extra capability name |
bool | $onlyactive | consider only active enrolments in enabled plugins and time restrictions |
bool |
is_https | ( | ) |
Determines whether or not the Moodle site is being served over HTTPS.
This is done simply by checking the value of $CFG->wwwroot, which seems to be the only reliable method.
boolean | True if site is served over HTTPS, false otherwise. |
is_in_popup | ( | ) |
Returns true if the page is displayed in a popup window.
Gets the information from the URL parameter inpopup.
boolean |
is_major_upgrade_required | ( | ) |
Check whether a major upgrade is needed.
That is defined as an upgrade that changes something really fundamental in the database, so nothing can possibly work until the database has been updated, and that is defined by the hard-coded version number in this function.
bool |
is_moodle_cookie_secure | ( | ) |
Determine wether the secure flag should be set on cookies.
bool |
|
static |
This method validates a plug name.
It is much faster than calling clean_param.
string | $plugintype | type of plugin |
string | $pluginname | a string that might be a plugin name. |
bool | if this string is a valid plugin name. |
is_web_crawler | ( | ) |
core\hook\isPropagationStopped | ( | ) |
Is propagation stopped?
This will typically only be used by the Dispatcher to determine if the previous listener halted propagation.
bool | True if the Event is complete and no further listeners should be called. False to continue calling listeners. |
js_minify | ( | ) |
ldap_addslashes | ( | $text | ) |
Quote control characters in AttributeValue parts of a RelativeDistinguishedName used in LDAP distinguished names - See RFC 4514/2253.
string | the AttributeValue to quote |
string | the AttributeValue quoted |
ldap_connect_moodle | ( | $host_url, | |
$ldap_version, | |||
$user_type, | |||
$bind_dn, | |||
$bind_pw, | |||
$opt_deref, | |||
& | $debuginfo, | ||
$start_tls = false ) |
Tries connect to specified ldap servers.
Returns a valid LDAP connection or false.
string | $host_url | |
integer | $ldap_version | either 2 (LDAPv2) or 3 (LDAPv3). |
string | $user_type | the configured user type for this connection. |
string | $bind_dn | the binding user dn. If an emtpy string, anonymous binding is used. |
string | $bind_pw | the password for the binding user. Ignored for anonymous bindings. |
boolean | $opt_deref | whether to set LDAP_OPT_DEREF on this connection or not. |
string | &$debuginfo | the debugging information in case the connection fails. |
boolean | $start_tls | whether to use LDAP with TLS (not to be confused with LDAP+SSL) |
mixed | connection result or false. |
ldap_filter_addslashes | ( | $text | ) |
Quote control characters in texts used in LDAP filters - see RFC 4515/2254.
string | filter string to quote |
string | the filter string quoted |
ldap_find_userdn | ( | $ldapconnection, | |
$username, | |||
$contexts, | |||
$objectclass, | |||
$search_attrib, | |||
$search_sub ) |
Search specified contexts for username and return the user dn like: cn=username,ou=suborg,o=org.
mixed | $ldapconnection | a valid LDAP connection. |
mixed | $username | username (external LDAP encoding, no db slashes). |
array | $contexts | contexts to look for the user. |
string | $objectclass | objectlass of the user (in LDAP filter syntax). |
string | $search_attrib | the attribute use to look for the user. |
boolean | $search_sub | whether to search subcontexts or not. |
mixed | the user dn (external LDAP encoding, no db slashes) or false |
if(!defined( 'LDAP_DN_SPECIAL_CHARS')) if(!defined('LDAP_DN_SPECIAL_CHARS_QUOTED_NUM')) if(!defined( 'LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA')) if(!defined('LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA_REGEX')) ldap_get_dn_special_chars | ( | ) |
The order of the special characters in these arrays IS IMPORTANT.
Make sure '::::5C' (and '\') are the first elements of the arrays. Otherwise we'll double replace '::' with '\5C' which is Bad(tm)
ldap_get_entries_moodle | ( | $ldapconnection, | |
$searchresult ) |
Returns values like ldap_get_entries but is binary compatible and returns all attributes as array.
mixed | $ldapconnection | A valid LDAP connection |
mixed | $searchresult | A search result from ldap_search, ldap_list, etc. |
array | ldap-entries with lower-cased attributes as indexes |
ldap_getdefaults | ( | ) |
Initializes needed variables for ldap-module.
Uses names defined in ldap_supported_usertypes. $default is first defined as: $default['pseudoname'] = array( 'typename1' => 'value', 'typename2' => 'value' .... );
array | of default values |
ldap_isgroupmember | ( | $ldapconnection, | |
$userid, | |||
$group_dns, | |||
$member_attrib ) |
Checks if user belongs to specific group(s) or is in a subtree.
Returns true if user belongs to a group in grupdns string OR if the DN of the user is in a subtree of the DN provided as "group"
mixed | $ldapconnection | A valid LDAP connection. |
string | $userid | LDAP user id (dn/cn/uid/...) to test membership for. |
array | $group_dns | arrary of group dn |
string | $member_attrib | the name of the membership attribute. |
boolean |
ldap_normalise_objectclass | ( | $objectclass, | |
$default = '*' ) |
Normalise the supplied objectclass filter.
This normalisation is a rudimentary attempt to format the objectclass filter correctly.
string | $objectclass | The objectclass to normalise |
string | $default | The default objectclass value to use if no objectclass was supplied |
string | The normalised objectclass. |
ldap_paged_results_supported | ( | $ldapversion, | |
$ldapconnection = null ) |
Check if we can use paged results (see RFC 2696).
We need to use LDAP version 3 (or later), otherwise the server cannot use them. If we also pass in a valid LDAP connection handle, we also check whether the server actually supports them.
ldapversion | integer The LDAP protocol version we use. |
ldapconnection | resource An existing LDAP connection (optional). |
boolean | true is paged results can be used, false otherwise. |
ldap_stripslashes | ( | $text | ) |
Unquote control characters in AttributeValue parts of a RelativeDistinguishedName used in LDAP distinguished names - See RFC 4514/2253.
string | the AttributeValue quoted |
string | the AttributeValue unquoted |
if(!defined('ROOTDSE')) if(!defined( 'LDAP_PAGED_RESULTS_CONTROL')) if(!defined('LDAP_DEFAULT_PAGESIZE')) ldap_supported_usertypes | ( | ) |
Returns predefined user types.
array | of predefined user types |
link_arrow_left | ( | $text, | |
$url = '', | |||
$accesshide = false, | |||
$addclass = '', | |||
$addparams = [] ) |
Return the left arrow with text ('previous'), and optionally embedded in a link.
string | $text | HTML/plain text label (set to blank only for breadcrumb separator cases). |
string | $url | An optional link to use in a surrounding HTML anchor. |
bool | $accesshide | True if text should be hidden (for screen readers only). |
string | $addclass | Additional class names for the link, or the arrow character. |
string | HTML string. |
link_arrow_right | ( | $text, | |
$url = '', | |||
$accesshide = false, | |||
$addclass = '', | |||
$addparams = [] ) |
Return the right arrow with text ('next'), and optionally embedded in a link.
string | $text | HTML/plain text label (set to blank only for breadcrumb separator cases). |
string | $url | An optional link to use in a surrounding HTML anchor. |
bool | $accesshide | True if text should be hidden (for screen readers only). |
string | $addclass | Additional class names for the link, or the arrow character. |
string | HTML string. |
load_course_context | ( | ) |
load_environment_xml | ( | $env_select = ENV_SELECT_NEWER | ) |
This function will load the environment.xml file and xmlize it.
@staticvar array $data @uses ENV_SELECT_NEWER @uses ENV_SELECT_DATAROOT @uses ENV_SELECT_RELEASE
int | string | $env_select | one of ENV_SELECT_NEWER | ENV_SELECT_DATAROOT | ENV_SELECT_RELEASE decide xml to use. String means plugin name. |
mixed | the xmlized structure or false on error |
|
protected |
Load all the filters required by this context.
context | $context | the context. |
|
staticprotected |
Loads the db/renamedclasses.php file from the given directory.
The renamedclasses.php should contain a key => value array ($renamedclasses) where the key is old class name, and the value is the new class name. It is only included when we are populating the component cache. After that is not needed.
string | null | $fulldir | The directory to the renamed classes. |
load_role_access_by_context | ( | ) |
|
protected |
Log a message to the progress tracer.
string | $message | |
int | $depth |
|
protected |
Log an end message to the progress tracer.
string | $message | |
int | $depth |
|
protected |
Log a start message to the progress tracer.
string | $message | |
int | $depth |
login_attempt_failed | ( | $user | ) |
login_attempt_valid | ( | $user | ) |
To be called after valid user login.
stdClass | $user |
login_captcha_enabled | ( | ) |
Returns whether the captcha element is enabled for the login form, and the admin settings fulfil its requirements.
bool |
login_is_lockedout | ( | $user | ) |
Verify if user is locked out.
stdClass | $user |
bool | true if user locked out |
login_lock_account | ( | $user | ) |
Lockout user and send notification email.
stdClass | $user |
login_unlock_account | ( | $user, | |
bool | $notify = false ) |
Unlock user account and reset timers.
stdClass | $user | |
bool | $notify | Notify the user their account has been unlocked. |
make_backup_temp_directory | ( | $directory, | |
$exceptiononerror = true ) |
Create a directory under $CFG->backuptempdir and make sure it is writable.
Do not use for storing generic temp files - see make_temp_directory() instead for this purpose.
Backup temporary files must be on a shared storage.
string | $directory | the relative path of the directory to be created under $CFG->backuptempdir |
bool | $exceptiononerror | throw exception if error encountered |
string|false | Returns full path to directory if successful, false if not; may throw exception |
make_cache_directory | ( | $directory, | |
$exceptiononerror = true ) |
Create a directory under cachedir and make sure it is writable.
Note: this cache directory is shared by all cluster nodes.
string | $directory | the full path of the directory to be created under $CFG->cachedir |
bool | $exceptiononerror | throw exception if error encountered |
string|false | Returns full path to directory if successful, false if not; may throw exception |
make_categories_list | ( | ) |
make_categories_options | ( | ) |
make_editing_buttons | ( | ) |
|
protected |
Factory method for creating a filter.
string | $filtername | The filter name, for example 'tex'. |
context | $context | context object. |
array | $localconfig | array of local configuration variables for this filter. |
moodle_text_filter | The filter, or null, if this type of filter is not recognised or could not be created. |
Reimplemented in performance_measuring_filter_manager.
|
protected |
Factory method for creating a filter.
string | $filtername | The filter name, for example 'tex'. |
context | $context | context object. |
array | $localconfig | array of local configuration variables for this filter. |
moodle_text_filter | The filter, or null, if this type of filter is not recognised or could not be created. |
Reimplemented from filter_manager.
make_localcache_directory | ( | $directory, | |
$exceptiononerror = true ) |
Create a directory under localcachedir and make sure it is writable.
The files in this directory MUST NOT change, use revisions or content hashes to work around this limitation - this means you can only add new files here.
The content of this directory gets purged automatically on all cluster nodes after calling purge_all_caches() before new data is written to this directory.
Note: this local cache directory does not need to be shared by cluster nodes.
string | $directory | the relative path of the directory to be created under $CFG->localcachedir |
bool | $exceptiononerror | throw exception if error encountered |
string|false | Returns full path to directory if successful, false if not; may throw exception |
make_request_directory | ( | bool | $exceptiononerror = true, |
bool | $forcecreate = false ) |
Create a per-request directory and make sure it is writable.
This can only be used during the current request and will be tidied away automatically afterwards.
A new, unique directory is always created within a shared base request directory.
In some exceptional cases an alternative base directory may be required. This can be accomplished using the $forcecreate parameter. Typically this will only be requried where the file may be required during a shutdown handler which may or may not be registered after a previous request directory has been created.
bool | $exceptiononerror | throw exception if error encountered |
bool | $forcecreate | Force creation of a new parent directory |
string | The full path to directory if successful, false if not; may throw exception |
make_temp_directory | ( | $directory, | |
$exceptiononerror = true ) |
Create a directory under tempdir and make sure it is writable.
Where possible, please use make_request_directory() and limit the scope of your data to the current HTTP request.
Do not use for storing cache files - see make_cache_directory(), and make_localcache_directory() instead for this purpose.
Temporary files must be on a shared storage, and heavy usage is discouraged due to the performance impact upon clustered environments.
string | $directory | the full path of the directory to be created under $CFG->tempdir |
bool | $exceptiononerror | throw exception if error encountered |
string|false | Returns full path to directory if successful, false if not; may throw exception |
make_unique_writable_directory | ( | $basedir, | |
$exceptiononerror = true ) |
Create a new unique directory within the specified directory.
string | $basedir | The directory to create your new unique directory within. |
bool | $exceptiononerror | throw exception if error encountered |
string | The created directory |
invalid_dataroot_permissions |
make_upload_directory | ( | $directory, | |
$exceptiononerror = true ) |
Create a directory under dataroot and make sure it is writable.
Do not use for temporary and cache files - see make_temp_directory() and make_cache_directory().
string | $directory | the full path of the directory to be created under $CFG->dataroot |
bool | $exceptiononerror | throw exception if error encountered |
string|false | Returns full path to directory if successful, false if not; may throw exception |
mark_context_dirty | ( | ) |
markdown_to_html | ( | $text | ) |
Given Markdown formatted text, make it into XHTML using external function.
string | $text | The markdown formatted text to be converted. |
string | Converted text |
matching_page_type_patterns | ( | $pagetype | ) |
Given a specific page type, return all the page type patterns that might match it.
string | $pagetype | for example 'course-view-weeks' or 'mod-quiz-view'. |
array | an array of all the page type patterns that might match this page type. |
matching_page_type_patterns_from_pattern | ( | $pattern | ) |
Give an specific pattern, return all the page type patterns that would also match it.
string | $pattern | the pattern, e.g. 'mod-forum-*' or 'mod-quiz-view'. |
array | of all the page type patterns matching. |
mdie | ( | $msg = '', | |
$errorcode = 1 ) |
Print an error to STDOUT and exit with a non-zero code.
For commandline scripts.
Default errorcode is 1.
Very useful for perl-like error-handling: do_somethting() or mdie("Something went wrong");
string | $msg | Error message |
integer | $errorcode | Error code to emit |
me | ( | ) |
Returns the name of the current script, WITH the querystring portion.
This function is necessary because PHP_SELF and REQUEST_URI and SCRIPT_NAME return different things depending on a lot of things like your OS, Web server, and the way PHP is compiled (ie. as a CGI, module, ISAPI, etc.) NOTE: This function returns false if the global variables needed are not set.
mixed | String or false if the global variables needed are not set. |
merge_query_params | ( | array & | $target, |
array | $values ) |
Merge parsed POST chunks.
NOTE: this is not perfect, but it should work in most cases hopefully.
array | $target | |
array | $values |
message_add_contact | ( | ) |
message_block_contact | ( | ) |
message_can_delete_message | ( | ) |
message_can_post_message | ( | ) |
message_contact_link | ( | ) |
message_count_blocked_users | ( | ) |
message_count_messages | ( | ) |
message_count_unread_messages | ( | ) |
message_current_user_is_involved | ( | ) |
message_delete_message | ( | ) |
message_get_blocked_users | ( | ) |
message_get_contact | ( | ) |
message_get_contact_add_remove_link | ( | ) |
message_get_contact_block_link | ( | ) |
message_get_contacts | ( | ) |
message_get_course_contexts | ( | ) |
message_get_fragment | ( | ) |
message_get_history | ( | ) |
message_get_recent_conversations | ( | $userorid, | |
$limitfrom = 0, | |||
$limitto = 100 ) |
message_get_recent_notifications | ( | ) |
message_history_link | ( | ) |
message_is_user_blocked | ( | ) |
message_is_user_non_contact_blocked | ( | ) |
message_mark_message_read | ( | ) |
message_mark_messages_read | ( | ) |
message_move_userfrom_unread2read | ( | ) |
message_remove_contact | ( | ) |
message_remove_url_params | ( | ) |
message_search | ( | ) |
message_shorten_message | ( | ) |
message_unblock_contact | ( | ) |
min_clean_param | ( | $value, | |
$type ) |
Minimalistic parameter cleaning function.
Note: Can not use optional param because moodlelib.php is not loaded yet.
string | $value | |
string | $type |
mixed |
min_enable_zlib_compression | ( | ) |
This method tries to enable output compression if possible.
This function must be called before any output or headers.
(IE6 is not supported at all.)
boolean,true | if compression enabled |
min_fix_utf8 | ( | $value | ) |
Minimalistic UTF-8 sanitisation.
Note: This duplicates fix_utf8() intentionally for now.
string | $value |
string |
min_get_maximum_revision | ( | ) |
Get the highest possible currently valid revision number.
This is based on the current time, allowing for a small amount of clock skew between servers.
Future values beyond the clock skew are not allowed to avoid the possibility of cache poisoning.
int |
min_get_minimum_revision | ( | ) |
Get the lowest possible currently valid revision number.
This is based on the current Moodle version.
int | Unix timestamp |
min_get_slash_argument | ( | $clean = true | ) |
Returns the slashargument part of the URL.
Note: ".php" is NOT allowed in slasharguments, it is intended for ASCII characters only.
boolean | $clean | - Should we do cleaning on this path argument. If you set this to false you MUST be very careful and do the cleaning manually. |
string |
min_is_revision_valid_and_current | ( | int | $revision | ) |
Helper function to determine if the given revision number is valid.
int | $revision | A numeric revision to check for validity |
bool | Whether the revision is valid |
min_optional_param | ( | $name, | |
$default, | |||
$type ) |
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
string | $name | |
mixed | $default | |
string | $type |
mixed |
mod_page_type_list | ( | $pagetype, | |
$parentcontext = null, | |||
$currentcontext = null ) |
Generates the page type list for a module by either locating and using the modules callback or by generating a default list.
string | $pagetype | |
stdClass | $parentcontext | |
stdClass | $currentcontext |
array |
moodle_minimum_php_version_is_met | ( | $haltexecution = false | ) |
Tests the current PHP version against Moodle's minimum requirement.
When requirement is not met returns false or halts execution depending $haltexecution param.
bool | $haltexecution | Should execution be halted when requirement not met? Defaults to false. |
bool | returns true if requirement is met (false if not) |
moodle_require_minimum_php_version | ( | ) |
A set of PHP-compatible convenience functions to check Moodle minimum PHP version in a unified place.
PLEASE NOTE: This file is made to be both php-version compatible and without requirement on any moodle functions or installation so it can be used in installer or incompatible PHP versions.
void | Execution is halted if version is not met. |
move_category | ( | ) |
my_page_type_list | ( | $pagetype, | |
$parentcontext = null, | |||
$currentcontext = null ) |
Generates the page type list for the my moodle page.
string | $pagetype | |
stdClass | $parentcontext | |
stdClass | $currentcontext |
array |
mygroupid | ( | ) |
navmenu | ( | ) |
navmenulist | ( | $course, | |
$sections, | |||
$modinfo, | |||
$strsection, | |||
$strjumpto, | |||
$width = 50, | |||
$cmid = 0 ) |
Returns a popup menu with course activity modules.
Given a course this function returns a small popup menu with all the course activity modules in it, as a navigation menu outputs a simple list structure in XHTML. The data is taken from the serialised array stored in the course record.
stdClass | $course | A course object. |
array | $sections | |
course_modinfo | $modinfo | |
string | $strsection | |
string | $strjumpto | |
int | $width | |
string | $cmid |
string | The HTML block |
|
static |
Normalize the component name using the "frankenstyle" rules.
Normalize the component name using the "frankenstyle" names.
Note: this does not verify the validity of plugin or type names.
string | $component |
array | two-items list of [(string)type, (string|null)name] |
string | $component |
array | two-items list of [(string)type, (string|null)name] |
|
static |
Normalize the component name.
Note: this does not verify the validity of the plugin or component.
string | $component |
string |
normalize_version | ( | $version | ) |
This function will normalize any version to just a serie of numbers separated by dots.
Everything else will be removed.
string | $version | the original version |
string | the normalized version |
notice | ( | $message, | |
$link = '', | |||
$course = null ) |
Print a message and exit.
string | $message | The message to print in the notice |
moodle_url | string | $link | The link to use for the continue button |
object | $course | A course object. Unused. |
void | This function simply exits |
notify | ( | ) |
obfuscate_email | ( | ) |
Given an email address, this function will return an obfuscated version of it.
string | The email address to obfuscate |
string | The obfuscated email address |
obfuscate_mailto | ( | $email, | |
$label = '', | |||
$dimmed = false, | |||
$subject = '', | |||
$body = '' ) |
This function uses the obfuscate_email() and obfuscate_text() to generate a fully obfuscated email link, ready to use.
string | The email address to display | |
string | $label | The text to displayed as hyperlink to $email |
boolean | $dimmed | If true then use css class 'dimmed' for hyperlink |
string | $subject | The subject of the email in the mailto link |
string | $body | The content of the email in the mailto link |
string | The obfuscated mailto link |
obfuscate_text | ( | $plaintext | ) |
This function takes some text and replaces about half of the characters with HTML entity equivalents.
Return string is obviously longer.
string | $plaintext | The text to be obfuscated |
string | The obfuscated text |
p | ( | $var | ) |
page_doc_link | ( | $text = '' | ) |
Returns a string containing a link to the user documentation for the current page.
Also contains an icon by default. Shown to teachers and admin only.
string | $text | The text to be displayed for the link |
string | The link to user documentation for this current page |
page_get_doc_link_path | ( | moodle_page | $page | ) |
Returns the path to use when constructing a link to the docs.
moodle_page | $page |
string |
password_compat_not_supported | ( | ) |
plagiarism_get_file_results | ( | $cmid, | |
$userid, | |||
$file ) |
returns array of plagiarism details about specified file
int | $cmid | |
int | $userid | |
object | $file | moodle file object |
array | - sets of details about specified file, one array of details per plagiarism plugin
|
plagiarism_get_form_elements_module | ( | ) |
if(!defined('MOODLE_INTERNAL')) plagiarism_get_links | ( | $linkarray | ) |
plagiarismlib.php - Contains core Plagiarism related functions.
object | $linkarray | contains all relevant information for the plugin to generate a link |
string | - url to allow login/viewing of a similarity report |
plagiarism_load_available_plugins | ( | ) |
Helper function - also loads lib file of plagiarism plugin.
array | of available plugins |
plagiarism_print_disclosure | ( | $cmid | ) |
Function that prints the student disclosure notifying that the files will be checked for plagiarism.
integer | $cmid | - the cmid of this module |
string |
plagiarism_save_form_elements | ( | ) |
plagiarism_update_status | ( | $course, | |
$cm ) |
Allows a plagiarism plugin to print a button/link at the top of activity overview report pages.
object | $course | - full Course object |
object | $cm | - full cm object |
string |
preload_course_contexts | ( | ) |
prevent_form_autofill_password | ( | ) |
object print_arrow | ( | $direction = 'up', | |
$strsort = null, | |||
$return = false ) |
Returns an image of an up or down arrow, used for column sorting.
To avoid unnecessary DB accesses, please provide this function with the language strings for sortasc and sortdesc.
If no sort string is associated with the direction, an arrow with no alt text will be printed/returned.
string | $direction | 'up' or 'down' |
string | $strsort | The language string used for the alt attribute of this image |
bool | $return | Whether to print directly or return the html string |
string|void | depending on $return |
print_badge_image | ( | badge | $badge, |
stdClass | $context, | ||
$size = 'small' ) |
Print badge image.
badge | $badge | Badge object |
stdClass | $context | |
string | $size |
print_category_info | ( | ) |
print_checkbox | ( | ) |
print_collapsible_region | ( | $contents, | |
$classes, | |||
$id, | |||
$caption, | |||
$userpref = '', | |||
$default = false, | |||
$return = false ) |
Print (or return) a collapsible region, that has a caption that can be clicked to expand or collapse the region.
If JavaScript is off, then the region will always be expanded.
string | $contents | the contents of the box. |
string | $classes | class names added to the div that is output. |
string | $id | id added to the div that is output. Must not be blank. |
string | $caption | text displayed at the top. Clicking on this will cause the region to expand or contract. |
string | $userpref | the name of the user preference that stores the user's preferred default state. (May be blank if you do not wish the state to be persisted. |
boolean | $default | Initial collapsed state to use if the user_preference it not set. |
boolean | $return | if true, return the HTML as a string, rather than printing it. |
string|void | If $return is false, returns nothing, otherwise returns a string of HTML. |
print_collapsible_region_end | ( | $return = false | ) |
Close a region started with print_collapsible_region_start.
boolean | $return | if true, return the HTML as a string, rather than printing it. |
string|void | if $return is false, returns nothing, otherwise returns a string of HTML. |
print_collapsible_region_start | ( | $classes, | |
$id, | |||
$caption, | |||
$userpref = '', | |||
$default = false, | |||
$return = false, | |||
$extracontent = null ) |
Print (or return) the start of a collapsible region.
The collapsibleregion has a caption that can be clicked to expand or collapse the region. If JavaScript is off, then the region will always be expanded.
string | $classes | class names added to the div that is output. |
string | $id | id added to the div that is output. Must not be blank. |
string | $caption | text displayed at the top. Clicking on this will cause the region to expand or contract. |
string | $userpref | the name of the user preference that stores the user's preferred default state. (May be blank if you do not wish the state to be persisted. |
boolean | $default | Initial collapsed state to use if the user_preference it not set. |
boolean | $return | if true, return the HTML as a string, rather than printing it. |
string | $extracontent | the extra content will show next to caption, eg.Help icon. |
string|void | if $return is false, returns nothing, otherwise returns a string of HTML. |
print_container | ( | ) |
print_container_end | ( | ) |
print_container_start | ( | ) |
print_context_name | ( | ) |
print_continue | ( | ) |
print_course | ( | ) |
print_course_search | ( | ) |
print_courses | ( | ) |
print_error | ( | $errorcode, | |
$module = 'error', | |||
$link = '', | |||
$a = null, | |||
$debuginfo = null ) |
Abort execution by throwing of a general exception, default exception handler displays the error message in most cases.
string | $errorcode | The name of the language string containing the error message. Normally this should be in the error.php lang file. |
string | $module | The language file to get the error message from. |
string | $link | The url where the user will be prompted to continue. If no url is provided the user will be directed to the site index page. |
object | $a | Extra words and phrases that might be required in the error string |
string | $debuginfo | optional debugging information |
void,always | throws exception! |
print_grade_menu | ( | $courseid, | |
$name, | |||
$current, | |||
$includenograde = true, | |||
$return = false ) |
Prints a grade menu (as part of an existing form) with help showing all possible numerical grades and scales.
Finish documenting this function
Deprecate: this is only used in a few contrib modules
int | $courseid | The course ID |
string | $name | |
string | $current | |
boolean | $includenograde | Include those with no grades |
boolean | $return | If set to true returns rather than echo's |
string|bool | Depending on value of $return |
print_grade_plugin_selector | ( | $plugin_info, | |
$active_type, | |||
$active_plugin, | |||
$return = false ) |
Print grading plugin selection popup form.
array | $plugin_info | An array of plugins containing information for the selector |
boolean | $return | return as string |
nothing | or string if $return true |
print_group_picture | ( | $group, | |
$courseid, | |||
$large = false, | |||
$return = false, | |||
$link = true, | |||
$includetoken = false ) |
Print a specified group's avatar.
array | stdClass | $group | A single group object OR array of groups. |
int | $courseid | The course ID. |
boolean | $large | Default small picture, or large. |
boolean | $return | If false print picture, otherwise return the output as string |
boolean | $link | Enclose image in a link to view specified course? |
boolean | $includetoken | Whether to use a user token when displaying this group image. True indicates to generate a token for current user, and integer value indicates to generate a token for the user whose id is the value indicated. If the group picture is included in an e-mail or some other location where the audience is a specific user who will not be logged in when viewing, then we use a token to authenticate the user. |
string|void | Depending on the setting of $return |
print_header | ( | ) |
print_header_simple | ( | ) |
print_location_comment | ( | $file, | |
$line, | |||
$return = false ) |
Outputs a HTML comment to the browser.
This is used for those hard-to-debug pages that use bits from many different files in very confusing ways (e.g. blocks).
print_location_comment(FILE, LINE);
string | $file | |
integer | $line | |
boolean | $return | Whether to return or print the comment |
string|void | Void unless true given as third parameter |
print_log | ( | ) |
print_log_csv | ( | ) |
print_log_ods | ( | ) |
print_log_xls | ( | ) |
print_mnet_log | ( | ) |
print_my_moodle | ( | ) |
print_navigation | ( | ) |
print_overview | ( | ) |
print_password_policy | ( | ) |
Returns a localized sentence in the current language summarizing the current password policy.
string |
print_recent_activity | ( | ) |
print_recent_activity_note | ( | $time, | |
$user, | |||
$text, | |||
$link, | |||
$return = false, | |||
$viewfullnames = null ) |
Display a recent activity note.
@staticvar string $strftimerecent
int | $time | A timestamp int. |
stdClass | $user | A user object from the database. |
string | $text | Text for display for the note |
string | $link | The link to wrap around the text |
bool | $return | If set to true the HTML is returned rather than echo'd |
string | $viewfullnames |
string | If $retrun was true returns HTML for a recent activity notice. |
print_remote_course | ( | ) |
print_remote_host | ( | ) |
print_scale_menu_helpbutton | ( | ) |
print_section | ( | ) |
print_section_add_menus | ( | ) |
print_side_block | ( | ) |
print_tabs | ( | $tabrows, | |
$selected = null, | |||
$inactive = null, | |||
$activated = null, | |||
$return = false ) |
Returns a string containing a nested list, suitable for formatting into tabs with CSS.
It is not recommended to use this function in Moodle 2.5 but it is left for backward compartibility.
Example how to print a single line tabs: $rows = array( new tabobject(...), new tabobject(...) ); echo $OUTPUT->tabtree($rows, $selectedid);
Multiple row tabs may not look good on some devices but if you want to use them you can specify ->subtree for the active tabobject.
array | $tabrows | An array of rows where each row is an array of tab objects |
string | $selected | The id of the selected tab (whatever row it's on) |
array | $inactive | An array of ids of inactive tabs that are not selectable. |
array | $activated | An array of ids of other tabs that are currently activated |
bool | $return | If true output is returned rather then echo'd |
string | HTML output if $return was set to true. |
print_textarea | ( | ) |
print_whole_category_list | ( | ) |
process_environment_bypass | ( | $xml, | |
& | $result ) |
This function will post-process the result record by executing the specified function, modifying it as necessary, also a custom message will be added to the result object to be printed by the display layer.
Every bypass function must be defined in this file and it'll return true/false to decide if the original test is bypassed or no. Also such bypass functions are able to directly handling the result object although it should be only under exceptional conditions.
string | xmldata containing the bypass data |
object | result object to be updated |
void |
process_environment_messages | ( | $xml, | |
& | $result ) |
This function will detect if there is some message available to be added to the result in order to clarify enviromental details.
@uses INCORRECT_FEEDBACK_FOR_REQUIRED @uses INCORRECT_FEEDBACK_FOR_OPTIONAL
string | xmldata containing the feedback data |
object | reult object to be updated |
process_environment_restrict | ( | $xml, | |
& | $result ) |
This function will post-process the result record by executing the specified function, modifying it as necessary, also a custom message will be added to the result object to be printed by the display layer.
Every restrict function must be defined in this file and it'll return true/false to decide if the original test is restricted or no. Also such restrict functions are able to directly handling the result object although it should be only under exceptional conditions.
string | xmldata containing the restrict data |
object | result object to be updated |
void |
process_environment_result | ( | $element, | |
& | $result ) |
Once the result has been determined, look in the XML for any messages, or other things that should be done depending on the outcome.
array | $element | the element from the environment.xml file which may have children defining what should be done with the outcome. |
object | $result | the result of the test, which may be modified by this function as specified in the XML. |
process_manual_revoke | ( | $recipientid, | |
$issuerid, | |||
$issuerrole, | |||
$badgeid ) |
Manually revoke awarded badges.
int | $recipientid | |
int | $issuerid | |
int | $issuerrole | |
int | $badgeid |
bool |
process_new_icon | ( | $context, | |
$component, | |||
$filearea, | |||
$itemid, | |||
$originalfile, | |||
$preferpng = false ) |
Stores optimised icon images in icon file area.
Since 2.9 this function will generate an icon in the same format as the original file when possible. To counter that behaviour, you can use the argument $preferpng to generate a PNG icon.
context | $context | |
string | $component | |
string | filearea | |
int | $itemid | |
string | $originalfile | |
boolean | $preferpng | When true, it will try to generate a PNG file regardless of the original file. |
mixed | new unique revision number or false if not saved |
profile_display_badges | ( | ) |
profile_display_fields | ( | ) |
profile_edit_category | ( | ) |
profile_edit_field | ( | ) |
proxy_log_callback | ( | $code | ) |
Add http stream instrumentation.
This detects which any reads or writes to a php stream which uses the 'http' handler. Ideally 100% of traffic uses the Moodle curl libraries which do not use php streams.
array | $code | stream callback code |
purify_html | ( | $text, | |
$options = array() ) |
KSES replacement cleaning function - uses HTML Purifier.
string | $text | The (X)HTML string to purify |
array | $options | Array of options; currently only option supported is 'allowid' (if set, does not remove id attributes when cleaning) |
string |
put_records_csv | ( | ) |
qualified_me | ( | ) |
Guesses the full URL of the current script.
This function is using $PAGE->url, but may fall back to $FULLME which is constructed from PHP_SELF and REQUEST_URI or SCRIPT_NAME
mixed | full page URL string or false if unknown |
question_add_tops | ( | ) |
question_is_only_toplevel_category_in_context | ( | ) |
raise_memory_limit | ( | $newlimit | ) |
Function to raise the memory limit to a new value.
Will respect the memory limit if it is higher, thus allowing settings in php.ini, apache conf or command line switches to override it.
The memory limit should be expressed with a constant MEMORY_STANDARD, MEMORY_EXTRA or MEMORY_HUGE. It is possible to use strings or integers too (eg:'128M').
mixed | $newlimit | the new memory limit |
bool | success |
random_bytes_emulate | ( | $length | ) |
Try to generate cryptographically secure pseudo-random bytes.
Note this is achieved by fallbacking between:
int | $length | requested length in bytes |
string | binary data |
rebuild_contexts | ( | ) |
moodle_database rebuild_course_cache | ( | int | $courseid = 0, |
bool | $clearonly = false, | ||
bool | $partialrebuild = false ) |
Rebuilds or resets the cached list of course activities stored in MUC.
rebuild_course_cache() must NEVER be called from lib/db/upgrade.php. At the same time course cache may ONLY be cleared using this function in upgrade scripts of plugins.
During the bulk operations if it is necessary to reset cache of multiple courses it is enough to call increment_revision_number() for the table 'course' and field 'cacherev' specifying affected courses in select.
Cached course information is stored in MUC core/coursemodinfo and is validated with the DB field {course}.cacherev
$DB
int | $courseid | id of course to rebuild, empty means all |
boolean | $clearonly | only clear the cache, gets rebuild automatically on the fly. Recommended to set to true to avoid unnecessary multiple rebuilding. |
boolean | $partialrebuild | will not delete the whole cache when it's true. use purge_module_cache() or purge_section_cache() must be called before when partialrebuild is true. use purge_module_cache() to invalidate mod cache. use purge_section_cache() to invalidate section cache. |
void |
coding_exception |
rebuildnolinktag | ( | $text | ) |
This function is used to rebuild the <nolink> tag because some formats (PLAIN and WIKI) will transform it to html entities.
string | $text | Text to search for nolink tag in |
string |
recaptcha_check_response | ( | $verifyurl, | |
$privkey, | |||
$remoteip, | |||
$response ) |
Calls an HTTP POST function to verify if the user's response was correct.
string | $verifyurl | URL for reCAPTCHA verification |
string | $privkey | The private key for reCAPTCHA |
string | $remoteip | The user's IP |
string | $response | The response from reCAPTCHA |
ReCaptchaResponse |
recaptcha_get_challenge_html | ( | $apiurl, | |
$pubkey, | |||
$lang = null, | |||
bool | $compactmode = false ) |
Gets the challenge HTML This is called from the browser, and the resulting reCAPTCHA HTML widget is embedded within the HTML form it was called from.
string | $apiurl | URL for reCAPTCHA API |
string | $pubkey | The public key for reCAPTCHA |
string | $lang | Language to use. If not provided, get current language. |
bool | $compactmode | If true, use the compact widget. |
string | - The HTML to be embedded in the user's form. |
recaptcha_lang | ( | $lang = null | ) |
Returns the language code the reCAPTCHA element should use.
Google reCAPTCHA uses different language codes than Moodle so we must convert. https://developers.google.com/recaptcha/docs/language
string | $lang | Language to use. If not provided, get current language. |
string | A language code |
redirect | ( | $url, | |
$message = '', | |||
$delay = null, | |||
$messagetype = core\output\notification::NOTIFY_INFO ) |
Redirects the user to another page, after printing a notice.
This function calls the OUTPUT redirect method, echo's the output and then dies to ensure nothing else happens.
Good practice: You should call this method before starting page output by using any of the OUTPUT methods.
moodle_url | string | $url | A moodle_url to redirect to. Strings are not to be trusted! |
string | $message | The message to display to the user |
int | $delay | The delay before redirecting |
string | $messagetype | The type of notification to show the message in. See constants on core\output\notification. |
moodle_exception |
reduce_memory_limit | ( | $newlimit | ) |
Function to reduce the memory limit to a new value.
Will respect the memory limit if it is lower, thus allowing settings in php.ini, apache conf or command line switches to override it
The memory limit should be expressed with a string (eg:'64M')
string | $newlimit | the new memory limit |
bool |
replace_ampersands_not_followed_by_entity | ( | $string | ) |
Given a string, performs a negative lookahead looking for any ampersand character that is not followed by a proper HTML entity.
If any is found, it is replaced by &. The string is then returned.
string | $string |
string |
report_insights_context_insights | ( | \context | $context | ) |
require_phpunit_isolation | ( | ) |
A helper function for deprecated files to use to ensure that, when they are included for unit tests, they are run in an isolated process.
coding_exception | The exception thrown when the process is not isolated. |
reset_login_count | ( | ) |
reset_text_filters_cache | ( | $phpunitreset = false | ) |
Resets some data related to filters, called during upgrade or when general filter settings change.
bool | $phpunitreset | true means called from our PHPUnit integration test reset |
void |
resize_image | ( | $filepath, | |
$width, | |||
$height, | |||
$forcecanvas = false ) |
Resize an image from an image path.
This maintains the aspect ratio of the image. This will not enlarge the image.
string | $filepath | The full path to the original image file. |
int | null | $width | The max width of the resized image, or null to only use the height. |
int | null | $height | The max height of the resized image, or null to only use the width. |
bool | $forcecanvas | Whether the final dimensions should be set to $width and $height. |
string|bool | False if a problem occurs, else the resized image data. |
resize_image_from_image | ( | $original, | |
$imageinfo, | |||
$width, | |||
$height, | |||
$forcecanvas = false ) |
Resize an image from an image object.
resource | GdImage | $original | The image to work on. |
array | $imageinfo | Contains [0] => originalwidth, [1] => originalheight. |
int | null | $width | The max width of the resized image, or null to only use the height. |
int | null | $height | The max height of the resized image, or null to only use the width. |
bool | $forcecanvas | Whether the final dimensions should be set to $width and $height. |
string|bool | False if a problem occurs, else the resized image data. |
resourcelib_embed_general | ( | $fullurl, | |
$title, | |||
$clicktoopen, | |||
$mimetype ) |
Returns general link or file embedding html.
string | $fullurl | |
string | $title | |
string | $clicktoopen | |
string | $mimetype |
string | html |
resourcelib_embed_image | ( | $fullurl, | |
$title ) |
Returns image embedding html.
string | $fullurl | |
string | $title |
string | html |
resourcelib_embed_pdf | ( | $fullurl, | |
$title, | |||
$clicktoopen ) |
Returns general link or pdf embedding html.
string | $fullurl | |
string | $title | |
string | $clicktoopen |
string | html |
resourcelib_get_displayoptions | ( | array | $enabled, |
$current = null ) |
Returns list of available display options.
array | $enabled | list of options enabled in module configuration |
int | $current | current display options for existing instances |
array | of key=>name pairs |
resourcelib_get_extension | ( | $fullurl | ) |
Looks for the extension.
string | $fullurl |
string | file extension |
resourcelib_guess_url_mimetype | ( | $fullurl | ) |
Tries to guess correct mimetype for arbitrary URL.
string | $fullurl |
string | mimetype |
resourcelib_try_file_migration | ( | $filepath, | |
$cmid, | |||
$courseid, | |||
$component, | |||
$filearea, | |||
$itemid ) |
Try on demand migration of file from old course files.
string | $filepath | old file path |
int | $cmid | migrated course module if |
int | $courseid | |
string | $component | |
string | $filearea | new file area |
int | $itemid | migrated file item id |
mixed,false | if not found, stored_file instance if migrated to new area |
restrict_php_version | ( | & | $result, |
$version ) |
Check if the current PHP version is greater than or equal to an unsupported version.
object | $result | an environment_results instance |
string | $version | the version of PHP that can't be used |
bool | result of version check |
restrict_php_version_7 | ( | & | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 7.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_71 | ( | & | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 7.1.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_72 | ( | & | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 7.2.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_73 | ( | & | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 7.3.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_74 | ( | & | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 7.4.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_80 | ( | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 8.0.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_81 | ( | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 8.1.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_82 | ( | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 8.2.
object | $result | an environment_results instance |
bool | result of version check |
restrict_php_version_83 | ( | $result | ) |
Check if the current PHP version is greater than or equal to PHP version 8.3.
object | $result | an environment_results instance |
bool | result of version check |
right_to_left | ( | ) |
Returns true if the user is using a right-to-left language.
boolean | true if the current language is right-to-left (Hebrew, Arabic etc) |
s | ( | $var | ) |
Add quotes to HTML characters.
Returns $var with HTML characters (like "<", ">", etc.) properly quoted. Related function p() simply prints the output of this function.
string | $var | the string potentially containing HTML characters |
string |
object search_generate_SQL | ( | $parsetree, | |
$datafield, | |||
$metafield, | |||
$mainidfield, | |||
$useridfield, | |||
$userfirstnamefield, | |||
$userlastnamefield, | |||
$timefield, | |||
$instancefield, | |||
$tagfields = [] ) |
Primitive function to generate a SQL string from a parse tree.
Parameters:
$parsetree should be a parse tree generated by a search_lexer/search_parser combination. Other fields are database table names to search.
@global object
search_generate_text_SQL | ( | $parsetree, | |
$datafield, | |||
$metafield, | |||
$mainidfield, | |||
$useridfield, | |||
$userfirstnamefield, | |||
$userlastnamefield, | |||
$timefield, | |||
$instancefield ) |
Primitive function to generate a SQL string from a parse tree using TEXT indexes.
If searches aren't suitable to use TEXT this function calls the default search_generate_SQL() one.
send_headers | ( | $contenttype, | |
$cacheable = true ) |
Send the HTTP headers that Moodle requires.
There is a backwards compatibility hack for legacy code that needs to add custom IE compatibility directive.
Example: if (!isset($CFG->additionalhtmlhead)) { $CFG->additionalhtmlhead = ''; } $CFG->additionalhtmlhead .= '<meta http-equiv="X-UA-Compatible" content="IE=8" >'; header('X-UA-Compatible: IE=8'); echo $OUTPUT->header();
Please note the $CFG->additionalhtmlhead alone might not work, you should send the IE compatibility header() too.
string | $contenttype | |
bool | $cacheable | Can this page be cached on back? |
void,sends | HTTP headers |
serialise_tool_proxy | ( | ) |
session_get_instance | ( | ) |
session_get_realuser | ( | ) |
session_is_legacy | ( | ) |
session_is_loggedinas | ( | ) |
session_kill | ( | ) |
session_kill_all | ( | ) |
session_kill_user | ( | ) |
session_loginas | ( | ) |
session_set_user | ( | ) |
session_touch | ( | ) |
sesskey | ( | ) |
Makes sure that $USER->sesskey exists, if $USER itself exists.
It sets a new sesskey if one does not already exist, but does not overwrite existing sesskeys. Returns the sesskey string if $USER exists, or boolean false if not.
@uses $USER
string |
set_current_group | ( | ) |
set_debugging | ( | $level, | |
$debugdisplay = null ) |
Alter debugging level for the current request, the change is not saved in database.
int | $level | one of the DEBUG_* constants |
bool | $debugdisplay |
set_moodle_cookie | ( | $username | ) |
Sets a moodle cookie with a weakly encrypted username.
string | $username | to encrypt and place in a cookie, '' means delete current cookie |
void |
set_user_device_type | ( | ) |
moodle_text_filter::setup | ( | $page, | |
$context ) |
Setup page with filter requirements and other prepare stuff.
Override this method if the filter needs to setup page requirements or needs other stuff to be executed.
Note this method is invoked from {
moodle_page | $page | the page we are going to add requirements to. |
context | $context | the context which contents are going to be filtered. |
Reimplemented in filter_glossary, filter_mathjaxloader, and filter_mediaplugin.
setup_get_remote_url | ( | ) |
Get the URL that PHP/the web server thinks it is serving.
Private function used by initialise_fullme. In your code, use $PAGE->url, $SCRIPT, etc.
array | in the same format that parse_url returns, with the addition of a 'fullpath' element, which includes any slasharguments path. |
filter_manager::setup_page_for_filters | ( | $page, | |
$context ) |
Setup page with filters requirements and other prepare stuff.
This method is used by {
Note it's executed for each piece of text filtered, so filter implementations are responsible of controlling the cardinality of the executions that may be different depending of the stuff to prepare.
moodle_page | $page | the page we are going to add requirements to. |
context | $context | the context which contents are going to be filtered. |
filter_manager::setup_page_for_globally_available_filters | ( | $page | ) |
Setup the page for globally available filters.
This helps setting up the page for filters which may be applied to the page, even if they do not belong to the current context, or are not yet visible because the content is lazily added (ajax). This method always uses to the system context which determines the globally available filters.
This should only ever be called once per request.
moodle_page | $page | The page. |
show_event | ( | ) |
signup_captcha_enabled | ( | ) |
Returns whether or not the captcha element is enabled, and the admin settings fulfil its requirements.
bool |
signup_get_user_confirmation_authplugin | ( | ) |
Check if user confirmation is enabled on this site and return the auth plugin handling registration if enabled.
stdClass | the current auth plugin handling user registration or false if registration not enabled |
signup_is_enabled | ( | ) |
Check if sign-up is enabled in the site.
If is enabled, the function will return the authplugin instance.
mixed | false if sign-up is not enabled, the authplugin instance otherwise. |
signup_setup_new_user | ( | $user | ) |
Add the missing fields to a user that is going to be created.
stdClass | $user | the new user object |
stdClass | the user filled |
signup_validate_data | ( | $data, | |
$files ) |
Validates the standard sign-up data (except recaptcha that is validated by the form element).
array | $data | the sign-up data |
array | $files | files among the data |
array | list of errors, being the key the data element name and the value the error itself |
site_scale_used | ( | ) |
skip_main_destination | ( | ) |
soap_call | ( | $connection, | |
$call, | |||
$params ) |
Make a call to a SoapClient.
SoapClient | $connection | The SoapClient to call |
string | $call | Operation to be performed by client |
array | $params | Parameters for the call |
mixed | The return parameters of the operation or a SoapFault If the operation returned several parameters then these are returned as an object rather than an array |
soap_connect | ( | $wsdl, | |
$trace = false ) |
Create a new SoapClient object.
string | $wsdl | URI of the WSDL file |
boolean | $trace | indicates if the soap messages should be saved (i.e. if get_soap_messages is used) and should be used only for debugging |
mixed | Returns either a SoapClient object or, if the connection failed, a SoapFault object. |
stats_cron_daily | ( | $maxdays = 1 | ) |
Execute daily statistics gathering.
int | $maxdays | maximum number of days to be processed |
boolean | success |
stats_cron_monthly | ( | ) |
Execute monthly statistics gathering.
boolean | success |
stats_cron_weekly | ( | ) |
Execute weekly statistics gathering.
boolean | success |
stats_fix_zeros | ( | $stats, | |
$timeafter, | |||
$timestr, | |||
$line2 = true, | |||
$line3 = false ) |
Fix missing entries in the statistics.
This creates a dummy stat when nothing happened during a day/week/month.
array | $stats | array of statistics. |
int | $timeafter | unused. |
string | $timestr | type of statistics to generate (dayly, weekly, monthly). |
boolean | $line2 | |
boolean | $line3 |
array | of fixed statistics. |
stats_get_base_daily | ( | $time = 0 | ) |
Start of day.
int | $time | timestamp |
int | start of day |
stats_get_base_monthly | ( | $time = 0 | ) |
Start of month.
int | $time | timestamp |
int | start of month |
stats_get_base_weekly | ( | $time = 0 | ) |
Start of week.
int | $time | timestamp |
int | start of week |
stats_get_next_day_start | ( | $time | ) |
Start of next day.
int | $time | timestamp |
start | of next day |
stats_get_next_month_start | ( | $time | ) |
Start of next month.
int | $time | timestamp |
start | of next month |
stats_get_next_week_start | ( | $time | ) |
Start of next week.
int | $time | timestamp |
start | of next week |
stats_get_start_from | ( | $str | ) |
Return starting date of stats processing.
string | $str | name of table - daily, weekly or monthly |
int | timestamp |
stats_progress | ( | $ident | ) |
Print daily cron progress.
string | $ident |
stats_run_query | ( | $sql, | |
$parameters = array() ) |
Execute individual daily statistics queries.
string | $sql | The query to run |
boolean | success |
stats_temp_table_clean | ( | ) |
Deletes summary logs table for stats calculation.
bool | success (true) or failure(false) |
stats_temp_table_fill | ( | $timestart, | |
$timeend ) |
Fills the temporary stats tables with new data.
This function is meant to be called to get a new day of data
int | timestamp of the start time of logs view |
int | timestamp of the end time of logs view |
bool | success (true) or failure(false) |
stats_temp_table_setup | ( | ) |
Fills the temporary stats tables with new data.
This function is meant to be called once at the start of stats generation
int | timestart timestamp of the start time of logs view |
int | timeend timestamp of the end time of logs view |
bool | success (true) or failure(false) |
strip_links | ( | $string | ) |
Given a string, replaces all .
* by .* and returns the string.
string | $string |
string |
strip_pluginfile_content | ( | $source | ) |
Removes the usage of Moodle files from a text.
In some rare cases we need to re-use a text that already has embedded links to some files hosted within Moodle. But the new area in which we will push this content does not support files... therefore we need to remove those files.
string | $source | The text |
string | The stripped text |
strip_querystring | ( | $url | ) |
Remove query string from url.
Takes in a URL and returns it without the querystring portion.
string | $url | the url which may have a query string attached. |
string | The remaining URL. |
tag_add | ( | ) |
tag_assign | ( | ) |
tag_autocomplete | ( | ) |
tag_bulk_delete_instances | ( | ) |
tag_cleanup | ( | ) |
tag_cloud_sort | ( | ) |
tag_compute_correlations | ( | ) |
tag_cron | ( | ) |
tag_delete | ( | ) |
tag_delete_instance | ( | ) |
tag_delete_instances | ( | ) |
tag_description_set | ( | ) |
tag_display_name | ( | ) |
tag_find_records | ( | ) |
tag_find_tags | ( | ) |
tag_get | ( | ) |
tag_get_correlated | ( | ) |
tag_get_id | ( | ) |
tag_get_name | ( | ) |
tag_get_related_tags | ( | ) |
tag_get_related_tags_csv | ( | ) |
tag_get_tags | ( | ) |
tag_get_tags_array | ( | ) |
tag_get_tags_csv | ( | ) |
tag_get_tags_ids | ( | ) |
tag_normalize | ( | ) |
tag_print_cloud | ( | ) |
tag_print_description_box | ( | ) |
tag_print_management_box | ( | ) |
tag_print_search_box | ( | ) |
tag_print_search_results | ( | ) |
tag_print_tagged_users_table | ( | ) |
tag_print_user_box | ( | ) |
tag_print_user_list | ( | ) |
tag_process_computed_correlation | ( | ) |
tag_record_count | ( | ) |
tag_record_tagged_with | ( | ) |
tag_rename | ( | ) |
tag_set | ( | ) |
tag_set_add | ( | ) |
tag_set_delete | ( | ) |
tag_set_flag | ( | ) |
tag_type_set | ( | ) |
tag_unset_flag | ( | ) |
filter_manager::text_filtering_hash | ( | ) |
null_filter_manager::text_filtering_hash | ( | ) |
As for the equivalent filter_manager method.
text_to_html | ( | $text, | |
$smileyignored = null, | |||
$para = true, | |||
$newlines = true ) |
Given plain text, makes it into HTML as nicely as possible.
May contain HTML tags already.
Do not abuse this function. It is intended as lower level formatting feature used by format_text() to convert FORMAT_MOODLE to HTML. You are supposed to call format_text() in most of cases.
string | $text | The string to convert. |
boolean | $smileyignored | Was used to determine if smiley characters should convert to smiley images, ignored now |
boolean | $para | If true then the returned string will be wrapped in div tags |
boolean | $newlines | If true then lines newline breaks will be converted to HTML newline breaks. |
string |
textlib_get_instance | ( | ) |
theme_get_locked_theme_for_device | ( | $device | ) |
Returns the theme named defined in config.php for the given device.
string | $device | The device |
string | or null |
theme_is_device_locked | ( | $device | ) |
Checks if the given device has a theme defined in config.php.
string | $device | The device |
bool |
trusttext_active | ( | ) |
Is trusttext feature active?
bool |
trusttext_pre_edit | ( | $object, | |
$field, | |||
$context ) |
Must be called before editing of all texts with trust flag.
Removes all XSS nasties from texts stored in database if needed.
stdClass | $object | data object with xxx, xxxformat and xxxtrust fields |
string | $field | name of text field |
context | $context | active context |
stdClass | updated $object |
trusttext_trusted | ( | $context | ) |
Is current user trusted to enter no dangerous XSS in this context?
Please note the user must be in fact trusted everywhere on this server!!
context | $context |
bool | true if user trusted |
|
protected |
Unloads all filters and other cached information.
Reimplemented in performance_measuring_filter_manager.
|
protected |
Unloads all filters and other cached information.
Reimplemented from filter_manager.
unzip_file | ( | ) |
update_category_button | ( | ) |
update_event | ( | ) |
update_log_display_entry | ( | ) |
update_login_count | ( | ) |
update_module_button | ( | ) |
update_timezone_records | ( | ) |
upgrade_ensure_not_running | ( | $warningonly = false | ) |
Makes sure that upgrade process is not running.
To be inserted in the core functions that can not be called by pluigns during upgrade. Core upgrade should not use any API functions at all. See
moodle_exception | if executed from inside of upgrade script and $warningonly is false |
bool | $warningonly | if true displays a warning instead of throwing an exception |
bool | true if executed from outside of upgrade process, false if from inside upgrade process and function is used for warning only |
user_get_participants | ( | ) |
user_get_participants_sql | ( | ) |
user_get_total_participants | ( | ) |
useredit_shared_definition_preferences | ( | ) |
validate_email | ( | $address | ) |
Validates an email to make sure it makes sense.
string | $address | The email address to validate. |
boolean |
validate_login_captcha | ( | string|bool | $captcha | ) |
Check the submitted captcha is valid or not.
string | bool | $captcha | The value submitted in the login form that we are validating. If false is passed for the captcha, this function will always return true. |
boolean | If the submitted captcha is valid. |
wikify_links | ( | $string | ) |
This expression turns links into something nice in a text format.
(Russell Jungwirth)
string | $string |
string |
xmlize | ( | $data, | |
$whitespace = 1, | |||
$encoding = 'UTF-8', | |||
$reporterrors = false ) |
XML parsing function calles into class.
Note: Used by xml element handler as callback.
string | $data | the XML source to parse. |
int | $whitespace | If set to 1 allows the parser to skip "space" characters in xml document. Default is 1 |
string | $encoding | Specify an OUTPUT encoding. If not specified, it defaults to UTF-8. |
bool | $reporterrors | if set to true, then a xml_format_exception exception will be thrown if the XML is not well-formed. Otherwise errors are ignored. |
array | representation of the parsed XML. |
zip_files | ( | ) |
$capabilities |
if (file_exists(__DIR__.'/../config.php')) $files = array('boost/style/moodle.css') |
This script prints basic CSS for the installer.
bool filterobject::$fullmatch |
whether to match complete words.
If true, 'T' won't be matched in 'Tim'.
foreach($plugins as $plugin) if( $hassiteconfig) if($hassiteconfig) if( $hassiteconfig &&core_communication\api::is_available()) if($hassiteconfig) if ( $hassiteconfig $plugins) = core_plugin_manager::instance()->get_plugins_of_type('tool') |
Add all admin tools.
Add all local plugins - must be always last!
null string filterobject::$replacementphrase |
replacement text to go inside begin and end.
If not set, the body of the replacement will be the original phrase.
global $SITE |
This file defines settingpages and externalpages under the "badges" section.
|
protected |
This list of active filters, by context, for filtering strings.
An array contextid => ordered array of filter name => filter objects.
if (!defined( 'MOODLE_INTERNAL')) $strmnetservices = get_string('mnetservices', '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.
|
protected |
This list of active filters, by context, for filtering content.
An array contextid => ordered array of filter name => filter objects.
alert danger |
if (isset( $_REQUEST[ 'lang'])) else |
This script creates config.php file during installation.
if (isset( $_REQUEST[ 'admin'])) else |
if (!empty( $_POST)) else |
if ( $distro) else |
const ENROL_EXT_REMOVED_SUSPEND 2 |
When user disappears from external source, user enrolment is suspended, roles are kept as is.
In some cases user needs a role with some capability to be visible in UI - suc has in gradebook, assignments, etc.
const ENROL_EXT_REMOVED_SUSPENDNOROLES 3 |
When user disappears from external source, the enrolment is suspended and roles assigned by enrol instance are removed.
Please note that user may "disappear" from gradebook and other areas.
const ENROL_INSTANCE_DISABLED 1 |
Course enrol instance disabled, user may enter course if other enrol instance enabled.
(used in enrol->status)
const ENROL_INSTANCE_ENABLED 0 |
Course enrol instance enabled.
(used in enrol->status)
const ENROL_REQUIRE_LOGIN_CACHE_PERIOD 1800 |
const ENROL_RESTORE_TYPE 'enrolrestore' |
const ENV_SELECT_NEWER 0 |
Define algorithm used to select the xml file.
To select the newer file available to perform checks
font family |
Moodle Generic plain page.
This is used for various pages, usually errors, early in the Moodle bootstrap. It can be safetly customized by editing this file directly but it MUST NOT contain any Moodle resources such as theme files generated by php, it can only contain references to static css and images, and as a precaution its recommended that everything is inlined rather than references. This is why this file is located here as it cannot be inside a Moodle theme.
const FORMAT_WIKI '3' |
Wiki-formatted text.
Deprecated: left here just to note that '3' is not used (at the moment) and to catch any latent wiki-like text (which generates an error)
h1 |
if(!defined('MOODLE_INTERNAL')) | ( | ! | defined 'MOODLE_INTERNAL' | ) |
Allows the admin to configure a list of profile fields that are sent/recieved.
if(!defined('MOODLE_INTERNAL')) | ( | ! | defined 'MOODLE_INTERNAL' | ) |
The form for configuring which services are subscribed and published on a host.
if(!defined('MOODLE_INTERNAL')) | ( | ! | defined 'MOODLE_INTERNAL' | ) |
Form class for editing badges preferences.
const LIST_NONE 1 |
#-
#+ list defines
trait core::task\logging_trait |
This trait includes functions to assist with logging in tasks.
const MEMORY_EXTRA -3 |
Large memory limit for given platform - used in cron, upgrade, and other places that need a lot of memory.
Can be overridden with $CFG->extramemorylimit setting.
const NO_ERROR 0 |
Add required files.
Include the necessary Define a bunch of XML processing errors XML Processing Error
const NO_MOODLE_COOKIES true |
This file is used to call any registered externallib function in Moodle.
It will process more than one request and return more than one response if required. It is recommended to add webservice functions and re-use this script instead of writing any new custom ajax scripts.
trait core::hook\stoppable_trait |
Moodle specific implementation of Psr\EventDispatcher\StoppableEventInterface interface from PSR-14.
const TABLE_P_TOP 1 |
#-
#+ Constants that indicate whether the paging bar for the table appears above or below the table.
const TABLE_SHOW_ALL_PAGE_SIZE 5000 |
#-
Constant that defines the 'Show all' page size.
const TEXTFILTER_EXCL_SEPARATOR chr(0x1F) . '%' . chr(0x1F) |
Define one exclusive separator that we'll use in the temp saved tags keys.
It must be something rare enough to avoid having matches with filterobjects. MDL-18165
const TOKEN_USER "0" |
Constants for the various types of tokens.