Skip to content
Snippets Groups Projects
Select Git revision
  • Topic/1124-ApiTokensUI
  • master default protected
  • gitkeep
  • dev protected
  • Issue/2218-updateLinksToDocumentationPage
  • Issue/1913-ModificationsResourceMetadata
  • Sprint/2022-01
  • Hotfix/1911-fixFormatting
  • Sprint/2021-2022
  • Issue/912-rearrangeHeader
  • Sprint/2021-22
  • Issue/1743-changedLink
  • Issue/1659-makeViewCardsALink
  • Sprint/2021-15
  • Product/1573-ReadOnlyResources
  • x/linting
  • Topic/1595-IncludeReadonlyValueInResourcesApp
  • Topic/1531-UseMangmntTableView
  • Product/1548-projectInviteMngmnt
  • Sprint/2021-08
  • Hotfix/1475-projectCreateSpinner
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.0
  • v1.8.1
  • v1.8.0
  • v1.7.0
  • v1.6.2
  • v1.6.1
  • v1.6.0
  • v1.5.0
  • v1.4.1
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.1.0
  • v1.0.0
41 results

shims-tsx.d.ts

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    hook_callbacks.php 1.75 KiB
    <?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/>.
    
    /**
     *
     * @package    local_polaris_dashboard
     * @copyright 2023, Center für Lehr- und Lernservice (CLS), RWTH Aachen University
     * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     */
    
    namespace local_polaris_dashboard;
    
    defined('MOODLE_INTERNAL') || die();
    
    class hook_callbacks {
        /**
         * Workaround to bypass the course navigation override by Moodle version 4+.
         * Is called after the override.
         * An "_extend_course_navigation" function would not allow to add the navigation node in front of the grade-entry.
         * As the local_ladashboard_extend_navigation function works on earlier versions,
         * the branch is checked and the function is aborted if an earlier version than 4 is used.
         */
        static function local_polaris_dashboard_before_html_attributes($attributes) {
            global $PAGE, $CFG;
    
            if ($PAGE->context->contextlevel != CONTEXT_COURSE || ((int)$CFG->branch) < 400) {
                return $attributes;
            }
    
            local_polaris_dashboard_extend_arbitrary_navigation($PAGE->secondarynav);
    
            return $attributes;
        }
    }