118 Commits

Author SHA1 Message Date
Martin Gauk
695c74ac60 MDL-78297 core: Less cache lookups in deprecated capabilities feature
Avoid use of $cache->has.
2023-06-07 12:36:00 +02:00
Petr Skoda
99a7a7c782 MDL-74954 core: add Hooks based on PSR-14 2023-05-20 11:03:46 +02:00
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
Sara Arjona
ca37dd3baf MDL-76691 core_h5p: Add core lib changes after upgrading it
Apart from applying the points described in readme_moodle.txt, the following
changes have been done too:

- The parameter $folderName from the method libraryToString() have been removed
and a new method, libraryToFolderName() has been added to the H5PCore API.
References to libraryToString() with the $folderName set to true have been
replaced to the new method.
- missing-main-library has been added and replaces in some cases to
missing-required-library.
- The framework saveLibraryData method must be called before saveLibrary
(h5p.classes.php file has been patched to leave the original order because
libraryid is required to save the itemid).
- The getLibraryId() method from H5PCore has been rewritten to use MUC, in
order to avoid PHPUnit failures.
2023-02-06 16:48:07 +01:00
Helen Foster
ae2f8cfa67 MDL-76105 lang: Import fixed English strings (en_fix) 2022-11-17 09:44:35 +00:00
Jun Pataleta
58a92364ed Merge branch 'MDL-70368-cache-image-metadata' of https://github.com/brendanheywood/moodle 2022-10-21 09:07:58 +03:00
Laurent David
bcc18e2439 MDL-55580 core: Process for deprecating a capability
* Add a $deprecatedcapabilities variable to deal with deprecated
capabilities

Change-Id: I14f44d331e8a1c4bd9abe9566c78d911c0205583
Co-authored-by: Mark Johnson <mark.johnson@catalyst-eu.net>
2022-10-11 08:48:17 +01:00
Brendan Heywood
fe88783c0f MDL-70368 files: Cache image dimensions 2022-09-19 13:21:20 +10:00
Sujith Haridasan
aa1c2e2382 MDL-73848 administration: Fix the breadcrumbs and nav highlights
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.

Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
2022-03-25 17:44:47 +08:00
Ferran Recio
c64bef51a9 MDL-73547 core_courseformat: enable course index cache
Adding caches to the course editor reactive state. The patch improve the
course index loading.
2022-02-21 12:33:33 +01:00
Paul Holden
6ed8458eda MDL-65801 lang: final removal of deprecated 37/38 strings.
The following lang strings have been undepecated, as they are still
in use:

* errorcoursewronglypublished, core_hub
* eventrolecapabilitiesupdated, core_role
2022-01-13 09:50:50 +00:00
Eloy Lafuente (stronk7)
c11096576a Merge branch 'MDL-72619-master' of https://github.com/sammarshallou/moodle 2021-11-03 18:15:28 +01:00
David Matamoros
70085ef7ac MDL-72588 reportbuilder: implement audience helpers and classes.
Create the base audience class, to be extended by all audience types
across the site. Implement types allowing audiences to be created per
user, cohort or system role assignment.

The helper class is used for interrogating report audience instances
and retrieving access lists of those users able to view specific
reports.

