Compare commits

...

601 Commits

Author SHA1 Message Date
Jake Dallimore 6a30269d98 Moodle release 3.7.2 2019-09-06 11:50:45 +08:00
Eloy Lafuente (stronk7) e064cef324 weekly release 3.7.1+ 2019-09-05 17:14:43 +02:00
Eloy Lafuente (stronk7) eca36ffd7c Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-09-05 17:14:41 +02:00
Jake Dallimore 5f115af823 Merge branch 'MDL-56223-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-09-05 17:20:28 +08:00
Simey Lameze 474a338a97 MDL-56223 calendar: fix wrong create_calendar_events WS phpdoc 2019-09-05 17:16:06 +08:00
Simey Lameze 7bbc73ce0c MDL-56223 calendar: show the number of deleted events 2019-09-05 17:16:05 +08:00
Simey Lameze cb5145334d MDL-56223 calendar: skip events updating if nothing has changed 2019-09-05 17:16:05 +08:00
Jake Dallimore 5a552ad6f3 Merge branch 'MDL-66551-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-09-05 11:15:16 +08:00
Simey Lameze 5c1115ba0b MDL-66551 core_user: remove orphaned calendar subscriptions 2019-09-05 11:07:47 +08:00
Simey Lameze 7ec6835728 MDL-66551 core_user: delete_user() should remove users calendar subs 2019-09-05 10:52:10 +08:00
Andrew Nicols e567e64d12 Merge branch 'MDL-66391-37' of https://bitbucket.org/isprynt/moodle into MOODLE_37_STABLE 2019-09-05 09:59:28 +08:00
Eloy Lafuente (stronk7) bade4a18e5 Merge branch 'MDL-66072-37-2' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-09-05 02:48:17 +02:00
Eloy Lafuente (stronk7) 49ab08f771 Merge branch 'MDL-66560-37' of https://github.com/lucaboesch/moodle into MOODLE_37_STABLE 2019-09-05 02:17:37 +02:00
AMOS bot 3923a219bd Automatically generated installer lang files 2019-09-05 00:11:58 +00:00
Segun Babalola 750ec445bd MDL-66391 core_course: Fix to send correct Ajax parameter for userid 2019-09-04 12:26:11 +01:00
Andrew Nicols 1dfd080f54 Merge branch 'MDL-66137-37_mod_assign_marking_workflow_incorrect_grade_display' of https://github.com/tomdickman/moodle into MOODLE_37_STABLE 2019-09-04 13:47:50 +08:00
Tom Dickman 3c239a6a11 MDL-66137 mod_assign: fixed marking workflow incorrect grade display
Aligned logic between quick grading changes and set marking workflow state changes to accurately
finalise or remove final grade from the gradebook, depending on the marking workflow state if
being used.
2019-09-04 15:23:09 +10:00
Andrew Nicols 4da24e858c Merge branch 'MDL-66554-37' of git://github.com/jleyva/moodle into MOODLE_37_STABLE 2019-09-04 12:39:29 +08:00
Andrew Nicols 4d4a8423b0 Merge branch 'MDL-66500-37-unoconvwarning' of git://github.com/mudrd8mz/moodle into MOODLE_37_STABLE 2019-09-04 12:14:23 +08:00
Ryan Wyllie b937159eed MDL-62284 javascript: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:23:35 +08:00
Ryan Wyllie 0c4d9eff86 MDL-62284 output: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:23:35 +08:00
Jake Dallimore 25f23432f3 Merge branch 'MDL-66265-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-09-04 11:06:42 +08:00
Andrew Nicols 3a0efca438 MDL-66265 javascript: More specific overrides in eslintrc 2019-09-04 10:48:57 +08:00
Eloy Lafuente (stronk7) 1124ceea9a Merge branch 'MDL-66265-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-09-04 02:12:52 +02:00
AMOS bot e5cddc8c7e Automatically generated installer lang files 2019-09-04 00:11:10 +00:00
Eloy Lafuente (stronk7) 1f6ca1e497 Merge branch 'MDL-66532-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-09-04 02:01:15 +02:00
Peter 332da1d527 MDL-66072 core: Remove ancillary sharing functions and code 2019-09-04 07:34:06 +08:00
Peter 645beae25f MDL-66072 core: Remove course sharing and related capabilities 2019-09-04 07:33:33 +08:00
Andrew Nicols 1831e2b2fc MDL-66265 javascript: Add jshint ignore for ES6 files in root dir 2019-09-04 06:52:07 +08:00
Andrew Nicols ca88210f3f MDL-66265 javascript: Add basic jshint ignores 2019-09-04 06:50:55 +08:00
Andrew Nicols 05582654f2 MDL-66265 javascript: Bump jshint version 2019-09-04 06:50:55 +08:00
Andrew Nicols c5f693dede MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:50:55 +08:00
Andrew Nicols 7f9d364fd2 MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:45:51 +08:00
Eloy Lafuente (stronk7) b1f0f049d0 Merge branch 'MDL-63315-m37' of https://github.com/sammarshallou/moodle into MOODLE_37_STABLE 2019-09-04 00:15:07 +02:00
Eloy Lafuente (stronk7) 0ac06b7216 Merge branch 'MDL-66120-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-09-03 12:13:36 +02:00
Andrew Nicols 499dfeff2a Merge branch 'MDL-66434-37' of https://github.com/lucaboesch/moodle into MOODLE_37_STABLE 2019-09-03 12:41:11 +08:00
Andrew Nicols 59d7f7f2cb Merge branch 'MDL-62161-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-09-03 11:50:17 +08:00
Andrew Nicols 57e38ad969 Merge branch 'MDL-65042-37' of git://github.com/jleyva/moodle into MOODLE_37_STABLE 2019-09-03 09:29:24 +08:00
AMOS bot 54a8fef92f Automatically generated installer lang files 2019-09-03 00:11:33 +00:00
Eloy Lafuente (stronk7) cdbe521e62 Merge branch 'MDL-66457-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-09-03 00:54:54 +02:00
sam marshall 8571a061e7 MDL-63315 DB: Postgres - Clear cursors in persistent connection
If there is a PHP fatal error and destructors do not run (this can
happen in out-of-memory errors, and maybe if there is an error in a
previous destructor) then Postgres cursors may be left open.

Usually this does not cause a problem because the connection is
closed anyway, but if using persistent connections, a future
request may reuse the connection with a cursor open. It then gets
errors when it tries to create a new cursor with the same name.

This change closes all cursors at the start of a persistent
connection.
2019-09-02 14:10:05 +01:00
Peter 19069c7f28 MDL-66120 block_community: Disable community block and related caps
Disable community block access
2019-09-02 15:51:52 +08:00
Juan Leyva 18b42d9835 MDL-66501 tool_mobile: Prevent URLs in custom scheme 2019-09-02 15:29:27 +08:00
Jun Pataleta ebd3da32b5 MDL-66187 format_singleactivity: Make sure available types is not empty 2019-09-02 05:07:37 +02:00
Andrew Nicols b70e27f531 MDL-66187 course: Respect :addinstance in single activity format 2019-09-02 05:07:37 +02:00
Simey Lameze bd7217b3d8 MDL-65749 lib: fix phpmailer file handling 2019-09-02 05:07:37 +02:00
Andrew Nicols d99d036b44 MDL-66181 course: Only assign roles that the user is allowed to assign 2019-09-02 05:07:37 +02:00
Andrew Nicols 858f188c0f MDL-66181 behat: You check checkboxes, not click them 2019-09-02 05:07:37 +02:00
Michael Hawkins d31f12bcbd MDL-55451 mod_forum: Limit subscription redirect to internal URLs 2019-09-02 05:07:37 +02:00
David Monllaó b7f8d08706 MDL-66069 mlbackend_python: Bump to a new version of the package 2019-09-02 05:07:37 +02:00
Andrew Nicols ee4a93267f Merge branch 'MDL-66472-37' of https://github.com/Dagefoerde/moodle into MOODLE_37_STABLE 2019-09-02 11:03:00 +08:00
Andrew Nicols da7d965e01 Merge branch 'MDL-33087-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-09-02 10:48:05 +08:00
David Mudrák 5e52542b1e MDL-66504 lang: Use the new strings in the Behat scenario 2019-09-01 12:34:53 +02:00
Helen Foster 767b4df9c3 MDL-66504 lang: Import fixed English strings (en_fix)
Significant string changes:

- mobilenotificationsdisabledwarning,tool_mobile - location corrected
- statsreport14,core - 'views/posts' corrected to 'posts/views'
- err_nousers,core_completion - explanation of who completion
- information is displayed for errorcourselisting,block_community - note
  about sunsetting moodle.net
2019-09-01 12:34:25 +02:00
Paul Holden 10539bfad8 MDL-62161 user: preserve all selected users between searches. 2019-08-30 14:37:20 +01:00
Paul Holden 69f5ad8f36 MDL-33087 tool_capability: correct role override link. 2019-08-30 14:34:34 +01:00
Luca Bösch 8d650c02c4 MDL-66560 import: Format course search UI elements. 2019-08-30 11:32:16 +02:00
Andrew Nicols e971f11251 MDL-66457 behat: simplify selector search 2019-08-30 15:13:07 +08:00
Luca Bösch 1ca2f014bb MDL-66434 mod_data: Align 'Field description' field as all other fields. 2019-08-30 07:57:30 +02:00
Jake Dallimore f3c2624fbc weekly release 3.7.1+ 2019-08-30 13:12:12 +08:00
Jake Dallimore 543191e0dc Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-08-30 13:12:11 +08:00
Juan Leyva ecf1a221dc MDL-66554 mod_scorm: Set module viewed in WS 2019-08-29 20:46:11 +01:00
Jake Dallimore 2a1ef8b3a7 Merge branch 'MDL-66139_37' of https://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-08-29 11:51:42 +08:00
Netica Informática 77399dd147 MDL-66139 cachestore_redis: Fix connection problems when port is not set
Due to some changes in Redis 5 php extension Moodle fails to connect via TCP when
no port is set. It's fixed upstream in phpredis repo (version 5.0.0, 5.0.1 and
5.0.2 affected so far), but with this patch we'll send the right port anyway.
2019-08-28 20:58:46 +02:00
Eloy Lafuente (stronk7) 48aad65284 Merge branch 'MOODLE_37_STABLE_MDL-65116' of https://github.com/yao9394/moodle into MOODLE_37_STABLE 2019-08-28 16:40:08 +02:00
Adrian Greeve a5eac2bf95 Merge branch 'MDL-66230-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-08-28 14:55:55 +08:00
Pau Ferrer Ocaña 15ebf11b5e MDL-66458 forum: Fix noviewdiscussionspermission string 2019-08-28 11:27:01 +08:00
Adrian Greeve f0c559d33b Merge branch 'MDL-66461-37' of git://github.com/jleyva/moodle into MOODLE_37_STABLE 2019-08-28 11:17:09 +08:00
Adrian Greeve 8da3995f30 Merge branch 'MDL-66468-37' of git://github.com/jleyva/moodle into MOODLE_37_STABLE 2019-08-28 08:56:30 +08:00
AMOS bot 903f4721c9 Automatically generated installer lang files 2019-08-28 00:10:47 +00:00
Adrian Greeve 810e115d6f Merge branch 'MDL-65653-37' of git://github.com/jleyva/moodle into MOODLE_37_STABLE 2019-08-27 15:09:07 +08:00
Eloy Lafuente (stronk7) 3b7968954c MDL-66184 core: Update composer to apply for php 7.1.0 as min
With behat extension v3.37.2 we started requiring php 7.1.0
(same requirement than core 3.7.x). This bumps all the components
in the lock file to suit that requirement.

Generated with php 7.1.x.
2019-08-27 00:37:45 +02:00
David Mudrák 15847cecbf MDL-66500 lang: Do not mark unoconvwarning as deprecated
It has been deprecated by mistake.
2019-08-26 21:29:16 +02:00
Eloy Lafuente (stronk7) 4e41fc8b18 Merge branch 'MDL-66309-m37' of https://github.com/sammarshallou/moodle into MOODLE_37_STABLE 2019-08-26 20:23:13 +02:00
Eloy Lafuente (stronk7) c4e65af6f3 Merge branch 'MDL-66312-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-08-26 19:40:27 +02:00
Jan Dageförde 5ab6beeb50 MDL-66472 forms: Fix regression autocomplete not closing 2019-08-26 17:58:05 +02:00
Eloy Lafuente (stronk7) 684d142401 weekly release 3.7.1+ 2019-08-23 19:16:34 +02:00
Jun Pataleta 78d57d0ae7 Merge branch 'MDL-66483_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-08-23 20:15:16 +08:00
sam marshall df8633b8d0 MDL-66309 block_recentlyaccesseditems: Improve upgrade performance 2019-08-23 11:35:35 +01:00
Eloy Lafuente (stronk7) a22c821033 MDL-66483 lib: remove recent xmlize dep on setuplib/CFG
This removes the dependency added by MDL-66110 (aiming to fix
a CI job). So we keep things as they were and will fix the
CI job separately.
2019-08-23 11:30:50 +02:00
Adrian Greeve e3bd18d3d7 weekly release 3.7.1+ 2019-08-23 12:55:36 +08:00
Adrian Greeve 9856202e71 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-08-23 12:55:28 +08:00
John Yao c5892e5e37 MDL-65116 mod_assign : Assignment due date does not update for groups
This commit fixes the assignment due date not showing correctly according to groups selected by users who can view grades
2019-08-23 13:11:36 +10:00
Jun Pataleta 9c0aa6e6d0 Merge branch 'MDL-66110-37-fix' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-08-23 10:21:25 +08:00
Jun Pataleta 97a6abc12f MDL-66110 core: Require setuplib.php once as it's required by xmlize.php 2019-08-23 10:16:08 +08:00
Juan Leyva 7cea622409 MDL-66468 file: Return text content when using IGNORE_FILE_MERGE 2019-08-22 13:11:58 +01:00
Jun Pataleta 085d6e79e1 Merge branch 'MDL-66110-37-fix' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-08-22 16:26:07 +08:00
Jun Pataleta ddc3699107 MDL-66110 dml: Undo table name fix when table name's used as parameter 2019-08-22 16:17:55 +08:00
Ryan Wyllie a0d8aefacf MDL-66110 dml: use fix_table_name for all mysql table names
Changed all of the places that were manually prefixing the table
name to instead fix the table name with the fix_table_name
function.
2019-08-22 16:17:55 +08:00
Adrian Greeve 3017d2bab8 Merge branch 'MDL-66378-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-08-22 09:29:33 +08:00
Andrew Nicols 93c5807711 MDL-66378 behat: Increase window size for rubric tests 2019-08-22 07:55:59 +08:00
Andrew Nicols 5bc2cb3c0e MDL-66378 behat: Change screen size to small to work around UI bugs 2019-08-22 07:55:59 +08:00
Jun Pataleta caca47f50a Merge branch 'MDL-66336_37_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_37_STABLE 2019-08-21 22:41:30 +08:00
Juan Leyva cf24975d2e MDL-66461 forum: Use correct component for forum strings 2019-08-21 13:22:08 +01:00
Juan Leyva da048e60db MDL-66461 forum: Use correct notification class 2019-08-21 13:22:08 +01:00
Jun Pataleta fc0bb48542 Merge branch 'MDL-66241_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-08-21 19:51:56 +08:00
Jun Pataleta 9234d79fd1 Merge branch 'MDL-66210_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-08-21 19:48:00 +08:00
Jun Pataleta 7971d7270c Merge branch 'MDL-65993_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-08-21 19:31:54 +08:00
Adrian Greeve 5ca6cce026 Merge branch 'MDL-65443-m37' of https://github.com/NeillM/moodle into MOODLE_37_STABLE 2019-08-21 16:38:49 +08:00
Neill Magill 8b0bf17160 MDL-65443 core: Improve class descriptions for locking events 2019-08-21 09:03:25 +01:00
Jun Pataleta e65777fd22 Merge branch 'MDL-66110-37' of https://github.com/ryanwyllie/moodle into MOODLE_37_STABLE 2019-08-21 09:57:33 +08:00
Adrian Greeve f6735cb3e0 Merge branch 'MDL-66378-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-08-21 09:01:21 +08:00
Andrew Nicols 3c3a806f6b MDL-66378 behat: Correct grammar of resize step 2019-08-21 08:39:51 +08:00
Andrew Nicols bf52d11f1e MDL-66378 grade: Set window size to large for rubric tests 2019-08-21 08:39:28 +08:00
Andrew Nicols 1a11bf4706 MDL-66378 behat: All args are required for document.evaluate 2019-08-21 08:24:08 +08:00
AMOS bot da428650cd Automatically generated installer lang files 2019-08-21 00:11:16 +00:00
Adrian Greeve de186ff27f Merge branch 'MDL-65972-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-08-20 16:51:13 +08:00
Neill Magill 3aa7b0df78 MDL-65443 core: Log when a context is locked or unlocked 2019-08-20 08:57:04 +01:00
Jun Pataleta d329ada4b9 Merge branch 'MDL-64437-37' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-08-20 14:19:27 +08:00
Adrian Greeve 77d0435c3e Merge branch 'MDL-66378-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-08-20 14:07:42 +08:00
Jun Pataleta d64f8235fe Merge branch 'MDL-65507-37' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-08-20 11:57:20 +08:00
Adrian Greeve 3ebe724736 Merge branch 'MDL-65083-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-08-20 10:04:56 +08:00
Adrian Greeve 4f41f8407d Merge branch 'MDL-65561-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-08-20 09:37:18 +08:00
AMOS bot a95b434f3e Automatically generated installer lang files 2019-08-20 00:10:43 +00:00
Adrian Greeve 827473833d Merge branch 'MDL-65604-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-08-19 16:28:04 +08:00
Bas Brands 84720307c3 MDL-65972 course: add a bigger margin above the activity navigation
* this will help making it easier to distinguish between form and
activity navigation
2019-08-19 08:29:01 +02:00
Bas Brands d70fb8fefe MDL-65561 themes: user date filters display fixes 2019-08-19 08:24:38 +02:00
Bas Brands 559b686e5b MDL-65083 theme_boost: update uses of pull-xs-right 2019-08-19 08:19:49 +02:00
Adrian Greeve dda635074d Merge branch 'MDL-65886-MOODLE-37' of https://github.com/kristian-94/moodle into MOODLE_37_STABLE 2019-08-19 14:18:29 +08:00
Mihail Geshoski 0ada61fdcf MDL-64437 assignment: Fix element overlaping in low screen resolution 2019-08-19 13:31:29 +08:00
Mihail Geshoski dbc5a45cc6 MDL-65507 mod_data: Remove unnecessary record created event 2019-08-19 13:27:14 +08:00
Andrew Nicols 8356ee9462 MDL-66378 competency: Add pending promises to competency chooser 2019-08-19 08:16:41 +08:00
Andrew Nicols 710ec0e546 MDL-66378 behat: JS does not work with newlines in an xpath 2019-08-19 08:16:40 +08:00
Andrew Nicols 3c3f5965d3 MDL-66378 behat: Fix use of before/after selectors 2019-08-19 08:16:40 +08:00
Andrew Nicols 6f2760071c MDL-66378 behat: Backport expand autocomplete step 2019-08-17 16:19:48 +08:00
Andrew Nicols 9c3d4683a4 MDL-66378 behat: Add partial named selector for whole autocomplete field 2019-08-17 11:44:48 +08:00
Andrew Nicols dcb7cfd384 MDL-66378 behat: Before/after detection should be constrainable
The default before/after detection checks the entire body. Any match of
the text will therefore be found.

