-
Notifications
You must be signed in to change notification settings - Fork 0
/
settingslib.php
executable file
·59 lines (49 loc) · 1.29 KB
/
settingslib.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
<?php
/**
* Library for customized admin config objects
*
* @author Andre Scherl
* @version 1.0 - 04.02.2011
* @package DASIS -> Case Repository
*
* Copyright (C) 2011, Andre Scherl
* You should have received a copy of the GNU General Public License
* along with DASIS. If not, see <http://www.gnu.org/licenses/>.
*/
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page.
}
/**
* class to parse html strings
*/
class admin_setting_myhtml extends admin_setting {
public function __construct($name, $visiblename, $description, $html) {
parent::__construct($name, $visiblename, $description, null);
$this->html = $html;
}
/**
* Always returns true
* @return bool Always returns true
*/
public function get_setting() {
return true;
}
/**
* Always returns true
* @return bool Always returns true
*/
public function get_defaultsetting() {
return true;
}
/**
* Never write settings
* @return string Always returns an empty string
*/
public function write_setting($data) {
// do not write any setting
return '';
}
public function output_html() {
return $this->html;
}
}