12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?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/>.
- /**
- * local_olimp_reports file description here.
- *
- * @package local_olimp_reports
- * @copyright 2022 alex sidorov <alex.sidorof@ya.ru>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
- /**
- * Display the list Teachers in the course menu.
- *
- * @param settings_navigation $navigation The settings navigation object
- * @param stdClass $course The course
- * @param context $context Course context
- */
- function local_olimp_reports_extend_navigation_course($navigation, $course, $context) {
- global $PAGE;
- if(($context->contextlevel === 50) &&
- has_capability('gradereport/grader:view', $context)){
- $certificatenode = $navigation->add(get_string('pluginname', 'local_olimp_reports'),
- null, navigation_node::TYPE_CONTAINER, null, 'tool_certificate');
- $url = new moodle_url('/local/olimp_reports/reports_cert_and_dip.php', ['courseid' => $course->id]);
- $certificatenode->add(get_string('reports_olimp', 'local_olimp_reports'), $url, navigation_node::TYPE_SETTING,
- null, 'local_olimp_reports');
- }
- }
|