102 Commits

Author SHA1 Message Date
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
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
Ryan Wyllie
00a66396c7 MDL-66144 course: add function to calculate user course dates 2019-07-17 15:52:51 +08:00
Ryan Wyllie
76fbbf7e7e MDL-65394 portfolio: add cache for portfolio_add_button 2019-05-01 16:27:34 +08:00
David Monllaó
352ab7464e MDL-65348 analytics: Upcoming periodic from time() 2019-04-29 16:51:04 +02:00
Sara Arjona
c654e35007 MDL-63677 core_user: Avoid redirection during signup
Purge cache just for the current user to avoid redirection when 2
simultaneous users try to sign up at the same time and some policy
has to be agreed.
The 'createduser' invalidation event has been removed also because
is not used any more.
Thanks John Azinheira for spotting it!
2019-01-11 10:20:59 +01: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
Mihail Geshoski
204178d646 MDL-61707 authentication: Remove presignup session upon user signup 2018-07-23 09:33:08 +08:00
Andrew Nicols
b30b66c57e MDL-61519 coursecat: Reset the coursecat cache on enrolment 2018-03-21 09:06:51 +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
40fcb365c3 MDL-58859 analytics: Subsystem and API db/ requirements added
Part of MDL-57791 epic.
2017-07-24 07:53:17 +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
Mark Nelson
ffd7798c96 MDL-56139 core: changes after peer review
- No longer use the Fibonacci sequence for delaying the timeout.
  It is too aggressive.
- The backoff_timer AMD module now expects the callback AND the
  backoff function to be passed to the constructor.
- Added ability to specify polling frequency in config.php.
- Added helper function to return the cache key.
- Reworded the parameters for clarity.
2016-11-16 10:22:52 +08:00
Ryan Wyllie
fb1469d84f MDL-56139 message: ajax poll for new messages in message area 2016-11-16 10:22:33 +08:00
Ankit Agarwal
20ab51fdbc MDL-56409 messages: Save one db query per page load 2016-11-08 12:50:30 +05:30
sam marshall
5c2ef08fa3 MDL-55628 Completion: Use simpledata for completion cache
The completion cache is currently not marked as simpledata. On the
course page it is frequently retrieved hundreds of times which results
in many calls to the slow unserialize function. By making a slight
change to the data format (using arrays instead of objects) we can
mark it as simpledata, which will avoid using unserialize.
2016-08-22 17:13:36 +01:00
Marina Glancy
4218ad9371 MDL-53363 tags: helper to search for tagged items; search course modules 2016-04-11 13:22:47 +08:00
David Monllao
9470e4d1ed MDL-53272 search: Remove search results cache 2016-04-04 15:38:03 +08:00
David Monllao
8f8517ec1f MDL-53543 cache: Invalidate grade_categories by event
We can switch the cache to session level if we are able to purge
different users caches, not only the one that belongs to the user
updating a grade category.
2016-03-18 10:02:05 +08:00
David Monllao
f18561a2e2 MDL-51374 dml: simpledata to temp_tables cache 2016-03-16 13:43:36 +08:00
David Monllao
ef474575e1 Merge branch 'MDL-51374-master-new' of git://github.com/lameze/moodle
Conflicts:
	lib/db/caches.php
2016-03-16 10:13:14 +08:00
Simey Lameze
26e7eceefc MDL-51374 cache: add temp_tables cache definition
Also a helper method get_temp_tables_cache() has been created for temporary tables cache operations.
2016-03-15 10:57:43 +08:00
David Monllao
28774c9263 MDL-48838 grades: New grade_categories cache 2016-03-14 11:20:35 +08:00
Eloy Lafuente (stronk7)
d9dfc410ad Merge branch 'wip-MDL-53172-master' of https://github.com/marinaglancy/moodle 2016-03-01 01:59:31 +01:00
Dan Poltawski
9b44810fbf Merge branch 'MDL-53213' of https://github.com/mr-russ/moodle 2016-02-29 15:37:25 +08:00
Andrew Nicols
ae3c6ee42d MDL-52346 caching: Coding style fixes 2016-02-29 14:14:01 +08:00
Andrew Nicols
8bd28ed696 Merge branch 'MDL-52346' of git://github.com/mr-russ/moodle 2016-02-29 14:12:03 +08:00
Russell Smith
d22a01fd99 MDL-53213 caching: Faster databasemeta caching for all databases. 2016-02-28 17:03:14 +11:00
Marina Glancy
8de48ad0ae MDL-53172 core: toggle and select in inplace_editable 2016-02-27 11:29:24 +08:00
Russell Smith
4350192a8d MDL-52346 caching: Allow localstorage as a cache option.
We display a notification on screen during configuration telling
the administrator if it's safe to map this store to a local storage
cache or not.
2016-02-26 10:58:20 +11:00
David Monllao
db48207e1a MDL-31989 search: Search API and search engine API
Introducing both APIs in moodle along with:
- search_box widget to add a tiny search box
- admin settings with setup steps helper
- cache for search results
- template for a search result
- php unit stuff

Many thanks to Tomasz Muras, Prateek Sachan and Daniel Neis for their contributions, for starting this development
and for pushing for it to be completed. Also thanks to other contributors: Jonathan Harker and eugeneventer.
2016-02-23 10:47:58 +00:00
Marina Glancy
c026a28d59 MDL-50851 core_tag: introduce tag collections 2016-01-10 15:25:43 +08:00
Marina Glancy
a6d4a36388 MDL-41042 coursecat: better handle changes in coursecontact 2015-10-07 10:15:19 +08:00
Marina Glancy
a039418383 MDL-50303 cache: removed unused cache definition 2015-08-13 11:56:53 +08:00