Compare commits

...

843 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 896ce9b4e6 Moodle release 3.2.3 2017-05-07 21:32:59 +02:00
AMOS bot c41605e282 Automatically generated installer lang files 2017-05-08 00:06:07 +08:00
AMOS bot 70ae23829f Automatically generated installer lang files 2017-05-07 00:05:59 +08:00
Eloy Lafuente (stronk7) f29a819640 weekly release 3.2.2+ 2017-05-05 17:26:59 +02:00
Andrew Nicols c89d29f8e0 Merge branch 'wip-MDL-50670-32-fix' of https://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-05-05 15:08:55 +08:00
Marina Glancy dc5cbf1532 MDL-50670 course: apply defaults when format was switched 2017-05-05 14:51:15 +08:00
Jun Pataleta 08c1b6eff4 Merge branch 'MDL-58807_32-activities-result-title-multilang' of https://github.com/lucaboesch/moodle into MOODLE_32_STABLE 2017-05-05 12:09:44 +08:00
Andrew Nicols 02660c64ff 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:11 +08:00
Andrew Nicols 787573a007 Merge branch 'MDL-55371-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-05-05 10:07:52 +08:00
Eloy Lafuente (stronk7) 6585f80f29 MDL-58772 behat: change step to 3.2 and up alternative 2017-05-05 08:26:56 +08:00
Dan Poltawski 7bcc28ac2f Merge branch 'MDL-58709-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-05-04 15:15:05 +01:00
Luca Bösch cc22e91f8f MDL-58807 block_activity_results: Use multilang in block title
The title passes format_string now.
2017-05-04 11:29:00 +02:00
Juan Leyva 3b2ea17ec4 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:23 +02:00
Jun Pataleta ce37064429 Merge branch 'MDL-58749-32-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-05-04 14:50:18 +08:00
Andrew Nicols 6aa0203deb MDL-56675 cachestore_memcached: Check all connected servers for support 2017-05-04 13:36:35 +08:00
Andrew Nicols d6d9c4a9c3 Merge branch 'MDL-58707-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-05-04 11:45:03 +08:00
Andrew Nicols 993a1ac38f Merge branch 'MDL-58431-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-05-04 11:02:59 +08:00
David Monllao e76a83ebf9 Merge branch 'MDL-56675-32' of git://github.com/andrewnicols/moodle into MOODLE_32_STABLE 2017-05-04 10:56:46 +08:00
Andrew Nicols e6d2eb3792 Merge branch 'MDL-58514-32' of git://github.com/cameron1729/moodle into MOODLE_32_STABLE 2017-05-04 08:54:43 +08:00
Helen Foster 0f11ec17ca MDL-58749 lang: Merge English strings from the en_fix language pack
Significant string changes:

* errorinvalidbyhour,core_calendar - correcting number from 59 to 23
* cron_help,core_admin - updated recommendation to run cron
  every minute
