21727 Commits

Author SHA1 Message Date
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
Dan Poltawski
3adb62b727 MDL-52127 js: check amd files with eslint grunt task
I have spent quite a lot of time working through the current list of
eslint options and configuring them for Moodle style and I think this is
a very good basis to start us at (as well as taking some of out jshint
options out with https://www.npmjs.com/package/polyjuice ). Thanks to
Andrew Nicols, Mark Johnson and Frédéric Massart for some refinements.

With this configuration the grunt build will fail if errors are present
in the js (though you can of course tell jshint to ignore some errors,
as I have done in admin/tool/lp/amd/src/competency_rule_points.js and
defining the Y global in lib/amd/src/yui.js ).

The grunt task will not report warnings by default, but a new
--show-lint-warnings flag will help achieve that. Editor
integrations/stanadalone eslint tool will surely be a better way of
getting eslint errors rather than using the grunt task.
2016-06-11 10:14:35 +01:00
Jun Pataleta
5d01400a85 MDL-54842 core_renderer: Hide additional body HTML in embedded layout 2016-06-10 14:47:14 +08:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Andrew Nicols
2c4e6d6252 MDL-54853 weblib: Specify version and fixed encoding 2016-06-09 09:53:48 +08:00
Andrew Nicols
360e819fd3 Merge branch 'MDL-54853-master' of git://github.com/cameron1729/moodle 2016-06-09 09:41:53 +08:00
Cameron Ball
2549f46f7c MDL-54853 weblib: Properly specify encoding for blanktarget 2016-06-08 18:29:19 +08:00
Andrew Nicols
147df77923 Merge branch 'MDL-53947-master' of git://github.com/junpataleta/moodle 2016-06-08 08:15:23 +08:00
Dan Poltawski
7bcab9d1fd Merge branch 'MDL-48756-master' of git://github.com/FMCorz/moodle 2016-06-07 11:49:39 +01:00
David Monllao
8a4f4f576e Merge branch 'MDL-54180_master' of https://github.com/marxjohnson/moodle 2016-06-07 16:15:43 +08:00
Skylar Kelty
1f5a347b46 MDL-53947 memcached: Fix memcached session warning on PHP7 2016-06-07 10:25:07 +08:00
Marina Glancy
6ee5e596b8 MDL-54837 tags: fixed bug when collection is locked
also fixed fatal error for upgraded plugins that did not pass tag
component to the tag form element
2016-06-07 08:38:39 +08:00
Joey Andres
fdac806aef MDL-53399 core: "activity chooser off/on" in user preference
- Created a "Course preferences" for user preference. This
  is where "activity chooser off/on" option is moved.
- Changed the lib/navigationlib.php to have a new user preference
  section, which is "Course preferences".
- Removed the "activity chooser" toggle codes in javascript.
2016-06-03 00:46:16 -06:00
Frederic Massart
240a9de4ab
MDL-48756 editor_atto: Bulk atto autosave queries 2016-06-01 12:49:15 +08:00
Andrew Nicols
69dcebb04d Merge branch 'MDL-54722-master' of git://github.com/cameron1729/moodle 2016-06-01 12:24:14 +08:00
Cameron Ball
fd5466af99 MDL-54722 navigation: Properly overflow expanded nav trees 2016-06-01 10:15:22 +08:00
Mark Johnson
be8b89500c MDL-54180 Behat: Handle exceptions from driver when saving screenshot 2016-05-31 12:32:57 +01:00
David Monllao
5751f7a36c Merge branch 'MDL-54667-master' of git://github.com/junpataleta/moodle 2016-05-31 12:46:59 +08:00
Jakob
cffd0fa138 MDL-53306 auth: Add hook for auth plugins to access user object.
Add a hook for auth plugins to be able to modify or check a user, before
raising any authentication errors.

The auth plugin needs to add a public function like this:

/**
 * Pre user_login hook.
 * This method is called from authenticate_user_login() right after the user
 * object is generated. This gives the auth plugins an option to make adjustments
 * before the verification process starts.
 *
 * @param object $user user object, later used for $USER
*/
public function pre_user_login_hook(&$user) {
    // Override if needed.
}
2016-05-30 11:57:03 -07:00
Jakub Kania
81475d2602 MDL-54667 core_lib: Fix the param name in edit profile link 2016-05-30 16:34:02 +08:00
Cameron Ball
af6a424054 MDL-37138 weblib: Document blanktarget in upgrade.txt 2016-05-30 16:12:17 +08:00