-
Notifications
You must be signed in to change notification settings - Fork 5
/
settings.php
executable file
·61 lines (56 loc) · 1.89 KB
/
settings.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
<?php
// This file is part of Credly's Acclaim Moodle Block Plugin
//
// Credly's Acclaim Moodle Block Plugin is free software: you can redistribute it
// and/or modify it under the terms of the MIT license as published by
// the Free Software Foundation.
//
// This script 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
// MIT License for more details.
//
// You can find the GNU General Public License at <https://opensource.org/licenses/MIT>.
/**
* Credly's Acclaim Moodle Block Plugin
* Credly: http://credly.com
* Moodle: http://moodle.org/
*
* @package block_acclaim
* @copyright 2020 Credly, Inc. <http://credly.com>
* @license https://opensource.org/licenses/MIT
*/
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
$urls = array(
'https://api.credly.com/v1' => get_string('production', 'block_acclaim'),
'https://sandbox-api.credly.com/v1' => get_string('sandbox', 'block_acclaim')
);
$settings->add(
new admin_setting_configselect(
'block_acclaim/url',
get_string('setting_domain', 'block_acclaim'),
null,
array_keys($urls)[0],
$urls
)
);
$settings->add(
new admin_setting_configtext(
'block_acclaim/org',
get_string('setting_org_id', 'block_acclaim'),
get_string('setting_org_help', 'block_acclaim', '6bb2e1c7-c66b-4d47-9301-4a6b9e792e2c'),
'',
PARAM_TEXT
)
);
$settings->add(
new admin_setting_configtext(
'block_acclaim/token',
get_string('setting_app_token', 'block_acclaim'),
get_string('setting_app_token_help', 'block_acclaim', 'FZ9QZ4sDtEwNR7Tcv-Yi'),
'',
PARAM_TEXT
)
);
}