Add support for specification of a container for the nodes.
2019-08-17 11:44:48 +08:00
Andrew Nicols 0fbabd85c6 MDL-66378 behat: Add non-JS fallback for before/after 2019-08-17 11:44:48 +08:00
sam marshall 96482ded5e MDL-66378 Behat: Speed up 'before/after' step in Chrome
On some Chrome versions the xpath used for before/after is slow
and (sometimes) uses a lot of memory. This change uses pure
JavaScript to do the before/after calculation, which should always
be fast.
2019-08-17 11:44:48 +08:00
Andrew Nicols 1cb4d36126 MDL-66378 behat: Correct invalid uses of selection from dropdown 2019-08-17 11:44:48 +08:00
Andrew Nicols 7ae0f78bf2 MDL-66378 report_participation: Correct label for target 2019-08-17 11:44:48 +08:00
Andrew Nicols f214adb270 MDL-66378 gradereport_singleview: Add missing label for dropdown 2019-08-17 11:44:48 +08:00
Juan Leyva 613e3038f8 MDL-65042 rating: Fix incorrect image generated for user in rating 2019-08-16 15:41:44 +01:00
Mark Johnson 7f45491d4d MDL-66336 courses: Show an error when no course categories are visible 2019-08-16 08:25:42 +01:00
Kristian Ringer 2f39bfc7d8 MDL-65886 assign: Reset numfiles to 0 when removing a file submission 2019-08-16 15:03:59 +10:00
Andrew Nicols 09979fde33 MDL-66378 behat: Update screen sizes to Y2K standards 2019-08-16 11:43:57 +08:00
Andrew Nicols 4fbeed480a MDL-66378 behat: Update dependencies for chrome webdriver fix 2019-08-16 11:43:01 +08:00
Andrew Nicols 39f22c5f7d MDL-66312 js: Autocomplete promises were inside out
The pending promise should nott be resolved until the changes are
complete.
Previously the resolution of the pendingPromise was triggering the other
changes.
2019-08-16 11:40:15 +08:00
Andrew Nicols 5a0c850e50 weekly release 3.7.1+ 2019-08-16 11:07:05 +08:00
Andrew Nicols a408e168cc Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-08-16 11:07:02 +08:00
Juan Leyva bb5b12d936 MDL-65653 book: Display hidden chapters in the structure content 2019-08-15 14:02:30 +01:00
Mihail Geshoski 091faeeb09 MDL-65653 book: Update unit tests 2019-08-15 14:02:30 +01:00
Mihail Geshoski 6c00f683db MDL-65653 book: Display hidden chapters in WS when user has capability 2019-08-15 14:02:30 +01:00
Andrew Nicols 30f719c44c Merge branch 'MDL-35939-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-08-15 12:03:48 +08:00
Jun Pataleta 1893b39bfc Merge branch 'm37_MDL-66140_Mitigate_PECL_Solr_issue_Ref_72740' of https://github.com/scara/moodle into MOODLE_37_STABLE 2019-08-15 11:17:40 +08:00
Shamim Rezaie 102579cf75 MDL-35939 mod_quiz: use descriptive titles for pages 2019-08-15 12:23:03 +10:00
Shamim Rezaie 38629d7f32 MDL-35939 mod_quiz: phpdoc fix 2019-08-15 12:23:03 +10:00
Shamim Rezaie df5bca4acc MDL-35939 mod_quiz: new functions to generate title for attempt pages 2019-08-15 12:22:58 +10:00
AMOS bot 7db7c8e953 Automatically generated installer lang files 2019-08-15 00:12:53 +00:00
Jun Pataleta a77c92bb9c Merge branch 'MDL-65925-grade-page-broken-for-deleted-submission-MOODLE_37_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_37_STABLE 2019-08-14 15:28:01 +08:00
David Monllaó 2850311ace MDL-66210 analytics: Unit test for reuseprevanalysed 2019-08-14 14:31:59 +08:00
David Monllaó 8e09ae50b0 MDL-66210 analytics: Update references to ->options 2019-08-14 14:31:59 +08:00
David Monllaó 6ac4aa49aa MDL-65993 analytics: Fix --filter option for by_course models 2019-08-14 14:30:25 +08:00
David Monllaó a639cddc39 MDL-66241 analytics: Verify that activities_due works on at-risk 2019-08-14 14:29:20 +08:00
David Monllaó 4f910adaea MDL-66241 analytics: activities_due compatible with at-risk models 2019-08-14 14:29:20 +08:00
Andrew Nicols 9cb87ef480 Merge branch 'patch-2' of https://github.com/aspark21/moodle into MOODLE_37_STABLE 2019-08-14 11:37:09 +08:00
Adrian Greeve 7cdba7e644 Merge branch 'MDL-52849-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-08-14 09:07:24 +08:00
Jun Pataleta 5e0c8cfd32 Merge branch 'MDL-62034-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-08-13 14:20:35 +08:00
Andrew Nicols 0566565254 MDL-62034 assign: Add hint for user tour reset 2019-08-13 14:12:56 +08:00
Ryan Wyllie 5068a6ccef MDL-66110 dml: Fix MySQL v8 compatibility with groups table
MySQL v8 has added "groups" to the reserved word list. That is used
as a table name in Moodle so we have to quote it with backticks in the
SQL so that MySQL knows it's being used as an identifier.
2019-08-13 11:15:38 +08:00
Jun Pataleta c98cd8ccc8 Merge branch 'MDL-66104_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-08-12 14:51:52 +08:00
Peter 21010ab799 MDL-52849 core: Focus reader onto popup with ajax errors 2019-08-12 10:52:31 +08:00
Ilya Tregubov 91c036db6f MDL-65925 assign: Grade page broken if submission was deleted. 2019-08-12 09:28:12 +10:00
Matteo Scaramuccia e3d9c87993 MDL-66140 search: Mitigate PECL solr extension regression
Refs:
- https://bugs.php.net/bug.php?id=72740
- https://bugs.php.net/bug.php?id=75631
- https://github.com/php/pecl-search_engine-solr/pull/16
2019-08-11 20:06:01 +02:00
Andrew Nicols 02afdd58e8 MDL-65604 repository: Kill off missing param errors
The file picker template included an img with a src of "#". When the
template was loaded into the modal, the browser fetches the img src, but
it's immediately removed as that section is only used as an in-place
template. The src tag does not need to be present.
2019-08-11 14:52:55 +08:00
AMOS bot 59d22708dc Automatically generated installer lang files 2019-08-10 00:11:18 +00:00
Jun Pataleta 79bd60bff7 weekly release 3.7.1+ 2019-08-09 16:24:07 +08:00
Jun Pataleta 03667bad20 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-08-09 16:24:05 +08:00
Jun Pataleta d92b3f2abb Merge branch 'MDL-65679-37-fix' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-08-09 11:39:24 +08:00
Andrew Nicols d798b75928 MDL-65679 assignfeedback_editpdf: Adjust z-indexes for editpdf 2019-08-09 08:34:15 +08:00
Victor Deniz Falcon 1e364a4f9a MDL-66272 core_renderer: fix favicon method PHPDoc 2019-08-08 12:44:55 +08:00
Amaia Anabitarte f3732b7838 MDL-60636 behat: Fixing modified xpath 2019-08-08 11:58:10 +08:00
Andrew Nicols 5d85b4a272 Merge branch 'MDL-65595-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-08-08 10:28:30 +08:00
Jun Pataleta 12bd0d77d1 Merge branch 'MDL-57239_37' of https://github.com/timhunt/moodle into MOODLE_37_STABLE 2019-08-08 08:48:55 +08:00
Andrew Nicols 01f6eaed9b Merge branch 'MDL-66039-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-08-07 15:32:54 +08:00
Jun Pataleta 87fa24daaf Merge branch 'MDL-56789-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-08-07 14:01:25 +08:00
Shamim Rezaie db51a593bb MDL-56789 core: Improve unit tests 2019-08-07 15:32:34 +10:00
Shamim Rezaie 3ba7f31c15 MDL-56789 core: Recycle bin warn only if a grade item is being deleted 2019-08-07 15:30:05 +10:00
Sara Arjona 2666fb1069 Merge branch 'MDL-63198-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-08-07 11:08:01 +08:00
Sara Arjona d3ca2c25e5 Merge branch 'MDL-60636-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-08-07 10:00:55 +08:00
Alistair Spark 4b530e5af8 MDL-66071 user: username is required with non-internal auth method 2019-08-07 01:01:27 +02:00
Sara Arjona e3bf98b8ed Merge branch 'MDL-64598-37' of https://github.com/lucaboesch/moodle into MOODLE_37_STABLE 2019-08-06 15:30:08 +08:00
Sara Arjona c316d854e9 Merge branch 'MDL-65786-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-08-06 14:19:33 +08:00
Andrew Nicols ea72ffc95c Merge branch 'MDL-65679-37' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-08-06 13:17:57 +08:00
Andrew Nicols b0d81fce7b Merge branch 'MDL-65651-37' of https://github.com/lucaboesch/moodle into MOODLE_37_STABLE 2019-08-06 11:58:20 +08:00
Andrew Nicols 2fb82c256c Merge branch 'MDL-65992-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-08-06 09:13:36 +08:00
Eloy Lafuente (stronk7) d62afa7ae7 Merge branch 'MDL-64757-37_core_output_nested_template_block_string_language' of https://github.com/tomdickman/moodle into MOODLE_37_STABLE 2019-08-05 13:15:08 +02:00
Andrew Nicols 2bf3ee078b Merge branch 'MDL-33884_37' of https://github.com/timhunt/moodle into MOODLE_37_STABLE 2019-08-05 14:33:55 +08:00
Sara Arjona b0781430e4 Merge branch 'MDL-66281-37' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-08-05 13:41:16 +08:00
Andrew Nicols 87eb1e7205 Merge branch 'MDL-66279-37' of git://git.cameron1729.xyz/moodle into MOODLE_37_STABLE 2019-08-05 11:51:35 +08:00
Shamim Rezaie ff03600ad0 MDL-63198 forms: click on scrollbar should not close the suggestions box 2019-08-05 13:16:41 +10:00
Tim Hunt 8d4f41b473 MDL-57239 qbehaviour_interactive: fix Try again button when reviewing 2019-08-02 11:46:17 +01:00
Luca Bösch ee5b530ae6 MDL-65651 forum: Middle align last post column entries. 2019-08-02 12:01:49 +02:00
Luca Bösch 0853ab5730 MDL-64598 pix: Adding width/height information to emoji SVG images. 2019-08-02 11:54:59 +02:00
AMOS bot 23e8249b36 Automatically generated installer lang files 2019-08-02 00:11:23 +00:00
AMOS bot 3876b68dd0 Automatically generated installer lang files 2019-08-02 00:11:23 +00:00
Mihail Geshoski 4935c347cf MDL-65679 assign: Collapsing comments
The comments should appear above everything else when expanded, and expanding/collapsing comments
should not affect the position of anything else in the page.

All credit goes to Damyon Wiese.
2019-08-02 07:39:03 +08:00
Eloy Lafuente (stronk7) cd1a80769f MDL-66104 output: HTMLPurifier to allow <nolink> tags everywhere
Before the patch, HTMLPurifier was instructed to handle <nolink>
tags in block mode. That implies that any block tag enclosing it
had to be closed for HTML compliance.

But <noscript> tags are not part of the final output (they are
removed) but just internally used to skip filtering certain areas.

So they can be virtually everywhere, HTMLPurifier just should allow
them without any change, both to parent or children tags.
2019-08-01 17:52:57 +02:00
Eloy Lafuente (stronk7) 0f13016a50 weekly release 3.7.1+ 2019-08-01 17:07:09 +02:00
Eloy Lafuente (stronk7) 141d8cbe64 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-08-01 17:07:06 +02:00
Shamim Rezaie ec564a7b32 MDL-56789 core: Added unit test for course_modules_pending_deletion 2019-08-01 18:58:28 +10:00
Sara Arjona 90528c757d Merge branch 'MDL-42451-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-08-01 09:53:28 +08:00
Eloy Lafuente (stronk7) c76f2e8095 Merge branch 'MDL-50472-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-08-01 00:28:40 +02:00
Eloy Lafuente (stronk7) 4999558ed4 Merge branch 'MDL-57342-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-07-31 18:52:37 +02:00
Tim Hunt 0101cefdca MDL-33884 question export: raise memory limit
Question exports can be quite big, just like imports can. Therefore, we
should raise memory limits in the same way.

(Of course, eventually we should change the API, so that it writes one
questoin at a time, rather than building the whole export file contents
in RAM first, but that would be a much bigger change, and we need a
quick fix now.)
2019-07-31 16:35:36 +01:00
Mathew May 0a39c68105 MDL-65992 travis: Migrate to Xenial distro and default MySQL service 2019-07-31 13:02:19 +08:00
Jun Pataleta 5f9afeb734 Merge branch 'MDL-65831-37' of git://github.com/aanabit/moodle into MOODLE_37_STABLE 2019-07-31 10:55:49 +08:00
Amaia Anabitarte a193f2a1e3 MDL-65831 behat: New steps to switch offline mode for moodle app behats 2019-07-31 10:44:57 +08:00
Peter 148d163013 MDL-65595 core: Remove the nowrap from the form's radio template 2019-07-31 08:15:35 +08:00
AMOS bot c8c11974f2 Automatically generated installer lang files 2019-07-31 00:09:15 +00:00
Paul Holden ecc9069384 MDL-66230 tool_usertours: account for deleted tours in privacy export. 2019-07-30 09:56:48 +01:00
Cameron Ball 0960745ecb MDL-66279 task: Test if logger is_a database_logger 2019-07-30 14:52:35 +08:00
Jun Pataleta c5437625e1 MDL-66281 tool_dataprivacy: Set sensitive data processing default value 2019-07-30 13:59:14 +08:00
Sara Arjona 941b5cc782 Merge branch 'MDL-63458_37' of https://github.com/rlorenzo/moodle into MOODLE_37_STABLE 2019-07-30 11:59:28 +08:00
Adrian Greeve 02bcfb3631 Merge branch 'MDL-66174-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-07-29 14:40:02 +08:00
Mathew May a02b319727 MDL-42451 installation: Allow enter key to proceed 2019-07-29 10:58:49 +08:00
Mathew May 328f918372 MDL-50472 auth: Add maintenance message to the login page. 2019-07-29 10:48:54 +08:00
Jake Dallimore 2f980fec47 Merge branch 'MDL-65219-37' of https://github.com/ryanwyllie/moodle into MOODLE_37_STABLE 2019-07-26 15:21:15 +08:00
Tom Dickman ad5c8a8954 MDL-64757 core_output: fixed incorrect string language mustache blocks
Mustache blocks nested in parent templates were incorrectly rendering the default language Moodle.
This fix correctly passes the current language preference to all nested mustache templates such as blocks
which are children of another template.
2019-07-26 16:02:59 +10:00
Jake Dallimore ebe574ff58 Merge branch 'MDL-65918-37' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-07-26 10:57:48 +08:00
Eloy Lafuente (stronk7) 1a89704b05 weekly release 3.7.1+ 2019-07-25 13:45:00 +02:00
Jake Dallimore f082899085 Merge branch 'MDL-65858_37' of git://github.com/markn86/moodle into MOODLE_37_STABLE 2019-07-24 14:31:06 +08:00
Adrian Greeve 0fbdc6705a Merge branch 'MDL-65078-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-07-24 09:52:18 +08:00
Mathew May f4da3acc61 MDL-57342 admin: confightml will check if returned data is empty 2019-07-23 13:31:58 +08:00
Jun Pataleta ef24084985 MDL-65918 auth_oauth2: Require profile library once
Thanks to Jason Grimes for the bug report and fix suggestion!
2019-07-23 10:11:59 +08:00
Adrian Greeve 8b44b91c15 Merge branch 'MDL-66021-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-07-23 09:13:45 +08:00
Eloy Lafuente (stronk7) bfdc0244a1 Merge branch 'MDL-65788-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-07-22 21:34:12 +02:00
Eloy Lafuente (stronk7) f7ade2220a Merge branch 'MDL-66132-m37' of https://github.com/sammarshallou/moodle into MOODLE_37_STABLE 2019-07-22 20:56:11 +02:00
Adrian Greeve 5aa0106bc1 Merge branch 'MDL-66136-37' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-07-22 10:42:01 +08:00
Eloy Lafuente (stronk7) 2b4ff27983 Merge branch 'MDL-50733_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-07-20 00:24:45 +02:00
Mathew May 78ade565c6 MDL-50733 core: Update composer to updated behat-extension 2019-07-19 16:13:51 +02:00
Eloy Lafuente (stronk7) e222b1ed8d weekly release 3.7.1+ 2019-07-18 17:11:45 +02:00
Eloy Lafuente (stronk7) 9bfa3e8f56 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-07-18 17:11:43 +02:00
Matt Porritt 1c97c77cb9 MDL-65858 backup: Improve behaviour of ajax calls
When a backup (or restore) is in progress and the user
has another tab open that is taking time to generate and
holding the session lock, a condition arises where
multiple ajax calls are "queued" because the long page
is holding the session lock. When this lock is released,
the queued ajax requests complete.  However, as the ajax
requests also lock this can block other requests until they
complete. This patch decreases the frequency of ajax calls
and stops them from holding the session lock.
2019-07-18 14:12:51 +08:00
Peter 0c73410e6c MDL-66174 mod_assign: Remove the strict widths on the annotation menu 2019-07-18 12:56:19 +08:00
Mathew May ebe8a6726a MDL-65788 tool_policy: Move accept_policy JS call into an array 2019-07-18 10:48:00 +08:00
Andrew Nicols cb9494ddcc Merge branch 'MDL-59911-conv_cleanup_check-37' of git://github.com/leonstr/moodle into MOODLE_37_STABLE 2019-07-18 08:25:34 +08:00
AMOS bot 8ac0f287ee Automatically generated installer lang files 2019-07-18 00:09:04 +00:00
Andrew Nicols 6fad97a975 Merge branch 'MDL-66163-37' of git://github.com/marinaglancy/moodle into MOODLE_37_STABLE 2019-07-18 07:45:38 +08:00
Eloy Lafuente (stronk7) 07b75d56ed Merge branch 'MDL-66115_37' of https://github.com/dvdcastro/moodle into MOODLE_37_STABLE 2019-07-17 23:09:39 +02:00
Bas Brands d959768051 MDL-60636 themes: form autocomplete chevron down on mobile 2019-07-17 13:33:31 +02:00
Peter 62566af752 MDL-66021 restore: Additional restore unit tests with async mode 2019-07-17 10:56:45 +08:00
Peter f910e87c12 MDL-66021 backup: Clear course if required before restore 2019-07-17 10:56:45 +08:00
Andrew Nicols 8960fa5c1f Merge branch 'MDL-65538-37' of git://github.com/sarjona/moodle into MOODLE_37_STABLE 2019-07-17 10:56:13 +08:00
Bas Brands 5eb95aca21 MDL-65357 themes: position enrolment icons in course listing 2019-07-17 09:40:29 +08:00
Eloy Lafuente (stronk7) f417dab602 Merge branch 'MDL-66032-MOODLE_37_STABLE_awarded_badges_criteria' of https://github.com/andrewmadden/moodle into MOODLE_37_STABLE 2019-07-17 01:31:54 +02:00
Eloy Lafuente (stronk7) 334e44fb2c Merge branch 'MDL-65908-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-07-17 01:18:27 +02:00
Marina Glancy ccc7e00cc0 MDL-66163 mod_forum: Add component to unittest sql queries
files from other components may exist in the files table
2019-07-16 20:37:15 +03:00
Leon Stringer c4e1a1518c MDL-59911 fileconverter_unoconv: Fix: test PDF fails after upgrade
When generating the PDF of unoconv_test.docx this file's previous conversions
are removed from mdl_file_conversion.  But these may also be removed by
\core_files\task\conversion_cleanup_task in which case an error occurs as
delete() is invoked with a NULL id.  Added check for non-NULL id prior to
invoking delete().
2019-07-16 17:25:23 +01:00
Eloy Lafuente (stronk7) 12f7d66baf Merge branch 'MDL-65555_MOODLE_37_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_37_STABLE 2019-07-16 12:35:08 +02:00
Andrew Nicols 0d7ff46e11 Merge branch 'MDL-65954-37' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-07-16 15:15:31 +08:00
Andrew Nicols 91a59718cd Merge branch 'MOODLE_37_STABLE_MDL_65517' of https://github.com/yao9394/moodle into MOODLE_37_STABLE 2019-07-16 12:22:05 +08:00
Andrew Nicols bd5f26b20b Merge branch 'MDL-65409-37' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-07-16 11:36:42 +08:00
Nathan Nguyen 4ffedd3797 MDL-65555 mod_lesson: fix group override backup and restore 2019-07-16 13:01:27 +10:00
Nathan Nguyen c923621ec0 MDL-65555 mod_quiz: fix group override backup and restore 2019-07-16 13:00:51 +10:00
Ryan Wyllie efc45c2976 MDL-65219 message: add message/pendingcontactrequests.php page back
We previously had this page when contact requests were first introduced
and unfortunately we created a bunch of notifications that reference
this URL directly which now won't work because the page has been removed.

I've added it back but set it to redirect to the message/index.php page
and load the contact requests page there.
2019-07-16 09:51:42 +08:00
Damyon Wiese 916c50484c MDL-65078 competencies: fix webservice
The webservice list_course_module_competencies calls a function that does not exist.

