530 Commits

Author SHA1 Message Date
Andrew Nicols
eddae1808b
MDL-79974 core: Add Whoops when debugging
Whoops will only be used under the following conditions:

- Not an AJAX request
- Not a CLI usage
- debugdisplay is set
- composer dependencies are installed
- Whoops is available
- The configuration setting is enabled
2023-11-05 21:23:18 +08:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Petr Skoda
3c25ccdcd1 MDL-78552 core: tidy up MDL_PERF constants
* all constans usable in ABORT_AFTER_CONFIG should be always defined
* MDL_PERFDB and $PERF->logwrites not used after legacy log removal
* MDL_PERF_TEST should be documented in codebase
* deprecated warnings in shutdowb manager
2023-06-25 08:39:09 +02:00
Meirza
bf30ef1b53 MDL-76932 libraries: upgrade YUI lib to 3.18.1 2023-03-15 13:21:15 +07:00
Petr Skoda
80d32fc93a MDL-76680 core: disable $USER->ignoresesskey on next page 2023-03-11 10:37:12 +01:00
Laurent David
387371bacd MDL-77037 core_courseformat: Refresh course index
* Refresh course index when language change
2023-03-09 08:41:02 +01:00
Qihui Chan
791e56d3bc MDL-72775 tool_task: check long running tasks 2022-12-23 09:41:05 +10:00
Jun Pataleta
2c098a7ec7 MDL-76305 core: Use dir separator when assigning $CFG->tempdir 2022-11-15 16:24:52 +08:00
Brendan Heywood
519c932cd6 MDL-75014 core: Add xyz_before_session_start callback 2022-09-18 22:14:36 +10:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Brendan Heywood
9fa26ed911 MDL-72486 core: Add unsafe log and fix options to proxy settings 2022-06-20 11:18:42 +10:00
Eloy Lafuente (stronk7)
4c0ae3e138 MDL-73098 install: Detect stale bootstrap.php files and disable them
It's important to say that this bug apparently (till now) only happens
when an *incorrect* instalation of a site happens, reusing the dataroot
from another existing site.

When that happens, the localcache/bootstrap.php file from the old
site is reused, setting siteidentifier and SYSCONTEXTID when it's not
time for them to be defined yet.

Their existenece leads to reusing some other structures from the old
dataroot (that, again, should have been changed or wiped!), ultimately
leading to all sort of errors about non-existent tables (course,
context...).

With this change we ensure that:

1) Whenever any change to the database configuration (prefix, user,
   type..) happens, it's detected and immediately the information
   in the localcache/bootstrap.php is discarded and the file removed.
   This should fix problems like MDL-73098 itself.

2) We only set SYSCONTEXTID if the file is not stale. Main reason
   for doing that check within the localcache/bootstrap.php file
   itself is that we cannot "undefine" it @ setup.php. This should
   prevent errros like MDL-72888 to happen.

3) Finally, little detail, we only define SYSCONTEXTID if it has
   not been defined earlier. In the past, it was recommended to
   define it in config.php (exactly to save one DB read) and, sites
   having them will face "already defined" warnings.
2021-11-17 20:56:36 +01:00
Peter Dias
2bb5b40215 MDL-52484 core: Revert workaround PHP7 bug #70110 with preg_match
This reverts commit 144fb5e0a0a552eeff9a5fb59c08c0927a187655. The fix is now part of php7.3
2021-10-14 12:19:29 +08:00
Sara Arjona
c467ce725e Merge branch 'MDL-46778-master' of git://github.com/odeialba/moodle 2021-09-06 10:03:07 +02:00
Odei Alba
15c7a4bd57 MDL-46778 behat: Allow different database for behat 2021-09-02 14:56:12 +02:00
Brendan Heywood
7b938088b5 MDL-71014 core: Cache immutable bootstrap config locally 2021-09-02 13:22:28 +10:00
Jess Ansell
52bc582e77 MDL-71012 setup: Return 500 error code for setup errors. 2021-03-22 14:05:45 +00:00
Heena Agheda
9c5dc8fc7d MDL-65856 session: UX review of session timeout
Add new setting 'sessiontimeoutwarning', gives logged in user ability to extend session when there is no activity.
2020-12-21 08:43:21 +11:00
Brendan Heywood
9fabe1dda5 MDL-66928 core: Move request dirs to system tmp instead of localcache 2020-10-13 14:17:39 +11:00
Adrian Greeve
67925e5b88 Merge branch 'MDL-67680-master' of git://github.com/marinaglancy/moodle 2020-01-22 10:28:23 +08:00
Marina Glancy
a79da4f1bb MDL-67680 core: Catch PHP exceptions in the after_config callback 2020-01-13 16:43:59 +01:00
Brendan Heywood
859ed92f9d MDL-65812 session: Increase default timeout and allow larger periods 2020-01-11 23:17:35 +11:00
Pau Ferrer Ocaña
4ed6010a61 MDL-54799 webservice: Handle exception in WS format ASAP 2019-11-29 09:44:09 +01:00
David Mudrák
469d4b7f35 MDL-67250 setup: Revert removal of the httpswwwroot setting
It is still used widely in the plugins that would stop working suddenly
without being warned via a debugging message. We must keep it forever as
an alias for the wwwroot.
2019-11-13 19:58:10 +01:00
Andrew Nicols
506a0f4bc0 MDL-66340 setup; Whitepace fix 2019-09-05 10:50:25 +08:00
Brendan Heywood
4ed105a9fd MDL-66340 setup: Add after_config for after setup.php is loaded 2019-08-27 13:24:15 +10:00
Jun Pataleta
9320787005 MDL-46267 core: Remove $CFG->httpswwwroot
* It's unnecessary since $CFG->loginhttps has already been removed and
  it's no longer being used in core anymore.
