-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtsugi_settings.php
More file actions
81 lines (66 loc) · 2.09 KB
/
Copy pathtsugi_settings.php
File metadata and controls
81 lines (66 loc) · 2.09 KB
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
<?php
/**
* These are some configuration variables that are not secure / sensitive
*
* This file is included at the end of tsugi/config.php
*/
// This is how the system will refer to itself.
$CFG->servicename = 'PY4E';
$CFG->servicedesc = 'Python for Everybody';
// Default theme
$CFG->context_title = "Python for Everybody";
$CFG->tool_folders = array("admin", "../tools", "../mod", "tool");
$CFG->youtube_playlist = 'PLlRFEj9H3Oj7Bp8-DfGpfAfDBiblRfl5p';
$CFG->giftquizzes = $CFG->dirroot.'/../py4e-private/quiz';
$CFG->sessionlifetime = 18*60*60; // 18 hours
$CFG->setExtension('vhost', array(
'suffixes' => array('py4e.com'),
'site_root' => dirname($CFG->dirroot),
'vhosts' => array(
'www' => array(
'apphomes' => array(
'https://local.py4e.com',
'https://www.py4e.com',
'https://py4e.com',
),
),
'ai' => array(
'apphomes' => array(
'https://ai.local.py4e.com',
'https://ai.py4e.com',
),
'dir' => 'site-ai',
),
'labs' => array(
'apphomes' => array(
'https://labs.local.py4e.com',
'https://labs.py4e.com',
),
'dir' => 'site-labs',
),
),
));
$CFG->lessons = $CFG->dirroot.'/../lessons.json';
if ( $CFG->vhostUsesVhostUrls() ) {
$CFG->applyVhostHostUrls();
}
$CFG->applyVhostVariantConfig();
$CFG->youtube_url = $CFG->apphome . '/mod/youtube/';
$CFG->tdiscus = $CFG->wwwroot . '/tool/tdiscus/';
$CFG->google_login_redirect = $CFG->apphome . "/login";
$CFG->setExtension('premium', array(
'supporter_url' => $CFG->apphome . '/support',
'price' => '$15.00 USD',
'premium_months' => 12,
'refund_policy' => 'There are no refunds.',
'premium_provider' => 'stripe'
));
$CFG->top_menu_callback = function() {
global $CFG;
$buildmenu = $CFG->getVhostSiteFile('buildmenu.php');
if ( ! is_string($buildmenu) || ! file_exists($buildmenu) ) {
return false;
}
require_once $buildmenu;
return buildMenu();
};