Compare commits

...

188 Commits

Author SHA1 Message Date
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
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
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
Rajesh Taneja 8a0c8192c8 MDL-52540 behat: mouse events are not handled well with phantomjs 2015-12-17 12:06:06 +08: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 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
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
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
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
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 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
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
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
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
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
AMOS bot 0efd3318b2 Automatically generated installer lang files 2015-11-26 00:04:31 +08: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
527 changed files with 9632 additions and 5618 deletions
+7 -42
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.
@@ -50,29 +41,18 @@ 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.
# Exclude it on all versions except for 7.0
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
# php: 5.6
#
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
# php: 5.5
- env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
php: 5.4
include:
# Attempt to run the CITEST set on PHP 7.
- php: nightly
env: DB=none PHPUNIT=false INSTALL=false CITEST=true
cache:
directories:
- $HOME/.composer/cache
@@ -86,10 +66,6 @@ install:
# 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' ];
@@ -144,9 +120,6 @@ before_script:
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.
@@ -191,14 +164,6 @@ 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' ];
+21 -6
View File
@@ -50,6 +50,17 @@ module.exports = function(grunt) {
}
)
}
},
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
}
}
}
});
@@ -208,13 +219,11 @@ module.exports = function(grunt) {
grunt.task.run('shifter');
// Are we in an AMD directory?
} else if (path.basename(cwd) == 'amd') {
grunt.task.run('jshint');
grunt.task.run('uglify');
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');
}
};
@@ -222,9 +231,15 @@ module.exports = function(grunt) {
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
// 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);
-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>
@@ -422,6 +422,12 @@ 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.
coursecat::role_assignment_changed($this->role->id, context_system::instance());
}
// Assignable contexts.
@@ -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"
+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;
}
+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;
}
@@ -120,5 +120,8 @@ 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.
return true;
}
+3
View File
@@ -56,5 +56,8 @@ 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.
return true;
}
+2 -2
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);
}
@@ -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;
}
+19 -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,22 @@ 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);
}
}
+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;
}
+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;
}
+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.
+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.
+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;
}
}
}
@@ -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();
@@ -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);
}
}
@@ -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();
+3
View File
@@ -79,5 +79,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -79,5 +79,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -79,5 +79,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -69,5 +69,8 @@ function xmldb_block_community_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;
}
+3
View File
@@ -76,5 +76,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -80,5 +80,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// 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
@@ -54,7 +54,7 @@ class block_edit_form extends moodleform {
global $CFG;
$this->block = $block;
$this->page = $page;
parent::moodleform($actionurl);
parent::__construct($actionurl);
}
function definition() {
@@ -84,14 +84,13 @@ class block_glossary_random extends block_base {
$limitfrom = 0;
$limitnum = 1;
$BROWSE = 'timemodified';
$orderby = 'timemodified ASC';
switch ($this->config->type) {
case BGR_RANDOMLY:
$i = rand(1,$numberofentries);
$limitfrom = $i-1;
$SORT = 'ASC';
break;
case BGR_NEXTONE:
@@ -104,11 +103,10 @@ class block_glossary_random extends block_base {
$i = 1;
}
$limitfrom = $i-1;
$SORT = 'ASC';
break;
case BGR_NEXTALPHA:
$BROWSE = 'concept';
$orderby = 'concept ASC';
if (isset($this->config->previous)) {
$i = $this->config->previous + 1;
} else {
@@ -118,20 +116,19 @@ class block_glossary_random extends block_base {
$i = 1;
}
$limitfrom = $i-1;
$SORT = 'ASC';
break;
default: // BGR_LASTMODIFIED
$i = $numberofentries;
$limitfrom = 0;
$SORT = 'DESC';
$orderby = 'timemodified DESC, id DESC';
break;
}
if ($entry = $DB->get_records_sql("SELECT id, concept, definition, definitionformat, definitiontrust
FROM {glossary_entries}
WHERE glossaryid = ? AND approved = 1
ORDER BY $BROWSE $SORT", array($this->config->glossary), $limitfrom, $limitnum)) {
ORDER BY $orderby", array($this->config->glossary), $limitfrom, $limitnum)) {
$entry = reset($entry);
+3
View File
@@ -56,5 +56,8 @@ function xmldb_block_html_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;
}
+3
View File
@@ -81,5 +81,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// 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;
}
@@ -36,31 +36,6 @@ defined('MOODLE_INTERNAL') || die();
*/
class block_online_users_generator extends testing_block_generator {
/**
* Create new block instance
* @param array|stdClass $record
* @param array $options
* @return stdClass activity record with extra cmid field
*/
public function create_instance($record = null, array $options = null) {
global $DB, $CFG;
require_once("$CFG->dirroot/mod/page/locallib.php");
$this->instancecount++;
$record = (object)(array)$record;
$options = (array)$options;
$record = $this->prepare_record($record);
$id = $DB->insert_record('block_instances', $record);
context_block::instance($id);
$instance = $DB->get_record('block_instances', array('id'=>$id), '*', MUST_EXIST);
return $instance;
}
/**
* Create (simulated) logged in users and add some of them to groups in a course
*/
+3
View File
@@ -104,5 +104,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -90,5 +90,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -50,5 +50,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
upgrade_block_savepoint(true, 2015071700, 'rss_client');
}
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -36,7 +36,7 @@ class feed_edit_form extends moodleform {
function __construct($actionurl, $isadding, $caneditshared) {
$this->isadding = $isadding;
$this->caneditshared = $caneditshared;
parent::moodleform($actionurl);
parent::__construct($actionurl);
}
function definition() {
+12 -4
View File
@@ -40,7 +40,7 @@ class block_rss_client_cron_testcase extends advanced_testcase {
* than the current time the attempt is skipped.
*/
public function test_skip() {
global $DB;
global $DB, $CFG;
$this->resetAfterTest();
// Create a RSS feed record with a skip until time set to the future.
$record = (object) array(
@@ -57,8 +57,12 @@ class block_rss_client_cron_testcase extends advanced_testcase {
$block = new block_rss_client();
ob_start();
// Silence SimplePie php notices.
@$block->cron();
$errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
$block->cron();
error_reporting($errorlevel);
$cronoutput = ob_get_clean();
$this->assertContains('skipping until ' . userdate($record->skipuntil), $cronoutput);
$this->assertContains('0 feeds refreshed (took ', $cronoutput);
@@ -68,7 +72,7 @@ class block_rss_client_cron_testcase extends advanced_testcase {
* Test that when a feed has an error the skip time is increaed correctly.
*/
public function test_error() {
global $DB;
global $DB, $CFG;
$this->resetAfterTest();
$time = time();
// A record that has failed before.
@@ -113,8 +117,12 @@ class block_rss_client_cron_testcase extends advanced_testcase {
// Run the cron.
$block = new block_rss_client();
ob_start();
// Silence SimplePie php notices.
@$block->cron();
$errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
$block->cron();
error_reporting($errorlevel);
$cronoutput = ob_get_clean();
$skiptime1 = $record->skiptime * 2;
$message1 = 'http://example.com/rss Error: could not load/find the RSS feed - skipping for ' . $skiptime1 . ' seconds.';
+3
View File
@@ -92,5 +92,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -80,5 +80,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
// 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;
}
+3
View File
@@ -81,5 +81,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
// 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;
}
+5 -4
View File
@@ -141,14 +141,15 @@ if ($action === 'delete') {
// Output edit mode title.
echo $OUTPUT->heading($strblogs . ': ' . get_string('deleteentry', 'blog'), 2);
echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'),
new moodle_url('edit.php', $optionsyes),
new moodle_url('index.php', $optionsno));
echo '<br />';
// Output the entry.
$entry->prepare_render();
echo $output->render($entry);
echo '<br />';
echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'),
new moodle_url('edit.php', $optionsyes),
new moodle_url('index.php', $optionsno));
echo $OUTPUT->footer();
die;
}
+2 -2
View File
@@ -63,9 +63,9 @@ if ($entryid and !isset($userid)) {
$userid = $entry->userid;
}
if (isset($userid) && !isset($courseid)) {
if (isset($userid) && empty($courseid)) {
$context = context_user::instance($userid);
} else if (isset($courseid) && $courseid != SITEID) {
} else if (!empty($courseid) && $courseid != SITEID) {
$context = context_course::instance($courseid);
} else {
$context = context_system::instance();
+43
View File
@@ -0,0 +1,43 @@
@core @core_blog
Feature: Delete a blog entry
In order to manage my blog entries
As a user
I need to be able to delete entries I no longer wish to appear
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
And I log in as "testuser"
And I expand "Site pages" node
And I follow "Site blogs"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | Blog post one |
| Blog entry body | User 1 blog post content |
And I press "Save changes"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | Blog post two |
| Blog entry body | User 1 blog post content |
And I press "Save changes"
And I am on site homepage
And I expand "Site pages" node
And I follow "Site blogs"
Scenario: Delete blog post results in post deleted
Given I follow "Blog post one"
And I follow "Delete"
And I should see "Delete this blog entry?"
When I press "Continue"
Then I should not see "Blog post one"
And I should see "Blog post two"
Scenario: Delete confirmation screen works and allows cancel
Given I follow "Blog post one"
When I follow "Delete"
Then I should see "Delete this blog entry?"
And I press "Cancel"
And I should see "Blog post one"
And I should see "Blog post two"
+2
View File
@@ -2486,6 +2486,8 @@ function save_local_role_names($courseid, $data) {
$rolename->name = $value;
$DB->insert_record('role_names', $rolename);
}
// This will ensure the course contacts cache is purged..
coursecat::role_assignment_changed($roleid, $context);
}
}
+3 -2
View File
@@ -106,7 +106,8 @@ if (!empty($add)) {
$optionsyes = array('confirm'=>1, 'delete'=>$cm->id, 'sesskey'=>sesskey(), 'sr' => $sectionreturn);
$strdeletecheck = get_string('deletecheck', '', $fullmodulename);
$strdeletecheckfull = get_string('deletecheckfull', '', "$fullmodulename '$cm->name'");
$strparams = (object)array('type' => $fullmodulename, 'name' => $cm->name);
$strdeletechecktypename = get_string('deletechecktypename', '', $strparams);
$PAGE->set_pagetype('mod-' . $cm->modname . '-delete');
$PAGE->set_title($strdeletecheck);
@@ -117,7 +118,7 @@ if (!empty($add)) {
echo $OUTPUT->box_start('noticebox');
$formcontinue = new single_button(new moodle_url("$CFG->wwwroot/course/mod.php", $optionsyes), get_string('yes'));
$formcancel = new single_button($return, get_string('no'), 'get');
echo $OUTPUT->confirm($strdeletecheckfull, $formcontinue, $formcancel);
echo $OUTPUT->confirm($strdeletechecktypename, $formcontinue, $formcancel);
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+9 -2
View File
@@ -58,7 +58,7 @@ abstract class moodleform_mod extends moodleform {
/** @var object The course format of the current course. */
protected $courseformat;
function moodleform_mod($current, $section, $cm, $course) {
public function __construct($current, $section, $cm, $course) {
global $CFG;
$this->current = $current;
@@ -83,7 +83,14 @@ abstract class moodleform_mod extends moodleform {
}
$this->_modname = $matches[1];
$this->init_features();
parent::moodleform('modedit.php');
parent::__construct('modedit.php');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function moodleform_mod($current, $section, $cm, $course) {
self::__construct($current, $section, $cm, $course);
}
protected function init_features() {
+31
View File
@@ -0,0 +1,31 @@
@core @core_course
Feature: Rename roles in a course
In order to account for course-level differences
As a teacher
I need to be able to rename roles
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
Scenario: Teacher can rename roles
Given I log in as "teacher1"
And I follow "Course 1"
And I click on "Edit settings" "link" in the "Administration" "block"
And I should see "Role renaming"
When I set the following fields to these values:
| Your word for 'Teacher' | Lecturer |
| Your word for 'Student' | Learner |
And I press "Save and display"
And I navigate to "Enrolled users" node in "Course administration > Users"
Then I should see "Lecturer" in the "Teacher 1" "table_row"
And I should see "Learner" in the "Student 1" "table_row"
+3
View File
@@ -53,5 +53,8 @@ function xmldb_enrol_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;
}
+3
View File
@@ -54,5 +54,8 @@ function xmldb_enrol_flatfile_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;
}
+3
View File
@@ -63,6 +63,9 @@ function xmldb_enrol_guest_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;
}
+3
View File
@@ -56,5 +56,8 @@ function xmldb_enrol_imsenterprise_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;
}
+3
View File
@@ -72,6 +72,9 @@ function xmldb_enrol_manual_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2015091500, 'enrol', 'manual');
}
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -55,5 +55,8 @@ function xmldb_enrol_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;
}
+3
View File
@@ -70,5 +70,8 @@ function xmldb_enrol_paypal_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;
}
+3
View File
@@ -71,6 +71,9 @@ function xmldb_enrol_self_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
@@ -33,7 +33,7 @@ abstract class filter_local_settings_form extends moodleform {
public function __construct($submiturl, $filter, $context) {
$this->filter = $filter;
$this->context = $context;
parent::moodleform($submiturl);
parent::__construct($submiturl);
}
/**
+3
View File
@@ -109,5 +109,8 @@ MathJax.Hub.Config({
// 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;
}
+3
View File
@@ -78,5 +78,8 @@ function xmldb_filter_mediaplugin_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;
}
+3
View File
@@ -74,5 +74,8 @@ function xmldb_filter_tex_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
@@ -15,7 +15,7 @@
* external 'helper' binaries.
* Other platforms could/should be added
*/
function latex() {
public function __construct() {
global $CFG;
// construct directory structure
@@ -23,6 +23,13 @@
make_temp_directory('latex');
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function latex() {
self::__construct();
}
/**
* Accessor function for support_platform field.
* @return boolean value of supported_platform
+8 -1
View File
@@ -625,11 +625,18 @@ class grade_export_update_buffer {
/**
* Constructor - creates the buffer and initialises the time stamp
*/
public function grade_export_update_buffer() {
public function __construct() {
$this->update_list = array();
$this->export_time = time();
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function grade_export_update_buffer() {
self::__construct();
}
public function flush($buffersize) {
global $CFG, $DB;
+8 -1
View File
@@ -53,8 +53,15 @@ class moodlequickform_guideeditor extends HTML_QuickForm_input {
* @param string $elementlabel
* @param array $attributes
*/
public function __construct($elementname=null, $elementlabel=null, $attributes=null) {
parent::__construct($elementname, $elementlabel, $attributes);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function moodlequickform_guideeditor($elementname=null, $elementlabel=null, $attributes=null) {
parent::HTML_QuickForm_input($elementname, $elementlabel, $attributes);
self::__construct($elementname, $elementlabel, $attributes);
}
/**
+3
View File
@@ -62,5 +62,8 @@ function xmldb_gradingform_rubric_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;
}
+9 -2
View File
@@ -60,8 +60,15 @@ class MoodleQuickForm_rubriceditor extends HTML_QuickForm_input {
* @param string $elementLabel
* @param array $attributes
*/
function MoodleQuickForm_rubriceditor($elementName=null, $elementLabel=null, $attributes=null) {
parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
public function __construct($elementName=null, $elementLabel=null, $attributes=null) {
parent::__construct($elementName, $elementLabel, $attributes);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function MoodleQuickForm_rubriceditor($elementName=null, $elementLabel=null, $attributes=null) {
self::__construct($elementName, $elementLabel, $attributes);
}
/**
+25 -3
View File
@@ -1085,7 +1085,7 @@ class grade_plugin_return {
*
* @param array $params - associative array with return parameters, if null parameter are taken from _GET or _POST
*/
public function grade_plugin_return($params = null) {
public function __construct($params = null) {
if (empty($params)) {
$this->type = optional_param('gpr_type', null, PARAM_SAFEDIR);
$this->plugin = optional_param('gpr_plugin', null, PARAM_PLUGIN);
@@ -1102,6 +1102,13 @@ class grade_plugin_return {
}
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function grade_plugin_return($params = null) {
self::__construct($params);
}
/**
* Returns return parameters as options array suitable for buttons.
* @return array options
@@ -2033,7 +2040,7 @@ class grade_seq extends grade_structure {
* @param bool $category_grade_last category grade item is the last child
* @param bool $nooutcomes Whether or not outcomes should be included
*/
public function grade_seq($courseid, $category_grade_last=false, $nooutcomes=false) {
public function __construct($courseid, $category_grade_last=false, $nooutcomes=false) {
global $USER, $CFG;
$this->courseid = $courseid;
@@ -2049,6 +2056,13 @@ class grade_seq extends grade_structure {
}
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function grade_seq($courseid, $category_grade_last=false, $nooutcomes=false) {
self::__construct($courseid, $category_grade_last, $nooutcomes);
}
/**
* Static recursive helper - makes the grade_item for category the last children
*
@@ -2185,7 +2199,7 @@ class grade_tree extends grade_structure {
* @param array $collapsed array of collapsed categories
* @param bool $nooutcomes Whether or not outcomes should be included
*/
public function grade_tree($courseid, $fillers=true, $category_grade_last=false,
public function __construct($courseid, $fillers=true, $category_grade_last=false,
$collapsed=null, $nooutcomes=false) {
global $USER, $CFG, $COURSE, $DB;
@@ -2229,6 +2243,14 @@ class grade_tree extends grade_structure {
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function grade_tree($courseid, $fillers=true, $category_grade_last=false,
$collapsed=null, $nooutcomes=false) {
self::__construct($courseid, $fillers, $category_grade_last, $collapsed, $nooutcomes);
}
/**
* Static recursive helper - removes items from collapsed categories
*
+3 -2
View File
@@ -36,6 +36,7 @@ if (!$course = $DB->get_record('course', array('id' => $courseid))) {
print_error('nocourseid');
}
require_login(null, false);
$PAGE->set_course($course);
$context = context_course::instance($course->id);
$systemcontext = context_system::instance();
@@ -64,9 +65,9 @@ if (isset($personalcontext) && $courseid == SITEID) {
if ($userid == $USER->id) {
$settings = $PAGE->settingsnav->find('mygrades', null);
$settings->make_active();
} else if ($courseid != SITEID) {
} else if ($courseid != SITEID && $userid) {
// Show some other navbar thing.
$user = $DB->get_record('user', array('id' => $userid));
$user = $DB->get_record('user', array('id' => $userid), '*', MUST_EXIST);
$PAGE->navigation->extend_for_user($user);
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_gradereport_user_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
@@ -33,7 +33,7 @@ if (file_exists(dirname(dirname(__FILE__)).'/config.php')) {
// MDL-43839 IE9 cannot handle all of our css.
// Once IE9 is no longer supported we can include 'bootstrapbase/style/moodle.css'
// and remove some of the CSS in $content.
$files = array('');
$files = array();
$content = '';
+1
View File
@@ -35,6 +35,7 @@ $string['cliansweryes'] = 'Да';
$string['cliincorrectvalueerror'] = 'Грешка, некоректна стойност "{$a->value}" за "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Неправилна стойност. Моля опитайте отново';
$string['clitypevalue'] = 'Тип стойност';
$string['clitypevaluedefault'] = 'въведете стойност, натиснете Enter за да се използва стойността по подразбиране ({$a})';
$string['cliyesnoprompt'] = 'Въведете y (означава да) или n (означава не)';
$string['environmentrequireinstall'] = 'Трябва да бъде инсталиран и разрешен';
$string['environmentrequireversion'] = 'Необходима е версия {$a->needed} а Вие имате {$a->current}';
+1 -1
View File
@@ -79,7 +79,7 @@ $string['phpversion'] = 'Verze PHP';
$string['phpversionhelp'] = '<p>Moodle vyžaduje PHP alespoň verze 4.3.0 nebo 5.1.0 (PHP 5.0.x obsahuje množství chyb).</p>
<p>Nyní používáte PHP verze {$a}.</p>
<p>Musíte PHP upgradovat, nebo přejít k hostiteli s vyšší verzí!<br />
(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x či 4.3.x.)</p>';
(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x )</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Podařilo se vám úspěšně nainstalovat a spustit balíček <strong>{$a->packname} {$a->packversion}</strong>. Gratulujeme!';
$string['welcomep30'] = '<strong>{$a->installername}</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Jazyk';
$string['moodlelogo'] = 'Moodle logo';
$string['next'] = 'Další';
$string['previous'] = 'Předchozí';
$string['reload'] = 'Obnovit';
+1 -1
View File
@@ -48,7 +48,7 @@ $string['environmentsub2'] = 'Iga Moodle väljalaskel on oma minimaalne PHP vers
Täielik keskkonna kontroll tehakse enne iga installeerimist ja uuendamist. Palun võta ühendust serveri administraatoriga, kui sa ei sa kuidas installeerida või võimaldada PHP laiendusi.';
$string['errorsinenvironment'] = 'Keskkonna sobivuse kontroll ebaõnnestus!';
$string['installation'] = 'Installeerimine';
$string['langdownloaderror'] = 'Kahjuks keelt "{$a}" ei paigaldatud. Paigaldamine jätkub inglise keeles.';
$string['langdownloaderror'] = 'Kahjuks ei õnnestunud alla laadida keelt "{$a}". Paigaldamine jätkub inglise keeles.';
$string['memorylimithelp'] = '<p>PHP mälu limiit sinu serveri jaoks on hetkel {$a}.</p>
<p>See võib hiljem tekitada Moodle\'il mäluprobleeme, eriti kui sul on palju mooduleid ja/või kasutajaid.
</p>
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Hizkuntza';
$string['moodlelogo'] = 'Moodle-ren logoa';
$string['next'] = 'Hurrengoa';
$string['previous'] = 'Aurrekoa';
$string['reload'] = 'Berriz kargatu';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Langue';
$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Suivant';
$string['previous'] = 'Précédent';
$string['reload'] = 'Actualiser';
+1 -1
View File
@@ -36,7 +36,7 @@ $string['cliincorrectvalueerror'] = 'שגיאה: ערך לא תקין
"{$a->value}" עבור "{$a->option}"';
$string['cliincorrectvalueretry'] = 'ערך שגוי, נסה שנית';
$string['clitypevalue'] = 'סוג הערך';
$string['clitypevaluedefault'] = 'סוג הערך, הקש Enter לשימוש בערך ברירת מחדל ({$a})';
$string['clitypevaluedefault'] = 'יש להזין ערך, או להקיש על כפתור Enter לשימוש בערך בררת־המחדל ({$a})';
$string['cliunknowoption'] = 'אפשרויות לא מוכרות :
{$a}
אנא השתמש באפשרות העזרה.';
+3 -3
View File
@@ -32,8 +32,8 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'ספריית מנהל המערכת';
$string['availablelangs'] = 'חבילות שפה זמינות';
$string['chooselanguagehead'] = 'בחר שפה';
$string['chooselanguagesub'] = 'אנא בחר שפה עבור ההתקנה בלבד. תוכל לבחור בשפה שונה לאתר ולמשתמש באחד מהמסכים הבאים.';
$string['chooselanguagehead'] = 'בחירת שפה';
$string['chooselanguagesub'] = 'יש לבחור שפה עבור ההתקנה בלבד. תוכל לבחור בשפה שונה לאתר ולמשתמש באחד מהמסכים הבאים.';
$string['clialreadyconfigured'] = 'קובץ config.php כבר קיים, אנא השתמש ב
admin/cli/install_database.php
אם ברצונך להתקין את אתר זה.';
@@ -42,7 +42,7 @@ $string['clialreadyinstalled'] = 'קובץ ה-config.php קיים כבר, אנא
$string['cliinstallheader'] = 'תוכנית התקנת Moodle {$a} בשורת הפקודה';
$string['databasehost'] = 'מסד הנתונים המארח (host)';
$string['databasename'] = 'שם מסד הנתונים';
$string['databasetypehead'] = 'בחר התקן מסד הנתונים';
$string['databasetypehead'] = 'בחירת התקן מסד הנתונים';
$string['dataroot'] = 'ספריית הנתונים';
$string['datarootpermission'] = 'הרשאות תיקיות bתונים (data)';
$string['dbprefix'] = 'Tables prefix';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Nyelv';
$string['moodlelogo'] = 'Moodle-logó';
$string['next'] = 'Következő';
$string['previous'] = 'Előző';
$string['reload'] = 'Újbóli betöltés';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Lingua';
$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Successivo';
$string['previous'] = 'Precedente';
$string['reload'] = 'Ricarica';
+1 -1
View File
@@ -31,7 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Administratoriaus katalogas';
$string['availablelangs'] = 'Galimų kalbų sąrašas';
$string['availablelangs'] = 'Galimi kalbų paketai';
$string['chooselanguagehead'] = 'Pasirinkite kalbą';
$string['chooselanguagesub'] = 'Pasirinkite diegimo kalbą. Ši kalba bus naudojama ir kaip numatytoji svetainės kalba, nors vėliau ją bus galima pakeisti.';
$string['clialreadyconfigured'] = 'Failas config.php jau yra, prašau naudoti admin/cli/install_database.php jei norite įrašyti šią svetainę.';
+2 -1
View File
@@ -66,7 +66,8 @@ $string['pathshead'] = 'Bekreft stier';
$string['pathsrodataroot'] = 'Dataroot katalog er ikke skrivbar.';
$string['pathsroparentdataroot'] = 'Overordnet katalog ({$a->parent}) er ikke skrivbar. Datakatalogen ({$a->dataroot}) kan ikke opprettes av installasjonsprogrammet.';
$string['pathssubadmindir'] = 'Noen ganske få webhoteller bruker /admin som en egen url for å få tilgang til et kontrollpanel. Dessverre kommer det i konflikt med standard lokalisering av Moodle sine admin-sider. Du kan fikse dette ved å endre navn på admin-mappen og deretter oppgi dette navnet her. F.eks. <em>moodleadmin</em>. Dette vil fikse adminlenkene i Moodle.';
$string['pathssubdataroot'] = 'Du trenger et sted hvor Moodle kan lagre opplastede filer. Denne mappen må være med lese og skriverettigheter for webserver-brukeren (veldig ofte \'nobody\' eller \'apache\'), men denne mappen må IKKE være direkte tilgjengelig via web. Installasjonsprogrammet vil forsøke å opprette den om den ikke finnes fra før.';
$string['pathssubdataroot'] = '<p>En mappe der Moodle kan lagre alt filinnhold lastet opp av brukere. </p><p>Denne mappen må være både lesbar og skrivbar for webserverbrukeren (vanligvis \'www-data\', \'nobody\' eller \'apache\').</p><p>Den må ikke være direkte tilgjengelid over internett.</p>
<p>Hvis mappen ikke allerede eksisterer, vil installasjonsprosessen forsøke å opprette den.</p>';
$string['pathssubdirroot'] = '<p>Full mappesti til moodleinstallasjonen.</p>';
$string['pathssubwwwroot'] = '<p>Full webadresse til der hvor Moodle skal vises, altså den addressen som brukere skriver inn i adresselinjen i nettlseren sin.</p>
<p>Det er ikke mulig å bruke Moodle med mer enn en adresse. Dersom portalen din har flere webadresser bør du oppgi den enkleste av de her, og bruke videresending for hver av de andre adressene.</p>
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Språk';
$string['moodlelogo'] = 'Moodlelogo';
$string['next'] = 'Neste';
$string['previous'] = 'Forrige';
$string['reload'] = 'Last på nytt';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Język';
$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Dalej';
$string['previous'] = 'Poprzedni';
$string['reload'] = 'Odśwież';
+1
View File
@@ -42,3 +42,4 @@ Vă rugăm folosiţi --opţiunea Ajutor.';
$string['cliyesnoprompt'] = 'introduceţi d (pentru \'da\') sau \'n\' (pentru \'nu\')';
$string['environmentrequireinstall'] = 'trebuie instalat şi activat';
$string['environmentrequireversion'] = 'versiuna necesară este {$a->needed} în timp ce dumneavoastră rulaţi versiunea {$a->current}';
$string['upgradekeyset'] = 'Actualizează cheie (lăsați gol pentru a nu fi setat)';
+1
View File
@@ -31,6 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Limba';
$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Următorul';
$string['previous'] = 'Precedent';
$string['reload'] = 'Reîncarcă';

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