-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
17 changed files
with
651 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?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/>. | ||
|
||
/** | ||
* Theme Boost Union - Contact page. | ||
* | ||
* @package theme_boost_union | ||
* @copyright 2022 Alexander Bias, lern.link GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
// Include config.php. | ||
// @codingStandardsIgnoreStart | ||
// Let codechecker ignore the next line because otherwise it would complain about a missing login check | ||
// after requiring config.php which is really not needed. | ||
require(__DIR__ . '/../../../config.php'); | ||
// @codingStandardsIgnoreEnd | ||
|
||
// Require the necessary libraries. | ||
require_once($CFG->dirroot.'/theme/boost_union/lib.php'); | ||
require_once($CFG->dirroot.'/theme/boost_union/locallib.php'); | ||
|
||
// Set page URL. | ||
$PAGE->set_url('/theme/boost_union/pages/contact.php'); | ||
|
||
// Set page layout. | ||
$PAGE->set_pagelayout('standard'); | ||
|
||
// Set page context. | ||
$PAGE->set_context(context_system::instance()); | ||
|
||
// Add page name as body class. | ||
$PAGE->add_body_class('theme_boost_union-contact'); | ||
|
||
// Get theme config. | ||
$config = get_config('theme_boost_union'); | ||
|
||
// If the contact page is disabled, we just show a short friendly warning page and are done. | ||
if ($config->enablecontact != THEME_BOOST_UNION_SETTING_SELECT_YES) { | ||
echo $OUTPUT->header(); | ||
$notification = new \core\output\notification(get_string('contactdisabled', 'theme_boost_union'), | ||
\core\output\notification::NOTIFY_INFO); | ||
$notification->set_show_closebutton(false); | ||
echo $OUTPUT->render($notification); | ||
echo $OUTPUT->footer(); | ||
die; | ||
} | ||
|
||
// Set page title. | ||
$PAGE->set_title(theme_boost_union_get_staticpage_pagetitle('contact')); | ||
|
||
// Start page output. | ||
echo $OUTPUT->header(); | ||
|
||
// Show page heading. | ||
echo $OUTPUT->heading(theme_boost_union_get_staticpage_pagetitle('contact')); | ||
|
||
// Output contact page content. | ||
echo format_text($config->contactcontent); | ||
|
||
// Finish page. | ||
echo $OUTPUT->footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?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/>. | ||
|
||
/** | ||
* Theme Boost Union - Help page. | ||
* | ||
* @package theme_boost_union | ||
* @copyright 2022 Alexander Bias, lern.link GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
// Include config.php. | ||
// @codingStandardsIgnoreStart | ||
// Let codechecker ignore the next line because otherwise it would complain about a missing login check | ||
// after requiring config.php which is really not needed. | ||
require(__DIR__ . '/../../../config.php'); | ||
// @codingStandardsIgnoreEnd | ||
|
||
// Require the necessary libraries. | ||
require_once($CFG->dirroot.'/theme/boost_union/lib.php'); | ||
require_once($CFG->dirroot.'/theme/boost_union/locallib.php'); | ||
|
||
// Set page URL. | ||
$PAGE->set_url('/theme/boost_union/pages/help.php'); | ||
|
||
// Set page layout. | ||
$PAGE->set_pagelayout('standard'); | ||
|
||
// Set page context. | ||
$PAGE->set_context(context_system::instance()); | ||
|
||
// Add page name as body class. | ||
$PAGE->add_body_class('theme_boost_union-help'); | ||
|
||
// Get theme config. | ||
$config = get_config('theme_boost_union'); | ||
|
||
// If the help page is disabled, we just show a short friendly warning page and are done. | ||
if ($config->enablehelp != THEME_BOOST_UNION_SETTING_SELECT_YES) { | ||
echo $OUTPUT->header(); | ||
$notification = new \core\output\notification(get_string('helpdisabled', 'theme_boost_union'), | ||
\core\output\notification::NOTIFY_INFO); | ||
$notification->set_show_closebutton(false); | ||
echo $OUTPUT->render($notification); | ||
echo $OUTPUT->footer(); | ||
die; | ||
} | ||
|
||
// Set page title. | ||
$PAGE->set_title(theme_boost_union_get_staticpage_pagetitle('help')); | ||
|
||
// Start page output. | ||
echo $OUTPUT->header(); | ||
|
||
// Show page heading. | ||
echo $OUTPUT->heading(theme_boost_union_get_staticpage_pagetitle('help')); | ||
|
||
// Output help page content. | ||
echo format_text($config->helpcontent); | ||
|
||
// Finish page. | ||
echo $OUTPUT->footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.