3073 Commits

Author SHA1 Message Date
Mark Johnson
958da5b67e MDL-68093 groups: Add visibility and participation settings
These new settings are designed to enchance user privacy surrounding
groups. They allow groups to be configured so that users outside the
group cannot see the group, so that users in the group cannot see each
other, or so that users cannot see the group at all, even if they are in
it. This avoids issues where a group may be assigned based on sensitive
personal information (such as a person requiring special arrangements
due to a disability).

By default, groups are visible to all and available for participation in
activities, which maintains the current behaviour.

For performance, a new cache has been added to track the number of
groups on a course that are not visible to non-members. This allows us
to revert to the existing behaviour if the new features are not being
used at all on a course, and only apply the new visibility conditions if
they are.

Users who have the moodle/course:viewhiddengroups capability should be
concious of exposing hidden groups when showing their screen to other
users. The "Switch role to..." feature can be used to show a course page
on screen without exposing private availability conditions, for example.

The changes cover several specific areas:
* grouplib functions, which most code should use to get lists of groups
  and members (this includes the participants page).
* Activities supporting group overrides will not allow overrides for
  groups that are hidden from all users.
* Activities supporting separate/visible groups modes will only allow
  groups with the new "participation" flag enabled to be selected.
* Group messaging will be disabled for groups where members cannot see
  each other, or cannot see the group at all.
2023-03-14 08:52:25 +00:00
Andrew Nicols
9ec46c232d MDL-77186 core: Move all uses of cronlib to new class 2023-03-13 21:21:13 +08:00
Jun Pataleta
8441270181 Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle 2023-03-09 16:02:01 +08:00
Andrew Nicols
5ae44ff9d3 Merge branch 'MDL-77467' of https://github.com/timhunt/moodle 2023-03-09 10:46:36 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Tim Hunt
497c527e98 MDL-77467 retore: add progress tracking to potentially slow steps 2023-03-02 15:36:28 +00:00
Jun Pataleta
916503658d Merge branch 'MDL-75012-master-5' of https://github.com/andrewnicols/moodle 2023-03-02 12:34:34 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Jun Pataleta
6802f6b7f4 Merge branch 'MDL-76938_restore_comments' of https://github.com/davosmith/moodle 2023-03-02 08:42:15 +08:00
Tim Hunt
1ee7f41762 MDL-76897 quiz: streamline initalisation of $quiz, $cm, $course 2023-02-27 18:41:55 +00:00
Ilya Tregubov
414d3cdd5f Merge branch 'MDL-68347-master-2' of https://github.com/marinaglancy/moodle 2023-02-21 10:06:39 +08:00
Marina Glancy
c184b2d284 MDL-68347 course: trigger event if user was created during restore 2023-02-20 10:20:00 +00:00
Tomo Tsuyuki
9e725bc168 MDL-45301 assign: Add font options for EditPDF 2023-02-17 15:30:25 +11:00
Andrew Nicols
18073fe93b Merge branch 'MDL-74698' of https://github.com/jonof/moodle 2023-02-16 11:06:33 +08:00
Matthew Hilton
49c4cfb2d5 MDL-73317 restore: Reset navcache before closing session
As part of a restore, the session is closed early so it does not
interrupt the users session during the restore.

Currently the restore controller rebuilds the course caches while
restoring. This inadvertently resets the navcache, which would edit the
session despite it being closed.

Because this tracker now adds logging for this behaviour, it means
restoring now outputs a debugging message as a warning.

To resolve the debugging message, the navcache is now reset just before
closing the session. This is allowed, since the caches are designed
to be volatile.
2023-02-09 12:03:49 +10:00
Jonathon Fowler
d9bc9af91a MDL-74698 backup: correctly restore course format options
Old-version backups (< 3.11.7, < 4.0.1) lose their course-level format
options when restoring into newer versions after the backup structure
was changed.

Also, course-level format options were not accurately restored against
the appropriate format type. And section-level format options were
redundantly stored at course-level and restored without mapping their
sectionids, thus creating lint.
2023-02-03 10:17:05 +10:00
Davo Smith
b395c3f63b MDL-76938 backup: fix restore of comments linked to a course format 2023-01-26 12:31:13 +00:00
Sara Arjona
ae53d04144 Merge branch 'MDL-75337-master' of https://github.com/laurentdavid/moodle 2023-01-24 16:07:35 +01:00
Laurent David
fc72a1d7b1 MDL-75337 core: Single button - core changes
* Change all core calls toward single_button to use single_button::BUTTON_PRIMARY
    when needed
