PageRenderTime 46ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/lib/config-defaults.php

https://gitlab.com/mahara/mahara
PHP | 854 lines | 60 code | 83 blank | 711 comment | 0 complexity | 4dee02b247d05ea09bd5e9e4812258b1 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, MIT, LGPL-2.1, LGPL-3.0, GPL-3.0
  1. <?php
  2. /**
  3. *
  4. * @package mahara
  5. * @subpackage core
  6. * @author Catalyst IT Ltd
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
  8. * @copyright For copyright information on Mahara, please see the README file distributed with this software.
  9. *
  10. */
  11. /**
  12. * CONFIGURATION DEFAULTS
  13. *
  14. * Do Not Edit This File!
  15. *
  16. * If you see a setting in here you'd like to change, copy it to your
  17. * config.php and change it there.
  18. *
  19. * This file sets defaults that are useful for most people.
  20. */
  21. $cfg = new stdClass();
  22. /**
  23. * @global int $cfg->directorypermissions what permissions to use for files and directories in
  24. * dataroot. The default allows only the web server user to read the data. If
  25. * you're on shared hosting and might want to download the contents of your
  26. * dataroot later (e.g. for backup purposes), set this to 0755. Otherwise,
  27. * leave it as is!
  28. */
  29. //$cfg->directorypermissions = 0700;
  30. /**
  31. * @global bool $cfg->insecuredataroot whether to enforce checking that files being served have
  32. * come from dataroot. You would only want to turn this on if you were running
  33. * more than one Mahara against the same dataroot. If you are doing that, make
  34. * sure you create separate dataroots for each installation, but symlink the
  35. * artefact directory from all of them to one of them, and turn on
  36. * 'insecuredataroot' on all the ones you created symlinks for.
  37. *
  38. * If you don't know what you're doing/didn't understand the paragraph above,
  39. * then leave this setting alone!
  40. */
  41. //$cfg->insecuredataroot = false;
  42. /**
  43. * @global string $cfg->noreplyaddress system mail address. emails out come from this address.
  44. * if not specified, will default to noreply@ automatically detected host.
  45. * if that doesn't work or you want something else, then specify it here.
  46. */
  47. // $cfg->noreplyaddress = 'noreply@myhost.com';
  48. /**
  49. * Logging configuration
  50. * @global int $cfg->log_dbg_targets Where to log debugging messages
  51. * @global int $cfg->log_info_targets Where to log informational messages
  52. * @global int $cfg->log_warn_targets Where to log warnings
  53. * @global int $cfg->log_environ_targets Where to log environment errors
  54. * For each log level, you can specify where the messages are displayed.
  55. *
  56. * LOG_TARGET_SCREEN makes the error messages go to the screen - useful
  57. * when debugging but not on a live site!
  58. * LOG_TARGET_ADMIN sends error messages to the screen but only when
  59. * browsing in the admin section
  60. * LOG_TARGET_ERRORLOG makes the error messages go to the log as specified
  61. * by the apache ErrorLog directive. It's probably useful to have this on
  62. * for all log levels.
  63. * LOG_TARGET_FILE allows you to specify a file that messages will be logged
  64. * to. It's best to pick a path in dataroot, but note that logfiles tend to get
  65. * very large over time - so it's advisable to implement some kind of logrotate
  66. * if you want to leave this on all the time. The other option is to just turn
  67. * this on when you are getting some kind of error or want to see the logging,
  68. * and know that you're not going to let the logfile get large.
  69. *
  70. * You can combine the targets with bitwise operations,
  71. * e.g. LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG
  72. *
  73. * This configuration is suitable for people running Mahara for the first
  74. * time. You will immediately see environment errors, and so can correct
  75. * them. You will be able to see other debugging information in your error
  76. * logs. Once your site is up and running you might want to remove the
  77. * environment level logging completely, and just log everything else to
  78. * the error log.
  79. */
  80. $cfg->log_dbg_targets = LOG_TARGET_ERRORLOG;
  81. $cfg->log_info_targets = LOG_TARGET_ERRORLOG;
  82. $cfg->log_warn_targets = LOG_TARGET_ERRORLOG;
  83. $cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
  84. /**
  85. * This configuration is suitable for developers. You will see all errors
  86. * and they will also be in the logs.
  87. */
  88. //$cfg->log_dbg_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
  89. //$cfg->log_info_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
  90. //$cfg->log_warn_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
  91. //$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
  92. /**
  93. * @global string $cfg->log_file: If you use LOG_TARGET_FILE, this is the file that errors will be logged to.
  94. * By default, it will write to the file 'error.log' under dataroot. If you
  95. * change this in config.php, make sure you use a folder which is writable by
  96. * the webserver.
  97. */
  98. // $cfg->log_file = '/path/to/dataroot/error.log';
  99. /**
  100. * @global int $cfg->log_backtrace_levels The log levels that will generate backtraces. Useful for development,
  101. * but probably only warnings are useful on a live site.
  102. */
  103. $cfg->log_backtrace_levels = LOG_LEVEL_WARN | LOG_LEVEL_ENVIRON;
  104. /**
  105. * @global boolean $cfg->log_backtrace_print_args Whether or not to print the values of function & method
  106. * arguments when printing a backtrace. This can be useful for debugging, but it is a mild security risk,
  107. * because function parameters may include sensitive data such as passwords and private keys. (Though
  108. * arguments whose names suggest that they contain passwords, will still be blanked out even if this
  109. * feature is enabled.)
  110. *
  111. * A NULL value here tells Mahara to hide argument values when $cfg->productionmode is enabled, and to
  112. * show them otherwise. A TRUE or FALSE tells Mahara to always show/hide argument values in backtraces
  113. * regardless of the value of $cfg->productionmode.
  114. */
  115. $cfg->log_backtrace_print_args = null;
  116. /**
  117. * @global int $cfg->error_reporting What level of errors to print to the Mahara logs. Gets passed directly
  118. * to the PHP function "error_reporting()".
  119. *
  120. * NOTE: There are some limitations in this method, because it doesn't get called until several scripts
  121. * have already been compiled: init.php, config.php, config-defaults.php, errors.php, and the file directly
  122. * invoked in the URL. So, compile-time errors in those files (which includes most strict errors) will be
  123. * unaffected by this setting.
  124. */
  125. $cfg->error_reporting = E_ALL & ~E_STRICT;
  126. /**
  127. * @global int|bool $cfg->developermode Developer mode
  128. * When set, the following things (among others) will happen:
  129. *
  130. * * 'debug.css' will be included on each page. You can edit this file to add
  131. * debugging CSS at your discretion
  132. * * the unpacked version of MochiKit will be used
  133. *
  134. * These options are a performance hit otherwise, enable when you are
  135. * developing for Mahara
  136. */
  137. $cfg->developermode = false;
  138. // $cfg->developermode = DEVMODE_DEBUGCSS | DEVMODE_UNPACKEDJS;
  139. /**
  140. * @global bool $cfg->sendemail Whether to send e-mail. If set to false, Mahara will not send any e-mail at
  141. * all. This is useful for when setting up development versions of Mahara where
  142. * you don't want to accidentally send email to users from this particular
  143. * Mahara installation.
  144. */
  145. $cfg->sendemail = true;
  146. /**
  147. * @global string $cfg->sendallemailto You can use sendallemailto to have all e-mails from this instance of Mahara
  148. * sent to one particular address instead of where they're aimed for. Leave
  149. * sendemail = true if you want to use this setting.
  150. */
  151. // $cfg->sendallemailto = 'you@example.com';
  152. /**
  153. * @global string $cfg->emaillog Log basic details of emails sent out by Mahara. Must be writable by the
  154. * webserver user. This will get big.
  155. */
  156. // $cfg->emaillog = '/path/to/dataroot/email.log';
  157. /**
  158. * @global bool $cfg->perftolog capture performance information and print it
  159. * @global bool $cfg->perftofoot needs a call to mahara_performance_info (smarty callback) - see default theme's footer.tpl
  160. * if neither are set, performance info wont be captured.
  161. */
  162. // $cfg->perftolog = true;
  163. // $cfg->perftofoot = true;
  164. /**
  165. * Mail handling
  166. *
  167. * Unless you have a specific reason for having mail settings in the config file,
  168. * please use Configure Site -> Site options -> Email interface.
  169. *
  170. * @global string $cfg->smpthosts If you want mahara to use SMTP servers to send mail, enter one or more here
  171. * blank means mahara will use the default PHP method.
  172. */
  173. // $cfg->smtphosts = 'smtp1.example.com;smtp2.example.com';
  174. /**
  175. * @global int $cfg->smtpport If smtp server uses port number different from 25 (e.g. for secure connections,
  176. * port 465 is usually used with ssl, port 587 is usually used with tls),
  177. * specify it below. Alternatively you may specify the port in smtphosts
  178. * definition above using format [hostname:port] (e.g. 'smtp1.example.com:465').
  179. */
  180. // $cfg->smtpport = 25;
  181. /**
  182. * @global string $cfg->smtpuser If you have specified an smtp server above, and the server requires
  183. * authentication, enter user credentials here:
  184. * @global string $cfg->smptpass Password to match the user in $cfg->smtpuser
  185. */
  186. // $cfg->smtpuser = '';
  187. // $cfg->smtppass = '';
  188. /**
  189. * @global string $cfg->smtpsecure If smtp server requres secure connection, specify the protocol type below.
  190. * Valid options are '', 'ssl' or 'tls'. Setting it to '' or leaving the line
  191. * commented means that secure connection will not be used.
  192. */
  193. // $cfg->smtpsecure = '';
  194. /**
  195. * Variable Envelope Return Path Handling
  196. * @global bool $cfg->bounces_handle If you want mahara to keep track of email addresses which generate a
  197. * bounce, set bounces_handle to true.
  198. * If set to true, $cfg->bouncedomain *must* be set.
  199. */
  200. $cfg->bounces_handle = false;
  201. /**
  202. * @global int $cfg->bounces_min Rather than disable an email address on the first bounce message,
  203. * require bounces_min bounces.
  204. */
  205. $cfg->bounces_min = 5;
  206. /**
  207. * @global number $cfg->bounces_ratio Require at least (bounces_ratio*100)% of sent mail to be bounced back
  208. * before disabling mail for that user.
  209. * e.g. If using the default bounces_ratio of 0.20 and 20 mails are sent to
  210. * a user, at least 4 must be returned before email is disabled.
  211. * (Set this to 0 to ignore bounces_ratio and rely solely on bounces_min)
  212. */
  213. $cfg->bounces_ratio = 0.20;
  214. /**
  215. * @global string $cfg->bounceprefix Identity of the Mahara instance
  216. * If you have several Mahara, Moodle, or other VERP processors on the same
  217. * bounce domain, you need to keep track of which processor belongs to
  218. * which domain.
  219. */
  220. $cfg->bounceprefix = 'AAA-';
  221. /**
  222. * @global string $cfg->bouncedomain The domainpart of the generated VERP domain. e.g.
  223. * <localpart>@$cfg->bouncedomain
  224. * This must be set for VERP handling to take effect
  225. */
  226. //$cfg->bouncedomain = '';
  227. /**
  228. * @global number $cfg->bounces_resetdays number of days before reseting the
  229. * emailsent and emailbounced values for each email
  230. */
  231. $cfg->bounces_resetdays = 30;
  232. /**
  233. * @global string $cfg->imapserver The imap server to check for bounced emails
  234. * @global int $cfg->imapport The port for the imap server
  235. */
  236. //$cfg->imapserver = 'localhost';
  237. //$cfg->imapport = 143;
  238. /**
  239. * @global string $cfg->imapuser The imap username to authenticate
  240. * @global string $cfg->imappass The imap password to authenticate
  241. */
  242. //$cfg->imapuser = '';
  243. //$cfg->imappass = '';
  244. /**
  245. * @global string $cfg->imapflags Any flags to pass to imap_open, can have multiple
  246. * See http://www.php.net/manual/en/function.imap-open.php
  247. */
  248. //$cfg->imapflags = '';
  249. /**
  250. * @global string $cfg->imapmailbox Which mailbox to poll, defaults to INBOX
  251. */
  252. //$cfg->imapmailbox = 'INBOX.someotherbox';
  253. /**
  254. * You can even set the library to check pop mail boxes
  255. */
  256. //$cfg->imapflags = '/pop3';
  257. //$cfg->imapport = 110;
  258. /**
  259. * maximum allowed size of uploaded images
  260. * @global int $cfg->imagemaxwidth
  261. * @global int $cfg->imagemaxheight
  262. * NOTE: the scalable resize might result in images with one dimesion larger than one of these sizes, but not both
  263. */
  264. $cfg->imagemaxwidth = 1170;
  265. $cfg->imagemaxheight = 1170;
  266. /**
  267. * @global int $cfg->maximageresizememory Maximum allowed memory usage for thumbnail generation (approximate)
  268. */
  269. $cfg->maximageresizememory = 104857600;
  270. /**
  271. * @global $cfg->pathtoclam The path to the ClamAV executable (clamscan or clamdscan); disabled by default
  272. */
  273. $cfg->pathtoclam = '';
  274. /**
  275. * @global mixed $cfg->pathtomagicdb Set this value to specify where the PHP fileinfo "magic" DB is.
  276. *
  277. * If this value is NULL, Mahara will attempt to use PHP's internal magic db, or to
  278. * autolocate your system's magic DB.
  279. */
  280. $cfg->pathtomagicdb = NULL;
  281. /**
  282. * @global string $cfg->unziptempdir some shared hosts have restrictions on where unzip can be used
  283. * dataroot is often not allowed; but /tmp is. This path should end with a "/"
  284. * Note that if there is more than one mahara on this host using this setting
  285. * you must change this to something unique, eg /tmp/mahara1/ and /tmp/mahara2/
  286. */
  287. // $cfg->unziptempdir = '/tmp/mahara/';
  288. /**
  289. * @global string $cfg->sessionpath The directory to store session files in. Defaults to $cfg->dataroot.'sessions'.
  290. * This path should NOT end with a "/"
  291. *
  292. * If your dataroot is stored on a slow volume (such as NFS) you may want to change this to a local directory.
  293. * Although if you're using a web server cluster, be aware that session files need to be stored in a location shared
  294. * by all servers, or you need to use persistence to send each user to only one server per session.
  295. */
  296. // $cfg->sessionpath = '/tmp/mahara-sessions';
  297. /**
  298. * @global int $cfg->accesstimeupdatefrequency How often Mahara should update the last
  299. * access time for users. Setting this lower means the field will be updated more
  300. * regularly, but means a database write will be required for more requests.
  301. * Setting it to zero means the access time will be updated every request
  302. */
  303. $cfg->accesstimeupdatefrequency = 300;
  304. /**
  305. * @global int $cfg->accessidletimeout How long since their last request before a user is considered to be logged
  306. * out. Note that it makes no sense for this to be less than the
  307. * accesstimeupdatefrequency.
  308. */
  309. $cfg->accessidletimeout = 600;
  310. /**
  311. * @global bool $cfg->showonlineuserssideblock
  312. * Whether to show the onlineusers sideblock
  313. */
  314. //$cfg->showonlineuserssideblock = true;
  315. /**
  316. * @global int $cfg->leapovermnetlogelevel if importing Leap2A over an xmlrpc mnet connection,
  317. * set this to something higher than 0 to log import information
  318. * see the constants in import/leap/lib.php
  319. */
  320. $cfg->leapovermnetloglevel = 0;
  321. /**
  322. * @global string $cfg->remoteavatarbaseurl base URL of avatar server (with the trailing slash)
  323. * This should normally be set to http://www.gravatar.com/avatar/
  324. */
  325. //$cfg->remoteavatarbaseurl = 'http://www.gravatar.com/avatar/';
  326. /**
  327. * Options for width/height of wysiwyg editor in block configuration
  328. * forms. Workaround for current lack of tinymce fullscreen button.
  329. *
  330. * @global bool $cfg->blockeditormaxwidth Make the block config form expand to the full width of browser window
  331. * whenever it contains a tinymce (also increases editor height in
  332. * textbox blocktype):
  333. */
  334. //$cfg->blockeditormaxwidth = true;
  335. /**
  336. * @global int $cfg->blockeditorheight Set a fixed height in pixels for the tinymce editor (currently only
  337. * affects the textbox blocktype):
  338. */
  339. // $cfg->blockeditorheight = 550;
  340. /**
  341. * @global boolean $cfg->tinymcespellcheck Activate the TinyMCE spellcheck plugin. Not usually necessary
  342. * in modern browsers, which have their own built-in spellchecker. Requires the PHP "enchant" or "pspell"
  343. * module to be installed.
  344. */
  345. //$cfg->tinymcespellcheckerengine = 'enchant';
  346. //$cfg->tinymcespellcheckerengine = 'pspell';
  347. /**
  348. * @global bool $cfg->sslproxy This needs to be true when forcing https with an ssl proxy such as nginx.
  349. */
  350. $cfg->sslproxy = false;
  351. /**
  352. * @global string $cfg->cacertinfo The name of a file holding one or more certificates to verify the peer
  353. * when Mahara does HTTPS requests using the PHP Curl library.
  354. */
  355. // $cfg->cacertinfo = null;
  356. /**
  357. * External login page
  358. * @global string $cfg->externallogin Use this config option when you want users to be redirected to another
  359. * login page, for example a moodle instance that has mnet to this mahara
  360. * You can use the following placeholders:
  361. * {wwwroot} - Expands out to the wwwroot of this moodle
  362. * {shorturlencoded} - Expands to the relative script path of the current page (and is urlencoded)
  363. *
  364. * A point to note about the example below. Moodle doesn't strip the trailing slash from wwwroot
  365. * Bug MDL-30042 fixes this, if this patch isn't applied, just hard code the login url you want instead
  366. *
  367. * Another point to note is if you need some system to render the local login page when accessing a restricted page
  368. * rather than automatically redirect to externallogin you can override this by adding a 'override=1' to the URL of the page you are
  369. * trying to access.
  370. */
  371. // $cfg->externallogin = 'http://moodle.example.com/auth/mnet/jump.php?hostwwwroot={wwwroot}&wantsurl={shorturlencoded}';
  372. /**
  373. * @global bool $cfg->renamecopies If true, new copies of views & collections will have "Copy of" prepended to the title,
  374. * and if a page already exists with that title, a number will be appended to the end of the title.
  375. *
  376. * If false, "Copy of" will NOT be prepended, but a number may still be appended to the end of the title.
  377. */
  378. $cfg->renamecopies = false;
  379. /**
  380. * Favicon display
  381. * @global string $cfg->favicondisplay string used to get the favicon image src from a given domain.
  382. * Used to display the sites whose iframe embed code is allowed by htmlpurifier.
  383. * Either assume that favicon.ico exists at the root of the domain, or use a service.
  384. */
  385. // $cfg->favicondisplay = 'http://%s/favicon.ico';
  386. // $cfg->favicondisplay = 'http://www.grabicon.com/%s';
  387. // $cfg->favicondisplay = 'http://www.getfavicon.org/?url=%s';
  388. $cfg->favicondisplay = 'http://www.google.com/s2/favicons?domain=%s';
  389. /**
  390. * @global bool $cfg->productionmode If false, a message is shown at the top of the screen saying that the
  391. * site is not in production mode; and a number of other parameters are overridden with sensible defaults
  392. * for a dev site. (See init.php for the full effect).
  393. *
  394. * Because productionmode=false overrides a lot of settings with sensible dev mode defaults, if you want to
  395. * fine-tune your settings on your dev site, you'll paradoxically need to set productionmode=true.
  396. */
  397. $cfg->productionmode = true;
  398. /**
  399. * @global bool $cfg->sitethemeprefs If true, users can change their preferred theme for browsing the site. The user's theme preference
  400. * will override any site, institution, or page theme.
  401. * (Even with this setting disabled, users in multiple institutions can choose which of their
  402. * institutions' themes they wish to use)
  403. */
  404. // $cfg->sitethemeprefs = true;
  405. /**
  406. * Clean url configuration
  407. * @global bool $cfg->cleanurls Set "true" to activate clean URLS in Mahara
  408. * Do not turn this on until you have the correct rewrite rules in place on your webserver, or none of
  409. * your links will work.
  410. * See https://wiki.mahara.org/wiki/System_Administrator%27s_Guide/Clean_URL_Configuration
  411. */
  412. // $cfg->cleanurls = true;
  413. /**
  414. * Strings to use when generating user and group urls, i.e. the 'user' and 'group' portion of clean urls
  415. * such as http://mahara.example.com/user/bob and http://mahara.example.com/group/bobs-group. These
  416. * must match the output of the rewrite rules you have enabled in your webserver. These strings will
  417. * also be used as prefixes whenever a valid clean url cannot be automatically generated.
  418. * @global string $cfg->cleanurluserdefault
  419. * @global string $cfg->cleangroupdefault
  420. * @global string $cfg->cleanurlviewdefault
  421. */
  422. $cfg->cleanurluserdefault = 'user';
  423. $cfg->cleanurlgroupdefault = 'group';
  424. $cfg->cleanurlviewdefault = 'page';
  425. /**
  426. * @global string $cfg->cleanurlcharset Character encoding for clean urls. ASCII or UTF-8.
  427. */
  428. $cfg->cleanurlcharset = 'ASCII';
  429. /**
  430. * @global string $cfg->cleanurlinvalidcharacters A PCRE pattern defining sequences of characters to be removed and replaced by '-' when automatically
  431. * generating names for use in clean urls. For example, if the pattern is /[^a-zA-Z0-9]+/, and a clean
  432. * url is being generated for a user with the username 'nigel.mcnie', the '.', which appears in the
  433. * invalidcharacters list is replaced, to give a url like http://mahara.example.com/user/nigel-mcnie
  434. */
  435. $cfg->cleanurlinvalidcharacters = '/[^a-zA-Z0-9]+/';
  436. /**
  437. * @global string $cfg>cleanurlvalidate A pattern to validate user-editable fields for use in clean urls. If a user enters a string that
  438. * doesn't match this, it's an error.
  439. */
  440. $cfg->cleanurlvalidate = '/^[a-z0-9-]*$/';
  441. /**
  442. * @global bool $cfg->cleanurlusereditable Setting this to false will remove the "Change profile URL" option from the settings page.
  443. */
  444. $cfg->cleanurlusereditable = true;
  445. /**
  446. * @global bool $cfg->cleanurlusersubdomains generate subdomain-style profile urls like http://bob.mahara.example.com
  447. * Warning: Enabling this option on your site is likely to cause users with open sessions to be logged out on all profile pages.
  448. * See https://wiki.mahara.org/wiki/System_Administrator%27s_Guide/Clean_URL_Configuration#User_Subdomains
  449. */
  450. // $cfg->cleanurlusersubdomains = true;
  451. /**
  452. * @global bool $cfg->nocache Turn on caching of HTTP requests
  453. */
  454. // $cfg->nocache = true;
  455. /**
  456. * Settings used by the "elasticsearch" search plugin.
  457. * See the helpfiles on the plugin's configuration page for details.
  458. * @global string $cfg->plugin_search_elasticsearch_host
  459. * @global int $cfg->plugin_search_elasticsearch_port
  460. * @global int $cfg->plugin_search_elasticsearch_scheme
  461. * @global string $cfg->plugin_search_elasticsearch_username
  462. * @global string $cfg->plugin_search_elasticsearch_password
  463. * @global string $cfg->plugin_search_elasticsearch_indexingusername
  464. * @global string $cfg->plugin_search_elasticsearch_indexingpassword
  465. * @global string $cfg->plugin_search_elasticsearch_indexname
  466. * @global string $cfg->plugin_search_elasticsearch_bypassindexname
  467. * @global string $cfg->plugin_search_elasticsearch_analyzer
  468. * @global string $cfg->plugin_search_elasticsearch_types
  469. * @global string $cfg->plugin_search_elasticsearch_ignoressl
  470. */
  471. // $cfg->plugin_search_elasticsearch_host = '127.0.0.1';
  472. // $cfg->plugin_search_elasticsearch_port = 9200;
  473. // $cfg->plugin_search_elasticsearch_scheme = 'https';
  474. // $cfg->plugin_search_elasticsearch_username = '';
  475. // $cfg->plugin_search_elasticsearch_password = '';
  476. // $cfg->plugin_search_elasticsearch_indexingusername = '';
  477. // $cfg->plugin_search_elasticsearch_indexingpassword = '';
  478. // $cfg->plugin_search_elasticsearch_indexname = 'mahara';
  479. // $cfg->plugin_search_elasticsearch_bypassindexname = null;
  480. // $cfg->plugin_search_elasticsearch_analyzer = 'mahara_analyzer';
  481. // $cfg->plugin_search_elasticsearch_types = 'usr,interaction_instance,interaction_forum_post,group,view,artefact,block_instance,collection';
  482. // When scheme is set to https but the mahara site is not in production mode this flag will
  483. // allow system to ignore checking SSL certificate. Useful if testing with a site using a self-signed certificate
  484. // $cfg->plugin_search_elasticsearch_ignoressl = false;
  485. /**
  486. * @global int $cfg->plugin_search_elasticsearch_requestlimit How many items to send per elasticsearch bulk request
  487. * The main side effect of raising this, is that it increases the size of the POST request you send to your
  488. * elasticsearch server. If you're using a proxy in front of elasticsearch, a very large request is likely to exceed
  489. * its default POST request size limit.
  490. */
  491. $cfg->plugin_search_elasticsearch_requestlimit = '100';
  492. /**
  493. * @global int $cfg->plugin_search_elasticsearch_redolimit If there are records in the queue that have failed on
  494. * being sent in a previous bulk attempt, how many of them should we retry sending individually during each cron
  495. * run. The idea here is that if there is one "bad" record in a bulk request which causes the whole request to fail,
  496. * you want to retry the records in that batch individually so that the rest of them can be sent.
  497. *
  498. * We count retried records against the (optional) cron limit. So if cronlimit is 1000 and redolimit is 200, then
  499. * we'll do 800 new records and at the end retry 200 individual records.
  500. *
  501. * A reasonable starting value for this is your cronlimit divided by your requestlimit. (i.e. 50000/100 = 500).
  502. */
  503. $cfg->plugin_search_elasticsearch_redolimit = '500';
  504. /**
  505. * The maximum number of comment indentation levels to show
  506. * (Same for the comment block & for bottom of page, so it's best if it's small)
  507. */
  508. // $cfg->plugin_artefact_comment_maxindent = 5;
  509. /**
  510. * Additional HTML: Use these settings to put snippets of HTML at the top of every page on the site.
  511. * This is useful for e.g. Google Analytics. If you need to enter a multi-line snippet, it may be best
  512. * to use a PHP nowdoc: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc
  513. */
  514. // $cfg->additionalhtmlhead = <<<'HTML'
  515. // <script>
  516. // var _gaq = _gaq || [];
  517. // _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  518. // _gaq.push(['_trackPageview']);
  519. // (function() {
  520. // var ga = document.createElement('script'); ga.type = 'application/javascript'; ga.async = true;
  521. // ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  522. // var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  523. // })();
  524. // </script>
  525. // HTML;
  526. /**
  527. * @global string $cfg->additionalhtmlhead Added as the last item before the closing </head> tag
  528. */
  529. $cfg->additionalhtmlhead = '';
  530. /**
  531. * @global string $cfg->additionalhtmltopofbody Added immediately after the opening <body> tag
  532. */
  533. $cfg->additionalhtmltopofbody = '';
  534. /**
  535. * @global string $cfg->additionalhtmlfooter Added as the last item before the closing </body> tag
  536. */
  537. $cfg->additionalhtmlfooter = '';
  538. /**
  539. * @global string $cfg->auth_ldap_debug_sync_cron Whether to display extended debugging messages in
  540. * the auth/ldap user & group synchronization cron task.
  541. */
  542. // $cfg->auth_ldap_debug_sync_cron = false;
  543. /**
  544. * @global bool $cfg->usersuniquebyusername When turned on, this setting means that it doesn't matter
  545. * which other application the user SSOs from, the same username string from a remote SSO will be given
  546. * the same account in Mahara.
  547. *
  548. * This setting is one that has security implications unless only turned on by people who know what they're doing. In
  549. * particular, every system linked to Mahara should be making sure that same username == same person. This happens for
  550. * example if two Moodles are using the same LDAP server for authentication.
  551. *
  552. * If this setting is on, it must NOT be possible to self register on the site for ANY institution - otherwise users
  553. * could simply pick usernames of people's accounts they wished to steal.
  554. */
  555. $cfg->usersuniquebyusername = false;
  556. /**
  557. * @global bool $cfg->skins Activates the experimental "page skins" feature, which allows users to customize the CSS
  558. * on individual pages.
  559. */
  560. // $cfg->skins = false;
  561. /**
  562. * @global string $cfg->opensslcnf Allows manual setting of path to openssl.cnf file for ssl key generation if not
  563. * being automatically detected. Needed for extra-site networking.
  564. */
  565. // $cfg->opensslcnf = '';
  566. /**
  567. * global string $cfg->dbprefix If set, Mahara will add this prefix to all of its database table names.
  568. * This setting is generally only necessary if you are running Mahara in the same database as another
  569. * web application (a situation most commonly encountered in shared hosting).
  570. *
  571. * Due to database name length limits, the dbprefix MUST be no longer than 19 characters.
  572. */
  573. $cfg->dbprefix = '';
  574. /**
  575. * @global bool $cfg->publicsearchallowed Activates the display of the search box for logged-out users
  576. */
  577. $cfg->publicsearchallowed = false;
  578. /**
  579. * @global boolean $cfg->probationenabled Determines whether or not to use the new-user probation system.
  580. * If enabled, this will prevent newly self-registered users from taking certain actions that would be
  581. * useful for creating spam content. Users will leave probation once non-probationary users take actions
  582. * that indicate they trust the probationary user.
  583. */
  584. $cfg->probationenabled = false;
  585. /**
  586. * @global integer $cfg->probationstartingpoints If new user probation is enabled, this setting determines how
  587. * many probation points new users will start with.
  588. */
  589. $cfg->probationstartingpoints = 2;
  590. /**
  591. * @global integer $cfg->emailcontact If Mahara's anti-spam settings are enabled, this email address will be
  592. * shown as a contact address to anonymous users when their message is identified as a possible spam message.
  593. * This can help reduce user frustration in the event of a false positive.
  594. */
  595. $cfg->emailcontact = '';
  596. /**
  597. * @global string $cfg->cookieprefix Prefix to use on the names of any cookies issued by Mahara. This may
  598. * be useful in some unusual hosting situations, for instance if you are running another web application
  599. * that issues cookies with the same domain and path as Mahara.
  600. */
  601. // $cfg->cookieprefix = '';
  602. /**
  603. * @global bool $cfg->showloginsideblock
  604. * Whether to show the login sideblock
  605. */
  606. $cfg->showloginsideblock = true;
  607. /**
  608. * @global string $cfg->ajaxifyblocks Whether or not to use AJAX to load the content of blocktypes.
  609. * If the network connection to your users is quite slow, then disabling this may improve the user
  610. * experience.
  611. */
  612. $cfg->ajaxifyblocks = true;
  613. /**
  614. * @global string $cfg->mathjaxpath Determines the path to CDN or server-local installation of MathJax.js.
  615. * If MathJax is enabled, use to configure path to MathJax.
  616. */
  617. $cfg->mathjaxpath = '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured';
  618. /**
  619. * @global string $cfg->mathjaxconfig Determines MathJax configuration options.
  620. * The default MathJax configuration should be appropriate for most users, but MathJax is highly configurable
  621. * and any of the standard MathJax configuration options can be added here.
  622. */
  623. $cfg->mathjaxconfig = '
  624. MathJax.Hub.Config({
  625. TeX:{extensions: ["mhchem.js"]}
  626. });
  627. MathJax.Hub.Configured();
  628. ';
  629. /**
  630. * @global string $cfg->maxuploadsize The maximun upload size in bytes
  631. * This allow to limit the upload size
  632. * The real maximum upload size will be calculated on
  633. * - PHP settings: post_max_size and upload_max_filesize
  634. * - this setting $cfg->maxuploadsize if set
  635. */
  636. //$cfg->maxuploadsize = 16777216;
  637. /**
  638. * @global string $cfg->urlsecret A secret you need to add to the lib/cron.php or admin/upgrade.php
  639. * URL to run it through the browser rather than the commandline to prevent unauthorised users triggering
  640. * the cron or an upgrade, eg http://example.com/lib/cron.php?urlsecret=mysupersecret. If you do not wish
  641. * to have a url secret set $cfg->urlsecret = null.
  642. */
  643. $cfg->urlsecret = 'mysupersecret';
  644. /**
  645. * @global string $cfg->passwordsaltalt1 A previous password salt used on the site.
  646. * When changing the salt (or disabling it), you will need to set the current salt as an alternate salt
  647. * There are up to 20 alternate salts (e.g. $cfg->passwordsaltalt2, $cfg->passwordsaltalt3, etc)
  648. */
  649. $cfg->passwordsaltalt1 = 'old salt value';
  650. /**
  651. * @global array $cfg->openbadgedisplayer_source The open badge sources
  652. * The default sources are openbadgepassport.com and Badgr
  653. */
  654. $cfg->openbadgedisplayer_source = '{"passport":"https://openbadgepassport.com/","badgr":"https://api.badgr.io/"}';
  655. /**
  656. * @global string $cfg->memcacheservers
  657. * A comma separated list of memcache servers to store user sessions for SimpleSAMLphp.
  658. * localhost:11211 will be used by default.
  659. */
  660. // $cfg->memcacheservers = 'hostname1:port1,hostname2:port2,hostname3:port3';
  661. /**
  662. * @global string $cfg->sessionhandler
  663. * An alternative session handler for Mahara if you do not wish to use files.
  664. * Specify the name of the session handler. Will be used for SAML session handling unless $cfg->ssphpsessionhandler set
  665. */
  666. $cfg->sessionhandler = 'file';
  667. //$cfg->sessionhandler = 'memcached'; // also set the $cfg->memcacheservers setting if using this one
  668. //$cfg->sessionhandler = 'redis'; // also set the $cfg->redis* settings if using this one
  669. /**
  670. * @global string $cfg->ssphpsessionhandler
  671. * An alternative session handler for SimpleSAMLphp if you do not wish to use memcache.
  672. * Specify the name of the session handler.
  673. */
  674. // $cfg->ssphpsessionhandler = 'memcached'; // also set the $cfg->memcacheservers setting if using this one
  675. // $cfg->ssphpsessionhandler = 'redis'; // also set the $cfg->redis* setting if using this one
  676. // $cfg->ssphpsessionhandler = 'sql'; // also set the $cfg->ssphpsql* settings if using this one
  677. /**
  678. * Redis session handling
  679. */
  680. //$cfg->redissentinelservers = "localhost:26379"; // A comma seperated string of hosts:ports
  681. //$cfg->redismastergroup = 'mymaster';
  682. //$cfg->redisprefix = 'mahara';
  683. /**
  684. * SQL session store configs for SimpleSAMLphp
  685. * Specify the SQL database connection string, credentials and table prefix
  686. */
  687. /*
  688. $cfg->ssphpsqldsn = "mysql:host=localhost;dbname=simplesamlphp";
  689. $cfg->ssphpsqlusername = null;
  690. $cfg->ssphpsqlpassword = null;
  691. $cfg->ssphpsqlprefix = 'ssphp';
  692. */
  693. /**
  694. * @global array $cfg->saml_custommappingfile
  695. * A list of paths to custom attribute mapping files for SimpleSAMLphp IDP and SP
  696. */
  697. /*
  698. $cfg->saml_custommappingfile = '{
  699. "idp" : ["' . $CFG->docroot . 'auth/saml/extlib/simplesamlphp/attributemap/name2oid.php"],
  700. "sp" : ["' . $cfg->dataroot . '/customattributemap/customname2oid.php"]
  701. }';
  702. */
  703. /**
  704. * Log SAML attributes
  705. * To help diagnose authentication issues between Mahara and the IdP it is useful to see what attributes are being sent
  706. * so we log what was sent to the usr_login_saml table when this flag is set to true.
  707. * Note: This should be switched off once problems are diagnosed / fixed and the table cleared
  708. */
  709. $cfg->saml_log_attributes = false;
  710. /**
  711. * @global array $cfg->externalfilesystem
  712. * A configuration data for an external file system
  713. */
  714. /*
  715. $cfg->externalfilesystem = '{
  716. "includefilepath" : "module/objectfs/classes/s3_file_system.php",
  717. "class" : "s3_file_system",
  718. }';
  719. */
  720. /**
  721. * @global string $cfg->dwoocachedir
  722. * The location of the dwoo cache directory
  723. */
  724. //$cfg->customdwoocachedir = '/var/cache/appcache/testing';
  725. /**
  726. * Uncomment the following line if you wish to lock down access for members of institutions
  727. * so that they are separated entirely and disallow contact between members of one institution
  728. * with members of another institution.
  729. *
  730. * Users can only be in one institution at one point in time. Being a member of multiple
  731. * institutions is not allowed. Only institution staff, institution admins, site staff and
  732. * site admins can create groups. No friends allowed.
  733. */
  734. //$cfg->isolatedinstitutions = true;
  735. /**
  736. * Uncomment the following line if you do not wish to allow friends and friend related
  737. * activites on your install of Mahara. No friends allowed - this is a site-wide setting.
  738. */
  739. //$cfg->friendsnotallowed = true;
  740. /**
  741. * Restrict the site to only allow the upload of certain file types.
  742. * Set as a comma seperated string of valid file extensions
  743. */
  744. //$cfg->validfiletypes = 'doc,docx,gif,jpeg,jpg,m4a,mp3,mp4,pdf,png'; // for example
  745. /**
  746. * Allow the creation of a user with minimum details from SAML
  747. * With modern privacy laws some IdPs will not include identifying things like firstname/lastname,
  748. * email address in their minimum packet of info about an authenticated user.
  749. * Mahara expect these to exist to create a new user.
  750. * To get passed this, by allowing just a unique identifier/username, we set the follwing flag
  751. */
  752. // $cfg->saml_create_minimum_user=true;
  753. /**
  754. * Allow SAML to create an institution when creating a new user if the institution they need
  755. * to belong to doesn't yet exist. The IdP can pass an institution display name through
  756. * and be mapped via the SAML instance setting 'samlfieldfororganisationname'.
  757. * To make a new institution you need to define what institution to fetch an existing SAML
  758. * instance from to be used as the default 'template' SAML settings.
  759. * The 'saml_create_institution_default' can also be used as a 'parent' auth to update the
  760. * role* values for all the other SAML configs that have the same 'institutionidpentityid' value
  761. */
  762. //$cfg->saml_create_institution=true;
  763. //$cfg->saml_create_institution_default = 'mahara';
  764. /**
  765. * Allow the export option called PDF export
  766. * This option exports pages and collections as pdf files
  767. *
  768. * Note: This is an experimental feature requiring the install of a Chrome / Chromium browser on
  769. * your server to ustilise the print to PDF commandline option - Use with caution.
  770. */
  771. //$cfg->usepdfexport = true;