Compare commits

...

522 Commits

Author SHA1 Message Date
Sara Arjona 4d3a32dde9 Moodle release 3.6.3 2019-03-08 11:03:15 +01:00
AMOS bot bba5a34bc2 Automatically generated installer lang files 2019-03-08 00:15:20 +00:00
Eloy Lafuente (stronk7) 5c592fcf75 weekly release 3.6.2+ 2019-03-07 16:42:00 +01:00
Eloy Lafuente (stronk7) 763f673820 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-03-07 16:41:57 +01:00
Adrian Greeve 09f9f81835 Merge branch 'MDL-63905_36' of git://github.com/jmvedrine/moodle into MOODLE_36_STABLE 2019-03-07 09:13:00 +08:00
Andrew Nicols 5ee3cbc624 MDL-64410 access: Unit tests for context locking SQL 2019-03-06 12:36:26 +01:00
Andrew Nicols 90c2e5e707 MDL-64410 access: Check for context locking in cap functions 2019-03-06 12:36:26 +01:00
Jun Pataleta f33bc18d2d Merge branch 'MDL-64333_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-03-06 17:34:02 +08:00
Mark Nelson 00ee6158fc MDL-64333 core_message: add migration message to new UI 2019-03-06 17:26:24 +08:00
Andrew Nicols da40ba154c Merge branch 'MDL-64774-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-03-06 15:46:33 +08:00
Jean-Michel Vedrine 5f9d6e34a3 MDL-63905 qtype_multianswer: validate imported questions 2019-03-06 08:38:21 +01:00
Andrew Nicols 552877454c Merge branch 'MDL-64950-36-2' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-03-06 13:47:54 +08:00
Jun Pataleta 732698302e MDL-64950 core: Handle username in a case-insensitive fashion 2019-03-06 12:46:01 +08:00
Jun Pataleta c4d39ba7d7 MDL-64950 core: Unit tests for get_complete_user_data() 2019-03-06 12:46:01 +08:00
Jun Pataleta 3ca7a701a6 MDL-64950 login: core_login_validate_forgot_password_data() unit tests 2019-03-06 12:46:01 +08:00
Andrew Nicols e389c5cd31 MDL-64971 access: Ensure that the capability exists when fetching 2019-03-06 10:15:55 +08:00
Jun Pataleta 7766baeb63 MDL-64774 user: Make email query case-insensitive 2019-03-06 09:00:18 +08:00
Jun Pataleta 5f779f05e8 MDL-64774 user: Better unit tests for updating users with similar emails 2019-03-06 09:00:18 +08:00
AMOS bot be998e5e63 Automatically generated installer lang files 2019-03-06 00:09:32 +00:00
Eloy Lafuente (stronk7) 8971a35e38 Merge branch 'MDL-64943_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-03-05 22:49:43 +01:00
Eloy Lafuente (stronk7) f6d98c3c8d MDL-64943 behat: fix some remaining uses of old strings 2019-03-05 17:02:08 +01:00
Eloy Lafuente (stronk7) 70602491f6 Merge branch 'MDL-64943-36-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-03-05 11:09:27 +01:00
Jun Pataleta b6f517c251 Merge branch 'MDL-62465-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-03-05 15:30:17 +08:00
Adrian Greeve 7ea5221a52 Merge branch 'MDL-64342-36' of git://github.com/cescobedo/moodle into MOODLE_36_STABLE 2019-03-05 15:02:00 +08:00
Damyon Wiese 7dac132efc MDL-62465 assign: Remove behat step
We don't need to open the menu to choose the "Grade" item, we can just click the button.
2019-03-05 14:49:02 +08:00
Adrian Greeve d9bb99f336 Merge branch 'MDL-64864-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-03-05 14:26:16 +08:00
Adrian Greeve 248639d3ae Merge branch 'MDL-64678-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-03-05 13:52:53 +08:00
Andrew Nicols 45f4d171d4 Merge branch 'MDL-64961-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-03-05 13:24:47 +08:00
Andrew Nicols fdb8f40617 Merge branch 'MDL-64981_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-03-05 13:22:35 +08:00
Shamim Rezaie 5226cc8a50 MDL-64830 core_calendar: Do cap check on event edit form 2019-03-05 04:16:40 +01:00
Damyon Wiese 1fc481dd7b MDL-64651 comments: Do not send referrer
Use blanktarget option on all comments to prevent malicious links.
2019-03-05 04:16:40 +01:00
Viktor cd3060d941 MDL-62702 core_lib: fix broken verification signature 2019-03-05 04:16:40 +01:00
Mark Nelson 868a80972c MDL-62702 core_lib: updated the 'ltiprovider' readme_moodle.txt 2019-03-05 04:16:40 +01:00
Brendan Cox 430f685834 MDL-62702 core_lib: parameters in POST override other LTI values
This fixes an exploit where you could alter the 'Content-Type' of the
request and bypass the case-sensitive check 'strstr'. For example,
setting it to 'application/x-www-FORM-urlencoded'. However, changing
this to use 'stristr' was also not an acceptable approach as you
could also bypass it by setting the value to 'multipart/form-data'.
2019-03-05 04:16:40 +01:00
Ryan Wyllie a37e26d2ef MDL-63786 core: set $CFG->forceclean for logged in as sessions
Turn on the forceclean config setting when a user is logged in as a
different user. This is a precautionary measure, which forces all
user submitted content to be cleaned of JavaScript before rendering
it to the logged in as user.
2019-03-05 04:16:40 +01:00
Luca Bösch 7f22b14efb MDL-64706 theme_boost: Remove logo link in secure template 2019-03-05 04:16:40 +01:00
Jun Pataleta 78fa8d7e8e Merge branch 'MDL-64652-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-03-05 11:13:40 +08:00
Adrian Greeve c355be438d Merge branch 'MDL-64941-36' of https://github.com/MartinGauk/moodle into MOODLE_36_STABLE 2019-03-05 11:10:27 +08:00
Andrew Nicols c2a6c7c134 MDL-64652 mod_data: Break LEFT JOINs to multiple INNER 2019-03-05 10:14:15 +08:00
Andrew Nicols 309931c876 MDL-64652 glossary: Break LEFT JOINs to multiple INNER 2019-03-05 10:14:15 +08:00
Andrew Nicols 445deddb96 MDL-64652 forum: Use an inner join when fetching ratings 2019-03-05 10:14:15 +08:00
Andrew Nicols 842723567c MDL-64652 rating: Add optional inner join option to sql 2019-03-05 10:14:12 +08:00
Andrew Nicols 28fc193cf6 MDL-64652 mod_forum: Performance improvement for provider
There are possibly some further improvements that can be made to:
- export_discussion_data
- export_all_posts
2019-03-05 10:13:16 +08:00
Adrian Greeve 650d667817 Merge branch 'MDL-64863-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-03-05 09:53:37 +08:00
Jun Pataleta 4dcbcc6f93 Merge branch 'MDL-62143-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-03-05 09:44:46 +08:00
Damyon Wiese 781b8153dd MDL-64864 core_competency: Include course category
These courses are passed through to the course_summary_exporter which
requires a category id in each course record.
2019-03-05 08:53:24 +08:00
Damyon Wiese 6cc9fd7dc1 MDL-64678 assign: More ios touch
Only disable touch scrolling when the touch event is within the drawing region of the canvas.
2019-03-05 08:47:04 +08:00
AMOS bot d1a13ec7ce Automatically generated installer lang files 2019-03-04 00:09:44 +00:00
cescobedo 9779a220fa MDL-64342 core_message: make ajax call when privacy setting is changed
Only fire ajax request when the privacy setting value is changed.
2019-03-03 23:35:38 +01:00
sam marshall 68157ec22f MDL-64961 REST web service: Fatal error in error handler 2019-03-01 11:57:33 +00:00
Tim Hunt 4ed6bb0c22 MDL-64981 dml tests: pgsql_native_recordset_testcase port number 2019-03-01 11:13:16 +00:00
Martin Gauk f484cf49c4 MDL-64941 qtype_multianswer: keep order of existing wrapped questions 2019-03-01 09:49:26 +00:00
AMOS bot fdd78199a2 Automatically generated installer lang files 2019-03-01 00:15:45 +00:00
David Mudrák 7be07980d9 MDL-64943 lang: Fix regression in the test caused by the reworded string 2019-02-28 19:58:41 +01:00
Eloy Lafuente (stronk7) b39b8eb2f5 weekly release 3.6.2+ 2019-02-28 18:51:48 +01:00
Eloy Lafuente (stronk7) 9d3bcd1abf Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-02-28 18:51:45 +01:00
David Mudrák d2a16b6e81 MDL-64943 lang: Fix regressions in Behat caused by reworded strings 2019-02-28 17:58:03 +01:00
Helen Foster 9fb3f4ca10 MDL-64943 lang: Import fixed English strings (en_fix)
Significant string changes:

* importgroups_help,core_group - Correcting optional fieldnames
  (removing picture, hidepicture and adding groupidnumber, groupingname
  and enablemessaging)

* penaltyforeachincorrecttry_help,core_question - additional paragraph
  about scoring logic

* resultdownloadready,tool_dataprivacy - wording corrected (no need to
  go to a download page)

* auth_dbfielduser,auth_db - varchar data type requirement
2019-02-28 17:55:05 +01:00
Eloy Lafuente (stronk7) 0130945cf5 Merge branch 'MDL-64444-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-02-28 01:21:10 +01:00
Eloy Lafuente (stronk7) e7bf9748c5 Merge branch 'MDL-64878-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-27 19:01:03 +01:00
Sara Arjona 2dd56328a7 Merge branch 'MDL-55135-36-competencies-manage-in-coursecontext' of https://github.com/wjroes/moodle into MOODLE_36_STABLE 2019-02-27 11:51:42 +01:00
Sara Arjona 352ed37ac4 Merge branch 'MDL-62454-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-02-27 08:58:11 +01:00
Andrew Nicols c4edcf9960 Merge branch 'MDL-64889_36_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_36_STABLE 2019-02-27 14:43:54 +08:00
Andrew Nicols 7b0134f69d Merge branch 'wip-36-MDL-62345' of https://github.com/adpe/moodle into MOODLE_36_STABLE 2019-02-27 14:14:02 +08:00
Andrew Nicols a1eb4ad4d3 Merge branch 'MDL-63674-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-02-27 13:01:46 +08:00
Damyon Wiese 7cd7f20202 MDL-64878 grades: Update delete_instance
When grades are deleted, it needs to know the context so any files
in the gradebook can be deleted. This means module delete_instance
functions must delete the grade_item before they delete the module record.
2019-02-27 10:40:02 +08:00
Damyon Wiese 1a3faa11b7 MDL-64878 grades: Rebuild cache on import
When the course module cache is out of date during a gradebook re-calculcation it throws
throws exceptions because the module cannot be found. This prevents access to gradebook or
any type of grading functions until the cache is rebuilt.

When the cache still has no module record we log an error and return the course context.
2019-02-27 10:40:02 +08:00
Andrew Nicols 8152908f69 Merge branch 'MDL-64591_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-02-27 09:54:51 +08:00
AMOS bot aca4c2a49c Automatically generated installer lang files 2019-02-27 00:09:43 +00:00
Eloy Lafuente (stronk7) 24ffbc4e2b Merge branch 'MDL-63417-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-02-26 23:19:12 +01:00
Sara Arjona aa1279b7cf Merge branch 'MDL-43428-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-02-26 14:09:06 +01:00
Tim Hunt 2cbf3ea580 MDL-64591 User tours: don't show during redirects & other bad times 2019-02-26 13:05:51 +00:00
Shamim Rezaie 63559b4796 MDL-43428 accessrule_timelimit: timeclose can be ealier than timelimit 2019-02-26 14:45:24 +11:00
Andrew Nicols 39113784bc Merge branch 'MDL-64663_36' of git://github.com/aanabit/moodle into MOODLE_36_STABLE 2019-02-26 11:08:02 +08:00
Sara Arjona 71dc512e46 Merge branch 'MDL-64862-36-workshopgradepass' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-02-25 18:31:26 +01:00
Sara Arjona fb62fb8e69 Merge branch 'MDL-64931_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-02-25 17:19:33 +01:00
Adrian Greeve fff6f3fa55 Merge branch 'MDL-64640-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-02-25 10:28:11 +01:00
Amaia Anabitarte ec32dbcd8c MDL-64663 core_message: Behat to test admin settings 2019-02-25 10:16:17 +01:00
Andrew Nicols fc13071f37 Merge branch 'MDL-64561-36-test' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-02-25 15:52:23 +08:00
Charles Fulton 7b37ec0381 MDL-64561 install: show help text before database check 2019-02-25 16:44:22 +11:00
Shamim Rezaie 1e2491b9ea MDL-63674 core_messaging: Fix message drawer's shadow in RTL 2019-02-25 14:41:07 +11:00
Shamim Rezaie 9e0958bb49 MDL-63674 core_messaging: Bidi text support 2019-02-25 14:41:07 +11:00
Mark Nelson 2c50550271 MDL-64931 core_message: fixed PHP error when users are deleted from DB 2019-02-25 07:49:39 +08:00
Adrian Perez ddce5a8d34 MDL-62345 navigation: Change data-key for dashboard rootnode 2019-02-22 16:57:43 +01:00
Andrew Nicols 289475f3da weekly release 3.6.2+ 2019-02-22 10:51:34 +08:00
Andrew Nicols 63c7118de6 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-02-22 10:51:30 +08:00
Bas Brands be1e22c5f0 MDL-62454 theme_boost: numerical qtype answer inline 2019-02-21 14:35:40 +01:00
Adrian Greeve 61451240d2 Merge branch 'MDL-64729-36' into MOODLE_36_STABLE 2019-02-21 12:33:07 +01:00
John Beedell 1d4da3c1b6 MDL-64729 mod_glossary: glossary_get_entries_search case sensitivity 2019-02-21 12:31:59 +01:00
Andrew Nicols a628bbe9f7 Merge branch 'MDL-64571-36' of git://github.com/cescobedo/moodle into MOODLE_36_STABLE 2019-02-21 08:38:29 +08:00
Adrian Greeve b406ced13c Merge branch 'MDL_64856_m36v1' of git://github.com/sbourget/moodle into MOODLE_36_STABLE 2019-02-20 18:04:44 +01:00
Adrian Greeve baa408f1af Merge branch 'MDL-64200-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-20 15:59:16 +01:00
Adrian Greeve c61a082515 Merge branch 'MDL-64450-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-02-20 11:37:45 +01:00
Matteo Scaramuccia 4945e2e146 MDL-64443 git: Excluded vim swap files
Vim swap filenames are deterministic someway.
Refs:
- http://vimdoc.sourceforge.net/htmldoc/recover.html#swap-file
- https://github.com/vim/vim/blob/4efe73b478d3ba689078da502fd96f45204ff1f5/src/memline.c#L4683
- https://unix.stackexchange.com/a/326737
- https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
2019-02-20 10:22:34 +01:00
David Monllaó 5d25911f42 MDL-64500 tool_analytics: noanalysables negation better than analysables 2019-02-20 10:09:58 +01:00
Andrew Nicols 09ad6346b2 Merge branch 'MDL-64570-36-fix1' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-20 10:55:09 +08:00
Damyon Wiese 5c6553f4bb MDL-64570 user: input field purpose
Do not autocomplete the user fields when editing another user.
2019-02-20 09:49:29 +08:00
Eloy Lafuente (stronk7) 3909b0e461 Merge branch 'MDL-64679_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-02-20 00:07:00 +01:00
Eloy Lafuente (stronk7) 0b4d0426ea Merge branch 'MDL-63134-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-02-20 00:01:01 +01:00
Eloy Lafuente (stronk7) 98c4307560 Merge branch 'MDL-64806-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-19 23:34:47 +01:00
Eloy Lafuente (stronk7) 7ce55f6f3e Merge branch 'MDL-64242_36' of git://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-02-19 23:23:00 +01:00
Eloy Lafuente (stronk7) 272004978a Merge branch 'MDL-64791-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-02-19 17:43:06 +01:00
Eloy Lafuente (stronk7) 8db7687f02 Merge branch 'MDL-62008-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-19 17:23:52 +01:00
Eloy Lafuente (stronk7) db75278d93 Merge branch 'MDL-64500_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-02-19 17:10:47 +01:00
Damyon Wiese 2165cd3410 MDL-64540 assign: Backport of MDL-60008
This patch combines the following changes:

* Basically we should produce a combined PDF from all the files that it was possible to convert.
* If any one submission input file fails conversion, it should just be omitted in the result.
* When not all files are available in the online pdf, display a warning to graders
that some files must be downloaded.
* Better support for information messages from the conversion process.
* Remove the z-index values from the expand / collapse panels. They cause errors when mixed with dialogues.
* The edit pdf menus are all broken on small screen sizes. They consume 100% of the page with for no reason.
* The heights of the buttons to hide/show panels are arbitrarily big. There is not need to set them specifically.

Amended on integration to get rid if incorrect 'destroyed' block of
code. See the issue for more information.
2019-02-19 15:53:36 +01:00
Adrian Greeve 02bcf4644d Merge branch 'MDL-60459_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-02-19 11:49:45 +01:00
David Monllaó e0ca602e98 MDL-64570 user: Remove empty line 2019-02-19 09:27:13 +01:00
David Monllaó 1825a5a6dc Merge branch 'MDL-64570-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-19 09:26:20 +01:00
David Monllaó 7bab771a8b Merge branch 'MDL-45151-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-19 06:40:28 +01:00
Damyon Wiese f63afeb168 MDL-64570 user: coding style
Fix cibot warnings on line length.
2019-02-19 09:45:21 +08:00
Damyon Wiese fbf75a8605 MDL-64570 accessibility: autocomplete user profile fields
Only if editing your own user details and not logged in as someone else.
2019-02-19 09:45:21 +08:00
Damyon Wiese 633e97845f MDL-64570 accessibility: purpose login fields
Provide the autocomplete attribute and username / current-password values to username
and password fields in login forms.

https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html
2019-02-19 09:45:21 +08:00
David Mudrák 0488a0b30b MDL-64862 workshop: Fix grades to pass editing
There was a bug here that had not exposed until MDL-60820 introduced the
call $mform->setDefault() at the bottom of the definition_after_data()
method. That call triggers the 'updateValue' event on all form elements.
For input text elements, this effectively sets their value to the
default one, which was empty in this case due to the way how the value
had been set.

The solution here is to set the value via the same way like the normal
set_data() method does it.

