Compare commits

...

225 Commits

Author SHA1 Message Date
Andrew Nicols 77be1e3fe3 Moodle release 3.8.1 2020-01-10 13:03:44 +08:00
Andrew Nicols de7b3e37b3 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-01-10 13:03:42 +08:00
AMOS bot ffd8dfcf27 Automatically generated installer lang files 2020-01-10 00:12:13 +00:00
Sara Arjona 8a82f51043 weekly release 3.8+ 2020-01-09 15:42:53 +01:00
Jun Pataleta 68cab31dba Merge branch 'MDL-67544-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-01-09 15:22:35 +08:00
Andrew Nicols 3f50c24fc3 MDL-67544f= mod_forum: Correct "for" attribute on private checkbox 2020-01-09 14:55:52 +08:00
Andrew Nicols 9973646ca7 MDL-67544 mod_forum: Ensure post actions menu id is unique 2020-01-09 14:09:21 +08:00
Andrew Nicols f14420c739 Merge branch 'MOODLE_38_MDL-67485' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-01-09 12:40:19 +08:00
Mikhail Golenkov 70868d8648 MDL-67485 task: Release the task runner lock before throwing exception. 2020-01-09 14:49:38 +11:00
Andrew Nicols 8f45c9b6a5 Merge branch 'MDL-67596-cron-ramp-up-MOODLE_38_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_38_STABLE 2020-01-09 09:32:49 +08:00
Brendan Heywood 1f5c6c6b7a MDL-67596 cron: Allow runners to ramp up instantly 2020-01-09 11:07:19 +11:00
Eloy Lafuente (stronk7) 26999dda23 Merge branch 'MDL-67544-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-01-08 16:35:32 +01:00
Eloy Lafuente (stronk7) 022206f2fe Merge branch 'MDL-67533-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-01-08 16:31:18 +01:00
Jake Dallimore f9e0f61467 MDL-67637 core_message: only preview lastmessage text if safe to do so
If any html/script tags are found in the text() value, don't display it.
2020-01-08 12:31:17 +01:00
Jun Pataleta c07bc83480 MDL-67533 mod_forum: Remove duplicate Re in experimental view subject 2020-01-08 16:29:43 +08:00
Sara Arjona 7d7d3520a7 Merge branch 'MDL-67417-38' of https://github.com/KietChan/moodle into MOODLE_38_STABLE 2020-01-08 08:26:44 +01:00
Andrew Nicols f34f8131ba MDL-67544 mod_forum: Ensure that private reply checkbox has unique id 2020-01-08 15:26:03 +08:00
Sara Arjona 85ba5d1d88 Merge branch 'MDL-67510-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-01-08 08:11:01 +01:00
Andrew Nicols e0b8a3b17a Merge branch 'MDL-64764-38' of git://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-01-08 08:30:33 +08:00
Eloy Lafuente (stronk7) 5577e472e5 Merge branch 'MDL-67469-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-01-07 22:59:51 +01:00
Marina Glancy 571f508d4e MDL-64764 core_admin: allow to submit empty list of allowed roles.
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-01-07 10:01:33 +00:00
Andrew Nicols 764ec8d7fb Merge branch 'MDL-65849-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-01-07 13:26:56 +08:00
Andrew Nicols eb04dc8792 Merge branch 'MDL-66938-38' of https://github.com/grabs/moodle into MOODLE_38_STABLE 2020-01-07 12:49:42 +08:00
Andrew Nicols 6fefb88819 MDL-67114 mod_wiki: Whitespace fix 2020-01-07 11:05:02 +08:00
Andrew Nicols 1b2a8dad89 Merge branch 'MDL-67114_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-01-07 11:04:55 +08:00
Andrew Nicols ec63d3eab4 Merge branch 'MDL-66871-38-v2' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-01-07 08:54:44 +08:00
Andrew Nicols 5f4250dc43 MDL-67544 form: Ensure that form errors have a unique id 2020-01-06 15:01:07 +08:00
Andrew Nicols b024306e5c MDL-67544 mod_forum: Add missing label for discussion move 2020-01-06 15:01:07 +08:00
Andrew Nicols 0d285e9334 MDL-67544 mod_forum: Add missing menuitem roles 2020-01-06 15:01:07 +08:00
Andrew Nicols bed212f61b MDL-67544 mod_forum: Correct aria-labelledby node 2020-01-06 15:01:07 +08:00
Andrew Nicols 14d58697a3 MDL-67544 mod_forum: Correct aria-controls to point to valid node 2020-01-06 15:01:07 +08:00
Andrew Nicols e98103354d MDL-67544 mod_forum: Add missing aria label for grade search 2020-01-06 15:01:07 +08:00
Andrew Nicols d8dfb98417 MDL-67544 core: Ensure unique IDs for YUI dialogues 2020-01-06 15:01:07 +08:00
Andrew Nicols 3684d9e03c MDL-67544 theme: Ensure that search box is in valid li 2020-01-06 15:01:06 +08:00
Andrew Nicols 629ef7772f MDL-67544 mod_forum: Add default role for favourite toggle 2020-01-06 15:01:06 +08:00
Andrew Nicols 9e57c09d7b MDL-67544 mod_forum: Add missing aria label for discussion actions 2020-01-06 15:01:06 +08:00
Andrew Nicols 949d3f1c02 MDL-67544 mod_forum: Correct aria-role => aria-live 2020-01-06 15:01:06 +08:00
Andrew Nicols 11524653b0 MDL-67544 mod_forum: Correct aria-role => role 2020-01-06 15:01:06 +08:00
Jun Pataleta f9b2f6634d MDL-67510 tool_dataprivacy: Fix the reply-to name of the privacy officer 2020-01-06 11:36:49 +08:00
Simey Lameze dafe4c5a78 MDL-66871 calendar: fix deprecated parameter in the phpDoc 2020-01-06 10:42:22 +08:00
Simey Lameze 550c4e1c42 MDL-66871 calendar: add unit test coverage for ics importing 2020-01-06 10:42:22 +08:00
Simey Lameze 0287928c4b MDL-66871 calendar: fix ics importing logic 2020-01-06 10:42:22 +08:00
Jake Dallimore 701d27e5d9 Merge branch 'MDL-67336-38' of https://github.com/roland04/moodle into MOODLE_38_STABLE 2020-01-06 09:36:53 +08:00
Andreas Grabs 13d5d3edb1 MDL-66938 mod_feedback: Export includes unwanted html in field names 2020-01-05 19:33:27 +01:00
Eloy Lafuente (stronk7) abc8f149ce MDL-67114 core: php74 fix. Fix use of scalar as array in core
There are various places where it's not guaranteed that the
variable being used is array, and instead, can be null, bool, int...

We need to check that because php74 warns about it.

Where possible we have used the coalesce operator as
replacement for isset() ternary operations.
2020-01-03 11:33:23 +01:00
Eloy Lafuente (stronk7) c3a6437220 MDL-67114 scssphp: php74 compatibility local fixes
Note they are already available upstream, versions 1.0.4 and up so,
in next upgrade they will be fixed.
2020-01-03 11:33:23 +01:00
Eloy Lafuente (stronk7) c910982c49 MDL-67114 mustache: php74 fix. Fix use of scalar as array
Trying to use values of type null, bool, int, float or resource as an
array (such as $null["key"]) will now generate a notice. This does not
affect array accesses performed by list().

RFC: https://wiki.php.net/rfc/notice-for-non-valid-array-container
2020-01-03 11:33:23 +01:00
Jake Dallimore 4d5849b0e4 weekly release 3.8+ 2020-01-03 11:25:08 +08:00
Jake Dallimore cc0b18ec0e Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-01-03 11:25:05 +08:00
AMOS bot 3c7ebda9a5 Automatically generated installer lang files 2020-01-03 00:12:10 +00:00
Adrian Greeve 19401adbdd Merge branch 'MDL-67599-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-01-02 15:16:18 +08:00
Jake Dallimore a7fb29a8ff MDL-67599 behat: fix behat tests assuming Jan 2020 is a future date 2020-01-02 13:52:24 +08:00
Jake Dallimore c53861fd66 Merge branch 'MDL-67598_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-01-02 10:19:30 +08:00
AMOS bot 88d4a01089 Automatically generated installer lang files 2020-01-02 00:10:23 +00:00
Eloy Lafuente (stronk7) b71e7b79e8 MDL-67598 unit tests: Pass day of month without leading zero
Note this fixes the unit tests. Still the calendar API itself
should be able to manage this cases, both casting (int) or
being stricter about what's allowed there (param hinting).

But that falls out from this issue and the code that introduced
the failures, so the pure unit-test fix has been applied.
2020-01-02 00:10:16 +01:00
Eloy Lafuente (stronk7) 6c7199a426 Merge branch 'MDL-67593-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2019-12-31 10:50:41 +01:00
Jake Dallimore 827f3cd471 MDL-67593 core_iplookup: update lang string describing download process
Let users know they need to register on maxmind before granted download
access.
2019-12-31 15:54:33 +08:00
Jake Dallimore 0260074ba1 MDL-67593 core_iplookup: use MaxMind test database in unit tests
Instead of downloading a live database (now not available publicly)
use a local test database.
2019-12-31 15:54:27 +08:00
Jun Pataleta edab811944 Merge branch 'MDL-63996-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2019-12-31 15:19:17 +08:00
Jun Pataleta 348ceb4631 Merge branch 'MDL-67487-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2019-12-31 11:55:55 +08:00
Jun Pataleta 5544dc1cc7 Merge branch 'MDL-67470-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2019-12-31 11:29:52 +08:00
Bas Brands c02d168cd7 MDL-67470 theme_boost: settings_menu_proxy correct background
the .region_main_settings_proxy was introduced in MDL-56582 using the
wrong bootstrap variable for the background color
2019-12-31 09:59:51 +08:00
Adrian Greeve 53fde6278a Merge branch 'MDL-67233-38' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2019-12-30 12:56:59 +08:00
Jun Pataleta 25221f73a6 Merge branch 'MDL-67491-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2019-12-30 12:41:40 +08:00
Didier 'OdyX' Raboud b901252f6d MDL-67491 core_message: Primary'fy the contact request counts 2019-12-30 11:47:36 +08:00
Eloy Lafuente (stronk7) be73a0ed4e Merge branch 'MDL-67523-38' of git://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2019-12-29 23:32:07 +01:00
Eloy Lafuente (stronk7) e654258446 Merge branch 'MDL-67527-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2019-12-29 23:27:13 +01:00
Adrian Greeve 8c14984028 Merge branch 'MDL-63107-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2019-12-27 16:34:10 +08:00
Adrian Greeve dd6bbf3962 Merge branch 'MDL-65809-38-onlyenv' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2019-12-24 14:54:57 +08:00
Adrian Greeve 01e84ac720 Merge branch 'MOODLE_38_STABLE-MDL-67524' of https://github.com/yao9394/moodle into MOODLE_38_STABLE 2019-12-23 10:30:23 +08:00
John Yao b423c5ad38 MDL-67524 book: fixing view hidden chapter issue
* Users who has permission should be able to view after turning editing off
2019-12-23 09:48:31 +11:00
AMOS bot f70cc95a13 Automatically generated installer lang files 2019-12-21 00:10:57 +00:00
Luca Bösch d9887f7350 MDL-67487 forms: align "Custom" checkbox for course section name. 2019-12-20 13:48:48 +01:00
Eloy Lafuente (stronk7) f2db42f921 weekly release 3.8+ 2019-12-20 11:02:10 +01:00
Eloy Lafuente (stronk7) b85896f7bc NOBUG: Fixed SVG browser compatibility 2019-12-20 11:02:08 +01:00
Eloy Lafuente (stronk7) 6350a758d7 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2019-12-20 11:02:07 +01:00
Eloy Lafuente (stronk7) a3ea0db227 Merge branch 'MDL-67151-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2019-12-19 23:01:23 +01:00
Shamim Rezaie cd62c520e2 MDL-67151 qtype_numerical: convert the tolerance to string before saving
Fix the sqlserver issue when saving a number into a text field
2019-12-20 01:20:12 +11:00
Marina Glancy 86d4aca10d MDL-67523 core_admin: do not require admin to view category
Revert changes from MDL-58439 (in this file only)
2019-12-19 10:15:10 +01:00
Jun Pataleta 40ba9d9cfa Merge branch 'MOODLE_38_STABLE_MDL-63795_core_setting_defaults' of https://github.com/mattporritt/moodle into MOODLE_38_STABLE 2019-12-19 11:17:41 +08:00
Matt Porritt 5c510b92e2 MDL-63795 Administration: CLI upgrade apply all settings
This patch fixes a regression caused by MDL-62777.  MDL-62777 added output to inform
administrators of new default settings.  However, the recursion in the code did not
handle new settings made available as the result of the defaults of other settings
being set.
This patch fixes the issue, now all defaults are correctly set, even those exposed
after other defaults are set.
2019-12-19 12:22:01 +11:00
Eloy Lafuente (stronk7) 754ecb5768 Merge branch 'MDL-67151-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2019-12-18 23:05:56 +01:00
David Mudrák e7a122bba9 MDL-67527 lang: Propagate the string fixes to Behat and other places 2019-12-18 21:22:15 +01:00
Helen Foster 13edb4f9f9 MDL-67527 lang: Import fixed English strings (en_fix) 2019-12-18 21:22:15 +01:00
Eloy Lafuente (stronk7) db394d5b08 Merge branch 'MDL-64695-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2019-12-18 19:56:10 +01:00
Eloy Lafuente (stronk7) d18802eb2f Merge branch 'MDL-67464-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2019-12-17 19:37:00 +01:00
Mikel Martín ead3a41240 MDL-67336 mod_forum: Fixing forum inline reply filtering before saving 2019-12-17 11:59:02 +01:00
Jake Dallimore ae7b1be0b6 Merge branch 'MDL-67304_38' of git://github.com/dmonllao/moodle into MOODLE_38_STABLE 2019-12-17 13:47:11 +08:00
Jake Dallimore cca393d2f6 Merge branch 'MDL-65735-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2019-12-17 13:25:24 +08:00
Eloy Lafuente (stronk7) 69430157a3 Merge branch 'MDL-67522-38' of git://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2019-12-17 00:22:33 +01:00
Eloy Lafuente (stronk7) f077d9fbea Merge branch 'MDL-67410-38' of https://github.com/felicemcc/moodle into MOODLE_38_STABLE 2019-12-16 19:18:31 +01:00
Bas Brands 8c20e76d43 MDL-63107 mod_book: rewrite styles for book chapter block
* using flexbox to position titles
* fix for title overlap on edit mode
* show correct bullets, number or indent
2019-12-16 13:30:28 +01:00
Jake Dallimore a0ac535549 Merge branch 'MDL-67327-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2019-12-16 15:12:35 +08:00
Andrew Nicols 11260d5f3f MDL-63996 core/tags: Pending JS for all tag code 2019-12-16 14:03:46 +08:00
Andrew Nicols 67fc9943b9 MDL-63996 behat: Fix multi-tag autocomplete usage 2019-12-16 14:00:04 +08:00
Jake Dallimore 29a5f6eaa2 Merge branch 'MDL-66503-38' of git://github.com/abgreeve/moodle into MOODLE_38_STABLE 2019-12-16 09:11:33 +08:00
Marina Glancy a6fd7ada34 MDL-67522 core_lock: fix mistype in config-dist 2019-12-14 19:29:40 +01:00
AMOS bot c86c872db3 Automatically generated installer lang files 2019-12-14 00:10:53 +00:00
Jun Pataleta 7b4848ca80 MDL-67469 tool_dataprivacy: Put back missing test code
This patch simply brings back the missing test code for
\tool_dataprivacy_api_testcase::test_approve_data_request_non_dpo_user()
2019-12-13 10:05:24 +08:00
AMOS bot d9e3c11834 Automatically generated installer lang files 2019-12-13 00:11:09 +00:00
Felice Candilio 1437e35d2d MDL-67410 Enrolments: Cast the perpage parameter to integer in JS
The parameter called "perpage" on the call is treated as a string,
therefore, It could have a value 15001 resulting from a "+" operation
of the "1500" string and the number 1. That big number makes
the AJAX call extremely slow.

