295 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
df272345ba MDL-65996 exceptions: Make exception handler early-errors compliant
Some errors can happen really early in Moodle bootstrap/warmup
(basically when executing setup.php stuff, before general libraries
are loaded and available).

That's called "early errors" and there are good parts within
setuplib.php that must be able to run without any dependency
other than vanilla php code.

It seems that, along the years, some dependencies have been
added (calls to debugging(), to s()....) and they worked mostly
ok because early errors are rare.

This commit just makes all those dependencies conditional so,
if an early error is detected... the exception handler will
return real information about he error happening and not
handler own errors (like it's happening now).
2019-06-22 11:38:43 +02:00
Matteo Scaramuccia
c7321899c9 MDL-61038 setuplib: Fixed PECL UUID extension support
generate_uuid() has been refactored into \core\uuid::generate()
2019-06-09 23:24:26 +02:00
Eloy Lafuente (stronk7)
7726bec6b3 Merge branch 'MDL-63262-master' of git://github.com/damyon/moodle 2019-05-07 16:26:40 +08:00
Damyon Wiese
aae219acce MDL-63262 badges: Add badgr.io
Upgrade the support for Open Badges 2 to support a real open badges 2 backpack.
Moodle can only talk to one backpack at a time, so after switching backpacks, users
will have to manually disconnect and then reconnect their backpack to the new one.

This commit combines several changes:
* Split classes into badges namespace
* Publish expiry data with a badge
* Publish badge alignments in badges exported to the backpack.
* Export the criteria for a badge to the backpack.
2019-05-03 15:00:00 +08:00
Andrew Nicols
ea00cdc79f Merge branch 'MDL-64394-accesslog' of https://github.com/brendanheywood/moodle 2019-05-03 08:49:33 +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
Eloy Lafuente (stronk7)
fd652de81f Merge branch 'MDL-31355-master' of git://github.com/rezaies/moodle 2019-04-11 17:17:07 +02:00
Shamim Rezaie
1c96922da5 MDL-31355 core: Bump $lastmajordbchanges to trigger upgrade immediately 2019-04-11 18:47:35 +10:00
Damyon Wiese
e8bfd9b4a9 MDL-63876 badges: Remove invalid table from badges 2019-03-29 11:30:09 +08:00
Jun Pataleta
3c7bf4ea88 MDL-57898 core: Bump $lastmajordbchanges to trigger upgrade immediately 2019-01-22 09:36:15 +08:00
Marina Glancy
0e367a119c MDL-57898 core_customfield: Custom fields API
This commit is part of work on Custom fields API,
to minimize commit history in moodle core the work of a team of developers was split
into several commits with different authors but the authorship of individual
lines of code may be different from the commit author.
2019-01-18 14:28:18 +01:00
Andrew Nicols
cca12f68d0 MDL-49399 core: Allow creation of a new per-request basedir
Shutdown handlers are processed in order. If something in a shutdown
handler uses a file which is stored in a per-request directory, and
another, unrelated, per-request directory was created before the handler
started. then a fresh per-request directory will be required.
2019-01-16 12:14:25 +08:00
Ryan Wyllie
c912cd7324 MDL-63303 core: add debug info to exceptions 2018-11-15 14:40:11 +08:00
Eloy Lafuente (stronk7)
d27e49448f Merge branch 'MDL-53566-master' of git://github.com/andrewnicols/moodle 2018-11-13 23:55:38 +01:00
Andrew Nicols
0616f045c3 MDL-53566 core: Add support for context locking
This chagne adds support for a new feature known as Context Locking.
This allows a context to be locked, thereby removing all write
capabilities for all users (including admin) for that context, and all
child contexts.
2018-11-13 21:17:40 +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
Tim Hunt
168635fb6f MDL-61366 setuplib: safely construct the ajax renderer when needed 2018-02-06 12:09:43 +00:00
John Okely
cd1eb7ce9c MDL-42834 admin: Upgrade script and warning for loginhttps sites 2017-10-23 12:25:36 +08:00
John Okely
b58764ff99 MDL-42834 admin: Remove loginhttps 2017-10-23 12:25:35 +08:00
Marina Glancy
d28eb51ddc MDL-60281 general: remove class object() completely
This class was deprecated under MDL-52471 and was showing debugging notice from Moodle 3.0.1
In PHP7.2 the class declaration fails with fatal error even if it's not used anywhere
2017-10-16 09:37:20 +08:00
Marina Glancy
484b43f456 MDL-60281 general: create_function is deprecated in PHP7.2 2017-10-16 09:37:19 +08:00
Eloy Lafuente (stronk7)
b6f370112d MDL-59890 upgrade: bump redirect_if_major_update_required 2017-10-04 22:17:25 +02:00
Eloy Lafuente (stronk7)
f30af085a9 Merge branch 'MDL-58318-master' of git://github.com/damyon/moodle 2017-06-14 12:30:39 +01:00
John Okely
c9a4d37c3d MDL-57103 lib: Force ajax renderer for all ajax fatal errors 2017-06-12 10:36:42 +08:00
Damyon Wiese
d4d414694a MDL-58318 setuplib: Redirect on https mismatch
When the wwwroot indicates https support and a page is accessed over http,
redirect to the wwwroot. This is a better experience than displaying an error.
2017-05-24 13:42:34 +08:00
Andrew Nicols
a011effb49 MDL-58857 admin: Terminate the session if a major upgrade is required 2017-05-09 15:00:00 +08:00
Dan Poltawski
6ebb0947f0 MDL-55611 upgrade: bump redirect_if_major_update_required 2017-04-04 17:08:35 +01:00
Jun Pataleta
91b2bf2c9d MDL-55956 core: Update major db change version 2017-03-10 18:04:46 +00:00
Marina Glancy
024d120ffc MDL-4782 install: add major db change version 2017-02-16 09:28:29 +08:00
Brendan Heywood
cfd35ec846 MDL-57810 lib: Disable nginx buffers when not required 2017-01-30 15:51:50 +11:00
David Monllao
d5c2829b06 MDL-56902 version: Triggering a major upgrade 2016-11-23 11:50:26 +08:00
Damyon Wiese
1ac36fa9f7 MDL-56902 blocks: No theme blocks if fake blocks only
When showing only fake blocks, never auto create the blocks for the
theme. This would give you double blocks.
2016-11-23 11:07:32 +08:00
Juan Leyva
1e17258b66 MDL-56268 webservice: Format backtrace to avoid display private data 2016-11-10 16:15:31 +08:00
David Monllao
c9af13123d MDL-54751 course_modules: New major upgrade point
Also trailing whitespace cleaned.
2016-11-07 08:59:04 +08:00
Dan Poltawski
c6c50e04d9 MDL-22078 lib: bump redirect_if_major_update_required()
Changes to the course table enforce an update
2016-10-06 09:24:52 +01:00
Pau Ferrer Ocaña
9201a00a5d MDL-55951 output: Add errorcode to fatal_error when available 2016-09-13 15:30:01 +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
Jonathan Champ
ddf98ccac3 MDL-39524 setuplib: Improve get_real_size() performance and readability 2016-03-03 11:05:48 -05:00
David Monllao
f08d1590c8 Merge branch 'MDL-52226-master' of git://github.com/sammarshallou/moodle 2015-12-21 14:41:21 +08:00
David Monllao
05178f0745 Merge branch 'MDL-52471-master' of git://github.com/danpoltawski/moodle 2015-12-11 11:52:02 +08:00
Dan Poltawski
9708ff95fd MDL-52471 setuplib: depreciate class object properly
Previously was marked depricated but not throwwing debugging
2015-12-10 14:26:30 +00:00
Marina Glancy
1766e6a17f MDL-52284 core: PHP7 engine errors have type Throwable 2015-12-10 10:49:37 +08:00
Tony Levi
d74b7e424f MDL-52284 core: compatibility with Exception/Throwable changes in PHP7 2015-12-10 10:49:36 +08:00
sam marshall
6d4858d5b3 MDL-52226 Forms: max_input_vars problems with advanced checkbox 2015-12-09 12:15:45 +00:00
Matteo Scaramuccia
3b1a3abcf9 MDL-51554 Files: Fix broken file serving under Apache + PHP-FPM 2015-10-16 21:55:20 +02:00
Andrew Nicols
34c6ec1869 MDL-50891 useragent: Move web crawler checks to useragent class 2015-08-28 14:31:51 +08:00
Andrew Nicols
2ed6be873b MDL-43785 lib: Improve session timeout warnings 2015-07-27 14:29:47 +08:00
Eloy Lafuente (stronk7)
188458a604 MDL-50049 deprecation: Extra minor fixes.
- complete and cleanup upgrade.txt
- replace remaining uses in comments.
- fix some incorrect bulk-replacement in previous commit.
2015-07-10 01:59:31 +02:00
Frederic Massart
db200a8e9f MDL-49179 setuplib: print_error() uses local URLs exclusively 2015-05-05 18:31:13 +08:00
Andrew Nicols
70be2642fc MDL-44874 core: Add per-request directory functions
This adds functionality to create individual request directories which can
be only be used for the current request. They are removed by a shutdown
handler.
2015-03-31 13:58:44 +08:00