The attached Behat test reproduces the problem and makes sure the patch
works.
2019-02-18 17:46:11 +01:00
Adrian Greeve b07174669f Merge branch 'MDL-64452-36-cachesession' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-02-18 15:53:51 +01:00
Mark Johnson 0c81fe1f2e MDL-64889 completion: Fix performance of get_course_progress_percentage 2019-02-18 14:07:37 +00:00
willem bef3421021 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 11:00:04 +01:00
AMOS bot e28cb2630d Automatically generated installer lang files 2019-02-16 00:13:48 +00:00
David Mudrák 9fb92df867 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:37:51 +01:00
David Mudrák c2922fab27 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:37:51 +01:00
David Monllaó ce23f4f65c MDL-64679 tool_analytics: Allow trained models to be cleared 2019-02-15 08:43:24 +01:00
Damyon Wiese d531638e2d 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:27 +08:00
Andrew Nicols 22430761b1 weekly release 3.6.2+ 2019-02-15 08:29:28 +08:00
Andrew Nicols b83543bb45 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-02-15 08:29:26 +08:00
Stephen Bourget d0aa6e157a MDL-64856 mod_glossary: Always show the settings cog on the view page. 2019-02-14 12:45:30 -05:00
Jun Pataleta 55d1f79921 Merge branch 'MDL-64736-36-2' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-02-14 15:00:48 +08:00
Andrew Nicols 3b0b9777be Merge branch 'MDL-64788_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-02-14 09:40:37 +08:00
Jun Pataleta 38a80c43db Merge branch 'MDL-63892-36-rework' of git://github.com/mickhawkins/moodle into MOODLE_36_STABLE 2019-02-13 21:01:05 +08:00
Michael Hawkins 1ddc6cc840 MDL-63892 mod_forum: Behat update for post order 2019-02-13 17:24:38 +08:00
Jun Pataleta 10ddb5d90c Merge branch 'MDL-64835-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-02-13 16:27:08 +08:00
Andrew Nicols 4ad618ec4d Merge branch 'MDL-64714-36' of git://github.com/cescobedo/moodle into MOODLE_36_STABLE 2019-02-13 11:24:26 +08:00
Andrew Nicols 8bc84e2fd9 Merge branch 'MDL-63892-36-rework' of git://github.com/mickhawkins/moodle into MOODLE_36_STABLE 2019-02-13 10:19:15 +08:00
Andrew Nicols e556c94666 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:43 +08:00
Andrew Nicols 44bc92dfdd 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:43 +08:00
AMOS bot 519ce6aef9 Automatically generated installer lang files 2019-02-13 00:11:44 +00:00
Eloy Lafuente (stronk7) d64e812632 Merge branch 'MDL-64420-2_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-02-12 12:56:35 +01:00
David Monllaó 38ba693c91 Merge branch 'MDL-64590_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-02-12 12:46:57 +01:00
David Monllaó bb10d3523e Merge branch 'MDL-64730-lti-adv-0score-36' of https://github.com/CengageEng/moodle into MOODLE_36_STABLE 2019-02-12 12:33:44 +01:00
John Beedell fb77164490 MDL-64420 qtype: gapselect unit tests unsafe 2019-02-12 11:27:02 +00:00
David Monllaó 0b796573d4 Merge branch 'MDL-32096-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-02-12 09:41:41 +01:00
Andrew Nicols 51e5aebafc Merge branch 'MDL-64291_36' of https://github.com/KietChan/moodle into MOODLE_36_STABLE 2019-02-12 10:55:32 +08:00
Jun Pataleta 1385b3a3cb Merge branch 'MDL-64493-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-12 10:11:58 +08:00
cescobedo 1796fe1494 MDL-64571 core_message: Fix duplicate footer in msg notification email 2019-02-12 00:44:01 +01:00
Andrew Nicols f37e6ca42a MDL-64736 course: Rewrite behat step to avoid changing a checkbox 2019-02-12 07:43:37 +08:00
Eloy Lafuente (stronk7) 7005a8da73 Merge branch 'MDL-61326-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-02-12 00:20:29 +01:00
Peter 4a8d7f56cd MDL-61326 repository_equella: Pass proper labels for roles with no name 2019-02-12 07:11:31 +08:00
Eloy Lafuente (stronk7) 695b639f4b Merge branch 'MDL-64694_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-02-12 00:10:26 +01:00
Eloy Lafuente (stronk7) 2af09bc931 Merge branch 'MDL-64606-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-02-12 00:02:32 +01:00
Eloy Lafuente (stronk7) e1c332acbb Merge branch 'MDL-64238-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-02-11 23:56:55 +01:00
Peter e7f53ec0c8 MDL-64238 mod_quiz: Check enrollment on calendar_action generator
* Updated unit tests to account for participants
2019-02-12 06:26:40 +08:00
Peter 0cf0c2f339 MDL-64238 mod_lesson: Check enrollment calendar_action generator
* Updated unit tests to account for participants
2019-02-12 06:26:40 +08:00
Eloy Lafuente (stronk7) 44e3097e3d Merge branch 'MDL-64725-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-02-11 17:04:45 +01:00
Eloy Lafuente (stronk7) 98e572b770 Merge branch 'M3.6-MDL-64599' of https://github.com/marcusboon/moodle into MOODLE_36_STABLE 2019-02-11 12:51:06 +01:00
Eloy Lafuente (stronk7) 152ec9fda2 Merge branch 'MDL-64385-36' of git://github.com/aanabit/moodle into MOODLE_36_STABLE 2019-02-11 12:35:34 +01:00
Sara Arjona 2b4b6c934e Merge branch 'MDL-64031-36' of https://github.com/lethevinh/moodle into MOODLE_36_STABLE 2019-02-11 12:33:13 +01:00
David Monllaó 0e3b2bab1b Merge branch 'MDL-64391_36' of git://github.com/vmdef/moodle into MOODLE_36_STABLE 2019-02-11 11:09:23 +01:00
Sara Arjona f87961e5ef Merge branch 'MDL-48338-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-02-11 10:41:15 +01:00
David Monllaó 188d64d2b0 Merge branch 'MDL-62666-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-02-11 09:49:05 +01:00
Tim Hunt f2d827461d 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:43 +00:00
Andrew Nicols 02606519d6 Merge branch 'MDL-64597-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-02-11 16:35:28 +08:00
Jun Pataleta 8729365749 Merge branch 'MDL-64488-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-11 16:05:45 +08:00
Jun Pataleta aecc41b81c Merge branch 'MDL-64644_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-02-11 15:28:55 +08:00
Andrew Nicols 29062ac7b6 Merge branch 'MDL-64393_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-02-11 15:11:38 +08:00
Shamim Rezaie 5848b3abf5 MDL-63134 mod_chat: Check if the module is visible to the user 2019-02-11 16:10:23 +11:00
Shamim Rezaie 659a617729 MDL-63134 mod_chat: Add userid param to mod_chat calendar callbacks 2019-02-11 16:10:23 +11:00
AMOS bot 20fd621fcb Automatically generated installer lang files 2019-02-10 00:10:16 +00:00
Luca Bösch e4f0b24b18 MDL-64606 templates: Show & instead of & in url-select. 2019-02-08 13:22:58 +01:00
Jun Pataleta bc41eabea5 weekly release 3.6.2+ 2019-02-08 14:54:37 +08:00
Damyon Wiese d050b00a71 MDL-64806 theme_boost: Do not label "More" icon
The icon is next to the text that says the same thing. Hide it from screenreaders.
2019-02-08 09:37:18 +08:00
Juan Leyva 181e04ce5d MDL-64791 messages: Bring back 'messagecontactrequests' message 2019-02-07 12:07:01 +01:00
Eloy Lafuente (stronk7) a28ffd62d9 Merge branch 'MDL-62680-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-07 10:22:53 +01:00
Anthony Ales 841709bbb5 MDL-48338 forum: Missing #unread in discussion post url
When a user user selects the unread messages link from the forum
discussion page, the link does not include '#unread' in the url.
This patch appends '#unread' to the url by changing the appropriate
value in the reference link assigned to $out within the function
forum_cm_info_view() of the 'lib.php'file.

A similar change is on the forum index.
2019-02-07 15:17:03 +08:00
Andrew Nicols 4f4d5af3ed Merge branch 'MDL-64633-36' of https://github.com/ewallah/moodle into MOODLE_36_STABLE 2019-02-07 14:54:26 +08:00
Andrew Nicols 6be3214047 Merge branch 'MDL-64577-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-02-07 11:54:50 +08:00
Jun Pataleta 29c224ce81 MDL-64577 grade: Put back the accidentally deleted value attribute 2019-02-07 11:26:49 +08:00
Peter Eliyahu Kornfeld a5720360db MDL-60459 core_course: set default for 'visibleoncoursepage' 2019-02-07 10:54:09 +08:00
Damyon Wiese 6f70544c44 MDL-62680 output: Only hide icons with no label
For accessibility we don't want to read an icon with a label immediately next to the label,
but in this case it's clearer for the icon to have no alt text / title for both
screen readers and non-screen readers. Worse is not reading important information just
because it's displayed as an icon.
2019-02-07 10:12:08 +08:00
Eloy Lafuente (stronk7) 747db5e953 Merge branch 'MDL-64577-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-02-07 00:45:38 +01:00
Eloy Lafuente (stronk7) 574831353e Merge branch 'MDL-64551-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-02-06 23:44:43 +01:00
Eloy Lafuente (stronk7) 00e5454374 Merge branch 'MDL-64469-36' of https://github.com/lethevinh/moodle into MOODLE_36_STABLE 2019-02-06 22:55:11 +01:00
Eloy Lafuente (stronk7) fa10771730 Merge branch 'MDL-63148-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-02-06 13:28:30 +01:00
Eloy Lafuente (stronk7) 3fb2606779 Merge branch 'MDL-63614_M36v1' of https://github.com/sbourget/moodle into MOODLE_36_STABLE 2019-02-06 13:19:47 +01:00
Jun Pataleta c45f8a01bc Merge branch 'MDL-63967_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-02-06 16:58:28 +08:00
Mihail Geshoski 7cfe8b3567 MDL-63417 lesson: Re-apply class variable to the question response 2019-02-06 15:02:17 +08:00
Mark Nelson 85b4823199 MDL-64788 core_message: removed unused temporary page 2019-02-06 13:56:29 +08:00
Jun Pataleta 967fd3b748 Merge branch 'MDL-61405-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-06 13:12:42 +08:00
Damyon Wiese fc5d655fa4 MDL-61405 assign: Multiple pdfs are expected
In the same page it is normal (expected) to have multiple links to different annotated pdfs.

In the grading page, we also abort pending ajax progress when the current user is changed.
2019-02-06 09:36:27 +08:00
Eloy Lafuente (stronk7) d3d6bd7fbf Merge branch 'MDL-63516-MOODLE_36_STABLE' of https://github.com/dmitriim/moodle into MOODLE_36_STABLE 2019-02-06 00:16:37 +01:00
Dmitrii Metelkin bf2e077fc8 MDL-63516 groups: fix unexpected debugging message 2019-02-06 09:23:32 +11:00
Sara Arjona 3d0a5f7c54 Merge branch 'MDL-62893_36' of https://github.com/mfabriczy/moodle into MOODLE_36_STABLE 2019-02-05 20:06:41 +01:00
Eloy Lafuente (stronk7) be388ba917 Merge branch 'MDL-61441_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-02-05 16:11:46 +01:00
Jun Pataleta 795465cb0a Merge branch 'MDL-64632_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-02-05 22:40:51 +08:00
cescobedo 63b1eaf29c MDL-64714 core_auth: Fix early break foreach in delete_data_for_user 2019-02-05 12:52:02 +01:00
Marcus Fabriczy 3394af753d MDL-62893 mod: Grade visibility bug in the Outline/Complete reports
Grades that have been hidden will appear in the outline/complete
report - even if the user is a student.

The modules that have been fixed are:
* mod_assign
* mod_data
* mod_forum
* mod_glossary
* mod_lesson
* mod_scorm
* mod_workshop
2019-02-05 20:09:30 +10:30
Peter 6b5d5ce16f MDL-64450 mod_lesson: Update the css for lesson forms
* Reduce the width for the mediaplugin when displayed in forms
* Correct the css to exclude mediaplugin when applying styles
2019-02-05 12:55:37 +08:00
Olivier Piton 24eae720fa MDL-61535 report_security: SQL Perf improvement 2019-02-05 01:44:07 +01:00
Eloy Lafuente (stronk7) eb9f552ac9 Merge branch 'wip-MDL-64404-36' of https://github.com/Beedell/moodle into MOODLE_36_STABLE 2019-02-05 01:30:53 +01:00
Eloy Lafuente (stronk7) 0b0b26f356 Merge branch 'MDL-64649-36' of https://github.com/felicemcc/moodle into MOODLE_36_STABLE 2019-02-04 16:50:55 +01:00
Eloy Lafuente (stronk7) 3de8463fc1 Merge branch 'MDL-63975-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-02-04 13:21:50 +01:00
Damyon Wiese 361b66bdff MDL-62008 output: Help icon text is escaped
The argument to render the pix_icon template from the help_icon template should not
be escaped, they will be escaped by the pix_icon template when it generates the HTML.
2019-02-04 13:46:28 +08:00
Mark Nelson 9ee908f314 MDL-64632 core_message: fixed PHP error when users are deleted from DB 2019-02-04 13:07:11 +08:00
Damyon Wiese 9a4056cbc4 MDL-62465 assign: Allow grade scrolling
Remove the custom override that disables no-overflow in the grading table. This page is better to use
when the grading table is scrollable and the controls around it are not scrollable.
2019-02-04 11:40:31 +08:00
Damyon Wiese aa88adf108 MDL-62465 grade: scrolling CSS
Grading pages have their own special javascript to force "fixed" headers
when scrolling a large table. They rely on the entire page being scrolled,
not just the main region.
2019-02-04 11:40:31 +08:00
Damyon Wiese 534e9692c5 MDL-62465 CSS: scrolling tables
Tables displayed inside a flex box container need position:relative to
calculate their size or they cause incorrect scrollable regions to appear in the page.
2019-02-04 11:40:31 +08:00
Jun Pataleta 7493ad56cb MDL-64725 composer: Use lowercase for package name of dev dependencies 2019-02-04 09:37:53 +08:00
Eloy Lafuente (stronk7) 74647f9ca3 MDL-63967 libs: some filter_var() filters are deprecated with php73
The explicit usage of the constants FILTER_FLAG_SCHEME_REQUIRED and
FILTER_FLAG_HOST_REQUIRED is now deprecated; both are implied for
FILTER_VALIDATE_URL anyway.
2019-02-01 11:56:24 +01:00
David Monllaó 220c8920c9 MDL-64694 report_insights: Remove unnecessary cell classes 2019-02-01 09:10:01 +01:00
Luca Bösch b83af3894d MDL-64577 grade: style "Add ID numbers" button. 2019-02-01 07:09:15 +01:00
David Monllao e3d3ae2e18 MDL-64500 tool_analytics: No invalid analysables message 2019-02-01 06:59:14 +01:00
Damyon Wiese 3926512713 MDL-45151 assign: Add anonymous flag to events if blindmarking 2019-02-01 09:13:31 +08:00
Jun Pataleta 2188da9eed weekly release 3.6.2+ 2019-02-01 08:57:15 +08:00
Jun Pataleta ebd32e0241 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-02-01 08:57:14 +08:00
Eloy Lafuente (stronk7) c254bb8471 Merge branch 'MDL-64737-36-attoprivacysql' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-01-31 22:46:24 +01:00
Sara Arjona 32117f2d12 MDL-62514 form: Add missing data-tags attribute
The data-tags=1 attribute was missing for the autocomplete forms
without suggestions.
2019-01-31 13:50:30 +01:00
David Mudrák 6a5f60d419 MDL-64737 editor_atto: Fix the privacy export_user_data() implementation
Multiple issues fixed:

* Fixed order of the statements to avoid access to undefined variables.
* Fixed population of the SQL query parameter to make sure they match
  the placeholder in the query.
* Fixed missing table aliases in the second query to make sure the query
  actually works as expected.
2019-01-31 12:51:18 +01:00
David Mudrák 1ac0d67ee8 MDL-64737 privacy: Fix privacy provider testsuite file names
Only files ending with "_test.php" suffix are implicit part of a
testsuite. So these two were not actually executed.
2019-01-31 12:51:17 +01:00
Felice Candilio 2c7a567491 MDL-64649 amd: Removing underscores from icons in [Roles/Groups] forms 2019-01-31 11:07:01 +01:00
Damyon Wiese 8027c1dd30 MDL-63975 assign: Fix error when there is no grader 2019-01-31 13:09:27 +08:00
Damyon Wiese 11f2f7efad MDL-64200 atto_media: Improve behat test
By setting the window size before the modal dialogs are opened, we will get
consistent behaviour when interacting with the modal.
2019-01-31 11:54:09 +08:00
Eloy Lafuente (stronk7) cb41802683 Merge branch 'MDL-64320_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-01-31 00:29:34 +01:00
Eloy Lafuente (stronk7) 9666362605 Merge branch 'MDL-64521_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-01-30 23:48:57 +01:00
Eloy Lafuente (stronk7) e3c859bfb3 Merge branch 'MDL-62514-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-01-30 23:01:02 +01:00
Claude Vervoort 703d3f1a05 MDL-64730 LTI Adv: do not ignore 0 score 2019-01-30 16:13:03 -05:00
Eloy Lafuente (stronk7) bdecee10d6 MDL-64528 core_completion: new cap version bump 2019-01-30 21:25:58 +01:00
Charles Fulton f7afadd846 MDL-64528 core_completion: prevent toggling completion in frozen context 2019-01-30 21:25:09 +01:00
Sara Arjona a7e2a7fecf Merge branch 'MOODLE_36_STABLE' of https://github.com/kristian-94/moodle into MOODLE_36_STABLE 2019-01-30 19:09:11 +01:00
Juan Leyva ff28d273e0 MDL-64444 mod_assign: Use correct permissions for context locking
Some WebServices does not use the correct permissions.
This mean that when a context is locked, they don't behave as expected.
2019-01-30 15:27:49 +01:00
Sara Arjona 730b017a9c Merge branch 'MDL-47247-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-01-30 14:03:03 +01:00
David Monllao 4939925fd0 MDL-64320 analytics: Validate discrete indicators separately 2019-01-30 12:11:34 +01:00
Sara Arjona 4b07fd7203 Merge branch 'MDL-64566_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-01-30 09:32:08 +01:00
Sara Arjona e2ba0043cf Merge branch 'MDL-64143-36' of https://github.com/ryanwyllie/moodle into MOODLE_36_STABLE 2019-01-30 09:22:42 +01:00
Ryan Wyllie 4293c035a6 MDL-64143 message: make message drawer contacts bold 2019-01-30 09:02:41 +08:00
Andrew Nicols 977cfafd53 MDL-62514 behat: Inplace editable pendingjs wrapper 2019-01-30 08:26:18 +08:00
Andrew Nicols f24c46b406 MDL-62514 behat: Remove potentially conflicting names from description 2019-01-30 08:26:18 +08:00
Andrew Nicols e809dc3394 MDL-62514 behat: Add additional autocomplete validation 2019-01-30 08:26:18 +08:00
Andrew Nicols 55efc4667d MDL-62514 behat: Rewrite handling of autocomplete
This includes a minor restructure of the autocomplete JS to make use of
promises and improve tracking of pending JS.

In particular it improves the way in which throttled text input is
handled to ensure that the behat does not continue until:
- typing is fully complete; and
- all possible ajax requests have been sent; and
- all possible ajax requests complete; and
- the suggestions are updated.