2017-05-03 22:07:22 +02:00
Eloy Lafuente (stronk7) c09577b5f3 Merge branch 'MDL-58754-32' of git://github.com/andrewnicols/moodle into MOODLE_32_STABLE 2017-05-03 20:53:44 +02:00
Eloy Lafuente (stronk7) 68124fe0af Merge branch 'MDL-58788-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2017-05-03 18:45:57 +02:00
Dan Poltawski 5611053587 MDL-58788 behat: backport of course navigation with editing step 2017-05-03 17:31:23 +01:00
Dan Poltawski c493c6ba2a Merge branch 'MDL-58772_32' of git://github.com/aolley/moodle into MOODLE_32_STABLE 2017-05-03 16:50:32 +01:00
Dan Poltawski ce589fb4fe Merge branch 'MDL-35913-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-05-03 14:13:21 +01:00
Dan Poltawski d8564f56f0 Merge branch 'MDL-58434-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-05-03 14:03:10 +01:00
Dan Poltawski e17ee1e9c5 Merge branch 'MDL-50670_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2017-05-03 13:30:47 +01:00
Dan Poltawski 9ddd0bd72a 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:41 +01:00
Cameron Ball fba8a2e290 MDL-58514 mod_assign: Apply consistent logic for overrides
Previously the assign submission page was using "lenient" logic
for overrides when more than one group override applied to a user
(i.e., use the earliest "open" date and the latest "due" date)
when really it should be using the sortorder as per the assign
grading table.
2017-05-03 17:10:47 +08:00
Jake Dallimore 6f4f3946f6 Merge branch 'MDL-58650_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2017-05-03 15:58:34 +08:00
Marina Glancy b6098b92b0 MDL-58740 block_course_overview: check session key
Thanks to Kukas Schmidt for initial patch
2017-05-03 10:48:18 +08:00
Marina Glancy a42ebf3385 MDL-58670 blog: respect capability to search entries 2017-05-03 10:48:18 +08:00
Marina Glancy 6acdd1f3ab MDL-58635 blogs: check edited blog belongs to current user 2017-05-03 10:48:18 +08:00
Andrew Hancox 602b3815a0 MDL-58172 mod_choice: Make export choice respect id fields 2017-05-03 10:48:18 +08:00
David Monllao b06b50cf1a weekly release 3.2.2+ 2017-05-03 10:27:47 +08:00
David Monllao 9c2f96a13d Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-05-03 10:27:46 +08:00
Andrew Nicols 9214bc50a2 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:24:51 +08:00
Andrew Nicols 45e0bc6372 MDL-58746 core: Simplify environment check 2017-05-03 08:32:52 +08:00
Juan Leyva b1e73801d1 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:57:18 +02:00
AMOS bot 445308fc3b Automatically generated installer lang files 2017-05-03 00:05:56 +08:00
Marina Glancy 3179ca58b7 MDL-50670 course: correctly apply defaults for format options 2017-05-02 17:36:53 +08:00
Mark Nelson 86cbb2c450 MDL-58650 core_message: always use 'popup' processor for messages 2017-05-02 16:07:20 +08:00
Andrew Nicols 0c4220fba5 MDL-58754 competency: Change query for DISTINCT COUNT 2017-05-02 14:49:11 +08:00
Adam Olley 743ad4f126 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:49:53 +09:30
Andrew Nicols 4a5e209d8c Merge branch 'MDL-57704-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-05-02 10:39:26 +08:00
John Okely 6b50178e4e MDL-57704 ltiprovider: Don't force SSLv3 2017-05-02 09:34:01 +08:00
Marina Glancy db4031fa52 MDL-55468 mod_feedback: revive export analysis to excel 2017-05-01 14:33:49 +01:00
Jun Pataleta 9a68e396e8 Merge branch 'MDL-58632-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-05-01 14:28:13 +08:00
Andrew Nicols b5cc09d20b MDL-58746 core: Add environment check for finfo 2017-05-01 13:06:34 +08:00
Dan Poltawski 75528e9305 weekly release 3.2.2+ 2017-04-28 12:35:55 +01:00
Dan Poltawski 1082da020e Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-04-28 12:35:54 +01:00
Damyon Wiese 7d085745be MDL-54849 lesson: Fix backport
The backport branch was using undefined behat steps and functions.
2017-04-28 10:29:56 +08:00
Dan Poltawski d46c89d4e7 Merge branch 'wip-MDL-58689-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-27 18:35:29 +01:00
Juan Leyva 8817bcf7ba MDL-58709 registration: Fix incorrect setType 2017-04-27 16:58:20 +02:00
Dan Poltawski 00b7c8a2fd Merge branch 'MDL-58722-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-04-27 14:36:26 +01:00
David Monllao c1d089b1be Merge branch 'MDL-58628-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-04-27 17:09:41 +08:00
Damyon Wiese 3bbd2e7892 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:55:58 +08:00
Juan Leyva c35f42e679 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 08:52:19 +02:00
Jake Dallimore 070262c8f9 Merge branch 'MDL-58701-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-04-27 13:33:45 +08:00
Ankit Agarwal ac3022fb0e MDL-58701 phpunit: Add tests for external_settings 2017-04-27 09:40:31 +05:30
Ankit Agarwal eed84bfd4b MDL-58701 libraries: Use pluginfile.php as rewrite url for web req. 2017-04-27 09:40:30 +05:30
David Monllao 133c06b2e1 Merge branch 'MDL-58698-32-strlang' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-04-27 11:34:58 +08:00
David Monllao 6c18a3c802 Merge branch 'wip-MDL-57807-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-04-27 11:33:43 +08:00
David Monllao e7c4f87a5d Merge branch 'MDL-58372-32' of git://github.com/Dagefoerde/moodle into MOODLE_32_STABLE 2017-04-27 11:32:00 +08:00
Andrew Nicols 2e95bfa5f2 Merge branch 'MDL-58691-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-04-27 11:26:52 +08:00
David Monllao f8ca828c02 Merge branch 'MDL-54849-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-04-27 11:20:27 +08:00
Marina Glancy 22e22a39af MDL-58689 dml: prevent logging during setup 2017-04-27 10:05:25 +08:00
Adrian Greeve 6823ac39cc 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:06:17 +08:00
AMOS bot 1e5a1eb77b Automatically generated installer lang files 2017-04-27 00:05:35 +08:00
Jan Dageförde 910247b15e MDL-58372 repository_webdav: Explicitly pass some filename
Not passing anything triggers PHP 7.1 "Too few arguments" exception.
2017-04-26 11:28:47 +02:00
David Mudrák b94131a90e 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:10 +02:00
Jake Dallimore cfe4df185c weekly release 3.2.2+ 2017-04-26 14:49:13 +08:00
Jake Dallimore 41c817ef38 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-04-26 14:49:12 +08:00
Jun Pataleta 32549792c2 Merge branch 'MDL-58668-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-04-26 11:05:48 +08:00
John Okely b6c6b99470 MDL-58632 assignsubmission_file: Don't allow any extension 2017-04-26 09:35:44 +08:00
Juan Leyva 72f7cc6a07 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:27 +02:00
Juan Leyva a6757673a2 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:18 +02:00
Dan Poltawski e47c42f4a8 Merge branch 'MDL-58556-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-04-24 11:05:17 +01:00
Ankit Agarwal c51e98722b 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:45:17 +05:30
Jake Dallimore d513f79a24 Merge branch 'MDL-57793-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-04-24 15:17:27 +08:00
Damyon Wiese e7048861a6 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:05 +08:00
Damyon Wiese a188724a19 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:10 +08:00
Jun Pataleta d165d2cf24 Merge branch 'MDL-58586-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-04-24 09:34:49 +08:00
AMOS bot 6db0ef42d4 Automatically generated installer lang files 2017-04-23 00:04:28 +08:00
Dan Poltawski 0e526f9ea6 weekly release 3.2.2+ 2017-04-21 15:47:44 +01:00
Dan Poltawski f2520ef454 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-04-21 15:47:40 +01:00
Ryan Wyllie 9fd041ad16 MDL-58349 mod_assign: text wrap for comment search while grading 2017-04-21 13:36:29 +08:00
Damyon Wiese 608923c445 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:39:57 +08:00
Jun Pataleta ec3ade054f Merge branch 'MDL-58636-32' of git://github.com/andrewnicols/moodle into MOODLE_32_STABLE 2017-04-21 11:39:34 +08:00
Andrew Nicols 0edc92e6bf MDL-58636 course: Ensure that the drag constraint has height 2017-04-21 10:48:32 +08:00
Jake Dallimore ebdcc591a2 Merge branch 'MDL-58613-32-workshopfullname' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-04-21 10:27:13 +08:00
David Monllao 029a29a3cf Merge branch 'MDL-58590_32' of https://github.com/sk-unikent/moodle into MOODLE_32_STABLE 2017-04-21 10:05:25 +08:00
Jun Pataleta 856dbae2cb Merge branch 'MDL-58482-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2017-04-21 09:05:53 +08:00
Simey Lameze 729c7f143b MDL-58482 theme_boost: css fixes for view badge page 2017-04-21 08:57:25 +08:00
AMOS bot 5f42866391 Automatically generated installer lang files 2017-04-21 00:10:40 +08:00
Skylar Kelty e0b69258fb MDL-58590 mobile: Cache mobile-supporting plugins 2017-04-20 09:34:40 +01:00
David Monllao e684411988 Merge branch 'MDL-58349-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-04-20 15:20:46 +08:00
Jake Dallimore 1e15527fa5 Merge branch 'wip-MDL-58452-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-20 15:10:42 +08:00
David Monllao 0373f42728 Merge branch 'MDL-58278-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-04-20 14:08:35 +08:00
Damyon Wiese 864cf11c2f 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 11:47:39 +08:00
AMOS bot ba6e9f22b4 Automatically generated installer lang files 2017-04-20 00:07:04 +08:00
Juan Leyva 554afbe2cd 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:05 +02:00
David Mudrák a0f9277b51 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:49 +02:00
David Monllao ebda22d612 Merge branch 'MDL-54901_32' of git://github.com/stronk7/moodle into MOODLE_32_STABLE 2017-04-19 11:31:57 +08:00
David Monllao 0ad03ab13c Merge branch 'MDL-58096-32' of git://github.com/StudiUM/moodle into MOODLE_32_STABLE 2017-04-19 05:18:22 +08:00
Gilles-Philippe Leblanc 4dcdab69f6 MDL-58096 reports: Add SQL required by preload_from_record() 2017-04-18 15:42:01 -04:00
Dan Poltawski a8321fc3ac Merge branch 'MDL-58463-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-04-18 18:54:01 +01:00
David Monllao 167a73cffc Merge branch 'MDL-58116-32' of https://github.com/barrasroger/moodle-1 into MOODLE_32_STABLE 2017-04-19 00:49:56 +08:00
AMOS bot b19bf809dc Automatically generated installer lang files 2017-04-19 00:04:41 +08:00
Dan Poltawski d2f333357d Merge branch 'MDL-58374-32-ltierrorlog' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-04-18 16:49:03 +01:00
Gilles-Philippe Leblanc a1d78eac23 MDL-58096 reports: Optimize database request 2017-04-18 11:00:08 -04:00
Dan Poltawski 937831c736 weekly release 3.2.2+ 2017-04-18 12:34:09 +01:00
Dan Poltawski de7951b817 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-04-18 12:34:08 +01:00
barrasroger 0e1c96a44c MDL-58116 core_enrol: fix handling of users on different methods 2017-04-18 13:06:54 +02:00
Jun Pataleta cdabef710d MDL-57793 calendar: Additional edge-case tests
* Added leap year and 31th day of the month tests.
2017-04-18 13:57:39 +08:00
Jun Pataleta 2a7b253e82 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:39 +08:00
Jun Pataleta b87f4d1ea5 MDL-58463 mod_assign: Improve coverage of test_assign_refresh_events() 2017-04-18 13:22:33 +08:00
Jun Pataleta c3606bf9ba MDL-58463 mod_assign: Use correct course ID for fetching assignment's CM 2017-04-18 11:57:45 +08:00
Andrew Nicols 6806700b01 Merge branch 'MDL-58559-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2017-04-18 09:47:41 +08:00
Andrew Nicols 071633c194 Merge branch 'MDL-58582-32' of https://github.com/Dagefoerde/moodle into MOODLE_32_STABLE 2017-04-18 09:32:32 +08:00
Andrew Nicols ef01fb49a6 Merge branch 'MDL-58539_32' of https://github.com/dmonllao/moodle into MOODLE_32_STABLE 2017-04-18 09:04:48 +08:00
Simey Lameze b9fb0ede39 MDL-58559 block_community: check if the course has subject 2017-04-18 08:57:15 +08:00
Eloy Lafuente (stronk7) 3567a37302 MDL-54901 environment: pg93, openssl, https & utf8mb4 2017-04-18 02:53:47 +02:00
Eloy Lafuente (stronk7) 34770e55b2 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:53:46 +02:00
Ruslan Kabalin f7e9dbcbe2 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:44 +02:00
Jan Dageförde e353a80475 MDL-58582 theme: Improve PHPDoc comment on SVG image resolution 2017-04-17 15:24:32 +02:00
Dan Poltawski 8226afc20e MDL-58486 userprefs: clarifying comment 2017-04-17 12:17:57 +01:00
Dan Poltawski 535abb009d Merge branch 'MDL-58486_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-04-17 12:17:54 +01:00
Dan Poltawski 3125397713 Merge branch 'MDL-58479-32-weblib-notice-phpdoc' of git://github.com/roperto/moodle into MOODLE_32_STABLE 2017-04-17 10:46:10 +01:00
Dan Poltawski 9ce8250f77 Merge branch 'MDL-58465-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-04-17 10:41:18 +01:00
Dan Poltawski 1eefc40296 Merge branch 'MDL-58393-32_filter-order' of https://github.com/roperto/moodle into MOODLE_32_STABLE 2017-04-17 10:30:41 +01:00
Dan Poltawski a3d444a3af Merge branch 'MDL-58593-32' of git://github.com/merrill-oakland/moodle into MOODLE_32_STABLE 2017-04-17 10:03:23 +01:00
Dan Poltawski 3509e3771a MDL-39913 behat: fix filetype search
Like the previous commit, the string had been badly backported from 33
on 32 th gdocs extension is not in spreadhseet files.
2017-04-17 08:36:20 +01:00
Dan Poltawski d7dd9aa732 MDL-39913 behat: fix steps which don't exist
'And I am on "Course 1" course homepage' is a step introduced into 33.
2017-04-17 08:31:39 +01:00
Eric Merrill 2335a0018d MDL-58593 database: More efficiently track issued key names 2017-04-13 12:24:27 -04:00
Dan Poltawski 6cb68d8d3a Merge branch 'MDL-32596_32' of https://github.com/rezaies/moodle into MOODLE_32_STABLE 2017-04-13 15:57:23 +01:00
David Monllao a3b99f1c03 Merge branch 'MDL-58244-32' of https://github.com/MartinGauk/moodle into MOODLE_32_STABLE 2017-04-13 13:00:40 +02:00
David Monllao 139c549e3c Merge branch 'MDL-58171_32-report-role-format_text' of https://github.com/lucaboesch/moodle into MOODLE_32_STABLE 2017-04-13 12:40:08 +02:00
Martin Gauk 8336d2be91 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:04 +00:00
Andrew Nicols 46629407c2 Merge branch 'MDL-39913-32-new-validation' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-04-13 09:18:15 +08:00
AMOS bot f1996f596b Automatically generated installer lang files 2017-04-13 00:04:26 +08:00
David Monllao db2718a65d Merge branch 'MDL57475-MOODLE_32_STABLE' of https://github.com/mmafrar/moodle into MOODLE_32_STABLE 2017-04-12 16:19:08 +02:00
Luca Bösch 2e26127821 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:45 +02:00
David Monllao ccbc8fadf8 Merge branch 'MDL-58555_32' of https://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-04-12 14:09:33 +02:00
David Monllao 0905763270 weekly release 3.2.2+ 2017-04-12 09:32:38 +02:00
David Monllao 558d773213 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-04-12 09:32:36 +02:00
Tim Hunt 4288a75a48 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-11 09:41:02 +01:00
Andrew Nicols cdcb157b7e Merge branch 'wip-MDL-57616-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-11 12:01:28 +08:00
Andrew Nicols 12d454cb4c Merge branch 'MDL-58461-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-04-11 11:34:43 +08:00
AMOS bot c1d1c098f4 Automatically generated installer lang files 2017-04-11 00:04:44 +08:00
David Monllao 402ce4d5f5 Merge branch 'patch-25' of https://github.com/sk-unikent/moodle into MOODLE_32_STABLE 2017-04-10 16:59:34 +02:00
David Monllao f8db8073a2 Merge branch 'mdl-58489-m32' of https://github.com/Dagefoerde/moodle into MOODLE_32_STABLE 2017-04-10 16:56:23 +02:00
David Monllao 2eb6dd8cdc Merge branch 'mdl-58485-m32' of https://github.com/Dagefoerde/moodle into MOODLE_32_STABLE 2017-04-10 16:34:28 +02:00
David Monllao 32cf700c31 Merge branch 'wip-MDL-55950-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-10 16:10:04 +02:00
David Monllao c2542c35f6 Merge branch 'MDL-57858-32' of git://github.com/pavelsokolov/moodle into MOODLE_32_STABLE 2017-04-10 14:15:12 +02:00
David Monllao a563739951 MDL-56370 mod_feedback: Note about undeprecation 2017-04-10 13:17:14 +02:00
David Monllao 04d312fbcc Merge branch 'wip-MDL-56370-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-10 13:15:24 +02:00
David Monllao e82c98f26d Merge branch 'wip-MDL-55939-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-10 12:57:50 +02:00
David Monllao f40585c94d Merge branch 'MDL-58104-32' of git://github.com/pavelsokolov/moodle into MOODLE_32_STABLE 2017-04-10 09:58:44 +02:00
Andrew Nicols b91250e430 Merge branch 'wip-MDL-58180-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-10 13:40:29 +08:00
John Okely ea3f8fa0cb MDL-39913 assignsubmission_file: Add validation 2017-04-10 12:12:07 +08:00
AMOS bot e1f11ce7b1 Automatically generated installer lang files 2017-04-08 00:05:54 +08:00
David Mudrák 7c920b5706 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:27:19 +02:00
Jan Dageförde 3abc7d1c4e MDL-58485 admin: Show all SVG plugin icons 2017-04-07 10:10:42 +02:00
Jan Dageförde d2decc7fb0 MDL-58489 core: Fix unreachable HTTP error handling 2017-04-07 10:07:54 +02:00
Marina Glancy 784e8588ee MDL-58452 ajax: do not show popup when can't retrieve the message count 2017-04-07 16:06:07 +08:00
John Okely d00a536a0c MDL-39913 assign: Add help on filetype submissions 2017-04-07 16:04:56 +08:00
Jonathon Fowler 9a9a841497 MDL-39913 assignsubmission_file: add file types restriction
Testing for uploading a non-permitted file won't work as things stand
currently because the filemanager throws an exception that Behat
catches, which causes a fail.
2017-04-07 16:04:53 +08:00
Jonathon Fowler e319e5a2d0 MDL-39913 filetypes: mimetypes remediation
Going by http://www.iana.org/assignments/media-types/media-types.xhtml.
Disambiguated the Office 2007 types, Apple iWorks and other types
changes by tonyjbutler.
2017-04-07 16:04:13 +08:00
Jun Pataleta 90574fd1c8 weekly release 3.2.2+ 2017-04-07 12:45:57 +08:00
Jun Pataleta 67e8ddc65f Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-04-07 12:45:56 +08:00
Marina Glancy a41f004fb7 MDL-56370 mod_feedback: behat for repeat completion 2017-04-07 08:22:58 +08:00
AMOS bot 22c756c644 Automatically generated installer lang files 2017-04-07 00:04:53 +08:00
Skylar Kelty b42298d3fa MDL-58456 chat: Add missing new in throw 2017-04-06 09:47:41 +01:00
Shamim Rezaie e13c169ded MDL-32596 tool_xmldb: Updated confirmcheckforeignkeys
Updated $string['confirmcheckforeignkeys']
2017-04-06 18:29:24 +10:00
Marina Glancy 766a5891b6 MDL-55950 mod_feedback: correct link to response in the email 2017-04-06 15:44:14 +08:00
Marina Glancy 5108b3e7c1 MDL-55939 course: no permission is needed to view frontpage 2017-04-06 14:52:54 +08:00
Damyon Wiese 87f417f510 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:28 +08:00
Damyon Wiese 7a75832faa 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:24 +08:00
AMOS bot 8b2d2a5fc6 Automatically generated installer lang files 2017-04-06 00:07:27 +08:00
AMOS bot 5b9dead542 Automatically generated installer lang files 2017-04-06 00:07:27 +08:00
Marina Glancy 50b024746e MDL-56370 mod_feedback: allow to restore values from last attempt 2017-04-05 15:45:16 +08:00
Andrew Nicols c0ab266dd0 MDL-58055 theme_bootstrap: Change padding around unread link 2017-04-05 00:34:29 +02:00
Eloy Lafuente (stronk7) a90270455e Merge branch 'MDL-55326-32' of git://github.com/andrewnicols/moodle into MOODLE_32_STABLE 2017-04-04 19:26:36 +02:00
Eloy Lafuente (stronk7) f0be825426 Merge branch 'MDL-55499-32' of git://github.com/andrewnicols/moodle into MOODLE_32_STABLE 2017-04-04 18:24:04 +02:00
AMOS bot dce24b2a5a Automatically generated installer lang files 2017-04-05 00:04:46 +08:00
Tim Hunt 985b62f3a9 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:52 +01:00
Daniel Thee Roperto d92499f4c4 MDL-58479 documentation: fixed phpdoc for notice(). 2017-04-04 16:20:01 +10:00
Marina Glancy 6c61222fbb MDL-57616 label: allow to drag and drop video/audio files 2017-04-04 12:31:32 +08:00
Andrew Nicols 6e19e0c175 Merge branch 'wip-MDL-41809-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-04-04 10:54:44 +08:00
Mohamed Afrar 92ae0fda60 MDL-57475 Forum: Fixing issue with the 'preferences' link in emails 2017-04-04 03:08:22 +05:30
AMOS bot 9702e72bd7 Automatically generated installer lang files 2017-04-04 00:05:38 +08:00
Daniel Thee Roperto 1401dd8f47 MDL-58394 filters: Fixed order not being respected. 2017-04-03 14:47:26 +10:00
Ankit Agarwal aae0a865bb MDL-58465 unittests: Fix invalid use of exception 2017-04-03 09:25:46 +05:30
Damyon Wiese fed7bdfa96 MDL-58461 filter_mathjaxloader: Change CDN url
The MathJax CDN url is going away - we need to switch to another mirror.
2017-04-03 11:18:20 +08:00
Dan Poltawski 57a38cf813 weekly release 3.2.2+ 2017-03-31 11:15:47 +01:00
David Monllao ed6478fb7e 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:16 +01:00
Pavel Sokolov 26ce8a1f15 MDL-57858 mod_assign: fix submissions count for assign with scales 2017-03-31 12:01:03 +03:00
Dan Poltawski f2ceab9582 weekly release 3.2.2+ 2017-03-31 09:16:40 +01:00
Dan Poltawski 02151fbe85 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-03-31 09:16:39 +01:00
Pavel Sokolov 6db9bc560d MDL-58104 mod_assign: Show attempt settings for the latest attempt 2017-03-30 11:10:52 +03:00
Andrew Nicols 440b00b7d3 MDL-55499 mod_forum: Use context when formatting e-mail text 2017-03-30 11:38:37 +08:00
Dan Poltawski ba0bd5b9ab Merge branch 'MDL-58264_32' of https://github.com/darrencocco/moodle into MOODLE_32_STABLE 2017-03-28 18:02:42 +01:00
AMOS bot cf2cda4b31 Automatically generated installer lang files 2017-03-29 00:05:39 +08:00
David Monllao 3cc6435b18 MDL-58079 enrol: Move new test to existing test case 2017-03-28 17:35:48 +02:00
David Monllao e0b383aae0 Merge branch 'MDL-58079_32' of https://github.com/kiklop74/moodle into MOODLE_32_STABLE 2017-03-28 17:35:05 +02:00
Juan Leyva 2121f50755 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:07 +02:00
Dan Poltawski 121c9d3099 MDL-58227 mod_feedback: remove uncessary if 2017-03-28 16:00:08 +01:00
Dan Poltawski 32e709a9dc Merge branch 'MDL-58227-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-03-28 15:59:23 +01:00
Dan Poltawski 397a8936cb Merge branch 'MOODLE_32_STABLE' of https://github.com/fwsl/moodle into MOODLE_32_STABLE 2017-03-28 12:07:29 +01:00
Dan Poltawski 4e3551004e Merge branch 'MDL-58160_32' of git://github.com/aolley/moodle into MOODLE_32_STABLE 2017-03-28 11:34:59 +01:00
Dan Poltawski e48dd18997 Merge branch 'wip-MDL-58092-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-03-28 10:56:00 +01:00
Dan Poltawski 6d36432f2f Merge branch 'MDL-58257_M32' of https://github.com/ak4t0sh/moodle into MOODLE_32_STABLE 2017-03-28 10:50:59 +01:00
AMOS bot aaf67d012b Automatically generated installer lang files 2017-03-28 00:06:38 +08:00
Dan Poltawski 316706511d Merge branch 'MDL-57510-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-03-27 09:41:35 +01:00
Andrew Nicols b407285890 MDL-55326 core_text: Correct typo3 file permissions 2017-03-27 15:07:59 +08:00
Luca Bösch 042b90d078 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:38 +08:00
Darren Cocco c2465fa0e3 MDL-58264 quiz: removed additional = symbol
Removed superflous = symbol from SQL snippet
2017-03-27 11:11:47 +11:00
AMOS bot 4b4f760bfa Automatically generated installer lang files 2017-03-27 00:04:24 +08:00
Ankit Agarwal 9ec4ffe9be MDL-57510 questionbank: Add horizontal navigation 2017-03-24 19:08:13 +05:30
Grzegorz Ziółek 08e1b1e49e MDL-58325 config_log: Record changes in editor management to config_log. 2017-03-24 09:41:20 +01:00
Marina Glancy 8bf0e602c6 MDL-58092 gradingform_guide: behat to demonstrate double quote fix 2017-03-24 13:28:40 +08:00
gthomas2 4583242dd6 MDL-58092 grading methods: Fix double escape for freq used questions 2017-03-24 13:28:40 +08:00
Eloy Lafuente (stronk7) af97a17395 weekly release 3.2.2+ 2017-03-23 20:31:01 +01:00
Eloy Lafuente (stronk7) 89574179da Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-03-23 20:30:59 +01:00
Marina Glancy 6ee2dd680e 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:41:47 +08:00
Andrew Nicols 72fce6fc46 Merge branch 'MDL-57429-32-fix' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-03-23 11:52:39 +08:00
Jake Dallimore 3c57ce6e72 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:36:11 +08:00
Jun Pataleta 79d55f5dee MDL-58255 mod_assign: Fix one more incorrect assign context usage 2017-03-23 09:31:33 +08:00
AMOS bot d9864df62c Automatically generated installer lang files 2017-03-23 00:08:55 +08:00
Dan Poltawski a04b4d89b2 Merge branch 'MDL-58274-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-03-22 09:30:40 +00:00
Damyon Wiese 21735b6075 MDL-58349 assign: editpdf search comments style
The line height and margins are messed up on the comment search dialog.
2017-03-22 13:33:02 +08:00
Jun Pataleta 156371af9c MDL-57994 course: Fix newsitems setting for course formats without news 2017-03-22 09:33:05 +08:00
Dan Poltawski a3a8a4a970 Merge branch 'MDL-56324-32' of https://github.com/lucisgit/moodle into MOODLE_32_STABLE 2017-03-21 11:27:41 +00:00
Juan Leyva 3848d57eef 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:55:37 +01:00
Dan Poltawski 4afdece091 Merge branch 'MDL-58317-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-03-21 07:57:59 +00:00
John Okely 649bad89a2 MDL-37168 mod_lti: Fix rename behat 2017-03-21 10:30:52 +08:00
Eloy Lafuente (stronk7) 886ce4cfcb Merge branch 'MDL-57840-32-get_users_by_field' of https://github.com/roperto/moodle into MOODLE_32_STABLE 2017-03-21 01:05:55 +01:00
AMOS bot 8da74658b5 Automatically generated installer lang files 2017-03-21 00:04:24 +08:00
Dan Poltawski 59f2ef03ae Merge branch 'MDL-58262-32' of git://github.com/merrill-oakland/moodle into MOODLE_32_STABLE 2017-03-20 15:20:18 +00:00
Dan Poltawski d1b41e0a34 Merge branch 'wip-mdl-58261-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-03-20 13:51:30 +00:00
Dan Poltawski c2e2d38d99 Merge branch 'MDL-58050-32-msgtrans' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-03-20 13:19:26 +00:00
Dan Poltawski 7bde88208c Merge branch 'MDL-58121-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-03-20 13:15:15 +00:00
Dan Poltawski 2e2686acf2 Merge branch 'MDL-58255-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-03-20 13:08:52 +00:00
Dan Poltawski ed532e8f3b Merge branch 'MDL-58273-32-ldapenrol' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-03-20 11:08:46 +00:00
David Monllao 94535cbc8a Merge branch 'MDL-37168-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-03-20 10:16:18 +01:00
Dan Poltawski 12d3875811 Merge branch 'MDL-58285-m32' of https://github.com/NeillM/moodle into MOODLE_32_STABLE 2017-03-20 08:54:02 +00:00
John Okely be52d0dace MDL-37168 grade: Debugging if gradebook callbacks are not both present 2017-03-20 16:31:31 +08:00
John Okely e078aa1351 MDL-37168 mod_lti: Add behat test to cover lti quick edit 2017-03-20 16:00:15 +08:00
Sam Chaffee 1b13df8f65 MDL-37168 mod_lti: Fix LTI activity quick edit title 2017-03-20 16:00:14 +08:00
Darko Miletic 3111a4f120 MDL-58079 core_enrol: Fixed invalid category tag 2017-03-20 04:11:48 -03:00
David Monllao aacfdda594 Merge branch 'MDL-57419-32-2' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-03-20 07:33:38 +01:00
David Monllao 349027033c Merge branch 'MDL-57254-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-03-20 06:49:29 +01:00
Damyon Wiese 4ca5db7c0b 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:36:51 +08:00
David Monllao 4c72716d43 Merge branch 'MDL-57994_M32' of https://github.com/ak4t0sh/moodle into MOODLE_32_STABLE 2017-03-20 06:32:44 +01:00
David Monllao 733e84fc26 Merge branch 'MDL-58166-32' of git://github.com/pavelsokolov/moodle into MOODLE_32_STABLE 2017-03-20 05:12:03 +01:00
David Monllao 594253c322 Merge branch 'MDL-58182-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-03-20 05:04:40 +01:00
Andrew Nicols 1cf3129e86 Merge branch 'MDL-57429-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-03-20 10:19:52 +08:00
AMOS bot 6178a8c820 Automatically generated installer lang files 2017-03-20 00:07:29 +08:00
AMOS bot 4c22adddef Automatically generated installer lang files 2017-03-19 00:05:46 +08:00
AMOS bot 91b779aa02 Automatically generated installer lang files 2017-03-18 00:09:29 +08:00
Pavel Sokolov 27946d0c65 MDL-58166 mod_assign: markingworkflow breaks assign for non-graders 2017-03-17 17:52:11 +03:00
Tony Butler 9ac0280f80 MDL-56324 assignfeedback_editpdf: Revert erroneous commits
This reverts commits 88d309d and 3cd718e.
2017-03-17 11:04:04 +00:00
Arnaud Trouve b2931bc620 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:28:25 +01:00
Damyon Wiese 7acd833a3c MDL-58274 boost: div is not the same as span
display: block and display: inline are very different - you can't just
change tags and expect everything to look fine.
2017-03-17 10:03:10 +08:00
Jun Pataleta 8f48fbf6f6 MDL-58255 mod_assign: Fix usage of assign object for overrides
* Fix the parameters being passed for the assign constructor.
* Use assign::get_instance() instead of assign::get_context() to fetch
the assignment instance's properties.
2017-03-17 09:34:03 +08:00
Jake Dallimore 81636e4694 MDL-58121 email: ensure support user is defined in email_to_user 2017-03-17 09:13:17 +08:00
Jake Dallimore 91df0eb289 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:06:30 +08:00
Arnaud Trouve 27e0254e8f MDL-57994 course: fix newsitems value 2017-03-16 18:37:12 +01:00
Darko Miletic 1929107b8c MDL-58079 core_enrol: Implementing fix and unit test 2017-03-16 14:27:22 -03:00
Neill Magill e587b9be09 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:10:59 +00:00
Dan Poltawski 80ff09db28 weekly release 3.2.2+ 2017-03-16 11:52:59 +00:00
Dan Poltawski 61495ffbcb Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-03-16 11:52:57 +00:00
John Okely 3bc489a0ec MDL-57419 messaging: Don't use enter to send 2017-03-16 10:50:06 +08:00
Rajesh Taneja 6d3a686c2c MDL-58261 behat: Fixed missing @_file_upload tags 2017-03-16 09:36:02 +08:00
Jake Dallimore e9fe4cc37c 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:33:30 +08:00
David Mudrák 4457c6605b MDL-58273 enrol_ldap: Fix the name of the capability
This capability controls who can hide/show the enrolment instance.
2017-03-15 18:33:04 +01:00
Andrew Nicols d82b0d8ed9 Merge branch 'MDL-57658-32-integration-fix-2' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-03-15 15:14:33 +08:00
Jun Pataleta f16b97eb8c MDL-57658 calendar: Remove BYDAY filtering dependence on NumberFormatter 2017-03-15 14:24:12 +08:00
Andrew Nicols dda3512514 Merge branch 'MDL-57658-32-integration-fix' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-03-15 11:42:06 +08:00
Jun Pataleta f4fe47705e MDL-57658 calendar: Set sort order for fetched DB records 2017-03-15 11:26:31 +08:00
Eloy Lafuente (stronk7) 3ec84d746a Merge branch 'MDL-57066-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-03-15 00:58:45 +01:00
Eric Merrill 330f45b6e2 MDL-58262 assign: Use unique sql parameter 2017-03-14 15:10:00 -04:00
Dan Poltawski cddbbc1752 Merge branch 'MDL-58023_behat_find_node_in_navigation_improvement_MOODLE_32_STABLE' of https://github.com/gthomas2/moodle into MOODLE_32_STABLE 2017-03-14 16:47:52 +00:00
Dan Poltawski 9407afa0ba Merge branch 'MDL-57658-32-3' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-03-14 16:06:20 +00:00
AMOS bot a62863c658 Automatically generated installer lang files 2017-03-15 00:04:51 +08:00
Juan Leyva 1164882eff MDL-57254 mod_choice: Add not open case in choice_can_view_results
If the choice is not available (not open yet), the function must return
false even is CHOICE_SHOWRESULTS_ALWAYS is set to true.
This was failing only in Web Services, in Web that function is not
reached (execution stops when the time open check is done).
2017-03-14 13:35:38 +01:00
David Monllao 7b0a42b20c Merge branch 'MDL-58114-32-excparams' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-03-14 11:02:50 +01:00
Rajesh Taneja ff14679150 MDL-58169 phpunit: Clear opcode cache before checking file
In unit test, we write cache file often and
opcache might fail to detect changes. It will
be nice to invalidate opcode cache to ensure
we have the correct file_exists status
2017-03-14 09:07:28 +00:00
Andrew Nicols e79a53e370 Merge branch 'MDL-57583-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-03-14 12:47:59 +08:00
Rajesh Taneja e78f6b391a MDL-58250 behat: Status should be new exit code
Oring should not be done with old status,
as it will always return failure.
2017-03-14 07:30:44 +08:00
AMOS bot 5a04868aec Automatically generated installer lang files 2017-03-14 00:04:43 +08:00
gthomas2 b3a6face59 MDL-58023 behat: Improve find_node_in_navigation function 2017-03-13 11:39:23 +00:00
Krishnan e7714135a4 MDL-57066 theme_boost: Fix course section move icon alignment 2017-03-13 14:43:29 +08:00
Jake Dallimore e2b2fad613 MDL-57583 completion: fix bug with advcheckbox in course completion form
Added the appropriate checks to handle the advcheckbox post data.
2017-03-13 09:21:54 +08:00
AMOS bot b85bdc91d4 Automatically generated installer lang files 2017-03-13 00:04:18 +08:00
Eloy Lafuente (stronk7) 70fa678586 Moodle release 3.2.2 2017-03-11 22:16:10 +01:00
AMOS bot 0c6de97371 Automatically generated installer lang files 2017-03-12 00:04:17 +08:00
AMOS bot 63981e5a82 Automatically generated installer lang files 2017-03-12 00:04:17 +08:00
Eloy Lafuente (stronk7) 6a0dfc60d6 weekly release 3.2.1+ 2017-03-10 20:59:59 +01:00
Eloy Lafuente (stronk7) 38c4435a37 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-03-10 20:59:55 +01:00
Damyon Wiese 3cc4e2f725 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:07:55 +00:00
Marina Glancy ca3cbbc233 MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:07:54 +00:00
Andrew Nicols 7d196ef3b3 Merge branch 'wip-mdl-57940-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-03-10 18:07:53 +00:00
Eloy Lafuente (stronk7) 069b9d5820 Merge branch 'MDL-58123-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-03-10 18:07:53 +00:00
Dan Poltawski 454a3d34d5 Merge branch 'MDL-58035_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-03-10 18:07:52 +00:00
Ankit Agarwal db3a985faf MDL-56526 userlib: Do not allow not loggedin users if forceloginforprofile is set 2017-03-10 18:07:52 +00:00
Ankit Agarwal c535520966 MDL-56526 globalsearch: Fix bug in phpdocs 2017-03-10 18:07:51 +00:00
David Mudrák e35ad40de1 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:07:51 +00:00
AMOS bot 436acc27fe Automatically generated installer lang files 2017-03-10 00:04:27 +08:00
Jun Pataleta 39f02182de 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:11:29 +08:00
Dan Poltawski 73fd6f2928 Merge branch 'MDL-57990-32' of git://github.com/crazyserver/moodle into MOODLE_32_STABLE 2017-03-07 13:59:15 -03:00
AMOS bot 84e17f59c5 Automatically generated installer lang files 2017-03-08 00:05:55 +08:00
Eloy Lafuente (stronk7) 63464df041 Merge branch 'MDL-58064-32-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-03-07 16:37:36 +01:00
Dan Poltawski 17c82085fc Merge branch 'wip-mdl-58056-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-03-07 11:08:23 -03:00
Dan Poltawski 5e3ce67f37 Merge branch 'MDL-57361-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-03-07 11:07:46 -03:00
Tim Hunt ec02a34e1f MDL-58035 tool_templatelibrary: fix unit test using removed base theme 2017-03-07 13:35:34 +00:00
Tim Hunt 1e1e1b8229 MDL-58035 lib: log when the expected theme cannot be initialised 2017-03-07 13:35:32 +00:00
David Monllao f7af2c5fc7 Merge branch 'MDL-58106_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-03-07 13:38:18 +01:00
David Monllao 92194c1c8d Merge branch 'wip-mdl-58091-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-03-07 13:16:03 +01:00
David Mudrák 7bbe8a1c76 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 13:00:46 +01:00
Dan Poltawski 22ee65c275 MDL-58040 blocks: add upgrade.txt note 2017-03-07 08:34:54 -03:00
Dan Poltawski 9354f9de64 Merge branch 'MDL-58040_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-03-07 08:34:48 -03:00
David Monllao 04d2305788 Merge branch 'wip-MDL-57485-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-03-07 12:16:48 +01:00
David Monllao e21e294072 Merge branch 'MDL-58057-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-03-07 12:09:35 +01:00
Dan Poltawski 19b7ac05ad Merge branch 'MDL-55859-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-03-07 07:02:31 -03:00
Dan Poltawski 4294bbd50f Merge branch 'MDL-58052_behat_get_session_user_MOODLE_32_STABLE' of https://github.com/gthomas2/moodle into MOODLE_32_STABLE 2017-03-07 06:54:34 -03:00
Adrian Greeve b1ffb73177 MDL-57485 themes: Set images to default display type.
Imported images in atto would no longer hold a URL
tag around it. display: block was the culprit.
2017-03-07 17:33:23 +08:00
Ankit Agarwal cde1ac3eea MDL-57362 assign: Fix permission checks 2017-03-07 13:04:01 +05:30
Jake Dallimore 059759aab9 MDL-58057 core_files: properly trim curl whitelist config when fetching 2017-03-07 09:49:50 +08:00
Dan Poltawski 188d41ccc9 Merge branch 'MDL-57362-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-03-06 10:18:30 -03:00
Adam Olley fc73f127eb 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:13 +10:30
gthomas2 0b5f9f6e60 MDL-58052 behat: user session function - use to edit current profile 2017-03-03 12:29:47 +00:00
Pau Ferrer Ocaña fa60a11522 MDL-57990 course: Add sortorder as public field 2017-03-03 11:52:10 +01:00
Eloy Lafuente (stronk7) 29cdf58116 weekly release 3.2.1+ 2017-03-03 10:33:52 +01:00
Eloy Lafuente (stronk7) 3db24b8015 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-03-03 10:33:47 +01:00
Tim Hunt b21b210f41 MDL-58106 random Q restore: avoid MySQL performance issues 2017-03-02 19:40:53 +00:00
Ankit Agarwal 79482e3fe8 MDL-55859 assign_editpdf: cleanup htmlfile in case of errors 2017-03-02 21:16:37 +05:30
Cameron Ball 3935371599 MDL-57321 theme_boost: Remove extra quotation mark 2017-03-02 16:05:55 +08:00
Jun Pataleta 14026572ae MDL-58123 mod_lesson: Fix lesson table name in refresh_events DB query 2017-03-02 10:55:42 +08:00
Eloy Lafuente (stronk7) ee66d63054 Merge branch 'MDL-57321-32' of git://github.com/cameron1729/moodle into MOODLE_32_STABLE 2017-03-02 00:01:47 +01:00
Juan Leyva af2d6085cd MDL-57361 auth_email: Force policy agreed on sign-up 2017-03-01 18:20:59 +01:00
David Mudrák e35a24916f MDL-58114 plugin manager: Fix exception parameters 2017-03-01 15:01:38 +01:00
Cameron Ball e615d70923 MDL-57321 theme_boost: Remove duplicate aria-labelledby attribute 2017-03-01 11:37:29 +08:00
Cameron Ball ae8388d51c MDL-57321 theme_boost: Fix improperly nested ul elements in footer 2017-03-01 11:37:28 +08:00
Cameron Ball 962e3eb662 MDL-57321 theme_boost: Use div instead of span for dropdown items 2017-03-01 11:37:28 +08:00
Cameron Ball 4c586b025e MDL-57321 theme_boost: Consistently apply attributes on elements 2017-03-01 11:37:28 +08:00
Andrew Nicols 8612c8aa3e Merge branch 'MDL-58072_32_tabtree_mustache' of https://github.com/mchurchward/moodle into MOODLE_32_STABLE 2017-03-01 11:10:18 +08:00
Eloy Lafuente (stronk7) a7db91030b Merge branch 'wip-MDL-48228-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-03-01 02:57:16 +01:00
Adrian Greeve d807d3c603 MDL-48228 database: Unit test addition and update. 2017-03-01 09:05:40 +08:00
Adrian Greeve 8f61b909e8 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:05:40 +08:00
Eloy Lafuente (stronk7) e44ce23c9f Merge branch 'MDL-58071-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-02-28 23:00:42 +01:00
Eloy Lafuente (stronk7) 6c87b08240 Merge branch 'MDL-55762-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-28 20:40:51 +01:00
David Monllao 9afdc8fc12 MDL-51833 docs: Move upgrade note under 3.2.2 2017-02-28 11:32:39 +01:00
David Monllao e30a500fb9 Merge branch 'wip-MDL-51833-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-02-28 11:31:09 +01:00
Ankit Agarwal 121d3e0d29 MDL-57362 assignlib: Fix minor bug in phpdocs 2017-02-28 10:34:41 +05:30
Ankit Agarwal 5b7356cdde MDL-57362 assignlib: Check for sep groups edge case 2017-02-28 10:34:41 +05:30
Andrew Nicols 169d972bf6 Merge branch 'MDL-58038-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-28 12:25:43 +08:00
Rajesh Taneja 4fef0dadf0 MDL-58091 behat: Added missing @_file_upload tag 2017-02-28 11:22:38 +08:00
Andrew Nicols 96a0d1bc7a Merge branch 'MDL-35980-32' of git://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-28 10:34:00 +08:00
Jake Dallimore 01c2ca76c0 MDL-35980 behat: fix link text in submission_comments feature 2017-02-28 10:24:53 +08:00
Andrew Nicols 46c68c1b42 MDL-55547 tool_monitor: Coding style fixes 2017-02-28 09:42:44 +08:00
Andrew Nicols e65f6a7e40 Merge branch 'wip-MDL-55547-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-02-28 09:42:39 +08:00
Eloy Lafuente (stronk7) 800da1b13d Merge branch 'MDL-58041_32' of https://github.com/sam-moodle/moodle into MOODLE_32_STABLE 2017-02-28 02:35:20 +01:00
Eloy Lafuente (stronk7) a53008f1f0 Merge branch 'MDL-57524_M32' of https://github.com/nadavkav/moodle into MOODLE_32_STABLE 2017-02-28 01:40:54 +01:00
Eloy Lafuente (stronk7) f1a117b86b Merge branch 'MDL-58030_32' of git://github.com/aolley/moodle into MOODLE_32_STABLE 2017-02-27 22:47:22 +01:00
Helen Foster bcbd4140a1 MDL-58064 lang: Merge English strings from the en_fix language pack 2017-02-27 10:20:17 +01:00
Rajesh Taneja c99c5a436e MDL-57940 behat: Allow behat parallel run to start with delay
Behat parallel run if executed together
then selenium might fail to launch browser
and timeout. It would be nice to have a
custom delay between the start of each process
2017-02-27 16:16:06 +08:00
Andrew Nicols b7d36bdbaf Merge branch 'MDL-50719-fast-locks-MOODLE_32_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_32_STABLE 2017-02-27 13:47:02 +08:00
Andrew Nicols c21f12e786 Merge branch 'MDL-35980-32' of git://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-27 12:20:02 +08:00
Ankit Agarwal 2dd1bb44c2 MDL-55762 assignpdf: Handle errored pages better 2017-02-27 09:27:23 +05:30
Ankit Agarwal 63de9b5cdb MDL-55762 assignpdf: Fix bug in phpdocs 2017-02-27 09:27:23 +05:30
Andrew Nicols 24a00cadec Merge branch 'MDL-58032-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-27 11:51:13 +08:00
Adrian Greeve 3f709d3272 MDL-51833 tool_monitor: Improve access check for monitor. 2017-02-27 09:00:54 +08:00
Nadav Kavalerchik def32a798d MDL-57524 theme_boost: Fix ignored input size on admin pages 2017-02-24 21:51:43 +02:00
Juan Leyva b63524492f 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:17:19 +01:00
Mike Churchward 46f0136a5a MDL-58072 theme_boost: Added quotes to title; removed extra spaces. 2017-02-24 11:10:56 -05:00
Brendan Heywood 83dbc72f38 MDL-50719 cron: Fixed parallel task lock contention issues 2017-02-24 13:19:12 +11:00
Jake Dallimore c6911cefb4 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:27:44 +08:00
Jake Dallimore dfbdf40af9 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:16:38 +08:00
Jake Dallimore 3e0fb6862e MDL-58038 email: make sure all allowedemaildomain entries are respected
Fixes a bug with exploding the config var, in which trailing carriage
returns were causing string matches to fail.
2017-02-24 08:07:59 +08:00
AMOS bot 0e8eba7e1f Automatically generated installer lang files 2017-02-24 00:07:41 +08:00
David Monllao d0209e611f weekly release 3.2.1+ 2017-02-23 08:07:49 +01:00
David Monllao ec9ed6d067 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-02-23 08:07:48 +01:00
Rajesh Taneja 3e340aba45 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:45:43 +08:00
Rajesh Taneja de80be59bb 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:45:43 +08:00
AMOS bot 310172571b Automatically generated installer lang files 2017-02-23 00:05:42 +08:00
David Mudrák 36916193d2 MDL-58050 message: Commit the transaction before the early return
If there was no conversation found and the method returned early, the
active transaction was not marked as committable and the error was
reported by the request shutdown handler.

