forked from France-ioi/AlgoreaPlatform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
100 lines (94 loc) · 3.34 KB
/
config.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
<?php
$config = (object) array(
"db" => (object) array(
"host" => "localhost",
"database" => "franceioi",
"user" => "",
"password" => "",
"logged" => false
),
"platform" => (object) array(
"name" => "http://algorea.pem.dev",
"private_key" => "",
"public_key" => ""
),
"debug" => (object) array(
"timers" => false,
"types" => array(),
),
"login" => (object) array(
"public_key" => ""
),
"login_module_client" => array(),
"sync" => (object) array(
"server" => "",
"params" => (object) array( ),
"useTransaction" => false,
"maxChanges" => 20000,
"memLimit" => '',
"debug" => false
),
"shared" => (object) array(
"RootItemId" => "1",
"RootGroupId" => "1",
"RootSelfGroupId" => "2",
"RootAdminGroupId" => "3",
"RootTempGroupId" => "4",
"OrphanedRootItemId" => "5",
"loginUrl" => "https://loginaws.algorea.org/login.html",
"timezone" => ini_get('date.timezone'),
"acceptLanguage" => isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '',
"domains" => array( // global root
"current" => (object) array( // domain-specific root. All config is read from "current", implement your own mechanism to make it point to the data you want to according to the domain
"defaultLanguage" => 'fr',
"forceDefaultLanguage" => false, // Use default language instead of browser language
"defaultAngularLocale" => 'fr-fr',
"customStringsName" => '',
"title" => 'Change title here',
"taglineHtml" => "Pour convertir ses idées<br>en applications numériques",
"animationHtmlFile" => null,
"usesLeftNavigation" => false,
"baseUrl" => "http://localhost",
"assetsBaseUrl" => "http://localhost",
"compiledMode" => false,
"domain" => 'domain name, optional',
"defaultPath" => '/contents/4022/4023',
"usesForum" => true,
"additionalCssUrl" => 'additional css url',
"ProgressRootItemId" => "2",
"OfficialProgressItemId" => "21",
"OfficialProgressItemSonId" => "22",
"CustomProgressItemId" => "23",
"DiscoverRootItemId" => "3",
"DiscoverRootSonItemId" => "31",
"ContestRootItemId" => "4",
"CustomContestRootItemId" => "41",
"OfficialContestRootItemId" => "42",
"additionalLoginArgs" => "",
)
)
)
);
// Tabs
$config->shared->domains['current']->tabs[0] = array(
'title' => 'menu_discover',
'path' => '4022/4023',
'icon' => 'explore'
);
$config->shared->domains['current']->tabs[1] = array(
'title' => 'menu_progress',
'path' => '4026/4021',
'icon' => 'trending_up'
);
$config->shared->domains['current']->tabs[2] = array(
'title' => 'menu_forum',
'path' => 'forum',
'icon' => 'group'
);
if (is_readable(__DIR__.'/config_local.php')) {
include_once __DIR__.'/config_local.php';
}
date_default_timezone_set($config->shared->timezone);
if(!$config->platform->private_key) {
die('Config error. Platform private_key missed.');
}