A number of conditions existed where behat would move on to the next
step too early in a race condition effect between Behat and Autocomplete.
2019-01-30 08:26:18 +08:00
Andrew Nicols dd3fa5c531 MDL-62514 behat: Add a wait_for_pending_js to form field 2019-01-30 08:26:18 +08:00
AMOS bot 0ada596ccb Automatically generated installer lang files 2019-01-30 00:10:15 +00:00
Eloy Lafuente (stronk7) 2e65323d4f Merge branch 'MDL-64424-36-expiredfrontpage' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-01-29 23:48:21 +01:00
Eloy Lafuente (stronk7) 4557f2c67b Merge branch 'MDL-64464_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-01-29 19:40:38 +01:00
Ryan Wyllie ffaa6c9f20 MDL-64144 message: show message date in message search results 2019-01-29 16:08:37 +01:00
Sara Arjona 7ab09d0dcc Merge branch 'MDL-63168_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-01-29 13:01:00 +01:00
Sara Arjona e14e6a434f Merge branch 'MDL-64313-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-29 12:35:40 +01:00
Sara Arjona de4e98c355 Merge branch 'MDL-61623-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-29 11:20:20 +01:00
Damyon Wiese 7f0ebd3510 MDL-61623 accessibility: Use role, not aria-role 2019-01-29 14:00:04 +08:00
Mihail Geshoski 0932a5b52e MDL-47247 mod_folder: Apply site config when showexpanded is not set 2019-01-29 08:58:38 +08:00
Sara Arjona f1a21cb9ce Merge branch 'MDL-62668-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-01-28 19:43:16 +01:00
Binh Thai be3cc9bed3 MDL-64291 GDPR export: Context paths can be very long, not unique 2019-01-28 20:01:54 +07:00
Sara Arjona cfe678062e Merge branch 'MDL-56604-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-28 13:32:49 +01:00
Sara Arjona 485fd16ae0 Merge branch 'MDL-63378-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-28 11:38:11 +01:00
Sara Arjona 7152b86394 Merge branch 'MDL-54804_36' of https://github.com/mfabriczy/moodle into MOODLE_36_STABLE 2019-01-28 10:21:41 +01:00
Garrett Boone bc3ba913e7 MDL-64640 feedback: Fix target link on deletion 2019-01-27 18:15:35 +08:00
Andrew Nicols 52804421a0 MDL-64640 usertours: Fix target link on deletion 2019-01-27 18:15:35 +08:00
Kristian Ringer 8237a017d0 MDL-64700 block_recentlyaccessedcourses: don't escape course names 2019-01-25 10:25:34 +11:00
Eloy Lafuente (stronk7) cc8d7ee698 weekly release 3.6.2+ 2019-01-24 15:12:36 +01:00
Eloy Lafuente (stronk7) 8339c17385 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-01-24 15:12:34 +01:00
Shamim Rezaie e02b7243e0 MDL-52132 qbehaviour_manualgraded: no change when comment is left blank 2019-01-24 16:20:10 +08:00
Damyon Wiese 1cf6ed5a17 MDL-56604 assign: Group submission status
On the page listing all assignments for the course,
show the status of the group submission if teamsubmissions is enabled
for the assignment.
2019-01-24 14:34:17 +08:00
Jun Pataleta a48bccf753 MDL-64597 behat: Properly import behat_util when dropping parallel sites 2019-01-24 12:52:03 +08:00
Damyon Wiese f30ed91534 MDL-64493 completion: Manual completion Ally
Do not use duplicate title attributes on buttons, use aria-live to force the correct state to be
read after clicking on a button.
2019-01-24 08:37:16 +08:00
Damyon Wiese 72ea6fc68e MDL-64488 output: User picture Ally
Do not include alt and title for a user picture if it is hidden from screen readers.

Use aria-hidden to properly hide the image from screen readers.
2019-01-24 08:32:13 +08:00
Eloy Lafuente (stronk7) 2ad0e72498 Merge branch 'MDL-64240-36' of git://github.com/mickhawkins/moodle into MOODLE_36_STABLE 2019-01-24 00:56:50 +01:00
Eloy Lafuente (stronk7) da13ccc61f Merge branch 'MDL-62963-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-24 00:38:28 +01:00
Juan Leyva e76b511228 MDL-62668 mod_workshop: Return feedback for reviewer in assessment phase
Teachers were not able to view the existing feedback.
2019-01-23 18:10:46 +01:00
Eloy Lafuente (stronk7) ff9ba586a1 Merge branch 'MDL-64609-36' of git://github.com/merrill-oakland/moodle into MOODLE_36_STABLE 2019-01-23 18:05:36 +01:00
Mark Sharp eafc25c718 MDL-64391 core_analytics: courseextendednamedisplay 2019-01-23 12:02:15 +00:00
David Mudrák 8bd88a1ecd MDL-64424 privacy: Use system context purpose on the front page, too
For activities on the site's front page, use the purpose and retention
periods as defined for the system context, not for the courses.
2019-01-23 11:12:25 +01:00
Mark Nelson 04ae9eeb9f MDL-64644 completion: fixed assertions in privacy test 2019-01-23 17:31:06 +08:00
Mark Nelson d7cc2c8444 MDL-64644 completion: set status correctly in provider 2019-01-23 17:31:06 +08:00
Mark Nelson dacceac522 MDL-64644 completion: ensure we return array for provider 2019-01-23 17:31:06 +08:00
Sara Arjona 663c66b8c0 Merge branch 'MDL-64107-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-23 10:19:07 +01:00
Sara Arjona 16d059cf92 Merge branch 'MDL-63628-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-23 08:24:34 +01:00
Mark Nelson a0c78cc672 MDL-63168 core_message: added unit test 2019-01-23 13:24:06 +08:00
eWallah 534b0b6147 MDL-63168 core_message: fix failures in migrate_message_data task. 2019-01-23 13:24:06 +08:00
Eric Merrill b2ac807c9f MDL-64609 gradebook: Prevent infinite loop in regrading 2019-01-22 21:40:52 -05:00
Jake Dallimore b92327307a Merge branch 'MDL-52132-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-01-23 09:21:17 +08:00
Eloy Lafuente (stronk7) 7832112121 Merge branch 'MDL-63870_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-01-23 00:09:37 +01:00
Eloy Lafuente (stronk7) 69e8445ac2 Merge branch 'MDL-64465_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-01-23 00:01:48 +01:00
Eloy Lafuente (stronk7) 613c607593 Merge branch 'MDL-64412-36' of https://github.com/snake/moodle into MOODLE_36_STABLE 2019-01-22 23:49:13 +01:00
Eloy Lafuente (stronk7) 56310c4e30 Merge branch 'MDL-64629-36' of git://github.com/sarjona/moodle into MOODLE_36_STABLE 2019-01-22 19:00:54 +01:00
Eloy Lafuente (stronk7) f6857e42fe Merge branch 'MDL-64441-36' of git://github.com/sarjona/moodle into MOODLE_36_STABLE 2019-01-22 18:49:17 +01:00
Shamim Rezaie 0e835752a3 MDL-64521 groups: add more unit tests
These tests were created for MDL-64526, just before MDL-64521 came along
and removed the buggy code. These are good tests, so they are being
kept.
2019-01-22 16:43:33 +00:00
Tim Hunt 186fa09d2b MDL-64521 grouplib: reduce memory use in groups_get_all_groups
This avoids loading multiple copies of g.* when $withmembers is true
2019-01-22 16:43:31 +00:00
Sara Arjona c5fcf18d69 Merge branch 'MDL-63480-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-01-22 15:19:02 +01:00
Justus Dieckmann d783d4759c MDL-58256 group: prevents users to be added to a group twice 2019-01-22 13:02:22 +01:00
eWallah d5e0ef78b1 MDL-64633 behat: fix FormatterNotFoundException when updating steps. 2019-01-22 11:39:36 +01:00
Sara Arjona 691da3a929 Merge branch 'MDL-64486-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-01-22 08:23:20 +01:00
Michael Hawkins 8c28651948 MDL-63892 mod_forum: Updating lib unit test 2019-01-22 13:54:54 +08:00
Michael Hawkins ecc36f6066 MDL-63892 mod_forum: Fix last post details in forum view 2019-01-22 13:54:54 +08:00
Michael Hawkins 7f166e30a7 MDL-63892 mod_forum: Correction to timestamp added to edit strings 2019-01-22 13:54:54 +08:00
Peter 86f1a6ba5f MDL-32096 core_report: Remove duplicate filters in reports
* Remove duplicate filters from activity completion and course completion report pages
2019-01-22 13:41:44 +08:00
Damyon Wiese bad1713693 MDL-63628 accessibility: Trigger file links with keyboard 2019-01-22 08:40:49 +08:00
AMOS bot 94ef41597a Automatically generated installer lang files 2019-01-22 00:09:58 +00:00
David Mudrák 9b90c17f74 MDL-64553 message: Add index for the notifications.useridfrom field
The useridfrom would normally be a foreign key to the users table. But
it can also contain some extra negative values with special semantics
(-10 or -20 for no-reply or support user). Therefore we can't make it a
foreign key and the index must be created explicitly.
2019-01-21 13:26:33 +01:00
Jake Dallimore 3741df64fe Merge branch 'MDL-28445-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-01-21 15:58:50 +08:00
Jun Pataleta 843e909b7f MDL-62666 course: Only set the groups setting to true when necessary
* Plus update the comment to be more descriptive.
2019-01-21 14:43:01 +08:00
Andrew Hancox 7ed127cfbb MDL-62666 course: Ignore restore_general_groups on activity duplication 2019-01-21 14:43:01 +08:00
Mihail Geshoski ee724278d3 MDL-63480 reports: Fix name filters in completion reports 2019-01-21 09:24:08 +08:00
Jake Dallimore cbd56f1537 Merge branch 'MDL-60972-36_delete_section_files' of https://github.com/awagner/moodle into MOODLE_36_STABLE 2019-01-21 09:04:40 +08:00
Tim Hunt aa8e765a5d MDL-64590 questions: wrong comments shown in the state history table 2019-01-18 18:06:50 +00:00
Sara Arjona ee59fe2276 MDL-64629 theme_clean: Remove underscore near the help icon 2019-01-18 14:32:53 +01:00
Sara Arjona c8ebfd55a2 Merge branch 'MDL-62968-36' of git://github.com/mickhawkins/moodle into MOODLE_36_STABLE 2019-01-18 12:39:56 +01:00
Amaia Anabitarte 2fcf9253b7 MDL-64385 user: Case insensitive comparison for email domains 2019-01-18 10:05:56 +01:00
Marcus Boon 2e7607d68c MDL-64599 phpunit: Fix typo in arraydataset 2019-01-18 07:09:06 +10:00
Tim Hunt a7428f69ad MDL-63870 quiz: new preview should abandon, not finish, current attempt 2019-01-17 17:55:39 +00:00
Eloy Lafuente (stronk7) 7412ad6141 weekly release 3.6.2+ 2019-01-17 17:48:02 +01:00
Andreas Wagner 1f7b1ad0f2 MDL-60972 core_course: delete section files, when section is deleted. 2019-01-17 08:22:32 +01:00
Peter 68e6a93c70 MDL-28445 mod_glossary: Use compound strings as opposed to anglicised
* Use compound strings on buttons to help with proper translations
* Updated behat tests
2019-01-17 10:59:30 +08:00
Eloy Lafuente (stronk7) 1732de328b Merge branch 'MDL-63103-m36' of https://github.com/NeillM/moodle into MOODLE_36_STABLE 2019-01-16 19:02:28 +01:00
Sara Arjona 1e559e85a8 Merge branch 'MDL-63916-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-16 15:33:23 +01:00
Ryan Wyllie 59305e78ed MDL-64134 message: hide empty sections in search results 2019-01-16 13:12:20 +01:00
Ryan Wyllie 63ab57ef42 MDL-64166 message: reduce size of conversation counts in overview 2019-01-16 08:50:41 +01:00
Eloy Lafuente (stronk7) 1f0f6452bb Merge branch 'MDL-63607-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-01-16 00:37:09 +01:00
Sara Arjona 41da53abe4 Merge branch 'MDL-64346-36' of git://github.com/abgreeve/moodle into MOODLE_36_STABLE 2019-01-15 15:38:28 +01:00
Adrian Greeve 793727d8f4 MDL-64346 mod_resource: Fix problems with # in file name. 2019-01-15 14:29:18 +01:00
Sara Arjona 1c8abf9e96 Merge branch 'MDL-64171-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-01-15 13:55:04 +01:00
Sara Arjona 6a6d78107c Merge branch 'MDL-64425-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-01-15 13:21:05 +01:00
Sara Arjona 4944798626 Merge branch 'MDL-64432_m36' of git://github.com/gjb2048/moodle into MOODLE_36_STABLE 2019-01-15 12:57:48 +01:00
Sara Arjona 33788a4b5f Merge branch 'MDL-62439-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-01-15 12:02:24 +01:00
Sara Arjona 356e345fb5 Merge branch 'MDL-63881-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-01-15 11:39:02 +01:00
Andrew Nicols 1ed1421f0f MDL-52132 core_question: Comment is different if format has changed 2019-01-15 18:57:16 +11:00
Shamim Rezaie 32636f9c2c MDL-52132 qbehaviour_manualgraded: unit test for changing comment format 2019-01-15 18:57:16 +11:00
Eloy Lafuente (stronk7) 0d3c7b21be Merge branch 'MDL-63677-36' of git://github.com/sarjona/moodle into MOODLE_36_STABLE 2019-01-14 23:03:59 +01:00
Mark Nelson 81eb28ab34 MDL-64519 core_message: add missing strings causing AMOS issues 2019-01-14 13:30:02 +01:00
Sara Arjona 64fd3da15d Merge branch 'MDL-60082-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-14 12:26:35 +01:00
Shamim Rezaie 5428bcca6c MDL-64551 core_question: Fix double ampersand escaping in tag button 2019-01-14 18:23:59 +11:00
Mark Nelson 624922d3d5 MDL-64566 core_message: removed unnecessary DB call 2019-01-14 09:46:19 +08:00
Eloy Lafuente (stronk7) 68b59f336b Moodle release 3.6.2 2019-01-12 13:26:00 +01:00
Tim Hunt 5361e60e93 MDL-64465 qtypes: fix incorrect context passed to format_string 2019-01-11 11:12:52 +00:00
Tim Hunt a747d9311a MDL-64464 drag-drop qtypes: allow <span lang=".."> id draggables
This is for accessibility, so that screen readers can read the drag
items with correct pronunciation.
2019-01-11 11:12:37 +00:00
Tim Hunt 814dee2184 MDL-64393 drag-drop qtypes: be more robust when page layout changes 2019-01-11 11:11:50 +00:00
Tim Hunt 7fbca34efb MDL-61441 accesslib: get_users_by_capability groups perf improvement 2019-01-11 10:55:31 +00:00
Sara Arjona 4be3c44a5b 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:23:04 +01:00
Neill Magill 3e14b40724 MDL-63103 filebrowser: Speed up finding activities with files
Before this change the query examined at every course_module record in
the context table.

With this change we use the course_modules table to more efficiently
find all the activities in the course, which means that many less
records in the context table need to be examined.
2019-01-11 09:03:58 +00:00
VinhLe 173d968f87 MDL-64031 enrol_manual: Fix hard-coded list of user fields.
Respect get_extra_user_fields() in PHP code
2019-01-11 11:37:05 +07:00
VinhLe 0b4bb56b4d MDL-64469 Question bank: Change link questions in category question.
Make it easier to navigate from the category list to the questions in a category.
2019-01-11 11:29:53 +07:00
Luca Bösch 18581165c5 MDL-63881 tool_dataprivacy: 'Contact the privacy officer' profile link. 2019-01-10 22:17:12 +01:00
Luca Bösch 6efd56e074 MDL-62439 output: Debugstringids in overlay windows. 2019-01-10 22:16:48 +01:00
Sara Arjona dfd605320e weekly release 3.6.1+ 2019-01-10 17:51:31 +01:00
Sara Arjona 8f6ba8afc4 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-01-10 17:51:30 +01:00
Jake Dallimore b41a94128a Merge branch 'MDL-64004-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-10 11:00:25 +08:00
AMOS bot 7365115cf3 Automatically generated installer lang files 2019-01-10 00:08:42 +00:00
Eloy Lafuente (stronk7) 5f85b35305 Merge branch 'MDL-64479_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-01-09 23:36:57 +01:00
Ryan Wyllie ea2f42bde4 MDL-64043 message: stop group conversation header re-rendering 2019-01-09 18:46:54 +01:00
Marcus Fabriczy c049e374c3 MDL-54804 templates: Prevent posting when no option is selected
When no value is set for an option element and a user selects it, a
POST request is made, which is incorrect. Usually that option is a
placeholder value, e.g., "Choose..." - the form expecting the end user
to choose an actual value.
2019-01-09 23:56:28 +10:30
Eloy Lafuente (stronk7) 3dd8792045 Merge branch 'MDL-63686-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-01-09 12:36:33 +01:00
Andrew Nicols a335f9c4c0 MDL-63686 core: recordset => records when fetching contexts 2019-01-09 19:08:08 +08:00
Tim Hunt 6873ac11a0 MDL-64479 dd-qtypes: fix questions with non-consecutive groups 2019-01-09 10:20:01 +00:00
Jake Dallimore a022611e09 Merge branch 'MDL-64375-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-09 15:33:27 +08:00
Damyon Wiese 0d72593a7c MDL-62143 accessibility: Label breadcrumbs 2019-01-09 15:18:36 +08:00
Andrew Nicols 97a0132511 Merge branch 'MDL-62550-36-2' of https://github.com/snake/moodle into MOODLE_36_STABLE 2019-01-09 15:10:12 +08:00
Jake Dallimore 210429d952 Merge branch 'MDL-64345-36' of https://github.com/s-cenni/MDL-64345 into MOODLE_36_STABLE 2019-01-09 14:14:28 +08:00
Jake Dallimore aeb7c0026d MDL-62550 core_theme: remove unused #fgroup_ and #fitem_ rules
These ids didn't exists in form elements in Boost until now, so we'll
remove the rules to prevent them having any effect now.
2019-01-09 11:31:54 +08:00
Jake Dallimore 19c1651247 MDL-62550 core_form: bring back the form item unique ids to fix js fails
This id matches the id seen on the clean theme elements and is needed by
the forms js.
2019-01-09 11:31:52 +08:00
Jake Dallimore f369450561 Merge branch 'MDL-63761-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-01-09 09:07:07 +08:00
Eloy Lafuente (stronk7) b60fa84aad Merge branch 'MDL-64285-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-01-09 00:03:13 +01:00
Andrew Nicols 0c8852c98b Merge branch 'MDL-24951_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-01-09 06:43:45 +08:00
Andrew Nicols 0f44be2b7a Merge branch 'MDL-64426_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-01-09 06:38:34 +08:00
Eloy Lafuente (stronk7) db729d9510 MDL-64426 core_message: fix context::instance_by_id() wrong use 2019-01-08 23:07:22 +01:00
Eloy Lafuente (stronk7) e41fd189dd MDL-24951 mod_forum: Apply new string to related scenarios
Plus amend an scenario name that was clearly incorrect.
2019-01-08 16:51:21 +01:00
Michael Hawkins 279df86c7f MDL-64395 groups: Added XSS Risk to the manage groups capability 2019-01-08 16:26:48 +01:00
Michael Hawkins 2e057f082d MDL-64372 userpix: Escape fullname string on userpix index page 2019-01-08 16:26:48 +01:00
Sara Arjona 20c3619d77 MDL-64222 badge: Removed backpackurl from the edit_form 2019-01-08 16:26:48 +01:00
Eloy Lafuente (stronk7) d21c67114f Merge branch 'MDL-64509-36-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-01-08 16:18:31 +01:00
Andrew Nicols d55a0b81d6 Merge branch 'MDL-58596-36' of git://github.com/vmdef/moodle into MOODLE_36_STABLE 2019-01-08 16:15:34 +08:00
Andrew Nicols 987e822c5e Merge branch 'MDL-64426-36-2' of https://github.com/snake/moodle into MOODLE_36_STABLE 2019-01-08 16:10:06 +08:00
Leon Stringer 7ad3a22b79 MDL-58596 core_stats: fixed infinite loop cause by DST change 2019-01-08 08:08:14 +00:00
Jake Dallimore 0c638fda5c MDL-64426 core_message: fix filter support in api::get_conversations()
Conversation name and subname should support filters, so the data should
be passed through format_string, and advertised in the external params
as PARAM_TEXT.
2019-01-08 15:51:32 +08:00
Jake Dallimore caa2b2ce21 Merge branch 'MDL-63686-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-01-08 14:38:07 +08:00
Andrew Nicols afba820e1d MDL-63686 core: Preload parent contexts 2019-01-08 14:11:53 +08:00
Andrew Nicols 1e59e03e60 Merge branch 'MDL-24951-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-01-08 13:52:35 +08:00
Andrew Nicols a155e8cb75 Merge branch 'MDL-64497-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-01-08 12:28:56 +08:00
Andrew Nicols 6aa1364030 Merge branch 'MDL-63722-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-01-08 12:12:55 +08:00
Andrew Nicols 691a2997b8 Merge branch 'MDL-64400-36' of git://github.com/aanabit/moodle into MOODLE_36_STABLE 2019-01-08 08:28:21 +08:00
Andrew Nicols bd5464547a Merge branch 'MDL-63276_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-01-08 06:56:13 +08:00
Eloy Lafuente (stronk7) 90fc88b56d Merge branch 'MDL-63809-36-5' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-01-07 22:13:00 +01:00
Helen Foster bb7ebc0ee5 MDL-64509 lang: Import fixed English strings (en_fix)
Significant string change: enablerunnow_desc,tool_task - including
mention of pathtophp requirement
2019-01-07 20:09:48 +01:00
Sara Arjona 8555878283 Merge branch 'MDL-64419-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-01-07 14:18:23 +01:00
Andrew Nicols 5a04efc1eb Merge branch 'MDL-57636_m36' of https://github.com/dasistwas/moodle into MOODLE_36_STABLE 2019-01-07 13:48:08 +08:00
David Bogner 352ddf9d42 MDL-57636 frontpage: Fix display enrolled courses 2019-01-04 11:00:25 +01:00
Damyon Wiese 20ad67d21d MDL-64375 gradingform_rubric: Styles for overflow
Allow people to define lots of levels, and make the scroll region just the rubric table,
not the entire content region.
2019-01-04 08:44:38 +08:00
sam marshall 6e7597f569 MDL-64497 GDPR: moodle_content_writer can cause endless loop
Fixes a buggy function by replacing it with a call to file_get_contents,
and adds error detection on a couple of file accesses.
2019-01-03 17:05:47 +00:00
Jake Dallimore 1f2934b656 Merge branch 'MDL-49651-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-01-03 10:46:36 +08:00
Peter a03105e4b1 MDL-64486 mod_glossary: Add missing separator for special links 2019-01-03 08:39:59 +08:00
Eloy Lafuente (stronk7) 7bdf798d6a MDL-63276 environment: PHP 7.1 and Moodle 3.2 required 2019-01-03 01:19:48 +01:00
Eloy Lafuente (stronk7) fd1fb3e6db MDL-63276 environment: 3.7 base information
This is a direct copy of the 3.6 branch to
have changes under control easier in next commits.
2019-01-03 01:19:48 +01:00
Jake Dallimore 61bdf6fab3 MDL-64412 core_message: remove ordering code from message_search_users()
This code is no longer needed as get_member_info() now respects the
ordering of the $userids param.
2019-01-02 15:21:39 +08:00
Jake Dallimore bed5aa4d13 MDL-64412 core_message: get_member_info() respects provided ordering
This change makes sure the function returns the member information in
the same order as those users provided in the $userids param.
2019-01-02 15:21:34 +08:00
Peter 07deeb497c MDL-63148 mod_scorm: Accept userid param in event action
* Update lib scorm functions to accept and use a passed in userid
* Additional phpunit tests
2019-01-02 14:36:31 +08:00
Michael Hawkins 2fd170c550 MDL-62968 Boost: Adding editor SCSS support 2019-01-02 14:21:22 +08:00
Damyon Wiese e607001e7e MDL-63761 grade: Performance fix for regrading
Don't use a separate variable to count the number of items in finalids.
2019-01-02 10:25:04 +08:00
Amaia Anabitarte 844a59c301 MDL-64400 core_messages: Mark notifications sent via email as read 2018-12-27 09:18:14 +01:00
Amaia Anabitarte f10c2934aa MDL-64400 core_messages: Allow cron to delete unread notifications too 2018-12-27 09:18:14 +01:00
Mathew efe7f18200 MDL-49651 mod_forum: Respect course visibility in cron
This checks the courses' current visibility and the users permissions.
If they have the permission to view the course when it is hidden they'll get messages.

