21747 Commits

Author SHA1 Message Date
Andrew Nicols
642a1d5480 Merge branch 'MDL-53019' of git://github.com/stronk7/moodle 2016-07-05 08:15:02 +08:00
Eloy Lafuente (stronk7)
ae96cf6246 MDL-53019 php: bump all harcoded versions to new 5.6.5 requirement
Moodle 3.2 and up will require PHP >= 5.6.5. Hopefully some day we'll
have this centralized with MDL-39007, just it's not done yet.

Thanks to Stephen Bourget for raising this!
2016-07-05 01:50:43 +02:00
Dan Poltawski
98ebfabc13 Merge branch 'MDL-54994' of git://github.com/stronk7/moodle 2016-07-04 14:18:15 +01:00
Dan Poltawski
0cf471fbdd Merge branch 'MDL-55041_master' of https://github.com/marxjohnson/moodle 2016-07-04 12:45:55 +01:00
Marina Glancy
ed63718caa MDL-55069 core: escape special characters in email headers 2016-07-04 12:27:58 +01:00
Andrew Nicols
4ffe12b0f8 Merge branch 'MDL-55020-master-pluginzip' of git://github.com/mudrd8mz/moodle 2016-07-04 10:54:59 +08:00
Eloy Lafuente (stronk7)
1de0b34bed Merge branch 'MDL-54947' of https://github.com/mr-russ/moodle 2016-07-04 01:05:12 +02:00
Mark Johnson
4d9036d6eb MDL-55041 roles: Fix JSON parsing in permission manager 2016-07-01 14:54:01 +01:00
Eloy Lafuente (stronk7)
a763bb0553 MDL-54994 badges: Count correctly the number of external badges shown 2016-07-01 13:40:47 +02:00
David Mudrák
2785fd193d 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:13:21 +02:00
Russell Smith
1b0b082a08 MDL-54947 database: Update PostgreSQL binary handling.
PostgreSQL 9.1 allows hex formating for binary which is handled better
by pg_query_params().