2019-07-22 10:59:42 +08:00
Andrew Nicols
fc1785b086 MDL-60978 testing: Support ability to run phpunit in isolated process 2019-06-21 14:36:13 +08:00
Brendan Heywood
b940ca995a MDL-64394 core: Fixed bug when using access log with pre_loginpage_hook 2019-04-01 16:48:22 +11:00
Adrian Greeve
5454e72c21 MDL-55188 events: First deprecation of eventslib.php 2018-07-30 09:23:54 +08:00
Matteo Scaramuccia
ef844148a9 MDL-60923 backup: Added $CFG->backuptempdir
The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.

Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
2018-04-16 23:50:28 +02:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00
Brendan Heywood
c31a35b57d MDL-57887 setup: Support logging usernames in nginx access logs 2017-02-07 13:47:40 +11:00
Rajesh Taneja
36cc9f8e37
MDL-54628 behat: Set behat dir for each run under behat_dataroot
Before this patch behat_dataroot for parallel runs
were created at same level as ->behat_dataroot
After this patch, it will be created 1 level under
->behat_dataroot with BEHAT_PARALLEL_SITE_NAME
prefix and run number as suffix. This will allow
common files as test enabled and parallel run info
to be saved in parent directory and access it easily.
2017-01-30 08:51:53 +08:00
Rajesh Taneja
920d7ffadd
MDL-56865 behat: Don't set error handler for behat install 2016-11-17 08:56:54 +08:00
Damyon Wiese
e56b58e3c9 MDL-56006 theme: Set Boost as the default theme
Units tests have been adjusted e.g. 'boost' instead of 'clean' in pix urls.

Some places I didn't update the test to reflect the boost markup and reset
the theme to clean. This is because the test was not testing the markup - but the
functionality (e.g. looking for specific structures to indicate an error in a form element).
2016-10-25 10:15:20 +08:00
Frédéric Massart
fc72f49da3 MDL-56095 output: Moving progress_bar from weblib to outputcomponents
And revert the change in the order of the require_once in setup.php.
2016-10-10 13:25:37 +02:00
Frédéric Massart
82b945dbbe MDL-56095 output: Make the progress bar templatable
The order of inclusion of weblib and outputlib had to change
as the progress_bar (weblib) uses interfaces defined in outputlib.
2016-10-07 16:40:38 +02:00
Dan Poltawski
2b53e97cd3 MDL-56167 setup: bail out on lower version requirements in all cases
It's quite possible to get incomrehensible errors otherwise
2016-09-28 15:35:34 +01:00
Brendan Heywood
f1c6d647bc MDL-55916 setup: Maintenance mode serves HTTP 503 2016-09-20 11:59:39 +10:00
Rajesh Taneja
0c1bcb63c6
MDL-46514 behat: Catch php errors in shutdown hook
If error is not displayed in web browser then
it will be caught in shutdown hook, so we can
show it to user
2016-08-23 15:14:38 +08:00
Eloy Lafuente (stronk7)
ae96cf6246 MDL-53019 php: bump all harcoded versions to new 5.6.5 requirement
Moodle 3.2 and up will require PHP >= 5.6.5. Hopefully some day we'll
have this centralized with MDL-39007, just it's not done yet.

Thanks to Stephen Bourget for raising this!
2016-07-05 01:50:43 +02:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Cameron Ball
b5e6ec4486 MDL-52207 libraries: Delete Zend framework
Let it RIP.
2016-03-21 11:02:55 +08:00
Dan Poltawski
cbce7be769 MDL-28030 setup: Ensure $CFG->urlrewriteclass is properly setup
(To avoid crippling a site)
2016-02-16 11:35:07 +01:00
Tony Levi
144fb5e0a0 MDL-52475 core: workaround PHP7 bug #70110 with preg_match 2015-12-11 08:27:26 +08:00
David Mudrák
b0fc789878 MDL-49329 admin: Clean up disabling of plugins code management features
The admin setting updateautodeploy no longer exists. The two existing
config.php flags $CFG->disableupdateautodeploy and
$CFG->disableonclickaddoninstall merged into a single one.
2015-10-10 09:11:19 +02:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Mike Grant
d0c2bc6466 MDL-49276 config-dist: Removed legacy config options
Both $CFG->logsql and $CFG->dblogerror had no use in moodle core
since ages ago (just the former had one use for nothing). Good time
to get rid of both as they are 100% misleading.
2015-03-16 23:39:41 +01:00
Rajesh Taneja
a2754d791b MDL-39752 behat: Moved parallel run checks from setup to behat/lib.php 2015-03-09 07:11:57 +08:00