-
Notifications
You must be signed in to change notification settings - Fork 20
/
cmanager_confighome.php
executable file
·120 lines (89 loc) · 3.84 KB
/
cmanager_confighome.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
// ---------------------------------------------------------
// block_cmanager 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.
//
// block_cmanager 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/>.
//
// COURSE REQUEST MANAGER BLOCK FOR MOODLE
// by Kyle Goslin & Daniel McSweeney
// Copyright 2012-2018 - Institute of Technology Blanchardstown.
// ---------------------------------------------------------
/**
* COURSE REQUEST MANAGER
*
* @package block_cmanager
* @copyright 2018 Kyle Goslin, Daniel McSweeney
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once("../../config.php");
require_once("$CFG->libdir/formslib.php");
require_login();
/** Navigation Bar **/
$PAGE->navbar->ignore_active();
$PAGE->navbar->add(get_string('cmanagerDisplay', 'block_cmanager'), new moodle_url('/blocks/cmanager/cmanager_admin.php'));
$PAGE->navbar->add(get_string('configurecoursemanagersettings', 'block_cmanager'));
$PAGE->set_url('/blocks/cmanager/block_cmanager_confighome.php');
$PAGE->set_context(context_system::instance());
$PAGE->set_heading(get_string('pluginname', 'block_cmanager'));
$PAGE->set_title(get_string('pluginname', 'block_cmanager'));
echo $OUTPUT->header();
$context = context_system::instance();
if (has_capability('block/cmanager:viewconfig',$context)) {
} else {
print_error(get_string('cannotviewconfig', 'block_cmanager'));
}
/**
* Config home
*
* Listing of config options
* @package block_cmanager
* @copyright 2018 Kyle Goslin, Daniel McSweeney
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class block_cmanager_confighome_form extends moodleform {
function definition() {
$mform =& $this->_form; // Don't forget the underscore!
$mform->addElement('header', 'mainheader', '<span style="font-size:18px">'. get_string('configurecoursemanagersettings','block_cmanager'). '</span>');
$mainSlider = "
<p></p>
<table style=\"width:100%; \">
<tr>
<td style=\"padding:25px; width:30px\"><img src=\"icons/config/admin.png\"></td>
<td><b><a href=\"cmanager_adminsettings.php\">".get_string('configureadminsettings','block_cmanager')."</a></b><br>".get_string('configureadminsettings_desc','block_cmanager')."</td>
</tr>
<tr>
<td style=\"padding:25px; width:30px\"><img src=\"icons/config/email.png\"></td>
<td><b><a href=\"cmanager_config.php\">".get_string('configureemailsettings','block_cmanager')."</a></b><br>".get_string('configureemailsettings_desc','block_cmanager')."</td>
</tr>
<tr>
<td style=\"padding:25px; width:30px\"><img src=\"icons/config/config1.png\"> </td>
<td><b><a href=\"formeditor/page1.php\">".get_string('configurecourseformfields','block_cmanager')."</a></b><br>".get_string('configure_instruction2','block_cmanager')."</td>
</tr>
<tr>
<td style=\"padding:25px; width:30px\"><img src=\"icons/config/config2.png\"></td>
<td><b><a href=\"formeditor/form_builder.php\">".get_string('informationform','block_cmanager')."</a></b><br>".get_string('configure_instruction3','block_cmanager')."
</td>
</tr>
</table>";
$mform->addElement('html', $mainSlider);
} // Close the function
} // Close the class
$mform = new block_cmanager_confighome_form();
if ($mform->is_cancelled()) {
}
else if ($fromform=$mform->get_data()) {
}
else {
$mform->focus();
$mform->display();
echo $OUTPUT->footer();
}