2023-01-24 06:01:35 +01:00
Andrew Nicols
7000a99de3 MDL-76362 core: Coding style fixes 2023-01-23 09:15:55 +08:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Tim Hunt
3b23ff6fec MDL-76810 redirect handling: ensure return URLs are properly sanitised 2023-01-11 11:42:28 +08:00
Tim Hunt
a9f8547599 MDL-76614 quiz: rename quiz => mod_quiz\quiz_settings 2023-01-06 14:35:54 +00:00
Tim Hunt
5682c8c70e MDL-76614 quiz: move class quiz_attempt => mod_quiz\quiz_attempt
I thought about renaming the class to just plain attempt, but I
acutally think quiz_attempt makes it clearer what this is. Also
not changing the name massively reduces the pain for everyone
updating their code (including me right now!)
2023-01-06 14:35:51 +00:00
Sara Arjona
315f1dafd8 Merge branch 'MDL-76193-master' of https://github.com/JBThong/moodle 2022-12-07 17:26:11 +01:00
Andrew Nicols
425d4f2583 Merge branch 'MDL-75573' of https://github.com/paulholden/moodle 2022-12-06 13:54:26 +08:00
Sara Arjona
46114474e4 Merge branch 'MDL-75789' of https://github.com/paulholden/moodle 2022-12-05 12:53:36 +01:00
Thong Bui
79d1b45ba7 MDL-76193 Questions: Backup and Restore with tags fails 2022-12-05 10:00:37 +07:00
Paul Holden
be83010d4f MDL-75573 backup: translate async operation type in messages. 2022-12-01 19:48:29 +00:00
Ilya Tregubov
9ba9589f09 Merge branch 'MDL-74853-master' of https://github.com/marinaglancy/moodle 2022-12-01 08:55:34 +03:00
Paul Holden
e5c6575bbd MDL-75789 restore: multi-byte safe substring calculating course names.
Co-authored-by: Leon Stringer <leon.stringer@ntlworld.com>
2022-11-29 08:32:22 +00:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Eloy Lafuente (stronk7)
b2ffea4ac0 MDL-76496 backup: Bump release to 4.2 2022-11-26 23:56:08 +01:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Adrian Greeve
f865b326ca Merge branch 'MDL-76099-master' of https://github.com/stevandoMoodle/moodle 2022-11-11 12:26:12 +08:00
Paul Holden
8aaede0e7d MDL-75862 backup: omit sesskey for continue buttons using get method.
It's automatically added by the rendered single_button instance when
using post method, so no need to add it unconditionally.
2022-11-10 10:17:04 +08:00
Jake Dallimore
36a0c85187 MDL-76099 core_backup: set selected overflow node in restore and copy
These pages sit under the 'restore' and 'copy' menu items respectively
but the selected menu item isn't correct because the 'restore.php' and
'copyprogress.php' page URLs don't match the node action for their
respective 'restore' and 'copy' nodes. Force set the selected node in
each case to resolve this.
2022-11-09 15:15:50 +08:00
Frédéric Massart
3345519b48 MDL-74201 backup: Restore reference to content bank files 2022-11-08 20:13:14 +01:00
Sara Arjona
4cf81fd3c2 Merge branch 'MDL-73030' of https://github.com/paulholden/moodle 2022-10-24 15:47:21 +02:00
Ilya Tregubov
057f732bf1 Merge branch 'MDL-58266-master' of https://github.com/JBThong/moodle 2022-10-17 12:51:59 +03:00
Matthew Hilton
cfb643293c MDL-56567 competency: Course module competency option to override grade
Previously, if a course module had already been graded, course module
completion linked to the course module would not update. This
commit adds the option to enable overriding the grade at the course
module competency level.

This ensures that if enabled and a user completes a module associated
with a competency, that competency will be graded appropriately.
2022-10-17 08:00:20 +10:00
hieuvu
c6e018e04e MDL-58266 core_completion: Add new view table. 2022-10-14 00:30:28 +07:00
Marina Glancy
41b93bd7e5 MDL-73424 general: Internal methods must have same type as parent
Otherwise the error is thrown in PHP8.1
2022-10-10 16:46:13 +02:00
Paul Holden
65f9976478 MDL-73030 backup: case-insensitive detection of Moodle backups. 2022-10-03 09:32:17 +01:00
Jake Dallimore
ad46fbf76c Merge branch 'mdl75668' of https://github.com/danmarsden/moodle 2022-09-28 16:34:12 +08:00
Dan Marsden
ddcd4de74d MDL-75668 backup: Save context mapping of duplicate blocks. 2022-09-07 12:38:56 +12:00
David Mudrák
aa49eb24fb MDL-75553 lang: Fix Behat regressions in scenario files 2022-09-06 21:47:18 +02:00
Philipp Memmel
9a8e108655 MDL-75092 backup: Fix selector for adding select all/none link 2022-08-19 17:17:29 +02:00
Tim Hunt
8babdbd396 MDL-74608 activities: a new option to force the activity language
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
2022-08-15 22:15:52 +01:00