Co-authored-by: Paul Holden <paulh@moodle.com>
2021-10-29 12:28:24 +02:00
Ilya Tregubov
0350d42610 MDL-71211 core_course: Keep the status of course index. 2021-10-19 13:17:25 +02:00
Amaia Anabitarte
1d4edcb57b MDL-72099 core_contenbank: Add context navigation 2021-10-14 13:04:13 +02:00
sam marshall
1b94bb8c20 MDL-72619 core_cache: Provide admin page to view cache size estimates 2021-10-11 16:49:21 +01:00
Dmitrii Metelkin
2affc87d2b MDL-66667 course: add course image cache 2021-03-15 12:50:35 +11:00
Tomo Tsuyuki
745d4c2a4f MDL-70245 core_grade: Fix grade_get_setting unit test failures
To fix the phpunit issue, change from static variable to use cache
2020-12-10 16:46:09 +11:00
Jordan Tomkinson
ef8dff0565 MDL-69207 core_h5p: Add muc cache support for h5p library files 2020-08-06 02:40:24 +01:00
Helen Foster
98c882132d MDL-68888 lang: Import fixed English strings (en_fix)
Significant string changes: userdata, userdata_help, keptroles,
keptroles_help in core_backup - Clearer wording about how the settings
work.
2020-06-05 08:33:55 +02:00
Jun Pataleta
8aa0f2c4d8 Merge branch 'MDL-45184-master' of git://github.com/junpataleta/moodle 2020-05-26 12:39:24 +08:00
Tom Dickman
4399e4759a MDL-45184 tool_licenses: Add custom licenses
This feature adds an admin tool for creating custom licenses.
Now custom licenses can be added and amended in Moodle, and the site
default can be set to a custom license.

Core licenses remain hard-coded and are uneditable, so they will always
require update within Moodle core updates, and maintain their
internationalisation through core language strings.

This also includes fundamental changes to the license API including
the addition of license caching and deprecation of no longer required
admin settings for license management.
2020-05-26 12:08:05 +10:00
Marcus Boon
f1f5ba36ad MDL-68388 core_grades: Use MUC for grade letters
In the get_grade_letters there is a static variable that is used
to cache grade letters, we should use MUC for this so that it is
reset properly between unit tests.
2020-05-26 09:06:50 +10:00
Sara Arjona
f635915137 MDL-68271 core_h5p: implement localization methods for editor
The following methods have been implemented for supporting
content-type translations:
- H5PEditorAjaxInterface.getTranslations. This method is used for
loading the "Text overrides and translations" section.
- H5peditorStorage.getLanguage. This method is used for displaying
the specific fields and messages for each content-type library.
- H5peditorStorage.getAvailableLanguages. This method is used to
get the language list displayed into the "Text overrides and
translations" section.
2020-05-08 18:18:24 +02:00
Helen Foster
1fce3f52ac MDL-68434 lang: Import fixed English strings (en_fix)
Significant string changes:

* pluginnamesummary,qtype_ddimageortext and
  pluginnamesummary,qtype_ddmarker - Note about the question type not
  being accessible to visually impaired users

* addresourceoractivity,core - Removing 'resource' as the new activity
  chooser doesn't have resource types separated
