Compare commits

...

1221 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 0324fefaf6 Moodle release 3.0.5 2016-07-10 00:29:18 +02:00
AMOS bot b7797e9c6c Automatically generated installer lang files 2016-07-09 00:04:53 +08:00
Eloy Lafuente (stronk7) aa28da8286 weekly release 3.0.4+ 2016-07-07 10:20:00 +02:00
Eloy Lafuente (stronk7) 89a3f06ec5 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-07-07 10:19:55 +02:00
Andrew Nicols 119412b0ca Merge branch 'MDL-54734-30' of git://github.com/lameze/moodle into MOODLE_30_STABLE 2016-07-07 09:58:32 +08:00
Simey Lameze 1e8bbc6040 MDL-54734 core_user: do not cache dummy user records 2016-07-07 09:32:47 +08:00
Andrew Nicols 2245bc111b MDL-54734 user: Add tests to demonstrate multi-user issues 2016-07-07 09:31:58 +08:00
Eloy Lafuente (stronk7) 27273dab58 Merge branch 'wip-MDL-46682-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-07-06 18:14:08 +02:00
Eloy Lafuente (stronk7) 646d613ed4 MDL-54934 workshop: ensure "Current phase" is always separated
Apparently some readers can join 2 adjacent spans completely, simply
adding a whitespace between them prevents that, ensuring separation.,
2016-07-06 11:36:23 +02:00
Adrian Greeve fb5ea89a95 MDL-46682 auth/db: Increase of chunk size and update change.
The update query was not checking the mnet auth id and could
have been updating the wrong entry.
2016-07-06 16:44:54 +08:00
Jerome Mouneyrac e8e02a7188 MDL-46682 auth/db: IN clause crashes when too many users to sync 2016-07-06 10:08:26 +08:00
Eloy Lafuente (stronk7) 191d5bc618 Merge branch 'MDL-54934-30' of https://github.com/nashtechdev01/moodle into MOODLE_30_STABLE 2016-07-05 20:44:31 +02:00
Eloy Lafuente (stronk7) 3815754c3b Merge branch 'MDL-49244-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-07-05 20:19:54 +02:00
Eloy Lafuente (stronk7) ea9061b213 Merge branch 'MDL-29738-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-07-05 17:07:31 +02:00
Andrew Nicols 96b36b930a MDL-29738 file: Remove unused stylesheet functionality
This functionality was commented out in
78946b9bdb for MDL-20204 back in 2009.
Since then it has been wasting cycles performing utterly pointless
preg_match and preg_replace calls.
2016-07-05 19:29:57 +08:00
Andrew Nicols 7ff1344a59 MDL-55114 chat: Remove commented-out variables 2016-07-05 12:46:55 +02:00
Eloy Lafuente (stronk7) 968a10d3e5 Merge branch 'MDL-55113-30' of git://github.com/dpalou/moodle into MOODLE_30_STABLE 2016-07-05 12:22:00 +02:00
Dan Poltawski e2d37a1957 Merge branch 'MDL-54928-30' of git://github.com/dpalou/moodle into MOODLE_30_STABLE 2016-07-05 11:20:10 +01:00
Dan Poltawski 3e0e8e6fbd Merge branch 'MDL-54841-30' of https://github.com/nashtechdev01/moodle into MOODLE_30_STABLE 2016-07-05 11:13:52 +01:00
Dani Palou 044de08f20 MDL-54928 notifications: Add username to emailto users 2016-07-05 10:36:20 +02:00
Dani Palou 1db3d3a676 MDL-54928 notifications: Retrieve username from DB if empty 2016-07-05 10:36:20 +02:00
An Pham Van 1899e49017 MDL-54841 workshop: Combine links for attachment icon and text.
In a workshop activity, on the view submission page where having attachment(s), there's an accessibility issue.
There're 2 separate links for the icon and text which causes an issue for keyboard and screen reader users.
So the text and icon should be combined in one link.
2016-07-05 13:31:22 +07:00
Jake Dallimore 69af79848a MDL-53431 tool_monitor: Access control for tool monitor subscriptions 2016-07-05 10:46:04 +08:00
Dan Poltawski 635c6c8484 Merge branch 'MDL-55019-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-07-04 15:29:46 +01:00
Dan Poltawski 2628e64fa5 Merge branch 'MDL-54976-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-07-04 14:52:04 +01:00
Dan Poltawski ed577ebd43 Merge branch 'MDL-54994_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2016-07-04 14:18:21 +01:00
Dan Poltawski d4a279464e Merge branch 'MDL-55041_30_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_30_STABLE 2016-07-04 12:45:58 +01:00
Dan Poltawski e24a2c5ce2 Merge branch 'MDL-41945-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-07-04 12:39:39 +01:00
Marina Glancy 84cd5dca45 MDL-55069 core: escape special characters in email headers 2016-07-04 12:28:06 +01:00
Dani Palou 693e184927 MDL-55113 assign: Use PARAM_RAW in onlinetext text 2016-07-04 09:59:58 +02:00
Andrew Nicols 6d68238b13 Merge branch 'MDL-54953-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-07-04 15:29:29 +08:00
Davo Smith 93b0fd8f26 MDL-55057 mod_scorm: fix handling of SCO identifiers with apostrophes 2016-07-04 13:14:40 +08:00
Cameron Ball 868fdbbdc0 MDL-41945 mod_assign: Check if submission has been modified
This patch adds a check that stops a user submitting an assignment
if someone else has modified it in the meantime.
2016-07-04 12:25:02 +08:00
Andrew Nicols e11ad0fc71 Merge branch 'MDL-55020-30-pluginzip' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-07-04 11:26:53 +08:00
Andrew Nicols 3c5501fc01 Merge branch 'MDL-54968-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-07-04 10:33:30 +08:00
Andrew Nicols 12cce3ef84 Merge branch 'MDL-53019_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2016-07-04 09:11:04 +08:00
AMOS bot 705b81f2c1 Automatically generated installer lang files 2016-07-02 00:05:24 +08:00
Mark Johnson 74526688a0 MDL-55041 roles: Fix JSON parsing in permission manager 2016-07-01 15:00:36 +01:00
Eloy Lafuente (stronk7) f4adac3f9a MDL-53019 environment: 3.2 requirements added
Changes:
 - PHP 5.6.5 required
2016-07-01 13:50:02 +02:00
Eloy Lafuente (stronk7) 256c202cab MDL-54994 badges: Count correctly the number of external badges shown 2016-07-01 13:41:13 +02:00
Loc Nguyen 5797c5ea2b MDL-54934 workshop: indicate current phase
Indicate phase in page titles, current phase in userplan table
so that it's accessible to me through my screen reader
2016-07-01 18:40:59 +07:00
Jun Pataleta b5d947c09e MDL-54976 mod_scorm: Add validation for availability dates 2016-07-01 14:50:56 +08:00
Andrew Nicols 566f5a7d07 weekly release 3.0.4+ 2016-07-01 10:20:26 +08:00
Andrew Nicols 18af3d7858 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-07-01 10:20:23 +08:00
David Mudrák 811f5b406d MDL-55020 admin: Fix renaming of the plugin package root folder
There was a problem with core\update\code_manager::unzip_plugin_file()
if it was used to extract a plugin package into a non-empty target
directory and the plugin package root folder was being renamed at the
same time.

The problem was caused by the underlying helper method
rename_extracted_rootdir() that worked only for ZIPs extracted to an
empty temporary location. When the plugin was extracted to the actual
dirroot with other existing plugin folders present, the method failed
badly.

The solution in the patch is to always extract the ZIP into a temporary
empty location, perform the eventual root renaming there, and only then
move the extracted contents to the final destination. Additionally we
are changing the behaviour of the rename_extracted_rootdir() method so
that now it throws exception if the plugin package contains multiple
root folders (it should not happen in normal situations as such a plugin
would not pass the pre-install validation).

Unit tests did not catch this bug before because in the tests, the
target directory had been empty. Now we are adding a new directory
"aaa_another" to the target location to test in more realistic
environment. Tests for the new behaviour of the renaming method are
added, too.

p.s. I noticed that moodle_exception class was not imported into the
namespace and this is fixed now too (and covered with unit tests).
2016-07-01 01:05:41 +02:00
Juan Leyva aac89d23ac MDL-49244 course: Clean parameters in core_course_get_categories 2016-06-30 13:27:59 +01:00
Dan Poltawski 5b059a03c5 MDL-32135 mod_choice: fix behat tests 2016-06-30 09:25:31 +01:00
Stephen Bourget 5ca8087ea8 MDL-32135 mod_choice: update behat tests 2016-06-30 09:25:30 +01:00
Dan Poltawski 74630a36fb Merge branch 'MDL-32135_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-06-30 09:25:30 +01:00
Dan Poltawski 88b45d17a8 Merge branch 'MDL-55002-30-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-06-28 09:05:59 +01:00
Andrew Nicols ab13910a8e Merge branch 'MDL-54910_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-06-28 13:02:11 +08:00
Andrew Nicols b1b833ca00 Merge branch 'MDL-54911_m30v3' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-06-28 12:41:24 +08:00
Andrew Nicols 38d38ee049 MDL-54755 core: Correct behat language 2016-06-28 10:02:13 +08:00
Andrew Nicols 0eb3ffbcec Merge branch 'MDL-54755_moodle30' of https://github.com/StudiUM/moodle into MOODLE_30_STABLE 2016-06-28 10:01:55 +08:00
Andrew Nicols c2c0dc1b4c Merge branch 'MDL-54935-30' of git://github.com/ryanwyllie/moodle into MOODLE_30_STABLE 2016-06-28 09:40:55 +08:00
Andrew Nicols 9543b1c57a Merge branch 'wip-mdl-54974-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-06-28 08:33:48 +08:00
Helen Foster a84e3767b7 MDL-55002 lang: Merge English strings from the en_fix language pack 2016-06-27 23:12:43 +02:00
Eloy Lafuente (stronk7) c59c57a2da Merge branch 'MDL-54900-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-06-27 19:03:42 +02:00
AMOS bot 3a39f54589 Automatically generated installer lang files 2016-06-28 00:06:18 +08:00
Eloy Lafuente (stronk7) 4070006db6 Merge branch 'MDL-52887-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-06-27 16:13:45 +02:00
Gilles-Philippe Leblanc a19df21939 MDL-54755 core: Incorrect redirection after password change 2016-06-27 08:22:11 -04:00
Eloy Lafuente (stronk7) 80c47141a1 Merge branch 'MDL-54663-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-06-27 13:26:51 +02:00
Marina Glancy 9b1f8676c5 MDL-54968 user: change query for resetting dashboard
In case of inconsistent data the fatal error could have happen.
Also improve performance by joining several queries into one.
2016-06-27 15:09:03 +08:00
Rajesh Taneja 723702bf08 MDL-54974 behat: Handle interupts on PHP7
As https://bugs.php.net/bug.php?id=71448 is
not going to get fixed, we need to declare tick
2016-06-27 14:32:54 +08:00
Andrew Nicols 9880e5fbd7 Merge branch 'MDL-53111_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-06-27 14:23:40 +08:00
Marina Glancy 371aae1e1c MDL-54900 mod_choice: correctly count number of answered users 2016-06-27 12:48:20 +08:00
Andrew Nicols 9d087a1a28 Merge branch 'MDL-54785-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-06-27 09:33:40 +08:00
Juan Leyva 4f8e5d15f3 MDL-55019 webservice: Course summary text should not be cleaned 2016-06-24 13:34:35 +01:00
Stephen Bourget ebe33c4377 MDL-54911 mod_feedback: start date should be before the end date 2016-06-23 17:41:15 -04:00
Stephen Bourget 14c7153625 MDL-54910 mod_data: Open dates should be before close dates 2016-06-23 17:34:14 -04:00
Stephen Bourget abef0f8b05 MDL-32135 mod_choice: Open time should be before close time 2016-06-23 17:22:41 -04:00
Andrew Nicols 39087f28ae weekly release 3.0.4+ 2016-06-23 14:49:40 +08:00
Andrew Nicols 7ab2ac2575 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-06-23 14:49:37 +08:00
Frederic Massart fab4c8b424 MDL-54785 files: Deprecate the support for $usepost and related 2016-06-23 12:46:38 +08:00
Frederic Massart 294c33960e Revert "MDL-44626 files: Show the PHP max upload size instead of 'unlimited'"
This reverts commit 6f0768618a.
2016-06-23 12:44:40 +08:00
Frederic Massart 4d957a5373 Revert "Merge branch 'MDL-54110_master' of https://github.com/marxjohnson/moodle"
This reverts commit 016e0abfbc, reversing
changes made to 58a2f0ac40.
2016-06-23 12:44:40 +08:00
Frederic Massart dd12c1df33 Revert "MDL-54110 repositories: Whitespace, Typo + unit test fixes"
This reverts commit 7e4d43e1a2.
2016-06-23 12:44:40 +08:00
Stephen Bourget d4f446f9a8 MDL-54935 Survey: Remove duplicate event trigger 2016-06-23 03:01:30 +00:00
Cameron Ball 7a010b1896 MDL-35104 auth: Always allow editing username for new users 2016-06-22 15:03:47 +08:00
Marina Glancy f5fe07de0c MDL-52887 mod_choice: backup allowmultiple option 2016-06-22 13:52:19 +08:00
Andrew Nicols 79c37128c3 MDL-54663 forum: Correct digest link to forum preferences 2016-06-22 13:12:35 +08:00
Marina Glancy 5ec74b7131 MDL-54953 mod_chat: remove Safari hack
This hack was introduced in MDL-16878 and is not needed in modern Safari versions
but it was reported that it can breaks chat in IE
2016-06-22 12:22:14 +08:00
Eloy Lafuente (stronk7) 7573bf0b66 MDL-54778 form: Make it all js style (eslint) compliant
The changes in this commit should not be problematic, just:

- different whitespace.
- some docs.
- 1 variable to camelCase.

And then, less trivial, but safe enough IMO:

- a change to camelCase some identifiers and their calculation.
2016-06-22 01:30:18 +02:00
Eloy Lafuente (stronk7) d8230f25d0 Merge branch 'MDL-54778-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-06-22 01:30:14 +02:00
AMOS bot dc77a3c5d0 Automatically generated installer lang files 2016-06-22 00:06:30 +08:00
Andrew Nicols a55c462eb8 Merge branch 'MDL-54920-m30' of https://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2016-06-21 14:19:33 +08:00
Andrew Nicols 7f93f96a02 Merge branch 'MDL-54894-30' of git://github.com/crazyserver/moodle into MOODLE_30_STABLE 2016-06-21 12:11:12 +08:00
Andrew Nicols 1242b84eb6 Merge branch 'MDL-54881_30' of https://github.com/mr-russ/moodle into MOODLE_30_STABLE 2016-06-21 11:32:35 +08:00
Andrew Nicols 88b799a470 Merge branch 'MDL-35104-30-2' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-06-21 11:23:11 +08:00
Cameron Ball cbce72a73a MDL-35104 auth: Don't allow modification of username
Presently it is either unreliable, or not possible to change
the username of a user created with an authentication plugin.
In some cases it is even hard coded to fail. Ideally we would
sync the username, and the issue MDL-21928 exists to address
that. However, in the mean time we should not allow the
username of an external user to be modified.
2016-06-21 11:14:29 +08:00
Andrew Nicols 3a435c4deb Merge branch 'MDL-51505-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-06-21 10:31:04 +08:00
Andrew Nicols a9972ecea0 MDL-54778 form: Fix lots of issues with form dependencies
The original issue here was that each loop of the named values did not
check for prototypal properties. As a result, if there were input fields
with names such as 'sort', 'valueOf', 'constructor', etc. these would
return their prototypal functions instead of a falsy value, and be treated
as though they are array - hence the 'Cannot push to Function' type error.

Following on from this I discovered that the data stores were being created
as arrays, but used as objects. This can also cause issues with some form
input names -- e.g. if they are numeric.

These two issues were resolved together by correctly storing them in
objects, and checking that those objects had real properties
(hasOwnProperty). This itself has to use the prototypal function to cater
for the potential of a field name called 'hasOwnProperty'.

I also found that the instance value stores were being initialised in the
prototype (and therefore shared), which meant that there were numerous
issues if two forms were present on the same page, or one form replaced an
existing one (e.g. forms initialised in JS).

In addition, it also became apparant that several values were being used
outside of scope, or in the wrong scope. This caused further issues when
creating multiple forms on a page.
2016-06-21 08:07:56 +08:00
Russell Smith 2b04eb1f14 MDL-54881 quiz: Ensure user attempts are deterministic for testing. 2016-06-21 08:33:00 +10:00
AMOS bot 51176946f9 Automatically generated installer lang files 2016-06-21 00:05:46 +08:00
AMOS bot bde2af526d Automatically generated installer lang files 2016-06-21 00:05:45 +08:00
Pau Ferrer Ocaña 1014381131 MDL-54894 comments: Get course from context if not informed 2016-06-20 09:02:17 +02:00
AMOS bot 2f86038ad9 Automatically generated installer lang files 2016-06-20 00:05:13 +08:00
AMOS bot 96d1ff2aaa Automatically generated installer lang files 2016-06-19 00:06:32 +08:00
Eloy Lafuente (stronk7) 364329af40 weekly release 3.0.4+ 2016-06-16 17:01:38 +02:00
sam marshall 5a5815d779 MDL-54920 Behat: Allow viewport size to be set consistently
Provides a new Behat step

And I set viewport size to "800x600"
2016-06-15 15:29:38 +01:00
Andrew Nicols 1367b11624 Merge branch 'MDL-53788_modlti_m30' of git://github.com/nhoobin/moodle into MOODLE_30_STABLE 2016-06-15 09:12:53 +08:00
Nicholas Hoobin 69b9974f91 MDL-53788 multilangupgrade: fix aggressive course cache rebuilding 2016-06-15 10:50:15 +10:00
Nicholas Hoobin 2ad35901a5 MDL-53788 user: fix aggressive course cache rebuilding 2016-06-15 10:44:54 +10:00
Nicholas Hoobin a14ec86bfd MDL-53788 mod_lti: fix aggressive course cache rebuilding 2016-06-15 10:44:54 +10:00
Andrew Nicols 7a58d43b1c Merge branch 'MDL-54559-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-06-14 14:30:53 +08:00
Andrew Nicols 76fd59d287 Merge branch 'MDL-54797_30' of git://github.com/aolley/moodle into MOODLE_30_STABLE 2016-06-14 13:27:35 +08:00
jogarcia 23e40cc6f7 MDL-54576 theme: Redirect to show confirmation
After selecting a new theme, save the new configs
then redirect to show the confirmation and the new
theme's read me.  This prevents any odd behavior
from the old theme bleeding into the display of
the confirmation.
2016-06-14 11:44:42 +08:00
Eloy Lafuente (stronk7) 2c478380d8 Merge branch 'MDL-54890-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-06-13 20:09:29 +02:00
Joby Harding 09bfb22703 MDL-51505 tool_templatelibrary: Prevent jumping when selecting template 2016-06-13 17:07:49 +08:00
Dan Poltawski 112b98def7 Merge branch 'MDL-54772-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-06-13 09:35:36 +01:00
Dan Poltawski 1ccd1c284d Merge branch 'MDL-54842-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-06-13 08:36:40 +01:00
Jun Pataleta 6a798ad9bf MDL-54772 mod_assign: Fixes for PDF editor
* Render the annotations and comments within the drawing canvas, not in
the drawing region.
* Remove edit-related event bindings for stamp annotations.
2016-06-13 10:00:20 +08:00
Dan Poltawski 014c45b7ac MDL-54890 course: remove erranous duplicated switch label
Detected by eslint rule 'no-duplicate-case'
2016-06-10 10:10:12 +01:00
Dan Poltawski c6cd02470e MDL-54890 assignfeedback_editpdf: Fix missing semicolon
Detected by eslint rule 'semi'
2016-06-10 10:07:02 +01:00
Jun Pataleta a424f6cb60 MDL-54842 core_renderer: Hide additional body HTML in embedded layout 2016-06-10 14:48:04 +08:00
Stephen Bourget 203e47a3b8 MDL-53111 Lesson: Allow "end reached" criteria to be disabled 2016-06-09 12:22:20 -04:00
Dan Poltawski 83a32727a5 weekly release 3.0.4+ 2016-06-09 11:25:21 +01:00
Dan Poltawski 8416d4cfc2 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-06-09 11:25:19 +01:00
Andrew Nicols 19bc0f5d75 MDL-54853 weblib: Specify version and fixed encoding 2016-06-09 09:57:03 +08:00
Andrew Nicols 53e32ff5b8 Merge branch 'MDL-54853-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-06-09 09:56:58 +08:00
Cameron Ball 4ac487dba6 MDL-54853 weblib: Properly specify encoding for blanktarget 2016-06-08 18:29:52 +08:00
Andrew Nicols e214b30e3f Merge branch 'MDL-53947-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-06-08 08:47:18 +08:00
Dan Poltawski 0e6cbf13cc MDL-46721 assign: clarify ternerary statement 2016-06-07 12:15:53 +01:00
Dan Poltawski 33b234805a Merge branch 'MDL-46721-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-06-07 12:12:39 +01:00
Frederic Massart f710093255 MDL-48756 editor_atto: Bulk atto autosave queries 2016-06-07 11:51:21 +01:00
Dan Poltawski 97edee1f24 Merge branch 'MDL-54765-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-06-07 09:41:32 +01:00
David Monllao 365cc7aaed Merge branch 'MDL-54180_30_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_30_STABLE 2016-06-07 16:17:32 +08:00
Eric Merrill ffb6dc984d MDL-54559 theme: Fix padding that pushes navbar down 2016-06-07 15:01:14 +08:00
Skylar Kelty 8f62c066ad MDL-53947 memcached: Fix memcached session warning on PHP7 2016-06-07 10:27:10 +08:00
Eloy Lafuente (stronk7) e79e879783 Merge branch 'MDL-54769-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-06-06 23:57:00 +02:00
Eloy Lafuente (stronk7) 6ac1f4e96e Merge branch 'MDL-54805-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-06-06 18:08:57 +02:00
Dan Poltawski 9f812d2602 Merge branch 'wip-MDL-50824-MOODLE_30_STABLE' of https://github.com/cdsmith-umn/moodle into MOODLE_30_STABLE 2016-06-06 15:07:03 +01:00
Dan Poltawski e69409fdc0 Merge branch 'MDL-53392_30' of https://github.com/snake/moodle into MOODLE_30_STABLE 2016-06-06 13:21:11 +01:00
Dan Poltawski f2577ea928 Merge branch 'MDL-54557-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-06-06 13:17:10 +01:00
Dan Poltawski 9da0108feb Merge branch 'wip-MDL-49852-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-06-06 11:55:59 +01:00
Eloy Lafuente (stronk7) 678b8f5219 Merge branch 'MDL-41922-30-c' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-06-06 11:52:11 +02:00
Mike Churchward 3ce17afe99 MDL-54805 portfolio_download: Adding a 'require' of necessary library file 2016-06-04 21:54:34 +08:00
AMOS bot 378b29c760 Automatically generated installer lang files 2016-06-04 00:04:39 +08:00
Frederic Massart 0c325214e4 MDL-41922 mod_quiz: Don't report quiz due when an attempt was finished 2016-06-03 14:52:58 +08:00
Jun Pataleta f5194755f1 MDL-54765 mod_assign: Use selectedIndex for setting page selection
Set the 'selectedIndex' attribute of the page selection element instead of
the 'value' attribute since YUI is having trouble with this in IE.
2016-06-03 14:52:50 +08:00
Andrew Nicols 378bd31dbc weekly release 3.0.4+ 2016-06-03 12:01:47 +08:00
Andrew Nicols 451831e313 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-06-03 12:01:45 +08:00
Clement Smith 6b8ce1602c MDL-50824 message/externallib.php: Fix get_string call
This fixes the get_string call by adding the intended recipient's
fullname as the third argument when a user tries to message the
recipient, the recipient is blocking non-contacts from messaging
them, and the user is not in the recipient's contact list.
2016-06-02 07:22:38 -05:00
Adam Olley 9747d42070 MDL-54797 course: Add indexed field to condition of delete query
Deleting records from the course_completion_criteria table goes much
faster when we include the indexed course field in the delete query.
2016-06-02 15:52:59 +09:30
Marina Glancy 847e73efe4 MDL-54557 course: treat section summary as contents 2016-06-02 12:57:00 +08:00
AMOS bot 76f6647587 Automatically generated installer lang files 2016-06-02 00:04:29 +08:00
Frederic Massart 809309af4f MDL-48248 enrol_manual: Handle durations more precise than int days 2016-06-01 16:00:10 +08:00
Marina Glancy de2a386a98 MDL-54769 backup: add missing error language string 2016-06-01 09:45:34 +08:00
Andrew Nicols c2d39f88e3 Merge branch 'MDL-53598-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-06-01 08:26:08 +08:00
Mark Johnson 1ec4e9320a MDL-54180 Behat: Handle exceptions from driver when saving screenshot 2016-05-31 12:39:47 +01:00
Marina Glancy 4bca636f94 MDL-53598 block_glossary_random: do not fail if glossary was deleted
This commit refactors how associated glossary is searched for and removes
unnecessary DB queries. Also prevents from situations when the global glossary or course have
been deleted
2016-05-31 15:31:32 +08:00
David Monllao 65c42a0638 Merge branch 'MDL-54065-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-05-31 15:28:20 +08:00
Andrew Nicols d26072d275 Merge branch 'MDL-54655_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-31 13:53:33 +08:00
David Monllao 6fcc6d835f Merge branch 'MDL-54667-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-05-31 13:09:55 +08:00
David Monllao 876db7c5e5 Merge branch 'MDL-53851-30' of https://github.com/blckct/moodle into MOODLE_30_STABLE 2016-05-31 11:47:10 +08:00
David Monllao 2fb8dbad77 Merge branch 'MDL-53938_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-05-31 11:43:27 +08:00
David Monllao 88dcc03e9b Merge branch 'MDL-54605_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-05-31 11:33:02 +08:00
Andrew Nicols af313210ed Merge branch 'MDL-54579_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-31 11:19:26 +08:00
Jakub Kania ebc4062450 MDL-54667 core_lib: Fix the param name in edit profile link 2016-05-30 16:35:35 +08:00
Cameron Ball 9196d5ae69 MDL-37138 weblib: Document blanktarget in upgrade.txt 2016-05-30 16:13:10 +08:00
David Monllao c0298a5967 Merge branch 'MDL_54002_m30v3' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-30 16:09:26 +08:00
David Monllao d9196660b5 Merge branch 'MDL-54010-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-05-30 16:04:47 +08:00
David Monllao de44442189 Merge branch 'MDL-54577-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-05-30 15:46:10 +08:00
David Monllao 086b3f25a0 Merge branch 'MDL-29905-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-30 15:41:29 +08:00
David Monllao 932e53d839 Merge branch 'MDL-54116-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-05-30 15:36:48 +08:00
David Monllao dc54c9af93 Merge branch 'MDL-49943-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-05-30 15:29:43 +08:00
David Monllao dc04236962 Merge branch 'MDL-37138-30-2' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-05-30 15:02:39 +08:00
Andrew Nicols 4c3f595bc5 Merge branch 'MDL-54567-30-build' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-30 14:44:35 +08:00
Marina Glancy 30ee8e40e0 MDL-49943 mod_choice: display multiple answers in complete report 2016-05-30 14:17:58 +08:00
Jun Pataleta 247c29e4df MDL-53425 blocklib: Raise execution time for dashboard reset process 2016-05-30 14:12:44 +08:00
Andrew Nicols 1b1ad2f2ee Merge branch 'MDL-35987-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-30 13:41:23 +08:00
David Monllao 94320c47c5 Merge branch 'MDL-53425-30-delete-by-chunks' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-05-30 13:35:52 +08:00
Andrew Nicols 3a091f4522 MDL-54567 backup: Fixtures for legacy grade value rewrite 2016-05-30 13:22:21 +08:00
Frederic Massart 946343cd24 MDL-54567 backup: Process the calculations_freeze item upon restore 2016-05-30 13:22:21 +08:00
Cameron Ball cda2a0269f MDL-37138 chat: Use blanktarget option for chat text 2016-05-30 13:18:26 +08:00
Cameron Ball 0bdfc38a6e MDL-37138 message: Use blanktarget option for message text 2016-05-30 13:18:26 +08:00
Cameron Ball 0c1ba9c959 MDL-37138 weblib: Add blanktarget option to format_text 2016-05-30 13:18:26 +08:00
David Monllao abbd492512 Merge branch 'MDL-48248-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-30 13:06:47 +08:00
Frederic Massart 5bc25db29c MDL-29905 question: Auto remove stale questions upon category deletion 2016-05-30 12:26:31 +08:00
Eric Merrill 04e9b8e614 MDL-29905 question: Try to delete unused hidden/random questions
Before going to display the warning about moving in use questions,
try to delete unused Random qtype questions, as well as 'hidden'
questions (these are questions that were deleted from the category),
but were in use at the time.
2016-05-30 12:26:30 +08:00
Jun Pataleta d1654d9803 MDL-53425 blocklib: Perform deletion of block instances by chunk 2016-05-30 11:24:27 +08:00
David Monllao ecf200c5f0 Merge branch 'MDL-43887-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-05-30 11:09:14 +08:00
David Monllao 8efb7d9aed Merge branch 'MDL-51806_30' of https://github.com/snake/moodle into MOODLE_30_STABLE 2016-05-30 10:52:21 +08:00
Jake Dallimore 6c361cf374 MDL-51806 mod_workshop: Add locale support for grade values. 2016-05-30 10:48:14 +08:00
David Monllao 0c798d3353 Merge branch 'wip-MDL-45427-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-05-30 10:19:52 +08:00
Marina Glancy bd6c7d5b93 MDL-54065 gradebook: correctly display module icon 2016-05-30 10:08:26 +08:00
Stephen Bourget 53ac88ab8a MDL-54655 Behat: Tests for the online_users block 2016-05-27 18:26:28 -04:00
Adrian Greeve 079c7e4022 MDL-49852 mod_assign: Unit tests for activity completion. 2016-05-27 15:38:29 +08:00
Tim Hunt 9a16044c21 MDL-54605 quiz regrading: incorrect DB query
There were two issues. With groups, the $params array was wrong
due to PHP + vs array_merge sillyness.

Also, the first column in the SQL was not necessarily unique,
so we need to use a recordset rather than get_records.
2016-05-27 08:12:20 +01:00
Steve Bader 2f61c533d4 MDL-49852 mod_assign: Fix group assignment completion tracking
Fixes completion tracking for group assignments where either only
one student is required to click Submit when submitting the
assignment for grading, all students are required to submit,
or no students are required to click submit (meaning that simply
uploading submits for grading).
2016-05-27 13:05:02 +08:00
Cameron Ball 9d661b7030 MDL-43887 formslib: Allow not set date field
Previously if the date field was not enabled it would
be treated as having value 0. A bug would allow this 0
to pass through and save the date as 1 January 1970
2016-05-27 01:53:32 +08:00
AMOS bot 7e99566a9e Automatically generated installer lang files 2016-05-27 00:04:57 +08:00
Jake Dallimore 9402642f95 MDL-53392 mod_assign: Fix selector for alert on increasing max grade 2016-05-26 14:53:52 +08:00
Cameron Ball b1c2c0f474 MDL-54010 roles: Specify encoding for escaped export data 2016-05-26 10:32:09 +08:00
Nigel Cunningham 86100ea6c0 MDL-54010 roles: Fix missing HTMLspecialchars in role export code.
Role name and description fields are currently not escaped when
exporting a role. This results in an unusable file when characters
such as ampersands are used in a name or description. Fix this by
using htmlspecialchars on both fields.