We already have checks for the users enrolled & subscription status.
2018-12-24 09:35:38 +08:00
Mathew 0df8f503a3 MDL-24951 mod_forum: Check user capability to know what message to show.
If the user has the following capabilty: mod/forum:canposttomygroups then show them
the more technical of the strings. Otherwise we use something a bit easier for them to ask their
tutor or teacher about.
2018-12-24 09:14:39 +08:00
Gareth Barnard 6a9e87112c MDL-64432 theme_bootstrapbase: Favourites myoverview icon tooltip. 2018-12-21 11:24:20 +00:00
AMOS bot c4b911d645 Automatically generated installer lang files 2018-12-21 00:08:07 +00:00
Sara Arjona 7534d21e59 MDL-64441 badges: Remove notice when language is empty 2018-12-20 16:29:28 +01:00
Víctor Déniz Falcón 524e1fa64e MDL-58596 core_stats: unit test for stats_get_base_weekly 2018-12-20 13:59:34 +00:00
Adrian Greeve 7f234acc6e weekly release 3.6.1+ 2018-12-20 11:09:17 +01:00
Adrian Greeve 1003775c7c NOBUG: Fixed SVG browser compatibility 2018-12-20 11:09:17 +01:00
Adrian Greeve 025c532aa9 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2018-12-20 11:09:16 +01:00
Andrew Nicols b1c50364d0 Merge branch 'MDL-64038-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2018-12-20 13:56:45 +08:00
Andrew Nicols eac010fbb9 Merge branch 'MDL-63512-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2018-12-20 13:03:49 +08:00
Peter c556416385 MDL-63512 mod_lesson: Update the lesson css to exclude mediaplugin div 2018-12-20 12:51:04 +08:00
Peter 1f91c082c5 MDL-63512 mod_lesson: Fix video links provided in feedback 2018-12-20 12:51:04 +08:00
Stephen Bourget f4c843d00b MDL-63614 badges: Add COMPLETION_FAIL support to badge criteria 2018-12-19 10:30:27 -05:00
Adrian Greeve 421358bc47 Merge branch 'MDL-64392-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2018-12-19 12:04:29 +01:00
Adrian Greeve 7b661b8d6f MDL-59954 course: Remove unused global. 2018-12-19 10:48:27 +01:00
Peter 74780ef62b MDL-59954 mod_course: Remove file size restriction on D&D on course page
Remove file size restrictions for teachers on course page.
Use user_max_upload_file_size instead of the max_file_size
2018-12-19 10:47:01 +01:00
Shamim Rezaie a9223b49a0 MDL-63722 javascript: misinterpret as outside click if DOM is modified 2018-12-19 16:06:38 +11:00
Jake Dallimore 50e3951acc Merge branch 'MDL-64229_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2018-12-19 11:37:40 +08:00
Jake Dallimore e4cac445c2 Merge branch 'MDL-64216-m36' of https://github.com/micaherne/moodle into MOODLE_36_STABLE 2018-12-19 11:08:05 +08:00
Andrew Nicols 1dca8a6679 Merge branch 'MDL-63512-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2018-12-19 10:00:10 +08:00
AMOS bot 2f90c2a35d Automatically generated installer lang files 2018-12-19 00:09:03 +00:00
Simey Lameze 6f76116cd2 MDL-64425 block_timeline: fix incorrect get_string parameter 2018-12-19 07:42:25 +08:00
Adrian Greeve 30ff131e71 Merge branch 'MDL-64025-36' of https://github.com/christianwolters/moodle into MOODLE_36_STABLE 2018-12-18 16:00:47 +01:00
Bas Brands 6d66740146 MDL-64171 block_myoverview: change course summary view image size
Size reduced from 7rem to 5rem for smaller devices
and for courses without a description.
2018-12-18 10:39:17 +01:00
Michael Hawkins a7c9b0b43d MDL-64240 mod_forum: Clean forum post text before storing
Previously only edited messages were cleaned, so longer strings could
be stored in the database, which would never be displayed.
This update takes into account trusted text before cleaning (as editing does).
2018-12-18 14:12:47 +08:00
Michael Hawkins 38a757cc18 MDL-64240 mod_forum: Update word count to use current message length
Previously this used the length of the message stored in the database,
before scripts etc are cleaned to display the content. That resulted
in cases where the count would seem much larger than the message size.
2018-12-18 14:12:47 +08:00
Shamim Rezaie 10c38b2e34 MDL-63809 question: handling bad questions in question_has_capability_on 2018-12-18 15:44:20 +11:00
Tim Hunt 636a752d11 MDL-63809 question bank: ensure question_has_capability_on can be called 2018-12-18 15:44:20 +11:00
Damyon Wiese 73d4d4f8c3 MDL-60082 assign: Grading worksheet with no grade
If the grade type is NONE - do not include the maxgrade column.
2018-12-18 11:14:17 +08:00
Jake Dallimore 909b8fe981 Merge branch 'MDL-64309_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2018-12-18 11:11:45 +08:00
Damyon Wiese 1e96000bb3 MDL-64004 webservice: Do not update accesstime
Do not update the automatically update the course access time when a
course is accessed via a webservice or ajax.
2018-12-18 09:08:17 +08:00
Bas Brands ceb92a3553 MDL-64419 core_message: fix user info in bootstrapbase message drawer
* updated the bootstrapbase template for the messaging conversation menu
info option to match the menu in
"/core_message/message_drawer_view_conversation_header_content_type_private.mustache"
2018-12-17 15:51:19 +01:00
John Beedell 79265f94a9 MDL-64404 qtype: gapselect currency like options dont show 2018-12-17 12:34:31 +00:00
Sara Cenni 9d235abdb4 MDL-64345 core: Make FB logo upgrade cross-DB compatible 2018-12-17 11:22:27 +01:00
Jun Pataleta c9e518f483 Merge branch 'MDL-59629-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2018-12-17 15:56:13 +08:00
Andrew Nicols bcc163c6fd MDL-63607 behat: Remove theme from config whitelist 2018-12-17 15:55:03 +08:00
Damyon Wiese 391eed0198 MDL-62963 boost: Increase contrast btn-secondary
The background colour of these buttons is too light, so they don't look like buttons.
2018-12-17 15:47:49 +08:00
Tomasz Muras c9f765452f MDL-52966 core: static cache fix for file types. 2018-12-17 15:40:39 +08:00
Andrew Nicols 6dea9ae21e Merge branch 'MDL-61633-36' of https://github.com/lucisgit/moodle into MOODLE_36_STABLE 2018-12-17 15:29:12 +08:00
Andrew Nicols b9ada50b92 Merge branch 'MDL-60518-36' of git://github.com/aanabit/moodle into MOODLE_36_STABLE 2018-12-17 14:59:39 +08:00
Jun Pataleta ff42789a76 Merge branch 'MDL-63260_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2018-12-17 14:10:12 +08:00
Damyon Wiese 174c288c0f MDL-63378 theme_boost: Contrast of menu items
Enforce the :active menu text colour during a mouse click on an action menu.
2018-12-17 14:02:56 +08:00
Damyon Wiese 1e6296c745 MDL-64107 questions: Increase highlight contrast
When a question has just been edited, it is highlighted. We need to ensure
the colour contrast of text on background is accessible.
2018-12-17 12:35:46 +08:00
Jake Dallimore 4cb644cf24 Merge branch 'MDL-62756_MOODLE_36' of https://github.com/miotto/moodle into MOODLE_36_STABLE 2018-12-17 11:24:59 +08:00
Andrew Nicols 867a3147ad Merge branch 'MDL-64388-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2018-12-17 09:14:36 +08:00
Christian Wolters 26640d3831 MDL-64025 admin_bookmarks: Enable bookmarking of admin categories 2018-12-16 15:48:12 +01:00
AMOS bot 24aa36db21 Automatically generated installer lang files 2018-12-15 00:09:15 +00:00
Bas Brands 0cd2c36605 MDL-64392 core_question: flexbox compatible separator for question types
* the br tag does not work well in a flexbox context, a 100% with div
works in both clean and boost.
2018-12-14 16:30:52 +01:00
Bas Brands ea6ae74019 MDL-64038 core_message: add default group image
add default group image to improve the alignment
of group names in the message drawer group messages section
2018-12-14 14:13:51 +01:00
Bas Brands 99440d3db7 MDL-64388 core_themes: update docs on new required output method
* Method standard_after_main_region_html was added to the core_renderer
used by the messaging ui to message drawer
2018-12-14 11:30:30 +01:00
Mirko Otto 89f8d4adde MDL-62756 form: Remove any click handler first.
The handler has the old state variable. Remove any click handler first.
2018-12-14 10:30:49 +01:00
Amaia Anabitarte 7b11b53d51 MDL-60518 core_competency: Set $USER global variable for tests 2018-12-14 10:25:44 +01:00
Frédéric Massart dd815d254f MDL-60518 core_user: A user with ID 0 is never a real user 2018-12-14 10:25:44 +01:00
Jun Pataleta aa0b2c74dd MDL-64285 core: Skip 64 bits check for 32-bit PHP versions in unit tests 2018-12-14 11:21:00 +08:00
Jun Pataleta 06b76ab9c8 MDL-64285 core: Fix environment check test
* Looping the environment results and skipping some items mean that
if a test gets skipped, the rest of the environment results won't be
tested. It's better to use a data provider for this in order to
individually test each environment result.
2018-12-14 11:21:00 +08:00
Peter 90ec922213 MDL-59629 mod_block: Set the default region in add_region
Check and update default region in add_region if none set.
2018-12-14 10:30:07 +08:00
Peter 54ff8c77bf MDL-63512 mod_lesson: Fix video links provided in feedback 2018-12-14 10:27:24 +08:00
Jake Dallimore 9c85ac5d89 weekly release 3.6.1+ 2018-12-14 07:51:49 +08:00
Jake Dallimore 4a087d2701 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2018-12-14 07:51:48 +08:00
Tony Butler 79c7162899 MDL-61633 assignfeedback_editpdf: Scroll back to top when changing pages 2018-12-13 12:18:43 +00:00
Mark Nelson fd12e12d8c MDL-64229 core_message: ensure profile pic links to profile 2018-12-13 12:15:13 +08:00
Jake Dallimore 19a759649c Merge branch 'MDL-62624-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2018-12-12 16:13:44 +08:00
Damyon Wiese 467efca6aa MDL-63916 backup: Do not display timestamp
Convert the date+time field to a userdate for display.
2018-12-12 12:20:13 +08:00
Jun Pataleta 39fbf414ad Merge branch 'MDL-41507-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2018-12-12 11:17:40 +08:00
Shamim Rezaie 6299c142c4 MDL-41507 core_group: Consistent default value for FEATURE_GROUPS 2018-12-12 14:04:47 +11:00
Jake Dallimore 17fccfc78b Merge branch 'MDL-64003-36' of https://github.com/aanabit/moodle into MOODLE_36_STABLE 2018-12-12 10:03:22 +08:00
Jake Dallimore 7c073af175 MDL-63887 auth_ldap: fix unclean exit from sync when users not found
We should return, not exit, and we should clean up before we do.
2018-12-12 09:43:04 +08:00
Jake Dallimore 3b114369bc Merge branch 'MDL-63887_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2018-12-12 09:42:55 +08:00
Jake Dallimore 1641091ae7 Merge branch 'MDL-63150-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2018-12-12 08:32:35 +08:00
Jake Dallimore 6b391174e4 Merge branch 'MDL-63145-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2018-12-12 08:30:00 +08:00
Jake Dallimore 5c2cae3d9c Merge branch 'MDL-63147-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2018-12-12 08:25:28 +08:00
Peter 8eae354c0f MDL-63145 mod_page: Accept userid param as override
Accept a userid as an override in the lib function instead of
relying on $USER
2018-12-12 07:32:09 +08:00
Peter 8a1ebcf100 MDL-63150 mod_url: Accept a userid override in event action
Accept a userid in the event action instead of depending on $USER
2018-12-12 07:18:40 +08:00
Peter c8289ad180 MDL-63147 mod_resource: Accept userid in resource event_action 2018-12-12 07:08:25 +08:00
Tim Hunt a637d77826 MDL-63260 qtype_random: orphaned random questions should be deleted
This fix is based on some original code written by Bo Pierce.
2018-12-11 14:04:13 +00:00
Amaia Anabitarte 00302ce7a2 MDL-64003 core_message: Use sql_like_escape() in message_search_users 2018-12-11 11:41:52 +01:00
Jake Dallimore 9617c3a660 Merge branch 'MDL-64357_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2018-12-11 17:44:27 +08:00
Mark Nelson 0ccc7a8a5c MDL-64357 ltiservice_gradebookservices: updated unit tests 2018-12-11 17:03:15 +08:00
Claude Vervoort 8d84ee97da MDL-64357 ltiservice_gradebookservices: fix cleanup deleting lineitems 2018-12-11 17:03:15 +08:00
Damyon Wiese 59f6c0c7dd MDL-64313 assign: feedback viewed event
When a student views their submission, if it has feedback create an event.
2018-12-11 14:07:12 +08:00
Jake Dallimore c8de0b91a0 Merge branch 'MDL-62922-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2018-12-11 12:50:36 +08:00
Jun Pataleta 841c9314ba Merge branch 'MDL-64280-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2018-12-11 09:53:51 +08:00
AMOS bot bcab22a63b Automatically generated installer lang files 2018-12-11 00:10:00 +00:00
Luca Bösch 3fba5b6826 MDL-64280 core_outcome: Add/remove outcome buttons style. 2018-12-10 17:56:13 +01:00
Ryan Wyllie 67db9af9db MDL-64275 message: fix update unread conversation counts 2018-12-10 15:07:22 +08:00
Jun Pataleta 6b34db6b00 Merge branch 'MDL-62061-36' of git://github.com/abgreeve/moodle into MOODLE_36_STABLE 2018-12-10 14:46:44 +08:00
Mihail Geshoski 36d683c805 MDL-62624 lesson: Fix alignment in matching questions in boost 2018-12-10 13:47:37 +08:00
Jun Pataleta 6fe370eef9 Merge branch 'MDL-64332_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2018-12-10 09:37:51 +08:00
Jake Dallimore 11d0c68d56 weekly release 3.6.1+ 2018-12-10 08:10:21 +08:00
Andrew Nicols 0cd5cf60de Merge branch 'MDL-46783-36-fix' of https://github.com/snake/moodle into MOODLE_36_STABLE 2018-12-10 08:09:09 +08:00
Jake Dallimore e8cabad431 MDL-46783 accesslib: add recordrtc cap check to match master branch 2018-12-10 08:04:54 +08:00
Tim Hunt 343f4e9d56 MDL-64332 questions: idnumber should not prevent easy duplication 2018-12-06 14:41:58 +00:00
Adrian Greeve 6ff8d9bb2c MDL-62061 core_privacy: Stop directories being created.
This stops directories being created in the root directory
while running unit tests.
2018-12-06 11:37:41 +01:00
papillon326 53949e65a7 MDL-63887 auth_ldap: avoid infinite loop when search limit is reached 2018-12-06 15:40:34 +08:00
papillon326 946bef37bf MDL-63887 auth_ldap: changed variable names to be conform to core 2018-12-06 15:40:34 +08:00
Jun Pataleta ed9ee5743d Merge branch 'MDL-64283-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2018-12-06 14:57:41 +08:00
Damyon Wiese 115b696f30 MDL-64283 competency: Correct numbering in tests 2018-12-06 14:27:26 +08:00
Jake Dallimore 8f0bd4fb15 Merge branch 'MDL-63710-MOODLE_36' of https://github.com/ilya-catalyst/moodle into MOODLE_36_STABLE 2018-12-06 11:41:11 +08:00
Jake Dallimore 4071cbebf5 Merge branch 'MDL-46783_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2018-12-06 10:23:32 +08:00
Ilya Tregubov 3b9f40920a MDL-63710 repository: Delete orphaned file records. 2018-12-06 12:35:47 +11:00
Jun Pataleta 866de1e3ff Merge branch 'MOODLE_36_STABLE-MDL-64290-imscc-restore-temp-dir' of https://github.com/mspall/moodle into MOODLE_36_STABLE 2018-12-06 08:57:09 +08:00
Michael Spall 60c93464b5 MDL-64290 backup imscc: Use correct tempdir for imscc restore
Use configured temp directory $CFG->tempdir instead of hard coded
$CFG->dataroot . '/temp/backup/'
Remove unused variable, $CFG
2018-12-05 11:09:20 -07:00
Tim Hunt 0c081d2468 MDL-46783 accesslib: add tests for MDL-63818
MDL-46783 and MDL-63818 were originally coded on the
assumption that MDL-46783 would get integrated first. However it wasn't.
Therefore, it was not easy to add unit tests for MDL-63818
at the time, but it is now, so here they are.
2018-12-05 16:46:20 +00:00
Tim Hunt 550c4bdf6e MDL-46783 permissions: let some moodle/ caps be overriden in all mods
The capabilities changed ('contextlevel' => CONTEXT_COURSE changed to
'contextlevel' => CONTEXT_MODULE) are:

* moodle/site:accessallgroups
* moodle/site:viewfullnames
* moodle/site:trustcontent
* moodle/site:viewuseridentity

This list came from reviewing the _get_extra_capabilities functions in
all core activities. They were all somewhat inconsistent, but I think it
makes sense that these capabilities are consistently overridable in all
activities. E.g. moodle/site:accessallgroups affects conditional
availability even if there is no other user of groups, and
moodle/site:viewuseridentity and moodle/site:viewfullnames affect the
logs report, if nothing else.

As a result of this, several _get_extra_capabilities functions are no
longer needed, and all the rest have been simplified.
2018-12-05 16:46:15 +00:00
Mark Nelson 54fc0f1b28 MDL-64309 core_message: minor string changes to drawer 2018-12-05 19:34:12 +08:00
Jun Pataleta 6522f66dd7 MDL-62922 core_user: Check auth mechanism before validating password
* External authentication mechanisms (e.g. via oauth2, etc.) don't store
  password in the user table, so we shouldn't be requiring password in
  such case when creating users via the core_user_create_users WS
  function.
2018-12-05 15:32:09 +08:00
Ryan Wyllie e7691f15b9 MDL-64274 message: deleteMessages in message_repository return promise 2018-12-05 14:57:43 +08:00
Jake Dallimore fe1d7d118e Merge branch 'MDL-64198-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2018-12-05 14:30:43 +08:00
Damyon Wiese 7e2f393054 Merge branch 'MDL-60267-master' of https://github.com/rogerbaba/moodle into MOODLE_36_STABLE 2018-12-05 12:46:51 +08:00
Eloy Lafuente (stronk7) d09dc52b0a Moodle release 3.6.1 2018-12-04 17:42:58 +01:00
Luca Bösch c192c5e4e3 MDL-64198 course: set formatted modulename for togglecompletion js. 2018-12-04 14:33:34 +01:00
Michael Aherne 3ff4fc8e45 MDL-64216 privacy: Split query to use indexes. 2018-12-04 13:31:10 +00:00
Eloy Lafuente (stronk7) 6e19850f6e weekly release 3.6+ 2018-12-04 13:06:09 +01:00
Bas Brands 5d30474242 MDL-63223 theme_boost: flexbox for login pagin footer 2018-12-04 12:06:49 +08:00
Jun Pataleta 1b972c31ac Merge branch 'MDL-64307_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2018-12-04 12:03:08 +08:00
Mark Nelson 29b6ac23e9 MDL-64307 core_message: do not include disabled conversations in count 2018-12-04 11:48:54 +08:00
Mark Nelson 44b6ffb68c MDL-64307 core: set all individual conversations to enabled 2018-12-04 11:44:59 +08:00
Jun Pataleta 79abbd9adc Merge branch 'MDL-64206_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2018-12-04 11:13:37 +08:00
Tim Hunt 270524858e MDL-64286 qtype_gapselect: removed unneeded line of code
The extended Behat test show the qtype works fine without it.
2018-12-04 11:12:52 +08:00
Damyon Wiese 60f9a401a9 Merge branch 'MDL-64155-master' of git://github.com/vmdef/moodle into MOODLE_36_STABLE 2018-12-03 15:26:56 +08:00
Tim Hunt ac0b8201a9 MDL-63459 qtype_calculatedmulti: fix incorrect hint object type 2018-12-03 14:25:41 +08:00
Tim Hunt be27fc0fe3 MDL-63459 qtype_calculatedmulti: unit test should test this qtype
This also demonstrates the bug to be fixed
2018-12-03 14:25:17 +08:00
Mark Nelson ebd104448f MDL-64206 core: updated FB logo URL 2018-12-03 12:23:47 +08:00
Andrew Nicols c69f425a7a Merge branch 'MDL-64300_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2018-12-03 08:35:32 +08:00
Eloy Lafuente (stronk7) e38e718441 MDL-64300 upgrade: add 3.6.0 separation line to all upgrade scripts 2018-12-02 18:37:59 +01:00
Víctor Déniz Falcón 0eac5cf446 MDL-64155 block_recentlyaccessedcourses: considering enrolment status 2018-11-29 15:37:17 +00:00
Victor Deniz fdf2abf871 MDL-64155 core: get_recent_courses considers enrolment status 2018-11-29 15:37:17 +00:00
Víctor Déniz Falcón 87173da483 MDL-64155 core: use favourite API to generate SQL 2018-11-29 15:37:17 +00:00
Roger Barras 6959abc816 MDL-60267 user: Fix set default data for the user profile field 2018-11-02 20:09:04 +01:00
621 changed files with 9329 additions and 2362 deletions
+10 -2
View File
@@ -9,10 +9,18 @@
#
# See gitignore(5) man page for more details
#
# Swap files (vim)
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Temporary files including undo
*~
#
/config.php
/lib/editor/tinymce/extra/tools/temp/
*~
*.swp
/tags
/TAGS
/cscope.*
+6 -6
View File
@@ -82,11 +82,6 @@ require_once($CFG->libdir.'/installlib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/componentlib.class.php');
// make sure no tables are installed yet
if ($DB->get_tables() ) {
cli_error(get_string('clitablesexist', 'install'));
}
$CFG->early_install_lang = true;
get_string_manager(true);
@@ -109,12 +104,17 @@ list($options, $unrecognized) = cli_get_params(
)
);
// We show help text even if tables are installed.
if ($options['help']) {
echo $help;
die;
}
// Make sure no tables are installed yet.
if ($DB->get_tables() ) {
cli_error(get_string('clitablesexist', 'install'));
}
if (!$options['agree-license']) {
cli_error('You have to agree to the license. --help prints out the help'); // TODO: localize
}
+181
View File
@@ -2618,4 +2618,185 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.7" requires="3.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.6" />
<VENDOR name="postgres" version="9.4" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+22 -2
View File
@@ -21,8 +21,28 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
0)
);
$options = array(DAYSECS=>new lang_string('secondstotime86400'), WEEKSECS=>new lang_string('secondstotime604800'), 2620800=>new lang_string('nummonths', 'moodle', 1), 15724800=>new lang_string('nummonths', 'moodle', 6),0=>new lang_string('never'));
$optionalsubsystems->add(new admin_setting_configselect('messagingdeletereadnotificationsdelay', new lang_string('messagingdeletereadnotificationsdelay', 'admin'), new lang_string('configmessagingdeletereadnotificationsdelay', 'admin'), 604800, $options));
$options = array(
DAYSECS => new lang_string('secondstotime86400'),
WEEKSECS => new lang_string('secondstotime604800'),
2620800 => new lang_string('nummonths', 'moodle', 1),
7862400 => new lang_string('nummonths', 'moodle', 3),
15724800 => new lang_string('nummonths', 'moodle', 6),
0 => new lang_string('never')
);
$optionalsubsystems->add(new admin_setting_configselect(
'messagingdeletereadnotificationsdelay',
new lang_string('messagingdeletereadnotificationsdelay', 'admin'),
new lang_string('configmessagingdeletereadnotificationsdelay', 'admin'),
604800,
$options)
);
$optionalsubsystems->add(new admin_setting_configselect(
'messagingdeleteallnotificationsdelay',
new lang_string('messagingdeleteallnotificationsdelay', 'admin'),
new lang_string('configmessagingdeleteallnotificationsdelay', 'admin'),
2620800,
$options)
);
$optionalsubsystems->add(new admin_setting_configcheckbox('messagingallowemailoverride', new lang_string('messagingallowemailoverride', 'admin'), new lang_string('configmessagingallowemailoverride','admin'), 0));
@@ -153,6 +153,12 @@ class invalid_analysables implements \renderable, \templatable {
$data->analysables[] = $obj;
}
if (empty($data->analysables)) {
$data->noanalysables = [
'message' => get_string('noinvalidanalysables', 'tool_analytics'),
'announce' => true,
];
}
return $data;
}
}
@@ -247,7 +247,7 @@ class models_list implements \renderable, \templatable {
}
// Clear model.
if (!empty($predictioncontexts)) {
if (!empty($predictioncontexts) || $model->is_trained()) {
$actionid = 'clear-' . $model->get_id();
$PAGE->requires->js_call_amd('tool_analytics/model', 'confirmAction', [$actionid, 'clear']);
$urlparams['action'] = 'clear';
@@ -62,7 +62,7 @@ $string['indicators'] = 'Indicators';
$string['info'] = 'Info';
$string['insights'] = 'Insights';
$string['invalidanalysables'] = 'Invalid site elements';
$string['invalidanalysablesinfo'] = 'This pages lists this site analysable elements that can not be used by this prediction model. The listed elements can not be used neither to train the prediction model nor the prediction model can get predictions for them.';
$string['invalidanalysablesinfo'] = 'This page lists analysable elements that can\'t be used by this prediction model. The listed elements can\'t be used either to train the prediction model nor can the prediction model obtain predictions for them.';
$string['invalidanalysablestable'] = 'Invalid site analysable elements table';
$string['invalidprediction'] = 'Invalid to get predictions';
$string['invalidtraining'] = 'Invalid to train the model';
@@ -75,6 +75,7 @@ $string['nextpage'] = 'Next page';
$string['nodatatoevaluate'] = 'There is no data to evaluate the model';
$string['nodatatopredict'] = 'No new elements to get predictions for';
$string['nodatatotrain'] = 'There is no new data that can be used for training';
$string['noinvalidanalysables'] = 'This site does not contain any invalid analysable element.';
$string['notdefined'] = 'Not yet defined';
$string['pluginname'] = 'Analytic models';
$string['predictionresults'] = 'Prediction results';
@@ -48,31 +48,38 @@
<div class="box">
<h3>{{#str}}modelinvalidanalysables, tool_analytics, {{modelname}}{{/str}}</h3>
<div>{{#str}}invalidanalysablesinfo, tool_analytics{{/str}}</div>
<div class="m-t-2 m-b-1">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
<table class="generaltable fullwidth">
<caption class="accesshide">{{#str}}invalidanalysablestable, tool_analytics{{/str}}</caption>
<thead>
<tr>
<th scope="col">{{#str}}name{{/str}}</th>
<th scope="col">{{#str}}invalidtraining, tool_analytics{{/str}}</th>
<th scope="col">{{#str}}invalidprediction, tool_analytics{{/str}}</th>
</tr>
</thead>
<tbody>
{{#analysables}}
<tr>
<td>{{{url}}}</td>
<td>{{validtraining}}</td>
<td>{{validprediction}}</td>
</tr>
{{/analysables}}
</tbody>
</table>
<div class="m-t-1 m-b-2">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
{{#noanalysables}}
<div class="m-t-2 m-b-1">
{{> core/notification_info}}
</div>
{{/noanalysables}}
{{^noanalysables}}
<div class="m-t-2 m-b-1">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
<table class="generaltable fullwidth">
<caption class="accesshide">{{#str}}invalidanalysablestable, tool_analytics{{/str}}</caption>
<thead>
<tr>
<th scope="col">{{#str}}name{{/str}}</th>
<th scope="col">{{#str}}invalidtraining, tool_analytics{{/str}}</th>
<th scope="col">{{#str}}invalidprediction, tool_analytics{{/str}}</th>
</tr>
</thead>
<tbody>
{{#analysables}}
<tr>
<td>{{{url}}}</td>
<td>{{validtraining}}</td>
<td>{{validprediction}}</td>
</tr>
{{/analysables}}
</tbody>
</table>
<div class="m-t-1 m-b-2">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
{{/noanalysables}}
</div>
+11
View File
@@ -109,6 +109,17 @@ require_once(__DIR__ . '/../../../../lib/behat/lib.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
// Remove error handling overrides done in config.php. This is consistent with admin/tool/behat/cli/util_single_run.php.
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;
error_reporting($CFG->debug);
ini_set('display_errors', '1');
ini_set('log_errors', '1');
// Import the necessary libraries.
require_once($CFG->libdir . '/setuplib.php');
require_once($CFG->libdir . '/behat/classes/util.php');
// For drop option check if parallel site.
if ((empty($options['parallel'])) && ($options['drop']) || $options['updatesteps']) {
$options['parallel'] = behat_config_manager::get_behat_run_config_value('parallel');
+1 -1
View File
@@ -218,7 +218,7 @@ if ($options['install']) {
// Run behat command to get steps in feature files.
$featurestepscmd = behat_command::get_behat_command(true);
$featurestepscmd .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
$featurestepscmd .= ' --dry-run --format=moodle_step_count';
$featurestepscmd .= ' --dry-run --format=moodle_stepcount';
$processes = cli_execute_parallel(array($featurestepscmd), __DIR__ . "/../../../../");
$status = print_update_step_output(array_pop($processes), $behatstepfile);
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -920,9 +920,17 @@ class expired_contexts_manager {
* @return bool
*/
protected static function is_course_context_expired_or_unprotected_for_user(\context $context, \stdClass $user) {
$expiryrecords = self::get_nested_expiry_info_for_courses($context->path);
$info = $expiryrecords[$context->path]->info;
if ($context->get_course_context()->instanceid == SITEID) {
// The is an activity in the site course (front page).
$purpose = data_registry::get_effective_contextlevel_value(CONTEXT_SYSTEM, 'purpose');
$info = static::get_expiry_info($purpose);
} else {
$expiryrecords = self::get_nested_expiry_info_for_courses($context->path);
$info = $expiryrecords[$context->path]->info;
}
if ($info->is_fully_expired()) {
// This context is fully expired.
return true;
+3
View File
@@ -313,5 +313,8 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2018112500, 'tool', 'dataprivacy');
}
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -277,7 +277,7 @@ $string['resubmitrequestasnew'] = 'Resubmit as new request';
$string['resubmitrequest'] = 'Resubmit {$a->type} request for {$a->username}';
$string['resubmittedrequest'] = 'The existing {$a->type} request for {$a->username} was cancelled and resubmitted';
$string['resultdeleted'] = 'You recently requested to have your account and personal data in {$a} to be deleted. This process has been completed and you will no longer be able to log in.';
$string['resultdownloadready'] = 'Your copy of your personal data in {$a} that you recently requested is now available for download. Please click on the link below to go to the download page.';
$string['resultdownloadready'] = 'Your copy of your personal data from {$a} that you recently requested is now available for download from the following link.';
$string['reviewdata'] = 'Review data';
$string['retentionperiod'] = 'Retention period';
$string['retentionperiod_help'] = 'The retention period specifies the length of time that data should be kept for. When the retention period has expired, the data is flagged and listed for deletion, awaiting admin confirmation.';
-10
View File
@@ -15,16 +15,6 @@
overflow-y: scroll;
}
dd a.contactdpo {
/* Reverting dd's left margin */
margin-left: -10px;
}
.card dd a.contactdpo {
/* Reverting dd's left margin */
margin-left: inherit;
}
[data-region="data-requests-table"] .moodle-actionmenu {
min-width: 150px;
}
@@ -2222,6 +2222,40 @@ class tool_dataprivacy_expired_contexts_testcase extends advanced_testcase {
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($blockcontext, $user));
}
/**
* Test the is_context_expired functions when supplied with the front page course.
*/
public function test_is_context_expired_frontpage() {
$this->resetAfterTest();
$purposes = $this->setup_basics('PT1H', 'PT1H', 'P1D');
$frontcourse = get_site();
$frontcoursecontext = \context_course::instance($frontcourse->id);
$sitenews = $this->getDataGenerator()->create_module('forum', ['course' => $frontcourse->id]);
$cm = get_coursemodule_from_instance('forum', $sitenews->id);
$sitenewscontext = \context_module::instance($cm->id);
$user = $this->getDataGenerator()->create_user(['lastaccess' => time() - YEARSECS]);
$this->assertFalse(expired_contexts_manager::is_context_expired($frontcoursecontext));
$this->assertFalse(expired_contexts_manager::is_context_expired($sitenewscontext));
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($frontcoursecontext, $user));
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($sitenewscontext, $user));
// Protecting the course contextlevel does not impact the front page.
$purposes->course->set('protected', 1)->save();
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($frontcoursecontext, $user));
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($sitenewscontext, $user));
// Protecting the system contextlevel affects the front page, too.
$purposes->system->set('protected', 1)->save();
$this->assertFalse(expired_contexts_manager::is_context_expired_or_unprotected_for_user($frontcoursecontext, $user));
$this->assertFalse(expired_contexts_manager::is_context_expired_or_unprotected_for_user($sitenewscontext, $user));
}
/**
* Test the is_context_expired functions when supplied with an expired course.
*/
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -39,5 +39,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -39,5 +39,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -116,7 +116,7 @@ class tool_lp_external_testcase extends externallib_advanced_testcase {
$this->userrole = create_role('User role', 'lpuserrole', 'learning plan user role description');
assign_capability('moodle/competency:competencymanage', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:competencycompetencyconfigure', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:coursecompetencyconfigure', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:planmanage', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:planmanagedraft', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:planmanageown', CAP_ALLOW, $this->creatorrole, $syscontext->id);
@@ -274,7 +274,6 @@ class framework_importer {
// We are calling from browser, display progress bar.
if ($this->useprogressbar === true) {
$this->progress = new \core\progress\display_if_slow(get_string('processingfile', 'tool_lpimportcsv'));
$this->progress->start_html();
} else {
// Avoid html output on CLI scripts.
$this->progress = new \core\progress\none();
@@ -464,7 +463,6 @@ class framework_importer {
$framework = api::create_framework($record);
if ($this->useprogressbar === true) {
$this->progress = new \core\progress\display_if_slow(get_string('importingfile', 'tool_lpimportcsv'));
$this->progress->start_html();
} else {
$this->progress = new \core\progress\none();
}
@@ -109,7 +109,7 @@ $string['sslv3'] = 'SSLv2 (Force SSL Version 3)';
$string['taskcleanup'] = 'Cleanup of unverified incoming email';
$string['taskpickup'] = 'Incoming email pickup';
$string['tls'] = 'TLS (TLS; started via protocol-level negotiation over unencrypted channel; RECOMMENDED way of initiating secure connection)';
$string['tlsv1'] = 'TLSv1 (TLS direct version 1.x connection to server)';
$string['tlsv1'] = 'TLSv1 (direct connection to TLS server version 1.x)';
$string['validateaddress'] = 'Validate sender email address';
$string['validateaddress_help'] = 'When a message is received from a user, Moodle attempts to validate the message by comparing the email address of the sender with the email address in their user profile.
+3
View File
@@ -79,5 +79,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+5 -5
View File
@@ -64,11 +64,11 @@ $string['managerules'] = 'Event monitoring rules';
$string['messageprovider:notification'] = 'Notifications of rule subscriptions';
$string['messagetemplate'] = 'Notification message';
$string['messagetemplate_help'] = 'A notification message is sent to subscribers once the notification threshold has been reached. It can include any or all of the following placeholders:
<br /><br />
* Link to the location of the event {link}<br />
* Link to the area monitored {modulelink}<br />
* Rule name {rulename}<br />
* Description {description}<br />
* Link to the location of the event {link}
* Link to the area monitored {modulelink}
* Rule name {rulename}
* Description {description}
* Event {eventname}';
$string['messagetemplate_link'] = 'admin/tool/monitor/managerules';
$string['moduleinstance'] = 'Instance';
+3
View File
@@ -60,5 +60,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2018091800, 'tool', 'policy');
}
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['cannotfit'] = 'The replacement is longer than original and shortening is not allow, cannot continue.';
$string['cannotfit'] = 'The replacement is longer than the original and shortening is not allowed; cannot continue.';
$string['disclaimer'] = 'I understand the risks of this operation';
$string['doit'] = 'Yes, do it!';
$string['excludedtables'] = 'Several tables are not updated as part of the text replacement. These include configuration, log, events, and session tables.';
+31 -6
View File
@@ -34,7 +34,7 @@ $string['disabled'] = 'Disabled';
$string['disabled_help'] = 'Disabled scheduled tasks are not executed from cron, however they can still be executed manually via the CLI tool.';
$string['edittaskschedule'] = 'Edit task schedule: {$a}';
$string['enablerunnow'] = 'Allow \'Run now\' for scheduled tasks';
$string['enablerunnow_desc'] = 'Allows administrators to run a single scheduled task immediately, rather than waiting for it to run as scheduled. The task runs on the web server, so some sites may wish to disable this feature to avoid potential performance issues.';
$string['enablerunnow_desc'] = 'Allows administrators to run a single scheduled task immediately, rather than waiting for it to run as scheduled. The feature requires \'Path to PHP CLI\' (pathtophp) to be set in System paths. The task runs on the web server, so you may wish to disable this feature to avoid potential performance issues.';
$string['faildelay'] = 'Fail delay';
$string['lastruntime'] = 'Last run';
$string['nextruntime'] = 'Next run';
@@ -49,14 +49,39 @@ $string['scheduledtasks'] = 'Scheduled tasks';
$string['scheduledtaskchangesdisabled'] = 'Modifications to the list of scheduled tasks have been prevented in Moodle configuration';
$string['taskdisabled'] = 'Task disabled';
$string['taskscheduleday'] = 'Day';
$string['taskscheduleday_help'] = 'Day of month field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every day</li><li><strong>*/2</strong> Every 2nd day</li><li><strong>1</strong> The first of every month</li><li><strong>1,15</strong> The first and fifteenth of every month</li></ul>';
$string['taskscheduleday_help'] = 'Day of month field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every day
* <strong>*/2</strong> Every 2nd day
* <strong>1</strong> The first of every month
* <strong>1,15</strong> The first and fifteenth of every month';
$string['taskscheduledayofweek'] = 'Day of week';
$string['taskscheduledayofweek_help'] = 'Day of week field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every day</li><li><strong>0</strong> Every Sunday</li><li><strong>6</strong> Every Saturday</li><li><strong>1,5</strong> Every Monday and Friday</li></ul>';
$string['taskscheduledayofweek_help'] = 'Day of week field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every day
* <strong>0</strong> Every Sunday
* <strong>6</strong> Every Saturday
* <strong>1,5</strong> Every Monday and Friday';
$string['taskschedulehour'] = 'Hour';
$string['taskschedulehour_help'] = 'Hour field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every hour</li><li><strong>*/2</strong> Every 2 hours</li><li><strong>2-10</strong> Every hour from 2am until 10am (inclusive)</li><li><strong>2,6,9</strong> 2am, 6am and 9am</li></ul>';
$string['taskschedulehour_help'] = 'Hour field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every hour
* <strong>*/2</strong> Every 2 hours
* <strong>2-10</strong> Every hour from 2am until 10am (inclusive)
* <strong>2,6,9</strong> 2am, 6am and 9am';
$string['taskscheduleminute'] = 'Minute';
$string['taskscheduleminute_help'] = 'Minute field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every minute</li><li><strong>*/5</strong> Every 5 minutes</li><li><strong>2-10</strong> Every minute between 2 and 10 past the hour (inclusive)</li><li><strong>2,6,9</strong> 2 6 and 9 minutes past the hour</li></ul>';
$string['taskscheduleminute_help'] = 'Minute field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every minute
* <strong>*/5</strong> Every 5 minutes
* <strong>2-10</strong> Every minute between 2 and 10 past the hour (inclusive)
* <strong>2,6,9</strong> 2, 6 and 9 minutes past the hour';
$string['taskschedulemonth'] = 'Month';
$string['taskschedulemonth_help'] = 'Month field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every month</li><li><strong>*/2</strong> Every second month</li><li><strong>1</strong> Every January</li><li><strong>1,5</strong> Every January and May</li></ul>';
$string['taskschedulemonth_help'] = 'Month field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every month
* <strong>*/2</strong> Every second month
* <strong>1</strong> Every January
* <strong>1,5</strong> Every January and May';
$string['privacy:metadata'] = 'The Scheduled task configuration plugin does not store any personal data.';
@@ -104,8 +104,7 @@ $string['reset_help'] = 'Whether to reset the course after creating/updating it.
$string['result'] = 'Result';
$string['restoreafterimport'] = 'Restore after import';
$string['rowpreviewnum'] = 'Preview rows';
$string['rowpreviewnum_help'] = 'Number of rows from the CSV file that will be previewed in the next page. This option exists in
order to limit the next page size.';
$string['rowpreviewnum_help'] = 'Number of rows from the CSV file that will be previewed on the following page. This option is for limiting the size of the following page.';
$string['shortnametemplate'] = 'Template to generate a shortname';
$string['shortnametemplate_help'] = 'The short name of the course is displayed in the navigation. You may use template syntax here (%f = fullname, %i = idnumber), or enter an initial value that is incremented.';
$string['templatefile'] = 'Restore from this file after upload';
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/str","core/notification"],function(a,b,c){var d={removeStep:function(d){d.preventDefault(),b.get_strings([{key:"confirmstepremovaltitle",component:"tool_usertours"},{key:"confirmstepremovalquestion",component:"tool_usertours"},{key:"yes",component:"moodle"},{key:"no",component:"moodle"}]).done(function(b){c.confirm(b[0],b[1],b[2],b[3],a.proxy(function(){window.location=a(this).attr("href")},d.currentTarget))})},setup:function(){a("body").delegate('[data-action="delete"]',"click",d.removeStep)}};return{setup:d.setup}});
define(["jquery","core/str","core/notification"],function(a,b,c){var d={removeStep:function(d){d.preventDefault();var e=a(d.currentTarget).attr("href");b.get_strings([{key:"confirmstepremovaltitle",component:"tool_usertours"},{key:"confirmstepremovalquestion",component:"tool_usertours"},{key:"yes",component:"moodle"},{key:"no",component:"moodle"}]).then(function(a){c.confirm(a[0],a[1],a[2],a[3],function(){window.location=e})})["catch"]()},setup:function(){a("body").delegate('[data-action="delete"]',"click",d.removeStep)}};return{setup:d.setup}});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/str","core/notification"],function(a,b,c,d){var e={removeTour:function(b){b.preventDefault(),c.get_strings([{key:"confirmtourremovaltitle",component:"tool_usertours"},{key:"confirmtourremovalquestion",component:"tool_usertours"},{key:"yes",component:"moodle"},{key:"no",component:"moodle"}]).done(function(c){d.confirm(c[0],c[1],c[2],c[3],a.proxy(function(){window.location=a(this).attr("href")},b.currentTarget))})},setup:function(){a("body").delegate('[data-action="delete"]',"click",e.removeTour)}};return{setup:e.setup}});
define(["jquery","core/ajax","core/str","core/notification"],function(a,b,c,d){var e={removeTour:function(b){b.preventDefault();var e=a(b.currentTarget).attr("href");c.get_strings([{key:"confirmtourremovaltitle",component:"tool_usertours"},{key:"confirmtourremovalquestion",component:"tool_usertours"},{key:"yes",component:"moodle"},{key:"no",component:"moodle"}]).then(function(a){d.confirm(a[0],a[1],a[2],a[3],function(){window.location=e})})["catch"]()},setup:function(){a("body").delegate('[data-action="delete"]',"click",e.removeTour)}};return{setup:e.setup}});
+10 -5
View File
@@ -18,6 +18,7 @@ function($, str, notification) {
*/
removeStep: function(e) {
e.preventDefault();
var targetUrl = $(e.currentTarget).attr('href');
str.get_strings([
{
key: 'confirmstepremovaltitle',
@@ -35,11 +36,15 @@ function($, str, notification) {
key: 'no',
component: 'moodle'
}
]).done(function(s) {
notification.confirm(s[0], s[1], s[2], s[3], $.proxy(function() {
window.location = $(this).attr('href');
}, e.currentTarget));
});
])
.then(function(s) {
notification.confirm(s[0], s[1], s[2], s[3], function() {
window.location = targetUrl;
});
return;
})
.catch();
},
/**
+10 -6
View File
@@ -18,7 +18,7 @@ function($, ajax, str, notification) {
*/
removeTour: function(e) {
e.preventDefault();
var targetUrl = $(e.currentTarget).attr('href');
str.get_strings([
{
key: 'confirmtourremovaltitle',
@@ -36,11 +36,15 @@ function($, ajax, str, notification) {
key: 'no',
component: 'moodle'
}
]).done(function(s) {
notification.confirm(s[0], s[1], s[2], s[3], $.proxy(function() {
window.location = $(this).attr('href');
}, e.currentTarget));
});
])
.then(function(s) {
notification.confirm(s[0], s[1], s[2], s[3], function() {
window.location = targetUrl;
});
return;
})
.catch();
},
/**
+6
View File
@@ -497,6 +497,12 @@ class helper {
return;
}
if (in_array($PAGE->pagelayout, ['maintenance', 'print', 'redirect'])) {
// Do not try to show user tours inside iframe, in maintenance mode,
// when printing, or during redirects.
return;
}
if (self::$bootstrapped) {
return;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2018113002, 'tool', 'usertours');
}
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+4 -4
View File
@@ -155,7 +155,7 @@ $string['newtable'] = 'New table';
$string['newtablefrommysql'] = 'New table from MySQL';
$string['new_table_from_mysql'] = 'New table from MySQL';
$string['nofieldsspecified'] = 'No fields specified';
$string['nomasterprimaryuniquefound'] = 'The column(s) that you foreign key references must be included in a primary or unique KEY in the referenced table. Note, the column being in a UNIQUE INDEX is not good enough.';
$string['nomasterprimaryuniquefound'] = 'The column(s) that your foreign key references must be included in a primary or unique KEY in the referenced table. Note that the column being in a UNIQUE INDEX is not good enough.';
$string['nomissingindexesfound'] = 'No missing indexes have been found, your DB doesn\'t need further actions.';
$string['noreffieldsspecified'] = 'No reference fields specified';
$string['noreftablespecified'] = 'Specified reference table not found';
@@ -215,8 +215,8 @@ $string['yesmissingindexesfound'] = '<p>Some missing indexes have been found in
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more missing indexes are found.</p>';
$string['yeswrongdefaultsfound'] = '<p>Some inconsistent defaults have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to fix them all. Remember to backup your data first!</p>
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more inconsistent defaults are found.</p>';
$string['yeswrongintsfound'] = '<p>Some wrong integers have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all them. Remember to backup your data first!</p>
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more wrong integers are found.</p>';
$string['yeswrongoraclesemanticsfound'] = '<p>Some Oracle columns using BYTE semantics have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to create all them. Remember to backup your data first!</p>
$string['yeswrongintsfound'] = '<p>Some wrong integers have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to fix them. Remember to backup your data first!</p>
<p>After fixing them, it is highly recommended to execute this utility again to check that no more wrong integers are found.</p>';
$string['yeswrongoraclesemanticsfound'] = '<p>Some Oracle columns using BYTE semantics have been found in your DB. Here are their details and the needed SQL statements to be executed with your favourite SQL interface to convert them all. Remember to backup your data first!</p>
<p>After doing that, it\'s highly recommended to execute this utility again to check that no more wrong semantics are found.</p>';
$string['privacy:metadata'] = 'The XMLDB editor plugin does not store any personal data.';
+16 -4
View File
@@ -169,10 +169,7 @@ abstract class base extends \core_analytics\calculable {
if (!is_null($calculatedvalue)) {
$notnulls[$sampleid] = $sampleid;
if ($calculatedvalue > self::MAX_VALUE || $calculatedvalue < self::MIN_VALUE) {
throw new \coding_exception('Calculated values should be higher than ' . self::MIN_VALUE .
' and lower than ' . self::MAX_VALUE . ' ' . $calculatedvalue . ' received');
}
$this->validate_calculated_value($calculatedvalue);
}
$calculations[$sampleid] = $calculatedvalue;
@@ -182,4 +179,19 @@ abstract class base extends \core_analytics\calculable {
return array($features, $newcalculations, $notnulls);
}
/**
* Validates the calculated value.
*
* @throws \coding_exception
* @param float $calculatedvalue
* @return true
*/
protected function validate_calculated_value($calculatedvalue) {
if ($calculatedvalue > self::MAX_VALUE || $calculatedvalue < self::MIN_VALUE) {
throw new \coding_exception('Calculated values should be higher than ' . self::MIN_VALUE .
' and lower than ' . self::MAX_VALUE . ' ' . $calculatedvalue . ' received');
}
return true;
}
}
+1 -3
View File
@@ -41,9 +41,7 @@ abstract class binary extends discrete {
* @return array
*/
public static final function get_classes() {
// It does not really matter, all \core_analytics\local\indicator\discrete get_classes calls have been overwriten as we
// only need 1 column here.
return array(0);
return [-1, 1];
}
/**
+26 -8
View File
@@ -52,8 +52,7 @@ abstract class discrete extends base {
public static function get_feature_headers() {
$fullclassname = '\\' . get_called_class();
$headers = array($fullclassname);
foreach (self::get_classes() as $class) {
foreach (static::get_classes() as $class) {
$headers[] = $fullclassname . '/' . $class;
}
@@ -116,26 +115,45 @@ abstract class discrete extends base {
*/
protected function to_features($calculatedvalues) {
$classes = self::get_classes();
$classes = static::get_classes();
foreach ($calculatedvalues as $sampleid => $calculatedvalue) {
$classindex = array_search($calculatedvalue, $classes, true);
// Using intval as it may come as a float from the db.
$classindex = array_search(intval($calculatedvalue), $classes, true);
if (!$classindex) {
throw new \coding_exception(get_class($this) . ' calculated "' . $calculatedvalue .
'" which is not one of its defined classes (' . json_encode($classes) . ')');
if ($classindex === false && !is_null($calculatedvalue)) {
throw new \coding_exception(get_class($this) . ' calculated value "' . $calculatedvalue .
'" is not one of its defined classes (' . json_encode($classes) . ')');
}
// We transform the calculated value into multiple features, one for each of the possible classes.
$features = array_fill(0, count($classes), 0);
// 1 to the selected value.
$features[$classindex] = 1;
if (!is_null($calculatedvalue)) {
$features[$classindex] = 1;
}
$calculatedvalues[$sampleid] = $features;
}
return $calculatedvalues;
}
/**
* Validates the calculated value.
*
* @param float $calculatedvalue
* @return true
*/
protected function validate_calculated_value($calculatedvalue) {
// Using intval as it may come as a float from the db.
if (!in_array(intval($calculatedvalue), static::get_classes())) {
throw new \coding_exception(get_class($this) . ' calculated value "' . $calculatedvalue .
'" is not one of its defined classes (' . json_encode(static::get_classes()) . ')');
}
return true;
}
}
+90
View File
@@ -0,0 +1,90 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Test indicator.
*
* @package core_analytics
* @copyright 2019 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Test indicator.
*
* @package core_analytics
* @copyright 2019 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class test_indicator_discrete extends \core_analytics\local\indicator\discrete {
/**
* Returns the name.
*
* If there is a corresponding '_help' string this will be shown as well.
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
/**
* The different classes this discrete indicator provides.
* @return [type] [description]
*/
protected static function get_classes() {
return [0, 1, 2, 3, 4];
}
/**
* Just for testing.
*
* @param float $value
* @param string $subtype
* @return string
*/
public function get_calculation_outcome($value, $subtype = false) {
return self::OUTCOME_OK;
}
/**
* Custom indicator calculated value display as otherwise we would display meaningless numbers to users.
*
* @param float $value
* @param string $subtype
* @return string
*/
public function get_display_value($value, $subtype = false) {
return $value;
}
/**
* calculate_sample
*
* @param int $sampleid
* @param string $sampleorigin
* @param int $starttime
* @param int $endtime
* @return float
*/
protected function calculate_sample($sampleid, $sampleorigin, $starttime = false, $endtime = false) {
return 4;
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2017 David Monllaó {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class test_indicator_random extends \core_analytics\local\indicator\binary {
class test_indicator_random extends \core_analytics\local\indicator\linear {
/**
* Returns a lang_string object representing the name for the indicator.
+99
View File
@@ -0,0 +1,99 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the indicator API.
*
* @package core_analytics
* @copyright 2019 David Monllaó {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/fixtures/test_indicator_max.php');
require_once(__DIR__ . '/fixtures/test_indicator_discrete.php');
require_once(__DIR__ . '/fixtures/test_indicator_min.php');
/**
* Unit tests for the model.
*
* @package core_analytics
* @copyright 2017 David Monllaó {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class analytics_indicator_testcase extends advanced_testcase {
/**
* test_validate_calculated_value
*
* @param string $indicatorclass
* @param array $returnedvalue
* @dataProvider validate_calculated_value
* @return null
*/
public function test_validate_calculated_value($indicatorclass, $returnedvalue) {
$indicator = new $indicatorclass();
list($values, $unused) = $indicator->calculate([1], 'notrelevanthere');
$this->assertEquals($returnedvalue, $values[0]);
}
/**
* Data provider for test_validate_calculated_value
*
* @return array
*/
public function validate_calculated_value() {
return [
'max' => ['test_indicator_max', [1]],
'min' => ['test_indicator_min', [-1]],
'discrete' => ['test_indicator_discrete', [0, 0, 0, 0, 1]],
];
}
/**
* test_validate_calculated_value_exceptions
*
* @param string $indicatorclass
* @param string $willreturn
* @dataProvider validate_calculated_value_exceptions
* @expectedException \coding_exception
* @return null
*/
public function test_validate_calculated_value_exceptions($indicatorclass, $willreturn) {
$indicator = new $indicatorclass();
$indicatormock = $this->getMockBuilder(get_class($indicator))
->setMethods(['calculate_sample'])
->getMock();
$indicatormock->method('calculate_sample')->willReturn($willreturn);
list($values, $unused) = $indicatormock->calculate([1], 'notrelevanthere');
}
/**
* Data provider for test_validate_calculated_value_exceptions
*
* @return array
*/
public function validate_calculated_value_exceptions() {
return [
'max' => ['test_indicator_max', 2],
'min' => ['test_indicator_min', -2],
'discrete' => ['test_indicator_discrete', 7],
];
}
}
+1 -1
View File
@@ -452,7 +452,7 @@ class core_analytics_prediction_testcase extends advanced_testcase {
$indicator = $this->getMockBuilder('test_indicator_max')->setMethods(['calculate_sample'])->getMock();
$indicator->expects($this->never())->method('calculate_sample');
$existingcalcs = array(111 => 1, 222 => 0.5);
$existingcalcs = array(111 => 1, 222 => -1);
$sampleids = array(111 => 111, 222 => 222);
list($values, $unused) = $indicator->calculate($sampleids, $sampleorigin, $starttime, $endtime, $existingcalcs);
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_db_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -33,7 +33,7 @@ $string['auth_dbextencodinghelp'] = 'Encoding used in external database';
$string['auth_dbextrafields'] = 'These fields are optional. You can choose to pre-fill some Moodle user fields with information from the <b>external database fields</b> that you specify here. <p>If you leave these blank, then defaults will be used.</p><p>In either case, the user will be able to edit all of these fields after they log in.</p>';
$string['auth_dbfieldpass'] = 'Name of the field containing passwords';
$string['auth_dbfieldpass_key'] = 'Password field';
$string['auth_dbfielduser'] = 'Name of the field containing usernames';
$string['auth_dbfielduser'] = 'Name of the field containing usernames. This field must be a varchar data type.';
$string['auth_dbfielduser_key'] = 'Username field';
$string['auth_dbhost'] = 'The computer hosting the database server. Use a system DSN entry if using ODBC. Use a PDO DSN entry if using PDO.';
$string['auth_dbhost_key'] = 'Host';
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_email_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+21 -14
View File
@@ -698,8 +698,8 @@ class auth_plugin_ldap extends auth_plugin_base {
array_push($contexts, $this->config->create_context);
}
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
$ldap_cookie = '';
$ldappagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
$ldapcookie = '';
foreach ($contexts as $context) {
$context = trim($context);
if (empty($context)) {
@@ -707,23 +707,28 @@ class auth_plugin_ldap extends auth_plugin_base {
}
do {
if ($ldap_pagedresults) {
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldap_cookie);
if ($ldappagedresults) {
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldapcookie);
}
if ($this->config->search_sub) {
// Use ldap_search to find first user from subtree.
$ldap_result = ldap_search($ldapconnection, $context, $filter, array($this->config->user_attribute));
$ldapresult = ldap_search($ldapconnection, $context, $filter, array($this->config->user_attribute));
} else {
// Search only in this context.
$ldap_result = ldap_list($ldapconnection, $context, $filter, array($this->config->user_attribute));
$ldapresult = ldap_list($ldapconnection, $context, $filter, array($this->config->user_attribute));
}
if(!$ldap_result) {
if (!$ldapresult) {
continue;
}
if ($ldap_pagedresults) {
ldap_control_paged_result_response($ldapconnection, $ldap_result, $ldap_cookie);
if ($ldappagedresults) {
$pagedresp = ldap_control_paged_result_response($ldapconnection, $ldapresult, $ldapcookie);
// Function ldap_control_paged_result_response() does not overwrite $ldapcookie if it fails, by
// setting this to null we avoid an infinite loop.
if ($pagedresp === false) {
$ldapcookie = null;
}
}
if ($entry = @ldap_first_entry($ldapconnection, $ldap_result)) {
if ($entry = @ldap_first_entry($ldapconnection, $ldapresult)) {
do {
$value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute);
$value = core_text::convert($value[0], $this->config->ldapencoding, 'utf-8');
@@ -731,13 +736,13 @@ class auth_plugin_ldap extends auth_plugin_base {
$this->ldap_bulk_insert($value);
} while ($entry = ldap_next_entry($ldapconnection, $entry));
}
unset($ldap_result); // Free mem.
} while ($ldap_pagedresults && $ldap_cookie !== null && $ldap_cookie != '');
unset($ldapresult); // Free mem.
} while ($ldappagedresults && $ldapcookie !== null && $ldapcookie != '');
}
// If LDAP paged results were used, the current connection must be completely
// closed and a new one created, to work without paged results from here on.
if ($ldap_pagedresults) {
if ($ldappagedresults) {
$this->ldap_close(true);
$ldapconnection = $this->ldap_connect();
}
@@ -748,7 +753,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$count = $DB->count_records_sql('SELECT COUNT(username) AS count, 1 FROM {tmp_extuser}');
if ($count < 1) {
print_string('didntgetusersfromldap', 'auth_ldap');
exit;
$dbman->drop_table($table);
$this->ldap_close();
return false;
} else {
print_string('gotcountrecordsfromldap', 'auth_ldap', $count);
}
+3
View File
@@ -69,5 +69,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+5 -5
View File
@@ -48,16 +48,16 @@ $string['auth_ldap_expiration_warning_key'] = 'Expiry warning';
$string['auth_ldap_expireattr_desc'] = 'Optional: Overrides the LDAP attribute that stores password expiry time.';
$string['auth_ldap_expireattr_key'] = 'Expiry attribute';
$string['auth_ldapextrafields'] = 'These fields are optional. You can choose to pre-fill some Moodle user fields with information from the <b>LDAP fields</b> that you specify here. <p>If you leave these fields blank, then nothing will be transferred from LDAP and Moodle defaults will be used instead.</p><p>In either case, the user will be able to edit all of these fields after they log in.</p>';
$string['auth_ldap_graceattr_desc'] = 'Optional: Overrides gracelogin attribute';
$string['auth_ldap_graceattr_desc'] = 'Optional: Overrides grace login attribute';
$string['auth_ldap_gracelogin_key'] = 'Grace login attribute';
$string['auth_ldap_gracelogins_desc'] = 'Enable LDAP gracelogin support. After password has expired user can login until gracelogin count is 0. Enabling this setting displays grace login message if password is expired.';
$string['auth_ldap_gracelogins_desc'] = 'Enable LDAP grace login support. After password has expired, user can log in until grace login count is 0. Enabling this setting displays grace login message if password has expired.';
$string['auth_ldap_gracelogins_key'] = 'Grace logins';
$string['auth_ldap_groupecreators'] = 'List of groups or contexts whose members are allowed to create groups. Separate multiple groups with \';\'. Usually something like \'cn=teachers,ou=staff,o=myorg\'';
$string['auth_ldap_groupecreators_key'] = 'Group creators';
$string['auth_ldap_host_url'] = 'Specify LDAP host in URL-form like \'ldap://ldap.myorg.com/\' or \'ldaps://ldap.myorg.com/\'. Separate multiple servers with \';\' to get failover support.';
$string['auth_ldap_host_url_key'] = 'Host URL';
$string['auth_ldap_changepasswordurl_key'] = 'Password-change URL';
$string['auth_ldap_ldap_encoding'] = 'Specify encoding used by LDAP server. Most probably utf-8, MS AD v2 uses default platform encoding such as cp1252, cp1250, etc.';
$string['auth_ldap_ldap_encoding'] = 'Encoding used by the LDAP server, most likely utf-8. If LDAP v2 is selected, Active Directory uses its configured encoding, such as cp1252 or cp1250.';
$string['auth_ldap_ldap_encoding_key'] = 'LDAP encoding';
$string['auth_ldap_login_settings'] = 'Login settings';
$string['auth_ldap_memberattribute'] = 'Optional: Overrides user member attribute, when users belongs to a group. Usually \'member\'';
@@ -121,7 +121,7 @@ $string['didntfindexpiretime'] = 'password_expire() didn\'t find expiration time
$string['didntgetusersfromldap'] = "Did not get any users from LDAP -- error? -- exiting\n";
$string['gotcountrecordsfromldap'] = "Got {\$a} records from LDAP\n";
$string['ldapnotconfigured'] = 'The LDAP host url is currently not configured';
$string['morethanoneuser'] = 'Strange! More than one user record found in ldap. Only using the first one.';
$string['morethanoneuser'] = 'More than one user record found in LDAP. Using only the first one.';
$string['needbcmath'] = 'You need the BCMath extension to use expired password checking with Active Directory.';
$string['needmbstring'] = 'You need the mbstring extension to change passwords in Active Directory';
$string['nodnforusername'] = 'Error in user_update_password(). No DN for: {$a->username}';
@@ -152,7 +152,7 @@ $string['updateremfailamb'] = 'Failed to update LDAP with ambiguous field {$a->k
$string['updateremfailfield'] = 'Failed to update LDAP with non-existent field (\'{$a->ldapkey}\'). Key ({$a->key}) - old Moodle value: \'{$a->ouvalue}\' new value: \'{$a->nuvalue}\'';
$string['updatepasserror'] = 'Error in user_update_password(). Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpire'] = 'Error in user_update_password() when reading password expiry time. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpiregrace'] = 'Error in user_update_password() when modifying expirationtime and/or gracelogins. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpiregrace'] = 'Error in user_update_password() when modifying expiry time and/or grace logins. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updateusernotfound'] = 'Could not find user while updating externally. Details follow: search base: \'{$a->userdn}\'; search filter: \'(objectClass=*)\'; search attributes: {$a->attribs}';
$string['user_activatenotsupportusertype'] = 'auth: ldap user_activate() does not support selected usertype: {$a}';
$string['user_disablenotsupportusertype'] = 'auth: ldap user_disable() does not support selected usertype: {$a}';
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+6 -4
View File
@@ -273,13 +273,15 @@ class provider implements
return;
}
$userid = $contextlist->get_user()->id;
foreach ($contextlist->get_contexts() as $context) {
if ($context->contextlevel != CONTEXT_USER) {
return;
continue;
}
if ($context->instanceid == $userid) {
// Because we only use user contexts the instance ID is the user ID.
$DB->delete_records('mnet_log', ['userid' => $context->instanceid]);
}
// Because we only use user contexts the instance ID is the user ID.
$DB->delete_records('mnet_log', ['userid' => $context->instanceid]);
}
}
}
+3
View File
@@ -50,5 +50,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -91,11 +91,11 @@ $string['privacy:metadata:mnet_log:remoteid'] = 'Remote ID of the user who carri
$string['privacy:metadata:mnet_log:time'] = 'Time when the action occurred.';
$string['privacy:metadata:mnet_log:url'] = 'Remote system URL where the action occurred.';
$string['privacy:metadata:mnet_log:userid'] = 'Local ID of the user who carried out the action in the remote system.';
$string['privacy:metadata:mnet_session'] = 'The details of each MNet user session in a remote system is stored temporarily.';
$string['privacy:metadata:mnet_session'] = 'The details of each MNet user session in a remote system. The data is stored temporarily.';
$string['privacy:metadata:mnet_session:expires'] = 'Time when the session expires.';
$string['privacy:metadata:mnet_session:mnethostid'] = 'Remote system MNet ID.';
$string['privacy:metadata:mnet_session:token'] = 'Unique session identifier';
$string['privacy:metadata:mnet_session:useragent'] = 'String denoting the user agent being which is accessing the page.';
$string['privacy:metadata:mnet_session:useragent'] = 'User agent used to access the remote system';
$string['privacy:metadata:mnet_session:userid'] = 'ID of the user jumping to remote system.';
$string['privacy:metadata:mnet_session:username'] = 'Username of the user jumping to remote system.';
$string['unknownhost'] = 'Unknown host';
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_none_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+6 -3
View File
@@ -178,12 +178,15 @@ class provider implements
if (empty($contextlist->count())) {
return;
}
$userid = $contextlist->get_user()->id;
foreach ($contextlist->get_contexts() as $context) {
if ($context->contextlevel != CONTEXT_USER) {
return;
continue;
}
if ($context->instanceid == $userid) {
// Because we only use user contexts the instance ID is the user ID.
static::delete_user_data($context->instanceid);
}
// Because we only use user contexts the instance ID is the user ID.
static::delete_user_data($context->instanceid);
}
}
+3
View File
@@ -47,5 +47,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -34,7 +34,7 @@ $string['auth_shibboleth_login'] = 'Shibboleth login';
$string['auth_shibboleth_login_long'] = 'Login to Moodle via Shibboleth';
$string['auth_shibboleth_manual_login'] = 'Manual login';
$string['auth_shibboleth_select_member'] = 'I\'m a member of ...';
$string['auth_shibboleth_select_organization'] = 'For authentication via Shibboleth, please select your organization from the drop down list:';
$string['auth_shibboleth_select_organization'] = 'For authentication via Shibboleth, please select your organisation from the drop-down menu:';
$string['auth_shib_convert_data'] = 'Data modification API';
$string['auth_shib_convert_data_description'] = 'You can use this API to further modify the data provided by Shibboleth. Read the <a href="../auth/shibboleth/README.txt">README</a> for further instructions.';
$string['auth_shib_convert_data_warning'] = 'The file does not exist or is not readable by the webserver process!';
+4 -3
View File
@@ -37,9 +37,10 @@ class imscc1_converter extends base_converter {
* @return null|string backup::FORMAT_IMSCC1 if the Common Cartridge 1.0 is detected, null otherwise
*/
public static function detect_format($tempdir) {
global $CFG;
$filepath = $CFG->dataroot . '/temp/backup/' . $tempdir;
$filepath = make_backup_temp_directory($tempdir, false);
if (!is_dir($filepath)) {
throw new convert_helper_exception('tmp_backup_directory_not_found', $filepath);
}
$manifest = cc2moodle::get_manifest($filepath);
if (!empty($manifest)) {
// Looks promising, lets load some information.
+4 -3
View File
@@ -38,9 +38,10 @@ class imscc11_converter extends base_converter {
* @return null|string backup::FORMAT_IMSCC11 if the Common Cartridge 1.1 is detected, null otherwise
*/
public static function detect_format($tempdir) {
global $CFG;
$filepath = $CFG->dataroot . '/temp/backup/' . $tempdir;
$filepath = make_backup_temp_directory($tempdir, false);
if (!is_dir($filepath)) {
throw new convert_helper_exception('tmp_backup_directory_not_found', $filepath);
}
$manifest = cc112moodle::get_manifest($filepath);
if (file_exists($manifest)) {
// Looks promising, lets load some information.
+9
View File
@@ -485,6 +485,9 @@ class restore_gradebook_structure_step extends restore_structure_step {
// Freeze gradebook calculations if needed.
$this->gradebook_calculation_freeze();
// Ensure the module cache is current when recalculating grades.
rebuild_course_cache($this->get_courseid(), true);
// Restore marks items as needing update. Update everything now.
grade_regrade_final_grades($this->get_courseid());
}
@@ -4518,6 +4521,12 @@ class restore_create_categories_and_questions extends restore_structure_step {
unset($data->idnumber);
}
if ($data->qtype === 'random') {
// Ensure that this newly created question is considered by
// \qtype_random\task\remove_unused_questions.
$data->hidden = 0;
}
$newitemid = $DB->insert_record('question', $data);
$this->set_mapping('question', $oldid, $newitemid);
// Also annotate them as question_created, we need
+5 -2
View File
@@ -751,8 +751,11 @@ class backup_setting_ui_defaultcustom extends backup_setting_ui_text {
if ($value === false) {
$value = $this->attributes['defaultvalue'];
}
if (!empty($value) && $this->attributes['type'] === 'date_selector') {
return userdate($value);
if (!empty($value)) {
if ($this->attributes['type'] === 'date_selector' ||
$this->attributes['type'] === 'date_time_selector') {
return userdate($value);
}
}
return $value;
}
+1 -4
View File
@@ -50,9 +50,6 @@ class edit_backpack_form extends moodleform {
$mform->addElement('hidden', 'userid', $USER->id);
$mform->setType('userid', PARAM_INT);
$mform->addElement('hidden', 'backpackurl', BADGE_BACKPACKURL);
$mform->setType('backpackurl', PARAM_URL);
if (isset($this->_customdata['email'])) {
// Email will be passed in when we're in the process of verifying the user's email address,
// so set the connection status, lock the email field, and provide options to resend the verification
@@ -94,7 +91,7 @@ class edit_backpack_form extends moodleform {
// We don't need to verify the email address if we're clearing a pending email verification attempt.
if (!isset($data['revertbutton'])) {
$check = new stdClass();
$check->backpackurl = $data['backpackurl'];
$check->backpackurl = BADGE_BACKPACKURL;
$check->email = $data['email'];
$bp = new OpenBadgesBackpackHandler($check);
+1 -1
View File
@@ -188,7 +188,7 @@ class award_criteria_activity extends award_criteria {
* @return bool Whether criteria is complete
*/
public function review($userid, $filtered = false) {
$completionstates = array(COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS);
$completionstates = array(COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS, COMPLETION_COMPLETE_FAIL);
if ($this->course->startdate > time()) {
return false;
+3 -1
View File
@@ -351,7 +351,9 @@ class core_badges_renderer extends plugin_renderer_base {
if (!empty($badge->version)) {
$dl[get_string('version', 'badges')] = $badge->version;
}
$dl[get_string('language')] = $languages[$badge->language];
if (!empty($badge->language)) {
$dl[get_string('language')] = $languages[$badge->language];
}
$dl[get_string('description', 'badges')] = $badge->description;
if (!empty($badge->imageauthorname)) {
$dl[get_string('imageauthorname', 'badges')] = $badge->imageauthorname;
@@ -0,0 +1,69 @@
@mod @mod_quiz @core @core_badges @_file_upload @javascript
Feature: Award badges based on activity completion
In order to ensure a student has learned the material before being marked complete
As a teacher
I need to set a quiz to award a badge when upon completion when the student receives a passing grade, or completed_fail if they use all attempts without passing
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| grade_item_advanced | hiddenuntil |
And the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | First question | Answer the first question |
And the following "activities" exist:
| activity | name | course | idnumber | attempts | gradepass | completion | completionattemptsexhausted | completionpass | completionusegrade |
| quiz | Test quiz name | C1 | quiz1 | 2 | 5.00 | 2 | 1 | 1 | 1 |
And quiz "Test quiz name" contains the following questions:
| question | page |
| First question | 1 |
And user "student1" has attempted "Test quiz name" with responses:
| slot | response |
| 1 | False |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
| Description | Course badge description |
| issuername | Tester of course badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
And I press "Create badge"
And I set the field "type" to "Activity completion"
And I set the field "Quiz - Test quiz name" to "1"
And I press "Save"
And I press "Enable access"
And I press "Continue"
And I should see "Recipients (0)"
And I log out
Scenario: Student earns a badge using activity completion, but does not get passing grade
When I log in as "student1"
And I am on "Course 1" course homepage
And the "Test quiz name" "quiz" activity with "auto" completion should be marked as not complete
And I follow "Test quiz name"
And I press "Re-attempt quiz"
And I set the field "False" to "1"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Badges > Manage badges" in current page administration
And I follow "Course Badge"
And I should see "Recipients (1)"
@@ -96,6 +96,10 @@ class block_admin_bookmarks extends block_base {
$contenturl = new moodle_url($temp->url);
$contentlink = html_writer::link($contenturl, $temp->visiblename);
$contents[] = html_writer::tag('li', $contentlink);
} else if ($temp instanceof admin_category) {
$contenturl = new moodle_url('/admin/category.php', array('category' => $bookmark));
$contentlink = html_writer::link($contenturl, $temp->visiblename);
$contents[] = html_writer::tag('li', $contentlink);
}
}
$this->content->text = html_writer::tag('ol', implode('', $contents), array('class' => 'list'));
+5 -1
View File
@@ -46,7 +46,7 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
$temp = $adminroot->locate($section);
if ($temp instanceof admin_settingpage || $temp instanceof admin_externalpage) {
if ($temp instanceof admin_settingpage || $temp instanceof admin_externalpage || $temp instanceof admin_category) {
$bookmarks[] = $section;
$bookmarks = implode(',', $bookmarks);
set_user_preference('admin_bookmarks', $bookmarks);
@@ -61,6 +61,10 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
} elseif ($temp instanceof admin_externalpage) {
redirect($temp->url);
} else if ($temp instanceof admin_category) {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/category.php?category=' . $section);
}
} else {
+2
View File
@@ -54,6 +54,8 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
redirect($temp->url, get_string('bookmarkdeleted','admin'));
} elseif ($temp instanceof admin_settingpage) {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section);
} else if ($temp instanceof admin_category) {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/category.php?category=' . $section);
} else {
redirect($CFG->wwwroot);
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -26,6 +26,6 @@
$string['pluginname'] = 'Latest badges';
$string['numbadgestodisplay'] = 'Number of latest badges to display';
$string['nothingtodisplay'] = 'You have no badges to display';
$string['badges:addinstance'] = 'Add a new My latest badges block';
$string['badges:myaddinstance'] = 'Add a new My latest badges block to Dashboard';
$string['badges:addinstance'] = 'Add a new Latest badges block';
$string['badges:myaddinstance'] = 'Add a new Latest badges block to Dashboard';
$string['privacy:metadata'] = 'The Latest badges block only shows data stored in other locations.';
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -58,5 +58,8 @@ function xmldb_block_community_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -24,7 +24,7 @@
$string['adminview'] = 'Admin view';
$string['allcourses'] = 'Admin user sees all courses';
$string['configadminview'] = 'What should the admin see in the course list block?';
$string['configadminview'] = 'Whether to display all courses in the Courses block, or only courses that the admin is enrolled in.';
$string['confighideallcourseslink'] = 'Remove the \'All courses\' link under the list of courses. (This setting does not affect the admin view.)';
$string['course_list:addinstance'] = 'Add a new courses block';
$string['course_list:myaddinstance'] = 'Add a new courses block to Dashboard';
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_block_html_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+7 -3
View File
@@ -66,12 +66,16 @@ class block_login extends block_base {
$this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.get_login_url().'">';
$this->content->text .= '<div class="form-group"><label for="login_username">'.$strusername.'</label>';
$this->content->text .= '<input type="text" name="username" id="login_username" class="form-control" value="'.s($username).'" /></div>';
$this->content->text .= '<div class="form-group">';
$this->content->text .= '<label for="login_username">'.$strusername.'</label>';
$this->content->text .= '<input type="text" name="username" id="login_username" ';
$this->content->text .= ' class="form-control" value="'.s($username).'" autocomplete="username"/></div>';
$this->content->text .= '<div class="form-group"><label for="login_password">'.get_string('password').'</label>';
$this->content->text .= '<input type="password" name="password" id="login_password" class="form-control" value="" /></div>';
$this->content->text .= '<input type="password" name="password" id="login_password" ';
$this->content->text .= ' class="form-control" value="" autocomplete="current-password"/>';
$this->content->text .= '</div>';
if (isset($CFG->rememberusername) and $CFG->rememberusername == 2) {
$checked = $username ? 'checked="checked"' : '';
@@ -31,10 +31,10 @@ $string['aria:controls'] = 'Course overview controls';
$string['aria:courseactions'] = 'Actions for current course';
$string['aria:coursesummary'] = 'Course summary text:';
$string['aria:courseprogress'] = 'Course progress:';
$string['aria:displaydropdown'] = 'Display dropdown';
$string['aria:displaydropdown'] = 'Display drop-down menu';
$string['aria:favourites'] = 'Show starred courses';
$string['aria:future'] = 'Show future courses';
$string['aria:groupingdropdown'] = 'Grouping dropdown';
$string['aria:groupingdropdown'] = 'Grouping drop-down menu';
$string['aria:inprogress'] = 'Show in courses in progress';
$string['aria:lastaccessed'] = 'Sort courses by last accessed date';
$string['aria:list'] = 'Switch to list view';
@@ -42,11 +42,11 @@ $string['aria:title'] = 'Sort courses by course name';
$string['aria:past'] = 'Show past courses';
$string['aria:removefromfavourites'] = 'Remove star for';
$string['aria:summary'] = 'Switch to summary view';
$string['aria:sortingdropdown'] = 'Sorting dropdown';
$string['aria:sortingdropdown'] = 'Sorting drop-down menu';
$string['card'] = 'Card';
$string['cards'] = 'Cards';
$string['courseprogress'] = 'Course progress:';
$string['complete'] = 'Complete';
$string['complete'] = 'complete';
$string['favourites'] = 'Starred';
$string['future'] = 'Future';
$string['inprogress'] = 'In progress';
@@ -121,7 +121,7 @@ Feature: The my overview block allows users to easily access their courses
Scenario: List display persistence
Given I log in as "student1"
And I click on "Display dropdown" "button" in the "Course overview" "block"
And I click on "Display drop-down menu" "button" in the "Course overview" "block"
And I click on "List" "link" in the "Course overview" "block"
And I reload the page
Then I should see "List" in the "Course overview" "block"
@@ -129,7 +129,7 @@ Feature: The my overview block allows users to easily access their courses
Scenario: Cards display persistence
Given I log in as "student1"
And I click on "Display dropdown" "button" in the "Course overview" "block"
And I click on "Display drop-down menu" "button" in the "Course overview" "block"
And I click on "Card" "link" in the "Course overview" "block"
And I reload the page
Then I should see "Card" in the "Course overview" "block"
@@ -137,7 +137,7 @@ Feature: The my overview block allows users to easily access their courses
Scenario: Summary display persistence
Given I log in as "student1"
And I click on "Display dropdown" "button" in the "Course overview" "block"
And I click on "Display drop-down menu" "button" in the "Course overview" "block"
And I click on "Summary" "link" in the "Course overview" "block"
And I reload the page
Then I should see "Summary" in the "Course overview" "block"
@@ -39,7 +39,7 @@ Feature: The my overview block allows users to favourite their courses
When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
And I reload the page
And I click on "Display dropdown" "button" in the "Course overview" "block"
And I click on "Display drop-down menu" "button" in the "Course overview" "block"
And I click on "List" "link" in the "Course overview" "block"
And I reload the page
Then "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='false']" "xpath_element" should exist
@@ -53,7 +53,7 @@ Feature: The my overview block allows users to favourite their courses
When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
And I reload the page
And I click on "Display dropdown" "button" in the "Course overview" "block"
And I click on "Display drop-down menu" "button" in the "Course overview" "block"
And I click on "Summary" "link" in the "Course overview" "block"
And I reload the page
Then "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='false']" "xpath_element" should exist
+3
View File
@@ -67,5 +67,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+7 -1
View File
@@ -24,7 +24,7 @@
M.block_private_files = {};
M.block_private_files.init_tree = function(Y, expand_all, htmlid) {
Y.use('yui2-treeview', function(Y) {
Y.use('yui2-treeview', 'node-event-simulate', function(Y) {
var tree = new Y.YUI2.widget.TreeView(htmlid);
tree.subscribe("clickEvent", function(node, event) {
@@ -32,6 +32,12 @@ M.block_private_files.init_tree = function(Y, expand_all, htmlid) {
return false;
});
tree.subscribe("enterKeyPressed", function(node) {
// We want keyboard activation to trigger a click on the first link.
Y.one(node.getContentEl()).one('a').simulate('click');
return false;
});
if (expand_all) {
tree.expandAll();
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -59,5 +59,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -36,5 +36,5 @@
{{< core_course/coursecards }}
{{$classes}}one-row{{/classes}}
{{$coursename}} {{fullname}} {{/coursename}}
{{$coursename}} {{{fullname}}} {{/coursename}}
{{/ core_course/coursecards }}
@@ -68,6 +68,9 @@ class helper {
// Group by courses to reduce get_fast_modinfo requests.
foreach ($courses as $key => $items) {
$modinfo = get_fast_modinfo($key);
if (!can_access_course($modinfo->get_course(), null, '', true)) {
continue;
}
foreach ($items as $key => $item) {
// Exclude not visible items.
if (!$modinfo->cms[$item->cmid]->uservisible) {
+1 -1
View File
@@ -22,6 +22,6 @@
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2018120301; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2018112800; // Requires this Moodle version.
$plugin->component = 'block_recentlyaccesseditems'; // Full name of the plugin (used for diagnostics).
+3
View File
@@ -45,5 +45,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -78,7 +78,7 @@ $string['rss_client:createprivatefeeds'] = 'Create private RSS feeds';
$string['rss_client:createsharedfeeds'] = 'Create shared RSS feeds';
$string['rss_client:manageanyfeeds'] = 'Manage any RSS feeds';
$string['rss_client:manageownfeeds'] = 'Manage own RSS feeds';
$string['rss_client:myaddinstance'] = 'Add a new RSS feeds block to Dashboard';
$string['rss_client:myaddinstance'] = 'Add a new Remote RSS feeds block to Dashboard';
$string['seeallfeeds'] = 'See all feeds';
$string['sharedfeed'] = 'Shared feed';
$string['shownumentrieslabel'] = 'Max number entries to show per block.';
+3
View File
@@ -61,5 +61,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -67,5 +67,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","core/templates","core/paged_content_factory","core/str","core/user_date","block_timeline/calendar_events_repository"],function(a,b,c,d,e,f,g){var h=86400,i={EMPTY_MESSAGE:'[data-region="empty-message"]',ROOT:'[data-region="event-list-container"]',EVENT_LIST_CONTENT:'[data-region="event-list-content"]',EVENT_LIST_LOADING_PLACEHOLDER:'[data-region="event-list-loading-placeholder"]'},j={EVENT_LIST_CONTENT:"block_timeline/event-list-content"},k={ignoreControlWhileLoading:!0,controlPlacementBottom:!0,ariaLabels:{itemsperpagecomponents:"ariaeventlistpagelimit, block_timeline"}},l=function(a){a.find(i.EVENT_LIST_CONTENT).addClass("hidden"),a.find(i.EMPTY_MESSAGE).removeClass("hidden")},m=function(a){a.find(i.EVENT_LIST_CONTENT).removeClass("hidden"),a.find(i.EMPTY_MESSAGE).addClass("hidden")},n=function(a){a.find(i.EVENT_LIST_CONTENT).empty()},o=function(a,b){var c={},d={eventsbyday:[]};return a.forEach(function(a){var d=f.getUserMidnightForTimestamp(a.timesort,b);c[d]?c[d].push(a):c[d]=[a]}),Object.keys(c).forEach(function(a){var e=c[a];d.eventsbyday.push({past:a<b,dayTimestamp:a,events:e})}),d},p=function(a,b){var d=o(a,b),e=j.EVENT_LIST_CONTENT;return c.render(e,d)},q=function(a,b,c,d,e,f){var i=a+c*h,j=void 0!=d&&a+d*h,k={starttime:i,limit:b};return e&&(k.aftereventid=e),j&&(k.endtime=j),f?(k.courseid=f,g.queryByCourse(k)):g.queryByTime(k)},r=function(a,b,c,d,e,f,g,h){for(var i=a.pageNumber,j=a.limit,k=i;!d.hasOwnProperty(k);)k--;var l=d[k],m=null;return m=e&&e.hasOwnProperty(i)?e[i]:q(c,j+1,g,h,l,f),m.then(function(a){if(!a.events.length)return b.allItemsLoaded(i),[];var c=a.events,d=c.length<=j;return d?b.allItemsLoaded(i):c.pop(),c})},s=function(c,f,g,h,i,j,l,m,n){var o={1:0},q=!1,s=a.extend({},k,n);return e.get_string("ariaeventlistpagelimit","block_timeline",a.isArray(c)?c[0]:c).then(function(a){return s.ariaLabels.itemsperpage=a,s.ariaLabels.paginationnav=m,a}).then(function(){return d.createWithLimit(c,function(c,d){var e=[];return c.forEach(function(a){var c=a.pageNumber,h=r(a,d,g,o,f,i,j,l).then(function(a){if(a.length){q=!0;var b=a[a.length-1].id;return o[c+1]=b,p(a,g)}return a})["catch"](b.exception);e.push(h)}),a.when.apply(a,e).then(function(){h.resolve(q)})["catch"](function(){h.resolve(q)}),e},s)})},t=function(d,e,f,g,h){d=a(d);var j=a.Deferred(),k=d.find(i.EVENT_LIST_CONTENT),o=d.find(i.EVENT_LIST_LOADING_PLACEHOLDER),p=d.attr("data-course-id"),q=parseInt(d.attr("data-days-offset"),10),r=d.attr("data-days-limit"),t=parseInt(d.attr("data-midnight"),10);return n(d),m(d),o.removeClass("hidden"),void 0!=r&&(r=parseInt(r,10)),s(e,f,t,j,p,q,r,g,h).then(function(b,e){return b=a(b),b.addClass("hidden"),c.replaceNodeContents(k,b,e),j.then(function(a){return b.removeClass("hidden"),o.addClass("hidden"),a||l(d),a})["catch"](function(){return!1}),b})["catch"](b.exception)};return{init:t,rootSelector:i.ROOT}});
define(["jquery","core/notification","core/templates","core/paged_content_factory","core/str","core/user_date","block_timeline/calendar_events_repository"],function(a,b,c,d,e,f,g){var h=86400,i={EMPTY_MESSAGE:'[data-region="empty-message"]',ROOT:'[data-region="event-list-container"]',EVENT_LIST_CONTENT:'[data-region="event-list-content"]',EVENT_LIST_LOADING_PLACEHOLDER:'[data-region="event-list-loading-placeholder"]'},j={EVENT_LIST_CONTENT:"block_timeline/event-list-content"},k={ignoreControlWhileLoading:!0,controlPlacementBottom:!0,ariaLabels:{itemsperpagecomponents:"ariaeventlistpagelimit, block_timeline"}},l=function(a){a.find(i.EVENT_LIST_CONTENT).addClass("hidden"),a.find(i.EMPTY_MESSAGE).removeClass("hidden")},m=function(a){a.find(i.EVENT_LIST_CONTENT).removeClass("hidden"),a.find(i.EMPTY_MESSAGE).addClass("hidden")},n=function(a){a.find(i.EVENT_LIST_CONTENT).empty()},o=function(a,b){var c={},d={eventsbyday:[]};return a.forEach(function(a){var d=f.getUserMidnightForTimestamp(a.timesort,b);c[d]?c[d].push(a):c[d]=[a]}),Object.keys(c).forEach(function(a){var e=c[a];d.eventsbyday.push({past:a<b,dayTimestamp:a,events:e})}),d},p=function(a,b){var d=o(a,b),e=j.EVENT_LIST_CONTENT;return c.render(e,d)},q=function(a,b,c,d,e,f){var i=a+c*h,j=void 0!=d&&a+d*h,k={starttime:i,limit:b};return e&&(k.aftereventid=e),j&&(k.endtime=j),f?(k.courseid=f,g.queryByCourse(k)):g.queryByTime(k)},r=function(a,b,c,d,e,f,g,h){for(var i=a.pageNumber,j=a.limit,k=i;!d.hasOwnProperty(k);)k--;var l=d[k],m=null;return m=e&&e.hasOwnProperty(i)?e[i]:q(c,j+1,g,h,l,f),m.then(function(a){if(!a.events.length)return b.allItemsLoaded(i),[];var c=a.events,d=c.length<=j;return d?b.allItemsLoaded(i):c.pop(),c})},s=function(c,f,g,h,i,j,l,m,n){var o={1:0},q=!1,s=a.extend({},k,n);return e.get_string("ariaeventlistpagelimit","block_timeline",a.isArray(c)?c[0].value:c).then(function(a){return s.ariaLabels.itemsperpage=a,s.ariaLabels.paginationnav=m,a}).then(function(){return d.createWithLimit(c,function(c,d){var e=[];return c.forEach(function(a){var c=a.pageNumber,h=r(a,d,g,o,f,i,j,l).then(function(a){if(a.length){q=!0;var b=a[a.length-1].id;return o[c+1]=b,p(a,g)}return a})["catch"](b.exception);e.push(h)}),a.when.apply(a,e).then(function(){h.resolve(q)})["catch"](function(){h.resolve(q)}),e},s)})},t=function(d,e,f,g,h){d=a(d);var j=a.Deferred(),k=d.find(i.EVENT_LIST_CONTENT),o=d.find(i.EVENT_LIST_LOADING_PLACEHOLDER),p=d.attr("data-course-id"),q=parseInt(d.attr("data-days-offset"),10),r=d.attr("data-days-limit"),t=parseInt(d.attr("data-midnight"),10);return n(d),m(d),o.removeClass("hidden"),void 0!=r&&(r=parseInt(r,10)),s(e,f,t,j,p,q,r,g,h).then(function(b,e){return b=a(b),b.addClass("hidden"),c.replaceNodeContents(k,b,e),j.then(function(a){return b.removeClass("hidden"),o.addClass("hidden"),a||l(d),a})["catch"](function(){return!1}),b})["catch"](b.exception)};return{init:t,rootSelector:i.ROOT}});
+1 -1
View File
@@ -325,7 +325,7 @@ function(
return Str.get_string(
'ariaeventlistpagelimit',
'block_timeline',
$.isArray(pageLimit) ? pageLimit[0] : pageLimit
$.isArray(pageLimit) ? pageLimit[0].value : pageLimit
)
.then(function(string) {
config.ariaLabels.itemsperpage = string;
+1 -4
View File
@@ -1712,6 +1712,7 @@ class cache_session extends cache {
public function __construct(cache_definition $definition, cache_store $store, $loader = null) {
// First up copy the loadeduserid to the current user id.
$this->currentuserid = self::$loadeduserid;
$this->set_session_id();
parent::__construct($definition, $store, $loader);
// This will trigger check tracked user. If this gets removed a call to that will need to be added here in its place.
@@ -1771,8 +1772,6 @@ class cache_session extends cache {
// Purge the data we have for the old user.
// This way we don't bloat the session.
$this->purge();
// Update the session id just in case!
$this->set_session_id();
}
self::$loadeduserid = $new;
$this->currentuserid = $new;
@@ -1780,8 +1779,6 @@ class cache_session extends cache {
// The current user matches the loaded user but not the user last used by this cache.
$this->purge_current_user();
$this->currentuserid = $new;
// Update the session id just in case!
$this->set_session_id();
}
}
+1 -1
View File
@@ -77,7 +77,7 @@ servername:port:weight
If *Enable clustered servers* is enabled below, there must be only one server listed here. This would usually be a name that always resolves to the local machine, like 127.0.0.1 or localhost.';
$string['serversclusterinvalid'] = 'Exactly one server is required when clustering is enabled.';
$string['setservers'] = 'Set Servers';
$string['setservers_help'] = 'This is the list of servers that will updated when data is modified in the cache. Generally the fully qualified name of each server in the pool.
$string['setservers_help'] = 'This is the list of servers that will be updated when data is modified in the cache. Generally the fully qualified name of each server in the pool.
It **must** include the server listed in *Servers* above, even if by a different hostname.
Servers should be defined one per line and consist of a server address and optionally a port.
If no port is provided then the default port (11211) is used.
+47
View File
@@ -2327,4 +2327,51 @@ class core_cache_testcase extends advanced_testcase {
$this->assertEquals('test data 2', $cache->get('testkey1'));
}
/**
* Test that values set in different sessions are stored with different key prefixes.
*/
public function test_session_distinct_storage_key() {
$this->resetAfterTest();
// Prepare a dummy session cache configuration.
$config = cache_config_testing::instance();
$config->phpunit_add_definition('phpunit/test_session_distinct_storage_key', array(
'mode' => cache_store::MODE_SESSION,
'component' => 'phpunit',
'area' => 'test_session_distinct_storage_key'
));
// First anonymous user's session cache.
cache_phpunit_session::phpunit_mockup_session_id('foo');
$this->setUser(0);
$cache1 = cache::make('phpunit', 'test_session_distinct_storage_key');
// Reset cache instances to emulate a new request.
cache_factory::instance()->reset_cache_instances();
// Another anonymous user's session cache.
cache_phpunit_session::phpunit_mockup_session_id('bar');
$this->setUser(0);
$cache2 = cache::make('phpunit', 'test_session_distinct_storage_key');
cache_factory::instance()->reset_cache_instances();
// Guest user's session cache.
cache_phpunit_session::phpunit_mockup_session_id('baz');
$this->setGuestUser();
$cache3 = cache::make('phpunit', 'test_session_distinct_storage_key');
cache_factory::instance()->reset_cache_instances();
// Same guest user's session cache but in another browser window.
cache_phpunit_session::phpunit_mockup_session_id('baz');
$this->setGuestUser();
$cache4 = cache::make('phpunit', 'test_session_distinct_storage_key');
// Assert that different PHP session implies different key prefix for storing values.
$this->assertNotEquals($cache1->phpunit_get_key_prefix(), $cache2->phpunit_get_key_prefix());
// Assert that same PHP session implies same key prefix for storing values.
$this->assertEquals($cache3->phpunit_get_key_prefix(), $cache4->phpunit_get_key_prefix());
}
}
+28
View File
@@ -465,6 +465,9 @@ class cache_phpunit_application extends cache_application {
*/
class cache_phpunit_session extends cache_session {
/** @var Static member used for emulating the behaviour of session_id() during the tests. */
protected static $sessionidmockup = 'phpunitmockupsessionid';
/**
* Returns the class of the store immediately associated with this cache.
* @return string
@@ -480,6 +483,31 @@ class cache_phpunit_session extends cache_session {
public function phpunit_get_store_implements() {
return class_implements($this->get_store());
}
/**
* Provide access to the {@link cache_session::get_key_prefix()} method.
*
* @return string
*/
public function phpunit_get_key_prefix() {
return $this->get_key_prefix();
}
/**
* Allows to inject the session identifier.
*
* @param string $sessionid
*/
public static function phpunit_mockup_session_id($sessionid) {
static::$sessionidmockup = $sessionid;
}
/**
* Override the parent behaviour so that it does not need the actual session_id() call.
*/
protected function set_session_id() {
$this->sessionid = static::$sessionidmockup;
}
}
/**

Some files were not shown because too many files have changed in this diff Show More