The proposed solution is to parse the number as an integer
when performing the addition.
2019-12-12 22:25:55 +01:00
Paul Holden 914d5ab82d MDL-65735 report_progress: reset URL start parameter in initials bars. 2019-12-12 18:24:12 +00:00
Paul Holden fbf0c8810b MDL-64695 tool_dataprivacy: filter site fullname in outgoing messages. 2019-12-12 18:20:22 +00:00
Paul Holden 25da0b49ea MDL-64695 privacy: filter site fullname in data export. 2019-12-12 18:20:22 +00:00
Sara Arjona 70e47fdc2a MDL-67464 core_h5p: use h5p.com URLs in behat tests
The H5P content used in behat for validating external URLs
behaviour shouldn't point h5p.org because it may stop working
(it's not for real content). These content have been moved to
moodle.h5p.com (payment account).
Besides, the scenarios loading content from external URLs
have been labelel with @external.
2019-12-12 16:07:17 +01:00
Eloy Lafuente (stronk7) 3bfdc05d3a weekly release 3.8+ 2019-12-12 13:26:31 +01:00
Eloy Lafuente (stronk7) d64a94713e NOBUG: Fixed SVG browser compatibility 2019-12-12 13:26:29 +01:00
Eloy Lafuente (stronk7) 8d7f1fd428 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2019-12-12 13:26:28 +01:00
Andrew Nicols a7268b4f8a MDL-67327 js: Make requirejs.php more fault tolerant 2019-12-12 16:37:08 +08:00
Jake Dallimore 4792cc508e Merge branch 'MDL-67154-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2019-12-12 09:05:11 +08:00
Ferran Recio 7bc625d846 MDL-67154 theme_classic: fixing firefox printing 2019-12-11 16:57:36 +01:00
AMOS bot 6dc25cc165 Automatically generated installer lang files 2019-12-11 13:50:07 +00:00
AMOS bot 747000a2fe Automatically generated installer lang files 2019-12-11 13:50:07 +00:00
Kiet.Chan bec0808b18 MDL-67417 theme_boost: Tooltip icon stop working after closing using ESC 2019-12-11 15:00:14 +07:00
Andrew Nicols 7f40272535 Merge branch 'MDL-67458-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2019-12-11 10:27:19 +08:00
Jake Dallimore f9735bbde7 MDL-67458 core: removing stale cohortroles and role assignments 2019-12-11 09:36:54 +08:00
Jake Dallimore 4dc1413cc7 MDL-67458 tool_cohortroles: remove role mapping for deleted roles
Before syncing anything, clean up records pointing to deleted roles.
2019-12-11 09:36:15 +08:00
Adrian Greeve 79b6a4acac MDL-66503 themes: Set the embed page to display block. 2019-12-11 09:32:54 +08:00
Andrew Nicols cf50c5f1cb Merge branch 'MDL-67434-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2019-12-10 17:29:02 +08:00
Marina Glancy fc74a6e6d2 MDL-66936 mod_url: revert MDL-65024 adding fullurl to modinfo
This reverts commit cc56e409c3, reversing
changes made to 01cdf16c0e.
2019-12-10 15:27:59 +08:00
Jonathon Fowler a48bd1c4e3 MDL-66936 url: fix error when modinfo cache is rebuilt non-interactively 2019-12-10 15:27:52 +08:00
Jake Dallimore ee215ddd43 Merge branch 'MDL-67179-38' of git://github.com/Chocolate-lightning/moodle into MOODLE_38_STABLE 2019-12-10 15:03:24 +08:00
Mathew May f3e7533b9d MDL-67179 core: Add missing grading pix 2019-12-10 14:38:55 +08:00
Andrew Nicols 921469db8f Merge branch 'MDL-67277-38-strongtopics' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2019-12-10 12:49:18 +08:00
Jake Dallimore b99f2bce77 Merge branch 'MDL-67154-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2019-12-10 11:53:56 +08:00
Jake Dallimore 7df9eb36cd Merge branch 'MDL-67451-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2019-12-10 10:37:15 +08:00
Jake Dallimore aee09a6357 Merge branch 'MDL-66708-MOODLE_38_KeyGenCache' of https://github.com/Cengage/moodle into MOODLE_38_STABLE 2019-12-10 09:12:13 +08:00
David Monllaó 8ae7a4ad68 MDL-67304 analytics: Add missing png svg incorrect icon
Credit to jaked for the icons and the testing instructions
2019-12-10 09:01:43 +08:00
Andrew Nicols d911548cf4 Merge branch 'MDL-67152-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2019-12-10 08:21:20 +08:00
Shamim Rezaie c8435454a7 MDL-67152 calendar: The day view should start from the current day 2019-12-10 06:58:18 +11:00
Jake Dallimore df2bda2f00 Merge branch 'MDL-67392-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2019-12-09 14:46:56 +08:00
Andrew Nicols bf52b2a3bc Merge branch 'MDL-60975-38' of https://github.com/Kathrin84/moodle into MOODLE_38_STABLE 2019-12-09 13:12:59 +08:00
Frédéric Massart f130c810f9 MDL-67434 javascript: Use static get_string after recycling promise 2019-12-09 10:12:43 +08:00
Kathrin Osswald d294483e9c MDL-60975 behat tests: Added search for admin setting filepickers 2019-12-05 14:59:18 +01:00
Sara Arjona ca89aca702 MDL-65809 environment: mbstring extension required 2019-12-05 14:00:16 +01:00
Sara Arjona 7e561cc4a8 MDL-65809 environment: PHP 7.2 required 2019-12-05 14:00:16 +01:00
Sara Arjona 57d601bc23 MDL-65809 environment: postgres requirement up to 9.5 2019-12-05 14:00:16 +01:00
Sara Arjona 7cdc332930 MDL-65809 environment: mariadb requirement up to 10.2 2019-12-05 14:00:16 +01:00
Sara Arjona 484eab15e3 MDL-65809 environment: 3.5 (LTS) required 2019-12-05 14:00:16 +01:00
Sara Arjona 0a0d55a3e1 MDL-65809 environment: 3.9 base information
This is a direct copy of the 3.8 branch to have changes
under control easier in next commits.
2019-12-05 14:00:16 +01:00
Eloy Lafuente (stronk7) 773b1f738f weekly release 3.8+ 2019-12-05 13:24:15 +01:00
Eloy Lafuente (stronk7) 96475f49de NOBUG: Fixed SVG browser compatibility 2019-12-05 13:24:13 +01:00
Adrian Greeve 9a64cc2b0b Merge branch 'MDL-65620-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2019-12-05 09:26:43 +08:00
Sara Arjona 56c570f68a MDL-67451 badges: use the site OB version as default 2019-12-04 21:27:16 +01:00
Sara Arjona ab2bb07f2e Merge branch 'MDL-67404_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2019-12-04 11:24:56 +01:00
Amaia Anabitarte d0aa6bf098 MDL-65620 core_message: Notification preferences behat tests 2019-12-04 11:03:49 +01:00
Ferran Recio 132e638209 MDL-67154 theme_boost: fixing firefox printing 2019-12-04 10:53:53 +01:00
Amaia Anabitarte 6713912510 MDL-65620 core_message: User preference generator 2019-12-04 10:03:34 +01:00
Amaia Anabitarte 96c48a5058 MDL-65620 core_message: Default notification preferences 2019-12-04 10:03:34 +01:00
Adrian Greeve d3de95f446 Merge branch 'MDL-40360-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2019-12-04 11:50:48 +08:00
Andrew Nicols 6d98038c8f Merge branch 'MDL-67359-38' of git://github.com/Chocolate-lightning/moodle_forum-project into MOODLE_38_STABLE 2019-12-04 10:38:12 +08:00
David Mudrák 83e5983a88 MDL-67277 forum: Replace the HTML comments with Mustache comments
It does not seem necessary to have the actual HTML sent to browsers full
of these developer-focused comments.
2019-12-03 20:16:53 +01:00
David Mudrák 0ddd9c54bc MDL-67277 forum: Remove the pinned class from the first cell
There should be no need to have it, and the name is confusing here.
2019-12-03 20:16:53 +01:00
David Mudrák 39bd01c11a MDL-67277 forum: Do not display discussion topics in bold
The topics are now inside a table header cell, which shows them in bold
by default.
2019-12-03 20:15:50 +01:00
David Mudrák 1e58e180d4 MDL-67277 forum: Apply CSS class describing the discussion status
This is to allow the themes to style pinned, favourited, subscribed and
discussions with unread replies.
2019-12-03 20:15:08 +01:00
Shamim Rezaie 163bff4a18 MDL-67151 qtype_calculatedsimple: Support for the scientific format 2019-12-03 16:57:41 +11:00
Shamim Rezaie 910c2ab7b4 MDL-67151 qtype_calculated: Support for the scientific format 2019-12-03 16:57:41 +11:00
Shamim Rezaie fcf199b0ec MDL-67151 qtype_numerical: Support for the scientific format 2019-12-03 16:57:41 +11:00
Shamim Rezaie bb511f30d6 MDL-67151 core_question: Support scientific format at question preview 2019-12-03 16:57:41 +11:00
Shamim Rezaie 481ad40e0e MDL-67151 forms: Support for the scientific format in the float element 2019-12-03 16:57:41 +11:00
Shamim Rezaie 031f3a1d4b MDL-67151 core: format_float can auto detect number of decimal points 2019-12-03 16:57:36 +11:00
Mathew May 5548689ead MDL-67359 mod_forum: Relocate notification templates to reallign it 2019-12-03 12:57:41 +08:00
Sara Arjona f751a8edbe Merge branch 'wip-MDL-67339-38stable' of https://github.com/Beedell/moodle into MOODLE_38_STABLE 2019-12-02 18:06:31 +01:00
John Beedell 0de719024c MDL-67339 behat: Enhance Behat exception message 2019-12-02 09:53:35 +00:00
Shamim Rezaie ac084982cf MDL-67392 mod_forum: Fix unescaped quotes issue in template 2019-12-02 20:50:40 +11:00
Jake Dallimore d3158895a8 Merge branch 'MDL-66581-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2019-12-02 16:12:47 +08:00
Jun Pataleta 0e58303ea3 MDL-66581 auth: Properly assign the link attribute 2019-12-02 15:30:39 +08:00
Iñigo Zendegi f0d380703a MDL-66581 auth: Do string concatenation for the password change URL
This reverts the change introduced by MDL-59298 where the password
change URL data is being assigned with a moodle_url object instead
of concatenating it.
2019-12-02 15:30:39 +08:00
Jake Dallimore baf264ebc8 Merge branch 'MDL-66877-38' of git://github.com/jleyva/moodle into MOODLE_38_STABLE 2019-12-02 10:02:34 +08:00
Luca Bösch e61f7ba324 MDL-40360 gradingform_rubric: remove unused class 'label' for a label. 2019-11-30 10:28:22 +01:00
Shamim Rezaie afda296526 MDL-65849 mod_forum: Add course param to the author's profile url 2019-11-29 20:58:37 +11:00
Eloy Lafuente (stronk7) 6d6b14e8a4 weekly release 3.8+ 2019-11-29 00:45:52 +01:00
Juan Leyva 27d6bd5de1 MDL-66877 mod: Fix unfiltered activity names in page headings 2019-11-28 17:24:31 +01:00
Juan Leyva 907db7f06b MDL-66877 mod: Fix WebServices returning unfiltered activity names 2019-11-28 17:24:31 +01:00
Eloy Lafuente (stronk7) 33bfd161cd MDL-67404 composer: update to newer versions
(using php71 for this branch)

Without changing any requirement, just an update
to get latest versions onboard, some fixing known
php 7.4 issues.
2019-11-28 13:12:23 +01:00
Andrew Nicols f88b4e9f81 MDL-67348 theme: Return CSS from localcache if available 2019-11-27 10:38:52 +08:00
Eloy Lafuente (stronk7) 114f0b612f Merge branch 'MDL-67300-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE
(fix trailing whitespace case)
2019-11-26 22:29:37 +01:00
Jun Pataleta a5f1dd6cb1 Merge branch 'MOODLE_38_MDL-56886' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2019-11-26 22:32:41 +08:00
Luca Bösch 283cd6db67 MDL-67210 tool_uploadcourse: Allow only 0 and 1 for visible value. 2019-11-26 08:30:34 +01:00
Eloy Lafuente (stronk7) 3eac4851e3 MDL-67307 core: Fix onject creation from empty value cases
The "creating default object from empty value" warning is now consistently
thrown if a falsy value is promoted into an stdClass object. Previously some
cases like `$null->prop[0] = $val` missed this warning.
2019-11-26 14:15:06 +08:00
Sara Arjona 006ec3c96f MDL-67042 customfield: Add behat tests to check hidden fields
Fields with the visibility different to Everyone should
be never displayed in the available filters custom field.
2019-11-26 11:59:41 +08:00
Sara Arjona cabc1dafa9 MDL-67042 customfield: Display only fields visible to everybody
When defining the available filters for the Dashboard, only the
fields visible to everyone should be displayed in the Custom field
filter.
2019-11-26 11:59:36 +08:00
Eloy Lafuente (stronk7) 1b4c878f48 MDL-66966 tcpdf: Update readme to point to manual commits to review
Apart from the main import of the library, there are a couple of
commits (with corresponding PRs upstream) that have been added to
provide php74 compatibility.

This commit addes them to the instructions, to ensure that they
will be reviewed on next import.
2019-11-26 11:43:34 +08:00
Eloy Lafuente (stronk7) 91286bb138 MDL-66966 tcpdf: Silence non-existing K_PATH_CACHE
I was fixing this adding a extra dir_exists() check that
is better than the silence operator but that was that already
there was a PR using @. So went to it.

This is https://git.io/JeKft
2019-11-26 11:43:25 +08:00
Eloy Lafuente (stronk7) 71af7accff MDL-66966 tcpdf: Some more curly braces to fix
This is https://git.io/JeKfT
2019-11-26 11:43:18 +08:00
Eloy Lafuente (stronk7) ce97501b2b MDL-66966 tcpdf: PHP 7.4 - cannot use array offset on integers
This is https://git.io/JeKfU
2019-11-26 11:43:10 +08:00
Eloy Lafuente (stronk7) dadb3cb372 MDL-66966 tcpdf: Bump to tcpdf 6.3.2
Bug fixes and php74 support.
2019-11-26 11:43:00 +08:00
Peter 5cb05d8b77 MDL-67233 mod_timeline: Allow events with only open dates in the future 2019-11-26 11:27:01 +08:00
Bas Brands e29b355121 MDL-67222 tool_lp: update css classes for Bootstrap 4.3 2019-11-26 10:12:46 +08:00
Mikhail Golenkov 95ca6f656e MDL-56886 navigation: Allow local plugins to modify navigation via AJAX. 2019-11-26 13:01:14 +11:00
Claude Vervoort fbd1829594 MDL-66708 lti adv: fix check for key in config 2019-11-25 14:17:08 -05:00
Marina Glancy 0c91305856 MDL-67342 theme_boost: Do not hardcode tooltip container 2019-11-25 15:59:25 +01:00
Sara Arjona c42b488aaf Merge branch 'MDL-66627-38' of git://github.com/mickhawkins/moodle into MOODLE_38_STABLE 2019-11-25 15:42:02 +01:00
David Monllaó 5bde4eb35e MDL-67217 unittest: usleep and windows don't get along well 2019-11-25 16:13:39 +08:00
Andrew Nicols 1943c03bbb MDL-67168 forum: Correct behaviour of viewfullnames 2019-11-25 08:56:37 +01:00
Jun Pataleta 0da427c800 Merge branch 'MDL-65956-38-1' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2019-11-25 14:23:11 +08:00
Mihail Geshoski 7045a22f3a MDL-65956 mod_assign: Add behat tests 2019-11-25 10:50:22 +08:00
Mihail Geshoski c7f9c7ae0f MDL-65956 mod_assign: Add proper capability checks and error handling 2019-11-25 10:50:22 +08:00
Andrew Nicols 751e4964b1 MDL-67285 core: YUI dialogues must use focuslock
YUI Dialogues were using an older method for locking focus to modals,
but this way conflicts with the way in which we lock focus for AMD
modules.

As a result, when an AMD dialogue launches a YUI dialogue the focus is
not correctly locked and it is not possible to focus on anything in the
YUI dialogue.

This includes a minor changes to the focuslock AMD module to ensure that
it is possible to loop the focus in both directions. Many of our older
YUI dialogues are themselves focusable. As a result we need to include
the lock region in the calculation when calculating the possible
descendants.
If we do not do so then the reverse looping does not work.
2019-11-25 10:35:08 +08:00
Eloy Lafuente (stronk7) 5a108a3064 MDL-67049 grading: options are array, ensure json_decode() knows it
By default json_decode() returns object for associative arrays. That
was not a problem till now becuause array_key_exists() worked with
objects too. But in php74 that emits a warning.

So we need to ensure that the information arriving to it is
an array, allowing everything to continue working ok.
2019-11-25 09:34:22 +08:00
Eloy Lafuente (stronk7) 417ff4f035 weekly release 3.8+ 2019-11-22 00:17:15 +01:00
sam marshall d3a5df14f7 MDL-67300 Calendar: Inconsistent behaviour of managegroupentries
When calling the calendar_get_allowed_event_types function with
no course id, it is supposed to return true if you have the
relevant permissions in any course.

For users who have the managegroupentries permission, this was not
the case - even though it works correctly if you call the function
with a supplied course id.

This change makes behaviour with and without a supplied course id
consistent.
2019-11-21 10:54:08 +00:00
Eloy Lafuente (stronk7) 82853489ca MDL-67035 tags: fix nested ternary operators to be php74 compliant
Nesting ternary operators without explicit parentheses is deprecated:

    // Code like
    $a ? $b : $c ? $d : $e
    // should be replaced by (current interpretation)
    ($a ? $b : $c) ? $d : $e
    // or (likely intended interpretation)
    $a ? $b : ($c ? $d : $e)
2019-11-21 11:55:27 +08:00
Eloy Lafuente (stronk7) 9eaea6a7bf MDL-66964 markdown: add details to readme
The commit to apply, from upstream repo, is:

https://github.com/michelf/php-markdown/commit/a35858f0409e5f01474f5cd562d17289fe8e5435

But it doesn't apply clean to our current 1.8.0 version.

So we have ended a slightly different version in core reproducing the same changes.
2019-11-21 11:37:50 +08:00
Eloy Lafuente (stronk7) f11b82df7c MDL-66964 markdown: php74 fixup for markdown lib 1.8.0
Note this is different from the upstream commit:

https://github.com/michelf/php-markdown/commit/a35858f0409e5f01474f5cd562d17289fe8e5435

because it was conflicting so only the cases corresponding
to our current 1.8.0 version have been modified.

This commit is trivial, just a pure curly to square replacement.
2019-11-21 11:37:50 +08:00
Tim Hunt 5d2f8bd98d MDL-48024 behat: allow plugins to have data generators
This extends the step
Given the following "users" exist:
to also support things like
Given the following "mod_quiz > user overrides" exist:

Instructions are on the behat_data_generators and
behat_generator_base classes.
2019-11-21 09:33:48 +08:00
Eloy Lafuente (stronk7) 023109f1b1 MDL-67030 htmlpurifier: add details to readme 2019-11-21 08:19:17 +08:00
Eloy Lafuente (stronk7) 51bedcee13 MDL-67030 htmlpurifier: php74 fixup for htmlpurifier v4.10.0
This simply applies this pull request:

https://github.com/ezyang/htmlpurifier/pull/224

straight to our library. Once there is some new htmlpurifier
release available (>v4.11.0) we'll be back upstream because
the fix will be included.
2019-11-21 08:19:11 +08:00
Eloy Lafuente (stronk7) 7cec76396f MDL-67031 s3: php74 fixup for class S3 v0.5.1 2019-11-20 16:22:07 +08:00
Eloy Lafuente (stronk7) daed88e656 MDL-67077 h5p: php74 fix (curly braces) for the H5P lib
This has been sent also upstream @ https://github.com/h5p/h5p-php-library/pull/69
2019-11-20 16:11:55 +08:00
Michael Hawkins 212595bbd0 MDL-66627 forumreport_summary: Added content access behat tests 2019-11-20 14:58:22 +08:00
Eloy Lafuente (stronk7) 6cff678c08 MDL-67034 lti_provider: php74 fix (curly braces) for LTI Provider lib 2019-11-20 13:17:09 +08:00
Eloy Lafuente (stronk7) 980193f55b MDL-67034 google: php74 fix (curly braces) for the Google-Client lib 2019-11-20 13:17:02 +08:00
Eloy Lafuente (stronk7) b4f9c2e906 MDL-67034 adodb: php74 fix (curly braces) for the AdoDB lib 2019-11-20 13:16:55 +08:00
Eloy Lafuente (stronk7) 93ed2a597c MDL-67034 horde: php74 fix (curly braces) for the Horde lib 2019-11-20 13:16:49 +08:00
Eloy Lafuente (stronk7) a2c6a69070 MDL-67029 bennu: add details to readme 2019-11-20 11:46:18 +08:00
Eloy Lafuente (stronk7) 7a68a37fda MDL-67029 bennu: php74 fixup for bennu lib 0.1-custom 2019-11-20 11:46:13 +08:00
Eloy Lafuente (stronk7) 3c1b6ed7bd MDL-67017 typo3: add details to readme 2019-11-20 10:01:13 +08:00
Eloy Lafuente (stronk7) 8ff55e3b1b MDL-67017 typo3: php74 fixup for typo3 lib 4.7.19
We are using a really outdated Typo3 library (2014) already patched
for php73 support. Plus, probably, we'll be soon removing it from core.

So we have decided to, instead of upgrade, apply the needed php74 fixes.
2019-11-20 10:01:02 +08:00
sam marshall 7d05f78363 MDL-67274 Tasks: Log display fails with memory errors 2019-11-19 10:51:22 +08:00
Jun Pataleta d0a9211f51 MDL-67148 tool_mobile: Set auth_cas|auth_name config value in unit test
Thanks to Renaat Debleu for the fix suggestion!
2019-11-18 18:50:11 +01:00
Marina Glancy e2a0a42003 MDL-67073 core_course: fix capability context 2019-11-18 16:02:46 +08:00
Jake Dallimore 7e24491f2c Merge branch 'MDL-67284_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2019-11-18 11:29:29 +08:00
Eloy Lafuente (stronk7) 4619c8a7e3 MDL-67284 mod_feedback: Add missing file phpdoc block 2019-11-17 12:47:05 +01:00
Eloy Lafuente (stronk7) 2aff0046c1 MDL-67284 upgrade: add 3.8.0 separation line to all upgrade scripts 2019-11-17 11:43:41 +01:00
397 changed files with 4442 additions and 2176 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ $category = required_param('category', PARAM_SAFEDIR);
$return = optional_param('return','', PARAM_ALPHA);
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
require_admin();
require_login(0, false);
$PAGE->set_context(context_system::instance());
$PAGE->set_url('/admin/category.php', array('category' => $category));
$PAGE->set_pagetype('admin-setting-' . $category);
+2 -1
View File
@@ -131,7 +131,8 @@ class task_log_table extends \table_sql {
}
$sql = "SELECT
tl.*,
tl.id, tl.type, tl.component, tl.classname, tl.userid, tl.timestart, tl.timeend,
tl.dbreads, tl.dbwrites, tl.result,
tl.dbreads + tl.dbwrites AS db,
tl.timeend - tl.timestart AS duration,
{$userfields}
+181
View File
@@ -2982,4 +2982,185 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.9" requires="3.5">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.6" />
<VENDOR name="postgres" version="9.5" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.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="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</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>
+31 -11
View File
@@ -33,13 +33,17 @@ $allprocessors = get_message_processors();
$processors = array_filter($allprocessors, function($processor) {
return $processor->enabled;
});
$disabledprocessors = array_filter($allprocessors, function($processor) {
return !$processor->enabled;
});
// Fetch message providers.
$providers = get_message_providers();
// Fetch the manage message outputs interface.
$preferences = get_message_output_default_preferences();
if (($form = data_submitted()) && confirm_sesskey()) {
$preferences = array();
$newpreferences = array();
// Prepare default message outputs settings.
foreach ($providers as $provider) {
$componentproviderbase = $provider->component.'_'.$provider->name;
@@ -47,9 +51,9 @@ if (($form = data_submitted()) && confirm_sesskey()) {
$providerdisabled = false;
if (!isset($form->$disableprovidersetting)) {
$providerdisabled = true;
$preferences[$disableprovidersetting] = 1;
$newpreferences[$disableprovidersetting] = 1;
} else {
$preferences[$disableprovidersetting] = 0;
$newpreferences[$disableprovidersetting] = 0;
}
foreach (array('permitted', 'loggedin', 'loggedoff') as $setting) {
@@ -75,20 +79,36 @@ if (($form = data_submitted()) && confirm_sesskey()) {
$form->{$componentproviderbase.'_loggedoff'}[$processor->name] = 1;
}
// Record the site preference.
$preferences[$processor->name.'_provider_'.$componentprovidersetting] = $value;
$newpreferences[$processor->name.'_provider_'.$componentprovidersetting] = $value;
}
} else if (property_exists($form, $componentprovidersetting)) {
// We must be processing loggedin or loggedoff checkboxes. Store
// defained comma-separated processors as setting value.
// Using array_filter eliminates elements set to 0 above.
$value = join(',', array_keys(array_filter($form->{$componentprovidersetting})));
} else {
$newsettings = array();
if (array_key_exists($componentprovidersetting, $form)) {
// We must be processing loggedin or loggedoff checkboxes.
// Store defained comma-separated processors as setting value.
// Using array_filter eliminates elements set to 0 above.
$newsettings = array_keys(array_filter($form->{$componentprovidersetting}));
}
// Let's join existing setting values for disabled processors.
$property = 'message_provider_'.$componentprovidersetting;
if (property_exists($preferences, $property)) {
$existingsetting = $preferences->$property;
foreach ($disabledprocessors as $disable) {
if (strpos($existingsetting, $disable->name) > -1) {
$newsettings[] = $disable->name;
}
}
}
$value = join(',', $newsettings);
if (empty($value)) {
$value = null;
}
}
if ($setting != 'permitted') {
// We have already recoded site preferences for 'permitted' type.
$preferences['message_provider_'.$componentprovidersetting] = $value;
$newpreferences['message_provider_'.$componentprovidersetting] = $value;
}
}
}
@@ -102,7 +122,7 @@ if (($form = data_submitted()) && confirm_sesskey()) {
\core_message\api::update_processor_status($processor, $enabled);
}
foreach ($preferences as $name => $value) {
foreach ($newpreferences as $name => $value) {
set_config($name, $value, 'message');
}
$transaction->allow_commit();
@@ -157,19 +157,19 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
// Allowed roles.
$allow = optional_param_array('allowassign', null, PARAM_INT);
if (!is_null($allow)) {
$this->allowassign = $allow;
$this->allowassign = array_filter($allow);
}
$allow = optional_param_array('allowoverride', null, PARAM_INT);
if (!is_null($allow)) {
$this->allowoverride = $allow;
$this->allowoverride = array_filter($allow);
}
$allow = optional_param_array('allowswitch', null, PARAM_INT);
if (!is_null($allow)) {
$this->allowswitch = $allow;
$this->allowswitch = array_filter($allow);
}
$allow = optional_param_array('allowview', null, PARAM_INT);
if (!is_null($allow)) {
$this->allowview = $allow;
$this->allowview = array_filter($allow);
}
// Now read the permissions for each capability.
@@ -618,7 +618,9 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
if ($this->roleid == 0) {
$options[-1] = get_string('thisnewrole', 'core_role');
}
return html_writer::select($options, 'allow'.$type.'[]', $selected, false, array('multiple' => 'multiple',
return
html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'allow'.$type.'[]', 'value' => "")) .
html_writer::select($options, 'allow'.$type.'[]', $selected, false, array('multiple' => 'multiple',
'size' => 10, 'class' => 'form-control'));
}
+2
View File
@@ -46,6 +46,8 @@ $logid = optional_param('logid', null, PARAM_INT);
$download = optional_param('download', false, PARAM_BOOL);
if (null !== $logid) {
// Raise memory limit in case the log is large.
raise_memory_limit(MEMORY_HUGE);
$log = $DB->get_record('task_log', ['id' => $logid], '*', MUST_EXIST);
if ($download) {
+4
View File
@@ -144,6 +144,10 @@ class api {
$rolesadded = array();
$rolesremoved = array();
// Remove any cohort role mappings for roles which have been deleted.
// The role assignments are not a consideration because these will have been removed when the role was.
$DB->delete_records_select('tool_cohortroles', "roleid NOT IN (SELECT id FROM {role})");
// Get all cohort role assignments and group them by user and role.
$all = cohort_role_assignment::get_records(array(), 'userid, roleid');
// We build an better structure to loop on.
+3
View File
@@ -44,5 +44,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -712,7 +712,7 @@ class api {
'requestedby' => $requestedby->fullname,
'requesttype' => $typetext,
'requestdate' => userdate($requestdata->timecreated),
'requestorigin' => $SITE->fullname,
'requestorigin' => format_string($SITE->fullname, true, ['context' => context_system::instance()]),
'requestoriginurl' => new moodle_url('/'),
'requestcomments' => $requestdata->messagehtml,
'datarequestsurl' => $datarequestsurl
@@ -26,6 +26,7 @@ namespace tool_dataprivacy\task;
use action_link;
use coding_exception;
use context_system;
use core\message\message;
use core\task\adhoc_task;
use core_user;
@@ -152,7 +153,7 @@ class process_data_request_task extends adhoc_task {
$message->name = 'datarequestprocessingresults';
$message->userfrom = $dpo;
$message->replyto = $dpo->email;
$message->replytoname = fullname($dpo->email);
$message->replytoname = fullname($dpo);
$typetext = null;
// Prepare the context data for the email message body.
@@ -180,7 +181,8 @@ class process_data_request_task extends adhoc_task {
$message->contexturl = $datarequestsurl;
$message->contexturlname = get_string('datarequests', 'tool_dataprivacy');
// Message to the recipient.
$messagetextdata['message'] = get_string('resultdownloadready', 'tool_dataprivacy', $SITE->fullname);
$messagetextdata['message'] = get_string('resultdownloadready', 'tool_dataprivacy',
format_string($SITE->fullname, true, ['context' => context_system::instance()]));
// Prepare download link.
$downloadurl = moodle_url::make_pluginfile_url($usercontext->id, 'tool_dataprivacy', 'export', $thing->get_itemid(),
$thing->get_filepath(), $thing->get_filename(), true);
@@ -192,7 +194,8 @@ class process_data_request_task extends adhoc_task {
// No point notifying a deleted user in Moodle.
$message->notification = 0;
// Message to the recipient.
$messagetextdata['message'] = get_string('resultdeleted', 'tool_dataprivacy', $SITE->fullname);
$messagetextdata['message'] = get_string('resultdeleted', 'tool_dataprivacy',
format_string($SITE->fullname, true, ['context' => context_system::instance()]));
// Message will be sent to the deleted user via email only.
$emailonly = true;
break;
+3
View File
@@ -319,5 +319,8 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -301,6 +301,11 @@ class tool_dataprivacy_api_testcase extends advanced_testcase {
$datarequest = api::create_data_request($student->id, api::DATAREQUEST_TYPE_EXPORT);
$requestid = $datarequest->get('id');
// Login as a user without DPO role.
$this->setUser($teacher);
$this->expectException(required_capability_exception::class);
api::approve_data_request($requestid);
}
/**
+3
View File
@@ -48,5 +48,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -49,5 +49,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -49,5 +49,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -32,7 +32,7 @@
// No example context because the JS is connected to webservices
}}
<div class="float-sm-right card card-block">
<div class="float-sm-right border p-2 mb-2">
{{#hascompetencies}}
<span>
<label for="competency-nav-{{uniqid}}" class="accesshide">{{#str}}jumptocompetency, tool_lp{{/str}}</label>
@@ -82,7 +82,7 @@
{{/comppath}}
{{#usercompetencycourse}}
{{#grade}}
<span class="badge {{^proficiency}}badge-danger{{/proficiency}}">{{gradename}}</span>
<span class="badge {{#proficiency}}badge-success{{/proficiency}}{{^proficiency}}badge-danger{{/proficiency}}">{{gradename}}</span>
{{/grade}}
{{/usercompetencycourse}}
{{#canmanagecoursecompetencies}}
@@ -49,7 +49,7 @@
Template statistics template.
}}
{{#competencycount}}
<div data-region="coursecompetencystatistics" class="card">
<div data-region="coursecompetencystatistics" class="border p-2 mb-2">
{{#canbegradedincourse}}
{{< tool_lp/progress_bar}}
{{$progresstext}}
@@ -44,7 +44,7 @@
"id": 1
}
}}
<div class="card well-small evidence" data-region="evidence" data-id="{{id}}">
<div class="border p-2 mb-2 evidence" data-region="evidence" data-id="{{id}}">
{{#candelete}}
<div class="float-sm-right">
<a href="#" data-action="delete-evidence">{{#pix}}t/delete{{/pix}}</a>
@@ -50,10 +50,12 @@
<div class="col-lg-6">
<p>
<form data-region="filtercompetencies" data-frameworkid="{{framework.id}}" class="form-inline">
<div class="form-group">
<div class="input-group mb-3">
<label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
<input class="form-control" type="text" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
<button class="btn btn-secondary">{{#pix}}a/search, , {{#str}}search{{/str}}{{/pix}}</button>
<div class="input-group-append">
<button class="btn btn-secondary">{{#pix}}a/search, , {{#str}}search{{/str}}{{/pix}}</button>
</div>
</div>
</form>
</p>
@@ -62,8 +64,8 @@
</ul>
</div>
<div class="card col-lg-6">
<div class="card-block card-body">
<div class="col-lg-6">
<div class="border p-2 mb-2">
<div class="card-title">
<h4 data-region="selected-competency">{{#str}}selectedcompetency, tool_lp{{/str}}</h4>
<span data-region="competencyactionsmenu" class="float-sm-right">
@@ -28,7 +28,7 @@
// No example context because the JS is connected to webservices
}}
<div class="float-right card p-2">
<div class="float-right border mb-2 p-2">
<form class="user-competency-course-navigation">
<input type="hidden" name="courseid" value="{{courseid}}"/>
<input type="hidden" name="mod" value="{{moduleid}}"/>
@@ -26,10 +26,8 @@
</h2>
<div>{{{template.description}}}</div>
{{#canmanagetemplatecompetencies}}
<div data-region="actions" class="clearfix">
<div class="float-left">
<button disabled class="btn btn-secondary">{{#str}}addtemplatecompetencies, tool_lp{{/str}}</button>
</div>
<div data-region="actions" class="my-4">
<button disabled class="btn btn-secondary">{{#str}}addtemplatecompetencies, tool_lp{{/str}}</button>
</div>
{{/canmanagetemplatecompetencies}}
<h3 class="mt-1">{{#str}}templatecompetencies, tool_lp{{/str}}</h3>
@@ -41,7 +39,7 @@
<div class="drag-parentnode">
{{#competencies}}
<div class="drag-samenode" data-id="{{competency.id}}">
<div class="card">
<div class="border p-2 mb-2">
{{#canmanagetemplatecompetencies}}
<span class="drag-handlecontainer float-left"></span>
<div class="float-sm-right">
@@ -45,8 +45,7 @@
Template statistics template.
}}
{{#competencycount}}
<div data-region="templatestatistics" class="card">
<div class="card-block">
<div data-region="templatestatistics" class="border p-2 mb-2">
{{< tool_lp/progress_bar}}
{{$progresstext}}
{{#str}}xcompetencieslinkedoutofy, tool_lp, { "x": "{{linkedcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
@@ -90,6 +89,5 @@
</div>
</div>
{{/leastproficientcount}}
</div>
</div>
{{/competencycount}}
@@ -35,7 +35,7 @@
// No example context because the JS is connected to webservices
}}
<div class="float-sm-right card card-block p-x-1 p-b-1">
<div class="float-sm-right border p-2 mb-2">
<p>{{{groupselector}}}</p>
<form class="user-competency-course-navigation">
<input type="hidden" name="userid" value="{{userid}}"/>
@@ -57,7 +57,7 @@
</dd>
<dt>{{#str}}proficient, tool_lp{{/str}}</dt>
<dd>
<span class="badge{{^proficiency}} badge-danger{{/proficiency}} float-left">
<span class="badge {{#proficiency}}badge-success{{/proficiency}}{{^proficiency}}badge-danger{{/proficiency}} float-left">
{{proficiencyname}}
</span>
</dd>
@@ -81,7 +81,7 @@
{{#usercompetencycourse}}
<dt>{{#str}}proficient, tool_lp{{/str}}</dt>
<dd>
<span class="badge{{^proficiency}} badge-danger{{/proficiency}} float-left">
<span class="badge {{#proficiency}}badge-success{{/proficiency}}{{^proficiency}}badge-danger{{/proficiency}} float-left">
{{proficiencyname}}
</span>
</dd>
@@ -68,7 +68,7 @@
</dd>
<dt>{{#str}}proficient, tool_lp{{/str}}</dt>
<dd>
<span class="badge{{^proficiency}} badge-danger{{/proficiency}} float-left">
<span class="badge {{#proficiency}}badge-success{{/proficiency}}{{^proficiency}}badge-danger{{/proficiency}} float-left">
{{proficiencyname}}
</span>
</dd>
@@ -101,7 +101,7 @@
<dd>{{gradename}} - {{#str}}plancompleted, tool_lp{{/str}}</dd>
<dt>{{#str}}proficient, tool_lp{{/str}}</dt>
<dd>
<span class="badge{{^proficiency}} badge-danger{{/proficiency}} float-left">
<span class="badge {{#proficiency}}badge-success{{/proficiency}}{{^proficiency}}badge-danger{{/proficiency}} float-left">
{{proficiencyname}}
</span>
</dd>
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -127,7 +127,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
set_config('hostname', 'localhost', 'auth_cas');
set_config('auth_logo', 'http://invalidurl.com//invalid/', 'auth_cas');
set_config('auth_name', 'CAS', 'auth_cas');
set_config('auth', 'oauth2,cas');
list($authinstructions, $notusedformat) = external_format_text($authinstructions, FORMAT_MOODLE, $context->id);
+3
View File
@@ -65,5 +65,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -66,5 +66,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -720,6 +720,12 @@ class tool_uploadcourse_course {
}
}
// Visibility can only be 0 or 1.
if (!empty($coursedata['visible']) AND !($coursedata['visible'] == 0 OR $coursedata['visible'] == 1)) {
$this->error('invalidvisibilitymode', new lang_string('invalidvisibilitymode', 'tool_uploadcourse'));
return false;
}
// Saving data.
$this->data = $coursedata;
$this->enrolmentdata = tool_uploadcourse_helper::get_enrolment_data($this->rawdata);
@@ -90,6 +90,7 @@ $string['invalidcsvfile'] = 'Invalid input CSV file';
$string['invalidencoding'] = 'Invalid encoding';
$string['invalidmode'] = 'Invalid mode selected';
$string['invalideupdatemode'] = 'Invalid update mode selected';
$string['invalidvisibilitymode'] = 'Invalid visible mode';
$string['invalidroles'] = 'Invalid role names: {$a}';
$string['invalidshortname'] = 'Invalid shortname';
$string['missingmandatoryfields'] = 'Missing value for mandatory fields: {$a}';
@@ -82,6 +82,16 @@ class tool_uploadcourse_course_testcase extends advanced_testcase {
$this->assertArrayHasKey('invalidshortname', $co->get_errors());
}
public function test_invalid_visibility() {
$this->resetAfterTest(true);
$mode = tool_uploadcourse_processor::MODE_CREATE_NEW;
$updatemode = tool_uploadcourse_processor::UPDATE_NOTHING;
$data = array('shortname' => 'test', 'fullname' => 'New course', 'summary' => 'New', 'category' => 1, 'visible' => 2);
$co = new tool_uploadcourse_course($mode, $updatemode, $data);
$this->assertFalse($co->prepare());
$this->assertArrayHasKey('invalidvisibilitymode', $co->get_errors());
}
public function test_create() {
global $DB;
$this->resetAfterTest(true);
+3
View File
@@ -64,5 +64,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -41,7 +41,7 @@ class test_analysis extends \core_analytics\analysis {
*/
public function process_analysable(\core_analytics\analysable $analysable): array {
// Half a second.
usleep(500000);
sleep(1);
return parent::process_analysable($analysable);
}
}
+1 -1
View File
@@ -292,7 +292,7 @@ class analytics_model_testcase extends advanced_testcase {
$this->resetAfterTest(true);
set_config('modeltimelimit', 1, 'analytics');
set_config('modeltimelimit', 2, 'analytics');
$courses = array();
for ($i = 0; $i < 5; $i++) {
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_db_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_email_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -72,5 +72,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_none_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -84,5 +84,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019052001, 'auth', 'oauth2');
}
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -1
View File
@@ -36,7 +36,8 @@ if (empty($CFG->enablebadges)) {
$hash = required_param('b', PARAM_ALPHANUM); // Issued badge unique hash for badge assertion.
$action = optional_param('action', null, PARAM_BOOL); // Generates badge class if true.
$obversion = optional_param('obversion', OPEN_BADGES_V1, PARAM_INT); // For control format OB specification version.
// OB specification version. If it's not defined, the site will be used as default.
$obversion = optional_param('obversion', badges_open_badges_backpack_api(), PARAM_INT);
$assertion = new core_badges_assertion($hash, $obversion);
+5 -1
View File
@@ -54,6 +54,9 @@ class issued_badge implements renderable {
/** @var badge class */
public $badgeid = 0;
/** @var unique hash identifying the issued badge */
public $hash;
/**
* Initializes the badge to display
*
@@ -62,7 +65,8 @@ class issued_badge implements renderable {
public function __construct($hash) {
global $DB;
$assertion = new \core_badges_assertion($hash);
$this->hash = $hash;
$assertion = new \core_badges_assertion($hash, badges_open_badges_backpack_api());
$this->issued = $assertion->get_badge_assertion();
$this->badgeclass = $assertion->get_badge_class();
+3 -3
View File
@@ -337,13 +337,13 @@ class core_badges_renderer extends plugin_renderer_base {
if ($USER->id == $userinfo->id && !empty($CFG->enablebadges)) {
$output .= $this->output->single_button(
new moodle_url('/badges/badge.php', array('hash' => $issued['uid'], 'bake' => true)),
new moodle_url('/badges/badge.php', array('hash' => $ibadge->hash, 'bake' => true)),
get_string('download'),
'POST');
if (!empty($CFG->badges_allowexternalbackpack) && ($expiration > $now) && badges_user_has_backpack($USER->id)) {
if (badges_open_badges_backpack_api() == OPEN_BADGES_V1) {
$assertion = new moodle_url('/badges/assertion.php', array('b' => $issued['uid']));
$assertion = new moodle_url('/badges/assertion.php', array('b' => $ibadge->hash));
$action = new component_action('click', 'addtobackpack', array('assertion' => $assertion->out(false)));
$attributes = array(
'type' => 'button',
@@ -354,7 +354,7 @@ class core_badges_renderer extends plugin_renderer_base {
$this->output->add_action_handler($action, 'addbutton');
$output .= $tobackpack;
} else {
$assertion = new moodle_url('/badges/backpack-add.php', array('hash' => $issued['uid']));
$assertion = new moodle_url('/badges/backpack-add.php', array('hash' => $ibadge->hash));
$attributes = ['class' => 'btn btn-secondary m-1', 'role' => 'button'];
$tobackpack = html_writer::link($assertion, get_string('addtobackpack', 'badges'), $attributes);
$output .= $tobackpack;
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -234,7 +234,7 @@ function block_blog_tags_sort($a, $b) {
}
if (is_numeric($a->$tagsort)) {
return ($a->$tagsort == $b->$tagsort) ? 0 : ($a->$tagsort > $b->$tagsort) ? 1 : -1;
return (($a->$tagsort == $b->$tagsort) ? 0 : ($a->$tagsort > $b->$tagsort)) ? 1 : -1;
} elseif (is_string($a->$tagsort)) {
return strcmp($a->$tagsort, $b->$tagsort); //TODO: this is not compatible with UTF-8!!
} else {
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -63,5 +63,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -63,5 +63,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -48,5 +48,8 @@ function xmldb_block_html_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3 -1
View File
@@ -366,7 +366,9 @@ class main implements renderable, templatable {
return [];
}
$field = \core_customfield\field_controller::create($fieldid);
if (!$field->supports_course_grouping()) {
$isvisible = $field->get_configdata_property('visibility') == \core_course\customfield\course_handler::VISIBLETOALL;
// Only visible fields to everybody supporting course grouping will be displayed.
if (!$field->supports_course_grouping() || !$isvisible) {
return []; // The field shouldn't have been selectable in the global settings, but just skip it now.
}
$values = $field->course_grouping_format_values($values);
+3
View File
@@ -55,5 +55,8 @@ function xmldb_block_myoverview_upgrade($oldversion) {
upgrade_block_savepoint(true, 2019091800, 'myoverview', false);
}
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -54,7 +54,7 @@ $string['courseprogress'] = 'Course progress:';
$string['completepercent'] = '{$a}% complete';
$string['customfield'] = 'Custom field';
$string['customfiltergrouping'] = 'Field to use';
$string['customfiltergrouping_nofields'] = 'This option requires a course custom field to be set up.';
$string['customfiltergrouping_nofields'] = 'This option requires a course custom field to be set up and visible to everyone.';
$string['displaycategories'] = 'Display categories';
$string['displaycategories_help'] = 'Display the course category on dashboard course items including cards, list items and summary items.';
$string['favourites'] = 'Starred';
@@ -13,14 +13,16 @@ Feature: The my overview block allows users to group courses by custom fields
| Checkbox field | Course fields | checkbox | checkboxfield | |
| Date field | Course fields | date | datefield | {"mindate":0, "maxdate":0} |
| Select field | Course fields | select | selectfield | {"options":"Option 1\nOption 2\nOption 3\nOption 4"} |
| Text field | Course fields | text | textfield | |
| Text field | Course fields | text | textfield | {"visibility":"2"} |
| Text field 2 | Course fields | text | textfield2 | {"visibility":"2"} |
| Hidden field | Course fields | text | hiddenfield | {"visibility":"0"} |
And the following "courses" exist:
| fullname | shortname | category | customfield_checkboxfield | customfield_datefield | customfield_selectfield | customfield_textfield |
| Course 1 | C1 | 0 | 1 | 981028800 | 1 | fish |
| Course 2 | C2 | 0 | 0 | 334324800 | | |
| Course 3 | C3 | 0 | 0 | 981028800 | 2 | dog |
| Course 4 | C4 | 0 | 1 | | 3 | cat |
| Course 5 | C5 | 0 | | 334411200 | 2 | fish |
| fullname | shortname | category | customfield_checkboxfield | customfield_datefield | customfield_selectfield | customfield_textfield | customfield_textfield2 |
| Course 1 | C1 | 0 | 1 | 981028800 | 1 | fish | penguin |
| Course 2 | C2 | 0 | 0 | 334324800 | | | |
| Course 3 | C3 | 0 | 0 | 981028800 | 2 | dog | |
| Course 4 | C4 | 0 | 1 | | 3 | cat | |
| Course 5 | C5 | 0 | | 334411200 | 2 | fish | penguin |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
@@ -172,3 +174,24 @@ Feature: The my overview block allows users to group courses by custom fields
And I should not see "Course 3" in the "Course overview" "block"
And I should not see "Course 4" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
Scenario: Hidden fields not displayed when configuring the custom field filters
Given I log in as "admin"
When I navigate to "Plugins > Blocks > Course overview" in site administration
And I set the field "Custom field" to "1"
Then the "Field to use" select box should not contain "Hidden field"
Scenario: Hidden fields not displayed in the filter
Given the following config values are set as admin:
| displaygroupingcustomfield | 1 | block_myoverview |
| customfiltergrouping | textfield2 | block_myoverview |
And I log in as "admin"
And I navigate to "Courses > Course custom fields" in site administration
And I click on "Edit" "link" in the "Text field 2" "table_row"
And I set the field "Visible to" to "Nobody"
And I press "Save changes"
And I log out
When I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then I should not see "penguin" in the "Course overview" "block"
Then I should not see "No text field" in the "Course overview" "block"
+3
View File
@@ -70,5 +70,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -62,5 +62,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -69,5 +69,8 @@ function xmldb_block_recentlyaccesseditems_upgrade($oldversion, $block) {
upgrade_block_savepoint(true, 2019052001, 'recentlyaccesseditems', false);
}
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -48,5 +48,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -64,5 +64,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -63,5 +63,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -70,5 +70,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -1,2 +1,2 @@
define ("block_timeline/event_list",["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={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\"]"},i={EVENT_LIST_CONTENT:"block_timeline/event-list-content"},j={ignoreControlWhileLoading:!0,controlPlacementBottom:!0,ariaLabels:{itemsperpagecomponents:"ariaeventlistpagelimit, block_timeline"}},k=function(a){a.find(h.EVENT_LIST_CONTENT).addClass("hidden");a.find(h.EMPTY_MESSAGE).removeClass("hidden")},l=function(a){a.find(h.EVENT_LIST_CONTENT).removeClass("hidden");a.find(h.EMPTY_MESSAGE).addClass("hidden")},m=function(a){a.find(h.EVENT_LIST_CONTENT).empty()},n=function(a,b){var c={},d={eventsbyday:[]};a.forEach(function(a){var d=f.getUserMidnightForTimestamp(a.timesort,b);if(c[d]){c[d].push(a)}else{c[d]=[a]}});Object.keys(c).forEach(function(a){var e=c[a];d.eventsbyday.push({past:a<b,dayTimestamp:a,events:e})});return d},o=function(a,b){var d=n(a,b),e=i.EVENT_LIST_CONTENT;return c.render(e,d)},p=function(a,b,c,d,e,f){var h=d!=void 0?a+d*86400:!1,i={starttime:a+c*86400,limit:b};if(e){i.aftereventid=e}if(h){i.endtime=h}if(f){i.courseid=f;return g.queryByCourse(i)}else{return g.queryByTime(i)}},q=function(a,b,c,d,e,f,g,h){var i=a.pageNumber,j=a.limit,k=i;while(!d.hasOwnProperty(k)){k--}var l=d[k],m=null;if(e&&e.hasOwnProperty(i)){m=e[i]}else{m=p(c,j+1,g,h,l,f)}return m.then(function(a){if(!a.events.length){b.allItemsLoaded(i);return[]}var c=a.events.filter(function(a){return"open"!=a.eventtype&&"opensubmission"!=a.eventtype}),d=c.length<=j;if(d){b.allItemsLoaded(i)}else{c.pop()}return c})},r=function(c,f,g,h,i,k,l,m,n){var p={1:0},r=!1,s=a.extend({},j,n);return e.get_string("ariaeventlistpagelimit","block_timeline",a.isArray(c)?c[0].value:c).then(function(a){s.ariaLabels.itemsperpage=a;s.ariaLabels.paginationnav=m;return a}).then(function(){return d.createWithLimit(c,function(c,d){var e=[];c.forEach(function(a){var c=a.pageNumber,h=q(a,d,g,p,f,i,k,l).then(function(a){if(a.length){r=!0;var b=a[a.length-1].id;p[c+1]=b;return o(a,g)}else{return a}}).catch(b.exception);e.push(h)});a.when.apply(a,e).then(function(){h.resolve(r)}).catch(function(){h.resolve(r)});return e},s)})};return{init:function init(d,e,f,g,i){d=a(d);var j=a.Deferred(),n=d.find(h.EVENT_LIST_CONTENT),o=d.find(h.EVENT_LIST_LOADING_PLACEHOLDER),p=d.attr("data-course-id"),q=parseInt(d.attr("data-days-offset"),10),s=d.attr("data-days-limit"),t=parseInt(d.attr("data-midnight"),10);m(d);l(d);o.removeClass("hidden");if(s!=void 0){s=parseInt(s,10)}return r(e,f,t,j,p,q,s,g,i).then(function(b,e){b=a(b);b.addClass("hidden");c.replaceNodeContents(n,b,e);j.then(function(a){b.removeClass("hidden");o.addClass("hidden");if(!a){k(d)}return a}).catch(function(){return!1});return b}).catch(b.exception)},rootSelector:h.ROOT}});
define ("block_timeline/event_list",["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={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\"]"},i={EVENT_LIST_CONTENT:"block_timeline/event-list-content"},j={ignoreControlWhileLoading:!0,controlPlacementBottom:!0,ariaLabels:{itemsperpagecomponents:"ariaeventlistpagelimit, block_timeline"}},k=function(a){a.find(h.EVENT_LIST_CONTENT).addClass("hidden");a.find(h.EMPTY_MESSAGE).removeClass("hidden")},l=function(a){a.find(h.EVENT_LIST_CONTENT).removeClass("hidden");a.find(h.EMPTY_MESSAGE).addClass("hidden")},m=function(a){a.find(h.EVENT_LIST_CONTENT).empty()},n=function(a,b){var c={},d={eventsbyday:[]};a.forEach(function(a){var d=f.getUserMidnightForTimestamp(a.timesort,b);if(c[d]){c[d].push(a)}else{c[d]=[a]}});Object.keys(c).forEach(function(a){var e=c[a];d.eventsbyday.push({past:a<b,dayTimestamp:a,events:e})});return d},o=function(a,b){var d=n(a,b),e=i.EVENT_LIST_CONTENT;return c.render(e,d)},p=function(a,b,c,d,e,f){var h=d!=void 0?a+d*86400:!1,i={starttime:a+c*86400,limit:b};if(e){i.aftereventid=e}if(h){i.endtime=h}if(f){i.courseid=f;return g.queryByCourse(i)}else{return g.queryByTime(i)}},q=function(a,b,c,d,e,g,h,i){var j=a.pageNumber,k=a.limit,l=j;while(!d.hasOwnProperty(l)){l--}var m=d[l],n=null;if(e&&e.hasOwnProperty(j)){n=e[j]}else{n=p(c,k+1,h,i,m,g)}return n.then(function(a){if(!a.events.length){b.allItemsLoaded(j);return[]}var d=a.events.filter(function(a){if("open"==a.eventtype||"opensubmission"==a.eventtype){var b=f.getUserMidnightForTimestamp(a.timesort,c);return b>c}return!0}),e=d.length<=k;if(e){b.allItemsLoaded(j)}else{d.pop()}return d})},r=function(c,f,g,h,i,k,l,m,n){var p={1:0},r=!1,s=a.extend({},j,n);return e.get_string("ariaeventlistpagelimit","block_timeline",a.isArray(c)?c[0].value:c).then(function(a){s.ariaLabels.itemsperpage=a;s.ariaLabels.paginationnav=m;return a}).then(function(){return d.createWithLimit(c,function(c,d){var e=[];c.forEach(function(a){var c=a.pageNumber,h=q(a,d,g,p,f,i,k,l).then(function(a){if(a.length){r=!0;var b=a[a.length-1].id;p[c+1]=b;return o(a,g)}else{return a}}).catch(b.exception);e.push(h)});a.when.apply(a,e).then(function(){h.resolve(r)}).catch(function(){h.resolve(r)});return e},s)})};return{init:function init(d,e,f,g,i){d=a(d);var j=a.Deferred(),n=d.find(h.EVENT_LIST_CONTENT),o=d.find(h.EVENT_LIST_LOADING_PLACEHOLDER),p=d.attr("data-course-id"),q=parseInt(d.attr("data-days-offset"),10),s=d.attr("data-days-limit"),t=parseInt(d.attr("data-midnight"),10);m(d);l(d);o.removeClass("hidden");if(s!=void 0){s=parseInt(s,10)}return r(e,f,t,j,p,q,s,g,i).then(function(b,e){b=a(b);b.addClass("hidden");c.replaceNodeContents(n,b,e);j.then(function(a){b.removeClass("hidden");o.addClass("hidden");if(!a){k(d)}return a}).catch(function(){return!1});return b}).catch(b.exception)},rootSelector:h.ROOT}});
//# sourceMappingURL=event_list.min.js.map
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -266,8 +266,11 @@ function(
}
var calendarEvents = result.events.filter(function(event) {
// Do not include events that does not have a due date.
return event.eventtype != "open" && event.eventtype != "opensubmission";
if (event.eventtype == "open" || event.eventtype == "opensubmission") {
var dayTimestamp = UserDate.getUserMidnightForTimestamp(event.timesort, midnight);
return dayTimestamp > midnight;
}
return true;
});
// We expect to receive limit + 1 events back from the server.
// Any less means there are no more events to load.
+1 -1
View File
@@ -1,2 +1,2 @@
define ("core_calendar/repository",["jquery","core/ajax"],function(a,b){return{getEventById:function getEventById(a){return b.call([{methodname:"core_calendar_get_calendar_event_by_id",args:{eventid:a}}])[0]},deleteEvent:function deleteEvent(a,c){if("undefined"==typeof c){c=!1}var d={methodname:"core_calendar_delete_calendar_events",args:{events:[{eventid:a,repeat:c}]}};return b.call([d])[0]},updateEventStartDay:function updateEventStartDay(a,c){return b.call([{methodname:"core_calendar_update_event_start_day",args:{eventid:a,daytimestamp:c}}])[0]},submitCreateUpdateForm:function submitCreateUpdateForm(a){return b.call([{methodname:"core_calendar_submit_create_update_form",args:{formdata:a}}])[0]},getCalendarMonthData:function getCalendarMonthData(a,c,d,e,f,g){return b.call([{methodname:"core_calendar_get_calendar_monthly_view",args:{year:a,month:c,courseid:d,categoryid:e,includenavigation:f,mini:g}}])[0]},getCalendarDayData:function getCalendarDayData(a,c,d,e,f){return b.call([{methodname:"core_calendar_get_calendar_day_view",args:{year:a,month:c,day:d,courseid:e,categoryid:f}}])[0]},getCalendarUpcomingData:function getCalendarUpcomingData(a,c){return b.call([{methodname:"core_calendar_get_calendar_upcoming_view",args:{courseid:a,categoryid:c}}])[0]},getCourseGroupsData:function getCourseGroupsData(a){return b.call([{methodname:"core_group_get_course_groups",args:{courseid:a}}])[0]}}});
define ("core_calendar/repository",["jquery","core/ajax"],function(a,b){return{getEventById:function getEventById(a){return b.call([{methodname:"core_calendar_get_calendar_event_by_id",args:{eventid:a}}])[0]},deleteEvent:function deleteEvent(a,c){if("undefined"==typeof c){c=!1}var d={methodname:"core_calendar_delete_calendar_events",args:{events:[{eventid:a,repeat:c}]}};return b.call([d])[0]},updateEventStartDay:function updateEventStartDay(a,c){return b.call([{methodname:"core_calendar_update_event_start_day",args:{eventid:a,daytimestamp:c}}])[0]},submitCreateUpdateForm:function submitCreateUpdateForm(a){return b.call([{methodname:"core_calendar_submit_create_update_form",args:{formdata:a}}])[0]},getCalendarMonthData:function getCalendarMonthData(a,c,d,e,f,g,h){h=h||1;var i={methodname:"core_calendar_get_calendar_monthly_view",args:{year:a,month:c,courseid:d,categoryid:e,includenavigation:f,mini:g,day:h}};return b.call([i])[0]},getCalendarDayData:function getCalendarDayData(a,c,d,e,f){return b.call([{methodname:"core_calendar_get_calendar_day_view",args:{year:a,month:c,day:d,courseid:e,categoryid:f}}])[0]},getCalendarUpcomingData:function getCalendarUpcomingData(a,c){return b.call([{methodname:"core_calendar_get_calendar_upcoming_view",args:{courseid:a,categoryid:c}}])[0]},getCourseGroupsData:function getCourseGroupsData(a){return b.call([{methodname:"core_group_get_course_groups",args:{courseid:a}}])[0]}}});
//# sourceMappingURL=repository.min.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7 -4
View File
@@ -94,11 +94,13 @@ define(['jquery', 'core/ajax'], function($, Ajax) {
* @param {Number} month Month
* @param {Number} courseid The course id.
* @param {Number} categoryid The category id.
* @param {Bool} includenavigation Whether to include navigation.
* @param {Bool} mini Whether the month is in mini view.
* @param {Boolean} includenavigation Whether to include navigation.
* @param {Boolean} mini Whether the month is in mini view.
* @param {Number} day Day (optional)
* @return {promise} Resolved with the month view data.
*/
var getCalendarMonthData = function(year, month, courseid, categoryid, includenavigation, mini) {
var getCalendarMonthData = function(year, month, courseid, categoryid, includenavigation, mini, day) {
day = day || 1;
var request = {
methodname: 'core_calendar_get_calendar_monthly_view',
args: {
@@ -107,7 +109,8 @@ define(['jquery', 'core/ajax'], function($, Ajax) {
courseid: courseid,
categoryid: categoryid,
includenavigation: includenavigation,
mini: mini
mini: mini,
day: day
}
};
+13 -7
View File
@@ -94,7 +94,8 @@ define([
var link = $(e.currentTarget);
if (view === 'month') {
changeMonth(root, link.attr('href'), link.data('year'), link.data('month'), courseId, categoryId);
changeMonth(root, link.attr('href'), link.data('year'), link.data('month'), courseId, categoryId,
link.data('day'));
e.preventDefault();
} else if (view === 'day') {
changeDay(root, link.attr('href'), link.data('year'), link.data('month'), link.data('day'),
@@ -124,7 +125,7 @@ define([
categoryId = option.data('categoryid');
if (view == 'month') {
refreshMonthContent(root, year, month, courseId, categoryId, root, 'core_calendar/calendar_month')
refreshMonthContent(root, year, month, courseId, categoryId, root, 'core_calendar/calendar_month', day)
.then(function() {
return window.history.pushState({}, '', '?view=month');
}).fail(Notification.exception);
@@ -153,17 +154,19 @@ define([
* @param {Number} categoryid The id of the category whose events are shown
* @param {object} target The element being replaced. If not specified, the calendarwrapper is used.
* @param {String} template The template to be rendered.
* @param {Number} day Day (optional)
* @return {promise}
*/
var refreshMonthContent = function(root, year, month, courseid, categoryid, target, template) {
var refreshMonthContent = function(root, year, month, courseid, categoryid, target, template, day) {
startLoading(root);
target = target || root.find(CalendarSelectors.wrapper);
template = template || root.attr('data-template');
day = day || 1;
M.util.js_pending([root.get('id'), year, month, courseid].join('-'));
var includenavigation = root.data('includenavigation');
var mini = root.data('mini');
return CalendarRepository.getCalendarMonthData(year, month, courseid, categoryid, includenavigation, mini)
return CalendarRepository.getCalendarMonthData(year, month, courseid, categoryid, includenavigation, mini, day)
.then(function(context) {
context.viewingmonth = true;
return Templates.render(template, context);
@@ -191,10 +194,12 @@ define([
* @param {Number} month Month
* @param {Number} courseid The id of the course whose events are shown
* @param {Number} categoryid The id of the category whose events are shown
* @param {Number} day Day (optional)
* @return {promise}
*/
var changeMonth = function(root, url, year, month, courseid, categoryid) {
return refreshMonthContent(root, year, month, courseid, categoryid)
var changeMonth = function(root, url, year, month, courseid, categoryid, day) {
day = day || 1;
return refreshMonthContent(root, year, month, courseid, categoryid, null, null, day)
.then(function() {
if (url.length && url !== '#') {
window.history.pushState({}, '', url);
@@ -218,6 +223,7 @@ define([
var reloadCurrentMonth = function(root, courseId, categoryId) {
var year = root.find(CalendarSelectors.wrapper).data('year');
var month = root.find(CalendarSelectors.wrapper).data('month');
var day = root.find(CalendarSelectors.wrapper).data('day');
if (typeof courseId === 'undefined') {
courseId = root.find(CalendarSelectors.wrapper).data('courseid');
@@ -227,7 +233,7 @@ define([
categoryId = root.find(CalendarSelectors.wrapper).data('categoryid');
}
return refreshMonthContent(root, year, month, courseId, categoryId);
return refreshMonthContent(root, year, month, courseId, categoryId, null, null, day);
};
+6 -3
View File
@@ -988,10 +988,11 @@ class core_calendar_external extends external_api {
* @param int $categoryid The category to be included
* @param bool $includenavigation Whether to include navigation
* @param bool $mini Whether to return the mini month view or not
* @param int $day The day we want to keep as the current day
* @return array
*/
public static function get_calendar_monthly_view($year, $month, $courseid, $categoryid, $includenavigation, $mini) {
global $DB, $USER, $PAGE;
public static function get_calendar_monthly_view($year, $month, $courseid, $categoryid, $includenavigation, $mini, $day) {
global $USER, $PAGE;
// Parameter validation.
$params = self::validate_parameters(self::get_calendar_monthly_view_parameters(), [
@@ -1001,6 +1002,7 @@ class core_calendar_external extends external_api {
'categoryid' => $categoryid,
'includenavigation' => $includenavigation,
'mini' => $mini,
'day' => $day,
]);
$context = \context_user::instance($USER->id);
@@ -1009,7 +1011,7 @@ class core_calendar_external extends external_api {
$type = \core_calendar\type_factory::get_calendar_instance();
$time = $type->convert_to_timestamp($params['year'], $params['month'], 1);
$time = $type->convert_to_timestamp($params['year'], $params['month'], $params['day']);
$calendar = \calendar_information::create($time, $params['courseid'], $params['categoryid']);
self::validate_context($calendar->context);
@@ -1045,6 +1047,7 @@ class core_calendar_external extends external_api {
false,
NULL_ALLOWED
),
'day' => new external_value(PARAM_INT, 'Day to be viewed', VALUE_DEFAULT, 1),
]
);
}
+45 -35
View File
@@ -3016,7 +3016,7 @@ function calendar_get_icalendar($url) {
* Import events from an iCalendar object into a course calendar.
*
* @param iCalendar $ical The iCalendar object.
* @param int $courseid The course ID for the calendar.
* @param int $unused Deprecated
* @param int $subscriptionid The subscription ID.
* @return string A log of the import progress, including errors.
*/
@@ -3066,7 +3066,8 @@ function calendar_import_icalendar_events($ical, $unused = null, $subscriptionid
}
}
if (!empty($subscriptionid)) {
$existing = $DB->get_field('event_subscriptions', 'lastupdated', ['id' => $subscriptionid]);
if (!empty($existing)) {
$eventsuuids = $DB->get_records_menu('event', ['subscriptionid' => $subscriptionid], '', 'id, uuid');
$icaleventscount = count($icaluuids);
@@ -3722,23 +3723,8 @@ function calendar_get_allowed_event_types(int $courseid = null) {
if (!empty($courseid) && $courseid != SITEID) {
$context = \context_course::instance($courseid);
$groups = groups_get_all_groups($courseid);
$types['user'] = has_capability('moodle/calendar:manageownentries', $context);
if (has_capability('moodle/calendar:manageentries', $context)) {
$types['course'] = true;
$types['group'] = (!empty($groups) && has_capability('moodle/site:accessallgroups', $context))
|| array_filter($groups, function($group) use ($USER) {
return groups_is_member($group->id);
});
} else if (has_capability('moodle/calendar:managegroupentries', $context)) {
$types['group'] = (!empty($groups) && has_capability('moodle/site:accessallgroups', $context))
|| array_filter($groups, function($group) use ($USER) {
return groups_is_member($group->id);
});
}
calendar_internal_update_course_and_group_permission($courseid, $context, $types);
}
if (has_capability('moodle/calendar:manageentries', \context_course::instance(SITEID))) {
@@ -3823,23 +3809,7 @@ function calendar_get_allowed_event_types(int $courseid = null) {
context_helper::preload_from_record($coursewithgroup);
$context = context_course::instance($coursewithgroup->id);
if (has_capability('moodle/calendar:manageentries', $context)) {
// The user has access to manage calendar entries for the whole course.
// This includes groups if they have the accessallgroups capability.
$types['course'] = true;
if (has_capability('moodle/site:accessallgroups', $context)) {
// The user also has access to all groups so they can add calendar entries to any group.
// The manageentries capability overrides the managegroupentries capability.
$types['group'] = true;
break;
}
if (empty($types['group']) && has_capability('moodle/calendar:managegroupentries', $context)) {
// The user has the managegroupentries capability.
// If they have access to _any_ group, then they can create calendar entries within that group.
$types['group'] = !empty(groups_get_all_groups($coursewithgroup->id, $USER->id));
}
}
calendar_internal_update_course_and_group_permission($coursewithgroup->id, $context, $types);
// Okay, course and group event types are allowed, no need to keep the loop iteration.
if ($types['course'] == true && $types['group'] == true) {
@@ -3873,3 +3843,43 @@ function calendar_get_allowed_event_types(int $courseid = null) {
return $types;
}
/**
* Given a course id, and context, updates the permission types array to add the 'course' or 'group'
* permission if it is relevant for that course.
*
* For efficiency, if they already have 'course' or 'group' then it skips checks.
*
* Do not call this function directly, it is only for use by calendar_get_allowed_event_types().
*
* @param int $courseid Course id
* @param context $context Context for that course
* @param array $types Current permissions
*/
function calendar_internal_update_course_and_group_permission(int $courseid, context $context, array &$types) {
if (!$types['course']) {
// If they have manageentries permission on the course, then they can update this course.
if (has_capability('moodle/calendar:manageentries', $context)) {
$types['course'] = true;
}
}
// To update group events they must have EITHER manageentries OR managegroupentries.
if (!$types['group'] && (has_capability('moodle/calendar:manageentries', $context) ||
has_capability('moodle/calendar:managegroupentries', $context))) {
// And they also need for a group to exist on the course.
$groups = groups_get_all_groups($courseid);
if (!empty($groups)) {
// And either accessallgroups, or belong to one of the groups.
if (has_capability('moodle/site:accessallgroups', $context)) {
$types['group'] = true;
} else {
foreach ($groups as $group) {
if (groups_is_member($group->id)) {
$types['group'] = true;
break;
}
}
}
}
}
}
+1
View File
@@ -38,6 +38,7 @@
}} data-categoryid="{{categoryid}}"{{!
}} data-month="{{date.mon}}"{{!
}} data-year="{{date.year}}"{{!
}} data-day="{{date.mday}}"{{!
}} data-view="month"{{!
}}>
{{> core/overlay_loading}}
+19 -3
View File
@@ -2372,7 +2372,7 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
$data = external_api::clean_returnvalue(
core_calendar_external::get_calendar_monthly_view_returns(),
core_calendar_external::get_calendar_monthly_view($timestart->format('Y'), $timestart->format('n'),
$course->id, null, false, true)
$course->id, null, false, true, $timestart->format('j'))
);
$this->assertEquals($data['courseid'], $course->id);
// User enrolled in the course can load the course calendar.
@@ -2380,7 +2380,7 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
$data = external_api::clean_returnvalue(
core_calendar_external::get_calendar_monthly_view_returns(),
core_calendar_external::get_calendar_monthly_view($timestart->format('Y'), $timestart->format('n'),
$course->id, null, false, true)
$course->id, null, false, true, $timestart->format('j'))
);
$this->assertEquals($data['courseid'], $course->id);
// User not enrolled in the course cannot load the course calendar.
@@ -2389,10 +2389,26 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
$data = external_api::clean_returnvalue(
core_calendar_external::get_calendar_monthly_view_returns(),
core_calendar_external::get_calendar_monthly_view($timestart->format('Y'), $timestart->format('n'),
$course->id, null, false, false)
$course->id, null, false, false, $timestart->format('j'))
);
}
/**
* Test get_calendar_monthly_view when a day parameter is provided.
*/
public function test_get_calendar_monthly_view_with_day_provided() {
$this->resetAfterTest();
$this->setAdminUser();
$timestart = new DateTime();
$data = external_api::clean_returnvalue(
core_calendar_external::get_calendar_monthly_view_returns(),
core_calendar_external::get_calendar_monthly_view($timestart->format('Y'), $timestart->format('n'),
SITEID, null, false, true, $timestart->format('j'))
);
$this->assertEquals($data['date']['mday'], $timestart->format('d'));
}
/**
* A user should not be able load the calendar day view for a course they cannot access.
*/
+123
View File
@@ -227,6 +227,24 @@ class core_calendar_lib_testcase extends advanced_testcase {
calendar_import_icalendar_events($ical, null, $sub->id);
$count = $DB->count_records('event', array('subscriptionid' => $sub->id));
$this->assertEquals($count, 1);
// Test for ICS file with repeated events.
$subscription = new stdClass();
$subscription->name = 'Repeated events';
$subscription->importfrom = CALENDAR_IMPORT_FROM_FILE;
$subscription->eventtype = 'site';
$id = calendar_add_subscription($subscription);
$calendar = file_get_contents($CFG->dirroot . '/lib/tests/fixtures/repeated_events.ics');
$ical = new iCalendar();
$ical->unserialize($calendar);
$this->assertEquals($ical->parser_errors, []);
$sub = calendar_get_subscription($id);
$output = calendar_import_icalendar_events($ical, null, $sub->id);
$this->assertStringNotContainsString('Events deleted: 17', $output);
$this->assertStringContainsString('Events imported: 1', $output);
$this->assertStringContainsString('Events skipped: 0', $output);
$this->assertStringContainsString('Events updated: 0', $output);
}
/**
@@ -546,6 +564,10 @@ class core_calendar_lib_testcase extends advanced_testcase {
$this->setUser($user);
// In general for all courses, they don't have the ability to add course events yet.
$types = calendar_get_allowed_event_types();
$this->assertFalse($types['course']);
assign_capability('moodle/calendar:manageentries', CAP_ALLOW, $roleid, $context1, true);
assign_capability('moodle/calendar:manageentries', CAP_PROHIBIT, $roleid, $context2, true);
@@ -554,12 +576,20 @@ class core_calendar_lib_testcase extends advanced_testcase {
$types = calendar_get_allowed_event_types($course1->id);
$this->assertTrue($types['course']);
// If calling function without specified course, there is still a course where they have it.
$types = calendar_get_allowed_event_types();
$this->assertTrue($types['course']);
assign_capability('moodle/calendar:manageentries', CAP_PROHIBIT, $roleid, $context1, true);
// The user only now has the correct capability in both course 1 and 2 so we
// expect both to be in the results.
$types = calendar_get_allowed_event_types($course3->id);
$this->assertFalse($types['course']);
// They now do not have permission in any course.
$types = calendar_get_allowed_event_types();
$this->assertFalse($types['course']);
}
public function test_calendar_get_allowed_event_types_group_no_acces_to_diff_groups() {
@@ -582,6 +612,11 @@ class core_calendar_lib_testcase extends advanced_testcase {
$types = calendar_get_allowed_event_types($course->id);
$this->assertTrue($types['course']);
$this->assertFalse($types['group']);
// Same result applies when not providing a specific course as they are only on one course.
$types = calendar_get_allowed_event_types();
$this->assertTrue($types['course']);
$this->assertFalse($types['group']);
}
public function test_calendar_get_allowed_event_types_group_no_groups() {
@@ -598,6 +633,12 @@ class core_calendar_lib_testcase extends advanced_testcase {
// no groups so we shouldn't see a group type.
$types = calendar_get_allowed_event_types($course->id);
$this->assertTrue($types['course']);
$this->assertFalse($types['group']);
// Same result applies when not providing a specific course as they are only on one course.
$types = calendar_get_allowed_event_types();
$this->assertTrue($types['course']);
$this->assertFalse($types['group']);
}
public function test_calendar_get_allowed_event_types_group_access_all_groups() {
@@ -623,7 +664,12 @@ class core_calendar_lib_testcase extends advanced_testcase {
// the accessallgroups capability.
$types = calendar_get_allowed_event_types($course1->id);
$this->assertTrue($types['group']);
// Same result applies when not providing a specific course as they are only on one course.
$types = calendar_get_allowed_event_types();
$this->assertTrue($types['group']);
}
public function test_calendar_get_allowed_event_types_group_no_access_all_groups() {
$generator = $this->getDataGenerator();
$user = $generator->create_user();
@@ -642,10 +688,87 @@ class core_calendar_lib_testcase extends advanced_testcase {
// groups that they are not a member of.
$types = calendar_get_allowed_event_types($course->id);
$this->assertFalse($types['group']);
// Same result applies when not providing a specific course as they are only on one course.
$types = calendar_get_allowed_event_types();
$this->assertFalse($types['group']);
assign_capability('moodle/calendar:manageentries', CAP_ALLOW, $roleid, $context, true);
assign_capability('moodle/site:accessallgroups', CAP_ALLOW, $roleid, $context, true);
$types = calendar_get_allowed_event_types($course->id);
$this->assertTrue($types['group']);
// Same result applies when not providing a specific course as they are only on one course.
$types = calendar_get_allowed_event_types();
$this->assertTrue($types['group']);
}
public function test_calendar_get_allowed_event_types_group_cap_no_groups() {
$generator = $this->getDataGenerator();
$user = $generator->create_user();
$course = $generator->create_course();
$context = context_course::instance($course->id);
$roleid = $generator->create_role();
$group = $generator->create_group(['courseid' => $course->id]);
$generator->enrol_user($user->id, $course->id, 'student');
$generator->role_assign($roleid, $user->id, $context->id);
assign_capability('moodle/calendar:managegroupentries', CAP_ALLOW, $roleid, $context, true);
$this->setUser($user);
$types = calendar_get_allowed_event_types($course->id);
$this->assertFalse($types['course']);
$this->assertFalse($types['group']);
// Check without specifying a course (same result as user only has one course).
$types = calendar_get_allowed_event_types();
$this->assertFalse($types['course']);
$this->assertFalse($types['group']);
}
public function test_calendar_get_allowed_event_types_group_cap_has_group() {
$generator = $this->getDataGenerator();
$user = $generator->create_user();
$course = $generator->create_course();
$context = context_course::instance($course->id);
$roleid = $generator->create_role();
$group = $generator->create_group(['courseid' => $course->id]);
$generator->enrol_user($user->id, $course->id, 'student');
$generator->role_assign($roleid, $user->id, $context->id);
groups_add_member($group, $user);
assign_capability('moodle/calendar:managegroupentries', CAP_ALLOW, $roleid, $context, true);
$this->setUser($user);
$types = calendar_get_allowed_event_types($course->id);
$this->assertFalse($types['course']);
$this->assertTrue($types['group']);
// Check without specifying a course (same result as user only has one course).
$types = calendar_get_allowed_event_types();
$this->assertFalse($types['course']);
$this->assertTrue($types['group']);
}
public function test_calendar_get_allowed_event_types_group_cap_access_all_groups() {
$generator = $this->getDataGenerator();
$user = $generator->create_user();
$course = $generator->create_course();
$context = context_course::instance($course->id);
$roleid = $generator->create_role();
$group = $generator->create_group(['courseid' => $course->id]);
$generator->enrol_user($user->id, $course->id, 'student');
$generator->role_assign($roleid, $user->id, $context->id);
assign_capability('moodle/calendar:managegroupentries', CAP_ALLOW, $roleid, $context, true);
assign_capability('moodle/site:accessallgroups', CAP_ALLOW, $roleid, $context, true);
$this->setUser($user);
$types = calendar_get_allowed_event_types($course->id);
$this->assertFalse($types['course']);
$this->assertTrue($types['group']);
// Check without specifying a course (same result as user only has one course).
$types = calendar_get_allowed_event_types();
$this->assertFalse($types['course']);
$this->assertTrue($types['group']);
}
/**
+2 -2
View File
@@ -2302,7 +2302,7 @@ class core_competency_privacy_testcase extends provider_testcase {
$this->assertEquals('-', $comp['rating']['rating']);
$comp = $data->competencies[2];
$this->assertEquals($comp4->get('shortname'), $comp['name']);
$this->assertNull($comp['rating']['rating']);
$this->assertNull($comp['rating']);
$data = writer::with_context($u1ctx)->get_data(array_merge($path, ["{$p1a->get('name')} ({$p1a->get('id')})",
get_string('commentsubcontext', 'core_comment')]));
$this->assert_exported_comments(['Hello.', 'It\'s me.', 'After all these years...'], $data->comments);
@@ -2320,7 +2320,7 @@ class core_competency_privacy_testcase extends provider_testcase {
$this->assertEquals('C', $comp['rating']['rating']);
$comp = $data->competencies[2];
$this->assertEquals($comp4->get('shortname'), $comp['name']);
$this->assertNull($comp['rating']['rating']);
$this->assertNull($comp['rating']);
// This plan is complete.
$data = writer::with_context($u1ctx)->get_data(array_merge($path, ["{$p1c->get('name')} ({$p1c->get('id')})"]));
Generated
+90 -91
View File
@@ -506,20 +506,21 @@
],
"description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
"homepage": "https://github.com/container-interop/container-interop",
"abandoned": "psr/container",
"time": "2017-02-14T19:40:03+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.2.0",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "a2c590166b2133a4633738648b6b064edae0814a"
"reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
"reference": "a2c590166b2133a4633738648b6b064edae0814a",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
"reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
"shasum": ""
},
"require": {
@@ -562,7 +563,7 @@
"constructor",
"instantiate"
],
"time": "2019-03-17T17:37:11+00:00"
"time": "2019-10-21T16:45:58+00:00"
},
{
"name": "fabpot/goutte",
@@ -870,16 +871,16 @@
},
{
"name": "mikey179/vfsstream",
"version": "v1.6.7",
"version": "v1.6.8",
"source": {
"type": "git",
"url": "https://github.com/bovigo/vfsStream.git",
"reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb"
"reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb",
"reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/231c73783ebb7dd9ec77916c10037eff5a2b6efe",
"reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe",
"shasum": ""
},
"require": {
@@ -912,7 +913,7 @@
],
"description": "Virtual file system to mock the real file system in unit tests.",
"homepage": "http://vfs.bovigo.org/",
"time": "2019-08-01T01:38:37+00:00"
"time": "2019-10-30T15:31:00+00:00"
},
{
"name": "moodlehq/behat-extension",
@@ -1816,16 +1817,16 @@
},
{
"name": "psr/log",
"version": "1.1.1",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2"
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2",
"reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2",
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"shasum": ""
},
"require": {
@@ -1859,7 +1860,7 @@
"psr",
"psr-3"
],
"time": "2019-10-25T08:06:51+00:00"
"time": "2019-11-01T11:05:21+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -2068,16 +2069,16 @@
},
{
"name": "sebastian/environment",
"version": "4.2.2",
"version": "4.2.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404"
"reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
"reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
"reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
"shasum": ""
},
"require": {
@@ -2117,7 +2118,7 @@
"environment",
"hhvm"
],
"time": "2019-05-05T09:05:15+00:00"
"time": "2019-11-20T08:46:58+00:00"
},
{
"name": "sebastian/exporter",
@@ -2469,27 +2470,27 @@
},
{
"name": "symfony/browser-kit",
"version": "v4.3.5",
"version": "v4.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "78b7611c45039e8ce81698be319851529bf040b1"
"reference": "e19e465c055137938afd40cfddd687e7511bbbf0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/78b7611c45039e8ce81698be319851529bf040b1",
"reference": "78b7611c45039e8ce81698be319851529bf040b1",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/e19e465c055137938afd40cfddd687e7511bbbf0",
"reference": "e19e465c055137938afd40cfddd687e7511bbbf0",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/dom-crawler": "~3.4|~4.0"
"symfony/dom-crawler": "^3.4|^4.0|^5.0"
},
"require-dev": {
"symfony/css-selector": "~3.4|~4.0",
"symfony/http-client": "^4.3",
"symfony/mime": "^4.3",
"symfony/process": "~3.4|~4.0"
"symfony/css-selector": "^3.4|^4.0|^5.0",
"symfony/http-client": "^4.3|^5.0",
"symfony/mime": "^4.3|^5.0",
"symfony/process": "^3.4|^4.0|^5.0"
},
"suggest": {
"symfony/process": ""
@@ -2497,7 +2498,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
"dev-master": "4.4-dev"
}
},
"autoload": {
@@ -2524,11 +2525,11 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2019-09-10T11:25:17+00:00"
"time": "2019-10-28T20:30:34+00:00"
},
{
"name": "symfony/class-loader",
"version": "v3.4.32",
"version": "v3.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
@@ -2584,32 +2585,32 @@
},
{
"name": "symfony/config",
"version": "v4.3.5",
"version": "v4.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "0acb26407a9e1a64a275142f0ae5e36436342720"
"reference": "f08e1c48e1f05d07c32f2d8599ed539e62105beb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/0acb26407a9e1a64a275142f0ae5e36436342720",
"reference": "0acb26407a9e1a64a275142f0ae5e36436342720",
"url": "https://api.github.com/repos/symfony/config/zipball/f08e1c48e1f05d07c32f2d8599ed539e62105beb",
"reference": "f08e1c48e1f05d07c32f2d8599ed539e62105beb",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/filesystem": "~3.4|~4.0",
"symfony/filesystem": "^3.4|^4.0|^5.0",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/finder": "<3.4"
},
"require-dev": {
"symfony/dependency-injection": "~3.4|~4.0",
"symfony/event-dispatcher": "~3.4|~4.0",
"symfony/finder": "~3.4|~4.0",
"symfony/messenger": "~4.1",
"symfony/yaml": "~3.4|~4.0"
"symfony/event-dispatcher": "^3.4|^4.0|^5.0",
"symfony/finder": "^3.4|^4.0|^5.0",
"symfony/messenger": "^4.1|^5.0",
"symfony/service-contracts": "^1.1|^2",
"symfony/yaml": "^3.4|^4.0|^5.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
@@ -2617,7 +2618,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
"dev-master": "4.4-dev"
}
},
"autoload": {
@@ -2644,7 +2645,7 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2019-09-19T15:51:53+00:00"
"time": "2019-11-16T15:22:42+00:00"
},
{
"name": "symfony/console",
@@ -2716,7 +2717,7 @@
},
{
"name": "symfony/css-selector",
"version": "v3.4.32",
"version": "v3.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
@@ -2769,16 +2770,16 @@
},
{
"name": "symfony/debug",
"version": "v3.4.32",
"version": "v3.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "b3e7ce815d82196435d16dc458023f8fb6b36ceb"
"reference": "f72e33fdb1170b326e72c3157f0cd456351dd086"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/b3e7ce815d82196435d16dc458023f8fb6b36ceb",
"reference": "b3e7ce815d82196435d16dc458023f8fb6b36ceb",
"url": "https://api.github.com/repos/symfony/debug/zipball/f72e33fdb1170b326e72c3157f0cd456351dd086",
"reference": "f72e33fdb1170b326e72c3157f0cd456351dd086",
"shasum": ""
},
"require": {
@@ -2821,7 +2822,7 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2019-09-19T15:32:51+00:00"
"time": "2019-10-24T15:33:53+00:00"
},
{
"name": "symfony/dependency-injection",
@@ -2895,16 +2896,16 @@
},
{
"name": "symfony/dom-crawler",
"version": "v4.3.5",
"version": "v4.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "e9f7b4d19d69b133bd638eeddcdc757723b4211f"
"reference": "36bbcab9369fc2f583220890efd43bf262d563fd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/e9f7b4d19d69b133bd638eeddcdc757723b4211f",
"reference": "e9f7b4d19d69b133bd638eeddcdc757723b4211f",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/36bbcab9369fc2f583220890efd43bf262d563fd",
"reference": "36bbcab9369fc2f583220890efd43bf262d563fd",
"shasum": ""
},
"require": {
@@ -2917,7 +2918,7 @@
},
"require-dev": {
"masterminds/html5": "^2.6",
"symfony/css-selector": "~3.4|~4.0"
"symfony/css-selector": "^3.4|^4.0|^5.0"
},
"suggest": {
"symfony/css-selector": ""
@@ -2925,7 +2926,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
"dev-master": "4.4-dev"
}
},
"autoload": {
@@ -2952,20 +2953,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2019-09-28T21:25:05+00:00"
"time": "2019-10-29T11:38:30+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v3.4.32",
"version": "v3.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "3e922c4c3430b9de624e8a285dada5e61e230959"
"reference": "f9031c22ec127d4a2450760f81a8677fe8a10177"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3e922c4c3430b9de624e8a285dada5e61e230959",
"reference": "3e922c4c3430b9de624e8a285dada5e61e230959",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f9031c22ec127d4a2450760f81a8677fe8a10177",
"reference": "f9031c22ec127d4a2450760f81a8677fe8a10177",
"shasum": ""
},
"require": {
@@ -3015,20 +3016,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2019-08-23T08:05:57+00:00"
"time": "2019-10-24T15:33:53+00:00"
},
{
"name": "symfony/filesystem",
"version": "v4.3.5",
"version": "v4.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263"
"reference": "d12b01cba60be77b583c9af660007211e3909854"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/9abbb7ef96a51f4d7e69627bc6f63307994e4263",
"reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/d12b01cba60be77b583c9af660007211e3909854",
"reference": "d12b01cba60be77b583c9af660007211e3909854",
"shasum": ""
},
"require": {
@@ -3038,7 +3039,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
"dev-master": "4.4-dev"
}
},
"autoload": {
@@ -3065,20 +3066,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2019-08-20T14:07:54+00:00"
"time": "2019-11-12T14:51:11+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.12.0",
"version": "v1.13.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
"shasum": ""
},
"require": {
@@ -3090,7 +3091,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.12-dev"
"dev-master": "1.13-dev"
}
},
"autoload": {
@@ -3123,20 +3124,20 @@
"polyfill",
"portable"
],
"time": "2019-08-06T08:03:45+00:00"
"time": "2019-11-27T13:56:44+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.12.0",
"version": "v1.13.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17"
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17",
"reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f",
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f",
"shasum": ""
},
"require": {
@@ -3148,7 +3149,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.12-dev"
"dev-master": "1.13-dev"
}
},
"autoload": {
@@ -3182,11 +3183,11 @@
"portable",
"shim"
],
"time": "2019-08-06T08:03:45+00:00"
"time": "2019-11-27T14:18:11+00:00"
},
{
"name": "symfony/process",
"version": "v2.8.50",
"version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
@@ -3395,31 +3396,29 @@
},
{
"name": "webmozart/assert",
"version": "1.5.0",
"version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
"reference": "573381c0a64f155a0d9a23f4b0c797194805b925"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
"url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925",
"reference": "573381c0a64f155a0d9a23f4b0c797194805b925",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"vimeo/psalm": "<3.6.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@@ -3441,7 +3440,7 @@
"check",
"validate"
],
"time": "2019-08-24T08:43:50+00:00"
"time": "2019-11-24T13:36:37+00:00"
}
],
"aliases": [
+1 -1
View File
@@ -543,7 +543,7 @@ $CFG->admin = 'admin';
//
// Location for lock files used by the File locking factory. This must exist
// on a shared file system that supports locking.
// $CFG->lock_file_root = $CFG->dataroot . '/lock';
// $CFG->file_lock_root = $CFG->dataroot . '/lock';
//
//
// Alternative task logging.
+3
View File
@@ -68,5 +68,8 @@ function xmldb_format_topics_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -104,5 +104,8 @@ function xmldb_format_weeks_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
-1
View File
@@ -964,7 +964,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
foreach ($sections[2]['modules'] as $module) {
if ($module['id'] == $urlcm->id and $module['modname'] == 'url') {
$this->assertContains('width=100,height=100', $module['onclick']);
$this->assertContains('moodle.org', $module['customdata']);
$testexecuted = $testexecuted + 1;
}
}
+3 -1
View File
@@ -431,7 +431,9 @@ class api {
$fields = $DB->get_records_sql($sql);
foreach ($fields as $field) {
$inst = field_controller::create(0, $field);
if ($inst->supports_course_grouping()) {
$isvisible = $inst->get_configdata_property('visibility') == \core_course\customfield\course_handler::VISIBLETOALL;
// Only visible fields to everybody supporting course grouping will be displayed.
if ($inst->supports_course_grouping() && $isvisible) {
$ret[$inst->get('shortname')] = $inst->get('name');
}
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_enrol_database_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_enrol_flatfile_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_enrol_guest_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -48,5 +48,8 @@ function xmldb_enrol_imsenterprise_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -69,5 +69,8 @@ function xmldb_enrol_lti_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -1,2 +1,2 @@
define ("enrol_manual/form-potential-user-selector",["jquery","core/ajax","core/templates","core/str"],function(a,b,c,d){return{processResults:function processResults(b,c){var d=[];if(a.isArray(c)){a.each(c,function(a,b){d.push({value:b.id,label:b._label})});return d}else{return c}},transport:function transport(e,f,g,h){var i,j=a(e).attr("courseid"),k=a(e).attr("userfields").split(",");if("undefined"==typeof j){j="1"}var l=a(e).attr("enrolid");if("undefined"==typeof l){l=""}var m=a(e).attr("perpage");if("undefined"==typeof m){m=100}i=b.call([{methodname:"core_enrol_get_potential_users",args:{courseid:j,enrolid:l,search:f,searchanywhere:!0,page:0,perpage:m+1}}]);i[0].then(function(b){var e=[],f=0;if(b.length<=m){a.each(b,function(b,d){var f=d,g=[];a.each(k,function(a,b){if("undefined"!=typeof d[b]&&""!==d[b]){f.hasidentity=!0;g.push(d[b])}});f.identity=g.join(", ");e.push(c.render("enrol_manual/form-user-selector-suggestion",f))});return a.when.apply(a.when,e).then(function(){var c=arguments;a.each(b,function(a,b){b._label=c[f];f++});g(b)})}else{return d.get_string("toomanyuserstoshow","core",">"+m).then(function(a){g(a)})}}).fail(h)}}});
define ("enrol_manual/form-potential-user-selector",["jquery","core/ajax","core/templates","core/str"],function(a,b,c,d){return{processResults:function processResults(b,c){var d=[];if(a.isArray(c)){a.each(c,function(a,b){d.push({value:b.id,label:b._label})});return d}else{return c}},transport:function transport(e,f,g,h){var i,j=a(e).attr("courseid"),k=a(e).attr("userfields").split(",");if("undefined"==typeof j){j="1"}var l=a(e).attr("enrolid");if("undefined"==typeof l){l=""}var m=parseInt(a(e).attr("perpage"));if(isNaN(m)){m=100}i=b.call([{methodname:"core_enrol_get_potential_users",args:{courseid:j,enrolid:l,search:f,searchanywhere:!0,page:0,perpage:m+1}}]);i[0].then(function(b){var e=[],f=0;if(b.length<=m){a.each(b,function(b,d){var f=d,g=[];a.each(k,function(a,b){if("undefined"!=typeof d[b]&&""!==d[b]){f.hasidentity=!0;g.push(d[b])}});f.identity=g.join(", ");e.push(c.render("enrol_manual/form-user-selector-suggestion",f))});return a.when.apply(a.when,e).then(function(){var c=arguments;a.each(b,function(a,b){b._label=c[f];f++});g(b)})}else{return d.get_string("toomanyuserstoshow","core",">"+m).then(function(a){g(a)})}}).fail(h)}}});
//# sourceMappingURL=form-potential-user-selector.min.js.map
File diff suppressed because one or more lines are too long
@@ -54,8 +54,8 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/str'], function($, Ajax,
if (typeof enrolid === "undefined") {
enrolid = '';
}
var perpage = $(selector).attr('perpage');
if (typeof perpage === "undefined") {
var perpage = parseInt($(selector).attr('perpage'));
if (isNaN(perpage)) {
perpage = 100;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_enrol_manual_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+4 -2
View File
@@ -120,10 +120,12 @@ class enrol_meta_plugin extends enrol_plugin {
require_once("$CFG->dirroot/enrol/meta/locallib.php");
// Support creating multiple at once.
if (is_array($fields['customint1'])) {
if (isset($fields['customint1']) && is_array($fields['customint1'])) {
$courses = array_unique($fields['customint1']);
} else {
} else if (isset($fields['customint1'])) {
$courses = array($fields['customint1']);
} else {
$courses = array(null); // Strange? Yes, but that's how it's working or instance is not created ever.
}
foreach ($courses as $courseid) {
if (!empty($fields['customint2']) && $fields['customint2'] == ENROL_META_CREATE_GROUP) {
+3
View File
@@ -42,5 +42,8 @@ function xmldb_enrol_mnet_upgrade($oldversion) {
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
return true;
}

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