Thanks to Marie-Eve Lévesque for reporting this issue.
2019-07-16 09:43:23 +08:00
Andrew Madden 191bcca9e2 MDL-66032 badges: Prevent empty awarded badges criteria being created.
When creating or editing the awarded badges criteria, the select element should be
required to prevent empty criteria from being created. In addition, if there are
already badges created with the empty criteria, there should be not be an exception
thrown when assessing whether the criteria has been completed.
2019-07-16 09:47:37 +10:00
Sara Arjona 4afc6a5711 MDL-65538 competency: fix behat errors with firefox
There is a random behat error when executing the "Go to the competency
course competencies page." scenario: "Moodle exception: A required parameter
(courseid) was missing More information about this error".
It happens because sometimes the form is sent before the JS and it hasn't
the needed parameters defined. So they have been added as hidden to the
form to avoid the error (which I couldn't reproduce manually).
2019-07-15 14:09:04 +02:00
Eloy Lafuente (stronk7) b32637b7e2 Merge branch 'MDL-58026-37' of https://github.com/MartinGauk/moodle into MOODLE_37_STABLE 2019-07-15 13:38:55 +02:00
David Monllaó 6d6322985d MDL-66026 analytics: No notification if not necessary 2019-07-15 14:24:33 +08:00
Mihail Geshoski a84e91d7f3 MDL-66136 assign: Verify presence of resources in online text submission 2019-07-15 12:03:58 +08:00
Mihail Geshoski 629741d93f MDL-66136 assignfeedback_comments: Extend testcase 2019-07-15 12:03:58 +08:00
Jun Pataleta 727a0a97fe MDL-65954 dataformat_pdf: Convert object records to array
* count() doesn't work quite as expected when the record being written
to the PDF is an object. So make sure to convert the record to an array.
* In addition, instead of comparing the total vs the current cell
counter, it would be more reliable to determine whether we're at the
last element of the array by getting the key for the last element and
comparing it with the key for the element that's currently being
processed.
2019-07-15 10:30:29 +08:00
Peter 8340f83ddc MDL-65908 mod_assign: Remove scroll repositioning.
Absolute positioned elements do not require repositioning on scroll as long as
their immediate parent is relatively positioned.
2019-07-15 08:36:54 +08:00
Peter 8a3a133319 MDL-65908 assign: Overflow and positioning updates
Draw all annotation within the drawing canvas instead of the region
2019-07-15 08:36:54 +08:00
Peter e9822e8851 MDL-65908 assign: Revert overflow scroll fix
Revert "MDL-65484 assign: Scrolling overflow CSS"

This reverts commit 5bda066caa.
2019-07-15 08:36:54 +08:00
Mathew May 559a99c793 MDL-65788 tool_policy: Prevent two modals rendering for guests.
With the Guest registration calling policyactions.js the [data-action="view"]
was having two click handlers set on the inital policy modal trgger.
With this commit we state what we want the click event to be set on.
2019-07-14 18:53:35 +08:00
AMOS bot bcdb7e3031 Automatically generated installer lang files 2019-07-14 00:08:50 +00:00
David Castro 7f0d1164f5 MDL-66115 qtype_ddimageortext: Fixing choice deletion.
Summarising responses fails when question choices have been removed.

AMOS BEGIN
CPY [deletedchoice,qtype_match],[deletedchoice,qtype_ddimageortext]
AMOS END

(cherry picked from commit f0265e6db16caa6d13f8bce291e7da91b0eabb53)
2019-07-12 14:35:54 -05:00
sam marshall aa01e0e574 MDL-66132 Search: Behat tests should use simpledb, fix mock count
When searching using mock results (the 'global search expects the
query' step), the result count is not correctly set. As a result, the
page incorrectly reports that there are no results and doesn't
correctly show the first page of multi-page results.

Additionally, some of the core Behat tests can now be moved to use
real searching with the simpledb engine, rather than using mock
results at all. This gives better tests.

Unfortunately it was not possible to move all of the core Behat tests
and deprecate the mock step, because some of the tests are related to
the UI for 'special' features searching by user or group, neither of
which are supported by the simpledb engine.
2019-07-12 17:41:17 +01:00
Damyon Wiese 8070c74ebc MDL-65409 files: Allow location header
Allow incorrect capitals in location header response.
2019-07-12 08:44:54 +08:00
John Yao 93ade38caa MDL-65517 block_timeline: Hide completed course modules in Timeline
When some activities are manually completed by students, some are still showing in students' timeline.
This commit fix that for module assign,chat,choice,feedback,lesson,quiz,scorm and workshop.
2019-07-12 09:17:33 +10:00
Eloy Lafuente (stronk7) 39ef515a64 weekly release 3.7.1+ 2019-07-11 23:33:54 +02:00
Eloy Lafuente (stronk7) 65462b439d NOBUG: Fixed file access permissions 2019-07-11 23:33:54 +02:00
Eloy Lafuente (stronk7) 481b001f25 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-07-11 23:33:52 +02:00
Jun Pataleta 3098122ac1 Merge branch 'MDL-65926-MOODLE_37_STABLE_lowercase_username_sql_query' of https://github.com/andrewmadden/moodle into MOODLE_37_STABLE 2019-07-11 20:58:47 +02:00
Bas Brands f7a92e6a98 MDL-66039 themes: remove duplicate css
* removed duplicate #page { margin-top: 50px };
2019-07-11 14:54:28 +02:00
AMOS bot 00906c109e Automatically generated installer lang files 2019-07-11 00:09:03 +00:00
Eloy Lafuente (stronk7) 177f92e74b Merge branch 'MDL-66114-37-fix' of git://github.com/marinaglancy/moodle into MOODLE_37_STABLE 2019-07-10 12:45:30 +02:00
Andrew Madden ae464fd7b2 MDL-65926 moodlelib: Convert username to lowercase prior to SQL query
Within a very large project, it was found that searching for a user with their username in the user table using a case insensitive
search was inefficient. Instead it is proposed that the username input is made to be lowercase prior to executing a database query
as the username for each user in the database must be lowercase. This allows for a case sensitive query to find the user data.
Essentially we are moving a case insensitive search for a user from SQL into PHP to increase performance.
2019-07-10 19:55:46 +10:00
Marina Glancy 909d02196f MDL-66114 core_calendar: normalise categoryid value 2019-07-10 11:29:00 +02:00
Andrew Nicols 56d381cba3 Merge branch 'MDL-66114-37-2' of git://github.com/marinaglancy/moodle into MOODLE_37_STABLE 2019-07-10 14:29:41 +08:00
Jun Pataleta 49c2095b74 Merge branch 'MDL-66012-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-07-10 12:16:49 +08:00
Simey Lameze 64b39b7f60 MDL-66012 calendar: fix no event message on calendar views
Ahhh Jun. Thanks legend :)
2019-07-10 11:32:53 +08:00
Eloy Lafuente (stronk7) b0e82e7359 Merge branch 'MDL-56835_37-coursetimecreated' of git://github.com/markn86/moodle into MOODLE_37_STABLE 2019-07-10 00:14:59 +02:00
Marina Glancy 520d73b0d6 MDL-66114 core_calendar: events without category 2019-07-09 18:05:29 +02:00
Jun Pataleta 56b3bec2ff Merge branch 'MDL-66081-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-07-09 17:11:05 +08:00
Andrew Nicols f87569ac6a Merge branch 'MDL-64258-37' of https://github.com/HuongNV13/moodle into MOODLE_37_STABLE 2019-07-09 14:50:44 +08:00
Andrew Nicols 7804b75021 Merge branch 'MDL-65965-37-fix' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-07-09 11:00:30 +08:00
Jun Pataleta 571d588002 MDL-65965 behat: Do not fetch grouping IDs for empty grouping idnumbers 2019-07-09 10:49:10 +08:00
Mark Nelson c5fb5d69b1 MDL-56835 report_participation: remove unreachable if condition 2019-07-09 09:14:55 +08:00
Andrew Nicols 54b4d6726b Merge branch 'MDL-65772-37' of git://github.com/vmdef/moodle into MOODLE_37_STABLE 2019-07-09 08:56:33 +08:00
Mark Nelson af281ecdd6 MDL-56835 report_participation: initialise action variables 2019-07-09 08:30:41 +08:00
Mark Nelson d92119979c MDL-56835 report_participation: use course timecreated as minlog 2019-07-09 08:30:38 +08:00
Matt Porritt d6301a6dd3 MDL-56835 report_participation: release session lock 2019-07-09 08:28:50 +08:00
Eloy Lafuente (stronk7) 2308148e23 Merge branch 'MDL-66054-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-07-09 00:57:23 +02:00
Eloy Lafuente (stronk7) 41fc9f1937 Merge branch 'MDL-65965-37' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-07-09 00:55:09 +02:00
Martin Gauk 96c24a1912 MDL-58026 question: fix regrading in progress attempt
Do not convert autosave steps to true steps when regrading.

Thanks Eric Merrill for providing the unit test code.
2019-07-08 09:35:51 +00:00
AMOS bot f14bcafc5a Automatically generated installer lang files 2019-07-08 00:10:08 +00:00
AMOS bot fdd756f779 Automatically generated installer lang files 2019-07-07 00:08:55 +00:00
Sara Arjona b198428e41 Moodle release 3.7.1 2019-07-05 12:27:23 +02:00
Simey Lameze b9cd69b372 MDL-66081 calendar: fix typo in attribute description 2019-07-05 17:07:58 +08:00
AMOS bot a5f09bca98 Automatically generated installer lang files 2019-07-05 00:09:46 +00:00
Eloy Lafuente (stronk7) 22124a36ca weekly release 3.7+ 2019-07-04 16:51:08 +02:00
Eloy Lafuente (stronk7) 50794f5278 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-07-04 16:51:03 +02:00
Víctor Déniz Falcón 6d4e4bb8ef MDL-65772 cachestore_mongodb: fix the version number of the library 2019-07-04 12:46:04 +01:00
AMOS bot e1cad3f07b Automatically generated installer lang files 2019-07-04 00:08:39 +00:00
Shamim Rezaie 2e4856a81f MDL-61114 mod_assign: Check if the teacher can access the override 2019-07-03 18:05:19 +02:00
Shamim Rezaie 211f6809b9 MDL-61114 mod_assign: assignment overrides to observe group membership 2019-07-03 18:05:19 +02:00
Shamim Rezaie ad75599c7b MDL-61115: mod_lesson: Check if the teacher can access the override 2019-07-03 17:49:58 +02:00
Shamim Rezaie ca908dd42c MDL-61115 mod_lesson: Lesson overrides to observe group membership 2019-07-03 17:49:58 +02:00
Sara Arjona 76129617e5 Merge branch 'MDL-65105-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-07-03 15:05:42 +02:00
Sara Arjona 56f92fa069 Merge branch 'MDL-65958-37-v3' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-07-03 14:53:28 +02:00
Simey Lameze d7815b0a79 MDL-65958 calendar: cover students default event type visibility 2019-07-03 20:41:04 +08:00
Simey Lameze 376a2f64f2 MDL-65958 calendar: students should not see course event type 2019-07-03 20:41:04 +08:00
Simey Lameze 634da01c65 MDL-65958 calendar: add behat to test calendar_adminseesall behaviour 2019-07-03 20:41:04 +08:00
Simey Lameze 8b0bb2389c MDL-65958 calendar: fix adminseesall logic in the event form 2019-07-03 20:41:03 +08:00
Sara Arjona 83b311dcb3 Merge branch 'MDL-64794_37' of https://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-07-03 11:15:42 +02:00
Huong Nguyen 79ec71c87b MDL-64258 Group: Performance problem on the enrol group members page 2019-07-03 15:29:00 +07:00
Huong Nguyen 79a6ef4c9b MDL-64258 Group: Unit Test for find_users function 2019-07-03 15:28:52 +07:00
Eloy Lafuente (stronk7) 299cdee4bf Merge branch 'MDL-65845_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-07-03 02:25:39 +02:00
Eloy Lafuente (stronk7) 34b451dac4 Merge branch 'MDL-65656-37-2' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-07-03 02:16:54 +02:00
AMOS bot e2ac9903d9 Automatically generated installer lang files 2019-07-03 00:08:46 +00:00
AMOS bot ee22b6faba Automatically generated installer lang files 2019-07-03 00:08:46 +00:00
Eloy Lafuente (stronk7) a6c6690e79 Merge branch 'MDL-63268-37' of https://github.com/lucaboesch/moodle into MOODLE_37_STABLE 2019-07-03 00:13:15 +02:00
Sara Arjona acb0617d1b Merge branch 'MDL-64614_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-07-02 21:21:29 +02:00
Luca Bösch 370c8c4a06 MDL-63268 tool_uploadcourse: Keep source course section number. 2019-07-02 19:49:08 +02:00
Eloy Lafuente (stronk7) 4782bf39af Merge branch 'MDL-65707-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-07-02 16:39:49 +02:00
Sara Arjona 39f9832ce5 Merge branch 'MDL-66062_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-07-02 15:16:02 +02:00
Sara Arjona ef0d79745f Merge branch 'MDL-65101_37' of git://github.com/markn86/moodle into MOODLE_37_STABLE 2019-07-02 14:50:22 +02:00
Eloy Lafuente (stronk7) e1b1217749 MDL-66062 travis: Force PHP 7.1.30 to avoid some unit test failures
Make this sticky because current default version (7.1.11)
has a bug with redis-extension outputting information and breaking
tests.
2019-07-02 13:00:41 +02:00
Eloy Lafuente (stronk7) 57886390a6 Merge branch 'MDL-65728-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-07-02 12:14:05 +02:00
Sara Arjona 2a6ee587d3 Merge branch 'MDL-65839_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-07-02 10:42:10 +02:00
Eloy Lafuente (stronk7) 43ab5e777d Merge branch 'MDL-65853_m37' of git://github.com/gjb2048/moodle into MOODLE_37_STABLE 2019-07-02 10:25:36 +02:00
Shamim Rezaie 3f96ad977e MDL-34411 mod_quiz: Check if the teacher can access the override 2019-07-02 08:37:48 +02:00
Shamim Rezaie de068eb91a MDL-34411 groups: copy/paste error in test_groups_user_groups_visible 2019-07-02 08:37:48 +02:00
Shamim Rezaie e6539e7139 MDL-34411 mod_quiz: quiz overrides to observe group membership 2019-07-02 08:37:48 +02:00
Damyon Wiese 9a6c86b23f MDL-64623 glossary: Check the entry id
The entry must match the glossary before you can do any action on it.
2019-07-02 08:37:48 +02:00
Damyon Wiese ec2f7c0fe9 MDL-53689 xmldb: Require a sesskey to load xml
Loading and unloading xml files is not protected from XSS with a sesskey.
2019-07-02 08:37:48 +02:00
Sara Arjona 2077354356 Merge branch 'MDL-66049-37-workshopnamespace' of git://github.com/mudrd8mz/moodle into MOODLE_37_STABLE 2019-07-02 08:29:00 +02:00
Sara Arjona a3bce19260 Merge branch 'MDL-65901-37' of https://github.com/lucaboesch/moodle into MOODLE_37_STABLE 2019-07-02 08:10:27 +02:00
AMOS bot 08943d8121 Automatically generated installer lang files 2019-07-02 00:09:26 +00:00
Eloy Lafuente (stronk7) b053efae5d Merge branch 'MDL-64935-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-07-02 00:06:59 +02:00
Shamim Rezaie 8bb3a1d295 MDL-66054 behat: typo fix 2019-07-02 04:05:39 +10:00
Eloy Lafuente (stronk7) b3bd9df0fd Merge branch 'MDL-64511-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-07-01 18:52:21 +02:00
Sara Arjona 1d5341843f Merge branch 'MDL-65297-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-07-01 18:34:52 +02:00
Sara Arjona 5da74261d3 Merge branch 'MDL-65892-37-inlinereply' of git://github.com/mudrd8mz/moodle into MOODLE_37_STABLE 2019-07-01 15:50:02 +02:00
David Mudrák ee3b7666f2 MDL-66049 workshop: Fix the fully qualified class name
Because of the missing slash, the class 'workshop' was not found in the
current namespace and the cron failed to work.
2019-07-01 14:49:34 +02:00
Sara Arjona 9c96a6fcf7 Merge branch 'MDL-65973-37' of git://github.com/jleyva/moodle into MOODLE_37_STABLE 2019-07-01 13:13:34 +02:00
Dan Marsden 6ab4eaf7f2 MDL-60347 core: debugsmtp should be a developer only setting. 2019-07-01 12:16:22 +02:00
Sara Arjona 46c4afbeaf Merge branch 'MDL-57884_37' of https://github.com/timhunt/moodle into MOODLE_37_STABLE 2019-07-01 09:57:48 +02:00
Eloy Lafuente (stronk7) e0e75192e8 MDL-64614 environment: mssql requirement up to 2012 (11.0) 2019-06-30 11:58:04 +02:00
Eloy Lafuente (stronk7) c0078c08df MDL-64614 environment: 3.8 base information
This is a direct copy of the 3.7 branch to have
changes under control easier for next commits.
2019-06-30 11:58:04 +02:00
AMOS bot e2c4f9d374 Automatically generated installer lang files 2019-06-30 00:09:17 +00:00
AMOS bot 1b26a3db64 Automatically generated installer lang files 2019-06-30 00:09:16 +00:00
AMOS bot fa5aa45de4 Automatically generated installer lang files 2019-06-29 00:09:17 +00:00
AMOS bot 9c9ac43919 Automatically generated installer lang files 2019-06-29 00:09:17 +00:00
David Monllaó b214024bda MDL-65845 mod_lesson: Fix wrong pointer to an object
We should be pointing to the array of timecreated values instead.
2019-06-28 21:06:22 +02:00
David Monllaó cd59d03500 MDL-65839 core_analytics: New indicator instances for each analysable 2019-06-28 21:00:25 +02:00
Paul Holden 0db181f9a9 MDL-64511 privacy: encode data URL when loading content.
Previously paths that included ? or # characters would break loading.
2019-06-28 13:16:55 +01:00
Paul Holden 868c037261 MDL-65297 atto_managefiles: improve filename decoding.
Filenames containing # character would previously be missed.
2019-06-28 13:13:49 +01:00
Sara Arjona a1714472d3 Merge branch 'MDL-65506-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-06-28 12:16:29 +02:00
Mark Nelson 7883551c72 MDL-65101 core_message: add Behat test 2019-06-28 18:14:30 +08:00
Mark Nelson bc11df440e MDL-65101 core_message: 'canmessage' should trump 'requirescontract' 2019-06-28 15:38:20 +08:00
AMOS bot 4efaec0a53 Automatically generated installer lang files 2019-06-28 00:09:47 +00:00
Gareth Barnard 0ded67ffd7 MDL-65853 format_base: Labels counted in section activity summary. 2019-06-27 23:36:06 +01:00
Luca Bösch 61923d3bdd MDL-65901 forum: Style advanced search form properly. 2019-06-27 21:58:19 +02:00
Eloy Lafuente (stronk7) 035d608c59 weekly release 3.7+ 2019-06-27 18:54:40 +02:00
Eloy Lafuente (stronk7) d49a5c7826 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-06-27 18:54:38 +02:00
Andrew Nicols 7305ed72ec Merge branch 'MDL-53778_37' of https://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-06-27 08:36:55 +08:00
Eloy Lafuente (stronk7) 7ab8ebf5b1 MDL-53778 quiz: ensure completion deps are fulfilled by behat
Behat backgrounds and scenarios must observe the new
interdependencies between quiz completion settings.

This commits just applies that to the tests missing it.
2019-06-27 01:12:44 +02:00
Eloy Lafuente (stronk7) c4b9758766 MDL-53778 quiz: ensure completion deps are fulfilled by generator uses
There are some mod_quiz generator issues where the new chain
of dependencies between completion settings was not being observed.

This patch just ensures that the now 3 chained settings are
enabled together (or new quiz options logic will proceed to
disable them).
2019-06-27 01:12:44 +02:00
Eloy Lafuente (stronk7) 679d2d1129 Merge branch 'MDL-66003-37-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_37_STABLE 2019-06-26 23:04:27 +02:00
Nicolas Dunand 5cad3e5d46 MDL-63458 core_user: Remove send message if messaging is disabled 2019-06-26 11:30:40 -07:00
Sara Arjona 4faf9ff6c6 Merge branch 'MDL-60088-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-06-26 18:11:17 +02:00
Eloy Lafuente (stronk7) 0a77242e3c Merge branch 'MDL-53778_37' of https://github.com/anieminen/moodle into MOODLE_37_STABLE 2019-06-26 17:50:32 +02:00
Shamim Rezaie 1453ce1208 MDL-65506 forms: get the correct value for advcheckbox fields in js 2019-06-26 20:57:47 +10:00
Eloy Lafuente (stronk7) 798dc31ada Merge branch 'MDL-65249-37-fix' of https://github.com/snake/moodle into MOODLE_37_STABLE 2019-06-26 10:28:36 +02:00
Jake Dallimore 4a2a533fe1 MDL-65249 session: use redis host constant in unit tests 2019-06-26 16:11:05 +08:00
Ilya Tregubov 61373c843d MDL-65249 Session: Throw exception if number of attempts exceeded. 2019-06-26 14:49:23 +08:00
Jake Dallimore 2937760c27 Merge branch 'MDL-60978-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-06-26 13:17:04 +08:00
AMOS bot 03989cb776 Automatically generated installer lang files 2019-06-26 00:09:24 +00:00
Eloy Lafuente (stronk7) a4f78b52f6 Merge branch 'MDL-65181-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-06-26 00:43:50 +02:00
David Mudrák ecc1bd1c73 MDL-66003 lang: Use the updated strings in the tests 2019-06-25 21:30:27 +02:00
Helen Foster 694f33c2f6 MDL-66003 lang: Import fixed English strings (en_fix)
Significant string changes:

* moodleorghubname,core_admin and
  sitemustberegistered,message_airnotifier - 'Moodle.net' changed to
  'Moodle'

* registration_help,core_admin and registermoochtips,core_hub - removed
  erroneous 'access to Moodle.net our course sharing platform'

* trackingtype_help,mod_forum and formnotavailable,core_grading and
  showgrades_help,core and rolewarning_help,core_rating -
  'Administration block' changed to 'Actions menu or admin block',
  'navigation block' changed to 'navigation drawer or block'
2019-06-25 21:30:27 +02:00
David Mudrák d93cdd955b MDL-65892 forum: Fix styling of the inline reply textarea 2019-06-25 14:49:12 +02:00
Arto Nieminen d80d0b4142 MDL-53778 quiz settings: Ensure that disabled checkboxes have value 0 2019-06-25 13:26:29 +03:00
Simey Lameze b73ab4bf04 MDL-65707 calendar: behat scenario to test default event type 2019-06-25 10:23:34 +08:00
Simey Lameze a398df5381 MDL-65707 calendar: set the correct event type on site calendar 2019-06-25 10:23:34 +08:00
AMOS bot b0ff1a1600 Automatically generated installer lang files 2019-06-25 00:09:19 +00:00
Eloy Lafuente (stronk7) 98070f7020 Merge branch 'MDL-64340-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-06-25 00:54:00 +02:00
Bas Brands 40271e858d MDL-64935 theme: prevent activitynavigation link overflowing container 2019-06-24 14:48:53 +02:00
Bas Brands f839aff2b5 MDL-65105 theme_classic: use $dark variable for navbar-dark 2019-06-24 11:43:21 +02:00
Shamim Rezaie 0096c60d46 MDL-65728 tool_customlang: Escape html on the original translation field 2019-06-24 18:27:20 +10:00
Jake Dallimore 65424cea97 Merge branch 'MDL-65893-37' of https://github.com/nicoroeser/moodle into MOODLE_37_STABLE 2019-06-24 11:42:05 +08:00
AMOS bot 863b9081f5 Automatically generated installer lang files 2019-06-24 00:08:17 +00:00
Mathew May 44c178ec4f MDL-60088 travis: add dist:trusty to travis
We are doing this because travis changed its default release to xenial.
So this is a stop gap and we will add xenial support moving forward.
2019-06-23 23:58:51 +08:00
Jun Pataleta e6e99db401 MDL-65965 behat: Map grouping for activity data generator 2019-06-21 15:41:23 +08:00
Jun Pataleta 74c783924f MDL-65965 availability: Behat test for activity grouping restriction 2019-06-21 15:41:23 +08:00
Andrew Nicols 0703eeca7c MDL-60978 travis: Re-enable Redis session tests 2019-06-21 14:36:13 +08:00
Andrew Nicols 866f014372 MDL-60978 session: Run redis tests in isolation 2019-06-21 14:36:13 +08:00
Andrew Nicols 22ad84cb00 MDL-60978 testing: Support ability to run phpunit in isolated process 2019-06-21 14:36:13 +08:00
Shamim Rezaie d56311006a MDL-64340 mod_quiz: not display "add random question" when no permission 2019-06-21 08:53:47 +10:00
Eloy Lafuente (stronk7) 30d4327769 weekly release 3.7+ 2019-06-20 17:43:09 +02:00
Eloy Lafuente (stronk7) d987202dff Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-06-20 17:43:05 +02:00
Juan Leyva 25d288d297 MDL-65973 calendar: Avoid sesskey checks in WS
External function submit_create_update_form should avoid any sesskey checks.
2019-06-20 15:07:43 +02:00
Jake Dallimore aa6b0c6d03 Merge branch 'MDL-65084-m37' of https://github.com/NeillM/moodle into MOODLE_37_STABLE 2019-06-20 09:40:26 +08:00
Jake Dallimore 6f3819a805 Merge branch 'MDL-65883-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-06-20 09:13:02 +08:00
Andrew Nicols 2641b5e31e Merge branch 'MDL-61319-37' of git://github.com/bmbrands/moodle into MOODLE_37_STABLE 2019-06-20 08:10:10 +08:00
Eloy Lafuente (stronk7) 35db491a6d Merge branch 'MDL-64975-37' of https://github.com/nicoroeser/moodle into MOODLE_37_STABLE 2019-06-20 00:17:55 +02:00
Eloy Lafuente (stronk7) 27deb31ded Merge branch 'MDL-65910-37' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-06-19 20:54:36 +02:00
Eloy Lafuente (stronk7) 511e5c933a Merge branch 'MDL-65665-37-2' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-06-19 20:29:38 +02:00
Eloy Lafuente (stronk7) 5574d3431b Merge branch 'MDL-65666-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-06-19 18:38:26 +02:00
Eloy Lafuente (stronk7) ee8c5098c9 Merge branch 'MDL-65806-m37' of https://github.com/sammarshallou/moodle into MOODLE_37_STABLE 2019-06-19 18:27:19 +02:00
Eloy Lafuente (stronk7) 480396103b Merge branch 'MDL-65864_37' of git://github.com/timhunt/moodle into MOODLE_37_STABLE 2019-06-19 18:09:28 +02:00
Eloy Lafuente (stronk7) 4e5ebf89ba Merge branch 'MDL-55821-37' of git://github.com/damyon/moodle into MOODLE_37_STABLE 2019-06-19 18:05:20 +02:00
Neill Magill 015607040a MDL-65084 recent items: Handle deleted courses
The method should not cause errors when a course with activities
that the user has visited no longer exists.

Ensuring that we only get records for courses still in the database
will stop any course not found erros from get_fast_modinfo()

(cherry picked from commit f1d4c355fb25321756cfbed3b38afbe6e91ccdf9)
2019-06-19 09:04:33 +01:00
Neill Magill c58a1e9067 MDL-65084 recent items: Test handling of deleted courses 2019-06-19 09:04:31 +01:00
Simey Lameze eecc04f29c MDL-65883 mod_quiz: replace all hardcoded urls to proper params 2019-06-19 15:27:22 +08:00
Simey Lameze f237e35755 MDL-65883 mod_quiz: change attemptlib_test to use data generators 2019-06-19 15:27:22 +08:00
Simey Lameze bee606d3b1 MDL-65883 mod_quiz: fix quiz navigation buttons href 2019-06-19 15:27:22 +08:00
Jake Dallimore 38b5816722 Merge branch 'MDL-65904-37' of git://github.com/merrill-oakland/moodle into MOODLE_37_STABLE 2019-06-19 14:59:06 +08:00
Tim Hunt 6e5e4cc208 MDL-57884 quiz: autosave should not send the value of submit buttons 2019-06-18 17:47:48 +01:00
Bas Brands 4af9077f26 MDL-61319 themes: prevent using @extend rules for complex classes
* the settings and navigation blocks scss extended .fa which caused
issues with native fontawesome classes like fa-pull-left.
2019-06-18 13:49:37 +02:00
M Kassaei 0b2c17a183 MDL-65840 qtype_ddmarker: coordinates of cirle shape
The coordinates of a circle shape are not allowed to be smaller than its radius.
By default, set the coordinates to be the same as the radius.
2019-06-18 09:45:37 +08:00
Andrew Nicols 2a55bff8f6 Merge branch 'MDL-65469-37_2' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-06-18 09:16:53 +08:00
Eloy Lafuente (stronk7) e235ef7bd9 MDL-65469 mod_forum: Check for existence before operating 2019-06-18 08:50:32 +08:00
Peter 47dd7dd840 MDL-65469 core: Backported updates from master 2019-06-18 08:40:21 +08:00
AMOS bot 70c75a7a47 Automatically generated installer lang files 2019-06-18 00:08:37 +00:00
Eloy Lafuente (stronk7) a7367b6cf3 Merge branch 'MDL-65869-37' of git://github.com/aanabit/moodle into MOODLE_37_STABLE 2019-06-18 00:14:18 +02:00
Eloy Lafuente (stronk7) ae8dfad361 Merge branch 'MDL-64383-37' of git://github.com/damyon/moodle into MOODLE_37_STABLE 2019-06-17 23:02:53 +02:00
Andrew Nicols a0bdd53e21 Merge branch 'MDL-65469-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-06-17 15:19:35 +08:00
Andrew Nicols c615b3e96b Merge branch 'MDL-65888-37' of git://github.com/mudrd8mz/moodle into MOODLE_37_STABLE 2019-06-17 10:52:48 +08:00
AMOS bot e3475fd088 Automatically generated installer lang files 2019-06-15 00:08:13 +00:00
Nicolas Roeser e934a351e9 MDL-64975 moodlelib: fix float formatting if decsep is ~ (tilde)
Commit 637da99edb has introduced changes
for removing trailing zeroes from the output of function format_float.
Due to a small omission, the function causes a PHP warning when the
string decsep is set to a tilde character ('~'). This is rarely the
case.

The bug lies in using PHP function preg_replace with a string that
contains external input (in this case, including decsep), but without
escaping it for PCRE processing.

This commit fixes the function to also support a tilde character in
string decsep. It also adds tests for having tilde as decimal separator.

Thanks-To:  Jake Dallimore <jake@moodle.com>
2019-06-14 13:04:37 +02:00
Paul Holden 564753102d MDL-65181 mod_data: show required field indicator for textarea fields. 2019-06-14 09:58:18 +01:00
Nicolas Roeser 91916adde5 MDL-65893 webservice: format site name (handle language tags etc.)
Allow web service clients (like the Moodle App) to benefit from a
formatted (filtered) site name. Select the filtered (localized etc.)
string on server side, before it is sent to the web service client.

For example, this translates a site name which uses language tags in
curly braces when using the filter_multilang2 plugin.

Thanks-To: Juan Leyva <juan@moodle.com>
Thanks-To: Kathrin Osswald <kathrin.osswald@uni-ulm.de>
2019-06-14 10:38:32 +02:00
Amaia Anabitarte 7af3ae4834 MDL-65869 behat: Moving @app behat tests from core to moodlemobileapp
As described in MDL-65869 we are moving @app behat tests to
https://github.com/moodlehq/moodle-local_moodlemobileapp to be easier to maintain
and be sure are working with different mobile versions.
So we are not deprecating tests from core, just removing them because will be
in a different location.
2019-06-14 10:17:17 +02:00
Jun Pataleta fdfd266454 MDL-65910 report_stats: Add stattype query condition for consistency 2019-06-14 13:01:32 +08:00
Mihail Geshoski f3e11eef99 MDL-65665 forum: WS does not respect subscribe on reply user preference 2019-06-14 08:45:59 +08:00
Mihail Geshoski 94c5e0ade7 MDL-65665 forum: Add unit test 2019-06-14 08:45:59 +08:00
Tim Hunt 55929d8a49 MDL-65864 question engine: fix re-saving a new usage
Before this fix, test_repeated_usage_saving_new_usage was failing but
test_repeated_usage_saving_existing_usage was passing. Now the
behaviour is consistent and they both pass.
2019-06-13 18:01:54 +01:00
Eloy Lafuente (stronk7) d0b1204d8e weekly release 3.7+ 2019-06-13 18:15:48 +02:00
Eloy Lafuente (stronk7) 81a3d127b1 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-06-13 18:15:46 +02:00
Shamim Rezaie 4f7eaa8b46 MDL-65666 mod_forum: Highlight unread posts count in the discussion list 2019-06-14 01:26:36 +10:00
Shamim Rezaie 9b6a5a9b24 MDL-65786 mod_forum: mark posts as read when they are read 2019-06-13 23:34:03 +10:00
Shamim Rezaie c3c8dfeb51 MDL-65786 mod_forum: re-adding the unread count to the social format 2019-06-13 23:34:03 +10:00
Shamim Rezaie 07f8abfb30 MDL-65786 mod_forum: pass parameter to str helper when loading strings
We should not concatenate strings. We should make use of the {$a}placeholder instead.
2019-06-13 23:34:03 +10:00
Andrew Nicols 54c6679153 Merge branch 'MDL-65814-37' of git://github.com/junpataleta/moodle into MOODLE_37_STABLE 2019-06-13 11:44:15 +08:00
Jun Pataleta 089fbd15cc MDL-65814 block_timeline: Bring back item counts for action events 2019-06-13 11:32:03 +08:00
Jun Pataleta 7132749e18 Merge branch 'MDL-55997-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-06-13 10:28:56 +08:00
Peter 9ca2c8dc52 MDL-55997 core_reports: modify user stats query to fix duplicate rows 2019-06-13 07:46:22 +08:00
Eloy Lafuente (stronk7) f55a4c094e Merge branch 'MDL-64484-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-06-12 20:08:12 +02:00
Eric Merrill 3a3a212405 MDL-65904 theme: Compile fallback css in the correct order 2019-06-12 13:08:54 -04:00
Paul Holden 0998cf8010 MDL-64484 user: cross-DB compatible profile field ordering. 2019-06-12 17:02:32 +01:00
Jun Pataleta 3766be85b2 Merge branch 'MDL-65803-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-06-12 13:58:45 +08:00
Andrew Nicols 83273d25b9 Merge branch 'MDL-65703-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-06-12 12:39:05 +08:00
Peter b798b05411 MDL-65803 recentlyaccesseditems: Restrict response to valid courses.
* Additional hooks to cleanup data when a course or module is deleted
* Augmented unit tests to cover the situation when a course is deleted
* Upgrade step to cleanup existing data
2019-06-12 12:16:22 +08:00
Andrew Nicols 7eb50a3753 Merge branch 'MDL-65829_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-06-12 10:33:03 +08:00
Andrew Nicols 4a4b4e28a4 Merge branch 'MDL-64484-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE 2019-06-12 09:01:21 +08:00
sam marshall 42c31d53c8 MDL-65806 Search: Solr does not find words in italic 2019-06-11 16:42:20 +01:00
Paul Holden ea770fe8c8 MDL-64484 user: show full profile field name in filter element. 2019-06-11 14:25:19 +01:00
David Mudrák 434a580558 MDL-65888 forum: Do not send notifications to unconfirmed users
Under certain conditions, users marked as not confirmed yet may be
returned as forum notification recipients. Such users are considered as
inactive though and the delivery adhoc task cannot be run as these
users, throwing an exception.

The solution is to make sure that fetch_subscribed_users() does not
include unconfirmed users, similarly to what was done for suspended
users and nologin users.

The added unit test also checks for deleted users. But these should
never be returned as subscribed because we consider enrolled users only
and deleted users are filtered out implicitly.
2019-06-11 09:49:59 +02:00
Andrew Nicols 9a7a447722 Merge branch 'MDL-65779-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-06-11 12:07:58 +08:00
Andrew Nicols 1bf28ecb43 Merge branch 'MDL-65817_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-06-11 11:06:13 +08:00
Andrew Nicols 9c99a5da5c Merge branch 'MDL-65183-MOODLE-37' of https://github.com/kristian-94/moodle into MOODLE_37_STABLE 2019-06-11 11:02:06 +08:00
Jun Pataleta 95008df6d9 Merge branch 'MDL-65336-37' of git://github.com/aanabit/moodle into MOODLE_37_STABLE 2019-06-10 19:37:15 +08:00
Jun Pataleta f499fa90f1 Merge branch 'MDL-55592-37' of git://github.com/damyon/moodle into MOODLE_37_STABLE 2019-06-10 15:25:05 +08:00
Andrew Nicols 015b617739 Merge branch 'm37_MDL-61038_Fix_uuid_extensions_usage_v2' of https://github.com/scara/moodle into MOODLE_37_STABLE 2019-06-10 14:11:07 +08:00
Matteo Scaramuccia 423c1d6c50 MDL-61038 setuplib: Fixed PECL UUID extension support 2019-06-08 22:35:37 +02:00
Amaia Anabitarte c4bee8e510 MDL-65336 core_message: New muted conversation generator and selectors 2019-06-07 10:41:08 +02:00
Amaia Anabitarte 023ea98fc1 MDL-65336 core_message: Behat tests for mute/unmute conversations 2019-06-07 10:41:08 +02:00
Peter f1e0128a43 MDL-65469 mod_forum: Use the formchange checker initializer 2019-06-07 08:49:10 +08:00
Peter 167b85e60c MDL-65469 core: Expose formchecker to initialize current form state 2019-06-07 08:49:10 +08:00
AMOS bot 4b6e850e68 Automatically generated installer lang files 2019-06-07 00:09:47 +00:00
Kristian Ringer e48dd422f9 MDL-65183 block_timeline: escape newline characters 2019-06-07 09:36:24 +10:00
Eloy Lafuente (stronk7) dc8b92e0b2 MDL-65817 behat: switch to forked repo towards php73 compatibility
It seems that https://github.com/instaclick/php-webdriver/pull/91
is being ignored (in fact the repository itself doesn't show much
activity). So we have decided to fork it and apply any fix able
to keep our (non-marionette) runs working.

Hopefully, soon, the new W3C drivers will be supported by our
behat->mink stack... and we'll be able to move to it (from current
JSonwire drivers). So all this will be hostory.
2019-06-06 19:50:44 +02:00
David Monllaó 840d6ba543 MDL-65829 analytics: Accept enrol start time after analysis time 2019-06-06 19:05:51 +02:00
Eloy Lafuente (stronk7) 078699a1a5 weekly release 3.7+ 2019-06-06 16:46:52 +02:00
Eloy Lafuente (stronk7) c0266bdaf6 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-06-06 16:46:50 +02:00
Damyon Wiese 46f7f67db1 MDL-55821 assign: Show assign grade
When marking workflow is enabled and the grade is not released yet,
it would be helpful to show the assignment grade in the grading form.
2019-06-06 14:27:01 +08:00
Damyon Wiese e8b50bbe34 MDL-64383 user: Make username required
Username is a required field, we should indicate this even if it has a help icon.
2019-06-06 13:28:29 +08:00
AMOS bot 33113481b5 Automatically generated installer lang files 2019-06-06 00:08:17 +00:00
Jun Pataleta 8f11f7741a Merge branch 'MDL-65787-37' of git://github.com/sarjona/moodle into MOODLE_37_STABLE 2019-06-05 17:24:18 +08:00
Sara Arjona b31ec4dfbf MDL-65787 badges: fix warning count() with PHP 7.2 2019-06-05 11:03:11 +02:00
Sara Arjona 2b63da7763 Merge branch 'MDL-65777-37' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-06-05 09:01:00 +02:00
Mihail Geshoski 24bc58278f MDL-65777 assignment: Respect user full name in downloaded submissions 2019-06-05 11:14:51 +08:00
Adrian Greeve b59f56c259 Merge branch 'MDL-65731_37' of https://github.com/timhunt/moodle into MOODLE_37_STABLE 2019-06-05 10:40:41 +08:00
AMOS bot 29e40f3c13 Automatically generated installer lang files 2019-06-05 00:08:19 +00:00
Eloy Lafuente (stronk7) d2707c2d28 Merge branch 'MDL-65689-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-06-04 23:32:20 +02:00
Eloy Lafuente (stronk7) 898befb275 Merge branch 'MDL-65578-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-06-04 23:30:36 +02:00
Eloy Lafuente (stronk7) 938267b43a Merge branch 'MDL-65576-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-06-04 21:40:00 +02:00
Eloy Lafuente (stronk7) f9f5f5ddc8 Merge branch 'm37_MDL-65686_Fix_Incorrect_Function_Call' of https://github.com/scara/moodle into MOODLE_37_STABLE 2019-06-04 20:04:55 +02:00
Simey Lameze ca66ad24c8 MDL-65703 calendar: do not add course param for site calendar 2019-06-04 19:37:35 +08:00
Andreas Grabs e1f4756dfb MDL-65703 core_calendar: fix user event type filtering logic 2019-06-04 19:37:34 +08:00
Mathew May 12e04336a0 MDL-65658 mod_forum: Update the group image titles 2019-06-04 11:50:37 +02:00
Jun Pataleta 266aa66267 Merge branch 'MDL-65696-MOODLE-37' of https://github.com/kristian-94/moodle into MOODLE_37_STABLE 2019-06-04 16:54:52 +08:00
Peter af098adec2 MDL-65779 mod_forum: Add privatereplies to the backup process 2019-06-04 12:21:15 +08:00
Andrew Nicols 202cfa2987 MDL-65656 analytics: Stop covering memory-intensive tests 2019-06-04 11:18:49 +08:00
Andrew Nicols bafa907941 MDL-65656 core: Update composer.json for new PHPUnit version 2019-06-04 11:18:49 +08:00
AMOS bot f5131809c8 Automatically generated installer lang files 2019-06-04 00:08:14 +00:00
Eloy Lafuente (stronk7) 37c30f2249 Merge branch 'MDL-63240-37' of https://github.com/Kathrin84/moodle into MOODLE_37_STABLE 2019-06-03 17:57:49 +02:00
Eloy Lafuente (stronk7) 110a3639c3 Merge branch 'MDL-65660-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-06-03 17:51:43 +02:00
Eloy Lafuente (stronk7) 7631b43d33 Merge branch 'MDL-65675-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-06-03 17:37:21 +02:00
Sara Arjona a51f9bd003 Merge branch 'MDL-65658' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-06-03 12:33:28 +02:00
AMOS bot e998b14686 Automatically generated installer lang files 2019-06-03 00:08:17 +00:00
Kristian Ringer 5ed8d694ee MDL-65696 assign: Fix width of editpdf comments 2019-06-03 09:29:28 +10:00
Andrew Nicols f0782cc57b MDL-65578 forum: Hide action menu where no actions exist 2019-05-31 12:43:52 +08:00
Mathew May 33b74df149 MDL-65658 mod_forum: Group images links and titles groups
After a change in Moodle 3.6 some links & titles went missing.
Here I am adding them back & incresing the output image to 100x100px
2019-05-31 08:17:59 +08:00
Andrew Nicols 24e0b238d3 MDL-65576 behat: Reset Selenium driver between scorm scenarios 2019-05-31 08:09:00 +08:00
Peter dfddaa8ab6 MDL-65660 mod_forum: Allow guest users to view post buttons and links
For a self enrolment enabled course allow guest users to see the add
discussion and reply buttons
2019-05-31 07:07:13 +08:00
Eloy Lafuente (stronk7) 57b83a4f41 MDL-64794 tcpdf: Bump to tcpdf 6.2.26 2019-05-30 23:48:14 +02:00
Matteo Scaramuccia c9be953f05 MDL-65686 setuplib: Fix missing round brackets 2019-05-30 22:42:21 +02:00
Eloy Lafuente (stronk7) 794391b978 weekly release 3.7+ 2019-05-30 12:18:38 +02:00
Eloy Lafuente (stronk7) a7df733250 Merge branch 'install_37_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_37_STABLE 2019-05-30 12:18:36 +02:00
Tim Hunt 15d5c9a276 MDL-65731 quiz manual grading: fix ambiguous order by idnumber 2019-05-29 16:55:01 +01:00
Kathrin Osswald ec60f63f59 MDL-63240 theme Boost: Removed z-indexes for border styling in navdrawer 2019-05-29 17:52:36 +02:00
Marina Glancy a024a024e8 MDL-65726 core_roles: allow to create roles in install.php 2019-05-29 10:47:36 +02:00
Damyon Wiese 09304bcbff MDL-55592 lti: Forget the key and secret
When the "Enter your consumer key and shared secret" form is displayed,
it should not contain the same values it had the last time it was opened.
2019-05-29 13:59:38 +08:00
Adrian Greeve 53ef327e54 Merge branch 'MDL-57729-37' of git://github.com/mihailges/moodle into MOODLE_37_STABLE 2019-05-29 11:40:48 +08:00
Adrian Greeve 685a71917b Merge branch 'MDL-65726-37' of git://github.com/marinaglancy/moodle into MOODLE_37_STABLE 2019-05-29 11:07:42 +08:00
Mihail Geshoski 04288af505 MDL-57729 enrol_lti: Escape the property values of the xpath elements 2019-05-29 09:56:52 +08:00
Jake Dallimore 4ac6149680 Merge branch 'MDL-65326-MOODLE_37_STABLE' of https://github.com/dmitriim/moodle into MOODLE_37_STABLE 2019-05-29 09:29:44 +08:00
AMOS bot 308046f1bc Automatically generated installer lang files 2019-05-29 00:09:19 +00:00
Marina Glancy d6c2bf620c MDL-65726 role: do not fail unittest if plugins create their roles 2019-05-28 19:08:29 +02:00
Adrian Greeve 8869cf8cd9 Merge branch 'MDL-65705-37' of git://github.com/sarjona/moodle into MOODLE_37_STABLE 2019-05-28 16:28:50 +08:00
Sara Arjona b32974f12a MDL-65705 badges: fix issued date for external badges
The preg_match('~^[1-9][0-9]*$~', x) calls have been replaced to
is_numeric(x).
2019-05-28 09:26:00 +02:00
Ryan Wyllie 48b3e4e9b2 MDL-65657 message: reduce message poll timer for behat tests 2019-05-28 14:06:05 +08:00
Jun Pataleta 4996f75a3b Merge branch 'MDL-65697-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-05-28 13:31:21 +08:00
Jake Dallimore bf2cecc440 Merge branch 'MDL-65692-37' of git://github.com/abgreeve/moodle into MOODLE_37_STABLE 2019-05-28 13:27:01 +08:00
Dmitrii Metelkin ec920f7901 MDL-65326 backup: check caps exist before assigning 2019-05-28 11:17:24 +10:00
Jun Pataleta 1131af4409 Merge branch 'MDL-65606-37' of https://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-05-27 16:27:30 +08:00
Jake Dallimore 46d8ffcefa Merge branch 'MDL-64330-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-05-27 15:22:57 +08:00
Andrew Nicols e2ea9b4c09 MDL-64330 course: Correct course test assumptions 2019-05-27 15:08:25 +08:00
Adrian Greeve 523efc4cd0 Merge branch 'MDL-65699-37' of http://github.com/dravek/moodle into MOODLE_37_STABLE 2019-05-27 14:53:36 +08:00
Andrew Nicols 3f853115e9 Merge branch 'MDL-65708-37' of git://github.com/Chocolate-lightning/moodle into MOODLE_37_STABLE 2019-05-27 14:46:09 +08:00
Mathew May 8a8a02c903 MDL-65606 mod_data: Add approvalstatusclass to template 2019-05-27 13:39:36 +08:00
Ryan Wyllie 946533c623 MDL-65657 message: revert polling timeout back to old algorithm 2019-05-27 13:29:02 +08:00
Mathew May 1f686d7fdf MDL-65708 output: Get a base config from Boost
As a part of the removal of bootstrapbase & clean
I removed some logic that got the base config of bootstrapbase,
this should of been changed to get boosts config.
See: e00f1c663c
2019-05-27 13:21:24 +08:00
Andrew Nicols 4e9e994da4 MDL-65675 forum: Remove duplicate Re in subjects 2019-05-27 12:22:16 +08:00
Adrian Greeve 3ce4575dc0 Merge branch 'MDL-64523-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-05-27 10:49:22 +08:00
David Monllaó 88dfc54de9 MDL-65680 analytics: Fix random failure on slow test environments 2019-05-27 09:42:41 +08:00
AMOS bot d855dcd29e Automatically generated installer lang files 2019-05-25 00:08:34 +00:00
AMOS bot 5d4bf77a16 Automatically generated installer lang files 2019-05-25 00:08:33 +00:00
Shamim Rezaie fc00a6641c MDL-65689 task: fix typo in help string 2019-05-25 05:19:40 +10:00
Shamim Rezaie cee73270c7 MDL-64523 core_access: replace .delegate with .on
As of jQuery 3.0, .delegate() has been deprecated. It was superseded by
the .on() method since jQuery 1.7, so its use was already discouraged.
2019-05-25 04:27:54 +10:00
Shamim Rezaie 245de290f7 MDL-64523 core_access: Fix js racing issue when overriding permissions 2019-05-25 04:27:53 +10:00
Shamim Rezaie 1a6160df3c MDL-64523 core_access: Improve the title of the delete role links 2019-05-25 04:27:53 +10:00
Sara Arjona 2a3df3d55c Merge branch 'MDL-65060-37' of git://github.com/aanabit/moodle into MOODLE_37_STABLE 2019-05-24 12:35:25 +02:00
David Matamoros c227fc61f1 MDL-65699 core_calendar: Check string exists for event types 2019-05-24 12:20:59 +02:00
Amaia Anabitarte 38a9ba9bcd MDL-65060 core_message: Delete messages behat test 2019-05-24 12:15:44 +02:00
Simey Lameze a4e309709d MDL-65697 qtype_missingtype: include missing class 2019-05-24 07:02:10 +08:00
Eloy Lafuente (stronk7) e39f3b7db2 weekly release 3.7+ 2019-05-23 20:35:31 +02:00
Amaia Anabitarte 2a64720ac8 MDL-65060 core_message: Group message data generator 2019-05-23 15:31:19 +02:00
Eloy Lafuente (stronk7) cf0307a529 Merge branch 'MDL-65695-37' of git://github.com/andrewnicols/moodle into MOODLE_37_STABLE 2019-05-23 10:50:36 +02:00
Eloy Lafuente (stronk7) c4758ab813 Merge branch 'MDL-65694-37-gradeclassnotfound' of git://github.com/mudrd8mz/moodle into MOODLE_37_STABLE 2019-05-23 10:33:26 +02:00
Andrew Nicols d2c91281db MDL-65695 forum: Bump digest time to next day if in past 2019-05-23 15:06:23 +08:00
Adrian Greeve 9a88b8ec35 MDL-65692 backup: Default settings set on install and upgrade.
Asynchronous backup settings are now filled out with the defaults
on installation and upgrade.
2019-05-23 14:54:19 +08:00
David Mudrák 7a2beab44e MDL-65694 grade: Fix missing gradelib library
In the be8f453b74 the gradelib loading was removed by mistake. So
the library may not be loaded and executing the task may end with
the exception - class 'grade_grade' not found.
2019-05-23 07:48:54 +02:00
Tim Hunt a586240cc0 MDL-55197 filter_multilang: handle 'en' as parent lang better 2019-05-23 11:58:58 +08:00
Tim Hunt d2680dbb27 MDL-55197 filter_multilang: move preg_callback fn into class 2019-05-23 11:58:58 +08:00
Andrew Nicols c5b884bd51 Merge branch 'MDL-59650-37' of git://github.com/lameze/moodle into MOODLE_37_STABLE 2019-05-23 10:29:00 +08:00
Adrian Greeve 5d5313537b Merge branch 'MDL-65549_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-05-23 10:10:25 +08:00
Adrian Greeve 5e6bc1b0f3 Merge branch 'MDL-65634_37' of git://github.com/dmonllao/moodle into MOODLE_37_STABLE 2019-05-23 09:54:47 +08:00
Andrew Nicols 65d4f096db Merge branch 'MDL-65654-37' of https://github.com/danielneis/moodle into MOODLE_37_STABLE 2019-05-23 09:49:20 +08:00
Adrian Greeve cb69e26b15 Merge branch 'MDL-64530_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-05-23 09:23:01 +08:00
Simey Lameze f25a7d2ac7 MDL-59650 core_calendar: remove limit from calendar UI 2019-05-23 08:40:00 +08:00
Simey Lameze de760475cf MDL-59650 core_calendar: remove limit from event exporter 2019-05-23 08:40:00 +08:00
Amaia Anabitarte a3824e559b MDL-65060 core_message: Group_message_message_content selector 2019-05-22 18:56:27 +02:00
Ryan Wyllie 67b64f85e9 MDL-65060 core_message: add render buffer to conversations
Change the conversation logic to render using a buffer so that we can
immediately save state. The render patches are based on the state so
the UI will always reach eventual consistency with the state since the
patches are processed in order.
2019-05-22 18:56:27 +02:00
Sara Arjona ac11f60853 Merge branch 'MDL-65661-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE 2019-05-22 14:57:56 +02:00
Tim Hunt 09558248e8 MDL-65636 filter_multilang: add some basic unit tests
This commit includes suggestions from Jun Pataleta on how to improve the
unit tests.
2019-05-22 19:36:55 +08:00
Peter d186ba2f81 MDL-65661 block_myoverview: Truncate category name 2019-05-22 19:34:54 +08:00
Peter 7ee550a943 MDL-65661 core_course: Truncate long course names 2019-05-22 19:34:54 +08:00
David Monllaó e260354fc9 MDL-65067 tool_analytics: Limit update_end_date to format_weeks 2019-05-22 16:31:03 +08:00
Didier 'OdyX' Raboud cd9c54c93c MDL-65067 analytics: Strengthen format_weeks detection
The public function get_section_dates($section, $startdate = false) is
only defined in format_weeks, not in format_base.

