Commit graph

91442 commits

Author SHA1 Message Date
Mark Johnson
4c0a87629f MDL-64889 completion: Fix performance of get_course_progress_percentage 2019-02-18 14:06:37 +00:00
willem
fb5836b42e MDL-55135 competencies: fix capabilities managing course competencies
Capability check in a course was using global competency capabilities 
moodle/competency:competencyview and  moodle/competency:competencymanage 
instead of the course equivalents. Users outside the course context 
could not manage course competencies.
2019-02-18 10:51:02 +01:00
AMOS bot
8fd354bc92 Automatically generated installer lang files 2019-02-16 00:14:07 +00:00
David Mudrák
8374e2db3f MDL-64452 cache: Add tests for key prefix based on session id
Unfortunately, we can't simply use session_id() to regenerate the
session id in unit tests. Starting from PHP 7.2, it would trigger
"session_id(): Cannot change session id when headers already sent",
refer to MDL-60978 and PHP bug #75628 for more details.

As a workaround, we use a static property allowing us to inject the
value that we then use as a session identifier. This is reasonably
enough to make sure that the identifier is used as a part of the key
prefix.
2019-02-15 09:38:09 +01:00
David Mudrák
c4f137749d MDL-64452 cache: Always use the current session id in the key prefix
The current logic in the cache_session::check_tracked_user() is not
right. We must always set the current session id. A typical use case is
when the cache instance is instantiated for a not logged in user. We
can't let the sessionid property null in that case as it forms an
important part of the parsed key.

Similarly, even if we have the same user currently loaded, we must still
set the sessionid to make sure the data will be associated with the
current PHP session. Same user (including visitors or guest users) can
access the site from different browsers and each must end up with its
own key prefix.
2019-02-15 09:38:09 +01:00
David Monllaó
18735c9f51 MDL-64679 tool_analytics: Allow trained models to be cleared 2019-02-15 08:43:34 +01:00
Damyon Wiese
77474f4733 MDL-64863 tool_lp: Progress if needed
Do not immediately show progress bars since most operations work
in under a second. This will use the default timeout (5 seconds)
before showing progress bars.
2019-02-15 09:10:29 +08:00
Andrew Nicols
41a15e6d73 weekly release 3.5.4+ 2019-02-15 08:29:24 +08:00
Andrew Nicols
bcd2debd4e Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-02-15 08:29:22 +08:00
Stephen Bourget
4440ca8121 MDL-64856 mod_glossary: Always show the settings cog on the view page. 2019-02-14 12:47:01 -05:00
Jun Pataleta
4d67bcdb5e Merge branch 'MDL-64736-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-02-14 15:00:42 +08:00
Jun Pataleta
af3214adae Merge branch 'MDL-63892-35-rework' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2019-02-13 21:00:46 +08:00
Michael Hawkins
a3f16eb4ea MDL-63892 mod_forum: Behat update for post order 2019-02-13 16:47:46 +08:00
Jun Pataleta
579700dcf4 Merge branch 'MDL-64835-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-02-13 16:27:00 +08:00
Andrew Nicols
ea2ed45ec7 Merge branch 'MDL-64714-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2019-02-13 11:25:24 +08:00
Andrew Nicols
c35399cc17 Merge branch 'MDL-63892-35-rework' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2019-02-13 10:19:56 +08:00
Andrew Nicols
f0f468ba1f MDL-64835 JS: Reduce cache invalidation checks
The cache invalidation check was previously occuring every time either
the `set` or `get` function was called on the cache. However, the cache
invalidation check is based on the jsrev which is static for the
lifetime of the page.

This change moved the invalidation to happen during the setup of the AMD
module such that it only happens one time per storage type (Local +
Session).
2019-02-13 10:13:56 +08:00
Andrew Nicols
8bb8d213db MDL-64835 JS: Stop using the jsrev in the jsrevPrefix
We only use the jsrevPrefix to determine if the cache should be
invalidated, but the prefix that we were using is based on the new
jsrev.