2020-04-28 14:01:20 +02:00
Amaia Anabitarte
33b8ca26f9 MDL-67786 core_contentbank: New content bank contenttype plugin type
Co-authored by: Ferran Recio <ferran@moodle.com>
2020-04-15 23:45:08 +02:00
Adrian Greeve
cd09777dbd MDL-67262 core_course: Added the ability to recommend activities.
This allows an adminsitrator or a user with
'moodle/course:recommendactivity' to recommend activities in the
activity chooser.
2020-02-24 10:59:55 +08:00
Jake Dallimore
f09e9b887e MDL-67585 core_course: add favouriting to the content item service class 2020-02-20 11:42:22 +08:00
Jake Dallimore
92715acd0c MDL-67585 core: add course content item cache
To be indexed by userid_courseid.
2020-02-20 09:28:57 +08:00
David Monllaó
16cb4f32a0 MDL-66536 analytics: Indicators can add extra data for targets 2019-09-18 13:07:21 +08:00
Mark Nelson
8e86a8d2db MDL-60341 core_cache: show cache definitions that can use local store 2019-08-28 14:00:38 +08:00
Ryan Wyllie
00a66396c7 MDL-66144 course: add function to calculate user course dates 2019-07-17 15:52:51 +08:00
Tim Hunt
376b7fb857 MDL-65492 cache admin: make it easier to purge a cache repeatedly
This can be a big time-saver, e.g. during development.
2019-06-12 13:23:06 +01:00
Ryan Wyllie
76fbbf7e7e MDL-65394 portfolio: add cache for portfolio_add_button 2019-05-01 16:27:34 +08:00
Eloy Lafuente (stronk7)
f991482446 MDL-65348 lang string: updating an outdated lang string 2019-04-30 20:47:11 +02:00
David Monllaó
352ab7464e MDL-65348 analytics: Upcoming periodic from time() 2019-04-29 16:51:04 +02:00
Andrew Nicols
74138e927c Revert "MDL-63466 core_message: rename cache for last message time"
This reverts commit f978593d6c3b98db5b3feb29448a642b4f540edc.
2018-10-26 14:54:01 +08:00
Mark Nelson
f978593d6c MDL-63466 core_message: rename cache for last message time 2018-10-24 09:39:42 +08:00
Sara Arjona
fb04293bb1 MDL-63466 core_message: Add conversation support to get_messages
- The get_conversation_messages has been added to the API and the WS
with the conversation identifier (convid) instead of the userto,
to let get conversation messages and the members involved.
- The cache has been also reviewed, to use the convid instead of the
[userfrom, userto] keys.
- The get_most_recent_conversation_messages has been added to the API
to update the cache when needed.
2018-10-24 09:39:05 +08:00
Andrew Nicols
26bb44e5f4 MDL-61898 core_cache: Implement Privacy API 2018-04-30 14:07:27 +08:00
Martin Gauk
c4172077df MDL-61519 calendar: do not iterate through all categories
Replace calls to \coursecat::get_all() or cache the results.
2018-03-16 14:30:55 +00:00
Mihail Geshoski
25dbbdf90b MDL-61423 authentication: Add digital minor verification upon signup 2018-03-08 15:01:25 +08:00
Shamim Rezaie
0897d6588e MDL-60188 groups: cache user's groups and groupings
The function groups_get_user_groups is called too often both before rendering the page and after the page is rendered (using ajax).
The function was executing a query joining 3 tables in each call. The plementation of the function has now modified to store the
query result in a request cache.
2017-11-27 10:46:35 +08:00
David Monllao
1611308b58 MDL-57791 analytics: Changes after review
- Split model::predict in parts
- JS promises updated according to eslint-plugin-promise
- New API methods replacing direct DB queries
- Reduce insights nav link display cost
- Increase time limit as well as memory for big processes
- Move prediction action event to core
- Dataset write locking and others
- Refine last time range end time
- Removed dodgy splitting method id to int
- Replace admin_setting_predictor output_html overwrite for write_setting overwrite
- New APIs for access control
- Discard invalid samples also during prediction
2017-07-24 08:36:49 +02:00
David Monllao
f96488df66 MDL-57791 testing: Add missing cachedef lang string 2017-07-24 08:36:18 +02:00
Jake Dallimore
bb931788cc Merge branch 'MDL-59142-master' of git://github.com/lameze/moodle 2017-06-14 12:38:11 +01:00
Damyon Wiese
ddce4f4ba9 MDL-58136 cache: Add a course completion cache
The last change added 1 db read per course per page which is not OK. Add a cache to compensate.
2017-06-13 10:03:00 +08:00
Simey Lameze
4cc2f33b08 MDL-59142 core_theme: cache post-processed css
Thanks Cameron Ball for the base patch
2017-06-13 09:35:35 +08:00
Tony Levi
e705e69e7f
MDL-49398 accesslib: Simplify role definition loading and cache
This change removes the complex and partial loading of role definition data for users.
It is replaced by keeping one system-wide definition for each role in MUC.

This is cheaper to regenerate as it avoids complex database queries (repeated LEFT JOIN to context).
Memory usage is kept low thanks to array CoW for each user access data.
2017-06-02 07:53:23 +01:00
Damyon Wiese
7e8940b544 MDL-40759 fontawesome: Use a cache
Cache the callback info.
2017-03-21 10:51:41 +08:00