first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
+2751
View File
File diff suppressed because it is too large Load Diff
+116
View File
@@ -0,0 +1,116 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines the built-in prediction models provided by the Moodle core.
*
* @package core
* @category analytics
* @copyright 2019 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$models = [
[
'target' => '\core_course\analytics\target\course_dropout',
'indicators' => [
'\core\analytics\indicator\any_access_after_end',
'\core\analytics\indicator\any_access_before_start',
'\core\analytics\indicator\any_write_action_in_course',
'\core\analytics\indicator\read_actions',
'\core_course\analytics\indicator\completion_enabled',
'\core_course\analytics\indicator\potential_cognitive_depth',
'\core_course\analytics\indicator\potential_social_breadth',
'\mod_assign\analytics\indicator\cognitive_depth',
'\mod_assign\analytics\indicator\social_breadth',
'\mod_book\analytics\indicator\cognitive_depth',
'\mod_book\analytics\indicator\social_breadth',
'\mod_chat\analytics\indicator\cognitive_depth',
'\mod_chat\analytics\indicator\social_breadth',
'\mod_choice\analytics\indicator\cognitive_depth',
'\mod_choice\analytics\indicator\social_breadth',
'\mod_data\analytics\indicator\cognitive_depth',
'\mod_data\analytics\indicator\social_breadth',
'\mod_feedback\analytics\indicator\cognitive_depth',
'\mod_feedback\analytics\indicator\social_breadth',
'\mod_folder\analytics\indicator\cognitive_depth',
'\mod_folder\analytics\indicator\social_breadth',
'\mod_forum\analytics\indicator\cognitive_depth',
'\mod_forum\analytics\indicator\social_breadth',
'\mod_glossary\analytics\indicator\cognitive_depth',
'\mod_glossary\analytics\indicator\social_breadth',
'\mod_imscp\analytics\indicator\cognitive_depth',
'\mod_imscp\analytics\indicator\social_breadth',
'\mod_label\analytics\indicator\cognitive_depth',
'\mod_label\analytics\indicator\social_breadth',
'\mod_lesson\analytics\indicator\cognitive_depth',
'\mod_lesson\analytics\indicator\social_breadth',
'\mod_lti\analytics\indicator\cognitive_depth',
'\mod_lti\analytics\indicator\social_breadth',
'\mod_page\analytics\indicator\cognitive_depth',
'\mod_page\analytics\indicator\social_breadth',
'\mod_quiz\analytics\indicator\cognitive_depth',
'\mod_quiz\analytics\indicator\social_breadth',
'\mod_resource\analytics\indicator\cognitive_depth',
'\mod_resource\analytics\indicator\social_breadth',
'\mod_scorm\analytics\indicator\cognitive_depth',
'\mod_scorm\analytics\indicator\social_breadth',
'\mod_survey\analytics\indicator\cognitive_depth',
'\mod_survey\analytics\indicator\social_breadth',
'\mod_url\analytics\indicator\cognitive_depth',
'\mod_url\analytics\indicator\social_breadth',
'\mod_wiki\analytics\indicator\cognitive_depth',
'\mod_wiki\analytics\indicator\social_breadth',
'\mod_workshop\analytics\indicator\cognitive_depth',
'\mod_workshop\analytics\indicator\social_breadth',
],
],
[
'target' => '\core_course\analytics\target\no_teaching',
'indicators' => [
'\core_course\analytics\indicator\no_teacher',
'\core_course\analytics\indicator\no_student',
],
'timesplitting' => '\core\analytics\time_splitting\single_range',
'enabled' => true,
],
[
'target' => '\core_user\analytics\target\upcoming_activities_due',
'indicators' => [
'\core_course\analytics\indicator\activities_due',
],
'timesplitting' => '\core\analytics\time_splitting\upcoming_week',
'enabled' => true,
],
[
'target' => '\core_course\analytics\target\no_access_since_course_start',
'indicators' => [
'\core\analytics\indicator\any_course_access',
],
'timesplitting' => '\core\analytics\time_splitting\one_month_after_start',
'enabled' => true,
],
[
'target' => '\core_course\analytics\target\no_recent_accesses',
'indicators' => [
'\core\analytics\indicator\any_course_access',
],
'timesplitting' => '\core\analytics\time_splitting\past_month',
'enabled' => true,
],
];
+628
View File
@@ -0,0 +1,628 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Core cache definitions.
*
* This file is part of Moodle's cache API, affectionately called MUC.
* It contains the components that are requried in order to use caching.
*
* @package core
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$definitions = array(
// Used to store processed lang files.
// The keys used are the revision, lang and component of the string file.
// The static acceleration size has been based upon student access of the site.
'string' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 30,
'canuselocalstore' => true,
),
// Used to store cache of all available translations.
'langmenu' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'canuselocalstore' => true,
),
// Used to store database meta information.
// The database meta information includes information about tables and there columns.
// Its keys are the table names.
// When creating an instance of this definition you must provide the database family that is being used.
'databasemeta' => array(
'mode' => cache_store::MODE_APPLICATION,
'requireidentifiers' => array(
'dbfamily'
),
'simpledata' => true, // This is a read only class, so leaving references in place is safe.
'staticacceleration' => true,
'staticaccelerationsize' => 15
),
// Event invalidation cache.
// This cache is used to manage event invalidation, its keys are the event names.
// Whenever something is invalidated it is both purged immediately and an event record created with the timestamp.
// When a new cache is initialised all timestamps are looked at and if past data is once more invalidated.
// Data guarantee is required in order to ensure invalidation always occurs.
// Persistence has been turned on as normally events are used for frequently used caches and this event invalidation
// cache will likely be used either lots or never.
'eventinvalidation' => array(
'mode' => cache_store::MODE_APPLICATION,
'staticacceleration' => true,
'requiredataguarantee' => true,
'simpledata' => true,
),
// Hook callbacks cache.
// There is a static cache in hook manager, data is fetched once per page on first hook execution.
// This cache needs to be invalidated during upgrades when code changes and when callbacks
// overrides are updated.
'hookcallbacks' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => false,
// WARNING: Manual cache purge may be required when overriding hook callbacks.
'canuselocalstore' => true,
),
// Cache for question definitions. This is used by the question_bank class.
// Users probably do not need to know about this cache. They will just call
// question_bank::load_question.
'questiondata' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true, // The id of the question is used.
'requiredataguarantee' => false,
'datasource' => 'question_finder',
'datasourcefile' => 'question/engine/bank.php',
),
// HTML Purifier cache
// This caches the html purifier cleaned text. This is done because the text is usually cleaned once for every user
// and context combo. Text caching handles caching for the combination, this cache is responsible for caching the
// cleaned text which is shareable.
'htmlpurifier' => array(
'mode' => cache_store::MODE_APPLICATION,
'canuselocalstore' => true,
),
// Used to store data from the config + config_plugins table in the database.
// The key used is the component:
// - core for all core config settings
// - plugin component for all plugin settings.
// Persistence is used because normally several settings within a script.
'config' => array(
'mode' => cache_store::MODE_APPLICATION,
'staticacceleration' => true,
'simpledata' => true
),
// Groupings belonging to a course.
// A simple cache designed to replace $GROUPLIB_CACHE->groupings.
// Items are organised by course id and are essentially course records.
'groupdata' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true, // The course id the groupings exist for.
'simpledata' => true, // Array of stdClass objects containing only strings.
'staticacceleration' => true, // Likely there will be a couple of calls to this.
'staticaccelerationsize' => 2, // The original cache used 1, we've increased that to two.
),
// Whether a course currently has hidden groups.
'coursehiddengroups' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true, // The course id the groupings exist for.
'simpledata' => true, // Booleans.
'staticacceleration' => true, // Likely there will be a couple of calls to this.
),
// Used to cache calendar subscriptions.
'calendar_subscriptions' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
),
// Cache the course categories where the user has any enrolment and all categories that this user can manage.
'calendar_categories' => array(
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
'invalidationevents' => array(
'changesincoursecat',
'changesincategoryenrolment',
),
'ttl' => 900,
),
// Cache the capabilities list DB table. See get_all_capabilities and get_deprecated_capability_info in accesslib.
'capabilities' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 2, // Should be main capabilities and deprecated capabilities.
'ttl' => 3600, // Just in case.
),
// YUI Module cache.
// This stores the YUI module metadata for Shifted YUI modules in Moodle.
'yuimodules' => array(
'mode' => cache_store::MODE_APPLICATION,
),
// Cache for the list of event observers.
'observers' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 2,
),
// Cache used by the {@link core_plugin_manager} class.
// NOTE: this must be a shared cache.
'plugin_manager' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
),
// Used to store the full tree of course categories.
'coursecattree' => array(
'mode' => cache_store::MODE_APPLICATION,
'staticacceleration' => true,
'invalidationevents' => array(
'changesincoursecat',
)
),
// Used to store data for course categories visible to current user. Helps to browse list of categories.
'coursecat' => array(
'mode' => cache_store::MODE_SESSION,
'invalidationevents' => array(
'changesincoursecat',
'changesincourse',
),
'ttl' => 600,
),
// Used to store data for course categories visible to current user. Helps to browse list of categories.
'coursecatrecords' => array(
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'invalidationevents' => array(
'changesincoursecat',
),
),
// Used to store state of sections in course (collapsed or not).
'coursesectionspreferences' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'simpledata' => false,
'staticacceleration' => true,
],
// Cache course contacts for the courses.
'coursecontacts' => array(
'mode' => cache_store::MODE_APPLICATION,
'staticacceleration' => true,
'simplekeys' => true,
'ttl' => 3600,
),
// Course reactive state cache.
'courseeditorstate' => [
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
],
// Course actions instances cache.
'courseactionsinstances' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'simpledata' => false,
'staticacceleration' => true,
// Executing actions in more than 10 courses usually means executing the same action on each course
// so there is no need for caching individual course instances.
'staticaccelerationsize' => 10,
],
// Used to store data for repositories to avoid repetitive DB queries within one request.
'repositories' => array(
'mode' => cache_store::MODE_REQUEST,
),
// Used to store external badges.
'externalbadges' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'ttl' => 3600,
),
// Accumulated information about course modules and sections used to print course view page (user-independent).
// Used in functions:
// - course_modinfo::build_course_section_cache()
// - course_modinfo::inner_build_course_cache()
// - get_array_of_activities()
// Reset/update in functions:
// - rebuild_course_cache()
// - course_modinfo::purge_module_cache()
// - course_modinfo::purge_section_cache()
// - remove_course_contents().
'coursemodinfo' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'canuselocalstore' => true,
'requirelockingbeforewrite' => true
),
// This is the session user selections cache.
// It's a special cache that is used to record user selections that should persist for the lifetime of the session.
// Things such as which categories the user has expanded can be stored here.
// It uses simple keys and simple data, please ensure all uses conform to those two constraints.
'userselections' => array(
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true
),
// Used to cache activity completion status.
'completion' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'ttl' => 3600,
'staticacceleration' => true,
'staticaccelerationsize' => 2, // Should be current course and site course.
),
// Used to cache course completion status.
'coursecompletion' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'ttl' => 3600,
'staticacceleration' => true,
'staticaccelerationsize' => 30, // Will be users list of current courses in nav.
),
// A simple cache that stores whether a user can expand a course in the navigation.
// The key is the course ID and the value will either be 1 or 0 (cast to bool).
// The cache isn't always up to date, it should only ever be used to save a costly call to
// can_access_course on the first page request a user makes.
'navigation_expandcourse' => array(
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true
),
// Caches suspended userids by course.
// The key is the courseid, the value is an array of user ids.
'suspended_userids' => array(
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'simpledata' => true,
),
// Cache system-wide role definitions.
'roledefs' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 30,
),
// Caches plugins existing functions by function name and file.
// Set static acceleration size to 5 to load a few functions.
'plugin_functions' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'canuselocalstore' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 5
),
// Caches data about tag collections and areas.
'tags' => array(
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'staticacceleration' => true,
),
// Grade categories. Stored at session level as invalidation is very aggressive.
'grade_categories' => array(
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'invalidationevents' => array(
'changesingradecategories',
)
),
// Store temporary tables information.
'temp_tables' => array(
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'simpledata' => true
),
// Caches tag index builder results.
'tagindexbuilder' => array(
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simplevalues' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 10,
'ttl' => 900, // 15 minutes.
'invalidationevents' => array(
'resettagindexbuilder',
),
),
// Caches contexts with insights.
'contextwithinsights' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 1
),
// Caches message processors.
'message_processors_enabled' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 3
),
// Caches the time of the last message in a conversation.
'message_time_last_message_between_users' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true, // The conversation id is used.
'simplevalues' => true,
'datasource' => '\core_message\time_last_message_between_users',
),
// Caches font awesome icons.
'fontawesomeiconmapping' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 1
),
// Caches processed CSS.
'postprocessedcss' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => false,
),
// Caches grouping and group ids of a user.
'user_group_groupings' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
),
// This is the user's pre sign-up session cache.
// This cache is used to record the user's pre sign-up data such as
// age of digital consent (minor) status, accepted policies, etc.
'presignup' => array(
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
'ttl' => 1800
),
// Caches the first time we analysed models' analysables.
'modelfirstanalyses' => array(
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'simpledata' => true,
),
// Cache the list of portfolio instances for the logged in user
// in the portfolio_add_button constructor to avoid loading the
// same data multiple times.
'portfolio_add_button_portfolio_instances' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'staticacceleration' => true
],
// Cache the user dates for courses set to relative dates mode.
'course_user_dates' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true
],
// Information generated during the calculation of indicators.
'calculablesinfo' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => false,
'simpledata' => false,
],
// The list of content items (activities, resources and their subtypes) that can be added to a course for a user.
'user_course_content_items' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
],
// The list of favourited content items (activities, resources and their subtypes) for a user.
'user_favourite_course_content_items' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
],
\core_course\local\service\content_item_service::RECOMMENDATION_CACHE => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
],
// Caches contentbank extensions management.
'contentbank_enabled_extensions' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
],
'contentbank_context_extensions' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
],
// Language strings for H5P content-type libraries.
// Key "{$libraryname}/{$language}"" contains translations for a given library and language.
// Key "$libraryname" has a list of all of the available languages for the library.
'h5p_content_type_translations' => [
'mode' => cache_store::MODE_APPLICATION,
'simpledata' => true,
],
// File cache for H5P Library ids.
'h5p_libraries' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'canuselocalstore' => true
],
// File cache for H5P Library files.
'h5p_library_files' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'canuselocalstore' => true
],
// Cache the grade letters for faster retrival.
'grade_letters' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 100
],
// Cache for licenses.
'license' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => false,
],
// Cache the grade setting for faster retrieval.
'gradesetting' => [
'mode' => cache_store::MODE_REQUEST,
'simplekeys' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 100
],
// Course image cache.
'course_image' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'datasource' => '\core_course\cache\course_image',
],
// Cache the course categories where the user has access the content bank.
'contentbank_allowed_categories' => [
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
'invalidationevents' => [
'changesincoursecat',
'changesincategoryenrolment',
],
],
// Cache the courses where the user has access the content bank.
'contentbank_allowed_courses' => [
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
'invalidationevents' => [
'changesincoursecat',
'changesincategoryenrolment',
'changesincourse',
],
],
// Users allowed reports according to audience.
'reportbuilder_allowed_reports' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'ttl' => 1800,
],
// Cache image dimensions.
'file_imageinfo' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'canuselocalstore' => true,
'staticaccelerationsize' => 100,
],
// Cache if a user has the capability to share to MoodleNet.
'moodlenet_usercanshare' => [
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
'ttl' => 1800,
'invalidationevents' => [
'changesincoursecat',
'changesincategoryenrolment',
'changesincourse',
],
],
// A theme has been used in context to override the default theme.
// Applies to user, cohort, category and course.
'theme_usedincontext' => [
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
],
// The navigation_cache class used this cache to store the navigation nodes.
'navigation_cache' => [
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
'ttl' => 1800,
],
);
+80
View File
@@ -0,0 +1,80 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Definition of core event observers.
*
* The observers defined in this file are notified when respective events are triggered. All plugins
* support this.
*
* For more information, take a look to the documentation available:
* - Events API: {@link https://docs.moodle.org/dev/Events_API}
* - Upgrade API: {@link https://moodledev.io/docs/guides/upgrade}
*
* @package core
* @category event
* @copyright 2007 onwards Martin Dougiamas http://dougiamas.com
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// List of legacy event handlers.
$handlers = array(
// No more old events!
);
// List of events_2 observers.
$observers = array(
array(
'eventname' => '\core\event\course_module_completion_updated',
'callback' => 'core_badges_observer::course_module_criteria_review',
),
array(
'eventname' => '\core\event\badge_awarded',
'callback' => 'core_badges_observer::badge_criteria_review',
),
array(
'eventname' => '\core\event\course_completed',
'callback' => 'core_badges_observer::course_criteria_review',
),
array(
'eventname' => '\core\event\user_updated',
'callback' => 'core_badges_observer::profile_criteria_review',
),
array(
'eventname' => '\core\event\cohort_member_added',
'callback' => 'core_badges_observer::cohort_criteria_review',
),
array(
'eventname' => '\core\event\competency_evidence_created',
'callback' => 'core_badges_observer::competency_criteria_review',
),
// Competencies.
array(
'eventname' => '\core\event\course_completed',
'callback' => 'core_competency\api::observe_course_completed',
),
array(
'eventname' => '\core\event\course_module_completion_updated',
'callback' => 'core_competency\api::observe_course_module_completion_updated',
),
);
// List of all events triggered by Moodle can be found using Events list report.
+109
View File
@@ -0,0 +1,109 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Hook listener callbacks.
*
* @package core
* @copyright 2023 Safat Shahin <safat.shahin@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$callbacks = [
[
'hook' => \core_group\hook\after_group_created::class,
'callback' => \core_communication\hook_listener::class . '::create_group_communication',
],
[
'hook' => \core_group\hook\after_group_updated::class,
'callback' => \core_communication\hook_listener::class . '::update_group_communication',
],
[
'hook' => \core_group\hook\after_group_deleted::class,
'callback' => \core_communication\hook_listener::class . '::delete_group_communication',
],
[
'hook' => \core_group\hook\after_group_membership_added::class,
'callback' => \core_communication\hook_listener::class . '::add_members_to_group_room',
],
[
'hook' => \core_group\hook\after_group_membership_removed::class,
'callback' => \core_communication\hook_listener::class . '::remove_members_from_group_room',
],
[
'hook' => \core_course\hook\after_course_created::class,
'callback' => \core_communication\hook_listener::class . '::create_course_communication',
],
[
'hook' => \core_course\hook\after_course_updated::class,
'callback' => \core_communication\hook_listener::class . '::update_course_communication',
],
[
'hook' => \core_course\hook\before_course_deleted::class,
'callback' => \core_communication\hook_listener::class . '::delete_course_communication',
],
[
'hook' => \core_user\hook\before_user_updated::class,
'callback' => \core_communication\hook_listener::class . '::update_user_room_memberships',
],
[
'hook' => \core_user\hook\before_user_deleted::class,
'callback' => \core_communication\hook_listener::class . '::delete_user_room_memberships',
],
[
'hook' => \core\hook\access\after_role_assigned::class,
'callback' => \core_communication\hook_listener::class . '::update_user_membership_for_role_changes',
],
[
'hook' => \core\hook\access\after_role_unassigned::class,
'callback' => \core_communication\hook_listener::class . '::update_user_membership_for_role_changes',
],
[
'hook' => \core_enrol\hook\after_enrol_instance_status_updated::class,
'callback' => \core_communication\hook_listener::class . '::update_communication_memberships_for_enrol_status_change',
],
[
'hook' => \core_enrol\hook\before_enrol_instance_deleted::class,
'callback' => \core_communication\hook_listener::class . '::remove_communication_memberships_for_enrol_instance_deletion',
],
[
'hook' => \core_enrol\hook\after_user_enrolled::class,
'callback' => \core_communication\hook_listener::class . '::add_communication_membership_for_enrolled_user',
],
[
'hook' => \core_enrol\hook\before_user_enrolment_updated::class,
'callback' => \core_communication\hook_listener::class . '::update_communication_membership_for_updated_user_enrolment',
],
[
'hook' => \core_enrol\hook\before_user_enrolment_removed::class,
'callback' => \core_communication\hook_listener::class . '::remove_communication_membership_for_unenrolled_user',
],
[
'hook' => \core\hook\output\before_standard_footer_html_generation::class,
'callback' => \core_userfeedback::class . '::before_standard_footer_html_generation',
],
[
'hook' => \core\hook\output\after_standard_main_region_html_generation::class,
'callback' => \core_message\hook_callbacks::class . '::add_messaging_widget',
'priority' => 0,
],
[
'hook' => \core\hook\task\after_failed_task_max_delay::class,
'callback' => core\task\failed_task_callbacks::class . '::send_failed_task_max_delay_message',
],
];
+1
View File
@@ -0,0 +1 @@
+339
View File
@@ -0,0 +1,339 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This file is executed right after the install.xml
*
* For more information, take a look to the documentation available:
* - Upgrade API: {@link https://moodledev.io/docs/guides/upgrade}
*
* @package core_install
* @category upgrade
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Main post-install tasks to be executed after the BD schema is available
*
* This function is automatically executed after Moodle core DB has been
* created at initial install. It's in charge of perform the initial tasks
* not covered by the {@link install.xml} file, like create initial users,
* roles, templates, moving stuff from other plugins...
*
* Note that the function is only invoked once, at install time, so if new tasks
* are needed in the future, they will need to be added both here (for new sites)
* and in the corresponding {@link upgrade.php} file (for existing sites).
*
* All plugins within Moodle (modules, blocks, reports...) support the existence of
* their own install.php file, using the "Frankenstyle" component name as
* defined at {@link https://moodledev.io/general/development/policies/codingstyle/frankenstyle}, for example:
* - {@link xmldb_page_install()}. (modules don't require the plugintype ("mod_") to be used.
* - {@link xmldb_enrol_meta_install()}.
* - {@link xmldb_workshopform_accumulative_install()}.
* - ....
*
* Finally, note that it's also supported to have one uninstall.php file that is
* executed also once, each time one plugin is uninstalled (before the DB schema is
* deleted). Those uninstall files will contain one function, using the "Frankenstyle"
* naming conventions, like {@link xmldb_enrol_meta_uninstall()} or {@link xmldb_workshop_uninstall()}.
*/
function xmldb_main_install() {
global $CFG, $DB, $SITE, $OUTPUT;
// Make sure system context exists
$syscontext = context_system::instance(0, MUST_EXIST, false);
if ($syscontext->id != SYSCONTEXTID) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Unexpected new system context id!');
}
// Create site course
if ($DB->record_exists('course', array())) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Can not create frontpage course, courses already exist.');
}
$newsite = new stdClass();
$newsite->fullname = '';
$newsite->shortname = '';
$newsite->summary = NULL;
$newsite->newsitems = 3;
$newsite->numsections = 1;
$newsite->category = 0;
$newsite->format = 'site'; // Only for this course
$newsite->timecreated = time();
$newsite->timemodified = $newsite->timecreated;
if (defined('SITEID')) {
$newsite->id = SITEID;
$DB->import_record('course', $newsite);
$DB->get_manager()->reset_sequence('course');
} else {
$newsite->id = $DB->insert_record('course', $newsite);
define('SITEID', $newsite->id);
}
// set the field 'numsections'. We can not use format_site::update_format_options() because
// the file is not loaded
$DB->insert_record('course_format_options', array('courseid' => SITEID, 'format' => 'site',
'sectionid' => 0, 'name' => 'numsections', 'value' => $newsite->numsections));
$SITE = get_site();
if ($newsite->id != $SITE->id) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Unexpected new site course id!');
}
// Make sure site course context exists
context_course::instance($SITE->id);
// Update the global frontpage cache
$SITE = $DB->get_record('course', array('id'=>$newsite->id), '*', MUST_EXIST);
// Create default course category
if ($DB->record_exists('course_categories', array())) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Can not create default course category, categories already exist.');
}
$cat = new stdClass();
$cat->name = get_string('defaultcategoryname');
$cat->descriptionformat = FORMAT_HTML;
$cat->depth = 1;
$cat->sortorder = get_max_courses_in_category();
$cat->timemodified = time();
$catid = $DB->insert_record('course_categories', $cat);
$DB->set_field('course_categories', 'path', '/'.$catid, array('id'=>$catid));
// Make sure category context exists
context_coursecat::instance($catid);
$defaults = array(
'rolesactive' => '0', // marks fully set up system
'auth' => 'email',
'enrol_plugins_enabled' => 'manual,guest,self,cohort',
'theme' => theme_config::DEFAULT_THEME,
'filter_multilang_converted' => 1,
'siteidentifier' => random_string(32).get_host_from_url($CFG->wwwroot),
'backup_version' => 2008111700,
'backup_release' => '2.0 dev',
'mnet_dispatcher_mode' => 'off',
'sessiontimeout' => 8 * 60 * 60, // Must be present during roles installation.
'stringfilters' => '', // These two are managed in a strange way by the filters.
'filterall' => 0, // setting page, so have to be initialised here.
'texteditors' => 'tiny,atto,tinymce,textarea',
'antiviruses' => '',
'media_plugins_sortorder' => 'videojs,youtube',
'upgrade_extracreditweightsstepignored' => 1, // New installs should not run this upgrade step.
'upgrade_calculatedgradeitemsignored' => 1, // New installs should not run this upgrade step.
'upgrade_letterboundarycourses' => 1, // New installs should not run this upgrade step.
'format_plugins_sortorder' => 'topics,weeks,singleactivity,social', // Default order for course format plugins.
);
foreach($defaults as $key => $value) {
set_config($key, $value);
}
// Bootstrap mnet
$mnethost = new stdClass();
$mnethost->wwwroot = $CFG->wwwroot;
$mnethost->name = '';
$mnethost->name = '';
$mnethost->public_key = '';
if (empty($_SERVER['SERVER_ADDR'])) {
// SERVER_ADDR is only returned by Apache-like webservers
preg_match("@^(?:http[s]?://)?([A-Z0-9\-\.]+).*@i", $CFG->wwwroot, $matches);
$my_hostname = $matches[1];
$my_ip = gethostbyname($my_hostname); // Returns unmodified hostname on failure. DOH!
if ($my_ip == $my_hostname) {
$mnethost->ip_address = 'UNKNOWN';
} else {
$mnethost->ip_address = $my_ip;
}
} else {
$mnethost->ip_address = $_SERVER['SERVER_ADDR'];
}
$mnetid = $DB->insert_record('mnet_host', $mnethost);
set_config('mnet_localhost_id', $mnetid);
// Initial insert of mnet applications info
$mnet_app = new stdClass();
$mnet_app->name = 'moodle';
$mnet_app->display_name = 'Moodle';
$mnet_app->xmlrpc_server_url = '/mnet/xmlrpc/server.php';
$mnet_app->sso_land_url = '/auth/mnet/land.php';
$mnet_app->sso_jump_url = '/auth/mnet/jump.php';
$moodleapplicationid = $DB->insert_record('mnet_application', $mnet_app);
$mnet_app = new stdClass();
$mnet_app->name = 'mahara';
$mnet_app->display_name = 'Mahara';
$mnet_app->xmlrpc_server_url = '/api/xmlrpc/server.php';
$mnet_app->sso_land_url = '/auth/xmlrpc/land.php';
$mnet_app->sso_jump_url = '/auth/xmlrpc/jump.php';
$DB->insert_record('mnet_application', $mnet_app);
// Set up the probably-to-be-removed-soon 'All hosts' record
$mnetallhosts = new stdClass();
$mnetallhosts->wwwroot = '';
$mnetallhosts->ip_address = '';
$mnetallhosts->public_key = '';
$mnetallhosts->public_key_expires = 0;
$mnetallhosts->last_connect_time = 0;
$mnetallhosts->last_log_id = 0;
$mnetallhosts->deleted = 0;
$mnetallhosts->name = 'All Hosts';
$mnetallhosts->applicationid = $moodleapplicationid;
$mnetallhosts->id = $DB->insert_record('mnet_host', $mnetallhosts, true);
set_config('mnet_all_hosts_id', $mnetallhosts->id);
// Create guest record - do not assign any role, guest user gets the default guest role automatically on the fly
if ($DB->record_exists('user', array())) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Can not create default users, users already exist.');
}
$guest = new stdClass();
$guest->auth = 'manual';
$guest->username = 'guest';
$guest->password = hash_internal_user_password('guest');
$guest->firstname = get_string('guestuser');
$guest->lastname = ' ';
$guest->email = 'root@localhost';
$guest->description = get_string('guestuserinfo');
$guest->mnethostid = $CFG->mnet_localhost_id;
$guest->confirmed = 1;
$guest->lang = $CFG->lang;
$guest->timemodified= time();
$guest->id = $DB->insert_record('user', $guest);
if ($guest->id != 1) {
echo $OUTPUT->notification('Unexpected id generated for the Guest account. Your database configuration or clustering setup may not be fully supported', 'notifyproblem');
}
// Store guest id
set_config('siteguest', $guest->id);
// Make sure user context exists
context_user::instance($guest->id);
// Now create admin user
$admin = new stdClass();
$admin->auth = 'manual';
$admin->firstname = get_string('admin');
$admin->lastname = get_string('user');
$admin->username = 'admin';
$admin->password = 'adminsetuppending';
$admin->email = '';
$admin->confirmed = 1;
$admin->mnethostid = $CFG->mnet_localhost_id;
$admin->lang = $CFG->lang;
$admin->maildisplay = 1;
$admin->timemodified = time();
$admin->lastip = CLI_SCRIPT ? '0.0.0.0' : getremoteaddr(); // installation hijacking prevention
$admin->id = $DB->insert_record('user', $admin);
if ($admin->id != 2) {
echo $OUTPUT->notification('Unexpected id generated for the Admin account. Your database configuration or clustering setup may not be fully supported', 'notifyproblem');
}
if ($admin->id != ($guest->id + 1)) {
echo $OUTPUT->notification('Nonconsecutive id generated for the Admin account. Your database configuration or clustering setup may not be fully supported.', 'notifyproblem');
}
// Store list of admins
set_config('siteadmins', $admin->id);
// Make sure user context exists
context_user::instance($admin->id);
// Install the roles system.
$managerrole = create_role('', 'manager', '', 'manager');
$coursecreatorrole = create_role('', 'coursecreator', '', 'coursecreator');
$editteacherrole = create_role('', 'editingteacher', '', 'editingteacher');
$noneditteacherrole = create_role('', 'teacher', '', 'teacher');
$studentrole = create_role('', 'student', '', 'student');
$guestrole = create_role('', 'guest', '', 'guest');
$userrole = create_role('', 'user', '', 'user');
$frontpagerole = create_role('', 'frontpage', '', 'frontpage');
// Now is the correct moment to install capabilities - after creation of legacy roles, but before assigning of roles
update_capabilities('moodle');
// Default allow role matrices.
foreach ($DB->get_records('role') as $role) {
foreach (array('assign', 'override', 'switch', 'view') as $type) {
$function = "core_role_set_{$type}_allowed";
$allows = get_default_role_archetype_allows($type, $role->archetype);
foreach ($allows as $allowid) {
$function($role->id, $allowid);
}
}
}
// Set up the context levels where you can assign each role.
set_role_contextlevels($managerrole, get_default_contextlevels('manager'));
set_role_contextlevels($coursecreatorrole, get_default_contextlevels('coursecreator'));
set_role_contextlevels($editteacherrole, get_default_contextlevels('editingteacher'));
set_role_contextlevels($noneditteacherrole, get_default_contextlevels('teacher'));
set_role_contextlevels($studentrole, get_default_contextlevels('student'));
set_role_contextlevels($guestrole, get_default_contextlevels('guest'));
set_role_contextlevels($userrole, get_default_contextlevels('user'));
// Init theme, JS and template revisions.
set_config('themerev', time());
set_config('jsrev', time());
set_config('templaterev', time());
// No admin setting for this any more, GD is now required, remove in Moodle 2.6.
set_config('gdversion', 2);
// Install licenses
require_once($CFG->libdir . '/licenselib.php');
license_manager::install_licenses();
// Init profile pages defaults
if ($DB->record_exists('my_pages', array())) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Can not create default profile pages, records already exist.');
}
$mypage = new stdClass();
$mypage->userid = NULL;
$mypage->name = '__default';
$mypage->private = 0;
$mypage->sortorder = 0;
$DB->insert_record('my_pages', $mypage);
$mypage->private = 1;
$DB->insert_record('my_pages', $mypage);
$mycoursespage = new stdClass();
$mycoursespage->userid = null;
$mycoursespage->name = '__courses';
$mycoursespage->private = 0;
$mycoursespage->sortorder = 0;
$DB->insert_record('my_pages', $mycoursespage);
// Set a sensible default sort order for the most-used question types.
set_config('multichoice_sortorder', 1, 'question');
set_config('truefalse_sortorder', 2, 'question');
set_config('match_sortorder', 3, 'question');
set_config('shortanswer_sortorder', 4, 'question');
set_config('numerical_sortorder', 5, 'question');
set_config('essay_sortorder', 6, 'question');
require_once($CFG->libdir . '/db/upgradelib.php');
make_default_scale();
make_competence_scale();
require_once($CFG->dirroot . '/badges/upgradelib.php'); // Core install and upgrade related functions only for badges.
badges_install_default_backpacks();
// Create default core site admin presets.
require_once($CFG->dirroot . '/admin/presets/classes/helper.php');
\core_adminpresets\helper::create_default_presets();
}
+4846
View File
File diff suppressed because it is too large Load Diff
+67
View File
@@ -0,0 +1,67 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Definition of log events associated with the current component
*
* The log events defined on this file are processed and stored into
* the Moodle DB after any install or upgrade operation. All plugins
* support this.
*
* For more information, take a look to the documentation available:
* - Upgrade API: {@link https://moodledev.io/docs/guides/upgrade}
*
* @package core
* @category log
* @copyright 2010 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $DB; // TODO: this is a hack, we should really do something with the SQL in SQL tables
$logs = array(
array('module'=>'course', 'action'=>'user report', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'course', 'action'=>'view', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'view section', 'mtable'=>'course_sections', 'field'=>'name'),
array('module'=>'course', 'action'=>'update', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'hide', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'show', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'move', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'enrol', 'mtable'=>'course', 'field'=>'fullname'), // there should be some way to store user id of the enrolled user!
array('module'=>'course', 'action'=>'unenrol', 'mtable'=>'course', 'field'=>'fullname'), // there should be some way to store user id of the enrolled user!
array('module'=>'course', 'action'=>'report log', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'report live', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'report outline', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'report participation', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'course', 'action'=>'report stats', 'mtable'=>'course', 'field'=>'fullname'),
array('module'=>'category', 'action'=>'add', 'mtable'=>'course_categories', 'field'=>'name'),
array('module'=>'category', 'action'=>'hide', 'mtable'=>'course_categories', 'field'=>'name'),
array('module'=>'category', 'action'=>'move', 'mtable'=>'course_categories', 'field'=>'name'),
array('module'=>'category', 'action'=>'show', 'mtable'=>'course_categories', 'field'=>'name'),
array('module'=>'category', 'action'=>'update', 'mtable'=>'course_categories', 'field'=>'name'),
array('module'=>'message', 'action'=>'write', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'message', 'action'=>'read', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'message', 'action'=>'add contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'message', 'action'=>'remove contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'message', 'action'=>'block contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'message', 'action'=>'unblock contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
array('module'=>'group', 'action'=>'view', 'mtable'=>'groups', 'field'=>'name'),
array('module'=>'tag', 'action'=>'update', 'mtable'=>'tag', 'field'=>'name'),
array('module'=>'tag', 'action'=>'flag', 'mtable'=>'tag', 'field'=>'name'),
array('module'=>'user', 'action'=>'view', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
);
+32
View File
@@ -0,0 +1,32 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Inbound Message Handlers for core.
*
* @package core_message
* @copyright 2014 Andrew NIcols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$handlers = array(
array(
'classname' => '\core\message\inbound\private_files_handler',
'defaultexpiration' => 0,
),
);
+237
View File
@@ -0,0 +1,237 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines message providers (types of messages being sent)
*
* The providers defined on this file are processed and registered into
* the Moodle DB after any install or upgrade operation. All plugins
* support this.
*
* For more information, take a look to the documentation available:
* - Message API: {@link http://docs.moodle.org/dev/Message_API}
* - Upgrade API: {@link https://moodledev.io/docs/guides/upgrade}
*
* @package core
* @category message
* @copyright 2008 onwards Martin Dougiamas http://dougiamas.com
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array (
'newlogin' => array (
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
),
// Notices that an admin might be interested in.
'notices' => array (
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'moodle/site:config',
),
// Important errors that an admin ought to know about.
'errors' => array (
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'moodle/site:config',
),
// Cron-based notifications about available moodle and/or additional plugin updates.
'availableupdate' => array(
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'moodle/site:config',
),
'instantmessage' => array (
'defaults' => array(
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
),
),
'backup' => array (
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'moodle/site:config'
),
// Course creation request notification
'courserequested' => array (
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'moodle/site:approvecourse'
),
// Course request approval notification.
'courserequestapproved' => array (
'capability' => 'moodle/course:request',
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
),
// Course request rejection notification.
'courserequestrejected' => array (
'capability' => 'moodle/course:request',
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
),
// Course completed. Requires course completion configured at course level. It does not work with just activity progress.
'coursecompleted' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
],
// Course content updated. New content (activities or resources) has been created or existing content updated.
'coursecontentupdated' => array (
'defaults' => array(
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
),
),
// Badge award notification to a badge recipient.
'badgerecipientnotice' => array (
'defaults' => array(
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
),
'capability' => 'moodle/badges:earnbadge'
),
// Badge award notification to a badge creator (mostly cron-based).
'badgecreatornotice' => array (
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
),
// A comment was left on a plan.
'competencyplancomment' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
],
// A comment was left on a user competency.
'competencyusercompcomment' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
],
// User insights.
'insights' => array (
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
]
),
// Message contact requests.
'messagecontactrequests' => [
'defaults' => [
// We don't need to notify in the popup output here because the message drawer
// already notifies users of contact requests.
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
]
],
// Asyncronhous backup/restore notifications.
'asyncbackupnotification' => array(
'defaults' => array(
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
)
),
'gradenotifications' => [
'defaults' => array(
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
),
],
// Infected files.
'infected' => array(
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'moodle/site:config',
),
// Report builder schedules.
'reportbuilderschedule' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_FORCED,
],
],
// Task has reached the maximum fail delay.
'failedtaskmaxdelay' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'moodle/site:config',
],
// Course welcome message.
'enrolcoursewelcomemessage' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
],
);
+52
View File
@@ -0,0 +1,52 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This file contains mappings for classes that have been renamed so that they meet the requirements of the autoloader.
*
* Renaming isn't always the recommended approach, but can provide benefit in situations where we've already got a
* close structure, OR where lots of classes get included and not necessarily used, or checked for often.
*
* When renaming a class delete the original class and add an entry to the db/renamedclasses.php directory for that
* component.
* This way we don't need to keep around old classes, instead creating aliases only when required.
* One big advantage to this method is that we provide consistent debugging for renamed classes when they are used.
*
* @package core
* @copyright 2014 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// Like other files in the db directory this file uses an array.
// The old class name is the key, the new class name is the value.
// The array must be called $renamedclasses.
$renamedclasses = [
// Since Moodle 4.1.
'core_admin\\local\\systemreports\\task_logs' => 'core_admin\\reportbuilder\\local\\systemreports\\task_logs',
'core_admin\\local\\entities\\task_log' => 'core_admin\\reportbuilder\\local\\entities\\task_log',
'core_course\\local\\entities\\course_category' => 'core_course\\reportbuilder\\local\\entities\\course_category',
'core_cohort\\local\\entities\\cohort' => 'core_cohort\\reportbuilder\\local\\entities\\cohort',
'core_cohort\\local\\entities\\cohort_member' => 'core_cohort\\reportbuilder\\local\\entities\\cohort_member',
'core_block\\local\\views\\secondary' => 'core_block\\navigation\\views\\secondary',
// Since Moodle 4.2.
'Box\\Spout' => 'OpenSpout',
// Since Moodle 4.3.
'core_question\\bank\\search\\condition' => 'core_question\\local\\bank\\condition',
'core_question\\bank\\search\\category_condition' => 'qbank_managecategories\\category_condition',
'core_question\\bank\\search\\hidden_condition' => 'qbank_deletequestion\\hidden_condition',
];
+3209
View File
File diff suppressed because it is too large Load Diff
+102
View File
@@ -0,0 +1,102 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tag area definitions
*
* File db/tag.php lists all available tag areas in core or a plugin.
*
* Each tag area may have the following attributes:
* - itemtype (required) - what is tagged. Must be name of the existing DB table
* - component - component responsible for tagging, if the tag area is inside a
* plugin the component must be the full frankenstyle name of the plugin
* - collection - name of the custom tag collection that will be used to store
* tags in this area. If specified aministrator will be able to neither add
* any other tag areas to this collection nor move this tag area elsewhere
* - searchable (only if collection is specified) - wether the tag collection
* should be searchable on /tag/search.php
* - showstandard - default value for the "Standard tags" attribute of the area,
* this is only respected when new tag area is added and ignored during upgrade
* - customurl (only if collection is specified) - custom url to use instead of
* /tag/search.php to display information about one tag
* - callback - name of the function that returns items tagged with this tag,
* see core_tag_tag::get_tag_index() and existing callbacks for more details,
* callback should return instance of core_tag\output\tagindex
* - callbackfile - file where callback is located (if not an autoloaded location)
*
* Language file must contain the human-readable names of the tag areas and
* collections (either in plugin language file or in component language file or
* lang/en/tag.php in case of core):
* - for item type "user":
* $string['tagarea_user'] = 'Users';
* - for tag collection "mycollection":
* $string['tagcollection_mycollection'] = 'My tag collection';
*
* @package core
* @copyright 2015 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$tagareas = [
[
'itemtype' => 'user', // Users.
'component' => 'core',
'callback' => 'user_get_tagged_users',
'callbackfile' => '/user/lib.php',
'showstandard' => core_tag_tag::HIDE_STANDARD,
],
[
'itemtype' => 'course', // Courses.
'component' => 'core',
'callback' => 'course_get_tagged_courses',
'callbackfile' => '/course/lib.php',
],
[
'itemtype' => 'question', // Questions.
'component' => 'core_question',
'multiplecontexts' => true,
],
[
'itemtype' => 'post', // Blog posts.
'component' => 'core',
'callback' => 'blog_get_tagged_posts',
'callbackfile' => '/blog/lib.php',
],
[
'itemtype' => 'blog_external', // External blogs.
'component' => 'core',
],
[
'itemtype' => 'course_modules', // Course modules.
'component' => 'core',
'callback' => 'course_get_tagged_course_modules',
'callbackfile' => '/course/lib.php',
],
[
'itemtype' => 'badge', // Badges.
'component' => 'core_badges',
'callback' => 'badge_get_tagged_badges',
'callbackfile' => '/badges/lib.php',
],
[
'itemtype' => 'reportbuilder_report',
'component' => 'core_reportbuilder',
'callback' => 'core_reportbuilder_get_tagged_reports',
'callbackfile' => '/reportbuilder/lib.php',
],
];
+469
View File
@@ -0,0 +1,469 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Definition of core scheduled tasks.
*
* The handlers defined on this file are processed and registered into
* the Moodle DB after any install or upgrade operation. All plugins
* support this.
*
* @package core
* @category task
* @copyright 2013 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/* List of handlers */
$tasks = array(
array(
'classname' => 'core\task\session_cleanup_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\delete_unconfirmed_users_task',
'blocking' => 0,
'minute' => '0',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\delete_incomplete_users_task',
'blocking' => 0,
'minute' => '5',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\backup_cleanup_task',
'blocking' => 0,
'minute' => '10',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\tag_cron_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '3',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\context_cleanup_task',
'blocking' => 0,
'minute' => '25',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\cache_cleanup_task',
'blocking' => 0,
'minute' => '30',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\messaging_cleanup_task',
'blocking' => 0,
'minute' => '35',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\send_new_user_passwords_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\send_failed_login_notifications_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\create_contexts_task',
'blocking' => 1,
'minute' => '0',
'hour' => '0',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\grade_cron_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\grade_history_cleanup_task',
'blocking' => 0,
'minute' => '*',
'hour' => '0',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\completion_regular_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\completion_daily_task',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\portfolio_cron_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\plagiarism_cron_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\calendar_cron_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\blog_cron_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\question_preview_cleanup_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\registration_cron_task',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => 'R',
'month' => '*'
),
array(
'classname' => 'core\task\check_for_updates_task',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\cache_cron_task',
'blocking' => 0,
'minute' => '50',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\automated_backup_task',
'blocking' => 0,
'minute' => '50',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\badges_cron_task',
'blocking' => 0,
'minute' => '*/5',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\badges_message_task',
'blocking' => 0,
'minute' => '*/5',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\file_temp_cleanup_task',
'blocking' => 0,
'minute' => '55',
'hour' => '*/6',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\file_trash_cleanup_task',
'blocking' => 0,
'minute' => '55',
'hour' => '*/6',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\search_index_task',
'blocking' => 0,
'minute' => '*/30',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\search_optimize_task',
'blocking' => 0,
'minute' => '15',
'hour' => '*/12',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\stats_cron_task',
'blocking' => 0,
'minute' => '0',
'hour' => '0',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\password_reset_cleanup_task',
'blocking' => 0,
'minute' => '0',
'hour' => '*/6',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\complete_plans_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\sync_plans_from_template_cohorts_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core_files\task\conversion_cleanup_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '2',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\oauth2\refresh_system_tokens_task',
'blocking' => 0,
'minute' => '30',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\analytics_cleanup_task',
'blocking' => 0,
'minute' => '42',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\task_log_cleanup_task',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\h5p_get_content_types_task',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '1',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\h5p_clean_orphaned_records_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '0',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'core\task\antivirus_cleanup_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '0',
'day' => '*',
'dayofweek' => '*',
'month' => '*',
),
array(
'classname' => 'core_reportbuilder\task\send_schedules',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'month' => '*',
'dayofweek' => '*',
),
[
'classname' => 'core\task\task_lock_cleanup_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '0',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
],
[
'classname' => 'core_xapi\task\state_cleanup_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '0',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
],
[
'classname' => 'core\task\show_started_courses_task',
'blocking' => 0,
'minute' => '00',
'hour' => '01',
'day' => '*',
'dayofweek' => '*',
'month' => '*',
'disabled' => true,
],
[
'classname' => 'core\task\hide_ended_courses_task',
'blocking' => 0,
'minute' => '00',
'hour' => '01',
'day' => '*',
'dayofweek' => '*',
'month' => '*',
'disabled' => true,
],
[
'classname' => 'core_communication\task\synchronise_providers_task',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => 'R',
'month' => '*',
],
[
'classname' => 'core\task\automated_backup_report_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'month' => '*',
'dayofweek' => '*',
],
);
+1212
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff