X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/mod/quiz/accessrule/seb/classes
home
/
cbholdings
/
pasukulu
/
mod
/
quiz
/
accessrule
/
seb
/
classes
/
📁
..
📄
config_key.php
(2.83 KB)
📁
event
📁
external
📄
helper.php
(4.34 KB)
📄
hideif_rule.php
(2.96 KB)
📄
link_generator.php
(2.1 KB)
📁
local
📁
privacy
📄
property_list.php
(16.13 KB)
📄
seb_access_manager.php
(12.64 KB)
📄
seb_quiz_settings.php
(22.11 KB)
📄
settings_provider.php
(42.04 KB)
📄
template.php
(3.84 KB)
📄
template_controller.php
(10.05 KB)
Editing: link_generator.php
<?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/>. /** * Generate the links to open/download the Safe Exam Browser with correct settings. * * @package quizaccess_seb * @author Andrew Madden <andrewmadden@catalyst-au.net> * @copyright 2019 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace quizaccess_seb; use moodle_url; defined('MOODLE_INTERNAL') || die(); /** * Generate the links to open/download the Safe Exam Browser with correct settings. * * @copyright 2020 Catalyst IT * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class link_generator { /** * Get a link to force the download of the file over https or sebs protocols. * * @param string $cmid Course module ID. * @param bool $seb Whether to use a seb:// scheme or fall back to http:// scheme. * @param bool $secure Whether to use HTTPS or HTTP protocol. * @return string A URL. */ public static function get_link(string $cmid, bool $seb = false, bool $secure = true) : string { // Check if course module exists. get_coursemodule_from_id('quiz', $cmid, 0, false, MUST_EXIST); $url = new moodle_url('/mod/quiz/accessrule/seb/config.php?cmid=' . $cmid); if ($seb) { $secure ? $url->set_scheme('sebs') : $url->set_scheme('seb'); } else { $secure ? $url->set_scheme('https') : $url->set_scheme('http'); } return $url->out(); } }
Upload File
Create Folder