Compare commits

..

902 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) e6973df683 Moodle release 3.1.12 2018-05-16 18:42:02 +02:00
Marina Glancy 7d7ca07870 MDL-62469 qtype_calculated: check remaining placeholders, see MDL-62275
Amended for phpunit 4.x exception expectations.
2018-05-16 18:04:59 +02:00
David Monllao 8398fbe8b6 weekly release 3.1.11+ 2018-05-15 09:42:19 +02:00
David Monllao 7c362df750 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-05-15 09:42:18 +02:00
AMOS bot 550b956e23 Automatically generated installer lang files 2018-05-15 00:07:06 +00:00
AMOS bot 59dbf60906 Automatically generated installer lang files 2018-05-13 00:07:23 +00:00
Eloy Lafuente (stronk7) f6f7a788ac MDL-62416 question_calculated: fix const to work under php54 2018-05-12 18:55:31 +02:00
Eloy Lafuente (stronk7) b6c0d8fc2a MDL-62275 qtype_calculatedmulti: Fix typo 2018-05-11 21:18:49 +02:00
Tim Hunt b7bbe9fd94 MDL-62275 qtype_calc*: improve validation of formulae
Many thanks to Marina Glancy for helping with this.
2018-05-11 01:44:17 +02:00
Marina Glancy f6da281a83 MDL-62206 blocks: do not add fixed form elements as hidden 2018-05-10 12:09:27 +08:00
Adam Olley f72830b4f0 MDL-62210 mod_assign: limit file lookup to the target assign 2018-05-10 11:22:39 +08:00
Brendan Cox ecd1bce400 MDL-62210 mod_assign: improved validation in portfolio caller class 2018-05-10 11:22:39 +08:00
Jun Pataleta 6c0e979eda MDL-62232 mod_forum: Use setExpectedException() 2018-05-10 09:21:06 +08:00
Brendan Cox 3ff27109ec MDL-62232 mod_forum: Additional tests for portfolio file export 2018-05-10 09:21:06 +08:00
Adam Olley f06f4603b8 MDL-62232 mod_forum: Limit portfolio to files belonging to the post 2018-05-10 09:21:06 +08:00
Marina Glancy 7bed262b8f MDL-62233 portfolio: check caller parent class 2018-05-10 09:21:05 +08:00
Marina Glancy e9ba7022fc MDL-61996 core: when loggedin always check user is complete 2018-05-09 12:10:02 +08:00
Jun Pataleta 60aab30175 weekly release 3.1.11+ 2018-05-09 12:00:59 +08:00
Jun Pataleta 85e9ee2175 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-05-09 12:00:57 +08:00
Jake Dallimore 10426ccf9d Merge branch 'MDL-62280-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-05-03 10:55:04 +08:00
AMOS bot babe95c9dc Automatically generated installer lang files 2018-05-03 00:07:08 +00:00
Andrew Nicols 9a15bdc97f MDL-62280 xhprof: Support tideways_xhprof 2018-05-01 11:03:49 +08:00
AMOS bot 86f0bb4591 Automatically generated installer lang files 2018-05-01 00:07:45 +00:00
AMOS bot b0d7351cff Automatically generated installer lang files 2018-04-30 00:07:08 +00:00
AMOS bot ad5761237a Automatically generated installer lang files 2018-04-16 00:07:54 +00:00
AMOS bot d98544a729 Automatically generated installer lang files 2018-04-11 00:07:57 +00:00
AMOS bot 1dd71c502a Automatically generated installer lang files 2018-03-31 00:07:48 +00:00
Jun Pataleta fae9236939 weekly release 3.1.11+ 2018-03-29 12:55:45 +08:00
Jun Pataleta 36a7b9f234 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-03-29 12:55:43 +08:00
Jake Dallimore 878d69b794 Merge branch 'MDL-61770-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-03-28 13:32:54 +08:00
Andrew Nicols 2032491730 MDL-61770 iplookup: Check types rather than values 2018-03-28 11:38:45 +08:00
AMOS bot 7b2fc2b81e Automatically generated installer lang files 2018-03-25 00:06:59 +00:00
AMOS bot c8fe4d8b88 Automatically generated installer lang files 2018-03-21 00:06:46 +00:00
AMOS bot 567c0bb51d Automatically generated installer lang files 2018-03-20 00:06:46 +00:00
AMOS bot fe8a827cb0 Automatically generated installer lang files 2018-03-20 00:06:45 +00:00
Eloy Lafuente (stronk7) e25e165231 Moodle release 3.1.11 2018-03-17 01:18:16 +01:00
Eloy Lafuente (stronk7) fdcf7fb3f6 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-03-17 01:18:13 +01:00
David Mudrák 88bd118665 MDL-61392 enrol_paypal: Improve IPN input parameters checking 2018-03-14 09:19:02 +08:00
David Mudrák b061fba2c4 MDL-61392 enrol_paypal: Improve the IPN notifications handling
* Notify administrators once incoming IPN request is verified by PayPal.
* Fix the HTTP status as expected by the IPN protocol.
2018-03-14 09:19:02 +08:00
Eloy Lafuente (stronk7) 7f5f07b68e Merge branch 'MDL-48501-mdl31' of git://github.com/jswebster/moodle into MOODLE_31_STABLE 2018-03-12 23:51:49 +01:00
Jeff Webster 6843744660 MDL-48501 mod_feedback: update feedback to use reCAPTCHA v2 2018-03-07 17:49:47 -05:00
Jeff Webster fe82348810 MDL-48501 login: update signup_form to use reCAPTCHA v2 2018-03-07 17:49:46 -05:00
Jeff Webster cfefd25d6c MDL-48501 form/recaptcha: update to use reCAPTCHA v2 2018-03-07 17:01:01 -05:00
Jeff Webster 956166b766 MDL-48501 recaptchalib_v2: add new lib to support reCAPTCHA v2 2018-03-07 17:01:01 -05:00
Jeff Webster c692bb567f MDL-48501 lang: update reCAPTCHA language strings 2018-03-07 15:52:02 -05:00
AMOS bot 70a7b23df5 Automatically generated installer lang files 2018-03-07 00:07:03 +00:00
AMOS bot 42c5d3aa9d Automatically generated installer lang files 2018-02-19 00:06:59 +00:00
AMOS bot f0a15feedb Automatically generated installer lang files 2018-02-17 00:07:02 +00:00
David Monllao 2078761831 weekly release 3.1.10+ 2018-02-08 17:40:21 +01:00
Andrew Nicols 6fb9c39256 Merge branch 'MDL-61269_31' of git://github.com/stronk7/moodle into MOODLE_31_STABLE 2018-02-05 17:55:08 +08:00
David Monllao 8103058154 weekly release 3.1.10+ 2018-02-01 14:26:54 +01:00
David Monllao f9000970ca Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-02-01 14:26:53 +01:00
AMOS bot 2412171944 Automatically generated installer lang files 2018-02-01 00:07:20 +00:00
David Mudrák ea12e51d4d MDL-61242 repository_equella: Fix missing class repository
The call to the class 'repository' introduced in the commit d05c2ac7cc
didn't fully work and threw: "Exception - Class 'repository' not found".
This fixes the missing library inclusion.
2018-01-31 23:42:58 +01:00
AMOS bot 40b1f7f86d Automatically generated installer lang files 2018-01-31 00:07:08 +00:00
AMOS bot e052fe614f Automatically generated installer lang files 2018-01-30 00:07:08 +00:00
Eloy Lafuente (stronk7) 52c730014e Merge branch 'wip-MDL-61242-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2018-01-29 16:35:57 +08:00
Andrew Nicols 787727c745 weekly release 3.1.10+ 2018-01-29 11:02:31 +08:00
Andrew Nicols 5e99464c96 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-01-29 11:02:28 +08:00
Eloy Lafuente (stronk7) 46ecac536c MDL-61269 behat-extension: bump to fix some caps & defaults 2018-01-25 00:55:14 +01:00
Adrian Greeve b4e05280c1 MDL-61242 repository_equella: Add source key when sending the source.
A thank you to Nelson Cheng for find this issue and suggesting a patch.
2018-01-20 11:03:58 +08:00
AMOS bot 572838664d Automatically generated installer lang files 2018-01-19 00:07:34 +00:00
AMOS bot 2090c294bc Automatically generated installer lang files 2018-01-17 00:06:58 +00:00
Jun Pataleta a9c4c8da11 Merge branch 'MDL-61221-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-01-16 23:02:14 +08:00
Andrew Nicols 499c8d894d MDL-61221 badges: Ignore site availabilty for behat
Behat sites should not be available publically, and the check against
the backpack API for site availablity can time out in some situations.

We should be testing as though the site _is_ available, as this is the
standard expectation.
2018-01-16 13:26:30 +08:00
Eloy Lafuente (stronk7) 16ab239fb4 Merge branch 'MDL-61204-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2018-01-16 02:17:39 +01:00
Andrew Nicols 4940aa5152 MDL-61204 user: Fix random failure in behat
We need to get into the habit of not using usernames like 'student1'
and 'student10' as our matches are non-strict, and the tests become
dependent upon DB sort order.

This change adds a character after the varying value to act as a
delimter for all of these tests.
2018-01-16 08:33:09 +08:00
AMOS bot 3e130de203 Automatically generated installer lang files 2018-01-16 00:07:14 +00:00
Eloy Lafuente (stronk7) f41a173317 Moodle release 3.1.10 2018-01-12 20:35:29 +01:00
Eloy Lafuente (stronk7) dc7420d411 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2018-01-12 20:35:27 +01:00
Adrian Greeve 96e40b6cfc MDL-61131 repositories: Added a key to verify incoming urls. 2018-01-09 11:35:05 +01:00
Simey Lameze a1eb47211d MDL-60235 core_calendar: clean event name field 2018-01-08 22:05:36 +08:00
Juan Leyva f5f0074aee MDL-60908 mod_quiz: Return question state only when configured
The question state should be returned following the quiz review options
settings.
2018-01-08 22:05:36 +08:00
Andrew Nicols ea8f903568 MDL-61169 iplookup: Change to github.com IP 2018-01-08 15:02:47 +01:00
AMOS bot 51a43f5fa7 Automatically generated installer lang files 2018-01-04 00:07:36 +00:00
AMOS bot 2edcf6861a Automatically generated installer lang files 2018-01-03 00:06:55 +00:00
AMOS bot bd5779cfb5 Automatically generated installer lang files 2017-12-18 00:06:49 +00:00
Eloy Lafuente (stronk7) 5a13113b07 weekly release 3.1.9+ 2017-12-14 14:47:35 +01:00
Eloy Lafuente (stronk7) 6ac052dbc4 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-12-14 14:47:34 +01:00
AMOS bot c8c5e35bb1 Automatically generated installer lang files 2017-12-14 00:06:41 +00:00
Damyon Wiese 28964ed251 Merge branch 'MDL-61002-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-12-11 09:49:00 +08:00
Andrew Nicols e362c66d49 MDL-61002 iplookup: Improve test stability 2017-12-11 08:12:43 +08:00
AMOS bot 977861a47b Automatically generated installer lang files 2017-12-08 00:10:26 +00:00
Jun Pataleta b8067e0b01 weekly release 3.1.9+ 2017-12-08 09:09:56 +13:00
Andrew Nicols cf877600b7 Merge branch 'MDL-59159_31' of git://github.com/stronk7/moodle into MOODLE_31_STABLE 2017-12-06 10:06:26 +08:00
Eloy Lafuente (stronk7) d1660a6aae MDL-59159 environment: 3.1 (LTS) required 2017-12-04 02:05:42 +01:00
Eloy Lafuente (stronk7) e0b391da98 MDL-59159 environment: 3.5 base information
This is a direct copy of the 3.4 branch to
have changes under control easier in next commits.
2017-12-04 02:05:41 +01:00
Eloy Lafuente (stronk7) 687aad78bd Moodle release 3.1.9 2017-11-11 19:29:23 +01:00
Eloy Lafuente (stronk7) 21144b8419 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-11-11 19:29:19 +01:00
AMOS bot 0372a0accb Automatically generated installer lang files 2017-11-11 00:06:07 +00:00
AMOS bot fea4000d5e Automatically generated installer lang files 2017-11-09 00:05:29 +00:00
AMOS bot 7105cb7684 Automatically generated installer lang files 2017-11-08 00:05:29 +00:00
AMOS bot d868aafa8e Automatically generated installer lang files 2017-11-05 00:07:15 +00:00
Sara Arjona 54bb01439e MDL-60550 user: Add more restrictions in keyword searches
Original patch provided by Tim Schroeder.
2017-10-31 11:55:28 +13:00
David Monllao 0b42937599 weekly release 3.1.8+ 2017-10-27 12:48:23 +02:00
David Monllao fab3e4fa3d Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-10-27 12:48:22 +02:00
Damyon Wiese 2393486db4 Merge branch 'MDL-60366_feedback_upgrade_31' of git://github.com/davosmith/moodle into MOODLE_31_STABLE 2017-10-26 16:05:16 +08:00
Andrew Nicols 853fbda447 Merge branch 'wip-MDL-60543-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-10-26 14:35:45 +08:00
AMOS bot 007edbdecb Automatically generated installer lang files 2017-10-25 00:06:28 +08:00
Davo Smith c614487d2d MDL-60366 mod_feedback: fix deletion of valid anonymous duplicates 2017-10-24 09:38:49 +01:00
Marina Glancy 58643c8b11 MDL-60543 env: Moodle 3.2 and 3.3 do no support PHP7.2 2017-10-23 14:25:43 +08:00
AMOS bot 9cdf50cb79 Automatically generated installer lang files 2017-10-14 00:09:00 +08:00
AMOS bot 03bfea8134 Automatically generated installer lang files 2017-10-10 00:12:39 +08:00
AMOS bot 9962df9eb3 Automatically generated installer lang files 2017-09-29 00:06:41 +08:00
AMOS bot 6f845655e5 Automatically generated installer lang files 2017-09-22 00:08:45 +08:00
AMOS bot 1ff9dccd8d Automatically generated installer lang files 2017-09-22 00:08:45 +08:00
AMOS bot 5fd13b5970 Automatically generated installer lang files 2017-09-21 00:06:44 +08:00
AMOS bot f79a3236ea Automatically generated installer lang files 2017-09-13 00:07:27 +08:00
Eloy Lafuente (stronk7) 25fd679aaf Moodle release 3.1.8 2017-09-09 22:48:00 +02:00
Eloy Lafuente (stronk7) 93cca9afbe Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-09-09 22:47:57 +02:00
David Mudrák 26663756fb MDL-59969 admin: Warn admins if a development libs directory exists
We can't really control the direct web access to directories in dirroot,
that is part of the server setup. So we at least warn admins as they may
not realize the risks of having directories like vendor or node_modules
exposed.

Credit goes to Petr Škoda for mentioning the PHPUnit issue CVE-2017-9841
to me.
2017-09-05 21:59:01 +08:00
Marina Glancy e404606458 MDL-59972 mod_feedback: escape subject when showing the contact form 2017-09-04 11:31:15 +08:00
Jake Dallimore 68b925e274 MDL-58953 user: additional test case for user_can_view_profile() 2017-08-30 10:35:51 +08:00
Jake Dallimore 0a8190569f MDL-58953 user: fix course checking logic in user_can_view_profile()
Make sure to check that $user in enrolled in $course before checking
whether the current user has capabilities in that course, and make sure
that we don't check user context caps when handling a specific course.
2017-08-30 10:35:51 +08:00
AMOS bot d95fb5245b Automatically generated installer lang files 2017-08-29 00:08:35 +08:00
AMOS bot fcea6de794 Automatically generated installer lang files 2017-08-28 00:10:01 +08:00
AMOS bot e5b89df732 Automatically generated installer lang files 2017-08-26 00:07:44 +08:00
AMOS bot 67ea841f41 Automatically generated installer lang files 2017-08-25 00:06:23 +08:00
AMOS bot a64872eb59 Automatically generated installer lang files 2017-08-25 00:06:23 +08:00
AMOS bot 5d20a3ed14 Automatically generated installer lang files 2017-08-17 00:09:03 +08:00
Simey Lameze 39aacd1dfe MDL-59776 core_calendar: unit tests of module events deletion 2017-08-15 11:34:25 +08:00
Simey Lameze bc312c648a MDL-59776 core_calendar: prevent deletion of module events 2017-08-15 11:34:25 +08:00
AMOS bot b545f830d0 Automatically generated installer lang files 2017-08-14 00:09:03 +08:00
AMOS bot 5325b4efe1 Automatically generated installer lang files 2017-07-31 00:10:57 +08:00
AMOS bot c6d38b89dc Automatically generated installer lang files 2017-07-29 00:11:21 +08:00
AMOS bot 73e0775d26 Automatically generated installer lang files 2017-07-26 00:08:17 +08:00
AMOS bot e4eb50ae15 Automatically generated installer lang files 2017-07-23 00:09:26 +08:00
AMOS bot 34e60f0dbf Automatically generated installer lang files 2017-07-22 00:08:38 +08:00
AMOS bot 5f2a1f0c36 Automatically generated installer lang files 2017-07-21 00:07:28 +08:00
Juan Leyva 1357976049 MDL-58762 core: Get full course objects on navigation
The course object passed as parameter to extend_navigation_user
callback contained only a few parameters, some parameters like
showgrades or showreports were missing.
The callback should receive a full course object.
2017-07-20 20:23:43 +08:00
Juan Leyva 9f7af133fd MDL-58762 report: Check group permissions in course user reports
Teachers were able to see any student report even with forced separated
groups and capability moodle/course:accessallgroups off.
2017-07-20 20:23:43 +08:00
Dan Poltawski 0faa1175fe weekly release 3.1.7+ 2017-07-20 13:21:01 +01:00
Dan Poltawski f3fe4f52e1 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-07-20 13:21:00 +01:00
Andrew Nicols 45a405014e Merge branch 'wip-MDL-57649-31-fix2' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-07-20 10:24:43 +08:00
Adrian Greeve b77e45119c MDL-57649 mod_lesson: Improvement to upgrade query.
We only need one record for each filearea that we
are removing.
2017-07-20 10:03:29 +08:00
AMOS bot 9a3855aa00 Automatically generated installer lang files 2017-07-20 00:07:29 +08:00
Dan Poltawski f06abbd040 Merge branch 'wip-MDL-57649-31-fix' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-07-19 09:33:31 +01:00
Adrian Greeve 9e1375fac0 MDL-57649 mod_lesson: Additional refinement to upgrade script. 2017-07-19 15:48:59 +08:00
Dani Palou 62be5f6154 MDL-59068 lesson: Revert MDL-54849
MDL-54859 made the 'wrong jump' setting useless, since clicking 'No' always sends the user to the next page.
2017-07-17 10:10:22 +02:00
Dan Poltawski 5db085f0a7 Merge branch 'wip-MDL-57649-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-07-17 09:01:12 +01:00
Adrian Greeve 734fb0f015 MDL-57649 mod_lesson: Delete answer files correctly.
The files associated with answers and responses were
not being deleted due to the fact that the wrong itemid
was being used.
2017-07-17 09:20:40 +08:00
AMOS bot 0fd90e2044 Automatically generated installer lang files 2017-07-17 00:07:23 +08:00
Dan Poltawski ab4afd711a weekly release 3.1.7+ 2017-07-14 11:46:55 +01:00
Dan Poltawski 4fc794b7ef Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-07-14 11:46:54 +01:00
Eloy Lafuente (stronk7) f883e31728 Merge branch 'MDL-57432-31' of git://github.com/danpoltawski/moodle into MOODLE_31_STABLE 2017-07-11 10:18:31 +02:00
AMOS bot c2e08a97c1 Automatically generated installer lang files 2017-07-11 00:07:01 +08:00
Dan Poltawski cd7cd469ae MDL-57432 environment: raise Moodle requirement
Due to Moodle 2.7 and Moodle 3.4 not having a common compatible php version
between them to upgrade from Moodle 3.4 from Moodle 2.7 you'll need to upgrade
to a higher version first or upgrade php at the same time as upgrade,
this encourages the former.
2017-07-10 09:22:51 +01:00
Dan Poltawski 43d1a8695c MDL-57432 environment: raise Moodle 3.4 requirements
1) PHP minimum version raised to 7.0.0
2) Intl extension raised from optional to required
2017-07-10 09:22:51 +01:00
Dan Poltawski 499e619868 MDL-57432 environment: 3.4 base information
This is a direct copy of the 3.3 branch to
have changes under control easier in next commits.
2017-07-10 09:22:51 +01:00
Eloy Lafuente (stronk7) 914ce2602e Moodle release 3.1.7 2017-07-08 20:43:29 +02:00
AMOS bot 43663a70af Automatically generated installer lang files 2017-07-08 00:16:44 +08:00
Jake Dallimore c072f462c6 weekly release 3.1.6+ 2017-07-07 12:10:24 +08:00
Jake Dallimore 99b4c8bb10 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-07-07 12:10:22 +08:00
AMOS bot 6e1f0e9527 Automatically generated installer lang files 2017-07-07 00:06:52 +08:00
Simey Lameze bd83aa0cd6 MDL-59456 auth_cas: patch phpCAS auth bypass vulnerability 2017-07-06 09:36:17 +01:00
Marina Glancy c7a89d2009 MDL-59409 admin: set admin user in unittest 2017-07-04 11:05:41 +08:00
Ankit Agarwal 548c5fa21e MDL-56565: core_message\helper was not present in 3.1, remove it 2017-07-04 10:11:39 +08:00
Ankit Agarwal 106fa63926 MDL-56565 forum: Add sitename as heading when there is nothing to display 2017-07-04 10:11:39 +08:00
Ankit Agarwal 5176a91648 MDL-56565 forum: Make sure userfullname is not disclosed 2017-07-04 10:11:39 +08:00
Jake Dallimore 540a38d586 MDL-56565 navigation: fix for cap checks in nav and context header
Fix to:
- Make sure we properly check both user and course contexts in
the load_for_user function in navigation lib and user the
user_can_view_profile function for same-course access checks.
- Use user_can_view_profile in the renderer's context_header to
properly decide whether a user can view another user's picture
and messaging options in the page header.
2017-07-04 10:11:39 +08:00
Jake Dallimore 47f81ef27f MDL-56565 navigation: fix user details disclosure in nav tree
Fixes a bug in which a user's full name might be disclosed via the
nav tree. Nav generation now checks the current user's access to the
user before adding the node, else adds a dummy node.
2017-07-04 10:11:39 +08:00
Jake Dallimore d4fa90b0e9 MDL-56565 core: fix user details disclosure in page context header
Fixes a bug with context_header function in which user details were
displayed regardless of the current user's capabilities.
2017-07-04 10:11:39 +08:00
Marina Glancy 033429a51c MDL-59409 admin: check access to every setting in category 2017-07-04 10:06:01 +08:00
AMOS bot 3c8e25328c Automatically generated installer lang files 2017-06-26 00:12:32 +08:00
AMOS bot bd08b92fcb Automatically generated installer lang files 2017-06-23 00:08:21 +08:00
AMOS bot 13add2b85c Automatically generated installer lang files 2017-06-11 00:06:40 +08:00
AMOS bot e42fa42955 Automatically generated installer lang files 2017-06-04 00:07:40 +08:00
AMOS bot bbbaa37cc5 Automatically generated installer lang files 2017-06-04 00:07:40 +08:00
AMOS bot 7c26a6bd77 Automatically generated installer lang files 2017-06-03 00:08:20 +08:00
AMOS bot ebbf9851c8 Automatically generated installer lang files 2017-06-01 00:12:59 +08:00
AMOS bot 65cd459455 Automatically generated installer lang files 2017-05-23 00:06:03 +08:00
AMOS bot df91963a70 Automatically generated installer lang files 2017-05-18 00:07:35 +08:00
AMOS bot eb58b204ff Automatically generated installer lang files 2017-05-16 00:07:39 +08:00
AMOS bot 11106c1bcc Automatically generated installer lang files 2017-05-14 00:05:09 +08:00
AMOS bot 6e76ce1689 Automatically generated installer lang files 2017-05-13 00:04:59 +08:00
AMOS bot bbe6b470aa Automatically generated installer lang files 2017-05-11 00:05:01 +08:00
Eloy Lafuente (stronk7) 6d0649e537 Moodle release 3.1.6 2017-05-07 21:32:51 +02:00
AMOS bot b36b735a3b Automatically generated installer lang files 2017-05-07 00:06:27 +08:00
Eloy Lafuente (stronk7) 1df212a569 weekly release 3.1.5+ 2017-05-05 17:26:50 +02:00
Andrew Nicols 843fcc5fac Merge branch 'wip-MDL-50670-31-fix' of https://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-05-05 15:10:15 +08:00
Marina Glancy 4d3595e7af MDL-50670 course: apply defaults when format was switched 2017-05-05 14:52:08 +08:00
Jun Pataleta c68568541f Merge branch 'MDL-58807-31' of https://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-05-05 14:45:00 +08:00
Luca Bösch dde166ba07 MDL-58807 block_activity_results: Use multilang in block title
The title passes format_string now.
2017-05-05 14:43:47 +08:00
Andrew Nicols 542536418d MDL-58259 mod_forum: Check if attachments allowed
If the current user is not allowed to submit attachments with a post,
and attachments are incldued, they are now dropped.
2017-05-05 10:29:45 +08:00
Andrew Nicols 603ba08d27 Merge branch 'MDL-55371-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-05-05 10:10:56 +08:00
Dan Poltawski 0dcab26cd9 Merge branch 'MDL-58709-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-05-04 15:15:06 +01:00
Juan Leyva 26c501f37e MDL-55371 mod_assign: Do not return empty users in get_participant WS
The WS was returning null users making the WS to fail.
2017-05-04 10:10:43 +02:00
Jun Pataleta 545174182a Merge branch 'MDL-58749-31-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-05-04 14:51:07 +08:00
Andrew Nicols 5166e06e08 MDL-56675 cachestore_memcached: Check all connected servers for support 2017-05-04 13:35:00 +08:00
Andrew Nicols e7e9d4c0b5 Merge branch 'MDL-58707-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-05-04 11:45:55 +08:00
Andrew Nicols 2786be9622 Merge branch 'MDL-58431-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-05-04 11:03:44 +08:00
David Monllao 27442e8c01 Merge branch 'MDL-56675-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-05-04 10:57:04 +08:00
Helen Foster 5e2cd4637e MDL-58749 lang: Merge English strings from the en_fix language pack
Significant string change:

* errorinvalidbyhour,core_calendar - correcting number from 59 to 23
2017-05-03 22:07:50 +02:00
Eloy Lafuente (stronk7) 2588195fc0 Merge branch 'MDL-58754-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-05-03 20:53:56 +02:00
Eloy Lafuente (stronk7) 315214fd80 Merge branch 'MDL-58788-31' of git://github.com/danpoltawski/moodle into MOODLE_31_STABLE 2017-05-03 19:06:13 +02:00
Dan Poltawski 04f5ebb886 MDL-58788 behat: backport of course navigation with editing step 2017-05-03 17:34:43 +01:00
Dan Poltawski 08ff55dad7 Merge branch 'MDL-58772_31' of git://github.com/aolley/moodle into MOODLE_31_STABLE 2017-05-03 16:50:33 +01:00
Dan Poltawski 5c93b9a5ce Merge branch 'MDL-35913-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-05-03 14:13:22 +01:00
Dan Poltawski 4f14f2f491 Merge branch 'MDL-58434-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-05-03 14:03:11 +01:00
Marina Glancy 24db354737 MDL-50670 course: correctly apply defaults for format options 2017-05-03 13:31:04 +01:00
Dan Poltawski c0e9e7e0a0 MDL-58788 behat: backport of course navigation step
These got introduced in master on
3353cfd8c1 / MDL-58265

It will be useful for third party devs sharing feature files between
multiple branches.
2017-05-03 10:36:17 +01:00
Marina Glancy 900f974216 MDL-58740 block_course_overview: check session key
Thanks to Kukas Schmidt for initial patch
2017-05-03 10:47:27 +08:00
Marina Glancy 61f2bbbf36 MDL-58670 blog: respect capability to search entries 2017-05-03 10:47:27 +08:00
Marina Glancy e5bec10f56 MDL-58635 blogs: check edited blog belongs to current user 2017-05-03 10:47:27 +08:00
Andrew Hancox 9005f18486 MDL-58172 mod_choice: Make export choice respect id fields 2017-05-03 10:47:27 +08:00
David Monllao 29df554433 weekly release 3.1.5+ 2017-05-03 10:27:43 +08:00
Andrew Nicols b31860af40 MDL-56675 cachestore_memcached: Disable store if not purgeable
If the store is shared and the getAllKeys function is broken due to an
incompatability between libmemcached and memcached >= 1.4.23, then it is
not possible to purge the cache, and we cannot support the plugin.

This patch adjusts the isready check to additionally check if the
combination of libmemcached and memcached is affected by this issue.
2017-05-03 09:25:04 +08:00
Andrew Nicols 605cba073c MDL-58746 core: Simplify environment check 2017-05-03 08:33:02 +08:00
Juan Leyva 46573be04b MDL-58434 mod_lesson: Display invalid responses in detailed report
In the detailed statistics view for one user attempt, the user response
for numerical question types was not being displayed.
This was only happening for incorrect responses.
2017-05-02 19:59:55 +02:00
Andrew Nicols 6adcb47532 MDL-58754 competency: Change query for DISTINCT COUNT 2017-05-02 14:49:24 +08:00
Adam Olley 0fc3aba77e MDL-58772 mod_feedback: Dont overwrite anonymous entries
The feedback module lets you alternate between responses being anonymised and
not anonymised. When the module is in anonymous mode, its possible for a single
user to make multiple responses.

However when the activity is switched to non-anon mode, if a user leaves a
follow up feedback, one of their previously anonymous responses is used, so
their new response stays anonymous and their old anon response is lost.

This change lets them leave a new non-anonymised feedback entry and retains all
previous anonymous responses instead of incorrectly reusing one of their anon
ones at random.
2017-05-02 12:50:05 +09:30
Marina Glancy 29c2971468 MDL-55468 mod_feedback: revive export analysis to excel 2017-05-01 14:34:27 +01:00
Andrew Nicols 1536b56796 MDL-58746 core: Add environment check for finfo 2017-05-01 13:09:38 +08:00
Dan Poltawski 26713f79f4 weekly release 3.1.5+ 2017-04-28 12:35:50 +01:00
Dan Poltawski 1769ede142 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-04-28 12:35:49 +01:00
Dan Poltawski e411b59f80 Merge branch 'MDL-58722-31-fix' of https://github.com/xow/moodle into MOODLE_31_STABLE 2017-04-28 07:50:29 +01:00
John Okely 21b902996a MDL-58722 mathjax: Fix httpsurl upgrade 2017-04-28 14:30:34 +08:00
Damyon Wiese 9c68807f6c MDL-54849 lesson: Fix backport
The backport branch was using undefined behat steps and functions.
2017-04-28 10:31:35 +08:00
Dan Poltawski c06dc57666 Merge branch 'wip-MDL-58689-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-04-27 18:35:30 +01:00
Juan Leyva e707c69cce MDL-58709 registration: Fix incorrect setType 2017-04-27 16:58:31 +02:00
Dan Poltawski d39fbc3e06 Merge branch 'MDL-58722-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-04-27 14:36:25 +01:00
David Monllao 1d2368318a Merge branch 'MDL-58628-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-04-27 17:09:54 +08:00
Damyon Wiese 7dfa47b2dd MDL-58722 mathjax: Update to 2.7.1 and remove a11y
2.7.1 bundles the accessibility and mchem extensions so we no longer need to bundle them and apply custom config.
2017-04-27 16:56:14 +08:00
Juan Leyva 0c61a163ae MDL-58628 mod_quiz: Return missing fields in get_quizzes_by_courses
These fields must be returned always (even if the quiz is closed).
Those fields are required to display data to users that, for example,
finished a timed quiz.
2017-04-27 09:57:24 +02:00
Jake Dallimore 0af674082c Merge branch 'MDL-58701-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-04-27 13:34:11 +08:00
Ankit Agarwal 927a6221aa MDL-58701 phpunit: Add tests for external_settings 2017-04-27 09:44:28 +05:30
Ankit Agarwal e63627f50e MDL-58701 libraries: Use pluginfile.php as rewrite url for web req. 2017-04-27 09:40:19 +05:30
David Monllao 77be0785fd Merge branch 'MDL-58698-31-strlang' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-04-27 11:35:20 +08:00
David Monllao 9427e333c7 Merge branch 'wip-MDL-57807-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-04-27 11:33:52 +08:00
David Monllao 506fd9545c Merge branch 'MDL-58372-31' of git://github.com/Dagefoerde/moodle into MOODLE_31_STABLE 2017-04-27 11:32:15 +08:00
Andrew Nicols a7ce01cc70 Merge branch 'MDL-58691-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-04-27 11:27:23 +08:00
David Monllao de9af122db Merge branch 'MDL-54849-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-04-27 11:20:38 +08:00
Marina Glancy 9b04032e45 MDL-58689 dml: prevent logging during setup 2017-04-27 10:06:12 +08:00
Adrian Greeve e42f41b81a MDL-57807 mod_data: Advanced search with menu item.
It is now possible to search other criteria without first
setting the menu items.