For example, the jsrevPrefix will be:

    hash(wwwroot + '/ + config.jsrev) + '/jsrev'

Where config.jsrev is the _current_ (new) jsrev.

As a result when searching for the jsrev used to store the data which is
currently in the storage cache, no key is returned, and we instead set
an 'initial' value and the cache is not cleared

This patch changes the jsrevPrefix to be:

    hash(wwwroot) + '/jsrev'

Since the wwwroot does not change, the key remains static for the
current site. As a result, when the jsrev is bumped via a Moodle cache
purge, we are able to correctly fetch the old jsrev from the cache,
determine that the jsrev has changed, and purge the cache.
2019-02-13 10:13:56 +08:00
AMOS bot
a75f2c2f1b Automatically generated installer lang files 2019-02-13 00:11:52 +00:00
Eloy Lafuente (stronk7)
85da5ed5e2 Merge branch 'MDL-64420-2_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-02-12 12:56:46 +01:00
David Monllaó
82b6519647 Merge branch 'MDL-64590_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-02-12 12:47:06 +01:00
David Monllaó
799e4e2fbf Merge branch 'MDL-64730-lti-adv-0score-35' of https://github.com/CengageEng/moodle into MOODLE_35_STABLE 2019-02-12 12:33:38 +01:00
John Beedell
ecbcbb2a7f MDL-64420 qtype: gapselect unit tests unsafe 2019-02-12 11:27:01 +00:00
David Monllaó
6699b20eb9 MDL-63706 tasks: Fix typo in pathtophp 2019-02-12 09:49:51 +01:00
David Monllaó
5af18c34e3 Merge branch 'MDL-63706_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2019-02-12 09:46:39 +01:00
David Monllaó
fb911d3422 Merge branch 'MDL-32096-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-12 09:41:45 +01:00
Andrew Nicols
895ec79efd Merge branch 'MDL-64291_35' of https://github.com/KietChan/moodle into MOODLE_35_STABLE 2019-02-12 10:55:53 +08:00
Jun Pataleta
7ccf3ebdf2 Merge branch 'MDL-64493-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-12 10:10:28 +08:00
Andrew Nicols
e3c4a1fc9f MDL-64736 course: Rewrite behat step to avoid changing a checkbox 2019-02-12 07:43:54 +08:00
Eloy Lafuente (stronk7)
1bcf9c913f Merge branch 'MDL-61326-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-12 00:20:43 +01:00
Peter
ecf8e7eda9 MDL-61326 repository_equella: Pass proper labels for roles with no name 2019-02-12 07:11:16 +08:00
Eloy Lafuente (stronk7)
9b6f09eeeb Merge branch 'MDL-64694_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-02-12 00:10:35 +01:00
Eloy Lafuente (stronk7)
83e40aa825 Merge branch 'MDL-64606-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-02-12 00:02:44 +01:00
Eloy Lafuente (stronk7)
008121e57f Merge branch 'MDL-64238-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-11 23:57:18 +01:00
Peter
67bc6c6ebb MDL-64238 mod_quiz: Check enrollment on calendar_action generator
* Updated unit tests to account for participants
2019-02-12 06:26:23 +08:00
Peter
649ffed15d MDL-64238 mod_lesson: Check enrollment calendar_action generator
* Updated unit tests to account for participants
2019-02-12 06:26:23 +08:00
Eloy Lafuente (stronk7)
57ac26edae Merge branch 'MDL-64725-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-02-11 17:05:02 +01:00
Eloy Lafuente (stronk7)
f05e71a443 Merge branch 'M3.5-MDL-64599' of https://github.com/marcusboon/moodle into MOODLE_35_STABLE 2019-02-11 12:51:20 +01:00
Eloy Lafuente (stronk7)
0cccbe18f2 Merge branch 'MDL-64385-35' of git://github.com/aanabit/moodle into MOODLE_35_STABLE 2019-02-11 12:35:43 +01:00
Sara Arjona
861b48d332 Merge branch 'MDL-64031-35' of https://github.com/lethevinh/moodle into MOODLE_35_STABLE 2019-02-11 12:33:21 +01:00
David Monllaó
5719590cb1 Merge branch 'MDL-64391_35' of git://github.com/vmdef/moodle into MOODLE_35_STABLE 2019-02-11 11:09:35 +01:00
Sara Arjona
571b22a693 Merge branch 'MDL-48338-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-02-11 10:41:31 +01:00
David Monllaó
603aaf66c4 Merge branch 'MDL-62666-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-02-11 09:49:00 +01:00
Tim Hunt
99f29e2580 MDL-64242 qtype_essay: more efficient query in restore code
Thanks to Juan Ibarra for the suggestion that lead to this fix.
2019-02-11 08:40:57 +00:00
Andrew Nicols
3ae9b14420 Merge branch 'MDL-64597-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-02-11 16:34:56 +08:00
Jun Pataleta
302a14d287 Merge branch 'MDL-64488-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-11 16:05:20 +08:00
Jun Pataleta
1e41439336 Merge branch 'MDL-64644_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2019-02-11 15:28:29 +08:00
Shamim Rezaie
b8ddf80ca6 MDL-63134 mod_chat: Check if the module is visible to the user 2019-02-11 16:10:41 +11:00
Shamim Rezaie
d2abeb3b3c MDL-63134 mod_chat: Add userid param to mod_chat calendar callbacks 2019-02-11 16:10:41 +11:00
AMOS bot
fd0bbd3201 Automatically generated installer lang files 2019-02-10 00:10:24 +00:00