2562 Commits

Author SHA1 Message Date
Ilya Tregubov
3182c71093 MDL-80599 enrol_self: Support password update in csv course upload 2024-05-17 11:01:22 +08:00
Ilya Tregubov
56fb55683a MDL-80599 core: Refactor enrol methods
Move update instance logic to its own method and cover with tests.
Also update enrol plugins to work woth new methods.
2024-05-17 11:01:22 +08:00
Jun Pataleta
9966241efb
Merge branch 'MDL-81525-main' of https://github.com/andrewnicols/moodle 2024-04-17 23:42:22 +08:00
Andrew Nicols
6db4285eaa
MDL-81525 core_user: Move after_complete_login to correct NS 2024-04-15 13:05:10 +08:00
Andrew Nicols
fd63e35dd1
MDL-81525 core_course: Correct hook name tense 2024-04-15 13:05:08 +08:00
Andrew Nicols
613f933442
Merge branch 'MDL-80820' of https://github.com/marinaglancy/moodle 2024-04-15 10:42:22 +08:00
Andrew Nicols
5c16854483
Merge branch 'MDL-80985-add-purge-course-caches-option-main' of https://github.com/jwcatau/moodle 2024-04-11 10:41:13 +08:00
Andrew Nicols
62c560dff2
MDL-81456 core: Correct namespace imports 2024-04-09 16:13:42 +08:00
Marina Glancy
ef1759da74 MDL-80820 various: fix incorrect phpdocs 2024-04-08 10:13:10 +01:00
James Williams
5e05ad570f MDL-80985 core: Add --courses argument to purge_caches.php 2024-04-08 18:34:13 +10:00
Andrew Nicols
2b49ad42f5
MDL-81456 core: Use DI for all hook access
Using DI for all hook access means that it becomes significantly easier
to mock hooks and callbacks for unit testing without fundamentally
altering the structure of the code purely for the purposes of unit
testing.
2024-04-08 09:35:41 +08:00
Huong Nguyen
e084be6526
Merge branch 'main_MDL-81154' of https://github.com/mattporritt/moodle 2024-03-28 14:46:37 +07:00
Matt Porritt
6d3d498362 MDL-81154 Administration: Remove Moodle Services page
This commit effectively reverts MDL-63153.
Calls to action in the UI for other products or marketing
should link directly to the corresponding services in moodle.com
rather than trying to replicate parts of it in LMS.
2024-03-28 16:57:50 +11:00
Andrew Nicols
c9030a8243
Merge branch 'MDL-80332-master' of https://github.com/jleyva/moodle 2024-03-26 22:10:29 +08:00
Huong Nguyen
b283ca354e
Merge branch 'MDL-78551-main' of https://github.com/safatshahin/moodle 2024-03-26 10:08:06 +07:00
Safat
b9db825c37 MDL-78551 core: Register hook callbacks and dispatchers 2024-03-26 13:53:39 +11:00
Juan Leyva
658d96f889 MDL-80332 login: New hooks for complete login and passed MFA 2024-03-25 15:48:39 +01:00
Mark Johnson
788556f652
MDL-80099 hooks: Add mechanism to deprecate class callbacks 2024-03-20 14:58:16 +00:00
Jun Pataleta
70d4a925ac
Merge branch 'MDL-80677-main' of https://github.com/andrewnicols/moodle 2024-03-12 10:21:38 +08:00
Andrew Nicols
57ec38d136
MDL-80677 core: Move deprecated attributes to \core\attribute NS
Note: Removing the manual require for the attribute from moodlelib
because the class does not have to exist at time of definition, only
when the Reflection API instantiates an instance in \core\deprecation,
by which point the autoloader is available.
2024-03-11 21:48:32 +08:00
David Woloszyn
cb6acfc46a MDL-79769 login: Add password toggle icon to the login screen 2024-03-08 15:54:11 +11:00
Sara Arjona
8cdd62ca88
MDL-78284 theme: Add new interactive content and update styles 2024-02-15 17:49:43 +01:00
Jun Pataleta
5cf7f99638
Merge branch 'MDL-80119-master' of https://github.com/andrewnicols/moodle 2024-01-23 14:16:43 +08:00
Andrew Nicols
6f23ef183d
MDL-80005 core: Formally deprecate PARAM_CLEANFILE 2024-01-17 12:19:57 +08:00
Andrew Nicols
b05fc42db9
MDL-80005 core: Emit deprecation notices for params
Most params are formally deprecated here. This was originally planned
for MDL-80042, but I realised that having an emit, and final param is a
very useful option going forward.

This patch also moves the is_deprecated(), and related methods to the
\core\deprecated attribute.
2024-01-17 12:19:45 +08:00
Andrew Nicols
d937e01550
MDL-80005 core: Move all param validation methods 2024-01-16 22:54:46 +08:00
Andrew Nicols
0d7d5d2e56
MDL-80005 core: Move clean_param and PARAM definitions
Move these into a new enum object which ensures that all content is
together.
2024-01-16 22:53:55 +08:00
Santosh Nagargoje
ee4a176866 MDL-80333 Authentication: Fixed new login notification adhoc task 2024-01-10 15:32:16 +05:30
Jun Pataleta
c8c6f72e58
Merge branch 'MDL-79761-main' of https://github.com/marinaglancy/moodle 2023-12-07 08:54:21 +08:00
Ilya Tregubov
6172d847f5 Merge branch 'MDL-76109-main' of https://github.com/meirzamoodle/moodle 2023-12-06 15:41:19 +08:00
Marina Glancy
aad5cd7c6a MDL-79761 navigation: fix default setting during web installation 2023-12-04 13:04:49 +00:00
Meirza
84b053f088 MDL-76109 core: Don't check password policy for guest user
Besides adding the is_guest() check in the check_password_policy() condition,
I also changed the temporary user ID because the temporary user and
the guest must not share the same ID. Otherwise, it will raise an error.