Thanks to Sergey Gorbatov for providing this patch.
2017-04-27 09:08:31 +08:00
AMOS bot 5b1b83101e Automatically generated installer lang files 2017-04-27 00:05:53 +08:00
Jan Dageförde 50e53bb6ea MDL-58372 repository_webdav: Explicitly pass some filename
Not passing anything triggers PHP 7.1 "Too few arguments" exception.
2017-04-26 11:28:52 +02:00
David Mudrák e025fd2123 MDL-58698 js: Fix the detection of the language in core_str module
This is the same problem that we had in MDL-52486. When the language
pack with multiple underscores (such as "en_us_k12") is selected, the
html root element's "lang" attribute is set to

    <html lang="en-us-12" ...>

which we then map back to the Moodle lang code using the JS function
replace().

What was missed in MDL-52486 was that when replacing a value (and not a
regular expression), only the first instance of the value is replaced.
So the value "en_us-k12" was sent as the lang parameter which is invalid
PARAM_LANG value and the exception was thrown.
2017-04-26 10:21:12 +02:00
Jake Dallimore 4b7b979d39 weekly release 3.1.5+ 2017-04-26 14:49:09 +08:00
Jake Dallimore e2180dbc89 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-04-26 14:49:08 +08:00
Jun Pataleta 7b4ecf6fe2 Merge branch 'MDL-58668-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-04-26 11:03:09 +08:00
Juan Leyva 51134125fc MDL-58707 mod_assign: Fix param type for returned field
The ‘description’ field is populated via a get_string call, this means
that it may content html.
The component used for translation is also fixed in this commit.
2017-04-25 14:42:48 +02:00
Juan Leyva 4268f10674 MDL-58668 mod_lesson: Fix how multi answers are processed
The module was choosing as incorrect the first possible incorrect
answer instead the first student incorrect answer.
In the patch I also refactored the foreach loop to avoid code
duplication.
2017-04-24 13:33:30 +02:00
Dan Poltawski 6cbdb4c31c Merge branch 'MDL-58556-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-04-24 11:05:19 +01:00
Ankit Agarwal 2bbd04781c MDL-58691 exporter: Filters should always apply for web pages
The variables AJAX_SCIRPT, CLI_SCRIPT, WS_SERVER are always defined (and set to false)
when webpages are rendered, hence the check of 'defined' is invalid
2017-04-24 13:46:07 +05:30
Jake Dallimore 454d532acb Merge branch 'MDL-57793-31' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-04-24 15:18:13 +08:00
Damyon Wiese b30c0b6b68 MDL-58556 auth: better expired password
If the auth plugin is using a custom url to change password - don't rely on forcepasswordchange
user preference being reset.
2017-04-24 15:09:11 +08:00
Damyon Wiese afb659ff15 MDL-54849 lesson: Move on to next question
Move on to next question button takes you to the same question again.
2017-04-24 14:50:32 +08:00
Jun Pataleta a7457acc52 Merge branch 'MDL-58586-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-04-24 09:33:55 +08:00
AMOS bot 34ed4e0e19 Automatically generated installer lang files 2017-04-23 00:04:43 +08:00
Dan Poltawski c7c84089f1 weekly release 3.1.5+ 2017-04-21 15:47:35 +01:00
Dan Poltawski 3b9df47dfe Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-04-21 15:47:32 +01:00
Damyon Wiese 79f0d69bca MDL-58586 css: add margin to userpictures
Boost has a right margin on the userpicture but this is missing in bootstrapbase (it is
added only on random pages).

Add a margin to bootstrapbase so it matches boost.
2017-04-21 11:44:20 +08:00
Jake Dallimore 89cd3cfc02 Merge branch 'MDL-58613-31-workshopfullname' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-04-21 10:27:56 +08:00
David Monllao b57860bfbb Merge branch 'MDL-58590_31' of https://github.com/sk-unikent/moodle into MOODLE_31_STABLE 2017-04-21 10:05:43 +08:00
AMOS bot 740917fa43 Automatically generated installer lang files 2017-04-21 00:10:54 +08:00
Skylar Kelty 9c5c5e2ee6 MDL-58590 mobile: Cache mobile-supporting plugins 2017-04-20 09:37:12 +01:00
David Monllao e88bef20f5 Merge branch 'MDL-58278-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-04-20 14:06:35 +08:00
Damyon Wiese 6785483b81 MDL-58278 mod_assign: Ignore send notify with mw
When marking workflow is on and the grade is not released we never send notifications anyway.
Instead of preventing the grading form from submitting (validation error) we silently ignore it.
2017-04-20 13:13:49 +08:00
AMOS bot 0923ed6bb8 Automatically generated installer lang files 2017-04-20 00:07:30 +08:00
Juan Leyva 42ee071ab5 MDL-58431 mod_lesson: Fix error in random jumps on first visit
Random jumps to content pages were not working when they were set in
the first page.
This was caused because the page where the jump was, was not being
marked as visited before calculating the jump.
2017-04-19 17:48:14 +02:00
David Mudrák a22951044f MDL-58613 workshop: Provide all data to display user name
Additional fields such as middlename, alternatename and others were not
passed to the fullname(), causing a debugging message.
2017-04-19 14:19:56 +02:00
David Monllao bd34549316 Merge branch 'MDL-54901_31' of git://github.com/stronk7/moodle into MOODLE_31_STABLE 2017-04-19 11:31:12 +08:00
David Monllao 3bef945fbe Merge branch 'MDL-58096-31' of git://github.com/StudiUM/moodle into MOODLE_31_STABLE 2017-04-19 05:18:40 +08:00
Gilles-Philippe Leblanc 4bd3c5766e MDL-58096 reports: Add SQL required by preload_from_record() 2017-04-18 15:41:48 -04:00
Dan Poltawski c6fa627a23 Merge branch 'MDL-58463-31' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-04-18 18:54:02 +01:00
David Monllao 79d8b6f1bd Merge branch 'MDL-58116-31' of https://github.com/barrasroger/moodle-1 into MOODLE_31_STABLE 2017-04-19 00:50:16 +08:00
AMOS bot f5850997b4 Automatically generated installer lang files 2017-04-19 00:05:04 +08:00
Dan Poltawski df2b12bf1b Merge branch 'MDL-58374-31-ltierrorlog' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-04-18 16:49:05 +01:00
Gilles-Philippe Leblanc e8d61c6f11 MDL-58096 reports: Optimize database request 2017-04-18 11:00:29 -04:00
Dan Poltawski 4a1f3cf807 weekly release 3.1.5+ 2017-04-18 12:34:04 +01:00
Dan Poltawski c075a898e1 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-04-18 12:34:03 +01:00
barrasroger f181e3cf70 MDL-58116 core_enrol: fix handling of users on different methods 2017-04-18 11:00:31 +02:00
Jun Pataleta 6ef412801f MDL-57793 calendar: Additional edge-case tests
* Added leap year and 31th day of the month tests.
2017-04-18 13:57:53 +08:00
Jun Pataleta baf42679ab MDL-57793 calendar: Add recursion to satisfy COUNT rule
* Add recursion to the creation of recurring calendar events to satisfy
  the COUNT rule, if necessary.
2017-04-18 13:57:52 +08:00
Jun Pataleta 2c0857ba05 MDL-58463 mod_assign: Improve coverage of test_assign_refresh_events() 2017-04-18 13:24:18 +08:00
Jun Pataleta 781f643d95 MDL-58463 mod_assign: Use correct course ID for fetching assignment's CM 2017-04-18 13:24:18 +08:00
Andrew Nicols 520a528943 Merge branch 'MDL-58559-31' of git://github.com/lameze/moodle into MOODLE_31_STABLE 2017-04-18 09:48:00 +08:00
Andrew Nicols 7e95809a37 Merge branch 'MDL-58582-31' of https://github.com/Dagefoerde/moodle into MOODLE_31_STABLE 2017-04-18 09:33:29 +08:00
Andrew Nicols a3309be840 Merge branch 'MDL-58539_31' of https://github.com/dmonllao/moodle into MOODLE_31_STABLE 2017-04-18 09:05:53 +08:00
Simey Lameze 637b3ff3de MDL-58559 block_community: check if the course has subject 2017-04-18 08:57:27 +08:00
Eloy Lafuente (stronk7) 22983bd4da MDL-54901 environment: pg93, openssl, https & utf8mb4 2017-04-18 02:56:41 +02:00
Eloy Lafuente (stronk7) 3422a9148b MDL-54901 environment: 3.3 base information
This is a direct copy of the 3.2 branch to
have changes under control easier in next commits.
2017-04-18 02:54:13 +02:00
Ruslan Kabalin 231a80c010 MDL-58539 assignfeedback_editpdf: Fix group assignment fatal error.
This makes sure that $grade->attemptnumber is not NULL before using its
value.
2017-04-17 16:58:58 +02:00
Jan Dageförde a6c36884b3 MDL-58582 theme: Improve PHPDoc comment on SVG image resolution 2017-04-17 15:24:40 +02:00
Dan Poltawski 81292696c8 MDL-58486 userprefs: clarifying comment 2017-04-17 12:18:05 +01:00
Dan Poltawski 89e5f43109 Merge branch 'MDL-58486_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2017-04-17 12:17:53 +01:00
Dan Poltawski f6ae580fbb Merge branch 'MDL-58479-31-weblib-notice-phpdoc' of git://github.com/roperto/moodle into MOODLE_31_STABLE 2017-04-17 10:46:09 +01:00
Dan Poltawski d8928b4535 Merge branch 'MDL-58465-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-04-17 10:41:19 +01:00
Dan Poltawski 23ba40cf63 Merge branch 'MDL-58393-31_filter-order' of https://github.com/roperto/moodle into MOODLE_31_STABLE 2017-04-17 10:30:39 +01:00
Dan Poltawski 09d7121146 Merge branch 'MDL-58593-31' of git://github.com/merrill-oakland/moodle into MOODLE_31_STABLE 2017-04-17 10:03:25 +01:00
Eric Merrill db370772bd MDL-58593 database: More efficiently track issued key names 2017-04-13 12:24:21 -04:00
Dan Poltawski 47abeb18f6 Merge branch 'MDL-32596_31' of https://github.com/rezaies/moodle into MOODLE_31_STABLE 2017-04-13 15:57:27 +01:00
David Monllao 8890feae27 Merge branch 'MDL-58512_31' of git://github.com/markn86/moodle into MOODLE_31_STABLE 2017-04-13 13:07:26 +02:00
David Monllao e1fffdbc27 Merge branch 'MDL-58244-31' of https://github.com/MartinGauk/moodle into MOODLE_31_STABLE 2017-04-13 13:00:48 +02:00
David Monllao f654011e0d Merge branch 'MDL-58171_31-report-role-format_text' of https://github.com/lucaboesch/moodle into MOODLE_31_STABLE 2017-04-13 12:40:18 +02:00
Martin Gauk 9de798de71 MDL-58244 shibboleth: handle users who are logged out
If the user is (already) logged out, do not access $USER->auth and redirect him to the return URL.
2017-04-13 10:07:29 +00:00
Tim Hunt 4d6d096336 MDL-58555 ajax: make ajax web service log entries more useful
It is not used for anything, but we put the method name(s) being called in the URL.
2017-04-13 08:31:57 +02:00
AMOS bot 65704ab9b3 Automatically generated installer lang files 2017-04-13 00:04:43 +08:00
Luca Bösch f3f513ec7b MDL-58171 report: role name passing format_text
Have the role name in h2 of the participation report passing filters
like multilang2 by having it call format_text.

Signed-off-by: Luca Bösch <luca.boesch@bfh.ch>
2017-04-12 15:32:16 +02:00
David Monllao f14510d944 weekly release 3.1.5+ 2017-04-12 09:32:33 +02:00
David Monllao 4d19341a0a Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-04-12 09:32:31 +02:00
Andrew Nicols 6df5fb575c Merge branch 'wip-MDL-57616-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-04-11 12:22:38 +08:00
Mathew Gancarz 1eee389afe MDL-58512 core: pre-load 'changesmadereallygoaway' string for JS 2017-04-11 12:06:42 +08:00
Andrew Nicols c2a65ab688 Merge branch 'MDL-58461-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-04-11 11:35:50 +08:00
AMOS bot e02ebdc5fe Automatically generated installer lang files 2017-04-11 00:04:58 +08:00
David Monllao b702e5b44e Merge branch 'patch-26' of https://github.com/sk-unikent/moodle into MOODLE_31_STABLE 2017-04-10 16:59:56 +02:00
David Monllao b77027c57d Merge branch 'mdl-58489-m31' of https://github.com/Dagefoerde/moodle into MOODLE_31_STABLE 2017-04-10 16:56:33 +02:00
David Monllao 5acfcf8777 Merge branch 'mdl-58485-m31' of https://github.com/Dagefoerde/moodle into MOODLE_31_STABLE 2017-04-10 16:34:36 +02:00
David Monllao 201812e592 Merge branch 'wip-MDL-55950-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-04-10 16:12:18 +02:00
David Monllao 87562dbe24 Merge branch 'MDL-57858-31' of git://github.com/pavelsokolov/moodle into MOODLE_31_STABLE 2017-04-10 14:17:14 +02:00
David Monllao e5a5962d00 MDL-56370 mod_feedback: Note about undeprecation 2017-04-10 13:18:29 +02:00
David Monllao e9569a7fa3 Merge branch 'wip-MDL-56370-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-04-10 13:17:33 +02:00
David Monllao 76e50ea9e7 Merge branch 'wip-MDL-55939-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-04-10 12:58:01 +02:00
David Monllao 8b196aa53e Merge branch 'MDL-58104-31' of git://github.com/pavelsokolov/moodle into MOODLE_31_STABLE 2017-04-10 09:58:52 +02:00
Andrew Nicols f0be1f90da Merge branch 'wip-MDL-58180-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-04-10 13:41:33 +08:00
AMOS bot 42f9eb4c56 Automatically generated installer lang files 2017-04-08 00:06:21 +08:00
David Mudrák d3c4f13490 MDL-58374 lti: Log the error message of a failed message verification
Previously the exception message (which holds the actual explanation of
what went wrong) was thrown away so the user had no way to debug.
2017-04-07 11:29:37 +02:00
Jan Dageförde e8e2c512b8 MDL-58485 admin: Show all SVG plugin icons 2017-04-07 10:11:10 +02:00
Jan Dageförde 31d8260331 MDL-58489 core: Fix unreachable HTTP error handling 2017-04-07 10:09:52 +02:00
Jun Pataleta 6fd68f6967 weekly release 3.1.5+ 2017-04-07 12:45:51 +08:00
Jun Pataleta 11f3ea4f94 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-04-07 12:45:50 +08:00
Marina Glancy 07e95f49fc MDL-56370 mod_feedback: behat for repeat completion 2017-04-07 08:23:30 +08:00
Skylar Kelty 0f7ed737fc MDL-58456 chat: Add missing new in throw 2017-04-06 09:48:14 +01:00
Shamim Rezaie f821c0a5e2 MDL-32596 tool_xmldb: Updated confirmcheckforeignkeys
Updated $string['confirmcheckforeignkeys']
2017-04-06 18:27:07 +10:00
Marina Glancy 2321c81d52 MDL-55950 mod_feedback: correct link to response in the email 2017-04-06 15:44:02 +08:00
Marina Glancy 94f61491de MDL-55939 course: no permission is needed to view frontpage 2017-04-06 14:52:44 +08:00
Damyon Wiese 913493048b MDL-58461 filter_mathjaxloader: Update defaults
Also included a version bump for Moodle in order to trigger a filter upgrade.
2017-04-06 13:58:58 +08:00
Damyon Wiese 8d82a20f4b MDL-58461 mathjax: Ship accessibility extensions
There are not mirrored on the new CDN so we need to ship them with moodle.
2017-04-06 13:58:53 +08:00
AMOS bot 1ea218b63e Automatically generated installer lang files 2017-04-06 00:07:51 +08:00
AMOS bot 75728ebe8d Automatically generated installer lang files 2017-04-06 00:07:51 +08:00
Marina Glancy af6a891144 MDL-56370 mod_feedback: allow to restore values from last attempt 2017-04-05 16:08:27 +08:00
Eloy Lafuente (stronk7) 2eda090ebe Merge branch 'MDL-58055-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-04-05 00:30:37 +02:00
Eloy Lafuente (stronk7) a239fdd2a0 Merge branch 'MDL-55326-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-04-04 19:26:48 +02:00
Eloy Lafuente (stronk7) 5f368c5dd7 Merge branch 'MDL-55499-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-04-04 18:24:11 +02:00
AMOS bot 37e25a19a8 Automatically generated installer lang files 2017-04-05 00:04:59 +08:00
Tim Hunt 7a27817f98 MDL-58486 user_prefs: always update $USER cache when applicable
set_user_preference and unset_user_preference let you pass the user to
set preferences for as an id. Previously, if you passed $USER->id there,
those methods did not update the Cache in $USER, which was surprising,
and not easy to debug.

Now, we always update the preference cache in $USER if the preference is
being changed for the current user.
2017-04-04 16:22:57 +01:00
Daniel Thee Roperto 6b00083d7f MDL-58479 documentation: fixed phpdoc for notice(). 2017-04-04 16:14:56 +10:00
Marina Glancy 5dc2aeda9a MDL-57616 label: allow to drag and drop video/audio files 2017-04-04 12:00:27 +08:00
Andrew Nicols 75cb3afa71 Merge branch 'wip-MDL-41809-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-04-04 10:56:20 +08:00
AMOS bot 4b98e2986c Automatically generated installer lang files 2017-04-04 00:06:02 +08:00
Damyon Wiese d77585c672 MDL-58461 filter_mathjaxloader: Change CDN url
The MathJax CDN url is going away - we need to switch to another mirror.
2017-04-03 12:48:35 +08:00
Daniel Thee Roperto dd82501911 MDL-58394 filters: Fixed order not being respected. 2017-04-03 14:47:00 +10:00
Ankit Agarwal acdf91203c MDL-58465 unittests: Fix invalid use of exception 2017-04-03 09:26:04 +05:30
Dan Poltawski 3f48012eb5 weekly release 3.1.5+ 2017-03-31 11:16:19 +01:00
David Monllao 31867bb1b4 MDL-58450 mod_forum: Force groups to be returned as they are created
Long history resumed: The test relies on the first group
being the first that is created, the first group is
actually the first one ordering by name. If  is
group-999 and  is group-1000  is returned
as the first group.
2017-03-31 11:14:20 +01:00
Pavel Sokolov 97baaf9a53 MDL-57858 mod_assign: fix submissions count for assign with scales 2017-03-31 12:00:41 +03:00
Dan Poltawski becf6318c2 weekly release 3.1.5+ 2017-03-31 09:16:35 +01:00
Dan Poltawski c7806282a8 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-03-31 09:16:34 +01:00
Andrew Nicols 2f8db6a31e MDL-58055 theme_bootstrap: Change padding around unread link 2017-03-31 14:21:20 +08:00
Pavel Sokolov c26566f21b MDL-58104 mod_assign: Show attempt settings for the latest attempt 2017-03-30 11:10:04 +03:00
Andrew Nicols 0ae9094a96 MDL-55499 mod_forum: Use context when formatting e-mail text 2017-03-30 11:38:52 +08:00
Dan Poltawski 1a1cc84af1 Merge branch 'MDL-58264_31' of https://github.com/darrencocco/moodle into MOODLE_31_STABLE 2017-03-28 18:02:44 +01:00
AMOS bot 10fed49ab2 Automatically generated installer lang files 2017-03-29 00:06:01 +08:00
David Monllao e57beee8dc MDL-58079 enrol: Move new test to existing test case 2017-03-28 17:36:54 +02:00
David Monllao 2be51b7633 Merge branch 'MDL-58079_31' of https://github.com/kiklop74/moodle into MOODLE_31_STABLE 2017-03-28 17:36:10 +02:00
Juan Leyva 48d02c4437 MDL-35913 site home: Set the page layout before setting blocks
When the default home page is set by user preference the site home
blocks are gone.
This is caused because the page layout is not correctly set before
manipulating the navigation block (the base layout it is used instead).
2017-03-28 17:11:19 +02:00
Dan Poltawski b72615601b MDL-58227 mod_feedback: remove uncessary if 2017-03-28 16:00:42 +01:00
Dan Poltawski ac5f2bc552 Merge branch 'MDL-58227-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-03-28 16:00:25 +01:00
Dan Poltawski f569989db3 Merge branch 'MOODLE_31_STABLE' of https://github.com/fwsl/moodle into MOODLE_31_STABLE 2017-03-28 12:07:30 +01:00
Dan Poltawski af84c619a0 Merge branch 'MDL-58160_31' of git://github.com/aolley/moodle into MOODLE_31_STABLE 2017-03-28 11:34:41 +01:00
Dan Poltawski ce51586b24 Merge branch 'wip-MDL-58092-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-03-28 10:56:01 +01:00
Dan Poltawski b9866e9e71 Merge branch 'MDL-58257_M31' of https://github.com/ak4t0sh/moodle into MOODLE_31_STABLE 2017-03-28 10:51:01 +01:00
Andrew Nicols 45a4ebb697 MDL-55326 core_text: Correct typo3 file permissions 2017-03-27 15:09:00 +08:00
Luca Bösch 9574aee37c MDL-58180 lib: Role name pass format_text.
In function stats_get_report_options, the role names are returned after
having been processed through format_text which lets the filters work on them.

Signed-off-by: Luca Bösch <luca.boesch@bfh.ch>
2017-03-27 10:41:48 +08:00
Darren Cocco 229ffe02dc MDL-58264 quiz: removed additional = symbol
Removed superflous = symbol from SQL snippet
2017-03-27 11:09:20 +11:00
Grzegorz Ziółek 52f391ceab MDL-58325 config_log: Record changes in editor management to config_log. 2017-03-24 08:48:30 +01:00
Marina Glancy f494350d40 MDL-58092 gradingform_guide: behat to demonstrate double quote fix 2017-03-24 13:28:52 +08:00
gthomas2 ef79f05067 MDL-58092 grading methods: Fix double escape for freq used questions 2017-03-24 13:28:51 +08:00
Eloy Lafuente (stronk7) 3fc319c0c4 weekly release 3.1.5+ 2017-03-23 20:30:49 +01:00
Eloy Lafuente (stronk7) 57d9979b43 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-03-23 20:30:47 +01:00
Marina Glancy 3cd85bbfae MDL-41809 course: do not rely on page context
page context may not be set, use the correct course context when calling format_string
2017-03-23 14:46:05 +08:00
Andrew Nicols 354d0f5e84 Merge branch 'MDL-57429-31-fix' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-03-23 11:54:49 +08:00
Jake Dallimore 42306af15e MDL-57429 badges: handle curl problems nicely during connection creation
- Properly validate the displayer API response before sending the
verification email.
- Properly validate the displayer API response before creating the
saved connection.
2017-03-23 11:39:45 +08:00
AMOS bot 9ffd2349a2 Automatically generated installer lang files 2017-03-22 00:04:37 +08:00
Juan Leyva 5efec4d5a3 MDL-58227 mod_feedback: Delete duplicated completions records
This commit also fixes the way the previous completion record was
fetched to avoid the creation of new duplicates.
2017-03-21 09:57:00 +01:00
Dan Poltawski 00a142859b Merge branch 'MDL-58317-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-03-21 07:58:00 +00:00
John Okely 17b7ca5b2b MDL-37168 mod_lti: Fix rename behat 2017-03-21 10:25:03 +08:00
Eloy Lafuente (stronk7) e5edbe8ccd Merge branch 'MDL-57840-31-get_users_by_field' of https://github.com/roperto/moodle into MOODLE_31_STABLE 2017-03-21 01:06:07 +01:00
Dan Poltawski 258db34bfc Merge branch 'MDL-58273-31-ldapenrol' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-03-20 11:09:41 +00:00
David Monllao c3c88e8673 Merge branch 'MDL-37168-31' of https://github.com/xow/moodle into MOODLE_31_STABLE 2017-03-20 10:19:01 +01:00
Dan Poltawski be12bb8ab8 Merge branch 'MDL-58285-m31' of https://github.com/NeillM/moodle into MOODLE_31_STABLE 2017-03-20 08:54:11 +00:00
John Okely 8da9781a25 MDL-37168 grade: Debugging if gradebook callbacks are not both present 2017-03-20 16:31:14 +08:00
John Okely 6f3be9d5ce MDL-37168 mod_lti: Add behat test to cover lti quick edit 2017-03-20 16:00:47 +08:00
Sam Chaffee 045a69fd3e MDL-37168 mod_lti: Fix LTI activity quick edit title 2017-03-20 16:00:47 +08:00
Darko Miletic 7bfa58873a MDL-58079 core_enrol: Fixed invalid category tag 2017-03-20 04:12:23 -03:00
Damyon Wiese 889a985b62 MDL-58317 templates: Fix async template render
There is an edge case where we do not wait for all promises before
rendering a template. This can generate "failed to pre-fetch the template" JS errors.
2017-03-20 13:37:41 +08:00
David Monllao 5f90019098 Merge branch 'MDL-58166-31' of git://github.com/pavelsokolov/moodle into MOODLE_31_STABLE 2017-03-20 05:12:09 +01:00
David Monllao c5ed804680 Merge branch 'MDL-58182-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-03-20 05:04:49 +01:00
Andrew Nicols 72536bd5a8 Merge branch 'MDL-57429-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-03-20 10:38:50 +08:00
AMOS bot 94ae0b7f7b Automatically generated installer lang files 2017-03-20 00:07:54 +08:00
AMOS bot 5d8822ff11 Automatically generated installer lang files 2017-03-18 00:09:47 +08:00
Pavel Sokolov ea8ce0c362 MDL-58166 mod_assign: markingworkflow breaks assign for non-graders 2017-03-17 17:53:09 +03:00
Arnaud Trouve afbb1b7fb5 MDL-58257 course: fix search containing a hyphen
In case a hyphen (-) was preceded and followed by spaces,
the pattern for the "not regex" was empty causing an empty response from the database
2017-03-17 08:29:49 +01:00
Jake Dallimore cd099d041f MDL-58182 javascript: Fix for buttons regression in core dialog.
Fixes a regression caused by MDL-56364, wherein the buttons were made
readOnly, meaning addButtons wouldn't work. This removes that change,
while maintaining the original dependency between the buttons and the
closeButton config options.
2017-03-17 09:07:26 +08:00
Darko Miletic 6e0b2cde30 MDL-58079 core_enrol: Implementing fix and unit test 2017-03-16 14:27:06 -03:00
Neill Magill 2c60b80795 MDL-58285 tool_mobile: Web service generates incorrect fileurl on IIS
The tool_mobile_get_plugins_supporting_mobile generated an incorrect
fileurl on IIS. The /mobile/filename.zip part was generated as
\mobile\filename.zip, this failed the PARAM_URL check.

