-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathconfig.php
More file actions
311 lines (245 loc) · 12.5 KB
/
Copy pathconfig.php
File metadata and controls
311 lines (245 loc) · 12.5 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<?php
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////////////////////////////////// \//////////////////////////////////
///////////////////////////////// \/////////////////////////////////
//////////////////////////////// \////////////////////////////////
///////////////////////////////\ /////////////////////////////////
////////////////////////////////\ //////////////////////////////////
////////////////////\ \///\ ///// /////////////////////
/////////////////////\ \////// //////////////////////
//////////////////////\ \//// ///////////////////////
/////////////////////////\ \// //////////////////////////
///////////////////////////////////// //////////////////////////////////
///////////////////////////////////// ////////////////////////////////////
///////////////////////////////////// ////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
///////////////////////// Totara Docker Dev //////////////////////////
///////////// https://github.com/totara/totara-docker-dev //////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// Firstly, set up some docker-dev specific variables (must be at the start!)
// See https://github.com/totara/totara-docker-dev/blob/master/php/includes/config-before.php
$DOCKER_DEV = new stdClass();
$DOCKER_DEV->dir = __DIR__;
require '/var/www/totara/includes/config-before.php';
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////// //////
////// Main Site Database & Dataroot Configuration //////
////// //////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
/** PostgresSQL */
$CFG->dbhost = 'pgsql16'; // See https://github.com/totara/totara-docker-dev/wiki/Database%20Credentials for other versions
$CFG->dbtype = 'pgsql';
$CFG->dbuser = 'postgres';
$CFG->dbpass = '';
/** MySQL */
//$CFG->dbhost = 'mysql84'; // See https://github.com/totara/totara-docker-dev/wiki/Database%20Credentials for other versions
//$CFG->dbtype = 'mysqli';
//$CFG->dbuser = 'root';
//$CFG->dbpass = 'root';
/** MariaDB */
//$CFG->dbhost = 'mariadb1108'; // See https://github.com/totara/totara-docker-dev/wiki/Database%20Credentials for other versions
//$CFG->dbtype = 'mariadb';
//$CFG->dbuser = 'root';
//$CFG->dbpass = 'root';
/** Microsoft SQL Server */
//$CFG->dbhost = 'mssql2022'; // See https://github.com/totara/totara-docker-dev/wiki/Database%20Credentials for other versions
//$CFG->dbtype = PHP_MAJOR_VERSION >= 7 ? 'sqlsrv' : 'mssql'; // In PHP 7+ it is called 'sqlsrv' instead of 'mssql'.
//$CFG->dbuser = 'SA';
//$CFG->dbpass = 'Totara.Mssql1';
/**
* By default, the site database name is simply the name of the subdirectory you have your site in,
* or just 'totara' if you only have a single site. It can be accessed by using the `tdb` command.
*
* If you want to use a specific database for your site, set it here.
*/
$CFG->dbname = $DOCKER_DEV->site_name;
//$CFG->dbname = 'my_totara_db';
/**
* Every table in the site database will be prefixed with this.
* 'ttr_' and 'mdl_' are the most commonly used prefixes.
*
* Pro Tip: You can set the prefix to be the same as what is used for behat for extra debugging power while a scenario is paused.
*/
$CFG->prefix = 'ttr_';
//$CFG->prefix = 'mdl_';
//$CFG->prefix = 'bht_';
$CFG->directorypermissions = 02777;
/**
* Dataroot: For storing uploaded files, temporary and cache files, and other miscellaneous files created by Totara.
*/
$CFG->dataroot = "/var/www/totara/data/{$DOCKER_DEV->site_name}.{$CFG->dbhost}";
//$CFG->dataroot = '/var/www/totara/data/totara13.pgsql13';
//$CFG->dataroot = '/var/www/totara/data/mobile.mysql';
//$CFG->dataroot = '/var/www/totara/data/engage.mssql';
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////// //////
////// PHPUnit Configuration //////
////// //////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
/**
* Can either use the same database as the main site for PHPUnit,
* or a different database can be used (generally makes tests more stable)
*/
$CFG->phpunit_dbname = $CFG->dbname;
//$CFG->phpunit_dbname = 'unt_' . $CFG->dbname;
//$CFG->phpunit_dbname = 'totaraphpunit';
/**
* You shouldn't really need to change this.
*/
$CFG->phpunit_prefix = 'phpu_';
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////// //////
////// Behat Configuration //////
////// //////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
/**
* If false, then a behat config will be generated using selenium-chrome-debug, meaning you can view the pages being tested via VNC.
* If true, then multiple behat profiles will be generated, using selenium-hub,
* so you can run behat scenarios in parallel (faster. although you lose the ability to view it running)
*
* See https://github.com/totara/totara-docker-dev/wiki/Behat for more info on running behat in parallel/viewing it with VNC.
*/
$DOCKER_DEV->behat_parallel = false;
/**
* How many behat processes to run simultaneously if behat_parallel is set to true.
*/
//$DOCKER_DEV->behat_parallel_count = 2;
$DOCKER_DEV->behat_parallel_count = 4;
//$DOCKER_DEV->behat_parallel_count = 8;
/**
* By default, the behat database name is simply the name of the subdirectory you have your site in,
* or just 'totara' if you only have a single site. It can be accessed by using the `tdb` command.
*
* If you want to use a specific database for behat, set it here.
*/
$CFG->behat_dbname = $CFG->dbname;
/**
* You shouldn't really need to change this.
*/
$CFG->behat_prefix = 'bht_';
/**
* Saves screenshots of what exactly failed on the last behat run.
* You can add this directory to the .git/info/exclude file in your Totara site, so it doesn't get committed accidentally.
*/
//$CFG->behat_faildump_path = __DIR__ . '/screenshots';
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////// //////
////// Development Mode Settings //////
////// //////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
$development_mode = true;
if ($development_mode) {
$CFG->sitetype = 'development';
if (PHP_MAJOR_VERSION >= 8) {
@error_reporting(E_ALL);
$CFG->debug = E_ALL;
} else {
// STRICT error level is only used before PHP 8
// avoid string search for constant name in server/index.php
$estrict = constant('E_' . 'STRICT');
@error_reporting(E_ALL | $estrict);
$CFG->debug = (E_ALL | $estrict);
}
@ini_set('display_errors', '1');
$CFG->debugdisplay = 1;
$CFG->perfdebug = 15;
define('GRAPHQL_DEVELOPMENT_MODE', true);
// $CFG->legacyadminsettingsmenu = true;
$CFG->debugallowscheduledtaskoverride = true;
$CFG->preventexecpath = false;
$CFG->mobile_device_emulator = true;
// Useful when changing or creating language string lookups, so
// that your changes are reflecting in the UI
$CFG->langstringcache = false;
// Helps to identify potentially missing or incorrectly named
// language strings in the UI
$CFG->debugstringids = false;
// Allow URL query parameter to change the current system Theme for
// the current session, handy for qualifying if changes or issues
// exist across different Themes
$CFG->allowthemechangeonurl = true;
// Theme designer mode useful for individual *legacy only* Theme file
// debugging by breaking out many Theme dependency files into separate
// <head /> entries. This creates many requests, and significantly
// degrades page load and readiness performance. Don't use this for
// Tui-only development
$CFG->themedesignermode = false;
// Un-cache legacy-only front end dependencies
$CFG->cachejs = false;
$CFG->cachetemplates = false;
// When working with YUI, you may need to disable PHP combo loading
// of dependency files for easier debugging
$CFG->yuicomboloading = false;
$CFG->yuiloglevel = 'debug';
// When you expect fresh data from GraphQL, disable the cache,
// otherwise expect an increase to page load and readiness times
//
// Disabling caching of the GraphQL schema has a serious performance impact
// thus we keep it enabled by default.
// Either purge caches if needed or uncomment the following line if needed.
// $CFG->cache_graphql_schema = false;
// Tui-specific settings to turn off performance optimisations
// during development. They do similar things to the legacy-only
// settings, and can be turned off when not changing Tui code
$CFG->forced_plugin_settings['totara_tui'] = [
'cache_js' => false,
'cache_scss' => false,
'development_mode' => true
];
// External API debug mode
$CFG->forced_plugin_settings['totara_api'] = [
'response_debug' => 2, // 0 = None, 1 = Normal, 2 = Developer
];
// Xhprof Profiling settings
// $CFG->profilingenabled = true;
// $CFG->profilingincluded = '*';
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////// //////
////// Extras / Miscellaneous //////
////// //////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
$CFG->passwordpolicy = false;
$CFG->tool_generator_users_password = '12345';
$CFG->upgradekey = '';
$CFG->country = 'NZ';
$CFG->defaultcity = 'Wellington'; // very windy!
if ($DOCKER_DEV->major_version >= 13) {
// $CFG->forceflavour = 'learn';
// $CFG->forceflavour = 'learn_professional';
// $CFG->forceflavour = 'engage';
// $CFG->forceflavour = 'learn_engage';
// $CFG->forceflavour = 'learn_perform';
// $CFG->forceflavour = 'perform_engage';
$CFG->forceflavour = 'learn_perform_engage';
} else {
// For Totara versions earlier than 13, the enterprise flavour must be set
$CFG->forceflavour = 'enterprise';
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////// //////
////// Your Custom Config //////
////// //////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// Add config specific to your site / development env here!
// Finally, include docker-dev specific config
// See https://github.com/totara/totara-docker-dev/blob/master/php/includes/config-after.php
require '/var/www/totara/includes/config-after.php';
// If you need to override any docker-dev specific config, you can do it here.
// This must be the last thing in the config.
file_exists($DOCKER_DEV->dir . '/lib/setup.php') && require_once $DOCKER_DEV->dir . '/lib/setup.php';
// DO NOT ADD ANYTHING AFTER THIS LINE