Attaching a unit test for the case just because it did not seem to be
covered. I was trying to reproduce the thrown error in the unit test but
it can't be used in this case. The shutdown handler puts the warning
directly into the error_log and it is not guaranteed where such messages
go (depending on the PHP configuration). And we do not even raise it
during the unit test execution (presumably due to noise it would
produce) anyway.
2017-02-22 14:02:34 +01:00
David Mudrák c85f8d3f93 MDL-58050 message: Fix the DB transaction handling
Consumer code is not supposed to call commit_delegated_transaction()
method directly, this was incorrect usage of the delegated transactions.
2017-02-22 14:02:34 +01:00
David Monllao a550b70a94 MDL-58014 messaging: Note about behavioural change in message_count_unread_messages 2017-02-22 09:47:12 +01:00
Daniel Thee Roperto 4bdc05f059 MDL-57840 libraries: Fixed missing fields in get_users_by_field(). 2017-02-22 16:06:38 +11:00
Ankit Agarwal 3cd6842501 MDL-58032 core_user: Fix case when acting user is a visitor 2017-02-22 09:55:58 +05:30
Rajesh Taneja f17c1aadb3 MDL-57765 behat: Allow exact selectors to be used
In Blocks with boost theme selector to
find block with name is partial match
it might fail in some cases. It would
be nice to use exact match to avoid
unexpected failures
2017-02-21 23:57:37 +01:00
Sam Chaffee 043dffdd34 MDL-58041 tool_monitor: Fix event monitor subscription behat failures 2017-02-21 11:24:17 -07:00
Tim Hunt 6fef2ab3db MDL-58040 blocklib: never use global in block manager class
This switches everything to ->page, including coverting static method to real one.
2017-02-21 15:19:55 +00:00
Adam Olley 9ffcf8a3e9 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:49 +10:30
Eloy Lafuente (stronk7) 56b8f8c8be Merge branch 'wip-MDL-57113-MOODLE_32_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_32_STABLE 2017-02-21 01:00:53 +01:00
Eloy Lafuente (stronk7) fede68a0ac Merge branch 'wip-mdl-56616-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-21 00:58:13 +01:00
Eloy Lafuente (stronk7) 6588079c5d Merge branch 'MDL-55867_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-02-21 00:53:21 +01:00
Eloy Lafuente (stronk7) f7e4c3627c Merge branch 'MDL-56206_32-text-enrolled-users-page-aligned' of https://github.com/lucaboesch/moodle into MOODLE_32_STABLE 2017-02-20 19:26:35 +01:00
David Monllao 6c3f7e0ae6 Merge branch 'MDL-57576-32-updatefeedbackfile' of git://github.com/roperto/moodle into MOODLE_32_STABLE 2017-02-20 12:27:33 +01:00
Dan Poltawski 89d948d86b Merge branch 'MDL-57962-32' of git://github.com/dpalou/moodle into MOODLE_32_STABLE 2017-02-20 11:19:17 +00:00
David Monllao e1dcad3d13 Merge branch 'MDL-57795-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-20 10:28:23 +01:00
David Monllao 07d000c51e Merge branch 'MDL-57801-32' of https://github.com/lucisgit/moodle into MOODLE_32_STABLE 2017-02-20 10:10:15 +01:00
David Monllao 636e7a13b6 Merge branch 'MDL-58014_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2017-02-20 09:34:43 +01:00
David Monllao a57bdfa055 Merge branch 'MDL-56679-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-02-20 09:20:26 +01:00
David Monllao 80a57cf924 Merge branch 'MDL-57274-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-02-20 09:07:25 +01:00
David Monllao 059d6ffd9f Merge branch 'MDL-50729-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-20 08:27:07 +01:00
Mark Nelson fd13953a8a MDL-58014 core_message: fixed unread message count 2017-02-20 13:59:33 +08:00
Marina Glancy 488e115027 MDL-55547 tool_monitor: fix exceptions when course was deleted
Delete subscriptions when course is deleted
2017-02-20 12:16:27 +08:00
Jake Dallimore 72e3ff3c15 MDL-57274 upgrade: fix curl security notices during upgrade/install
Handles the case where $CFG->curlsecurityxxx vars don't yet exist
during install or upgrade by treating not set the same as empty.
2017-02-20 08:56:47 +08:00
Jake Dallimore bd4f6ce186 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:53:00 +08:00
Dan Poltawski 5416d932d7 Merge branch 'MDL-57967_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2017-02-19 19:44:51 +00:00
Matteo Scaramuccia 27e719e709 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:48 +00:00
Tony Butler b577d34861 MDL-57801 core_filestorage: Delete temp file if disk space runs out 2017-02-16 12:46:46 +00:00
Tony Butler dcd27d9cee 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:46:46 +00:00
Gergely Kún 863dcb14a8 MDL-56679 core: Initialise $SESSION if necessary 2017-02-16 16:19:42 +08:00
Dan Poltawski 1a754e8446 weekly release 3.2.1+ 2017-02-16 08:14:54 +00:00
Dan Poltawski 95e9f4cc02 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-02-16 08:14:48 +00:00
Mark Nelson bac13609ca MDL-57967 core_message: do not process conversations from deleted users 2017-02-16 13:03:02 +08:00
Rajesh Taneja df90a44f3f MDL-57030 behat: Save run status after execution 2017-02-15 10:38:43 +01:00
Eloy Lafuente (stronk7) 23fd4f3afc Merge branch 'MDL-53991_m32v4' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-02-14 18:16:24 +01:00
Eloy Lafuente (stronk7) 9b39a92170 Merge branch 'wip-mdl-57030-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-14 16:53:59 +01:00
David Monllao 69c5e60f8c MDL-56122 editpdf: Fix ghostscript checking 2017-02-14 13:45:39 +01:00
Brendan Heywood cc36a37ea4 MDL-57810 lib: Disable nginx buffers when not required 2017-02-14 11:36:01 +00:00
Dani Palou 2678ee4e81 MDL-57962 forum: Allow creating new discussions with groupid -1 2017-02-14 10:44:00 +01:00
David Monllao 5a9f3039a7 Merge branch 'MDL-56122-32' of https://github.com/lucisgit/moodle into MOODLE_32_STABLE 2017-02-14 09:53:39 +01:00
Ankit Agarwal 667784420f MDL-50729 gradelib: Regrade event should be assigned to system 2017-02-14 11:40:54 +05:30
Ankit Agarwal f628e0ecf6 MDL-50729 events: Add user constants to events base class 2017-02-14 11:40:54 +05:30
Damyon Wiese 9ae3b89cc5 MDL-57766 assign: Put back the manual marker filter
I removed too much from gradingtable.php in the last patch.
2017-02-14 10:19:15 +08:00
Eloy Lafuente (stronk7) 098a875e4e Merge branch 'MDL-57868-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-02-13 23:42:46 +01:00
Eloy Lafuente (stronk7) 9d64f4f078 Merge branch 'MDL-57708-32' of git://github.com/merrill-oakland/moodle into MOODLE_32_STABLE 2017-02-13 23:33:00 +01:00
Tony Butler 5fac573391 MDL-56122 assignfeedback_editpdf: Add test assertions for pdf generation 2017-02-13 17:30:15 +00:00
Tony Butler def9c15904 MDL-56122 assignfeedback_editpdf: Regenerate PDF & page images if blank 2017-02-13 17:30:15 +00:00
Dan Poltawski d4e9fe521e Merge branch 'MDL-56841_32' of https://github.com/andrewhancox/moodle into MOODLE_32_STABLE 2017-02-13 16:39:39 +00:00
B Krishnan Iyer 343cdba46b MDL-57354 output: Render continue button as a primary button. 2017-02-13 15:50:43 +00:00
Davo Smith aca74d0d74 MDL-57752 session: fix check_security() session termination 2017-02-13 13:54:43 +00:00
Dan Poltawski ce01dbab40 Merge branch 'MDL-57768-webservice-config-error-MOODLE_32_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_32_STABLE 2017-02-13 13:31:04 +00:00
David Monllao 21cf201536 Merge branch 'MDL-57766-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-02-13 09:44:25 +01:00
David Monllao dfefe26665 Merge branch 'wip-MDL-50770-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-02-13 09:15:08 +01:00
Rajesh Taneja de70bc556c MDL-56616 theme_boost: Fix style for performance info 2017-02-13 14:39:23 +08:00
AMOS bot 7b06a12ef3 Automatically generated installer lang files 2017-02-11 00:11:46 +08:00
Ilya Tregubov a415eb505e MDL-57768 webservice: Delete manual setting of config in test 2017-02-10 11:48:44 +11:00
Damyon Wiese 54a20ea8fc 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:15:10 +08:00
David Monllao a1740aad65 weekly release 3.2.1+ 2017-02-09 08:00:10 +01:00
David Monllao 3680b1efa0 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-02-09 08:00:09 +01:00
Ryan Wyllie b90c2e2627 MDL-57370 message: add unread count to conversation tests 2017-02-09 13:46:31 +08:00
Ryan Wyllie 5c53893f97 MDL-57370 message: improve message union sql 2017-02-09 13:46:30 +08:00
Rajesh Taneja 3049c086a3 MDL-57030 behat: Added option to automatically rerun failures 2017-02-09 07:16:00 +08:00
Eric Merrill c644b03f02 MDL-57708 assign: Fix display of overridden submissions 2017-02-08 14:54:11 -05:00
David Monllao 7693409caa Merge branch 'wip-MDL-57316-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-02-08 13:11:40 +01:00
Dan Poltawski eac59c38f8 Merge branch 'MDL-57370-32-int-fix-1' of git://github.com/ryanwyllie/moodle into MOODLE_32_STABLE 2017-02-08 09:14:22 +00:00
Dan Poltawski cd6612b079 MDL-57370 messaging: fix mesed up versions
(Again, I didn't have a good day yesterday...)
2017-02-08 09:08:02 +00:00
Ryan Wyllie 7d88829470 MDL-57370 message: fix duplicate ids 2017-02-08 07:43:14 +00:00
Rajesh Taneja 9fde80dfa0 MDL-56954 behat: Fixed string to pass behat
colon is not concatenated to Search courses string
2017-02-08 12:19:26 +08:00
Damyon Wiese e787fa6ab4 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:17:39 +08:00
Marina Glancy 24cfd4c7d8 MDL-57316 media: create different instances for different pages 2017-02-08 10:17:18 +08:00
AMOS bot de33f85405 Automatically generated installer lang files 2017-02-08 00:09:21 +08:00
Damyon Wiese 57e38e1d12 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:37:10 +00:00
Damyon Wiese ddbf8c29ae MDL-57009 javascript: Always use when.apply
Or it does not really wait for the promises.
2017-02-07 12:37:02 +00:00
Dan Poltawski f265312fcf Merge branch 'MDL-57009-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2017-02-07 12:36:27 +00:00
Dan Poltawski 7dc6674cc4 MDL-57370 upgrade: fix versions 2017-02-07 10:49:49 +00:00
Dan Poltawski c1b9c51914 Merge branch 'MDL-57370-32' of git://github.com/ryanwyllie/moodle into MOODLE_32_STABLE 2017-02-07 10:25:27 +00:00
Luca Bösch 14da7f58a4 MDL-56206 themes: Text on Enrolled users page well aligned
Helps to align the table row content.
2017-02-07 07:19:37 +01:00
Eloy Lafuente (stronk7) 18221902bc Merge branch 'MDL-56954-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2017-02-07 06:35:08 +01:00
Ryan Wyllie 7d9ee66a2f MDL-57370 message: change indexes on message tables 2017-02-07 01:44:39 +00:00
John Okely de60425a16 MDL-57316 media: Setup media plugins in media_manager::instance() 2017-02-07 09:43:49 +08:00
John Okely 4eb3f8d9b7 MDL-57316 videojs: Add behat tests for lesson, url and resource 2017-02-07 09:43:48 +08:00
Ryan Wyllie 994e94bf76 MDL-57370 message: unit tests for get_conversations 2017-02-07 01:43:33 +00:00
Ryan Wyllie 2f9f8b5903 MDL-57370 message: remove joins from get_conversations
I have broken up the single query that was doing multiple joins on the
messaging and user tables. It no longer does any joins and will instead
query each data set individually.

This may cost more in terms of PHP processing but it will mean that
standard database tunings should be able to handle larger data sets.

For example this function was taking a long time to run on moodle.org
and was causing the MySQL join buffer to overflow.
2017-02-07 01:43:32 +00:00
Eloy Lafuente (stronk7) 3923610e6c Merge branch 'wip-mdl-57851-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-07 01:26:21 +01:00
Eloy Lafuente (stronk7) 0913eb3c2a Merge branch 'wip-mdl-57853-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-06 21:55:05 +01:00
AMOS bot f5b50e0472 Automatically generated installer lang files 2017-02-07 00:05:29 +08:00
Eloy Lafuente (stronk7) 09261027b6 Merge branch 'MDL-53349-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-02-06 16:09:46 +01:00
Dan Poltawski e0c4e6496f Merge branch 'MDL-57660-32' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-02-06 13:47:29 +00:00
Dan Poltawski 672ce4c6cd Merge branch 'MDL-57587_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-02-06 11:04:00 +00:00
Juan Leyva 13a2a8344c 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:33 +01:00
David Monllao 8184f47d6c Merge branch 'MDL-57777-m32' of https://github.com/micaherne/moodle into MOODLE_32_STABLE 2017-02-06 09:41:52 +01:00
Rajesh Taneja 7a7320af90 MDL-57853 phpunit: Remove use of setExpectedException 2017-02-06 11:45:45 +08:00
Stephen Bourget 70fd9fbb39 MDL-55867 block_activity_results: Sort activities alphabetically. 2017-02-05 21:30:01 -05:00
Rajesh Taneja e16448d3f1 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:54:45 +08:00
AMOS bot 2b4eb2cb71 Automatically generated installer lang files 2017-02-03 00:04:16 +08:00
Andrew Hancox ed798679bb MDL-56841 mod_folder: Display edit and download buttons inline 2017-02-02 15:17:00 +00:00
Simey Lameze 299dcca1b1 MDL-56954 theme_boost: apply bs4 styles to course management page 2017-02-02 15:52:51 +08:00
Andrew Nicols c16c53d137 weekly release 3.2.1+ 2017-02-02 11:32:16 +08:00
Andrew Nicols 52723e1e3f Merge branch 'MDL-57630-m32' of https://github.com/micaherne/moodle into MOODLE_32_STABLE 2017-02-02 09:19:08 +08:00
Rajesh Taneja 0bcbd5b205 MDL-54628 behat: Rerun command now include replace option passed 2017-02-02 08:21:31 +08:00
Nadav Kavalerchik ec319d13df MDL-53349 Autocomplete: Support multi lingual COMMA keycode (44) 2017-02-01 16:30:23 +08:00
Ankit Agarwal 0c4422af0b MDL-57300 lti: Make tool provider page more readable 2017-02-01 11:51:32 +05:30
Ankit Agarwal 40dcbac3d6 MDL-57027 accesslib: Improve perf of sql 2017-02-01 13:06:03 +08:00
Petr Skoda 62eb5ef8eb MDL-57027 fix get_users_by_capability()
Change-Id: I98dc88784dfa0293f88a19c3d36e7a46a3f52672
2017-02-01 13:06:02 +08:00
Eloy Lafuente (stronk7) 434e8abac8 Merge branch 'MDL-57592-32' of https://github.com/mwehr/moodle into MOODLE_32_STABLE 2017-02-01 13:06:01 +08:00
Dan Poltawski 28add18d9b Merge branch 'MDL-57588_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2017-02-01 13:06:01 +08:00
Dan Poltawski f9220d8138 Merge branch 'wip-mdl-54628-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-02-01 13:06:00 +08:00
Dan Poltawski 32237b8308 Merge branch 'MDL-57300-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-02-01 13:06:00 +08:00
Dan Poltawski c2ae90c553 Merge branch 'MDL-57728_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-02-01 13:05:59 +08:00
Michael Aherne 7035e0f5b5 MDL-57777 rss: Return 404 when context not found. 2017-01-31 09:31:31 +00:00
Andrew Nicols 6a3777f90c Merge branch 'wip-MDL-57785-32' of git://github.com/amygroshek/moodle into MOODLE_32_STABLE 2017-01-31 12:21:37 +08:00
Andrew Nicols de7a6ff47e Merge branch 'MDL-35978-32-blockfix' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-31 11:51:17 +08:00
Jake Dallimore 46e26a1b69 MDL-35978 comments: fix for comments block which has no toggler 2017-01-31 11:33:02 +08:00
Andrew Nicols 0db0a63e50 Merge branch 'MDL-57296-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-01-31 08:54:47 +08:00
wehr 120798e85f MDL-57592 assignment: Adds filtering of assignment name in grader view 2017-01-30 18:25:17 +01:00
Tim Hunt 4679634e36 MDL-57588 questions: regrading should not lose flags 2017-01-30 14:32:16 +00:00
Dan Poltawski 1c0462deb3 Merge branch 'wip-MDL-57782-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-01-30 10:08:28 +00:00
Dan Poltawski 7dc8cc1ab6 Merge branch 'MDL-35978-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-30 09:54:13 +00:00
Dan Poltawski 170cd579ff Merge branch 'MDL-36233-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2017-01-30 09:34:54 +00:00
Ankit Agarwal 6c83de1d51 MDL-57296 gradelib: Fix get_hidding_effect for grade_type_none items 2017-01-30 13:49:57 +05:30
Ankit Agarwal 0ef42d5f6d MDL-57296 gradebook: Fix issue with gradebook while collapsing grades 2017-01-30 13:49:57 +05:30
Mike Churchward ffc60d23b4 MDL-36233 mod_assign: fixed submission time comparison sql and test. 2017-01-30 09:26:39 +08:00
Rajesh Taneja 4f5a6ca40e MDL-54628 behat: Set behat dir for each run under behat_dataroot
Before this patch behat_dataroot for parallel runs
were created at same level as ->behat_dataroot
After this patch, it will be created 1 level under
->behat_dataroot with BEHAT_PARALLEL_SITE_NAME
prefix and run number as suffix. This will allow
common files as test enabled and parallel run info
to be saved in parent directory and access it easily.
2017-01-30 09:23:58 +08:00
Rajesh Taneja a669c6b21e MDL-54628 behat: Show parallel run command with proper rerun option 2017-01-30 09:23:58 +08:00
Kevin Wiliarty e7734513b8 MDL-57113 boost: min-width for region-main in grade views 2017-01-28 11:47:13 -05:00
Amy Groshek 44b4f83298 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:12:45 -06:00
Marina Glancy 49053808a2 MDL-57782 enrol_self: fix check when email needs to be sent
Thanks to Leandro for providing a fix
2017-01-27 14:25:17 +08:00
Helson Castro 8ea5d72218 MDL-57568 forms: Added missing include for button element. 2017-01-27 14:01:16 +08:00
Jake Dallimore e33b7b342a 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:07:12 +08:00
Jun Pataleta f33a8d4eee MDL-57660 mod_forum: Preserve forum ID selection after form submission 2017-01-27 10:09:54 +08:00
Eloy Lafuente (stronk7) 6a4a1d812c weekly release 3.2.1+ 2017-01-27 00:28:06 +01:00
Eloy Lafuente (stronk7) c94dce9c89 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-01-27 00:28:01 +01:00
Tim Hunt a551ea0210 MDL-57587 question file access: fix regression caused by MDL-53744 2017-01-26 18:54:28 +00:00
Michael Aherne 72b489ef65 MDL-57777 rss: Return 404 when context not found. 2017-01-26 10:51:47 +00:00
Eloy Lafuente (stronk7) 827d93f88a Merge branch 'MDL-55915_32' of https://github.com/rezaies/moodle into MOODLE_32_STABLE 2017-01-24 22:11:41 +01:00
AMOS bot 884f4d3ec3 Automatically generated installer lang files 2017-01-25 00:04:42 +08:00
Ankit Agarwal a072271853 MDL-57300 lti: Rename lti2 as registration url
AMOS BEGIN
CPY [registrationurl,mod_lti],[registrationurl,enrol_lti]
AMOS END
2017-01-24 16:41:04 +05:30
Ankit Agarwal 95c794075a MDL-57300 lti: Fix incorrect variable types in docs 2017-01-24 16:41:04 +05:30
Dan Poltawski 890f84cdb2 Merge branch 'MDL-57639-32' of git://github.com/andrewnicols/moodle into MOODLE_32_STABLE 2017-01-24 10:11:29 +00:00
Dan Poltawski b4e1bbef47 Merge branch 'MDL-57667-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-24 09:40:57 +00:00
Andrew Nicols 678d051bee Merge branch 'm32_MDL-46782' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-24 10:44:03 +08:00
Dan Marsden c83ef7e25b MDL-46782 mod_scorm: fix completion test, remove redundant test. 2017-01-24 13:06:57 +13:00
Dan Poltawski 1ee447d3a4 Merge branch 'wip_32_mdl-50625_ldap_better_check_paged_results_support' of https://github.com/iarenaza/moodle into MOODLE_32_STABLE 2017-01-23 16:21:02 +00:00
Dan Poltawski 217d523d43 Merge branch 'wip-MDL-57511-32' of git://github.com/Beedell/moodle into MOODLE_32_STABLE 2017-01-23 15:39:57 +00:00
Dan Poltawski 76cebe50cb Merge branch 'MDL-57415_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-01-23 12:24:11 +00:00
Dan Poltawski 7dfc04ff98 Merge branch 'MDL-57287-32' of git://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-23 12:19:23 +00:00
Dan Poltawski ff037d9698 Merge branch 'mdl57668-moodle32' of https://github.com/tlock/moodle into MOODLE_32_STABLE 2017-01-23 12:05:33 +00:00
Dan Poltawski 39dc183d9f Merge branch 'wip-mdl-57700-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-23 11:59:11 +00:00
Dan Poltawski f7ddcd23f8 Merge branch 'MDL-57677-32-usermodified' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-01-23 09:48:12 +00:00
Dan Poltawski 92f57f8397 Merge branch 'm32_MDL-46782' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-23 09:28:31 +00:00
Dan Poltawski 98f246ae97 Merge branch 'MDL-57737-32' of git://github.com/crazyserver/moodle into MOODLE_32_STABLE 2017-01-23 09:26:56 +00:00
Pau Ferrer Ocaña f9e7ee4534 MDL-57737 glossary: Add entry description accepts HTML 2017-01-20 13:26:02 +01:00
Shamim Rezaie b14507a31f 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 19:31:08 +11:00
Shamim Rezaie 4436b9e9dd 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 19:30:21 +11:00
Shamim Rezaie 2568183232 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 19:28:36 +11:00
Shamim Rezaie bcca23f9c5 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 19:26:33 +11:00
Rajesh Taneja bab24efe70 MDL-57700 behat: Fixed undefined RuntimeException 2017-01-20 11:05:10 +08:00
Jake Dallimore 45a46ecbd8 MDL-57667 theme: change base layout for boost to columns2
Ensures capability errors are displayed on a page with full navigation.
2017-01-20 08:48:38 +08:00
Stephen Bourget 64cfe467f8 MDL-57728 theme: Fix text display when using tabs 2017-01-19 11:32:52 -05:00
AMOS bot 48f0ebcd49 Automatically generated installer lang files 2017-01-20 00:07:16 +08:00
John Beedell 6537c557b5 MDL-57511 Quiz: Attempts report shows non-unique debugging 2017-01-19 14:44:16 +00:00
Iñaki Arenaza 225e039e73 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 10:58:13 +01:00
Andrew Nicols c8dddb5ccb 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:47:45 +08:00
Andrew Nicols 3e276d6efa weekly release 3.2.1+ 2017-01-19 12:17:57 +08:00
Andrew Nicols adf2ea6166 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-01-19 12:17:56 +08:00
Andrew Nicols fd90d0e925 MDL-57613 enrol_lti: Correct location of upgrade step 2017-01-19 07:56:17 +08:00
Tim Lock 58a4ce4774 MDL-57668 mod_assign: Fix optional_param() form processing 2017-01-19 08:08:07 +10:30
Stephen Bourget b44972cc8b MDL-57415 user: Add missing bootstrap classes to participants page 2017-01-18 10:38:33 -05:00
Dan Poltawski 655570df00 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:33 +01:00
Dan Marsden dbf70dec42 MDL-46782 mod_scorm: Load first incomplete sco on re-entry. 2017-01-18 21:03:52 +13:00
Rajesh Taneja c40ed5f6ff 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:03:07 +08:00
Andrew Nicols 2827c7f997 Merge branch 'MDL-57634-m32' of https://github.com/micaherne/moodle into MOODLE_32_STABLE 2017-01-18 12:38:14 +08:00
Andrew Nicols 2259fb5f36 Merge branch 'wip_MDL-57590_32_forum_search' of https://github.com/mchurchward/moodle into MOODLE_32_STABLE 2017-01-18 08:38:10 +08:00
Dan Poltawski 6dc7039af9 MDL-57604 mod_assign: Adding some missing stuff in 32_STABLE
In order to keep 31, 32 and master the same.
2017-01-18 01:04:48 +01:00
Eloy Lafuente (stronk7) ee7b977a8b Merge branch 'MDL-57604-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2017-01-18 00:17:11 +01:00
Eloy Lafuente (stronk7) f4841f394c Merge branch 'wip-MDL-57608-32-3' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-01-17 20:46:19 +01:00
David Mudrák 6973e38a91 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 19:39:40 +01:00
AMOS bot c1b158b569 Automatically generated installer lang files 2017-01-18 00:07:24 +08:00
Dan Poltawski 21a8a95869 Merge branch 'wip-mdl-57669-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-17 10:28:52 +00:00
sam marshall 359914c8f6 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-17 10:22:13 +00:00
Jake Dallimore 95208fe135 MDL-57287 themes: fix buttons in default dashboard page header
This fix modifies styling for pages having no navbar, such as the
dashboard, site home and default dashboard pages and fixes an overlap
problem with the buttons and context header.
2017-01-17 15:55:39 +08:00
Rajesh Taneja df428648ee MDL-57669 behat: Exit with error code if step undefined 2017-01-17 10:32:47 +08:00
Dan Poltawski 9148905e9a Merge branch 'MDL-57368-32-2' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-16 16:19:57 +00:00
Dan Poltawski 64df3fed13 Merge branch 'MDL-57613-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2017-01-16 16:17:16 +00:00
Mike Churchward ed4aaea57b MDL-57590 mod_forum: fixed search form with forumid and actionurl. 2017-01-16 11:16:27 -05:00
AMOS bot 163fc8588d Automatically generated installer lang files 2017-01-17 00:08:10 +08:00
Dan Poltawski 39e34b9586 Merge branch 'MDL-57452_behat_completion_fix_master_MOODLE_32_STABLE' of https://github.com/gthomas2/moodle into MOODLE_32_STABLE 2017-01-16 13:34:09 +00:00
Dan Poltawski 5c63ab7ee8 Merge branch 'MDL-57601-m32' of https://github.com/sammarshallou/moodle into MOODLE_32_STABLE 2017-01-16 12:23:06 +00:00
Dan Poltawski 3e3068cd11 Merge branch 'MDL-57374_m32' of https://github.com/dasistwas/moodle into MOODLE_32_STABLE 2017-01-16 12:10:51 +00:00
Dan Poltawski a27dde0ba7 Merge branch 'MDL-57554-32' of git://github.com/crazyserver/moodle into MOODLE_32_STABLE 2017-01-16 11:17:59 +00:00
Dan Poltawski b92400a49f Merge branch 'm32_MDL-45821' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-16 09:17:50 +00:00
Dan Poltawski a477c8b752 Merge branch 'wip-MDL-56271-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2017-01-16 08:01:23 +00:00
Pau Ferrer Ocaña 7f52d5c740 MDL-57554 forum: Mark as read on view_forum_discussion calls 2017-01-13 09:27:06 +01:00
John Okely f52bdbb885 MDL-57613 enrol_lti: Allow longer nonces 2017-01-13 11:22:19 +08:00
David Bogner 7c519588f1 MDL-57374 editor: Pasting plain text in Atto removes all styles/classes 2017-01-12 18:00:37 +01:00
AMOS bot 7345917de4 Automatically generated installer lang files 2017-01-13 00:05:19 +08:00
Stephen Bourget 8a71b10a68 MDL-53991 calendar: fix repeating events on course import 2017-01-12 09:40:38 -05:00
Michael Aherne 18907a51d5 MDL-57634 messaging: Ensure test uses a configured plugin 2017-01-12 12:31:56 +00:00
gthomas2 11d04ffe8a MDL-57452 behat: Make completion check work with manual completion input 2017-01-12 11:38:59 +00:00
Dan Poltawski 5e1014a76e weekly release 3.2.1+ 2017-01-12 07:42:37 +00:00
Dan Poltawski 6e497e6e7d Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-01-12 07:42:36 +00:00
Jake Dallimore 66a4a376ee MDL-57368 mod_feeback: fix drag and drop question reordering in boost 2017-01-12 11:37:43 +08:00
Jake Dallimore 3563244314 MDL-57368 templates: add example context to core_form/element-template 2017-01-12 11:37:34 +08:00
Dan Poltawski bf02dc9819 MDL-57608 media_videojs: lazily load videojs on demand
The videojs javascript is over 1MB of javascript which we don't need to
load on every page, now that we only require it demand, the js can be
lazily loaded when its needed, which keeps the first.js smaller and more
likely to stay in browser cache.
2017-01-12 10:56:06 +08:00
Dan Poltawski 8e8c066448 MDL-57608 media_videojs: fix third party locations 2017-01-12 10:56:06 +08:00
Marina Glancy 67f83d9279 MDL-57608 media_videojs: load youtube module only when requested 2017-01-12 10:56:06 +08:00
Michael Aherne bcd1915dd0 MDL-57630 messaging: Pass unit test with third-party plugins 2017-01-11 16:39:31 +00:00
Eloy Lafuente (stronk7) 992ffccfd2 Merge branch 'wip-mdl-57595-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-11 02:29:56 +01:00
Dan Poltawski 97fd5a9841 Merge branch 'MDL-57480-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2017-01-10 08:40:12 +00:00
Marina Glancy 6b47a070e7 MDL-56271 mod_feedback: recaptcha was not working 2017-01-10 14:08:26 +08:00
David Monllao b4cfb7d733 Merge branch 'MDL-57385-32-2' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2017-01-10 05:27:11 +01:00
Marina Glancy a9fa51024f MDL-50770 blocks: copy sitewide blocks positions when cloning dashboards 2017-01-10 11:40:27 +08:00
Jun Pataleta 2eec6ffc6c MDL-57385 core: Set page layouts of non-mydashboard pages to standard
The following pages are using the "mydashboard" page layout:
* User preferences > Badges > Manage badges
* User preferences > Badges > Backpack settings
* User preferences > Repositories > Manage instances
* Private files
However, the "mydashboard" page layout should only be used for the user's
dashboard page. Changing these to use the "standard" page layout.
2017-01-10 09:46:18 +08:00
Rajesh Taneja 3f1574f849 MDL-57595 behat: Added redirect and wait to ensure next step pass 2017-01-10 08:45:43 +08:00
Jake Dallimore 40b78a23e9 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:47:18 +08:00
Dan Poltawski fb5655b5c2 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:28:01 +00:00
sam marshall 405dcba6f3 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:14:44 +00:00
Dan Poltawski 7f32c5a447 Merge branch 'MDL-57427_m32' of https://github.com/jrchamp/moodle into MOODLE_32_STABLE 2017-01-09 16:26:18 +00:00
AMOS bot ec3eeb7ace Automatically generated installer lang files 2017-01-10 00:04:55 +08:00
Jonathan Champ 1af3d13bf3 MDL-57427 cache: Use perfdebug only when enabled 2017-01-09 10:18:41 -05:00
David Monllao 84122523ba Merge branch 'wip-mdl-55042-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-09 12:56:12 +01:00
godric 382c069e52 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:03 +00:00
Dan Poltawski 3f58a36504 Merge branch 'wip-mdl-56211-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-09 09:58:42 +00:00
Dan Poltawski 9e41e4e8ea Merge branch 'MDL-57373-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-01-09 09:42:17 +00:00
Dan Poltawski 7523d99558 Merge branch 'MDL-53367_32' of https://github.com/juancs/moodle into MOODLE_32_STABLE 2017-01-09 08:27:56 +00:00
Dan Marsden 9a375bdf6c MDL-45821 mod_scorm: Check lesson_status correctly for multi-sco. 2017-01-09 20:08:10 +13:00
Eloy Lafuente (stronk7) 07f6358b03 Moodle release 3.2.1 2017-01-08 11:04:37 +01:00
AMOS bot 7ffb98d0f5 Automatically generated installer lang files 2017-01-08 00:04:57 +08:00
Dan Poltawski dda99bb3f2 weekly release 3.2+ 2017-01-06 01:30:59 +00:00
Dan Poltawski 9cff26295b Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2017-01-06 01:30:57 +00:00
Rajesh Taneja 2fd5ceadb5 MDL-56211 behat: Add suite name to faildump path
If suite is not default then add suite name
to end of faildump file name
2017-01-06 09:20:10 +08:00
David Mudrák 5865a6875b 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:39:51 +01:00
Dan Poltawski ef2eed1b3c Merge branch 'MDL-57563-32-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-01-05 10:11:40 +00:00
Rajesh Taneja 6601017d02 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:06 +00:00
Daniel Thee Roperto a204d7d921 MDL-57576 assignment: Overwrite feedback file if it has the same name. 2017-01-05 15:32:51 +11:00
Damyon Wiese bf345fc4ca MDL-57009 javascript: cibot nagging 2017-01-05 09:36:09 +08:00
Damyon Wiese 2722404791 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.
2017-01-05 09:36:09 +08:00
Damyon Wiese 256f820dfd MDL-57009 js: Do not fetch the same template twice
Also clean up promises use of done vs then.
2017-01-05 09:36:09 +08:00
Damyon Wiese 173f5515e3 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:09 +08:00
David Mudrák 7ed6f330c6 MDL-57563 lang: Use the new newsitemsnumber wording in behat 2017-01-04 22:19:32 +01:00
Helen Foster 418d01aaf4 MDL-57563 lang: Merge English strings from the en_fix language pack 2017-01-04 22:18:31 +01:00
AMOS bot 11f9ff55e1 Automatically generated installer lang files 2017-01-05 00:05:20 +08:00
Dan Poltawski 04d4796089 Merge branch 'MDL-57531-32-phpmailer' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2017-01-04 13:28:39 +00:00
David Mudrák e889aee562 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 12:37:36 +01:00
David Mudrák 228157ebf5 MDL-57531 mail: Do not let admins set invalid email addresses
The noreply and support emails should always be valid.
2017-01-04 12:37:36 +01:00
Eloy Lafuente (stronk7) c77ae4e017 Merge branch 'MDL-57192-32' of git://github.com/ankitagarwal/moodle into MOODLE_32_STABLE 2017-01-04 11:34:23 +00:00
David Mudrák 1da3022e50 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 11:34:22 +00:00
David Monllao f6507b8e35 Merge branch 'm32_MDL-49557' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-04 11:34:22 +00:00
David Monllao d52b937932 MDL-57338 templates: Fix modal_cancel template name 2017-01-04 11:34:21 +00:00
Rajesh Taneja ce36e3626f MDL-57536 availability: Fixed css for clean theme 2017-01-04 11:34:21 +00:00
Ankit Agarwal 063f7c198b MDL-56992 core_scss: Don't allow invalid files to be included
We allow only .scss files so allow files to be included only and only if they end in .scss and they exist on server under theme directory.
2017-01-04 11:34:20 +00:00
Andrew Nicols 83dedbcd33 MDL-56225 mod_forum: Remove unnecessary attributes from update 2017-01-04 11:34:20 +00:00
Dan Marsden 0ad466926d MDL-49557 mod_scorm: optionally strip quotes. 2017-01-04 15:45:08 +13:00
Ankit Agarwal ced9a33352 MDL-57192 dml: Temporarily disable query logging during setup 2017-01-03 17:27:08 +05:30
Ankit Agarwal 3b4fba5588 MDL-57192 dml: Support temporarily disabling query logs during setup 2017-01-03 17:27:08 +05:30
Rajesh Taneja 926d5a53ff 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:00:05 +08:00
Eloy Lafuente (stronk7) 9cc9dabf17 Merge branch 'wip-mdl-57494-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2017-01-03 02:35:10 +01:00
Eloy Lafuente (stronk7) cb8be0b6b8 Merge branch 'MDL-57536-32' of git://github.com/jleyva/moodle into MOODLE_32_STABLE 2017-01-02 18:59:55 +01:00
Juan Leyva c6bd4c1a45 MDL-57536 availability: Document required selectors changes
MDL-55839 Introduced some changes in CSS selectors used by the form.js
file.

This caused contributed plugins to not work (javascript stop working)
when editing a module.
2017-01-02 18:52:22 +01:00
Davo Smith 31e4c05002 MDL-47198 filelib: fix curl handling headers with no value 2017-01-02 16:43:52 +01:00
Dan Poltawski c5f11c0f3c Merge branch 'm32_MDL-49557' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2017-01-02 12:35:10 +00:00
Dan Poltawski 6158379f75 Merge branch 'MDL-57080-m32' of https://github.com/micaherne/moodle into MOODLE_32_STABLE 2017-01-02 12:15:02 +00:00
Dan Poltawski bc076bf1b8 Merge branch 'wip-MDL-57464-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2017-01-02 11:16:24 +00:00
Dan Poltawski 27a3a42efd MDL-57532 calendar: tidy up button grouping 2017-01-02 10:45:24 +00:00
Dan Poltawski b0c2ea4640 Merge branch 'MDL-57532_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2017-01-02 10:45:20 +00:00
David Monllao 00ef7b1caa Merge branch 'MDL-56926_32' of git://github.com/dmonllao/moodle into MOODLE_32_STABLE 2016-12-30 10:00:08 +01:00
David Monllao 7914b0035f MDL-56926 theme_boost: Restore filepicker's filename and icons original spacing 2016-12-30 09:57:41 +01:00
Nadav Kavalerchik cb358279b7 MDL-56926 Theme/Boost: Fix filepicker folder tree YUI guides 2016-12-30 09:57:35 +01:00
AMOS bot 339edb47e2 Automatically generated installer lang files 2016-12-30 00:05:21 +08:00
Dan Poltawski bd6bc508df Merge branch 'MDL-57512-32' of git://github.com/crazyserver/moodle into MOODLE_32_STABLE 2016-12-29 11:50:58 +00:00
Dan Poltawski c53194f3f9 Merge branch 'm32_MDL-50643' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2016-12-29 11:46:48 +00:00
Pau Ferrer Ocaña c477dc23c0 MDL-57512 categories: Use maxcategorydepth only when getting all cats 2016-12-29 12:05:27 +01:00
David Monllao 8cd421e941 Merge branch 'MDL-57338-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2016-12-29 10:52:30 +01:00
Dan Poltawski f18c2a9d15 MDL-57338 templates: fix missing example variables
From Davids review, thanks
2016-12-29 08:05:04 +00:00
David Monllao 403e0d96e5 Merge branch 'MDL-57331-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2016-12-28 22:32:33 +01:00
Dan Poltawski 5984ffded4 Merge branch 'MDL-57451-32' of https://github.com/lucisgit/moodle into MOODLE_32_STABLE 2016-12-28 21:17:48 +00:00
Dan Poltawski cd9a925e6a Merge branch 'MDL-55955_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2016-12-28 21:17:47 +00:00
Dan Poltawski 40471ed54c Merge branch 'wip-MDL-57366-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2016-12-28 21:17:46 +00:00
David Monllao 000b0949e6 Merge branch 'MDL-57491_m32v3' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2016-12-28 21:17:46 +00:00
Dan Poltawski 6c7f60dbc0 Merge branch 'MDL-57417-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2016-12-28 21:17:45 +00:00
David Monllao 3b37e372f2 Merge branch 'MDL-52366-32-mustachethemedir' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2016-12-28 12:23:49 +01:00
David Monllao 44b94d9324 Merge branch 'MDL-57450-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2016-12-28 11:48:05 +01:00
Dan Poltawski e5bc84f84f MDL-57251 upgrade: bump versions
and remove uncessary ->mark_dirty()
2016-12-28 10:28:37 +00:00
Dan Poltawski a38d0650d4 Merge branch 'wip-MDL-57251-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2016-12-28 10:28:31 +00:00
David Monllao 8d9edc0e7c Merge branch 'MDL-57357-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2016-12-28 11:17:11 +01:00
David Monllao 4e0357c1e3 Merge branch 'MDL-56488-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2016-12-28 10:58:22 +01:00
Dan Poltawski 9efd73abec Merge branch 'wip-MDL-57292-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2016-12-28 09:13:37 +00:00
Dan Poltawski c31b5bbf9d Merge branch 'MDL-57474-32-messageid' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE 2016-12-28 08:56:06 +00:00
Dan Marsden 7606ba2133 MDL-49557 mod_scorm: fix AICC pre-requisite handling. 2016-12-28 10:09:00 +13:00
Ankit Agarwal 88c0fcb03f MDL-57373 navigation: Fix course names in flat nav 2016-12-27 12:21:02 +05:30
Stephen Bourget 51b7f8f0a4 MDL-57532 calendar: Add missing bootstrap classes 2016-12-26 11:41:50 -05:00
AMOS bot 40fdf0f84f Automatically generated installer lang files 2016-12-27 00:08:58 +08:00
AMOS bot 3e99f4f642 Automatically generated installer lang files 2016-12-26 00:05:52 +08:00
AMOS bot 324e613b48 Automatically generated installer lang files 2016-12-25 00:04:37 +08:00
Adrian Greeve 502397dcbc MDL-57464 mod_lesson: fix notice with sub-clusters. 2016-12-23 11:12:27 +08:00
Jake Dallimore f1f83c3ba1 MDL-57357 auth: add behat coverage for remember username login feature 2016-12-23 11:04:19 +08:00
Jake Dallimore 2c3f09ccf7 MDL-57357 auth: fix the remember username feature on login page 2016-12-23 10:45:06 +08:00
Adrian Greeve e2f5592b8f 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:36:12 +08:00
Mark Nelson 522fcf2ffc MDL-55955 mod_quiz: ensure duplicated override events are removed 2016-12-23 10:02:47 +08:00
Jake Dallimore 96e743ff78 MDL-57417 navigation: fix legacy_activity_onclick_handler callback scope 2016-12-23 08:43:37 +08:00
Dan Marsden e514ae345e MDL-50643 mod_scorm: redirect using current window instead of parent. 2016-12-23 10:18:52 +13:00
Stephen Bourget 2659b808ab MDL-57491 report_log: Improve filtering code by using static entries 2016-12-22 16:12:34 -05:00
AMOS bot 54037cf3e2 Automatically generated installer lang files 2016-12-23 00:04:18 +08:00
Dan Poltawski b0773d70c6 MDL-57338 message: fix template component 2016-12-22 12:57:11 +00:00
Dan Poltawski 4348fffe0c MDL-57338 templates: add missing example context 2016-12-22 12:57:11 +00:00
Dan Poltawski 216c68b834 MDL-57338 chart: add example context
And fix aria roles
2016-12-22 12:57:11 +00:00
Dan Poltawski a3c1bd86ed MDL-57338 mustache: fix admin_setting_tabs
* Add example context
* Fix validation issue (need role="tablist" to contain the tabs)
2016-12-22 12:57:11 +00:00
Michael Aherne e0006399ff MDL-57080 completion: Update completion expected date on reset 2016-12-22 11:43:39 +00:00
Tony Butler 2084c59b82 MDL-57451 theme_boost: Add checkboxgroup class to checkbox input element 2016-12-22 11:30:24 +00:00
Dan Poltawski a09a9879e5 weekly release 3.2+ 2016-12-22 08:15:17 +00:00
Dan Poltawski a3a095b6eb Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2016-12-22 08:15:15 +00:00
Adrian Greeve 0edf724367 MDL-57292 tool_lpimportcsv: Fix for unit tests. 2016-12-22 14:41:32 +08:00
Simey Lameze a953ac5942 MDL-57292 tool_lpimportcsv: display progress bar for large imports 2016-12-22 14:41:17 +08:00
Rajesh Taneja 5627b0b1a1 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:44:38 +08:00
David Monllao 5d3a7be453 Merge branch 'MDL-55575_B_32' of https://github.com/bostelm/moodle into MOODLE_32_STABLE 2016-12-21 05:50:17 +01:00
David Mudrák 8f27fdf1ab MDL-57474 mailer: Make sure that our exlicit MessageID is trimmed
The new version of phpmailer shipped with Moodle 3.2 has added check
that the explicitly provided MessageID matches /^<.*@.*>$/.

Values coming from our overridden moodle_phpmailer::addCustomHeader()
had a whitespace at the start. So the requested value was not used as
the Message-ID header and the default phpmailer value was used.

As a result, forum posts threading was broken in email clients.
2016-12-21 01:11:32 +01:00
AMOS bot 1d5c2c6560 Automatically generated installer lang files 2016-12-21 00:04:00 +08:00
Simey Lameze 18317c7c1c MDL-57114 filemanager: apply btn-sm class to buttons
This commit also creates a new css rule to fix the file picker icons misalignment.
2016-12-20 10:34:08 +00:00
Dan Poltawski b83fd5b1fe Merge branch 'MDL-54996_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2016-12-20 09:19:27 +00:00
Juan Segarra Montesinos 972304f4cb 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 08:55:34 +01:00
Adrian Greeve 11eeb2e347 MDL-57251 navigation: Correct permission shows site admin
If the user does not have the moodle/site:configview
capability then do not show them the site administration
link.
2016-12-20 14:54:34 +08:00
Adrian Greeve 0aa8b11f5c MDL-57251 administration: Updated coursecreator role.
The coursecreator role now has the moodle/site:configview
capability so that they have access to the required admin
pages.
2016-12-20 14:54:34 +08:00
John Okely 829cafc050 MDL-57331 messaging: Fix sent messages appearing twice. 2016-12-20 10:48:01 +08:00
John Okely 25474b5e84 MDL-57268 auth_db: Unit tests for deletion from a large user set 2016-12-20 02:27:05 +01:00
Rafal Domagalski b7f902b5b3 MDL-52366 themes: check for templates in themedir 2016-12-19 18:08:37 +01:00
Dan Poltawski 11488775eb Merge branch 'MDL-57386-32' of git://github.com/damyon/moodle into MOODLE_32_STABLE 2016-12-19 15:46:59 +00:00
Dan Poltawski 32ec7e3d30 Merge branch 'MDL-55568_m32v2' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2016-12-19 14:33:06 +00:00
Dan Poltawski 1a1eef4345 Merge branch 'wip-MDL-56912-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2016-12-19 12:21:23 +00:00
Eloy Lafuente (stronk7) 4942dfc7cd Merge branch 'MDL-57270_32' of git://github.com/markn86/moodle into MOODLE_32_STABLE 2016-12-19 13:04:25 +01:00
Eloy Lafuente (stronk7) d469fb2181 Merge branch 'MDL-57293-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2016-12-19 13:02:16 +01:00
Dan Poltawski 0213ce081c Merge branch 'MDL-52098_32_STABLE' of git://github.com/Chocolate-lightning/moodle into MOODLE_32_STABLE 2016-12-19 11:25:49 +00:00
David Monllao 70b6a6618a Merge branch 'MDL-57402_32' of git://github.com/timhunt/moodle into MOODLE_32_STABLE 2016-12-19 12:23:45 +01:00
Dan Poltawski 089cf944f3 MDL-57450 enviroment: remove tls library check
Unfortunately it has come to light that the version sniffing is just not
reliable at all, operating system vendors backport security patches to
older versions - so in many cases we reporting a problem which is not a
problem. False positives and the solution to self-compile or something
like php will be causing more harm than good.
2016-12-19 10:53:59 +00:00
Dan Poltawski 68d9adcba8 Merge branch 'MDL-53044-m32' of https://github.com/ak4t0sh/moodle into MOODLE_32_STABLE 2016-12-19 08:47:23 +00:00
Dan Poltawski 32636d1757 Merge branch 'MDL-55715_m32v1' of https://github.com/sbourget/moodle into MOODLE_32_STABLE 2016-12-19 08:35:43 +00:00
Stephen Bourget 48ff43d3bd MDL-54996 Calendar: Fix dates for future multi-day events
Thanks to Martin Cunliffe for providing the fix
2016-12-17 10:53:00 -05:00
Mathew May 725863abe4 MDL-52098 enrol: cohort now looks at instance status 2016-12-16 11:22:06 +13:00
Arnaud Trouve 9de4bbf8a8 MDL-53044 auth : force change on expired password 2016-12-15 15:11:30 +01:00
Dan Poltawski cd7ca81fdd MDL-57293 lang/email: Improve emailvia string
* Strip the https? part of url for existing strings
* Switch the string to (via shortname)
2016-12-15 09:54:34 +00:00
Andrew Nicols 1ca30f2503 weekly release 3.2+ 2016-12-15 11:34:25 +08:00
Andrew Nicols c47a9439d3 Merge branch 'install_32_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_32_STABLE 2016-12-15 11:34:21 +08:00
Damyon Wiese 2ce5b1d637 MDL-57386 blocklib: wrong variable in is_block_present
This isn't reachable code in core moodle, but themes/plugins could call is_block_present to trigger it.
2016-12-15 10:51:31 +08:00
Tim Hunt c4ade76ee5 MDL-57402 quiz editing: fix add heading after remove page break 2016-12-14 16:35:17 +00:00
AMOS bot 62fc665ff6 Automatically generated installer lang files 2016-12-15 00:04:14 +08:00
Dan Poltawski 263865899e MDL-56488 boost: validate scss settings for parsable scss
* Parses the scss and fails validation if a parse error is found

* Does not detect the situation when variables are not present - this
  would involve us parsing the entire tree and would be slow. It could
  also change over time, depending on whats defined in the scss
  from themes.

* Introduces a new admin_setting_scsscode to do this
2016-12-14 11:34:25 +00:00
Mark Nelson f927f3e196 MDL-57270 core_message: trim message before it is sent 2016-12-14 12:19:24 +08:00
Stephen Bourget 70f5e9ba61 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:06:44 -05:00
Andrew Nicols 3b7bf2cee0 Merge branch 'wip-mdl-57380-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2016-12-14 09:56:57 +08:00
Mark Nelson a57a9053d7 MDL-55062 tool_uploaduser: prevent defaults when not selected 2016-12-14 09:49:04 +08:00
Rajesh Taneja 0292245755 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:38:35 +08:00
Stephen Bourget dd7aa695b2 MDL-55568 chat: chat_refresh_events should only create published events 2016-12-13 18:53:40 -05:00
Eloy Lafuente (stronk7) 2626dce64c Merge branch 'MDL-55809-32' of https://github.com/xow/moodle into MOODLE_32_STABLE 2016-12-13 20:05:23 +01:00
Dan Poltawski 7e2e135943 Merge branch 'MDL-57125-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2016-12-13 16:34:58 +00:00
Matt Davidson cc15b9d46f 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-13 14:56:52 +00:00
Eloy Lafuente (stronk7) ce47bacfe9 Merge branch 'MOODLE_32_STABLE' of https://github.com/fwsl/moodle into MOODLE_32_STABLE 2016-12-13 12:00:58 +01:00
ak4t0sh 7c89091995 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-12-13 11:49:32 +01:00
Henning Bostelmann 7766ffc618 MDL-55575 mod_glossary: Allow viewing all entries on one page 2016-12-13 11:46:03 +01:00
Mark Nelson 75efa0860c MDL-57250 core: show admin settings when only one category exists 2016-12-13 10:25:19 +00:00
Dan Poltawski d31412392c Merge branch 'MDL-56859-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2016-12-13 09:45:19 +00:00
Dan Poltawski da694c75ff Merge branch 'MDL-57074-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2016-12-13 09:26:08 +00:00
Adrian Greeve 76f5d7b9ab MDL-57216 navigation: Updated parent behat test. 2016-12-13 09:04:40 +00:00
Adrian Greeve e7d8926583 MDL-57216 navigation: Added missing grade overview link.
For theme_boost the grade overview link has been added
to the user profile page.
2016-12-13 09:04:36 +00:00
Dan Poltawski c87f1ac4c7 Merge branch 'MDL-57182-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2016-12-13 08:47:35 +00:00
Dan Poltawski 75c4f5b0ca Merge branch 'wip-MDL-57257-32' of git://github.com/abgreeve/moodle into MOODLE_32_STABLE 2016-12-13 08:46:03 +00:00
Marina Glancy f7b3774380 MDL-56912 feedback: empty multichoice questions do not submit 2016-12-13 15:01:04 +08:00
Andrew Nicols 78293c74bf Merge branch 'MDL-57213-32-2' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2016-12-13 13:06:25 +08:00
Simey Lameze 406fc019c1 MDL-57125 comment: prevent js execution if there are no comments 2016-12-13 11:55:05 +08:00
Jun Pataleta 903cd37434 MDL-57213 navigation: Load all my course categories into navigation tree
* Load all of the relevant course categories of the courses that a user
  is enrolled in.
2016-12-13 11:43:22 +08:00
Nadav Kavalerchik 6fd8b0098a MDL-57056 Theme/Boost: Fix "Skip to" link when Tab key pressed 2016-12-13 10:47:50 +08:00
Jan Dageförde 34954a6050 MDL-57257 lesson: Validate type of numerical answer 2016-12-13 10:34:36 +08:00
Mark Nelson 949d8ae04e MDL-57222 mod_assign: show validation message on visible element 2016-12-13 10:30:38 +08:00
Eloy Lafuente (stronk7) 1c7cbed23c Merge branch 'wip-mdl-57328-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2016-12-13 02:30:06 +01:00
Eloy Lafuente (stronk7) 9156498826 Merge branch 'mdl32_MDL-57324' of git://github.com/danmarsden/moodle into MOODLE_32_STABLE 2016-12-13 02:02:02 +01:00
Jake Dallimore 71adc9a9a3 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:20:58 +08:00
Eloy Lafuente (stronk7) 49612b733f Merge branch 'MDL-57319-32' of git://github.com/danpoltawski/moodle into MOODLE_32_STABLE 2016-12-12 16:23:20 +01:00
Arnaud Trouve bc0721c7d9 MDL-56525 forum: remove targeted user enrolment check
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-12 14:10:21 +00:00
Ryan Wyllie c5452484ee MDL-55782 groups: wrap long group names (theme: boost)
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-12 13:19:18 +00:00
= 74eecb6078 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-12 13:19:15 +00:00
Dan Poltawski 725be51c11 Merge branch 'wip-mdl-52796-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2016-12-12 13:00:56 +00:00
Philipp Hager d0d8a7f984 MDL-57198 course: add css-classes to restrictbygroup-button 2016-12-12 12:46:52 +00:00
Adrian Greeve 4a50811ae3 MDL-57299 Atto: Theme boost fix for manage files.
Theme boost removed a selector that was being used
to remove used files and so the page wasn't loading
properly.
2016-12-12 12:40:09 +00:00
Dan Poltawski b82ddcbcac Merge branch 'wip-mdl-57325-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2016-12-12 12:23:25 +00:00
Dan Poltawski 6e4cc6caf4 Merge branch 'wip-mdl-57314-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2016-12-12 12:21:31 +00:00
Dan Poltawski fe8e9b1b4e Merge branch 'wip-mdl-57343-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2016-12-12 12:21:13 +00:00
Dan Poltawski 72770e9a60 Merge branch 'MDL-57171-32-2' of git://github.com/junpataleta/moodle into MOODLE_32_STABLE 2016-12-12 10:31:13 +00:00
Dan Poltawski a847efc70b Merge branch 'MDL-56566_32' of https://github.com/bostelm/moodle into MOODLE_32_STABLE 2016-12-12 09:20:13 +00:00
Ilya Tregubov 9e99327888 MDL-55906 table: Update user preferences table when reset preferences 2016-12-12 09:07:30 +00:00
Andrew Nicols 9973eebb91 Merge branch 'MDL-46714-32-nadav' of git://github.com/FMCorz/moodle into MOODLE_32_STABLE 2016-12-12 13:26:58 +08:00
Nadav Kavalerchik a162f636d8 MDL-46714 Calendar: Properly order Date & Time fields in RTL mode 2016-12-12 12:38:45 +08:00
Rajesh Taneja 8ff8d598fe MDL-57343 behat: Ensure we wait enough for page to be fully loaded 2016-12-12 10:38:32 +08:00
Ramindu Deshapriya 8704d2e5fc MDL-52796 behat: Behat feature to test reset wiki page, tags & comments 2016-12-12 10:27:44 +08:00
Bram Tassyns f9dd21a17a MDL-56859 SCORM: player shouldn't display TOC while loading 2016-12-12 09:11:50 +08:00
Jake Dallimore eb349bdfc4 MDL-57074 Filepicker: Fix alias and link icons in RTL mode
Fixed alignment of the images in RTL mode. Also fixed a z-index problem
in which the icons were displayed above the open drawer on narrow
screens.
2016-12-12 08:48:15 +08:00
AMOS bot 89d186af72 Automatically generated installer lang files 2016-12-10 00:04:00 +08:00
Dan Poltawski 65de977483 MDL-57319 outputlib: raise timeout for scss/less compilation 2016-12-09 08:47:05 +00:00
Rajesh Taneja e167481759 MDL-57328 core: Remove xdebug extension, so test run faster 2016-12-09 10:24:01 +08:00
Rajesh Taneja 457c913461 MDL-57325 behat: Fixed backup/restore steps to use proper api 2016-12-09 09:31:13 +08:00
Rajesh Taneja 422449dca8 MDL-57328 core: Run tests with php 7.1 2016-12-09 08:49:21 +08:00
Dan Marsden 53c8f0ca3c MDL-57324 scorm: exclude objective raw.score from grade update 2016-12-09 10:13:20 +13:00
Henning Bostelmann b094b88a9a 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 20:28:10 +00:00
AMOS bot 49e5d04a8d Merge branch 'MOODLE_32_STABLE' into install_32_STABLE 2016-12-09 00:04:15 +08:00
AMOS bot 38e28dfbcd Automatically generated installer lang files 2016-12-08 18:11:21 +08:00
Dan Poltawski 44047dc78d weekly release 3.2+ 2016-12-08 08:43:05 +00:00
Marina Glancy c06b8145b1 MDL-56614 behat: add missing wait for page is ready 2016-12-08 13:51:53 +08:00
Franziska Hübler 79da2c5bfa MDL-55809 glossary: Keep file author and license across import/export 2016-12-08 12:28:22 +08:00
Andrew Nicols a5800adaf0 Merge branch 'MDL-57278-32-5' of https://github.com/xow/moodle into MOODLE_32_STABLE 2016-12-08 10:53:37 +08:00
John Okely c1c3f50965 MDL-57278 signup: Fix double encoding of confirmation links 2016-12-08 10:17:50 +08:00
John Okely cff14cf0d1 MDL-57278 signup: Unit tests covering confirmation link generation 2016-12-08 10:17:50 +08:00
Rajesh Taneja c95ea731bc MDL-57314 behat: Press enter after setting password unmask 2016-12-08 09:24:37 +08:00
Rajesh Taneja b98f14632b MDL-56642 dataformat: Fixed method_exits parameters 2016-12-08 00:37:03 +01:00
Mark Nelson a1e1b45ae7 MDL-57283 core: fixed function call on null 2016-12-07 10:17:36 +00:00
Kenneth Hendricks 2d44bb544b MDL-56674 core: Fix test_get_all_observers 2016-12-07 08:46:04 +00:00
Marina Glancy c60d333578 MDL-56614 behat: corrections to new steps 2016-12-07 14:58:39 +08:00
Andrew Nicols 182690b018 Merge branch 'wip-mdl-56353-m32' of https://github.com/rajeshtaneja/moodle into MOODLE_32_STABLE 2016-12-07 12:03:36 +08:00
Rajesh Taneja b36b54179d MDL-56353 behat: Added test for multi select dependency 2016-12-07 11:19:01 +08:00
Andrew Nicols fc4b768e25 Merge branch 'wip-MDL-56642-32' of git://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2016-12-07 10:00:59 +08:00
Andrew Nicols 7e0f1972f1 Merge branch 'MDL-57266_32' of git://github.com/stronk7/moodle into MOODLE_32_STABLE 2016-12-07 09:54:33 +08:00
Andrew Nicols 93e64c823c Merge branch 'MDL-56240_32' of git://github.com/stronk7/moodle into MOODLE_32_STABLE 2016-12-07 09:51:07 +08:00
Rajesh Taneja 20d598f094 MDL-56614 behat: Fixed steps to use new definition 2016-12-07 09:43:06 +08:00
Marina Glancy e376549179 MDL-56642 dataformat: set temp dir
Thanks to Chien Wen-Chang for proposing a patch
2016-12-07 09:30:25 +08:00
Rajesh Taneja 163a317bcc MDL-57137 behat: Subcategory has black space before name 2016-12-07 09:13:26 +08:00
Dan Poltawski 7ecf13ac1d Merge branch 'MDL-45873_32' of https://github.com/bostelm/moodle into MOODLE_32_STABLE 2016-12-06 15:56:28 +00:00
Ankit Agarwal 2fbe4fca87 MDL-57284 boost: Fix booktool_print icons 2016-12-06 15:50:57 +00:00
Jun Pataleta d07a8ebd7e MDL-57171 admin: Make environment check table look better
* Use Bootstrap label classes for the text under the status column.
* theme_bootstrapbase:
  - Cleanup unnecessary classes and make .error styles consistent
    with .warn styles
* theme_boost:
  - Set font color appropriate for success, warning and error strings.
* Enclose report text in div so that the feedback texts will be
  displayed right below it.
2016-12-06 22:18:55 +08:00
SSRF d4feb70e17 MDL-53677 tool_spamcleaner: CSRF Fix
Resolves minor CSRF within Moodle spamcleaner.
2016-12-06 12:48:31 +00:00
Dan Poltawski f477809e38 Merge branch 'MDL-56836-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2016-12-06 12:46:19 +00:00
Daniel Thee Roperto 94caed45db 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-06 12:42:17 +00:00
Dan Poltawski 8c4fdb1073 MDL-56778 enrol: add note about legacy css 2016-12-06 12:32:30 +00:00
Nadav Kavalerchik e5bbe44230 MDL-56778 Enrollment: Fix enroll users dialog in RTL mode (theme:Boost) 2016-12-06 12:32:23 +00:00
Tim Hunt d0a58fe035 MDL-57199 question preview: make HTML ids unique 2016-12-06 12:25:45 +00:00
Michael Aherne 9c68157292 MDL-56971 enrol: Use autoloading in enrol_get_plugin() 2016-12-06 11:08:17 +00:00
Grzegorz Ziółek 44f71599df MDL-56830 config_log: Add block plugin visibility changes to config_log. 2016-12-06 11:51:48 +01:00
Alexander Melihov 1fac7b914b 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-12-06 15:34:13 +08:00
Tony Butler cede73411f MDL-56346 assignfeedback_editpdf: Correct typo in property name 2016-12-06 14:38:01 +08:00
Andrew Nicols 47deb83b5c Merge branch 'MDL-56301-32' of https://github.com/snake/moodle into MOODLE_32_STABLE 2016-12-06 14:27:03 +08:00
Andrew Nicols 4ea56c1c80 Merge branch 'wip-MDL-56614-m32-2' of https://github.com/marinaglancy/moodle into MOODLE_32_STABLE 2016-12-06 13:38:08 +08:00
Marina Glancy 311121b16c MDL-56614 behat: add navigation block when required
Most of these hacks have links to corresponding MDL issues
2016-12-06 13:35:40 +08:00
Marina Glancy 5863f1b073 MDL-56614 behat: rename step for navigating in the gradebook 2016-12-06 13:35:40 +08:00
Marina Glancy 2bb195f64f MDL-56614 behat: navigate without navigation and admin blocks 2016-12-06 13:35:40 +08:00
Marina Glancy f6b50d9901 MDL-56614 block_navigation: Add block in behat tests 2016-12-06 13:35:39 +08:00
Marina Glancy a0b0234a18 MDL-56614 behat: new steps for navigation without blocks 2016-12-06 13:35:39 +08:00
Andrew Nicols f8b8a363ae Merge branch 'MDL-57161-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE 2016-12-06 13:10:40 +08:00
Donald Barrett b197272987 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:40:49 +08:00
Juan Leyva e4976aefc5 MDL-57255 gradereport_user: Fix default value for graderaw
graderaw is a PARAM_FLOAT, the default to empty string was incorrect
2016-12-06 10:18:53 +08:00
David Monllao dcd408b81f MDL-57161 search: Set the correct HTTP header
All credit goes to Test Valley School
2016-12-06 10:00:07 +08:00
Simey Lameze 4a564ca40b MDL-56759 themes: fix badge list alignment issues 2016-12-06 09:24:31 +08:00
Eloy Lafuente (stronk7) 5da06d632a MDL-57266 upgrade: add 3.2.0 separation line to all upgrade scripts 2016-12-05 17:17:54 +01:00
Eloy Lafuente (stronk7) d797e57255 MDL-56240 upgrade: delete incorrect lines, manually added
Note that, with MDL-57266, we are changine the comment to be:

// Automatically generated Moodle v3.2.0 release upgrade line

in order to make to make to make it clearer that it's an
automatic (part of the release process) comment and should not
be added manually ever.
2016-12-05 16:52:31 +01:00
Frederic Massart 55d2042f0a 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-12-05 15:48:47 +00:00
David Mudrák 8cd6972966 MDL-57256 course: Fix display of the Legacy course files link
The patch fixes the classical operator precedence bug.
2016-12-05 15:45:38 +00:00
Henning Bostelmann 9cbc0a0cdb MDL-45873 mode_data: Allow "0" entries in menu field 2016-12-05 09:21:07 +00:00
John Okely 931d12b589 MDL-54921 signup: Only clear wanturl when necessary
Thanks to Juho Jaakkola for original patch idea.
2016-12-05 15:35:25 +08:00
Shamim Rezaie 0beeb95a8a MDL-52840 assignsubmission_file: Change default setting file size
The default value of the assignsubmission_file/maxbytes setting is changed to $CFG->maxbytes.
2016-12-05 13:02:20 +08:00
Mark Nelson 617f8bb911 MDL-57084 core_message: prevent duplication of day separator 2016-12-05 12:28:56 +08:00
Michael Spall 75dd21a002 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-12-05 12:05:19 +08:00
Bram Tassyns a0c13477ab MDL-56836 SCORM: player doesn't remember display mode when not logged in 2016-12-05 09:25:31 +08:00
981 changed files with 16771 additions and 5059 deletions
+2 -1
View File
@@ -56,7 +56,8 @@ lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
media/player/videojs/amd/src/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
+2 -1
View File
@@ -57,7 +57,8 @@ lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
media/player/videojs/amd/src/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
+10 -10
View File
@@ -13,7 +13,7 @@ language: php
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.0
- 7.1
- 5.6
services:
@@ -23,7 +23,7 @@ env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
# start first so that the total run time is not too high.
#
# We only run MySQL on PHP 7.0, so run that first.
# We only run MySQL on PHP 7.1, so run that first.
# CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances.
# Postgres is significantly is pretty reasonable in its run-time.
@@ -47,22 +47,22 @@ matrix:
include:
# Run grunt/npm install on lowest supported npm version
- php: 7
- php: 7.1
env: DB=none TASK=GRUNT NVM_VERSION='4'
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7
- php: 7.1
env: DB=none TASK=GRUNT NVM_VERSION='node'
exclude:
# MySQL - it's just too slow.
# Exclude it on all versions except for 7.0
# Exclude it on all versions except for 7.1
- env: DB=mysqli TASK=PHPUNIT
php: 5.6
# Moodle 2.7 is not compatible with PHP 7 for the upgrade test.
- env: DB=pgsql TASK=UPGRADE
php: 7.0
php: 7.1
cache:
directories:
@@ -70,9 +70,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
@@ -99,6 +96,7 @@ install:
fi
before_script:
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
then
@@ -136,11 +134,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
+2
View File
@@ -37,6 +37,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
}
@@ -46,6 +47,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
}
+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;
+203 -2
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">
@@ -1868,9 +1883,170 @@
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_tls_libraries" level="optional">
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="tlswarning" />
<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">
</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">
@@ -1878,6 +2054,31 @@
<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>
+2 -2
View File
@@ -422,12 +422,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));
+11 -4
View File
@@ -1612,7 +1612,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'));
@@ -1899,14 +1899,21 @@ class core_admin_renderer extends plugin_renderer_base {
} else {
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec));
}
// Enclose report text in div so feedback text will be displayed underneath it.
$report = html_writer::div($report);
// Format error or warning line
if ($errorline || $warningline) {
$messagetype = $errorline? 'error':'warn';
if ($errorline) {
$messagetype = 'error';
$statusclass = 'label-important';
} else if ($warningline) {
$messagetype = 'warn';
$statusclass = 'label-warning';
} else {
$messagetype = 'ok';
$statusclass = 'label-success';
}
$status = '<span class="'.$messagetype.'">'.$status.'</span>';
$status = html_writer::span($status, 'label ' . $statusclass);
// Here we'll store all the feedback found
$feedbacktext = '';
// Append the feedback if there is some
+3 -3
View File
@@ -29,9 +29,9 @@ if ($primaryadmin) {
$primaryadminname = NULL;
}
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'),
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
$setting = new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'),
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_NOTAGS);
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_EMAIL);
$setting->set_force_ltr(true);
$temp->add($setting);
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'), new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
@@ -237,7 +237,7 @@ $temp->add(new admin_setting_configtext('smtpmaxbulk', new lang_string('smtpmaxb
$temp->add(new admin_setting_heading('noreplydomainheading', new lang_string('noreplydomain', 'admin'),
new lang_string('noreplydomaindetail', 'admin')));
$temp->add(new admin_setting_configtext('noreplyaddress', new lang_string('noreplyaddress', 'admin'),
new lang_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_NOTAGS));
new lang_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_EMAIL));
$temp->add(new admin_setting_configtextarea('allowedemaildomains',
new lang_string('allowedemaildomains', 'admin'),
new lang_string('configallowedemaildomains', 'admin'),
+1 -1
View File
@@ -38,5 +38,5 @@
}
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="{{#forceltr}}text-ltr{{/forceltr}}" {{#attributes}} {{name}}="{{value}}"{{/attributes}}>
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="{{#forceltr}}text-ltr{{/forceltr}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
</div>
@@ -16,8 +16,7 @@ Feature: Display extended course names
And I should not see "C_shortname Course fullname"
Scenario: Courses list with extended course names
Given I expand "Site administration" node
And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element"
Given I navigate to "Appearance > Courses" in site administration
And I set the field "Display extended course names" to "1"
When I press "Save changes"
And I am on site homepage
+1 -1
View File
@@ -25,7 +25,7 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I log in as "admin"
And I add "User Two (two@example.com)" user to "CH1" cohort members
And I add "User Three (three@example.com)" user to "CH1" cohort members
And I follow "Browse list of users"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Scenario: Filter user accounts by role and cohort
When I set the following fields to these values:
@@ -8,6 +8,8 @@ Feature: Manage availability conditions
Scenario: Display list of availability conditions
# Check the report doesn't show when not enabled.
Given I log in as "admin"
And I press "Customise this page"
And I add the "Administration" block if not present
And the following config values are set as admin:
| enableavailability | 0 |
And I expand "Site administration" node
+226 -89
View File
@@ -54,6 +54,8 @@ list($options, $unrecognised) = cli_get_params(
'fromrun' => 1,
'torun' => 0,
'single-run' => false,
'rerun' => 0,
'auto-rerun' => 0,
),
array(
'h' => 'help',
@@ -77,6 +79,8 @@ Options:
--replace Replace args string with run process number, useful for output.
--fromrun Execute run starting from (Used for parallel runs on different vms)
--torun Execute run till (Used for parallel runs on different vms)
--rerun Re-run scenarios that failed during last execution.
--auto-rerun Automatically re-run scenarios that failed during last execution.
-h, --help Print out this help
@@ -91,11 +95,31 @@ if (!empty($options['help'])) {
exit(0);
}
$parallelrun = behat_config_manager::get_parallel_test_runs($options['fromrun']);
$parallelrun = behat_config_manager::get_behat_run_config_value('parallel');
// Default torun is maximum parallel runs.
if (empty($options['torun'])) {
$options['torun'] = $parallelrun;
// Check if the options provided are valid to run behat.
if ($parallelrun === false) {
// Parallel run should not have fromrun or torun options greater than 1.
if (($options['fromrun'] > 1) || ($options['torun'] > 1)) {
echo "Test site is not initialized for parallel run." . PHP_EOL;
exit(1);
}
} else {
// Ensure fromrun is within limits of initialized test site.
if (!empty($options['fromrun']) && ($options['fromrun'] > $parallelrun)) {
echo "From run (" . $options['fromrun'] . ") is more than site with parallel runs (" . $parallelrun . ")" . PHP_EOL;
exit(1);
}
// Default torun is maximum parallel runs and should be less than equal to parallelruns.
if (empty($options['torun'])) {
$options['torun'] = $parallelrun;
} else {
if ($options['torun'] > $parallelrun) {
echo "To run (" . $options['torun'] . ") is more than site with parallel runs (" . $parallelrun . ")" . PHP_EOL;
exit(1);
}
}
}
// Capture signals and ensure we clean symlinks.
@@ -127,7 +151,7 @@ if ($options['profile']) {
exit(1);
}
$extraopts[] = '--profile="' . $profile . '"';
$extraopts['profile'] = '--profile="' . $profile . '"';
// By default, profile tags will be used.
if (!empty($CFG->behat_config[$profile]['filters']['tags'])) {
$tags = $CFG->behat_config[$profile]['filters']['tags'];
@@ -137,117 +161,206 @@ if ($options['profile']) {
// Command line tags have precedence (std behat behavior).
if ($options['tags']) {
$tags = $options['tags'];
$extraopts[] = '--tags="' . $tags . '"';
$extraopts['tags'] = '--tags="' . $tags . '"';
}
// Add suite option if specified.
if ($options['suite']) {
$extraopts[] = '--suite="' . $options['suite'] . '"';
$extraopts['suite'] = '--suite="' . $options['suite'] . '"';
}
// Feature should be added to last, for behat command.
if ($options['feature']) {
$extraopts[] = $options['feature'];
$extraopts['feature'] = $options['feature'];
// Only run 1 process as process.
// Feature file is picked from absolute path provided, so no need to check for behat.yml.
$options['torun'] = $options['fromrun'];
}
// Set of options to pass to behat.
$extraopts = implode(' ', $extraopts);
$extraoptstr = implode(' ', $extraopts);
// If empty parallelrun then just check with user if it's a run single behat test.
// If rerun is passed then ensure we just run the failed processes.
$lastfailedstatus = 0;
$lasttorun = $options['torun'];
$lastfromrun = $options['fromrun'];
if ($options['rerun']) {
// Get last combined failed status.
$lastfailedstatus = behat_config_manager::get_behat_run_config_value('lastcombinedfailedstatus');
$lasttorun = behat_config_manager::get_behat_run_config_value('lasttorun');
$lastfromrun = behat_config_manager::get_behat_run_config_value('lastfromrun');
if ($lastfailedstatus !== false) {
$extraoptstr .= ' --rerun';
}
// If torun is less than last torun, then just set this to min last to run and similar for fromrun.
if ($options['torun'] < $lasttorun) {
$options['torun'];
}
if ($options['fromrun'] > $lastfromrun) {
$options['fromrun'];
}
unset($options['rerun']);
}
$cmds = array();
$exitcodes = array();
$status = 0;
$verbose = empty($options['verbose']) ? false : true;
// Execute behat run commands.
if (empty($parallelrun)) {
$cwd = getcwd();
chdir(__DIR__);
$runtestscommand = behat_command::get_behat_command(false, false, true);
$runtestscommand .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
$runtestscommand .= ' ' . $extraopts;
$runtestscommand .= ' ' . $extraoptstr;
$cmds['singlerun'] = $runtestscommand;
echo "Running single behat site:" . PHP_EOL;
passthru("php $runtestscommand", $code);
passthru("php $runtestscommand", $status);
$exitcodes['singlerun'] = $status;
chdir($cwd);
exit($code);
}
} else {
$cmds = array();
echo "Running " . ($options['torun'] - $options['fromrun'] + 1) . " parallel behat sites:" . PHP_EOL;
echo "Running " . ($options['torun'] - $options['fromrun'] + 1) . " parallel behat sites:" . PHP_EOL;
for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {
$CFG->behatrunprocess = $i;
for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {
$lastfailed = 1 & $lastfailedstatus >> ($i - 1);
// Options parameters to be added to each run.
$myopts = !empty($options['replace']) ? str_replace($options['replace'], $i, $extraopts) : $extraopts;
// Bypass if not failed in last run.
if ($lastfailedstatus && !$lastfailed && ($i <= $lasttorun) && ($i >= $lastfromrun)) {
continue;
}
$behatcommand = behat_command::get_behat_command(false, false, true);
$behatconfigpath = behat_config_manager::get_behat_cli_config_filepath($i);
$CFG->behatrunprocess = $i;
// Command to execute behat run.
$cmds[BEHAT_PARALLEL_SITE_NAME . $i] = $behatcommand . ' --config ' . $behatconfigpath . " " . $myopts;
echo "[" . BEHAT_PARALLEL_SITE_NAME . $i . "] " . $cmds[BEHAT_PARALLEL_SITE_NAME . $i] . PHP_EOL;
}
// Options parameters to be added to each run.
$myopts = !empty($options['replace']) ? str_replace($options['replace'], $i, $extraoptstr) : $extraoptstr;
if (empty($cmds)) {
echo "No commands to execute " . PHP_EOL;
exit(1);
}
$behatcommand = behat_command::get_behat_command(false, false, true);
$behatconfigpath = behat_config_manager::get_behat_cli_config_filepath($i);
// Create site symlink if necessary.
if (!behat_config_manager::create_parallel_site_links($options['fromrun'], $options['torun'])) {
echo "Check permissions. If on windows, make sure you are running this command as admin" . PHP_EOL;
exit(1);
}
// Execute all commands, relative to moodle root directory.
$processes = cli_execute_parallel($cmds, __DIR__ . "/../../../../");
$stoponfail = empty($options['stop-on-failure']) ? false : true;
// Print header.
print_process_start_info($processes);
// Print combined run o/p from processes.
$exitcodes = print_combined_run_output($processes, $stoponfail);
$time = round(microtime(true) - $time, 1);
echo "Finished in " . gmdate("G\h i\m s\s", $time) . PHP_EOL . PHP_EOL;
ksort($exitcodes);
// Print exit info from each run.
// Status bits contains pass/fail status of parallel runs.
$status = 0;
$processcounter = 0;
foreach ($exitcodes as $exitcode) {
if ($exitcode) {
$status |= (1 << $processcounter);
}
$processcounter++;
}
// Run finished. Show exit code and output from individual process.
$verbose = empty($options['verbose']) ? false : true;
$verbose = $verbose || !empty($status);
// Show exit code from each process, if any process failed.
if ($verbose) {
// Echo exit codes.
echo "Exit codes for each behat run: " . PHP_EOL;
foreach ($exitcodes as $run => $exitcode) {
echo $run . ": " . $exitcode . PHP_EOL;
// Command to execute behat run.
$cmds[BEHAT_PARALLEL_SITE_NAME . $i] = $behatcommand . ' --config ' . $behatconfigpath . " " . $myopts;
echo "[" . BEHAT_PARALLEL_SITE_NAME . $i . "] " . $cmds[BEHAT_PARALLEL_SITE_NAME . $i] . PHP_EOL;
}
// Show failed re-run commands.
if ($status) {
echo "To re-run failed processes, you can use following commands:" . PHP_EOL;
foreach ($cmds as $name => $cmd) {
if (!empty($exitcodes[$name])) {
echo "[" . $name . "] " . $cmd . PHP_EOL;
if (empty($cmds)) {
echo "No commands to execute " . PHP_EOL;
exit(1);
}
// Create site symlink if necessary.
if (!behat_config_manager::create_parallel_site_links($options['fromrun'], $options['torun'])) {
echo "Check permissions. If on windows, make sure you are running this command as admin" . PHP_EOL;
exit(1);
}
// Save torun and from run, so it can be used to detect if it was executed in last run.
behat_config_manager::set_behat_run_config_value('lasttorun', $options['torun']);
behat_config_manager::set_behat_run_config_value('lastfromrun', $options['fromrun']);
// Keep no delay by default, between each parallel, let user decide.
if (!defined('BEHAT_PARALLEL_START_DELAY')) {
define('BEHAT_PARALLEL_START_DELAY', 0);
}
// Execute all commands, relative to moodle root directory.
$processes = cli_execute_parallel($cmds, __DIR__ . "/../../../../", BEHAT_PARALLEL_START_DELAY);
$stoponfail = empty($options['stop-on-failure']) ? false : true;
// Print header.
print_process_start_info($processes);
// Print combined run o/p from processes.
$exitcodes = print_combined_run_output($processes, $stoponfail);
// Time to finish run.
$time = round(microtime(true) - $time, 1);
echo "Finished in " . gmdate("G\h i\m s\s", $time) . PHP_EOL . PHP_EOL;
ksort($exitcodes);
// Print exit info from each run.
// Status bits contains pass/fail status of parallel runs.
foreach ($exitcodes as $name => $exitcode) {
if ($exitcode) {
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
$status |= (1 << ($runno - 1));
}
}
// Print each process information.
print_each_process_info($processes, $verbose, $status);
}
// Save final exit code containing which run failed.
behat_config_manager::set_behat_run_config_value('lastcombinedfailedstatus', $status);
// Show exit code from each process, if any process failed and how to rerun failed process.
if ($verbose || $status) {
// Check if status of last run is failure and rerun is suggested.
if (!empty($options['auto-rerun']) && $status) {
// Rerun for the number of tries passed.
for ($i = 0; $i < $options['auto-rerun']; $i++) {
// Run individual commands, to avoid parallel failures.
foreach ($exitcodes as $behatrunname => $exitcode) {
// If not failed in last run, then skip.
if ($exitcode == 0) {
continue;
}
// This was a failure.
echo "*** Re-running behat run: $behatrunname ***" . PHP_EOL;
if ($verbose) {
echo "Executing: " . $cmds[$behatrunname] . " --rerun" . PHP_EOL;
}
passthru("php $cmds[$behatrunname] --rerun", $rerunstatus);
// Update exit code.
$exitcodes[$behatrunname] = $rerunstatus;
}
}
// Update status after auto-rerun finished.
$status = 0;
foreach ($exitcodes as $name => $exitcode) {
if ($exitcode) {
if (!empty($parallelrun)) {
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
} else {
$runno = 1;
}
$status |= (1 << ($runno - 1));
}
}
}
// Show final o/p with re-run commands.
if ($status) {
if (!empty($parallelrun)) {
// Echo exit codes.
echo "Exit codes for each behat run: " . PHP_EOL;
foreach ($exitcodes as $run => $exitcode) {
echo $run . ": " . $exitcode . PHP_EOL;
}
unset($extraopts['fromrun']);
unset($extraopts['torun']);
if (!empty($options['replace'])) {
$extraopts['replace'] = '--replace="' . $options['replace'] . '"';
}
}
echo "To re-run failed processes, you can use following command:" . PHP_EOL;
$extraopts['rerun'] = '--rerun';
$extraoptstr = implode(' ', $extraopts);
echo behat_command::get_behat_command(true, true, true) . " " . $extraoptstr . PHP_EOL;
}
echo PHP_EOL;
}
print_each_process_info($processes, $verbose);
// Remove site symlink if necessary.
behat_config_manager::drop_parallel_site_links();
@@ -364,23 +477,47 @@ function print_combined_run_output($processes, $stoponfail = false) {
* @param array $processes list of processes to loop though.
* @param bool $verbose Show verbose output for each process.
*/
function print_each_process_info($processes, $verbose = false) {
function print_each_process_info($processes, $verbose = false, $status = 0) {
foreach ($processes as $name => $process) {
echo "**************** [" . $name . "] ****************" . PHP_EOL;
if ($verbose) {
echo $process->getOutput();
echo $process->getErrorOutput();
} else {
$op = explode(PHP_EOL, $process->getOutput());
foreach ($op as $line) {
// Don't print progress .
if (trim($line) && (strpos($line, '.') !== 0) && (strpos($line, 'Moodle ') !== 0) &&
(strpos($line, 'Server OS ') !== 0) && (strpos($line, 'Started at ') !== 0) &&
(strpos($line, 'Browser specific fixes ') !== 0)) {
echo $line . PHP_EOL;
}
} else if ($status) {
// Only show failed o/p.
$runno = str_replace(BEHAT_PARALLEL_SITE_NAME, '', $name);
if ((1 << ($runno - 1)) & $status) {
echo $process->getOutput();
echo $process->getErrorOutput();
} else {
echo get_status_lines_from_run_op($process);
}
} else {
echo get_status_lines_from_run_op($process);
}
echo PHP_EOL;
}
}
/**
* Extract status information from behat o/p and return.
* @param Symfony\Component\Process\Process $process
* @return string
*/
function get_status_lines_from_run_op(Symfony\Component\Process\Process $process) {
$statusstr = '';
$op = explode(PHP_EOL, $process->getOutput());
foreach ($op as $line) {
// Don't print progress .
if (trim($line) && (strpos($line, '.') !== 0) && (strpos($line, 'Moodle ') !== 0) &&
(strpos($line, 'Server OS ') !== 0) && (strpos($line, 'Started at ') !== 0) &&
(strpos($line, 'Browser specific fixes ') !== 0)) {
$statusstr .= $line . PHP_EOL;
}
}
return $statusstr;
}
+42 -6
View File
@@ -36,11 +36,7 @@ define('NO_OUTPUT_BUFFERING', true);
define('IGNORE_COMPONENT_CACHE', true);
define('ABORT_AFTER_CONFIG', true);
require_once(__DIR__ . '/../../../../config.php');
require_once(__DIR__ . '/../../../../lib/clilib.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
// CLI options.
list($options, $unrecognized) = cli_get_params(
@@ -103,14 +99,26 @@ if (!empty($options['help'])) {
$cwd = getcwd();
// If Behat parallel site is being initiliased, then define a param to be used to ignore single run install.
if (!empty($options['parallel'])) {
define('BEHAT_PARALLEL_UTIL', true);
}
require_once(__DIR__ . '/../../../../config.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
// For drop option check if parallel site.
if ((empty($options['parallel'])) && ($options['drop']) || $options['updatesteps']) {
// Get parallel run info from first run.
$options['parallel'] = behat_config_manager::get_parallel_test_runs($options['fromrun']);
$options['parallel'] = behat_config_manager::get_behat_run_config_value('parallel');
}
// If not a parallel site then open single run.
if (empty($options['parallel'])) {
// Set run config value for single run.
behat_config_manager::set_behat_run_config_value('singlerun', 1);
chdir(__DIR__);
// Check if behat is initialised, if not exit.
passthru("php util_single_run.php --diag", $status);
@@ -147,6 +155,21 @@ if ($options['diag'] || $options['enable'] || $options['disable']) {
$status = (bool)$status || (bool)$exitcode;
}
// Remove run config file.
$behatrunconfigfile = behat_config_manager::get_behat_run_config_file_path();
if (file_exists($behatrunconfigfile)) {
if (!unlink($behatrunconfigfile)) {
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'Can not delete behat run config file');
}
}
// Remove test file path.
if (file_exists(behat_util::get_test_file_path())) {
if (!unlink(behat_util::get_test_file_path())) {
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'Can not delete test file enable info');
}
}
} else if ($options['install']) {
// This is intensive compared to behat itself so run them in chunk if option maxruns not set.
if ($options['maxruns']) {
@@ -233,6 +256,19 @@ if ($options['install']) {
} else if ($options['enable']) {
echo "Acceptance tests environment enabled on $CFG->behat_wwwroot, to run the tests use:" . PHP_EOL;
echo behat_command::get_behat_command(true, true);
// Save fromrun and to run information.
if (isset($options['fromrun'])) {
behat_config_manager::set_behat_run_config_value('fromrun', $options['fromrun']);
}
if (isset($options['torun'])) {
behat_config_manager::set_behat_run_config_value('torun', $options['torun']);
}
if (isset($options['parallel'])) {
behat_config_manager::set_behat_run_config_value('parallel', $options['parallel']);
}
echo PHP_EOL;
} else if ($options['disable']) {
+3 -6
View File
@@ -143,7 +143,7 @@ if ($options['run']) {
$run = $options['run'];
// If parallel option is not passed, then try get it form config.
if (!$options['parallel']) {
$parallel = behat_config_manager::get_parallel_test_runs();
$parallel = behat_config_manager::get_behat_run_config_value('parallel');
} else {
$parallel = $options['parallel'];
}
@@ -176,10 +176,7 @@ if ($options['install']) {
} else if ($options['enable']) {
if (!empty($parallel)) {
// Save parallel site info for enable and install options.
$filepath = behat_config_manager::get_parallel_test_file_path();
if (!file_put_contents($filepath, $parallel)) {
behat_error(BEHAT_EXITCODE_PERMISSIONS, 'File ' . $filepath . ' can not be created');
}
behat_config_manager::set_behat_run_config_value('behatsiteenabled', 1);
}
// Enable test mode.
@@ -200,7 +197,7 @@ if ($options['install']) {
}
} else if ($options['disable']) {
behat_util::stop_test_mode();
behat_util::stop_test_mode($run);
// This is only displayed once for parallel install.
if (empty($run)) {
mtrace("Acceptance tests environment disabled");
@@ -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"
@@ -59,8 +59,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I navigate to "Users > Groups" in current page administration
Then I should see "Group 1"
And I should see "Group 2"
And I follow "Groupings"
@@ -90,8 +89,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I expand "Users" node
And I follow "Permissions"
And I navigate to "Users > Permissions" in current page administration
And I set the field "Advanced role override" to "Student (1)"
Then "mod/forum:editanypost" capability has "Allow" permission
And I press "Cancel"
@@ -134,30 +132,31 @@ Feature: Set up contextual data for tests
And the following "course enrolments" exist:
| user | course | role |
| user4 | C1 | custom1 |
| user2 | C1 | student |
| user3 | C1 | editingteacher |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| user1 | manager | System | |
| user2 | editingteacher | Category | CAT1 |
| user3 | editingteacher | Course | C1 |
| user5 | custom2 | System | |
When I log in as "user1"
And I am on site homepage
Then I should see "Front page settings"
Then "Edit settings" "link" should exist in current page administration
And I log out
And I log in as "user2"
And I am on site homepage
And I follow "Course 1"
And I should see "Turn editing on"
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user3"
And I am on site homepage
And I follow "Course 1"
And I should see "Turn editing on"
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user4"
And I am on site homepage
And I follow "Course 1"
And I should see "Turn editing on"
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user5"
And I should see "You are logged in as"
@@ -264,8 +263,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I navigate to "Users > Groups" in current page administration
Then the "groups" select box should contain "Group 1 (1)"
And the "groups" select box should contain "Group 2 (1)"
And I set the field "groups" to "Group 1 (1)"
@@ -302,7 +300,7 @@ Feature: Set up contextual data for tests
| System cohort A | 1 |
| System cohort B | 2 |
And I should not see "Cohort in category"
And I follow "Courses"
And I am on course index
And I follow "Cat 1"
And I follow "Cohorts"
And I should not see "System cohort"
@@ -322,10 +320,9 @@ Feature: Set up contextual data for tests
| fullname | course | gradecategory |
| Grade sub category 2 | C1 | Grade category 1 |
When I log in as "admin"
And I am on site homepage
And I follow "Courses"
And I am on course index
And I follow "Course 1"
And I go to "View > Grader report" in the course gradebook
And I navigate to "View > Grader report" in the course gradebook
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
@@ -349,7 +346,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I go to "Setup > Gradebook setup" in the course gradebook
And I navigate to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Grade Item 1"
And I follow "Edit Test Grade Item 1"
And I expand all fieldsets
@@ -378,7 +375,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I go to "Scales" in the course gradebook
And I navigate to "Scales" in the course gradebook
Then I should see "Test Scale 1"
And I should see "Disappointing, Good, Very good, Excellent"
@@ -429,7 +426,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I go to "Setup > Gradebook setup" in the course gradebook
And I navigate to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Outcome Grade Item 1"
And I follow "Edit Test Outcome Grade Item 1"
And the field "Outcome" matches value "Grade outcome 1"
@@ -32,8 +32,7 @@ Feature: Edit capabilities
Scenario: Course capabilities overrides
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Permissions"
And I navigate to "Users > Permissions" in current page administration
And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit |
| mod/forum:editanypost | Prevent |
@@ -52,7 +51,7 @@ Feature: Edit capabilities
| Forum name | I'm the name |
| Description | I'm the introduction |
And I follow "I'm the name"
And I navigate to "Permissions" node in "Forum administration"
And I navigate to "Permissions" in current page administration
And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit |
| mod/forum:editanypost | Prevent |
@@ -33,8 +33,6 @@ Feature: Verify that all form fields values can be get and set
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I expand "Site administration" node
And I expand "Appearance" node
And I am on site homepage
And I follow "Course 1"
And I navigate to "Reset" node in "Course administration"
@@ -60,9 +58,8 @@ Feature: Verify that all form fields values can be get and set
| HTML format | Student page contents |
And I press "Save"
Then I should see "Student page contents" in the "region-main" "region"
And I click on "Edit" "link" in the "Administration" "block"
# Select (multi-select) - Checking "I set the field".
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
# Checkbox - Checking "I set the field".
And I set the field "Display description on course page" to "1"
@@ -75,7 +72,7 @@ Feature: Verify that all form fields values can be get and set
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" in current page administration
# Checkbox - Checking "the field matches value" and "the following fields match these values".
And the following fields match these values:
| Display description on course page | 1 |
@@ -91,7 +88,7 @@ Feature: Verify that all form fields values can be get and set
# Select (simple) - Checking "I set the field".
And I set the field "Group mode" to "Separate groups"
And I press "Save and display"
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" in current page administration
And the following fields match these values:
| Default format | NWiki |
| Group mode | Separate groups |
@@ -134,8 +131,7 @@ Feature: Verify that all form fields values can be get and set
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected
Then I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I navigate to "Users > Groups" in current page administration
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
And I set the field "groups" to "Group 2"
And the "members" select box should contain "Student 2"
@@ -158,7 +154,7 @@ Feature: Verify that all form fields values can be get and set
And the "available[day]" "field" should be enabled
And the field "deadline[enabled]" matches value "1"
And I press "Save and display"
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" in current page administration
And the field "available[enabled]" matches value "1"
And the "available[day]" "field" should be enabled
And the field "deadline[enabled]" matches value "1"
@@ -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 click on "Edit profile" "link" in the "region-main" "region"
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 "New password" to "TestPass"
@@ -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 click on "Edit profile" "link" in the "region-main" "region"
And I open my profile in edit mode
Scenario: Use nasty strings on steps arguments
When I set the field "Surname" to "$NASTYSTRING1"
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -39,5 +39,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -56,5 +56,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+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('size' => '60'), array('usefilepicker' => false));
$mform->setType('url', PARAM_RAW_TRIMMED); // Can not use PARAM_URL, it silently converts bad URLs to ''.
@@ -93,7 +93,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) {
@@ -7,12 +7,9 @@ Feature: Manage competency frameworks
Background:
Given I log in as "admin"
And I am on site homepage
And I expand "Site administration" node
When I expand "Competencies" node
Then I should see "Competency frameworks"
Scenario: Create a new framework
Given I follow "Competency frameworks"
Given I navigate to "Competencies > Competency frameworks" in site administration
And I should see "List of competency frameworks"
And I click on "Add new competency framework" "button"
And I should see "General"
@@ -34,7 +31,7 @@ Feature: Manage competency frameworks
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-2 | sc-y-2 |
And I follow "Competency frameworks"
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-2"
When I click on "Science Year-2" "link"
Then I should see "Science Year-2"
@@ -43,7 +40,7 @@ Feature: Manage competency frameworks
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-3 | sc-y-3 |
And I follow "Competency frameworks"
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-3"
And I click on "Edit" of edit menu in the "Science Year-3" row
And the field "Name" matches value "Science Year-3 "
@@ -57,7 +54,7 @@ Feature: Manage competency frameworks
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-4 | sc-y-4 |
And I follow "Competency frameworks"
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-4"
And I should see "sc-y-4"
And I click on "Delete" of edit menu in the "Science Year-4" row
@@ -90,7 +87,7 @@ Scenario: Edit a framework with competencies in user competency
| user | competency |
| admin | Comp1 |
| admin | Comp2 |
And I follow "Competency frameworks"
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-5"
And I click on "Edit" of edit menu in the "Science Year-5" row
And the field "Name" matches value "Science Year-5 "
@@ -120,7 +117,7 @@ Scenario: Edit a framework with competencies in user competency plan
| user | competency | plan |
| admin | Comp1 | Plan Science-6 |
| admin | Comp2 | Plan Science-6 |
And I follow "Competency frameworks"
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-6"
And I click on "Edit" of edit menu in the "Science Year-6" row
And the field "Name" matches value "Science Year-6 "
+2 -6
View File
@@ -26,9 +26,7 @@ Feature: Manage plearning plan
| shortname | description |
| Science template | science template description |
And I follow "Home"
And I expand "Site administration" node
And I expand "Competencies" node
And I follow "Learning plan templates"
And I navigate to "Competencies > Learning plan templates" in site administration
And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
And I click on ".form-autocomplete-downarrow" "css_element"
And I click on "Admin" item in the autocomplete list
@@ -52,9 +50,7 @@ Feature: Manage plearning plan
| student-plan1 | COHORTPLAN |
| student-plan2 | COHORTPLAN |
And I follow "Home"
And I expand "Site administration" node
And I expand "Competencies" node
And I follow "Learning plan templates"
And I navigate to "Competencies > Learning plan templates" in site administration
And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
And I click on ".form-autocomplete-downarrow" "css_element"
And I click on "cohort plan" item in the autocomplete list
@@ -145,10 +145,7 @@ Feature: Manage plan workflow
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
And I log in as "manager1"
And I expand "Site administration" node
And I expand "Users" node
And I expand "Accounts" node
And I follow "Browse list of users"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
And I follow "Learning plans"
And I should see "List of learning plans"
@@ -167,10 +164,7 @@ Feature: Manage plan workflow
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
And I log in as "manager1"
And I expand "Site administration" node
And I expand "Users" node
And I expand "Accounts" node
And I follow "Browse list of users"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
And I follow "Learning plans"
And I should see "List of learning plans"
@@ -191,10 +185,7 @@ Scenario: Manager reopen a complete learning plan
| Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 |
And I log in as "manager1"
And I expand "Site administration" node
And I expand "Users" node
And I expand "Accounts" node
And I follow "Browse list of users"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "User 1"
And I follow "Learning plans"
And I should see "List of learning plans"
@@ -7,12 +7,9 @@ Feature: Manage plearning plan templates
Background:
Given I log in as "admin"
And I am on site homepage
And I expand "Site administration" node
When I expand "Competencies" node
Then I should see "Learning plan templates"
Scenario: Create a new learning plan template
Given I follow "Learning plan templates"
Given I navigate to "Competencies > Learning plan templates" in site administration
And I should see "List of learning plan templates"
And I click on "Add new learning plan template" "button"
And I should see "Add new learning plan template"
@@ -26,7 +23,7 @@ Feature: Manage plearning plan templates
Given the following lp "templates" exist:
| shortname | description |
| Science template Year-2 | science template description |
And I follow "Learning plan templates"
And I navigate to "Competencies > Learning plan templates" in site administration
And I should see "Science template Year-2"
When I click on "Science template Year-2" "link"
Then I should see "Science template Year-2"
@@ -36,7 +33,7 @@ Feature: Manage plearning plan templates
Given the following lp "templates" exist:
| shortname | description |
| Science template Year-3 | science template description |
And I follow "Learning plan templates"
And I navigate to "Competencies > Learning plan templates" in site administration
And I should see "Science template Year-3"
And I click on "Edit" of edit menu in the "Science template Year-3" row
And the field "Name" matches value "Science template Year-3"
@@ -49,7 +46,7 @@ Feature: Manage plearning plan templates
Given the following lp "templates" exist:
| shortname | description |
| Science template Year-4 | science template description |
And I follow "Learning plan templates"
And I navigate to "Competencies > Learning plan templates" in site administration
And I should see "Science template Year-4"
And I click on "Delete" of edit menu in the "Science template Year-4" row
And "Confirm" "dialogue" should be visible
@@ -53,6 +53,10 @@ class framework_importer {
protected $importer = null;
protected $foundheaders = array();
protected $scalecache = array();
/** @var bool $useprogressbar Control whether importing should use progress bars or not. */
protected $useprogressbar = false;
/** @var \core\progress\display_if_slow|null $progress The progress bar instance. */
protected $progress = null;
/**
* Store an error message for display later
@@ -164,8 +168,11 @@ class framework_importer {
* @param string delimiter The specified delimiter for the file.
* @param string importid The id of the csv import.
* @param array mappingdata The mapping data from the import form.
* @param bool $useprogressbar Whether progress bar should be displayed, to avoid html output on CLI.
*/
public function __construct($text = null, $encoding = null, $delimiter = null, $importid = 0, $mappingdata = null) {
public function __construct($text = null, $encoding = null, $delimiter = null, $importid = 0, $mappingdata = null,
$useprogressbar = false) {
global $CFG;
// The format of our records is:
@@ -204,7 +211,7 @@ class framework_importer {
}
$this->foundheaders = $this->importer->get_columns();
$this->useprogressbar = $useprogressbar;
$domainid = 1;
$flat = array();
@@ -264,8 +271,19 @@ class framework_importer {
$this->fail(get_string('invalidimportfile', 'tool_lpimportcsv'));
return;
} else {
// We are calling from browser, display progress bar.
if ($this->useprogressbar === true) {
$this->progress = new \core\progress\display_if_slow(get_string('processingfile', 'tool_lpimportcsv'));
$this->progress->start_html();
} else {
// Avoid html output on CLI scripts.
$this->progress = new \core\progress\none();
}
$this->progress->start_progress('', count($this->flat));
// Build a tree from this flat list.
raise_memory_limit(MEMORY_EXTRA);
$this->add_children($this->framework, '');
$this->progress->end_progress();
}
}
@@ -278,6 +296,7 @@ class framework_importer {
public function add_children(& $node, $parentidnumber) {
foreach ($this->flat as $competency) {
if ($competency->parentidnumber == $parentidnumber) {
$this->progress->increment_progress();
$node->children[] = $competency;
$this->add_children($competency, $competency->idnumber);
}
@@ -443,17 +462,28 @@ class framework_importer {
$record->contextid = context_system::instance()->id;
$framework = api::create_framework($record);
if ($this->useprogressbar === true) {
$this->progress = new \core\progress\display_if_slow(get_string('importingfile', 'tool_lpimportcsv'));
$this->progress->start_html();
} else {
$this->progress = new \core\progress\none();
}
$this->progress->start_progress('', (count($this->framework->children) * 2));
raise_memory_limit(MEMORY_EXTRA);
// Now all the children.
foreach ($this->framework->children as $comp) {
$this->progress->increment_progress();
$this->create_competency($comp, null, $framework);
}
// Now create the rules.
foreach ($this->framework->children as $record) {
$this->progress->increment_progress();
$this->set_rules($record);
$this->set_related($record);
}
$this->progress->end_progress();
$this->importer->cleanup();
return $framework;
-47
View File
@@ -1,47 +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/>.
/**
* Page to continue after an action.
*
* @package tool_lpimportcsv
* @copyright 2015 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$pagetitle = get_string('pluginname', 'tool_lpimportcsv');
$context = context_system::instance();
$id = required_param('id', PARAM_INT);
$url = new moodle_url("/admin/tool/lpimportcsv/index.php");
$PAGE->set_context($context);
$PAGE->set_url($url);
$PAGE->set_title($pagetitle);
$PAGE->set_pagelayout('admin');
$PAGE->set_heading($pagetitle);
echo $OUTPUT->header();
echo $OUTPUT->heading($pagetitle);
$urlparams = ['competencyframeworkid' => $id, 'pagecontextid' => $context->id];
$frameworksurl = new moodle_url('/admin/tool/lp/competencies.php', $urlparams);
echo $OUTPUT->notification(get_string('competencyframeworkcreated', 'tool_lp'), 'notifysuccess');
echo $OUTPUT->continue_button($frameworksurl);
echo $OUTPUT->footer();
+7 -4
View File
@@ -37,6 +37,7 @@ $PAGE->set_pagelayout('admin');
$PAGE->set_heading($pagetitle);
$form = null;
echo $OUTPUT->header();
if (optional_param('needsconfirm', 0, PARAM_BOOL)) {
$form = new \tool_lpimportcsv\form\import($url->out(false));
} else if (optional_param('confirm', 0, PARAM_BOOL)) {
@@ -53,7 +54,7 @@ if ($form->is_cancelled()) {
if ($data->confirm) {
$importid = $data->importid;
$importer = new \tool_lpimportcsv\framework_importer(null, null, null, $importid, $data);
$importer = new \tool_lpimportcsv\framework_importer(null, null, null, $importid, $data, true);
$error = $importer->get_error();
if ($error) {
@@ -61,21 +62,23 @@ if ($form->is_cancelled()) {
$form->set_import_error($error);
} else {
$framework = $importer->import();
redirect(new moodle_url('continue.php', array('id' => $framework->get_id())));
$urlparams = ['competencyframeworkid' => $framework->get_id(), 'pagecontextid' => $context->id];
$frameworksurl = new moodle_url('/admin/tool/lp/competencies.php', $urlparams);
echo $OUTPUT->notification(get_string('competencyframeworkcreated', 'tool_lp'), 'notifysuccess');
echo $OUTPUT->continue_button($frameworksurl);
die();
}
} else {
$text = $form->get_file_content('importfile');
$encoding = $data->encoding;
$delimiter = $data->delimiter_name;
$importer = new \tool_lpimportcsv\framework_importer($text, $encoding, $delimiter);
$importer = new \tool_lpimportcsv\framework_importer($text, $encoding, $delimiter, 0, null, true);
$confirmform = new \tool_lpimportcsv\form\import_confirm(null, $importer);
$form = $confirmform;
$pagetitle = get_string('confirmcolumnmappings', 'tool_lpimportcsv');
}
}
echo $OUTPUT->header();
echo $OUTPUT->heading($pagetitle);
$form->display();
@@ -38,11 +38,13 @@ $string['importfile'] = 'CSV framework description file';
$string['importfile_help'] = 'A competency framework may be imported via text file. The format of the file can be determined by creating a new competency framework on the site and then exporting it.';
$string['importfile_link'] = 'admin/tool/lpimportcsv';
$string['import'] = 'Import';
$string['importingfile'] = 'Importing file data';
$string['invalidimportfile'] = 'File format is invalid.';
$string['isframework'] = 'Is framework';
$string['noframeworks'] = 'No competency frameworks have been created yet';
$string['parentidnumber'] = 'Parent ID number';
$string['pluginname'] = 'Import competency framework';
$string['processingfile'] = 'Processing file';
$string['relatedidnumbers'] = 'Cross-referenced competency ID numbers';
$string['ruleconfig'] = 'Rule config (optional)';
$string['ruleoutcome'] = 'Rule outcome (optional)';
@@ -1012,7 +1012,7 @@ class manager {
$messageparams = new \stdClass();
$messageparams->html = $message->html;
$messageparams->plain = $message->plain;
$messagepreferencesurl = new \moodle_url("/message/edit.php", array('id' => $USER->id));
$messagepreferencesurl = new \moodle_url("/message/notificationpreferences.php", array('id' => $USER->id));
$messageparams->messagepreferencesurl = $messagepreferencesurl->out();
$htmlmessage = get_string('messageprocessingsuccesshtml', 'tool_messageinbound', $messageparams);
$plainmessage = get_string('messageprocessingsuccess', 'tool_messageinbound', $messageparams);
+12 -2
View File
@@ -57,6 +57,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();
@@ -68,7 +75,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,
@@ -81,7 +88,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);
@@ -91,6 +98,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
)
);
+2 -1
View File
@@ -24,6 +24,7 @@
$string['autologinkeygenerationlockout'] = 'Auto-login key generation is blocked because of too many requests within an hour.';
$string['autologinnotallowedtoadmins'] = 'Auto-login is not allowed for site admins.';
$string['cachedef_plugininfo'] = 'This stores the list of plugins with mobile addons';
$string['clickheretolaunchtheapp'] = 'Click here if the app does not open automatically.';
$string['configmobilecssurl'] = 'A CSS file to customise your mobile app interface.';
$string['enablesmartappbanners'] = 'Enable Smart App Banners';
@@ -46,4 +47,4 @@ $string['pluginname'] = 'Moodle Mobile tools';
$string['smartappbanners'] = 'Smart App Banners (iOS only)';
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
$string['typeoflogin'] = 'Type of login';
$string['typeoflogin_desc'] = 'Choose the type of login.';
$string['typeoflogin_desc'] = 'If the site uses a SSO authentication method, then select via a browser window or via an embedded browser. An embedded browser provides a better user experience, though it doesn\'t work with all SSO plugins. If using SSO, autologinguests should be disabled.';
@@ -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.
*
+20
View File
@@ -77,5 +77,25 @@ function xmldb_tool_monitor_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2016052305, 'tool', 'monitor');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2016120501) {
// 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, 2016120501, '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));
@@ -103,7 +103,7 @@ Feature: tool_monitor_subscriptions
Given I log in as "admin"
And I follow "Preferences" in the user menu
And I click on "Notification preferences" "link" in the "#page-content" "css_element"
And I click on ".preference-state" "css_element" in the "Notifications of rule subscriptions" "table_row"
And I click on "//td[@data-processor-name='popup']//label[@class='preference-state']" "xpath_element" in the "Notifications of rule subscriptions" "table_row"
And I wait until the page is ready
And I follow "Preferences" in the user menu
And I follow "Event monitoring"
@@ -124,7 +124,7 @@ Feature: tool_monitor_subscriptions
Given I log in as "teacher1"
And I follow "Preferences" in the user menu
And I click on "Notification preferences" "link" in the "#page-content" "css_element"
And I click on ".preference-state" "css_element" in the "Notifications of rule subscriptions" "table_row"
And I click on "//td[@data-processor-name='popup']//label[@class='preference-state']" "xpath_element" in the "Notifications of rule subscriptions" "table_row"
And I wait until the page is ready
And I follow "Preferences" in the user menu
And I follow "Event monitoring"
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2016120500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2016120501; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2016112900; // Requires this Moodle version.
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
@@ -65,6 +65,6 @@ Feature: Backup user data
And I log out
And I log in as "student1"
And I follow "Course 1"
When I go to "User report" in the course gradebook
When I navigate to "User report" in the course gradebook
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
@@ -49,9 +49,10 @@ Feature: Basic recycle bin functionality
And I should see "Deleting C2"
And I should see "C2 has been completely deleted"
And I press "Continue"
And I go to the courses management page
And I should not see "Course 2" in the "#course-listing" "css_element"
When I navigate to "Recycle bin" node in "Category: Miscellaneous"
And I am on course index
And I should see "Course 1"
And I should not see "Course 2"
When I navigate to "Recycle bin" in current page administration
Then I should see "Course 2"
And I should see "Contents will be permanently deleted after 14 days"
And I click on "Restore" "link" in the "region-main" "region"
+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;
@@ -70,7 +70,7 @@ class tool_templatelibrary_external_testcase extends externallib_advanced_testca
$originaltheme = $CFG->theme;
// Change the theme to 'base' because it overrides these templates.
$CFG->theme = 'base';
$CFG->theme = 'boost';
$template = external::load_canonical_template('core', 'notification_error');
+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'] = 'This option cannot be selected 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';
@@ -29,14 +29,13 @@ Feature: Upload users
And I should see "Section 1"
And I press "Upload users"
And I press "Continue"
And I follow "Browse list of users"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I should see "Tom Jones"
And I should see "Trent Reznor"
And I should see "reznor@example.com"
And I am on site homepage
And I follow "Maths"
And I expand "Users" node
And I follow "Groups"
And I navigate to "Users > Groups" in current page administration
And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones"
+7
View File
@@ -350,6 +350,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)) {
@@ -382,6 +383,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();
+3
View File
@@ -42,5 +42,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2016120501, 'tool', 'usertours');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -146,9 +146,9 @@ $string['tour1_content_navigation'] = 'Major navigation is now through this nav
$string['tour1_title_customisation'] = 'Customisation';
$string['tour1_content_customisation'] = 'To customise the look of your site and the front page, use the settings menu in the corner of this header. Try turning editing on right now.';
$string['tour1_title_blockregion'] = 'Block region';
$string['tour1_content_blockregion'] = 'There is still a block region over here. We recommend removing the Navigation and Settings blocks completely, as all the functionality is elsewhere in the Boost theme.';
$string['tour1_content_blockregion'] = 'There is still a block region over here. We recommend removing the Navigation and Administration blocks completely, as all the functionality is elsewhere in the Boost theme.';
$string['tour1_title_addingblocks'] = 'Adding blocks';
$string['tour1_content_addingblocks'] = 'In fact, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle mobile app, so as a general rule it\'s much better to make sure your site works well without any blocks.';
$string['tour1_content_addingblocks'] = 'In fact, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle Mobile app, so as a general rule it\'s much better to make sure your site works well without any blocks.';
$string['tour1_title_end'] = 'End of tour';
$string['tour1_content_end'] = 'This has been a user tour, a new feature in Moodle 3.2. It won\'t show again unless you reset it using the link in the footer. As an admin you can also create your own tours like this!';
@@ -158,14 +158,14 @@ $string['tour2_content_welcome'] = 'Welcome to the Boost theme for Moodle 3.2. I
$string['tour2_title_customisation'] = 'Customisation';
$string['tour2_content_customisation'] = 'To change any course settings, use the settings menu in the corner of this header. You will find a similar settings menu on the home page of every activity, too. Try turning editing on right now.';
$string['tour2_title_navigation'] = 'Navigation';
$string['tour2_content_navigation'] = 'Major navigation is now though this nav drawer. Use the button at the top to hide or show it. You will see that there are links for major sections of your course.';
$string['tour2_content_navigation'] = 'Navigation is now through this nav drawer. Use the button at the top to hide or show it. You will see that there are links for sections of your course.';
$string['tour2_title_opendrawer'] = 'Open the nav drawer';
$string['tour2_content_opendrawer'] = 'Try opening the nav drawer now.';
$string['tour2_title_participants'] = 'Course participants';
$string['tour2_content_participants'] = 'View participants here. This is also where you go to add or remove students.';
$string['tour2_title_addblock'] = 'Add a block';
$string['tour2_content_addblock'] = 'If you enable editing mode you can add blocks from the nav drawer. However, think carefully about including any blocks on your pages. Blocks are not shown on Moodle mobile app, so for the best student experience it is much better to make sure your course works well without any blocks.';
$string['tour2_content_addblock'] = 'If you turn editing on you can add blocks from the nav drawer. However, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle Mobile app, so for the best user experience it is better to make sure your course works well without any blocks.';
$string['tour2_title_addingblocks'] = 'Adding blocks';
$string['tour2_content_addingblocks'] = 'You can add blocks to this page using this button. However, think carefully about including any blocks on your pages. Blocks are not shown on Moodle mobile app, so for the best student experience it is much better to make sure your course works well without any blocks.';
$string['tour2_content_addingblocks'] = 'You can add blocks to this page using this button. However, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle Mobile app, so for the best user experience it is better to make sure your course works well without any blocks.';
$string['tour2_title_end'] = 'End of tour';
$string['tour2_content_end'] = 'This has been a user tour, a new feature in Moodle 3.2. It won\'t show again unless you reset it using the link in the footer. The site admin can also create further tours for this site if required.';
@@ -25,7 +25,7 @@ Feature: Add a new user tour
And I add steps to the "First tour" tour:
| targettype | targetvalue_selector | Title | Content |
| Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. |
When I click on "Dashboard" "link" in the "Navigation" "block"
When I am on homepage
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
And I press "Next"
And I should see "This area shows you what's happening in some of your courses"
@@ -38,7 +38,7 @@ Feature: Add a new user tour
And I should see "This area shows you what's happening in some of your courses"
And I press "End tour"
And I should not see "This area shows you what's happening in some of your courses"
And I click on "Dashboard" "link" in the "Navigation" "block"
And I am on homepage
And I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
And I should not see "This area shows you what's happening in some of your courses"
And I follow "Reset user tour on this page"
@@ -58,7 +58,7 @@ Feature: Add a new user tour
And I add steps to the "First tour" tour:
| targettype | Title | Content |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
When I click on "Dashboard" "link" in the "Navigation" "block"
When I am on homepage
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
@javascript
@@ -77,5 +77,5 @@ Feature: Add a new user tour
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
And I open the User tour settings page
When I click on "Enable" "link" in the "My first tour" "table_row"
And I click on "Dashboard" "link" in the "Navigation" "block"
And I am on homepage
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
@@ -16,7 +16,7 @@ Feature: Apply tour filters to a tour
And I add steps to the "First tour" tour:
| targettype | Title | Content |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
When I click on "Dashboard" "link" in the "Navigation" "block"
When I am on homepage
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
@javascript
+1 -1
View File
@@ -118,7 +118,7 @@ class tool_usertours_manager_testcase extends advanced_testcase {
$rcm = $rc->getMethod($function);
$rcm->setAccessible(true);
$this->setExpectedException('moodle_exception', 'A required parameter (sesskey) was missing');
$this->expectException('moodle_exception');
$rcm->invokeArgs($manager, $arguments);
}
+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.
+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);
}
?>
+3
View File
@@ -55,5 +55,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1
View File
@@ -151,6 +151,7 @@ class login implements renderable, templatable {
$data->rememberusername = $this->rememberusername;
$data->passwordautocomplete = $this->passwordautocomplete;
$data->signupurl = $this->signupurl->out(false);
$data->username = $this->username;
return $data;
}
+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");
@@ -444,4 +447,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();
}
}
+4
View File
@@ -286,6 +286,10 @@ class auth_email_external extends external_api {
// Validate the data sent.
$data = $params;
$data['email2'] = $data['email'];
// Force policy agreed if a site policy is set. The client is responsible of implementing the interface check.
if (!empty($CFG->sitepolicy)) {
$data['policyagreed'] = 1;
}
unset($data['recaptcharesponse']);
unset($data['customprofilefields']);
// Add profile fields data.
+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);
}
?>
+3
View File
@@ -55,5 +55,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+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';
+3
View File
@@ -43,5 +43,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -43,5 +43,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+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"
-3
View File
@@ -1,3 +0,0 @@
#fitem_id_availabilityconditionsjson .availability_grade input[type=text] {
width: 3em;
}
@@ -115,7 +115,7 @@ Feature: availability_grade
# Give the assignment 40%.
And I follow "A1"
And I click on "View all submissions" "link" in the "Administration" "block"
And I navigate to "View all submissions" in current page administration
# Pick the grade link in the row that has s@example.com in it.
And I click on "Grade" "link" in the "s@example.com" "table_row"
And I set the field "Grade out of 100" to "40"
@@ -101,7 +101,7 @@ Feature: availability_profile
# Edit it again and check the setting still works.
When I follow "P1"
And I navigate to "Edit settings" node in "Page module administration"
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
Then the field "User profile field" matches value "Super field"
And the field "Value to compare against" matches value "Bananaman"
@@ -216,7 +216,7 @@ Feature: edit_availability
# Check the button still works after saving and editing.
And I press "Save and display"
And I navigate to "Edit settings" node in "Forum administration"
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the "Add group/grouping access restriction" "button" should be disabled
And I should see "Grouping" in the "Restrict access" "fieldset"
+5
View File
@@ -2,6 +2,11 @@ This files describes API changes in /availability/*.
The information here is intended only for developers.
=== 3.2 ===
* Condition plugins must replace the CSS selector "#fitem_id_availabilityconditionsjson" with ".availability-field".
This selector is often used in your plugin's yui/src/form/js/form.js file.
=== 2.9 ===
* Condition plugins can now implement a new include_after_restore function to
+12 -3
View File
@@ -2670,7 +2670,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),
@@ -2688,18 +2688,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() {
+1 -1
View File
@@ -519,7 +519,7 @@ class core_backup_renderer extends plugin_renderer_base {
$method = 'get';
}
$url->param('sesskey', sesskey());
$button = new single_button($url, get_string('continue'), $method);
$button = new single_button($url, get_string('continue'), $method, true);
$button->class = 'continuebutton';
return $this->render($button);
}
+56 -104
View File
@@ -43,19 +43,6 @@ use Behat\Gherkin\Node\TableNode as TableNode,
*/
class behat_backup extends behat_base {
/**
* Follow a link like 'Backup' or 'Import', where the link name comes from
* a language string, in the settings nav block of a course.
* @param string $langstring the lang string to look for. E.g. 'backup' or 'import'.
* @param string $component (optional) second argument to {@link get_string}.
*/
protected function navigate_to_course_settings_link($langstring, $component = '') {
$behatnavigation = new behat_navigation();
$behatnavigation->setMink($this->getMink());
$behatnavigation->i_navigate_to_node_in(get_string($langstring, $component),
get_string('courseadministration'));
}
/**
* Backups the specified course using the provided options. If you are interested in restoring this backup would be
* useful to provide a 'Filename' option.
@@ -70,33 +57,31 @@ class behat_backup extends behat_base {
// Go to homepage.
$this->getSession()->visit($this->locate_path('/?redirect=0'));
$this->execute("behat_general::wait_until_the_page_is_ready");
// Click the course link.
$this->find_link($backupcourse)->click();
$this->execute("behat_general::click_link", $backupcourse);
// Click the backup link.
$this->navigate_to_course_settings_link('backup');
$this->wait();
$this->execute("behat_navigation::i_navigate_to_in_current_page_administration", get_string('backup'));
// Initial settings.
$this->fill_backup_restore_form($this->get_step_options($options, "Initial"));
$this->find_button(get_string('backupstage1action', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('backupstage1action', 'backup'));
// Schema settings.
$this->fill_backup_restore_form($this->get_step_options($options, "Schema"));
$this->find_button(get_string('backupstage2action', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('backupstage2action', 'backup'));
// Confirmation and review, backup filename can also be specified.
$this->fill_backup_restore_form($this->get_step_options($options, "Confirmation"));
$this->find_button(get_string('backupstage4action', 'backup'))->press();
$this->execute("behat_forms::press_button", get_string('backupstage4action', 'backup'));
// Waiting for it to finish.
$this->wait(self::EXTENDED_TIMEOUT);
$this->execute("behat_general::wait_until_the_page_is_ready");
// Last backup continue button.
$this->find_button(get_string('backupstage16action', 'backup'))->press();
$this->execute("behat_general::i_click_on", array(get_string('backupstage16action', 'backup'), 'button'));
}
/**
@@ -116,21 +101,19 @@ class behat_backup extends behat_base {
$this->getSession()->visit($this->locate_path('/?redirect=0'));
// Click the course link.
$this->find_link($backupcourse)->click();
$this->execute("behat_general::click_link", $backupcourse);
// Click the backup link.
$this->find_link(get_string('backup'))->click();
$this->wait();
$this->execute("behat_navigation::i_navigate_to_in_current_page_administration", get_string('backup'));
// Initial settings.
$this->find_button(get_string('jumptofinalstep', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('jumptofinalstep', 'backup'));
// Waiting for it to finish.
$this->wait(self::EXTENDED_TIMEOUT);
$this->execute("behat_general::wait_until_the_page_is_ready");
// Last backup continue button.
$this->find_button(get_string('backupstage16action', 'backup'))->press();
$this->execute("behat_general::i_click_on", array(get_string('backupstage16action', 'backup'), 'button'));
}
/**
@@ -152,15 +135,13 @@ class behat_backup extends behat_base {
// Go to homepage.
$this->getSession()->visit($this->locate_path('/?redirect=0'));
$this->wait();
$this->execute("behat_general::wait_until_the_page_is_ready");
// Click the course link.
$this->find_link($tocourse)->click();
$this->wait();
$this->execute("behat_general::click_link", $tocourse);
// Click the import link.
$this->navigate_to_course_settings_link('import');
$this->wait();
$this->execute("behat_navigation::i_navigate_to_in_current_page_administration", get_string('import'));
// Select the course.
$exception = new ExpectationException('"' . $fromcourse . '" course not found in the list of courses to import from',
@@ -175,25 +156,24 @@ class behat_backup extends behat_base {
$radiofield = new behat_form_field($this->getSession(), $radionode);
$radiofield->set_value(1);
$this->find_button(get_string('continue'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('continue'));
// Initial settings.
$this->fill_backup_restore_form($this->get_step_options($options, "Initial"));
$this->find_button(get_string('importbackupstage1action', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('importbackupstage1action', 'backup'));
// Schema settings.
$this->fill_backup_restore_form($this->get_step_options($options, "Schema"));
$this->find_button(get_string('importbackupstage2action', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('importbackupstage2action', 'backup'));
// Run it.
$this->find_button(get_string('importbackupstage4action', 'backup'))->press();
$this->wait(self::EXTENDED_TIMEOUT);
$this->execute("behat_forms::press_button", get_string('importbackupstage4action', 'backup'));
// Wait to ensure restore is complete.
$this->execute("behat_general::wait_until_the_page_is_ready");
// Continue and redirect to 'to' course.
$this->find_button(get_string('continue'))->press();
$this->execute("behat_general::i_click_on", array(get_string('continue'), 'button'));
}
/**
@@ -215,17 +195,16 @@ class behat_backup extends behat_base {
$existingcourse = behat_context_helper::escape($existingcourse);
// Selecting the specified course (we can not call behat_forms::select_radio here as is in another behat subcontext).
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-existing-course ')]" .
$radionodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-existing-course ')]" .
"/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' restore-course-search ')]" .
"/descendant::tr[contains(., $existingcourse)]" .
"/descendant::input[@type='radio']");
$radionode->click();
"/descendant::input[@type='radio']";
$this->execute("behat_general::i_click_on", array($radionodexpath, 'xpath_element'));
// Pressing the continue button of the restore into an existing course section.
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-existing-course ')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
$continuenodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-existing-course ')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']";
$this->execute("behat_general::i_click_on", array($continuenodexpath, 'xpath_element'));
// Common restore process using provided key/value options.
$this->process_restore($options);
@@ -246,16 +225,15 @@ class behat_backup extends behat_base {
$this->select_backup($backupfilename);
// The first category in the list.
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-new-course ')]" .
$radionodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-new-course ')]" .
"/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' restore-course-search ')]" .
"/descendant::input[@type='radio']");
$radionode->click();
"/descendant::input[@type='radio']";
$this->execute("behat_general::i_click_on", array($radionodexpath, 'xpath_element'));
// Pressing the continue button of the restore into an existing course section.
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-new-course ')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
$continuenodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-new-course ')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']";
$this->execute("behat_general::i_click_on", array($continuenodexpath, 'xpath_element'));
// Common restore process using provided key/value options.
$this->process_restore($options);
@@ -276,15 +254,14 @@ class behat_backup extends behat_base {
$this->select_backup($backupfilename);
// Merge without deleting radio option.
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='radio'][@name='target'][@value='1']");
$radionode->click();
$radionodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='radio'][@name='target'][@value='1']";
$this->execute("behat_general::i_click_on", array($radionodexpath, 'xpath_element'));
// Pressing the continue button of the restore merging section.
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
$continuenodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']";
$this->execute("behat_general::i_click_on", array($continuenodexpath, 'xpath_element'));
// Common restore process using provided key/value options.
$this->process_restore($options);
@@ -305,15 +282,14 @@ class behat_backup extends behat_base {
$this->select_backup($backupfilename);
// Delete contents radio option.
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='radio'][@name='target'][@value='0']");
$radionode->click();
$radionodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='radio'][@name='target'][@value='0']";
$this->execute("behat_general::i_click_on", array($radionodexpath, 'xpath_element'));
// Pressing the continue button of the restore merging section.
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
$continuenodexpath = "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']";
$this->execute("behat_general::i_click_on", array($continuenodexpath, 'xpath_element'));
// Common restore process using provided key/value options.
$this->process_restore($options);
@@ -340,7 +316,7 @@ class behat_backup extends behat_base {
$restorelink->click();
// Confirm the backup contents.
$restore = $this->find_button(get_string('continue'))->press();
$this->find_button(get_string('continue'))->press();
}
/**
@@ -356,23 +332,20 @@ class behat_backup extends behat_base {
// Settings.
$this->fill_backup_restore_form($this->get_step_options($options, "Settings"));
$this->find_button(get_string('restorestage4action', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('restorestage4action', 'backup'));
// Schema.
$this->fill_backup_restore_form($this->get_step_options($options, "Schema"));
$this->find_button(get_string('restorestage8action', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('restorestage8action', 'backup'));
// Review, no options here.
$this->find_button(get_string('restorestage16action', 'backup'))->press();
$this->wait();
$this->execute("behat_forms::press_button", get_string('restorestage16action', 'backup'));
// Wait till the final button is visible.
$this->execute("behat_general::wait_until_the_page_is_ready");
// Last restore continue button, redirected to restore course after this.
$this->find_button(get_string('restorestage32action', 'backup'))->press();
// Long wait when waiting for the restore to finish.
$this->wait(self::EXTENDED_TIMEOUT);
$this->execute("behat_general::i_click_on", array(get_string('restorestage32action', 'backup'), 'button'));
}
/**
@@ -431,25 +404,4 @@ class behat_backup extends behat_base {
return $pageoptions;
}
/**
* Waits until the DOM and the page Javascript code is ready.
*
* @param int $timeout The number of seconds that we wait.
* @return void
*/
protected function wait($timeout = false) {
if (!$this->running_javascript()) {
return;
}
if (!$timeout) {
$timeout = self::TIMEOUT;
}
$this->getSession()->wait($timeout * 1000, self::PAGE_READY_JS);
}
}
@@ -41,7 +41,7 @@ Feature: Restore Moodle 2 course backups
Then I should see "Course 1 restored in a new course"
And I should see "Community finder" in the "Community finder" "block"
And I should see "Test forum name"
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
And the field "id_format" matches value "Topics format"
And the field "Number of sections" matches value "15"
@@ -83,7 +83,7 @@ Feature: Restore Moodle 2 course backups
When I restore "test_backup.mbz" backup into a new course using this options:
Then I should see "Topic 1"
And I should see "Test forum name"
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
And the field "id_format" matches value "Topics format"
And I set the following fields to these values:
@@ -95,14 +95,14 @@ Feature: Restore Moodle 2 course backups
And I press "Save and display"
And I should see "1 January - 7 January"
And I should see "Test forum name"
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
And the field "id_format" matches value "Weekly format"
And I set the following fields to these values:
| id_format | Social format |
And I press "Save and display"
And I should see "An open forum for chatting about anything you want to"
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
And the field "id_format" matches value "Social format"
And I press "Cancel"
@@ -119,7 +119,7 @@ Feature: Restore Moodle 2 course backups
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
| Schema | Overwrite course configuration | Yes |
And I click on "Edit settings" "link" in the "Administration" "block"
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
Then the field "id_format" matches value "Topics format"
And the field "Number of sections" matches value "15"
+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);
}
+30 -14
View File
@@ -50,7 +50,7 @@ $PAGE->set_context($context);
$title = get_string('backpackdetails', 'badges');
$PAGE->set_title($title);
$PAGE->set_heading(fullname($USER));
$PAGE->set_pagelayout('mydashboard');
$PAGE->set_pagelayout('standard');
$backpack = $DB->get_record('badge_backpack', array('userid' => $USER->id));
$badgescache = cache::make('core', 'externalbadges');
@@ -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 -1
View File
@@ -89,7 +89,7 @@ $PAGE->set_context($context);
$title = get_string('badges', 'badges');
$PAGE->set_title($title);
$PAGE->set_heading(fullname($USER));
$PAGE->set_pagelayout('mydashboard');
$PAGE->set_pagelayout('standard');
// Include JS files for backpack support.
badges_setup_backpack_js();
+3 -2
View File
@@ -26,6 +26,7 @@
require_once(__DIR__ . '/../config.php');
require_once('preferences_form.php');
require_once($CFG->dirroot.'/user/editlib.php');
$url = new moodle_url('/badges/preferences.php');
@@ -42,8 +43,8 @@ $mform = new badges_preferences_form();
$mform->set_data(array('badgeprivacysetting' => get_user_preferences('badgeprivacysetting')));
if (!$mform->is_cancelled() && $data = $mform->get_data()) {
$setting = $data->badgeprivacysetting;
set_user_preference('badgeprivacysetting', $setting);
useredit_update_user_preference(['id' => $USER->id,
'preference_badgeprivacysetting' => $data->badgeprivacysetting]);
}
if ($mform->is_cancelled()) {
+6 -2
View File
@@ -1,4 +1,4 @@
@core @core_badges @_file_upload
@core @core_badges
Feature: Add badges to the system
In order to give badges to users for their achievements
As an admin
@@ -14,16 +14,20 @@ Feature: Add badges to the system
And I set the field "Default badge issuer name" to "Test Badge Site"
And I set the field "Default badge issuer contact details" to "testuser@example.com"
And I press "Save changes"
And I follow "Badges"
When I follow "Add a new badge"
Then the field "issuercontact" matches value "testuser@example.com"
And the field "issuername" matches value "Test Badge Site"
@javascript
Scenario: Accessing the badges
And I press "Customise this page"
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
Given I navigate to "Site badges" node in "Site pages"
Then I should see "There are no badges available."
@javascript
@javascript @_file_upload
Scenario: Add a badge
Given I navigate to "Add a new badge" node in "Site administration > Badges"
And I set the following fields to these values:
+1 -3
View File
@@ -30,9 +30,7 @@ Feature: Award badges
And I should not see "Criteria for this badge have not been set up yet."
And I press "Enable access"
And I press "Continue"
And I click on "Admin User" "link"
And I choose "Profile" in the open action menu
And I click on "Edit profile" "link" in the "region-main" "region"
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"
@@ -109,7 +109,7 @@ Feature: Block activity modules
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
When I log in as "admin"
And I follow "Courses"
And I am on course index
And I follow "Course 1"
And I turn editing mode on
And I add the "Activities" block

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