As other formats can (and format_topcoll has) declare a different
get_section_dates public method, merely checking that it exists is not
sufficient to guarantee that it can be called with just a section object.

Check that the format either is, or is a subclass of format_weeks.
2019-05-22 16:30:52 +08:00
Paul Holden 2cd4e5f8dc MDL-64784 core: update tablelib tests for explicit sort direction. 2019-05-22 14:49:41 +08:00
Paul Holden 8978731b82 MDL-64784 core: consistent column sort direction in flexible_table. 2019-05-22 14:49:28 +08:00
Andrew Nicols 5c06a1935b Merge branch 'MDL-65590-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-05-22 13:52:34 +08:00
Jun Pataleta c04e89b086 Merge branch 'MDL-65591-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-05-22 11:06:39 +08:00
Andrew Nicols 4909257b07 Merge branch 'MDL-65630-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-05-22 09:42:38 +08:00
Daniel Neis Araujo 695675483f MDL-65654 tool_uploaduser: Fix undefined variable warning 2019-05-21 14:02:03 -03:00
David Monllaó c3217a6b0d MDL-65549 tool_analytics: Reduce the context name length in models_view 2019-05-21 17:29:23 +02:00
David Monllaó 21527bf096 MDL-65634 analytics: Discard late and early student enrolments 2019-05-21 17:24:17 +02:00
Sara Arjona 8178cf1bb9 Merge branch 'MDL-65605-37' of git://github.com/rezaies/moodle into MOODLE_37_STABLE 2019-05-21 13:47:39 +02:00
Jun Pataleta bc4f56abc3 Merge branch 'MDL-65274-37' of git://github.com/jleyva/moodle into MOODLE_37_STABLE 2019-05-21 18:49:25 +08:00
Víctor Déniz Falcón 0864ebc14c MDL-60407 report_insights: Fix redirect when action on last prediction
When an actions is taken on the last prediction, the predictions
list page is reloaded.
2019-05-21 18:45:42 +08:00
Adrian Greeve 31354cc381 Merge branch 'MDL-65572-37' of git://github.com/damyon/moodle into MOODLE_37_STABLE 2019-05-21 15:20:30 +08:00
Andrew Nicols 422a34a6f5 Merge branch 'MDL-65644_37' of git://github.com/stronk7/moodle into MOODLE_37_STABLE 2019-05-21 12:51:49 +08:00
Shamim Rezaie d16540aa88 MDL-65590 tool_customlang: Escape html on the standard text field 2019-05-21 14:21:04 +10:00
Adrian Greeve d3a76147e0 Merge branch 'MDL-65655-37-forumcroninactiveusers' of git://github.com/mudrd8mz/moodle into MOODLE_37_STABLE 2019-05-21 11:39:58 +08:00
Eloy Lafuente (stronk7) c48f2c90cc MDL-64530 travis: Enabble PHP 7.3 and redis cache
This commit performs a number of changes:

- Enables PHP 7.3, replacing PHP 7.2 (max/min approach).
- Enables back the redis service
- Configures redis cache store tests to be run.
- Disables redis session tests for PHP 7.2 and up (MDL-60978)
2019-05-21 01:28:23 +02:00
Eloy Lafuente (stronk7) 1f2cde345a MDL-65644 upgrade: add 3.7.0 separation line to all upgrade scripts 2019-05-20 19:36:01 +02:00
Shamim Rezaie 171a83f79b MDL-65591 tool_customlang: Re-adding the save buttons at the bottom 2019-05-21 02:21:24 +10:00
Juan Leyva a137762fec MDL-65274 mod_quiz: Do not return a translated string
We should be returning proper error codes and the translated string can be part of the debug information.
2019-05-20 15:55:18 +02:00
Shamim Rezaie b52ceb2972 MDL-65630 mod_quiz: Allow redo within an attempt with random questions 2019-05-20 23:50:21 +10:00
Shamim Rezaie 400239c7c5 MDL-65630 mod_quiz: Move logging in to the start of tests
The background is for set up, the scenario is for the test. Logging in
to start the test is the start of the test and the end of the background
itself.
2019-05-20 23:50:20 +10:00
Shamim Rezaie 159f904af5 MDL-65605 core_question: Fix the issue when get_draft_files returns nul 2019-05-20 23:49:13 +10:00
Shamim Rezaie a01edef5be MDL-65605 mod_lesson: Fix the issue when get_draft_files returns null 2019-05-20 23:49:13 +10:00
Damyon Wiese cfa7d2653c MDL-65572 messaging: Loginas upgrade check
When using login as, we also need to check if there are legacy messages that
need updating and set the user preference if required.
2019-05-20 09:15:13 +08:00
690 changed files with 11018 additions and 4222 deletions
+1 -1
View File
@@ -203,7 +203,7 @@
}
},
{
files: ["**/amd/src/*.js"],
files: ["**/amd/src/*.js", "Gruntfile.js"],
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
+2
View File
@@ -0,0 +1,2 @@
**/amd/**
/*.js
+1
View File
@@ -0,0 +1 @@
v8.16.1
+27 -28
View File
@@ -11,21 +11,18 @@ notifications:
language: php
dist: xenial
services:
- mysql
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.2
- 7.1
- 7.3
- 7.1.30 # Make this sticky because current default version (7.1.11) has a bug with redis-extension output (MDL-66062)
addons:
postgresql: "9.6"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# services:
# - redis-server
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
@@ -35,9 +32,6 @@ env:
# CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances.
# Postgres is significantly is pretty reasonable in its run-time.
# Run unit tests on MySQL
- DB=mysqli TASK=PHPUNIT
# Run CI Tests without running PHPUnit.
- DB=none TASK=CITEST
@@ -54,32 +48,32 @@ matrix:
fast_finish: true
include:
# Run mysql only on 7.3 - it's just too slow
- php: 7.3
env: DB=mysqli TASK=PHPUNIT
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7.2
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
exclude:
# MySQL - it's just too slow.
# Exclude it on all versions except for 7.2
- env: DB=mysqli TASK=PHPUNIT
php: 7.1
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
before_install:
# Avoid IPv6 default binding as service (causes redis not to start).
sudo service redis-server start --bind 127.0.0.1
install:
- >
if [ "$DB" = 'mysqli' ];
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo stop mysql
sudo service mysql stop
sudo mv /var/lib/mysql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
sudo start mysql
sudo service mysql restart
fi
- >
if [ "$DB" = 'pgsql' ];
@@ -99,10 +93,8 @@ install:
echo 'auth.json' >> .git/info/exclude
fi
# Enable Redis.
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# echo 'extension="redis.so"' > /tmp/redis.ini
# phpenv config-add /tmp/redis.ini
echo 'extension="redis.so"' > /tmp/redis.ini
phpenv config-add /tmp/redis.ini
# Install composer dependencies.
# We need --no-interaction in case we hit API limits for composer. This causes it to fall back to a standard clone.
@@ -173,12 +165,19 @@ before_script:
mkdir -p "$HOME"/roots/phpunit
# The phpunit dataroot and prefix..
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# -e "/require_once/i \\define('TEST_SESSION_REDIS_HOST', '127.0.0.1');" \
sed -i \
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Redis cache store tests
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
config.php ;
# Redis session tests, but not for PHP 7.2 and up. See MDL-60978 for more info.
redissession="define('TEST_SESSION_REDIS_HOST', '127.0.0.1');"
sed -i \
-e "/require_once/i \\${redissession}" \
config.php ;
# Initialise PHPUnit for Moodle.
php admin/tool/phpunit/cli/init.php
+1
View File
@@ -24,6 +24,7 @@
* Grunt configuration
*/
/* eslint-env node */
module.exports = function(grunt) {
var path = require('path'),
tasks = {},
+181
View File
@@ -2799,4 +2799,185 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.8" requires="3.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.6" />
<VENDOR name="postgres" version="9.4" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
@@ -623,7 +623,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
echo "</label>\n";
}
if ($helpicon) {
echo '<span class="pull-xs-right text-nowrap">'.$helpicon.'</span>';
echo '<span class="float-sm-right text-nowrap">'.$helpicon.'</span>';
}
echo '</div>';
if (isset($this->errors[$name])) {
+2 -2
View File
@@ -96,7 +96,7 @@ class core_role_permissions_table extends core_role_capability_table_base {
"linkclass" => "preventlink", "adminurl" => $adminurl->out(), "icon" => "", "iconalt" => "");
if (isset($overridableroles[$id]) and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$templatecontext['icon'] = 't/delete';
$templatecontext['iconalt'] = get_string('delete');
$templatecontext['iconalt'] = get_string('deletexrole', 'core_role', $name);
}
$neededroles[$id] = $renderer->render_from_template('core/permissionmanager_role', $templatecontext);
}
@@ -109,7 +109,7 @@ class core_role_permissions_table extends core_role_capability_table_base {
"icon" => "", "iconalt" => "");
if (isset($overridableroles[$id]) and prohibit_is_removable($id, $context, $capability->name)) {
$templatecontext['icon'] = 't/delete';
$templatecontext['iconalt'] = get_string('delete');
$templatecontext['iconalt'] = get_string('deletexrole', 'core_role', $name);
}
$forbiddenroles[$id] = $renderer->render_from_template('core/permissionmanager_role', $templatecontext);
}
+1 -1
View File
@@ -213,7 +213,7 @@ $arguments = array('contextid' => $contextid,
$PAGE->requires->strings_for_js(
array('roleprohibitinfo', 'roleprohibitheader', 'roleallowinfo', 'roleallowheader',
'confirmunassigntitle', 'confirmroleunprohibit', 'confirmroleprevent', 'confirmunassignyes',
'confirmunassignno'), 'core_role');
'confirmunassignno', 'deletexrole'), 'core_role');
$PAGE->requires->js_call_amd('core/permissionmanager', 'initialize', array($arguments));
$table = new core_role_permissions_table($context, $contextname, $allowoverrides, $allowsafeoverrides, $overridableroles);
echo $OUTPUT->box_start('generalbox capbox');
+22 -18
View File
@@ -459,27 +459,31 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$ADMIN->add('backups', $temp);
// Create a page for asynchronous backup and restore configuration and defaults.
if (!empty($CFG->enableasyncbackup)) { // Only add settings if async mode is enable at site level.
$temp = new admin_settingpage('asyncgeneralsettings', new lang_string('asyncgeneralsettings', 'backup'));
$temp = new admin_settingpage('asyncgeneralsettings', new lang_string('asyncgeneralsettings', 'backup'));
$temp->add(new admin_setting_configcheckbox(
'backup/backup_async_message_users',
new lang_string('asyncemailenable', 'backup'),
new lang_string('asyncemailenabledetail', 'backup'), 0));
$temp->add(new admin_setting_configcheckbox('enableasyncbackup', new lang_string('enableasyncbackup', 'backup'),
new lang_string('enableasyncbackup_help', 'backup'), 0, 1, 0));
$temp->add(new admin_setting_configtext(
'backup/backup_async_message_subject',
new lang_string('asyncmessagesubject', 'backup'),
new lang_string('asyncmessagesubjectdetail', 'backup'),
new lang_string('asyncmessagesubjectdefault', 'backup')));
$temp->add(new admin_setting_configcheckbox(
'backup/backup_async_message_users',
new lang_string('asyncemailenable', 'backup'),
new lang_string('asyncemailenabledetail', 'backup'), 0));
$temp->hide_if('backup/backup_async_message_users', 'enableasyncbackup');
$temp->add(new admin_setting_confightmleditor(
'backup/backup_async_message',
new lang_string('asyncmessagebody', 'backup'),
new lang_string('asyncmessagebodydetail', 'backup'),
new lang_string('asyncmessagebodydefault', 'backup')));
$temp->add(new admin_setting_configtext(
'backup/backup_async_message_subject',
new lang_string('asyncmessagesubject', 'backup'),
new lang_string('asyncmessagesubjectdetail', 'backup'),
new lang_string('asyncmessagesubjectdefault', 'backup')));
$temp->hide_if('backup/backup_async_message_subject', 'backup/backup_async_message_users');
$ADMIN->add('backups', $temp);
}
$temp->add(new admin_setting_confightmleditor(
'backup/backup_async_message',
new lang_string('asyncmessagebody', 'backup'),
new lang_string('asyncmessagebodydetail', 'backup'),
new lang_string('asyncmessagebodydefault', 'backup')));
$temp->hide_if('backup/backup_async_message', 'backup/backup_async_message_users');
$ADMIN->add('backups', $temp);
}
-6
View File
@@ -48,10 +48,4 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'),
new lang_string('allowstealthmodules_help'), 0, 1, 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecoursepublishing',
new lang_string('enablecoursepublishing', 'hub'), new lang_string('enablecoursepublishing_help', 'hub'), 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('enableasyncbackup', new lang_string('enableasyncbackup', 'backup'),
new lang_string('enableasyncbackup_help', 'backup'), 0, 1, 0));
}
+1
View File
@@ -9,6 +9,7 @@ Feature: Manage tokens
| username | password | firstname | lastname |
| testuser | testuser | Joe | Bloggs |
| testuser2 | testuser2 | TestFirstname | TestLastname |
And I change window size to "small"
And I log in as "admin"
And I am on site homepage
@@ -181,7 +181,7 @@ class models_list implements \renderable, \templatable {
if ($contextid == SYSCONTEXTID) {
$contextname = get_string('allpredictions', 'tool_analytics');
} else {
$contextname = shorten_text($context->get_context_name(true, true), 90);
$contextname = shorten_text($context->get_context_name(false, true), 40);
}
$predictioncontexts[$contextid] = $contextname;
}
@@ -173,7 +173,8 @@ function tool_analytics_calculate_course_dates($course, $options) {
$formatoptions = $format->get_format_options();
// Change this for a course formats API level call in MDL-60702.
if (method_exists($format, 'update_end_date') && $formatoptions['automaticenddate']) {
if ((get_class($format) == 'format_weeks' || is_subclass_of($format, 'format_weeks')) &&
method_exists($format, 'update_end_date') && $formatoptions['automaticenddate']) {
// Special treatment for weeks-based formats with automatic end date.
if ($options['update']) {
+1 -1
View File
@@ -31,7 +31,7 @@ $string['errordataroot'] = '$CFG->behat_dataroot is not set or is invalid.';
$string['errorsetconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot need to be set in config.php.';
$string['erroruniqueconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot values need to be different than $CFG->dataroot, $CFG->prefix, $CFG->wwwroot, $CFG->phpunit_dataroot and $CFG->phpunit_prefix values.';
$string['fieldvalueargument'] = 'Field value arguments';
$string['fieldvalueargument_help'] = 'This argument should be completed by a field value. There are many field types, including simple ones like checkboxes, selects or textareas, or complex ones like date selectors. See the dev documentation <a href="http://docs.moodle.org/dev/Acceptance_testing" target="_blank">Acceptance_testing</a> for details of expected field values.';
$string['fieldvalueargument_help'] = 'This argument should be completed by a field value. There are many field types, including simple ones like checkboxes, selects or textareas, or complex ones like date selectors. See the dev documentation <a href="https://docs.moodle.org/dev/Acceptance_testing" target="_blank">Acceptance_testing</a> for details of expected field values.';
$string['giveninfo'] = 'Given. Processes to set up the environment';
$string['infoheading'] = 'Info';
$string['installinfo'] = 'Read {$a} for installation and tests execution info';
@@ -20,12 +20,12 @@ Feature: Edit capabilities
And I set the following system permissions of "Teacher" role:
| capability | permission |
| block/mnet_hosts:myaddinstance | Allow |
| moodle/community:add | Inherit |
| moodle/site:messageanyuser | Inherit |
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
When I follow "Edit Teacher role"
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
And "moodle/community:add" capability has "Not set" permission
And "moodle/site:messageanyuser" capability has "Not set" permission
And "moodle/grade:managesharedforms" capability has "Prevent" permission
And "moodle/course:request" capability has "Prohibit" permission
+11 -9
View File
@@ -114,15 +114,17 @@ class tool_capability_renderer extends plugin_renderer_base {
}
// Start the list item, and print the context name as a link to the place to make changes.
if ($contextid == context_system::instance()->id) {
$url = new moodle_url('/admin/roles/manage.php');
$title = get_string('changeroles', 'tool_capability');
} else {
$url = new moodle_url('/admin/roles/override.php', array('contextid' => $contextid));
$title = get_string('changeoverrides', 'tool_capability');
}
$context = context::instance_by_id($contextid);
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), array('title' => $title)), 3);
if ($context instanceof context_system) {
$url = new moodle_url('/admin/roles/manage.php');
} else {
$url = new moodle_url('/admin/roles/permissions.php', ['contextid' => $contextid]);
}
$title = get_string('permissionsincontext', 'core_role', $context->get_context_name());
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), ['title' => $title]), 3);
$html .= html_writer::table($table);
// If there are any child contexts, print them recursively.
if (!empty($contexts[$contextid]->children)) {
@@ -133,4 +135,4 @@ class tool_capability_renderer extends plugin_renderer_base {
return $html;
}
}
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -113,14 +113,14 @@
<div class="d-md-none">
<strong>{{#str}}headingstandard, tool_customlang{{/str}}</strong>
</div>
{{{ master }}}
{{ master }}
<div class="info">
{{{ placeholderhelp }}}
{{{ outdatedhelp}}}
</div>
{{#showoriginalvsmaster}}
<div class="alert-secondary mt-3 mt-1">
{{{ original }}}
{{ original }}
</div>
{{/showoriginalvsmaster}}
</div>
@@ -146,5 +146,14 @@
</div>
{{/strings}}
</div>
<fieldset class="m-a-1 m-3">
<button type="submit" name="savecontinue" class="btn btn-secondary">
{{#str}}savecontinue, tool_customlang{{/str}}
</button>
<button type="submit" name="savecheckin" class="btn btn-secondary">
{{#str}}savecheckin, tool_customlang{{/str}}
</button>
</fieldset>
</form>
{{/hasstrings}}
@@ -440,6 +440,9 @@ class purpose extends persistent {
}
if (!empty($data->sensitivedatareasons) && is_array($data->sensitivedatareasons)) {
$data->sensitivedatareasons = implode(',', $data->sensitivedatareasons);
} else {
// Nothing selected. Set default value of null.
$data->sensitivedatareasons = null;
}
// A single value.
+3
View File
@@ -316,5 +316,8 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -24,7 +24,7 @@
$string['actlogshdr'] = 'Available log stores';
$string['configlogplugins'] = 'Please enable all required plugins and arrange them in appropriate order.';
$string['exportlog'] = 'Include logs when exporting.';
$string['exportlog'] = 'Include logs when exporting';
$string['exportlogdetail'] = 'Include logs that relate to the user when exporting.';
$string['logging'] = 'Logging';
$string['managelogging'] = 'Manage log stores';
@@ -46,5 +46,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019032800, 'logstore', 'database');
}
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -46,5 +46,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019032800, 'logstore', 'standard');
}
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
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
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates"],function(a,b,c,d,e,f){var g=function(b){a(b).on("click",this.configureSettings.bind(this))};return g.prototype._dialogue=null,g.prototype.configureSettings=function(e){var g=a(e.target).closest("a").data("courseid"),h=a(e.target).closest("a").data("pushratingstouserplans"),i={courseid:g,settings:{pushratingstouserplans:h}};e.preventDefault(),f.render("tool_lp/course_competency_settings",i).done(function(a){d.get_string("configurecoursecompetencysettings","tool_lp").done(function(b){this._dialogue=new c(b,a,this.addListeners.bind(this))}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},g.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},g.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},g.prototype.saveSettings=function(a){a.preventDefault();var c=this._find('input[name="pushratingstouserplans"]:checked').val(),d=this._find('input[name="courseid"]').val(),f={pushratingstouserplans:c};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:d,settings:f}}])[0].done(function(){this.refreshCourseCompetenciesPage()}.bind(this)).fail(b.exception)},g.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val();e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c,moduleid:0}}])[0].done(function(c){f.render("tool_lp/course_competencies_page",c).done(function(b,c){a('[data-region="coursecompetenciespage"]').replaceWith(b),f.runTemplateJS(c),this._dialogue.close()}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g});
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates","core/pending"],function(a,b,c,d,e,f,g){var h=function(b){a(b).on("click",this.configureSettings.bind(this))};return h.prototype._dialogue=null,h.prototype.configureSettings=function(e){var h=new g,i=a(e.target).closest("a").data("courseid"),j=a(e.target).closest("a").data("pushratingstouserplans"),k={courseid:i,settings:{pushratingstouserplans:j}};e.preventDefault(),a.when(d.get_string("configurecoursecompetencysettings","tool_lp"),f.render("tool_lp/course_competency_settings",k)).then(function(a,b){return this._dialogue=new c(a,b[0],this.addListeners.bind(this)),this._dialogue}.bind(this)).then(h.resolve)["catch"](b.exception)},h.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},h.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},h.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},h.prototype.saveSettings=function(a){var c=new g;a.preventDefault();var d=this._find('input[name="pushratingstouserplans"]:checked').val(),f=this._find('input[name="courseid"]').val(),h={pushratingstouserplans:d};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:f,settings:h}}])[0].then(function(){return this.refreshCourseCompetenciesPage()}.bind(this)).then(c.resolve)["catch"](b.exception)},h.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val(),d=new g;e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c,moduleid:0}}])[0].then(function(a){return f.render("tool_lp/course_competencies_page",a)}).then(function(b,c){f.replaceNode(a('[data-region="coursecompetenciespage"]'),b,c),this._dialogue.close()}.bind(this)).then(d.resolve)["catch"](b.exception)},h});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return this._render().then(function(a){return f.get_string("rate","tool_lp").then(function(b){this._popup=new d(b,a,this._afterRender.bind(this))}.bind(this))}.bind(this)).fail(b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){return this._popup=new d(a,b[0],this._afterRender.bind(this)),this._popup}.bind(this))["catch"](b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
@@ -1 +1 @@
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.done(function(f){a.push({value:"",name:d._chooseStr});for(var g=0;g<f.length;g++){var h=f[g];a.push({value:h.id,name:h.name})}d._dialogue=new e(a),d._dialogue.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])})}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0;c<b.length;c++){var e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){return a.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])}),a}).then(function(a){d._dialogue=a}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
+28 -15
View File
@@ -27,8 +27,9 @@ define(['jquery',
'core/templates',
'core/str',
'tool_lp/competencypicker',
'tool_lp/dragdrop-reorder'],
function($, notification, ajax, templates, str, Picker, dragdrop) {
'tool_lp/dragdrop-reorder',
'core/pending'],
function($, notification, ajax, templates, str, Picker, dragdrop, Pending) {
/**
* Constructor
@@ -117,6 +118,7 @@ define(['jquery',
* Pick a competency
*
* @method pickCompetency
* @return {Promise}
*/
competencies.prototype.pickCompetency = function() {
var self = this;
@@ -132,6 +134,7 @@ define(['jquery',
self.pickerInstance = new Picker(self.pageContextId, false, pageContextIncludes);
self.pickerInstance.on('save', function(e, data) {
var compIds = data.competencyIds;
var pendingPromise = new Pending();
if (self.itemtype === "course") {
requests = [];
@@ -181,17 +184,20 @@ define(['jquery',
pagerender = 'tool_lp/plan_page';
pageregion = 'plan-page';
}
ajax.call(requests)[requests.length - 1].then(function(context) {
ajax.call(requests)[requests.length - 1]
.then(function(context) {
return templates.render(pagerender, context);
}).then(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
self.pickerInstance.display();
return self.pickerInstance.display();
};
/**
@@ -302,6 +308,7 @@ define(['jquery',
if (localthis.itemtype == 'course') {
// Course completion rule handling.
$('[data-region="coursecompetenciespage"]').on('change', 'select[data-field="ruleoutcome"]', function(e) {
var pendingPromise = new Pending();
var requests = [];
var pagerender = 'tool_lp/course_competencies_page';
var pageregion = 'coursecompetenciespage';
@@ -314,18 +321,24 @@ define(['jquery',
args: {courseid: localthis.itemid, moduleid: 0}}
]);
requests[1].done(function(context) {
templates.render(pagerender, context).done(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
}).fail(notification.exception);
}).fail(notification.exception);
requests[1].then(function(context) {
return templates.render(pagerender, context);
})
.then(function(html, js) {
return templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
$('[data-region="actions"] button').click(function(e) {
var pendingPromise = new Pending();
e.preventDefault();
localthis.pickCompetency();
localthis.pickCompetency()
.then(pendingPromise.resolve)
.catch();
});
$('[data-action="delete-competency-link"]').click(function(e) {
e.preventDefault();
+10 -3
View File
@@ -33,8 +33,12 @@ define(['jquery',
'tool_lp/menubar',
'tool_lp/competencypicker',
'tool_lp/competency_outcomes',
'tool_lp/competencyruleconfig'],
function($, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig) {
'tool_lp/competencyruleconfig',
'core/pending',
],
function(
$, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig, Pending
) {
// Private variables and functions.
/** @var {Object} treeModel - This is an object representing the nodes in the tree. */
@@ -412,6 +416,7 @@ define(['jquery',
if (!pickerInstance) {
pickerInstance = new Picker(pageContextId, relatedTarget.competencyframeworkid);
pickerInstance.on('save', function(e, data) {
var pendingPromise = new Pending();
var compIds = data.competencyIds;
var calls = [];
@@ -436,7 +441,9 @@ define(['jquery',
templates.runTemplateJS(js);
updatedRelatedCompetencies();
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
+8 -2
View File
@@ -31,8 +31,10 @@ define(['jquery',
'core/templates',
'tool_lp/dialogue',
'core/str',
'tool_lp/tree'],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree) {
'tool_lp/tree',
'core/pending'
],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree, Pending) {
/**
* Competency picker class.
@@ -157,6 +159,7 @@ define(['jquery',
// Add listener for add.
self._find('[data-region="competencylinktree"] [data-action="add"]').click(function(e) {
e.preventDefault();
var pendingPromise = new Pending();
if (!self._selectedCompetencies.length) {
return;
}
@@ -168,7 +171,10 @@ define(['jquery',
self._trigger('save', {competencyId: self._selectedCompetencies[0]});
}
// The dialogue here is a YUI dialogue and doesn't support Promises at all.
// However, it is typically synchronous so this shoudl suffice.
self.close();
pendingPromise.resolve();
});
// The list of selected competencies will be modified while looping (because of the listeners above).
@@ -26,8 +26,10 @@ define(['jquery',
'tool_lp/dialogue',
'core/str',
'core/ajax',
'core/templates'],
function($, notification, Dialogue, str, ajax, templates) {
'core/templates',
'core/pending'
],
function($, notification, Dialogue, str, ajax, templates, Pending) {
/**
* Constructor
@@ -48,6 +50,7 @@ define(['jquery',
* @method configureSettings
*/
settingsMod.prototype.configureSettings = function(e) {
var pendingPromise = new Pending();
var courseid = $(e.target).closest('a').data('courseid');
var currentValue = $(e.target).closest('a').data('pushratingstouserplans');
var context = {
@@ -56,16 +59,21 @@ define(['jquery',
};
e.preventDefault();
templates.render('tool_lp/course_competency_settings', context).done(function(html) {
str.get_string('configurecoursecompetencysettings', 'tool_lp').done(function(title) {
this._dialogue = new Dialogue(
title,
html,
this.addListeners.bind(this)
);
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
$.when(
str.get_string('configurecoursecompetencysettings', 'tool_lp'),
templates.render('tool_lp/course_competency_settings', context)
)
.then(function(title, templateResult) {
this._dialogue = new Dialogue(
title,
templateResult[0],
this.addListeners.bind(this)
);
return this._dialogue;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
/**
@@ -108,6 +116,7 @@ define(['jquery',
* @method saveSettings
*/
settingsMod.prototype.saveSettings = function(e) {
var pendingPromise = new Pending();
e.preventDefault();
var newValue = this._find('input[name="pushratingstouserplans"]:checked').val();
@@ -117,9 +126,12 @@ define(['jquery',
ajax.call([
{methodname: 'core_competency_update_course_competency_settings',
args: {courseid: courseId, settings: settings}}
])[0].done(function() {
this.refreshCourseCompetenciesPage();
}.bind(this)).fail(notification.exception);
])[0]
.then(function() {
return this.refreshCourseCompetenciesPage();
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
@@ -131,18 +143,23 @@ define(['jquery',
*/
settingsMod.prototype.refreshCourseCompetenciesPage = function() {
var courseId = this._find('input[name="courseid"]').val();
var pendingPromise = new Pending();
ajax.call([
{methodname: 'tool_lp_data_for_course_competencies_page',
args: {courseid: courseId, moduleid: 0}}
])[0].done(function(context) {
templates.render('tool_lp/course_competencies_page', context).done(function(html, js) {
$('[data-region="coursecompetenciespage"]').replaceWith(html);
templates.runTemplateJS(js);
this._dialogue.close();
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
])[0]
.then(function(context) {
return templates.render('tool_lp/course_competencies_page', context);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="coursecompetenciespage"]'), html, js);
this._dialogue.close();
return;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
return /** @alias module:tool_lp/configurecoursecompetencysettings */ settingsMod;
+14 -9
View File
@@ -102,15 +102,20 @@ define(['jquery',
* @return {Promise}
*/
Grade.prototype.display = function() {
return this._render().then(function(html) {
return Str.get_string('rate', 'tool_lp').then(function(title) {
this._popup = new Dialogue(
title,
html,
this._afterRender.bind(this)
);
}.bind(this));
}.bind(this)).fail(Notification.exception);
return $.when(
Str.get_string('rate', 'tool_lp'),
this._render()
)
.then(function(title, templateResult) {
this._popup = new Dialogue(
title,
templateResult[0],
this._afterRender.bind(this)
);
return this._popup;
}.bind(this))
.catch(Notification.exception);
};
/**
@@ -95,7 +95,7 @@ define(['jquery',
self = this;
var promise = ScaleValues.get_values(self._scaleId);
promise.done(function(scalevalues) {
promise.then(function(scalevalues) {
options.push({
value: '',
name: self._chooseStr
@@ -109,8 +109,13 @@ define(['jquery',
});
}
self._dialogue = new GradeDialogue(options);
self._dialogue.on('rated', function(e, data) {
return options;
})
.then(function(options) {
return new GradeDialogue(options);
})
.then(function(dialogue) {
dialogue.on('rated', function(e, data) {
var args = self._args;
args.grade = data.rating;
args.note = data.note;
@@ -123,7 +128,15 @@ define(['jquery',
fail: notification.exception
}]);
});
}).fail(notification.exception);
return dialogue;
})
.then(function(dialogue) {
self._dialogue = dialogue;
return;
})
.fail(notification.exception);
};
/** @type {Number} The scale id for this competency. */
@@ -30,6 +30,8 @@
}}
<div class="float-right card p-2">
<form class="user-competency-course-navigation">
<input type="hidden" name="courseid" value="{{courseid}}"/>
<input type="hidden" name="mod" value="{{moduleid}}"/>
{{#hasmodules}}
<span>
<label for="module-nav-{{uniqid}}" class="accesshide">{{#str}}filterbyactivity, tool_lp{{/str}}</label>
@@ -38,6 +38,9 @@
<div class="float-sm-right card card-block p-x-1 p-b-1">
<p>{{{groupselector}}}</p>
<form class="user-competency-course-navigation">
<input type="hidden" name="userid" value="{{userid}}"/>
<input type="hidden" name="competencyid" value="{{competencyid}}"/>
<input type="hidden" name="courseid" value="{{courseid}}"/>
{{#hasusers}}
<span>
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>
@@ -6,6 +6,7 @@ Feature: Manage competency frameworks
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new framework
@@ -6,6 +6,7 @@ Feature: Manage plearning plan templates
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new learning plan template
@@ -105,7 +105,7 @@ $string['requirevalidation'] = 'Validate sender address';
$string['name'] = 'Name';
$string['ssl'] = 'SSL (Auto-detect SSL version)';
$string['sslv2'] = 'SSLv2 (Force SSL Version 2)';
$string['sslv3'] = 'SSLv2 (Force SSL Version 3)';
$string['sslv3'] = 'SSLv3 (Force SSL Version 3)';
$string['taskcleanup'] = 'Cleanup of unverified incoming email';
$string['taskpickup'] = 'Incoming email pickup';
$string['tls'] = 'TLS (TLS; started via protocol-level negotiation over unencrypted channel; RECOMMENDED way of initiating secure connection)';
+3
View File
@@ -42,5 +42,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019021100, 'tool', 'mobile');
}
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -82,7 +82,7 @@ $string['mobileappearance'] = 'Mobile appearance';
$string['mobileauthentication'] = 'Mobile authentication';
$string['mobilecssurl'] = 'CSS';
$string['mobilefeatures'] = 'Mobile features';
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Manage message outputs.';
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Notification settings.';
$string['mobilesettings'] = 'Mobile settings';
$string['offlineuse'] = 'Offline use';
$string['pluginname'] = 'Moodle app tools';
+1 -1
View File
@@ -30,7 +30,7 @@ require_once($CFG->libdir . '/externallib.php');
$serviceshortname = required_param('service', PARAM_ALPHANUMEXT);
$passport = required_param('passport', PARAM_RAW); // Passport send from the app to validate the response URL.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_NOTAGS); // The URL scheme the app supports.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_ALPHANUM); // The URL scheme the app supports.
$confirmed = optional_param('confirmed', false, PARAM_BOOL); // If we are being redirected after user confirmation.
$oauthsso = optional_param('oauthsso', 0, PARAM_INT); // Id of the OpenID issuer (for OAuth direct SSO).
+1 -1
View File
@@ -63,7 +63,7 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_NOTAGS));
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_ALPHANUM));
$ADMIN->add('mobileapp', $temp);
+3
View File
@@ -62,5 +62,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f={VIEW_POLICY:'[data-action="view"]'},g=function(){this.registerEvents()};return g.prototype.registerEvents=function(){a(f.VIEW_POLICY).click(function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(){return new g}}});
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f=function(a){this.registerEvents(a)};return f.prototype.registerEvents=function(f){f.on("click",function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(b){return b=a(b),new f(b)}}});
+7 -15
View File
@@ -29,27 +29,18 @@ define([
'core/modal_events'],
function($, Ajax, Notification, ModalFactory, ModalEvents) {
/**
* List of action selectors.
*
* @type {{VIEW_POLICY: string}}
*/
var ACTIONS = {
VIEW_POLICY: '[data-action="view"]'
};
/**
* PolicyActions class.
*/
var PolicyActions = function() {
this.registerEvents();
var PolicyActions = function(root) {
this.registerEvents(root);
};
/**
* Register event listeners.
*/
PolicyActions.prototype.registerEvents = function() {
$(ACTIONS.VIEW_POLICY).click(function(e) {
PolicyActions.prototype.registerEvents = function(root) {
root.on("click", function(e) {
e.preventDefault();
var versionid = $(this).data('versionid');
@@ -127,8 +118,9 @@ function($, Ajax, Notification, ModalFactory, ModalEvents) {
* @method init
* @return {PolicyActions}
*/
'init': function() {
return new PolicyActions();
'init': function(root) {
root = $(root);
return new PolicyActions(root);
}
};
});
@@ -111,7 +111,7 @@ class accept_policy extends \moodleform {
}
}
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init');
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init', ['[data-action="view"]']);
}
/**
@@ -197,4 +197,4 @@ class accept_policy extends \moodleform {
}
}
}
}
}
+3
View File
@@ -63,5 +63,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -58,7 +58,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
"<ul>{{#policies}}" +
"<li>" +
"<a href=\"{{pluginbaseurl}}/view.php?versionid={{id}}{{#returnurl}}&amp;returnurl={{.}}{{/returnurl}}\" " +
" data-action=\"view\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
" data-action=\"view-guest\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
"{{{name}}}" +
"</a>" +
"</li>" +
@@ -81,7 +81,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
{{/haspolicies}}
// Initialise the JS for the modal window which displays the policy versions.
ActionsMod.init();
ActionsMod.init('[data-action="view-guest"]');
});
});
@@ -143,6 +143,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -73,6 +73,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -28,7 +28,7 @@ $string['spamauto'] = 'Autodetect common spam patterns';
$string['spamcannotdelete'] = 'Cannot delete this user';
$string['spamcannotfinduser'] = 'No users matching your search';
$string['spamcleanerintro'] = '<p>This script allows you to search all user profiles for certain strings and then delete those accounts which are obviously created by spammers. You can search for multiple keywords using commas (e.g. casino, porn).</p>
<p>For further information, see the documentation <a href="http://docs.moodle.org/en/Reducing_spam_in_Moodle">Reducing spam in Moodle</a>.</p>';
<p>For further information, see the documentation <a href="https://docs.moodle.org/en/Reducing_spam_in_Moodle">Reducing spam in Moodle</a>.</p>';
$string['spamdeleteall'] = 'Delete all these user accounts';
$string['spamdeleteallconfirm'] = 'Are you sure you want to delete all these user accounts? You can not undo this.';
$string['spamdeleteconfirm'] = 'Are you sure you want to delete this entry? You can not undo this.';
+1 -1
View File
@@ -50,7 +50,7 @@ Options:
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/tool/task/cli/scheduled_task.php --execute=\\\\core\\\\task\\\\session_cleanup_task
\$sudo -u www-data /usr/bin/php admin/tool/task/cli/schedule_task.php --execute=\\\\core\\\\task\\\\session_cleanup_task
";
+9 -1
View File
@@ -703,10 +703,18 @@ class tool_uploadcourse_course {
$coursedata += $courseformat->validate_course_format_options($this->rawdata);
}
// Special case, 'numsections' is not a course format option any more but still should apply from defaults.
// Special case, 'numsections' is not a course format option any more but still should apply from the template course,
// if any, and otherwise from defaults.
if (!$exists || !array_key_exists('numsections', $coursedata)) {
if (isset($this->rawdata['numsections']) && is_numeric($this->rawdata['numsections'])) {
$coursedata['numsections'] = (int)$this->rawdata['numsections'];
} else if (isset($this->options['templatecourse'])) {
$numsections = tool_uploadcourse_helper::get_coursesection_count($this->options['templatecourse']);
if ($numsections != 0) {
$coursedata['numsections'] = $numsections;
} else {
$coursedata['numsections'] = get_config('moodlecourse', 'numsections');
}
} else {
$coursedata['numsections'] = get_config('moodlecourse', 'numsections');
}
@@ -286,6 +286,25 @@ class tool_uploadcourse_helper {
return $roles;
}
/**
* Helper to detect how many sections a course with a given shortname has.
*
* @param string $shortname shortname of a course to count sections from.
* @return integer count of sections.
*/
public static function get_coursesection_count($shortname) {
global $DB;
if (!empty($shortname) || is_numeric($shortname)) {
// Creating restore from an existing course.
$course = $DB->get_record('course', array('shortname' => $shortname));
}
if (!empty($course)) {
$courseformat = course_get_format($course);
return $courseformat->get_last_section_number();
}
return 0;
}
/**
* Get the role renaming data from the passed data.
*
+2
View File
@@ -360,6 +360,7 @@ function uu_allowed_roles() {
*/
function uu_allowed_roles_cache() {
$allowedroles = get_assignable_roles(context_course::instance(SITEID), ROLENAME_SHORT);
$rolecache = [];
foreach ($allowedroles as $rid=>$rname) {
$rolecache[$rid] = new stdClass();
$rolecache[$rid]->id = $rid;
@@ -379,6 +380,7 @@ function uu_allowed_roles_cache() {
*/
function uu_allowed_sysroles_cache() {
$allowedroles = get_assignable_roles(context_system::instance(), ROLENAME_SHORT);
$rolecache = [];
foreach ($allowedroles as $rid => $rname) {
$rolecache[$rid] = new stdClass();
$rolecache[$rid]->id = $rid;
@@ -77,18 +77,22 @@ class provider implements
}
if ($descriptionidentifier !== null) {
$time = transform::datetime($value);
$tour = \tool_usertours\tour::instance($tourid);
try {
$tour = \tool_usertours\tour::instance($tourid);
$time = transform::datetime($value);
writer::export_user_preference(
'tool_usertours',
$name,
$time,
get_string($descriptionidentifier, 'tool_usertours', (object) [
'name' => $tour->get_name(),
'time' => $time,
])
);
writer::export_user_preference(
'tool_usertours',
$name,
$time,
get_string($descriptionidentifier, 'tool_usertours', (object) [
'name' => $tour->get_name(),
'time' => $time,
])
);
} catch (\dml_missing_record_exception $ex) {
// The tour related to this user preference no longer exists.
}
}
}
}
+3
View File
@@ -61,5 +61,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019030600, 'tool', 'usertours');
}
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -112,4 +112,37 @@ class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testc
$this->assertCount(2, (array) $prefs);
}
/**
* Ensure that export_user_preferences excludes deleted tours.
*/
public function test_export_user_preferences_deleted_tour() {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
$user = \core_user::get_user_by_username('admin');
$alltours = $DB->get_records('tool_usertours_tours');
$tour1 = tour::instance(array_shift($alltours)->id);
$tour1->mark_user_completed();
$tour2 = tour::instance(array_shift($alltours)->id);
$tour2->mark_user_completed();
$tour2->remove();
$writer = writer::with_context(\context_system::instance());
provider::export_user_preferences($user->id);
$this->assertTrue($writer->has_any_data());
// We should have one preference.
$prefs = $writer->get_user_preferences('tool_usertours');
$this->assertCount(1, (array) $prefs);
// The preference should be related to the first tour.
$this->assertContains($tour1->get_name(), reset($prefs)->description);
}
}
@@ -38,9 +38,6 @@ class load_xml_file extends XMLDBAction {
$this->can_subaction = ACTION_NONE;
//$this->can_subaction = ACTION_HAVE_SUBACTIONS;
// Set own custom attributes
$this->sesskey_protected = false; // This action doesn't need sesskey protection
// Get needed strings
$this->loadStrings(array(
// 'key' => 'module',
@@ -169,7 +169,7 @@ class main_view extends XMLDBAction {
file_exists($key . '/install.xml') &&
is_readable($key . '/install.xml') &&
empty($dbdir->xml_loaded)) {
$b .= '<a href="index.php?action=load_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['load'] . ']</a>';
$b .= '<a href="index.php?action=load_xml_file&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['load'] . ']</a>';
} else {
$b .= '[' . $this->str['load'] . ']';
}
@@ -239,7 +239,7 @@ class main_view extends XMLDBAction {
is_readable($key . '/install.xml') &&
!empty($dbdir->xml_loaded) &&
empty($dbdir->xml_changed)) {
$b .= '<a href="index.php?action=unload_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['unload'] . ']</a>';
$b .= '<a href="index.php?action=unload_xml_file&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['unload'] . ']</a>';
} else {
$b .= '[' . $this->str['unload'] . ']';
}
@@ -35,9 +35,6 @@ class unload_xml_file extends XMLDBAction {
function init() {
parent::init();
// Set own custom attributes
$this->sesskey_protected = false; // This action doesn't need sesskey protection
// Get needed strings
$this->loadStrings(array(
// 'key' => 'module',
+3 -3
View File
@@ -34,7 +34,7 @@ $string['confirmdeleteindex'] = 'Are you absolutely sure that you want to delete
$string['confirmdeletekey'] = 'Are you absolutely sure that you want to delete the key:';
$string['confirmdeletetable'] = 'Are you absolutely sure that you want to delete the table:';
$string['confirmdeletexmlfile'] = 'Are you absolutely sure that you want to delete the file:';
$string['confirmcheckbigints'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.
$string['confirmcheckbigints'] = 'This functionality will search for <a href="https://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
@@ -60,7 +60,7 @@ Once generated you can copy such statements and execute them safely with your fa
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of missing indexes.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="https://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
@@ -140,7 +140,7 @@ $string['incorrecttablename'] = 'Incorrect table name';
$string['key'] = 'Key';
$string['keynameempty'] = 'The key name cannot be empty';
$string['keys'] = 'Keys';
$string['listreservedwords'] = 'List of Reserved Words<br />(used to keep <a href="http://docs.moodle.org/en/XMLDB_reserved_words" target="_blank">XMLDB_reserved_words</a> updated)';
$string['listreservedwords'] = 'List of reserved words<br />(used to keep <a href="https://docs.moodle.org/en/XMLDB_reserved_words" target="_blank">XMLDB reserved words</a> updated)';
$string['load'] = 'Load';
$string['main_view'] = 'Main view';
$string['masterprimaryuniqueordernomatch'] = 'The fields in your foreign key must be listed in the same order as they are listed in the UNIQUE KEY on the referenced table.';
+2 -1
View File
@@ -313,7 +313,8 @@ class analysis {
}
try {
$indicators = $this->analyser->get_indicators();
// Instantiate empty indicators to ensure that no garbage is dragged from previous analyses.
$indicators = $this->analyser->instantiate_indicators();
foreach ($indicators as $key => $indicator) {
// The analyser attaches the main entities the sample depends on and are provided to the
// indicator to calculate the sample.
+12
View File
@@ -237,6 +237,18 @@ abstract class base {
return $this->indicators;
}
/**
* Instantiate the indicators.
*
* @return \core_analytics\local\indicator\base[]
*/
public function instantiate_indicators() {
foreach ($this->indicators as $key => $indicator) {
$this->indicators[$key] = call_user_func(array($indicator, 'instance'));
}
return $this->indicators;
}
/**
* Samples data this analyser provides.
*
@@ -50,12 +50,11 @@ abstract class by_course extends base {
if (!empty($this->options['filter'])) {
$courses = array();
foreach ($this->options['filter'] as $courseid) {
$courses[$courseid] = new \stdClass();
$courses[$courseid]->id = $courseid;
$courses[$courseid] = intval($courseid);
}
list($coursesql, $courseparams) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);
$sql .= " AND c.id IN $coursesql";
$sql .= " AND c.id $coursesql";
$params = $params + $courseparams;
}
@@ -78,9 +78,9 @@ class result_file extends result {
// if this analyser was analysed less that 1 week ago we skip generating a new one. This
// helps scale the evaluation process as sites with tons of courses may need a lot of time to
// complete an evaluation.
if (!empty($options['evaluation']) && !empty($options['reuseprevanalysed'])) {
if (!empty($this->options['evaluation']) && !empty($this->options['reuseprevanalysed'])) {
$previousanalysis = \core_analytics\dataset_manager::get_evaluation_analysable_file($this->analyser->get_modelid(),
$previousanalysis = \core_analytics\dataset_manager::get_evaluation_analysable_file($this->modelid,
$analysable->get_id(), $timesplitting->get_id());
// 1 week is a partly random time interval, no need to worry about DST.
$boundary = time() - WEEKSECS;
@@ -836,7 +836,8 @@ abstract class community_of_inquiry_activity extends linear {
// When the course is using format weeks we use the week's end date.
$format = course_get_format($activity->get_modinfo()->get_course());
// We should change this in MDL-60702.
if (method_exists($format, 'get_section_dates')) {
if (get_class($format) == 'format_weeks' || is_subclass_of($format, 'format_weeks')
&& method_exists($format, 'get_section_dates')) {
$dates = $format->get_section_dates($section);
// We need to consider the +2 hours added by get_section_dates.
+9 -2
View File
@@ -130,8 +130,10 @@ abstract class base extends \core_analytics\calculable {
global $PAGE;
$predictionid = $prediction->get_prediction_data()->id;
$contextid = $prediction->get_prediction_data()->contextid;
$modelid = $prediction->get_prediction_data()->modelid;
$PAGE->requires->js_call_amd('report_insights/actions', 'init', array($predictionid));
$PAGE->requires->js_call_amd('report_insights/actions', 'init', array($predictionid, $contextid, $modelid));
$actions = array();
@@ -227,7 +229,12 @@ abstract class base extends \core_analytics\calculable {
*/
public function get_insights_users(\context $context) {
if ($context->contextlevel === CONTEXT_USER) {
$users = [$context->instanceid => \core_user::get_user($context->instanceid)];
if (!has_capability('moodle/analytics:listowninsights', $context, $context->instanceid)) {
$users = [];
} else {
$users = [$context->instanceid => \core_user::get_user($context->instanceid)];
}
} else if ($context->contextlevel >= CONTEXT_COURSE) {
// At course level or below only enrolled users although this is not ideal for
// teachers assigned at category level.
+2 -2
View File
@@ -65,7 +65,7 @@ class analytics_analysis_testcase extends advanced_testcase {
$this->assertEquals($afewsecsago, $firstanalyses[$modelid . '_' . $course1->id]);
$this->assertEquals($afewsecsago + 1, $firstanalyses[$modelid . '_' . $course2->id]);
// The cached elements gets refreshed.
// The cached elements get refreshed.
$this->insert_used($modelid, $course1->id, 'prediction', $earliest);
$firstanalyses = \core_analytics\analysis::fill_firstanalyses_cache($modelid, $course1->id);
$this->assertCount(1, $firstanalyses);
@@ -78,7 +78,7 @@ class analytics_analysis_testcase extends advanced_testcase {
// The generated ranges should start from the cached firstanalysis value, which is $earliest.
$ranges = $seconds->get_all_ranges();
$this->assertCount(7, $ranges);
$this->assertGreaterThanOrEqual(7, count($ranges));
$firstrange = reset($ranges);
$this->assertEquals($earliest, $firstrange['time']);
}
+1 -1
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/test_target_shortname.php');
require_once(__DIR__ . '/test_target_site_users.php');
/**
* Test target.
+9
View File
@@ -436,6 +436,7 @@ class core_analytics_prediction_testcase extends advanced_testcase {
/**
* Basic test to check that prediction processors work as expected.
*
* @coversNothing
* @dataProvider provider_ml_test_evaluation_configuration
* @param string $modelquality
* @param int $ncourses
@@ -477,6 +478,13 @@ class core_analytics_prediction_testcase extends advanced_testcase {
$message = 'The returned status code ' . $result->status . ' should include ' . $expected[$timesplitting];
$filtered = $result->status & $expected[$timesplitting];
$this->assertEquals($expected[$timesplitting], $filtered, $message);
$options = ['evaluation' => true, 'reuseprevanalysed' => true];
$result = new \core_analytics\local\analysis\result_file($model->get_id(), true, $options);
$timesplittingobj = \core_analytics\manager::get_time_splitting($timesplitting);
$analysable = new \core_analytics\site();
$cachedanalysis = $result->retrieve_cached_result($timesplittingobj, $analysable);
$this->assertInstanceOf(\stored_file::class, $cachedanalysis);
}
set_config('enabled_stores', '', 'tool_log');
@@ -486,6 +494,7 @@ class core_analytics_prediction_testcase extends advanced_testcase {
/**
* Tests the evaluation of already trained models.
*
* @coversNothing
* @dataProvider provider_ml_processors
* @param string $predictionsprocessorclass
* @return null
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+7
View File
@@ -72,6 +72,8 @@ class login implements renderable, templatable {
public $username;
/** @var string The csrf token to limit login to requests that come from the login form. */
public $logintoken;
/** @var string Maintenance message, if Maintenance is enabled. */
public $maintenance;
/**
* Constructor.
@@ -109,6 +111,10 @@ class login implements renderable, templatable {
$this->instructions = get_string('loginsteps', 'core', 'signup.php');
}
if ($CFG->maintenance_enabled == true && !empty($CFG->maintenance_message)) {
$this->maintenance = $CFG->maintenance_message;
}
// Identity providers.
$this->identityproviders = \auth_plugin_base::get_identity_providers($authsequence);
$this->logintoken = \core\session\manager::get_login_token();
@@ -145,6 +151,7 @@ class login implements renderable, templatable {
$data->signupurl = $this->signupurl->out(false);
$data->username = $this->username;
$data->logintoken = $this->logintoken;
$data->maintenance = format_text($this->maintenance, FORMAT_MOODLE);
return $data;
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_db_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_email_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -24,7 +24,7 @@
$string['auth_emaildescription'] = '<p>Email-based self-registration enables a user to create their own account via a \'Create new account\' button on the login page. The user then receives an email containing a secure link to a page where they can confirm their account. Future logins just check the username and password against the stored values in the Moodle database.</p><p>Note: In addition to enabling the plugin, email-based self-registration must also be selected from the self registration drop-down menu on the \'Manage authentication\' page.</p>';
$string['auth_emailnoemail'] = 'Tried to send you an email but failed!';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the sign-up page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha for more details.';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the sign-up page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See https://www.google.com/recaptcha for more details.';
$string['auth_emailrecaptcha_key'] = 'Enable reCAPTCHA element';
$string['auth_emailsettings'] = 'Settings';
$string['pluginname'] = 'Email-based self-registration';
+3
View File
@@ -69,5 +69,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -94,7 +94,7 @@ $string['auth_ldap_usertypeundefined2'] = 'config.user_type not defined or funct
$string['auth_ldap_version'] = 'The version of the LDAP protocol your server is using.';
$string['auth_ldap_version_key'] = 'Version';
$string['auth_ntlmsso'] = 'NTLM SSO';
$string['auth_ntlmsso_enabled'] = 'Set to yes to attempt Single Sign On with the NTLM domain. <strong>Note:</strong> this requires additional setup on the webserver to work, see <a href="http://docs.moodle.org/en/NTLM_authentication">http://docs.moodle.org/en/NTLM_authentication</a>';
$string['auth_ntlmsso_enabled'] = 'Set to yes to attempt Single Sign On with the NTLM domain. Note that this requires additional setup on the server to work. For further details, see the documentation <a href="https://docs.moodle.org/en/NTLM_authentication">NTLM authentication</a>.';
$string['auth_ntlmsso_enabled_key'] = 'Enable';
$string['auth_ntlmsso_ie_fastpath'] = 'Set to enable the NTLM SSO fast path (bypasses certain steps if the client\'s browser is MS Internet Explorer).';
$string['auth_ntlmsso_ie_fastpath_key'] = 'MS IE fast path?';
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_none_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1
View File
@@ -36,6 +36,7 @@ use core\oauth2\client;
require_once($CFG->libdir.'/authlib.php');
require_once($CFG->dirroot.'/user/lib.php');
require_once($CFG->dirroot.'/user/profile/lib.php');
/**
* Plugin for oauth2 authentication.
+3
View File
@@ -47,5 +47,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -51,5 +51,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -28,7 +28,7 @@ $string['auth_shib_auth_method_description'] = 'Provide a name for the Shibbolet
$string['auth_shib_auth_logo'] = 'Authentication method logo';
$string['auth_shib_auth_logo_description'] = 'Provide a logo for the Shibboleth authentication method that is familiar to your users. This could be the logo of your Shibboleth federation, e.g. <tt>SWITCHaai Login</tt> or <tt>InCommon Login</tt> or similar.';
$string['auth_shib_contact_administrator'] = 'In case you are not associated with the given organizations and you need access to a course on this server, please contact the <a href="mailto:{$a}">Moodle Administrator</a>.';
$string['auth_shibbolethdescription'] = 'Using this method users are created and authenticated using <a href="http://shibboleth.internet2.edu/">Shibboleth</a>.<br />Be sure to read the <a href="../auth/shibboleth/README.txt">README</a> for Shibboleth on how to set up your Moodle with Shibboleth';
$string['auth_shibbolethdescription'] = 'Using this method users are created and authenticated using Shibboleth. For set-up details, see the <a href="../auth/shibboleth/README.txt">Shibboleth README</a>.';
$string['auth_shibboleth_errormsg'] = 'Please select the organization you are member of!';
$string['auth_shibboleth_login'] = 'Shibboleth login';
$string['auth_shibboleth_login_long'] = 'Login to Moodle via Shibboleth';
@@ -92,3 +92,25 @@ Feature: availability_grouping
# P1 should show but not B2.
Then I should see "P1" in the "region-main" "region"
And I should not see "P2" in the "region-main" "region"
@javascript
Scenario: Check grouping access restriction message on course homepage
Given the following "groupings" exist:
| name | course | idnumber |
| Grouping A | C1 | GA |
And the following "grouping groups" exist:
| grouping | group |
| GA | GI1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | grouping |
| assign | Test assign | Assign description | C1 | assign1 | 1 | GA |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I turn editing mode on
And I open "Test assign" actions menu
And I choose "Edit settings" in the open action menu
And I expand all fieldsets
And the field "groupingid" matches value "Grouping A"
And I press "Add group/grouping access restriction"
When I press "Save and return to course"
Then I should see "Not available unless: You belong to a group in Grouping A"
@@ -332,6 +332,21 @@ class restore_controller extends base_controller {
public function get_plan() {
return $this->plan;
}
/**
* Gets the value for the requested setting
*
* @param string $name
* @param bool $default
* @return mixed
*/
public function get_setting_value($name, $default = false) {
try {
return $this->get_plan()->get_setting($name)->get_value();
} catch (Exception $e) {
debugging('Failed to find the setting: '.$name, DEBUG_DEVELOPER);
return $default;
}
}
public function get_info() {
return $this->info;
@@ -341,6 +356,14 @@ class restore_controller extends base_controller {
// Basic/initial prevention against time/memory limits
core_php_time_limit::raise(1 * 60 * 60); // 1 hour for 1 course initially granted
raise_memory_limit(MEMORY_EXTRA);
// Do course cleanup precheck, if required. This was originally in restore_ui. Moved to handle async backup/restore.
if ($this->get_target() == backup::TARGET_CURRENT_DELETING || $this->get_target() == backup::TARGET_EXISTING_DELETING) {
$options = array();
$options['keep_roles_and_enrolments'] = $this->get_setting_value('keep_roles_and_enrolments');
$options['keep_groups_and_groupings'] = $this->get_setting_value('keep_groups_and_groupings');
restore_dbops::delete_course_content($this->get_courseid(), $options);
}
// If this is not a course restore or single activity restore (e.g. duplicate), inform the plan we are not
// including all the activities for sure. This will affect any
// task/step executed conditionally to stop processing information
+9
View File
@@ -71,6 +71,9 @@ class core_backup_external extends external_api {
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
// Release session lock.
\core\session\manager::write_close();
// Parameter validation.
self::validate_parameters(
self::get_async_backup_progress_parameters(),
@@ -142,6 +145,9 @@ class core_backup_external extends external_api {
* @since Moodle 3.7
*/
public static function get_async_backup_links_backup($filename, $contextid) {
// Release session lock.
\core\session\manager::write_close();
// Parameter validation.
self::validate_parameters(
self::get_async_backup_links_backup_parameters(),
@@ -206,6 +212,9 @@ class core_backup_external extends external_api {
* @since Moodle 3.7
*/
public static function get_async_backup_links_restore($backupid, $contextid) {
// Release session lock.
\core\session\manager::write_close();
// Parameter validation.
self::validate_parameters(
self::get_async_backup_links_restore_parameters(),
+12 -3
View File
@@ -1980,6 +1980,12 @@ class restore_course_structure_step extends restore_structure_step {
}
$capability = 'mod/' . $modname . ':addinstance';
if (!get_capability_info($capability)) {
$this->log("Capability '{$capability}' was not found!", backup::LOG_WARNING);
continue;
}
foreach ($roleids as $roleid) {
assign_capability($capability, CAP_PREVENT, $roleid, $context);
}
@@ -2107,9 +2113,12 @@ class restore_ras_and_caps_structure_step extends restore_structure_step {
$newroleid = $this->get_mappingid('role', $data->roleid);
// If newroleid and context are valid assign it via API (it handles dupes and so on)
if ($newroleid && $this->task->get_contextid()) {
// TODO: assign_capability() needs one userid param to be able to specify our restore userid
// TODO: it seems that assign_capability() doesn't check for valid capabilities at all ???
assign_capability($data->capability, $data->permission, $newroleid, $this->task->get_contextid());
if (!get_capability_info($data->capability)) {
$this->log("Capability '{$data->capability}' was not found!", backup::LOG_WARNING);
} else {
// TODO: assign_capability() needs one userid param to be able to specify our restore userid.
assign_capability($data->capability, $data->permission, $newroleid, $this->task->get_contextid());
}
}
}
}
@@ -128,15 +128,6 @@ abstract class backup_check {
// Now, if backup mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (backupxxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/backup:backuptargethub', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/backup:backuptargethub';
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
break;
case backup::MODE_IMPORT:
if (!has_capability('moodle/backup:backuptargetimport', $coursectx, $userid)) {
$a = new stdclass();
@@ -90,15 +90,6 @@ abstract class restore_check {
// Now, if restore mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (restorexxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/restore:restoretargethub', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/restore:restoretargethub';
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
break;
case backup::MODE_IMPORT:
if (!has_capability('moodle/restore:restoretargetimport', $coursectx, $userid)) {
$a = new stdclass();
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/str","core/notification","core/templates"],function(a,b,c,d,e){function f(b,c){var d=Math.round(c)+"%",e=a("#"+b+"_bar"),f=c.toFixed(2)+"%";e.attr("aria-valuenow",d),e.css("width",d),e.text(f)}function g(c){var f=a("#"+c+"_bar").parent().parent(),g=f.parent(),h=f.siblings(),i=h[1],j=a(i).text(),k=h[0],l=a(k).text();b.call([{methodname:"core_backup_get_async_backup_links_backup",args:{filename:l,contextid:n}}])[0].done(function(a){var b={filename:l,time:j,size:a.filesize,fileurl:a.fileurl,restoreurl:a.restoreurl};e.render("core/async_backup_progress_row",b).then(function(a,b){e.replaceNodeContents(g,a,b)}).fail(function(){d.exception(new Error("Failed to load table row"))})})}function h(c){var f=a("#"+c+"_bar").parent().parent(),g=f.parent(),h=f.siblings(),i=h[0],j=h[1],k=a(j).text();b.call([{methodname:"core_backup_get_async_backup_links_restore",args:{backupid:c,contextid:n}}])[0].done(function(b){var c=a(i).text(),f={resourcename:c,restoreurl:b.restoreurl,time:k};e.render("core/async_restore_progress_row",f).then(function(a,b){e.replaceNodeContents(g,a,b)}).fail(function(){d.exception(new Error("Failed to load table row"))})})}function i(e){var g,h=100*e.progress,i=a("#"+m+"_bar"),j=a("#"+m+"_status"),k=a("#"+m+"_detail"),l=a("#"+m+"_button");if(e.status==s){i.addClass("bg-success"),f(m,h);var r="async"+p+"processing";c.get_string(r,"backup").then(function(a){return j.text(a),a})["catch"](function(){d.exception(new Error("Failed to load string: backup "+r))})}else if(e.status==t){i.addClass("bg-danger"),i.removeClass("bg-success"),f(m,100);var v="async"+p+"error",w="async"+p+"errordetail";g=[{key:v,component:"backup"},{key:w,component:"backup"}],c.get_strings(g).then(function(a){return j.text(a[0]),k.text(a[1]),a})["catch"](function(){d.exception(new Error("Failed to load string"))}),a(".backup_progress").children("span").removeClass("backup_stage_current"),a(".backup_progress").children("span").last().addClass("backup_stage_current"),clearInterval(q)}else if(e.status==u){i.addClass("bg-success"),f(m,100);var x="async"+p+"complete";if(c.get_string(x,"backup").then(function(a){return j.text(a),a})["catch"](function(){d.exception(new Error("Failed to load string: backup "+x))}),"restore"==p)b.call([{methodname:"core_backup_get_async_backup_links_restore",args:{backupid:m,contextid:n}}])[0].done(function(a){var b="async"+p+"completedetail",e="async"+p+"completebutton",f=[{key:b,component:"backup",param:a.restoreurl},{key:e,component:"backup"}];c.get_strings(f).then(function(b){return k.html(b[0]),l.text(b[1]),l.attr("href",a.restoreurl),b})["catch"](function(){d.exception(new Error("Failed to load string"))})});else{var y="async"+p+"completedetail",z="async"+p+"completebutton";g=[{key:y,component:"backup",param:o},{key:z,component:"backup"}],c.get_strings(g).then(function(a){return k.html(a[0]),l.text(a[1]),l.attr("href",o),a})["catch"](function(){d.exception(new Error("Failed to load string"))})}a(".backup_progress").children("span").removeClass("backup_stage_current"),a(".backup_progress").children("span").last().addClass("backup_stage_current"),clearInterval(q)}}function j(b){b.forEach(function(b){var c=100*b.progress,d=b.backupid,e=a("#"+d+"_bar"),i=b.operation;b.status==s?(e.addClass("bg-success"),f(d,c)):b.status==t?(e.addClass("bg-danger"),e.addClass("complete"),a("#"+d+"_bar").removeClass("bg-success"),f(d,100)):b.status==u&&(e.addClass("bg-success"),e.addClass("complete"),f(d,100),"backup"==i?g(d):h(d))})}function k(){b.call([{methodname:"core_backup_get_async_backup_progress",args:{backupids:[m],contextid:n}}])[0].done(function(a){i(a[0])})}function l(){var c=[],d=a(".progress").find(".progress-bar").not(".complete");d.each(function(){c.push(this.id.substring(0,32))}),c.length>0?b.call([{methodname:"core_backup_get_async_backup_progress",args:{backupids:c,contextid:n}}])[0].done(function(a){j(a)}):clearInterval(r)}var m,n,o,p,q,r,s=800,t=900,u=1e3,v={},w=5e3;return v.asyncBackupAllStatus=function(a){n=a,r=setInterval(l,w)},v.asyncBackupStatus=function(b,c,d,e){m=b,n=c,o=d,p="backup"==e?"backup":"restore",a(".backup_progress").children("a").removeAttr("href"),q=setInterval(k,w)},v});
define(["jquery","core/ajax","core/str","core/notification","core/templates"],function(a,b,c,d,e){function f(b,c){var d=Math.round(c)+"%",e=a("#"+b+"_bar"),f=c.toFixed(2)+"%";e.attr("aria-valuenow",d),e.css("width",d),e.text(f)}function g(c){var f=a("#"+c+"_bar").parent().parent(),g=f.parent(),h=f.siblings(),i=h[1],j=a(i).text(),k=h[0],l=a(k).text();b.call([{methodname:"core_backup_get_async_backup_links_backup",args:{filename:l,contextid:n}}])[0].done(function(a){var b={filename:l,time:j,size:a.filesize,fileurl:a.fileurl,restoreurl:a.restoreurl};e.render("core/async_backup_progress_row",b).then(function(a,b){e.replaceNodeContents(g,a,b)}).fail(function(){d.exception(new Error("Failed to load table row"))})})}function h(c){var f=a("#"+c+"_bar").parent().parent(),g=f.parent(),h=f.siblings(),i=h[0],j=h[1],k=a(j).text();b.call([{methodname:"core_backup_get_async_backup_links_restore",args:{backupid:c,contextid:n}}])[0].done(function(b){var c=a(i).text(),f={resourcename:c,restoreurl:b.restoreurl,time:k};e.render("core/async_restore_progress_row",f).then(function(a,b){e.replaceNodeContents(g,a,b)}).fail(function(){d.exception(new Error("Failed to load table row"))})})}function i(e){var g,h=100*e.progress,i=a("#"+m+"_bar"),j=a("#"+m+"_status"),k=a("#"+m+"_detail"),l=a("#"+m+"_button");if(e.status==s){i.addClass("bg-success"),f(m,h);var r="async"+p+"processing";c.get_string(r,"backup").then(function(a){return j.text(a),a})["catch"](function(){d.exception(new Error("Failed to load string: backup "+r))})}else if(e.status==t){i.addClass("bg-danger"),i.removeClass("bg-success"),f(m,100);var v="async"+p+"error",w="async"+p+"errordetail";g=[{key:v,component:"backup"},{key:w,component:"backup"}],c.get_strings(g).then(function(a){return j.text(a[0]),k.text(a[1]),a})["catch"](function(){d.exception(new Error("Failed to load string"))}),a(".backup_progress").children("span").removeClass("backup_stage_current"),a(".backup_progress").children("span").last().addClass("backup_stage_current"),clearInterval(q)}else if(e.status==u){i.addClass("bg-success"),f(m,100);var x="async"+p+"complete";if(c.get_string(x,"backup").then(function(a){return j.text(a),a})["catch"](function(){d.exception(new Error("Failed to load string: backup "+x))}),"restore"==p)b.call([{methodname:"core_backup_get_async_backup_links_restore",args:{backupid:m,contextid:n}}])[0].done(function(a){var b="async"+p+"completedetail",e="async"+p+"completebutton",f=[{key:b,component:"backup",param:a.restoreurl},{key:e,component:"backup"}];c.get_strings(f).then(function(b){return k.html(b[0]),l.text(b[1]),l.attr("href",a.restoreurl),b})["catch"](function(){d.exception(new Error("Failed to load string"))})});else{var y="async"+p+"completedetail",z="async"+p+"completebutton";g=[{key:y,component:"backup",param:o},{key:z,component:"backup"}],c.get_strings(g).then(function(a){return k.html(a[0]),l.text(a[1]),l.attr("href",o),a})["catch"](function(){d.exception(new Error("Failed to load string"))})}a(".backup_progress").children("span").removeClass("backup_stage_current"),a(".backup_progress").children("span").last().addClass("backup_stage_current"),clearInterval(q)}}function j(b){b.forEach(function(b){var c=100*b.progress,d=b.backupid,e=a("#"+d+"_bar"),i=b.operation;b.status==s?(e.addClass("bg-success"),f(d,c)):b.status==t?(e.addClass("bg-danger"),e.addClass("complete"),a("#"+d+"_bar").removeClass("bg-success"),f(d,100)):b.status==u&&(e.addClass("bg-success"),e.addClass("complete"),f(d,100),"backup"==i?g(d):h(d))})}function k(){b.call([{methodname:"core_backup_get_async_backup_progress",args:{backupids:[m],contextid:n}}])[0].done(function(a){i(a[0])})}function l(){var c=[],d=a(".progress").find(".progress-bar").not(".complete");d.each(function(){c.push(this.id.substring(0,32))}),c.length>0?b.call([{methodname:"core_backup_get_async_backup_progress",args:{backupids:c,contextid:n}}])[0].done(function(a){j(a)}):clearInterval(r)}var m,n,o,p,q,r,s=800,t=900,u=1e3,v={},w=15e3;return v.asyncBackupAllStatus=function(a){n=a,r=setInterval(l,w)},v.asyncBackupStatus=function(b,c,d,e){m=b,n=c,o=d,p="backup"==e?"backup":"restore",a(".backup_progress").children("a").removeAttr("href"),q=setInterval(k,w)},v});
+1 -1
View File
@@ -39,7 +39,7 @@ define(['jquery', 'core/ajax', 'core/str', 'core/notification', 'core/templates'
* Module level variables.
*/
var Asyncbackup = {};
var checkdelay = 5000; // How often we check for progress updates.
var checkdelay = 15000; // How often we check for progress updates.
var backupid; // The backup id to get the progress for.
var contextid; // The course this backup progress is for.
var restoreurl; // The URL to view course restores.
+6 -4
View File
@@ -381,8 +381,10 @@ class core_backup_renderer extends plugin_renderer_base {
$html .= $this->output->heading(get_string('importdatafrom'), 2, array('class' => 'header'));
$html .= $this->backup_detail_pair(get_string('selectacourse', 'backup'), $this->render($courses));
$attrs = array('type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary');
$html .= html_writer::start_tag('div', array('class' => 'mt-3'));
$html .= $this->backup_detail_pair('', html_writer::empty_tag('input', $attrs));
$html .= html_writer::end_tag('div');
$html .= html_writer::end_tag('div');
$html .= html_writer::end_tag('form');
$html .= html_writer::end_tag('div');
return $html;
@@ -764,7 +766,7 @@ class core_backup_renderer extends plugin_renderer_base {
if ($component->get_count() === 0) {
$output .= $this->output->notification(get_string('nomatchingcourses', 'backup'));
$output .= html_writer::start_tag('div', array('class' => 'ics-search'));
$output .= html_writer::start_tag('div', array('class' => 'ics-search form-inline'));
$attrs = array(
'type' => 'text',
'name' => restore_course_search::$VAR_SEARCH,
@@ -776,7 +778,7 @@ class core_backup_renderer extends plugin_renderer_base {
'type' => 'submit',
'name' => 'searchcourses',
'value' => get_string('search'),
'class' => 'btn btn-secondary'
'class' => 'btn btn-secondary ml-1'
);
$output .= html_writer::empty_tag('input', $attrs);
$output .= html_writer::end_tag('div');
@@ -822,7 +824,7 @@ class core_backup_renderer extends plugin_renderer_base {
$output .= html_writer::table($table);
$output .= html_writer::end_tag('div');
$output .= html_writer::start_tag('div', array('class' => 'ics-search'));
$output .= html_writer::start_tag('div', array('class' => 'ics-search form-inline'));
$attrs = array(
'type' => 'text',
'name' => restore_course_search::$VAR_SEARCH,
@@ -833,7 +835,7 @@ class core_backup_renderer extends plugin_renderer_base {
'type' => 'submit',
'name' => 'searchcourses',
'value' => get_string('search'),
'class' => 'btn btn-secondary'
'class' => 'btn btn-secondary ml-1'
);
$output .= html_writer::empty_tag('input', $attrs);
$output .= html_writer::end_tag('div');
+1 -6
View File
@@ -215,12 +215,7 @@ class restore_ui extends base_ui {
if ($this->stage->get_stage() < self::STAGE_PROCESS) {
throw new restore_ui_exception('restoreuifinalisedbeforeexecute');
}
if ($this->controller->get_target() == backup::TARGET_CURRENT_DELETING || $this->controller->get_target() == backup::TARGET_EXISTING_DELETING) {
$options = array();
$options['keep_roles_and_enrolments'] = $this->get_setting_value('keep_roles_and_enrolments');
$options['keep_groups_and_groupings'] = $this->get_setting_value('keep_groups_and_groupings');
restore_dbops::delete_course_content($this->controller->get_courseid(), $options);
}
$this->controller->execute_plan();
$this->progress = self::PROGRESS_EXECUTED;
$this->stage = new restore_ui_stage_complete($this, $this->stage->get_params(), $this->controller->get_results());
+10 -9
View File
@@ -79,24 +79,25 @@ class collections extends moodleform {
$hasgroups = false;
if (!empty($groups)) {
foreach ($groups as $group) {
// Assertions or badges.
$count = 0;
// Handle attributes based on backpack's supported version.
if ($sitebackpack->apiversion == OPEN_BADGES_V2) {
// OpenBadges v2 data attributes.
if (empty($group->published)) {
// Only public collections.
continue;
}
}
if (!empty($group->assertions)) {
// Get the number of badges associated with this collection from the assertions array returned.
$count = count($group->assertions);
}
if (!empty($group->badges)) {
$count = count($group->badges);
}
if (!empty($group->groupId)) {
} else {
// OpenBadges v1 data attributes.
$group->entityId = $group->groupId;
// Get the number of badges associated with this collection. In that case, the number is returned directly.
$count = $group->badges;
}
if (!$hasgroups) {
$mform->addElement('static', 'selectgroup', '', get_string('selectgroup_start', 'badges'));
}

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