Getting bytea isn't required on connection, it can be used as pg_field_type()
when binary needs to be checked.
2016-06-30 12:58:53 +10:00
Andrew Nicols
ffcbabcdd0 Merge branch 'MDL-54755_master' of https://github.com/StudiUM/moodle 2016-06-29 15:05:17 +08:00
Andrew Nicols
f9cabe8f99 Merge branch 'wip-mdl-54974' of https://github.com/rajeshtaneja/moodle 2016-06-29 15:05:13 +08:00
Rajesh Taneja
e5f2478b9f 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:30:58 +08:00
Andrew Nicols
607e900e2d Merge branch 'MDL-54785-master' of git://github.com/FMCorz/moodle 2016-06-27 08:59:49 +08:00
Gilles-Philippe Leblanc
975bd11258 MDL-54755 core: Incorrect redirection after password change 2016-06-23 21:24:29 -04:00
Frederic Massart
df52c272cf
MDL-54785 files: Deprecate the support for $usepost and related 2016-06-23 12:41:03 +08:00
Frederic Massart
4f9b94fdd5
Revert "MDL-44626 files: Show the PHP max upload size instead of 'unlimited'"
This reverts commit 6f0768618a38c11eca90a97c0dff31ec8ce434d1.
2016-06-23 11:51:44 +08:00
Frederic Massart
048f8073d1
Revert "Merge branch 'MDL-54110_master' of https://github.com/marxjohnson/moodle"
This reverts commit 016e0abfbc1992f01eadfdef02de6e56ffad8e9f, reversing
changes made to 58a2f0ac40f24da9c9955110902f8e14cd0d8419.
2016-06-23 11:51:44 +08:00
Frederic Massart
796f86f753
Revert "MDL-54110 repositories: Whitespace, Typo + unit test fixes"
This reverts commit 7e4d43e1a263f7003207a382251de900341db92c.
2016-06-23 11:51:44 +08:00
Simey Lameze
37eafbb6dc MDL-54948 core_files: return false if theres no output from unoconv 2016-06-23 08:37:23 +08:00
Simey Lameze
84440fe3d2 MDL-54948 core_upgrade: fix check_unoconv_version logic 2016-06-22 13:44:48 +08:00
Eloy Lafuente (stronk7)
0f20bf7507 Merge branch 'wip-mdl-54589-mac' of https://github.com/rajeshtaneja/moodle 2016-06-22 01:42:15 +02:00
Eloy Lafuente (stronk7)
e40dd1cdcd 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:29:51 +02:00
Eloy Lafuente (stronk7)
0f30b4beeb Merge branch 'MDL-54778-master' of git://github.com/andrewnicols/moodle 2016-06-22 01:29:39 +02:00
Dan Poltawski
6a6b0085e0 Merge branch 'MDL-54983-master' of git://github.com/damyon/moodle 2016-06-21 12:56:32 -07:00
Damyon Wiese
0edd7bd7bd MDL-54983 docs: Improve phpdocs for create_user_key
Also fixed the docs for get_user_key.
2016-06-21 12:46:59 -07:00
Eloy Lafuente (stronk7)
e822312af3 Merge branch 'MDL-54939-master' of git://github.com/danpoltawski/moodle 2016-06-21 20:00:36 +02:00
Eloy Lafuente (stronk7)
878835db7f Merge branch 'MDL-54948-master' of git://github.com/lameze/moodle 2016-06-21 11:48:10 +02:00
Andrew Nicols
92e4d84b62 Merge branch 'MDL-51789' of https://github.com/mr-russ/moodle 2016-06-21 14:38:51 +08:00
Russell Smith
5407c5b0f4 MDL-51789 users: Allow picture update from webservices.
useredit_update_picture as moved to user_update_picture
as it's more general.  It was also moved to user/lib.php
so it can be used by both webservices and edit without more include files.
2016-06-21 16:36:53 +10:00
Andrew Nicols
bc341d4f08 Merge branch 'MDL-54920-master' of https://github.com/sammarshallou/moodle 2016-06-21 14:15:41 +08:00
Simey Lameze
6937d89be6 MDL-54948 core_upgrade: fix unoconv check on the environment page 2016-06-21 09:38:01 +08:00
Simey Lameze
9254ba09e8 MDL-54948 core_files: make the check consistent on unoconv test page 2016-06-21 09:36:44 +08:00
Andrew Nicols
c6d20e61e3 Merge branch 'wip-MDL-53399' of https://github.com/JoeyAndres/moodle 2016-06-21 09:03:48 +08:00
Andrew Nicols
da871bb4c1 Merge branch 'wip-MDL-53292-master' of https://github.com/marinaglancy/moodle 2016-06-21 08:46:38 +08:00
Andrew Nicols
badbaa64e3 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 07:58:13 +08:00
Rajesh Taneja
fba0ac63b8 MDL-54589 behat: Added hack for some OS/browsers 2016-06-20 16:03:36 +08:00
Rajesh Taneja
3aaf98f62c MDL-54589 behat: Trigger change event after selecting option
After selecting option, some browsers need
explicit change event
2016-06-20 09:43:08 +08:00
Dan Poltawski
7f70d548fe MDL-54939 amd: build modified files 2016-06-17 09:03:18 +01:00
Dan Poltawski
c96f55e6f9 MDL-54939 amd: fix lint issues
Mostly correcting jsdoc, some other line wrapping rules and empty
functions.
2016-06-17 09:03:18 +01:00
Dan Poltawski
35be582696 MDL-54939 amd: Fix lint issues fixable with eslint --fix 2016-06-16 19:33:00 +01:00
Dan Poltawski
0fd08fc7e5 Merge branch 'MDL-35628' of https://github.com/mr-russ/moodle 2016-06-16 09:04:12 +01:00
Dan Poltawski
134e4566ff Merge branch 'MASTER_MDL-53306' of https://github.com/jacac/moodle 2016-06-16 09:04:10 +01:00
Andrew Nicols
bb15b62ce8 Merge branch 'MDL-52127-master' of git://github.com/danpoltawski/moodle 2016-06-16 09:04:05 +01:00
sam marshall
5a14c4d948 MDL-54920 Behat: Allow viewport size to be set consistently
Provides a new Behat step

And I set viewport size to "800x600"
2016-06-14 12:28:24 +01:00
Dan Poltawski
be4b3cc6c7 MDL-52127 js: switch to a more YUI tolerant eslint config
Instead of having the stricter configuration for all files, use
the less strict default config and switch to the stricter config
for building AMD modules.

This means that the eslint commandline/editor inspections will work
better for all files and not generate false positives when using editor
integrations. But since grunt is required to build AMD modules we still
get the stricter checking for those files on build.
2016-06-14 00:37:28 +01:00
Dan Poltawski
f3caf30690 Merge branch 'MDL-54837-master' of git://github.com/marinaglancy/moodle 2016-06-13 08:51:56 +01:00
Marina Glancy
8fef061da4 MDL-53292 core: deprecate callback delete_course 2016-06-13 10:48:06 +08:00
Dan Poltawski
a1587268cb MDL-52127 js: check YUI modules with eslint
Because we don't have the entire YUI rollup, we can't apply some of the
rules safely, so we ignore some rules.

At this point I am not 100% certain this configuration is robust enough,
to deal with the lack fo rollup knowledge although its a good sign that
there are no errors on our entire yui codebase.
2016-06-11 10:14:35 +01:00