Signed-off-by: Nigel Cunningham <nigelc@catalyst-au.net>
2016-05-26 10:32:09 +08:00
Stephen Bourget 1423682a40 MDL-54577 Behat: Add tests for messages block 2016-05-26 10:22:13 +08:00
Marina Glancy 9994e13064 MDL-54116 block_comments: warnings when commenting outside of a course 2016-05-26 10:20:26 +08:00
Stephen Bourget f1af51c59d MDL-54116 block_comments: behat test 2016-05-26 10:20:26 +08:00
Eloy Lafuente (stronk7) eba73c81f1 weekly release 3.0.4+ 2016-05-26 02:14:13 +02:00
Eloy Lafuente (stronk7) a49305d9c4 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-05-26 02:14:10 +02:00
David Monllao 5beb3657a4 Merge branch 'MDL-54059-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-05-25 16:19:20 +08:00
Adrian Greeve 4f8ae68644 MDL-45427 mod_data: Inserting tags into templates.
Allows tags to be inserted into the editor without
having to touch Atto at all.
2016-05-25 15:29:47 +08:00
David Monllao 07836f7da0 Merge branch 'MDL-46934-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-25 13:25:25 +08:00
Frederic Massart f80ab4d427 MDL-35987 qtype_multianswer: Prevent restore failure due to bad sequence 2016-05-25 12:24:14 +08:00
Andrew Nicols 4f538c08a7 MDL-54059 testing: Add grunt test 2016-05-25 10:51:27 +08:00
Andrew Nicols 1db139031d MDL-54059 testing: Simplify travis output 2016-05-25 10:50:42 +08:00
Frederic Massart ff81f1c783 MDL-48248 enrol_manual: Ensure that the default value is always selected 2016-05-25 10:17:23 +08:00
Stephen Bourget 72808207d2 MDL-54002 Behat: tests for recent blogs block 2016-05-24 12:50:38 -04:00
AMOS bot 2302ac07fb Automatically generated installer lang files 2016-05-25 00:04:54 +08:00
Cameron Ball 806a93abdc MDL-46721 assign: Make blind marking participant numbers match
Previously emails were setting the "From" header to the incorrect
participant number.
2016-05-24 18:25:35 +08:00
David Monllao 67dec8d44d Merge branch 'MDL-54582_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-05-24 11:17:27 +08:00
Andrew Nicols 7d5616fa15 MDL-53687 core_media: Comment fix 2016-05-24 09:07:21 +08:00
Andrew Nicols 1ca9ac5b79 Merge branch 'MDL-53687-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-24 09:07:16 +08:00
AMOS bot 2ae82421dd Automatically generated installer lang files 2016-05-24 00:04:34 +08:00
Jakub Kania 56afc60c55 MDL-53851 news block: Display news from all the accessible groups 2016-05-23 17:19:01 +02:00
Frederic Massart 3798e7ef55 MDL-53687 core_media: Edge does not yet support WebM and OGG 2016-05-23 16:25:38 +08:00
Dan Poltawski 2772b598b8 weekly release 3.0.4+ 2016-05-20 10:09:17 +01:00
Frederic Massart 0c05085b41 MDL-46934 webservice_rest: Fixed undefined index on XML output 2016-05-20 17:03:50 +08:00
David Monllao a22978b8ad Merge branch 'MDL-54640_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-05-20 09:05:19 +08:00
Rajesh Taneja 63b9cc7b80 MDL-54640 behat: add 1 sec delay before running tasks
Also just execute task, as running whole cron is not
required
2016-05-20 09:03:06 +08:00
Stephen Bourget d0c5c6804f MDL-54579 Behat: tests for the private_files block 2016-05-19 20:03:15 -04:00
David Monllao 9211f438d6 Merge branch 'MDL-54578_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-19 11:41:41 +08:00
David Monllao a2ddf7d84d Merge branch 'MDL-54613-m30' of https://github.com/micaherne/moodle into MOODLE_30_STABLE 2016-05-19 11:21:11 +08:00
Eloy Lafuente (stronk7) 54d3a2c4e4 Merge branch 'MDL-54553-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-05-18 18:23:59 +02:00
Stephen Bourget d84c524d2c MDL-54578 Behat: Add tests for the myprofile block 2016-05-18 09:09:26 -04:00
Dan Poltawski 114c6918b6 MDL-54553 behat: check statuscode of http request 2016-05-18 11:16:19 +01:00
Dan Poltawski 995994ee75 Merge branch 'MDL-54027-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-18 11:05:01 +01:00
Michael Aherne e7a48b1afd MDL-54613 unit tests: Add iteminstance to test grade_item 2016-05-18 10:59:44 +01:00
Dan Poltawski 443487dab7 Merge branch 'wip-mdl-53956-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-05-18 10:45:21 +01:00
Dan Poltawski 58fd7d6345 Merge branch 'MDL-54549-30-en_fix' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-05-18 10:29:17 +01:00
Rajesh Taneja c9072543fc MDL-53956 behat: Avoid before and after step and switch
After pressing the button, if system is slow then
after step and before step might fail as the window
is closed by then. Execute steps one after other
2016-05-18 14:19:09 +08:00
David Monllao c827490373 MDL-45390 grades: Bump build to today's date
To test backup/restore.
2016-05-18 14:13:40 +08:00
David Monllao b4311689f6 Merge branch 'wip-MDL-45390-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-05-18 14:12:51 +08:00
Andrew Nicols b627d8c15b Merge branch 'wip-mdl-54564-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-05-18 12:27:44 +08:00
Andrew Nicols 967adff2ff MDL-54620 rating: Add tests for get_aggregate_string 2016-05-18 12:13:26 +08:00
Andrew Nicols 759c1e65bb Merge branch 'MDL-54620_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-05-18 12:10:21 +08:00
Rajesh Taneja fe04ddaef3 MDL-54564 behat: Wait after hover, to ensure page is ready 2016-05-18 11:18:59 +08:00
Adrian Greeve b215dec368 MDL-45390 gradebook: sql tidy up and version alignment. 2016-05-18 10:44:16 +08:00
Andrew Nicols 544017f884 Merge branch 'MDL-54049-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-05-18 10:38:20 +08:00
David Monllao 69033e2214 MDL-45390 grades: Courses letters using system bad boundaries
Added unit tests to highlight the existing failures and adding
unset_config between each set of tests.
2016-05-18 10:02:46 +08:00
Adrian Greeve f000ff41ae MDL-45390 gradebook: Grade boundary fix.
Code to upgrade, fix, and freeze the gradebook for
courses with letter boundary problems.
2016-05-18 10:02:46 +08:00
Adrian Greeve 5f91a59fed MDL-45390 gradebook: Behat tests for grade boundary issues. 2016-05-18 09:58:15 +08:00
Adrian Greeve 0cbd302b83 MDL-45390 gradebook: Unit tests for grade boundary issue. 2016-05-18 09:58:07 +08:00
Kevin Wiliarty 45294e503e MDL-54620 ratings: display '0' when aggregate = 0 2016-05-18 07:37:41 +08:00
Helen Foster 4a17764ebd MDL-54549 lang: Merge English strings from the en_fix language pack 2016-05-17 13:18:36 +02:00
Dan Poltawski e25d3383b9 weekly release 3.0.4+ 2016-05-17 10:48:45 +01:00
Dan Poltawski b88965b626 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-05-17 10:48:43 +01:00
David Monllao acd9521a65 NOBUG: Bumping versions after a rewrite 2016-05-17 17:11:56 +08:00
Mark Nelson fcebfea419 MDL-52599 block_rss_client: fixed various PHP errors 2016-05-17 17:10:54 +08:00
Rajesh Taneja cab3620f33 MDL-54573 testing: don't uppercase dbtype 2016-05-17 17:10:53 +08:00
Andrew Nicols 61b6d3d204 Merge branch 'MDL-52599-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-05-17 17:10:53 +08:00
Andrew Nicols b69b0543c7 Merge branch 'MDL-54600-m30' of https://github.com/micaherne/moodle into MOODLE_30_STABLE 2016-05-17 17:10:52 +08:00
Dan Poltawski 3bafd53957 MDL-54573 testing: don't uppercase dbtype 2016-05-17 17:10:52 +08:00
David Monllao e6b308401c Merge branch 'MDL-54573-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-05-17 17:10:52 +08:00
Stephen Bourget 3d21fc3bdf MDL-54131 Behat: Fix hide all courses test 2016-05-17 17:10:51 +08:00
David Monllao 844b20e158 Merge branch 'MDL-54584-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-05-17 17:10:51 +08:00
Michael Aherne c9d6c62e47 MDL-54600 phpunit: Prevent locked files failing tests 2016-05-16 14:41:44 +01:00
Dan Poltawski 4174c59a57 MDL-52599 rss block: clarifty sql and make style more moodley 2016-05-16 11:09:54 +01:00
Clement Smith 36f909cc4c MDL-52599 blocks/rss_client: Fix RSS block config page
This fixes an error where the RSS block config page would display
'Array' where the multiselect list of feeds should be when
accessed by a user who has not saved any RSS feed urls and yet the
block has been previously configured by another user.
2016-05-16 11:09:53 +01:00
David Monllao aabfa11f71 Merge branch 'MDL-54133_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-16 12:03:18 +08:00
David Monllao c6fe3d243d Merge branch 'MDL-54131_m30v3' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-16 12:01:49 +08:00
David Monllao cb921865b7 Merge branch 'MDL-54130_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-16 11:32:12 +08:00
Andrew Nicols cbef0010f0 MDL-54584 repository: Set a default filename in prepare_file 2016-05-16 11:08:46 +08:00
vpisabeywardana def7e7843a MDL-52815 theme: group select overlapping issue
Gave minimum width for select tags which are under 'groups' and 'members' classes
2016-05-16 02:44:31 +00:00
AMOS bot 9dbb91f678 Automatically generated installer lang files 2016-05-15 00:04:53 +08:00
Stephen Bourget d058341145 MDL-54131 Behat: tests for the course list block 2016-05-13 22:06:40 -04:00
Stephen Bourget 52a630f7c8 MDL-54133 Behat: tests for the course overview block 2016-05-13 21:42:38 -04:00
Tim Hunt 77c4401c02 MDL-54582 accesslib: improve performance of load_course_context
The new query is logically equivalen, but much, much faster, at
least on Postgred. (15ms, instead of 700ms, in one example I tried
on the database for the OU's main Moodle site.)
2016-05-13 20:38:03 +01:00
Dan Poltawski 06c174bab8 MDL-54573 testing: use dbtype rather dbvendor for diagnostics
So that we can differentiate between drivers
2016-05-13 14:53:47 +01:00
David Monllao 4b6e571ccb weekly release 3.0.4+ 2016-05-13 18:32:28 +08:00
Frederic Massart 81b676c3a9 MDL-54027 mod_forum: Display sub-header on user posts/discussions page 2016-05-13 17:40:24 +08:00
Dan Poltawski 0d1e222b3d NOBUG: ensure version number doesn't go backwards
(Due to reverts happening in MDL-45390)
2016-05-13 09:36:37 +01:00
Dan Poltawski 9528275bee Merge branch 'MDL-54101_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-05-13 09:34:31 +01:00
Dan Poltawski 782ad586a8 Merge branch 'wip-mdl-54543-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-05-13 09:34:31 +01:00
Stephen Bourget b19552e332 MDL-54130 Behat: Add tests for Completion Status block 2016-05-12 21:27:18 -04:00
Mark Nelson 86f523fdf9 MDL-54101 core: fixed core/str get_string caching issue 2016-05-12 18:59:19 +08:00
Rajesh Taneja 0f24b0ae06 MDL-54543 behat: Increase file download range
with different db's, the id and defaultgrade
might be different, so increasing the range
to avoid such failures
2016-05-12 16:02:03 +08:00
Tim Hunt a4079c3c74 MDL-53938 qformat_gift: handle multi-choice MR with one 100% choice 2016-05-11 18:07:46 +01:00
Andrew Nicols c3bac7250a Merge branch 'MDL-54055-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-05-11 15:02:09 +08:00
Jun Pataleta 6cb33703ba MDL-54055 gradingform_guide: Skip insertion of empty comments
We should not be adding empty entries for the frequently-used comments.
2016-05-11 14:54:50 +08:00
Andrew Nicols cb19237594 Merge branch 'MDL-54125_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-05-11 14:12:41 +08:00
Mark Nelson ac6d4ce728 MDL-54125 mod_data: fixed PHP notice
Also removed unused variables.
2016-05-11 13:02:01 +08:00
Andrew Nicols c768daa20b Merge branch 'MDL-52800-30' of git://github.com/ryanwyllie/moodle into MOODLE_30_STABLE 2016-05-11 11:16:00 +08:00
Andrew Nicols 3945629232 MDL-54110 repositories: Whitespace, Typo + unit test fixes 2016-05-11 10:42:53 +08:00
Andrew Nicols 539c1cf9ec Merge branch 'MDL-54110_30_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_30_STABLE 2016-05-11 10:42:42 +08:00
Mark Johnson a674b3659c MDL-54110 repositories: Allow repositories to ignore post_max_size
Repositories can now override usespost() if they don't upload using POST
requests. This restores the ability of users with
moodle/course:ignorefilesizelimits to upload files of unlimited size
lost in MDL-44626.
2016-05-10 16:11:28 +01:00
Dan Poltawski 8e25eba291 Merge branch 'MDL-50704-30-bp' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-10 15:59:43 +01:00
David Monllao a5b26a385a Merge branch 'MDL-52133-30' of git://github.com/ryanwyllie/moodle into MOODLE_30_STABLE 2016-05-10 21:41:41 +08:00
David Monllao 94d6b16158 weekly release 3.0.4+ 2016-05-10 18:55:11 +08:00
David Monllao 82c2cde553 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-05-10 18:55:09 +08:00
Ryan Wyllie 42defe4dc1 MDL-52800 theme: Fix styling for inplace editing tooltip 2016-05-10 05:16:04 +00:00
Andrew Nicols d7491c3314 Merge branch 'MDL-54115_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-10 12:09:53 +08:00
Andrew Nicols 2941f5ce70 MDL-54004 behat: Whitespace fixes 2016-05-10 12:02:52 +08:00
Andrew Nicols 1a1182740b Merge branch 'MDL-54004_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-05-10 11:38:34 +08:00
Andrew Nicols a5573b4862 Merge branch 'MDL-52506-30' of git://github.com/ryanwyllie/moodle into MOODLE_30_STABLE 2016-05-10 10:16:44 +08:00
Ryan Wyllie 3f6149cce3 MDL-52506 mod_assign: Fix return links for atto auto save 2016-05-10 01:23:50 +00:00
Stephen Bourget f7c3ff4b3b MDL-54115 Behat: tests for the comments block 2016-05-09 19:02:24 -04:00
Stephen Bourget 9955806518 MDL-54004 Behat: tests for calendar block 2016-05-09 16:08:30 -04:00
Stephen Bourget 7ff356aa3d MDL-54004 Behat: tests for upcoming events block 2016-05-09 16:08:09 -04:00
AMOS bot 91c42f09a7 Automatically generated installer lang files 2016-05-10 00:04:52 +08:00
Frederic Massart 396e1a76d3 MDL-50704 date: Fix invalid timezone mapping for +14
The value Etc/GMT-14 was added to the list of known timezones,
and Etc/GMT+13 & Etc/GMT+14 were removed as they are not valid.

Tests were added to ensure that legacy user timezones are mapped
to known timezones. Other tests were changed to reflect the changes
with regards to Etc/GMT+13 and +-14.
2016-05-09 17:36:36 +08:00
Andrew Nicols 1ffadaf625 Merge branch 'MDL-52708-30_STABLE' of https://github.com/ramdesh/moodle into MOODLE_30_STABLE 2016-05-09 15:52:30 +08:00
David Monllao 1c28c9fc20 Merge branch 'MDL-54034-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-05-09 07:50:47 +08:00
Eloy Lafuente (stronk7) d97b3d4c81 Moodle release 3.0.4 2016-05-08 00:23:59 +02:00
Dan Poltawski 3d9c67b089 Merge branch 'MDL-54042-30' of git://github.com/damyon/moodle into MOODLE_30_STABLE 2016-05-06 14:08:59 +01:00
Frederic Massart d2d41fa003 MDL-54034 ajax: Apply filters in ajax requests
This also clarified that developers can decide to force filters
to be ignored when using external_format_text, though they cannot
force filters to be turned on as the clients should be able to
opt-out from filtering should they want to.
2016-05-06 18:02:46 +08:00
Damyon Wiese 845f0cf71e MDL-54042 user: Add unit test to cover change 2016-05-06 16:40:59 +08:00
Damyon Wiese f808005051 MDL-54042 user: Fix debugging in core_user_get_users_by_field
The course object returned by enrol_get_all_users_courses does not include the defaultgroupingid.

This course object is passed to user_get_user_details - which does need
the defaultgroupingid.

All the other group info is returned (groupmode) etc - so it makes sense to also return this extra field.
2016-05-06 16:40:58 +08:00
David Monllao ca0c65427d weekly release 3.0.3+ 2016-05-06 16:15:06 +08:00
David Monllao 20460bd637 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-05-06 16:15:04 +08:00
Ryan Wyllie a95f10f2d6 MDL-52133 mod_assign: Support userid on single grade page 2016-05-06 07:20:09 +00:00
Andrew Nicols 33647345e4 Merge branch 'wip-mdl-53701-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-05-06 10:07:29 +08:00
Dan Poltawski 5ef6ac5a35 MDL-54062 bootstrapbase: remove unused less file
This file has never been included in our CSS.
2016-05-06 09:44:23 +08:00
Eloy Lafuente (stronk7) d0b09c8d76 MDL-53944 dml: make char2real() for mysql to support decimals
- With the patch, 6 positions of scale accuracy are guaranteed
  per individual casted value.
- Backed with unit tests, both for varchar and clob.
- Added 2 missing tests about uses of the method with params
  and values.

Note: 6 was picked because looking to all databases implementation
postgres was found to be casting to real, aka, 6.
2016-05-06 09:44:23 +08:00
Adam Olley 2efd5adc61 MDL-54007 mod_assign: Limit unit tests to core plugins
Without this change, the unit tests make assumptions for the output of
mod_assign functions/webservices that do not hold true when 3rd party
submission and feedback plugins are installed.
2016-05-06 09:44:22 +08:00
Simey Lameze c12a862c95 MDL-53913 core_user: make parameters consistent across versions 2016-05-06 09:44:22 +08:00
Stephen Bourget 69a3c19fcb MDL-54003 Behat: tests for recent badges block 2016-05-06 09:44:22 +08:00
Fred Woolard 834b9a8e18 MDL-53713 core: account for session_start returning false 2016-05-06 09:44:21 +08:00
David Monllao 4a029f6843 MDL-53750 shibboleth: Passing a var to empty for PHP 5.4 2016-05-06 09:44:21 +08:00
Frederic Massart 7d8050dd38 MDL-51369 course: Adding tests to cover restoring course info 2016-05-06 09:44:20 +08:00
Frederic Massart 3c9d2b1040 MDL-51369 backup: Respect capabilities when restoring course info
In short, when a user is creating a new course they can set
the ID number, shortname, fullname and summary. However, when
they merge a backup into a course they need the permissions to do so.
2016-05-06 09:44:20 +08:00
Frederic Massart f1a4d829e3 MDL-53954 user: Prevent locked profile fields from being edited 2016-05-06 09:44:20 +08:00
Andrew Nicols 01408d619b MDL-53755 forum: Check session when marking posts 2016-05-06 09:44:19 +08:00
Andrew Nicols e4e7a097f6 MDL-53696 forum: Check discussion in forum 2016-05-06 09:44:19 +08:00
John Okely 510efb7455 MDL-53750 auth: fix logout bug in shibboleth
Original patch by Dr. Michael Schneider
2016-05-06 09:44:18 +08:00
Tim Hunt 3a5cfc1f59 MDL-53589 badges: fix capability check 2016-05-06 09:44:18 +08:00
Dan Marsden 4fc53e7a24 MDL-53546 SCORM: Set window.opener to null 2016-05-06 09:44:18 +08:00
AMOS bot d869267c7a Automatically generated installer lang files 2016-05-06 00:04:36 +08:00
Rajesh Taneja 31d15bc64e MDL-53701 core_lib: use date_format_string for utf8
So when language is different say Hebrew then
it would pic codepage-1255. As  is json_encoded
we need to ensure we get utf8 string. so use
date_format_string instead
2016-05-05 16:36:02 +08:00
AMOS bot 0297d3e3ac Automatically generated installer lang files 2016-05-05 00:04:40 +08:00
Juan Leyva 477cfba57c MDL-54049 core_message: Add missing external format text 2016-05-04 12:54:27 +02:00
Dan Poltawski f38e287c16 weekly release 3.0.3+ 2016-05-03 20:38:11 +01:00
Dan Poltawski bbeab900d6 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-05-03 20:38:08 +01:00
AMOS bot c92c1e2b4a Automatically generated installer lang files 2016-05-04 00:04:32 +08:00
Dan Poltawski 4cb7ae6fa2 Merge branch 'wip-MDL-53402-30-v2' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-05-03 09:13:25 +01:00
Dan Poltawski 7d0b6bea51 MDL-54008 tests: clarify comment in tz test 2016-05-03 09:10:35 +01:00
Dan Poltawski a5df2ffa52 Merge branch 'MDL-54008_30-normalise' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-05-03 09:09:13 +01:00
Adrian Greeve 77552e5f5b MDL-53402 mod_data: field values of 0 are now displayed. 2016-05-03 15:06:46 +08:00
David Monllao 57411a05d8 MDL-54008 tz: Unexisting tz with decimals fallback to rounded down integer 2016-05-03 13:59:29 +08:00
David Monllao bc1d0d15da Merge branch 'wip-MDL-53402-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-05-03 13:03:33 +08:00
Adrian Greeve 8dc2647f0f MDL-53402 mod_data: Added custom validation code for data fields.
Added custom validation to radiobutton, menu, and checkbox.
2016-05-03 12:53:36 +08:00
David Monllao 222bb751c9 Merge branch 'MDL-53899-30-pluginperm' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-05-03 10:28:44 +08:00
David Monllao 0a274ff84e Merge branch 'MDL-51142-30' of git://github.com/damyon/moodle into MOODLE_30_STABLE 2016-05-03 09:58:55 +08:00
Dan Poltawski bc22230af9 Merge branch 'wip-MDL-53402-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-05-02 17:06:26 +01:00
Dan Poltawski 05b5af2721 Merge branch 'MDL-54019_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-05-02 16:57:12 +01:00
Dan Poltawski 62c8fe2d9c Merge branch 'wip-mdl-53861-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-05-02 16:56:38 +01:00
Mark Nelson 8ffc5f3410 MDL-54019 core_behat: fixed typo 2016-05-02 18:11:56 +08:00
Dan Poltawski c48a174fc4 Merge branch 'wip_MDL-53033_m30' of git://github.com/gjb2048/moodle into MOODLE_30_STABLE 2016-05-02 10:17:09 +01:00
Dan Poltawski cd25907728 Merge branch 'MDL-53904-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-05-02 10:16:36 +01:00
Dan Poltawski 372b792a25 Merge branch 'MDL-54008_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-05-02 09:52:24 +01:00
Damyon Wiese a1be99096e MDL-51142 assign: Fix for group assignments with NEW status 2016-05-02 16:44:28 +08:00
Clement Smith 968b596138 MDL-51142 mod/assign: Fix erroneous submission status display
This prevents display of submission time/date when the assignment
submission record is in a new state. It also keeps the display of
overdue assignments identical for those students who have viewed
the assignment yet not submitted, for those students who have
not viewed the assignment, and for those students who have not
viewed the assignment yet the instructor has accessed the grading
page.
2016-05-02 16:44:27 +08:00
David Monllao 1bd5e7f579 Merge branch 'MDL-53901-30' of git://github.com/damyon/moodle into MOODLE_30_STABLE 2016-05-02 15:54:16 +08:00
Rajesh Taneja cd20424b89 MDL-53861 behat: o/p buffer is not used in Behat 2.5.x
Don't need ob_flush() as o/p is not buffered
in behat 2.5.x
2016-05-02 15:54:00 +08:00
David Monllao 8c46d78dba Merge branch 'MDL-53635-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-05-02 15:38:21 +08:00
Juan Leyva 92730c8eb9 MDL-53635 message_airnotifier: Remove tags from notifications 2016-05-02 09:33:14 +02:00
David Monllao cda239e63e MDL-54008 timezone: Updating references to Caracas tz.
I've removed Caracas direct references because it would fail on
some systems, it would depend on how updated is the olson version
PHP is using.
2016-05-02 14:14:05 +08:00
Adrian Greeve a476c985a8 MDL-53402 mod_data: Behat test for entering zero in required fields. 2016-05-02 13:37:55 +08:00
Adrian Greeve 2e01123bf4 MDL-53402 mod_data: Required fields can contain 0.
The number and text field would not accept 0 as a
valid response.
2016-05-02 13:37:36 +08:00
Damyon Wiese 388a23e9d3 MDL-53901 login: Redirect to https if loginhttps is enabled
This just prevents a double redirect.
2016-05-02 11:22:06 +08:00
David Monllao a6f8c022f6 Merge branch 'MDL-53980-30-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-05-02 10:47:45 +08:00
AMOS bot 063ae6b180 Automatically generated installer lang files 2016-05-02 00:04:24 +08:00
AMOS bot d933ddac17 Automatically generated installer lang files 2016-04-30 00:06:58 +08:00
Dan Poltawski 29f88b5783 weekly release 3.0.3+ 2016-04-29 12:27:04 +01:00
Andrew Nicols 1e09fe76f2 MDL-53858 quiz accessibility: Correct aria-labelledby attribute 2016-04-29 12:14:53 +01:00
Andrew Nicols 6dec102c62 Merge branch 'MDL-53858_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-04-29 12:14:52 +01:00
David Monllao 44df7437f9 Merge branch 'MDL-53928_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2016-04-29 12:14:52 +01:00
Helen Foster f7423fa240 MDL-53980 lang: Merge English strings from the en_fix language pack 2016-04-28 19:02:48 +02:00
Marina Glancy 76c684dc65 MDL-53904 course: apply default completion when approving request 2016-04-27 15:57:07 +08:00
Henning Bostelmann 16067645b4 MDL-53780 mod_assign: Remove teachers from submission group members 2016-04-26 15:37:58 +01:00
Dan Poltawski ac01be5ffe Merge branch 'MDL-53855_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-04-26 11:18:29 +01:00
Dan Poltawski e56209d815 weekly release 3.0.3+ 2016-04-26 09:28:30 +01:00
David Monllao e37906c31e Merge branch 'MDL-52550-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-04-26 11:12:44 +08:00
Dan Poltawski 25f201c259 Merge branch 'MDL-49754-30' of https://github.com/xow/moodle into MOODLE_30_STABLE 2016-04-25 14:36:50 +01:00
Eloy Lafuente (stronk7) 3fecbbe510 MDL-53928 environment: add xmlreader requirement for 3.1 2016-04-24 01:34:38 +02:00
Eloy Lafuente (stronk7) e28a53bcb0 weekly release 3.0.3+ 2016-04-22 10:57:10 +02:00
David Mudrák 70d6b77c14 MDL-53899 admin: Fix permissions of extracted plugin files 2016-04-21 14:31:26 +02:00
Panagiotis Nikoloutsopoulos 58f4420d0f MDL-52550 atto: Added preventDefaults for events dragover and dragenter 2016-04-21 15:22:40 +08:00
Dan Poltawski c287b85806 Merge branch 'wip-MDL-52642-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-04-20 13:30:36 +01:00
Dan Poltawski 82c38e0c45 Merge branch 'MDL-53095-30' of git://github.com/lameze/moodle into MOODLE_30_STABLE 2016-04-20 11:50:01 +01:00
David Monllao 5d1b9e7b00 Merge branch 'MDL-53757_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-04-20 15:53:32 +08:00
Nick Phillips 9047653ffe MDL-53757 core_calendar: always show whole day's events in 'day' view 2016-04-20 15:49:35 +08:00
David Monllao 5401e6b923 Merge branch 'MDL-53676_30' of https://github.com/wjroes/moodle into MOODLE_30_STABLE 2016-04-20 11:16:05 +08:00
Eloy Lafuente (stronk7) 484a08cc15 Merge branch 'MDL-53660-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-04-20 01:20:10 +02:00
Andrew Nicols a57c6830ea Merge branch 'MDL-53779-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-04-19 10:34:57 +08:00
Eloy Lafuente (stronk7) 1491aca61d Merge branch 'MDL-53796_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-04-19 01:58:36 +02:00
Eloy Lafuente (stronk7) 0fd01700f4 Merge branch 'MDL-53795-30' of git://github.com/merrill-oakland/moodle into MOODLE_30_STABLE 2016-04-19 01:46:17 +02:00
Tim Hunt 6e7aa92bc6 MDL-53858 quiz accessibility: nav block should have role='navigation' 2016-04-18 17:37:20 +01:00
Tim Hunt dacb0f0a94 MDL-53855 accessibility: navbar should be in exactly one nav region
And that should be labelled.
2016-04-18 16:57:18 +01:00
Eloy Lafuente (stronk7) fd95e9c70d weekly release 3.0.3+ 2016-04-15 10:19:22 +02:00
Eloy Lafuente (stronk7) bec5339281 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-04-15 10:19:17 +02:00
Ramindu Deshapriya b906a29e50 MDL-52708 core_admin: Added Behat test to automate MDLQA-8190 2016-04-15 00:07:36 +05:30
Mark Nielsen 354fd0dba7 MDL-53660 mod_forum: Fix link decoding in single discussions
This only happens when user data is not included.
2016-04-13 16:00:40 +01:00
Gareth J Barnard a4001824d9 MDL-53033 themes: Invalid attribute values for div.c1.btn. 2016-04-13 13:05:17 +01:00
Dan Poltawski 6abc42a404 Revert "Merge branch 'MDL-52944-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE"
This reverts commit 3fc6d79de2, reversing
changes made to 7f438e833e.
2016-04-13 10:49:03 +01:00
David Risner 9f1b6babf0 MDL-53095 repository_merlot: change merlot url use https 2016-04-13 15:12:09 +08:00
David Monllao 306561a926 MDL-53796 behat: Move get_debug_text to base class 2016-04-13 10:36:47 +08:00
Eric Merrill e9024a1443 MDL-53795 logging: Add DB index for use when backing up logs 2016-04-12 22:26:35 -04:00
AMOS bot 2d4f5d18d0 Automatically generated installer lang files 2016-04-13 00:04:20 +08:00
Dan Poltawski e0b61ea590 Merge branch 'MDL-52263-30' of git://github.com/crazyserver/moodle into MOODLE_30_STABLE 2016-04-12 16:50:29 +01:00
Pau Ferrer Ocaña d830d4601d MDL-52263 libraries: Add test cases to external_format_text options 2016-04-12 15:06:33 +02:00
Pau Ferrer Ocaña 328b4a73fb MDL-52263 libraries: Add options to external_format_text 2016-04-12 15:06:33 +02:00
Dan Poltawski 3fc6d79de2 Merge branch 'MDL-52944-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-04-12 13:18:01 +01:00
Frederic Massart c14bbcf890 MDL-53779 external: get_string and get_strings use PARAM_RAW
For the string parameters and translated strings.
2016-04-12 17:05:01 +08:00
spvickers b67fda1e31 MDL-49754 mod_lti: Fixes to JSON format
@id elements in JSON corrected to match the IMS spec.  Version number of
the service updated.
2016-04-12 15:48:21 +08:00
Adrian Greeve 4b1de0b64b MDL-52642 blog: Fix notices for swapping contexts in activities. 2016-04-12 13:49:20 +08:00
Stephen Bourget b421c1cd70 MDL-52642 block_blog_menu: behat test 2016-04-12 13:49:09 +08:00
David Monllao 7f438e833e Merge branch 'MDL-53007_30_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_30_STABLE 2016-04-12 11:31:30 +08:00
David Monllao c9db0e876b Merge branch 'MDL-53770-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-04-12 10:54:24 +08:00
Dan Poltawski 6639edc34f Merge branch 'MDL-53417-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-04-11 16:36:58 +01:00
Dan Poltawski 56342d4eb1 Merge branch 'MDL-53674-30-eventmsg' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-04-11 14:29:15 +01:00
Dan Poltawski b512fdd040 Merge branch 'MDL-53728_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-04-11 14:10:08 +01:00
Dan Poltawski 12f8cb4e56 Merge branch 'MDL-52338-30' of https://github.com/dg711/moodle into MOODLE_30_STABLE 2016-04-11 13:54:31 +01:00
Andrew Nicols 35b5a7fcd9 MDL-52942 forum: Allow posting to multiple groups in eachuser forums 2016-04-11 12:44:19 +08:00
Devang Gaur 56f496f26d MDL-52338 blocks: message link should not appear when set false 2016-04-11 08:34:18 +05:30
Marina Glancy 0169a60751 MDL-53770 mod_lti: allow to uninstall ltisource plugins 2016-04-11 09:04:56 +08:00
David Mudrák 6238007754 MDL-53674 event monitor: Do not send HTML as plain text formatted emails
There were two problems here.

* The $msgdata->fullmessage was always formatted as HTML even if the
  $msgdata->fullmessageformat was set to the original template's format.
* The plain text part of the emailed message contained HTML code.

The patch makes sure that the original template is always formatted into
HTML and then converted to plain text before setting the text/plain
multipart of the sent email.
2016-04-08 15:13:39 +02:00
Cameron Ball c9a1658c50 MDL-52944 atto: Use event-key to handle enter key 2016-04-08 12:29:01 +08:00
Panagiotis Nikoloutsopoulos 6c0ec8dd4c MDL-52944 atto: Contenteditable command 'FormatBlock' set to 'p' 2016-04-08 12:29:01 +08:00
Mark Johnson 5bd06806e2 MDL-53007 block_navigation: Set width of item text to prevent overflow 2016-04-07 11:51:12 +01:00
Andrew Nicols 80b5eb78dd weekly release 3.0.3+ 2016-04-07 14:00:44 +08:00
Andrew Nicols bfea54fdb6 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-04-07 14:00:42 +08:00
Willem Roes 50f5630dd6 MDL-53676 block_navigation: fix incorrect array iteration 2016-04-07 07:47:59 +02:00
Rajesh Taneja 2eac5e6aa0 MDL-52502 behat: Flush buffer to show differences 2016-04-07 09:39:20 +08:00
AMOS bot c98e007a88 Automatically generated installer lang files 2016-04-07 00:05:02 +08:00
Dan Poltawski f0df8853df Merge branch 'MDL-53000-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-04-06 15:48:17 +01:00
Tim Hunt 7d82cbc6bb MDL-53728 question import/export: improve form structure 2016-04-06 15:36:01 +01:00
Juan Leyva dc08c1fd79 MDL-53000 mod_assign: Unit tests for get_file_areas 2016-04-06 12:49:29 +02:00
Andrew Nicols 42462c057a Merge branch 'wip-mdl-53381-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-04-06 12:23:47 +08:00
Rajesh Taneja 586869780f MDL-53381 behat: Add support to execute step api
With chain step deprecation, execute api will
help user to execute step api and backport it
2016-04-06 10:59:12 +08:00
Eloy Lafuente (stronk7) d5344f23e4 Merge branch 'MDL-53115-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-04-06 03:33:09 +02:00
Andrew Nicols ee73ad1ef6 MDL-53461 assign: Unit test regex fix 2016-04-06 08:56:31 +08:00
Andrew Nicols c86fca01c7 Merge branch 'MDL-53461-30' of git://github.com/crazyserver/moodle into MOODLE_30_STABLE 2016-04-06 08:56:25 +08:00
Andrew Nicols ce0bb6e843 MDL-53115 mod_lesson: Remove unnecessary @javascript tags 2016-04-06 08:40:22 +08:00
Andrew Nicols 2311226b42 MDL-53115 mod_choice: Remove unnecessary @javascript tags 2016-04-06 08:40:20 +08:00
Eloy Lafuente (stronk7) d854b87af0 MDL-52502 behat: clean 2 uses of method and fix upgrade.txt version 2016-04-06 00:23:17 +02:00
Eloy Lafuente (stronk7) 1ae503de34 Merge branch 'wip-mdl-52502-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-04-06 00:20:04 +02:00
Eloy Lafuente (stronk7) 23a605d65c Merge branch 'MDL-53671-30' of git://github.com/dpalou/moodle into MOODLE_30_STABLE 2016-04-06 00:04:29 +02:00
Eloy Lafuente (stronk7) e0a473a0b4 Merge branch 'MDL-53647_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-04-05 22:00:21 +02:00
Dan Poltawski 5937ca9c69 Merge branch 'MDL-53000-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-04-05 14:34:13 +01:00
Dani Palou 5d1cc5707e MDL-53671 book: Return whole filepath in book_export_contents 2016-04-05 13:35:56 +02:00
Dan Poltawski deb17cad7b Merge branch 'MDL-53175-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-04-05 12:17:50 +01:00
Pau Ferrer Ocaña 114f5f134b MDL-53461 assign: Fix intro images to be shown in the mobile app 2016-04-05 09:33:53 +02:00
Andrew Nicols 6bb1094932 Merge branch 'MDL-53500-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-04-05 12:23:43 +08:00
Rajesh Taneja f7e66c022e MDL-52502 behat: Ensure php web and cli version is same 2016-04-05 11:47:32 +08:00
Rajesh Taneja dfb103a7c1 MDL-52502 phpunit: Add php, db and os deatils 2016-04-05 11:47:31 +08:00
Eloy Lafuente (stronk7) f80a695b4c Merge branch 'MDL-53256-m30' of https://github.com/micaherne/moodle into MOODLE_30_STABLE 2016-04-04 19:02:53 +02:00
Dan Poltawski 63a1a289e9 Merge branch 'wip-MDL-49861-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-04-04 12:10:18 +01:00
Dan Poltawski 5052caed58 Merge branch 'm30_MDL-53622_Fix_Missing_Rewrite_Pluginfile_URLs' of https://github.com/scara/moodle into MOODLE_30_STABLE 2016-04-04 08:39:22 +01:00
Andrew Nicols 144720047a Merge branch 'MDL-53661_30' of https://github.com/sam-moodle/moodle into MOODLE_30_STABLE 2016-04-04 12:25:21 +08:00
Tim Hunt 8dc237213b MDL-53647 quiz summary: keep row class names in synch around headings 2016-04-02 13:23:15 +01:00
Matteo Scaramuccia eddae29cdf MDL-53622 mod_forum: Added the file_rewrite_pluginfile_urls() call. 2016-04-01 22:43:55 +02:00
AMOS bot cc58798dc3 Automatically generated installer lang files 2016-04-01 00:04:50 +08:00
Dan Poltawski 4ed2d20325 weekly release 3.0.3+ 2016-03-31 14:06:39 +08:00
Dan Poltawski bbe790a42e Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-03-31 14:06:36 +08:00
Jay Jayswal ff6c283651 MDL-53417 glossary: Glossary printer friendly link responsive 2016-03-31 13:59:32 +08:00
Dan Marsden 3789c23fd1 MDL-53500 report_outline: Allow parent role to view all activities.
Parents are not enrolled in the course, use $user to generate modinfo
for uservisible checks.
2016-03-31 13:38:55 +08:00
Sam Chaffee f609364544 MDL-53661 mod_lti: Fix lti_prepare_type_for_save forcessl config 2016-03-30 18:31:42 -06:00
Michael Aherne ad23f18a40 MDL-53256 cache: Prevent overwriting of cache config with invalid data 2016-03-30 11:34:52 +01:00
Juan Leyva 6e3bce00b8 MDL-53175 filter: Fix text formatting for the book and page modules 2016-03-30 09:32:19 +01:00
Juan Leyva 4bc5ddb074 MDL-53175 file: Allow file_rewrite_pluginfile_urls to reverse 2016-03-30 09:32:18 +01:00
Adrian Greeve d94f588b67 MDL-49861 mod_data: Behat step to test adding records.
Clicking 'Save and add another' should clear the form.
2016-03-30 16:28:35 +08:00
Adrian Greeve dc844c1eae MDL-49861 mod_data: Save and add another button clears fields. 2016-03-30 16:28:14 +08:00
Eloy Lafuente (stronk7) 2f416e9f87 Merge branch 'wip-mdl-49150-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-03-30 00:10:59 +02:00
Eloy Lafuente (stronk7) 19e286bbe4 Merge branch 'MDL-52388-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-03-29 23:14:21 +02:00
AMOS bot 93afe952d9 Automatically generated installer lang files 2016-03-30 00:04:26 +08:00
David Monllao 92b0b88db1 Merge branch 'MDL-53356-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-03-29 15:57:16 +08:00
David Monllao 0a02b7cb02 Merge branch 'MDL-53432-git-less-css-MOODLE_30_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_30_STABLE 2016-03-29 15:43:41 +08:00
David Monllao 5948df3878 Merge branch 'wip-mdl-53434-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-03-29 14:23:53 +08:00
David Monllao 634d36641e Merge branch 'MDL-52646_30' of https://github.com/wjroes/moodle into MOODLE_30_STABLE 2016-03-29 12:58:52 +08:00
David Monllao 07111d3af6 Merge branch 'wip-MDL-52760-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-03-29 12:56:05 +08:00
AMOS bot 651ad2d035 Automatically generated installer lang files 2016-03-29 00:04:26 +08:00
Brendan Heywood dcf9108490 MDL-53432 core: Treat derived css and js as binary files in git 2016-03-26 22:19:43 +11:00
Dan Poltawski f256bf9169 Merge branch 'wip-MDL-53538-30' of git://github.com/abgreeve/moodle into MOODLE_30_STABLE 2016-03-26 11:37:38 +08:00
Dan Poltawski e068c3f054 Merge branch 'MDL-53562-forum-reply-re-MOODLE_30_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_30_STABLE 2016-03-26 10:36:38 +08:00
Dan Poltawski 71869bc4d3 Merge branch 'MDL-53180_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2016-03-26 10:33:06 +08:00
Dan Poltawski 8df8ca11a2 MDL-53507 quiz: fix bad htmlid 2016-03-26 10:06:49 +08:00
Dan Poltawski f67e31c195 Merge branch 'MDL-53507_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-03-26 10:06:11 +08:00
Adrian Greeve 53d2f810ea MDL-50795 atto: Pasting into atto removes background colour style.
Copying from one atto editor to another comes with a lot of style
information. This removes the color attributes which make the page
look ugly when competing with different themes.
2016-03-26 09:32:08 +08:00
AMOS bot a784fee34c Automatically generated installer lang files 2016-03-25 00:04:39 +08:00
Eloy Lafuente (stronk7) a30a81e3a0 weekly release 3.0.3+ 2016-03-24 12:58:25 +01:00
Cameron Ball 49dbcbd998 MDL-52388 output: Only stop displaying pager next link on last page
Thank you to Brenda Uga for working on this.
2016-03-24 17:19:58 +08:00
Eloy Lafuente (stronk7) 35c61094e8 MDL-53180 libraries: Fix thirdpartylib to point to directory 2016-03-23 17:08:13 +01:00
Brendan Heywood c0eeb8c461 MDL-53356 admin: Fixed erroneous sectionerror when upgrade is needed 2016-03-23 16:26:59 +08:00
Dan Poltawski 4840ec1193 Merge branch 'MDL-52952-30-fix' of github.com:xow/moodle into MOODLE_30_STABLE 2016-03-23 12:08:22 +08:00
John Okely 4565c9b575 MDL-52952 forms: Ignore autofill catching fields in form change checker 2016-03-23 11:56:03 +08:00
David Monllao b9114ec746 Merge branch 'wip-MDL-53254-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-03-23 09:20:35 +08:00
Dan Poltawski f01974e9d7 Merge branch 'MDL-53383-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-03-23 08:31:52 +08:00
Tim Hunt 0a15d762b8 MDL-53507 quiz editing: was possible to lose questions
If you dragged a question to the top of the quiz, it could
disappear. Several other cases of dragging questions to the
same place in sequence, but to a different page/section were
also failing, and have been fixed.
2016-03-22 23:02:30 +00:00
Marina Glancy 37b3541eab MDL-45274 mod_feedback: show heading on non-respondents page 2016-03-22 23:05:37 +01:00
Eloy Lafuente (stronk7) 28e7877645 Merge branch 'MDL-53547_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-03-22 22:58:41 +01:00
Tim Hunt 01bacdae55 MDL-53547 logstore_database: better DB driver handling in unit test 2016-03-22 06:45:51 +00:00
Adrian Greeve 02c3b88fcd MDL-53538 mod_data: Unit test for data_get_advance_search_ids 2016-03-22 14:27:24 +08:00
Adrian Greeve f186db050c MDL-53538 mod_data: Show no records message instead of error.
When there are no records in the database module and a user
does an advanced search. Show a message that there are no entries
in the database.
2016-03-22 14:27:09 +08:00
Rajesh Taneja f825607286 MDL-49150 behat: Removed unnecessary @javascript tags 2016-03-22 13:55:22 +08:00
Dan Poltawski 800d62c56d Merge branch 'MDL-52158-30' of https://github.com/xow/moodle into MOODLE_30_STABLE 2016-03-22 10:32:36 +08:00
Eloy Lafuente (stronk7) 546aae396b Merge branch 'MDL-48307-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-03-22 00:14:17 +01:00
Brendan Heywood 68b5a23a4a MDL-53562 forum: Fixed missing forum subject Re: prefix 2016-03-22 09:30:02 +11:00
Eloy Lafuente (stronk7) 20d094cb7c Merge branch 'MDL-52978_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-03-21 23:07:24 +01:00
Willem Roes 6b6f4abe3e MDL-52646 mod_scorm: fix missing launch_data for SCORM 2004 2016-03-21 09:05:10 +01:00
Dan Poltawski c52508979e Merge branch 'MOODLE_30_STABLE-MDL-53407-editing-css' of https://github.com/Dagefoerde/moodle into MOODLE_30_STABLE 2016-03-21 14:48:43 +08:00
Dan Poltawski 547e685ce3 Merge branch 'MDL-52952-30' of https://github.com/xow/moodle into MOODLE_30_STABLE 2016-03-21 14:44:19 +08:00
Dan Poltawski a4cbeb7d02 Merge branch 'MDL-53239_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-03-21 14:12:14 +08:00
James 03b4d4fc20 MDL-53383 navigation: Do not require $type in remove()
navigation_node_collection -> remove function broken when $type is null
2016-03-21 12:18:05 +08:00
Dan Poltawski c49bb9d425 Merge branch 'MDL-53262-verp-confirm-from-support-MOODLE_30_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_30_STABLE 2016-03-21 11:37:35 +08:00
Dan Poltawski daa42c3ade Merge branch 'MDL-53489_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-03-21 11:02:04 +08:00
Jay Jayswal 95e68d8982 MDL-52158 auth: Improve recaptcha settings and help 2016-03-21 10:28:33 +08:00
Dan Poltawski 07054b65a8 Merge branch 'MDL-53548-m30' of https://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2016-03-21 09:20:34 +08:00
David Monllao 557bdeba78 Merge branch 'MDL-53509-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-03-21 08:43:16 +08:00
Brendan Heywood 6db1bfacee MDL-53262 inboundmessage: Fix inconsistent confirm From vs email body 2016-03-20 15:53:19 +11:00
sam marshall c32962f318 MDL-53548 Accessibility: Block show/hide keyboard access broken 2016-03-18 13:47:30 +00:00
Grigory Baleevskiy b08fc23a6c MDL-52978 core_lib: fixed wrong days showing for dates in datepicker 2016-03-18 12:31:14 +08:00
Marina Glancy a386305756 MDL-52760 forms: notify form changes in autocomplete element 2016-03-18 08:17:22 +08:00
Eloy Lafuente (stronk7) 225913650f weekly release 3.0.3+ 2016-03-17 14:00:43 +01:00
Eloy Lafuente (stronk7) a24459d354 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-03-17 14:00:39 +01:00
David Monllao 692fbff031 MDL-53239 grader report: Add all names to error msg 2016-03-17 10:57:51 +08:00
Dan Poltawski be8769b841 Revert "MDL-52133 mod_assign: Pass userid param when saving grade"
This reverts commit 99a895b7c3.
2016-03-17 09:31:00 +08:00
Andrew Nicols 83ca070484 MDL-53509 mod_forum: Stop over-escaping quoted variables
{{# quote }}<a href=\"foo\">{{/ quote }}

becomes:

    "<a href=\\"foo\\">"

This causes a mustache syntax error.

The quote helper negates the need to escape quotes in normal use, e.g.:

    {{# quote }}<a href="foo">{{/ quote }}

which instead becomes:

    "<a href=\"foo\">"
2016-03-17 08:40:24 +08:00
Andrew Nicols 38ad80c54e Merge branch 'MDL-51828-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-03-16 10:03:37 +08:00
Frederic Massart 024a976c26 MDL-51828 repository_wikimedia: Always use PNG for SVG files 2016-03-16 09:53:02 +08:00
Eloy Lafuente (stronk7) 158a5fe613 Merge branch 'MDL-53139-30' of https://github.com/dg711/moodle into MOODLE_30_STABLE 2016-03-16 00:19:02 +01:00
Eloy Lafuente (stronk7) 9e1680299a Merge branch 'MDL-53430-30' of git://github.com/merrill-oakland/moodle into MOODLE_30_STABLE 2016-03-16 00:05:25 +01:00
Eloy Lafuente (stronk7) ff1cbbe51f Merge branch 'mdl-53133-m30' of git://github.com/deraadt/moodle into MOODLE_30_STABLE 2016-03-15 23:53:48 +01:00
Russell Smith 5dfd5066c0 MDL-53323 profiling: Close session as early as possible. 2016-03-15 21:21:15 +01:00
Tim Hunt 9184cc647c MDL-53489 quiz editing: fix display of long section headings 2016-03-15 18:35:53 +00:00
AMOS bot a48022f059 Automatically generated installer lang files 2016-03-16 00:04:17 +08:00
Andrew Nicols 2941895cda Merge branch 'MDL-53234-support-email-MOODLE_30_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_30_STABLE 2016-03-15 13:43:51 +08:00
Andrew Nicols 222ada1726 Merge branch 'MDL-53351-30-lti-notice' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-03-15 12:49:42 +08:00
David Monllao 9ff251a882 MDL-53176 grades: Fix upgrade version 2016-03-14 14:07:57 +08:00
David Monllao 48d8bf0c0b Merge branch 'MDL-53176-30' of git://github.com/merrill-oakland/moodle into MOODLE_30_STABLE
Conflicts:
	version.php
2016-03-14 14:05:14 +08:00
Marina Glancy 800204438c MDL-53254 core_tag: ensure page context is set in WS 2016-03-14 08:34:35 +08:00
Eloy Lafuente (stronk7) 97dd32edd6 Moodle release 3.0.3 2016-03-12 00:38:07 +01:00
Rajesh Taneja 41fc0ff97e MDL-53434 behat: Improved exit status of parallel run
Exit status should contain pass/fail information
of each run it is executing. Every bit of status
will have information of pass/fail status of parallel
process
2016-03-11 21:13:38 +08:00
Rajesh Taneja 440f668464 MDL-53434 behat: Added support for $CFG->behat_profiles
This config will be supported to avoid broken configuration
in future. As this is limited, we need will still use
->behat_config to set config values which can't be set by
behat_profiles
2016-03-11 21:13:25 +08:00
dg711 8b91709968 MDL-53139 admin: case diff issue with email 2016-03-11 16:32:06 +05:30
John Okely a9362990ef MDL-52952 forms: Fix chrome autofilling passwords again
In MDL-45772 a hack was introduced to some forms to stop browsers from
putting the user's password into password fields in forms unrelated to
logging in.

Chrome now no longer fills the user's password in the first password
field in the page. There now needs to be a plain text input above it
for the username too.
2016-03-11 10:33:45 +08:00
Eric Merrill 17bf9bbdaf MDL-53430 dml: Fix recordset_walk for additional parameters 2016-03-10 16:33:21 -05:00
Eric Merrill 3ecd9378e9 MDL-53176 grades: Adding index to improve history search
Backport of MDL-50385
2016-03-10 11:59:50 -05:00
Eloy Lafuente (stronk7) a0b2c28080 weekly release 3.0.2+ 2016-03-10 13:31:14 +01:00
Eloy Lafuente (stronk7) bddf27de35 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-03-10 13:31:10 +01:00
Jan C. Dageförde 77f6265af4 MDL-53407 themes: Add CSS class editing only if appropriate
The CSS class `editing` should only be added if the user is in editing
mode AND she is allowed to edit the rendered page. `user_is_editing()`
achieves exactly this, without changing behaviour for the appropriate
pages.
2016-03-10 10:41:18 +01:00
Eloy Lafuente (stronk7) 406a0efd37 MDL-51167 tool_monitor: fix too strict condition & minor cleanup 2016-03-10 00:06:52 +01:00
Eloy Lafuente (stronk7) eb7715d16f Merge branch 'MDL-53369_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-03-09 18:59:45 +01:00
Simey Lameze 4db8407d3e MDL-50705 auth_db: apply standard cleaning to all fields
Also unit tests were added to cover the new clean_data() method.
2016-03-09 18:33:11 +01:00
Simey Lameze 61da84e414 MDL-50705 core_user: introduce new fill_properties_cache()
Also the get_property_definition() was created to get the property without retrieve the whole definition cache and
    unit tests were created to tests those new methods.
2016-03-09 18:33:09 +01:00
Brendan Heywood 73e281cdc4 MDL-53234 admin: Fixed wrong default support email bug 2016-03-09 20:57:10 +11:00
Andrew Nicols a034f66e0b MDL-49897 calendar: mktime => usergetmidnight 2016-03-09 13:18:19 +08:00
Michael de Raadt 99a895b7c3 MDL-52133 mod_assign: Pass userid param when saving grade 2016-03-09 15:56:49 +11:00
Simey Lameze 1452f1e1d3 MDL-53031 mod_assign: add session check on assignment plugins management 2016-03-08 19:54:06 +01:00
AMOS bot d59b91c6a8 Automatically generated installer lang files 2016-03-09 00:04:12 +08:00
Jun Pataleta 85380c6b61 MDL-52433 user: Remove unnecessary capability check 2016-03-08 12:24:04 +01:00
David Monllao 9aff357438 Merge branch 'wip-MDL-41648-30' of https://github.com/dg711/moodle into MOODLE_30_STABLE 2016-03-08 15:32:46 +08:00
Andrew Nicols e567d6eda3 Merge branch 'MDL-49897_30' of https://github.com/rushi963/moodle into MOODLE_30_STABLE 2016-03-08 15:27:06 +08:00
David Monllao a51a17c846 Merge branch 'MDL-50218-30' of https://github.com/xow/moodle into MOODLE_30_STABLE 2016-03-08 14:41:50 +08:00
Andrew Nicols 5dbd593d3a Merge branch 'MDL-53010-30' of git://github.com/lameze/moodle into MOODLE_30_STABLE 2016-03-08 14:34:53 +08:00
David Monllao 484d8abc22 Merge branch 'MDL-52068-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-03-08 14:29:38 +08:00
David Monllao 6e036a74b0 Merge branch 'MDL-52984_30' of https://github.com/rushi963/moodle into MOODLE_30_STABLE 2016-03-08 14:04:27 +08:00
Andrew Nicols 38dfee06dd Merge branch 'MDL-53047-login-anchor-MOODLE_30_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_30_STABLE 2016-03-08 13:15:56 +08:00
Simey Lameze 475362630b MDL-51167 tool_monitor: check course visibility and user capabilities 2016-03-08 03:09:04 +01:00
Andrew Nicols b643f44415 Merge branch 'MDL-53210-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-03-08 09:54:04 +08:00
Cameron Ball 314d105c16 MDL-52651 htmlpurifier: Append rel=noreferrer to links.
Thank you to Zachary Durber for originally working on this issue.
2016-03-08 02:07:54 +01:00
David Monllao 61ba63d516 Merge branch 'MDL-53350_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-03-08 09:05:05 +08:00
David Monllao 16e85de11f Merge branch 'MDL-53353_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-03-08 08:44:49 +08:00
Andrew Nicols b46e8a7b32 Merge branch 'MDL-53291_30_ajax_fix' of https://github.com/BenKelada/moodle into MOODLE_30_STABLE 2016-03-08 07:42:44 +08:00
Krista Koivisto 0766509ab0 MDL-52774 ajax: Require authentication when getting nav branch
When getting the navigation branch data through AJAX, require
login if forcelogin is set.
2016-03-08 00:39:26 +01:00
Juan Leyva 56a067e7c1 MDL-52901 mod_assign: Check due dates in external save_submission 2016-03-08 00:13:14 +01:00
David Monllao c7f7b18ade MDL-52378 singleview: Using is_disabled instead of is_locked 2016-03-07 23:04:16 +01:00
Travis Noll 3328dc32a7 MDL-52378 Singleview: Exclude Grade Attribute Permissions
Singleview users must have Manage Grade permission to modify the
Exclude grade attribute.
2016-03-07 23:04:07 +01:00
Juan Leyva 783e695e00 MDL-52808 calendar: Do not return events for hidden activities 2016-03-07 22:36:15 +01:00
David Mudrák de60fc23ae MDL-52727 mod_data: Improve output of the form fields values
This issue mostly affects the search form fields. Submitted values for
these fields are typically obtained via optional_param() with
PARAM_NOTAGS specified as the parameter type - see parse_search_field()
methods. Such values themselves are not safe enough to be printed back
directly into the HTML as they might contain malicious code.

While working on the patch, some other places with weak protection were
detected and fixed.

In case of the itemid parameters, explicit clean_param() is added to
make sure we cast the value as an integer. That should make the s()
unnecessary but it was added anyway as an extra protection (just in case
the code flow changes or the parts of the code are re-used elsewhere).
2016-03-07 22:08:26 +01:00
Eloy Lafuente (stronk7) 04576de946 Merge branch 'MDL-53061-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-03-07 16:52:56 +01:00
Tim Hunt 0c5c778ae7 MDL-53369 qtype_ddwtos: prevent boxes on consecutive lines touching 2016-03-07 15:24:03 +00:00
dg711 4d2eab6932 MDL-41648 grade: Remove 'error' parameter in grading notification divs 2016-03-06 09:44:44 +05:30
Tim Hunt 7f81a8388a MDL-53353 drag-drop marker quetions: fix edit form jitter 2016-03-04 17:42:16 +00:00
Tim Hunt 76dad4b0a2 MDL-53350 drag-drop to text: layout problem on reivew 2016-03-04 17:12:24 +00:00
David Mudrák 8b65d0cdff MDL-53351 lti: Do not throw PHP notice when deleting LTI instance
The typeid=0 is a valid and common value representing "Automatic, based
on launch URL" type. In that case, no record in the lti_types table is
found. Thence attempting to access its toolproxyid property used to
throw PHP notice.
2016-03-04 16:50:45 +01:00
Brendan Heywood 857919df34 MDL-53047 login: Fixed #anchor being lost after login process 2016-03-04 22:55:33 +11:00
John Okely 0b1455e93b MDL-50218 lti: Return empty grade when none exists 2016-03-04 16:27:13 +08:00
Dan Poltawski fba7a51461 weekly release 3.0.2+ 2016-03-04 10:34:37 +08:00
Dan Poltawski 7fa00f860e Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-03-04 10:34:35 +08:00
AMOS bot 3ce4502093 Automatically generated installer lang files 2016-03-03 22:24:13 +08:00
AMOS bot 5739b1b6b9 Automatically generated installer lang files 2016-03-03 22:24:13 +08:00
Dan Poltawski 7097828ac7 MDL-53061 grunt: watch and various improvements
This is a backport of a number of commits from MDL-49817  which
in general are about simplifying and moving to standard 'grunt' things.
2016-03-03 11:39:25 +08:00
Ben Kelada 438995ddc1 MDL-53291 javascript: fix jquery ajax requests when data contains ??
jQuery ajax requests containing multiple '?' get replaced with a
string similar to jQuery152330039032_1231231, this is because it
is processing a stringified data object as jsonp and thinks its a url.
 workaround is to add contenttype
see https://github.com/jquery/jquery/issues/1799
2016-03-03 09:20:57 +11:00
AMOS bot 53c59fae82 Automatically generated installer lang files 2016-03-03 00:04:23 +08:00
Frederic Massart eb0a4127d4 MDL-52068 repository: Prevent JS errors due to unescaped lang strings 2016-03-02 15:35:29 +08:00
Andrew Nicols 8eaea8e878 Merge branch 'MDL-53214-30-category-feedback' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-03-02 14:49:44 +08:00
Cameron Ball cb23ec3e1c MDL-53214 grades: Fix labels on feedback fields 2016-03-02 14:31:16 +08:00
Dan Poltawski f4f44fb59d Merge branch 'MDL-52513_30' of https://github.com/rushi963/moodle into MOODLE_30_STABLE 2016-03-02 13:23:57 +08:00
Eloy Lafuente (stronk7) 850a632505 MDL-52136 mod_forum: fix some out-of-sync stuff
Thanks CIs!
2016-03-02 05:42:04 +01:00
Eloy Lafuente (stronk7) cc52eadad9 Merge branch 'MDL-52136-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-03-02 05:26:29 +01:00
Andrew Nicols 0b1c48f422 MDL-52136 mod_forum: forum_post is templatable 2016-03-02 12:10:29 +08:00
Andrew Nicols d64639a987 MDL-52136 mod_forum: Correctly quote get_string vars in mustache 2016-03-02 11:52:58 +08:00
Andrew Nicols 50aff07c9f MDL-52136 core: Add support for quoting variables in mustache helpers
This is required for when helpers include json-encoded variables as arguments.
As an example, imagine a template with content:

{{# str }} somekey, someidentifier, { "fullname": "{{ fullname }}" } {{/ str }}

If the fullname variable were to include the double-quote character (e.g.
John "Trevor" Doe) because of the way in which mustache renders content, it
would become:

{{# str }} somekey, someidentifier, { "fullname": "John "Trevor" Doe" } {{/ str }}

This results in an invalid JSON structure.

To work around this issue, the quote characters in the passed variable
must be escaped:

{{# str }} somekey, someidentifier, { "fullname": "John \"Trevor\" Doe" } {{/ str }}

Unfortunately, Mustache provides no way of doing so natively.

With this function, we can quote the text as appropriate:

{{# str }} somekey, someidentifier, { "fullname": {{# quote }}{{ fullname }}{{/ quote }} } {{/ str }}

This also handles the case where the quoted content includes the Mustache
delimeter ({{ or }}).

For example:
fullname = 'John "}}Trevor{{" Doe'

Ordinarily this would be rendered as:
{{# str }} somekey, someidentifier, { "fullname": "John "}}Trevor{{" Doe" } {{/ str }}

This rendering is both a JSON error, and also a mustache syntax error because of the mustache delimeters.

The quote helper also escapes these by wrapping them in change delimeter
tags:

{{# str }} somekey, someidentifier, { "fullname": "John "{{=<% %>=}}}}<%={{ }}=%>Trevor{{=<% %>=}}{{{{=<% %>=}}" Doe" } {{/ str }}
2016-03-02 09:00:55 +08:00
Eloy Lafuente (stronk7) 87568b0cfa Merge branch 'MDL-52763-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-03-01 21:38:38 +01:00
Eloy Lafuente (stronk7) dea510bfe0 Merge branch 'wip-mdl-53126-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-03-01 21:35:11 +01:00
Eloy Lafuente (stronk7) 4fb283dea5 Merge branch 'MDL-53200-30-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-03-01 21:25:00 +01:00
Rushikesh b2a2dfe8ae MDL-49897 Calendar : Calendar day view showing past events 2016-03-01 20:16:36 +05:30
Dan Poltawski 62bdb2b8ec Merge branch '30_MDL-53166' of https://github.com/eugeneventer/moodle-fixes into MOODLE_30_STABLE 2016-03-01 12:55:23 +08:00
Dan Poltawski bce722a96d Merge branch 'MDL-46424_30' of https://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-03-01 12:38:53 +08:00
Marina Glancy 7266f8301e MDL-44952 mod_feedback: set value for hidenoselect if disabled 2016-03-01 12:31:24 +08:00
Dan Poltawski e102b4c4d9 Merge branch 'MDL-52928-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-03-01 11:38:30 +08:00
Andrew Nicols 4abf4d9ada Merge branch 'MDL-53027-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-03-01 10:40:40 +08:00
Simey Lameze 477cad6875 MDL-53010 core_role: add missing coursecatlib include 2016-03-01 10:22:03 +08:00
Andrew Nicols 7ce4f46db6 Merge branch 'MDL-52936_30_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_30_STABLE 2016-03-01 10:07:07 +08:00
Andrew Nicols 471da1eca2 Merge branch 'MDL-53214-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-03-01 09:44:49 +08:00
Kevin Bruton efc68f119d MDL-52568 core_cohort: added ability to return all cohorts in WS 2016-03-01 01:02:27 +01:00
Rushikesh b18af92a44 MDL-52984 Roles : Logs store newly created role's id 2016-02-29 15:01:07 +05:30
Dan Poltawski 0e88a593fd Merge branch 'MDL-44952-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-02-29 16:34:24 +08:00
Andrew Nicols 9125eef5b4 Merge branch 'MDL-52965_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-02-29 15:21:43 +08:00
Andrew Nicols d2c16cde78 Merge branch 'MDL-53249-30' of git://github.com/merrill-oakland/moodle into MOODLE_30_STABLE 2016-02-29 14:36:22 +08:00
Andrew Nicols 787aa4333a Merge branch 'MDL-53206_30' of https://github.com/mr-russ/moodle into MOODLE_30_STABLE 2016-02-29 13:15:26 +08:00
Russell Smith a8ee2c885d MDL-53206 caching: Ensure get_many and set_many dereference objects. 2016-02-29 15:59:21 +11:00
Dan Poltawski 14a0b42eec Merge branch 'MDL-53154-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-02-29 10:13:07 +08:00
Rushikesh a6a982d798 MDL-46424 Upload: Error message for a file exceeding maxsize 2016-02-29 08:58:52 +08:00
AMOS bot a09f722564 Automatically generated installer lang files 2016-02-28 00:04:15 +08:00
Marina Glancy a2c926a184 MDL-48307 mod_wiki: protect [edit] section link from nwiki parser 2016-02-26 13:27:26 +08:00
Eric Merrill df64a2ca06 MDL-53249 atto: Make sure all editors see end move event 2016-02-25 21:37:07 -05:00
Helen Foster c490457a71 MDL-53200 lang: Merge English strings from the en_fix language pack 2016-02-25 17:59:24 +01:00
Mark Johnson 06b13fb79f MDL-52936 theme_bootstrapbase: Fix link hover bug on iOS 2016-02-25 11:57:42 +00:00
Davo Smith 260c6b548c MDL-52965 medialib: fix preload attribute 2016-02-25 15:24:21 +08:00
Andrew Nicols e50cd7c14f weekly release 3.0.2+ 2016-02-25 13:52:30 +08:00
Andrew Nicols 66427af8b7 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-02-25 13:52:27 +08:00
Rajesh Taneja 54472938c1 MDL-53126 behat: Fixed radio button in backup step
Rather than calling click and check on radio node
use radio form field to set value
2016-02-25 10:34:06 +08:00
AMOS bot 873fcd7abf Automatically generated installer lang files 2016-02-25 00:11:33 +08:00
Rushikesh 5ea1c8027c MDL-52513 Grading : Change in display message after publishing 2016-02-24 18:13:49 +05:30
David Balch 6b36cd591e MDL-53027 calendar: Fix false empty result from calendar_get_events(). 2016-02-24 18:42:58 +08:00
Eloy Lafuente (stronk7) c896607100 Merge branch 'MDL-53071-30-2' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-02-24 11:41:08 +01:00
Jun Pataleta f0944e4f7a MDL-53071 course: Allow blank space input for section name 2016-02-24 17:40:10 +08:00
Marina Glancy c82a5b3692 MDL-53210 mod_feedback: fixes in check feedback access
1. show only uservisible feedbacks in block_feedback
2. nicer error message when user opens feedback on frontpage instead of from the mapped course
3. corrected cap check in view.php page before displaying link to complete.php
2016-02-24 13:33:19 +08:00
Cameron Ball a6d32ec56e MDL-53214 grades: Ensure grader report correctly labels fields.
The editable fields for the grader report should have unique labels.
Previously category grade items were not being labelled with the
category name.
2016-02-24 10:44:48 +08:00
AMOS bot 40565791ff Automatically generated installer lang files 2016-02-24 00:04:30 +08:00
Dan Poltawski 650071c3c3 Merge branch 'MDL-42460-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-02-23 14:36:55 +00:00
Dan Poltawski 52db4dbd91 Merge branch 'MDL-52958_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-02-23 10:57:49 +00:00
Dan Poltawski 1823daac03 Merge branch 'MDL-50312_30' of https://github.com/jinhofer/moodle into MOODLE_30_STABLE 2016-02-23 08:07:12 +00:00
Andrew Nicols 7a6ba516c8 Merge branch 'MDL-49338_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-02-23 13:44:34 +08:00
Marina Glancy 6ca319debc MDL-44952 mod_feedback: validate required multichoice 2016-02-23 13:07:30 +08:00
Michael Milette 351fed869c MDL-42460 mod_feedback: Fix markup validation 2016-02-23 12:56:23 +08:00
Davo Smith dd0af0fad5 MDL-52371 theme_base: activity chooser - support long names 2016-02-23 11:39:38 +08:00
Kenny McCormack 6d27533ac0 MDL-52371 theme_bootstrapbase: activity chooser - support long names 2016-02-23 11:39:36 +08:00
Andrew Nicols d04d763594 Merge branch 'MDL-52892-30_STABLE' of https://github.com/dg711/moodle into MOODLE_30_STABLE 2016-02-23 10:19:56 +08:00
Eloy Lafuente (stronk7) 6f17dd18c8 Merge branch 'MDL-53065_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-02-22 23:01:13 +01:00
AMOS bot 560d38c251 Automatically generated installer lang files 2016-02-23 00:04:30 +08:00
Dan Poltawski 1ab7bb3c6f Merge branch 'MDL-44093-30-flowplayer' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-02-22 09:04:15 +00:00
Andrew Nicols 2410893797 Merge branch 'wip-mdl-52970-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-02-22 15:22:57 +08:00
Eugene Venter 6c735bd4bb MDL-53166 mod_forum: fix fatal error in backup phpunit test
when running mod_forum_testsuite mod_forum_testsuite
2016-02-22 13:48:37 +13:00
Tim Hunt 51089c2079 MDL-53065 quiz redo question: avoid PHP notice in edge case
When selecting the variant of the new question, we need to add the
new question to the usage before trying to select a variant.

Also, we need to acutally use the selected variant number!
2016-02-19 12:11:08 +00:00
Tim Hunt 70cfad6550 MDL-49338 quiz stats: preview urls wrong for question variants 2016-02-19 12:02:35 +00:00
Rajesh Taneja 93d9e77b73 MDL-52970 behat: Wait for page to be ready after click
After click enusre to wait so text fields are not
use autosize
2016-02-19 15:24:46 +08:00
Rajesh Taneja 9026f8aa42 MDL-52970 behat: Navigation step improvement
If navigation node to expand is a link then first
click on it and navigate to next page where it is
expanded, and then click on link within. This is
needed as some drivers click on link and don't open
the navigation node which are links
2016-02-19 15:24:46 +08:00
Rajesh Taneja 36fd5a2e74 MDL-52970 behat: For single select only click event is enough 2016-02-19 15:24:45 +08:00
Rajesh Taneja 86ebfb0bb5 MDL-52970 behat: don't set select value if already set
In FF 44.0, it fails to click on submit button if
select value is set to the original value
2016-02-19 15:24:45 +08:00
dg711 a6a46d4fc3 MDL-52892 message: users' pic overrides others
While listing the messages , the logged in users' profile pic used to
override over other users' pics .
2016-02-19 02:33:09 +05:30
David Mudrák f64c024648 MDL-44093 flowplayer: Provide information about source code location
Moodle ships with compiled binary code of the flowplayer. This patch
adds information about the source code location according to GNU GPLv3
section 6d and provides the original license for the code from
https://github.com/flowplayer/flash/blob/7c39fbe31ecddc/core/LICENSE.txt
2016-02-18 16:30:03 +01:00
Dan Poltawski 8d42058734 weekly release 3.0.2+ 2016-02-18 09:14:25 +00:00
Dan Poltawski 06ad488970 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-02-18 09:14:23 +00:00
Jun Pataleta cca7714daf MDL-53154 course: Raise PHP time limit when deleting a course 2016-02-18 10:11:13 +08:00
Eloy Lafuente (stronk7) 7080a26ecc MDL-52964 Qtype: Small fixes to behat tests
This applies some small changes to proposed behat tests:

- Geting rid of the @javascript tag when it's not needed.
- Adding some missing @_switch_window tags.
- Fixing some scenario names, previously duplicated.
- Fixing some typos and whitespace.
2016-02-18 02:31:44 +01:00
M Kassaei 56b8a5c80c MDL-52964 Qtype: Add behat tests to core question types 2016-02-18 02:31:40 +01:00
Marina Glancy 0a43324230 MDL-49807 mod_wiki: section detection regexp fix 2016-02-17 13:11:14 +08:00
David Monllao b14945cc2f Merge branch 'MDL-48015-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-02-17 09:52:53 +08:00
Eloy Lafuente (stronk7) c25eb5d673 Merge branch 'MDL-51852-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-17 02:04:08 +01:00
Andrew Nicols 4741ff9810 MDL-51852 mod_forum: Respect timed discussions in emails 2016-02-17 07:59:13 +08:00
Eloy Lafuente (stronk7) 5dc2d2eb4e Merge branch 'MDL-29506-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-16 17:50:31 +01:00
Eloy Lafuente (stronk7) 3bb2f388bb Merge branch 'MDL-52997-email-threading-MOODLE_30_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_30_STABLE 2016-02-16 17:11:48 +01:00
AMOS bot 611c47c861 Automatically generated installer lang files 2016-02-17 00:05:51 +08:00
Eloy Lafuente (stronk7) 29e70c0ffa Merge branch 'MDL-52814_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-02-16 16:48:59 +01:00
Dani Palou a8615c22c8 MDL-52993 wiki: Add unit tests for wiki_user_can_edit
Note: amended on integration to fix some comments.
2016-02-16 16:43:09 +01:00
Dani Palou 5d14c00774 MDL-52993 wiki: Fix wiki_user_can_edit for collab and separate groups 2016-02-16 16:42:46 +01:00
Dan Poltawski 60a26ddf42 Merge branch 'MDL-52862_30' of https://github.com/juancs/moodle into MOODLE_30_STABLE 2016-02-16 15:18:48 +00:00
Dan Poltawski db57772b2f Merge branch 'MDL-53012-m30' of https://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2016-02-16 10:44:58 +00:00
Dan Poltawski e7a4135526 Merge branch 'MDL-52879_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-02-16 10:26:00 +00:00
Dan Poltawski 5e86ebcd3b Merge branch 'MDL-49612-30' of git://github.com/dpalou/moodle into MOODLE_30_STABLE 2016-02-16 09:30:13 +00:00
David Monllao 0682e95c72 Merge branch 'MDL-51117-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-16 13:27:04 +08:00
Eloy Lafuente (stronk7) a4112f7906 Merge branch 'MDL-52511-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-02-16 02:00:44 +01:00
David Monllao 2cc9af244b Merge branch 'MDL-52217-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-16 05:56:56 +08:00
David Monllao 6ad63c6a2b Merge branch 'MDL-51580_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2016-02-16 05:05:43 +08:00
sam marshall 4ff024c5ab MDL-53012 Behat: Add step to run scheduled task 2016-02-15 17:34:31 +00:00
Dan Poltawski 0c92dc487f Merge branch 'MDL-53039-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-02-15 15:33:40 +00:00
Dan Poltawski 3277a55bd5 Merge branch 'MDL-52342-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-15 13:28:16 +00:00
Dan Poltawski 6f55d77ab1 Merge branch 'MDL-49146_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-02-15 12:13:31 +00:00
Dan Poltawski 22fcbd1f22 Merge branch 'wip_MDL-53029_m30' of git://github.com/gjb2048/moodle into MOODLE_30_STABLE 2016-02-15 11:07:37 +00:00
Dan Poltawski b1f4f5bae8 Merge branch 'MDL-44626-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-15 10:36:21 +00:00
Andrew Nicols 15ba94e132 MDL-52217 repository: prepare_file should use per-request directory
The repository API defaults has a function, prepare_file, which is
responsible for creating a unique file to be used during the current
request.

This is usually used in the repository's get_file() function to store the
file before it is used elsewhere in the API to save the file to the
filestorage API.
It is also sometimes used to temporarily store credentials for the lifetime
of the session.

In all cases, this file is only expected to exist for the duration of the
session.

Switching to use of a per-request directory using make_request_directory()
ensures that the tempdir does not grow without control.

This commit also adds an upgrade step to remove all old temp directories
created by any repository currently installed.
2016-02-15 15:55:06 +08:00
David Monllao 76996862ed Merge branch 'wip-MDL-52566-MOODLE_30_STABLE-2' of https://github.com/cdsmith-umn/moodle into MOODLE_30_STABLE 2016-02-15 15:18:12 +08:00
David Monllao a900614082 Merge branch 'MDL-49807-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-02-15 15:12:00 +08:00
Juan Segarra Montesinos af56a3c5b8 MDL-52862 mod_forum: format non HTML messages in search results
Override messageformat to FORMAT_HTML before calling forum_print_post
2016-02-15 07:54:32 +01:00
David Monllao 76c73a9895 Merge branch 'MDL-52249-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-15 14:20:26 +08:00
Andrew Nicols c063da3610 MDL-29506 forum: Add tests for encode_content_links 2016-02-15 08:08:57 +08:00
Rushikesh a027928b32 MDL-29506 forum: Fix use of ampersand in backup parent links 2016-02-15 08:08:57 +08:00
AMOS bot 8fefce40e2 Automatically generated installer lang files 2016-02-13 00:04:19 +08:00
Eloy Lafuente (stronk7) 23cd87285b MDL-51580 environment: 3.1 requirements added
Only important change is that Moodle 2.7 installed is
required to be able to upgrade to 3.1. See the issue
for opinions, votes and agreed outcomes.
2016-02-11 16:09:00 +01:00
Brendan Heywood 58a10b8e47 MDL-52997 forum: Add more robust threading email headers 2016-02-11 20:39:12 +11:00
David Monllao 288f92e8bd weekly release 3.0.2+ 2016-02-11 13:58:59 +08:00
David Monllao 87fa90f7a5 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-02-11 13:58:57 +08:00
Andrew Nicols 9a5b9c76fc MDL-44626 files: Show the PHP max upload size instead of 'unlimited'
Even when a user has the appropriate capability to upload any sized files,
they are still restricted to the PHP post_max_size, and upload_max_filesize
values.

Rather than showing a value of "Unlimited', we should always restrict to
this value.
2016-02-11 10:56:31 +08:00
Andrew Nicols 70a52304db MDL-44626 repository: Correct error message when uploading large files 2016-02-11 10:56:30 +08:00
Andrew Nicols e271dc1e96 MDL-51117 JavaScript: Convert alert to M.core.alert in dndupload 2016-02-11 08:44:39 +08:00
Andrew Nicols c8b4b14574 MDL-52342 theme: Reduce specificity of selector
These selectors were introduced to fix a real issue (highlighted by behat with
Chromedriver) whereby the 'Show section foo' link was partially covered by
another layer.

The fix in that issue was too broad and applied to all content > div areas,
which had some unforseen effects.

Since the original issue only affected activity instances, and sections (and
not content > div regions), I've removed this from the original patch.
2016-02-11 08:20:28 +08:00
Gareth J Barnard 925c6bba13 MDL-53029 mod_book: Hidden chapter has markup in alt and title attrs. 2016-02-10 18:08:37 +00:00
Petr Skoda 60f89a0364 MDL-52511 dml: add support for PostgreSQL 9.5
The default definition behaviour has changed for some int values.
2016-02-10 09:45:44 +00:00
Tim Hunt 4b3f09c081 MDL-52814 questions: Show extra info in the outcomes area not info
Currently the only use is the quiz Redo question button, and that would
be much better placed in the feedback area, not least for langages where
the button label needs to be longer.
2016-02-10 08:47:40 +00:00
Marina Glancy f47289bc99 MDL-49807 mod_wiki: correctly form toc and sections for atto 2016-02-10 13:31:57 +08:00
Andrew Nicols 8d6b7362e2 MDL-52930 forum: Fix random test failure caused by passing of time 2016-02-10 12:24:39 +08:00
David Monllao 78ede65849 Merge branch 'MDL-52766-30-mnet-url-length' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-02-10 08:55:23 +08:00
Tim Hunt a52191b36b MDL-52879 quiz editing: allow removal of the last question in a quiz
Even though you are not normally allowed to remove the last question
in a section.
2016-02-09 21:49:05 +00:00
AMOS bot 166c123bc3 Automatically generated installer lang files 2016-02-10 00:04:11 +08:00
Michael Hughes 01707afd17 MDL-52763 Assignment: Display Participant Number
Display participant number when user holds mod/assign:viewblinddetails capability.

Backport of MDL-52270
2016-02-09 15:59:15 +00:00
Davo Smith b3995066ad MDL-49620 availability: plugins can have global settings 2016-02-09 10:35:30 +00:00
Juan Leyva 2332e18b87 MDL-53000 mod_assign: Add missing get_file_areas in editpdf subplugin 2016-02-09 11:34:19 +01:00
David Monllao 587d575de1 Merge branch 'MDL-52930-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-09 18:06:26 +08:00
Dan Poltawski d5df4d045f Merge branch 'MDL-52895-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-02-09 09:44:53 +00:00
David Monllao 5ed3f867eb Merge branch 'MDL-52902-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-02-09 16:40:19 +08:00
David Monllao 80e7dc9740 Merge branch 'MDL-52927_30' of https://github.com/mkassaei/moodle into MOODLE_30_STABLE 2016-02-09 16:40:19 +08:00
Marina Glancy d25ef0fbde MDL-53039 rss: allow guest access to front page forum 2016-02-09 15:55:53 +08:00
Andrew Nicols 3468942807 MDL-52928 message: Correct contact fetching in recent conversations 2016-02-09 13:39:44 +08:00
Jun Pataleta 65b930fcbd MDL-48015 grade: Fix the display of grade categories 2016-02-09 13:33:21 +08:00
Eloy Lafuente (stronk7) 0e1df382a5 Merge branch 'wip-mdl-52949-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-02-09 02:30:44 +01:00
Andrew Nicols db80cf54a6 MDL-52339 question: Fix question attempt removal for MySQL
Derived table support was altered in MySQL 5.7 changing the way in which
DELETE FROM works in some cases.

This change modifies the way in which deletion occurs by selecting all IDs
and batching them into groups of 1000.
2016-02-09 00:45:50 +01:00
Eloy Lafuente (stronk7) be82fa5053 Merge branch 'MDL-52938-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-02-09 00:30:44 +01:00
Eloy Lafuente (stronk7) 7fa20a8f2e Merge branch 'MDL-52975-30-mnet-context' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-02-08 22:58:05 +01:00
Eloy Lafuente (stronk7) 87935201fe Merge branch 'MDL-52981-m30' of https://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2016-02-08 22:55:17 +01:00
Eloy Lafuente (stronk7) bf60b24c82 Merge branch 'MDL-51075_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-02-08 22:44:59 +01:00
Eloy Lafuente (stronk7) bed63ca74f Merge branch 'MDL-50310-30-random-glossary' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-02-08 22:34:32 +01:00
Dan Poltawski bf209aea14 Merge branch 'MDL-48778-30' of git://github.com/lameze/moodle into MOODLE_30_STABLE 2016-02-08 17:15:44 +00:00
Eloy Lafuente (stronk7) 27802334e2 Merge branch 'MDL-52983_30' of git://github.com/aolley/moodle into MOODLE_30_STABLE 2016-02-08 13:05:39 +01:00
Andrew Nicols 4d51f843be MDL-52249 theme_bootstrapbase: Remove dropdown-backdrop
Standard bootstrap adds a backdrop for touch-responsive clients.
Unfortunately the backdrop is not compatible with submenus.

The backdrop was only added in Bootstrap v2.3.1, and Moodle switched to
using the bootstrap JS in version 3.0.0.
2016-02-08 14:46:08 +08:00
Simey Lameze a40195b455 MDL-48778 mod_assign: behat tests for group submission 2016-02-08 14:24:04 +08:00
Eric Merrill f94c215231 MDL-48778 assign: Use proper latest attempt for quickgrading prechecks
The code that stored lastmodified in gradingtable used a different
method to produce it than the processor used to generate the check
value. Fix that and also check that the attempt number has not changed.
2016-02-08 14:24:04 +08:00
David Monllao 3bfe6aa877 Merge branch 'MDL-50115-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-02-08 14:11:37 +08:00
David Monllao 5d09708b25 Merge branch 'm30_MDL-52637_Disable_Automatically_Enabling_TLS_Encryption' of https://github.com/scara/moodle into MOODLE_30_STABLE 2016-02-08 13:51:17 +08:00
Adam Olley 10bf1500da MDL-52983 excel output: avoid single quote on end of sheet name
This change resolves a problem where a long sheet name, which gets
trimmed down with substr($name, 0, 31), could result in a sheet name
with a single quote on the end because the quote removal was done before
the substr.
2016-02-08 15:17:35 +10:30
David Monllao 091fc5259b Merge branch 'MDL-51723-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-08 09:03:28 +08:00
Tim Hunt 3286622534 MDL-49146 single-activity course format: key activity must be visible
With a single-activity course, visibility to students is controlled by
course visibility. There is no sense in having the key activity not
visible to students, and, if you did, the symptoms were almost
incomprehensible. It was very hard to work out what you had done wrong.
2016-02-06 14:59:03 +00:00
AMOS bot fd6d42de20 Automatically generated installer lang files 2016-02-06 00:04:15 +08:00
Andrew Nicols 8275f30231 MDL-52930 mod_forum: Add get_unmailed_posts tests 2016-02-05 14:40:26 +08:00
Josh Marshall 6d425afa4f MDL-52930 forum: Correct get_unmailed_posts logic 2016-02-05 14:37:04 +08:00
David Monllao e4e7acde8b MDL-52958 medialib: Allow vimeo fullscreen using links
All credit to Henrik Sune Pedersen.
2016-02-05 10:18:45 +08:00
David Monllao a80a00aa08 MDL-51075 filter_glossary: Fix popup position when no popups
Thanks to Andrew Nicols for cleaning my eyes.
2016-02-05 09:24:41 +08:00
David Mudrák 18b2d9d2f9 MDL-50310 glossary: Fix restore of random glossary entry block
When restoring the random glossary entry block, we need to check that
the associated glossary has also been included in the backup and is
being restored. If not, we must invalidate the block configuration.

Before this patch, the block configuration was not invalidated.

Additionally, as a result of MDL-20131, the block configuration also
contains the course id of the associated glossary (which by the way does
not seem to be a wise choice, but I may be missing something). So we
need to remap this course id as well to avoid mismatch.
2016-02-04 23:44:15 +01:00
Matteo Scaramuccia c577e1af6a MDL-52637 mail: Disabled automatic TLS encryption. 2016-02-04 21:18:34 +01:00
David Mudrák b704533f0a MDL-52975 mnet: Set system context on the MNet SSO landing page
Without the context being explicitly set, debugging warning can be
displayed in certain rare situations.
2016-02-04 17:16:18 +01:00
David Mudrák 117ee3a064 MDL-52766 mnet: Support MNet peer URLs longer than 64 characters
The commonName in SSL certificate is limited to 64 characters as per
RFC 5280 (https://www.ietf.org/rfc/rfc5280.txt). We respect that limit
when generating the CN attribute from the site's $CFG->wwwroot. But then
we did not respect it when comparing the common name with the peer's
URL so the certificate was not considered valid.
2016-02-04 17:11:56 +01:00
Dan Poltawski c0abaa9fdf MDL-50115 grunt: add missing jshint configuration
The gruntfile isn't a normal browser environment
2016-02-04 12:04:20 +00:00
Dan Poltawski ca86656416 MDL-50115 grunt: provide a --root option to set base path
Windows users are not able to run grunt on a subpath due to platform
restrictions. So we provide this option to provide a workaround for that.

Thanks to Ty Delean who proposed this idea.
2016-02-04 12:04:20 +00:00
David Monllao 22fa1056d7 weekly release 3.0.2+ 2016-02-04 14:30:16 +08:00
David Monllao 628462b78d Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-02-04 14:30:14 +08:00
AMOS bot 6944c07406 Automatically generated installer lang files 2016-02-04 00:04:21 +08:00
sam marshall 74e7fab22e MDL-52981 Unit tests: Reset global after test 2016-02-03 10:28:21 +00:00
Juan Leyva 6b6d2633b0 MDL-52895 webservice: Fix capability checks 2016-02-03 11:24:00 +01:00
David Monllao b0f5eb7d36 Merge branch 'MDL-52899_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-02-03 13:44:57 +08:00
David Monllao 162c33d75e Merge branch 'MDL-52873-30-modgradeid' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-02-02 12:12:45 +08:00
David Monllao 641eab45e0 Merge branch 'MDL-52137-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-02-02 10:57:00 +08:00
Marina Glancy 18ff1708e4 MDL-52938 mod_forum: check global setting to track forum posts 2016-02-02 10:54:59 +08:00
M Kassaei 39396934da MDL-52927 qtype ddwtos and ddimageortext focus using keyboard 2016-02-01 14:50:55 +00:00
Dan Poltawski a6a883df2d Merge branch 'wip-mdl-52932-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-02-01 10:27:27 +00:00
Dan Poltawski 3e5db201a5 Merge branch 'MDL-52940_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-02-01 09:49:23 +00:00
David Monllao 5a8f2ba046 Merge branch 'MDL-51704-30' of git://github.com/dpalou/moodle into MOODLE_30_STABLE 2016-02-01 17:20:49 +08:00
David Monllao 3c63c2c900 Merge branch 'MDL-52261_30_file_not_found' of git://github.com/BenKelada/moodle into MOODLE_30_STABLE 2016-02-01 13:56:16 +08:00
David Monllao 96c7474eb0 Merge branch 'MDL-52913_30_STABLE' of git://github.com/marxjohnson/moodle into MOODLE_30_STABLE 2016-02-01 13:46:32 +08:00
Mark Nelson 20e102773f MDL-52940 core_backup: prevent always displaying logs 2016-02-01 12:45:05 +08:00
David Monllao 36719a497f Merge branch 'MDL-52831-30-emptynames' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-02-01 11:31:44 +08:00
Rajesh Taneja 1d1d4952b0 MDL-52949 behat: Use hover step and not click step
Message delete link is visible on hover
Click event can fail randomly.
2016-02-01 11:15:25 +08:00
Andrew Nicols faef5d14c7 MDL-51723 enrol_ldap: Normalise user objectclass in dn 2016-02-01 10:28:54 +08:00
Rajesh Taneja 61358a918d MDL-52932 behat: Restart session if it fails because of some reason 2016-02-01 09:32:29 +08:00
jinhofer 1a6dac81ed MDL-50312 grade/report/grader: Fixed remaining issue
MDL-49764 fixed the appearance of user cells. However, the window
resize event was still incorrect. This is a fix for the window
resize event for ALL IE versions.
2016-01-29 12:22:56 -06:00
Mark Johnson df443f4d83 MDL-52913 behat: Abort database transactions on exception. 2016-01-29 11:56:30 +00:00
David Monllao 5677aedfd3 weekly release 3.0.2+ 2016-01-29 14:37:04 +08:00
David Monllao 20f2e2ec6a Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-01-29 14:37:01 +08:00
David Monllao 6309e63d41 MDL-52825 atto: Listen to gesturemovestart to discard some events 2016-01-28 12:21:20 +08:00
AMOS bot fb0a1132c9 Automatically generated installer lang files 2016-01-28 00:04:29 +08:00
Juan Leyva 3b5f57029b MDL-52902 webservice: Send CORS header before params validation 2016-01-27 10:27:00 +01:00
Eloy Lafuente (stronk7) 859d6e470e Merge branch 'MDL-29817_30' of https://github.com/rushi963/moodle into MOODLE_30_STABLE 2016-01-27 00:52:05 +01:00
Eloy Lafuente (stronk7) 8e114d80fb MDL-52567 Core: amend existing test to new counting rules 2016-01-27 00:37:42 +01:00
Eloy Lafuente (stronk7) f41a364e27 Merge branch 'MDL-52567_M30' of https://github.com/nadavkav/moodle into MOODLE_30_STABLE 2016-01-27 00:37:23 +01:00
Eloy Lafuente (stronk7) 33cd0e15f1 MDL-37739 mod_wiki: test headings being wikilinks (toc and content) 2016-01-27 00:13:52 +01:00
Luca Bösch a6c941f063 MDL-37739 mod_wiki: Wiki ToC header href remove square double brackets.
When H1, H2 and H3 links in wiki act themselves as hyperlinks, they
were displayed in double brackets. This patch removes [[ and ]] out of
the table of content displayed header hyperlinks.
2016-01-26 23:16:27 +01:00
AMOS bot d0090576e1 Automatically generated installer lang files 2016-01-27 00:04:13 +08:00
Dani Palou 2feef8ec73 MDL-51704 survey: Fix display problems in report page 2016-01-26 14:07:16 +01:00
Tim Hunt ca7c500826 MDL-52899 behat: make PAGE_READY_JS more robust 2016-01-26 11:23:47 +00:00
Dan Poltawski ec4dc1d0c2 Merge branch 'MDL-48953_m30v4' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-26 11:10:15 +00:00
Rushikesh c10119a059 MDL-25864 Blog: Confirmation dialog before unregistering 2016-01-26 11:06:27 +00:00
David Monllao 54405a604f Merge branch 'MDL-52459-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-01-26 18:23:00 +08:00
Dani Palou 00a3d0bdcf MDL-49612 forum: Fix some external_value creation in params declaration 2016-01-26 09:16:51 +01:00
Eloy Lafuente (stronk7) 5b647d65f2 Merge branch 'wip-mdl-52839-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-26 00:40:48 +01:00
Eloy Lafuente (stronk7) 4d9adf0f60 Merge branch 'MDL-52843-30-paramsignup' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-01-26 00:38:22 +01:00
Clement Smith 59dd3269fb MDL-52566 mod/assign: Fix group submission draft records
When group assignments are submitted by the first student in a group,
the logic that saves the submission is not creating a draft
assignment record in mdl_assign_submission. This leads to problems
when other functions are used that depend on these records, such as
marking workflow. This fixes the issue and correctly creates
draft assignment submission records for the non-submitting students
in the group.
2016-01-25 09:40:27 -06:00
Dan Poltawski 70ddb4e2c6 Merge branch 'MDL-52791_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-01-25 14:27:03 +00:00
Dan Poltawski d55eb769e4 Merge branch 'MDL-52835-m30' of git://github.com/deraadt/moodle into MOODLE_30_STABLE 2016-01-25 14:14:49 +00:00
Dan Poltawski 08610c078f Merge branch 'MDL-51702_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-01-25 10:30:04 +00:00
Dan Poltawski 1f3f47fe97 Merge branch 'MDL-52825_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-01-25 10:25:57 +00:00
David Monllao 15ccd59dc1 Merge branch 'MDL-52682-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-01-25 15:39:27 +08:00
David Monllao f8f27a5013 MDL-52683 mod_scorm: Test for scorm_get_last_completed_attempt 2016-01-25 15:34:09 +08:00
David Monllao 42d5dcb5c3 Merge branch 'MDL-52683-30' of git://github.com/s-cenni/moodle into MOODLE_30_STABLE 2016-01-25 15:32:38 +08:00
David Monllao da3aaf3a63 Merge branch 'wip-mdl-52799-m30' of git://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-25 14:39:46 +08:00
David Monllao 3ab644e94e Merge branch 'MDL-31635-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2016-01-25 12:33:56 +08:00
Marina Glancy 1d188cb1d3 MDL-31635 completion: do not show % for the grade
Also show grades with the configured number of decimal points
2016-01-25 10:23:54 +08:00
AMOS bot d5dd5bd085 Automatically generated installer lang files 2016-01-25 00:04:16 +08:00
Nadav Kavalerchik cb61fdd961 MDL-52567 Core: remove quotation marks, for proper word count 2016-01-24 00:46:39 +02:00
AMOS bot 4c2746d752 Automatically generated installer lang files 2016-01-23 00:04:24 +08:00
David Mudrák 9e065db83d MDL-52873 forms: Generate unique id attributes for modgrade elements
The previous method of generating the id attribute of the elements
within the modgrade group did not take the name of the modgrade field
into account. So if there were multiple fields of the modgrade type
added into a form (not a common case yet still valid), elements created
within the group were assigned same id attributes.

The patch introduces a new method for generating the id attribute of
modgrade elements. The new method takes the name of the modgrade group
into account and returns the id in the format similar to the default one
returned by HTML_QuickForm_element::_generateId().

The patch changes the generated id attribute. Apart from the
block_activity_results' behat feature files, not other places seem to
rely on the exact value.
2016-01-22 14:33:07 +01:00
Andrew Nicols aa720a52ed MDL-52137 mod_forum: Move post body into html digest full body 2016-01-22 10:12:21 +08:00
Andrew Nicols 963681fdc0 MDL-52682 mod_forum: Correct redirect URL when marking posts as read 2016-01-22 08:04:39 +08:00
Michael de Raadt de7454d413 MDL-52835 mod_data: Correct MIME type for JS template 2016-01-22 09:55:28 +11:00
Rushikesh c327cc5c77 MDL-29817 Form : advcheckbox allows attributes even without group key 2016-01-21 22:20:17 +05:30
Sara Cenni bc77304aa5 MDL-52683 mod_scorm: Fix for Last completed attempt error with Oracle 2016-01-21 17:27:48 +01:00
Rajesh Taneja 7b30d1e84a MDL-52839 behat: Fixed xpath and wait to ensure element is visible 2016-01-21 15:51:43 +08:00
Andrew Nicols 4ffe9d1bd3 weekly release 3.0.2+ 2016-01-21 13:43:48 +08:00
Andrew Nicols be932909b5 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-01-21 13:43:45 +08:00
David Monllao 665db4c894 MDL-51702 blocks: Allow permission overrides in dashboard 2016-01-21 08:48:22 +08:00
David Mudrák 960c5cce5c MDL-52843 users: Fix the PARAM type of the name fields in signup form
If editing the profile, the useredit_shared_definition() function set
the type of all name fields to PARAM_NOTAGS. This patch sets that type
consistently in the user signup form, too.
2016-01-20 11:03:32 +01:00
Eloy Lafuente (stronk7) e2baf7ed8a MDL-50083 mod_assign: protect code against not set flags
Yes could have used !empty() but for some reason found
the isset() && condition more clear. Tired brain, surely.
2016-01-20 10:05:38 +08:00
Andrew Nicols 0ef9c59d09 Merge branch 'MDL-52435_30' of https://github.com/jinhofer/moodle into MOODLE_30_STABLE 2016-01-20 09:51:59 +08:00
Eloy Lafuente (stronk7) c3d1a15532 Merge branch 'm30_MDL-50083' of https://github.com/greg-or/moodle-mod_assign into MOODLE_30_STABLE 2016-01-20 01:36:34 +01:00
jinhofer e65317c3f3 MDL-52435 mod/assign: Added and move plagiarism links
Backport of MDL-51693 and MDL-51706
2016-01-19 18:19:11 -06:00
Greg Faller 32f27a6c69 MDL-50083 mod_assign: unlock submission when adding attempt 2016-01-20 09:31:11 +10:30
David Mudrák d3ea8cbc07 MDL-52831 users: Do not delete Mr. and Mrs. Whitespace accounts
Due to imperfect validation of the user registration and profile forms,
we allowed for firstname and lastname be just a whitespace. On MySQL,
such a whitespace is not significant for VARCHAR comparison so these
otherwise valid accounts could be silently deleted.

The patch makes sure that at least one of the checked fields is a real
empty string before deleting such account.
2016-01-19 21:32:42 +01:00
David Mudrák 73f2ca5411 MDL-52831 users: Automatically strip whitespace from name fields
This change prevents from registering and/or saving the profile of a
user with the whitespace instead of the required name.

Additionally, there is accessibility improvement for better error labels
in case of missing values (copied over from signup_form).
2016-01-19 21:32:42 +01:00
Rajesh Taneja 7b30789ce7 MDL-52721 behat: Exclude links in moodle while finding tests
Parallel run create links within moodle
so avoid searching for tests within links
2016-01-19 14:35:34 +00:00
Dan Poltawski 0de2b00a8a Merge branch 'MDL-51123-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-01-19 11:01:48 +00:00
Colin Campbell f71446f628 MDL-51715 lib/grade: Unit test for aggregationweight 2016-01-19 10:40:13 +00:00
Colin Campbell 26933d15b0 MDL-51715 lib/grade: Zero out aggregationweight for novalue and dropped
set_usedinaggregation was setting aggregationweight to zero in these
cases for non-category grades, but not for category grades.
2016-01-19 10:40:05 +00:00
David Monllao f769b21680 MDL-52825 atto: Ignore out of bounds event targets 2016-01-19 15:38:59 +08:00
Andrew Nicols 0c6c844cb8 Merge branch 'MDL-52673-30' of https://github.com/pauln/moodle into MOODLE_30_STABLE 2016-01-19 11:00:12 +08:00
Rushikesh 2940d926a5 MDL-52519 Idap tests: use consistent var name 2016-01-19 10:20:26 +08:00
Andrew Nicols 4e65da4a2f Merge branch 'MDL-52773-30' of https://github.com/pauln/moodle into MOODLE_30_STABLE 2016-01-19 10:02:53 +08:00
Tim Hunt 229072cc77 MDL-52784 quiz: unused param in quiz_get_combined_reviewoptions calls 2016-01-19 09:05:42 +08:00
Eloy Lafuente (stronk7) 79b58bee2b Merge branch 'MDL-52615_M30' of https://github.com/nadavkav/moodle into MOODLE_30_STABLE 2016-01-19 00:29:36 +01:00
Tim Hunt 4b13200c2f MDL-52791 quiz editing: handle unknown question types 2016-01-18 17:37:32 +00:00
AMOS bot f70eede993 Automatically generated installer lang files 2016-01-19 00:04:44 +08:00
Dan Poltawski 1414b0a7d4 Merge branch 'MDL-52750_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2016-01-18 15:54:44 +00:00
Dan Poltawski f80cf7dcf1 Merge branch 'wip-mdl-52721-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-18 14:39:44 +00:00
Dan Poltawski c8393f44df Merge branch 'MDL-52218_m30_alt' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-01-18 14:04:01 +00:00
Dan Poltawski 63453ea129 Merge branch 'MDL-52486-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-01-18 11:19:54 +00:00
Rajesh Taneja 974ccb5121 MDL-52799 unittest: Removed empty if statement 2016-01-18 15:47:59 +08:00
Andrew Nicols 9604b3e9d8 Merge branch 'MDL-45265-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-01-18 15:19:14 +08:00
Andrew Nicols 3516f2b3ef Merge branch 'MDL-52608-30' of https://github.com/xow/moodle into MOODLE_30_STABLE 2016-01-18 14:48:28 +08:00
Andrew Nicols 2622aa2f9d Merge branch 'MDL-52573-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-01-18 14:43:49 +08:00
Rajesh Taneja 31bbc4db30 MDL-52799 phpunit: Truncate records for brokedmysql not empty. 2016-01-18 14:36:29 +08:00
Andrew Nicols a52a2d3b26 MDL-50915 mod_lesson: Remove js dependencies from behat tests 2016-01-18 10:53:29 +08:00
Andrew Nicols d4bb5da618 Merge branch 'MDL-50915_m30v5' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-18 10:53:09 +08:00
Rajesh Taneja 591eb7449f MDL-52721 unittest: Exclude tests in vendor and node_modules 2016-01-18 10:25:48 +08:00
Andrew Nicols a46efc23a3 Merge branch 'MDL-52570-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-01-18 09:52:02 +08:00
Stephen Bourget 4784153309 MDL-48953 choice: Improve chart labels 2016-01-15 13:42:48 -05:00
Tim Hunt d780b39188 MDL-52750 quiz reviewQ/comment: add page title & student name 2016-01-15 11:11:09 +00:00
Paul Nicholls 9cb7b278af MDL-52773 course: Fix section return from single section page
When editing a section from a single section page, you should be returned
to the section you were viewing/editing, not always to section 1.
2016-01-15 11:51:22 +13:00
Dan Poltawski 114ebc3742 MDL-52573 report_grader: only check cap of installed plugins
Previously we were linking to gradebook plugins regardless of whether
they were installed. This should be fixed properly in MDL-52678.
2016-01-14 10:26:03 +00:00
Dan Poltawski 6a01418aa1 weekly release 3.0.2+ 2016-01-14 10:10:05 +00:00
Dan Poltawski ce87f75cf6 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-01-14 10:10:03 +00:00
Mark Nelson a5289915ca MDL-52218 gradereport_grader: added behat test for switching views 2016-01-13 15:29:16 +08:00
Mark Nelson 2381a9327f MDL-52218 gradereport_grader: fixed 'grade:viewhidden' related errors
There were two main reasons why there were PHP errors.

1) We were not passing variables as references.
2) When we were restricting the number of items shown in
   the report we were not collecting all of the dependencies
   which were required when a user did *not* have the
   capability 'moodle/grade:viewhidden'. This would cause
   an undefined offset error due to the index missing in
   the dependency array.

This also meant that a user without the capability 'moodle/grade:viewhidden'
could view the course total without hidden items being taken into account
if they were not being displayed. To resolve this we now pass all the grades
and grade items when the user does not have the capability - which also solves
the PHP errors listed above.
2016-01-13 15:29:16 +08:00
Andrew Nicols 934a6d94ef MDL-43620 mod_chat: Whitespace fix 2016-01-13 10:20:30 +08:00
Andrew Nicols a24477c30a Merge branch 'MDL-50829-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-01-13 09:57:33 +08:00
Andrew Nicols cdfcaa4876 Merge branch 'MDL-43620_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-13 09:43:11 +08:00
Andrew Nicols 994ad03eb4 Merge branch 'MDL-51710-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2016-01-13 09:17:28 +08:00
Andrew Nicols e8047b8876 Merge branch 'MDL-52507_30' of https://github.com/jinhofer/moodle into MOODLE_30_STABLE 2016-01-13 09:08:01 +08:00
Andrew Nicols ce9eec227b Merge branch 'MDL-52649-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-01-13 09:00:46 +08:00
Joseph Inhofer 1e9de38a74 MDL-52507 enrol/manual: Generated a smart zIndex 2016-01-12 12:11:55 -06:00
AMOS bot 1db782af87 Automatically generated installer lang files 2016-01-13 00:04:09 +08:00
Dan Poltawski 6e120bba12 Merge branch 'MDL-52400-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-01-12 13:12:44 +00:00
Dan Poltawski cad2583872 Merge branch 'MDL-21912-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-01-12 11:08:13 +00:00
Dan Poltawski 60d47c2170 MDL-52656 mod_forum: remove $SSSION test hack 2016-01-12 10:48:19 +00:00
Dan Poltawski 572eca5748 Merge branch 'wip-mdl-52656-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-12 10:48:15 +00:00
Andrew Nicols 03f2be3e3d Merge branch 'MOODLE_30_STABLE' of https://github.com/janeklb/moodle into MOODLE_30_STABLE 2016-01-12 15:57:56 +08:00
Andrew Nicols 6b6487eeed Merge branch 'MDL-52585-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2016-01-12 14:37:09 +08:00
Andrew Nicols 63265e4709 Merge branch 'MDL-52610_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-01-12 14:33:32 +08:00
David Monllao 140b58502c MDL-52610 user: Honour allowaccountssameemail in create_users ws
Credit to Dmitriy Kuzevanov.
2016-01-12 13:57:11 +08:00
Andrew Nicols dfa680442c Merge branch 'MDL-52643_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-12 13:12:42 +08:00
Andrew Nicols 81df060697 Merge branch 'patch-10' of https://github.com/sk-unikent/moodle into MOODLE_30_STABLE 2016-01-12 12:34:53 +08:00
Andrew Nicols ac0f173e2e Merge branch 'MDL-52563-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-01-12 12:30:38 +08:00
Andrew Nicols 70d41bafa1 MDL-38020 behat: Correct singleselect usage 2016-01-12 12:23:53 +08:00
Andrew Nicols 418a05d706 Merge branch 'MDL-38020-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-01-12 12:23:49 +08:00
Andrew Nicols 0761304d2f Merge branch 'MDL-27840-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2016-01-12 11:49:09 +08:00
Jun Pataleta 6b1ca71974 MDL-52649 user: Add check for potentially undefined variables 2016-01-12 08:57:08 +08:00
Michael Aherne 7f7b3c1b5b MDL-52589 cache: Allow unused stores to be uninstalled 2016-01-11 15:33:33 +00:00
Dan Poltawski 1abbe2a268 Merge branch 'MDL-52000-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2016-01-11 13:17:06 +00:00
Dan Poltawski 2086e272e8 Merge branch 'MDL-41531-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2016-01-11 11:09:10 +00:00
Andrew Nicols f2cd45004b MDL-52000 mod_forum: Respect timed posts in course overview block 2016-01-11 18:56:36 +08:00
Cameron Ball efee20c43b MDL-52486 JavaScript: Make sure lang codes use underscores.
In some cases, underscores in lang codes get replaced with dashes
which causes some JavaScript to be unhappy. This patch simply reverse
the underscore to dash replacement on the JS side.
2016-01-11 16:57:11 +08:00
Cameron Ball 6ab7e0d283 MDL-21912 restore: Add admin setting to restore conflicting admin user 2016-01-11 14:09:30 +08:00
eWallah da3ca5041f MDL-41531 enrol_paypal: Fix enrol errors due to non-ASCII characters 2016-01-11 10:50:07 +08:00
AMOS bot 841db8ec77 Automatically generated installer lang files 2016-01-11 00:04:17 +08:00
Eloy Lafuente (stronk7) 5d35d7b884 Moodle release 3.0.2 2016-01-09 00:49:58 +01:00
Frederic Massart ac70fb827a MDL-51710 repository_s3: Use proxy settings when communicating with S3 2016-01-08 16:55:27 +08:00
Stephen Bourget 21b17fe49c MDL-52643 block_blog_menu: Add behat tests 2016-01-07 20:17:17 -05:00
Rajesh Taneja c4c0518d90 MDL-52656 unittest: Reset original session while setting user 2016-01-08 10:48:56 +10:00
Juan Leyva bad5905952 MDL-52570 message: Do not return deleted messages in WS 2016-01-07 12:12:26 +01:00
Dan Poltawski 7817f82c15 weekly release 3.0.1+ 2016-01-07 08:32:46 +00:00
Dan Poltawski cabf0dbd40 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-01-07 08:32:44 +00:00
John Okely ec6f81207a MDL-52608 core: Use property_exists in fullname
Credit to Dmitriy Kuzevanov for the patch.
2016-01-07 07:39:13 +00:00
Paul Nicholls 4cae8e7a30 MDL-52673 workshop: fix dndnotsupported message in assessment form
An old CSS rule which doesn't seem to serve any purpose any more was
causing the "drag and drop not supported" message to be displayed (even
when incorrect) in the workshop assessment form when using a list-view
rubric as the grading strategy.
2016-01-07 15:38:29 +13:00
AMOS bot cd326efb57 Automatically generated installer lang files 2016-01-07 00:04:35 +08:00
Skylar Kelty ab430ba5fd MDL-52664 forum: Fix forum email unsubscribe/discussion URL 2016-01-06 12:48:41 +00:00
Dan Poltawski 4c395d5b09 MDL-45265 behat: tests for admin_bookmarks block 2016-01-06 11:01:34 +00:00
Rajesh Taneja 39f2c0f711 MDL-52614 mod_workshop: right align for dir-rtl only 2016-01-06 13:38:15 +08:00
Nadav Kavalerchik 3e1089a7f1 MDL-52615 Workshop: Right align phase status icons, in RTL mode. 2016-01-05 20:39:46 +02:00
AMOS bot 02dae40716 Automatically generated installer lang files 2016-01-06 00:04:05 +08:00
Dan Poltawski 408beb96d6 Merge branch 'MDL-52503_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-01-05 15:30:55 +00:00
Juan Leyva c4e2c3ba9b MDL-52072 enrol: Fix course visibility checks in external functions 2016-01-05 10:31:26 +00:00
Janek Lasocki-Biczysko 48db5765ac MDL-52504 grunt: fixed scope of jshint when in amd directory 2016-01-05 09:58:15 +00:00
David Monllao 4d59af4afa MDL-52503 mod_assign: Removing session cache
Replaced with a global $SESSION var, deferring cleanup to session
destroy.
2016-01-05 17:50:58 +08:00
Matt Rice f9758178c6 MDL-52563 mod_forum: Cleanup digestbasic template 2016-01-05 15:38:45 +08:00
Andrew Nicols 695ecfc67d Merge branch 'wip-mdl-51881-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-05 14:09:22 +08:00
Rajesh Taneja e02155048a MDL-51881 behat: updated composer pointing to new tag 2016-01-05 14:02:39 +08:00
Rajesh Taneja 0177319237 MDL-51881 behat: Set navbar to be absolutely positioned
All behat drivers are now replicating human behavior
so when the browser scrolls something into view it doesn't account
for fixed positioned elements that end up obscuring the item thus
leading to errors that could be avoided by scrolling an additional amount.
2016-01-05 14:02:39 +08:00
Andrew Nicols e5f8c4d2e3 Merge branch 'MDL-52078-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-01-05 13:55:29 +08:00
Cameron Ball edbb4f6e53 MDL-52078 gradebook: Behat tests for hidden grade items. 2016-01-05 13:49:28 +08:00
Peter Miller 07b51eebf3 MDL-52078 gradebook: Stop totals including hidden items.
This patch fixes a problem where the course and user reports, when viewed by
a student, were incorrectly including hidden grade items in the course totals,
making the percentages lower than they should be.
2016-01-05 13:49:28 +08:00
Nadav Kavalerchik 5240013d21 MDL-52625 Badges: Right align manage badges table content, in RTL mode. 2016-01-05 08:12:06 +08:00
Stephen Bourget ee687f8919 MDL-50915 Lesson: Behat test for overview report 2016-01-04 18:39:05 -05:00
Stephen Bourget 4c2336663a MDL-50915 Lesson: Fix information on outline report 2016-01-04 18:38:52 -05:00
Nadav Kavalerchik a0984c46a1 MDL-52614 Workshop: Right align user's picture on Assessed submission. 2016-01-04 18:14:00 +00:00
Stephen Bourget 4077d3e696 MDL-43620 Chat: Behat test for course reset 2016-01-04 11:57:54 -05:00
Stephen Bourget d9e423dc82 MDL-43620 Chat: Fix error on course reset 2016-01-04 11:57:40 -05:00
Juan Leyva c58421208c MDL-52400 webservice: Add core_notes_delete_notes to the mobile service 2016-01-04 16:32:23 +01:00
Dan Poltawski f361d3e20f Merge branch 'MDL-52645-30-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-01-04 15:32:05 +00:00
Dan Poltawski b238a8658f Merge branch 'MDL-52576_user_profile_30' of https://github.com/BenKelada/moodle into MOODLE_30_STABLE 2016-01-04 15:06:18 +00:00
Dan Poltawski 4513906883 Merge branch 'wip-mdl-52605-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-04 13:41:57 +00:00
Dan Poltawski 1052567d7e Merge branch 'MDL-52638_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-04 11:36:38 +00:00
Helen Foster 1f43996636 MDL-52645 lang: Merge English strings from the en_fix language pack 2016-01-04 11:37:51 +01:00
Andrew Nicols 0d18a2c74d Merge branch 'MDL-49566_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-01-04 13:54:18 +08:00
Dan Poltawski 3302964844 MDL-52552 course management: insufficient cleaning of search output 2016-01-04 10:14:16 +08:00
Stephen Bourget 70d71d3af7 MDL-52638 activity_results: Improve Behat tests 2016-01-03 21:02:35 -05:00
Andrew Nicols 0b841c0c72 Merge branch 'MDL-51445_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-04 09:21:50 +08:00
Ben Kelada bc66f3d7b2 MDL-52576 forum: fix user profile picture in external service 2016-01-04 11:38:15 +11:00
Mark Nielsen f3008d2a08 MDL-52605 phpunit: Improve get_message_processors reset 2016-01-04 07:52:49 +08:00
Mark Nielsen 7de2aa1a95 MDL-52605 phpunit: Prevent querying database metadata 2016-01-04 07:52:49 +08:00
Rajesh Taneja 69b2e68d27 MDL-52605 phpunit: Check file only if needed 2016-01-04 07:52:49 +08:00
Rajesh Taneja b7327c6c19 MDL-52605 phpunit: Keep track of initial reset sequence 2016-01-04 07:52:48 +08:00
AMOS bot f06196976a Automatically generated installer lang files 2016-01-04 00:04:29 +08:00
Stephen Bourget 44f9a36089 MDL-51445 Chat: Fix broken profile links 2015-12-31 11:08:37 -05:00
Dan Poltawski d92624e11f weekly release 3.0.1+ 2015-12-31 08:16:47 +00:00
Dan Poltawski 2264a0454c Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-31 08:16:45 +00:00
David Monllao 0944647413 MDL-52347 format_social: Replicate wait between new discussions 2015-12-31 13:22:11 +08:00
AMOS bot 8917f657a1 Automatically generated installer lang files 2015-12-31 00:04:00 +08:00
Dan Poltawski b8b43072c2 MDL-38020 behat: for enrollment management from participants page 2015-12-30 15:26:38 +00:00
Dan Poltawski a85c16aea5 MDL-38020 participants: Use consistent link for editing enrollments
Previously the role assignment url was used when a role was selected, but
this page doesn't enrol users into the course (its the old 1.9 way
before we had the enrollments table).
2015-12-30 15:26:38 +00:00
Dan Poltawski aade13141c MDL-27840 course: prevent warnings on half-uninstall mod 2015-12-30 14:13:46 +00:00
Dan Poltawski 41d53f9bd5 Merge branch 'MDL-50357_30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-30 09:19:35 +00:00
Juan Leyva 0d3baf5f8e MDL-51123 mod_scorm: Do not display SCO with invisible = false 2015-12-30 10:17:27 +01:00
AMOS bot 793d034c4a Automatically generated installer lang files 2015-12-30 00:04:07 +08:00
Dan Poltawski 92236e4345 MDL-50829 lang: fix to RTL/LTR bracket confusion
Thanks to ISHIKAWA Takayuki for the initial patch
2015-12-29 12:32:15 +00:00
Juan Leyva c14c042aca MDL-52459 mod_scorm: Auto-update downloaded packages 2015-12-29 12:44:16 +01:00
Michael Aherne 45b9bcd9a0 MDL-52439 assign: correct get_user_submission() phpdoc 2015-12-29 10:38:22 +00:00
Dan Poltawski f45a62e469 Merge branch 'MDL-52275_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-29 10:04:47 +00:00
Mark Nelson 650d4000cb MDL-49566 core: used reflection in unit tests
Also split the tests into multiple functions for each scenario.
2015-12-29 17:44:35 +08:00
Ankit Agarwal a411fd9ad7 MDL-49566 core: Write unittests for MDL-45898 2015-12-29 17:43:51 +08:00
Ankit Agarwal 9c35910821 MDL-49566 myprofile: Fix bugs in myprofilelib 2015-12-29 17:43:02 +08:00
Ankit Agarwal 47e5ed8e30 MDL-49566 notes: Notes link should not show up for guests 2015-12-29 17:43:02 +08:00
David Monllao b2e6bee53e Merge branch 'MDL-51889_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-29 15:35:38 +08:00
Eugene Venter e217f4914a MDL-52530 unittest: more robust capability assignments for guest
for core_files_file_storage_testcase and core_repositorylib_testcase
2015-12-29 14:06:32 +08:00
David Monllao 1ba350d146 Merge branch 'wip-mdl-52347-m30' of git://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-29 14:03:22 +08:00
David Monllao ec921c9d7b Merge branch 'MDL-52591-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-29 13:47:23 +08:00
Mark Nelson ec3be4584c MDL-51889 enrol_guest: always check password before re-enabling 2015-12-29 13:43:32 +08:00
David Monllao e8f73b9edd MDL-52597 mod_forum: Remove duplicated query 2015-12-29 10:04:10 +08:00
David Monllao e9716eda2f Merge branch 'MDL-52597-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2015-12-29 10:01:32 +08:00
AMOS bot df8d12b685 Automatically generated installer lang files 2015-12-29 00:04:08 +08:00
AMOS bot 1c529d9897 Automatically generated installer lang files 2015-12-28 00:04:13 +08:00
AMOS bot 4ac2ded44b Automatically generated installer lang files 2015-12-25 00:04:15 +08:00
Marina Glancy f11ab3b3ed MDL-52347 behat: fix random failures on fast computer 2015-12-24 14:17:52 +08:00
Rajesh Taneja 471b5b73a3 MDL-52606 behat: Added time delay to avoid random fails
If attempts are created at same timestamp, then results are
not same, and lesson module finds that attmpt was in progress.
To avoid this problem, attempts should be created at different
timestamp.
2015-12-24 14:02:16 +08:00
Dan Poltawski ebc7b73150 weekly release 3.0.1+ 2015-12-23 11:36:03 +00:00
Dan Poltawski a06ed7e888 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-23 11:36:00 +00:00
Dan Poltawski 92a25cff43 Merge branch 'MDL-52595-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2015-12-23 11:29:09 +00:00
Mark Nelson e5549f4f16 MDL-52275 core: fixed grade-to-pass being overwritten
Thanks goes to W.J. Roes for the patch.
2015-12-23 16:51:26 +08:00
Andrew Nicols 0d4fda7843 MDL-52597 mod_forum: Remove sleep from tests 2015-12-23 14:26:57 +08:00
Andrew Nicols f083859e96 MDL-52595 tests: Disable xdebug for travis runs 2015-12-23 13:15:25 +08:00
Andrew Nicols 29d83deae9 Merge branch 'MDL-52355-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-23 10:05:20 +08:00
Jun Pataleta 2217e2fea9 MDL-52355 mod_data: Added Gregorian hour and minute values 2015-12-23 09:56:46 +08:00
Shamim Rezaie 68927e83e5 MDL-52355 mod_data: Make date field respect the calendar type in use
Updated the date subplugin to consider that the input date element
values might be for any calendar type and not just the Gregorian
calendar.
2015-12-23 09:56:46 +08:00
Shamim Rezaie 819020ac57 MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-23 09:56:46 +08:00
Dan Poltawski 1e5a066247 MDL-52591 grunt: make shifter task respect --no-color 2015-12-22 18:37:48 +00:00
Eloy Lafuente (stronk7) 24a7fc2f07 Merge branch 'MDL-49743-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 17:14:36 +01:00
AMOS bot 03f0b4fc14 Automatically generated installer lang files 2015-12-23 00:04:14 +08:00
Juan Leyva 8c1261bd97 MDL-52585 webservices: Return correct invalid login message 2015-12-22 17:00:07 +01:00
Dan Poltawski 17af025b52 Merge branch 'm30_MDL-51916' of https://github.com/danmarsden/moodle into MOODLE_30_STABLE 2015-12-22 13:17:54 +00:00
Dan Poltawski ac56855bbc Merge branch 'MDL-52365_30_new' of git://github.com/mkassaei/moodle into MOODLE_30_STABLE 2015-12-22 13:14:48 +00:00
Eloy Lafuente (stronk7) 6f6ef56253 Merge branch 'MDL-51719-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 13:13:58 +01:00
M Kassaei 79d202c36d MDL-52365 qtype ddwtos & ddimageortext: 20 drag items IE11/Edge 2015-12-22 12:13:23 +00:00
Dan Poltawski 962aca6ad6 MDL-52017 enrol_self: fix incorrect empty statement
Ironically this was detected by causing a syntax error on php54
2015-12-22 09:52:10 +00:00
David Monllao 7473e54a3d Merge branch 'MDL-52017_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-22 16:37:03 +08:00
Andrew Nicols 105370c407 Merge branch 'MDL-52250-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 15:06:58 +08:00
Andrew Nicols 869ffde772 Merge branch 'MDL-23128-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 13:11:46 +08:00
Andrew Nicols 73d2934ba5 Merge branch 'MDL-52363_30' of git://github.com/mkassaei/moodle into MOODLE_30_STABLE 2015-12-22 12:34:21 +08:00
David Monllao 74a51dd48a Merge branch 'wip-mdl-52376-m30' of git://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-22 11:25:01 +08:00
David Monllao 9005a3bb96 Merge branch 'MDL-52558-m30' of git://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2015-12-22 11:16:53 +08:00
Rajesh Taneja 6fccd1fe35 MDL-52427 behat: Fixed question selectors
As class is changed, we need to convert selector
to check if class is contained, rather then checking
selecting with specific class.
2015-12-22 10:43:18 +08:00
Andrew Nicols ea78dbdf50 Merge branch 'MDL-52334_30' of git://github.com/aolley/moodle into MOODLE_30_STABLE 2015-12-22 09:14:34 +08:00
Dan Poltawski db3cdb6d25 Merge branch 'MDL-52380-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-21 16:47:21 +00:00
Dan Poltawski ccc297f01a Merge branch 'MDL-52354-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-21 16:44:25 +00:00
Dan Poltawski 8dd7e73294 Merge branch 'MDL-52427_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 13:27:40 +00:00
Dan Poltawski f2087a7fcb Merge branch 'MDL-52402_30' of git://github.com/mr-russ/moodle into MOODLE_30_STABLE 2015-12-21 12:46:20 +00:00
Dan Poltawski b1fe9348db Merge branch 'MDL-52455_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 12:43:53 +00:00
Dan Poltawski c3183cb6fe Merge branch 'MDL-52542_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 11:07:23 +00:00
Mark Nelson d47064c4b2 MDL-50357 core_group: tidy up the function groups_delete_group_members 2015-12-21 17:41:12 +08:00
David Monllao 66a28fbaa4 Merge branch 'MDL-51257-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2015-12-21 17:33:05 +08:00
David Monllao d5d7d57d6d Merge branch 'MDL-52429-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2015-12-21 17:17:10 +08:00
David Monllao db3bcaba14 Merge branch 'MDL-49758-30' of git://github.com/StudiUM/moodle into MOODLE_30_STABLE 2015-12-21 17:06:04 +08:00
David Monllao 145467fadf MDL-52226 tests: Fix behat phpunit naming conflict 2015-12-21 08:32:06 +00:00
David Monllao 07021369d7 Merge branch 'MDL-52226-m30' of git://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2015-12-21 14:42:47 +08:00
Andrew Nicols 836172f366 Merge branch 'm30_MDL-50972' of https://github.com/danmarsden/moodle into MOODLE_30_STABLE 2015-12-21 14:03:47 +08:00
Andrew Nicols 2c3d0c3b6f Merge branch 'MDL-52457-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2015-12-21 12:10:58 +08:00
David Monllao 1388dece19 Merge branch 'MDL-47106_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 11:33:09 +08:00
David Monllao 41ec284720 Merge branch 'MDL-52523_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 10:48:06 +08:00
Eloy Lafuente (stronk7) 62e799ac84 Moodle release 3.0.1 2015-12-19 19:03:16 +01:00
AMOS bot 2945fe403b Automatically generated installer lang files 2015-12-20 00:05:24 +08:00
Dan Poltawski 6af9a4e21c weekly release 3.0+ 2015-12-18 12:27:09 +00:00
Dan Poltawski 86c5e56baf Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-18 12:27:07 +00:00
sam marshall bde99c5a4b MDL-52558 Data generator: enrol_user should allow shortname 2015-12-18 11:01:30 +00:00
Dan Poltawski abde041907 Merge branch 'MDL-52553_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-18 10:56:31 +00:00
David Monllao bba453b9ed MDL-52553 question: Adding missing required constants 2015-12-18 14:43:31 +08:00
Shamim Rezaie 8abf3701a6 MDL-52380 mod_forum: Non-Gregorian dates in forum advance search
Convert the fromdate and todate date parts to Gregorian before passing them to make_timestamp
2015-12-17 18:04:16 -06:00
Shamim Rezaie d607b840b8 MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-17 18:04:16 -06:00
Shamim Rezaie c65d2ccb13 MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-17 15:49:20 -06:00
Eloy Lafuente (stronk7) 9149eaae18 Merge branch 'wip-mdl-52540-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-17 10:18:58 +01:00
Tim Hunt b35e24e254 MDL-52542 qtype_multianswer: field names must match string placeholders 2015-12-17 08:36:34 +00:00
Rajesh Taneja 8a0c8192c8 MDL-52540 behat: mouse events are not handled well with phantomjs 2015-12-17 12:06:06 +08:00
Dan Marsden f5f86a68ac MDL-51916 mod_scorm: allow html5 scorm content fullscreen 2015-12-16 20:28:06 +13:00
Tim Hunt 57b1d3ea85 MDL-52523 backup of subplugins: add missing global 2015-12-15 16:00:23 +00:00
M Kassaei 9611df0f92 MDL-52363 qtype_ddimageortext: Incorrectly sized drag item 2015-12-15 11:21:29 +00:00
Marina Glancy 74c19577c9 MDL-52286 core: mute erros in adodb destructor 2015-12-15 13:11:45 +08:00
AMOS bot c7231d5235 Automatically generated installer lang files 2015-12-15 00:04:13 +08:00
Dan Poltawski 3cf111c8d3 Merge branch 'MDL-52451-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-14 10:46:33 +00:00
Dan Poltawski e0518a0940 Merge branch 'wip-MDL-52286-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-14 10:24:50 +00:00
Marina Glancy b000642c03 MDL-52286 core: corrected version of adodb to 5.20.1 2015-12-14 18:12:17 +08:00
Marina Glancy aae5800486 MDL-52286 core: several fixes to ADOdb 2015-12-14 18:11:48 +08:00
Dan Poltawski 9ef2475cdd Merge branch 'MDL-52499-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-14 09:44:19 +00:00
Dan Poltawski 8513fdd0ba Merge branch 'MDL-52487_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-14 09:23:14 +00:00
David Monllao 19da0bad13 MDL-52487 rss: PHP 7 compatible error supression
PHP5 used to update error_reporting to 0 on functions called with the
suppress errors operator (@). In PHP7 it is not updated.

Credit to Rajesh Taneja
2015-12-14 15:29:34 +08:00
Marina Glancy ff64873ece MDL-52499 core: link to php7 documentation 2015-12-14 12:56:34 +08:00
Marina Glancy 7bd6de4822 MDL-52451 forms: replace deprecated function 2015-12-14 12:43:54 +08:00
Dan Marsden eb127e0b21 MDL-50972 mod_scorm: set autocommit as boolean
var currently passed as string so not evaluated correctly
2015-12-14 14:26:55 +13:00
Matthew Pruett 9797983c6f MDL-47106 quiz 'secure' window: Finish review link did not work 2015-12-13 22:08:53 +00:00
Amanda Doughty 6767a5d631 MDL-52455 quiz: doesn't include all user fields required by messaging 2015-12-13 20:48:52 +00:00
Tim Hunt 1507697d9f MDL-52427 questions: all parts of a Q should be clearfix
Otherwise large floated images may overflow.
2015-12-13 20:32:13 +00:00
Jean-Philippe Gaudreau daf7e2a478 MDL-49758 mod_quiz: Fix require on completionlib.php
Credits: Gordon Bateson
2015-12-11 13:01:56 -05:00
Dan Poltawski 771e49de0c Merge branch 'wip-MDL-52286-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-11 09:16:53 +00:00
David Monllao c19896ff95 Merge branch 'MDL-52472-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-11 16:03:28 +08:00
David Monllao 68494c8ef2 Merge branch 'MDL-52361-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-11 15:20:48 +08:00
David Monllao 0a44e7d8cc MDL-51784 general: Adding missing php4 style constructors
Adding them to maintain backwards compatibility.
2015-12-11 14:56:31 +08:00
Marina Glancy 345f365555 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 13:53:59 +08:00
David Monllao 8079f3343f MDL-52471 setuplib: Removing debugging message from stables 2015-12-11 12:02:00 +08:00
David Monllao 005f7c8b24 Merge branch 'MDL-52471-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-11 11:53:37 +08:00
David Monllao a6f084c9c5 Merge branch 'wip-MDL-52475-m30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-11 11:24:35 +08:00
Tony Levi 0e7a5b346f MDL-52475 core: workaround PHP7 bug #70110 with preg_match 2015-12-11 08:30:37 +08:00
Dan Poltawski 8640c059d8 MDL-52471 tests: simplify setup code
Test code was not using the generator for simple enrollments, couldn't
help to fix when noticed.
2015-12-10 18:00:41 +00:00
Dan Poltawski a3f65f8b5b MDL-52471 completion: fix deprecated use of 'object'
And add a unit test covering completion_can_view_data() without
full course object passed.
2015-12-10 18:00:40 +00:00
Dan Poltawski 88cece4bd7 MDL-52471 quiz: remove broken code question_print_comment_fields() 2015-12-10 18:00:40 +00:00
Dan Poltawski ddfebd633e MDL-52471 setuplib: depreciate class object properly
Previously was marked depricated but not throwwing debugging
2015-12-10 17:57:47 +00:00
Dan Poltawski ac4baac8b9 MDL-52472 travis: remove mongo/memcached testing
At the moment the extensions aren't available in php7 env:
https://github.com/travis-ci/travis-ci/issues/5256

And really its probably not worth the effort/buildtime to
enable them IMO so simpler to just disable.
2015-12-10 17:38:56 +00:00
Dan Poltawski a0ef20cfe4 MDL-52472 travis: enable php7
Relegate 5.6 runs (following the principle of highest and lowest version
only, to conserve travis resources and get faster test completions)
2015-12-10 17:38:55 +00:00
Eloy Lafuente (stronk7) e819a58b6e Merge branch 'MDL-52284-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 16:16:09 +01:00
Dan Poltawski 2adbbcac0a Merge branch 'MDL-52333_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-10 11:03:57 +00:00
Dan Poltawski 4e5e185f80 MDL-52285 auth: Add constructors for backwards compat
These are very unlikely to be used but just to be safe..
2015-12-10 10:36:20 +00:00
Dan Poltawski 68cbd0599d Merge branch 'MDL-52285-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 10:36:14 +00:00
David Monllao 2134746dea Merge branch 'MDL-52336-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 17:40:10 +08:00
David Monllao 4d56fe7d60 Merge branch 'MDL-52081-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 17:15:54 +08:00
David Monllao 1c4bc77d44 MDL-52333: qtype_calculated: Adding division by zero test 2015-12-10 16:40:16 +08:00
Tony Levi bc91b91ab1 MDL-52333 qtype: PHP7-compatibility in calculate_raw()
Code also modified by Tim Hunt
2015-12-10 16:40:08 +08:00
David Monllao 9887a4cbae Merge branch 'MDL-52335-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 15:48:28 +08:00
David Monllao 7d8fb1962e Merge branch 'MDL-52438-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 15:32:43 +08:00
David Monllao 07fbf4515c Merge branch 'MDL-52312_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-10 13:56:43 +08:00
Marina Glancy e81e12cd79 MDL-52285 auth: use __construct() for constructors 2015-12-10 13:51:11 +08:00
Marina Glancy f318ef32bc MDL-52081 forms: indicate usage of grandparent constructor 2015-12-10 13:45:18 +08:00
Marina Glancy 696f3dcc83 MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:45:16 +08:00
Marina Glancy 804a5f59ce MDL-52284 core: PHP7 engine errors have type Throwable 2015-12-10 10:50:12 +08:00
Tony Levi 3f45d8fece MDL-52284 core: compatibility with Exception/Throwable changes in PHP7 2015-12-10 10:50:12 +08:00
AMOS bot dfe989c826 Automatically generated installer lang files 2015-12-10 00:04:26 +08:00
Juan Leyva ed6277f9f7 MDL-52457 mod_scorm: Fix return types definitions in SCORM WS
Incorrect return types definitions in external function
mod_scorm_external::get_scorm_by_courses (hidetoc, displayattemptstatus
and skipview)
2015-12-09 14:07:10 +01:00
sam marshall 48db0e02cd MDL-52226 Forms: max_input_vars problems with advanced checkbox 2015-12-09 12:17:13 +00:00
Dan Poltawski 6ace0f59ae weekly release 3.0+ 2015-12-09 12:09:37 +00:00
Dan Poltawski fbf528eb95 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-09 12:09:36 +00:00
Eloy Lafuente (stronk7) 220ea7cd09 Merge branch 'MDL-51483_30' of https://github.com/jinhofer/moodle into MOODLE_30_STABLE 2015-12-09 02:22:39 +01:00
Adam Olley 7f1c642112 MDL-52334 enrol_database: Add missing filter to user_enrolment lookup
Without the user filter, the left join to the user enrolment table
results in a much larger set of data being returned than before
MDL-28420. Which makes login time for users in many busy courses much
worse than before (3x worse on average, observed upto 40x).
2015-12-09 09:26:33 +10:30
Dan Poltawski 6530c22a11 Merge branch 'MDL-51097_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2015-12-08 10:07:46 +00:00
Dan Poltawski ab37a1c815 Merge branch 'MDL-51411_30' of https://github.com/andrewhancox/moodle into MOODLE_30_STABLE 2015-12-08 09:05:47 +00:00
Marina Glancy 75b13bba36 MDL-52438 core: allow Moodle 3.0 to be used with PHP7 2015-12-08 12:54:54 +08:00
Marina Glancy 2cebc825e9 MDL-52361 core: patch Horde library for PHP7 compatibility 2015-12-08 12:48:21 +08:00
Marina Glancy ffe7dd3769 MDL-52336 core: patch PHPExcel for PHP7 compatibility 2015-12-08 12:14:15 +08:00
Marina Glancy f41205a84c MDL-52286 core: update ADODB library to 5.21 2015-12-08 12:04:05 +08:00
Mark Nelson 3046ae85cc MDL-52312 assignfeedback_editpdf: changes to files after FPDI update
1) Change the fpdi_bridge class so that it extends the pdf class,
rather than the TCPDF class.
2) Updated the editpdf/fpdi/readme_moodle.txt file to document the changes.
3) Updated the editpdf/thirdpartylibs.xml to reflect the update to the
FPDI library.
2015-12-08 11:41:22 +08:00
Mark Nelson 536892fd4c MDL-52312 assignfeedback_editpdf: updated the FPDI libary to 1.6.1 2015-12-08 11:41:22 +08:00
Marina Glancy 2cae0d3b15 MDL-52193 questions: add missing require_once 2015-12-07 15:38:02 +00:00
jinhofer bdb1cab348 MDL-51483 lib/moodlelib.php: Added conditional checks to shorten_text 2015-12-07 09:21:26 -06:00
Juan Leyva d08bcc4ded MDL-52429 mod_scorm: Fix SCORM completion checking in nested SCOs 2015-12-07 11:29:43 +01:00
Dan Poltawski 2f1473ac6d Merge branch 'MDL-50258_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-07 09:04:39 +00:00
David Monllao 899f21fc26 Merge branch 'MDL-52204-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-07 16:35:09 +08:00
Dan Poltawski c60a3ef656 Merge branch 'MDL-52304_30' of https://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-07 08:21:35 +00:00
Dan Poltawski 8262d6133a MDL-52271 install: don't allow installer to be indexed
Following guidance from:
https://support.google.com/webmasters/answer/93710?hl=en
2015-12-07 15:42:47 +08:00
David Monllao e662941230 Merge branch 'MDL-52370-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-07 15:02:03 +08:00
Russell Smith 89feea07d3 MDL-52402 backup, quiz: Fix attempt token and add missing rule. 2015-12-05 10:11:36 +11:00
Russell Smith 9c2784ca30 MDL-52402 backup: Improve debugging output on failed log restores 2015-12-05 10:11:35 +11:00
Dan Poltawski e18b4b0918 MDL-51582 readme: update less building instructions
I forgot to update this after the changes in 490c5cabb4
2015-12-04 16:41:24 +00:00
Eloy Lafuente (stronk7) 14d8971cd6 Merge branch 'MDL-51582-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-04 17:15:20 +01:00
AMOS bot 7c8149d6af Automatically generated installer lang files 2015-12-05 00:04:37 +08:00
Dan Poltawski 096a908dbe MDL-52250 npm: shrinkwrap to lock down dependencies
We've tried various approaches to lock down our dependencies and they
have been flawed because dependencies in our included packages may not
be locked down and previous attempts to do that have not been correct.

With npm shrinkwrap we lock down versions so that any npm install will
always install the exact same versions for all developers - see:
https://docs.npmjs.com/cli/shrinkwrap

(This is a lot like composer.lock for those more fluent with composer)
2015-12-04 15:35:33 +00:00
Dan Poltawski 68dfa89fea MDL-52250 npm: remove uglify-js dependency/bump grunt-contrib-uglify
A) Remove direct dependency on uglify-js:

This dependency was added in MDL-50277, but it isn't quite correct, the
way npm installs dependencies means that grunt-contrib-uglify *could* use
'our' version if its satisifed. But does not *always* and especially does
not if the grunt-contrib-uglify requirement is higher than ours.

Long story short, in many cases this means that this is used:
 node_modules/grunt-contrib-uglify/node_modules/uglify-js
But this is not:
  node_modules/uglify-js

In MDL-50277 we thought we were making the version sticky, but in
reality we were just fixing previous problems by updating
grunt-contrib-uglify to a version which fixed a bug:

 https://github.com/gruntjs/grunt-contrib-uglify/issues/313

It seems the better solution will come with using npm shrinkwrap to lock
down depdencies.

B) Bump grunt-contrib-uglify to 0.11.0

This moves us to uglify-js ~2.6.0 - which doens't change any output
files.
2015-12-04 15:34:16 +00:00
Dan Poltawski e64751fb8a MDL-52204 grunt: update to grunt-contrib-jshint v0.11.3
This version of grunt-contrib-jshint itself uses a better fixed
requirement on "~2.8.0" rather than "^2.8.0" which was giving variable
results with some people updating to 2.9-rc1.

See also https://github.com/gruntjs/grunt-contrib-jshint/pull/219
2015-12-04 11:40:28 +00:00
Dan Poltawski 490c5cabb4 MDL-51582 grunt: task improvements
* Introduce the 'css' task - this will give us flexibility to do things
  in future rather than relying on the inbuilt 'less' task (e.g. sourcemap
  generating task which doesn't run by default)

* Introduce 'amd' task which runs only amd tasks

* Introduce 'js' task which runs all JS (amd/shifter) tasks

* Tweak the ordering so that slow shifter always runs last (useful for
  people like me who forget to specif the task)
2015-12-04 10:45:24 +00:00
Dan Poltawski 4269cac414 MDL-51582 css: built with new grunt task 2015-12-04 10:45:24 +00:00
Dan Poltawski cd319f3f2f MDL-51582 grunt: add less complilation support
Previously we were using recess to build bootstrap base as it was what
was used by the original project. But recess is no longer maintained.

Now we use grunt for building js, it makes sense to use it for less too.

(If you really don't want to use grunt, you almost certainly can just
use lessc -x as it uses the same less.js on backend).
2015-12-04 10:44:54 +00:00
Michael Aherne da14ce45dd MDL-52304 media: Allow full screen in Flash player 2015-12-04 10:06:52 +08:00
David Monllao 818f90abd3 MDL-50258 themes: Fix CSS source maps 2015-12-04 09:02:57 +08:00
Ben Kelada 8ab3584274 MDL-52261 filelib: Do login check for files in blocks 2015-12-04 11:04:05 +11:00
Eloy Lafuente (stronk7) 13ce9a38a2 weekly release 3.0+ 2015-12-03 19:41:23 +01:00
Eloy Lafuente (stronk7) d5699018b0 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-03 19:41:17 +01:00
Eloy Lafuente (stronk7) fbb8579c1a MDL-52141 backup: test restore_log_rule don't modify passed log anymore 2015-12-03 19:01:48 +01:00
David Monllao f248c81e5a Merge branch 'MDL-48004-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-03 19:01:47 +01:00
Andrew Nicols 7d05696b12 Merge branch 'wip-mdl-52357-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-03 19:01:46 +01:00
David Monllao 716c7536cb Merge branch 'MDL-50710-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-03 19:01:45 +01:00
AMOS bot 4cdf94a602 Automatically generated installer lang files 2015-12-04 00:04:23 +08:00
Mark Nelson c9f2b241e0 MDL-52017 enrol_self: always check password before re-enabling 2015-12-03 19:26:56 +08:00
David Monllao 8dbe8449e0 Merge branch 'MDL-52260-30-2' of git://github.com/xow/moodle into MOODLE_30_STABLE 2015-12-03 11:53:13 +01:00
Eloy Lafuente (stronk7) 4841169211 Merge branch 'MDL-45364-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-03 11:53:12 +01:00
Dan Poltawski 3fe4b72c34 MDL-35982 behat: fix incorrectly backported test
Due to alterations with release/freeze, the lang string change
didn't get backported to 3.x, but the behat did.
2015-12-03 11:53:12 +01:00
Dan Poltawski 3c1e7a0759 MDL-52292 testing: block generator fix
Stop errors when no $options supplied
2015-12-03 11:53:11 +01:00
Dan Poltawski 98ad5c6191 Merge branch 'MDL-52292_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-03 11:53:10 +01:00
Dan Poltawski 0872bf3175 MDL-26935 behat: add coverage for role renaming in course 2015-12-03 11:53:10 +01:00
Russell Smith 6e8ca8a6ce MDL-52141 backup: Ensure we don't alter the log record when parsing it. 2015-12-03 11:53:09 +01:00
Dan Poltawski e2de9c6b6d Merge branch 'MDL-37308-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-03 11:53:09 +01:00
Tony Levi 59b25acd22 MDL-51757 mod_scorm: Remove duplicate function param
convert invalid break calls to exceptions for PHP 7
2015-12-03 11:53:08 +01:00
Rajesh Taneja af145cdac1 MDL-52376 behat: Add 1 sec delay to ensure cron works
course completion record should be created at time
which is before the time cron is run. On fast machine
this both might be done at same time. So added 1 sec delay
2015-12-03 13:17:49 +08:00
Cameron Ball bf68d558af MDL-51257 messages: Improve message form.
- Add sudmit button
- Add formchangechecker
- Update behat tests
2015-12-03 10:23:43 +08:00
Marina Glancy f3d159dea1 MDL-52335 tool_uploaduser: php7 compatibility in variable syntax 2015-12-03 09:33:24 +08:00
Marina Glancy 3af4f54efb MDL-52335 mod_data: php7 compatibility in variable syntax 2015-12-03 09:33:24 +08:00
Marina Glancy 6698b06b11 MDL-52335 mod_lti: php7 compatibility in variable syntax 2015-12-03 09:33:24 +08:00
Marina Glancy 545d2c9290 MDL-52335 core: php7 compatibility in XMPP library 2015-12-03 09:33:24 +08:00
Tim Hunt 7cac3f6fe9 MDL-52292 block testing generators: improve the API
* Refactor the block generator base class, to remove the amount
  of duplication required in base classes.

* Change the defaults that are filled in to be a little more natural.

* Make the Behat step 'Given the following "block" exist:' work.
2015-12-01 13:49:24 +00:00
Dan Poltawski db198f615a MDL-52370 role: purge coursecontacts when role is edited
This is perhaps a bit more brutal purge than you'd like, but it only
affects coursecat role edits.
2015-12-01 13:14:55 +00:00
Dan Poltawski bbf7cf2c44 MDL-52370 course: purge contacts cache on role rename
Previously teachers would rename roles and the change would not be
reflected in course listings.
2015-12-01 13:14:54 +00:00
Rajesh Taneja 0f62dd32c7 MDL-52357 behat: add 2 sec delay to ensure window is stable 2015-12-01 15:46:30 +08:00
Ryan Wyllie 67e82ebe0b MDL-52042 autocomplete: close suggestion box
Close the suggestion box when the input loses focus for more
than half a second.
2015-11-30 13:21:07 +00:00
Dan Poltawski ac16eaa936 Merge branch 'MDL-52283-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-11-30 11:27:50 +00:00
Dan Poltawski bfe6b3cdd1 Merge branch 'MDL-52332-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-11-30 10:22:52 +00:00
David Monllao f1bf39c2f8 Merge branch 'MDL-35982-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-30 15:46:25 +08:00
Marina Glancy 6064114c32 MDL-52332 calendar: load settings using API 2015-11-30 11:47:09 +08:00
Rajesh Taneja e0d74e610a MDL-52279 core_lib: Remove php4 style constructor
filterobject is called from core and as it's
using php4 style constructor, global USER is
not set properly because of deprecation warning
2015-11-30 11:31:33 +08:00
Jun Pataleta 8948d04695 MDL-37308 files: Additional fixes for transparency
Fixed transparency support when resizing and when not resizing.
2015-11-29 20:28:23 -06:00
Jetha Chan 9993c6bcc0 MDL-37308 files: support transparency when not resizing; new unit test 2015-11-29 20:28:23 -06:00
Adrian Greeve 1da82165ef MDL-37308 files: convert_image() now supports transparency. 2015-11-29 20:28:23 -06:00
Marina Glancy cf139e224e MDL-50710 block_glossary_random: more precise sorting 2015-11-30 09:17:03 +08:00
AMOS bot f8bce590ba Automatically generated installer lang files 2015-11-28 00:04:50 +08:00
Dan Poltawski 715eb9438c MDL-51719 atto_rtl: RTL/LTR buttons now indicate state
Previously the RTL buttons did not indiciate wether RTL or LTR was
selected. Thanks to Andrew Nicols for guiding how to do this.
2015-11-27 14:10:18 +00:00
John Okely 9c461eae4e MDL-52260 user: Fix error when saving profile with locked field 2015-11-27 11:02:45 +08:00
Tony Levi fe6a3c0531 MDL-52283 core: password_hash() deprecation in PHP7 2015-11-27 09:13:08 +08:00
Dan Poltawski 793c80165d MDL-45364 ddimageortext: refine naming & docs of new methods 2015-11-26 19:50:03 +00:00
Andrew Nicols a4f457e111 MDL-45364 qtype_ddimageortext: Fix JS Lint issues 2015-11-26 19:50:03 +00:00
Andrew Nicols 4110561f3e MDL-45364 atto_rtl: Fix JS lint 2015-11-26 19:50:03 +00:00
Dan Poltawski b1549e4127 MDL-48004 question: prevent notices on import screen
If query params were not passed the page would previously display debug
notices as setting the $requirecourseid param to question_edit_setup()
was buggy.
2015-11-26 15:03:43 +00:00
Dan Poltawski 724513e5d8 MDL-35982 behat: delete blog entry coverage 2015-11-26 14:12:22 +00:00
Dan Poltawski c14fbe69f5 MDL-35982 blog: reorder blog delete confirmation
Improves accessibility to be ordered logically in page
2015-11-26 14:12:00 +00:00
Dan Poltawski 8b4e2418f6 MDL-35982 blog: prevent index throwing errors with 0 courseid
Regression from MDL-49845 where Dave made the page not handle courseid = 0
and so now some urls will send you back to a db error..
2015-11-26 14:11:59 +00:00
David Monllao 8568798f76 weekly release 3.0+ 2015-11-26 10:54:50 +08:00
David Monllao 66533b249e Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-11-26 10:54:48 +08:00
Dan Poltawski e5baddebcd MDL-23128 tex: silence dvips output
This was causing spewwing of lots of messages to the error log..

Thanks to Fred Woolard for the suggestion
2015-11-25 17:07:40 +00:00
AMOS bot 0efd3318b2 Automatically generated installer lang files 2015-11-26 00:04:31 +08:00
Dan Poltawski 16acfc55f4 MDL-49743 singleview: slightly clarify logic
Make it clearer what the 'unset' behaviour is because previously
we've set the default for 'empty' values twice.
2015-11-25 15:12:02 +00:00
Conn 31328e3ede MDL-49743 singleview: Prevent errors when no itemid was selected
Signed-off-by: Conn <conn@cmrwarwicker.com>
2015-11-25 15:12:02 +00:00
Andrew Hancox c83c1ee838 MDL-51411 course: Fixed warning when deleting activity with js disabled 2015-11-25 14:39:59 +00:00
Eloy Lafuente (stronk7) 95f83b70b0 MDL-52291 questions: fix upgrade from 2.5 and earlier
Because of some changes performed to the multichoice qtype
for Moodle 2.6, older sites are not able to upgrade properly.

This commits does introduce DB introspection to decide which
table and column names must be used. Nasty but enough.

Note MDL-52298 has been created about to avoid/minimize the
chances of this happening again.
2015-11-25 11:23:34 +00:00
Frederic Massart 53253aea3a MDL-52160 navigation: Mark category and module settings nodes as branch 2015-11-25 13:13:05 +08:00
AMOS bot c244cd14b7 Automatically generated installer lang files 2015-11-25 00:04:24 +08:00
David Monllao a1b7cd7090 Merge branch 'MDL-44330-m30' of git://github.com/NeillM/moodle into MOODLE_30_STABLE 2015-11-24 17:03:42 +08:00
David Monllao e4ffce07cf Merge branch 'MDL-45934-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-24 16:55:56 +08:00
Neill Magill 6b4ce43d1d MDL-44330 Assign: Assignment grading may not display expected student
Before this patch it was possible for the student displayed on the grading page to
not be the student that the user selected to grade. This would occur if:

1) The user had the table ordered by a value that could be modified,
   for example Last modified (submission), Grade, Last modified (grade)
2) Another user performed an action that was recorded in Moodle in the time
   between the user generating the table and clicking on a grade link.

If a user did not notice a different user had been loaded it could result in them giving
a grade to the incorrect user.

This patch ensures that the state of the table is cached every time it is viewed by a user
who has the capability to grade.
2015-11-24 08:41:27 +00:00
Rajesh Taneja 107ab59c29 MDL-50163 behat: wait to ensure elements are placed properly by js. 2015-11-24 12:25:16 +08:00
David Monllao 4cd0bc7ece MDL-52095 themes: Padding to the left on RTL langs 2015-11-23 19:30:56 +01:00
Eloy Lafuente (stronk7) 42952482c9 Merge branch 'MDL-52185-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 19:27:03 +01:00
AMOS bot 3804a59fb6 Automatically generated installer lang files 2015-11-24 00:04:33 +08:00
Dan Poltawski 174faea612 Merge branch 'wip-mdl-51063-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-11-23 11:33:51 +00:00
Tim Hunt dec56ff204 MDL-52166 gradebook: overview report fails with separate groups 2015-11-23 09:44:25 +00:00
David Monllao c6d3f0d107 Merge branch 'MDL-52214-30-crawler' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2015-11-23 17:01:51 +08:00
David Mudrák 8f36db0be5 MDL-52214 core: Fix case sensitivity in user agent comparison
The previous 2.9 implementation of is_web_crawler() used stripos() in
certain cases. The unit tests re-added in the previous commit revealed
that certain crawlers (such as BaiDuSpider) were not correctly detected
in the new refactored implementation.

It seems lesser evil and safe enough to use /i in the regex search even
though it is not 100% same logic as before - as stripos() was used in
some cases only, not always.
2015-11-23 09:43:20 +01:00
David Mudrák f554e04a27 MDL-52214 core: Fix the is_web_crawler() regression
In MDL-50891, the is_web_crawler() was refactored into a core_useragent
method and the function itself was deprecated. However, there were no
unit tests kept to check the backwards compatible behaviour. It turned
out that the deprecated function leads to PHP fatal error due to a typo.

This patch fixes the typo and brings back the previous unit tests. To be
able to explicitly check the raised debugging message, the test case
now must be subclass of advanced_testcase.

Additionally fixes missing info about the function being deprecated.
2015-11-23 09:42:27 +01:00
David Monllao 20c532caf8 Merge branch 'MDL-52180-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 16:40:38 +08:00
David Monllao a1b0938c16 Merge branch 'MDL-52086-30' of git://github.com/bostelm/moodle into MOODLE_30_STABLE 2015-11-23 16:10:42 +08:00
Vadim Dvorovenko 3e1da76d54 MDL-52029 installer: Unstyled installer if display_errors is on
Error in MDL-43839 solution caused inclusion of unexistent file in
install/css.php.
2015-11-23 15:44:12 +08:00
David Monllao e3dcc260fb Merge branch 'MDL-52160-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2015-11-23 14:09:36 +08:00
David Monllao ae50bef5e6 Merge branch 'MDL-49490-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 13:55:48 +08:00
David Monllao 1b1e4d2670 Merge branch 'MDL-43069-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 13:32:57 +08:00
Dan Poltawski c31a650aad MDL-37834 assign: avoid newlines in status column of csv
Previously we were generating a CSV file with newlines in it, which
seems to cause problems importing into some versions of MS Excel.

Instead seperate status lines by '-' - this column is only used to
provide context to the teacher in the spreadsheet.
2015-11-20 18:36:49 +00:00
AMOS bot 76943b900c Automatically generated installer lang files 2015-11-21 00:04:19 +08:00
AMOS bot c05a3e254c Automatically generated installer lang files 2015-11-20 00:04:20 +08:00
AMOS bot 63385ff2b5 Merge branch 'MOODLE_30_STABLE' into install_30_STABLE 2015-11-20 00:04:20 +08:00
AMOS bot 42d7bc64f5 Automatically generated installer lang files 2015-11-19 19:14:29 +08:00
Dan Poltawski f0aa5b7e3b weekly release 3.0+ 2015-11-19 09:20:30 +00:00
Marina Glancy 40e33b6e75 MDL-52203 qtype_multianswer: avoid fatal error during upgrade 2015-11-19 09:45:28 +01:00
David Monllao e06768b331 MDL-42571 editpdf: Fix search comments
They are also hidden instead of destroyed.
2015-11-19 07:06:37 +00:00
Dan Poltawski ab58f3ee49 Merge branch 'wip-MDL-52194-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-11-19 06:49:52 +00:00
Dan Poltawski 6a30312beb Merge branch 'MDL-52162_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-11-19 06:34:35 +00:00
David Monllao 8c4dbdfd56 MDL-42571 editpdf: Fix comments search and multiple views drawing 2015-11-19 12:56:55 +08:00
Stephen Bourget e9b0443000 MDL-51097 Lesson: allow resume from within a cluster 2015-11-18 23:20:57 -05:00
Henning Bostelmann fab5233096 MDL-52086 output renderers: show subtree only when tab is activated 2015-11-18 16:18:59 +00:00
Pavel Sokolov 2748bf5900 MDL-43069 assign: prevent JS error on grading table
Previously submission comments failed to expand if you hid
the file submissions column.
2015-11-18 15:42:56 +00:00
Dan Poltawski 2adf914723 MDL-45934 backup: do not reset completion enabled flag
The 'completion enabled' flag does not reflect any course data, its a
course setting. Previously when doing a backup deleteting existing
course content this was forced off when it should not have been.
2015-11-18 11:56:30 +00:00
Dan Poltawski 96a2e4086f MDL-49490 assign: can't export to portfolio on non-submission 2015-11-18 09:10:45 +00:00
Marina Glancy a2d94f3d20 MDL-52194 flowplayer: do not check request
$_REQUEST variable may contain cookies in some php configurations. See also MDL-48085
2015-11-18 15:36:48 +08:00
David Monllao 33784bd64b MDL-52162 question: Removing unnecessary dependency
APIs dependencies were correctly removed during MDL-38214 review although
this unnecessary require remained here.

Credit to Marina Glancy.
2015-11-18 13:18:09 +08:00
Rajesh Taneja 4e5efb5c0c MDL-50163 behat: Return subcontext from session
Creating a new context with new mink context
with different session was keeping the session
and was not returning proper session information
2015-11-18 12:19:19 +08:00
rajesh Taneja 5cb434f62b MDL-50163 behat: Restart session after scenario with switch_window
Restart session after a scenario with switch window
is finished. This will close all open browser windows
and open a new browser window
2015-11-18 12:19:15 +08:00
Dan Poltawski 6117291e6b Merge branch 'MDL-52140_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2015-11-17 16:27:52 +00:00
Eloy Lafuente (stronk7) 4e342f5397 MDL-52140 upgrade: add 3.0.0 separation line to all upgrade scripts 2015-11-17 17:11:15 +01:00
Dan Poltawski 6b85e6affd MDL-52185 report: remove ugly bullet points 2015-11-17 15:33:03 +00:00
Dan Poltawski e71116f768 MDL-52180 travis: remove weekly release checker
To prevent false positives
2015-11-17 09:40:30 +00:00
Dan Poltawski a0172a28fc MDL-51988 behat: Add coverage of participation report messaging 2015-11-17 10:23:00 +08:00
Dan Poltawski 60020ccaa9 MDL-51988 behat: select a table by <th> tag 2015-11-17 10:22:59 +08:00
Dan Poltawski 3987e19c3f MDL-51988 report_particiption: do not allow messaging when disabled
Previously the option to send messages when presented regardless of the
site setting.
2015-11-17 10:22:58 +08:00
Russell Smith 2068b31847 MDL-50700 gradereport_overview: Call $PAGE->set_course
To ensure correct blocks are displayed.
2015-11-17 10:02:51 +08:00
Dan Poltawski 9a5f3f7672 MDL-46049 chat: update calendar times on repeating chat sessions
Previously were using the invalid chat id and the calendar entry was not
updated.

Thanks to Andy McGill who worked this out.
2015-11-17 08:55:34 +08:00
Dan Poltawski 75aa0f73db MDL-46049 chat: add missing closing parenthesis 2015-11-17 08:55:32 +08:00
Syam Mohan 2efce29560 MDL-52021 enrollib: Removed repeated capability
'moodle/role:assign' replicated in the permission checking
2015-11-16 16:21:35 +00:00
Frederic Massart a4c6ffd85f MDL-52160 navigation: Really remove module settings empty nodes 2015-11-16 19:44:28 +08:00
Dan Poltawski 184169cd76 MDL-47065 notes: prevent empty spaces added as note
(And updated behat test for this test case)
2015-11-16 15:21:00 +08:00
Jun Pataleta 55d5b4168e MDL-47065 behat: improve verificaton of lack of note 2015-11-16 15:15:25 +08:00
Dan Poltawski 6ccff3ba5d MDL-47065 notes: don't add blank notes
Previously the logic was wrong and was proceeding to add a note
when content was missing.

Also add behat coverage for adding notes to participants (this test is
not perfect, but better than zero coverage we had before).
2015-11-16 15:15:24 +08:00
David Monllao 44f23c7ec1 Merge branch 'MDL-41643-master' of git://github.com/jojoob/moodle into MOODLE_30_STABLE 2015-11-16 14:54:30 +08:00
Dan Poltawski 492b025f5f MDL-50687 phpunit: error early if required locale not installed 2015-11-16 14:26:29 +08:00
Frederic Massart 7f98e36008 MDL-50564 atto: Require atto_menu in atto_plugin 2015-11-16 14:20:41 +08:00
David Monllao f53c016704 Merge branch 'MDL-42571' of git://github.com/blaky/moodle into MOODLE_30_STABLE
Conflicts:
	mod/assign/feedback/editpdf/version.php
2015-11-16 13:41:15 +08:00
Johannes Burk 64b9afa6a5 MDL-41643 datafield_checkbox: Add line breaks behind checkbox options.
Add line a break behind each checkbox option in advanced search.
2015-11-14 13:48:20 +01:00
Bence Laky da91de7821 MDL-42571 assignfeedback_editpdf: Fixed second PDF view 2015-11-12 14:16:17 +00:00
1220 changed files with 33928 additions and 9964 deletions
+4
View File
@@ -0,0 +1,4 @@
**/yui/build/** -diff
**/amd/build/** -diff
theme/bootstrapbase/style/editor.css -diff
theme/bootstrapbase/style/moodle.css -diff
+67 -70
View File
@@ -12,21 +12,12 @@ notifications:
language: php
php:
# Moodle supports versions 5.4, 5.5, and 5.6 of PHP.
# Order by fastest to slowest.
# We currently only run the highest and lowest versions to reduce the load on travis-ci.org.
- 5.6
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.0
# - 5.6
# - 5.5
- 5.4
# We hope to offer PHP 7 support in the near future.
- nightly
services:
# Ensure that memcached and mongodb are running for testing of those MUC stores.
- memcached
- mongodb
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.
@@ -36,13 +27,16 @@ env:
# Postgres is significantly is pretty reasonable in its run-time.
# Run unit tests on MySQL
- DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
- DB=mysqli TASK=PHPUNIT
# Run CI Tests without running PHPUnit.
- DB=none PHPUNIT=false INSTALL=false CITEST=true
- DB=none TASK=CITEST
# Run unit tests on Postgres
- DB=pgsql PHPUNIT=true INSTALL=false CITEST=false
- DB=pgsql TASK=PHPUNIT
# Run a check for unbuilt files with Grunt.
- DB=none TASK=GRUNT
matrix:
# Enable fast finish.
@@ -50,49 +44,42 @@ matrix:
# It will not stop the jobs from running.
fast_finish: true
# Always allow failure on nightly.
# It's a nightly build and failures can happen.
allow_failures:
- php: nightly
exclude:
# PHP 7 is not yet supported for actual runs.
# Exclude it by default - we include it for CITEST only later.
- php: nightly
# MySQL - it's just too slow.
# Exclude it on all versions except for 5.6.
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
# Exclude it on all versions except for 7.0
# - env: DB=mysqli TASK=PHPUNIT
# php: 5.6
#
# - env: DB=mysqli TASK=PHPUNIT
# php: 5.5
- env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
- env: DB=mysqli TASK=PHPUNIT
php: 5.4
include:
# Attempt to run the CITEST set on PHP 7.
- php: nightly
env: DB=none PHPUNIT=false INSTALL=false CITEST=true
- env: DB=none TASK=GRUNT
php: 5.4
cache:
directories:
- $HOME/.composer/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
# Set the encrypted GITHUB_TOKEN if it's available to raise the API limit.
- if [ -n "$GITHUB_APITOKEN" ]; then composer config github-oauth.github.com $GITHUB_APITOKEN; fi
- echo 'auth.json' >> .git/info/exclude
# Install composer dependencies.
# We need --no-interaction in case we hit API limits for composer. This causes it to fall back to a standard clone.
# Typically it should be able to use the Composer cache if any other job has already completed before we started here.
- travis_retry composer install --prefer-dist --no-interaction
- echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
before_script:
- >
if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ];
if [ "$TASK" = 'PHPUNIT' ];
then
# Copy generic configuration in place.
cp config-dist.php config.php ;
@@ -134,41 +121,37 @@ before_script:
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;' ;
fi
if [ "$PHPUNIT" = 'true' ];
then
# Create a directory for the phpunit dataroot.
mkdir -p "$HOME"/roots/phpunit
# The phpunit dataroot and prefix..
sed -i \
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
-e "/require_once/i define('TEST_CACHESTORE_MEMCACHE_TESTSERVERS', '127.0.0.1:11211');" \
-e "/require_once/i define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211');" \
-e "/require_once/i define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://localhost:27017');" \
config.php ;
# Initialise PHPUnit for Moodle.
php admin/tool/phpunit/cli/init.php
fi
fi
script:
########################################################################
# PHPUnit
########################################################################
- >
if [ "$PHPUNIT" = 'true' ];
if [ "$TASK" = 'PHPUNIT' ];
then
vendor/bin/phpunit;
# Create a directory for the phpunit dataroot.
mkdir -p "$HOME"/roots/phpunit
# The phpunit dataroot and prefix..
sed -i \
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Initialise PHPUnit for Moodle.
php admin/tool/phpunit/cli/init.php
fi
- >
if [ "$TASK" = 'GRUNT' ];
then
npm install ;
npm install -g grunt ;
grunt ;
fi
########################################################################
# CI Tests
########################################################################
- >
if [ "$CITEST" = 'true' ];
if [ "$TASK" = 'CITEST' ];
then
# Note - this is deliberately placed in the script section as we
# should not add any code until after phpunit has run.
@@ -191,17 +174,31 @@ script:
export phpcmd=`which php`;
fi
- >
if [ "$CITEST" = "true" -a "$GIT_PREVIOUS_COMMIT" != "$UPSTREAM_FETCH_HEAD" ];
then
# This is a CI test, but it is based on an older weekly release.
# Warn in a way that will fail the test.
echo "Current commit is based on an older weekly release" && false;
fi
# Actually run the CI Tests - do this outside of the main test to make output clearer.
- >
if [ "$CITEST" = 'true' ];
if [ "$TASK" = 'CITEST' ];
then
bash local/ci/php_lint/php_lint.sh;
fi
script:
- >
if [ "$TASK" = 'PHPUNIT' ];
then
vendor/bin/phpunit;
fi
- >
if [ "$TASK" = 'CITEST' ];
then
bash local/ci/php_lint/php_lint.sh;
fi
- >
if [ "$TASK" = 'GRUNT' ];
then
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
git add . ;
git diff --cached --exit-code ;
fi
+162 -141
View File
@@ -12,6 +12,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/**
* @copyright 2014 Andrew Nicols
@@ -24,100 +25,163 @@
module.exports = function(grunt) {
var path = require('path'),
fs = require('fs'),
tasks = {},
cwd = process.env.PWD || process.cwd();
// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
if (grunt.option('root')) {
var root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = path.join(__dirname, root);
grunt.log.ok('Setting root to '+cwd);
} else {
grunt.fail.fatal('Setting root to '+root+' failed - path does not exist');
}
}
var inAMD = path.basename(cwd) == 'amd';
// Globbing pattern for matching all AMD JS source files.
var amdSrc = [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js'];
/**
* Function to generate the destination for the uglify task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
*
* @param {String} destPath the current destination
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
var uglify_rename = function (destPath, srcPath) {
destPath = srcPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
destPath = path.resolve(cwd, destPath);
return destPath;
};
// Project configuration.
grunt.initConfig({
jshint: {
options: {jshintrc: '.jshintrc'},
files: ['**/amd/src/*.js']
amd: { src: amdSrc }
},
uglify: {
dynamic_mappings: {
files: grunt.file.expandMapping(
['**/src/*.js', '!**/node_modules/**'],
'',
{
cwd: cwd,
rename: function(destBase, destPath) {
destPath = destPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
destPath = path.resolve(cwd, destPath);
return destPath;
}
}
)
amd: {
files: [{
expand: true,
src: amdSrc,
rename: uglify_rename
}]
}
},
less: {
bootstrapbase: {
files: {
"theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
"theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
},
options: {
compress: true
}
}
},
watch: {
options: {
nospawn: true // We need not to spawn so config can be changed dynamically.
},
amd: {
files: ['**/amd/src/**/*.js'],
tasks: ['amd']
},
bootstrapbase: {
files: ["theme/bootstrapbase/less/**/*.less"],
tasks: ["less:bootstrapbase"]
},
yui: {
files: ['**/yui/src/**/*.js'],
tasks: ['shifter']
},
},
shifter: {
options: {
recursive: true,
paths: [cwd]
}
}
});
/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
*
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
* so be careful to to call done().
*/
tasks.shifter = function() {
var exec = require('child_process').spawn,
var async = require('async'),
done = this.async(),
args = [],
options = {
recursive: true,
watch: false,
walk: false,
module: false
},
shifter;
options = grunt.config('shifter.options');
// Run the shifter processes one at a time to avoid confusing output.
async.eachSeries(options.paths, function (src, filedone) {
var args = [];
args.push( path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
// Determine the most appropriate options to run with based upon the current location.
if (path.basename(cwd) === 'src') {
// Detect whether we're in a src directory.
grunt.log.debug('In a src directory');
args.push('--walk');
options.walk = true;
} else if (path.basename(path.dirname(cwd)) === 'src') {
// Detect whether we're in a module directory.
grunt.log.debug('In a module directory');
options.module = true;
}
if (grunt.option('watch')) {
if (!options.walk && !options.module) {
grunt.fail.fatal('Unable to watch unless in a src or module directory');
}
// It is not advisable to run with recursivity and watch - this
// leads to building the build directory in a race-like fashion.
grunt.log.debug('Detected a watch - disabling recursivity');
options.recursive = false;
args.push('--watch');
}
if (options.recursive) {
args.push('--recursive');
}
// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');
// Determine the most appropriate options to run with based upon the current location.
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
// When passed a JS file, build our containing module (this happen with
// watch).
grunt.log.debug('Shifter passed a specific JS file');
src = path.dirname(path.dirname(src));
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src', src)) {
// When in a src directory --walk all modules.
grunt.log.debug('In a src directory');
args.push('--walk');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
// When in module, only build our module.
grunt.log.debug('In a module directory');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
// When in module src, only build our module.
grunt.log.debug('In a source directory');
src = path.dirname(src);
options.recursive = false;
}
if (grunt.option('watch')) {
grunt.fail.fatal('The --watch option has been removed, please use `grunt watch` instead');
}
// Add the stderr option if appropriate
if (grunt.option('verbose')) {
args.push('--lint-stderr');
}
if (grunt.option('no-color')) {
args.push('--color=false');
}
var execShifter = function() {
shifter = exec("node", args, {
cwd: cwd,
stdio: 'inherit',
env: process.env
});
// Tidy up after exec.
shifter.on('exit', function (code) {
grunt.log.ok("Running shifter on " + src);
grunt.util.spawn({
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
}, function (error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
grunt.log.ok('Shifter build complete.');
done();
filedone();
}
});
};
@@ -127,79 +191,15 @@ module.exports = function(grunt) {
execShifter();
} else {
// Check that there are yui modules otherwise shifter ends with exit code 1.
var found = false;
var hasYuiModules = function(directory, callback) {
fs.readdir(directory, function(err, files) {
if (err) {
return callback(err, null);
}
// If we already found a match there is no need to continue scanning.
if (found === true) {
return;
}
// We need to track the number of files to know when we return a result.
var pending = files.length;
// We first check files, so if there is a match we don't need further
// async calls and we just return a true.
for (var i = 0; i < files.length; i++) {
if (files[i] === 'yui') {
return callback(null, true);
}
}
// Iterate through subdirs if there were no matches.
files.forEach(function (file) {
var p = path.join(directory, file);
stat = fs.statSync(p);
if (!stat.isDirectory()) {
pending--;
} else {
// We defer the pending-1 until we scan the whole dir and subdirs.
hasYuiModules(p, function(err, result) {
if (err) {
return callback(err);
}
if (result === true) {
// Once we get a true we notify the caller.
found = true;
return callback(null, true);
}
pending--;
if (pending === 0) {
// Notify the caller that the whole dir has been scaned and there are no matches.
return callback(null, false);
}
});
}
// No subdirs here, otherwise the return would be deferred until all subdirs are scanned.
if (pending === 0) {
return callback(null, false);
}
});
});
};
hasYuiModules(cwd, function(err, result) {
if (err) {
grunt.fail.fatal(err.message);
}
if (result === true) {
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
done();
}
});
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
args.push('--recursive');
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
filedone();
}
}
}, done);
};
tasks.startup = function() {
@@ -207,24 +207,45 @@ module.exports = function(grunt) {
if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
grunt.task.run('shifter');
// Are we in an AMD directory?
} else if (path.basename(cwd) == 'amd') {
grunt.task.run('jshint');
grunt.task.run('uglify');
} else if (inAMD) {
grunt.task.run('amd');
} else {
// Run them all!.
grunt.task.run('shifter');
grunt.task.run('jshint');
grunt.task.run('uglify');
grunt.task.run('css');
grunt.task.run('js');
}
};
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
var changedFiles = Object.create(null);
var onChange = grunt.util._.debounce(function() {
var files = Object.keys(changedFiles);
grunt.config('jshint.amd.src', files);
grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglify_rename }]);
grunt.config('shifter.options.paths', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', function(action, filepath) {
changedFiles[filepath] = action;
onChange();
});
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
// Register the shifter task.
// Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
grunt.registerTask('amd', ['jshint', 'uglify']);
grunt.registerTask('js', ['amd', 'shifter']);
// Register CSS taks.
grunt.registerTask('css', ['less:bootstrapbase']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
+285 -1
View File
@@ -1434,7 +1434,6 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1559,4 +1558,289 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.1" 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.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" 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="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</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_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_CHECKS>
</MOODLE>
<MOODLE version="3.2" 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.1" />
<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="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</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_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_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+2
View File
@@ -36,6 +36,8 @@ require_login($course, false, $cm);
require_capability('moodle/role:review', $context);
require_sesskey();
$OUTPUT->header();
list($overridableroles, $overridecounts, $nameswithcounts) = get_overridable_roles($context,
ROLENAME_BOTH, true);
@@ -413,7 +413,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
}
public function save_changes() {
global $DB;
global $DB, $CFG;
if (!$this->roleid) {
// Creating role.
@@ -422,6 +422,13 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
} else {
// Updating role.
$DB->update_record('role', $this->role);
// This will ensure the course contacts cache is purged so name changes get updated in
// the UI. It would be better to do this only when we know that fields affected are
// updated. But thats getting into the weeds of the coursecat cache and role edits
// should not be that frequent, so here is the ugly brutal approach.
require_once($CFG->libdir . '/coursecatlib.php');
coursecat::role_assignment_changed($this->role->id, context_system::instance());
}
// Assignable contexts.
+3 -2
View File
@@ -71,8 +71,9 @@ class core_role_preset {
$dom->appendChild($top);
$top->appendChild($dom->createElement('shortname', $role->shortname));
$top->appendChild($dom->createElement('name', $role->name));
$top->appendChild($dom->createElement('description', $role->description));
$top->appendChild($dom->createElement('name', htmlspecialchars($role->name, ENT_COMPAT | ENT_HTML401, 'UTF-8')));
$top->appendChild($dom->createElement('description', htmlspecialchars($role->description, ENT_COMPAT | ENT_HTML401,
'UTF-8')));
$top->appendChild($dom->createElement('archetype', $role->archetype));
$contextlevels = $dom->createElement('contextlevels');
+1 -1
View File
@@ -201,7 +201,7 @@ if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey() && $de
$event = \core\event\role_capabilities_updated::create(
array(
'context' => $systemcontext,
'objectid' => $roleid
'objectid' => $tableroleid
)
);
$event->set_legacy_logdata(array(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' . $tableroleid,
+5 -1
View File
@@ -20,7 +20,11 @@ $adminroot = admin_get_root(); // need all settings
$settingspage = $adminroot->locate($section, true);
if (empty($settingspage) or !($settingspage instanceof admin_settingpage)) {
print_error('sectionerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
if (moodle_needs_upgrading()) {
redirect(new moodle_url('/admin/index.php'));
} else {
print_error('sectionerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
}
die;
}
+3
View File
@@ -205,6 +205,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
// Create a page for general import configuration and defaults.
$temp = new admin_settingpage('importgeneralsettings', new lang_string('importgeneralsettings', 'backup'), 'moodle/backup:backupcourse');
$temp->add(new admin_setting_configtext('backup/import_general_maxresults', new lang_string('importgeneralmaxresults', 'backup'), new lang_string('importgeneralmaxresults_desc', 'backup'), 10));
$temp->add(new admin_setting_configcheckbox('backup/import_general_duplicate_admin_allowed',
new lang_string('importgeneralduplicateadminallowed', 'backup'),
new lang_string('importgeneralduplicateadminallowed_desc', 'backup'), 0));
$ADMIN->add('backups', $temp);
// Create a page for automated backups configuration and defaults.
+4 -5
View File
@@ -18,11 +18,10 @@ $ADMIN->add('server', $temp);
// "supportcontact" settingpage
$temp = new admin_settingpage('supportcontact', new lang_string('supportcontact','admin'));
if (isloggedin()) {
global $USER;
$primaryadminemail = $USER->email;
$primaryadminname = fullname($USER, true);
$primaryadmin = get_admin();
if ($primaryadmin) {
$primaryadminemail = $primaryadmin->email;
$primaryadminname = fullname($primaryadmin, true);
} else {
// no defaults during installation - admin user must be created first
$primaryadminemail = NULL;
@@ -0,0 +1,57 @@
@core @core_admin
Feature: Enable multiple accounts to have the same email address
In order to have multiple accounts registerd on the system with the same email address
As an admin
I need to enable multiple accounts to be registered with the same email address and verify it is applied
Background:
Given I log in as "admin"
Scenario: Enable registration of multiple accounts with the same email address
Given the following config values are set as admin:
| allowaccountssameemail | 1 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
| New password | test@User1 |
| First name | Test |
| Surname | Multi1 |
| Email address | testmultiemailuser@example.com |
And I press "Create user"
And I should see "Test Multi1"
And I press "Add a new user"
And I set the following fields to these values:
| Username | testmultiemailuser2 |
| Choose an authentication method | Manual accounts |
| New password | test@User2 |
| First name | Test |
| Surname | Multi2 |
| Email address | testmultiemailuser@example.com |
And I press "Create user"
Then I should see "Test Multi2"
And I should not see "This email address is already registered"
Scenario: Disable registration of multiple accounts with the same email address
Given the following config values are set as admin:
| allowaccountssameemail | 0 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
| New password | test@User1 |
| First name | Test |
| Surname | Multi1 |
| Email address | testmultiemailuser@example.com |
And I press "Create user"
And I should see "Test Multi1"
And I press "Add a new user"
And I set the following fields to these values:
| Username | testmultiemailuser2 |
| Choose an authentication method | Manual accounts |
| New password | test@User2 |
| First name | Test |
| Surname | Multi2 |
| Email address | testmultiemailuser@example.com |
And I press "Create user"
Then I should see "This email address is already registered"
-2
View File
@@ -27,7 +27,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I add "User Three (three@example.com)" user to "CH1" cohort members
And I follow "Browse list of users"
@javascript
Scenario: Filter user accounts by role and cohort
When I set the following fields to these values:
| courserole_rl | Student |
@@ -51,7 +50,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I should see "User Three"
And I should see "User Four"
@javascript
Scenario: Filter user accounts by confirm and authentication method
When I set the following fields to these values:
| Confirmed | No |
+15 -7
View File
@@ -101,6 +101,9 @@ if (empty($options['torun'])) {
if (extension_loaded('pcntl')) {
$disabled = explode(',', ini_get('disable_functions'));
if (!in_array('pcntl_signal', $disabled)) {
// Handle interrupts on PHP7.
declare(ticks = 1);
pcntl_signal(SIGTERM, "signal_handler");
pcntl_signal(SIGINT, "signal_handler");
}
@@ -120,8 +123,8 @@ $tags = '';
if ($options['profile']) {
$profile = $options['profile'];
if (!isset($CFG->behat_config[$profile])) {
echo "Invalid profile passed: " . $profile;
if (!isset($CFG->behat_config[$profile]) && !isset($CFG->behat_profiles[$profile])) {
echo "Invalid profile passed: " . $profile . PHP_EOL;
exit(1);
}
$extraopts[] = '--profile="' . $profile . '"';
@@ -226,22 +229,27 @@ $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 = false;
// Status bits contains pass/fail status of parallel runs.
$status = 0;
$processcounter = 0;
foreach ($exitcodes as $exitcode) {
$status = (bool)$status || (bool)$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 || $status;
$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;
ksort($exitcodes);
foreach ($exitcodes as $run => $exitcode) {
echo $run . ": " . $exitcode . PHP_EOL;
}
@@ -263,7 +271,7 @@ print_each_process_info($processes, $verbose);
// Remove site symlink if necessary.
behat_config_manager::drop_parallel_site_links();
exit((int) $status);
exit($status);
/**
* Signal handler for terminal exit.
+1
View File
@@ -173,6 +173,7 @@ if ($options['install']) {
// This is only displayed once for parallel install.
if (empty($options['run'])) {
$runtestscommand = behat_command::get_behat_command(true, !empty($options['run']));
$runtestscommand .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
@@ -424,9 +424,9 @@ Feature: Set up contextual data for tests
And the following "grade categories" exist:
| fullname | course |
| Grade category 1 | C1 |
And the following "grade items" exist:
| itemname | course | outcome | gradecategory |
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following "grade items" exist:
| itemname | course | outcome | gradecategory |
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
@@ -441,3 +441,15 @@ Feature: Set up contextual data for tests
And I expand all fieldsets
And "//div[contains(@class, 'fitem')]/div[contains(@class, 'fitemtitle')]/div[contains(@class, fstaticlabel) and contains(., 'Grade category')]/../../div[contains(@class, 'felement') and contains(., 'Grade category 1')]" "xpath_element" should exist
And I press "Cancel"
Scenario: Add a block
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| online_users | Course | C1 | course-view-* | site-pre |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
Then I should see "Online users"
@@ -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/>.
/**
* Display environment used for running behat.
*
* This file is used for behat testing to ensure cli and apache
* version of environment is same.
*
* @package tool_behat
* @copyright 2016 onwards Rajesh Taneja
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__.'/../../../../../../config.php');
// Only continue for behat site.
defined('BEHAT_SITE_RUNNING') || die();
require_once($CFG->libdir.'/behat/classes/util.php');
echo json_encode(behat_util::get_environment(), true);
+3
View File
@@ -54,5 +54,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -188,7 +188,7 @@ echo html_writer::end_tag('td');
$options = array();
foreach ($availablelangs as $alang) {
if (!empty($alang[0]) and trim($alang[0]) !== 'en' and !$controller->is_installed_lang($alang[0], $alang[1])) {
$options[$alang[0]] = $alang[2].' ('.$alang[0].')';
$options[$alang[0]] = $alang[2].' &lrm;('.$alang[0].')&lrm;';
}
}
if (!empty($options)) {
+3
View File
@@ -52,5 +52,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -42,5 +42,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -52,8 +52,7 @@ class logstore_database_store_testcase extends advanced_testcase {
$this->assertCount(0, $stores);
// Fake the settings, we will abuse the standard plugin table here...
$parts = explode('_', get_class($DB));
set_config('dbdriver', $parts[1] . '/' . $parts[0], 'logstore_database');
set_config('dbdriver', $CFG->dblibrary . '/' . $CFG->dbtype, 'logstore_database');
set_config('dbhost', $CFG->dbhost, 'logstore_database');
set_config('dbuser', $CFG->dbuser, 'logstore_database');
set_config('dbpass', $CFG->dbpass, 'logstore_database');
@@ -30,6 +30,7 @@
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
<KEY NAME="contextid" TYPE="foreign" FIELDS="contextid" REFTABLE="context" REFFIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="timecreated" UNIQUE="false" FIELDS="timecreated"/>
@@ -120,5 +120,23 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2015111601) {
// This could take a long time. Unfortunately, no way to know how long, and no way to do progress, so setting for 1 hour.
upgrade_set_timeout(3600);
// Define key contextid (foreign) to be added to logstore_standard_log.
$table = new xmldb_table('logstore_standard_log');
$key = new xmldb_key('contextid', XMLDB_KEY_FOREIGN, array('contextid'), 'context', array('id'));
// Launch add key contextid.
$dbman->add_key($table, $key);
// Standard savepoint reached.
upgrade_plugin_savepoint(true, 2015111601, 'logstore', 'standard');
}
return true;
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2015111601; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2015111000; // Requires this Moodle version.
$plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
@@ -898,7 +898,7 @@ class manager {
$userfrom->customheaders[] = 'In-Reply-To: ' . $messageid;
// The message will be sent from the intended user.
$eventdata->userfrom = \core_user::get_noreply_user();
$eventdata->userfrom = \core_user::get_support_user();
$eventdata->userto = $USER;
$eventdata->subject = $this->get_reply_subject($this->currentmessagedata->envelope->subject);
$eventdata->fullmessage = get_string('invalidrecipientdescription', 'tool_messageinbound', $this->currentmessagedata);
@@ -140,6 +140,10 @@ class eventobservers {
$subscriptions = subscription_manager::get_subscriptions_by_event($eventobj);
$idstosend = array();
foreach ($subscriptions as $subscription) {
// Only proceed to fire events and notifications if the subscription is active.
if (!subscription_manager::subscription_is_active($subscription)) {
continue;
}
$starttime = $now - $subscription->timewindow;
$starttime = ($starttime > $subscription->lastnotificationsent) ? $starttime : $subscription->lastnotificationsent;
if ($subscription->courseid == 0) {
@@ -82,15 +82,16 @@ class notification_task extends \core\task\adhoc_task {
$template = $subscription->template;
$template = $this->replace_placeholders($template, $subscription, $eventobj, $context);
$htmlmessage = format_text($template, $subscription->templateformat, array('context' => $context));
$msgdata = new \stdClass();
$msgdata->component = 'tool_monitor'; // Your component name.
$msgdata->name = 'notification'; // This is the message name from messages.php.
$msgdata->userfrom = \core_user::get_noreply_user();
$msgdata->userto = $user;
$msgdata->subject = $subscription->get_name($context);
$msgdata->fullmessage = format_text($template, $subscription->templateformat, array('context' => $context));
$msgdata->fullmessageformat = $subscription->templateformat;
$msgdata->fullmessagehtml = format_text($template, $subscription->templateformat, array('context' => $context));
$msgdata->fullmessage = html_to_text($htmlmessage);
$msgdata->fullmessageformat = FORMAT_PLAIN;
$msgdata->fullmessagehtml = $htmlmessage;
$msgdata->smallmessage = '';
$msgdata->notification = 1; // This is only set to 0 for personal messages between users.
+11 -2
View File
@@ -55,17 +55,26 @@ class subscription {
* Magic get method.
*
* @param string $prop property to get.
*
* @return mixed
* @throws \coding_exception
*/
public function __get($prop) {
if (property_exists($this->subscription, $prop)) {
if (isset($this->subscription->$prop)) {
return $this->subscription->$prop;
}
throw new \coding_exception('Property "' . $prop . '" doesn\'t exist');
}
/**
* Magic isset method.
*
* @param string $prop the property to get.
* @return bool true if the property is set, false otherwise.
*/
public function __isset($prop) {
return property_exists($this->subscription, $prop);
}
/**
* Get a human readable name for instances associated with this subscription.
*
@@ -35,6 +35,10 @@ defined('MOODLE_INTERNAL') || die();
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class subscription_manager {
/** @const Period of time, in days, after which an inactive subscription will be removed completely.*/
const INACTIVE_SUBSCRIPTION_LIFESPAN_IN_DAYS = 30;
/**
* Subscribe a user to a given rule.
*
@@ -456,4 +460,78 @@ class subscription_manager {
return false;
}
/**
* Activates a group of subscriptions based on an input array of ids.
*
* @since 3.0.5
* @param array $ids of subscription ids.
* @return bool true if the operation was successful, false otherwise.
*/
public static function activate_subscriptions(array $ids) {
global $DB;
if (!empty($ids)) {
list($sql, $params) = $DB->get_in_or_equal($ids);
$success = $DB->set_field_select('tool_monitor_subscriptions', 'inactivedate', '0', 'id ' . $sql, $params);
return $success;
}
return false;
}
/**
* Deactivates a group of subscriptions based on an input array of ids.
*
* @since 3.0.5
* @param array $ids of subscription ids.
* @return bool true if the operation was successful, false otherwise.
*/
public static function deactivate_subscriptions(array $ids) {
global $DB;
if (!empty($ids)) {
$inactivedate = time();
list($sql, $params) = $DB->get_in_or_equal($ids);
$success = $DB->set_field_select('tool_monitor_subscriptions', 'inactivedate', $inactivedate, 'id ' . $sql,
$params);
return $success;
}
return false;
}
/**
* Deletes subscriptions which have been inactive for a period of time.
*
* @since 3.0.5
* @param int $userid if provided, only this user's stale subscriptions will be deleted.
* @return bool true if the operation was successful, false otherwise.
*/
public static function delete_stale_subscriptions($userid = 0) {
global $DB;
// Get the expiry duration, in days.
$cutofftime = strtotime("-" . self::INACTIVE_SUBSCRIPTION_LIFESPAN_IN_DAYS . " days", time());
if (!empty($userid)) {
// Remove any stale subscriptions for the desired user only.
$success = $DB->delete_records_select('tool_monitor_subscriptions',
'userid = ? AND inactivedate < ? AND inactivedate <> 0',
array($userid, $cutofftime));
} else {
// Remove all stale subscriptions.
$success = $DB->delete_records_select('tool_monitor_subscriptions',
'inactivedate < ? AND inactivedate <> 0',
array($cutofftime));
}
return $success;
}
/**
* Check whether a subscription is active.
*
* @since 3.0.5
* @param \tool_monitor\subscription $subscription instance.
* @return bool true if the subscription is active, false otherwise.
*/
public static function subscription_is_active(subscription $subscription) {
return empty($subscription->inactivedate);
}
}
@@ -0,0 +1,274 @@
<?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/>.
namespace tool_monitor\task;
use tool_monitor\subscription;
use tool_monitor\subscription_manager;
/**
* Simple task class responsible for activating, deactivating and removing subscriptions.
*
* Activation/deactivation is managed by looking at the same access rules used to determine whether a user can
* subscribe to the rule in the first place.
*
* Removal occurs when a subscription has been inactive for a period of time exceeding the lifespan, as set by
* subscription_manager::get_inactive_subscription_lifespan().
*
* I.e.
* - Activation: If a user can subscribe currently, then an existing subscription should be made active.
* - Deactivation: If a user cannot subscribe currently, then an existing subscription should be made inactive.
* - Removal: If a user has a subscription that has been inactive for longer than the prescribed period, then
* delete the subscription entirely.
*
* @since 3.0.5
* @package tool_monitor
* @copyright 2016 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class check_subscriptions extends \core\task\scheduled_task {
/** @var array 1d static cache, indexed by userid, storing whether or not the user has been fully set up.*/
protected $userssetupcache = array();
/** @var array 2d static cache, indexed by courseid and userid, storing whether a user can access the course with
* the 'tool/monitor:subscribe' capability.
*/
protected $courseaccesscache = array();
/**
* Get a descriptive name for this task.
*
* @since 3.0.5
* @return string name of the task.
*/
public function get_name() {
return get_string('taskchecksubscriptions', 'tool_monitor');
}
/**
* Checks all course-level rule subscriptions and activates/deactivates based on current course access.
*
* The ordering of checks within the task is important for optimisation purposes. The aim is to be able to make a decision
* about whether to activate/deactivate each subscription without making unnecessary checks. The ordering roughly follows the
* context model, starting with system and user checks and moving down to course and course-module only when necessary.
*
* For example, if the user is suspended, then any active subscription is made inactive right away. I.e. there is no need to
* check site-level, course-level or course-module-level permissions. Likewise, if a subscriptions is site-level, there is no
* need to check course-level and course-module-level permissions.
*
* The task performs the following checks, in this order:
* 1. Check for a suspended user, breaking if suspended.
* 2. Check for an incomplete (not set up) user, breaking if not fully set up.
* 3. Check for the required capability in the relevant context, breaking if the capability is not found.
* 4. Check whether the subscription is site-context, breaking if true.
* 5. Check whether the user has course access, breaking only if the subscription is not also course-module-level.
* 6. Check whether the user has course-module access.
*
* @since 3.0.5
*/
public function execute() {
global $DB;
if (!get_config('tool_monitor', 'enablemonitor')) {
return; // The tool is disabled. Nothing to do.
}
$toactivate = array(); // Store the ids of subscriptions to be activated upon completion.
$todeactivate = array(); // Store the ids of subscriptions to be deactivated upon completion.
// Resultset rows are ordered by userid and courseid to work nicely with get_fast_modinfo() caching.
$sql = "SELECT u.id AS userid, u.firstname AS userfirstname, u.lastname AS userlastname, u.suspended AS usersuspended,
u.email AS useremail, c.visible as coursevisible, c.cacherev as coursecacherev, s.courseid AS subcourseid,
s.userid AS subuserid, s.cmid AS subcmid, s.inactivedate AS subinactivedate, s.id AS subid
FROM {user} u
JOIN {tool_monitor_subscriptions} s ON (s.userid = u.id)
LEFT JOIN {course} c ON (c.id = s.courseid)
WHERE u.id = s.userid
ORDER BY s.userid, s.courseid";
$rs = $DB->get_recordset_sql($sql);
foreach ($rs as $row) {
// Create skeleton records from the result. This should be enough to use in subsequent access calls and avoids DB hits.
$sub = $this->get_subscription_from_rowdata($row);
$sub = new subscription($sub);
if (!isset($user) || $user->id != $sub->userid) {
$user= $this->get_user_from_rowdata($row);
}
if ((!isset($course) || $course->id != $sub->courseid) && !empty($sub->courseid)) {
$course = $this->get_course_from_rowdata($row);
}
// The user is suspended at site level, so deactivate any active subscriptions.
if ($user->suspended) {
if (subscription_manager::subscription_is_active($sub)) {
$todeactivate[] = $sub->id;
}
continue;
}
// Is the user fully set up? As per require_login on the subscriptions page.
if (!$this->is_user_setup($user)) {
if (subscription_manager::subscription_is_active($sub)) {
$todeactivate[] = $sub->id;
}
continue;
}
// Determine the context, based on the subscription course id.
$sitelevelsubscription = false;
if (empty($sub->courseid)) {
$context = \context_system::instance();
$sitelevelsubscription = true;
} else {
$context = \context_course::instance($sub->courseid);
}
// Check capability in the context.
if (!has_capability('tool/monitor:subscribe', $context, $user)) {
if (subscription_manager::subscription_is_active($sub)) {
$todeactivate[] = $sub->id;
}
continue;
}
// If the subscription is site-level, then we've run all the checks required to make an access decision.
if ($sitelevelsubscription) {
if (!subscription_manager::subscription_is_active($sub)) {
$toactivate[] = $sub->id;
}
continue;
}
// Check course access.
if (!$this->user_can_access_course($user, $course, 'tool/monitor:subscribe')) {
if (subscription_manager::subscription_is_active($sub)) {
$todeactivate[] = $sub->id;
}
continue;
}
// If the subscription has no course module relationship.
if (empty($sub->cmid)) {
if (!subscription_manager::subscription_is_active($sub)) {
$toactivate[] = $sub->id;
}
continue;
}
// Otherwise, check the course module info. We use the same checks as on the subscription page.
$modinfo = get_fast_modinfo($course, $sub->userid);
$cm = $modinfo->get_cm($sub->cmid);
if (!$cm || !$cm->uservisible || !$cm->available) {
if (subscription_manager::subscription_is_active($sub)) {
$todeactivate[] = $sub->id;
}
continue;
}
// The course module is available and visible, so make a decision.
if (!subscription_manager::subscription_is_active($sub)) {
$toactivate[] = $sub->id;
}
}
$rs->close();
// Activate/deactivate/delete relevant subscriptions.
subscription_manager::activate_subscriptions($toactivate);
subscription_manager::deactivate_subscriptions($todeactivate);
subscription_manager::delete_stale_subscriptions();
}
/**
* Determines whether a user is fully set up, using cached results where possible.
*
* @since 3.0.5
* @param \stdClass $user the user record.
* @return bool true if the user is fully set up, false otherwise.
*/
protected function is_user_setup($user) {
if (!isset($this->userssetupcache[$user->id])) {
$this->userssetupcache[$user->id] = !user_not_fully_set_up($user);
}
return $this->userssetupcache[$user->id];
}
/**
* Determines a user's access to a course with a given capability, using cached results where possible.
*
* @since 3.0.5
* @param \stdClass $user the user record.
* @param \stdClass $course the course record.
* @param string $capability the capability to check.
* @return bool true if the user can access the course with the specified capability, false otherwise.
*/
protected function user_can_access_course($user, $course, $capability) {
if (!isset($this->courseaccesscache[$course->id][$user->id][$capability])) {
$this->courseaccesscache[$course->id][$user->id][$capability] = can_access_course($course, $user, $capability, true);
}
return $this->courseaccesscache[$course->id][$user->id][$capability];
}
/**
* Returns a partial subscription record, created from properties of the supplied recordset row object.
* Intended to return a minimal record for specific use within this class and in subsequent access control calls only.
*
* @since 3.0.5
* @param \stdClass $rowdata the row object.
* @return \stdClass a partial subscription record.
*/
protected function get_subscription_from_rowdata($rowdata) {
$sub = new \stdClass();
$sub->id = $rowdata->subid;
$sub->userid = $rowdata->subuserid;
$sub->courseid = $rowdata->subcourseid;
$sub->cmid = $rowdata->subcmid;
$sub->inactivedate = $rowdata->subinactivedate;
return $sub;
}
/**
* Returns a partial course record, created from properties of the supplied recordset row object.
* Intended to return a minimal record for specific use within this class and in subsequent access control calls only.
*
* @since 3.0.5
* @param \stdClass $rowdata the row object.
* @return \stdClass a partial course record.
*/
protected function get_course_from_rowdata($rowdata) {
$course = new \stdClass();
$course->id = $rowdata->subcourseid;
$course->visible = $rowdata->coursevisible;
$course->cacherev = $rowdata->coursecacherev;
return $course;
}
/**
* Returns a partial user record, created from properties of the supplied recordset row object.
* Intended to return a minimal record for specific use within this class and in subsequent access control calls only.
*
* @since 3.0.5
* @param \stdClass $rowdata the row object.
* @return \stdClass a partial user record.
*/
protected function get_user_from_rowdata($rowdata) {
$user = new \stdClass();
$user->id = $rowdata->userid;
$user->firstname = $rowdata->userfirstname;
$user->lastname = $rowdata->userlastname;
$user->email = $rowdata->useremail;
$user->suspended = $rowdata->usersuspended;
return $user;
}
}
+1
View File
@@ -38,6 +38,7 @@
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="User id of the subscriber"/>
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Timestamp of when this subscription was created"/>
<FIELD NAME="lastnotificationsent" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Timestamp of the time when a notification was last sent for this subscription."/>
<FIELD NAME="inactivedate" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
+9
View File
@@ -32,5 +32,14 @@ $tasks = array(
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'tool_monitor\task\check_subscriptions',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
)
);
+18
View File
@@ -56,5 +56,23 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2015111601) {
// Define field inactivedate to be added to tool_monitor_subscriptions.
$table = new xmldb_table('tool_monitor_subscriptions');
$field = new xmldb_field('inactivedate', XMLDB_TYPE_INTEGER, '10', null, true, null, 0, 'lastnotificationsent');
// Conditionally launch add field inactivedate.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Monitor savepoint reached.
upgrade_plugin_savepoint(true, 2015111601, 'tool', 'monitor');
}
return true;
}
@@ -99,4 +99,5 @@ $string['subhelp'] = 'Subscription details';
$string['subhelp_help'] = 'This subscription listens for when the event \'{$a->eventname}\' has been triggered in \'{$a->moduleinstance}\' {$a->frequency} time(s) in {$a->minutes} minute(s).';
$string['subscribeto'] = 'Subscribe to rule "{$a}"';
$string['taskcleanevents'] = 'Removes any unnecessary event monitor events';
$string['taskchecksubscriptions'] = 'Activate/deactivate invalid rule subscriptions';
$string['unsubscribe'] = 'Unsubscribe';
+5 -3
View File
@@ -103,10 +103,12 @@ 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', $orderby)) {
if ($courses = get_user_capability_course('tool/monitor:subscribe', null, true, 'fullname, visible', $orderby)) {
foreach ($courses as $course) {
$options[$course->id] = format_string($course->fullname, true,
array('context' => context_course::instance($course->id)));
$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));
}
}
}
// If there are no courses and there is no site permission then return false.
@@ -1,10 +1,9 @@
@javascript @tool @tool_monitor
@tool @tool_monitor
Feature: Enable/disable managment of the event monitor
In order to manage event monitoring
As an admin
I need to enable/disable it
@javascript
Scenario: Tool is disabled by default.
Given I log in as "admin"
When I navigate to "Event monitoring rules" node in "Site administration > Reports"
@@ -467,7 +467,13 @@ class tool_monitor_eventobservers_testcase extends advanced_testcase {
$rulerecord->eventname = '\mod_book\event\course_module_viewed';
$rulerecord->cmid = $book->cmid;
$rulerecord->frequency = 1;
$rulerecord->template = '{link} {modulelink} {rulename} {description} {eventname}';
$rulerecord->template = '## {link} ##
* {modulelink}
* __{rulename}__
* {description}
* {eventname}';
$rulerecord->templateformat = FORMAT_MARKDOWN;
$rule = $toolgenerator->create_rule($rulerecord);
@@ -491,13 +497,21 @@ class tool_monitor_eventobservers_testcase extends advanced_testcase {
$msg = array_pop($msgs);
$modurl = new moodle_url('/mod/book/view.php', array('id' => $book->cmid));
$expectedmsg = $event->get_url()->out() . ' ' .
$modurl->out() . ' ' .
$rule->get_name($context) . ' ' .
$rule->get_description($context) . ' ' .
$rule->get_event_name();
$this->assertEquals($expectedmsg, $msg->fullmessage);
$this->assertContains('<h2>'.$event->get_url()->out().'</h2>', $msg->fullmessagehtml);
$this->assertContains('<li>'.$modurl->out().'</li>', $msg->fullmessagehtml);
$this->assertContains('<li><strong>'.$rule->get_name($context).'</strong></li>', $msg->fullmessagehtml);
$this->assertContains('<li>'.$rule->get_description($context).'</li>', $msg->fullmessagehtml);
$this->assertContains('<li>'.$rule->get_event_name().'</li>', $msg->fullmessagehtml);
$this->assertEquals(FORMAT_PLAIN, $msg->fullmessageformat);
$this->assertNotContains('<h2>', $msg->fullmessage);
$this->assertNotContains('##', $msg->fullmessage);
$this->assertContains(strtoupper($event->get_url()->out()), $msg->fullmessage);
$this->assertContains('* '.$modurl->out(), $msg->fullmessage);
$this->assertContains('* '.strtoupper($rule->get_name($context)), $msg->fullmessage);
$this->assertContains('* '.$rule->get_description($context), $msg->fullmessage);
$this->assertContains('* '.$rule->get_event_name(), $msg->fullmessage);
}
/**
@@ -0,0 +1,65 @@
<?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/>.
defined('MOODLE_INTERNAL') || exit();
/**
* Unit tests for the subscription class.
* @since 3.0.5
*
* @package tool_monitor
* @category test
* @copyright 2016 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_monitor_subscription_testcase extends advanced_testcase {
/**
* @var \tool_monitor\subscription $subscription object.
*/
private $subscription;
/**
* Test set up.
*/
public function setUp() {
$this->resetAfterTest(true);
// Create the mock subscription.
$sub = new stdClass();
$sub->id = 100;
$sub->name = 'My test rule';
$sub->courseid = 20;
$this->subscription = $this->getMock('\tool_monitor\subscription',null, array($sub));
}
/**
* Test for the magic __isset method.
*/
public function test_magic_isset() {
$this->assertEquals(true, isset($this->subscription->name));
$this->assertEquals(true, isset($this->subscription->courseid));
$this->assertEquals(false, isset($this->subscription->ruleid));
}
/**
* Test for the magic __get method.
*/
public function test_magic_get() {
$this->assertEquals(20, $this->subscription->courseid);
$this->setExpectedException('coding_exception');
$this->subscription->ruleid;
}
}
@@ -0,0 +1,364 @@
<?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/>.
defined('MOODLE_INTERNAL') || exit();
/**
* Unit tests for the tool_monitor clean events task.
* @since 3.0.5
*
* @package tool_monitor
* @category test
* @copyright 2016 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_monitor_task_check_subscriptions_testcase extends advanced_testcase {
private $course;
private $user;
private $rule;
private $subscription;
private $teacherrole;
private $studentrole;
/**
* Test set up.
*/
public function setUp() {
global $DB;
set_config('enablemonitor', 1, 'tool_monitor');
$this->resetAfterTest(true);
// All tests defined herein need a user, course, rule and subscription, so set these up.
$this->user = $this->getDataGenerator()->create_user();
$this->course = $this->getDataGenerator()->create_course();
$rule = new stdClass();
$rule->userid = 2; // Rule created by admin.
$rule->courseid = $this->course->id;
$rule->plugin = 'mod_book';
$rule->eventname = '\mod_book\event\course_module_viewed';
$rule->timewindow = 500;
$monitorgenerator = $this->getDataGenerator()->get_plugin_generator('tool_monitor');
$this->rule = $monitorgenerator->create_rule($rule);
$sub = new stdClass();
$sub->courseid = $this->course->id;
$sub->userid = $this->user->id;
$sub->ruleid = $this->rule->id;
$this->subscription = $monitorgenerator->create_subscription($sub);
// Also set up a student and a teacher role for use in some tests.
$this->teacherrole = $DB->get_record('role', array('shortname' => 'teacher'));
$this->studentrole = $DB->get_record('role', array('shortname' => 'student'));
}
/**
* Reloads the subscription object from the DB.
*
* @return void.
*/
private function reload_subscription() {
global $DB;
$sub = $DB->get_record('tool_monitor_subscriptions', array('id' => $this->subscription->id));
$this->subscription = new \tool_monitor\subscription($sub);
}
/**
* Test to confirm the task is named correctly.
*/
public function test_task_name() {
$task = new \tool_monitor\task\check_subscriptions();
$this->assertEquals(get_string('taskchecksubscriptions', 'tool_monitor'), $task->get_name());
}
/**
* Test to confirm that site level subscriptions are activated and deactivated according to system capabilities.
*/
public function test_site_level_subscription() {
// Create a site level subscription.
$monitorgenerator = $this->getDataGenerator()->get_plugin_generator('tool_monitor');
$sub = new stdClass();
$sub->userid = $this->user->id;
$sub->ruleid = $this->rule->id;
$this->subscription = $monitorgenerator->create_subscription($sub);
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should be inactive as the user doesn't have the capability. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Now, assign the user as a teacher role at system context.
$this->getDataGenerator()->role_assign($this->teacherrole->id, $this->user->id, context_system::instance());
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should be active now. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm that if the module is disabled, no changes are made to active subscriptions.
*/
public function test_module_disabled() {
set_config('enablemonitor', 0, 'tool_monitor');
// Subscription should be active to start with.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Run the task. Note, we never enrolled the user.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should still be active. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm an active, valid subscription stays active once the scheduled task is run.
*/
public function test_active_unaffected() {
// Enrol the user as a teacher. This role should have the required capability.
$this->getDataGenerator()->enrol_user($this->user->id, $this->course->id, $this->teacherrole->id);
// Subscription should be active to start with.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should still be active. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm that a subscription for a user without an enrolment to the course is made inactive.
*/
public function test_course_enrolment() {
// Subscription should be active until deactivated by the scheduled task. Remember, by default the test setup
// doesn't enrol the user, so the first run of the task should deactivate it.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should NOT be active. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Enrol the user.
$this->getDataGenerator()->enrol_user($this->user->id, $this->course->id, $this->teacherrole->id);
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// Subscription should now be active again.
$this->reload_subscription();
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm that subscriptions for enrolled users without the required capability are made inactive.
*/
public function test_enrolled_user_with_no_capability() {
// Enrol the user. By default, students won't have the required capability.
$this->getDataGenerator()->enrol_user($this->user->id, $this->course->id, $this->studentrole->id);
// The subscription should be active to start with. Pass in the id only to refetch the data.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should NOT be active. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm that subscriptions for users who fail can_access_course(), are deactivated.
*/
public function test_can_access_course() {
// Enrol the user as a teacher. This role should have the required capability.
$this->getDataGenerator()->enrol_user($this->user->id, $this->course->id, $this->teacherrole->id);
// Strip the ability to see hidden courses, so we'll fail the check_subscriptions->user_can_access_course call.
$context = \context_course::instance($this->course->id);
assign_capability('moodle/course:viewhiddencourses', CAP_PROHIBIT, $this->teacherrole->id, $context);
// Subscription should be active to start with.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Hide the course.
course_change_visibility($this->course->id, false);
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should be inactive. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm that subscriptions for enrolled users who don't have CM access, are deactivated.
*/
public function test_cm_access() {
// Enrol the user as a student but grant to ability to subscribe. Students cannot view hidden activities.
$context = \context_course::instance($this->course->id);
assign_capability('tool/monitor:subscribe', CAP_ALLOW, $this->studentrole->id, $context);
$this->getDataGenerator()->enrol_user($this->user->id, $this->course->id, $this->studentrole->id);
// Generate a course module.
$book = $this->getDataGenerator()->create_module('book', array('course' => $this->course->id));
// And add a subscription to it.
$sub = new stdClass();
$sub->courseid = $this->course->id;
$sub->userid = $this->user->id;
$sub->ruleid = $this->rule->id;
$sub->cmid = $book->cmid;
$monitorgenerator = $this->getDataGenerator()->get_plugin_generator('tool_monitor');
$this->subscription = $monitorgenerator->create_subscription($sub);
// The subscription should be active to start with. Pass in the id only to refetch the data.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should still be active. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Make the course module invisible, which should in turn make the subscription inactive.
set_coursemodule_visible($book->cmid, false);
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should NOT be active. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Make the course module visible again.
set_coursemodule_visible($book->cmid, true);
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should be active. Pass in the id only to refetch the data.
$this->reload_subscription();
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm that long term inactive subscriptions are removed entirely.
*/
public function test_stale_subscription_removal() {
global $DB;
// Manually set the inactivedate to 1 day older than the limit allowed.
$daysold = 1 + \tool_monitor\subscription_manager::INACTIVE_SUBSCRIPTION_LIFESPAN_IN_DAYS;
$inactivedate = strtotime("-$daysold days", time());
$DB->set_field('tool_monitor_subscriptions', 'inactivedate', $inactivedate, array('id' => $this->subscription->id));
// Subscription should be inactive to start with.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// Subscription should now not exist at all.
$this->assertEquals(false, $DB->record_exists('tool_monitor_subscriptions', array('id' => $this->subscription->id)));
}
/**
* Test to confirm that subscriptions for a partially set up user are deactivated.
*/
public function test_user_not_fully_set_up() {
global $DB;
// Enrol the user as a teacher.
$this->getDataGenerator()->enrol_user($this->user->id, $this->course->id, $this->teacherrole->id);
// The subscription should be active to start.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Unset the user's email address, so we fail the check_subscriptions->is_user_setup() call.
$DB->set_field('user', 'email', '', array('id' => $this->user->id));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should now be inactive.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
/**
* Test to confirm that a suspended user's subscriptions are deactivated properly.
*/
public function test_suspended_user() {
global $DB;
// Enrol the user as a teacher. This role should have the required capability.
$this->getDataGenerator()->enrol_user($this->user->id, $this->course->id, $this->teacherrole->id);
// Subscription should be active to start with.
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Suspend the user.
$DB->set_field('user', 'suspended', '1', array('id' => $this->user->id));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should now be inactive.
$this->reload_subscription();
$this->assertEquals(false, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
// Unsuspend the user.
$DB->set_field('user', 'suspended', '0', array('id' => $this->user->id));
// Run the task.
$task = new \tool_monitor\task\check_subscriptions();
$task->execute();
// The subscription should now be active again.
$this->reload_subscription();
$this->assertEquals(true, \tool_monitor\subscription_manager::subscription_is_active($this->subscription));
}
}
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2015111601; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2015111000; // Requires this Moodle version.
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
+1 -1
View File
@@ -121,7 +121,7 @@ echo $OUTPUT->box_end();
/// Rebuild course cache which might be incorrect now
echo $OUTPUT->notification('Rebuilding course cache...', 'notifysuccess');
rebuild_course_cache();
rebuild_course_cache(0, true);
echo $OUTPUT->notification('...finished', 'notifysuccess');
echo $OUTPUT->continue_button(new moodle_url('/admin/'));
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/log","core/notification","core/templates","core/config","core/str"],function(a,b,c,d,e,f,g){var h=function(a,b){var c="@template "+b,d=0,e=[];if(e=a.match(/{{!([\s\S]*?)}}/g),null!==e)for(d=0;d<e.length;d++){var f=e[d],g=f.indexOf(c);if(-1!==g){var h=g+c.length+1;return f=f.substr(h,f.length-2-h)}}return!1},i=function(b,f,i){g.get_string("templateselected","tool_templatelibrary",b).done(function(b){a('[data-region="displaytemplateheader"]').text(b)}).fail(d.exception);var j=h(f,b);j===!1&&(j=h(i,b)),j&&(f=j),a('[data-region="displaytemplatesource"]').text(f);var k=f.match(/Example context \(json\):([\s\S]*)/),l=!1;if(k){var m=k[1].trim();try{l=a.parseJSON(m)}catch(n){c.debug("Could not parse json example context for template."),c.debug(n)}}l?e.render(b,l).done(function(b,c){e.replaceNodeContents(a('[data-region="displaytemplateexample"]'),b,c)}).fail(d.exception):g.get_string("templatehasnoexample","tool_templatelibrary").done(function(b){a('[data-region="displaytemplateexample"]').text(b)}).fail(d.exception)},j=function(c){var e=c.split("/"),g=e.shift(),h=e.shift(),j=b.call([{methodname:"core_output_load_template",args:{component:g,template:h,themename:f.theme}},{methodname:"tool_templatelibrary_load_canonical_template",args:{component:g,template:h}}],!0,!1);a.when.apply(a,j).done(function(a,b){i(c,a,b)}).fail(d.exception)};return a('[data-region="list-templates"]').on("click","[data-templatename]",function(){var b=a(this).data("templatename");j(b)}),{}});
define(["jquery","core/ajax","core/log","core/notification","core/templates","core/config","core/str"],function(a,b,c,d,e,f,g){var h=function(a,b){var c="@template "+b,d=0,e=[];if(e=a.match(/{{!([\s\S]*?)}}/g),null!==e)for(d=0;d<e.length;d++){var f=e[d],g=f.indexOf(c);if(-1!==g){var h=g+c.length+1;return f=f.substr(h,f.length-2-h)}}return!1},i=function(b,f,i){g.get_string("templateselected","tool_templatelibrary",b).done(function(b){a('[data-region="displaytemplateheader"]').text(b)}).fail(d.exception);var j=h(f,b);j===!1&&(j=h(i,b)),j&&(f=j),a('[data-region="displaytemplatesource"]').text(f);var k=f.match(/Example context \(json\):([\s\S]*)/),l=!1;if(k){var m=k[1].trim();try{l=a.parseJSON(m)}catch(n){c.debug("Could not parse json example context for template."),c.debug(n)}}l?e.render(b,l).done(function(b,c){e.replaceNodeContents(a('[data-region="displaytemplateexample"]'),b,c)}).fail(d.exception):g.get_string("templatehasnoexample","tool_templatelibrary").done(function(b){a('[data-region="displaytemplateexample"]').text(b)}).fail(d.exception)},j=function(c){var e=c.split("/"),g=e.shift(),h=e.shift(),j=b.call([{methodname:"core_output_load_template",args:{component:g,template:h,themename:f.theme}},{methodname:"tool_templatelibrary_load_canonical_template",args:{component:g,template:h}}],!0,!1);a.when.apply(a,j).done(function(a,b){i(c,a,b)}).fail(d.exception)};return a('[data-region="list-templates"]').on("click","[data-templatename]",function(b){var c=a(this).data("templatename");b.preventDefault(),j(c)}),{}});
@@ -141,8 +141,9 @@ define(['jquery', 'core/ajax', 'core/log', 'core/notification', 'core/templates'
};
// Add the event listeners.
$('[data-region="list-templates"]').on('click', '[data-templatename]', function() {
$('[data-region="list-templates"]').on('click', '[data-templatename]', function(e) {
var templatename = $(this).data('templatename');
e.preventDefault();
loadTemplate(templatename);
});
+18 -5
View File
@@ -232,8 +232,8 @@ if ($formdata = $mform2->is_cancelled()) {
if (isset($USER->$key) and is_array($USER->$key)) {
// this must be some hacky field that is abusing arrays to store content and format
$user->$key = array();
$user->$key['text'] = $value;
$user->$key['format'] = FORMAT_MOODLE;
$user->{$key['text']} = $value;
$user->{$key['format']} = FORMAT_MOODLE;
} else {
$user->$key = trim($value);
}
@@ -567,8 +567,18 @@ if ($formdata = $mform2->is_cancelled()) {
}
if ($existinguser->$column !== $user->$column) {
if ($column === 'email') {
if ($DB->record_exists('user', array('email'=>$user->email))) {
if ($noemailduplicates) {
$select = $DB->sql_like('email', ':email', false, true, false, '|');
$params = array('email' => $DB->sql_like_escape($user->email, '|'));
if ($DB->record_exists_select('user', $select , $params)) {
$changeincase = core_text::strtolower($existinguser->$column) === core_text::strtolower(
$user->$column);
if ($changeincase) {
// If only case is different then switch to lower case and carry on.
$user->$column = core_text::strtolower($user->$column);
continue;
} else if ($noemailduplicates) {
$upt->track('email', $stremailduplicate, 'error');
$upt->track('status', $strusernotupdated, 'error');
$userserrors++;
@@ -1177,7 +1187,10 @@ while ($linenum <= $previewrows and $fields = $cir->next()) {
if (!validate_email($rowcols['email'])) {
$rowcols['status'][] = get_string('invalidemail');
}
if ($DB->record_exists('user', array('email'=>$rowcols['email']))) {
$select = $DB->sql_like('email', ':email', false, true, false, '|');
$params = array('email' => $DB->sql_like_escape($rowcols['email'], '|'));
if ($DB->record_exists_select('user', $select , $params)) {
$rowcols['status'][] = $stremailduplicate;
}
}
@@ -1,4 +1,4 @@
@core @core_admin @_file_upload
@tool @tool_uploaduser @_file_upload
Feature: Upload users
In order to add users to the system
As an admin
@@ -39,3 +39,25 @@ Feature: Upload users
And I follow "Groups"
And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones"
@javascript
Scenario: Upload users with custom profile fields
# Create user profile field.
Given I log in as "admin"
And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
And I set the field "datatype" to "Text area"
And I set the following fields to these values:
| Short name | superfield |
| Name | Super field |
And I click on "Save changes" "button"
# Upload users.
When I navigate to "Upload users" node in "Site administration > Users > Accounts"
And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
And I press "Upload users"
And I press "Upload users"
# Check that users were created and the superfield is filled.
And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
And I follow "Tom Jones"
And I should see "Super field"
And I should see "The big guy"
And I log out
+8 -1
View File
@@ -39,13 +39,20 @@ class auth_plugin_cas extends auth_plugin_ldap {
/**
* Constructor.
*/
function auth_plugin_cas() {
public function __construct() {
$this->authtype = 'cas';
$this->roleauth = 'auth_cas';
$this->errorlogtag = '[AUTH CAS] ';
$this->init_plugin($this->authtype);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_cas() {
self::__construct();
}
function prevent_local_passwords() {
return true;
}
+3
View File
@@ -74,5 +74,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+54 -11
View File
@@ -302,20 +302,27 @@ class auth_plugin_db extends auth_plugin_base {
// Find obsolete users.
if (count($userlist)) {
list($notin_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', false);
$params['authtype'] = $this->authtype;
$sql = "SELECT u.*
$remove_users = array();
// All the drivers can cope with chunks of 10,000. See line 4491 of lib/dml/tests/dml_est.php
$userlistchunks = array_chunk($userlist , 10000);
foreach($userlistchunks as $userlistchunk) {
list($notin_sql, $params) = $DB->get_in_or_equal($userlistchunk, SQL_PARAMS_NAMED, 'u', false);
$params['authtype'] = $this->authtype;
$sql = "SELECT u.id, u.username
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0 AND u.mnethostid=:mnethostid $suspendselect AND u.username $notin_sql";
$params['mnethostid'] = $CFG->mnet_localhost_id;
$remove_users = $remove_users + $DB->get_records_sql($sql, $params);
}
} else {
$sql = "SELECT u.*
$sql = "SELECT u.id, u.username
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0 AND u.mnethostid=:mnethostid $suspendselect";
$params = array();
$params['authtype'] = $this->authtype;
$params['mnethostid'] = $CFG->mnet_localhost_id;
$remove_users = $DB->get_records_sql($sql, $params);
}
$params['mnethostid'] = $CFG->mnet_localhost_id;
$remove_users = $DB->get_records_sql($sql, $params);
if (!empty($remove_users)) {
$trace->output(get_string('auth_dbuserstoremove','auth_db', count($remove_users)));
@@ -328,6 +335,7 @@ class auth_plugin_db extends auth_plugin_base {
$updateuser = new stdClass();
$updateuser->id = $user->id;
$updateuser->suspended = 1;
$updateuser = $this->clean_data($updateuser);
user_update_user($updateuser, false);
$trace->output(get_string('auth_dbsuspenduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)), 1);
}
@@ -358,12 +366,20 @@ class auth_plugin_db extends auth_plugin_base {
// Only go ahead if we actually have fields to update locally.
if (!empty($updatekeys)) {
list($in_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', true);
$params['authtype'] = $this->authtype;
$sql = "SELECT u.id, u.username
$update_users = array();
// All the drivers can cope with chunks of 10,000. See line 4491 of lib/dml/tests/dml_est.php
$userlistchunks = array_chunk($userlist , 10000);
foreach($userlistchunks as $userlistchunk) {
list($in_sql, $params) = $DB->get_in_or_equal($userlistchunk, SQL_PARAMS_NAMED, 'u', true);
$params['authtype'] = $this->authtype;
$params['mnethostid'] = $CFG->mnet_localhost_id;
$sql = "SELECT u.id, u.username
FROM {user} u
WHERE u.auth=:authtype AND u.deleted=0 AND u.username {$in_sql}";
if ($update_users = $DB->get_records_sql($sql, $params)) {
WHERE u.auth = :authtype AND u.deleted = 0 AND u.mnethostid = :mnethostid AND u.username {$in_sql}";
$update_users = $update_users + $DB->get_records_sql($sql, $params);
}
if ($update_users) {
$trace->output("User entries to update: ".count($update_users));
foreach ($update_users as $user) {
@@ -414,6 +430,7 @@ class auth_plugin_db extends auth_plugin_base {
$updateuser = new stdClass();
$updateuser->id = $olduser->id;
$updateuser->suspended = 0;
$updateuser = $this->clean_data($updateuser);
user_update_user($updateuser);
$trace->output(get_string('auth_dbreviveduser', 'auth_db', array('name' => $username,
'id' => $olduser->id)), 1);
@@ -436,6 +453,7 @@ class auth_plugin_db extends auth_plugin_base {
$trace->output(get_string('auth_dbinsertuserduplicate', 'auth_db', array('username'=>$user->username, 'auth'=>$collision->auth)), 1);
continue;
}
$user = $this->clean_data($user);
try {
$id = user_create_user($user, false); // It is truly a new user.
$trace->output(get_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)), 1);
@@ -577,6 +595,7 @@ class auth_plugin_db extends auth_plugin_base {
}
if ($needsupdate) {
require_once($CFG->dirroot . '/user/lib.php');
$updateuser = $this->clean_data($updateuser);
user_update_user($updateuser);
}
return $DB->get_record('user', array('id'=>$userid, 'deleted'=>0));
@@ -906,6 +925,30 @@ class auth_plugin_db extends auth_plugin_base {
error_reporting($CFG->debug);
ob_end_flush();
}
/**
* Clean the user data that comes from an external database.
*
* @param array $user the user data to be validated against properties definition.
* @return stdClass $user the cleaned user data.
*/
public function clean_data($user) {
if (empty($user)) {
return $user;
}
foreach ($user as $field => $value) {
// Get the property parameter type and do the cleaning.
try {
$property = core_user::get_property_definition($field);
$user->$field = clean_param($value, $property['type']);
} catch (coding_exception $e) {
debugging("The property '$field' could not be cleaned.", DEBUG_DEVELOPER);
}
}
return $user;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ $string['auth_dbname'] = 'Name of the database itself. Leave empty if using an O
$string['auth_dbname_key'] = 'DB name';
$string['auth_dbpass'] = 'Password matching the above username';
$string['auth_dbpass_key'] = 'Password';
$string['auth_dbpasstype'] = '<p>Specify the format that the password field is using. MD5 hashing is useful for connecting to other common web applications like PostNuke.</p> <p>Use \'internal\' if you want to the external DB to manage usernames &amp; email addresses, but Moodle to manage passwords. If you use \'internal\', you <i>must</i> provide a populated email address field in the external DB, and you must execute both admin/cron.php and auth/db/cli/sync_users.php regularly. Moodle will send an email to new users with a temporary password.</p>';
$string['auth_dbpasstype'] = '<p>Specify the format that the password field is using. MD5 hashing is useful for connecting to other common web applications like PostNuke.</p> <p>Use \'internal\' if you want the external database to manage usernames and email addresses, but Moodle to manage passwords. If you use \'internal\', you <i>must</i> provide a populated email address field in the external database, and you must execute both admin/cron.php and auth/db/cli/sync_users.php regularly. Moodle will send an email to new users with a temporary password.</p>';
$string['auth_dbpasstype_key'] = 'Password format';
$string['auth_dbreviveduser'] = 'Revived user {$a->name} id {$a->id}';
$string['auth_dbrevivedusererror'] = 'Error reviving user {$a}';
+92 -1
View File
@@ -309,7 +309,7 @@ class auth_db_testcase extends advanced_testcase {
require_once($CFG->libdir.'/password_compat/lib/password.php');
set_config('passtype', 'saltedcrypt', 'auth/db');
$auth->config->passtype = 'saltedcrypt';
$user3->pass = password_hash('heslo', PASSWORD_BCRYPT, array('salt' => 'best_salt_ever_moodle_rocks_dont_tell'));
$user3->pass = password_hash('heslo', PASSWORD_BCRYPT);
$DB->update_record('auth_db_users', $user3);
$this->assertTrue($auth->user_login('u3', 'heslo'));
@@ -381,4 +381,95 @@ class auth_db_testcase extends advanced_testcase {
$this->cleanup_auth_database();
}
/**
* Testing the function _colonscope() from ADOdb.
*/
public function test_adodb_colonscope() {
global $CFG;
require_once($CFG->libdir.'/adodb/adodb.inc.php');
require_once($CFG->libdir.'/adodb/drivers/adodb-odbc.inc.php');
require_once($CFG->libdir.'/adodb/drivers/adodb-db2ora.inc.php');
$this->resetAfterTest(false);
$sql = "select * from table WHERE column=:1 AND anothercolumn > :0";
$arr = array('b', 1);
list($sqlout, $arrout) = _colonscope($sql,$arr);
$this->assertEquals("select * from table WHERE column=? AND anothercolumn > ?", $sqlout);
$this->assertEquals(array(1, 'b'), $arrout);
}
/**
* Testing the clean_data() method.
*/
public function test_clean_data() {
global $DB;
$this->resetAfterTest(false);
$this->preventResetByRollback();
$this->init_auth_database();
$auth = get_auth_plugin('db');
$auth->db_init();
// Create users on external table.
$extdbuser1 = (object)array('name'=>'u1', 'pass'=>'heslo', 'email'=>'u1@example.com');
$extdbuser1->id = $DB->insert_record('auth_db_users', $extdbuser1);
// User with malicious data on the name.
$extdbuser2 = (object)array('name'=>'user<script>alert(1);</script>xss', 'pass'=>'heslo', 'email'=>'xssuser@example.com');
$extdbuser2->id = $DB->insert_record('auth_db_users', $extdbuser2);
$trace = new null_progress_trace();
// Let's test user sync make sure still works as expected..
$auth->sync_users($trace, true);
// Get the user on moodle user table.
$user2 = $DB->get_record('user', array('email'=> $extdbuser2->email, 'auth'=>'db'));
// The malicious code should be sanitized.
$this->assertEquals($user2->username, 'userscriptalert1scriptxss');
$this->assertNotEquals($user2->username, $extdbuser2->name);
// User with correct data, should be equal to external db.
$user1 = $DB->get_record('user', array('email'=> $extdbuser1->email, 'auth'=>'db'));
$this->assertEquals($extdbuser1->name, $user1->username);
$this->assertEquals($extdbuser1->email, $user1->email);
// Now, let's update the name.
$extdbuser2->name = 'user no xss anymore';
$DB->update_record('auth_db_users', $extdbuser2);
// Run sync again to update the user data.
$auth->sync_users($trace, true);
// The user information should be updated.
$user2 = $DB->get_record('user', array('username' => 'usernoxssanymore', 'auth' => 'db'));
// The spaces should be removed, as it's the username.
$this->assertEquals($user2->username, 'usernoxssanymore');
// Now let's test just the clean_data() method isolated.
// Testing PARAM_USERNAME, PARAM_NOTAGS, PARAM_RAW_TRIMMED and others.
$user3 = new stdClass();
$user3->firstname = 'John <script>alert(1)</script> Doe';
$user3->username = 'john%#&~%*_doe';
$user3->email = ' john@testing.com ';
$user3->deleted = 'no';
$user3->description = '<b>A description about myself.</b>';
$user3cleaned = $auth->clean_data($user3);
// Expected results.
$this->assertEquals($user3cleaned->firstname, 'John alert(1) Doe');
$this->assertEquals($user3cleaned->email, 'john@testing.com');
$this->assertEquals($user3cleaned->deleted, 0);
$this->assertEquals($user3->description, '<b>A description about myself.</b>');
$this->assertEquals($user3->username, 'john_doe');
// Try to clean an invalid property (fullname).
$user3->fullname = 'John Doe';
$auth->clean_data($user3);
$this->assertDebuggingCalled("The property 'fullname' could not be cleaned.");
$this->cleanup_auth_database();
}
}
+8 -1
View File
@@ -34,11 +34,18 @@ class auth_plugin_email extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_email() {
public function __construct() {
$this->authtype = 'email';
$this->config = get_config('auth/email');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_email() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -37,11 +37,18 @@ class auth_plugin_fc extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_fc() {
public function __construct() {
$this->authtype = 'fc';
$this->config = get_config('auth/fc');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_fc() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+7 -1
View File
@@ -30,7 +30,7 @@ class fcFPP
var $_debug = FALSE; // set to true to see some debug info
// class constructor
function fcFPP($host="localhost", $port="3333")
public function __construct($host="localhost", $port="3333")
{
$this->_hostname = $host;
$this->_port = $port;
@@ -38,6 +38,12 @@ class fcFPP
$this->_pwd = "";
}
function fcFPP($host="localhost", $port="3333")
{
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
self::__construct($host, $port);
}
// open a connection to the FirstClass server
function open()
{
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_imap extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_imap() {
public function __construct() {
$this->authtype = 'imap';
$this->config = get_config('auth/imap');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_imap() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -143,13 +143,20 @@ class auth_plugin_ldap extends auth_plugin_base {
/**
* Constructor with initialisation.
*/
function auth_plugin_ldap() {
public function __construct() {
$this->authtype = 'ldap';
$this->roleauth = 'auth_ldap';
$this->errorlogtag = '[AUTH LDAP] ';
$this->init_plugin($this->authtype);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_ldap() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+3
View File
@@ -64,5 +64,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -56,7 +56,7 @@ $string['auth_ldap_gracelogins_desc'] = 'Enable LDAP gracelogin support. After p
$string['auth_ldap_gracelogins_key'] = 'Grace logins';
$string['auth_ldap_groupecreators'] = 'List of groups or contexts whose members are allowed to create groups. Separate multiple groups with \';\'. Usually something like \'cn=teachers,ou=staff,o=myorg\'';
$string['auth_ldap_groupecreators_key'] = 'Group creators';
$string['auth_ldap_host_url'] = 'Specify LDAP host in URL-form like \'ldap://ldap.myorg.com/\' or \'ldaps://ldap.myorg.com/\' Separate multipleservers with \';\' to get failover support.';
$string['auth_ldap_host_url'] = 'Specify LDAP host in URL-form like \'ldap://ldap.myorg.com/\' or \'ldaps://ldap.myorg.com/\'. Separate multiple servers with \';\' to get failover support.';
$string['auth_ldap_host_url_key'] = 'Host URL';
$string['auth_ldap_changepasswordurl_key'] = 'Password-change URL';
$string['auth_ldap_ldap_encoding'] = 'Specify encoding used by LDAP server. Most probably utf-8, MS AD v2 uses default platform encoding such as cp1252, cp1250, etc.';
+8 -1
View File
@@ -46,13 +46,20 @@ class auth_plugin_manual extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_manual() {
public function __construct() {
$this->authtype = 'manual';
$config = get_config(self::COMPONENT_NAME);
$legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
$this->config = (object)array_merge((array)$legacyconfig, (array)$config);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_manual() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist. (Non-mnet accounts only!)
+3
View File
@@ -56,5 +56,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+8 -1
View File
@@ -35,12 +35,19 @@ class auth_plugin_mnet extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_mnet() {
public function __construct() {
$this->authtype = 'mnet';
$this->config = get_config('auth_mnet');
$this->mnet = get_mnet_environment();
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_mnet() {
self::__construct();
}
/**
* This function is normally used to determine if the username and password
* are correct for local logins. Always returns false, as local users do not
+3
View File
@@ -56,5 +56,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1
View File
@@ -35,6 +35,7 @@ $wantsremoteurl = optional_param('remoteurl', false, PARAM_BOOL);
$url = new moodle_url('/auth/mnet/jump.php', array('token'=>$token, 'idp'=>$remotewwwroot, 'wantsurl'=>$wantsurl));
if ($wantsremoteurl !== false) $url->param('remoteurl', $wantsremoteurl);
$PAGE->set_url($url);
$PAGE->set_context(context_system::instance());
$site = get_site();
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_nntp extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_nntp() {
public function __construct() {
$this->authtype = 'nntp';
$this->config = get_config('auth/nntp');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_nntp() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -35,10 +35,17 @@ class auth_plugin_nologin extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_nologin() {
public function __construct() {
$this->authtype = 'nologin';
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_nologin() {
self::__construct();
}
/**
* Do not allow any login.
*
+8 -1
View File
@@ -34,11 +34,18 @@ class auth_plugin_none extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_none() {
public function __construct() {
$this->authtype = 'none';
$this->config = get_config('auth/none');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_none() {
self::__construct();
}
/**
* Returns true if the username and password work or don't exist and false
* if the user exists and the password is wrong.
+8 -1
View File
@@ -53,12 +53,19 @@ class auth_plugin_pam extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_pam() {
public function __construct() {
$this->authtype = 'pam';
$this->config = get_config('auth/pam');
$this->errormessage = '';
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_pam() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_pop3 extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_pop3() {
public function __construct() {
$this->authtype = 'pop3';
$this->config = get_config('auth/pop3');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_pop3() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -38,11 +38,18 @@ class auth_plugin_radius extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_radius() {
public function __construct() {
$this->authtype = 'radius';
$this->config = get_config('auth/radius');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_radius() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -38,11 +38,18 @@ class auth_plugin_shibboleth extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_shibboleth() {
public function __construct() {
$this->authtype = 'shibboleth';
$this->config = get_config('auth/shibboleth');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_shibboleth() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+2 -1
View File
@@ -23,6 +23,7 @@ if (!is_enabled_auth('shibboleth')) {
}
// Front channel logout.
$inputstream = file_get_contents("php://input");
if ($action == 'logout' && !empty($redirect)) {
if ($USER->auth == 'shibboleth') {
@@ -32,7 +33,7 @@ if ($action == 'logout' && !empty($redirect)) {
redirect($redirect);
}
} else if (!file_get_contents("php://input")) {
} else if (!empty($inputstream)) {
// Back channel logout.
// Set SOAP header.
+14 -70
View File
@@ -47,34 +47,15 @@ class behat_auth extends behat_base {
* @Given /^I log in as "(?P<username_string>(?:[^"]|\\")*)"$/
*/
public function i_log_in_as($username) {
// Visit login page.
$this->getSession()->visit($this->locate_path('login/index.php'));
// Running this step using the API rather than a chained step because
// we need to see if the 'Log in' link is available or we need to click
// the dropdown to expand the navigation bar before.
$this->getSession()->visit($this->locate_path('/'));
// Enter username and password.
$this->execute('behat_forms::i_set_the_field_to', array('Username', $this->escape($username)));
$this->execute('behat_forms::i_set_the_field_to', array('Password', $this->escape($username)));
// Generic steps (we will prefix them later expanding the navigation dropdown if necessary).
$steps = array(
new Given('I click on "' . get_string('login') . '" "link" in the ".logininfo" "css_element"'),
new Given('I set the field "' . get_string('username') . '" to "' . $this->escape($username) . '"'),
new Given('I set the field "' . get_string('password') . '" to "'. $this->escape($username) . '"'),
new Given('I press "' . get_string('login') . '"')
);
// If Javascript is disabled we have enough with these steps.
if (!$this->running_javascript()) {
return $steps;
}
// Wait for the homepage to be ready.
$this->getSession()->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
// If it is needed, it expands the navigation bar with the 'Log in' link.
if ($clicknavbar = $this->get_expand_navbar_step()) {
array_unshift($steps, $clicknavbar);
}
return $steps;
// Press log in button, no need to check for exceptions as it will checked after this step execution.
$this->execute('behat_forms::press_button', get_string('login'));
}
/**
@@ -83,53 +64,16 @@ class behat_auth extends behat_base {
* @Given /^I log out$/
*/
public function i_log_out() {
$steps = array(new When('I follow "' . get_string('logout') . '"'));
// No need to check anything else if we run without JS.
if (!$this->running_javascript()) {
return $steps;
}
// There is no longer any need to worry about whether the navigation
// bar needs to be expanded; user_menu now lives outside the
// hamburger.
// However, the user menu *always* needs to be expanded.
$xpath = "//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]";
array_unshift($steps, new When('I click on "'.$xpath.'" "xpath_element"'));
return $steps;
}
/**
* Returns a step to open the navigation bar if it is needed.
*
* The top log in and log out links are hidden when middle or small
* size windows (or devices) are used. This step returns a step definition
* clicking to expand the navbar if it is hidden.
*
* @return Given|bool A step definition or false if there is no need to show the navbar.
*/
protected function get_expand_navbar_step() {
// Checking if we need to click the navbar button to show the navigation menu, it
// is hidden by default when using clean theme and a medium or small screen size.
// The DOM and the JS should be all ready and loaded. Running without spinning
// as this is a widely used step and we can not spend time here trying to see
// a DOM node that is not always there (at the moment clean is not even the
// default theme...).
$navbuttonjs = "return (
Y.one('.btn-navbar') &&
Y.one('.btn-navbar').getComputedStyle('display') !== 'none'
)";
// Adding an extra click we need to show the 'Log in' link.
if (!$this->getSession()->getDriver()->evaluateScript($navbuttonjs)) {
return false;
// However, the user menu *always* needs to be expanded. if running JS.
if ($this->running_javascript()) {
$xpath = "//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]";
$this->execute('behat_general::i_click_on', array($xpath, "xpath_element"));
}
return new Given('I click on ".btn-navbar" "css_element"');
// No need to check for exceptions as it will checked after this step execution.
$this->execute('behat_general::click_link', get_string('logout'));
}
}
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_webservice extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_webservice() {
public function __construct() {
$this->authtype = 'webservice';
$this->config = get_config('auth/webservice');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_webservice() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+3 -1
View File
@@ -138,7 +138,9 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
}
// Get HTML from logger.
$loghtml = $logger->get_html();
if ($CFG->debugdisplay) {
$loghtml = $logger->get_html();
}
// Hide the progress display and first backup step bar (the 'finished' step will show next).
echo html_writer::end_div();
+9 -2
View File
@@ -18,13 +18,20 @@ class cssparser {
private $css;
private $html;
function cssparser($html = true) {
public function __construct($html = true) {
// Register "destructor"
core_shutdown_manager::register_function(array(&$this, "finalize"));
$this->html = ($html != false);
$this->Clear();
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function cssparser($html = true) {
self::__construct($html);
}
function finalize() {
unset($this->css);
}
@@ -258,4 +265,4 @@ class cssparser {
}
return $result;
}
}
}
+8 -4
View File
@@ -930,8 +930,11 @@ class backup_gradebook_structure_step extends backup_structure_step {
$grade_setting = new backup_nested_element('grade_setting', 'id', array(
'name', 'value'));
$gradebook_attributes = new backup_nested_element('attributes', null, array('calculations_freeze'));
// Build the tree
$gradebook->add_child($gradebook_attributes);
$gradebook->add_child($grade_categories);
$grade_categories->add_child($grade_category);
@@ -946,14 +949,15 @@ class backup_gradebook_structure_step extends backup_structure_step {
$gradebook->add_child($grade_settings);
$grade_settings->add_child($grade_setting);
// Define sources
// Add attribute with gradebook calculation freeze date if needed.
$attributes = new stdClass();
$gradebookcalculationfreeze = get_config('core', 'gradebook_calculations_freeze_' . $this->get_courseid());
if ($gradebookcalculationfreeze) {
$gradebook->add_attributes(array('calculations_freeze'));
$gradebook->get_attribute('calculations_freeze')->set_value($gradebookcalculationfreeze);
$attributes->calculations_freeze = $gradebookcalculationfreeze;
}
// Define sources
$gradebook_attributes->set_source_array([$attributes]);
//Include manual, category and the course grade item
$grade_items_sql ="SELECT * FROM {grade_items}
@@ -181,7 +181,7 @@ abstract class restore_qtype_plugin extends restore_plugin {
$info = new stdClass();
$info->filequestionid = $oldquestionid;
$info->dbquestionid = $newquestionid;
$info->answer = $data->answertext;
$info->answer = s($data->answertext);
throw new restore_step_exception('error_question_answers_missing_in_db', $info);
}
$newitemid = $this->questionanswercache[$data->answertext];
+141 -10
View File
@@ -121,6 +121,21 @@ class restore_gradebook_structure_step extends restore_structure_step {
return false;
}
// Identify the backup we're dealing with.
$backuprelease = floatval($this->get_task()->get_info()->backup_release); // The major version: 2.9, 3.0, ...
$backupbuild = 0;
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
if (!empty($matches[1])) {
$backupbuild = (int) $matches[1]; // The date of Moodle build at the time of the backup.
}
// On older versions the freeze value has to be converted.
// We do this from here as it is happening right before the file is read.
// This only targets the backup files that can contain the legacy freeze.
if ($backupbuild > 20150618 && ($backuprelease < 3.0 || $backupbuild < 20160527)) {
$this->rewrite_step_backup_file_for_legacy_freeze($fullpath);
}
// Arrived here, execute the step
return true;
}
@@ -129,7 +144,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
$paths = array();
$userinfo = $this->task->get_setting_value('users');
$paths[] = new restore_path_element('gradebook', '/gradebook');
$paths[] = new restore_path_element('attributes', '/gradebook/attributes');
$paths[] = new restore_path_element('grade_category', '/gradebook/grade_categories/grade_category');
$paths[] = new restore_path_element('grade_item', '/gradebook/grade_items/grade_item');
if ($userinfo) {
@@ -141,7 +156,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
return $paths;
}
protected function process_gradebook($data) {
protected function process_attributes($data) {
// For non-merge restore types:
// Unset 'gradebook_calculations_freeze_' in the course and replace with the one from the backup.
$target = $this->get_task()->get_target();
@@ -493,6 +508,8 @@ class restore_gradebook_structure_step extends restore_structure_step {
$gradebookcalculationsfreeze = get_config('core', 'gradebook_calculations_freeze_' . $this->get_courseid());
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
$backupbuild = (int)$matches[1];
// The function floatval will return a float even if there is text mixed with the release number.
$backuprelease = floatval($this->get_task()->get_info()->backup_release);
// Extra credits need adjustments only for backups made between 2.8 release (20141110) and the fix release (20150619).
if (!$gradebookcalculationsfreeze && $backupbuild >= 20141110 && $backupbuild < 20150619) {
@@ -504,6 +521,14 @@ class restore_gradebook_structure_step extends restore_structure_step {
require_once($CFG->libdir . '/db/upgradelib.php');
upgrade_calculated_grade_items($this->get_courseid());
}
// Courses from before 3.1 (20160518) may have a letter boundary problem and should be checked for this issue.
// Backups from before and including 2.9 could have a build number that is greater than 20160518 and should
// be checked for this problem.
if (!$gradebookcalculationsfreeze && ($backupbuild < 20160518 || $backuprelease <= 2.9)) {
require_once($CFG->libdir . '/db/upgradelib.php');
upgrade_course_letter_boundary($this->get_courseid());
}
}
/**
@@ -571,6 +596,85 @@ class restore_gradebook_structure_step extends restore_structure_step {
}
}
}
/**
* Rewrite step definition to handle the legacy freeze attribute.
*
* In previous backups the calculations_freeze property was stored as an attribute of the
* top level node <gradebook>. The backup API, however, do not process grandparent nodes.
* It only processes definitive children, and their parent attributes.
*
* We had:
*
* <gradebook calculations_freeze="20160511">
* <grade_categories>
* <grade_category id="10">
* <depth>1</depth>
* ...
* </grade_category>
* </grade_categories>
* ...
* </gradebook>
*
* And this method will convert it to:
*
* <gradebook >
* <attributes>
* <calculations_freeze>20160511</calculations_freeze>
* </attributes>
* <grade_categories>
* <grade_category id="10">
* <depth>1</depth>
* ...
* </grade_category>
* </grade_categories>
* ...
* </gradebook>
*
* Note that we cannot just load the XML file in memory as it could potentially be huge.
* We can also completely ignore if the node <attributes> is already in the backup
* file as it never existed before.
*
* @param string $filepath The absolute path to the XML file.
* @return void
*/
protected function rewrite_step_backup_file_for_legacy_freeze($filepath) {
$foundnode = false;
$newfile = make_request_directory(true) . DIRECTORY_SEPARATOR . 'file.xml';
$fr = fopen($filepath, 'r');
$fw = fopen($newfile, 'w');
if ($fr && $fw) {
while (($line = fgets($fr, 4096)) !== false) {
if (!$foundnode && strpos($line, '<gradebook ') === 0) {
$foundnode = true;
$matches = array();
$pattern = '@calculations_freeze=.([0-9]+).@';
if (preg_match($pattern, $line, $matches)) {
$freeze = $matches[1];
$line = preg_replace($pattern, '', $line);
$line .= " <attributes>\n <calculations_freeze>$freeze</calculations_freeze>\n </attributes>\n";
}
}
fputs($fw, $line);
}
if (!feof($fr)) {
throw new restore_step_exception('Error while attempting to rewrite the gradebook step file.');
}
fclose($fr);
fclose($fw);
if (!rename($newfile, $filepath)) {
throw new restore_step_exception('Error while attempting to rename the gradebook step file.');
}
} else {
if ($fr) {
fclose($fr);
}
if ($fw) {
fclose($fw);
}
}
}
}
/**
@@ -1700,27 +1804,54 @@ class restore_course_structure_step extends restore_structure_step {
*/
public function process_course($data) {
global $CFG, $DB;
$context = context::instance_by_id($this->task->get_contextid());
$userid = $this->task->get_userid();
$target = $this->get_task()->get_target();
$isnewcourse = $target != backup::TARGET_CURRENT_ADDING && $target != backup::TARGET_EXISTING_ADDING;
// When restoring to a new course we can set all the things except for the ID number.
$canchangeidnumber = $isnewcourse || has_capability('moodle/course:changeidnumber', $context, $userid);
$canchangeshortname = $isnewcourse || has_capability('moodle/course:changeshortname', $context, $userid);
$canchangefullname = $isnewcourse || has_capability('moodle/course:changefullname', $context, $userid);
$canchangesummary = $isnewcourse || has_capability('moodle/course:changesummary', $context, $userid);
$data = (object)$data;
$data->id = $this->get_courseid();
$fullname = $this->get_setting_value('course_fullname');
$shortname = $this->get_setting_value('course_shortname');
$startdate = $this->get_setting_value('course_startdate');
// Calculate final course names, to avoid dupes
// Calculate final course names, to avoid dupes.
list($fullname, $shortname) = restore_dbops::calculate_course_names($this->get_courseid(), $fullname, $shortname);
// Need to change some fields before updating the course record
$data->id = $this->get_courseid();
$data->fullname = $fullname;
$data->shortname= $shortname;
if ($canchangefullname) {
$data->fullname = $fullname;
} else {
unset($data->fullname);
}
if ($canchangeshortname) {
$data->shortname = $shortname;
} else {
unset($data->shortname);
}
if (!$canchangesummary) {
unset($data->summary);
unset($data->summaryformat);
}
// Only allow the idnumber to be set if the user has permission and the idnumber is not already in use by
// another course on this site.
$context = context::instance_by_id($this->task->get_contextid());
if (!empty($data->idnumber) && has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid()) &&
$this->task->is_samesite() && !$DB->record_exists('course', array('idnumber' => $data->idnumber))) {
if (!empty($data->idnumber) && $canchangeidnumber && $this->task->is_samesite()
&& !$DB->record_exists('course', array('idnumber' => $data->idnumber))) {
// Do not reset idnumber.
} else if (!$isnewcourse) {
// Prevent override when restoring as merge.
unset($data->idnumber);
} else {
$data->idnumber = '';
}
@@ -0,0 +1,10 @@
<gradebook >
<attributes>
<calculations_freeze>20160511</calculations_freeze>
</attributes>
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebook>
@@ -0,0 +1,7 @@
<gradebook calculations_freeze="20160511">
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebook>
@@ -0,0 +1,10 @@
<gradebook some_other_value="false" >
<attributes>
<calculations_freeze>20160511</calculations_freeze>
</attributes>
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebook>
@@ -0,0 +1,7 @@
<gradebook some_other_value="false" calculations_freeze="20160511">
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebook>
@@ -0,0 +1,10 @@
<gradebook some_other_value="false" and_another_value="42">
<attributes>
<calculations_freeze>20160511</calculations_freeze>
</attributes>
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebook>
@@ -0,0 +1,7 @@
<gradebook some_other_value="false" calculations_freeze="20160511" and_another_value="42">
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebook>
@@ -0,0 +1,7 @@
<gradebookplugin some_other_value="false" calculations_freeze="20160511" and_another_value="42">
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebookplugin>
@@ -0,0 +1,7 @@
<gradebookplugin some_other_value="false" calculations_freeze="20160511" and_another_value="42">
<grade_categories>
<grade_category id="10">
<depth>1</depth>
</grade_category>
</grade_categories>
</gradebookplugin>
@@ -0,0 +1,92 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Test for restore_stepslib.
*
* @package core_backup
* @copyright 2016 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
require_once($CFG->libdir . '/completionlib.php');
/**
* Test for restore_stepslib.
*
* @package core_backup
* @copyright 2016 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_backup_restore_gradebook_structure_step_testcase extends advanced_testcase {
/**
* Provide tests for rewrite_step_backup_file_for_legacy_freeze based upon fixtures.
*
* @return array
*/
public function rewrite_step_backup_file_for_legacy_freeze_provider() {
$fixturesdir = realpath(__DIR__ . '/fixtures/rewrite_step_backup_file_for_legacy_freeze/');
$tests = [];
$iterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($fixturesdir),
\RecursiveIteratorIterator::LEAVES_ONLY);
foreach ($iterator as $sourcefile) {
$pattern = '/\.test$/';
if (!preg_match($pattern, $sourcefile)) {
continue;
}
$expectfile = preg_replace($pattern, '.expectation', $sourcefile);
$test = array($sourcefile, $expectfile);
$tests[basename($sourcefile)] = $test;
}
return $tests;
}
/**
* @dataProvider rewrite_step_backup_file_for_legacy_freeze_provider
* @param string $source The source file to test
* @param string $expected The expected result of the transformation
*/
public function test_rewrite_step_backup_file_for_legacy_freeze($source, $expected) {
$restore = $this->getMockBuilder('\restore_gradebook_structure_step')
->setMethods(null)
->disableOriginalConstructor()
->getMock()
;
// Copy the file somewhere as the rewrite_step_backup_file_for_legacy_freeze will write the file.
$dir = make_request_directory(true);
$filepath = $dir . DIRECTORY_SEPARATOR . 'file.xml';
copy($source, $filepath);
$rc = new \ReflectionClass('\restore_gradebook_structure_step');
$rcm = $rc->getMethod('rewrite_step_backup_file_for_legacy_freeze');
$rcm->setAccessible(true);
$rcm->invoke($restore, $filepath);
// Check the result.
$this->assertFileEquals($expected, $filepath);
}
}
+3 -1
View File
@@ -110,7 +110,9 @@ if (!$restore->is_independent()) {
// Do actual restore.
$restore->execute();
// Get HTML from logger.
$loghtml = $logger->get_html();
if ($CFG->debugdisplay) {
$loghtml = $logger->get_html();
}
// Hide this section because we are now going to make the page show 'finished'.
echo html_writer::end_div();
echo html_writer::script('document.getElementById("executionprogress").style.display = "none";');
+34 -5
View File
@@ -1287,7 +1287,11 @@ abstract class restore_dbops {
* 1F - None of the above, return true => User needs to be created
*
* if restoring from another site backup (cannot match by id here, replace it by email/firstaccess combination):
* 2A - Normal check: If match by username and mnethost and (email or non-zero firstaccess) => ok, return target user
* 2A - Normal check:
* 2A1 - If match by username and mnethost and (email or non-zero firstaccess) => ok, return target user
* 2A2 - Exceptional handling (MDL-21912): Match "admin" username. Then, if import_general_duplicate_admin_allowed is
* enabled, attempt to map the admin user to the user 'admin_[oldsiteid]' if it exists. If not,
* the user 'admin_[oldsiteid]' will be created in precheck_included users
* 2B - Handle users deleted in DB and "alive" in backup file:
* 2B1 - If match by mnethost and user is deleted in DB and not empty email = md5(username) and
* (username LIKE 'backup_email.%' or non-zero firstaccess) => ok, return target user
@@ -1305,7 +1309,7 @@ abstract class restore_dbops {
* Note: for DB deleted users md5(username) is stored *sometimes* in the email field,
* hence we are looking there for usernames if not empty. See delete_user()
*/
protected static function precheck_user($user, $samesite) {
protected static function precheck_user($user, $samesite, $siteid = null) {
global $CFG, $DB;
// Handle checks from same site backups
@@ -1376,7 +1380,7 @@ abstract class restore_dbops {
// Handle checks from different site backups
} else {
// 2A - If match by username and mnethost and
// 2A1 - If match by username and mnethost and
// (email or non-zero firstaccess) => ok, return target user
if ($rec = $DB->get_record_sql("SELECT *
FROM {user} u
@@ -1393,6 +1397,14 @@ abstract class restore_dbops {
return $rec; // Matching user found, return it
}
// 2A2 - If we're allowing conflicting admins, attempt to map user to admin_[oldsiteid].
if (get_config('backup', 'import_general_duplicate_admin_allowed') && $user->username === 'admin' && $siteid
&& $user->mnethostid == $CFG->mnet_localhost_id) {
if ($rec = $DB->get_record('user', array('username' => 'admin_' . $siteid))) {
return $rec;
}
}
// 2B - Handle users deleted in DB and "alive" in backup file
// Note: for DB deleted users email is stored in username field, hence we
// are looking there for emails. See delete_user()
@@ -1500,6 +1512,9 @@ abstract class restore_dbops {
// Calculate the context we are going to use for capability checking
$context = context_course::instance($courseid);
// When conflicting users are detected we may need original site info.
$restoreinfo = restore_controller_dbops::load_controller($restoreid)->get_info();
// Calculate if we have perms to create users, by checking:
// to 'moodle/restore:createuser' and 'moodle/restore:userinfo'
// and also observe $CFG->disableusercreationonrestore
@@ -1535,14 +1550,28 @@ abstract class restore_dbops {
}
// Now, precheck that user and, based on returned results, annotate action/problem
$usercheck = self::precheck_user($user, $samesite);
$usercheck = self::precheck_user($user, $samesite, $restoreinfo->original_site_identifier_hash);
if (is_object($usercheck)) { // No problem, we have found one user in DB to be mapped to
// Annotate it, for later process. Set newitemid to mapping user->id
self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, $usercheck->id);
} else if ($usercheck === false) { // Found conflict, report it as problem
$problems[] = get_string('restoreuserconflict', '', $user->username);
if (!get_config('backup', 'import_general_duplicate_admin_allowed')) {
$problems[] = get_string('restoreuserconflict', '', $user->username);
} else if ($user->username == 'admin') {
if (!$cancreateuser) {
$problems[] = get_string('restorecannotcreateuser', '', $user->username);
}
if ($user->mnethostid != $CFG->mnet_localhost_id) {
$problems[] = get_string('restoremnethostidmismatch', '', $user->username);
}
if (!$problems) {
// Duplicate admin allowed, append original site idenfitier to username.
$user->username .= '_' . $restoreinfo->original_site_identifier_hash;
self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, 0, null, (array)$user);
}
}
} else if ($usercheck === true) { // User needs to be created, check if we are able
if ($cancreateuser) { // Can create user, set newitemid to 0 so will be created later
@@ -97,7 +97,10 @@ class restore_log_rule implements processable {
return $this->module . '-' . $this->action;
}
public function process($log) {
public function process($inputlog) {
// There might be multiple rules that process this log, we can't alter it in the process of checking it.
$log = clone($inputlog);
// Reset the allpairs array
$this->allpairs = array();
@@ -89,11 +89,12 @@ class restore_logs_processor {
}
// Arrived here log is empty, no rule was able to perform the conversion, log the problem
if (empty($newlog)) {
self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored', backup::LOG_DEBUG);
self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored. ' .
json_encode($log), backup::LOG_DEBUG);
}
} else { // Action not found log the problem
self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored', backup::LOG_DEBUG);
self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored. '.json_encode($log), backup::LOG_DEBUG);
$newlog = false;
}
@@ -0,0 +1,52 @@
<?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/>.
/**
* @package core_backup
* @category test
* @copyright 2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
class backup_restore_log_rule_testcase extends basic_testcase {
function test_process_keeps_log_unmodified() {
// Prepare a tiny log entry.
$originallog = new stdClass();
$originallog->url = 'original';
$originallog->info = 'original';
$log = clone($originallog);
// Process it with a tiny log rule, only modifying url and info.
$lr = new restore_log_rule('test', 'test', 'changed', 'changed');
$result = $lr->process($log);
// The log has been processed.
$this->assertEquals('changed', $result->url);
$this->assertEquals('changed', $result->info);
// But the original log has been kept unmodified by the process() call.
$this->assertEquals($originallog, $log);
}
}
@@ -183,6 +183,10 @@ abstract class backup_structure_step extends backup_step {
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $multiple, $plugintype = null, $pluginname = null) {
global $CFG;
// This global declaration is required, because where we do require_once($backupfile);
// That file may in turn try to do require_once($CFG->dirroot ...).
// That worked in the past, we should keep it working.
// Verify if this is a BC call for an activity backup. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
@@ -313,6 +313,10 @@ abstract class restore_structure_step extends restore_step {
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $plugintype = null, $pluginname = null) {
global $CFG;
// This global declaration is required, because where we do require_once($backupfile);
// That file may in turn try to do require_once($CFG->dirroot ...).
// That worked in the past, we should keep it working.
// Verify if this is a BC call for an activity restore. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
@@ -126,6 +126,9 @@ class backp_settings_testcase extends basic_testcase {
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
} catch (TypeError $e) {
// On PHP7+ we get a TypeError raised, lets check we've the right error.
$this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
}
restore_error_handler();
@@ -140,6 +143,9 @@ class backp_settings_testcase extends basic_testcase {
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
} catch (TypeError $e) {
// On PHP7+ we get a TypeError raised, lets check we've the right error.
$this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
}
restore_error_handler();
@@ -302,6 +308,9 @@ class backp_settings_testcase extends basic_testcase {
} catch (exception $e) {
$this->assertTrue($e instanceof backup_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
} catch (TypeError $e) {
// On PHP7+ we get a TypeError raised, lets check we've the right error.
$this->assertRegexp('/must be an instance of base_setting/', $e->getMessage());
}
restore_error_handler();
+2 -2
View File
@@ -172,8 +172,8 @@ class behat_backup extends behat_base {
"/descendant::tr[contains(., $fromcourse)]" .
"/descendant::input[@type='radio']";
$radionode = $this->find('xpath', $xpath, $exception);
$radionode->check();
$radionode->click();
$radiofield = new behat_form_field($this->getSession(), $radionode);
$radiofield->set_value(1);
$this->find_button(get_string('continue'))->press();
$this->wait();
@@ -4,7 +4,6 @@ Feature: Import course's contents into another course
As a teacher
I need to import a course contents into another course selecting what I want to import
@javascript
Scenario: Import course's contents to another course
Given the following "courses" exist:
| fullname | shortname | category |
@@ -28,7 +28,6 @@ Feature: Option to include groups and groupings when importing a course to anoth
And I follow "Course 1"
And I turn editing mode on
@javascript
Scenario: Include groups and groupings when importing a course to another course
When I import "Course 1" course into "Course 2" course using this options:
| Initial | Include groups and groupings | 1 |
@@ -40,7 +39,6 @@ Feature: Option to include groups and groupings when importing a course to anoth
And I should see "Grouping 1"
And I should see "Grouping 2"
@javascript
Scenario: Do not include groups and groupings when importing a course to another course
When I import "Course 1" course into "Course 2" course using this options:
| Initial | Include groups and groupings | 0 |
+2 -8
View File
@@ -45,13 +45,7 @@ function core_badges_myprofile_navigation(\core_user\output\myprofile\tree $tree
// Add category. This node should appear after 'contact' so that administration block appears towards the end. Refer MDL-49928.
$category = new core_user\output\myprofile\category('badges', get_string('badges', 'badges'), 'contact');
$tree->add_category($category);
// Determine context.
if (isloggedin()) {
$context = context_user::instance($USER->id);
} else {
$context = context_system::instance();
}
$context = context_user::instance($user->id);
$courseid = empty($course) ? 0 : $course->id;
if ($USER->id == $user->id || has_capability('moodle/badges:viewotherbadges', $context)) {
@@ -78,4 +72,4 @@ function core_badges_myprofile_navigation(\core_user\output\myprofile\tree $tree
}
}
}
}
}
+66
View File
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/badgeslib.php');
require_once($CFG->dirroot . '/badges/lib.php');
class core_badges_badgeslib_testcase extends advanced_testcase {
protected $badgeid;
@@ -472,4 +473,69 @@ class core_badges_badgeslib_testcase extends advanced_testcase {
$this->assertStringMatchesFormat($testassertion->class, json_encode($assertion->get_badge_class()));
$this->assertStringMatchesFormat($testassertion->issuer, json_encode($assertion->get_issuer()));
}
/**
* Tests the core_badges_myprofile_navigation() function.
*/
public function test_core_badges_myprofile_navigation() {
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$badge = new badge($this->badgeid);
$badge->issue($this->user->id, true);
$iscurrentuser = true;
$course = null;
// Enable badges.
set_config('enablebadges', true);
// Check the node tree is correct.
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
}
/**
* Tests the core_badges_myprofile_navigation() function with badges disabled..
*/
public function test_core_badges_myprofile_navigation_badges_disabled() {
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$badge = new badge($this->badgeid);
$badge->issue($this->user->id, true);
$iscurrentuser = false;
$course = null;
// Disable badges.
set_config('enablebadges', false);
// Check the node tree is correct.
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayNotHasKey('localbadges', $nodes->getValue($tree));
}
/**
* Tests the core_badges_myprofile_navigation() function with a course badge.
*/
public function test_core_badges_myprofile_navigation_with_course_badge() {
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$badge = new badge($this->coursebadge);
$badge->issue($this->user->id, true);
$iscurrentuser = false;
// Check the node tree is correct.
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $this->course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
}
}

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