This change stops the use of OS specific directory separators and uses
the linux/web separator. PHP file functions recognise this properly.
2017-03-16 12:12:34 +00:00
Dan Poltawski 6e0c45eab6 weekly release 3.1.5+ 2017-03-16 11:52:54 +00:00
Dan Poltawski 71a3196ddf Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-03-16 11:52:52 +00:00
Jake Dallimore 9ec7dbc419 MDL-57429 badges: add email verification for openbackpack connections
With the Persona provider now out of commission, no new connections to
the Mozilla openbackpack can be created. This patch adds an email
verification step to core to restore the openbackpack functionality.
2017-03-16 09:34:33 +08:00
David Mudrák b147cea65f MDL-58273 enrol_ldap: Fix the name of the capability
This capability controls who can hide/show the enrolment instance.
2017-03-15 18:39:58 +01:00
Andrew Nicols 0c9a5310f9 Merge branch 'MDL-57658-31-integration-fix-2' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-03-15 15:15:22 +08:00
Jun Pataleta 67f8fc9419 MDL-57658 calendar: Remove BYDAY filtering dependence on NumberFormatter 2017-03-15 14:25:34 +08:00
Andrew Nicols aec0f344de Merge branch 'MDL-57658-31-integration-fix' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-03-15 11:42:58 +08:00
Jun Pataleta baad350a71 MDL-57658 calendar: Set sort order for fetched DB records 2017-03-15 11:30:06 +08:00
Dan Poltawski 3a9570a37a Merge branch 'MDL-57658-31-3' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-03-14 16:11:36 +00:00
David Monllao 3203027f54 Merge branch 'MDL-58114-31-excparams' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-03-14 11:03:20 +01:00
AMOS bot f96f84cb19 Automatically generated installer lang files 2017-03-14 00:04:58 +08:00
Eloy Lafuente (stronk7) f285d9203f Moodle release 3.1.5 2017-03-11 22:16:02 +01:00
AMOS bot 6766dabe82 Automatically generated installer lang files 2017-03-12 00:04:35 +08:00
AMOS bot d56e2cd3eb Automatically generated installer lang files 2017-03-12 00:04:34 +08:00
Eloy Lafuente (stronk7) 9b7f4e9e8e weekly release 3.1.4+ 2017-03-10 20:59:51 +01:00
Eloy Lafuente (stronk7) 7b3608625e Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-03-10 20:59:46 +01:00
Damyon Wiese 0a76cd2ca1 MDL-57596 forms: CLEANHTML in persistent forms
Add special handling for text fields with the CLEANHTML type. This should
be used when students and teachers can edit the same field (you can't trust those students).

Applies cleaning on submitted data, and on data stored in the DB before it is put back in an editing form.
2017-03-10 18:09:30 +00:00
Marina Glancy 36706f5b98 MDL-58010 user: allow to update only whitelisted preferences 2017-03-10 18:09:29 +00:00
Eloy Lafuente (stronk7) ff2b56b538 Merge branch 'MDL-58123-31' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-03-10 18:09:29 +00:00
Dan Poltawski b6a8a31088 Merge branch 'MDL-58035_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2017-03-10 18:09:28 +00:00
David Mudrák 3fe3805d79 MDL-57597 competency: Fix serving of prior learning evidence files
For security reasons, all files submitted by students must be disposed
as attachments, not inline contents.
2017-03-10 18:09:28 +00:00
AMOS bot 3ce9798faf Automatically generated installer lang files 2017-03-10 00:04:45 +08:00
Jun Pataleta e0a41273a6 MDL-57658 calendar: Fix rrulemanager and unit tests
Issues fixed:
* Additional rule validations.
* Rewrote recurrence logic.
* Additional unit tests, especially from the examples in the RFC.
* The date format "YmdThis" results into an incorrect date for the
  "UNTIL" parameter. The literal "T" should be escaped, and a literal
  "Z" is also needed at the end of the format string to indicate UTC.
* Implemented handling of negative modifier values for BYxxx rules.
* Implemented handling of BYWEEKNO, BYYEARDAY, BYSETPOS, BYHOUR,
  BYMINUTE, BYSECOND rules.
2017-03-09 16:15:47 +08:00
AMOS bot 238b87a2fb Automatically generated installer lang files 2017-03-08 00:06:24 +08:00
Eloy Lafuente (stronk7) 7ea1dd1580 Merge branch 'MDL-58064-31-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-03-07 16:37:59 +01:00
Dan Poltawski 1a13098682 Merge branch 'wip-mdl-58056-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-03-07 11:08:32 -03:00
Tim Hunt ed961702c6 MDL-58035 lib: log when the expected theme cannot be initialised 2017-03-07 13:33:48 +00:00
David Monllao 17da61847f Merge branch 'MDL-58106_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2017-03-07 13:38:27 +01:00
David Monllao 6805a9e11b Merge branch 'wip-mdl-58091-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-03-07 13:16:11 +01:00
David Mudrák fe785db8db MDL-58064 lang: Clarify the PHP 7.x limitations
These are related to SQL*Server support only and affect all PHP 7
versions, not just 7.0.x. Credit goes to Eloy Lafuente for spotting
this.
2017-03-07 12:56:28 +01:00
Ankit Agarwal b6500c619a MDL-55859 assign_editpdf: cleanup htmlfile in case of errors 2017-03-07 07:14:11 -03:00
Dan Poltawski 62fbaeecbb Merge branch 'wip-mdl-58052-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-03-07 06:54:28 -03:00
Ankit Agarwal 80e10c2278 MDL-57362 assign: Fix permission checks 2017-03-07 13:21:01 +05:30
Rajesh Taneja dcbcc94a51 MDL-58052 behat: user session function - use to edit current profile 2017-03-07 11:06:14 +08:00
Dan Poltawski 0ce3aa0562 MDL-57362 assign: fix php54 compatability 2017-03-06 10:53:56 -03:00
Dan Poltawski 47dc780e98 Merge branch 'MDL-57362-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-03-06 10:27:03 -03:00
Adam Olley 471a306b44 MDL-58160 coursecat: Use set_many to populate category cache
When the course category cache needs to be repopulated, two entries are added
to the cache for each category. In core this is currently done in a for-loop,
resulting in N set calls to the cache (where N is twice the number of
categories in Moodle).

This change switches that code to using a single set_many cache call instead,
which makes this an O(1) operation instead of O(N).

For a site with say, 1000 categories, this results in only 1 set call to the
cachestore instead of 2000.
2017-03-06 12:06:51 +10:30
Eloy Lafuente (stronk7) e52a7a4fe0 weekly release 3.1.4+ 2017-03-03 10:33:43 +01:00
Eloy Lafuente (stronk7) 5e1a2d2a42 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-03-03 10:33:39 +01:00
Tim Hunt 20c506c970 MDL-58106 random Q restore: avoid MySQL performance issues 2017-03-02 19:41:35 +00:00
Jun Pataleta c8e6ceb4c4 MDL-58123 mod_lesson: Fix lesson table name in refresh_events DB query 2017-03-02 10:55:53 +08:00
David Mudrák 967451e8ed MDL-58114 plugin manager: Fix exception parameters 2017-03-01 15:10:51 +01:00
Eloy Lafuente (stronk7) 6098e65822 Merge branch 'wip-MDL-48228-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-03-01 02:57:34 +01:00
Adrian Greeve fb1fcfb4f3 MDL-48228 database: Unit test addition and update. 2017-03-01 09:07:14 +08:00
Adrian Greeve 39e019735f MDL-48228 database: Make utf8mb4 the default character set for mysql.
Thanks to Jetha Chan for providing the initial patch that this is
based on.
2017-03-01 09:07:14 +08:00
Eloy Lafuente (stronk7) b95cb5e0e5 Merge branch 'MDL-58071-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-02-28 23:00:50 +01:00
Eloy Lafuente (stronk7) 44b6b2318f Merge branch 'MDL-55762-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-02-28 20:41:09 +01:00
David Monllao c89650cd42 MDL-51833 docs: Move upgrade note under 3.1.5 2017-02-28 11:33:55 +01:00
David Monllao 3d062e2cdf Merge branch 'wip-MDL-51833-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-02-28 11:33:05 +01:00
Ankit Agarwal f9465c0974 MDL-57362 assignlib: Fix minor bug in phpdocs 2017-02-28 10:34:28 +05:30
Ankit Agarwal ced9b94a04 MDL-57362 assignlib: Check for sep groups edge case 2017-02-28 10:34:27 +05:30
Rajesh Taneja 55bf30c23c MDL-58091 behat: Added missing @_file_upload tag 2017-02-28 11:23:10 +08:00
Andrew Nicols c91507f8d5 Merge branch 'MDL-35980-31' of git://github.com/snake/moodle into MOODLE_31_STABLE 2017-02-28 10:34:09 +08:00
Jake Dallimore c8d7affbb5 MDL-35980 behat: fix link text in submission_comments feature 2017-02-28 10:26:37 +08:00
Andrew Nicols 188892a7a8 MDL-55547 tool_monitor: Coding style fixes 2017-02-28 09:12:04 +08:00
Andrew Nicols 12ec6228a5 Merge branch 'wip-MDL-55547-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-02-28 09:09:54 +08:00
Eloy Lafuente (stronk7) b7265c5a4f Merge branch 'MDL-58030_31' of git://github.com/aolley/moodle into MOODLE_31_STABLE 2017-02-27 22:54:19 +01:00
Helen Foster bdff8c070f MDL-58064 lang: Merge English strings from the en_fix language pack 2017-02-27 10:27:58 +01:00
Andrew Nicols 3b8f30b128 Merge branch 'MDL-50719-fast-locks-MOODLE_31_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_31_STABLE 2017-02-27 13:49:51 +08:00
Andrew Nicols f76f70f1b3 Merge branch 'MDL-35980-31' of git://github.com/snake/moodle into MOODLE_31_STABLE 2017-02-27 12:21:39 +08:00
Ankit Agarwal 7b14fef527 MDL-55762 assignpdf: Handle errored pages better 2017-02-27 09:27:07 +05:30
Ankit Agarwal cf350bc4f4 MDL-55762 assignpdf: Fix bug in phpdocs 2017-02-27 09:27:06 +05:30
Andrew Nicols 99105dabb5 Merge branch 'MDL-58032-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-02-27 11:52:24 +08:00
Adrian Greeve 9634c940d4 MDL-51833 tool_monitor: Improve access check for monitor. 2017-02-27 09:01:45 +08:00
Juan Leyva 330f27b3fd MDL-58071 user: Return usernotfullysetup exception in WS
If there is an empty required custom user profile field, Web Services
should return the usernotfullysetup exception instead ignoring it.
The mobile app already handles this exception for core fields
redirecting the user to web in order to fill the missing field.
2017-02-24 20:15:45 +01:00
Brendan Heywood 48f3c5744d MDL-50719 cron: Fixed parallel task lock contention issues 2017-02-24 13:18:33 +11:00
Jake Dallimore 8b913c588a MDL-56364 javascript: Prevent bad prototype chains in core dialogue
The DIALOGUE object was using Y.clone to copy the input config, messing
up the prototype chains for any objects in the config param. Really,
this doesn't need to clone the config, so I've refactored to avoid doing
so. Also moved some of the other attribute init and setup calls to the
appropriate places (initializer and modifyAttrs).
2017-02-24 08:35:32 +08:00
Jake Dallimore 3bf7fdb1e8 MDL-35980 comment: add comment info to delete button for screen readers
For each delete button in the comments widget, make the spoken text a
string containing the name of the poster and the datetime.
2017-02-24 08:17:43 +08:00
AMOS bot 6a85db36f5 Automatically generated installer lang files 2017-02-24 00:08:13 +08:00
David Monllao ac4c7623fe weekly release 3.1.4+ 2017-02-23 08:07:44 +01:00
David Monllao d0f5f3ad11 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-02-23 08:07:43 +01:00
Rajesh Taneja 8a63956d8d MDL-58056 behat: Ensure form element exists
Before getting form field, ensure node is
visible. Else it may fail to get form
field
2017-02-23 14:46:06 +08:00
Rajesh Taneja 957f81aaa6 MDL-58056 behat: Catch webdriver exception if element removed
While checking for element visibility, ensure
that element is there in dom
2017-02-23 14:46:06 +08:00
AMOS bot 9a910e7e8c Automatically generated installer lang files 2017-02-23 00:05:58 +08:00
David Monllao 2135c7e9ed MDL-56206 less: Build css styles after rewrite 2017-02-22 09:50:59 +01:00
Andrew Nicols 87cafedcc0 Merge branch 'MDL-56206-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-02-22 09:39:37 +01:00
Eloy Lafuente (stronk7) 5911ac9525 Merge branch 'MDL-55867_m31v1' of https://github.com/sbourget/moodle into MOODLE_31_STABLE 2017-02-22 09:34:19 +01:00
Eloy Lafuente (stronk7) 5a6e167a0b Merge branch 'MDL-56206_31-text-enrolled-users-page-aligned' of https://github.com/lucaboesch/moodle into MOODLE_31_STABLE 2017-02-22 09:34:19 +01:00
David Monllao 771f6902df Merge branch 'MDL-57576-31-updatefeedbackfile' of git://github.com/roperto/moodle into MOODLE_31_STABLE 2017-02-22 09:34:18 +01:00
Dan Poltawski 1626dc7c1f Merge branch 'MDL-57962-31' of git://github.com/dpalou/moodle into MOODLE_31_STABLE 2017-02-22 09:34:18 +01:00
David Monllao 4eb15e3225 Merge branch 'MDL-57795-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-02-22 09:34:17 +01:00
David Monllao 1d9bd31e42 Merge branch 'MDL-57801-31' of https://github.com/lucisgit/moodle into MOODLE_31_STABLE 2017-02-22 09:34:17 +01:00
Daniel Thee Roperto 4d2bd9a054 MDL-57840 libraries: Fixed missing fields in get_users_by_field(). 2017-02-22 16:05:49 +11:00
Ankit Agarwal 34502102b4 MDL-58032 core_user: Fix case when acting user is a visitor 2017-02-22 09:56:18 +05:30
Jake Dallimore 95cd5edfab MDL-56206 themes: Text on Enrolled users page well aligned
Helps to align the table row content.
2017-02-22 10:37:40 +08:00
Adam Olley c36e94ad98 MDL-58030 gradingform_guide: Init $commentchooser before use
The initialisation of $commentschooser was moved into an IF condition,
whilst still using it outside of that IF conditions scope. As such, if
there are no comments to choose from, the variable is never init'd but
it still goes to use it, emitting a PHP notice.
2017-02-21 14:36:08 +10:30
David Monllao 8225414388 Merge branch 'MDL-56679-31' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-02-20 09:20:39 +01:00
David Monllao 71f3a6c9c0 Merge branch 'MDL-50729-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-02-20 08:27:21 +01:00
Marina Glancy c1ee0772ff MDL-55547 tool_monitor: fix exceptions when course was deleted
Delete subscriptions when course is deleted
2017-02-20 12:13:48 +08:00
Jake Dallimore f5b9fddac4 MDL-57795 mod_assign: fix for filters killing review pane when grading
Fixes a bug in which the review pane was destroyed if the user selected
a combination of filters resulting in no matched users. Now, the pane
is just hidden in such cases, and displayed again if subsequent filter
changes return one or more users.
2017-02-20 08:54:55 +08:00
Matteo Scaramuccia ea76a7cde3 MDL-57379 Files: Improved file argument evaluation.
get_file_argument() is responsible to extract the relative path
of the file to be served by a specific Moodle component
like a theme or a module.
Some modules like scorm and imscp require slasharguments support
and they force it when creating the URLs to serve their files.
It should honor the slasharguments setting but this could break
those instances where existing hard-coded links still make usage of
the "old" format, the one when slasharguments is set to No i.e. '?file='.

Its logic has been improved by looking at when the URL is related to
serving a plug-in file in a "forced" slasharguments way of serving it
i.e. using '/pluginfile.php/' and not '/pluginfile.php?'.
2017-02-19 18:44:52 +00:00
Tony Butler 8e99e8c014 MDL-57801 core_filestorage: Delete temp file if disk space runs out 2017-02-16 12:48:57 +00:00
Tony Butler 131e69e29b MDL-57801 core_filestorage: Verify hash of temp file before committing
This addresses an edge scenario on NFS filesystems with no space
remaining, where subsequent uploads fail silently while zero byte files
are saved to the pool (and for some reason the filesize check passes).
2017-02-16 12:48:57 +00:00
Gergely Kún 9c6cc265da MDL-56679 core: Initialise $SESSION if necessary 2017-02-16 16:19:52 +08:00
Dan Poltawski 0767770d95 weekly release 3.1.4+ 2017-02-16 08:14:43 +00:00
Dan Poltawski 79fcb7446a Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-02-16 08:14:37 +00:00
Eloy Lafuente (stronk7) 91f22e1486 Merge branch 'MDL-53991_m31v4' of https://github.com/sbourget/moodle into MOODLE_31_STABLE 2017-02-14 18:16:34 +01:00
David Monllao b2a8d8af06 MDL-56122 editpdf: Fix ghostscript checking 2017-02-14 13:45:48 +01:00
Brendan Heywood b34f0b369f MDL-57810 lib: Disable nginx buffers when not required 2017-02-14 11:35:54 +00:00
Dani Palou 8163446fee MDL-57962 forum: Allow creating new discussions with groupid -1 2017-02-14 10:45:57 +01:00
David Monllao a331f6b0d8 Merge branch 'MDL-56122-31' of https://github.com/lucisgit/moodle into MOODLE_31_STABLE 2017-02-14 09:53:48 +01:00
Ankit Agarwal b3094c4751 MDL-50729 gradelib: Regrade event should be assigned to system 2017-02-14 11:40:52 +05:30
Ankit Agarwal 2d47619503 MDL-50729 events: Add user constants to events base class 2017-02-14 11:40:52 +05:30
Damyon Wiese 1494620bfb MDL-57766 assign: Put back the manual marker filter
I removed too much from gradingtable.php in the last patch.
2017-02-14 10:20:24 +08:00
Eloy Lafuente (stronk7) f1fd291473 Merge branch 'MDL-57868-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2017-02-13 23:42:58 +01:00
Tony Butler b20d56c357 MDL-56122 assignfeedback_editpdf: Add test assertions for pdf generation 2017-02-13 17:31:08 +00:00
Tony Butler 9e49655f16 MDL-56122 assignfeedback_editpdf: Regenerate PDF & page images if blank 2017-02-13 17:31:08 +00:00
Dan Poltawski 805a4017ab Merge branch 'MDL-56841_31' of https://github.com/andrewhancox/moodle into MOODLE_31_STABLE 2017-02-13 16:39:39 +00:00
Davo Smith 0e69daef28 MDL-57752 session: fix check_security() session termination 2017-02-13 13:54:47 +00:00
Dan Poltawski c704f0da1a Merge branch 'MDL-57768-webservice-config-error-MOODLE_31_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_31_STABLE 2017-02-13 13:31:05 +00:00
David Monllao f15c70ab7f Merge branch 'MDL-57766-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-02-13 09:44:36 +01:00
David Monllao 26ef0c5c79 Merge branch 'wip-MDL-50770-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-02-13 09:14:31 +01:00
AMOS bot 7f5df63d6e Automatically generated installer lang files 2017-02-11 00:12:02 +08:00
Ilya Tregubov ae1cb40c5e MDL-57768 webservice: Delete manual setting of config in test 2017-02-10 11:47:25 +11:00
Damyon Wiese 609d5f1826 MDL-57766 mod_assign: Marker allocation fixes
Marking allocation was only ever applied in the view for the grading table. It should
have been added to the list_participants function because that is used by webservices and
the new grading UI.
2017-02-09 17:14:12 +08:00
Andrew Nicols 70b465a75c MDL-57766 assign: backport MDL-54872
We need to backport the changes in MDL-54872 so we can apply a fix on top of them in this issue.
2017-02-09 17:14:03 +08:00
David Monllao 341af0a779 weekly release 3.1.4+ 2017-02-09 08:00:06 +01:00
David Monllao 1e2f25c79c Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-02-09 08:00:04 +01:00
Damyon Wiese 95004c72af MDL-57009 javascript: Fix "failed to prefetch"
The scanForPartials in amd/src/templates.js function is not handling
nested sections (the list of tokens is a tree not a flat list).
2017-02-08 11:11:40 +08:00
AMOS bot da83f4d2fc Automatically generated installer lang files 2017-02-08 00:09:38 +08:00
Damyon Wiese 5799fb8640 MDL-57009 javascript: Reject on all errors
Not all error paths were resulting in a reject() call to fail a promise.
2017-02-07 12:36:14 +00:00
Damyon Wiese e1c3a4d24f MDL-57009 javascript: Always use when.apply
Or it does not really wait for the promises.
2017-02-07 12:36:09 +00:00
Dan Poltawski c20f9c6678 Merge branch 'MDL-57009-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2017-02-07 12:32:32 +00:00
Eloy Lafuente (stronk7) 556ca7fa16 Merge branch 'wip-mdl-57851-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-02-07 01:26:36 +01:00
AMOS bot 7dfbe69352 Automatically generated installer lang files 2017-02-07 00:05:39 +08:00
Eloy Lafuente (stronk7) bc091a045b Merge branch 'MDL-53349-31' of https://github.com/xow/moodle into MOODLE_31_STABLE 2017-02-06 16:26:02 +01:00
Dan Poltawski 257ef7c065 Merge branch 'MDL-57660-31' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2017-02-06 13:47:31 +00:00
Dan Poltawski d8b7b023a6 Merge branch 'MDL-56592-31' of git://github.com/merrill-oakland/moodle into MOODLE_31_STABLE 2017-02-06 12:33:59 +00:00
Dan Poltawski 622a713fa1 Merge branch 'MDL-57587_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2017-02-06 11:02:23 +00:00
Juan Leyva 7b48139c7a MDL-57868 mod_feedback: Fix incorrect query parameters order
get_records_menu call get_records using the same params ordering, it is
causing a duplicated value error for the first column
2017-02-06 11:32:45 +01:00
David Monllao 5ef761f4d8 Merge branch 'MDL-57777-m31' of https://github.com/micaherne/moodle into MOODLE_31_STABLE 2017-02-06 09:42:05 +01:00
Stephen Bourget 4f865489f0 MDL-55867 block_activity_results: Sort activities alphabetically. 2017-02-05 21:30:59 -05:00
Rajesh Taneja 475a266e31 MDL-57851 behat: Add some more wait for scenario to pass
On slow machine with phnatomjs profile
this scenario keeps failing. Add some more
wait to ensure the page is stable and next
step can be executed
2017-02-03 12:55:13 +08:00
AMOS bot d77412d35f Automatically generated installer lang files 2017-02-03 00:04:26 +08:00
Andrew Hancox 5fee906a30 MDL-56841 mod_folder: Display edit and download buttons inline 2017-02-02 15:18:01 +00:00
Andrew Nicols a04076a1f2 weekly release 3.1.4+ 2017-02-02 11:32:09 +08:00
Nadav Kavalerchik d0ed5742d0 MDL-53349 Autocomplete: Support multi lingual COMMA keycode (44) 2017-02-01 16:39:00 +08:00
Ankit Agarwal 2ba930d7bb MDL-57027 accesslib: Improve perf of sql 2017-02-01 13:07:47 +08:00
Petr Skoda 650197e4dc MDL-57027 fix get_users_by_capability()
Change-Id: I98dc88784dfa0293f88a19c3d36e7a46a3f52672
2017-02-01 13:07:47 +08:00
Eloy Lafuente (stronk7) 53b48f0116 Merge branch 'MDL-57592-31' of https://github.com/mwehr/moodle into MOODLE_31_STABLE 2017-02-01 13:07:46 +08:00
Dan Poltawski 21f77735fc Merge branch 'MDL-57588_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2017-02-01 13:07:46 +08:00
Michael Aherne 049838f998 MDL-57777 rss: Return 404 when context not found. 2017-01-31 09:33:20 +00:00
Andrew Nicols 6df1f24a6b Merge branch 'wip-MDL-57785-31' of git://github.com/amygroshek/moodle into MOODLE_31_STABLE 2017-01-31 12:26:38 +08:00
Andrew Nicols 1f47d41b03 Merge branch 'MDL-35978-31-blockfix' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-01-31 11:52:12 +08:00
Jake Dallimore 903ef33978 MDL-35978 comments: fix for comments block which has no toggler 2017-01-31 11:36:42 +08:00
Andrew Nicols 7d2477a859 Merge branch 'MDL-57296-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-01-31 08:55:27 +08:00
wehr 054a23264c MDL-57592 assignment: Adds filtering of assignment name in grader view 2017-01-30 18:31:51 +01:00
Tim Hunt 9e50e8c386 MDL-57588 questions: regrading should not lose flags 2017-01-30 14:32:28 +00:00
Dan Poltawski 1a52d63ea9 Merge branch 'MDL-35978-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-01-30 09:54:15 +00:00
Dan Poltawski 78d40d3e6d Merge branch 'MDL-36233-31' of git://github.com/lameze/moodle into MOODLE_31_STABLE 2017-01-30 09:34:56 +00:00
Ankit Agarwal afaeae1796 MDL-57296 gradelib: Fix get_hidding_effect for grade_type_none items 2017-01-30 13:49:59 +05:30
Ankit Agarwal f518505d71 MDL-57296 gradebook: Fix issue with gradebook while collapsing grades 2017-01-30 13:49:58 +05:30
Mike Churchward b5c0146072 MDL-36233 mod_assign: fixed submission time comparison sql and test. 2017-01-30 09:27:26 +08:00
Amy Groshek d5b78c7c81 MDL-57785 scorm: Prevents SCORM nav refresh when nav not shown.
This improvement prevents refresh of SCORM 1.2 navigation menu
when the navigation menu is not displayed.
2017-01-27 09:13:31 -06:00
Luca Bösch 99e0439396 MDL-56206 themes: Text on Enrolled users page well aligned
Helps to align the table row content.
2017-01-27 08:20:13 +01:00
Jake Dallimore 9660b5f471 MDL-35978 comments: expandable comments announce change when toggled
Added role and aria-expanded attributes to the toggler link and added
a key handler for the space and enter keys.
2017-01-27 13:08:41 +08:00
Jun Pataleta 742671e7c9 MDL-57660 mod_forum: Preserve forum ID selection after form submission 2017-01-27 10:10:14 +08:00
Eloy Lafuente (stronk7) 81e812c697 weekly release 3.1.4+ 2017-01-27 00:27:57 +01:00
Eloy Lafuente (stronk7) b984606f45 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-01-27 00:27:53 +01:00
Tim Hunt 072a971908 MDL-57587 question file access: fix regression caused by MDL-53744 2017-01-26 18:54:47 +00:00
Michael Aherne 829e7ae8a3 MDL-57777 rss: Return 404 when context not found. 2017-01-26 10:49:13 +00:00
Eloy Lafuente (stronk7) df222f7338 Merge branch 'MDL-55915_31' of https://github.com/rezaies/moodle into MOODLE_31_STABLE 2017-01-24 22:11:53 +01:00
AMOS bot 8a0eb277db Automatically generated installer lang files 2017-01-25 00:04:55 +08:00
Dan Poltawski 836747b10a Merge branch 'MDL-57639-31' of git://github.com/andrewnicols/moodle into MOODLE_31_STABLE 2017-01-24 10:11:26 +00:00
Rajesh Taneja b638f51bd0 MDL-46782 scorm: Fixed behat in multisco_reentry
Require all scos to return completion status is not
in 31, by default the scos will return completion
2017-01-24 10:31:14 +08:00
Dan Poltawski 371f4c2e72 Merge branch 'wip_31_mdl-50625_ldap_better_check_paged_results_support' of https://github.com/iarenaza/moodle into MOODLE_31_STABLE 2017-01-23 16:21:05 +00:00
Dan Poltawski 787e897899 Merge branch 'mdl57668-moodle31' of https://github.com/tlock/moodle into MOODLE_31_STABLE 2017-01-23 12:05:35 +00:00
Dan Poltawski c341626927 Merge branch 'wip-mdl-57700-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-01-23 11:59:09 +00:00
Dan Poltawski 86ef5ce6be Merge branch 'MDL-57677-31-usermodified' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-01-23 09:48:14 +00:00
Dan Poltawski eee6c61ea6 Merge branch 'm31_MDL-46782' of git://github.com/danmarsden/moodle into MOODLE_31_STABLE 2017-01-23 09:29:37 +00:00
Shamim Rezaie 79441b56ba MDL-55915 enrol_manual: let fullname()know if user has viewfullnames cap
fullname() relies on its second parameter to determine wheter it should use fullnamedisplay or alternativefullnameformat.
We need to check for moodle/site:viewfullnames capability and pass true as the second parameter to fullname() whereever
the user has this capability.
2017-01-20 20:08:47 +11:00
Shamim Rezaie c4b9228d18 MDL-55915 core_user: let fullname() know if user has viewfullnames cap
Added $viewfullnames property to the user_selector_base class so anyone using a child class of this class can
let it know if user has viewfullnames capability or not.
2017-01-20 20:08:17 +11:00
Shamim Rezaie 571f5aba3e MDL-55915 Gradebook: let fullname() know if user has viewfullnames cap
Instruct fullname() to format names on the gradebook grader report with alternativefullnameformat when user
has moodle/site:viewfullnames capability.
2017-01-20 20:07:45 +11:00
Shamim Rezaie 8a954a1571 MDL-55915 mod_assign: let fullname() know if user has viewfullnames cap
Instruct fullname() to format names on the assignment grading page with alternativefullnameformat when user
has moodle/site:viewfullnames capability.
2017-01-20 20:07:11 +11:00
Rajesh Taneja 4e9072d20b MDL-57700 behat: Fixed undefined RuntimeException 2017-01-20 11:14:00 +08:00
AMOS bot f49ff4b736 Automatically generated installer lang files 2017-01-20 00:07:28 +08:00
Iñaki Arenaza 52c14af205 MDL-50625 auth_ldap: Better check for paged results support
There is at least one LDAP server (Sun Directory Server) that doesn't
support Paged Results extension, even if it supports LDAP version 3. So
checking just for LDAP version is not enough.

If possible, we check the supportedControl attribute of the LDAP rootDSE
and see if the paged results control is available. This needs an LDAP
connection, which might not be possible to establish before we configure
some essential LDAP settings (server, bind user, password, etc.). Thus
we try to establish the connection and check the supportedControl
attribute. But if we fail, we perform only basic checks that are less
accurate and err on the side of cautiousness.
2017-01-19 11:02:13 +01:00
Andrew Nicols 087e52eccf MDL-57639 mod_forum: Update to use correct variable name
This addresses a regression where unnecessary attributes were removed
from the old variable. This one was missed.
2017-01-19 13:48:50 +08:00
Andrew Nicols 26c76fcc0b weekly release 3.1.4+ 2017-01-19 12:17:52 +08:00
Andrew Nicols 544a47fc07 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-01-19 12:17:50 +08:00
Tim Lock dfbbb39a25 MDL-57668 mod_assign: Fix optional_param() form processing 2017-01-19 08:07:05 +10:30
Dan Poltawski c52766af64 MDL-57604 mod_assign: fix empty case in user selector
Sadly the js arguments object gives an arguments.length of 1 when
no arguments are passed, so we have to explicitly check for it.
2017-01-18 09:59:45 +01:00
Dan Marsden 4af0bb82e1 MDL-46782 mod_scorm: Load first incomplete sco on re-entry. 2017-01-18 21:06:24 +13:00
Andrew Nicols c2a9f46692 Merge branch 'wip-mdl-45821-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-01-18 13:10:53 +08:00
Rajesh Taneja 3398ecbfc2 MDL-45821 behat: navigate back to scorm to avoid scroll
On Exiting scrom activity, it goes back to course
and scrolls to section. On slow machines next step
fails. To avoid such case navigate to home screen
and then follow next step.
2017-01-18 13:08:29 +08:00
Rajesh Taneja 3ce28cce2e MDL-45821 behat: navigate back to scorm to avoid scroll
On Exiting scrom activity, it goes back to course
and scrolls to section. On slow machines next step
fails. To avoid such case navigate to home screen
and then follow next step.
2017-01-18 13:05:24 +08:00
Eloy Lafuente (stronk7) 54cbf4279a Merge branch 'MDL-57604-31' of git://github.com/danpoltawski/moodle into MOODLE_31_STABLE 2017-01-18 00:18:31 +01:00
David Mudrák e611797d37 MDL-57677 mod_forum: Fix wrong user displayed as the last post's author
In the recent issue MDL-56225, we started to record the current user as
the usermodified in the forum_discussions table when updating a forum
post. It made sense but it was a mistake.

Even if the current user really modifies the discussion by updating the
post, the field usermodified has actually been always interpreted and
displayed as the last post' author. Not as the last user who touched the
discussion.

This patch reverts that particular change to the previous behaviour and
adds explicit unit test for it.
2017-01-17 20:09:36 +01:00
AMOS bot db27b57aa5 Automatically generated installer lang files 2017-01-18 00:07:35 +08:00
Dan Poltawski 8d270f56e2 Merge branch 'wip-mdl-57669-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-01-17 10:28:36 +00:00
Dan Poltawski 1e25d9306d Merge branch 'MDL-57515-m31' of https://github.com/sammarshallou/moodle into MOODLE_31_STABLE 2017-01-17 10:21:15 +00:00
Rajesh Taneja b3b8d045b7 MDL-45821 behat: Added test scorm package for behat 2017-01-17 13:39:40 +08:00
Rajesh Taneja ab1c2037fc MDL-57669 behat: Exit with error code if step undefined 2017-01-17 10:28:35 +08:00
AMOS bot 29aafc0ec7 Automatically generated installer lang files 2017-01-17 00:08:19 +08:00
Dan Poltawski 03ed7684d4 Merge branch 'MDL-57452_behat_completion_fix_master_MOODLE_31_STABLE' of https://github.com/gthomas2/moodle into MOODLE_31_STABLE 2017-01-16 13:34:10 +00:00
Dan Poltawski 8d1bf87c0e Merge branch 'MDL-57601-m31' of https://github.com/sammarshallou/moodle into MOODLE_31_STABLE 2017-01-16 12:23:07 +00:00
Dan Poltawski ec4e2838cd Merge branch 'MDL-57374_m31' of https://github.com/dasistwas/moodle into MOODLE_31_STABLE 2017-01-16 12:11:06 +00:00
Dan Poltawski d3bfb8ceac Merge branch 'MDL-57554-31' of git://github.com/crazyserver/moodle into MOODLE_31_STABLE 2017-01-16 11:18:00 +00:00
Dan Poltawski 10ce06e159 Merge branch 'm31_MDL-45821' of git://github.com/danmarsden/moodle into MOODLE_31_STABLE 2017-01-16 09:17:54 +00:00
Dan Poltawski 23cf2f6db3 Merge branch 'wip-MDL-56271-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2017-01-16 08:01:24 +00:00
Pau Ferrer Ocaña d3a22bc5a8 MDL-57554 forum: Mark as read on view_forum_discussion calls 2017-01-13 09:27:14 +01:00
David Bogner 18937c1577 MDL-57374 editor: Pasting plain text in Atto removes all styles/classes 2017-01-12 17:58:28 +01:00
AMOS bot 93c8f9347e Automatically generated installer lang files 2017-01-13 00:05:50 +08:00
Stephen Bourget 26c09bc165 MDL-53991 calendar: fix repeating events on course import 2017-01-12 09:41:14 -05:00
gthomas2 35ce557a91 MDL-57452 behat: Make completion check work with manual completion input 2017-01-12 11:43:22 +00:00
Dan Poltawski bdccf17907 weekly release 3.1.4+ 2017-01-12 07:42:31 +00:00
Eloy Lafuente (stronk7) 91557e03ee Merge branch 'wip-mdl-57595-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-01-11 02:37:53 +01:00
Rajesh Taneja 5b5424a8ee MDL-57595 behat: Added wait to ensure next step pass 2017-01-11 09:34:03 +08:00
Dan Poltawski 3a5de34b03 Merge branch 'MDL-57480-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2017-01-10 08:40:13 +00:00
Marina Glancy 6608a30b15 MDL-56271 mod_feedback: recaptcha was not working 2017-01-10 14:08:37 +08:00
Marina Glancy bb21b0ad57 MDL-50770 blocks: copy sitewide blocks positions when cloning dashboards 2017-01-10 11:40:19 +08:00
Jake Dallimore 8e2349f196 MDL-57480 core_course: make drag and drop fire a dom updated event
When adding media via drag and drop, the notifyFilterContentUpdated
event should be called after the item is added to the DOM. This allows
things like videojs for example, to process the new content.
2017-01-10 07:52:46 +08:00
Dan Poltawski c4f051e2e9 MDL-57604 mod_assign: fix incorrect user being selector from chooser
Previously there was a logic bug where by if some students were filtered
from the list, the label for another student could be attached to the
'filered' student.

This fix reworks the promises a bit so we render the student summary and
then build an row with the explict user id, rather than itterating through
the array later.

I also remove the storing of the initial promise in a varible because
this is an easy way to introduce a bug (not waiting for the .then()
chained promise)
2017-01-09 20:41:09 +00:00
sam marshall 691868bdaa MDL-57601 Grade report: Error for ungraded quiz without view hidden
If a course contains an ungraded quiz (max grade set to 0), and there
is a user account which can view the grader reports but does not have
permission to view hidden grades, they will get errors.
2017-01-09 17:15:13 +00:00
sam marshall bc1643135c MDL-57515 Resource: 'not very efficient' with a large number of files
Fixes bug where the resource module loads metadata for all files while
building course modinfo, even though it only needs the first file.
(This causes problems if you have ~10k files.)
2017-01-09 16:36:41 +00:00
Dan Poltawski 1910eaf251 Merge branch 'MDL-57427_m31' of https://github.com/jrchamp/moodle into MOODLE_31_STABLE 2017-01-09 16:26:30 +00:00
Jonathan Champ e3d53b99aa MDL-57427 cache: Use perfdebug only when enabled 2017-01-09 10:19:02 -05:00
David Monllao d05d5cd4c7 Merge branch 'wip-mdl-55042-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-01-09 12:56:22 +01:00
godric 1790647ff9 MDL-40132 lib: Using compare rule results in fatal error.
In getValidationScript function variable $element can be an array or object.
Function attempt get non-existing attributes.
To avoid this we should check before accessing.
2017-01-09 10:30:12 +00:00
Dan Poltawski fe51a68590 Merge branch 'MDL-53367_31' of https://github.com/juancs/moodle into MOODLE_31_STABLE 2017-01-09 08:28:02 +00:00
Dan Marsden 62ca5c4b91 MDL-45821 mod_scorm: Check lesson_status correctly for multi-sco. 2017-01-09 20:08:38 +13:00
Eloy Lafuente (stronk7) edab0782a3 Moodle release 3.1.4 2017-01-08 11:04:30 +01:00
AMOS bot ea40017100 Automatically generated installer lang files 2017-01-08 00:05:17 +08:00
Dan Poltawski cef7920cd1 weekly release 3.1.3+ 2017-01-06 01:30:54 +00:00
Dan Poltawski ea69f5f78f Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2017-01-06 01:30:53 +00:00
David Mudrák 29c56ec89e MDL-57580 mod_assign: Fix the incorrect type of some input parameters
The PARAM_TEXT has been misused in certain cases here. The 'action'
parameter seems to always be alphabetic, with values like
savesubmission, editsubmission and others as handled in assign::view().

Fixing the action handling fixes the reported XSS issue. While working
on it, I spotted two more places where PARAM_TEXT does not seem
appropriate. I include changes for them too, even if they are no
strictly related to the reported bug and there are no known ways to
abuse it.

* The 'plugin' looks like PARAM_PLUGIN and is even declared as such in
  some other parts of the assignment code (such as feedback forms).

* The 'workflowstate' is one of the ASSIGN_MARKING_WORKFLOW_STATE
  constants and is supposed to be alpha in external function input
  parameters handling, too.
2017-01-05 17:40:13 +01:00
Dan Poltawski cb84158ba7 Merge branch 'MDL-57563-31-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-01-05 10:11:42 +00:00
Helen Foster 530656cedb MDL-57563 lang: Merge English strings from the en_fix language pack 2017-01-05 10:46:12 +01:00
Rajesh Taneja d33d5f302e MDL-57531 behat: Set noreplyaddress to valid address
noreplyaddress should be a valid address, else
it will not be saved. For behat we don't send
email, so set it to noreply@example.com, to
avoid failing validation on localhost
2017-01-05 06:52:11 +00:00
Daniel Thee Roperto 33952ce027 MDL-57576 assignment: Overwrite feedback file if it has the same name. 2017-01-05 15:31:31 +11:00
Damyon Wiese 893ed748bc MDL-57009 javascript: cibot nagging
Conflicts:
	lib/amd/build/templates.min.js
2017-01-05 09:38:09 +08:00
Damyon Wiese 13c9addc7d MDL-57009 javascript: Dont rely on async ajax
Recursively pre-scan mustache templates to extract the list of blocks and partials. Then
we can pre-fetch them all and don't have to rely on jquery async ajax (which is deprecated).

This is part of a refactoring of the promises code in the templates module to prevent duplicate requests.

Conflicts:
	lib/amd/build/templates.min.js
2017-01-05 09:37:55 +08:00
Damyon Wiese 0d1c739aeb MDL-57009 js: Do not fetch the same template twice
Also clean up promises use of done vs then.

Conflicts:
	lib/amd/build/templates.min.js
	lib/amd/src/templates.js
2017-01-05 09:37:32 +08:00
Damyon Wiese 3ef9d54387 MDL-57009 js: Skip ajax request for same string
This is done by caching the first promise generated to fetch a string.
2017-01-05 09:36:49 +08:00
AMOS bot 6302ddbece Automatically generated installer lang files 2017-01-05 00:05:35 +08:00
Dan Poltawski 3ad6c077d9 Merge branch 'MDL-57531-31-phpmailer' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2017-01-04 13:33:46 +00:00
David Mudrák f3d6e11ca0 MDL-57531 mail: Validate the sender's email address
The patch adds validation for the noreplyaddress setting variable, for
the explicit $replyto parameter and for the sender's email. In case of
misconfigured noreplyaddress setting, it falls back to the default
noreply address value. In case of invalid email in the user's record,
the email is not sent.

The patch also adds unit test for the value returned by the function
generate_email_processing_address() so that it can be considered as a
valid email, too.

This is supposed to significantly minimise the risk of exploiting the
vulnerability in PHPMailer's Sender field.
2017-01-04 13:05:03 +01:00
David Mudrák 7d1d26c48d MDL-57531 mail: Do not let admins set invalid email addresses
The noreply and support emails should always be valid.
2017-01-04 12:43:12 +01:00
Eloy Lafuente (stronk7) 14cc2f7d83 Merge branch 'MDL-57192-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2017-01-04 11:59:02 +01:00
David Mudrák a910f710fc MDL-56225 mod_forum: Fix inability to edit attachments
The 'attachments' is not a real DB field here. It comes from the form's
filepicker and holds the id of the attachments filearea. The function
forum_add_attachment() expects it as a property of the first argument.

There were two possible approaches here. Either to pass the raw $newpost
to forum_add_attachment(), or add the attachments into the list
modifiable fields. The second approach is safer.
2017-01-04 10:36:29 +00:00
David Monllao df676dea41 Merge branch 'm31_MDL-49557' of git://github.com/danmarsden/moodle into MOODLE_31_STABLE 2017-01-04 06:14:31 +01:00
Ankit Agarwal a331b1d791 MDL-57192 dml: Temporarily disable query logging during setup 2017-01-04 08:17:52 +05:30
Dan Marsden d0c5c6e60c MDL-49557 mod_scorm: optionally strip quotes. 2017-01-04 15:45:38 +13:00
Ankit Agarwal 8684514333 MDL-57192 dml: Support temporarily disabling query logs during setup 2017-01-04 08:06:22 +05:30
Andrew Nicols e6a855e81d MDL-56225 mod_forum: Remove unnecessary attributes from update 2017-01-03 16:58:47 +00:00
Rajesh Taneja 29c62b300c MDL-55042 phpunit: Get sorted sections
Sometimes db doesn't return records in order
So enusre it is in order so that last record
doesn't have section equal 0. As section 0
can't be deleted.
2017-01-03 10:01:00 +08:00
Eloy Lafuente (stronk7) 274c7ad7da Merge branch 'wip-mdl-57494-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2017-01-03 02:35:21 +01:00
Davo Smith 00b860d0d1 MDL-47198 filelib: fix curl handling headers with no value 2017-01-02 16:44:01 +01:00
Dan Poltawski 65e7dd7798 Merge branch 'm31_MDL-49557' of git://github.com/danmarsden/moodle into MOODLE_31_STABLE 2017-01-02 12:35:11 +00:00
Dan Poltawski 8dea0f4533 Merge branch 'MDL-57080-m31' of https://github.com/micaherne/moodle into MOODLE_31_STABLE 2017-01-02 12:15:04 +00:00
Dan Poltawski 28bb924937 Merge branch 'wip-MDL-57464-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2017-01-02 11:16:22 +00:00
AMOS bot f556e14028 Automatically generated installer lang files 2016-12-30 00:05:34 +08:00
Dan Poltawski 3b95075ddd Merge branch 'MDL-57512-31' of git://github.com/crazyserver/moodle into MOODLE_31_STABLE 2016-12-29 11:50:59 +00:00
Dan Poltawski eb9aa63303 Merge branch 'm31_MDL-50643' of git://github.com/danmarsden/moodle into MOODLE_31_STABLE 2016-12-29 11:46:50 +00:00
Pau Ferrer Ocaña 0ebebc2552 MDL-57512 categories: Use maxcategorydepth only when getting all cats 2016-12-29 12:09:57 +01:00
David Monllao 104a76930d Merge branch 'MDL-57338-31' of git://github.com/danpoltawski/moodle into MOODLE_31_STABLE 2016-12-29 10:52:47 +01:00
Dan Poltawski 977b92dd0b Merge branch 'MDL-55955_31' of git://github.com/markn86/moodle into MOODLE_31_STABLE 2016-12-28 15:11:58 +00:00
Dan Poltawski 9ff6b6d5fa Merge branch 'wip-MDL-57366-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2016-12-28 15:05:59 +00:00
David Monllao c5be0c6b22 Merge branch 'MDL-52366-31-mustachethemedir' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2016-12-28 12:24:14 +01:00
Dan Marsden 751e80769c MDL-49557 mod_scorm: fix AICC pre-requisite handling. 2016-12-28 10:09:44 +13:00
AMOS bot 845cf5b198 Automatically generated installer lang files 2016-12-27 00:09:29 +08:00
AMOS bot 0dff58bb16 Automatically generated installer lang files 2016-12-26 00:06:07 +08:00
AMOS bot 1f859dd6d7 Automatically generated installer lang files 2016-12-25 00:04:46 +08:00
Adrian Greeve c27a165ccf MDL-57464 mod_lesson: fix notice with sub-clusters. 2016-12-23 11:13:13 +08:00
Jake Dallimore 39fc6c210e MDL-57357 auth: add behat coverage for remember username login feature 2016-12-23 11:11:37 +08:00
Adrian Greeve 4f2c239ea4 MDL-57366 mod_lesson: Zero now acceptable numeric answer.
When creating a numerical question. If the answer to the
question is 0 then the answer will not save.
2016-12-23 10:37:40 +08:00
Mark Nelson 84f6435a14 MDL-55955 mod_quiz: ensure duplicated override events are removed 2016-12-23 10:02:55 +08:00
Dan Marsden 850e56c5c6 MDL-50643 mod_scorm: redirect using current window instead of parent. 2016-12-23 10:18:15 +13:00
Dan Poltawski 5f0e1523f7 MDL-57338 templates: add missing example context 2016-12-22 13:02:57 +00:00
Michael Aherne 9a177e48f3 MDL-57080 completion: Update completion expected date on reset 2016-12-22 11:50:06 +00:00
Dan Poltawski 6b5bff8870 weekly release 3.1.3+ 2016-12-22 08:15:11 +00:00
Dan Poltawski 0d5aa55fb6 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2016-12-22 08:15:10 +00:00
Rajesh Taneja 8d9d32653b MDL-57494 behat: Fixed tags and removed reset in after_scenario
1. Added missing switch_window tags
2. Fixed switch_frame tags to use switch_iframe
3. Removed reset from after_scenario.
2016-12-22 12:46:05 +08:00
David Monllao af63b87738 Merge branch 'MDL-55575_B_31' of https://github.com/bostelm/moodle into MOODLE_31_STABLE 2016-12-21 05:50:32 +01:00
Eric Merrill b7afb51132 MDL-56592 gradereport_user: Add ability to view report as other user
Backport of MDL-30179.
2016-12-20 13:19:40 -05:00
AMOS bot 9ca2bb46f4 Automatically generated installer lang files 2016-12-21 00:04:14 +08:00
Dan Poltawski a902c76035 Merge branch 'MDL-54996_m31v1' of https://github.com/sbourget/moodle into MOODLE_31_STABLE 2016-12-20 09:19:28 +00:00
Juan Segarra Montesinos d346c55175 MDL-53367 mod_forum: Subscribe current users when importing a forum
Subscribes currently enrolled users when importing a forum with
automatic subscription enabled.
2016-12-20 09:00:51 +01:00
John Okely 149c4fc1fa MDL-57268 auth_db: Unit tests for deletion from a large user set 2016-12-20 02:27:15 +01:00
Rafal Domagalski ec3260126f MDL-52366 themes: check for templates in themedir 2016-12-19 18:13:14 +01:00
Dan Poltawski 04f2ca8403 Merge branch 'MDL-55568_m31v2' of https://github.com/sbourget/moodle into MOODLE_31_STABLE 2016-12-19 14:33:08 +00:00
Dan Poltawski 52c8ba9fb5 Merge branch 'wip-MDL-56912-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2016-12-19 12:21:24 +00:00
Dan Poltawski e23b813fba Merge branch 'MDL-52098_31_STABLE' of git://github.com/Chocolate-lightning/moodle into MOODLE_31_STABLE 2016-12-19 11:25:50 +00:00
David Monllao a8f1c2d081 Merge branch 'MDL-57402_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2016-12-19 12:21:06 +01:00
Dan Poltawski c828f9f1a9 Merge branch 'MDL-53044-m31' of https://github.com/ak4t0sh/moodle into MOODLE_31_STABLE 2016-12-19 08:47:24 +00:00
Dan Poltawski 9ca69b62a7 Merge branch 'MDL-55715_m31v1' of https://github.com/sbourget/moodle into MOODLE_31_STABLE 2016-12-19 08:35:44 +00:00
Stephen Bourget ae427d9bde MDL-54996 Calendar: Fix dates for future multi-day events
Thanks to Martin Cunliffe for providing the fix
2016-12-17 10:54:32 -05:00
Mathew May 344afe028c MDL-52098 enrol: cohort now looks at instance status 2016-12-16 11:23:42 +13:00
Arnaud Trouve ca8ccd3960 MDL-53044 auth : force change on expired password 2016-12-15 15:07:06 +01:00
Andrew Nicols 84ad325c69 weekly release 3.1.3+ 2016-12-15 11:34:14 +08:00
Andrew Nicols 03023520d8 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2016-12-15 11:34:10 +08:00
Tim Hunt 8aa1fb5a2c MDL-57402 quiz editing: fix add heading after remove page break 2016-12-14 16:29:13 +00:00
AMOS bot 40279bf2ea Automatically generated installer lang files 2016-12-15 00:04:23 +08:00
Stephen Bourget 44990fffb0 MDL-55715 calendar: Only update events from the current subscription
The iCal import should only update calendar events from the current
subscription not any subscription that contains the same event.
2016-12-13 22:07:26 -05:00
Andrew Nicols 3543f44073 Merge branch 'wip-mdl-57380-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-12-14 10:03:06 +08:00
Rajesh Taneja 548b707034 MDL-57380 behat: Check for list tags and text
after list tag span can be added on few browsers
like chrome 51.0, so test if text starts with
list tag and contains text
2016-12-14 09:59:46 +08:00
Andrew Nicols 1fc45fb305 Merge branch 'MDL-55062_31' of git://github.com/markn86/moodle into MOODLE_31_STABLE 2016-12-14 09:49:46 +08:00
Stephen Bourget c879145e42 MDL-55568 chat: chat_refresh_events should only create published events 2016-12-13 18:54:48 -05:00
Eloy Lafuente (stronk7) 02aa2c5257 Merge branch 'MDL-55809-31' of https://github.com/xow/moodle into MOODLE_31_STABLE 2016-12-13 20:05:34 +01:00
Dan Poltawski ed41e34699 Merge branch 'MDL-57125-31' of git://github.com/lameze/moodle into MOODLE_31_STABLE 2016-12-13 16:34:59 +00:00
Dan Poltawski 8656edd2e5 Merge branch 'MDL-56810' of https://github.com/Syxton/moodle into MOODLE_31_STABLE 2016-12-13 14:55:53 +00:00
Eloy Lafuente (stronk7) e1fbc8e4da Merge branch 'MOODLE_31_STABLE' of https://github.com/fwsl/moodle into MOODLE_31_STABLE 2016-12-13 12:01:05 +01:00
Eloy Lafuente (stronk7) b3d43b015d Merge branch 'MDL-55720_m31' of https://github.com/ak4t0sh/moodle into MOODLE_31_STABLE 2016-12-13 11:49:57 +01:00
Henning Bostelmann 5e7abb9900 MDL-55575 mod_glossary: Allow viewing all entries on one page 2016-12-13 11:44:56 +01:00
Dan Poltawski 419bec2fd3 Merge branch 'MDL-57250_m31' of git://github.com/markn86/moodle into MOODLE_31_STABLE 2016-12-13 10:25:11 +00:00
Dan Poltawski 727759006c Merge branch 'MDL-56859-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2016-12-13 09:45:20 +00:00
Dan Poltawski 5e4744bb90 Merge branch 'MDL-57074-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2016-12-13 09:26:20 +00:00
Dan Poltawski 92d3e80482 Merge branch 'MDL-57182-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2016-12-13 08:47:38 +00:00
Dan Poltawski 00d9bc4a34 Merge branch 'wip-MDL-57257-31' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE 2016-12-13 08:46:10 +00:00
Marina Glancy e02a11ad0a MDL-56912 feedback: empty multichoice questions do not submit 2016-12-13 15:01:11 +08:00
Mark Nelson e4f1771a60 MDL-55062 tool_uploaduser: prevent defaults when not selected 2016-12-13 12:43:45 +08:00
Simey Lameze 17ffb3eca7 MDL-57125 comment: prevent js execution if there are no comments 2016-12-13 12:11:09 +08:00
Jan Dageförde f77e3ebb30 MDL-57257 lesson: Validate type of numerical answer 2016-12-13 10:35:51 +08:00
Andrew Nicols f2a59f5cf0 Merge branch 'MDL-57222_m31' of git://github.com/markn86/moodle into MOODLE_31_STABLE 2016-12-13 10:31:56 +08:00
Rajesh Taneja d8f02a7489 MDL-57328 core: Remove xdebug extension, so test run faster 2016-12-13 02:30:52 +01:00
Eloy Lafuente (stronk7) c2834ccb6e Merge branch 'mdl31_MDL-57324' of git://github.com/danmarsden/moodle into MOODLE_31_STABLE 2016-12-13 02:02:16 +01:00
Jake Dallimore f6d2455657 MDL-57182 navigation: fix login failures display in page footer.
A bug introduced with MDL-45893 meant that the failure count was being
reset, causing the footer code to be skipped. This patch fixes that
bug and adds behat tests covering the displayloginfailures feature.
2016-12-13 07:21:47 +08:00
Dan Poltawski fae39b86c3 Merge branch 'MDL-56525-m31' of https://github.com/ak4t0sh/moodle into MOODLE_31_STABLE 2016-12-12 14:09:39 +00:00
Dan Poltawski 67dc08ecf4 Merge branch 'MDL-55782-31-test' of git://github.com/ryanwyllie/moodle into MOODLE_31_STABLE 2016-12-12 13:18:21 +00:00
Matt Davidson 31a9b403ca MDL-56810 unoconv: task fails if user removed
If the user is removed from a course after a submission has been made,
the task will crash and never continue.  This removes submissions from
the cron task if the user isn't enrolled in the course.
2016-12-12 08:18:17 -05:00
Dan Poltawski 6df5f57257 Merge branch 'wip-mdl-52796-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-12-12 13:00:58 +00:00
Dan Poltawski c780854bb9 Merge branch 'wip-MDL-54846-31-2' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2016-12-12 09:34:05 +00:00
Dan Poltawski 4d700925ef Merge branch 'MDL-56566_31' of https://github.com/bostelm/moodle into MOODLE_31_STABLE 2016-12-12 09:20:17 +00:00
Dan Poltawski 4f91062cf3 Merge branch 'MDL-55906-grading-table-filters-not-reset' of https://github.com/ilya-catalyst/moodle into MOODLE_31_STABLE 2016-12-12 09:04:28 +00:00
Andrew Nicols 92b777eb87 Merge branch 'MDL-46714-31-nadav' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-12-12 13:27:26 +08:00
Nadav Kavalerchik acc13191d9 MDL-46714 Calendar: Properly order Date & Time fields in RTL mode 2016-12-12 12:40:52 +08:00
Marina Glancy 99fce6b523 MDL-54846 media: cleanup of supported formats
.wav is supported in all browsers except IE
.aac, .mp3, .mp4 are supported in Opera
.aac is supported in Firefox
also remove check for firefox version above 27 - it's really ancient
2016-12-12 12:39:39 +08:00
Mark Nelson 9bf610d343 MDL-57222 mod_assign: show validation message on visible element 2016-12-12 11:57:37 +08:00
Mark Nelson 4c26d1af76 MDL-57250 core: show admin settings when only one category exists 2016-12-12 11:57:18 +08:00
Ramindu Deshapriya 4b7140242f MDL-52796 behat: Behat feature to test reset wiki page, tags & comments 2016-12-12 10:28:15 +08:00
Jake Dallimore 1405a62f1c MDL-57074 Filepicker: Fix alias and link icons in RTL mode 2016-12-12 09:18:26 +08:00
Bram Tassyns 36b70df814 MDL-56859 SCORM: player shouldn't display TOC while loading 2016-12-12 09:13:29 +08:00
AMOS bot 0221b1f366 Automatically generated installer lang files 2016-12-10 00:04:17 +08:00
Arnaud Trouve 8e17ff2876 MDL-56525 forum: remove targeted user enrolment
By removing the check on the targeted user's enrolment we allow to show his forum posts even if he is unenrol from a course (obviouly we need to have access to this course to view them)
2016-12-09 10:25:22 +01:00
Dan Marsden 84fc36beee MDL-57324 scorm: exclude objective raw.score from grade update 2016-12-09 10:13:46 +13:00
Henning Bostelmann 3e4036a44b MDL-56566 mod_assign: ignore "doanything" in course overview
Do not count site admin "doanything" capability for determining
what should be shown in the course overview for assignments.
2016-12-08 19:54:56 +00:00
Dan Poltawski 45fe30fc2d weekly release 3.1.3+ 2016-12-08 08:43:01 +00:00
Dan Poltawski df35af5c64 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2016-12-08 08:43:00 +00:00
Franziska Hübler 0d31a7a8ac MDL-55809 glossary: Keep file author and license across import/export 2016-12-08 12:28:01 +08:00
Ilya Tregubov d6f74c4937 MDL-55906 table: Update user preferences table when reset preferences 2016-12-08 15:04:25 +11:00
Andrew Nicols 73852e5538 Merge branch 'wip-mdl-56614-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-12-08 09:19:41 +08:00
Rajesh Taneja 6f5c29d565 MDL-56642 dataformat: Fixed method_exits parameters 2016-12-08 00:37:16 +01:00
AMOS bot a5380d3a30 Automatically generated installer lang files 2016-12-08 00:05:14 +08:00
Dan Poltawski 7371bec501 Merge branch 'MDL-56674-MOODLE_31_STABLE' of https://github.com/kenneth-hendricks/moodle into MOODLE_31_STABLE 2016-12-07 08:46:19 +00:00
= c278cfab69 MDL-55782 groups: wrap long group names
In the groups UI if a group name is very long it now no longer underlaps the user
column on its right hand side.
2016-12-07 09:41:56 +01:00
Marina Glancy 89c3ec5772 MDL-56614 behat: backport new steps to Moodle 3.1 2016-12-07 14:41:49 +08:00
Andrew Nicols 6e8ca5c281 Merge branch 'wip-mdl-56353-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-12-07 12:05:44 +08:00
Andrew Nicols 172848e96a Merge branch 'wip-MDL-56642-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2016-12-07 10:04:46 +08:00
Marina Glancy 90d346bbdc MDL-56642 dataformat: set temp dir
Thanks to Chien Wen-Chang for proposing a patch
2016-12-07 10:03:32 +08:00
Rajesh Taneja f2de91ec41 MDL-57137 behat: Subcategory has black space before name 2016-12-07 09:14:11 +08:00
Dan Poltawski 519a5a57db Merge branch 'MDL-45873_31' of https://github.com/bostelm/moodle into MOODLE_31_STABLE 2016-12-06 15:56:30 +00:00
Dan Poltawski 2011db7312 Merge branch 'MDL-53677-31' of git://github.com/ankitagarwal/moodle into MOODLE_31_STABLE 2016-12-06 12:48:39 +00:00
Dan Poltawski 35f03242b0 Merge branch 'MDL-56836-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2016-12-06 12:46:20 +00:00
Dan Poltawski 9504cb7ced Merge branch 'MDL-56233-31-mocksubmit' of https://github.com/roperto/moodle into MOODLE_31_STABLE 2016-12-06 12:42:05 +00:00
Dan Poltawski c0a448e3aa Merge branch 'MDL-57199_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2016-12-06 12:25:38 +00:00
Dan Poltawski 8ab44d9222 Merge branch 'MDL-56971-m31' of https://github.com/micaherne/moodle into MOODLE_31_STABLE 2016-12-06 11:08:09 +00:00
Grzegorz Ziółek 5400ad13dd MDL-56830 config_log: Add block plugin visibility changes to config_log. 2016-12-06 11:42:30 +01:00
Andrew Nicols 4826567e87 Merge branch 'MOODLE_31_STABLE_MDL_57137_question_category_with_parent' of https://github.com/melihovv/moodle into MOODLE_31_STABLE 2016-12-06 15:34:48 +08:00
SSRF e716d6e8f7 MDL-53677 tool_spamcleaner: CSRF Fix
Resolves minor CSRF within Moodle spamcleaner.
2016-12-06 12:25:48 +05:30
Andrew Nicols 738652678f Merge branch 'MDL-56346-31' of https://github.com/lucisgit/moodle into MOODLE_31_STABLE 2016-12-06 14:35:38 +08:00
Andrew Nicols 1d3f57daed Merge branch 'MDL-56301-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2016-12-06 14:27:30 +08:00
Andrew Nicols f1b3e2ef1f Merge branch 'MDL-57161-31' of git://github.com/lameze/moodle into MOODLE_31_STABLE 2016-12-06 13:11:13 +08:00
Donald Barrett 3724d12ab4 MDL-56301 course: Use value for intro field if set in a mods function
Respects a module that has set a value for the db field intro in it's lib function modulename_add_instance.
2016-12-06 10:42:03 +08:00
David Monllao b8f4c0561a MDL-57161 search: Set the correct HTTP header
All credit goes to Test Valley School
2016-12-06 10:01:29 +08:00
Andrew Nicols 89040af78e Merge branch 'MDL-56759-31' of git://github.com/lameze/moodle into MOODLE_31_STABLE 2016-12-06 09:24:54 +08:00
Dan Poltawski f8c8f9aeb1 Merge branch 'MDL-56459-31' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-12-05 15:48:34 +00:00
Henning Bostelmann c7afcfa623 MDL-45873 mode_data: Allow "0" entries in menu field 2016-12-05 09:17:40 +00:00
Andrew Nicols 561825915b Merge branch 'MDL-54921-31' of https://github.com/xow/moodle into MOODLE_31_STABLE 2016-12-05 15:36:03 +08:00
Simey Lameze 8aa669c314 MDL-56759 themes: fix alignment issues on badges list 2016-12-05 15:25:37 +08:00
Andrew Nicols f6c5ef8c38 Merge branch 'MDL-52840_31' of https://github.com/rezaies/moodle into MOODLE_31_STABLE 2016-12-05 13:02:41 +08:00
Andrew Nicols 65728e136e Merge branch 'MDL-56893-MOODLE_31-edit-grade-item-bug' of https://github.com/mspall/moodle into MOODLE_31_STABLE 2016-12-05 12:22:55 +08:00
Bram Tassyns 20aff96aec MDL-56836 SCORM: player doesn't remember display mode when not logged in 2016-12-05 09:30:32 +08:00
Daniel Thee Roperto 5af5ee7687 MDL-56233 forms library: Fixed form identifier when mocking a form.
If the plugin is using namespaces instead of frankenstyle class name,
get_called_class() will return 'type\name' instead of 'type_name'.

Added code to replace backslashes to underscores and fix that issue.
2016-12-05 11:23:50 +11:00
Dan Poltawski f945d178cc weekly release 3.1.3+ 2016-12-02 15:18:01 +00:00
Dan Poltawski 180f6c85e4 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2016-12-02 15:18:00 +00:00
Eloy Lafuente (stronk7) 7c303ca2ba Merge branch 'wip-mdl-57245-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-12-02 14:15:37 +01:00
Eloy Lafuente (stronk7) cfef5a80d5 Merge branch 'MDL-57193-31-notest' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-12-02 11:41:13 +01:00
Frederic Massart 8432dbef4b MDL-57193 auth_db: Flip the array outside the loop for better perf
Also as the recent changes where affecting the whitespaces quite
a lot, I took the liberty of aligning a few lines which weren't.
2016-12-02 16:30:30 +08:00
John Okely a43c2ab9cb MDL-57193 auth_db: Use a recordset and array_key_exists 2016-12-02 16:30:29 +08:00
Josh Willcock 1c2f811212 MDL-57193 auth_db: Fixed bug suspends all users if external DB has > 10k 2016-12-02 16:30:29 +08:00
David Monllao 29d9983114 Merge branch 'MDL-57209-m31' of git://github.com/crmpicco/moodle into MOODLE_31_STABLE 2016-12-02 13:28:11 +08:00
Rajesh Taneja 09b502827f MDL-57245 behat: Use correct @_file_upload tag 2016-12-02 12:39:06 +08:00
Craig R Morton 4b0de02648 MDL-57209 forms: Notice: Undefined index: options in profile edit page
Skipping a loop iteration if the option group has no options.
2016-12-01 16:34:49 +08:00
Michael Spall 13cba568ff MDL-56893 grades: Fix edit grade item when grade_report_showmin is false
Check to make sure $data['grademin'] exists. When grade_report_showmin
is false $data['grademin'] doesn't exist.
2016-11-30 12:07:14 -07:00
AMOS bot d9ae5e8320 Automatically generated installer lang files 2016-12-01 00:05:53 +08:00
AMOS bot 5a9fcb1e7e Merge branch 'MOODLE_31_STABLE' into install_31_STABLE 2016-12-01 00:05:52 +08:00
Dan Poltawski 12661fa0d1 Merge branch 'MDL-57169_m31' of git://github.com/markn86/moodle into MOODLE_31_STABLE 2016-11-30 11:04:41 +00:00
Dan Poltawski cf9332a2b6 Merge branch 'MDL-52199-incoming-nice-fail-MOODLE_31_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_31_STABLE 2016-11-30 09:52:45 +00:00
David Monllao 8b522b74d6 Merge branch 'MDL-56682_m31' of git://github.com/markn86/moodle into MOODLE_31_STABLE 2016-11-30 13:56:19 +08:00
Eloy Lafuente (stronk7) 7e09179adb Merge branch 'MDL-57133-31-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2016-11-29 22:36:40 +01:00
Tim Hunt 5102a3f6d2 MDL-57199 question preview: make HTML ids unique 2016-11-29 18:32:20 +00:00
AMOS bot 67564b1899 Automatically generated installer lang files 2016-11-30 00:04:51 +08:00
Dan Poltawski ba6633aedc weekly release 3.1.3+ 2016-11-29 13:32:20 +00:00
Dan Poltawski a02daa446b Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2016-11-29 13:32:19 +00:00
David Herney cd6ba4eff2 MDL-57169 backup: ensure images in category descriptions are shown 2016-11-29 11:44:01 +08:00
David Monllao 274e089eaa Merge branch 'MDL-57163-31' of https://github.com/vvzh/moodle into MOODLE_31_STABLE 2016-11-29 11:41:59 +08:00
Helen Foster bb8916ed88 MDL-57133 lang: Merge English strings from the en_fix language pack 2016-11-29 02:03:12 +01:00
Mark Nelson b5d811f85c MDL-56682 mod_assign: ensure the variable is not null 2016-11-28 16:48:44 +08:00
David Monllao 08d5732bf3 Merge branch 'MDL-57170-31' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-11-28 15:43:40 +08:00
John Okely 8b1f793c47 MDL-54921 signup: Only clear wanturl when necessary
Thanks to Juho Jaakkola for original patch idea.
2016-11-28 13:55:42 +08:00
Tim Lock 42d6fc0b83 MDL-57170 repository_dropbox: Ensure Dropbox Legacy continues to work 2016-11-28 10:30:37 +08:00
Rajesh Taneja adc22bb264 MDL-57147 phpunit: Check if time is greater than or equal to
Some windows only have 1/100 microtime resolution
so a lot of times it does not advance enough.
2016-11-28 09:41:13 +08:00
Vladimir Zhirov ac47ed92fb MDL-57163 installation: fixed "Call to undefined function curl_version" 2016-11-27 12:14:08 +04:00
AMOS bot 267cc3a385 Automatically generated installer lang files 2016-11-27 00:05:54 +08:00
Tony Butler 68e1e99dff MDL-56346 assignfeedback_editpdf: Correct typo in property name 2016-11-25 11:09:55 +00:00
David Monllao aaa2f52b97 weekly release 3.1.3+ 2016-11-25 15:56:17 +08:00
David Monllao 682b43f63e Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2016-11-25 15:56:16 +08:00
Alexander Melihov fa5fdc0231 MDL-57137 quiz: Create question category with specified parent category
Fix question category generator bug. Now it is possible to specify parent category of subcategory, supply only name of parent category
2016-11-25 09:27:45 +03:00
David Monllao b854302dba Merge branch 'MDL-57126-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2016-11-25 09:18:36 +08:00
Jake Dallimore 72b9069024 MDL-57126 core: add 'scss' to list of core filetypes.
This allows filetype restrictions to work when uploading additional
preset files on the Boost admin settings page.
2016-11-25 07:57:09 +08:00
Dan Poltawski 164225f770 Merge branch 'MDL-56948-31' of https://github.com/lucisgit/moodle into MOODLE_31_STABLE 2016-11-24 15:58:03 +00:00
Andrew Nicols c8f16d104f Merge branch 'wip-mdl-56898-fix31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-11-24 11:09:33 +08:00
Rajesh Taneja d7b20b8023 MDL-56898 behat: No need to trigger error, as it sometimes hangs behat 2016-11-24 07:34:22 +08:00
Damyon Wiese ab464e1382 MDL-57100 JS: Exceptions give exceptions
Exceptions returned from ajax are not in the format expected by the JS, so
an error occurs and the exception popups are not appearing.

Conflicts:
	lib/amd/build/notification.min.js
	lib/amd/src/notification.js
2016-11-23 18:08:20 +00:00
Dan Poltawski 3caf199992 Merge branch 'MDL-53964_31' of https://github.com/timhunt/moodle into MOODLE_31_STABLE 2016-11-23 16:07:26 +00:00
AMOS bot af23df9c80 Merge branch 'MOODLE_31_STABLE' into install_31_STABLE 2016-11-24 00:06:29 +08:00
Dan Poltawski 94d47cf18e Merge branch 'MDL-35949_31' of https://github.com/timhunt/moodle into MOODLE_31_STABLE 2016-11-23 12:31:24 +00:00
Dan Poltawski 38ea1a51e4 Merge branch 'MDL-56182-31' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-11-23 08:26:23 +00:00
Frederic Massart 7350a42d0f MDL-56182 mod_lti: Include the query string when comparing type URLs 2016-11-23 10:19:07 +08:00
AMOS bot 8c48e53238 Automatically generated installer lang files 2016-11-23 00:05:10 +08:00
Eloy Lafuente (stronk7) 41bb9ff743 weekly release 3.1.3+ 2016-11-22 16:21:02 +01:00
Andrew Nicols fc56dcb9c7 Merge branch 'MDL-57035-31' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-11-22 12:03:48 +08:00
Frederic Massart 244ad80521 MDL-57035 repository_skydrive: Compability with converged type apps
http://go.microsoft.com/fwlink/p/?LinkID=615760
2016-11-22 11:50:23 +08:00
Brendan Heywood a900b899b5 MDL-52199 core_message: IMAP errors passed to task api 2016-11-22 12:50:27 +11:00
Dan Poltawski 003171089d Merge branch 'wip-mdl-56898-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-11-21 15:07:49 +00:00
David Monllao 1fda873603 Merge branch 'MDL-57063-31' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-11-21 16:54:11 +08:00
Frederic Massart 3a03fa68c5 MDL-57063 backup: Do not try to set default value on locked setting
We cannot set a default value on settings which are 'config' or
'permission' locked or an exception will be thrown from
base_setting::set_value.
2016-11-21 11:10:58 +08:00
Andrew Nicols a18bf664a8 Merge branch 'MDL-56877-31' of https://github.com/eSrem/moodle into MOODLE_31_STABLE 2016-11-21 11:10:19 +08:00
Andrew Nicols aaa9be33b2 Merge branch 'MDL-55275_MOODLE_31_STABLE' of https://github.com/tobiasreischmann/moodle into MOODLE_31_STABLE 2016-11-21 11:01:58 +08:00
Rajesh Taneja 9136cf7ce9 MDL-56898 behat: Go to a non html page to avoid any unwanted ajax calls
After scenario is finished, go to README.txt, so
there is no JS/AJAX calls pending and site is ready
for reset before next scenario
2016-11-21 09:41:59 +08:00
Rajesh Taneja 2db00c9537 MDL-56898 behat: Increase autosavefrequency for behat tests
We don't need editor to autosave, as this cause
unwanted ajax request
2016-11-21 09:41:59 +08:00
Rajesh Taneja afe2fcea3e MDL-56898 behat: Try data reset if it fails because of pending process 2016-11-21 09:41:59 +08:00
David Monllao 3f5584c55c Merge branch 'MDL-56972-31' of https://github.com/snake/moodle into MOODLE_31_STABLE 2016-11-21 09:06:11 +08:00
Andrew Nicols 496e1f307c Merge branch 'MDL-42977-31' of git://github.com/lameze/moodle into MOODLE_31_STABLE 2016-11-21 08:53:58 +08:00
Andrew Nicols c102cde4f5 Merge branch 'MDL-57002-31' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-11-21 08:21:55 +08:00
Tim Hunt 1d34a7bf9d MDL-53964 qtype_ddmarker: marker label 0 should be allowed 2016-11-20 21:33:13 +00:00
Shamim Rezaie a1e7685b36 MDL-52840 assignsubmission_file: Change default setting file size
The default value of the assignsubmission_file/maxbytes setting is changed to $CFG->maxbytes.
2016-11-21 04:52:16 +11:00
Tim Hunt ce1b0ee4f1 MDL-35949 quiz accessibility: move input outside label 2016-11-20 17:03:29 +00:00
Tony Butler 499fbf48e3 MDL-56948 mod_assign: Don't call get_grade_item() unless we have one 2016-11-18 15:38:45 +00:00
Dan Poltawski 71d8200285 weekly release 3.1.3+ 2016-11-18 09:57:38 +00:00
Dan Poltawski eb11d15cb8 Merge branch 'install_31_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_31_STABLE 2016-11-18 09:57:36 +00:00
Frederic Massart 8dbfe13362 MDL-57002 repository_webdav: Use default temporary file name
The WebDAV library does not like when there are UTF-8 characters
in the temporary file name. It changes the path but does not return
it, so the file ends up being saved somewhere unknown. As we do not
need the file name at all, we let repository::prepare_file()
generate one.
2016-11-18 12:48:16 +08:00
Jake Dallimore 57371336ad MDL-56972 backup: fix question category stamp duplicates during restore
To kerb future stamp duplication, MDL-54864 added a unique index to the
question_categories table (stamp, contextid) and added an upgrade step
to fix existing duplicate stamps. It missed the case where a course with
duplicate stamps in the same context is directly restored into moodle
3.1, causing index clashes. This issue provides a fix for that.
2016-11-18 11:12:58 +08:00
David Monllao ae045565dd Merge branch 'MDL-55869_m31v1' of https://github.com/sbourget/moodle into MOODLE_31_STABLE 2016-11-18 09:16:15 +08:00
David Monllao 2585fa374e Merge branch 'MDL-55566_m31v1' of https://github.com/sbourget/moodle into MOODLE_31_STABLE 2016-11-18 09:05:26 +08:00
AMOS bot cb5d7ff050 Automatically generated installer lang files 2016-11-18 00:06:51 +08:00
David Monllao 5af0e614bb Merge branch 'MDL-57015_31' of git://github.com/stronk7/moodle into MOODLE_31_STABLE 2016-11-17 20:23:31 +08:00
Virgil Ashruf 1337e2b0ef MDL-56877 autogroup form: no limit on cohorts 2016-11-17 10:49:11 +01:00
Andrew Nicols 6872515e7f Merge branch 'wip-MDL-57007-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2016-11-17 14:36:30 +08:00
Andrew Nicols a7aad09ce4 Merge branch 'MDL-56221_31' of https://github.com/bostelm/moodle into MOODLE_31_STABLE 2016-11-17 13:32:07 +08:00
Marina Glancy 6912bad471 MDL-57007 behat: assume all capabilities during installation 2016-11-17 13:07:27 +08:00
Andrew Nicols c6be25957b Merge branch 'MDL-56978_iconv-31' of https://github.com/mrmark/moodle into MOODLE_31_STABLE 2016-11-17 11:20:57 +08:00
David Monllao 09a6cc6e4a Merge branch 'MDL-52186-31' of git://github.com/junpataleta/moodle into MOODLE_31_STABLE 2016-11-17 10:41:55 +08:00
Jun Pataleta 39d602e4b9 MDL-52186 enrol_meta: Sync only active enrol_meta instances
Thanks to Peter Klinka for the solution!
2016-11-17 10:41:17 +08:00
David Monllao dba7d01504 Merge branch 'wip-mdl-56865-m31' of https://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-11-17 10:35:49 +08:00
David Monllao fbd5f35012 Merge branch 'MDL-56915-31' of git://github.com/FMCorz/moodle into MOODLE_31_STABLE 2016-11-17 10:33:58 +08:00
Eloy Lafuente (stronk7) 76075b3415 MDL-57015 tests: Use preventResetByRollback() if test uses transactions 2016-11-17 02:42:04 +01:00
Rajesh Taneja b9f40d95db MDL-56865 behat: Don't set error handler for behat install 2016-11-17 08:58:19 +08:00
Henning Bostelmann 78e9adb9f2 MDL-56221 mod_assign: Suppress unwanted grade notifications
* Quick grading: Properly recognize unchanged grades
* Individual grading: Amend JS that transfers checkbox state
2016-11-16 22:05:22 +00:00
Mark Nielsen edfc913460 MDL-56978 core: fix error handling in min_fix_utf8
Must completely suppress notice from iconv as Behat's
shutdown function uses error_get_last() which is
unable to detect if the error was suppressed or not.
2016-11-16 09:04:16 -08:00
AMOS bot f7e9adbecb Automatically generated installer lang files 2016-11-17 00:04:46 +08:00
Tobias Reischmann 25bb8b64f9 MDL-55275 assign: Prevent exception under admin role assignment.
In group mode the submission status was displayed to admins.
This caused an exception when the admins were enrolled as teachers
in a course while being the only member of a group.
2016-11-16 16:49:16 +01:00
gabrielrosset 1a9d089f6e MDL-33960 mod_lti: fix page scroll 2016-11-16 13:04:03 +00:00
Eloy Lafuente (stronk7) d9e0132c18 Merge branch 'MDL-55362_31_STABLE' of git://github.com/Chocolate-lightning/moodle into MOODLE_31_STABLE 2016-11-16 11:29:30 +01:00
Frederic Massart d44c0f5ab8 MDL-56915 webdav: Increase maximum expected header size 2016-11-16 17:20:12 +08:00
Frederic Massart 647e2bd9b0 MDL-56459 competency: Invalid use of indirect property key
This change ensures that PHP7 and earlier work the same way. Before
the patch PHP < 7 would not expand the property as we expected it.

More information here:
http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.variable-handling.indirect
2016-11-16 14:06:39 +08:00
Andrew Nicols b0b6675407 Merge branch 'MDL-56958-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE 2016-11-16 11:07:51 +08:00
Andrew Nicols 8bd4b31a85 Merge branch 'wip_MDL-48055_31_quiz_activity_report_grade_visibility' of https://github.com/POETGroup/moodle into MOODLE_31_STABLE 2016-11-16 10:10:16 +08:00
Mathew May ef6cdec4e5 MDL-55362 core: Fixed topic section default name empty h2 tag 2016-11-16 14:15:31 +13:00
David Monllao 2a79c833e3 Merge branch 'mdl31_MDL-56358' of git://github.com/danmarsden/moodle into MOODLE_31_STABLE 2016-11-16 08:33:58 +08:00
Andrew Nicols 2f973be713 Merge branch 'MDL-55209-m31' of https://github.com/NeillM/moodle into MOODLE_31_STABLE 2016-11-16 08:28:38 +08:00
David Monllao 586ec7ace3 Merge branch 'MDL-56942-31' of git://github.com/jleyva/moodle into MOODLE_31_STABLE 2016-11-16 08:10:05 +08:00
Mike Churchward 4e3c08c004 MDL-48055 q_u_outline, q_u_complete: added checks for grade visibility. 2016-11-15 12:43:34 -05:00
Dan Poltawski 789678b0d6 Merge branch 'wip-mdl-56860-m31' of git://github.com/rajeshtaneja/moodle into MOODLE_31_STABLE 2016-11-15 16:29:42 +00:00
Michael Aherne d5cff77f4d MDL-56971 enrol: Use autoloading in enrol_get_plugin() 2016-11-15 12:25:30 +00:00
Dan Poltawski 55fb326d70 weekly release 3.1.3+ 2016-11-15 11:02:08 +00:00
Dan Poltawski de7781f68b Merge branch 'MDL-56903-31-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2016-11-15 10:43:32 +00:00
Helen Foster af70659cce MDL-56903 lang: Merge English strings from the en_fix language pack 2016-11-15 11:06:49 +01:00
David Monllao 8cc149d22d Merge branch 'wip-MDL-56899-31' of git://github.com/marinaglancy/moodle into MOODLE_31_STABLE 2016-11-15 09:07:02 +00:00
Andrew Nicols b1ac630276 Merge branch 'MDL-56823_31' of git://github.com/aolley/moodle into MOODLE_31_STABLE 2016-11-15 09:07:01 +00:00
Dan Poltawski c90864ca48 Merge branch 'MDL-54871_31' of https://github.com/bostelm/moodle into MOODLE_31_STABLE 2016-11-15 09:07:01 +00:00
Dan Poltawski 726e86074b Merge branch 'MDL-56913_31' of git://github.com/timhunt/moodle into MOODLE_31_STABLE 2016-11-15 09:07:00 +00:00
Damyon Wiese 3389d9a5cc MDL-56958 ajax: Prefer the general renderer 2016-11-15 12:45:45 +08:00
EizEddin AlKatrib 231edf2c51 MDL-42977 course: Fixed the default behaviour of the Collapse/Expand all link 2016-11-15 10:25:07 +08:00
Rajesh Taneja a6552b684f MDL-56860 behat: Fixed moodle_list format and printer description 2016-11-15 08:49:13 +08:00
Dan Poltawski ad0f00c75a Merge branch 'mdl-56831-31_STABLE' of https://github.com/Dagefoerde/moodle into MOODLE_31_STABLE 2016-11-14 13:21:33 +00:00
Dan Poltawski 49a50541d1 Merge branch 'MDL-56916-31-normalizedoc' of git://github.com/mudrd8mz/moodle into MOODLE_31_STABLE 2016-11-14 13:10:58 +00:00
Juan Leyva a96e384124 MDL-56942 login: Add missing required lib in complete_user_login 2016-11-14 12:28:13 +00:00
Eloy Lafuente (stronk7) 89b7d746fa Merge branch 'MDL-56880-m31' of https://github.com/micaherne/moodle into MOODLE_31_STABLE 2016-11-14 12:04:45 +01:00
Eloy Lafuente (stronk7) 268ac082fb Merge branch 'MDL-56882-31' of git://github.com/crazyserver/moodle into MOODLE_31_STABLE 2016-11-14 11:14:56 +01:00
Pau Ferrer Ocaña 32b3dd2fd8 MDL-56882 assign: Enable revert outcomes to No outcome 2016-11-14 09:56:21 +01:00
Marina Glancy db7e6deca4 MDL-56899 filter: suppress dom parsing errors
Domdocument does not know about <video> and <audio> tags, also it's too strict for html style
solution from http://stackoverflow.com/questions/6090667/php-domdocument-errors-warnings-on-html5-tags
2016-11-14 15:17:21 +08:00
Jan Dageförde d2297fdc35 MDL-56831 quiz: Declare YUI dependencies explicitly where needed 2016-11-13 23:53:13 +01:00
David Mudrák 95a36b52f3 MDL-56916 docs: Fix documentation of the normalize_component return 2016-11-12 10:48:01 +01:00
Tim Hunt 00081c06fa MDL-56913 quiz: teachers should see a review link for a preview
So what they see is like what students see.
2016-11-11 16:52:19 +00:00
Michael Aherne 3a9f23b595 MDL-56880 webservices: Fix documentation of get_enabled_plugins() 2016-11-10 16:19:47 +00:00
Adam Olley c483076ad9 MDL-56823 session: redis sessions don't honour $CFG->sessiontimeout
The redis session handler doesn't use the sessiontimeout config setting
to determine session lifetime.

It has a lock expiry, which is set to 7200 (or a config setting) that is
used to determine how long a lock is held onto, but that should be
distinct from the session timeout.
2016-11-10 10:28:50 +10:30
Stephen Bourget 5223adf258 MDL-55566 chat: Improve next scheduled chat message 2016-11-08 16:02:29 -05:00
Stephen Bourget e97b51a94a MDL-55869 mod_chat: Only create calendar events when chat is published 2016-11-08 15:06:18 -05:00
Henning Bostelmann 6d5167d88b MDL-54871 mod_data: Remove text field when forced name present 2016-11-07 22:01:00 +00:00
ak4t0sh 03718099d6 MDL-55720 course: fix potential undefined variable and cleaning
This commit replace $e usage by $returnfromfunc.
Indeed $returnfromfunc always exists in the scope and take $e value in case of moodle_exception.

This commit also remove useless $modcontext affectation.
2016-11-03 00:01:18 +01:00
Neill Magill 4ab8a932c7 MDL-55209 coursecat: Should be able to remove category idnumber
Users should be able to remove an idnumber from a category, before this
change when trying to delete an idnumber users would be told it already
existed.

This change also stops 0 from being allowed multiple times as an idnumber.
2016-11-02 09:52:34 +00:00
Neill Magill dbd9082621 MDL-55209 coursecat: Should be able to remove category idnumber test
A user should be able to remove an idnumber from a category, also 0
should not be allowed multiple times.
2016-11-02 09:52:10 +00:00
Kenneth Hendricks c4d310361f MDL-56674 core: Fix test_get_all_observers 2016-11-02 13:22:38 +11:00
Dan Marsden 1452bab3ab MDL-56358 tool_lp tool_cohortroles: allow null idnumber 2016-10-28 12:04:50 +13:00
Rajesh Taneja 7099db9f68 MDL-56353 behat: Added test for multi select dependency 2016-10-13 14:34:21 +08:00
592 changed files with 14505 additions and 3248 deletions
+4 -4
View File
@@ -77,9 +77,6 @@ cache:
- $HOME/.npm
install:
# Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
- rm /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' ];
then
@@ -102,6 +99,7 @@ install:
fi
before_script:
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
then
@@ -139,11 +137,13 @@ before_script:
sed -i \
-e "s%= 'pgsql'%= 'mysqli'%" \
-e "s%= 'username'%= 'travis'%" \
-e "s%=> 'utf8mb4_unicode_ci'%=> 'utf8mb4_bin'%" \
config.php;
mysql -u root -e 'SET GLOBAL innodb_file_format=barracuda;' ;
mysql -u root -e 'SET GLOBAL innodb_file_per_table=ON;' ;
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;' ;
mysql -u root -e 'SET GLOBAL innodb_large_prefix=ON;' ;
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_bin;' ;
fi
fi
+4
View File
@@ -36,6 +36,7 @@
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block
add_to_config_log('block_visibility', $block->visible, '0', $block->name);
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
@@ -45,6 +46,7 @@
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '1', array('id'=>$block->id)); // Show block
add_to_config_log('block_visibility', $block->visible, '1', $block->name);
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
@@ -64,6 +66,7 @@
if (!in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes[] = $block->name;
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
add_to_config_log('block_protect', $unprotect, $protect, $block->name);
}
admin_get_root(true, false); // settings not required - only pages
}
@@ -75,6 +78,7 @@
if (in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes = array_diff($undeletableblocktypes, array($block->name));
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
add_to_config_log('block_protect', $unprotect, $protect, $block->name);
}
admin_get_root(true, false); // settings not required - only pages
}
+1 -1
View File
@@ -89,7 +89,7 @@ if ($PAGE->user_allowed_editing()) {
$savebutton = false;
$outputhtml = '';
foreach ($settingspage->children as $childpage) {
if ($childpage->is_hidden()) {
if ($childpage->is_hidden() || !$childpage->check_access()) {
continue;
}
if ($childpage instanceof admin_externalpage) {
+86 -5
View File
@@ -64,6 +64,71 @@ if (!empty($options['collation'])) {
cli_error("Error: collation '$collation' is not available on this server!");
}
$collationinfo = explode('_', $collation);
$charset = reset($collationinfo);
$engine = strtolower($DB->get_dbengine());
// Do checks for utf8mb4.
if (strpos($collation, 'utf8mb4') === 0) {
// Do we have the right engine?
if ($engine !== 'innodb' && $engine !== 'xtradb') {
cli_error("Error: '$collation' requires InnoDB or XtraDB set as the engine.");
}
// Are we using Barracuda?
if ($DB->get_row_format() != 'Barracuda') {
// Try setting it here.
try {
$DB->execute("SET GLOBAL innodb_file_format=Barracuda");
} catch (dml_exception $e) {
cli_error("Error: '$collation' requires the file format to be set to Barracuda.
An attempt was made to change the format, but it failed. Please try doing this manually.");
}
echo "GLOBAL SETTING: innodb_file_format changed to Barracuda\n";
}
// Is one file per table being used?
if (!$DB->is_file_per_table_enabled()) {
try {
$DB->execute("SET GLOBAL innodb_file_per_table=1");
} catch (dml_exception $e) {
cli_error("Error: '$collation' requires the setting 'innodb_file_per_table' be set to 'ON'.
An attempt was made to change the format, but it failed. Please try doing this manually.");
}
echo "GLOBAL SETTING: innodb_file_per_table changed to 1\n";
}
// Is large prefix set?
if (!$DB->is_large_prefix_enabled()) {
try {
$DB->execute("SET GLOBAL innodb_large_prefix=1");
} catch (dml_exception $e) {
cli_error("Error: '$collation' requires the setting 'innodb_large_prefix' be set to 'ON'.
An attempt was made to change the format, but it failed. Please try doing this manually.");
}
echo "GLOBAL SETTING: innodb_large_prefix changed to 1\n";
}
}
$sql = "SHOW VARIABLES LIKE 'collation_database'";
if (!$dbcollation = $DB->get_record_sql($sql)) {
cli_error("Error: Could not access collation information on the database.");
}
$sql = "SHOW VARIABLES LIKE 'character_set_database'";
if (!$dbcharset = $DB->get_record_sql($sql)) {
cli_error("Error: Could not access character set information on the database.");
}
if ($dbcollation->value !== $collation || $dbcharset->value !== $charset) {
// Try to convert the DB.
echo "Converting database to '$collation' for $CFG->wwwroot:\n";
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
try {
$DB->change_database_structure($sql);
} catch (exception $e) {
cli_error("Error: Tried to alter the database with no success. Please try manually changing the database
to the new collation and character set and then run this script again.");
}
echo "DATABASE CONVERTED\n";
}
echo "Converting tables and columns to '$collation' for $CFG->wwwroot:\n";
$prefix = $DB->get_prefix();
$prefix = str_replace('_', '\\_', $prefix);
@@ -80,7 +145,7 @@ if (!empty($options['collation'])) {
$skipped++;
} else {
$DB->change_database_structure("ALTER TABLE $table->name DEFAULT COLLATE = $collation");
$DB->change_database_structure("ALTER TABLE $table->name DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation");
echo "CONVERTED\n";
$converted++;
}
@@ -96,18 +161,32 @@ if (!empty($options['collation'])) {
continue;
}
// Check for utf8mb4 collation.
$rowformat = $DB->get_row_format_sql($engine, $collation);
if ($column->type === 'tinytext' or $column->type === 'mediumtext' or $column->type === 'text' or $column->type === 'longtext') {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = (!is_null($column->default) and $column->default !== '') ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE $table->name MODIFY COLUMN $column->field $column->type COLLATE $collation $notnull $default";
$sql = "ALTER TABLE $table->name
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
$DB->change_database_structure($sql);
} else if (strpos($column->type, 'varchar') === 0) {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = !is_null($column->default) ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE $table->name MODIFY COLUMN $column->field $column->type COLLATE $collation $notnull $default";
if ($rowformat != '') {
$sql = "ALTER TABLE $table->name $rowformat";
$DB->change_database_structure($sql);
}
$sql = "ALTER TABLE $table->name
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
$DB->change_database_structure($sql);
} else {
echo "ERROR (unknown column type: $column->type)\n";
@@ -180,7 +259,9 @@ function mysql_get_collations() {
global $DB;
$collations = array();
$sql = "SHOW COLLATION WHERE Collation LIKE 'utf8\_%' AND Charset = 'utf8'";
$sql = "SHOW COLLATION
WHERE Collation LIKE 'utf8\_%' AND Charset = 'utf8'
OR Collation LIKE 'utf8mb4\_%' AND Charset = 'utf8mb4'";
$rs = $DB->get_recordset_sql($sql);
foreach ($rs as $collation) {
$collations[$collation->collation] = $collation->collation;
+4
View File
@@ -47,6 +47,7 @@ switch ($action) {
// remove from enabled list
$key = array_search($editor, $active_editors);
unset($active_editors[$key]);
add_to_config_log('editor_visibility', '1', '0', $editor);
break;
case 'enable':
@@ -54,6 +55,7 @@ switch ($action) {
if (!in_array($editor, $active_editors)) {
$active_editors[] = $editor;
$active_editors = array_unique($active_editors);
add_to_config_log('editor_visibility', '0', '1', $editor);
}
break;
@@ -66,6 +68,7 @@ switch ($action) {
$fsave = $active_editors[$key];
$active_editors[$key] = $active_editors[$key + 1];
$active_editors[$key + 1] = $fsave;
add_to_config_log('editor_position', $key, $key + 1, $editor);
}
}
break;
@@ -79,6 +82,7 @@ switch ($action) {
$fsave = $active_editors[$key];
$active_editors[$key] = $active_editors[$key - 1];
$active_editors[$key - 1] = $fsave;
add_to_config_log('editor_position', $key, $key - 1, $editor);
}
}
break;
+560
View File
@@ -1723,6 +1723,21 @@
<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_CHECKS>
</MOODLE>
<MOODLE version="3.2" requires="2.7">
@@ -1739,6 +1754,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1873,6 +1889,550 @@
<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_CHECKS>
</MOODLE>
<MOODLE version="3.3" requires="2.7">
<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.5.31" />
<VENDOR name="postgres" version="9.3" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</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="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</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_CHECKS>
</MOODLE>
<MOODLE version="3.4" requires="3.0">
<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.5.31" />
<VENDOR name="postgres" version="9.3" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="7.0.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_CHECKS>
</MOODLE>
<MOODLE version="3.5" requires="3.1">
<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.5.31" />
<VENDOR name="postgres" version="9.3" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="7.0.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_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+8 -1
View File
@@ -852,10 +852,17 @@ $cachewarnings = cache_helper::warnings();
// Check if there are events 1 API handlers.
$eventshandlers = $DB->get_records_sql('SELECT DISTINCT component FROM {events_handlers}');
// Check if a directory with development libraries exists.
if (is_dir($CFG->dirroot.'/vendor') || is_dir($CFG->dirroot.'/node_modules')) {
$devlibdir = true;
} else {
$devlibdir = false;
}
admin_externalpage_setup('adminnotifications');
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings, $eventshandlers);
$registered, $cachewarnings, $eventshandlers, null, $devlibdir);
+2 -2
View File
@@ -421,12 +421,12 @@ class site_registration_form extends moodleform {
$mform->addElement('checkbox', 'badges', '',
" " . get_string('badgesnumber', 'hub', $badges));
$mform->setDefault('badges', $badgesnumber != -1);
$mform->setType('resources', PARAM_INT);
$mform->setType('badges', PARAM_INT);
$mform->addElement('checkbox', 'issuedbadges', '',
" " . get_string('issuedbadgesnumber', 'hub', $issuedbadges));
$mform->setDefault('issuedbadges', $issuedbadgesnumber != -1);
$mform->setType('resources', PARAM_INT);
$mform->setType('issuedbadges', PARAM_INT);
$mform->addElement('checkbox', 'participantnumberaverage', '',
" " . get_string('participantnumberaverage', 'hub', $participantnumberaverage));
+24 -2
View File
@@ -276,12 +276,15 @@ class core_admin_renderer extends plugin_renderer_base {
* @param int|null $availableupdatesfetch timestamp of the most recent updates fetch or null (unknown)
* @param string[] $cachewarnings An array containing warnings from the Cache API.
* @param array $eventshandlers Events 1 API handlers.
* @param bool $ignored Forward-compatible placeholder for the themedesignermode.
* @param bool $devlibdir Warn about development libs directory presence.
*
* @return string HTML to output.
*/
public function admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch,
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0) {
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0,
$ignored = false, $devlibdir = false) {
global $CFG;
$output = '';
@@ -290,6 +293,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->legacy_log_store_writing_error();
$output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
$output .= $this->insecure_dataroot_warning($insecuredataroot);
$output .= $this->development_libs_directories_warning($devlibdir);
$output .= $this->display_errors_warning($errorsdisplayed);
$output .= $this->buggy_iconv_warning($buggyiconvnomb);
$output .= $this->cron_overdue_warning($cronoverdue);
@@ -519,6 +523,24 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
/**
* Render a warning that a directory with development libs is present.
*
* @param bool $devlibdir True if the warning should be displayed.
* @return string
*/
protected function development_libs_directories_warning($devlibdir) {
if ($devlibdir) {
$moreinfo = new moodle_url('/report/security/index.php');
$warning = get_string('devlibdirpresent', 'core_admin', ['moreinfourl' => $moreinfo->out()]);
return $this->warning($warning, 'error');
} else {
return '';
}
}
/**
* Render an appropriate message if dataroot is insecure.
* @param bool $errorsdisplayed
@@ -1598,7 +1620,7 @@ class core_admin_renderer extends plugin_renderer_base {
$row = new html_table_row();
$row->attributes['class'] = 'type-' . $plugin->type . ' name-' . $plugin->type . '_' . $plugin->name;
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name)) {
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name, null)) {
$icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'icon pluginicon'));
} else {
$icon = $this->output->pix_icon('spacer', '', 'moodle', array('class' => 'icon pluginicon noicon'));
+3 -1
View File
@@ -32,7 +32,9 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('development', $temp);
// "Profiling" settingpage (conditionally if the 'xhprof' extension is available only).
$xhprofenabled = extension_loaded('xhprof') || extension_loaded('tideways');
$xhprofenabled = extension_loaded('tideways_xhprof');
$xhprofenabled = $xhprofenabled || extension_loaded('tideways');
$xhprofenabled = $xhprofenabled || extension_loaded('xhprof');
$temp = new admin_settingpage('profiling', new lang_string('profiling', 'admin'), 'moodle/site:config', !$xhprofenabled);
// Main profiling switch.
$temp->add(new admin_setting_configcheckbox('profilingenabled', new lang_string('profilingenabled', 'admin'), new lang_string('profilingenabled_help', 'admin'), false));
+6 -3
View File
@@ -28,9 +28,12 @@ if ($primaryadmin) {
$primaryadminemail = NULL;
$primaryadminname = NULL;
}
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'), new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'), new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'), new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'),
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'),
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_EMAIL));
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'),
new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
$ADMIN->add('server', $temp);
-1
View File
@@ -26,7 +26,6 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
die(); // No access from web!
}
define('BEHAT_UTIL', true);
define('CLI_SCRIPT', true);
define('ABORT_AFTER_CONFIG', true);
define('CACHE_DISABLE_ALL', true);
@@ -0,0 +1,42 @@
@tool @tool_behat
Feature: Backported behat step definitions
In order to provide feature file compatibility between multiple Moodle versions
As a developer
I need to be able to use backported steps from newer Moodle versiosn
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C101 | topics |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C101 | student |
| teacher1 | C101 | editingteacher |
Scenario: I am on the course homepage
When I log in as "student1"
And I am on "Course 1" course homepage
Then I should see "Topic 1"
@javascript
Scenario: I am on the course homepage with JS
When I log in as "teacher1"
And I am on "Course 1" course homepage
Then I should see "Topic 1"
Scenario: I am on the course homepage with editing
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
Then I should see "Topic 1"
And I should see "Add an activity or resource"
@javascript
Scenario: I am on the course homepage with editing and JS
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
Then I should see "Topic 1"
And I should see "Add an activity or resource"
@@ -7,8 +7,7 @@ Feature: Forms manipulation
@javascript
Scenario: Basic forms manipulation
Given I log in as "admin"
And I follow "Preferences" in the user menu
And I follow "Edit profile"
And I open my profile in edit mode
When I set the field "First name" to "Field value"
And I set the field "Select a country" to "Japan"
And I set the field "Unmask" to "1"
@@ -10,8 +10,7 @@ Feature: Transform steps arguments
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Preferences" in the user menu
And I follow "Edit profile"
And I open my profile in edit mode
Scenario: Use nasty strings on steps arguments
When I set the field "Surname" to "$NASTYSTRING1"
+2 -1
View File
@@ -50,7 +50,8 @@ class cohort_summary_exporter extends \core_competency\external\exporter {
),
'idnumber' => array(
'type' => PARAM_RAW, // ID numbers are plain text.
'default' => ''
'default' => '',
'null' => NULL_ALLOWED
),
'visible' => array(
'type' => PARAM_BOOL,
+1 -1
View File
@@ -99,7 +99,7 @@ class competency extends persistent {
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_RAW);
@@ -62,7 +62,7 @@ class competency_framework extends persistent {
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_RAW);
@@ -184,8 +184,14 @@ abstract class persistent extends moodleform {
$data = $this->get_persistent()->to_record();
$class = static::$persistentclass;
$properties = $class::get_formatted_properties();
$allproperties = $class::properties_definition();
foreach ($data as $field => $value) {
// Clean data if it is to be displayed in a form.
if (isset($allproperties[$field]['type'])) {
$data->$field = clean_param($data->$field, $allproperties[$field]['type']);
}
// Convert formatted properties.
if (isset($properties[$field])) {
$data->$field = array(
+1 -1
View File
@@ -59,7 +59,7 @@ class plan extends persistent {
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description', get_string('plandescription', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
$mform->addElement('date_time_selector', 'duedate', get_string('duedate', 'tool_lp'), array('optional' => true));
$mform->addHelpButton('duedate', 'duedate', 'tool_lp');
+1 -1
View File
@@ -58,7 +58,7 @@ class template extends persistent {
// Description.
$mform->addElement('editor', 'description',
get_string('description', 'tool_lp'), array('rows' => 4));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
$mform->addElement('selectyesno', 'visible',
get_string('visible', 'tool_lp'));
$mform->addElement('date_time_selector',
+1 -1
View File
@@ -54,7 +54,7 @@ class user_evidence extends persistent {
$mform->addRule('name', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');
// Description.
$mform->addElement('editor', 'description', get_string('userevidencedescription', 'tool_lp'), array('rows' => 10));
$mform->setType('description', PARAM_RAW);
$mform->setType('description', PARAM_CLEANHTML);
$mform->addElement('url', 'url', get_string('userevidenceurl', 'tool_lp'), array(), array('usefilepicker' => false));
$mform->setType('url', PARAM_RAW_TRIMMED); // Can not use PARAM_URL, it silently converts bad URLs to ''.
@@ -92,7 +92,7 @@ require(['core/str'], function(Str) {
{ key: 'comments', component: 'moodle' },
{ key: 'commentscount', component: 'moodle' },
{ key: 'commentsrequirelogin', component: 'moodle' },
{ key: 'deletecomment', component: 'moodle' },
{ key: 'deletecommentbyon', component: 'moodle' },
]).then(function() {
// Kick off when strings are loaded.
Y.use('core_comment', function(Y) {
@@ -396,12 +396,8 @@ class tool_lpmigrate_framework_processor_testcase extends advanced_testcase {
}
public function test_permission_exception() {
global $DB;
if ($DB->get_dbfamily() === 'postgres' or $DB->get_dbfamily() === 'mssql') {
$this->markTestSkipped('The processor is having issues with the transaction initialised in '
. 'advanced_testcase::runBare().');
return;
}
$this->preventResetByRollback(); // Test uses transactions, so we cannot use them for speedy reset.
$dg = $this->getDataGenerator();
$u = $dg->create_user();
@@ -125,9 +125,7 @@ class manager {
} catch (\Horde_Imap_Client_Exception $e) {
$message = $e->getMessage();
mtrace("Unable to connect to IMAP server. Failed with '{$message}'");
return false;
throw new \moodle_exception('imapconnectfailure', 'tool_messageinbound', '', null, $message);
}
}
+12 -2
View File
@@ -45,6 +45,13 @@ class api {
global $CFG;
require_once($CFG->libdir . '/adminlib.php');
// Check if we can return this from cache.
$cache = \cache::make('tool_mobile', 'plugininfo');
$pluginsinfo = $cache->get('mobileplugins');
if ($pluginsinfo !== false) {
return (array)$pluginsinfo;
}
$pluginsinfo = [];
$plugintypes = core_component::get_plugin_types();
@@ -56,7 +63,7 @@ class api {
$component = $plugintype . '_' . $plugin;
$version = get_component_version($component);
require_once("$path/db/mobile.php");
require("$path/db/mobile.php");
foreach ($addons as $addonname => $addoninfo) {
$plugininfo = array(
'component' => $component,
@@ -69,7 +76,7 @@ class api {
);
// All the mobile packages must be under the plugin mobile directory.
$package = $path . DIRECTORY_SEPARATOR . 'mobile' . DIRECTORY_SEPARATOR . $addonname . '.zip';
$package = $path . '/mobile/' . $addonname . '.zip';
if (file_exists($package)) {
$plugininfo['fileurl'] = $CFG->wwwroot . '' . str_replace($CFG->dirroot, '', $package);
$plugininfo['filehash'] = sha1_file($package);
@@ -79,6 +86,9 @@ class api {
}
}
}
$cache->set('mobileplugins', $pluginsinfo);
return $pluginsinfo;
}
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Mobile cache definitions.
*
* @package tool_mobile
* @copyright 2017 Skylar Kelty <S.Kelty@kent.ac.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
$definitions = array(
'plugininfo' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 1
)
);
@@ -23,3 +23,4 @@
*/
$string['pluginname'] = 'Moodle Mobile tools';
$string['cachedef_plugininfo'] = 'This stores the list of plugins with mobile addons';
@@ -53,10 +53,13 @@ class eventobservers {
* @param \core\event\course_deleted $event The course deleted event.
*/
public static function course_deleted(\core\event\course_deleted $event) {
// Delete rules defined inside this course and associated subscriptions.
$rules = rule_manager::get_rules_by_courseid($event->courseid, 0, 0, false);
foreach ($rules as $rule) {
rule_manager::delete_rule($rule->id, $event->get_context());
}
// Delete remaining subscriptions inside this course (from site-wide rules).
subscription_manager::remove_all_subscriptions_in_course($event->get_context());
}
/**
+6 -2
View File
@@ -176,8 +176,12 @@ class subscription {
if (empty($courseid)) {
return get_string('site');
} else {
$course = get_course($courseid);
return format_string($course->fullname, true, array('context' => $context));
try {
$course = get_course($courseid);
return format_string($course->fullname, true, array('context' => $context));
} catch (\dml_exception $e) {
return '-';
}
}
}
@@ -118,9 +118,10 @@ class subscription_manager {
// If successful trigger a subscription_deleted event.
if ($success) {
if (!empty($subscription->courseid)) {
if (!empty($subscription->courseid) &&
($coursecontext = \context_course::instance($subscription->courseid, IGNORE_MISSING))) {
$courseid = $subscription->courseid;
$context = \context_course::instance($subscription->courseid);
$context = $coursecontext;
} else {
$courseid = 0;
$context = \context_system::instance();
@@ -222,6 +223,31 @@ class subscription_manager {
return $success;
}
/**
* Delete all subscriptions in a course.
*
* This is called after a course was deleted, context no longer exists but we kept the object
*
* @param \context_course $coursecontext the context of the course
*/
public static function remove_all_subscriptions_in_course($coursecontext) {
global $DB;
// Store all the subscriptions we have to delete.
if ($subscriptions = $DB->get_records('tool_monitor_subscriptions', ['courseid' => $coursecontext->instanceid])) {
// Delete subscriptions in bulk.
$DB->delete_records('tool_monitor_subscriptions', ['courseid' => $coursecontext->instanceid]);
// Trigger events one by one.
foreach ($subscriptions as $subscription) {
$params = ['objectid' => $subscription->id, 'context' => $coursecontext];
$event = \tool_monitor\event\subscription_deleted::create($params);
$event->add_record_snapshot('tool_monitor_subscriptions', $subscription);
$event->trigger();
}
}
}
/**
* Get a subscription instance for an given subscription id.
*
+17
View File
@@ -77,5 +77,22 @@ function xmldb_tool_monitor_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2016052305, 'tool', 'monitor');
}
if ($oldversion < 2016052306) {
// Delete "orphaned" subscriptions.
$sql = "SELECT DISTINCT s.courseid
FROM {tool_monitor_subscriptions} s
LEFT OUTER JOIN {course} c ON c.id = s.courseid
WHERE s.courseid <> 0 and c.id IS NULL";
$deletedcourses = $DB->get_field_sql($sql);
if ($deletedcourses) {
list($sql, $params) = $DB->get_in_or_equal($deletedcourses);
$DB->execute("DELETE FROM {tool_monitor_subscriptions} WHERE courseid " . $sql, $params);
}
// Monitor savepoint reached.
upgrade_plugin_savepoint(true, 2016052306, 'tool', 'monitor');
}
return true;
}
+1 -1
View File
@@ -41,7 +41,7 @@ if (empty($courseid)) {
// check system level capability.
if (!has_capability('tool/monitor:subscribe', $context)) {
// If not system level then check to see if they have access to any course level rules.
if (tool_monitor_get_user_courses()){
if (tool_monitor_can_subscribe()) {
// Make them choose a course.
$choose = true;
} else {
+27 -3
View File
@@ -75,12 +75,20 @@ function tool_monitor_extend_navigation_frontpage($navigation, $course, $context
* @param context $coursecontext The context of the course
*/
function tool_monitor_extend_navigation_user_settings($navigation, $user, $usercontext, $course, $coursecontext) {
global $USER, $SITE;
global $USER, $PAGE;
// Don't bother doing needless calculations unless we are on the relevant pages.
$onpreferencepage = $PAGE->url->compare(new moodle_url('/user/preferences.php'), URL_MATCH_BASE);
$onmonitorpage = $PAGE->url->compare(new moodle_url('/admin/tool/monitor/index.php'), URL_MATCH_BASE);
if (!$onpreferencepage && !$onmonitorpage) {
return null;
}
// Don't show the setting if the event monitor isn't turned on. No access to other peoples subscriptions.
if (get_config('tool_monitor', 'enablemonitor') && $USER->id == $user->id) {
// Now let's check to see if the user has any courses / site rules that they can subscribe to.
if ($courses = tool_monitor_get_user_courses()) {
// We skip doing a check here if we are on the event monitor page as the check is done internally on that page.
if ($onmonitorpage || tool_monitor_can_subscribe()) {
$url = new moodle_url('/admin/tool/monitor/index.php');
$subsnode = navigation_node::create(get_string('managesubscriptions', 'tool_monitor'), $url,
navigation_node::TYPE_SETTING, null, 'monitor', new pix_icon('i/settings', ''));
@@ -92,6 +100,19 @@ function tool_monitor_extend_navigation_user_settings($navigation, $user, $userc
}
}
/**
* Check if the user has the capacity to subscribe to an event monitor anywhere.
*
* @return bool True if a capability in a course is found. False otherwise.
*/
function tool_monitor_can_subscribe() {
if (has_capability('tool/monitor:subscribe', context_system::instance())) {
return true;
}
$courses = get_user_capability_course('tool/monitor:subscribe', null, true, '', '', 1);
return empty($courses) ? false : true;
}
/**
* Get a list of courses and also include 'Site' for site wide rules.
*
@@ -103,8 +124,11 @@ function tool_monitor_get_user_courses() {
if (has_capability('tool/monitor:subscribe', context_system::instance())) {
$options[0] = get_string('site');
}
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, 'fullname, visible', $orderby)) {
$fields = 'fullname, visible, ctxid, ctxpath, ctxdepth, ctxlevel, ctxinstance';
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, $fields, $orderby)) {
foreach ($courses as $course) {
context_helper::preload_from_record($course);
$coursectx = context_course::instance($course->id);
if ($course->visible || has_capability('moodle/course:viewhiddencourses', $coursectx)) {
$options[$course->id] = format_string($course->fullname, true, array('context' => $coursectx));
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2016052305; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2016052306; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2016051900; // Requires this Moodle version.
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
+6 -2
View File
@@ -25,8 +25,12 @@
defined('MOODLE_INTERNAL') || die;
// profiling tool, added to development
if ((extension_loaded('xhprof') || extension_loaded('tideways')) && (!empty($CFG->profilingenabled) || !empty($CFG->earlyprofilingenabled))) {
// Profiling tool, added to development.
$hasextension = extension_loaded('tideways_xhprof');
$hasextension = $hasextension || extension_loaded('tideways');
$hasextension = $hasextension || extension_loaded('xhprof');
$isenabled = !empty($CFG->profilingenabled) || !empty($CFG->earlyprofilingenabled);
if ($hasextension && $isenabled) {
$ADMIN->add('development', new admin_externalpage('toolprofiling', get_string('pluginname', 'tool_profiling'),
"$CFG->wwwroot/$CFG->admin/tool/profiling/index.php", 'moodle/site:config'));
}
+1 -1
View File
@@ -75,7 +75,7 @@ if (!empty($delall) && confirm_sesskey()) {
exit;
}
if (!empty($ignore)) {
if (!empty($ignore) && confirm_sesskey()) {
unset($SESSION->users_result[$id]);
echo json_encode(true);
exit;
+30 -28
View File
@@ -358,38 +358,40 @@ if ($formdata = $mform2->is_cancelled()) {
// add default values for remaining fields
$formdefaults = array();
foreach ($STD_FIELDS as $field) {
if (isset($user->$field)) {
continue;
}
// all validation moved to form2
if (isset($formdata->$field)) {
// process templates
$user->$field = uu_process_template($formdata->$field, $user);
$formdefaults[$field] = true;
if (in_array($field, $upt->columns)) {
$upt->track($field, s($user->$field), 'normal');
if ($updatetype != UU_UPDATE_FILEOVERRIDE && $updatetype != UU_UPDATE_NOCHANGES) {
foreach ($STD_FIELDS as $field) {
if (isset($user->$field)) {
continue;
}
// all validation moved to form2
if (isset($formdata->$field)) {
// process templates
$user->$field = uu_process_template($formdata->$field, $user);
$formdefaults[$field] = true;
if (in_array($field, $upt->columns)) {
$upt->track($field, s($user->$field), 'normal');
}
}
}
}
foreach ($PRF_FIELDS as $field) {
if (isset($user->$field)) {
continue;
}
if (isset($formdata->$field)) {
// process templates
$user->$field = uu_process_template($formdata->$field, $user);
// Form contains key and later code expects value.
// Convert key to value for required profile fields.
require_once($CFG->dirroot.'/user/profile/field/'.$proffields[$field]->datatype.'/field.class.php');
$profilefieldclass = 'profile_field_'.$proffields[$field]->datatype;
$profilefield = new $profilefieldclass($proffields[$field]->id);
if (method_exists($profilefield, 'convert_external_data')) {
$user->$field = $profilefield->edit_save_data_preprocess($user->$field, null);
foreach ($PRF_FIELDS as $field) {
if (isset($user->$field)) {
continue;
}
if (isset($formdata->$field)) {
// process templates
$user->$field = uu_process_template($formdata->$field, $user);
$formdefaults[$field] = true;
// Form contains key and later code expects value.
// Convert key to value for required profile fields.
require_once($CFG->dirroot.'/user/profile/field/'.$proffields[$field]->datatype.'/field.class.php');
$profilefieldclass = 'profile_field_'.$proffields[$field]->datatype;
$profilefield = new $profilefieldclass($proffields[$field]->id);
if (method_exists($profilefield, 'convert_external_data')) {
$user->$field = $profilefield->edit_save_data_preprocess($user->$field, null);
}
$formdefaults[$field] = true;
}
}
}
@@ -33,6 +33,7 @@ $string['deleteerrors'] = 'Delete errors';
$string['encoding'] = 'Encoding';
$string['errormnetadd'] = 'Can not add remote users';
$string['errors'] = 'Errors';
$string['invalidupdatetype'] = 'You can not select this option with the chosen \'Upload type\'';
$string['invaliduserdata'] = 'Invalid data detected for user {$a} and it has been automatically cleaned.';
$string['nochanges'] = 'No changes';
$string['pluginname'] = 'User upload';
+7
View File
@@ -345,6 +345,7 @@ class admin_uploaduser_form2 extends moodleform {
$errors = parent::validation($data, $files);
$columns = $this->_customdata['columns'];
$optype = $data['uutype'];
$updatetype = $data['uuupdatetype'];
// detect if password column needed in file
if (!in_array('password', $columns)) {
@@ -377,6 +378,12 @@ class admin_uploaduser_form2 extends moodleform {
}
}
// If the 'Existing user details' value is set we need to ensure that the
// 'Upload type' is not set to something invalid.
if (!empty($updatetype) && ($optype == UU_USER_ADDNEW || $optype == UU_USER_ADDINC)) {
$errors['uuupdatetype'] = get_string('invalidupdatetype', 'tool_uploaduser');
}
// look for other required data
if ($optype != UU_USER_UPDATE) {
$requiredusernames = useredit_get_required_name_fields();
+1 -1
View File
@@ -49,7 +49,7 @@ It\'s highly recommended to be running the latest (+ version) available of your
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckforeignkeys'] = 'This functionality will search for potential violations of the foreign keys defined in the install.xml definitions. (Moodle does not currently generate actual foreign key constraints in the database, which is why invalid data may be present.)
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of missing indexes.
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search for potential violations of the foreign keys.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckindexes'] = 'This functionality will search for potential missing indexes in your Moodle server, generating (but not executing!) automatically the needed SQL statements to keep everything updated.
+12 -12
View File
@@ -3187,6 +3187,18 @@ class CAS_Client
false/*$no_response*/, true/*$bad_response*/, $text_response
);
$result = false;
} else if ( $tree_response->getElementsByTagName("authenticationFailure")->length != 0) {
// authentication failed, extract the error code and message and throw exception
$auth_fail_list = $tree_response
->getElementsByTagName("authenticationFailure");
throw new CAS_AuthenticationException(
$this, 'Ticket not validated', $validate_url,
false/*$no_response*/, false/*$bad_response*/,
$text_response,
$auth_fail_list->item(0)->getAttribute('code')/*$err_code*/,
trim($auth_fail_list->item(0)->nodeValue)/*$err_msg*/
);
$result = false;
} else if ($tree_response->getElementsByTagName("authenticationSuccess")->length != 0) {
// authentication succeded, extract the user name
$success_elements = $tree_response
@@ -3227,18 +3239,6 @@ class CAS_Client
$result = true;
}
}
} else if ( $tree_response->getElementsByTagName("authenticationFailure")->length != 0) {
// authentication succeded, extract the error code and message
$auth_fail_list = $tree_response
->getElementsByTagName("authenticationFailure");
throw new CAS_AuthenticationException(
$this, 'Ticket not validated', $validate_url,
false/*$no_response*/, false/*$bad_response*/,
$text_response,
$auth_fail_list->item(0)->getAttribute('code')/*$err_code*/,
trim($auth_fail_list->item(0)->nodeValue)/*$err_msg*/
);
$result = false;
} else {
throw new CAS_AuthenticationException(
$this, 'Ticket not validated', $validate_url,
+1
View File
@@ -2,3 +2,4 @@ Description of phpCAS 1.3.4 library import
* downloaded from http://downloads.jasig.org/cas-clients/php/current/
* MDL-59456 phpCAS library has been patched because of an authentication bypass security vulnerability.
+24 -2
View File
@@ -99,9 +99,31 @@ if (!isset($config->removeuser)) {
$yesno = array( get_string('no'), get_string('yes') );
$disabled = '';
if (!ldap_paged_results_supported($config->ldap_version)) {
$pagedresultssupported = false;
if ($config->host_url !== '') {
/**
* We try to connect each and every time we open the config, because we want to set the Page
* Size setting as enabled or disabled depending on the configured LDAP server supporting
* pagination or not, and to notify the user about it. If the user changed the LDAP server (or
* the LDAP protocol version) last time, it might happen that paged results are no longer
* available and we want to show that to the user the next time she goes to the settings page.
*/
try {
$ldapconn = $this->ldap_connect();
$pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn);
} catch (Exception $e) {
// If we couldn't connect and get the supported options, we can only assume we don't support paged results.
$pagedresultssupported = false;
}
}
/* Make sure we only disable the paged result size setting and show the notification about it if
* there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does
* support paged results, they won't be able to turn it on the first time they set it up (because
* the field will be disabled).
*/
if (($config->host_url !== '') && (!$pagedresultssupported)) {
$disabled = ' disabled="disabled"';
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
}
?>
+21 -17
View File
@@ -302,18 +302,24 @@ class auth_plugin_db extends auth_plugin_base {
// Find obsolete users.
if (count($userlist)) {
$remove_users = array();
// All the drivers can cope with chunks of 10,000. See line 4491 of lib/dml/tests/dml_est.php
$userlistchunks = array_chunk($userlist , 10000);
foreach($userlistchunks as $userlistchunk) {
list($notin_sql, $params) = $DB->get_in_or_equal($userlistchunk, SQL_PARAMS_NAMED, 'u', false);
$params['authtype'] = $this->authtype;
$sql = "SELECT u.id, u.username
$removeusers = array();
$params['authtype'] = $this->authtype;
$sql = "SELECT u.id, u.username
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0 AND u.mnethostid=:mnethostid $suspendselect AND u.username $notin_sql";
$params['mnethostid'] = $CFG->mnet_localhost_id;
$remove_users = $remove_users + $DB->get_records_sql($sql, $params);
WHERE u.auth=:authtype
AND u.deleted=0
AND u.mnethostid=:mnethostid
$suspendselect";
$params['mnethostid'] = $CFG->mnet_localhost_id;
$internalusersrs = $DB->get_recordset_sql($sql, $params);
$usernamelist = array_flip($userlist);
foreach ($internalusersrs as $internaluser) {
if (!array_key_exists($internaluser->username, $usernamelist)) {
$removeusers[] = $internaluser;
}
}
$internalusersrs->close();
} else {
$sql = "SELECT u.id, u.username
FROM {user} u
@@ -321,13 +327,13 @@ class auth_plugin_db extends auth_plugin_base {
$params = array();
$params['authtype'] = $this->authtype;
$params['mnethostid'] = $CFG->mnet_localhost_id;
$remove_users = $DB->get_records_sql($sql, $params);
$removeusers = $DB->get_records_sql($sql, $params);
}
if (!empty($remove_users)) {
$trace->output(get_string('auth_dbuserstoremove','auth_db', count($remove_users)));
if (!empty($removeusers)) {
$trace->output(get_string('auth_dbuserstoremove', 'auth_db', count($removeusers)));
foreach ($remove_users as $user) {
foreach ($removeusers as $user) {
if ($this->config->removeuser == AUTH_REMOVEUSER_FULLDELETE) {
delete_user($user);
$trace->output(get_string('auth_dbdeleteuser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)), 1);
@@ -340,7 +346,7 @@ class auth_plugin_db extends auth_plugin_base {
}
}
}
unset($remove_users);
unset($removeusers);
}
if (!count($userlist)) {
@@ -934,5 +940,3 @@ class auth_plugin_db extends auth_plugin_base {
return core_user::clean_data($user);
}
}
+55
View File
@@ -31,6 +31,9 @@ class auth_db_testcase extends advanced_testcase {
/** @var string Original error log */
protected $oldlog;
/** @var int The amount of users to create for the large user set deletion test */
protected $largedeletionsetsize = 128;
protected function init_auth_database() {
global $DB, $CFG;
require_once("$CFG->dirroot/auth/db/auth.php");
@@ -445,4 +448,56 @@ class auth_db_testcase extends advanced_testcase {
$this->cleanup_auth_database();
}
/**
* Testing the deletion of a user when there are many users in the external DB.
*/
public function test_deleting_with_many_users() {
global $DB;
$this->resetAfterTest(true);
$this->preventResetByRollback();
$this->init_auth_database();
$auth = get_auth_plugin('db');
$auth->db_init();
// Set to delete from moodle when missing from DB.
set_config('removeuser', AUTH_REMOVEUSER_FULLDELETE, 'auth/db');
$auth->config->removeuser = AUTH_REMOVEUSER_FULLDELETE;
// Create users.
$users = [];
for ($i = 0; $i < $this->largedeletionsetsize; $i++) {
$user = (object)array('username' => "u$i", 'name' => "u$i", 'pass' => 'heslo', 'email' => "u$i@example.com");
$user->id = $DB->insert_record('auth_db_users', $user);
$users[] = $user;
}
// Sync to moodle.
$trace = new null_progress_trace();
$auth->sync_users($trace, true);
// Check user is there.
$user = array_shift($users);
$moodleuser = $DB->get_record('user', array('email' => $user->email, 'auth' => 'db'));
$this->assertNotNull($moodleuser);
$this->assertEquals($user->username, $moodleuser->username);
// Delete a user.
$DB->delete_records('auth_db_users', array('id' => $user->id));
// Sync again.
$auth->sync_users($trace, true);
// Check user is no longer there.
$moodleuser = $DB->get_record('user', array('id' => $moodleuser->id));
$this->assertFalse($auth->user_login($user->username, 'heslo'));
$this->assertEquals(1, $moodleuser->deleted);
// Make sure it was the only user deleted.
$numberdeleted = $DB->count_records('user', array('deleted' => 1, 'auth' => 'db'));
$this->assertEquals(1, $numberdeleted);
$this->cleanup_auth_database();
}
}
+2 -2
View File
@@ -695,7 +695,7 @@ class auth_plugin_ldap extends auth_plugin_base {
array_push($contexts, $this->config->create_context);
}
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version);
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
$ldap_cookie = '';
foreach ($contexts as $context) {
$context = trim($context);
@@ -1540,7 +1540,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$ldap_cookie = '';
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version);
$ldap_pagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);
foreach ($contexts as $context) {
$context = trim($context);
if (empty($context)) {
+24 -2
View File
@@ -117,9 +117,31 @@ $fastpathoptions = array(AUTH_NTLM_FASTPATH_YESFORM => get_string('auth_ntlmsso_
AUTH_NTLM_FASTPATH_ATTEMPT => get_string('auth_ntlmsso_ie_fastpath_attempt', 'auth_ldap'));
$disabled = '';
if (!ldap_paged_results_supported($config->ldap_version)) {
$pagedresultssupported = false;
if ($config->host_url !== '') {
/**
* We try to connect each and every time we open the config, because we want to set the Page
* Size setting as enabled or disabled depending on the configured LDAP server supporting
* pagination or not, and to notify the user about it. If the user changed the LDAP server (or
* the LDAP protocol version) last time, it might happen that paged results are no longer
* available and we want to show that to the user the next time she goes to the settings page.
*/
try {
$ldapconn = $this->ldap_connect();
$pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn);
} catch (Exception $e) {
// If we couldn't connect and get the supported options, we can only assume we don't support paged results.
$pagedresultssupported = false;
}
}
/* Make sure we only disable the paged result size setting and show the notification about it if
* there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does
* support paged results, they won't be able to turn it on the first time they set it up (because
* the field will be disabled).
*/
if (($config->host_url !== '') && (!$pagedresultssupported)) {
$disabled = ' disabled="disabled"';
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
}
?>
+1 -1
View File
@@ -132,7 +132,7 @@ $string['ntlmsso_attempting'] = 'Attempting Single Sign On via NTLM...';
$string['ntlmsso_failed'] = 'Auto-login failed, try the normal login page...';
$string['ntlmsso_isdisabled'] = 'NTLM SSO is disabled.';
$string['ntlmsso_unknowntype'] = 'Unknown ntlmsso type!';
$string['pagedresultsnotsupp'] = 'LDAP paged results not supported (either your PHP version lacks support or you have configured Moodle to use LDAP protocol version 2)';
$string['pagedresultsnotsupp'] = 'LDAP paged results not supported (either your PHP version lacks support, you have configured Moodle to use LDAP protocol version 2 or Moodle cannot contact your LDAP server to see if paged support is available.)';
$string['pagesize'] = 'Make sure this value is smaller than your LDAP server result set size limit (the maximum number of entries that can be returned in a single query)';
$string['pagesize_key'] = 'Page Size';
$string['pluginname'] = 'LDAP server';
+2 -2
View File
@@ -23,6 +23,6 @@
*/
$string['auth_pamdescription'] = 'This method uses PAM to access the native usernames on this server. You have to install <a href="http://www.math.ohio-state.edu/~ccunning/pam_auth/">PHP4 PAM Authentication</a> in order to use this module.';
$string['auth_passwordisexpired'] = 'Your password is expired. Do you want change your password now?';
$string['auth_passwordwillexpire'] = 'Your password will expire in {$a} days. Do you want change your password now?';
$string['auth_passwordisexpired'] = 'Your password has expired. Do you want to change your password now?';
$string['auth_passwordwillexpire'] = 'Your password will expire in {$a} days. Do you want to change your password now?';
$string['pluginname'] = 'PAM (Pluggable Authentication Modules)';
+5 -4
View File
@@ -26,13 +26,14 @@ if (!is_enabled_auth('shibboleth')) {
$inputstream = file_get_contents("php://input");
if ($action == 'logout' && !empty($redirect)) {
if ($USER->auth == 'shibboleth') {
// Logout out user from application.
if (isloggedin($USER) && $USER->auth == 'shibboleth') {
// Logout user from application.
require_logout();
// Finally, send user to the return URL.
redirect($redirect);
}
// Finally, send user to the return URL.
redirect($redirect);
} else if (!empty($inputstream)) {
// Back channel logout.
@@ -0,0 +1,55 @@
@core @core_auth
Feature: Test the 'showlogfailures' feature works.
In order to see my recent login failures when logging in
As a user
I need to have at least one failed login attempt and then log in
Background:
Given the following "users" exist:
| username |
| teacher1 |
And the following config values are set as admin:
| displayloginfailures | 1 |
# Given the user has at least one failed login attempt, when they login, then they should see both header and footer notices.
Scenario: Check that 'displayloginfailures' works without javascript for teachers.
# Simulate a log in failure for the teacher.
Given I am on homepage
And I click on "Log in" "link" in the ".logininfo" "css_element"
And I set the field "Username" to "teacher1"
And I set the field "Password" to "wrongpass"
And I press "Log in"
And I should see "Invalid login, please try again"
# Now, log in with the correct credentials.
When I set the field "Username" to "teacher1"
And I set the field "Password" to "teacher1"
And I press "Log in"
# Confirm the notices are displayed.
Then I should see "1 failed logins since your last login" in the "header.navbar" "css_element"
And I should see "1 failed logins since your last login" in the "page-footer" "region"
# Confirm the notices disappear when navigating to another page.
And I am on homepage
And I should not see "1 failed logins since your last login" in the "header.navbar" "css_element"
And I should not see "1 failed logins since your last login" in the "page-footer" "region"
# Given the user has at least one failed login attempt, when they login, then they should see both header and footer notices.
Scenario: Check that 'displayloginfailures' works without javascript for admins.
# Simulate a log in failure for the teacher.
Given I am on homepage
And I click on "Log in" "link" in the ".logininfo" "css_element"
And I set the field "Username" to "admin"
And I set the field "Password" to "wrongpass"
And I press "Log in"
And I should see "Invalid login, please try again"
# Now, log in with the correct credentials.
When I set the field "Username" to "admin"
And I set the field "Password" to "admin"
And I press "Log in"
# Confirm the notices are displayed.
Then I should see "1 failed logins since your last login" in the "header.navbar" "css_element"
And I should see "1 failed logins since your last login (Logs)" in the "page-footer" "region"
# Confirm that the link works and that the notices disappear when navigating to another page.
And I click on "Logs" "link" in the "page-footer" "region"
And I should see "User login failed" in the "table.reportlog" "css_element"
And I should not see "1 failed logins since your last login" in the "header.navbar" "css_element"
And I should not see "1 failed logins since your last login (Logs)" in the "page-footer" "region"
+50
View File
@@ -0,0 +1,50 @@
@core @core_auth
Feature: Test the 'remember username' feature works.
In order to see my saved username on the login form
As a user
I need to have logged in once before and clicked 'Remember username'
Background:
Given the following "users" exist:
| username |
| teacher1 |
# Given the user has logged in and selected 'Remember username', when they log in again, then their username should be remembered.
Scenario: Check that 'remember username' works without javascript for teachers.
# Log in the first time and check the 'remember username' box.
Given I am on homepage
And I click on "Log in" "link" in the ".logininfo" "css_element"
And I set the field "Username" to "teacher1"
And I set the field "Password" to "teacher1"
And I set the field "Remember username" to "1"
And I press "Log in"
And I log out
# Log out and check that the username was remembered.
When I am on homepage
And I click on "Log in" "link" in the ".logininfo" "css_element"
Then the field "username" matches value "teacher1"
And the field "Remember username" matches value "1"
# Given the user has logged in before and selected 'Remember username', when they log in again and unset 'Remember username', then
# their username should be forgotten for future log in attempts.
Scenario: Check that 'remember username' unsetting works without javascript for teachers.
# Log in the first time and check the 'remember username' box.
Given I am on homepage
And I click on "Log in" "link" in the ".logininfo" "css_element"
And I set the field "Username" to "teacher1"
And I set the field "Password" to "teacher1"
And I set the field "Remember username" to "1"
And I press "Log in"
And I log out
# Log in again, unsetting the 'remember username' field.
When I am on homepage
And I click on "Log in" "link" in the ".logininfo" "css_element"
And I set the field "Password" to "teacher1"
And I set the field "Remember username" to "0"
And I press "Log in"
And I log out
# Check username has been forgotten.
Then I am on homepage
And I click on "Log in" "link" in the ".logininfo" "css_element"
Then the field "username" matches value ""
And the field "Remember username" matches value "0"
+20 -3
View File
@@ -2666,7 +2666,7 @@ class restore_calendarevents_structure_step extends restore_structure_step {
'courseid' => $this->get_courseid(),
'groupid' => $data->groupid,
'userid' => $data->userid,
'repeatid' => $data->repeatid,
'repeatid' => $this->get_mappingid('event', $data->repeatid),
'modulename' => $data->modulename,
'eventtype' => $data->eventtype,
'timestart' => $this->apply_date_offset($data->timestart),
@@ -2684,18 +2684,27 @@ class restore_calendarevents_structure_step extends restore_structure_step {
FROM {event}
WHERE " . $DB->sql_compare_text('name', 255) . " = " . $DB->sql_compare_text('?', 255) . "
AND courseid = ?
AND repeatid = ?
AND modulename = ?
AND timestart = ?
AND timeduration = ?
AND " . $DB->sql_compare_text('description', 255) . " = " . $DB->sql_compare_text('?', 255);
$arg = array ($params['name'], $params['courseid'], $params['repeatid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$arg = array ($params['name'], $params['courseid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$result = $DB->record_exists_sql($sql, $arg);
if (empty($result)) {
$newitemid = $DB->insert_record('event', $params);
$this->set_mapping('event', $oldid, $newitemid);
$this->set_mapping('event_description', $oldid, $newitemid, $restorefiles);
}
// With repeating events, each event has the repeatid pointed at the first occurrence.
// Since the repeatid will be empty when the first occurrence is restored,
// Get the repeatid from the second occurrence of the repeating event and use that to update the first occurrence.
// Then keep a list of repeatids so we only perform this update once.
static $repeatids = array();
if (!empty($params['repeatid']) && !in_array($params['repeatid'], $repeatids)) {
// This entry is repeated so the repeatid field must be set.
$DB->set_field('event', 'repeatid', $params['repeatid'], array('id' => $params['repeatid']));
$repeatids[] = $params['repeatid'];
}
}
protected function after_execute() {
@@ -4327,6 +4336,14 @@ class restore_create_categories_and_questions extends restore_structure_step {
}
$data->contextid = $mapping->parentitemid;
// Before 3.1, the 'stamp' field could be erroneously duplicated.
// From 3.1 onwards, there's a unique index of (contextid, stamp).
// If we encounter a duplicate in an old restore file, just generate a new stamp.
// This is the same as what happens during an upgrade to 3.1+ anyway.
if ($DB->record_exists('question_categories', ['stamp' => $data->stamp, 'contextid' => $data->contextid])) {
$data->stamp = make_unique_id_code();
}
// Let's create the question_category and save mapping
$newitemid = $DB->insert_record('question_categories', $data);
$this->set_mapping('question_category', $oldid, $newitemid);
@@ -635,7 +635,9 @@ abstract class backup_controller_dbops extends backup_dbops {
$locked = (get_config('backup', $config.'_locked') == true);
if ($plan->setting_exists($settingname)) {
$setting = $plan->get_setting($settingname);
if ($setting->get_value() != $value || 1==1) {
// We can only update the setting if it isn't already locked by config or permission.
if ($setting->get_status() !== base_setting::LOCKED_BY_CONFIG
&& $setting->get_status() !== base_setting::LOCKED_BY_PERMISSION) {
$setting->set_value($value);
if ($locked) {
$setting->set_status(base_setting::LOCKED_BY_CONFIG);
+3 -1
View File
@@ -740,10 +740,12 @@ class core_backup_renderer extends plugin_renderer_base {
if (!$category->visible) {
$row->attributes['class'] .= ' dimmed';
}
$context = context_coursecat::instance($category->id);
$row->cells = array(
html_writer::empty_tag('input', array('type' => 'radio', 'name' => 'targetid', 'value' => $category->id)),
format_string($category->name, true, array('context' => context_coursecat::instance($category->id))),
format_text($category->description, $category->descriptionformat, array('overflowdiv' => true))
format_text(file_rewrite_pluginfile_urls($category->description, 'pluginfile.php', $context->id,
'coursecat', 'description', null), $category->descriptionformat, array('overflowdiv' => true))
);
$table->data[] = $row;
}
+42 -25
View File
@@ -46,23 +46,6 @@ class edit_backpack_form extends moodleform {
$mform->addElement('header', 'backpackheader', get_string('backpackconnection', 'badges'));
$mform->addHelpButton('backpackheader', 'backpackconnection', 'badges');
$mform->addElement('static', 'url', get_string('url'), BADGE_BACKPACKURL);
$status = html_writer::tag('span', get_string('notconnected', 'badges'),
array('class' => 'notconnected', 'id' => 'connection-status'));
$mform->addElement('static', 'status', get_string('status'), $status);
$nojs = html_writer::tag('noscript', get_string('error:personaneedsjs', 'badges'),
array('class' => 'notconnected'));
$personadiv = $OUTPUT->container($nojs, null, 'persona-container');
$mform->addElement('static', 'persona', '', $personadiv);
$mform->addHelpButton('persona', 'personaconnection', 'badges');
$PAGE->requires->js(new moodle_url('https://login.persona.org/include.js'));
$PAGE->requires->js('/badges/backpack.js');
$PAGE->requires->js_init_call('badges_init_persona_login_button', null, false);
$PAGE->requires->strings_for_js(array('error:backpackloginfailed', 'signinwithyouremail',
'error:noassertion', 'error:connectionunknownreason', 'error:badjson', 'connecting',
'notconnected'), 'badges');
$mform->addElement('hidden', 'userid', $USER->id);
$mform->setType('userid', PARAM_INT);
@@ -70,23 +53,57 @@ class edit_backpack_form extends moodleform {
$mform->addElement('hidden', 'backpackurl', BADGE_BACKPACKURL);
$mform->setType('backpackurl', PARAM_URL);
if (isset($this->_customdata['email'])) {
// Email will be passed in when we're in the process of verifying the user's email address,
// so set the connection status, lock the email field, and provide options to resend the verification
// email or cancel the verification process entirely and start over.
$status = html_writer::tag('span', get_string('backpackemailverificationpending', 'badges'),
array('class' => 'notconnected', 'id' => 'connection-status'));
$mform->addElement('static', 'status', get_string('status'), $status);
$mform->addElement('hidden', 'email', $this->_customdata['email']);
$mform->setType('email', PARAM_RAW_TRIMMED);
$mform->hardFreeze(['email']);
$status = html_writer::tag('span', $this->_customdata['email'], []);
$mform->addElement('static', 'emailverify', get_string('email'), $status);
$buttonarray = [];
$buttonarray[] = &$mform->createElement('submit', 'submitbutton',
get_string('backpackconnectionresendemail', 'badges'));
$buttonarray[] = &$mform->createElement('submit', 'revertbutton',
get_string('backpackconnectioncancelattempt', 'badges'));
$mform->addGroup($buttonarray, 'buttonar', '', [''], false);
$mform->closeHeaderBefore('buttonar');
} else {
// Email isn't present, so provide an input element to get it and a button to start the verification process.
$status = html_writer::tag('span', get_string('notconnected', 'badges'),
array('class' => 'notconnected', 'id' => 'connection-status'));
$mform->addElement('static', 'status', get_string('status'), $status);
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
$mform->addHelpButton('email', 'backpackemail', 'badges');
$mform->addRule('email', get_string('required'), 'required', null, 'client');
$mform->setType('email', PARAM_RAW_TRIMMED);
$this->add_action_buttons(false, get_string('backpackconnectionconnect', 'badges'));
}
}
/**
* Validates form data
*/
public function validation($data, $files) {
global $DB;
$errors = parent::validation($data, $files);
$check = new stdClass();
$check->backpackurl = $data['backpackurl'];
$check->email = $data['email'];
// We don't need to verify the email address if we're clearing a pending email verification attempt.
if (!isset($data['revertbutton'])) {
$check = new stdClass();
$check->backpackurl = $data['backpackurl'];
$check->email = $data['email'];
$bp = new OpenBadgesBackpackHandler($check);
$request = $bp->curl_request('user');
if (isset($request->status) && $request->status == 'missing') {
$errors['email'] = get_string('error:nosuchuser', 'badges');
$bp = new OpenBadgesBackpackHandler($check);
$request = $bp->curl_request('user');
if (isset($request->status) && $request->status == 'missing') {
$errors['email'] = get_string('error:nosuchuser', 'badges');
} else if (!isset($request->status) || $request->status !== 'okay') {
$errors['email'] = get_string('backpackconnectionunexpectedresult', 'badges');
}
}
return $errors;
}
+78
View File
@@ -0,0 +1,78 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Endpoint for the verification email link.
*
* @package core
* @subpackage badges
* @copyright 2016 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../config.php');
require_once($CFG->libdir . '/badgeslib.php');
require_once(__DIR__ . '/lib/backpacklib.php');
$data = optional_param('data', '', PARAM_RAW);
require_login();
$PAGE->set_url('/badges/openbackpackemailverify.php');
$PAGE->set_context(context_user::instance($USER->id));
$redirect = '/badges/mybackpack.php';
// Confirm the secret and create the backpack connection.
$storedsecret = get_user_preferences('badges_email_verify_secret');
if (!is_null($storedsecret)) {
if ($data === $storedsecret) {
$storedemail = get_user_preferences('badges_email_verify_address');
$data = new stdClass();
$data->backpackurl = BADGE_BACKPACKURL;
$data->email = $storedemail;
$bp = new OpenBadgesBackpackHandler($data);
// Make sure we have all the required information before trying to save the connection.
$backpackuser = $bp->curl_request('user');
if (isset($backpackuser->status) && $backpackuser->status === 'okay' && isset($backpackuser->userId)) {
$backpackuid = $backpackuser->userId;
} else {
redirect(new moodle_url($redirect), get_string('backpackconnectionunexpectedresult', 'badges'),
null, \core\output\notification::NOTIFY_ERROR);
}
$obj = new stdClass();
$obj->userid = $USER->id;
$obj->email = $data->email;
$obj->backpackurl = $data->backpackurl;
$obj->backpackuid = $backpackuid;
$obj->autosync = 0;
$obj->password = '';
$DB->insert_record('badge_backpack', $obj);
// Remove the verification vars and redirect to the mypackpack page.
unset_user_preference('badges_email_verify_secret');
unset_user_preference('badges_email_verify_address');
redirect(new moodle_url($redirect), get_string('backpackemailverifysuccess', 'badges'),
null, \core\output\notification::NOTIFY_SUCCESS);
} else {
// Stored secret doesn't match the supplied secret. Take user back to the mybackpack page and present a warning message.
redirect(new moodle_url($redirect), get_string('backpackemailverifytokenmismatch', 'badges'),
null, \core\output\notification::NOTIFY_ERROR);
}
} else {
// Stored secret is null. Either the email address has already been verified, or there is no record of a verification attempt
// for the current user. Either way, just redirect to the mybackpack page.
redirect(new moodle_url($redirect));
}
+42
View File
@@ -117,3 +117,45 @@ class OpenBadgesBackpackHandler {
return $this->backpack;
}
}
/**
* Create and send a verification email to the email address supplied.
*
* Since we're not sending this email to a user, email_to_user can't be used
* but this function borrows largely the code from that process.
*
* @param string $email the email address to send the verification email to.
* @return true if the email was sent successfully, false otherwise.
*/
function send_verification_email($email) {
global $DB, $USER;
// Store a user secret (badges_email_verify_secret) and the address (badges_email_verify_address) as users prefs.
// The address will be used by edit_backpack_form for display during verification and to facilitate the resending
// of verification emails to said address.
$secret = random_string(15);
set_user_preference('badges_email_verify_secret', $secret);
set_user_preference('badges_email_verify_address', $email);
// To, from.
$tempuser = $DB->get_record('user', array('id' => $USER->id), '*', MUST_EXIST);
$tempuser->email = $email;
$noreplyuser = core_user::get_noreply_user();
// Generate the verification email body.
$verificationurl = '/badges/backpackemailverify.php';
$verificationurl = new moodle_url($verificationurl);
$verificationpath = $verificationurl->out(false);
$site = get_site();
$args = new stdClass();
$args->link = $verificationpath . '?data='. $secret;
$args->sitename = $site->fullname;
$args->admin = generate_email_signoff();
$messagesubject = get_string('backpackemailverifyemailsubject', 'badges', $site->fullname);
$messagetext = get_string('backpackemailverifyemailbody', 'badges', $args);
$messagehtml = text_to_html($messagetext, false, false, true);
return email_to_user($tempuser, $noreplyuser, $messagesubject, $messagetext, $messagehtml);
}
+29 -13
View File
@@ -110,23 +110,39 @@ if ($backpack) {
}
} else {
// If backpack is not connected, need to connect first.
$form = new edit_backpack_form();
// To create a new connection to the backpack, first we need to verify the user's email address:
// 1. User enters email and clicks 'Connect to backpack'.
// 2. After cross-checking the email address against the backpack provider, an email is sent to the specified address,
// and the email and secret are stored in user preferences. These will be cleared upon successful verification.
// 3. User clicks verification link in the email to confirm the backpack connection.
// 4. User redirected to the mybackpack page.
// While the verification process is pending, the edit_backpack_form form will present the user with options to resend the
// verification email, and to cancel the current verification attempt and start over.
// To pass through the current state of the verification attempt to the form.
$params['email'] = get_user_preferences('badges_email_verify_address');
$form = new edit_backpack_form(new moodle_url('/badges/mybackpack.php'), $params);
if ($form->is_cancelled()) {
redirect(new moodle_url('/badges/mybadges.php'));
} else if ($data = $form->get_data()) {
$bp = new OpenBadgesBackpackHandler($data);
$obj = new stdClass();
$obj->userid = $data->userid;
$obj->email = $data->email;
$obj->backpackurl = $data->backpackurl;
$obj->backpackuid = $bp->curl_request('user')->userId;
$obj->autosync = 0;
$obj->password = '';
$DB->insert_record('badge_backpack', $obj);
redirect(new moodle_url('/badges/mybackpack.php'));
// The form may have been submitted under one of the following circumstances:
// 1. After clicking 'Connect to backpack'. We'll have $data->email.
// 2. After clicking 'Resend verification email'. We'll have $data->email.
// 3. After clicking 'Connect using a different email' to cancel the verification process. We'll have $data->revertbutton.
if (isset($data->revertbutton)) {
unset_user_preference('badges_email_verify_secret');
unset_user_preference('badges_email_verify_address');
redirect(new moodle_url('/badges/mybackpack.php'));
} else if (isset($data->email)) {
if (send_verification_email($data->email)) {
redirect(new moodle_url('/badges/mybackpack.php'),
get_string('backpackemailverifypending', 'badges', $data->email),
null, \core\output\notification::NOTIFY_INFO);
} else {
print_error ('backpackcannotsendverification', 'badges');
}
}
}
}
+1 -2
View File
@@ -31,8 +31,7 @@ Feature: Award badges
And I press "Enable access"
And I press "Continue"
And I click on "Admin User" "link"
And I follow "Profile" in the open menu
And I follow "Edit profile"
And I open my profile in edit mode
And I expand all fieldsets
And I set the field "Phone" to "123456789"
And I press "Update profile"
@@ -673,7 +673,7 @@ class block_activity_results extends block_base {
$o = html_writer::start_tag('h3');
$o .= html_writer::link(new moodle_url('/mod/'.$activity->itemmodule.'/view.php',
array('id' => $cm->id)), $activity->itemname);
array('id' => $cm->id)), format_string(($activity->itemname), true, ['context' => context_module::instance($cm->id)]));
$o .= html_writer::end_tag('h3');
return $o;
}
@@ -690,4 +690,4 @@ class block_activity_results extends block_base {
return $scale;
}
}
}
+1
View File
@@ -49,6 +49,7 @@ class block_activity_results_edit_form extends block_edit_form {
$sql = 'SELECT id, itemname FROM {grade_items} WHERE courseid = ? and itemtype = ? and (gradetype = ? or gradetype = ?)';
$params = array($this->page->course->id, 'mod', GRADE_TYPE_VALUE, GRADE_TYPE_SCALE);
$activities = $DB->get_records_sql_menu($sql, $params);
core_collator::asort($activities);
if (empty($activities)) {
$mform->addElement('static', 'noactivitieswarning', get_string('config_select_activity', 'block_activity_results'),
+2 -1
View File
@@ -153,7 +153,8 @@ class block_community_renderer extends plugin_renderer_base {
array('class' => 'hubcourseuserinfo'));
//create course content related information html
$course->subject = get_string($course->subject, 'edufields');
$course->subject = (get_string_manager()->string_exists($course->subject, 'edufields')) ?
get_string($course->subject, 'edufields') : get_string('none');
$course->audience = get_string('audience' . $course->audience, 'hub');
$course->educationallevel = get_string('edulevel' . $course->educationallevel, 'hub');
$coursecontentinfo = '';
@@ -64,7 +64,7 @@ class block_course_overview extends block_base {
$content = array();
$updatemynumber = optional_param('mynumber', -1, PARAM_INT);
if ($updatemynumber >= 0) {
if ($updatemynumber >= 0 && optional_param('sesskey', '', PARAM_RAW) && confirm_sesskey()) {
block_course_overview_update_mynumber($updatemynumber);
}
+1 -1
View File
@@ -86,7 +86,7 @@ function block_course_overview_get_myorder() {
// If preference was not found, look in the old location and convert if found.
$order = array();
if ($value = get_user_preferences('course_overview_course_order')) {
$order = unserialize($value);
$order = unserialize_array($value);
block_course_overview_update_myorder($order);
unset_user_preference('course_overview_course_order');
}
+1 -1
View File
@@ -213,7 +213,7 @@ class block_course_overview_renderer extends plugin_renderer_base {
for ($i = 1; $i <= $max; $i++) {
$options[$i] = $i;
}
$url = new moodle_url('/my/index.php');
$url = new moodle_url('/my/index.php', ['sesskey' => sesskey()]);
$select = new single_select($url, 'mynumber', $options, block_course_overview_get_max_user_courses(), array());
$select->set_label(get_string('numtodisplay', 'block_course_overview'));
$output .= $this->output->render($select);
+45 -26
View File
@@ -50,6 +50,12 @@ class block_edit_form extends moodleform {
*/
public $page;
/**
* Defaults set in set_data() that need to be returned in get_data() if form elements were not created
* @var array
*/
protected $defaults = [];
function __construct($actionurl, $block, $page) {
global $CFG;
$this->block = $block;
@@ -92,9 +98,6 @@ class block_edit_form extends moodleform {
}
$parentcontext = context::instance_by_id($this->block->instance->parentcontextid);
$mform->addElement('hidden', 'bui_parentcontextid', $parentcontext->id);
$mform->setType('bui_parentcontextid', PARAM_INT);
$mform->addElement('static', 'bui_homecontext', get_string('createdat', 'block'), $parentcontext->get_context_name());
$mform->addHelpButton('bui_homecontext', 'createdat', 'block');
@@ -109,21 +112,9 @@ class block_edit_form extends moodleform {
// implies one (and only one) harcoded page-type that will be set later
// when processing the form data at {@link block_manager::process_url_edit()}
// There are some conditions to check related to contexts
$ctxconditions = $this->page->context->contextlevel == CONTEXT_COURSE &&
$this->page->context->instanceid == get_site()->id;
// And also some pagetype conditions
$pageconditions = isset($bits[0]) && isset($bits[1]) && $bits[0] == 'site' && $bits[1] == 'index';
// So now we can be 100% sure if edition is happening at frontpage
$editingatfrontpage = $ctxconditions && $pageconditions;
// Let the form to know about that, can be useful later
$mform->addElement('hidden', 'bui_editingatfrontpage', (int)$editingatfrontpage);
$mform->setType('bui_editingatfrontpage', PARAM_INT);
// Front page, show the page-contexts element and set $pagetypelist to 'any page' (*)
// as unique option. Processign the form will do any change if needed
if ($editingatfrontpage) {
if ($this->is_editing_the_frontpage()) {
$contextoptions = array();
$contextoptions[BUI_CONTEXTS_FRONTPAGE_ONLY] = get_string('showonfrontpageonly', 'block');
$contextoptions[BUI_CONTEXTS_FRONTPAGE_SUBS] = get_string('showonfrontpageandsubs', 'block');
@@ -135,16 +126,13 @@ class block_edit_form extends moodleform {
// Any other system context block, hide the page-contexts element,
// it's always system-wide BUI_CONTEXTS_ENTIRE_SITE
} else if ($parentcontext->contextlevel == CONTEXT_SYSTEM) {
$mform->addElement('hidden', 'bui_contexts', BUI_CONTEXTS_ENTIRE_SITE);
} else if ($parentcontext->contextlevel == CONTEXT_COURSE) {
// 0 means display on current context only, not child contexts
// but if course managers select mod-* as pagetype patterns, block system will overwrite this option
// to 1 (display on current context and child contexts)
$mform->addElement('hidden', 'bui_contexts', BUI_CONTEXTS_CURRENT);
} else if ($parentcontext->contextlevel == CONTEXT_MODULE or $parentcontext->contextlevel == CONTEXT_USER) {
// module context doesn't have child contexts, so display in current context only
$mform->addElement('hidden', 'bui_contexts', BUI_CONTEXTS_CURRENT);
} else {
$parentcontextname = $parentcontext->get_context_name();
$contextoptions[BUI_CONTEXTS_CURRENT] = get_string('showoncontextonly', 'block', $parentcontextname);
@@ -181,8 +169,6 @@ class block_edit_form extends moodleform {
} else {
$values = array_keys($pagetypelist);
$value = array_pop($values);
$mform->addElement('hidden', 'bui_pagetypepattern', $value);
$mform->setType('bui_pagetypepattern', PARAM_RAW);
// Now we are really hiding a lot (both page-contexts and page-type-patterns),
// specially in some systemcontext pages having only one option (my/user...)
// so, until it's decided if we are going to add the 'bring-back' pattern to
@@ -191,7 +177,7 @@ class block_edit_form extends moodleform {
// TODO: Revisit this once MDL-30574 has been decided and implemented, although
// perhaps it's not bad to always show this statically when only one pattern is
// available.
if (!$editingatfrontpage) {
if (!$this->is_editing_the_frontpage()) {
// Try to beautify it
$strvalue = $value;
$strkey = 'page-'.str_replace('*', 'x', $strvalue);
@@ -205,10 +191,7 @@ class block_edit_form extends moodleform {
}
if ($this->page->subpage) {
if ($parentcontext->contextlevel == CONTEXT_USER) {
$mform->addElement('hidden', 'bui_subpagepattern', '%@NULL@%');
$mform->setType('bui_subpagepattern', PARAM_RAW);
} else {
if ($parentcontext->contextlevel != CONTEXT_USER) {
$subpageoptions = array(
'%@NULL@%' => get_string('anypagematchingtheabove', 'block'),
$this->page->subpage => get_string('thisspecificpage', 'block', $this->page->subpage),
@@ -252,6 +235,19 @@ class block_edit_form extends moodleform {
$this->add_action_buttons();
}
/**
* Returns true if the user is editing a frontpage.
* @return bool
*/
public function is_editing_the_frontpage() {
// There are some conditions to check related to contexts.
$ctxconditions = $this->page->context->contextlevel == CONTEXT_COURSE &&
$this->page->context->instanceid == get_site()->id;
$issiteindex = (strpos($this->page->pagetype, 'site-index') === 0);
// So now we can be 100% sure if edition is happening at frontpage.
return ($ctxconditions && $issiteindex);
}
function set_data($defaults) {
// Prefix bui_ on all the core field names.
$blockfields = array('showinsubcontexts', 'pagetypepattern', 'subpagepattern', 'parentcontextid',
@@ -281,6 +277,13 @@ class block_edit_form extends moodleform {
$defaults->bui_contexts = $defaults->bui_showinsubcontexts;
}
// Some fields may not be editable, remember the values here so we can return them in get_data().
$this->defaults = [
'bui_parentcontextid' => $defaults->bui_parentcontextid,
'bui_contexts' => $defaults->bui_contexts,
'bui_pagetypepattern' => $defaults->bui_pagetypepattern,
'bui_subpagepattern' => $defaults->bui_subpagepattern,
];
parent::set_data($defaults);
}
@@ -291,4 +294,20 @@ class block_edit_form extends moodleform {
protected function specific_definition($mform) {
// By default, do nothing.
}
/**
* Return submitted data if properly submitted or returns NULL if validation fails or
* if there is no submitted data.
*
* @return object submitted data; NULL if not valid or not submitted or cancelled
*/
public function get_data() {
if ($data = parent::get_data()) {
// Blocklib expects 'bui_editingatfrontpage' property to be returned from this form.
$data->bui_editingatfrontpage = $this->is_editing_the_frontpage();
// Some fields are non-editable and we need to populate them with the values from set_data().
return (object)((array)$data + $this->defaults);
}
return $data;
}
}
@@ -1,4 +1,4 @@
@block @block_private_files @file_upload @javascript
@block @block_private_files @_file_upload @javascript
Feature: The private files block allows users to store files privately in moodle
In order to store a private file in moodle
As a teacher
@@ -1,4 +1,4 @@
@block @block_private_files @file_upload @javascript
@block @block_private_files @_file_upload @javascript
Feature: The private files block allows users to store files privately in moodle
In order to store a private file in moodle
As a teacher
+15
View File
@@ -24,6 +24,7 @@
*/
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
@@ -56,6 +57,20 @@ class behat_blocks extends behat_base {
}
}
/**
* Adds the selected block if it is not already present. Editing mode must be previously enabled.
*
* @Given /^I add the "(?P<block_name_string>(?:[^"]|\\")*)" block if not present$/
* @param string $blockname
*/
public function i_add_the_block_if_not_present($blockname) {
try {
$this->get_text_selector_node('block', $blockname);
} catch (ElementNotFoundException $e) {
$this->execute('behat_blocks::i_add_the_block', [$blockname]);
}
}
/**
* Docks a block. Editing mode should be previously enabled.
*
+5 -5
View File
@@ -52,11 +52,11 @@ $action = (empty($id)) ? 'add' : 'edit';
$external = new stdClass();
// Check that this id exists.
if (!empty($id) && !$DB->record_exists('blog_external', array('id' => $id))) {
print_error('wrongexternalid', 'blog');
} else if (!empty($id)) {
$external = $DB->get_record('blog_external', array('id' => $id));
// Retrieve the external blog record.
if (!empty($id)) {
if (!$external = $DB->get_record('blog_external', array('id' => $id, 'userid' => $USER->id))) {
print_error('wrongexternalid', 'blog');
}
$external->autotags = core_tag_tag::get_item_tags_array('core', 'blog_external', $id);
}
+1 -1
View File
@@ -872,7 +872,7 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
}
// Append Search info.
if (!empty($search)) {
if (!empty($search) && has_capability('moodle/blog:search', $sitecontext)) {
$headers['filters']['search'] = $search;
$blogurl->param('search', $search);
$PAGE->navbar->add(get_string('searchterm', 'blog', $search), $blogurl->out());
+1 -1
View File
@@ -213,7 +213,7 @@ class cache implements cache_loader {
$this->definition = $definition;
$this->store = $store;
$this->storetype = get_class($store);
$this->perfdebug = !empty($CFG->perfdebug);
$this->perfdebug = (!empty($CFG->perfdebug) and $CFG->perfdebug > 7);
if ($loader instanceof cache_loader) {
$this->loader = $loader;
// Mark the loader as a sub (chained) loader.
+54 -2
View File
@@ -229,8 +229,60 @@ class cachestore_memcached extends cache_store implements cache_is_configurable
$version = phpversion('memcached');
$this->candeletemulti = ($version && version_compare($version, self::REQUIRED_VERSION, '>='));
// Test the connection to the main connection.
$this->isready = @$this->connection->set("ping", 'ping', 1);
$this->isready = $this->is_connection_ready();
}
/**
* Confirm whether the connection is ready and usable.
*
* @return boolean
*/
public function is_connection_ready() {
if (!@$this->connection->set("ping", 'ping', 1)) {
// Test the connection to the server.
return false;
}
if ($this->isshared) {
// There is a bug in libmemcached which means that it is not possible to purge the cache in a shared cache
// configuration.
// This issue currently affects:
// - memcached 1.4.23+ with php-memcached <= 2.2.0
// The following combinations are not affected:
// - memcached <= 1.4.22 with any version of php-memcached
// - any version of memcached with php-memcached >= 3.0.1
// This check is cheapest as it does not involve connecting to the server at all.
$safecombination = false;
$extension = new ReflectionExtension('memcached');
if ((version_compare($extension->getVersion(), '3.0.1') >= 0)) {
// This is php-memcached version >= 3.0.1 which is a safe combination.
$safecombination = true;
}
if (!$safecombination) {
$allsafe = true;
foreach ($this->connection->getVersion() as $version) {
$allsafe = $allsafe && (version_compare($version, '1.4.22') <= 0);
}
// All memcached servers connected are version <= 1.4.22 which is a safe combination.
$safecombination = $allsafe;
}
if (!$safecombination) {
// This is memcached 1.4.23+ and php-memcached < 3.0.1.
// The issue may have been resolved in a subsequent update to any of the three libraries.
// The only way to safely determine if the combination is safe is to call getAllKeys.
// A safe combination will return an array, whilst an affected combination will return false.
// This is the most expensive check.
if (!is_array($this->connection->getAllKeys())) {
return false;
}
}
}
return true;
}
/**
+4
View File
@@ -286,6 +286,10 @@ class cachestore_memcached_test extends cachestore_tests {
$definition = cache_definition::load_adhoc(cache_store::MODE_APPLICATION, 'cachestore_memcached', 'phpunit_test');
$cachestore = $this->create_test_cache_with_config($definition, array('isshared' => true));
if (!$cachestore->is_connection_ready()) {
$this->markTestSkipped('Could not test cachestore_memcached. Connection is not ready.');
}
$connection = new Memcached(crc32(__METHOD__));
$connection->addServers($this->get_servers(TEST_CACHESTORE_MEMCACHED_TESTSERVERS));
$connection->setOptions(array(
+64 -5
View File
@@ -1784,6 +1784,12 @@ class core_cache_testcase extends advanced_testcase {
$this->assertArrayHasKey('cache_is_searchable', $cache->phpunit_get_store_implements());
}
/**
* Test static acceleration
*
* Note: All the assertGreaterThanOrEqual() in this test should be assertGreaterThan() be because of some microtime()
* resolution problems under some OSs / PHP versions, we are accepting equal as valid outcome. For more info see MDL-57147.
*/
public function test_static_acceleration() {
$instance = cache_config_testing::instance();
$instance->phpunit_add_definition('phpunit/accelerated', array(
@@ -1890,7 +1896,7 @@ class core_cache_testcase extends advanced_testcase {
$this->assertTrue($cache->set('b', $cacheableobject2));
$staticaccelerationreturntime = $cache->phpunit_static_acceleration_get('a')->propertytime;
$staticaccelerationreturntimeb = $cache->phpunit_static_acceleration_get('b')->propertytime;
$this->assertGreaterThan($startmicrotime, $staticaccelerationreturntime, 'Restore time of static must be newer.');
$this->assertGreaterThanOrEqual($startmicrotime, $staticaccelerationreturntime, 'Restore time of static must be newer.');
// Reset the static cache without resetting backing store.
$cache->phpunit_static_acceleration_purge();
@@ -1898,12 +1904,12 @@ class core_cache_testcase extends advanced_testcase {
// Get the value from the backend store, populating the static cache.
$cachevalue = $cache->get('a');
$this->assertInstanceOf('cache_phpunit_dummy_object', $cachevalue);
$this->assertGreaterThan($staticaccelerationreturntime, $cachevalue->propertytime);
$this->assertGreaterThanOrEqual($staticaccelerationreturntime, $cachevalue->propertytime);
$backingstorereturntime = $cachevalue->propertytime;
$results = $cache->get_many(array('b'));
$this->assertInstanceOf('cache_phpunit_dummy_object', $results['b']);
$this->assertGreaterThan($staticaccelerationreturntimeb, $results['b']->propertytime);
$this->assertGreaterThanOrEqual($staticaccelerationreturntimeb, $results['b']->propertytime);
$backingstorereturntimeb = $results['b']->propertytime;
// Obtain the value again and confirm that static cache is using wake_from_cache.
@@ -1911,11 +1917,11 @@ class core_cache_testcase extends advanced_testcase {
// value is stored serialized in the static acceleration cache.
$cachevalue = $cache->phpunit_static_acceleration_get('a');
$this->assertInstanceOf('cache_phpunit_dummy_object', $cachevalue);
$this->assertGreaterThan($backingstorereturntime, $cachevalue->propertytime);
$this->assertGreaterThanOrEqual($backingstorereturntime, $cachevalue->propertytime);
$results = $cache->get_many(array('b'));
$this->assertInstanceOf('cache_phpunit_dummy_object', $results['b']);
$this->assertGreaterThan($backingstorereturntimeb, $results['b']->propertytime);
$this->assertGreaterThanOrEqual($backingstorereturntimeb, $results['b']->propertytime);
/** @var cache_phpunit_application $cache */
$cache = cache::make('phpunit', 'accelerated2');
@@ -2164,4 +2170,57 @@ class core_cache_testcase extends advanced_testcase {
$this->assertEquals(0, $endstats[$requestid]['stores']['cachestore_static']['sets'] -
$startstats[$requestid]['stores']['cachestore_static']['sets']);
}
public function test_performance_debug_off() {
global $CFG;
$this->resetAfterTest(true);
$CFG->perfdebug = 7;
$instance = cache_config_testing::instance();
$applicationid = 'phpunit/applicationperfoff';
$instance->phpunit_add_definition($applicationid, array(
'mode' => cache_store::MODE_APPLICATION,
'component' => 'phpunit',
'area' => 'applicationperfoff'
));
$sessionid = 'phpunit/sessionperfoff';
$instance->phpunit_add_definition($sessionid, array(
'mode' => cache_store::MODE_SESSION,
'component' => 'phpunit',
'area' => 'sessionperfoff'
));
$requestid = 'phpunit/requestperfoff';
$instance->phpunit_add_definition($requestid, array(
'mode' => cache_store::MODE_REQUEST,
'component' => 'phpunit',
'area' => 'requestperfoff'
));
$application = cache::make('phpunit', 'applicationperfoff');
$session = cache::make('phpunit', 'sessionperfoff');
$request = cache::make('phpunit', 'requestperfoff');
// Check that no stats are recorded for these definitions yet.
$stats = cache_helper::get_stats();
$this->assertArrayNotHasKey($applicationid, $stats);
$this->assertArrayNotHasKey($sessionid, $stats);
$this->assertArrayNotHasKey($requestid, $stats);
// Trigger cache misses, cache sets and cache hits.
$this->assertFalse($application->get('missMe'));
$this->assertTrue($application->set('setMe', 1));
$this->assertEquals(1, $application->get('setMe'));
$this->assertFalse($session->get('missMe'));
$this->assertTrue($session->set('setMe', 3));
$this->assertEquals(3, $session->get('setMe'));
$this->assertFalse($request->get('missMe'));
$this->assertTrue($request->set('setMe', 4));
$this->assertEquals(4, $request->get('setMe'));
// Check that no stats are being recorded for these definitions.
$endstats = cache_helper::get_stats();
$this->assertArrayNotHasKey($applicationid, $endstats);
$this->assertArrayNotHasKey($sessionid, $endstats);
$this->assertArrayNotHasKey($requestid, $endstats);
}
}
File diff suppressed because it is too large Load Diff
+4 -3
View File
@@ -58,9 +58,11 @@ if (!$course) {
$PAGE->set_context(context_system::instance()); //TODO: wrong
}
$title = get_string('deleteevent', 'calendar');
// Check the user has the required capabilities to edit an event
if (!calendar_edit_event_allowed($event)) {
print_error('nopermissions');
if (!calendar_edit_event_allowed($event) || !empty($event->modulename)) {
print_error('nopermissions', 'error', $PAGE->url, $title);
}
// Count the repeats, do we need to consider the possibility of deleting repeats
@@ -88,7 +90,6 @@ if ($confirm) {
}
// Prepare the page to show the confirmation form
$title = get_string('deleteevent', 'calendar');
$strcalendar = get_string('calendar', 'calendar');
$PAGE->navbar->add($strcalendar, $viewcalendarurl);
+3 -2
View File
@@ -81,8 +81,9 @@ class core_calendar_external extends external_api {
$eventobj = calendar_event::load($event['eventid']);
// Let's check if the user is allowed to delete an event.
if (!calendar_edit_event_allowed($eventobj)) {
throw new moodle_exception("nopermissions");
if (!empty($eventobj->modulename) || !calendar_edit_event_allowed($eventobj)) {
throw new moodle_exception("nopermissions", 'error', '',
get_string('deleteevent', 'calendar'));
}
// Time to do the magic.
$eventobj->delete($event['repeat']);
+5 -4
View File
@@ -411,7 +411,7 @@ function calendar_get_mini($courses, $groups, $users, $calmonth = false, $calyea
$name = format_string($event->name, true);
}
}
$popupcontent .= html_writer::link($dayhref, $name);
$popupcontent .= html_writer::link($dayhref, clean_text($name));
$popupcontent .= html_writer::end_tag('div');
}
@@ -1741,10 +1741,11 @@ function calendar_format_event_time($event, $now, $linkparams = null, $usecommon
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $endtime);
$eventtime = $timestart . ' <strong>&raquo;</strong> ' . html_writer::link($url, $dayend) . $timeend;
} else {
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $endtime);
// The event is in the future, print start and end links.
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $starttime);
$eventtime = html_writer::link($url, $daystart) . $timestart . ' <strong>&raquo;</strong> ';
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $starttime);
$url = calendar_get_link_href(new moodle_url(CALENDAR_URL . 'view.php', $linkparams), 0, 0, 0, $endtime);
$eventtime .= html_writer::link($url, $dayend) . $timeend;
}
}
@@ -3052,7 +3053,7 @@ function calendar_add_icalendar_event($event, $courseid, $subscriptionid, $timez
$eventrecord->courseid = $sub->courseid;
$eventrecord->eventtype = $sub->eventtype;
if ($updaterecord = $DB->get_record('event', array('uuid' => $eventrecord->uuid))) {
if ($updaterecord = $DB->get_record('event', array('uuid' => $eventrecord->uuid, 'subscriptionid' => $eventrecord->subscriptionid))) {
$eventrecord->id = $updaterecord->id;
$return = CALENDAR_IMPORT_EVENT_UPDATED; // Update.
} else {
+23
View File
@@ -506,4 +506,27 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
$this->assertEquals(1, count($eventsret['events']));
$this->assertEquals(2, count($eventsret['warnings']));
}
/**
* Test for deleting module events.
*/
public function test_delete_calendar_events_for_modules() {
$this->resetAfterTest();
$this->setAdminUser();
$course = $this->getDataGenerator()->create_course();
$nexttime = time() + DAYSECS;
$this->getDataGenerator()->create_module('assign', ['course' => $course->id, 'duedate' => $nexttime]);
$events = calendar_get_events(time(), $nexttime, true, true, true);
$this->assertCount(1, $events);
$params = [];
foreach($events as $event) {
$params[] = [
'eventid' => $event->id,
'repeat' => false
];
}
$this->setExpectedException('moodle_exception');
core_calendar_external::delete_calendar_events($params);
}
}
File diff suppressed because it is too large Load Diff
-535
View File
@@ -1,535 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines test class to test manage rrule during ical imports.
*
* @package core_calendar
* @category test
* @copyright 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_calendar_rrule_manager_testcase extends advanced_testcase {
/** @var stdClass a dummy event */
protected $event;
/**
* Set up method.
*/
protected function setUp() {
global $DB, $CFG;
$this->resetAfterTest();
$this->setTimezone('Australia/Perth');
$user = $this->getDataGenerator()->create_user();
$sub = new stdClass();
$sub->url = '';
$sub->courseid = 0;
$sub->groupid = 0;
$sub->userid = $user->id;
$sub->pollinterval = 0;
$subid = $DB->insert_record('event_subscriptions', $sub, true);
$event = new stdClass();
$event->name = 'Event name';
$event->description = '';
$event->timestart = 1385913700; // A 2013-12-2 Monday event.
$event->timeduration = 3600;
$event->uuid = 'uuid';
$event->subscriptionid = $subid;
$event->userid = $user->id;
$event->groupid = 0;
$event->courseid = 0;
$event->eventtype = 'user';
$eventobj = calendar_event::create($event, false);
$DB->set_field('event', 'repeatid', $eventobj->id, array('id' => $eventobj->id));
$eventobj->repeatid = $eventobj->id;
$this->event = $eventobj;
}
/**
* Test parse_rrule() method.
*/
public function test_parse_rrule() {
$rrule = "FREQ=DAILY;COUNT=3;INTERVAL=4;BYSECOND=20,40;BYMINUTE=2,30;BYHOUR=3,4;BYDAY=MO,TH;BYMONTHDAY=20,
30;BYYEARDAY=300,-20;BYWEEKNO=22,33;BYMONTH=3,4";
$mang = new core_tests_calendar_rrule_manager($rrule);
$mang->parse_rrule();
$this->assertEquals(\core_calendar\rrule_manager::FREQ_DAILY, $mang->freq);
$this->assertEquals(3, $mang->count);
$this->assertEquals(4, $mang->interval);
$this->assertEquals(array(20, 40), $mang->bysecond);
$this->assertEquals(array(2, 30), $mang->byminute);
$this->assertEquals(array(3, 4), $mang->byhour);
$this->assertEquals(array('MO', 'TH'), $mang->byday);
$this->assertEquals(array(20, 30), $mang->bymonthday);
$this->assertEquals(array(300, -20), $mang->byyearday);
$this->assertEquals(array(22, 33), $mang->byweekno);
$this->assertEquals(array(3, 4), $mang->bymonth);
}
/**
* Test exception is thrown for invalid property.
*/
public function test_parse_rrule_validation() {
$rrule = "RANDOM=PROPERTY;";
$this->setExpectedException('moodle_exception');
$mang = new core_tests_calendar_rrule_manager($rrule);
$mang->parse_rrule();
}
/**
* Test exception is thrown for invalid frequency.
*/
public function test_freq_validation() {
$rrule = "FREQ=RANDOMLY;";
$this->setExpectedException('moodle_exception');
$mang = new core_tests_calendar_rrule_manager($rrule);
$mang->parse_rrule();
}
/**
* Test recurrence rules for daily frequency.
*/
public function test_daily_events() {
global $DB;
$rrule = 'FREQ=DAILY;COUNT=3'; // This should generate 2 child events + 1 parent.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(3, $count);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + DAYSECS)));
$this->assertTrue($result);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + 2 * DAYSECS)));
$this->assertTrue($result);
$until = $this->event->timestart + DAYSECS * 2;
$until = date('Y-m-d', $until);
$rrule = "FREQ=DAILY;UNTIL=$until"; // This should generate 1 child event + 1 parent,since by then until bound would be hit.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(2, $count);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + DAYSECS)));
$this->assertTrue($result);
$rrule = 'FREQ=DAILY;COUNT=3;INTERVAL=3'; // This should generate 2 child events + 1 parent, every 3rd day.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(3, $count);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + 3 * DAYSECS)));
$this->assertTrue($result);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + 6 * DAYSECS)));
$this->assertTrue($result);
// Forever event. This should generate events for time() + 10 year period, every 300th day.
$rrule = 'FREQ=DAILY;INTERVAL=300';
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++, $time = $this->event->timestart + 300 * DAYSECS * $i) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
}
}
/**
* Test recurrence rules for weekly frequency.
*/
public function test_weekly_events() {
global $DB;
$rrule = 'FREQ=WEEKLY;COUNT=1'; // This should generate 7 events in total, one for each day.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(7, $count);
for ($i = 0; $i < 7; $i++) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + $i * DAYSECS)));
$this->assertTrue($result);
}
// This should generate 4 child event + 1 parent, since by then until bound would be hit.
$until = $this->event->timestart + WEEKSECS * 4;
$until = date('YmdThis', $until);
$rrule = "FREQ=WEEKLY;BYDAY=MO;UNTIL=$until";
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(5, $count);
for ($i = 0; $i < 5; $i++) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + $i * WEEKSECS)));
$this->assertTrue($result);
}
// This should generate 4 events in total every monday and Wednesday of every 3rd week.
$rrule = 'FREQ=WEEKLY;INTERVAL=3;BYDAY=MO,WE;COUNT=2';
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(4, $count);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + 3 * WEEKSECS))); // Monday event.
$this->assertTrue($result);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + 2 * DAYSECS))); // Wednesday event.
$this->assertTrue($result);
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($this->event->timestart + 3 * WEEKSECS + 2 * DAYSECS))); // Wednesday event.
$this->assertTrue($result);
// Forever event. This should generate events over time() + 10 year period, every 50th monday.
$rrule = 'FREQ=WEEKLY;BYDAY=MO;INTERVAL=50';
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++, $time = $this->event->timestart + 50 * WEEKSECS * $i) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
}
}
/**
* Test recurrence rules for monthly frequency.
*/
public function test_monthly_events() {
global $DB;
$rrule = 'FREQ=MONTHLY;COUNT=3;BYMONTHDAY=2'; // This should generate 3 events in total.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(3, $count);
for ($i = 0; $i < 3; $i++) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => (strtotime("+$i month", $this->event->timestart))));
$this->assertTrue($result);
}
// This much seconds after the start of the day.
$offset = $this->event->timestart - mktime(0, 0, 0, date("n", $this->event->timestart), date("j", $this->event->timestart),
date("Y", $this->event->timestart));
$monthstart = mktime(0, 0, 0, date("n", $this->event->timestart), 1, date("Y", $this->event->timestart));
$rrule = 'FREQ=MONTHLY;COUNT=3;BYDAY=1MO'; // This should generate 3 events in total, first monday of the month.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(3, $count);
$time = strtotime('1 Monday', strtotime("+1 months", $monthstart)) + $offset;
$result = $DB->record_exists('event', array('repeatid' => $this->event->id, 'timestart' => $time));
$this->assertTrue($result);
$time = strtotime('1 Monday', strtotime("+2 months", $monthstart)) + $offset;
$result = $DB->record_exists('event', array('repeatid' => $this->event->id, 'timestart' => $time));
$this->assertTrue($result);
// This should generate 10 child event + 1 parent, since by then until bound would be hit.
$until = strtotime('+1 day +10 months', $this->event->timestart);
$until = date('YmdThis', $until);
$rrule = "FREQ=MONTHLY;BYMONTHDAY=2;UNTIL=$until";
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(11, $count);
for ($i = 0; $i < 11; $i++) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => (strtotime("+$i month", $this->event->timestart))));
$this->assertTrue($result);
}
// This should generate 10 child event + 1 parent, since by then until bound would be hit.
$until = strtotime('+1 day +10 months', $this->event->timestart);
$until = date('YmdThis', $until);
$rrule = "FREQ=MONTHLY;BYDAY=1MO;UNTIL=$until";
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(10, $count);
for ($i = 0; $i < 10; $i++) {
$time = strtotime('1 Monday', strtotime("+$i months", $monthstart)) + $offset;
$result = $DB->record_exists('event', array('repeatid' => $this->event->id, 'timestart' => $time));
$this->assertTrue($result);
}
// This should generate 11 child event + 1 parent, since by then until bound would be hit.
$until = strtotime('+10 day +10 months', $this->event->timestart); // 12 oct 2014.
$until = date('YmdThis', $until);
$rrule = "FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=2,5;UNTIL=$until";
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(12, $count);
for ($i = 0; $i < 6; $i++) {
$moffset = $i * 2;
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => (strtotime("+$moffset month", $this->event->timestart))));
$this->assertTrue($result);
// Event on the 5th of a month.
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => (strtotime("+3 days +$moffset month", $this->event->timestart))));
$this->assertTrue($result);
}
// This should generate 11 child event + 1 parent, since by then until bound would be hit.
$until = strtotime('+20 day +10 months', $this->event->timestart); // 22 oct 2014.
$until = date('YmdTHis', $until);
$rrule = "FREQ=MONTHLY;INTERVAL=2;BYDAY=1MO,3WE;UNTIL=$until";
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(12, $count);
for ($i = 0; $i < 6; $i++) {
$moffset = $i * 2;
$time = strtotime("+$moffset month", $monthstart);
$time2 = strtotime("+1 Monday", $time) + $offset;
$result = $DB->record_exists('event', array('repeatid' => $this->event->id, 'timestart' => $time2));
$this->assertTrue($result);
$time2 = strtotime("+3 Wednesday", $time) + $offset;
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => $time2)); // Event on the 5th of a month.
$this->assertTrue($result);
}
// Forever event. This should generate events over 10 year period, on 2nd of every 12th month.
$rrule = 'FREQ=MONTHLY;INTERVAL=12;BYMONTHDAY=2';
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++, $moffset = $i * 12,
$time = strtotime("+$moffset month", $this->event->timestart)) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
}
// Forever event. This should generate 10 child events + 1 parent over 10 year period, every 50th Monday.
$rrule = 'FREQ=MONTHLY;BYDAY=1MO;INTERVAL=12';
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(11, $count);
for ($i = 0, $moffset = 0, $time = $this->event->timestart; $time < $until; $i++, $moffset = $i * 12) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id, 'timestart' => ($time)));
$this->assertTrue($result);
$time = strtotime("+$moffset month", $monthstart);
$time = strtotime("+1 Monday", $time) + $offset;
}
}
/**
* Test recurrence rules for yearly frequency.
*/
public function test_yearly_events() {
global $DB;
$rrule = 'FREQ=YEARLY;COUNT=3;BYMONTH=12'; // This should generate 3 events in total.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(3, $count);
for ($i = 0, $time = $this->event->timestart; $i < 3; $i++, $time = strtotime("+$i years", $this->event->timestart)) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id, 'timestart' => $time));
$this->assertTrue($result);
}
// Create an event every december, until the time limit is hit.
$until = strtotime('+20 day +10 years', $this->event->timestart);
$until = date('YmdTHis', $until);
$rrule = "FREQ=YEARLY;BYMONTH=12;UNTIL=$until"; // Forever event.
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(11, $count);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++, $yoffset = $i * 2,
$time = strtotime("+$yoffset years", $this->event->timestart)) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
}
// This should generate 5 events in total, every second year in the month of december.
$rrule = 'FREQ=YEARLY;BYMONTH=12;INTERVAL=2;COUNT=5';
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(5, $count);
for ($i = 0, $time = $this->event->timestart; $i < 5; $i++, $yoffset = $i * 2,
$time = strtotime("+$yoffset years", $this->event->timestart)) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
}
$rrule = 'FREQ=YEARLY;BYMONTH=12;INTERVAL=2'; // Forever event.
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(6, $count);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++, $yoffset = $i * 2,
$time = strtotime("+$yoffset years", $this->event->timestart)) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
}
// This much seconds after the start of the day.
$offset = $this->event->timestart - mktime(0, 0, 0, date("n", $this->event->timestart), date("j", $this->event->timestart),
date("Y", $this->event->timestart));
$yearstart = mktime(0, 0, 0, 1, 1, date("Y", $this->event->timestart));
$rrule = 'FREQ=YEARLY;COUNT=3;BYMONTH=12;BYDAY=1MO'; // This should generate 3 events in total.
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(3, $count);
for ($i = 0; $i < 3; $i++) {
$time = strtotime("+11 months +$i years", $yearstart);
$time = strtotime("+1 Monday", $time) + $offset;
$result = $DB->record_exists('event', array('repeatid' => $this->event->id, 'timestart' => $time));
$this->assertTrue($result);
}
// Create an event every december, until the time limit is hit.
$until = strtotime('+20 day +10 years', $this->event->timestart);
$until = date('YmdTHis', $until);
$rrule = "FREQ=YEARLY;BYMONTH=12;UNTIL=$until;BYDAY=1MO";
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(11, $count);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
$time = strtotime("+11 months +$i years", $yearstart);
$time = strtotime("+1 Monday", $time) + $offset;
}
// This should generate 5 events in total, every second year in the month of december.
$rrule = 'FREQ=YEARLY;BYMONTH=12;INTERVAL=2;COUNT=5;BYDAY=1MO';
$mang = new \core_calendar\rrule_manager($rrule);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(5, $count);
for ($i = $yoffset = 0, $time = $this->event->timestart; $i < 5; $i++, $yoffset = $i * 2) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
$time = strtotime("+11 months +$yoffset years", $yearstart);
$time = strtotime("+1 Monday", $time) + $offset;
}
$rrule = 'FREQ=YEARLY;BYMONTH=12;INTERVAL=2;BYDAY=1MO'; // Forever event.
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(6, $count);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++, $yoffset = $i * 2) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
$time = strtotime("+11 months +$yoffset years", $yearstart);
$time = strtotime("+1 Monday", $time) + $offset;
}
$rrule = 'FREQ=YEARLY;INTERVAL=2'; // Forever event.
$mang = new \core_calendar\rrule_manager($rrule);
$until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
$mang->parse_rrule();
$mang->create_events($this->event);
$count = $DB->count_records('event', array('repeatid' => $this->event->id));
$this->assertEquals(6, $count);
for ($i = 0, $time = $this->event->timestart; $time < $until; $i++, $yoffset = $i * 2) {
$result = $DB->record_exists('event', array('repeatid' => $this->event->id,
'timestart' => ($time)));
$this->assertTrue($result);
$time = strtotime("+11 months +$yoffset years", $yearstart);
$time = strtotime("+1 Monday", $time) + $offset;
}
}
}
/**
* Class core_calendar_test_rrule_manager
*
* Wrapper to access protected vars for testing.
*
* @package core_calendar
* @category test
* @copyright 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_tests_calendar_rrule_manager extends \core_calendar\rrule_manager{
/**
* Magic method to get properties.
*
* @param $prop string property
*
* @return mixed
* @throws coding_exception
*/
public function __get($prop) {
if (property_exists($this, $prop)) {
return $this->$prop;
}
throw new coding_exception('invalidproperty');
}
}
+38 -13
View File
@@ -57,6 +57,12 @@ M.core_comment = {
this.view(0);
return false;
}, this);
// Also handle space/enter key.
handle.on('key', function(e) {
e.preventDefault();
this.view(0);
return false;
}, '13,32', this);
}
scope.toggle_textarea(false);
},
@@ -186,7 +192,17 @@ M.core_comment = {
val = val.replace('___name___', list[i].fullname);
}
if (list[i]['delete']||newcmt) {
list[i].content = '<div class="comment-delete"><a href="#" id ="comment-delete-'+this.client_id+'-'+list[i].id+'" title="'+M.util.get_string('deletecomment', 'moodle')+'"><img alt="" src="'+M.util.image_url('t/delete', 'core')+'" /></a></div>' + list[i].content;
var tokens = {
user: list[i].fullname,
time: list[i].time
};
var deleteStr = Y.Escape.html(M.util.get_string('deletecommentbyon', 'moodle', tokens));
list[i].content = '<div class="comment-delete">' +
'<a href="#" role="button" id ="comment-delete-' + this.client_id + '-' + list[i].id + '"' +
' title="' + deleteStr + '">' +
'<img alt="' + deleteStr + '" src="' + M.util.image_url('t/delete', 'core') + '" />' +
'</a>' +
'</div>' + list[i].content;
}
val = val.replace('___time___', list[i].time);
val = val.replace('___picture___', list[i].avatar);
@@ -335,6 +351,7 @@ M.core_comment = {
);
},
view: function(page) {
var commenttoggler = Y.one('#comment-link-' + this.client_id);
var container = Y.one('#comment-ctrl-'+this.client_id);
var ta = Y.one('#dlg-content-'+this.client_id);
var img = Y.one('#comment-img-'+this.client_id);
@@ -351,6 +368,9 @@ M.core_comment = {
if (img) {
img.set('src', M.util.image_url('t/expanded', 'core'));
}
if (commenttoggler) {
commenttoggler.setAttribute('aria-expanded', 'true');
}
} else {
// hide
container.setStyle('display', 'none');
@@ -364,6 +384,9 @@ M.core_comment = {
if (ta) {
ta.set('value','');
}
if (commenttoggler) {
commenttoggler.setAttribute('aria-expanded', 'false');
}
}
if (ta) {
//toggle_textarea.apply(ta, [false]);
@@ -410,19 +433,21 @@ M.core_comment = {
},
init_admin: function(Y) {
var select_all = Y.one('#comment_select_all');
select_all.on('click', function(e) {
var comments = document.getElementsByName('comments');
var checked = false;
for (var i in comments) {
if (comments[i].checked) {
checked=true;
if (select_all) {
select_all.on('click', function(e) {
var comments = document.getElementsByName('comments');
var checked = false;
for (var i in comments) {
if (comments[i].checked) {
checked=true;
}
}
}
for (i in comments) {
comments[i].checked = !checked;
}
this.set('checked', !checked);
});
for (i in comments) {
comments[i].checked = !checked;
}
this.set('checked', !checked);
});
}
var comments_delete = Y.one('#comments_delete');
if (comments_delete) {
+8 -2
View File
@@ -263,7 +263,7 @@ class comment {
'comments',
'commentscount',
'commentsrequirelogin',
'deletecomment',
'deletecommentbyon',
),
'moodle'
);
@@ -460,7 +460,13 @@ class comment {
} else {
$collapsedimage= 't/collapsed';
}
$html .= html_writer::start_tag('a', array('class' => 'comment-link', 'id' => 'comment-link-'.$this->cid, 'href' => '#'));
$html .= html_writer::start_tag('a', array(
'class' => 'comment-link',
'id' => 'comment-link-'.$this->cid,
'href' => '#',
'role' => 'button',
'aria-expanded' => 'false')
);
$html .= html_writer::empty_tag('img', array('id' => 'comment-img-'.$this->cid, 'src' => $OUTPUT->pix_url($collapsedimage), 'alt' => $this->linktext, 'title' => $this->linktext));
$html .= html_writer::tag('span', $this->linktext.' '.$countstring, array('id' => 'comment-link-text-'.$this->cid));
$html .= html_writer::end_tag('a');
+3 -2
View File
@@ -68,7 +68,7 @@ class competency extends persistent {
),
'description' => array(
'default' => '',
'type' => PARAM_RAW
'type' => PARAM_CLEANHTML
),
'descriptionformat' => array(
'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
@@ -676,7 +676,8 @@ class competency extends persistent {
public static function share_same_framework(array $ids) {
global $DB;
list($insql, $params) = $DB->get_in_or_equal($ids);
return $DB->count_records_select(self::TABLE, "id $insql", $params, "COUNT(DISTINCT(competencyframeworkid))") == 1;
$sql = "SELECT COUNT('x') FROM (SELECT DISTINCT(competencyframeworkid) FROM {" . self::TABLE . "} WHERE id {$insql}) f";
return $DB->count_records_sql($sql, $params) == 1;
}
/**
+1 -1
View File
@@ -90,7 +90,7 @@ class competency_framework extends persistent {
'type' => PARAM_RAW
),
'description' => array(
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
'default' => ''
),
'descriptionformat' => array(
+4 -3
View File
@@ -158,7 +158,7 @@ abstract class exporter {
} else if ($definition['type'] === PARAM_TEXT) {
if (!empty($definition['multiple'])) {
foreach ($data->$property as $key => $value) {
$data->$property[$key] = external_format_string($value, $context->id);
$data->{$property}[$key] = external_format_string($value, $context->id);
}
} else {
$data->$property = external_format_string($data->$property, $context->id);
@@ -334,7 +334,8 @@ abstract class exporter {
*/
final protected static function get_format_field($definitions, $property) {
$formatproperty = $property . 'format';
if ($definitions[$property]['type'] == PARAM_RAW && isset($definitions[$formatproperty])
if (($definitions[$property]['type'] == PARAM_RAW || $definitions[$property]['type'] == PARAM_CLEANHTML)
&& isset($definitions[$formatproperty])
&& $definitions[$formatproperty]['type'] == PARAM_INT) {
return $formatproperty;
}
@@ -451,7 +452,7 @@ abstract class exporter {
// This is a nested array of more properties.
$thisvalue = self::get_read_structure_from_properties($type, $proprequired, $propdefault);
} else {
if ($definition['type'] == PARAM_TEXT) {
if ($definition['type'] == PARAM_TEXT || $definition['type'] == PARAM_CLEANHTML) {
// PARAM_TEXT always becomes PARAM_RAW because filters may be applied.
$type = PARAM_RAW;
}
+6 -1
View File
@@ -248,7 +248,8 @@ abstract class persistent {
$formatted = array();
foreach ($properties as $property => $definition) {
$propertyformat = $property . 'format';
if ($definition['type'] == PARAM_RAW && array_key_exists($propertyformat, $properties)
if (($definition['type'] == PARAM_RAW || $definition['type'] == PARAM_CLEANHTML)
&& array_key_exists($propertyformat, $properties)
&& $properties[$propertyformat]['type'] == PARAM_INT) {
$formatted[$property] = $propertyformat;
}
@@ -616,6 +617,10 @@ abstract class persistent {
// Validate_param() does not like false with PARAM_BOOL, better to convert it to int.
$value = 0;
}
if ($definition['type'] === PARAM_CLEANHTML) {
// We silently clean for this type. It may introduce changes even to valid data.
$value = clean_param($value, PARAM_CLEANHTML);
}
validate_param($value, $definition['type'], $definition['null']);
} catch (invalid_parameter_exception $e) {
$errors[$property] = static::get_property_error_message($property);
+1 -1
View File
@@ -71,7 +71,7 @@ class plan extends persistent {
'type' => PARAM_TEXT,
),
'description' => array(
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
'default' => ''
),
'descriptionformat' => array(
+1 -1
View File
@@ -53,7 +53,7 @@ class template extends persistent {
),
'description' => array(
'default' => '',
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
),
'descriptionformat' => array(
'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
+1 -1
View File
@@ -53,7 +53,7 @@ class user_evidence extends persistent {
'type' => PARAM_TEXT
),
'description' => array(
'type' => PARAM_RAW,
'type' => PARAM_CLEANHTML,
'default' => '',
),
'descriptionformat' => array(
+1
View File
@@ -288,6 +288,7 @@ function core_competency_pluginfile($course, $cm, $context, $filearea, $args, $f
if ($filearea == 'userevidence' && $context->contextlevel == CONTEXT_USER) {
if (user_evidence::can_read_user($context->instanceid)) {
$file = $fs->get_file($context->id, 'core_competency', $filearea, $itemid, $filepath, $filename);
$forcedownload = true;
}
}
+5 -2
View File
@@ -107,6 +107,9 @@ class core_competency_exporter_testcase extends advanced_testcase {
$output = $PAGE->get_renderer('tool_lp');
$result = $exporter->export($output);
$this->assertSame('Another string', $result->otherstring);
$this->assertSame(array('String a', 'String b'), $result->otherstrings);
}
}
@@ -126,8 +129,8 @@ class core_competency_testable_exporter extends \core_competency\external\export
protected function get_other_values(renderer_base $output) {
return array(
'otherstring' => 'An other string',
'otherstrings' => array('String a', 'String b')
'otherstring' => 'Another <strong>string</strong>',
'otherstrings' => array('String a', 'String <strong>b</strong>')
);
}
@@ -213,4 +213,18 @@ class completion_criteria_date extends completion_criteria {
public function get_icon($alt, array $attributes = null) {
return new pix_icon('i/calendar', $alt, 'moodle', $attributes);
}
/**
* Shift the date when resetting course.
*
* @param int $courseid the course id
* @param int $timeshift number of seconds to shift date
* @return boolean was the operation successful?
*/
public static function update_date($courseid, $timeshift) {
if ($criteria = self::fetch(array('course' => $courseid))) {
$criteria->timeend = $criteria->timeend + $timeshift;
$criteria->update();
}
}
}
+4 -2
View File
@@ -121,12 +121,13 @@ class behat_completion extends behat_base {
public function activity_marked_as_complete($activityname, $activitytype, $completiontype) {
if ($completiontype == "manual") {
$imgalttext = get_string("completion-alt-manual-y", 'core_completion', $activityname);
$xpathtocheck = "//input[@type='image'][contains(@alt, '$imgalttext')]";
} else {
$imgalttext = get_string("completion-alt-auto-y", 'core_completion', $activityname);
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
}
$csselementforactivitytype = "li.modtype_".strtolower($activitytype);
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
$this->execute("behat_general::should_exist_in_the",
array($xpathtocheck, "xpath_element", $csselementforactivitytype, "css_element")
);
@@ -141,12 +142,13 @@ class behat_completion extends behat_base {
public function activity_marked_as_not_complete($activityname, $activitytype, $completiontype) {
if ($completiontype == "manual") {
$imgalttext = get_string("completion-alt-manual-n", 'core_completion', $activityname);
$xpathtocheck = "//input[@type='image'][contains(@alt, '$imgalttext')]";
} else {
$imgalttext = get_string("completion-alt-auto-n", 'core_completion', $activityname);
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
}
$csselementforactivitytype = "li.modtype_".strtolower($activitytype);
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
$this->execute("behat_general::should_exist_in_the",
array($xpathtocheck, "xpath_element", $csselementforactivitytype, "css_element")
);
@@ -25,15 +25,16 @@ Feature: Allow students to manually mark an activity as complete
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
When I add a "Forum" to section "1" and I fill the form with:
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
Then "Student First" user has not completed "Test forum name" activity
And "Student First" user has not completed "Test forum name" activity
And I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I press "Mark as complete: Test forum name"
When I press "Mark as complete: Test forum name"
Then the "Test forum name" "forum" activity with "manual" completion should be marked as complete
And I log out
And I log in as "teacher1"
And I am on site homepage
+5 -3
View File
@@ -1,7 +1,9 @@
{
"require-dev": {
"phpunit/phpunit": "4.8.*",
"phpunit/dbUnit": "1.4.*",
"moodlehq/behat-extension": "3.31.4"
"phpunit/phpunit": "4.8.27",
"phpunit/dbUnit": "1.4.1",
"sebastian/environment": "1.3.7",
"sebastian/recursion-context": "1.0.2",
"moodlehq/behat-extension": "3.31.7"
}
}
Generated
+322 -197
View File
File diff suppressed because it is too large Load Diff

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