Co-authored-by: Andrei Bautu <abautu@gmail.com>
2023-11-30 10:35:04 +07:00
Ilya Tregubov
37737a92d6 Merge branch 'MDL-79890-master' of https://github.com/andrewnicols/moodle 2023-11-30 10:44:35 +08:00
Andrew Nicols
53416b1c1e
MDL-80119 core: Address issues with saner inc/dec operators 2023-11-15 09:16:13 +08:00
Andrew Nicols
75587e23c6
MDL-79890 core: Update uses of array_keys with multiple params
These now call the newly minted `moodle_array_keys_filter` method.
2023-11-15 09:14:40 +08:00
Andrew Nicols
0efbc79e5f
MDL-79890 core: Add polyfill for array_keys with filter
This is a Moodle version of a proposed function `array_keys_filter`.

Since this method has not yet been created in upstream PHP, I have
elected to name it with a Moodle prefix as the signature is not known.

In the future, if and when this method is created, we can replace its
content with new method and deprecate it.
2023-11-15 09:14:40 +08:00
Paul Holden
73143443b8
MDL-79996 communication: valid instance checks during user deletion. 2023-11-03 12:54:00 +00:00
Andrew Nicols
0e05d93d3a
MDL-79735 core: Drop PHP 7 support for component_callback 2023-10-17 09:48:48 +08:00
Andrew Nicols
99c1543aa8
MDL-79581 communication: Context is a mandatory field
The API was incorrectly assuming that all uses of the API were for a
course, and that the instanceid of the communication instance was a
course id. These assumptions are both entirely wrong.

The API is intended to support a range of uses including use at the
site, user, and activity levels.

Furthermore, if a group were to be used, then the instanceid should be
of that group's id, and therefore the contextid would need to be fetched
or that group's course instead.

The only solution here is to add a new contextid field to the table, and
implement it all parts of the API.
2023-10-04 20:37:57 +08:00
Sara Arjona
89eae3a811
Merge branch 'MDL-79350-master' of https://github.com/daledavies/moodle 2023-09-28 07:47:55 +02:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Dale Davies
06a9b91e17 MDL-79350 core: Do not store lang in session when readonly 2023-09-18 14:30:14 +01:00
sam marshall
0f8577784d MDL-78467 core_cache: Improve cache locking API
* Makes it possible to safely call acquire_lock so that it throws an
  exception instead of returning false if it can't get a lock (which
  most existing uses assumed it already does).
* Fix some omissions from the requirelockingbeforewrite option (it
  now checks on delete).
* Modinfo uses a versioned cache, so it is not necessary to delete
  items, only increase the version. (Provided we keep track of
  cacherev carefully...)
2023-09-14 09:28:10 +01:00
Stevani Andolo
dbf83c72c7 MDL-70371 core: Defined password length
1. Modified the password related forms
2. Added a new constant in moodlelib.php called MAX_PASSWORD_CHARACTERS
3. Added a new method in moodlelib.php called exeeds_password_length
4. Updated the upgrade.text
2023-09-07 12:29:10 +08:00
Matt Porritt
1560be7b7e MDL-67774 Authentication: Specify password peppers in config.php
Add a pepper to the users supplied password.
The pepper is stored in CFG and user to add extra security to
the password hash. By effectively breaking the information to
create the hashed password into two and storing it in more
than one place.
2023-09-06 13:47:51 +10:00
Jun Pataleta
2e7b5475a7
Merge branch 'MDL-79017' of https://github.com/paulholden/moodle 2023-08-31 20:32:17 +08:00
Andrew Nicols
fa05f66052
Merge branch 'MDL-74810-master' of https://github.com/junpataleta/moodle 2023-08-29 11:12:35 +08:00
Huong Nguyen
59bed31f53
Merge branch 'master_MDL-67390' of https://github.com/mattporritt/moodle 2023-08-28 16:21:35 +07:00
Jun Pataleta
ec90b342da
MDL-74810 core: get_time_interval_string() improvements
* Add parameter to drop zero time units. So a time interval like
  "3d 0h 0s" will be returned as "3d" only.
* Add parameter to display full format for time units. E.g. Instead of
  "3d 2h", it will be returned as "3 days 2 hours"
* Deprecate unused dateintervaldayshoursmins langconfig string.
2023-08-28 16:40:36 +08:00
Matt Porritt
07af783b9a MDL-67390 Authentication: Update password hashing to SHA-512
Replace the bcrypt password hashing algorithm with SHA-512.
Existing bcrypt hashes will be updated to SHA-512 when a user
logs in next. Support for old md5 hashes has been removed.
Any reamining md5 hashes are replaced with SHA-512 hashes
from strong random passwords.
2023-08-25 11:53:54 +10:00