Compare commits

..

1866 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 1174a463f3 Moodle release 2.9.7 2016-07-10 00:29:12 +02:00
Eloy Lafuente (stronk7) 33d0756aac Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-07-10 00:29:07 +02:00
Jake Dallimore 41d01a8f98 MDL-53431 tool_monitor: Access control for tool monitor subscriptions 2016-07-05 10:47:02 +08:00
Marina Glancy 67889ed5be MDL-55069 core: escape special characters in email headers 2016-07-04 12:28:09 +01:00
Andrew Nicols 65c1213e00 Merge branch 'MDL-53019_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2016-07-04 09:14:43 +08:00
AMOS bot df4907d146 Automatically generated installer lang files 2016-07-02 00:05:34 +08:00
Eloy Lafuente (stronk7) 85d91d18b4 MDL-53019 environment: 3.2 requirements added
Changes:
 - PHP 5.6.5 required
2016-07-01 13:50:14 +02:00
AMOS bot b0dd37fa73 Automatically generated installer lang files 2016-06-28 00:06:26 +08:00
AMOS bot 4f5fba677a Automatically generated installer lang files 2016-06-22 00:06:50 +08:00
AMOS bot 95ac714f8f Automatically generated installer lang files 2016-06-21 00:06:10 +08:00
AMOS bot 1ea01c9c50 Automatically generated installer lang files 2016-06-21 00:06:09 +08:00
AMOS bot 94587407ec Automatically generated installer lang files 2016-06-20 00:05:26 +08:00
AMOS bot f3076b17b4 Automatically generated installer lang files 2016-06-04 00:04:54 +08:00
AMOS bot b54ac35cb3 Automatically generated installer lang files 2016-06-02 00:04:42 +08:00
AMOS bot 8b3a8b9438 Automatically generated installer lang files 2016-05-25 00:05:08 +08:00
AMOS bot e3e619e845 Automatically generated installer lang files 2016-05-24 00:04:48 +08:00
Dan Poltawski c345c3a460 weekly release 2.9.6+ 2016-05-20 10:15:27 +01:00
Dan Poltawski 81b1e515f4 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-05-20 10:15:24 +01:00
Andrew Nicols 218d2c0eb3 Merge branch 'wip-mdl-54564-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-05-18 12:27:06 +08:00
Andrew Nicols 81fcfc2065 MDL-54620 rating: Add tests for get_aggregate_string 2016-05-18 12:13:06 +08:00
Andrew Nicols 5c18bd041a Merge branch 'MDL-54620_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-05-18 12:11:49 +08:00
Rajesh Taneja ad1b3e2a11 MDL-54564 behat: Wait after hover, to ensure page is ready 2016-05-18 11:17:32 +08:00
Kevin Wiliarty e647d73811 MDL-54620 ratings: display '0' when aggregate = 0 2016-05-18 07:38:06 +08:00
AMOS bot 554826ec78 Automatically generated installer lang files 2016-05-15 00:05:13 +08:00
AMOS bot d23c5c8c8d Automatically generated installer lang files 2016-05-10 00:05:03 +08:00
Eloy Lafuente (stronk7) 9ea5796a63 Moodle release 2.9.6 2016-05-08 00:23:51 +02:00
Dan Poltawski 061fd45c33 Merge branch 'MDL-54042-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2016-05-06 14:09:28 +01:00
Damyon Wiese 178d87e0b6 MDL-54042 user: Add unit test to cover change 2016-05-06 16:43:56 +08:00
Damyon Wiese ebdec47991 MDL-54042 user: Fix debugging in core_user_get_users_by_field
The course object returned by enrol_get_all_users_courses does not include the defaultgroupingid.

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

All the other group info is returned (groupmode) etc - so it makes sense to also return this extra field.
2016-05-06 16:43:56 +08:00
David Monllao 18c4978bba weekly release 2.9.5+ 2016-05-06 16:14:59 +08:00
David Monllao 383b1ae15d Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-05-06 16:14:57 +08:00
Andrew Nicols b53f8c676c Merge branch 'wip-mdl-53701-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-05-06 10:14:48 +08:00
Dan Poltawski 6cae543378 MDL-54062 bootstrapbase: remove unused less file
This file has never been included in our CSS.
2016-05-06 09:46:46 +08:00
Eloy Lafuente (stronk7) 53a51dab0a MDL-53944 dml: make char2real() for mysql to support decimals
- With the patch, 6 positions of scale accuracy are guaranteed
  per individual casted value.
- Backed with unit tests, both for varchar and clob.
- Added 2 missing tests about uses of the method with params
  and values.

Note: 6 was picked because looking to all databases implementation
postgres was found to be casting to real, aka, 6.
2016-05-06 09:46:45 +08:00
Adam Olley cf0374d303 MDL-54007 mod_assign: Limit unit tests to core plugins
Without this change, the unit tests make assumptions for the output of
mod_assign functions/webservices that do not hold true when 3rd party
submission and feedback plugins are installed.
2016-05-06 09:46:45 +08:00
Simey Lameze 3194244721 MDL-53913 core_user: make parameters consistent across versions 2016-05-06 09:46:44 +08:00
Fred Woolard b1b9ddc302 MDL-53713 core: account for session_start returning false 2016-05-06 09:46:44 +08:00
David Monllao 9e96e0b36f MDL-53750 shibboleth: Passing a var to empty for PHP 5.4 2016-05-06 09:46:44 +08:00
John Okely 93b0e733cc MDL-53750 auth: fix logout bug in shibboleth
Original patch by Dr. Michael Schneider
2016-05-06 09:46:43 +08:00
Frederic Massart 16227d8ef3 MDL-51369 course: Adding tests to cover restoring course info 2016-05-06 09:46:43 +08:00
Frederic Massart 2950f9fb91 MDL-51369 backup: Respect capabilities when restoring course info
In short, when a user is creating a new course they can set
the ID number, shortname, fullname and summary. However, when
they merge a backup into a course they need the permissions to do so.
2016-05-06 09:46:43 +08:00
Frederic Massart 872fe961f8 MDL-53954 user: Prevent locked profile fields from being edited 2016-05-06 09:46:42 +08:00
Andrew Nicols d98c246599 MDL-53755 forum: Check session when marking posts 2016-05-06 09:46:42 +08:00
Andrew Nicols bc890913fe MDL-53696 forum: Check discussion in forum 2016-05-06 09:46:42 +08:00
Tim Hunt 6739845c85 MDL-53589 badges: fix capability check 2016-05-06 09:46:41 +08:00
Dan Marsden aaa49aa835 MDL-53546 SCORM: Set window.opener to null 2016-05-06 09:46:41 +08:00
Rajesh Taneja 8ed8c68dfb MDL-53701 core_lib: use date_format_string for utf8
So when language is different say Hebrew then
it would pic codepage-1255. As  is json_encoded
we need to ensure we get utf8 string. so use
date_format_string instead
2016-05-05 16:36:33 +08:00
AMOS bot 6a59a0b349 Automatically generated installer lang files 2016-05-05 00:04:50 +08:00
Dan Poltawski 1cb6ac499a weekly release 2.9.5+ 2016-05-03 20:38:05 +01:00
Dan Poltawski 9a5709f474 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-05-03 20:38:03 +01:00
Dan Poltawski efa18040dc Merge branch 'wip-MDL-53402-29-v2' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2016-05-03 09:13:29 +01:00
Dan Poltawski f2aa7e7bd9 MDL-54008 tests: clarify comment in tz test 2016-05-03 09:10:31 +01:00
Dan Poltawski fe404e039c Merge branch 'MDL-54008_29-normalise' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-05-03 09:09:08 +01:00
Adrian Greeve 2a8f372e1c MDL-53402 mod_data: field values of 0 are now displayed. 2016-05-03 15:09:22 +08:00
David Monllao a9cca2b893 MDL-54008 tz: Unexisting tz with decimals fallback to rounded down integer 2016-05-03 14:02:13 +08:00
David Monllao ae77a3d6d1 Merge branch 'wip-MDL-53402-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2016-05-03 13:03:55 +08:00
Adrian Greeve 85ac3cdbb0 MDL-53402 mod_data: Added custom validation code for data fields.
Added custom validation to radiobutton, menu, and checkbox.
2016-05-03 12:54:49 +08:00
David Monllao 809233d23f Merge branch 'MDL-51142-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2016-05-03 09:59:18 +08:00
Dan Poltawski 166a09028f Merge branch 'wip-MDL-53402-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2016-05-02 17:06:28 +01:00
Dan Poltawski a34068d126 Merge branch 'MDL-54019_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2016-05-02 16:57:14 +01:00
Dan Poltawski 7d0051154e Merge branch 'wip-mdl-53861-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-05-02 16:55:53 +01:00
Mark Nelson d19d7309e6 MDL-54019 core_behat: fixed typo 2016-05-02 18:12:06 +08:00
Dan Poltawski ecccb0d30c Merge branch 'wip_MDL-53033_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2016-05-02 10:17:11 +01:00
Dan Poltawski 3ece99e9d0 Merge branch 'MDL-53904-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-05-02 10:16:38 +01:00
Dan Poltawski 283375144b Merge branch 'MDL-54008_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-05-02 09:52:25 +01:00
Damyon Wiese 6d9f6af6ef MDL-51142 assign: Fix for group assignments with NEW status 2016-05-02 16:44:48 +08:00
Clement Smith 5056eeab3a MDL-51142 mod/assign: Fix erroneous submission status display
This prevents display of submission time/date when the assignment
submission record is in a new state. It also keeps the display of
overdue assignments identical for those students who have viewed
the assignment yet not submitted, for those students who have
not viewed the assignment, and for those students who have not
viewed the assignment yet the instructor has accessed the grading
page.
2016-05-02 16:44:47 +08:00
Rajesh Taneja 99913f0b50 MDL-53861 behat: o/p buffer is not used in Behat 2.5.x
Don't need ob_flush() as o/p is not buffered
in behat 2.5.x
2016-05-02 15:55:18 +08:00
David Monllao 9b9c08cdbb Merge branch 'MDL-53901-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2016-05-02 15:54:26 +08:00
David Monllao 4f3a6d382e Merge branch 'MDL-53635-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-05-02 15:38:31 +08:00
Juan Leyva 47f7b1e386 MDL-53635 message_airnotifier: Remove tags from notifications 2016-05-02 09:33:29 +02:00
David Monllao e50f5d51a5 MDL-54008 timezone: Updating references to Caracas tz.
I've removed Caracas direct references because it would fail on
some systems, it would depend on how updated is the olson version
PHP is using.
2016-05-02 15:07:20 +08:00
Adrian Greeve 0f8a2d6734 MDL-53402 mod_data: Behat test for entering zero in required fields. 2016-05-02 13:40:10 +08:00
Adrian Greeve c01cbb3e1a MDL-53402 mod_data: Required fields can contain 0.
The number and text field would not accept 0 as a
valid response.
2016-05-02 13:40:05 +08:00
Damyon Wiese 44465eddef MDL-53901 login: Redirect to https if loginhttps is enabled
This just prevents a double redirect.
2016-05-02 11:22:17 +08:00
David Monllao ded031cfc8 Merge branch 'MDL-53980-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-05-02 10:47:59 +08:00
AMOS bot 9a7adbcd32 Automatically generated installer lang files 2016-05-02 00:04:37 +08:00
AMOS bot d3d1f84271 Automatically generated installer lang files 2016-04-30 00:07:10 +08:00
Dan Poltawski 4039f94021 weekly release 2.9.5+ 2016-04-29 12:26:59 +01:00
Andrew Nicols 382274be5b MDL-53858 quiz accessibility: Correct aria-labelledby attribute 2016-04-29 12:14:24 +01:00
Andrew Nicols 9909401af4 Merge branch 'MDL-53858_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-04-29 12:14:23 +01:00
David Monllao c3732af3f3 Merge branch 'MDL-53928_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2016-04-29 12:14:23 +01:00
Helen Foster 180e818331 MDL-53980 lang: Merge English strings from the en_fix language pack 2016-04-29 08:10:32 +02:00
Marina Glancy a94e86d9cc MDL-53904 course: apply default completion when approving request 2016-04-27 15:57:15 +08:00
Henning Bostelmann 2779372c17 MDL-53780 mod_assign: Remove teachers from submission group members 2016-04-26 15:38:01 +01:00
Dan Poltawski 7159a9ab0c Merge branch 'MDL-53855_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-04-26 11:18:31 +01:00
Dan Poltawski 953b8cb7c8 weekly release 2.9.5+ 2016-04-26 09:28:25 +01:00
David Monllao 8c1d988566 Merge branch 'MDL-52550-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-04-26 11:12:58 +08:00
Dan Poltawski f570ad59cf Merge branch 'MDL-49754-29' of https://github.com/xow/moodle into MOODLE_29_STABLE 2016-04-25 14:38:46 +01:00
Eloy Lafuente (stronk7) 0138da3949 MDL-53928 environment: add xmlreader requirement for 3.1 2016-04-24 01:36:46 +02:00
Eloy Lafuente (stronk7) e7975d1443 weekly release 2.9.5+ 2016-04-22 10:57:04 +02:00
Panagiotis Nikoloutsopoulos 753cde3442 MDL-52550 atto: Added preventDefaults for events dragover and dragenter 2016-04-21 15:11:35 +08:00
Dan Poltawski 38dbbecc4d Merge branch 'wip-MDL-52642-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2016-04-20 13:48:39 +01:00
Dan Poltawski 9b2faf2056 Merge branch 'MDL-53095-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2016-04-20 11:52:16 +01:00
David Monllao af61aeda9b Merge branch 'MDL-53757_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2016-04-20 15:53:42 +08:00
Nick Phillips 9abda98e48 MDL-53757 core_calendar: always show whole day's events in 'day' view 2016-04-20 15:49:41 +08:00
David Monllao be0f46f922 Merge branch 'MDL-53676_29' of https://github.com/wjroes/moodle into MOODLE_29_STABLE 2016-04-20 11:17:07 +08:00
Eloy Lafuente (stronk7) 75dcdc098e Merge branch 'MDL-53660-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-04-20 01:20:21 +02:00
Andrew Nicols 35720ce43b Merge branch 'MDL-53779-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2016-04-19 10:37:04 +08:00
Eloy Lafuente (stronk7) 2e97e1fee1 Merge branch 'MDL-53796_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-04-19 01:59:01 +02:00
Tim Hunt 4ead6b97f0 MDL-53858 quiz accessibility: nav block should have role='navigation' 2016-04-18 17:37:22 +01:00
Tim Hunt 46b091a67e MDL-53855 accessibility: navbar should be in exactly one nav region
And that should be labelled.
2016-04-18 16:57:06 +01:00
Eloy Lafuente (stronk7) b61f86a052 weekly release 2.9.5+ 2016-04-15 10:19:14 +02:00
Eloy Lafuente (stronk7) 867824322f Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-04-15 10:19:09 +02:00
Mark Nielsen 92f2b31f74 MDL-53660 mod_forum: Fix link decoding in single discussions
This only happens when user data is not included.
2016-04-13 16:00:58 +01:00
Gareth J Barnard 445312d685 MDL-53033 themes: Invalid attribute values for div.c1.btn. 2016-04-13 12:56:13 +01:00
Dan Poltawski 59d7b59a0b Revert "Merge branch 'MDL-52944-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE"
This reverts commit e0339be416, reversing
changes made to a6d9d5f7e4.
2016-04-13 10:49:08 +01:00
David Risner 54df1bdcf7 MDL-53095 repository_merlot: change merlot url use https 2016-04-13 15:11:49 +08:00
David Monllao 256cd103ba MDL-53796 behat: Move get_debug_text to base class 2016-04-13 10:37:10 +08:00
AMOS bot 48d1f7267b Automatically generated installer lang files 2016-04-13 00:04:34 +08:00
Dan Poltawski bf980316b0 Merge branch 'MDL-52263-29' of git://github.com/crazyserver/moodle into MOODLE_29_STABLE 2016-04-12 16:50:32 +01:00
Pau Ferrer Ocaña 88546dad6b MDL-52263 libraries: Add test cases to external_format_text options 2016-04-12 15:04:46 +02:00
Pau Ferrer Ocaña f32bd23f8f MDL-52263 libraries: Add options to external_format_text 2016-04-12 14:56:19 +02:00
Dan Poltawski e0339be416 Merge branch 'MDL-52944-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-04-12 13:13:59 +01:00
Frederic Massart fefe867a72 MDL-53779 external: get_string and get_strings use PARAM_RAW
For the string parameters and translated strings.
2016-04-12 17:04:50 +08:00
spvickers eb81e0b50a MDL-49754 mod_lti: Fixes to JSON format
@id elements in JSON corrected to match the IMS spec.  Version number of
the service updated.
2016-04-12 15:50:02 +08:00
Adrian Greeve a1468ef48b MDL-52642 blog: Fix notices for swapping contexts in activities. 2016-04-12 13:55:08 +08:00
Stephen Bourget 795e302ea4 MDL-52642 block_blog_menu: behat test 2016-04-12 13:54:58 +08:00
David Monllao a6d9d5f7e4 Merge branch 'MDL-53007_29_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_29_STABLE 2016-04-12 11:31:41 +08:00
David Monllao ff51028d8d Merge branch 'MDL-53770-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-04-12 10:54:34 +08:00
Dan Poltawski e43bea4883 Merge branch 'MDL-53417-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-04-11 16:37:09 +01:00
Dan Poltawski 3f80f680ad Merge branch 'MDL-53674-29-eventmsg' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-04-11 14:29:16 +01:00
Dan Poltawski 5f100892d0 Merge branch 'MDL-53728_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-04-11 14:10:24 +01:00
Dan Poltawski e561b3b818 Merge branch 'MDL-52338-29' of https://github.com/dg711/moodle into MOODLE_29_STABLE 2016-04-11 13:53:22 +01:00
Andrew Nicols 6837221beb MDL-52942 forum: Allow posting to multiple groups in eachuser forums 2016-04-11 12:45:17 +08:00
Devang Gaur 475c4d7ca8 MDL-52338 blocks: message link should not appear when set false 2016-04-11 08:31:22 +05:30
Marina Glancy 95a2aa2e1c MDL-53770 mod_lti: allow to uninstall ltisource plugins 2016-04-11 09:04:46 +08:00
David Mudrák a3ac5646e4 MDL-53674 event monitor: Do not send HTML as plain text formatted emails
There were two problems here.

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

The patch makes sure that the original template is always formatted into
HTML and then converted to plain text before setting the text/plain
multipart of the sent email.
2016-04-08 15:15:18 +02:00
Cameron Ball 91a5c94a00 MDL-52944 atto: Use event-key to handle enter key 2016-04-08 12:37:05 +08:00
Panagiotis Nikoloutsopoulos 44019add1f MDL-52944 atto: Contenteditable command 'FormatBlock' set to 'p' 2016-04-08 12:37:04 +08:00
Mark Johnson e938870101 MDL-53007 block_navigation: Set width of item text to prevent overflow 2016-04-07 11:48:03 +01:00
Andrew Nicols 98eb681cc0 weekly release 2.9.5+ 2016-04-07 14:00:36 +08:00
Andrew Nicols d414753678 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-04-07 14:00:33 +08:00
Willem Roes 451d540527 MDL-53676 block_navigation: fix incorrect array iteration 2016-04-07 07:46:45 +02:00
Rajesh Taneja aab5ef2cbc MDL-52502 behat: Flush buffer to show differences 2016-04-07 09:39:37 +08:00
AMOS bot 378b622a09 Automatically generated installer lang files 2016-04-07 00:05:17 +08:00
Dan Poltawski 888adbee07 Merge branch 'MDL-53000-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-04-06 15:48:03 +01:00
Tim Hunt 6e56027b5b MDL-53728 question import/export: improve form structure 2016-04-06 15:36:30 +01:00
Juan Leyva bc1ded6ef4 MDL-53000 mod_assign: Unit tests for get_file_areas 2016-04-06 12:56:58 +02:00
Andrew Nicols ff0cc2dc3c Merge branch 'wip-mdl-53381-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-04-06 12:24:58 +08:00
Rajesh Taneja ec0a000564 MDL-53381 behat: Add support to execute step api
With chain step deprecation, execute api will
help user to execute step api and backport it
2016-04-06 11:00:14 +08:00
Eloy Lafuente (stronk7) e596ea8ca5 Merge branch 'MDL-53115-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-04-06 03:33:17 +02:00
Andrew Nicols 10c227830e MDL-53461 assign: Unit test regex fix 2016-04-06 08:57:13 +08:00
Andrew Nicols 1b46b00f98 Merge branch 'MDL-53461-29' of git://github.com/crazyserver/moodle into MOODLE_29_STABLE 2016-04-06 08:57:04 +08:00
Eloy Lafuente (stronk7) 1f7044c5b9 MDL-52502 behat: clean 2 uses of method and fix upgrade.txt version 2016-04-06 00:27:23 +02:00
Eloy Lafuente (stronk7) dfaf8c5ad8 Merge branch 'wip-mdl-52502-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-04-06 00:25:16 +02:00
Eloy Lafuente (stronk7) 61b4aaab0a Merge branch 'MDL-53671-29' of git://github.com/dpalou/moodle into MOODLE_29_STABLE 2016-04-06 00:04:45 +02:00
Eloy Lafuente (stronk7) 9b59cfbb52 Merge branch 'MDL-53647_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-04-05 22:00:39 +02:00
Dan Poltawski 01d1a3300b Merge branch 'MDL-53000-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-04-05 14:34:14 +01:00
Dan Poltawski aa86e76af8 Merge branch 'MDL-53175-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-04-05 12:17:45 +01:00
Pau Ferrer Ocaña de14b56501 MDL-53461 assign: Fix intro images to be shown in the mobile app 2016-04-05 09:33:44 +02:00
Andrew Nicols ef19640b64 Merge branch 'MDL-53500-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-04-05 12:28:50 +08:00
Rajesh Taneja b2095de913 MDL-52502 behat: Ensure php web and cli version is same 2016-04-05 11:48:26 +08:00
Rajesh Taneja bc4ad1c39e MDL-52502 phpunit: Add php, db and os deatils 2016-04-05 11:48:25 +08:00
Eloy Lafuente (stronk7) d59e64b4f1 Merge branch 'MDL-53256-m29' of https://github.com/micaherne/moodle into MOODLE_29_STABLE 2016-04-04 19:03:02 +02:00
Dan Poltawski 5e01d61014 Merge branch 'wip-MDL-49861-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2016-04-04 12:10:21 +01:00
Michael Aherne b2c13a1120 MDL-53256 cache: Prevent overwriting of cache config with invalid data 2016-04-04 08:55:39 +01:00
Andrew Nicols a39a67a436 Merge branch 'MDL-53661_29' of https://github.com/sam-moodle/moodle into MOODLE_29_STABLE 2016-04-04 12:26:21 +08:00
Andrew Nicols 27cc73e9e2 MDL-53115 mod_lesson: Remove unnecessary @javascript tags 2016-04-04 08:09:55 +08:00
Andrew Nicols 278ff79d84 MDL-53115 mod_choice: Remove unnecessary @javascript tags 2016-04-04 08:09:23 +08:00
Tim Hunt a8afcb2e4a MDL-53647 quiz summary: keep row class names in synch around headings 2016-04-02 13:23:21 +01:00
Dani Palou 64224cb840 MDL-53671 book: Return whole filepath in book_export_contents 2016-04-01 15:32:32 +02:00
AMOS bot b5f8d6b1a1 Automatically generated installer lang files 2016-04-01 00:05:04 +08:00
Dan Poltawski 4709d5dfcb weekly release 2.9.5+ 2016-03-31 14:06:34 +08:00
Dan Poltawski 9f724212ee Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-03-31 14:06:31 +08:00
Jay Jayswal c8d840561c MDL-53417 glossary: Glossary printer friendly link responsive 2016-03-31 13:59:39 +08:00
Dan Marsden 8f7dc60ad2 MDL-53500 report_outline: Allow parent role to view all activities.
Parents are not enrolled in the course, use $user to generate modinfo
for uservisible checks.
2016-03-31 13:39:03 +08:00
Sam Chaffee d0841d8c4a MDL-53661 mod_lti: Fix lti_prepare_type_for_save forcessl config 2016-03-30 18:30:16 -06:00
Adrian Greeve 66f2486da2 MDL-49861 mod_data: Behat step to test adding records.
Clicking 'Save and add another' should clear the form.
2016-03-30 16:36:40 +08:00
Adrian Greeve 64aaf5ff59 MDL-49861 mod_data: Save and add another button clears fields. 2016-03-30 16:36:21 +08:00
Juan Leyva d77bdd910c MDL-53175 filter: Fix text formatting for the book and page modules 2016-03-30 09:32:35 +01:00
Juan Leyva 7cd6eefe28 MDL-53175 file: Allow file_rewrite_pluginfile_urls to reverse 2016-03-30 09:32:34 +01:00
Eloy Lafuente (stronk7) 7eb83278bb Merge branch 'wip-mdl-49150-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-03-30 00:11:14 +02:00
Eloy Lafuente (stronk7) 616a362577 Merge branch 'MDL-52388-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-03-29 23:14:36 +02:00
AMOS bot b09ac036dc Automatically generated installer lang files 2016-03-30 00:04:36 +08:00
David Monllao 2e40d98863 Merge branch 'MDL-53356-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-03-29 15:57:25 +08:00
David Monllao cbadf3ac6b Merge branch 'MDL-53432-git-less-css-MOODLE_29_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_29_STABLE 2016-03-29 15:43:50 +08:00
David Monllao c67965f6d7 Merge branch 'wip-mdl-53434-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-03-29 14:24:11 +08:00
David Monllao f61e80bd87 Merge branch 'MDL-52646_29' of https://github.com/wjroes/moodle into MOODLE_29_STABLE 2016-03-29 12:59:03 +08:00
Dan Poltawski c055478914 Merge branch 'MDL-52976-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2016-03-29 10:24:36 +08:00
AMOS bot d5ef4a3706 Automatically generated installer lang files 2016-03-29 00:04:35 +08:00
Brendan Heywood bbd073a455 MDL-53432 core: Treat derived css and js as binary files in git 2016-03-26 22:19:34 +11:00
Dan Poltawski 996a5331ab Merge branch 'wip-MDL-53538-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2016-03-26 11:37:40 +08:00
Dan Poltawski 27891b6a0d Merge branch 'MDL-53562-forum-reply-re-MOODLE_29_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_29_STABLE 2016-03-26 10:36:39 +08:00
Dan Poltawski 5c65da3a2e MDL-53507 quiz: fix bad htmlid 2016-03-26 10:06:46 +08:00
Dan Poltawski bd9348c532 Merge branch 'MDL-53507_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-03-26 10:06:13 +08:00
Adrian Greeve 3668f28734 MDL-50795 atto: Pasting into atto removes background colour style.
Copying from one atto editor to another comes with a lot of style
information. This removes the color attributes which make the page
look ugly when competing with different themes.
2016-03-26 09:35:34 +08:00
AMOS bot a2e4255a34 Automatically generated installer lang files 2016-03-25 00:04:51 +08:00
Eloy Lafuente (stronk7) 1912e615f7 weekly release 2.9.5+ 2016-03-24 12:58:19 +01:00
Cameron Ball a1c33bf60f MDL-52388 output: Only stop displaying pager next link on last page
Thank you to Brenda Uga for working on this.
2016-03-24 17:20:07 +08:00
Simey Lameze c46180ef04 MDL-52976 core: replace all HTTP_RAW_POST_DATA usages
Backport of the MDL-52976.

This patch replace all usages of HTTP_RAW_POST_DATA that was deprecated on PHP 5.6 by
file_get_contents('php://input'). Only the TinyMCE library has not been updated.
2016-03-24 12:07:51 +08:00
Brendan Heywood 3529bdaa22 MDL-53356 admin: Fixed erroneous sectionerror when upgrade is needed 2016-03-23 16:27:17 +08:00
Dan Poltawski b40e2262d3 Merge branch 'MDL-52952-29-fix' of github.com:xow/moodle into MOODLE_29_STABLE 2016-03-23 12:08:08 +08:00
John Okely e2133abd7b MDL-52952 forms: Ignore autofill catching fields in form change checker 2016-03-23 11:55:56 +08:00
Dan Poltawski 10d22b709c Merge branch 'MDL-53383-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-03-23 08:31:54 +08:00
Tim Hunt 03edf12b9c MDL-53507 quiz editing: was possible to lose questions
If you dragged a question to the top of the quiz, it could
disappear. Several other cases of dragging questions to the
same place in sequence, but to a different page/section were
also failing, and have been fixed.
2016-03-22 23:05:04 +00:00
Marina Glancy 62a16f7ca0 MDL-45274 mod_feedback: show heading on non-respondents page 2016-03-22 23:05:52 +01:00
Eloy Lafuente (stronk7) f1fcb8e252 Merge branch 'MDL-53547_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-03-22 22:58:55 +01:00
Tim Hunt f7e12e6d14 MDL-53547 logstore_database: better DB driver handling in unit test 2016-03-22 06:46:35 +00:00
Adrian Greeve 922fa7a2f2 MDL-53538 mod_data: Unit test for data_get_advance_search_ids 2016-03-22 14:30:06 +08:00
Adrian Greeve 7055d71865 MDL-53538 mod_data: Show no records message instead of error.
When there are no records in the database module and a user
does an advanced search. Show a message that there are no entries
in the database.
2016-03-22 14:29:56 +08:00
Rajesh Taneja 2084e35009 MDL-49150 behat: Removed unnecessary @javascript tags 2016-03-22 13:57:59 +08:00
Dan Poltawski 069cea91f6 Merge branch 'MDL-52158-29' of https://github.com/xow/moodle into MOODLE_29_STABLE 2016-03-22 10:32:33 +08:00
Eloy Lafuente (stronk7) 06ecd3de42 Merge branch 'MDL-48307-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-03-22 00:13:00 +01:00
Brendan Heywood acb947d98a MDL-53562 forum: Fixed missing forum subject Re: prefix 2016-03-22 09:26:49 +11:00
Eloy Lafuente (stronk7) d0f1a93260 Merge branch 'MDL-52978_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2016-03-21 23:07:34 +01:00
Willem Roes 2183bea2f8 MDL-52646 mod_scorm: fix missing launch_data for SCORM 2004 2016-03-21 09:03:30 +01:00
Dan Poltawski dda9cf907f Merge branch 'MOODLE_29_STABLE-MDL-53407-editing-css' of https://github.com/Dagefoerde/moodle into MOODLE_29_STABLE 2016-03-21 14:48:44 +08:00
Dan Poltawski f9b568088e Merge branch 'MDL-52952-29' of https://github.com/xow/moodle into MOODLE_29_STABLE 2016-03-21 14:44:20 +08:00
Dan Poltawski 256a84657b Merge branch 'MDL-53239_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-03-21 14:12:14 +08:00
James 4dde5d381e MDL-53383 navigation: Do not require $type in remove()
navigation_node_collection -> remove function broken when $type is null
2016-03-21 12:18:19 +08:00
Dan Poltawski bf56548d60 Merge branch 'MDL-53262-verp-confirm-from-support-MOODLE_29_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_29_STABLE 2016-03-21 11:37:37 +08:00
Dan Poltawski 7aee70bd08 Merge branch 'MDL-53489_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-03-21 11:02:05 +08:00
Jay Jayswal 67405a0d68 MDL-52158 auth: Improve recaptcha settings and help 2016-03-21 10:32:25 +08:00
Dan Poltawski b8b55ad3f4 Merge branch 'MDL-53548-m29' of https://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2016-03-21 09:20:36 +08:00
Brendan Heywood bbf6676fb4 MDL-53262 inboundmessage: Fix inconsistent confirm From vs email body 2016-03-20 15:53:05 +11:00
sam marshall af22f8a159 MDL-53548 Accessibility: Block show/hide keyboard access broken 2016-03-18 13:49:04 +00:00
Grigory Baleevskiy 5ff9e45817 MDL-52978 core_lib: fixed wrong days showing for dates in datepicker 2016-03-18 12:31:21 +08:00
Eloy Lafuente (stronk7) 389ba35049 weekly release 2.9.5+ 2016-03-17 14:00:35 +01:00
Eloy Lafuente (stronk7) be454c9310 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-03-17 14:00:31 +01:00
David Monllao 4e285f7f45 MDL-53239 grader report: Add all names to error msg 2016-03-17 10:57:44 +08:00
Dan Poltawski ea26ec7524 Revert "MDL-52133 mod_assign: Pass userid param when saving grade"
This reverts commit 9ba2218a2a.
2016-03-17 09:30:52 +08:00
Andrew Nicols c0ed242820 Merge branch 'MDL-51828-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2016-03-16 10:04:10 +08:00
Frederic Massart 352c88f166 MDL-51828 repository_wikimedia: Always use PNG for SVG files 2016-03-16 09:52:42 +08:00
Eloy Lafuente (stronk7) 263be92760 Merge branch 'MDL-53139-29' of https://github.com/dg711/moodle into MOODLE_29_STABLE 2016-03-16 00:19:11 +01:00
Eloy Lafuente (stronk7) 8489c94238 Merge branch 'MDL-53430-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2016-03-16 00:05:41 +01:00
Eloy Lafuente (stronk7) feed83488b Merge branch 'mdl-53133-m29' of git://github.com/deraadt/moodle into MOODLE_29_STABLE 2016-03-15 23:53:56 +01:00
Russell Smith bfc7fd680e MDL-53323 profiling: Close session as early as possible. 2016-03-15 21:21:24 +01:00
Tim Hunt ba84a7e3f4 MDL-53489 quiz editing: fix display of long section headings 2016-03-15 18:36:21 +00:00
AMOS bot 14f7892048 Automatically generated installer lang files 2016-03-16 00:04:25 +08:00
Andrew Nicols 3648a75ef1 Merge branch 'MDL-53234-support-email-MOODLE_29_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_29_STABLE 2016-03-15 13:44:10 +08:00
Andrew Nicols 627cfe2398 Merge branch 'MDL-53351-29-lti-notice' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-03-15 12:50:00 +08:00
David Monllao 905626ba79 MDL-53176 grades: Fix upgrade version 2016-03-14 14:10:09 +08:00
David Monllao d67e511a9a Merge branch 'MDL-53176-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE
Conflicts:
	version.php
2016-03-14 14:08:55 +08:00
Eloy Lafuente (stronk7) b0f0573e74 Moodle release 2.9.5 2016-03-12 00:38:01 +01:00
Rajesh Taneja e600e7c368 MDL-53434 behat: Improved exit status of parallel run
Exit status should contain pass/fail information
of each run it is executing. Every bit of status
will have information of pass/fail status of parallel
process
2016-03-11 21:08:26 +08:00
Rajesh Taneja 6967933d4a MDL-53434 behat: Added support for $CFG->behat_profiles
This config will be supported to avoid broken configuration
in future. As this is limited, we need will still use
->behat_config to set config values which can't be set by
behat_profiles
2016-03-11 21:08:10 +08:00
dg711 75a2731b32 MDL-53139 admin: case diff issue with email 2016-03-11 16:29:29 +05:30
John Okely 73e226c971 MDL-52952 forms: Fix chrome autofilling passwords again
In MDL-45772 a hack was introduced to some forms to stop browsers from
putting the user's password into password fields in forms unrelated to
logging in.

Chrome now no longer fills the user's password in the first password
field in the page. There now needs to be a plain text input above it
for the username too.
2016-03-11 10:33:56 +08:00
Eric Merrill b53f9ed5f1 MDL-53430 dml: Fix recordset_walk for additional parameters 2016-03-10 16:33:25 -05:00
Eric Merrill be7a01b355 MDL-53176 grades: Adding index to improve history search
Backport of MDL-50385
2016-03-10 12:00:45 -05:00
Eloy Lafuente (stronk7) 0fa77a0fb6 weekly release 2.9.4+ 2016-03-10 13:31:06 +01:00
Eloy Lafuente (stronk7) 4c4acce05c Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-03-10 13:31:02 +01:00
Jan C. Dageförde dbade23e87 MDL-53407 themes: Add CSS class editing only if appropriate
The CSS class `editing` should only be added if the user is in editing
mode AND she is allowed to edit the rendered page. `user_is_editing()`
achieves exactly this, without changing behaviour for the appropriate
pages.
2016-03-10 10:43:51 +01:00
Eloy Lafuente (stronk7) 214950de2a MDL-51167 tool_monitor: fix too strict condition & minor cleanup 2016-03-10 00:07:18 +01:00
Simey Lameze 82d0c0b521 MDL-50705 auth_db: apply standard cleaning to all fields
Also unit tests were added to cover the new clean_data() method.
2016-03-09 18:30:47 +01:00
Simey Lameze 54d6ee8c08 MDL-50705 core_user: introduce new fill_properties_cache()
Also the get_property_definition() was created to get the property without retrieve the whole definition cache and
    unit tests were created to tests those new methods.
2016-03-09 18:30:45 +01:00
Brendan Heywood 2e735a14f9 MDL-53234 admin: Fixed wrong default support email bug 2016-03-09 20:56:35 +11:00
Andrew Nicols b8c31d0786 MDL-49897 calendar: mktime => usergetmidnight 2016-03-09 13:18:41 +08:00
Michael de Raadt 9ba2218a2a MDL-52133 mod_assign: Pass userid param when saving grade 2016-03-09 15:30:44 +11:00
Simey Lameze 01b19e761f MDL-53031 mod_assign: add session check on assignment plugins management 2016-03-08 19:54:24 +01:00
AMOS bot 5c166e1f1a Automatically generated installer lang files 2016-03-09 00:04:30 +08:00
Jun Pataleta 094fddd00f MDL-52433 user: Remove unnecessary capability check 2016-03-08 12:24:27 +01:00
David Monllao d2acadec4c Merge branch 'wip-MDL-41648-29' of https://github.com/dg711/moodle into MOODLE_29_STABLE 2016-03-08 15:33:16 +08:00
Andrew Nicols c4bd64c245 Merge branch 'MDL-49897_29' of https://github.com/rushi963/moodle into MOODLE_29_STABLE 2016-03-08 15:27:31 +08:00
David Monllao 853cae5ebc Merge branch 'MDL-50218-29' of https://github.com/xow/moodle into MOODLE_29_STABLE 2016-03-08 14:42:01 +08:00
David Monllao 06e664ebbf Merge branch 'MDL-52068-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2016-03-08 14:29:48 +08:00
Andrew Nicols a815974aab Merge branch 'MDL-53046-29' of https://github.com/xow/moodle into MOODLE_29_STABLE 2016-03-08 14:10:50 +08:00
David Monllao 2e24a0f873 Merge branch 'MDL-52984_29' of https://github.com/rushi963/moodle into MOODLE_29_STABLE 2016-03-08 14:04:40 +08:00
Andrew Nicols bce1ce2780 Merge branch 'MDL-53047-login-anchor-MOODLE_29_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_29_STABLE 2016-03-08 13:21:46 +08:00
Simey Lameze ff7bacf32b MDL-51167 tool_monitor: check course visibility and user capabilities 2016-03-08 03:09:37 +01:00
Andrew Nicols 1faf581711 Merge branch 'MDL-53210-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-03-08 09:56:04 +08:00
Cameron Ball 4d6f159f68 MDL-52651 htmlpurifier: Append rel=noreferrer to links.
Thank you to Zachary Durber for originally working on this issue.
2016-03-08 02:08:10 +01:00
Andrew Nicols 17c67de63f Merge branch 'MDL-53291_29_ajax_fix' of https://github.com/BenKelada/moodle into MOODLE_29_STABLE 2016-03-08 07:43:13 +08:00
Krista Koivisto 3c069c16db MDL-52774 ajax: Require authentication when getting nav branch
When getting the navigation branch data through AJAX, require
login if forcelogin is set.
2016-03-08 00:39:09 +01:00
Juan Leyva fe5146d598 MDL-52901 mod_assign: Check due dates in external save_submission 2016-03-08 00:13:35 +01:00
David Monllao ad67b7eeea MDL-52378 singleview: Using is_disabled instead of is_locked 2016-03-07 23:03:50 +01:00
Travis Noll 5208032b23 MDL-52378 Singleview: Exclude Grade Attribute Permissions
Singleview users must have Manage Grade permission to modify the
Exclude grade attribute.
2016-03-07 23:03:30 +01:00
Juan Leyva 854e7b8ed0 MDL-52808 calendar: Do not return events for hidden activities 2016-03-07 22:35:56 +01:00
David Mudrák ead2dd9c16 MDL-52727 mod_data: Improve output of the form fields values
This issue mostly affects the search form fields. Submitted values for
these fields are typically obtained via optional_param() with
PARAM_NOTAGS specified as the parameter type - see parse_search_field()
methods. Such values themselves are not safe enough to be printed back
directly into the HTML as they might contain malicious code.

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

In case of the itemid parameters, explicit clean_param() is added to
make sure we cast the value as an integer. That should make the s()
unnecessary but it was added anyway as an extra protection (just in case
the code flow changes or the parts of the code are re-used elsewhere).
2016-03-07 22:07:38 +01:00
Eloy Lafuente (stronk7) 2e89b87552 Merge branch 'MDL-53061-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-03-07 16:53:02 +01:00
dg711 77fc63989e MDL-41648 grade: Remove 'error' parameter in grading notification divs 2016-03-06 09:22:56 +05:30
David Mudrák dcf6ffd131 MDL-53351 lti: Do not throw PHP notice when deleting LTI instance
The typeid=0 is a valid and common value representing "Automatic, based
on launch URL" type. In that case, no record in the lti_types table is
found. Thence attempting to access its toolproxyid property used to
throw PHP notice.
2016-03-04 17:03:58 +01:00
Brendan Heywood d8a4ec8e68 MDL-53047 login: Fixed #anchor being lost after login process 2016-03-04 22:54:52 +11:00
John Okely e6cc9e7e7d MDL-50218 lti: Return empty grade when none exists 2016-03-04 16:27:26 +08:00
Dan Poltawski f60f03732e weekly release 2.9.4+ 2016-03-04 10:34:28 +08:00
Dan Poltawski 50d5283cff Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-03-04 10:34:26 +08:00
AMOS bot dc5f068009 Automatically generated installer lang files 2016-03-03 22:24:22 +08:00
AMOS bot 44f63e0f22 Automatically generated installer lang files 2016-03-03 22:24:21 +08:00
Dan Poltawski a1c1726249 MDL-53061 grunt: watch and various improvements
This is a backport of a number of commits from MDL-49817  which
in general are about simplifying and moving to standard 'grunt' things.
2016-03-03 11:45:33 +08:00
Ben Kelada dc1329ff4c MDL-53291 javascript: fix jquery ajax requests when data contains ??
jQuery ajax requests containing multiple '?' get replaced with a
string similar to jQuery152330039032_1231231, this is because it
is processing a stringified data object as jsonp and thinks its a url.
 workaround is to add contenttype
see https://github.com/jquery/jquery/issues/1799
2016-03-03 09:20:29 +11:00
AMOS bot d481dc01e4 Automatically generated installer lang files 2016-03-03 00:04:31 +08:00
Frederic Massart b02a001b6e MDL-52068 repository: Prevent JS errors due to unescaped lang strings 2016-03-02 15:35:16 +08:00
Andrew Nicols 89068f47cf Merge branch 'MDL-53214-29-category-feedback' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-03-02 14:50:04 +08:00
Cameron Ball f2d1cbfae4 MDL-53214 grades: Fix labels on feedback fields 2016-03-02 14:32:56 +08:00
Dan Poltawski 7db166d2e6 Merge branch 'MDL-52513_29' of https://github.com/rushi963/moodle into MOODLE_29_STABLE 2016-03-02 13:21:41 +08:00
Eloy Lafuente (stronk7) 9a04ae9665 Merge branch 'MDL-52763-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-03-01 21:40:03 +01:00
Eloy Lafuente (stronk7) aa683c28a8 Merge branch 'wip-mdl-53126-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-03-01 21:35:20 +01:00
Eloy Lafuente (stronk7) 68af175e84 Merge branch 'MDL-53200-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-03-01 21:25:30 +01:00
Rushikesh f386e713f1 MDL-49897 Calendar : Calendar day view showing past events 2016-03-01 20:13:07 +05:30
Rex Lorenzo 16d73f6748 MDL-53046 mod_lti: Should prefer site-wide configured key/secret 2016-03-01 14:41:18 +08:00
Dan Poltawski 8dacf05f4b Merge branch '29_MDL-53166' of https://github.com/eugeneventer/moodle-fixes into MOODLE_29_STABLE 2016-03-01 12:55:23 +08:00
Dan Poltawski 7bd521d654 Merge branch 'MDL-46424_29' of https://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-03-01 12:38:52 +08:00
Marina Glancy 463d31a871 MDL-44952 mod_feedback: set value for hidenoselect if disabled 2016-03-01 12:31:29 +08:00
Dan Poltawski b4af6f22fc Merge branch 'MDL-52928-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-03-01 11:38:09 +08:00
Andrew Nicols a72cb6b487 Merge branch 'MDL-53027-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-03-01 10:40:54 +08:00
Andrew Nicols fccf727fd8 Merge branch 'MDL-52936_29_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_29_STABLE 2016-03-01 10:07:45 +08:00
Andrew Nicols 361b0abcc8 Merge branch 'MDL-53214-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-03-01 09:45:10 +08:00
Kevin Bruton 193982441d MDL-52568 core_cohort: added ability to return all cohorts in WS 2016-03-01 01:03:50 +01:00
Rushikesh 1116aded07 MDL-52984 Roles : Logs store newly created role's id 2016-02-29 14:57:20 +05:30
Dan Poltawski 05392ca9aa Merge branch 'MDL-44952-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-02-29 16:34:26 +08:00
Andrew Nicols fc47609b41 Merge branch 'MDL-52965_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-02-29 15:22:12 +08:00
Andrew Nicols fb6d37154a Merge branch 'MDL-53249-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2016-02-29 14:38:46 +08:00
Andrew Nicols 7c5ed224f7 Merge branch 'MDL-53206_29' of https://github.com/mr-russ/moodle into MOODLE_29_STABLE 2016-02-29 13:14:31 +08:00
Russell Smith 257b40c30c MDL-53206 caching: Ensure get_many and set_many dereference objects. 2016-02-29 16:00:08 +11:00
Dan Poltawski cad0fdaad7 Merge branch 'MDL-53154-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2016-02-29 10:12:41 +08:00
Rushikesh aa3c00934c MDL-46424 Upload: Error message for a file exceeding maxsize 2016-02-29 08:58:27 +08:00
AMOS bot a2808a8e04 Automatically generated installer lang files 2016-02-28 00:04:26 +08:00
Marina Glancy aa7c4bed07 MDL-48307 mod_wiki: protect [edit] section link from nwiki parser 2016-02-26 13:27:54 +08:00
Eric Merrill 87de9d4eae MDL-53249 atto: Make sure all editors see end move event 2016-02-25 21:37:03 -05:00
Helen Foster b125674d97 MDL-53200 lang: Merge English strings from the en_fix language pack 2016-02-25 18:01:32 +01:00
Mark Johnson 1292a65011 MDL-52936 theme_bootstrapbase: Fix link hover bug on iOS 2016-02-25 11:55:50 +00:00
Davo Smith f87e97fa3a MDL-52965 medialib: fix preload attribute 2016-02-25 15:24:32 +08:00
Andrew Nicols 9a1c7bcce4 weekly release 2.9.4+ 2016-02-25 13:52:22 +08:00
Andrew Nicols 53512ca571 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-02-25 13:52:20 +08:00
David Balch 10a6b8a233 MDL-53027 calendar: Fix false empty result from calendar_get_events(). 2016-02-25 11:00:14 +08:00
Rajesh Taneja 040dd3a96e MDL-53126 behat: Fixed radio button in backup step
Rather than calling click and check on radio node
use radio form field to set value
2016-02-25 10:35:00 +08:00
AMOS bot 6579770fee Automatically generated installer lang files 2016-02-25 00:11:43 +08:00
Rushikesh 0986adb745 MDL-52513 Grading : Change in display message after publishing 2016-02-24 18:10:41 +05:30
Marina Glancy 99f7e407f0 MDL-53210 mod_feedback: fixes in check feedback access
1. show only uservisible feedbacks in block_feedback
2. nicer error message when user opens feedback on frontpage instead of from the mapped course
3. corrected cap check in view.php page before displaying link to complete.php
2016-02-24 13:33:26 +08:00
Cameron Ball 4193dd1a33 MDL-53214 grades: Ensure grader report correctly labels fields.
The editable fields for the grader report should have unique labels.
Previously category grade items were not being labelled with the
category name.
2016-02-24 10:45:03 +08:00
AMOS bot dbf9d4ca75 Automatically generated installer lang files 2016-02-24 00:04:41 +08:00
Dan Poltawski f82d9ae3eb Merge branch 'MDL-42460-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-02-23 14:36:56 +00:00
Dan Poltawski 2b8d27b29d Merge branch 'MDL-52958_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-02-23 10:57:54 +00:00
Dan Poltawski d3a379512f Merge branch 'MDL-50312_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2016-02-23 08:07:10 +00:00
Andrew Nicols 22af3705ce Merge branch 'MDL-49338_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-02-23 13:45:15 +08:00
Marina Glancy 0f94bbec5b MDL-44952 mod_feedback: validate required multichoice 2016-02-23 13:07:37 +08:00
Michael Milette 749e8dbe54 MDL-42460 mod_feedback: Fix markup validation 2016-02-23 12:56:32 +08:00
Davo Smith 104560bcb6 MDL-52371 theme_base: activity chooser - support long names 2016-02-23 11:43:12 +08:00
Kenny McCormack d95934f0ae MDL-52371 theme_bootstrapbase: activity chooser - support long names 2016-02-23 11:43:05 +08:00
Andrew Nicols 12dcda9f4b Merge branch 'MDL-52892-29_STABLE' of https://github.com/dg711/moodle into MOODLE_29_STABLE 2016-02-23 10:20:34 +08:00
Eloy Lafuente (stronk7) 3fe95f7007 Merge branch 'MDL-53065_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-02-22 23:01:22 +01:00
AMOS bot 5f14b92f65 Automatically generated installer lang files 2016-02-23 00:04:52 +08:00
Dan Poltawski b54a69b11f Merge branch 'MDL-44093-29-flowplayer' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-02-22 09:04:17 +00:00
Andrew Nicols 38980e2047 Merge branch 'wip-mdl-52970-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-02-22 15:24:01 +08:00
Eugene Venter e6e1210e81 MDL-53166 mod_forum: fix fatal error in backup phpunit test
when running mod_forum_testsuite mod_forum_testsuite
2016-02-22 13:49:32 +13:00
Tim Hunt a602c8023e MDL-53065 quiz redo question: avoid PHP notice in edge case
When selecting the variant of the new question, we need to add the
new question to the usage before trying to select a variant.

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

- Geting rid of the @javascript tag when it's not needed.
- Adding some missing @_switch_window tags.
- Fixing some scenario names, previously duplicated.
- Fixing some typos and whitespace.
2016-02-18 02:11:06 +01:00
M Kassaei bc2a4e90cd MDL-52964 Qtype: Add behat tests to core question types 2016-02-18 02:10:53 +01:00
Dan Poltawski 52e9efa347 MDL-52342 css: built 2016-02-17 07:34:51 +00:00
Dan Poltawski a69ee4e7d3 Merge branch 'MDL-52342-29-fix2' of github.com:andrewnicols/moodle into MOODLE_29_STABLE 2016-02-17 07:27:28 +00:00
Andrew Nicols e4ccccc799 MDL-52342 theme: Improve display of activity chooser 2016-02-17 15:20:10 +08:00
Marina Glancy ef126dbaff MDL-49807 mod_wiki: section detection regexp fix 2016-02-17 13:11:20 +08:00
David Monllao 11e6e6c8e3 Merge branch 'MDL-48015-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2016-02-17 09:53:07 +08:00
Eloy Lafuente (stronk7) b33cd6d8ba Merge branch 'MDL-51852-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-17 02:04:25 +01:00
Eloy Lafuente (stronk7) 9bbbf76bae Merge branch 'MDL-29506-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-16 17:50:41 +01:00
Eloy Lafuente (stronk7) a003bc4710 Merge branch 'MDL-52997-email-threading-MOODLE_29_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_29_STABLE 2016-02-16 17:12:00 +01:00
Eloy Lafuente (stronk7) 0bdea2767e Merge branch 'MDL-52814_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-02-16 16:49:38 +01:00
Dani Palou 15b9554a3b MDL-52993 wiki: Add unit tests for wiki_user_can_edit
Note: amended on integration to fix some comments.
2016-02-16 16:40:14 +01:00
Dani Palou 48426a041d MDL-52993 wiki: Fix wiki_user_can_edit for collab and separate groups 2016-02-16 16:39:11 +01:00
Dan Poltawski f08c3486a7 Merge branch 'MDL-52862_29' of https://github.com/juancs/moodle into MOODLE_29_STABLE 2016-02-16 15:18:49 +00:00
Dan Poltawski c10236355a Merge branch 'MDL-53012-m29' of https://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2016-02-16 10:45:01 +00:00
Dan Poltawski cdd4d84eda Merge branch 'MDL-52879_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-02-16 10:26:02 +00:00
Dan Poltawski 6d7a12e085 Merge branch 'MDL-49612-29' of git://github.com/dpalou/moodle into MOODLE_29_STABLE 2016-02-16 09:30:14 +00:00
Andrew Nicols 4e70e41424 MDL-52342 theme: Correct selector for section title 2016-02-16 09:18:18 +00:00
David Monllao 1401015347 Merge branch 'MDL-51117-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-16 13:27:36 +08:00
Eloy Lafuente (stronk7) ad1485c866 Merge branch 'MDL-52511-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-02-16 02:00:56 +01:00
David Monllao 56044641b0 MDL-52217 repository: Fix upgrade versions 2016-02-16 05:59:25 +08:00
David Monllao d3371a8778 Merge branch 'MDL-52217-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-16 05:57:56 +08:00
David Monllao a111eada22 Merge branch 'MDL-51580_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2016-02-16 05:06:38 +08:00
sam marshall 232ad11f86 MDL-53012 Behat: Add step to run scheduled task 2016-02-15 17:39:13 +00:00
Dan Poltawski 533ce6d38d Merge branch 'MDL-53039-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-02-15 15:33:27 +00:00
Dan Poltawski 4a6ce8ace3 Merge branch 'MDL-52342-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-15 13:28:18 +00:00
Dan Poltawski d037aee9d3 Merge branch 'MDL-49146_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-02-15 12:13:34 +00:00
Dan Poltawski 9bb6b38dea Merge branch 'wip_MDL-53029_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2016-02-15 11:07:36 +00:00
Dan Poltawski c0b2fb25c6 Merge branch 'MDL-44626-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-15 10:36:22 +00:00
Andrew Nicols 98b518c17a MDL-52217 repository: prepare_file should use per-request directory
The repository API defaults has a function, prepare_file, which is
responsible for creating a unique file to be used during the current
request.

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

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

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

This commit also adds an upgrade step to remove all old temp directories
created by any repository currently installed.
2016-02-15 15:55:51 +08:00
David Monllao 7b04c158a0 Merge branch 'wip-MDL-52566-MOODLE_29_STABLE-2' of https://github.com/cdsmith-umn/moodle into MOODLE_29_STABLE 2016-02-15 15:18:24 +08:00
David Monllao 456c92917f Merge branch 'MDL-49807-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-02-15 15:12:23 +08:00
Juan Segarra Montesinos e86d1aacc0 MDL-52862 mod_forum: format non HTML messages in search results
Override messageformat to FORMAT_HTML before calling forum_print_post
2016-02-15 07:53:42 +01:00
Andrew Nicols 69b8e578ea MDL-29506 forum: Add tests for encode_content_links 2016-02-15 08:09:10 +08:00
Rushikesh 3241582038 MDL-29506 forum: Fix use of ampersand in backup parent links 2016-02-15 08:09:10 +08:00
AMOS bot 325348beda Automatically generated installer lang files 2016-02-13 00:04:36 +08:00
Eloy Lafuente (stronk7) f5bd067fbe MDL-51580 environment: 3.1 requirements added
Only important change is that Moodle 2.7 installed is
required to be able to upgrade to 3.1. See the issue
for opinions, votes and agreed outcomes.
2016-02-11 16:09:09 +01:00
Brendan Heywood d3a744ddf1 MDL-52997 forum: Add more robust threading email headers 2016-02-11 20:38:20 +11:00
David Monllao d6b44eeea2 weekly release 2.9.4+ 2016-02-11 13:58:53 +08:00
David Monllao e090357eb0 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-02-11 13:58:51 +08:00
Andrew Nicols 063642c4cb MDL-44626 files: Show the PHP max upload size instead of 'unlimited'
Even when a user has the appropriate capability to upload any sized files,
they are still restricted to the PHP post_max_size, and upload_max_filesize
values.

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

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

Since the original issue only affected activity instances, and sections (and
not content > div regions), I've removed this from the original patch.
2016-02-11 08:28:38 +08:00
Gareth J Barnard 2afba12004 MDL-53029 mod_book: Hidden chapter has markup in alt and title attrs. 2016-02-10 18:02:06 +00:00
Petr Skoda e2f8826fa8 MDL-52511 dml: add support for PostgreSQL 9.5
The default definition behaviour has changed for some int values.
2016-02-10 09:45:53 +00:00
Tim Hunt 8d071293ac MDL-52814 questions: Show extra info in the outcomes area not info
Currently the only use is the quiz Redo question button, and that would
be much better placed in the feedback area, not least for langages where
the button label needs to be longer.
2016-02-10 08:47:49 +00:00
Marina Glancy d1c9a47b04 MDL-49807 mod_wiki: correctly form toc and sections for atto 2016-02-10 13:32:05 +08:00
Andrew Nicols 4339f877d4 MDL-52930 forum: Fix random test failure caused by passing of time 2016-02-10 12:24:45 +08:00
David Monllao b292fa181c Merge branch 'MDL-52766-29-mnet-url-length' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-02-10 08:55:33 +08:00
Tim Hunt 93ea68f50d MDL-52879 quiz editing: allow removal of the last question in a quiz
Even though you are not normally allowed to remove the last question
in a section.
2016-02-09 21:49:48 +00:00
AMOS bot ac17792858 Automatically generated installer lang files 2016-02-10 00:04:21 +08:00
Michael Hughes 142c8f08c3 MDL-52763 Assignment: Display Participant Number
Display participant number when user holds mod/assign:viewblinddetails capability.

Backport of MDL-52270
2016-02-09 15:59:38 +00:00
Davo Smith 0a127f2b4e MDL-49620 availability: plugins can have global settings 2016-02-09 10:34:59 +00:00
Juan Leyva 7d3472a753 MDL-53000 mod_assign: Add missing get_file_areas in editpdf subplugin 2016-02-09 11:34:30 +01:00
David Monllao 634d3fd207 Merge branch 'MDL-52930-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-09 18:07:07 +08:00
David Monllao 81711b63e4 Merge branch 'MDL-52902-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-02-09 16:42:13 +08:00
Marina Glancy fd7218a4c1 MDL-53039 rss: allow guest access to front page forum 2016-02-09 15:56:04 +08:00
Andrew Nicols b28c953839 MDL-52928 message: Correct contact fetching in recent conversations 2016-02-09 13:39:55 +08:00
Jun Pataleta 1e33a8a53b MDL-48015 grade: Fix the display of grade categories 2016-02-09 13:33:14 +08:00
Andrew Nicols 0c34179b52 MDL-51852 mod_forum: Respect timed discussions in emails 2016-02-09 08:37:44 +08:00
Andrew Nicols 642660aa35 MDL-52339 question: Fix question attempt removal for MySQL
Derived table support was altered in MySQL 5.7 changing the way in which
DELETE FROM works in some cases.

This change modifies the way in which deletion occurs by selecting all IDs
and batching them into groups of 1000.
2016-02-09 00:45:58 +01:00
Eloy Lafuente (stronk7) 75f61371a0 Merge branch 'MDL-52938-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-02-09 00:30:57 +01:00
Eloy Lafuente (stronk7) f78700dc47 Merge branch 'MDL-52975-29-mnet-context' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-02-08 22:58:12 +01:00
Eloy Lafuente (stronk7) 20d0c2e8ce Merge branch 'MDL-52981-m29' of https://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2016-02-08 22:55:24 +01:00
Eloy Lafuente (stronk7) 9981108170 Merge branch 'MDL-51075_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-02-08 22:45:10 +01:00
Eloy Lafuente (stronk7) d0991e9f02 Merge branch 'MDL-50310-29-random-glossary' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-02-08 22:34:39 +01:00
Dan Poltawski 870953541c Merge branch 'MDL-48778-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2016-02-08 17:15:45 +00:00
Eloy Lafuente (stronk7) 25c6437296 Merge branch 'MDL-52983_29' of git://github.com/aolley/moodle into MOODLE_29_STABLE 2016-02-08 13:05:46 +01:00
Simey Lameze 5ff2c7d8a6 MDL-48778 mod_assign: behat tests for group submission 2016-02-08 14:23:50 +08:00
Eric Merrill 6ca893ecb2 MDL-48778 assign: Use proper latest attempt for quickgrading prechecks
The code that stored lastmodified in gradingtable used a different
method to produce it than the processor used to generate the check
value. Fix that and also check that the attempt number has not changed.
2016-02-08 14:23:49 +08:00
David Monllao 9876fc13e1 Merge branch 'MDL-50115-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-02-08 14:11:45 +08:00
Adam Olley 26685f13a0 MDL-52983 excel output: avoid single quote on end of sheet name
This change resolves a problem where a long sheet name, which gets
trimmed down with substr($name, 0, 31), could result in a sheet name
with a single quote on the end because the quote removal was done before
the substr.
2016-02-08 15:18:00 +10:30
David Monllao 5f90d5f42d Merge branch 'MDL-51723-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-02-08 09:03:51 +08:00
Tim Hunt 12b9fad2ed MDL-49146 single-activity course format: key activity must be visible
With a single-activity course, visibility to students is controlled by
course visibility. There is no sense in having the key activity not
visible to students, and, if you did, the symptoms were almost
incomprehensible. It was very hard to work out what you had done wrong.
2016-02-06 14:59:12 +00:00
AMOS bot ec75674961 Automatically generated installer lang files 2016-02-06 00:04:25 +08:00
Andrew Nicols e66281a8b0 MDL-52930 mod_forum: Add get_unmailed_posts tests 2016-02-05 14:41:09 +08:00
Josh Marshall a9745eb95a MDL-52930 forum: Correct get_unmailed_posts logic 2016-02-05 14:41:08 +08:00
David Monllao 92992280ad MDL-52958 medialib: Allow vimeo fullscreen using links
All credit to Henrik Sune Pedersen.
2016-02-05 10:19:41 +08:00
David Monllao a84dfd422a MDL-51075 filter_glossary: Fix popup position when no popups
Thanks to Andrew Nicols for cleaning my eyes.
2016-02-05 09:28:23 +08:00
David Mudrák 211fedbad5 MDL-50310 glossary: Fix restore of random glossary entry block
When restoring the random glossary entry block, we need to check that
the associated glossary has also been included in the backup and is
being restored. If not, we must invalidate the block configuration.

Before this patch, the block configuration was not invalidated.

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

Thanks to Ty Delean who proposed this idea.
2016-02-04 12:04:53 +00:00
David Monllao 80b09028d1 weekly release 2.9.4+ 2016-02-04 14:30:10 +08:00
David Monllao f8a00db3b2 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-02-04 14:30:08 +08:00
AMOS bot 070f816bc6 Automatically generated installer lang files 2016-02-04 00:04:31 +08:00
sam marshall 94d07f8ad9 MDL-52981 Unit tests: Reset global after test 2016-02-03 10:30:42 +00:00
David Monllao fec7104bec Merge branch 'MDL-52899_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-02-03 13:45:07 +08:00
David Monllao 008fd8869c Merge branch 'MDL-52873-29-modgradeid' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-02-02 12:12:59 +08:00
Marina Glancy b0ab180666 MDL-52938 mod_forum: check global setting to track forum posts 2016-02-02 10:54:51 +08:00
Dan Poltawski f9d8799390 Merge branch 'wip-mdl-52932-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-02-01 10:27:24 +00:00
Dan Poltawski fb52b37e38 Merge branch 'MDL-52940_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2016-02-01 09:49:25 +00:00
David Monllao 41f75a63da Merge branch 'MDL-51704-29' of git://github.com/dpalou/moodle into MOODLE_29_STABLE 2016-02-01 17:21:08 +08:00
David Monllao 55631fe3d4 Merge branch 'MDL-52261_29_file_not_found' of git://github.com/BenKelada/moodle into MOODLE_29_STABLE 2016-02-01 13:56:26 +08:00
David Monllao 3ab2388c5a Merge branch 'MDL-52913_29_STABLE' of git://github.com/marxjohnson/moodle into MOODLE_29_STABLE 2016-02-01 13:46:47 +08:00
Mark Nelson ff2e424d07 MDL-52940 core_backup: prevent always displaying logs 2016-02-01 12:45:11 +08:00
David Monllao 36fe93a53a Merge branch 'wip-mdl-52837' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-02-01 11:38:02 +08:00
David Monllao 1d69dc53ef Merge branch 'MDL-52831-29-emptynames' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-02-01 11:31:55 +08:00
Andrew Nicols 2dcf1dabc3 MDL-51723 enrol_ldap: Normalise user objectclass in dn 2016-02-01 10:29:24 +08:00
Rajesh Taneja afeffc0a74 MDL-52932 behat: Restart session if it fails because of some reason 2016-02-01 09:33:01 +08:00
jinhofer c3cd93ddf1 MDL-50312 grade/report/grader: Fixed remaining issue
MDL-49764 fixed the appearance of user cells. However, the window
resize event was still incorrect. This is a fix for the window
resize event for ALL IE versions.
2016-01-29 12:22:22 -06:00
Mark Johnson ba9e80c7c7 MDL-52913 behat: Abort database transactions on exception. 2016-01-29 12:00:15 +00:00
David Monllao 01478c3ae7 weekly release 2.9.4+ 2016-01-29 14:36:57 +08:00
David Monllao b2f5f27afa Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-01-29 14:36:55 +08:00
David Monllao 9f16ba4a76 MDL-52825 atto: Listen to gesturemovestart to discard some events 2016-01-28 12:25:16 +08:00
AMOS bot e54c30d48d Automatically generated installer lang files 2016-01-28 00:04:38 +08:00
Juan Leyva 22b696c5c7 MDL-52902 webservice: Send CORS header before params validation 2016-01-27 10:27:50 +01:00
Rajesh Taneja 75832b8976 MDL-52837 behat: Update mink extension to support Selenium 2.48.x 2016-01-27 17:04:12 +08:00
Eloy Lafuente (stronk7) 2e4b4ac7c2 Merge branch 'MDL-29817_29' of https://github.com/rushi963/moodle into MOODLE_29_STABLE 2016-01-27 00:55:02 +01:00
Eloy Lafuente (stronk7) 0ce1d907e3 MDL-52567 Core: amend existing test to new counting rules 2016-01-27 00:38:32 +01:00
Eloy Lafuente (stronk7) a0d4ebd22a Merge branch 'MDL-52567_M29' of https://github.com/nadavkav/moodle into MOODLE_29_STABLE 2016-01-27 00:37:54 +01:00
Eloy Lafuente (stronk7) 86f762d976 MDL-37739 mod_wiki: test headings being wikilinks (toc and content) 2016-01-27 00:11:22 +01:00
Luca Bösch b5f3ff575b MDL-37739 mod_wiki: Wiki ToC header href remove square double brackets.
When H1, H2 and H3 links in wiki act themselves as hyperlinks, they
were displayed in double brackets. This patch removes [[ and ]] out of
the table of content displayed header hyperlinks.
2016-01-26 23:19:19 +01:00
Dani Palou 900f56bcf2 MDL-51704 survey: Fix display problems in report page 2016-01-26 14:07:12 +01:00
Tim Hunt 86560bedd1 MDL-52899 behat: make PAGE_READY_JS more robust 2016-01-26 11:23:51 +00:00
Dan Poltawski 14dd6d9dcf Merge branch 'MDL-48953_m29v4' of https://github.com/sbourget/moodle into MOODLE_29_STABLE 2016-01-26 11:10:16 +00:00
Rushikesh 7e0eef76d4 MDL-25864 Blog: Confirmation dialog before unregistering 2016-01-26 10:56:25 +00:00
David Monllao 76d2a91004 Merge branch 'MDL-52459-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-01-26 18:23:25 +08:00
Dani Palou eea379ed55 MDL-49612 forum: Fix some external_value creation in params declaration 2016-01-26 08:58:09 +01:00
Eloy Lafuente (stronk7) 2b6815b7dd Merge branch 'wip-mdl-52839-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-01-26 00:40:59 +01:00
Eloy Lafuente (stronk7) 66b1d84058 Merge branch 'MDL-52843-29-paramsignup' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-01-26 00:38:35 +01:00
AMOS bot f251776434 Automatically generated installer lang files 2016-01-26 00:04:20 +08:00
Dan Poltawski 93c63eefb4 Merge branch 'MDL-52791_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-01-25 14:27:04 +00:00
Dan Poltawski f19e2ee750 Merge branch 'MDL-52835-m29' of git://github.com/deraadt/moodle into MOODLE_29_STABLE 2016-01-25 14:14:53 +00:00
Dan Poltawski d7bb11f148 Merge branch 'MDL-51702_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-01-25 10:29:59 +00:00
Dan Poltawski 95dd0adc3b Merge branch 'MDL-52825_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-01-25 10:26:00 +00:00
David Monllao 117e9a638c Merge branch 'MDL-52682-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-01-25 15:39:38 +08:00
David Monllao 3a8736831c Merge branch 'MDL-52683-29' of git://github.com/s-cenni/moodle into MOODLE_29_STABLE 2016-01-25 15:32:46 +08:00
David Monllao ba120a362c Merge branch 'wip-mdl-52799-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-01-25 14:39:55 +08:00
David Monllao 0935b7f057 Merge branch 'MDL-31635-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2016-01-25 12:34:08 +08:00
Marina Glancy 51c311b333 MDL-31635 completion: do not show % for the grade
Also show grades with the configured number of decimal points
2016-01-25 10:23:46 +08:00
AMOS bot 55f6a330ba Automatically generated installer lang files 2016-01-25 00:04:24 +08:00
Nadav Kavalerchik 81e264eb35 MDL-52567 Core: remove quotation marks, for proper word count 2016-01-24 00:49:44 +02:00
AMOS bot 4ad98ddd26 Automatically generated installer lang files 2016-01-23 00:04:32 +08:00
Clement Smith 32830571c6 MDL-52566 mod/assign: Fix group submission draft records
When group assignments are submitted by the first student in a group,
the logic that saves the submission is not creating a draft
assignment record in mdl_assign_submission. This leads to problems
when other functions are used that depend on these records, such as
marking workflow. This fixes the issue and correctly creates
draft assignment submission records for the non-submitting students
in the group.
2016-01-22 10:00:57 -06:00
David Mudrák f16385e051 MDL-52873 forms: Generate unique id attributes for modgrade elements
The previous method of generating the id attribute of the elements
within the modgrade group did not take the name of the modgrade field
into account. So if there were multiple fields of the modgrade type
added into a form (not a common case yet still valid), elements created
within the group were assigned same id attributes.

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

The patch changes the generated id attribute. Apart from the
block_activity_results' behat feature files, not other places seem to
rely on the exact value.
2016-01-22 14:19:57 +01:00
Andrew Nicols 54fdc12876 MDL-52682 mod_forum: Correct redirect URL when marking posts as read 2016-01-22 08:04:33 +08:00
Michael de Raadt 0168e431aa MDL-52835 mod_data: Correct MIME type for JS template 2016-01-22 10:23:26 +11:00
Rushikesh c45ef8bc2f MDL-29817 Form : advcheckbox allows attributes even without group key 2016-01-21 22:13:27 +05:30
Sara Cenni b68dc98398 MDL-52683 mod_scorm: Fix for Last completed attempt error with Oracle 2016-01-21 17:18:35 +01:00
Rajesh Taneja 7db80d7c10 MDL-52839 behat: Fixed xpath and wait to ensure element is visible 2016-01-21 14:36:54 +08:00
Andrew Nicols aa0b28c5e5 weekly release 2.9.4+ 2016-01-21 13:43:41 +08:00
Andrew Nicols 3804b919c0 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-01-21 13:43:38 +08:00
David Monllao e7e317a5fc MDL-51702 blocks: Allow permission overrides in dashboard 2016-01-21 08:57:35 +08:00
David Mudrák 7802d9187b MDL-52843 users: Fix the PARAM type of the name fields in signup form
If editing the profile, the useredit_shared_definition() function set
the type of all name fields to PARAM_NOTAGS. This patch sets that type
consistently in the user signup form, too.
2016-01-20 11:29:01 +01:00
Eloy Lafuente (stronk7) 8f76e5565b MDL-50083 mod_assign: protect code against not set flags
Yes could have used !empty() but for some reason found
the isset() && condition more clear. Tired brain, surely.
2016-01-20 10:06:53 +08:00
Andrew Nicols 2cf3857c74 Merge branch 'MDL-52435_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2016-01-20 09:53:54 +08:00
Eloy Lafuente (stronk7) 9d9d8856b8 Merge branch 'm29_MDL-50083' of https://github.com/greg-or/moodle-mod_assign into MOODLE_29_STABLE 2016-01-20 01:36:45 +01:00
jinhofer 8d5d3539f5 MDL-52435 mod/assign: Added and move plagiarism links
Backport of MDL-51693 and MDL-51706
2016-01-19 18:17:59 -06:00
Greg Faller 14156fca7d MDL-50083 mod_assign: unlock submission when adding attempt 2016-01-20 09:28:26 +10:30
David Mudrák 9a27d73d5d MDL-52831 users: Do not delete Mr. and Mrs. Whitespace accounts
Due to imperfect validation of the user registration and profile forms,
we allowed for firstname and lastname be just a whitespace. On MySQL,
such a whitespace is not significant for VARCHAR comparison so these
otherwise valid accounts could be silently deleted.

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

Additionally, there is accessibility improvement for better error labels
in case of missing values (copied over from signup_form).
2016-01-19 21:43:08 +01:00
Rajesh Taneja ce91756a53 MDL-52721 behat: Exclude links in moodle while finding tests
Parallel run create links within moodle
so avoid searching for tests within links
2016-01-19 14:35:38 +00:00
Dan Poltawski a6218b45e2 Merge branch 'MDL-51123-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-01-19 11:01:49 +00:00
Dan Poltawski 03a86c6d0b Merge branch 'MDL-51715_29_invalidweights' of https://github.com/colin-umn/moodle into MOODLE_29_STABLE 2016-01-19 10:40:29 +00:00
David Monllao 2c5bd27b75 MDL-52825 atto: Ignore out of bounds event targets 2016-01-19 15:41:47 +08:00
Andrew Nicols 3541d50ecc Merge branch 'MDL-52673-29' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2016-01-19 11:03:51 +08:00
Rushikesh a34afb637e MDL-52519 Idap tests: use consistent var name 2016-01-19 10:20:49 +08:00
Tim Hunt 71b091caf8 MDL-52784 quiz: unused param in quiz_get_combined_reviewoptions calls 2016-01-19 09:05:56 +08:00
Eloy Lafuente (stronk7) 42c2ceb9ee Merge branch 'MDL-52615_M29' of https://github.com/nadavkav/moodle into MOODLE_29_STABLE 2016-01-19 00:29:46 +01:00
Eloy Lafuente (stronk7) 2362ba8beb Merge branch 'MDL-52693-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-01-18 21:44:43 +01:00
Tim Hunt be38a2b3e8 MDL-52791 quiz editing: handle unknown question types 2016-01-18 17:37:52 +00:00
AMOS bot e4ebb67b46 Automatically generated installer lang files 2016-01-19 00:04:54 +08:00
Dan Poltawski 1b10b7b979 Merge branch 'MDL-52750_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2016-01-18 15:54:46 +00:00
Dan Poltawski 5865d62c35 Merge branch 'wip-mdl-52721-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-01-18 14:39:43 +00:00
Dan Poltawski b7e1c7b48c Merge branch 'MDL-52218_m29_alt' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2016-01-18 14:04:06 +00:00
Dan Poltawski f97d3d2b1b Merge branch 'MDL-52486-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-01-18 11:19:32 +00:00
Rajesh Taneja 6587d7eab1 MDL-52799 unittest: Removed empty if statement 2016-01-18 15:48:22 +08:00
Andrew Nicols bbb76a0ef5 Merge branch 'MDL-45265-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-01-18 15:19:39 +08:00
Andrew Nicols 85fabe0539 Merge branch 'MDL-52608-29' of https://github.com/xow/moodle into MOODLE_29_STABLE 2016-01-18 14:49:15 +08:00
Andrew Nicols 5dc26908e3 Merge branch 'MDL-52573-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-01-18 14:44:27 +08:00
Rajesh Taneja 834bce7f5c MDL-52799 phpunit: Truncate records for brokedmysql not empty. 2016-01-18 14:37:56 +08:00
Andrew Nicols 1b829e9ea5 MDL-50915 mod_lesson: Remove js dependencies from behat tests 2016-01-18 10:57:10 +08:00
Andrew Nicols e9ec2b17aa Merge branch 'MDL-50915_m29v5' of https://github.com/sbourget/moodle into MOODLE_29_STABLE 2016-01-18 10:55:34 +08:00
Rajesh Taneja f0121062ef MDL-52721 unittest: Exclude tests in vendor and node_modules 2016-01-18 10:26:15 +08:00
Stephen Bourget 8520046ad2 MDL-48953 choice: Improve chart labels 2016-01-15 13:43:47 -05:00
Tim Hunt db60642ced MDL-52750 quiz reviewQ/comment: add page title & student name 2016-01-15 11:11:11 +00:00
Dan Poltawski 36a826affb MDL-52573 report_grader: only check cap of installed plugins
Previously we were linking to gradebook plugins regardless of whether
they were installed. This should be fixed properly in MDL-52678.
2016-01-14 10:26:13 +00:00
Dan Poltawski 13c88d9b8d weekly release 2.9.4+ 2016-01-14 10:10:00 +00:00
Dan Poltawski bbb2f117c3 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-01-14 10:09:58 +00:00
Mark Nelson c99d5f6492 MDL-52218 gradereport_grader: added behat test for switching views 2016-01-13 15:29:23 +08:00
Mark Nelson 5e92d726cb MDL-52218 gradereport_grader: fixed 'grade:viewhidden' related errors
There were two main reasons why there were PHP errors.

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

This also meant that a user without the capability 'moodle/grade:viewhidden'
could view the course total without hidden items being taken into account
if they were not being displayed. To resolve this we now pass all the grades
and grade items when the user does not have the capability - which also solves
the PHP errors listed above.
2016-01-13 15:29:23 +08:00
Andrew Nicols 8fce1ed876 MDL-43620 mod_chat: Whitespace fix 2016-01-13 10:20:45 +08:00
Andrew Nicols 97921bc354 Merge branch 'MDL-50829-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-01-13 09:58:50 +08:00
Andrew Nicols e8623f580a Merge branch 'MDL-43620_m29v2' of https://github.com/sbourget/moodle into MOODLE_29_STABLE 2016-01-13 09:45:54 +08:00
Andrew Nicols 247f5bee76 Merge branch 'MDL-51710-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2016-01-13 09:18:06 +08:00
Andrew Nicols 566abee0a9 Merge branch 'MDL-52507_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2016-01-13 09:08:18 +08:00
Andrew Nicols f51aafc730 Merge branch 'MDL-52649-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2016-01-13 09:04:17 +08:00
Joseph Inhofer a0aef397f8 MDL-52507 enrol/manual: Generated a smart zIndex 2016-01-12 12:11:35 -06:00
AMOS bot d454a4ece8 Automatically generated installer lang files 2016-01-13 00:04:17 +08:00
Dan Poltawski 409649db96 Merge branch 'MDL-52400-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-01-12 13:13:09 +00:00
Dan Poltawski 2916c971cd Merge branch 'MDL-21912-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-01-12 11:08:15 +00:00
Dan Poltawski 2b2f987725 MDL-52656 mod_forum: remove $SSSION test hack 2016-01-12 10:48:47 +00:00
Dan Poltawski 6c57573b7c Merge branch 'wip-mdl-52656-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-01-12 10:48:36 +00:00
Andrew Nicols b74243950e Merge branch 'MOODLE_29_STABLE' of https://github.com/janeklb/moodle into MOODLE_29_STABLE 2016-01-12 15:58:37 +08:00
Andrew Nicols 6850c24a9c Merge branch 'MDL-52585-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2016-01-12 14:37:29 +08:00
Andrew Nicols f809ee9e45 Merge branch 'MDL-52610_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-01-12 14:33:53 +08:00
David Monllao d95dbc01e2 MDL-52610 user: Honour allowaccountssameemail in create_users ws
Credit to Dmitriy Kuzevanov.
2016-01-12 13:57:33 +08:00
Andrew Nicols a899a7af13 Merge branch 'MDL-52643_m29v1' of https://github.com/sbourget/moodle into MOODLE_29_STABLE 2016-01-12 13:13:46 +08:00
Andrew Nicols 645816a244 MDL-38020 behat: Correct singleselect usage 2016-01-12 12:24:25 +08:00
Andrew Nicols a176f71a43 Merge branch 'MDL-38020-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-01-12 12:24:18 +08:00
Andrew Nicols c2c4302d74 Merge branch 'MDL-27840-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2016-01-12 11:49:20 +08:00
Jun Pataleta 01989e77ac MDL-52649 user: Add check for potentially undefined variables 2016-01-12 08:56:59 +08:00
Michael Aherne cf9e808967 MDL-52589 cache: Allow unused stores to be uninstalled 2016-01-11 15:33:38 +00:00
Dan Poltawski 65e74ad477 Merge branch 'MDL-52000-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2016-01-11 12:21:51 +00:00
Dan Poltawski 576c6bf5c8 Merge branch 'MDL-41531-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2016-01-11 11:09:10 +00:00
Andrew Nicols 01258058c2 MDL-52693 tests: Backport .travis.yml to 29 2016-01-11 18:57:57 +08:00
Andrew Nicols 0e116ee392 MDL-52000 mod_forum: Respect timed posts in course overview block 2016-01-11 18:56:51 +08:00
Cameron Ball 353d1888aa MDL-52486 JavaScript: Make sure lang codes use underscores.
In some cases, underscores in lang codes get replaced with dashes
which causes some JavaScript to be unhappy. This patch simply reverse
the underscore to dash replacement on the JS side.
2016-01-11 17:02:45 +08:00
Cameron Ball 4a5fb82772 MDL-21912 restore: Add admin setting to restore conflicting admin user 2016-01-11 14:09:38 +08:00
eWallah 4d4ea7647d MDL-41531 enrol_paypal: Fix enrol errors due to non-ASCII characters 2016-01-11 10:49:51 +08:00
AMOS bot ccc259b268 Automatically generated installer lang files 2016-01-11 00:04:26 +08:00
Eloy Lafuente (stronk7) d16cdbd81f Moodle release 2.9.4 2016-01-09 00:49:51 +01:00
Frederic Massart 3617ae07f3 MDL-51710 repository_s3: Use proxy settings when communicating with S3 2016-01-08 16:54:59 +08:00
Dan Poltawski dccbafa7e9 weekly release 2.9.3+ 2016-01-08 07:45:59 +00:00
Dan Poltawski db0f899c72 Merge branch 'wip-mdl-52685-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-01-08 07:40:23 +00:00
Rajesh Taneja 505b87d89d MDL-52685 behat: keep doctrine/cache at 1.5.x for PHP 5.4.4 support 2016-01-08 16:41:20 +10:00
Stephen Bourget 13df246e98 MDL-52643 block_blog_menu: Add behat tests 2016-01-07 20:18:52 -05:00
Rajesh Taneja a1cd2000fb MDL-52656 unittest: Reset original session while setting user 2016-01-08 10:50:16 +10:00
Dan Poltawski 8069645f56 weekly release 2.9.3+ 2016-01-07 08:32:41 +00:00
Dan Poltawski e4ddf13091 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2016-01-07 08:32:39 +00:00
John Okely a1409ba644 MDL-52608 core: Use property_exists in fullname
Credit to Dmitriy Kuzevanov for the patch.
2016-01-07 07:39:17 +00:00
Paul Nicholls 81a3c47001 MDL-52673 workshop: fix dndnotsupported message in assessment form
An old CSS rule which doesn't seem to serve any purpose any more was
causing the "drag and drop not supported" message to be displayed (even
when incorrect) in the workshop assessment form when using a list-view
rubric as the grading strategy.
2016-01-07 15:44:33 +13:00
AMOS bot 08aeda7b07 Automatically generated installer lang files 2016-01-07 00:04:43 +08:00
Dan Poltawski 49e4b4922b MDL-45265 behat: tests for admin_bookmarks block 2016-01-06 11:01:44 +00:00
Rajesh Taneja 97ef1d1420 MDL-52614 mod_workshop: right align for dir-rtl only 2016-01-06 13:38:34 +08:00
Nadav Kavalerchik 1eb45d6e2b MDL-52615 Workshop: Right align phase status icons, in RTL mode. 2016-01-05 20:36:45 +02:00
AMOS bot 9c56531610 Automatically generated installer lang files 2016-01-06 00:04:18 +08:00
Dan Poltawski 0d8bbb774e Merge branch 'MDL-52503_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2016-01-05 15:30:59 +00:00
Juan Leyva 518f8a7ced MDL-52072 enrol: Fix course visibility checks in external functions 2016-01-05 10:31:36 +00:00
Janek Lasocki-Biczysko c0fbed07ee MDL-52504 grunt: fixed scope of jshint when in amd directory 2016-01-05 09:58:55 +00:00
David Monllao ebbb58556a MDL-52503 mod_assign: Removing session cache
Replaced with a global $SESSION var, deferring cleanup to session
destroy.
2016-01-05 17:51:14 +08:00
Andrew Nicols 0f479ba76e Merge branch 'wip-mdl-51881-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-01-05 14:09:47 +08:00
Rajesh Taneja 3c3ed4c0f8 MDL-51881 behat: updated composer pointing to new tag 2016-01-05 14:06:25 +08:00
Rajesh Taneja 17babdbaf7 MDL-51881 behat: Set navbar to be absolutely positioned
All behat drivers are now replicating human behavior
so when the browser scrolls something into view it doesn't account
for fixed positioned elements that end up obscuring the item thus
leading to errors that could be avoided by scrolling an additional amount.
2016-01-05 14:06:24 +08:00
Andrew Nicols dcc8e34187 Merge branch 'MDL-52078-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2016-01-05 13:55:54 +08:00
Cameron Ball 39dce68e4a MDL-52078 gradebook: Behat tests for hidden grade items. 2016-01-05 13:49:37 +08:00
Peter Miller 374639d3e6 MDL-52078 gradebook: Stop totals including hidden items.
This patch fixes a problem where the course and user reports, when viewed by
a student, were incorrectly including hidden grade items in the course totals,
making the percentages lower than they should be.
2016-01-05 13:49:36 +08:00
Dan Poltawski 62fe924127 MDL-52552 course management: insufficient cleaning of search output 2016-01-05 10:50:06 +08:00
Nadav Kavalerchik 69e22263ad MDL-52625 Badges: Right align manage badges table content, in RTL mode. 2016-01-05 08:49:55 +08:00
Stephen Bourget a8c51a689d MDL-50915 Lesson: Behat test for overview report 2016-01-04 18:40:26 -05:00
Stephen Bourget a88106bdd9 MDL-50915 Lesson: Fix information on outline report 2016-01-04 18:40:22 -05:00
Nadav Kavalerchik d3b1d6a004 MDL-52614 Workshop: Right align user's picture on Assessed submission. 2016-01-04 18:14:03 +00:00
Stephen Bourget 51ddd51271 MDL-43620 Chat: Behat test for course reset 2016-01-04 11:58:48 -05:00
Stephen Bourget 6d5aecf22e MDL-43620 Chat: Fix error on course reset 2016-01-04 11:58:44 -05:00
Juan Leyva 0e4483cf57 MDL-52400 webservice: Add core_notes_delete_notes to the mobile service 2016-01-04 16:36:15 +01:00
Dan Poltawski a286741d9c Merge branch 'MDL-52645-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2016-01-04 15:35:22 +00:00
Dan Poltawski d9ddd1d13d Merge branch 'wip-mdl-52605-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2016-01-04 13:42:09 +00:00
Dan Poltawski 82470d8ebc Merge branch 'MDL-52638_m29v1' of https://github.com/sbourget/moodle into MOODLE_29_STABLE 2016-01-04 11:36:41 +00:00
Helen Foster 0272a95dc8 MDL-52645 lang: Merge English strings from the en_fix language pack 2016-01-04 11:56:43 +01:00
Andrew Nicols 048f8d9ae7 Merge branch 'MDL-49566_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2016-01-04 13:57:51 +08:00
Stephen Bourget e259354c91 MDL-52638 activity_results: Improve Behat tests 2016-01-03 21:04:32 -05:00
Andrew Nicols 5994edb30b Merge branch 'MDL-51445_m29v1' of https://github.com/sbourget/moodle into MOODLE_29_STABLE 2016-01-04 09:24:44 +08:00
Rajesh Taneja 0d8ad43873 MDL-52605 phpunit: Keep track of initial reset sequence 2016-01-04 07:59:25 +08:00
Rajesh Taneja 91d5491ee2 MDL-52605 phpunit: Check file only if needed 2016-01-04 07:59:25 +08:00
Mark Nielsen 8d94e92599 MDL-52605 phpunit: Prevent querying database metadata 2016-01-04 07:59:24 +08:00
Mark Nielsen 8e00c5c8ed MDL-52605 phpunit: Improve get_message_processors reset 2016-01-04 07:59:24 +08:00
AMOS bot 078babf6d2 Automatically generated installer lang files 2016-01-04 00:04:37 +08:00
Stephen Bourget 9a03fe6ebd MDL-51445 Chat: Fix broken profile links 2015-12-31 11:10:09 -05:00
Dan Poltawski 8a48bf5beb weekly release 2.9.3+ 2015-12-31 08:16:41 +00:00
Dan Poltawski 2780c284c5 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-12-31 08:16:39 +00:00
David Monllao e73d9075e9 MDL-52347 format_social: Replicate wait between new discussions 2015-12-31 13:22:27 +08:00
Dan Poltawski fabb658ff6 MDL-38020 behat: for enrollment management from participants page 2015-12-30 15:26:49 +00:00
Dan Poltawski 9a30a23456 MDL-38020 participants: Use consistent link for editing enrollments
Previously the role assignment url was used when a role was selected, but
this page doesn't enrol users into the course (its the old 1.9 way
before we had the enrollments table).
2015-12-30 15:26:49 +00:00
Dan Poltawski 38436bfd65 MDL-27840 course: prevent warnings on half-uninstall mod 2015-12-30 14:13:53 +00:00
Dan Poltawski 0cad1c25dc Merge branch 'MDL-50357_29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-12-30 09:19:37 +00:00
Juan Leyva 656808ea40 MDL-51123 mod_scorm: Do not display SCO with invisible = false 2015-12-30 10:17:14 +01:00
AMOS bot 80ea373e2c Automatically generated installer lang files 2015-12-30 00:04:16 +08:00
Dan Poltawski 680ebf2315 MDL-50829 lang: fix to RTL/LTR bracket confusion
Thanks to ISHIKAWA Takayuki for the initial patch
2015-12-29 12:32:05 +00:00
Juan Leyva bab4badd06 MDL-52459 mod_scorm: Auto-update downloaded packages 2015-12-29 12:44:04 +01:00
Michael Aherne 13f89eaf11 MDL-52439 assign: correct get_user_submission() phpdoc 2015-12-29 10:38:32 +00:00
Dan Poltawski c72cac3879 Merge branch 'MDL-52275_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-12-29 10:04:52 +00:00
Mark Nelson 7238ffc65d MDL-49566 core: used reflection in unit tests
Also split the tests into multiple functions for each scenario.
2015-12-29 17:49:34 +08:00
Ankit Agarwal 75bc323bf1 MDL-49566 core: Write unittests for MDL-45898 2015-12-29 17:48:53 +08:00
Ankit Agarwal 15d4f7a72a MDL-49566 myprofile: Fix bugs in myprofilelib 2015-12-29 17:43:06 +08:00
Ankit Agarwal e056d8b19d MDL-49566 notes: Notes link should not show up for guests 2015-12-29 17:43:05 +08:00
David Monllao 26ec60a016 Merge branch 'MDL-51889_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-12-29 15:35:50 +08:00
Eugene Venter 2de94975a3 MDL-52530 unittest: more robust capability assignments for guest
for core_files_file_storage_testcase and core_repositorylib_testcase
2015-12-29 14:06:44 +08:00
David Monllao ab7493b61c Merge branch 'wip-mdl-52347-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-12-29 14:03:41 +08:00
Mark Nelson b826a2a180 MDL-51889 enrol_guest: always check password before re-enabling 2015-12-29 13:50:00 +08:00
David Monllao 384711fe8c Merge branch 'MDL-52591-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-29 13:47:31 +08:00
David Monllao 401c7b680d MDL-52597 mod_forum: Remove duplicated query 2015-12-29 10:04:16 +08:00
David Monllao 333097ea67 Merge branch 'MDL-52597-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-12-29 10:01:43 +08:00
AMOS bot 1d96718214 Automatically generated installer lang files 2015-12-29 00:04:16 +08:00
AMOS bot 012f850733 Automatically generated installer lang files 2015-12-28 00:04:28 +08:00
AMOS bot 690d2c69a3 Automatically generated installer lang files 2015-12-25 00:04:23 +08:00
Marina Glancy a0c5c98dc5 MDL-52347 behat: fix random failures on fast computer 2015-12-24 14:19:33 +08:00
Rajesh Taneja 9e1feec44b MDL-52606 behat: Added time delay to avoid random fails
If attempts are created at same timestamp, then results are
not same, and lesson module finds that attmpt was in progress.
To avoid this problem, attempts should be created at different
timestamp.
2015-12-24 14:02:44 +08:00
Dan Poltawski 2a416b3466 weekly release 2.9.3+ 2015-12-23 11:35:57 +00:00
Dan Poltawski a3fbe80044 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-12-23 11:35:53 +00:00
Mark Nelson 38ac93aace MDL-52275 core: fixed grade-to-pass being overwritten
Thanks goes to W.J. Roes for the patch.
2015-12-23 16:52:51 +08:00
Andrew Nicols 403a814535 MDL-52597 mod_forum: Remove sleep from tests 2015-12-23 14:32:28 +08:00
Andrew Nicols 7dabe1053c Merge branch 'MDL-52355-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-12-23 10:06:14 +08:00
Dan Poltawski e1011a09cf MDL-52591 grunt: make shifter task respect --no-color 2015-12-22 18:37:58 +00:00
Eloy Lafuente (stronk7) 81c8f80dae Merge branch 'MDL-49743-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-22 17:14:33 +01:00
AMOS bot 65d64de0cd Automatically generated installer lang files 2015-12-23 00:04:22 +08:00
Juan Leyva fed63e1d27 MDL-52585 webservices: Return correct invalid login message 2015-12-22 16:59:58 +01:00
Dan Poltawski 94d60b142c Merge branch 'm29_MDL-51916' of https://github.com/danmarsden/moodle into MOODLE_29_STABLE 2015-12-22 13:17:59 +00:00
Eloy Lafuente (stronk7) 561f53a702 Merge branch 'MDL-51719-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-22 13:15:53 +01:00
Dan Poltawski 27527f6c36 MDL-52017 enrol_self: fix incorrect empty statement
Ironically this was detected by causing a syntax error on php54
2015-12-22 09:52:08 +00:00
David Monllao a53db0ab73 Merge branch 'MDL-52017_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-12-22 16:37:29 +08:00
Andrew Nicols e493cb7d9c Merge branch 'MDL-52250-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-22 15:05:30 +08:00
Andrew Nicols 0dc39f21c3 Merge branch 'MDL-23128-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-22 13:12:08 +08:00
David Monllao 2d89b5ea52 Merge branch 'wip-mdl-52376-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-12-22 11:25:12 +08:00
David Monllao 6af476cab2 Merge branch 'MDL-52558-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-12-22 11:17:06 +08:00
Rajesh Taneja 785f9f97a8 MDL-52427 behat: Fixed question selectors
As class is changed, we need to convert selector
to check if class is contained, rather then checking
selecting with specific class.
2015-12-22 10:33:07 +08:00
Andrew Nicols 110843c03c Merge branch 'MDL-52334_29' of git://github.com/aolley/moodle into MOODLE_29_STABLE 2015-12-22 09:18:17 +08:00
Dan Poltawski 396e086575 Merge branch 'MDL-52380-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-12-21 16:47:23 +00:00
Dan Poltawski c2ab40848b Merge branch 'MDL-52354-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-12-21 16:41:05 +00:00
Dan Poltawski 7f4cd77843 Merge branch 'MDL-52427_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-12-21 13:27:42 +00:00
Dan Poltawski b074e8a1a2 Merge branch 'MDL-52402_29' of git://github.com/mr-russ/moodle into MOODLE_29_STABLE 2015-12-21 12:46:21 +00:00
Dan Poltawski affd686294 Merge branch 'MDL-52455_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-12-21 12:43:58 +00:00
Mark Nelson 2d645be2a5 MDL-50357 core_group: tidy up the function groups_delete_group_members 2015-12-21 17:41:18 +08:00
David Monllao fc1c26b8c0 Merge branch 'MDL-51257-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-12-21 17:33:18 +08:00
David Monllao 3891d6d398 Merge branch 'MDL-52429-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-12-21 17:17:20 +08:00
David Monllao 33b8447c60 Merge branch 'MDL-49758-29' of git://github.com/StudiUM/moodle into MOODLE_29_STABLE 2015-12-21 17:06:13 +08:00
David Monllao 755f2c3eae MDL-52226 tests: Fix behat phpunit naming conflict 2015-12-21 08:32:35 +00:00
David Monllao 9f5dd71d82 Merge branch 'MDL-52226-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-12-21 14:43:04 +08:00
Andrew Nicols c4ad68a8b7 Merge branch 'm29_MDL-50972' of https://github.com/danmarsden/moodle into MOODLE_29_STABLE 2015-12-21 14:04:24 +08:00
David Monllao 5276206f43 Merge branch 'MDL-47106_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-12-21 11:33:19 +08:00
AMOS bot 890de8ab6a Automatically generated installer lang files 2015-12-20 00:05:33 +08:00
Dan Poltawski 747f4468fb weekly release 2.9.3+ 2015-12-18 12:26:59 +00:00
Dan Poltawski 86ecd214da Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-12-18 12:26:57 +00:00
sam marshall 2fae9db702 MDL-52558 Data generator: enrol_user should allow shortname 2015-12-18 11:01:57 +00:00
Shamim Rezaie 8ec0823dfe MDL-52380 mod_forum: Non-Gregorian dates in forum advance search
Convert the fromdate and todate date parts to Gregorian before passing them to make_timestamp
2015-12-17 18:07:04 -06:00
Shamim Rezaie 0f64a45eaf MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-17 18:06:55 -06:00
Shamim Rezaie 38b700180f MDL-52355 mod_data: Make date field respect the calendar type in use
Updated the date subplugin to consider that the input date element
values might be for any calendar type and not just the Gregorian
calendar.
2015-12-17 16:21:26 -06:00
Shamim Rezaie 31f6946c8f MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-17 16:21:13 -06:00
Shamim Rezaie 5a03c7b447 MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-17 15:49:16 -06:00
Dan Marsden d242d558ae MDL-51916 mod_scorm: allow html5 scorm content fullscreen 2015-12-16 20:29:41 +13:00
AMOS bot 60059b9216 Automatically generated installer lang files 2015-12-15 00:04:21 +08:00
Dan Marsden 14695e5f4c MDL-50972 mod_scorm: set autocommit as boolean
var currently passed as string so not evaluated correctly
2015-12-14 14:27:18 +13:00
Matthew Pruett ae73287803 MDL-47106 quiz 'secure' window: Finish review link did not work 2015-12-13 22:09:05 +00:00
Amanda Doughty 0b8f8f3402 MDL-52455 quiz: doesn't include all user fields required by messaging 2015-12-13 20:48:59 +00:00
Tim Hunt 89db762c0e MDL-52427 questions: all parts of a Q should be clearfix
Otherwise large floated images may overflow.
2015-12-13 20:28:26 +00:00
Jean-Philippe Gaudreau 5d11d337d2 MDL-49758 mod_quiz: Fix require on completionlib.php
Credits: Gordon Bateson
2015-12-11 13:01:28 -05:00
David Monllao e6e3aa975a Merge branch 'MDL-52438-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-12-10 15:35:17 +08:00
sam marshall e8af997888 MDL-52226 Forms: max_input_vars problems with advanced checkbox 2015-12-09 12:19:53 +00:00
Dan Poltawski 464f907c4c weekly release 2.9.3+ 2015-12-09 12:09:33 +00:00
Dan Poltawski 3f355629ee Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-12-09 12:09:32 +00:00
Marina Glancy 5adb27669c MDL-52438 core: allow Moodle 3.0 to be used with PHP7 2015-12-09 18:30:51 +08:00
Eloy Lafuente (stronk7) e794852ff5 Merge branch 'MDL-51483_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2015-12-09 02:22:58 +01:00
Adam Olley 23c63a1afe MDL-52334 enrol_database: Add missing filter to user_enrolment lookup
Without the user filter, the left join to the user enrolment table
results in a much larger set of data being returned than before
MDL-28420. Which makes login time for users in many busy courses much
worse than before (3x worse on average, observed upto 40x).
2015-12-09 09:27:04 +10:30
Dan Poltawski c44388a7cf Merge branch 'MDL-51097_m29v1' of https://github.com/sbourget/moodle into MOODLE_29_STABLE 2015-12-08 10:07:44 +00:00
Dan Poltawski 61bc523600 Merge branch 'MDL-51411_29' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-12-08 09:05:50 +00:00
Dan Poltawski 4ee2ff34b1 Merge branch 'wip-MDL-52193-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-12-07 15:37:45 +00:00
jinhofer df1e5786c2 MDL-51483 lib/moodlelib.php: Added conditional checks to shorten_text 2015-12-07 09:19:00 -06:00
Juan Leyva 4818800a69 MDL-52429 mod_scorm: Fix SCORM completion checking in nested SCOs 2015-12-07 11:29:34 +01:00
Dan Poltawski 8b936c2483 Merge branch 'MDL-50258_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-12-07 09:05:37 +00:00
David Monllao 89a1d7cc73 Merge branch 'MDL-52204-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-07 16:35:43 +08:00
Dan Poltawski 2f1de062c6 Merge branch 'MDL-52304_29' of https://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-12-07 08:21:25 +00:00
Dan Poltawski 500202997b 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:44:11 +08:00
Russell Smith a17167118a MDL-52402 backup, quiz: Fix attempt token and add missing rule. 2015-12-05 10:13:18 +11:00
Russell Smith 7361129133 MDL-52402 backup: Improve debugging output on failed log restores 2015-12-05 10:13:18 +11:00
Dan Poltawski f3629d3204 MDL-51582 readme: update less building instructions
I forgot to update this after the changes in 04422a03
2015-12-04 16:42:06 +00:00
Eloy Lafuente (stronk7) 116a88c6bc Merge branch 'MDL-51582-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-04 17:15:32 +01:00
AMOS bot 97898d4faa Automatically generated installer lang files 2015-12-05 00:04:49 +08:00
Dan Poltawski 122214a8db MDL-52250 npm: shrinkwrap to lock down dependencies
We've tried various approaches to lock down our dependencies and they
have been flawed because dependencies in our included packages may not
be locked down and previous attempts to do that have not been correct.

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

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

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

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

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

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

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

B) Bump grunt-contrib-uglify to 0.11.0

This moves us to uglify-js ~2.6.0 - which doens't change any output
files.
2015-12-04 15:36:44 +00:00
Dan Poltawski 59a0253332 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:38:40 +00:00
Dan Poltawski 04422a0396 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:58:29 +00:00
Dan Poltawski c3033419cc MDL-51582 css: built with new grunt task 2015-12-04 10:58:29 +00:00
Dan Poltawski a99bf936fb 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:47:01 +00:00
Michael Aherne 84a77ce35d MDL-52304 media: Allow full screen in Flash player 2015-12-04 10:07:10 +08:00
David Monllao cc3992585a MDL-50258 themes: Fix CSS source maps 2015-12-04 09:02:36 +08:00
Ben Kelada c2176f5451 MDL-52261 filelib: Do login check for files in blocks 2015-12-04 11:03:09 +11:00
Eloy Lafuente (stronk7) 00802d0930 weekly release 2.9.3+ 2015-12-03 19:41:12 +01:00
Eloy Lafuente (stronk7) ff4cc15c72 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-12-03 19:41:06 +01:00
Eloy Lafuente (stronk7) 1caf3fe169 MDL-52141 backup: test restore_log_rule don't modify passed log anymore 2015-12-03 19:03:30 +01:00
David Monllao d69efaf872 Merge branch 'MDL-48004-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-03 19:03:29 +01:00
David Monllao 3e7d409d72 Merge branch 'MDL-50710-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-12-03 19:03:28 +01:00
AMOS bot b967175480 Automatically generated installer lang files 2015-12-04 00:04:50 +08:00
Mark Nelson 9678041d7d MDL-52017 enrol_self: always check password before re-enabling 2015-12-03 19:27:04 +08:00
David Monllao 1a62cb7567 Merge branch 'MDL-52260-29-2' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-12-03 11:57:04 +01:00
Eloy Lafuente (stronk7) 3a1a3639aa Merge branch 'MDL-45364-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-12-03 11:57:03 +01:00
Dan Poltawski 89349cd5a7 MDL-52292 testing: block generator fix
Stop errors when no $options supplied
2015-12-03 11:57:03 +01:00
Dan Poltawski 4211ec36a5 Merge branch 'MDL-52292_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-12-03 11:57:02 +01:00
Dan Poltawski 328a9d57ca MDL-26935 behat: add coverage for role renaming in course 2015-12-03 11:57:02 +01:00
Russell Smith 62f2a0d05a MDL-52141 backup: Ensure we don't alter the log record when parsing it. 2015-12-03 11:57:01 +01:00
Dan Poltawski 278eba8cfa Merge branch 'MDL-37308-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-12-03 11:57:00 +01:00
Tony Levi 36f5996a19 MDL-51757 mod_scorm: Remove duplicate function param
convert invalid break calls to exceptions for PHP 7
2015-12-03 11:57:00 +01:00
Rajesh Taneja 54e328d0f6 MDL-52376 behat: Add 1 sec delay to ensure cron works
course completion record should be created at time
which is before the time cron is run. On fast machine
this both might be done at same time. So added 1 sec delay
2015-12-03 13:18:14 +08:00
Cameron Ball 4e07b2cfbd MDL-51257 messages: Improve message form.
- Add sudmit button
- Add formchangechecker
- Update behat tests
2015-12-03 10:23:55 +08:00
Tim Hunt ae5cf0490f 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:51:28 +00:00
Dan Poltawski 6f08d4ee0b Merge branch 'MDL-52283-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-11-30 11:27:49 +00:00
Dan Poltawski ad552b3502 Merge branch 'MDL-52332-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-11-30 10:22:44 +00:00
David Monllao 3de05a67ed Merge branch 'MDL-35982-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-30 15:46:47 +08:00
Marina Glancy 5e3989dfcf MDL-52332 calendar: load settings using API 2015-11-30 11:48:10 +08:00
Rajesh Taneja e634f04355 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:32:36 +08:00
Jun Pataleta 5eb6f7500a MDL-37308 files: Additional fixes for transparency
Fixed transparency support when resizing and when not resizing.
2015-11-29 20:28:29 -06:00
Jetha Chan 694b4d4274 MDL-37308 files: support transparency when not resizing; new unit test 2015-11-29 20:28:29 -06:00
Adrian Greeve baddb058a9 MDL-37308 files: convert_image() now supports transparency. 2015-11-29 20:28:28 -06:00
Marina Glancy 8d77d104bf MDL-50710 block_glossary_random: more precise sorting 2015-11-30 09:16:57 +08:00
AMOS bot 6a66d9b08d Automatically generated installer lang files 2015-11-28 00:05:02 +08:00
Dan Poltawski f788c16f00 MDL-51719 atto_rtl: RTL/LTR buttons now indicate state
Previously the RTL buttons did not indiciate wether RTL or LTR was
selected. Thanks to Andrew Nicols for guiding how to do this.
2015-11-27 14:10:26 +00:00
John Okely 66620e48b7 MDL-52260 user: Fix error when saving profile with locked field 2015-11-27 11:02:58 +08:00
Tony Levi f3a92d07b6 MDL-52283 core: password_hash() deprecation in PHP7 2015-11-27 09:13:16 +08:00
Andrew Nicols 8dfc18bed3 MDL-45364 atto_rtl: Fix JS lint 2015-11-26 19:50:40 +00:00
Dan Poltawski 1199aab2c1 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:51 +00:00
Dan Poltawski 48cf88458c MDL-35982 behat: delete blog entry coverage 2015-11-26 14:13:22 +00:00
Dan Poltawski 45600c4a0b MDL-35982 blog: reorder blog delete confirmation
Improves accessibility to be ordered logically in page
2015-11-26 14:13:22 +00:00
Dan Poltawski 4b0075414e 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:13:22 +00:00
David Monllao b9c333f5db weekly release 2.9.3+ 2015-11-26 10:54:41 +08:00
David Monllao ea5431e351 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-11-26 10:54:40 +08:00
Dan Poltawski 4c4295061c MDL-23128 tex: silence dvips output
This was causing spewwing of lots of messages to the error log..

Thanks to Fred Woolard for the suggestion
2015-11-25 17:07:33 +00:00
AMOS bot 33eb190484 Automatically generated installer lang files 2015-11-26 00:04:40 +08:00
Dan Poltawski 1240c086eb MDL-49743 singleview: slightly clarify logic
Make it clearer what the 'unset' behaviour is because previously
we've set the default for 'empty' values twice.
2015-11-25 15:12:11 +00:00
Conn f056d6fb88 MDL-49743 singleview: Prevent errors when no itemid was selected
Signed-off-by: Conn <conn@cmrwarwicker.com>
2015-11-25 15:12:11 +00:00
Andrew Hancox 8fa1397886 MDL-51411 course: Fixed warning when deleting activity with js disabled 2015-11-25 14:41:45 +00:00
Frederic Massart 0baa4c581e MDL-52160 navigation: Mark category and module settings nodes as branch 2015-11-25 13:13:14 +08:00
AMOS bot 998305db0a Automatically generated installer lang files 2015-11-25 00:04:36 +08:00
David Monllao fd9c9c807f Merge branch 'MDL-44330-m29' of git://github.com/NeillM/moodle into MOODLE_29_STABLE 2015-11-24 17:04:09 +08:00
David Monllao 66270fd6e6 Merge branch 'MDL-45934-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-24 16:56:07 +08:00
Neill Magill 07ae362341 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:40:09 +00:00
Eloy Lafuente (stronk7) 51ad4489b9 Merge branch 'MDL-52095_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-11-23 19:31:27 +01:00
Eloy Lafuente (stronk7) 3439a8196e Merge branch 'MDL-52185-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-23 19:27:09 +01:00
Dan Poltawski 165d174c7f Merge branch 'wip-mdl-51063-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-11-23 11:33:52 +00:00
Dan Poltawski 3874af089a Merge branch 'MDL-52166_29' of https://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-11-23 09:43:13 +00:00
David Monllao 28c0272a16 Merge branch 'MDL-52086-29' of git://github.com/bostelm/moodle into MOODLE_29_STABLE 2015-11-23 16:11:06 +08:00
Vadim Dvorovenko 7bf842111f 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:24 +08:00
David Monllao 8cf4568280 Merge branch 'MDL-52160-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-11-23 14:09:47 +08:00
David Monllao 5526ce914b Merge branch 'MDL-49490-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-23 13:54:43 +08:00
David Monllao a5ef15bbb0 Merge branch 'MDL-43069-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-23 13:33:40 +08:00
Dan Poltawski d4e7c98dd6 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:59 +00:00
AMOS bot 184ed2b8f9 Automatically generated installer lang files 2015-11-21 00:04:27 +08:00
David Monllao 2fe04a14e2 MDL-52095 themes: Padding to the left on RTL langs 2015-11-20 10:04:12 +08:00
AMOS bot f6dd11e3ff Automatically generated installer lang files 2015-11-20 00:04:29 +08:00
Dan Poltawski 2825fc7249 weekly release 2.9.3+ 2015-11-19 09:20:24 +00:00
Dan Poltawski cfb85df80c Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-11-19 09:20:21 +00:00
David Monllao 8229a2b85d MDL-42571 editpdf: Fix search comments
They are also hidden instead of destroyed.
2015-11-19 07:06:40 +00:00
Dan Poltawski fc1a399565 Merge branch 'wip-MDL-52194-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-11-19 06:49:53 +00:00
David Monllao f4b608041c MDL-42571 editpdf: Fix comments search and multiple views drawing 2015-11-19 12:56:26 +08:00
Stephen Bourget 0e967898bd MDL-51097 Lesson: allow resume from within a cluster 2015-11-18 23:22:10 -05:00
Henning Bostelmann 6e1654b79b MDL-52086 output renderers: show subtree only when tab is activated 2015-11-18 16:20:36 +00:00
AMOS bot 3c5a929ef2 Automatically generated installer lang files 2015-11-19 00:05:01 +08:00
Pavel Sokolov e45ba0143b 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:48 +00:00
Dan Poltawski 63f070cab1 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:40 +00:00
Dan Poltawski b61dfdaf8f MDL-49490 assign: can't export to portfolio on non-submission 2015-11-18 09:14:34 +00:00
Marina Glancy 021f11b6b6 MDL-52194 flowplayer: do not check request
$_REQUEST variable may contain cookies in some php configurations. See also MDL-48085
2015-11-18 15:37:09 +08:00
Marina Glancy 516280b3a0 MDL-52193 questions: add missing require_once 2015-11-18 13:38:36 +08:00
Rajesh Taneja 90c5e7f8d1 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:17:53 +08:00
rajesh Taneja 2d98e42166 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:17:46 +08:00
Dan Poltawski a4e43f3d13 MDL-52185 report: remove ugly bullet points 2015-11-17 15:34:17 +00:00
David Monllao 014be0ff8b Merge branch 'MDL-51988-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-17 10:23:42 +08:00
Russell Smith 5afb2e2601 MDL-50700 gradereport_overview: Call $PAGE->set_course
To ensure correct blocks are displayed.
2015-11-17 10:03:11 +08:00
David Monllao f907ed40e6 Merge branch 'MDL-46049-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-17 08:55:54 +08:00
Dan Poltawski be2dd2fd10 Merge branch 'MDL-52021-29-test' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-11-16 16:21:19 +00:00
AMOS bot 9c56b617f5 Automatically generated installer lang files 2015-11-17 00:05:18 +08:00
Tim Hunt d5956a3f17 MDL-52166 gradebook: overview report fails with separate groups 2015-11-16 14:38:45 +00:00
Frederic Massart 986906d64b MDL-52160 navigation: Really remove module settings empty nodes 2015-11-16 19:46:29 +08:00
David Monllao 2ce6daca4b Merge branch 'MDL-47065-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-16 15:20:12 +08:00
David Monllao 9620e23384 Merge branch 'MDL-50687-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-16 14:27:08 +08:00
David Monllao 502a3b29b6 Merge branch 'MDL-50564-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-11-16 14:21:00 +08:00
Bence Laky 597b71cf55 MDL-42571 assignfeedback_editpdf: Fixed second PDF view 2015-11-16 13:45:53 +08:00
AMOS bot f190723ad5 Automatically generated installer lang files 2015-11-16 00:04:35 +08:00
AMOS bot 83da404228 Automatically generated installer lang files 2015-11-15 00:04:21 +08:00
Frederic Massart 411a25c7eb MDL-50564 atto: Require atto_menu in atto_plugin 2015-11-13 14:39:38 -06:00
Syam Mohan 1e7d81b51d MDL-52021 enrollib: Removed repeated capability
'moodle/role:assign' replicated in the permission checking
2015-11-13 10:15:04 -06:00
AMOS bot 1ef65952ee Automatically generated installer lang files 2015-11-14 00:06:34 +08:00
David Monllao b7075e690c weekly release 2.9.3+ 2015-11-13 15:27:39 +08:00
David Monllao d1d6c611ef Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-11-13 15:27:37 +08:00
Dan Poltawski 3e520d2b7c MDL-50687 phpunit: error early if required locale not installed 2015-11-13 07:00:35 +00:00
Dan Poltawski b521ed1eae MDL-51819 theme: style fix for nested dropdowns 2015-11-12 21:55:29 +00:00
Dan Poltawski 9d9a0b070a MDL-47065 notes: prevent empty spaces added as note
(And updated behat test for this test case)
2015-11-12 09:57:40 +00:00
Jun Pataleta 0084e7efd7 MDL-47065 behat: improve verificaton of lack of note 2015-11-12 09:57:40 +00:00
Dan Poltawski 64a5038847 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-12 09:57:22 +00:00
Dan Poltawski 8dcf53b73e MDL-51819 js: built changes 2015-11-12 08:56:01 +00:00
Dan Poltawski a923ed028d Merge branch 'wip-MDL-51819-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-11-12 08:46:56 +00:00
Simeon Naydenov c4277bcdd0 MDL-51819 themes: Nested navigation dropdowns work on small screens. 2015-11-12 13:58:14 +08:00
Eloy Lafuente (stronk7) c78df8f42b Merge branch 'MDL-51515-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-11-11 23:15:15 +01:00
Damyon Wiese ddf844a904 MDL-51515 assign: Fix typo setting url in nav tree.
Thanks to Nelson Moller and Tyler Bannister.
2015-11-11 11:17:47 -06:00
Dan Poltawski 3e443eb1f3 MDL-36109 accesibility: use proper words for logo alt text 2015-11-11 17:28:40 +01:00
AMOS bot fd673f2b8d Automatically generated installer lang files 2015-11-12 00:04:17 +08:00
Eloy Lafuente (stronk7) 616de3dff9 Merge branch 'MDL-51495-m29' of https://github.com/NeillM/moodle into MOODLE_29_STABLE 2015-11-11 16:58:31 +01:00
Eloy Lafuente (stronk7) b93f4c7570 Merge branch 'MDL-50589-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-11-11 16:53:32 +01:00
Neill Magill 1a968ade33 MDL-51495 calendar: E_WARNING in core_calendar_get_calendar_events
If a user does not have the 'moodle/calendar:manageentries' capability then an E_WARNING
can be generated by the core_calendar_external::get_calendar_events() method, that an
expected array is null

This patch creates an array that is missing when a user does not have the capability.
2015-11-11 15:21:50 +00:00
Neill Magill 68d41752c5 MDL-51495 calendar: Unit test to get an individual course event
If is user requests a single event on a course via the web service they should be able to retrieve it.
2015-11-11 15:21:21 +00:00
Dan Poltawski 48c50f4e7f MDL-51988 behat: Add coverage of participation report messaging 2015-11-11 12:40:12 +00:00
Dan Poltawski a15378e431 MDL-51988 behat: select a table by <th> tag 2015-11-11 12:40:11 +00:00
Dan Poltawski e30f11ede6 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-11 12:40:11 +00:00
David Monllao 607d46adc9 Merge branch 'MDL-51913_statistics_dup_1st_column_MDL29' of git://github.com/barrysspace/moodle into MOODLE_29_STABLE 2015-11-11 12:39:11 +08:00
David Monllao f548f950ea Merge branch 'MDL-51935-29' of git://github.com/dpalou/moodle into MOODLE_29_STABLE 2015-11-11 10:01:30 +08:00
Eloy Lafuente (stronk7) 491f57a2b0 Merge branch 'wip-mdl-52077-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-11-10 23:44:43 +01:00
Eloy Lafuente (stronk7) 9a99818016 Merge branch 'wip-mdl-52066-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-11-10 23:33:39 +01:00
Eloy Lafuente (stronk7) 0b6cc260c7 Merge branch 'MDL-51686-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-11-10 20:20:07 +01:00
Eloy Lafuente (stronk7) 4789682191 Merge branch 'MDL-50781-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-10 20:14:25 +01:00
Eloy Lafuente (stronk7) 5ddcdfd743 Merge branch 'MDL-51720-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-11-10 19:28:55 +01:00
Matt Petro 9873593120 MDL-51482 caching: Fix unnecessary updates to lastinvalidation time 2015-11-10 18:28:34 +01:00
Dan Poltawski 8b94100661 Merge branch 'MDL-51314-groupmembership-v29' of https://github.com/dmitriim/moodle into MOODLE_29_STABLE 2015-11-10 14:44:21 +00:00
Eloy Lafuente (stronk7) 3f0687bcdf weekly release 2.9.3+ 2015-11-10 10:50:11 +01:00
Eloy Lafuente (stronk7) a9bb11731c Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-11-10 10:50:03 +01:00
Dan Poltawski c773d10247 MDL-52063 forum: Moved notification is not a problem
The default behaviour of $OUTPUT->notification() is to indiciate a
problem.
2015-11-10 09:39:29 +00:00
Dan Poltawski 7e0516eab3 Merge branch 'MDL-52063-29' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-11-10 09:28:32 +00:00
Dani Palou 45e37067f6 MDL-51935 wiki: Add missing strings in wiki 2015-11-10 10:11:25 +01:00
Rajesh Taneja 4529cf6c76 MDL-52077 unittest: Fixed string typo 2015-11-10 13:54:18 +08:00
Rajesh Taneja 81ebc2746e MDL-52066 unittest: Use ics file from external repo 2015-11-10 13:29:51 +08:00
John Okely 5821639bb7 MDL-52063 forum: Display message when moving forum 2015-11-10 10:23:40 +08:00
Eloy Lafuente (stronk7) 12c17ffaee Merge branch 'MDL-47979-29-blocks-config' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-11-09 23:44:20 +01:00
AMOS bot 05d6d57101 Automatically generated installer lang files 2015-11-10 00:04:16 +08:00
David Mudrák 663287d08f MDL-47979 blocks: Do not display link to legacy file admin/block.php
The deprecated file admin/block.php was removed in Moodle 2.6. Since
then, all blocks that declare has_config() must provide a settings.php
file.
2015-11-09 13:53:40 +01:00
Dan Poltawski eb7fb32928 Merge branch 'MDL-51837-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-11-09 11:33:02 +00:00
Dan Poltawski 1542f9d5b0 Merge branch 'MDL-51628-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-11-09 11:01:32 +00:00
Dan Poltawski 7634d30a74 Merge branch 'wip-MDL-52039-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-11-09 08:48:52 +00:00
David Monllao 9376718334 Merge branch 'MDL-40245_29' of git://github.com/SWiT/moodle into MOODLE_29_STABLE 2015-11-09 16:13:37 +08:00
David Monllao e265092be4 Merge branch 'MDL-49473-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-09 15:13:08 +08:00
Marina Glancy b7191a5616 MDL-52039 block_tags: hide tagtype element if n/a 2015-11-07 12:44:03 +08:00
Eloy Lafuente (stronk7) 3a325f777f Moodle release 2.9.3 2015-11-06 20:51:47 +01:00
Eloy Lafuente (stronk7) 2496ea3f9a Merge branch 'MDL-50426-29-behat-fixage' of https://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-06 19:47:19 +01:00
Dan Poltawski c2cc463678 MDL-50426 behat: Update non-contacts feature naming 2015-11-06 18:43:35 +00:00
Dan Poltawski 7ba5567205 MDL-50426 behat: fix compatibility with 29
The test was not working on this branch due to missing MDL-27177
2015-11-06 18:40:56 +00:00
Dan Poltawski 7fd11cca1d weekly release 2.9.2+ 2015-11-06 11:56:42 +00:00
Rajesh Taneja fb4df94831 MDL-51685 unittest: Test functionality individually 2015-11-06 11:20:10 +01:00
Eloy Lafuente (stronk7) c8722df0c0 MDL-51861 enrol: added missing external cleanup for formal compliance 2015-11-06 10:05:39 +00:00
Dan Poltawski 9878e8e170 MDL-51569 mod_choice: Fix use of hardcoded ids
(Previous approach of making up ids longer works now we are validating
them..)
2015-11-06 08:13:09 +00:00
Dani Palou b26b240790 MDL-51861 enrol: Don't get all parts in get_enrolled_users with groups 2015-11-06 15:10:35 +08:00
Eloy Lafuente (stronk7) ee990ba3bb MDL-51861 enrol: new unit test to verify all conditions and filters
This unit test does not verify contents, details, but only
that the returned users for every group mode, for every
filtering (active, groupid and withcapability) together
with permissions are correct.
2015-11-06 15:08:21 +08:00
John Okely 6283c33979 MDL-51569 mod_choice: Prevent users from updating choices with curl 2015-11-06 14:53:06 +08:00
Dmitrii Metelkin 8aa81abdc0 MDL-51314 mod_assign: cache group membership in can_edit_submission 2015-11-06 15:23:38 +11:00
Andrew Nicols 8f75fc3657 MDL-51685-master Fix unit tests following change
These unit tests were modifying the PAGE and other globals in the middle of
tests and were failing as a result.

Broke the tests up into separate tests where the functionality is now
tested individually.
2015-11-06 10:36:51 +08:00
Dan Poltawski bc1d433972 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-05 16:03:03 +00:00
Dan Poltawski 7ba8e5dbd9 MDL-46049 chat: add missing closing parenthesis 2015-11-05 16:03:03 +00:00
Damyon Wiese 09bb6f19e5 MDL-51569 mod_choice: Validate the submitted optionid
Make sure any submitted choice options actually belong to the current choice
module.
2015-11-05 10:48:45 +00:00
Juan Leyva 4b25851bcc MDL-50589 gradereport_user: Force regrade in external function 2015-11-05 09:42:06 +01:00
Ryan Wyllie dfc8d9a23b MDL-50426 message: post_message capability tests
Behat and unit tests to confirm the behaviour of the
messaging lib after the capability checks were added
to the post message function.
2015-11-05 08:27:40 +00:00
Ryan Wyllie f91e143f1d MDL-50426 message: optional permission check on message
Changed the messaging API to allow you to provide a parameter
that will cause the code to check if the sender of the message
has the correct permissions before the message is sent.

The ajax messaging (message button on profile page) has been
updated to perform these permission checks. This brings it
inline with the existing private message page.
2015-11-05 08:27:40 +00:00
Ryan Wyllie 578558f070 MDL-50426 behat: fix behat field manager
Thanks to Raj for the patch.
2015-11-05 08:27:40 +00:00
Damyon Wiese 48125a9408 MDL-51720 assign: Always fallback on userid as a default sort
Even when the table has no userid column (this is normally the edit column).
2015-11-05 15:35:41 +08:00
Andrew Nicols 3f4249d198 Merge branch 'MDL-51395-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-11-05 14:02:51 +08:00
Jun Pataleta ddda4a8827 MDL-51395 blog: Fix output of strings for blog comments 2015-11-04 23:48:03 -06:00
Andrew Nicols 804122a7a0 Merge branch 'MDL-26429-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-11-05 12:15:49 +08:00
Andrew Nicols cd6c041b41 MDL-51899 mod_forum: Add test for allowing 0 grades 2015-11-05 12:07:57 +08:00
Cameron Ball 56add3f0f3 MDL-26429 usability: Add course completion icons.
This patch adds a method to the course completion criteria classes
which allows them to specify an icon for display in the course
completion report table.

There is a default implementation which simply looks for an icon
in pix/i with a name matching the completion criteria type.
2015-11-05 11:41:40 +08:00
Barbara Ramiro a61abb5557 MDL-26429 Course completion icons for self, duration, and role. 2015-11-05 11:41:40 +08:00
Andrew Nicols 08d116cd3d Merge branch 'MDL-51899_29' of git://github.com/jacac/moodle into MOODLE_29_STABLE 2015-11-05 11:26:48 +08:00
Andrew Nicols cf44cfc398 Merge branch 'MDL-51685-29' of git://github.com/dpalou/moodle into MOODLE_29_STABLE 2015-11-05 10:42:09 +08:00
rajesh Taneja 5f65bb2e43 MDL-50837 mod_scorm: include locallib to access function 2015-11-05 10:24:38 +08:00
Matt Switlik 5dda224ef6 MDL-40245 assignment: download all submissions raise time limit 2015-11-04 16:31:37 -05:00
Jakob 19ad96aee3 MDL-51899 mod/assign: Allow 0.00 grades while editing a grade.
The function unformat_float can return 0 and false.
We need to do strict comparison for the return value on line 92 to accept grades 0.00.
2015-11-04 11:10:44 -08:00
David Monllao 7cff64fdbf MDL-51684 badges: Make sure 'moodle/badges:viewbadges' is respected 2015-11-04 13:03:14 +00:00
Yuliya Bozhko 65734f149f MDL-51684 badges: Make sure 'moodle/badges:viewbadges' is respected
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-11-04 13:03:14 +00:00
Juan Leyva f1178ebcd9 MDL-50837 mod_scorm: Fix availability checks 2015-11-04 12:55:47 +01:00
Juan Leyva 7ca8c34045 MDL-51569 mod_choice: Check choice availability prior to do any action 2015-11-04 11:08:42 +00:00
Cameron Ball 77e072ebec MDL-51091 core_registration: session key check in registration. 2015-11-04 18:46:28 +08:00
Simey Lameze 12c232df76 MDL-49940 mod_survey: Fix XSS on survey module 2015-11-04 18:46:28 +08:00
Hugh Davenport 48d8989f13 MDL-49940 mod_survey: Escape user comments
This patch fixes a XSS vulnerability with surveys where a student user
    could inject arbitrary HTML in a comment on the survey. The fix is to
    escape the comment before displaying it to the teacher.
2015-11-04 18:46:28 +08:00
David Monllao 17bed94dd7 MDL-51000 editor_atto: No autosave for guests 2015-11-04 18:46:28 +08:00
Simey Lameze 817cae1ac7 MDL-48109 mod_lesson: prevent CSRF on password protected lesson
This commit add a new session key hidden field on the lesson password form
and confirm if the session key is valid on related pages to prevent CSRF on
password protected lessons.
2015-11-04 18:46:28 +08:00
Petr Skoda 3a4d04cdb7 MDL-48085 flowplayer: prevent flash parameters via url 2015-11-04 10:38:43 +00:00
Andrew Nicols 493e0febed Merge branch 'MDL-51983-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-11-04 15:25:20 +08:00
Ryan Wyllie 546a71cf7e MDL-51983 actionmenu: behat tests 2015-11-04 06:41:21 +00:00
Ryan Wyllie f14252ba8e MDL-51983 actionmenu: fix hideIfOutside
The hideIfOutside function was being too restrictive with the
selector for checking if the event occurred within a menu child
(anchor tag) rather than the menu itself.
2015-11-04 06:41:17 +00:00
Ryan Wyllie 992c414ee4 MDL-51983 actionmenu: stop event propagation
Stop event propagation on keyboard events that have been
successfully handled by the action menu code.
2015-11-04 06:40:41 +00:00
Andrew Nicols 7823046588 Merge branch 'MDL-45814-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-04 14:04:20 +08:00
Tony Butler ba646064b8 MDL-52012 core_lib: Add namespace to $OUTPUT->notify_message definition 2015-11-04 13:49:35 +08:00
Andrew Nicols c3728be605 Merge branch 'MDL-52004-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-11-04 13:45:59 +08:00
Andrew Nicols c5a43c1e74 Merge branch 'wip-MDL-51486-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-11-04 11:47:28 +08:00
Andrew Nicols a36700bc41 Merge branch 'MDL-51918-29-navigable' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2015-11-04 11:26:57 +08:00
Adrian Greeve 47f708bec6 MDL-51486 mod_data: Unit test update for item ratings.
Additional checks that access is available for item ratings
on records that have a group id of zero (all participants).
2015-11-04 10:15:10 +08:00
Adrian Greeve 6050de43d8 MDL-51486 mod_data: Can view rating information.
When students are given the appropriate permissions
to view ratings, in the situation where there are
separate groups. The students can view the ratings
of an entry that is in the all participants group.
2015-11-04 10:14:48 +08:00
Paul Nicholls 3b9ba0034c MDL-51918 gradereport: Fix AJAX mode keyboard navigation
Keyboard navigation (ctrl+up/down/left/right) with AJAX enabled ceased
functioning with editing mode enabled after MDL-36606, as it was looking
for cells with a "clickable" class - but was only applying that class when
editing mode is NOT enabled.  This patch uses a new "gbnavigable" class to
control keyboard navigation, whether editing mode is on or not.  It also
addresses some browser compatibility and minor behavioural issues.
2015-11-04 11:09:17 +13:00
Eloy Lafuente (stronk7) 7cb98a969e weekly release 2.9.2+ 2015-11-03 18:46:37 +01:00
Eloy Lafuente (stronk7) b098545057 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-11-03 18:46:21 +01:00
Eloy Lafuente (stronk7) 83aec89c42 Merge branch 'wip-mdl-52007-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-11-03 17:58:52 +01:00
Eloy Lafuente (stronk7) fad4180820 Merge branch 'wip-mdl-52020-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-11-03 17:58:51 +01:00
Dan Poltawski dbb540329b Merge branch 'MDL-52018-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-11-03 17:58:51 +01:00
AMOS bot 61cb6bfaf4 Automatically generated installer lang files 2015-11-04 00:04:32 +08:00
Dan Poltawski 864c61ecba MDL-45814 login: don't prompt guest user to change password 2015-11-03 14:49:33 +00:00
Dan Poltawski 4641507d92 MDL-49473 logs: ensure exported logs contain year 2015-11-03 11:38:28 +00:00
Dan Poltawski 9b67f1b9db MDL-50781 user: do not print useless table cell
Thanks to Maurício Severo da Silva for the patch
2015-11-03 10:52:59 +00:00
rajesh Taneja fd42923e67 MDL-52020 behat: Removed text checking to ensure window switch
Comment question window closes after 2 sec.
which crashes win-FF as it's slow to check for
"Changes saved" text. As after switching it is
checked the changes are saved, this step can be
avoided to ensure robustness of the scenario
2015-11-03 16:58:00 +08:00
rajesh Taneja 8c5be66b12 MDL-52007 behat: Use extended timeout for site admin expansion 2015-11-03 16:09:23 +08:00
David Mudrák 2b459a6e97 MDL-52018 lang: Fix behat test to use the new string 2015-11-02 22:42:27 +01:00
Helen Foster 2d8d39406b MDL-52018 lang: Merge English strings from the en_fix language pack 2015-11-02 22:38:44 +01:00
Eloy Lafuente (stronk7) 4c142669dc Merge branch 'MDL-52014-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-11-02 20:02:25 +01:00
Marina Glancy 691ed15ce2 MDL-51999 user: remove unnecessary continue 2015-11-02 19:59:31 +01:00
Eloy Lafuente (stronk7) 45e41c4fbe Merge branch 'MDL-51829-29' of git://github.com/dpalou/moodle into MOODLE_29_STABLE 2015-11-02 19:40:50 +01:00
Dan Poltawski 7277f5a28e MDL-52014 quiz: do not log preview attempt deletions
This happens automatically by the system.
2015-11-02 16:19:10 +00:00
Colin Campbell 7bed522217 MDL-51715 lib/grade: Unit test for aggregationweight 2015-11-02 10:09:44 -06:00
Colin Campbell f2f35e85d8 MDL-51715 lib/grade: Zero out aggregationweight for novalue and dropped
set_usedinaggregation was setting aggregationweight to zero in these
cases for non-category grades, but not for category grades.
2015-11-02 10:09:16 -06:00
Marina Glancy fe8900c83e MDL-50633 dml: deprecated var replaced in mysql 5.7
Thanks to Charles Verge for providing a patch
2015-11-02 14:04:58 +00:00
Dan Poltawski c2681c14b7 Merge branch 'MDL-51128-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-11-02 10:54:53 +00:00
Dan Poltawski 0362b18553 Merge branch 'MDL-51854-29' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2015-11-02 09:09:50 +00:00
Damyon Wiese 3ee30709a5 MDL-52004 assign: Set unique urls when grading so autosaves work
The Atto autosave feature uses the $PAGE->url to generate unique hashes for
each page. Assignment uses a MUC cache to persist ordering of lists - the result
is that the urls are not unique (they depend on the cached filter).

The fix is to spoof a unique url that will grade only that student with no
active grading list (no next/prev buttons).
2015-11-02 16:44:56 +08:00
Andrew Nicols 71321b2461 Merge branch 'MDL-51707-m29' of https://github.com/micaherne/moodle into MOODLE_29_STABLE 2015-11-02 14:51:21 +08:00
Jun Pataleta 2efa73d91e MDL-47073 lib: Replace backslashes with slashes in jquery plugin urls
This patch replaces backslash characters in the generated jQuery
plugin URL to forward slashes when slasharguments is disabled and
 the Moodle server is running on IIS.
Thanks to Ryan Panning <Ryan.Panning@district196.org> for
reporting this issue and for suggesting a fix.
2015-10-30 17:06:23 -05:00
Dan Poltawski fb290224b0 weekly release 2.9.2+ 2015-10-30 21:08:44 +00:00
Eloy Lafuente (stronk7) 971602a6c2 Merge branch 'wip-mdl-51981-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-10-30 10:27:49 +01:00
rajesh Taneja 582460fbb6 MDL-51981 behat: No need for JS tag
This scenario crashes win-chrome and probably
other comninations. Looking at this, it seems
js tag is not needed, so removing js tag to make
it pass on all OS
2015-10-30 14:11:52 +08:00
Andrew Nicols 64c2c2c091 Merge branch 'wip-MDL-51552-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-10-30 11:01:22 +08:00
Dan Poltawski 5566ccf52c Merge branch 'MDL-51939-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-10-29 13:55:08 +00:00
Eloy Lafuente (stronk7) 942ec23dd1 MDL-51939 mod_forum: all participants discussions are viewed by students
Added scenario to verify that "all participants" discussions, under
separate-groups mode are, by default, visible for students.
2015-10-29 21:08:03 +08:00
Andrew Nicols b320590668 MDL-51939 mod_forum: Fix groupid data on upgrade
This upgrade step addresses issues identified in MDL-51939 where the
groupid was incorrectly set. The issue itself is not present in 2.9, but
this upgrade step is required to correct any incorrect data.
2015-10-29 21:05:40 +08:00
Dan Poltawski 665c1f7105 Merge branch 'MDL-50811-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-10-29 10:53:43 +00:00
Dan Poltawski 68a0906ad7 Merge branch 'MDL-51921-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-10-29 10:35:41 +00:00
Adrian Greeve c0f9d4014a MDL-51552 gradebook: Update to bulk update behat test. 2015-10-29 16:09:25 +08:00
Adrian Greeve a9b82ea745 MDL-51552 gradebook: Single view bulk insert fix.
Single view now doesn't overwrite non-empty grades.

A thank you to Sam Anderson and Robert Russo for providing a patch.
2015-10-29 16:09:25 +08:00
Ryan Wyllie df8b69a470 MDL-51799 javascript: dialogue accessibility
Moved setting the aria visiblity of the dialogues from the show
and hide functions into the visibility change handler to stop
multiple calls.

Also made the visibility checker just continue to buffer the elements
it hides, rather than clearning them, on multiple calls.
2015-10-29 05:57:57 +00:00
Jun Pataleta fb861fd51d MDL-51921 files: Fixes for file manager issues
Fixed the issue where the file path select box goes beyond the
container with very long folder names. Instead of setting to
"width: auto", I set it the select box's "width: 100%" so that it will
just fill up its container's width.
Fixed the issue where markups are being shown on file aliases.
2015-10-28 04:50:10 -05:00
Andrew Nicols fb8af88c5c weekly release 2.9.2+ 2015-10-28 12:57:43 +08:00
Dan Poltawski 010931d695 Merge branch 'MDL-51893_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2015-10-27 14:43:04 +00:00
Eloy Lafuente (stronk7) d51a20234e MDL-51863 packer: ensure empty zip files behavior remains consistent
With PHP bug #70322 fixed, ZipArchive::close() did start returning false
and throwing PHP Warnings with recent PHP versions (5.6.14 and up).
Previously (5.6.13 verified) it was returning true, and false in older
versions (5.4.x verified).

This change does silent the 2 "hacky" calls to close() that we perform
in core leaving the 3rd one (used for files having files) unmodified.

A new unit test has been created to cover the close() behavior, ideally
supporting both old and new PHP versions without harcoding any PHP
version.

Note that we don't use to rely much on results coming from close(), and
that's a good thing given the buggy behavior commented above. This just
keeps empty zips working like they were before.
2015-10-27 11:56:58 +00:00
Eloy Lafuente (stronk7) a65c0dc2f2 MDL-51893 core_date: Stop using Pacific/Norfolk as 11.5 replacement
Norfolk Island's standard time (NFT) was on UTC+11:30 until 4 October
2015, when it was changed to UTC+11:00. So it's not suitable for 11.5
bad mapping replacement anymore.

It seems that there isn't any other location using such 11.5 timezone
so completely getting rid of it for conversions.
2015-10-27 10:17:25 +01:00
Corey Wallis c88bedf4dd MDL-50811 mod_forum: Add completion tracking for emailed replies 2015-10-27 15:55:21 +08:00
Andrew Nicols 8c13b827a9 Merge branch 'MDL-51905-29' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-10-27 14:51:29 +08:00
John Okely 26fa4746c9 MDL-51905 block_activity_results: Default to the current activity
Due to an incorrect condition, the activity results block would
incorrectly identify some blocks as not being gradeable.
This meant that edit form could not determine what activity the block
was added to. This commit fixes the condition, allowing the current
block to be determined correctly
2015-10-27 13:55:22 +08:00
Andrew Nicols 16bb5d56c5 Merge branch 'MDL-51864-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-10-27 10:58:26 +08:00
Andrew Nicols d37c325ff6 Merge branch 'MDL-51127-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-10-27 10:49:02 +08:00
Barry Oosthuizen 0e5b2e1997 MDL-51913 report_stats: Make first column unique 2015-10-26 17:31:24 +00:00
Kevin Wiliarty 3391ec00f0 MDL-51834 auth,profile: locks custom fields based on auth settings 2015-10-26 13:55:00 +00:00
Dan Poltawski 0c15e941dd Merge branch 'MDL-51894-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-10-26 12:40:30 +00:00
Andrew Nicols bf54c89e8f MDL-51894 inboundmessage: Ensure that all mailboxes exist 2015-10-26 12:31:06 +08:00
Andrew Nicols bd7583c7fa Merge branch 'MDL-51779_29' of https://github.com/Syxton/moodle into MOODLE_29_STABLE 2015-10-26 09:52:42 +08:00
Jun Pataleta befdd07ceb MDL-51864 blocks: Fixed title display for block_course_summary 2015-10-24 00:04:47 -05:00
lazydaisy b007713333 MDL-51127 theme_bootstrapbase: Re-aligned RTL context header button. 2015-10-23 18:19:18 +01:00
Matt Davidson f755308c8c MDL-51779 assign: PDF annotate quality
Fixes the quality of pdf content when annotating.
2015-10-23 09:36:25 -04:00
Dan Poltawski b828920455 weekly release 2.9.2+ 2015-10-23 12:51:53 +01:00
AMOS bot ff1c3e67af Automatically generated installer lang files 2015-10-23 00:04:29 +08:00
Paul Nicholls 4bb31de252 MDL-51854 atto_image: Allow other plugins to handle drop events
The drop handler should only return false if it has actually handled the
drop event (i.e. it was an image) - otherwise, Atto plugins loaded after
this one don't get an opportunity to handle other drop events.
2015-10-22 12:12:22 +13:00
Dan Poltawski 34776dac4f weekly release 2.9.2+ 2015-10-20 09:56:39 +01:00
Dani Palou 89e0f80a84 MDL-51829 admin: Set userquota setting as PARAM_INT 2015-10-20 10:02:57 +02:00
Mark Nelson fdcdcba552 MDL-51782 mod_forum: fixed unit test failing on certain DBs 2015-10-20 14:45:26 +08:00
Andrew Nicols 4ed6a0b3d6 Merge branch 'MDL-51782_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-10-20 11:52:22 +08:00
Mark Nelson 936ef246c4 MDL-51782 mod_forum: altered unit tests for the post_deleted event
This was done to ensure we are actually testing the API, and not
just creating and triggering the event manually.
2015-10-19 20:14:00 -07:00
Mark Nelson 9b9c0ebf1a MDL-51782 mod_forum: moved post_deleted event into function 2015-10-19 20:14:00 -07:00
Jun Pataleta b63ab17d52 MDL-51837 user: Check if user email is set on validation
Add a check if the user's email is set before performing validation on
the user's email address. This is to prevent the warning messages to
be shown in the case of a pending email change which causes the user's
email field to be not included in the Edit profile form.
2015-10-19 16:53:03 -05:00
Eloy Lafuente (stronk7) ccd130374b Merge branch 'wip-mdl-48117-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-10-19 16:59:02 +02:00
Dan Poltawski 5f46076e1e Merge branch 'm29_MDL-51554_Apache_PHP-FPM_Broken_File_Serving' of https://github.com/scara/moodle into MOODLE_29_STABLE 2015-10-19 15:19:39 +01:00
David Monllao 4dfa85c18b Merge branch 'MDL-50483-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-10-19 17:06:47 +08:00
Eloy Lafuente (stronk7) 5d563e92b0 MDL-48117 behat: Use form field to check checkbox
On Mac-Chrome click checkbox is not generating
proper events and hence failing. Use behat_form_checkbox
to ensure checkbox is checked
2015-10-19 16:59:25 +08:00
David Monllao ca46e95170 Merge branch 'MDL-51771_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-10-19 16:28:10 +08:00
David Monllao c31327ceb0 Merge branch 'MDL-51712-29' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-10-19 15:43:41 +08:00
Andrew Nicols b60cf799e0 Merge branch 'MDL-51673-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-10-19 13:40:51 +08:00
Andrew Nicols 37c98b2b4f Merge branch 'MDL-51772-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-10-19 13:34:34 +08:00
David Monllao e566327fa6 Merge branch 'MDL-51759-29-2' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-10-19 13:31:01 +08:00
Simey Lameze a0b2d4e707 MDL-50483 gradereport_user: fix overlapping on the error message 2015-10-19 08:59:38 +08:00
Jinu Abraham 1d9eb4709d MDL-50483 gradereport_user: fix the fatal error of no enrolled users 2015-10-19 08:59:37 +08:00
Andrew Nicols cd58862cc8 Merge branch 'MDL-50412-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-10-19 08:01:29 +08:00
Tim Hunt 716b0ac977 MDL-51771 question engine: fix typo in SQL
Thanks to Pete at learningpool.com for finding thsi bug.
2015-10-18 16:05:37 +01:00
Jun Pataleta 19c7f9d457 MDL-51673 messages: Added codes for the unit tests 2015-10-16 16:07:16 -05:00
Ben Kelada ab029256b3 MDL-51673 messages: remove strict type check of int vs string 2015-10-16 16:07:15 -05:00
Matteo Scaramuccia 19cc1b1839 MDL-51554 Files: Fix broken file serving under Apache + PHP-FPM 2015-10-16 21:57:58 +02:00
Eloy Lafuente (stronk7) 418c59f945 weekly release 2.9.2+ 2015-10-16 12:51:28 +02:00
John Okely 55ae536cb8 MDL-51712 myprofile: Fix capability checks 2015-10-16 14:48:38 +08:00
Andrew Nicols 812a994f6f Merge branch 'MDL-51565-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-10-16 09:36:20 +08:00
Andrew Nicols ebd2721708 Merge branch 'MDL-51651-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-10-16 09:23:34 +08:00
Andrew Nicols ad0f3b0986 Merge branch 'MDL-50182_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2015-10-16 08:13:35 +08:00
Andrew Nicols a6739f12aa MDL-51759 theme: Ensure that non-svg images are cached and returned 2015-10-16 07:53:45 +08:00
Dan Poltawski e0e4779523 Merge branch 'MDL-51703-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-10-15 13:58:58 +01:00
Dan Poltawski 81fcf79f04 Merge branch 'MDL-51500-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-10-15 13:52:47 +01:00
Dan Poltawski 1542061801 Merge branch 'MDL-51563-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-10-15 13:50:12 +01:00
Dan Poltawski c2fbd20021 Merge branch 'MDL-51652-m29' of https://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-10-15 13:45:21 +01:00
Dan Poltawski fd3acdf024 Merge branch 'MOODLE_29_STABLE-MDL-51679-groupmode-ajax' of https://github.com/Dagefoerde/moodle into MOODLE_29_STABLE 2015-10-15 11:44:45 +01:00
Dan Poltawski acbdf41d83 MDL-51651 lang: add consitency for application of firstdayofweek
1) Set the site-wide default based on language pack
2) Use the site/user preference for js popups, like we do in /calendar/
2015-10-15 10:17:08 +01:00
Dan Poltawski b340da9420 MDL-51651 lang: the first day of the week is Monday 2015-10-15 10:17:07 +01:00
Andrew Nicols e945bad970 Merge branch 'MDL-51756-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-10-15 15:24:05 +08:00
Andrew Nicols 3ee3b0276d MDL-51756 tests: Refactor test to use data-provider
The benefit is that this becomes one test per external function instead of one
test testing them all - so more information is shown on failure and we get lots
more dots (we love dots!).
2015-10-15 15:18:44 +08:00
Damyon Wiese 9a2c7d2f03 MDL-51756 externallib: Show debugging when optional params are wrong
Optional params are not allowed as the top level value for external_function_parameters.
This is because stricter protocols (xmlrpc and soap) cannot handle optional parameters, only
optional properties in a structure.
2015-10-15 14:19:46 +08:00
Ryan Wyllie 51e39264eb MDL-49545 backup: Restore does not respect some capabilities
Thanks to Daniel Neis for the original patch that formed the
basis of these changes.
2015-10-15 11:55:39 +08:00
Dan Poltawski f6e0465718 Merge branch 'MDL-51399_29' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-10-14 15:02:51 +01:00
Dan Poltawski 8e496bbf97 Merge branch 'MDL-51467-m29' of https://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-10-14 13:41:04 +01:00
Jan C. Dageförde 12621418bd MDL-51679 course: Update groupmode CSS class
Changing groupmode of an activity via AJAX did not change the button's CSS class accordingly.
2015-10-14 14:37:27 +02:00
Juan Leyva a56ffba668 MDL-51772 webservice: Export add_user_private_files as Web Service 2015-10-14 14:11:50 +02:00
Dan Poltawski a583fd0f8d weekly release 2.9.2+ 2015-10-14 10:49:09 +01:00
Dan Poltawski 577030b4c2 NOBUG: Fixed SVG browser compatibility 2015-10-14 10:49:08 +01:00
Eloy Lafuente (stronk7) 0a64621644 MDL-51536 webservices: fix invalid param definitions 2015-10-13 20:34:56 +02:00
Dan Poltawski b6b07a3d24 Merge branch 'MDL-40710-29' of git://github.com/barbararamiro/moodle into MOODLE_29_STABLE 2015-10-13 15:44:04 +01:00
Dan Poltawski d711d02fa3 Merge branch 'MDL-51435-m29' of https://github.com/NeillM/moodle into MOODLE_29_STABLE 2015-10-13 11:44:42 +01:00
Dan Poltawski 63ccf4da71 MDL-47494 grade: even more complete copyright fix.
With thanks to Tim!
2015-10-13 09:54:34 +01:00
Dan Poltawski 126fa4b314 MDL-47494 grade: fix incorrect copyright statement
(From copy/paste error, blame Tim :P)
2015-10-13 09:39:19 +01:00
Damyon Wiese 9eec9e3eae MDL-48861 assign: Make the requires grading filter consistent
Consistently include submissions with a null grade (see MDL-47694).
2015-10-13 14:54:18 +08:00
Damyon Wiese 2e707c274a MDL-48861 assign: Fix unit tests and behat tests
The tests were not working with the change to the needs grading filter.
2015-10-13 13:01:26 +08:00
Andrew Nicols 7c399ad875 Merge branch 'MDL-51302-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-10-13 11:35:14 +08:00
Jun Pataleta 50868598fb MDL-51128 course: Add startdate for generated course
Added course start date for the course generated by the course
generator in order to prevent incorrect date calculations
(i.e. in assignment due dates) when the generated course is reset.
2015-10-12 21:49:12 -05:00
Andrew Nicols 718caae926 Merge branch 'MDL-51427-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-10-13 10:14:49 +08:00
Andrew Nicols 2f39d695c3 Merge branch 'MDL-40442-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-10-13 09:48:05 +08:00
Andrew Nicols 8ba76c053c Merge branch 'MDL-50079-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-10-13 09:25:24 +08:00
Andrew Nicols c7fa026645 Merge branch 'MDL-50788-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-10-13 08:54:24 +08:00
Eloy Lafuente (stronk7) bb10739913 MDL-50182 core: add 3.0 environmental requirements
Only change from 2.9 is the modification of the slasharguments
admin setting string to recommend always to keep the setting enabled
and fix the problem in the server, warning about the drawbacks
of disabling it.

Also, there is a little phpdoc note added to one custom check
to have clearly specified when we can get rid of it.
2015-10-13 00:34:58 +02:00
sam marshall 1fe476078c MDL-51467 Availability: Course reset should change restrict dates 2015-10-12 17:34:42 +01:00
Dan Poltawski 68b5527fd2 Merge branch 'MDL-51375_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-10-12 17:01:43 +01:00
Damyon Wiese 5a92a95e9c MDL-48861 mod_assign: use >= for requires grading filter
If the grade and submission were modified at exactly the same time,
assume that this means the grade was automatically created for the submission
and is not a real grade from a teacher interaction.
2015-10-12 16:55:44 +01:00
Damyon Wiese 7821a81662 MDL-48861 assign: Fix the "needs grading" filter
When auto-creating a new grade record - do not set the timemodified > than the submission timemodified
2015-10-12 16:55:44 +01:00
Juan Leyva 7e99fac4b3 MDL-51563 core_user: Fix invalid passed parameteres in get_user 2015-10-12 13:54:37 +02:00
Dan Poltawski 259db679f0 Merge branch 'MDL-36606-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-10-12 12:41:29 +01:00
Juan Leyva caeaef8c16 MDL-51565 webservice: Fix return types definitions 2015-10-12 13:33:16 +02:00
Dan Poltawski c8c806eea9 Merge branch 'MDL-51586-29' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-10-12 10:47:16 +01:00
sam marshall 9d00644da6 MDL-51652 Availability: OR conditions fail when filtering user lists
When filtering a user list, if there is an OR tree where one of the
conditions does not restrict user lists such as a date condition,
then the overall result should include all users (not be filtered).
This was not working correctly.
2015-10-12 10:25:31 +01:00
David Monllao de7b0a3be0 Merge branch 'MDL-51083-29' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-10-12 16:57:58 +08:00
Andrew Nicols 27f4084642 MDL-46497 atto: Whitespace/coding style fix 2015-10-12 13:42:15 +08:00
Andrew Nicols b880d690d7 Merge branch 'MDL-46497_M29' of https://github.com/nadavkav/moodle into MOODLE_29_STABLE 2015-10-12 13:39:01 +08:00
Andrew Nicols 7f67cf5102 Merge branch 'MDL-51451-m29' of https://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-10-12 10:12:04 +08:00
Lior Gil ee598ac82a MDL-46497 Atto: Fix adding redundant p elements in rtl/ltr actions 2015-10-10 01:35:35 +03:00
Juan Leyva f6057175fb MDL-51703 mod_survey: Trigger response_submitted event in correct place 2015-10-09 16:27:33 +02:00
Dan Poltawski 9b8d2eda4d MDL-50412 admin: prevent fatal errors on reports admin page 2015-10-09 14:47:29 +01:00
Barbara Ramiro ad7c52eb85 MDL-40710 Icon: More identifiable backpack icon 2015-10-09 18:54:14 +08:00
Dan Poltawski 0cd5052f4b MDL-50079 atto_link: respect new window option when creating from repo
Previously users had to go back and edit their link to set the new
window option.
2015-10-09 11:26:10 +01:00
Dani Palou 6fb37f884f MDL-51685 user: Support gravatar images in user_get_user_details 2015-10-09 11:51:26 +02:00
Dan Poltawski 54a669fa52 MDL-50788 classloader: Prevent cryptic errors on unreadable classes dir
Do not attempt to read an unreadable directory because previously the generated
errors were hard to fathom.

Thanks to James McQuillan for the basis of the patch.
2015-10-09 10:37:24 +01:00
Dan Poltawski 63ba497c29 MDL-51302 scorm: do not use invalid course urls
Previous behaviour of setting an empty sectionid was incorrect and we
were doing work which course_get_url() does for us.
2015-10-09 09:09:49 +01:00
Neill Magill 529162a2c3 MDL-51435 Web Services: E_WARNING in core_webservice_get_site_info
$plugin was not being set before the version file was included.
This caused an E_WARNING: Creating default object from empty value

This change creates the plugin object before the version file sets its parameters.
2015-10-09 09:02:04 +01:00
John Okely 656af10fc1 MDL-51586 enrol: Enrolment table displays fullname properly.
When the alternatefullnamedisplay was set to something that
didn't contain 'firstname' then nothing would be displayed
for the user's name.
2015-10-09 15:35:04 +08:00
Damyon Wiese dc325d9891 MDL-51628 assign: invalid hardcoded capability check
Use existing function to do the check instead.
2015-10-09 15:00:45 +08:00
Mifsud Gaël 1ad598584d MDL-51083 admin: Prevent password autofill in authentication settings 2015-10-09 14:33:49 +08:00
Damyon Wiese 59a5dbe18b MDL-51686 assign: Apply admin default for comment inline 2015-10-09 13:40:57 +08:00
Eric Merrill 1f77dcd5b3 MDL-36606 gradereport: Update AJAX grader to understand gradeless cells 2015-10-08 12:47:28 -04:00
Michael Aherne 2c3fec1406 MDL-51707 cron: Prevent finished tasks being returned 2015-10-08 16:40:15 +01:00
Barbara Ramiro 78cdc5327b MDL-40442 Icon: Improved svg download icon and png version 2015-10-08 13:31:34 +01:00
Dan Poltawski e6311ee386 weekly release 2.9.2+ 2015-10-08 11:36:46 +01:00
Dan Poltawski 580ea641f1 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-10-08 11:36:44 +01:00
Adam Olley aa6ad4698a MDL-51285 mod_forum: Posts all need to have different stamps 2015-10-08 12:23:16 +08:00
Eric Merrill 02bb527c56 MDL-51500 navigation: Compute links with destination context
We should calculate the links based on the destination context,
not the current course. Could show links that are not accessible.
2015-10-07 10:02:32 -04:00
Dan Poltawski 5e295f8af5 Merge branch 'MDL-50142_29' of https://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-10-07 12:32:36 +01:00
sam marshall 5528d4e20f MDL-51451 Moodle dialogues: Lock scroll causes background jump
When you add a module or otherwise cause a Moodle dialogue to appear, this
enables the 'lock scroll' feature (the scrollbar disappears).

On some browsers this causes the width of the viewport to change, which can
cause centered/right-aligned theme elements to move distractingly.

This change temporarily sets body max-width while lock scroll is active.
2015-10-07 10:31:26 +01:00
David Monllao c2df6f969e Merge branch 'wip-mdl-51285-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-10-07 11:23:11 +08:00
Andrew Nicols 03ab23d34a Merge branch 'MDL-41042-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-10-07 10:26:42 +08:00
David Monllao 373861c951 Merge branch 'MDL-51525-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-10-07 09:22:44 +08:00
Dan Poltawski 6f1eec32e5 Merge branch 'MDL-51588-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-10-06 11:42:56 +01:00
David Monllao 6c5f5bd8ef Merge branch 'MDL-51656_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-10-06 15:25:04 +08:00
Andrew Nicols 5f68e420d0 Merge branch 'MDL-51228-m29-master' of https://github.com/dthies/moodle into MOODLE_29_STABLE 2015-10-06 13:48:42 +08:00
Andrew Nicols f3669c2a69 MDL-51461 javascript: Fix whitespace issue 2015-10-06 13:16:56 +08:00
Andrew Nicols 3ad7079217 Merge branch 'MDL-51461_2_9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-10-06 13:04:58 +08:00
Tim Hunt 693f5eff05 MDL-51375 excel output: more work to avoid invalid sheet names 2015-10-06 05:45:14 +01:00
Andrew Nicols 4e435ac25a Merge branch 'MDL-44707-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-10-06 11:35:57 +08:00
Andrew Nicols e735a8f7d6 Merge branch 'MDL-50805_MOODLE_29_STABLE' of https://github.com/crazyserver/moodle into MOODLE_29_STABLE 2015-10-06 10:33:24 +08:00
David Monllao 8aa7c69eb5 Merge branch 'MOODLE_29_STABLE-MDL-49750' of git://github.com/jojoob/moodle into MOODLE_29_STABLE 2015-10-06 09:29:37 +08:00
Dan Poltawski 82e8cc50eb Merge branch 'wip-MDL-49189-MOODLE_29_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_29_STABLE 2015-10-05 15:03:16 +01:00
Dan Poltawski d44d5d0257 Merge branch 'MDL-51501-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-10-05 11:47:53 +01:00
Johannes Burk 208f6dfce0 MDL-49750 mod_data: fix updating file/picture fields breaks references
Use file_save_draft_area_files on file/picture update and
set content to null if file was removed.
2015-10-05 11:44:08 +02:00
David Monllao d4b743890c Merge branch 'MDL-51514_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-10-05 16:00:01 +08:00
David Monllao ad81b49f4a Merge branch 'MDL-51408-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-10-05 13:50:23 +08:00
David Monllao d2d18b2abf MDL-50613 webservices: Upgrade info about riskbitmask 2015-10-05 12:18:45 +08:00
David Monllao f0e56d7197 Merge branch 'MDL-50613-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-10-05 12:11:21 +08:00
David Monllao e3e4358287 MDL-50142 editor: Refining editor preference help
All credit goes to Helen Foster.
2015-10-05 09:32:02 +08:00
Ben Tindell 73062f6503 MDL-50142 user: context sensitive help
Added context sensitive help to
Edit Profile > Text Editor
2015-10-05 09:32:02 +08:00
Sam Chaffee cf945e8ffb MDL-51514 gradebook: Optimize set_usedinaggregation query for MySQL 2015-10-04 13:20:41 -07:00
Kevin Wiliarty e494eb4743 MDL-49189 auth: Map data to profile fields with uppercase shortnames 2015-10-03 08:12:50 -04:00
Mark Nelson 284fd4d3ac MDL-51656 auth_radius: fixed colon location 2015-10-02 16:35:33 -07:00
AMOS bot 2ac1086916 Automatically generated installer lang files 2015-10-03 00:04:10 +08:00
Dan Poltawski 6d9b42695a weekly release 2.9.2+ 2015-10-02 10:57:38 +01:00
Dan Poltawski cded277648 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-10-02 10:57:35 +01:00
Eloy Lafuente (stronk7) c84f6fd713 Merge branch 'wip-mdl-50940-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-10-01 11:26:28 +02:00
Pau Ferrer Ocaña 00a51457f4 MDL-50805 Messages: Add index to message_read to speed up message crons 2015-10-01 10:38:42 +02:00
David Monllao 55f93cb5f0 MDL-46710 mod_lti: Removing duplicated generated events
Event generation and completion should be generated only once.
2015-10-01 12:05:52 +08:00
Eloy Lafuente (stronk7) f3acb82953 Merge branch 'MDL-51227-m29-master' of https://github.com/dthies/moodle into MOODLE_29_STABLE 2015-10-01 00:28:50 +02:00
Andrew Robert Nicols 8db4327324 MDL-36606 gradereport: Correctly handle ungraded assessment ajax grading 2015-09-30 15:03:58 -04:00
Eloy Lafuente (stronk7) 048a0996f1 Merge branch 'wip-mdl-51266-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-09-30 20:34:45 +02:00
Andrew Hancox 9aed16a38f MDL-51399 report_outline: Hide blog column if blogs are disabled. 2015-09-30 17:01:21 +01:00
Eloy Lafuente (stronk7) 87b01f2599 Merge branch 'MDL-51292-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-09-30 17:33:37 +02:00
Andrew Hancox cd5f5147df MDL-51461 core: Fix issue with client side mustache templates 2015-09-30 10:37:15 +01:00
Juan Leyva d7a5af3f74 MDL-50613 webservice: Remove risk bit masks for Web Service protocols
This will prevent to show a 'Critical' status in security overview
report when mobile services are enabled
2015-09-30 09:56:45 +02:00
David Monllao cfcef5d0e2 Merge branch 'MDL-51415-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-09-30 14:15:45 +08:00
David Monllao 9d6ce46e15 Merge branch 'mdl51440-moodle29' of git://github.com/tlock/moodle into MOODLE_29_STABLE 2015-09-30 10:53:07 +08:00
Eloy Lafuente (stronk7) 2523ec4ba9 Merge branch 'MDL-49143-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE
Note: Added minor fix to unit test.
2015-09-30 03:22:05 +02:00
Dan Poltawski 1f93fcfe46 Merge branch 'MDL-51402_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-29 20:54:44 +01:00
Dan Poltawski 845360bec9 Merge branch 'MDL-51424-m29-master' of https://github.com/dthies/moodle into MOODLE_29_STABLE 2015-09-29 20:33:27 +01:00
Dan Poltawski e619162d7d Merge branch 'MDL-42639_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-09-29 10:20:13 +01:00
David Monllao 68ca374e7d MDL-42639 user: user:viewalldetails enough to view some fields
The fields are:
- username
- idnumber
- institution
- department
2015-09-29 16:56:02 +08:00
Ryan Wyllie 54c92105cc MDL-51525 libraries: added graphlib to thirdpartylibs.xml 2015-09-29 08:24:52 +00:00
Frederic Massart 8143c179f2 MDL-51588 webservice: Allow CORS in webservice/pluginfile.php 2015-09-29 14:41:59 +08:00
Andrew Nicols 014eee157d Merge branch 'MDL-43594-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-09-29 13:52:55 +08:00
Jun Pataleta 3cad70efa0 MDL-43594 mod_assign: Fix calendar update on course reset
This patch fixes the updating of calendar events when the course
is reset and its start date is changed.
2015-09-29 13:47:07 +08:00
Andrew Nicols cbd5cc6c97 Merge branch 'MDL-35918-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-09-29 13:42:58 +08:00
Eloy Lafuente (stronk7) 8ae030ea26 MDL-49143 LTI: Test resource_link_id in lti_build_request() 2015-09-29 13:42:34 +08:00
Cameron Ball 833042d716 MDL-49143 LTI: Fix missing resource id 2015-09-29 13:42:34 +08:00
Ryan Wyllie 7dd1a2adff MDL-35918 javascript: dialogues screen reader support
The YUI notification dialogues will now set the appropriate
aria attributes when they are shown/hidden to allow screen
readers to navigate them correctly.

When the dialogue is shown all background elements will be marked
as hidden while the dialogue is marked as visible to a screen reader.

When the dialogue is closed the modified elements will be reverted
to their previous state and the dialogue will be marked as hidden to
a screen reader.
2015-09-29 04:56:14 +00:00
Andrew Nicols 0e1967f0ef Merge branch 'wip-MDL-51241-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-09-29 12:45:39 +08:00
Andrew Nicols b3be78703e Merge branch 'MDL-51476_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-29 11:51:57 +08:00
Tim Lock e81c36413e MDL-51440 gradeimport_direct: fix config require statement 2015-09-29 12:09:48 +09:30
Dan Poltawski 0c9eba6722 Merge branch 'MDL-51305_29_too_many_gradeitem_fetches' of https://github.com/colin-umn/moodle into MOODLE_29_STABLE 2015-09-28 16:25:56 +01:00
Juan Leyva 550445a364 MDL-51415 webservice: Check course access using can_access_course()
This function check both user enrolled and course:view capabilities
2015-09-28 16:55:32 +02:00
Dan Poltawski a6174e039b Merge branch 'mdl46710-moodle29' of https://github.com/tlock/moodle into MOODLE_29_STABLE 2015-09-28 14:56:56 +01:00
Dan Poltawski 86e12fc481 Merge branch 'MDL-51390_29' of https://github.com/totara/openbadges into MOODLE_29_STABLE 2015-09-28 13:27:15 +01:00
Mark Nielsen 3876164bb9 MDL-51498 core_grades: Prevent unnecessary grade record fetching
All of these changes make use of already
fetched grade data.  Without these changes,
the gradebook regrade process does not scale
well with very large courses because it fetches
many grade records, one at a time.
2015-09-28 11:12:55 +01:00
Yuliya Bozhko 9c409941ac MDL-51390 badges: Switch backpack URL to use HTTPS
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-09-28 10:34:12 +01:00
Dan Poltawski 3c32d705b4 Merge branch 'MDL-49482-29' of https://github.com/blckct/moodle into MOODLE_29_STABLE 2015-09-28 10:31:49 +01:00
AMOS bot 725b10cbea Automatically generated installer lang files 2015-09-28 00:04:09 +08:00
Daniel Thies 3d7be50b95 MDL-51424 editor_atto: Save selection and editor contents after change 2015-09-25 09:48:44 -05:00
Daniel Thies 4287eb3f85 MDL-51227 editor_atto: Stop Chrome losing selection when formating 2015-09-25 09:34:58 -05:00
Tim Hunt 3a1c91bbe0 MDL-51476 questions: manual grading validation for ungraded Qs
The change in MDL-51090 broke manually commenting on questions for which
no mark is given (max mark == 0). This fixes it, with unit tests.

Thanks to Nick Phillips for the original suggestion of the fix.
2015-09-25 14:02:25 +01:00
Tim Lock 3fb95da969 MDL-46710 mod_lti: fix logging and completion tracking in new windows 2015-09-25 06:27:47 +09:30
Eloy Lafuente (stronk7) bca5897d9d MDL-49482 sqlsrv: Implement support of Offset/Fetch in SQL Server 2012+ 2015-09-24 20:10:41 +02:00
Jakub Kania 0df572a400 MDL-49482 mssql: Implement support of Offset/Fetch in SQL Server 2012+. 2015-09-24 20:10:41 +02:00
Eloy Lafuente (stronk7) ee64a43e1f weekly release 2.9.2+ 2015-09-24 16:07:22 +02:00
rajesh Taneja eaaf824878 MDL-50940 behat: Added support for field matching with xpath 2015-09-24 13:03:17 +08:00
Andrew Hancox e914864d08 MDL-50940 behat: Added ability to check field value by xpath 2015-09-24 13:03:16 +08:00
Cameron Ball fb289cac64 MDL-51292 core_message: Notify when leaving page or closing modal.
- Add reset_dirty_state method to formchangechecker. This is useful when used in combination with a modal.
- Modify hide method of sendmessage to reset formchangechecker dirty state on modal close.
2015-09-24 12:36:43 +08:00
rajesh Taneja 13aa85310e MDL-49973 behat: Fixed string change from Continue to Delete 2015-09-24 10:35:29 +08:00
Eloy Lafuente (stronk7) 3153e64879 Merge branch 'MDL-50207-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-09-23 20:15:49 +02:00
Eloy Lafuente (stronk7) 43c37c2a6c Merge branch 'wip-MDL-51259-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-09-23 16:25:02 +02:00
rajesh Taneja 74898ce3a9 MDL-51266 unittest: replaced low level phpunit_util calls 2015-09-23 15:44:16 +08:00
David Monllao 5a30263466 MDL-50332 enrol_self: Setting form url for guests
Credit to Andrew Nicols.
2015-09-23 11:52:53 +08:00
Eric Merrill f7265106ef MDL-51501 themes: pix_icon should not include empty alt tags 2015-09-22 17:20:12 -04:00
Dan Poltawski 5230bba5a5 Merge branch 'wip-MDL-51108-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-09-22 11:48:52 +01:00
Dan Poltawski 7d5747f1d1 Merge branch 'MDL-49973-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-09-22 09:44:45 +01:00
Dan Poltawski 392dccf38b MDL-50917 navigation: fix incorrect @since 2015-09-22 09:22:26 +01:00
Dan Poltawski 4addd78dfc Merge branch 'wip-MDL-50917-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-09-22 09:18:16 +01:00
Dan Poltawski 8422607979 Merge branch 'MDL-46157-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-09-22 08:15:01 +01:00
Adrian Greeve 1283e4c1b5 MDL-50917 navigation: Behat tests for viewing user preference page. 2015-09-22 11:29:46 +08:00
Adrian Greeve afd9a1766d MDL-50917 navigation: Unit test for viewing preference page. 2015-09-22 11:29:46 +08:00
Adrian Greeve 679b9927fe MDL-50917 navigation: Allow users with permission to access preferences. 2015-09-22 11:29:45 +08:00
Andrew Nicols bb126a9b18 Merge branch 'MDL-51190-29' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2015-09-22 08:30:28 +08:00
Ferenc Lengyel e5cd1282a1 MDL-51402 quiz: notification emails should respect grouping
In the case where teachers do not have the accessallgroups capability,
we only send "an attempt has been sumbitted "notification to teachers
in the same group as the student who submitted.

At the moment this considers all groups in the course. If this
particular quiz has a grouping set, then the logic should only consider
the groups in that grouping.
2015-09-21 13:31:08 +01:00
Dan Poltawski 33a42e94b4 Merge branch 'MDL-51052_29' of https://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-09-21 10:53:29 +01:00
Dan Poltawski 49e36faa06 Merge branch 'MDL-48165-29-dimgrades' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-09-21 10:14:48 +01:00
Andrew Nicols 67885c39ae Merge branch 'MDL-50332_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-09-21 15:45:29 +08:00
David Monllao a12ee735fe MDL-50332 enrol_self: Formatting unavailable instances error messages
Many thanks to Andrew Nicols as this patch is based on his
proposal. Thanks Andrew.
2015-09-21 15:42:22 +08:00
Andrew Nicols 71b39748eb Merge branch 'MDL-50790-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-09-21 14:43:50 +08:00
Cameron Ball b17f884ee0 MDL-50790 tests: Fix outlook fixture. 2015-09-21 14:27:51 +08:00
Cameron Ball 8503ae7558 MDL-50790 inbound: Stop incorrect amount of lines getting removed.
Too many lines were being removed for GMail senders. The function was
also removed because it is no longer used, and guessing the client
and cutting accordingly is a poor approach and will probably lead
to issues similar to this one.
2015-09-21 14:27:51 +08:00
Dan Poltawski 50ee86edc8 MDL-50790 messageinbound: fixture for gmail 2015-09-21 14:27:51 +08:00
Andrew Nicols 6d1170ad84 Merge branch 'MDL-51431_2_9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-09-21 08:12:14 +08:00
David Monllao 55ef80065e MDL-51052 dml: More info about mysql and case & accent sensitiveness 2015-09-18 11:46:39 +08:00
Charles Fulton 5cf8645e95 MDL-51052 dml: support for sql_like() under utf8_bin 2015-09-18 11:46:39 +08:00
Adrian Greeve 26385f6e34 MDL-51108 mod_data: Addition to behat test for Lat. and Long. 2015-09-18 07:34:03 +08:00
Adrian Greeve b44fd9143c MDL-51108 mod_data: Add validation for Lat. and Long.
Added a check to see that both the Lat. and Long. values
are entered when filling in database module entries.
2015-09-18 07:34:03 +08:00
Adrian Greeve e9a554e24e MDL-51241 cohorts: Update to cohort query.
This improves the speed of returning a list of
cohorts. Thanks to François Gannaz for providing
this patch.
2015-09-18 07:32:13 +08:00
Adrian Greeve c1a2d364dd MDL-51259 mod_data: ratings of items not activated.
When selecting a rating method, the restrict rating
to items with dates would be automatically enabled if
not checked. This code brings the data module inline
with forum and glossary.
2015-09-18 07:25:06 +08:00
Eloy Lafuente (stronk7) 2dd2288807 weekly release 2.9.2+ 2015-09-17 18:01:30 +02:00
Simey Lameze bc9cfd8e92 MDL-50959 gradebook: fix XML grade export 2015-09-17 10:36:52 +08:00
Andrew Hancox 49abb3dbd1 MDL-51431 enrol_flatfile: Fix for startdate when updating users 2015-09-16 10:59:46 +01:00
Marina Glancy 8c632bed76 MDL-46705 admin: Validate unique shortname for frontpage course 2015-09-16 14:48:10 +08:00
David Monllao 90728c0471 MDL-48881 mod_lesson: A couple of performance improvements
- Improve memory usage on db drivers not able to use recordsets
  properly
- !array_key_exists replaced by empty calls
2015-09-16 13:36:20 +08:00
Marina Glancy e6ad581ef1 MDL-51427 user: correctly use strings for phone1 and phone2
Thanks to Olumuyiwa Taiwo for original patch
2015-09-16 13:36:14 +08:00
David Monllao 5e59d05dcb Merge branch 'MDL-48881_m29v5' of git://github.com/sbourget/moodle into MOODLE_29_STABLE 2015-09-16 13:35:53 +08:00
David Monllao 0be4b0e256 Merge branch 'MDL-49561_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE
Conflicts:
	lib/bennu/readme_moodle.txt
2015-09-16 09:58:29 +08:00
Daniel Kosinski 68bd2b3132 MDL-46705 admin: Check if course with same shortname already exists 2015-09-16 09:45:50 +08:00
Eloy Lafuente (stronk7) e544b6b02a Merge branch 'MDL-50685_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-09-16 02:16:27 +02:00
Eloy Lafuente (stronk7) 204f6198de Merge branch 'MDL-49032_29' of https://github.com/stronk7/moodle into MOODLE_29_STABLE 2015-09-16 01:01:00 +02:00
Eloy Lafuente (stronk7) 6fc0e628c2 MDL-49032 lib/bennu: update readme to document the change 2015-09-16 00:54:06 +02:00
Joby Harding b5f95a5aec MDL-49032 lib/bennu: use HTAB only when folding lines 2015-09-16 00:40:11 +02:00
Eloy Lafuente (stronk7) e3ba5c0bf7 Merge branch 'MDL-50959-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-09-15 23:36:25 +02:00
Eloy Lafuente (stronk7) 868fccdfec Merge branch 'MDL-50892-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-09-15 23:35:13 +02:00
Eloy Lafuente (stronk7) 34ed3b47d1 Merge branch 'MDL-50766_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-09-15 23:03:02 +02:00
David Monllao 49e22cf34c Merge branch 'MDL-50884-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-09-15 17:16:01 +08:00
Cameron Ball 99e496e085 MDL-49973 behat: Update delete button names 2015-09-15 15:25:36 +08:00
Andrew Davis c4f82182b7 MDL-49973 changed continue to delete on delete confirmations 2015-09-15 15:25:36 +08:00
David Monllao 9b0671bf64 Merge branch 'MDL-50921-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-09-15 14:27:23 +08:00
David Monllao 8754df0a60 MDL-51048 backup: Removing unnecessary var 2015-09-15 13:44:18 +08:00
David Monllao 9931445ebb Merge branch 'MDL-51048_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-15 13:44:10 +08:00
Andrew Nicols 468ed9d2cf Merge branch 'MDL-51290-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-09-15 13:06:10 +08:00
Paul Nicholls b5c0915c78 MDL-51190 javascript: Make "maximised embed" compatible with MS Edge
MS Edge exhibits strange behaviour when M.util.init_maximised_embed hides
the embedded document by setting its width and height to 0px.  Toggling
display:none instead achieves the intended goal without breaking Edge.
2015-09-15 16:32:16 +12:00
David Monllao a9c345ff81 Merge branch 'MDL-51008-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-09-15 11:21:47 +08:00
Marina Glancy 5c3cf3991a MDL-51408 badges: fix criteria for custom profile fields 2015-09-15 11:17:49 +08:00
David Monllao 3576fc22c1 Merge branch 'MDL-51147_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-15 10:09:33 +08:00
David Monllao 05fcce2d37 Merge branch 'm29_MDL-51363_Fix_Default_Settings_1x_Restore' of git://github.com/scara/moodle into MOODLE_29_STABLE 2015-09-15 10:01:18 +08:00
Simey Lameze 96a2f1bf90 MDL-50207 block_activity_results: css styling on activity results block
This commit fixes minor styling issues on the activity results block and also add RTL css.
2015-09-15 08:43:58 +08:00
Matteo Scaramuccia c666cd83d5 MDL-51363 SCORM: fixed default settings on restoring 1.x backups 2015-09-14 23:54:46 +02:00
Cameron Ball 3f922fc16b MDL-51290 user: Expand picture section in profile by default 2015-09-14 17:53:56 +08:00
David Monllao d97841bd6a Merge branch 'wip-mdl-51101-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-09-14 16:18:38 +08:00
David Monllao e198c711d6 Merge branch 'MDL-51170-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-09-14 14:14:35 +08:00
Damyon Wiese 13cc47d30f MDL-50782 Ajax: No require_login for all ajax webservice calls
Some webservice functions need to be available without a login, e.g.
fetching strings and templates.

External functions must call validate_context if they require a valid login etc.

Added a new parameter to services.php: "loginrequired". Default is true.
2015-09-14 14:07:02 +08:00
David Monllao 3bf7532b3a Merge branch 'MDL-51191-moodle29' of git://github.com/StudiUM/moodle into MOODLE_29_STABLE 2015-09-14 13:59:29 +08:00
David Monllao 94990b79dd Merge branch 'MDL-51253_MOODLE_29' of git://github.com/BenKelada/moodle into MOODLE_29_STABLE 2015-09-14 13:07:52 +08:00
Ben Kelada 1f7c86cd14 MDL-51253 forum: fix urls for exceptions and redirects 2015-09-14 14:19:55 +10:00
Simey Lameze 95950c4696 MDL-50884 auth_shibboleth: fix logout handler url generation
This patch fixes the shibboleth redirect url generation, that can create invalid url
if the shibboleth logout_handler setting has a parameter generating two parameters
with (?) instead of (&).

Thanks to Matteo Boni for the proposed solution.
2015-09-14 09:50:43 +08:00
David Monllao 5830edf9ec Merge branch 'MDL-51232_29' of git://github.com/jinuabraham/moodle into MOODLE_29_STABLE 2015-09-14 09:39:18 +08:00
Daniel Thies beed73ad0f MDL-51228 atto_editor: Add documententation for inlineFormat flag 2015-09-13 14:28:25 -05:00
Eloy Lafuente (stronk7) b7d2ed3004 Moodle release 2.9.2 2015-09-12 02:03:09 +02:00
Colin Campbell f65bf24e5c MDL-51305 grade: Fix slow grade operations by setting grade_item early.
Exports were fetching the grade item for every item-user combination.
Setting the grade_item object on the grade_item early prevents that.
2015-09-11 15:38:32 -05:00
Jean-Philippe Gaudreau e6b37361a1 MDL-51191 assign: Optimizing slow SQL query for MySQL 2015-09-11 11:11:12 -04:00
David Monllao 6e29f12837 MDL-50766 grunt: Check that there are yui modules before running shifter 2015-09-11 15:12:10 +08:00
Jetha Chan ee7300f6e6 MDL-50685 core_form: disable hidden options, don't just hide 2015-09-11 15:09:09 +08:00
Marina Glancy 761e4380ef MDL-50892 mod: allow activity to have name '0' 2015-09-11 10:52:42 +08:00
Eloy Lafuente (stronk7) 14c9b43005 weekly release 2.9.1+ 2015-09-10 11:10:07 +02:00
Eloy Lafuente (stronk7) 60aeac00a5 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-09-10 11:10:02 +02:00
Rajesh Taneja 146cf59327 MDL-51101 behat: Fixed wrong hover step usage
Hover step was being mis-used for checking activity completion
This is replaced with proper step which check for img element
2015-09-10 14:53:55 +08:00
Rajesh Taneja 8f0336c473 MDL-51101 behat: Removed old behat steps checking feature
This was introduced when there were no features
testing all the steps. Now we have all use-cases
so removing this feature file
2015-09-10 14:53:44 +08:00
rajesh Taneja 60cab07485 MDL-50516 behat: Back/next button reloads page
When next/back button is pressed in phantomjs/browserkit
it reload page, so adding a bug_phantomjs, so that we can
test the lesson re-attempt scenario
2015-09-10 14:52:14 +08:00
Tim Hunt cc895e58d4 MDL-51147 qtype_match: stats should cope even if Q edited badly
The numbers become pretty meaningless, but we need to avoid fatal
errors.
2015-09-09 16:48:37 +01:00
Andrew Nicols 9a386ebbbe Merge branch 'MDL-50852-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-09-09 15:38:47 +08:00
Jun Pataleta a259be942b MDL-50852 formslib: Fixed client-side form validation problem.
This patch fixes the problem of client validation being broken when
shortforms is not enabled. This issue is caused by moodle-core-event
module not being loaded and the broadcast parameter in the
Y.Global.publish set to 2 instead of true.
2015-09-09 15:36:31 +08:00
Mark Nelson 20b5f693a5 MDL-50516 mod_lesson: changes to existing behat tests 2015-09-09 15:28:47 +08:00
Mark Nelson a5ff17de21 MDL-50516 mod_lesson: added behat tests 2015-09-09 15:28:46 +08:00
Mark Nelson 73fede1b48 MDL-50516 core_behat: added ability to go back, forward and reload the browser 2015-09-09 15:28:46 +08:00
Mark Nelson 9fd1342692 MDL-50516 mod_lesson: fixed issue with grade not using minquestions
It's possible to reach the end of the lesson, get your result,
click back until you get to the last question, answer it correctly
and then be awarded a result of 100%. This was because the grade
calculation would only include the questions answered, rather than
all of them in the lesson. However, you can not fix this by always
grading by the amount of questions in the lesson as some lessons
bypass certain questions depending on the answer to previous ones.
The minquestion setting can now successfully be used to prevent this
behaviour by rewording the misleading string and adding logic.
2015-09-09 15:28:46 +08:00
Mark Nelson 343ed5b929 MDL-50516 mod_lesson: prevented deletion of previous attempts
The 'startlastseen' flag was removing any previous attempts
the user had from the DB. This meant that the user could
simply re-answer the question, regardless of the number
of attempts allowed.
2015-09-09 15:28:46 +08:00
Mark Nelson f9cc721dfd MDL-50516 mod_lesson: prevented user from repeating question
It was possible in the lesson module for a user to
answer a question, get the result, then click back
in the browser and re-answer it, even if they exceeded
the number of attempts allowed per question.
2015-09-09 15:28:46 +08:00
Eloy Lafuente (stronk7) 7647c6eabe Merge branch 'wip-mdl-51322-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-09-09 08:23:36 +02:00
Simey Lameze 85dcae6808 MDL-50959 gradebook: fix XML grade publishing score 2015-09-09 14:03:15 +08:00
Ankit Agarwal fa57105063 MDL-50173 ratings: Use proper checks to ensure ratings are viewable.
Mainly to verify groups visibility this new callback has been created.

Note this was originally 3 commits but for amending purposes they have
been squashed.
2015-09-09 04:14:00 +02:00
Andrew Nicols 62f72f8ba9 Merge branch 'wip-MDL-34938-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-09-09 09:45:48 +08:00
Stephen Bourget 1c496f6923 MDL-48881 Lesson: Show all attempts on reports. 2015-09-08 21:21:38 -04:00
Dan Poltawski fbfe01cbb2 Merge branch 'MDL-51194_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-09-08 13:29:20 +01:00
John Okely ae6b18a934 MDL-50709 groups: Prevent XSS in grouping description 2015-09-08 12:49:53 +02:00
Dan Poltawski ac470f3721 Merge branch 'wip-MDL-50323-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-09-08 09:14:12 +01:00
Dan Poltawski e33ff30b44 Merge branch 'MDL-51307-29' of git://github.com/cameron1729/moodle into MOODLE_29_STABLE 2015-09-08 09:11:55 +01:00
Andrew Nicols e6adcaf3c6 Merge branch 'MDL-51281-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-09-08 14:20:25 +08:00
Andrew Nicols 7fc9fe32a7 Merge branch 'MDL-51325-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-09-08 12:56:29 +08:00
Cameron Ball b2f0dc9d10 MDL-51307 navigation: hide message button 2015-09-08 12:13:40 +08:00
Cameron Ball c6b86ab0c0 MDL-46157 drag and drop: Improve item labels
Ignore the edit menu when determining the region to drag.
2015-09-08 11:41:28 +08:00
Marina Glancy 7d4a741216 MDL-34938 enrol_meta: sync enrolment start/end dates 2015-09-08 10:27:57 +08:00
Marina Glancy ebc0351e54 MDL-51008 grades: show correct default value in overview report 2015-09-08 10:11:56 +08:00
Andrew Nicols cba5940f2e Merge branch 'MDL-51245_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2015-09-08 10:00:01 +08:00
Adrian Greeve 9cd25ae9a7 MDL-50323 themes: Course unordered lists correctly styled.
Thank you to Ann Adamcik for providing this patch.
2015-09-08 09:42:26 +08:00
Eloy Lafuente (stronk7) edbfa27218 MDL-51245 sqlsrv: Diagnose missing READ_COMMITTED_SNAPSHOT mode
Without it, transactions are executed in standard READ_COMMITED
mode, without snapshoting/row versioning, leading to update
conflicts under high concurrency.
2015-09-08 03:02:27 +02:00
Eloy Lafuente (stronk7) 2edfa4a1f9 MDL-51245 mssql: Diagnose missing READ_COMMITTED_SNAPSHOT mode
Without it, transactions are executed in standard READ_COMMITED
mode, without snapshoting/row versioning, leading to update conflicts
under high concurrency.
2015-09-08 03:02:24 +02:00
Petr Skoda 289bc7f9e3 MDL-50860 core: improve creation of random strings 2015-09-08 01:08:57 +02:00
Tim Lock 5536fee5a5 MDL-42670 mod_assign: Fix recent activity block when blind marking is on 2015-09-07 22:44:29 +02:00
Corey Wallis 5dab1b52ba MDL-51048 IMS-CC: Fix import & export of true/false questions 2015-09-07 16:05:58 +01:00
Marina Glancy ab006d43e4 MDL-50744 enrol_meta: fix incorrect role assign 2015-09-07 10:29:05 +01:00
Adrian Greeve 037e05e8b2 MDL-48371 editors: Option for removing managefiles
We want to remove the managefiles button from the
editors in the wiki so that students don't delete
each others files.
2015-09-07 09:59:33 +01:00
rajesh Taneja 58ffa95a15 MDL-51322 behat: ensure the window is properly closed
This is to ensure we have other window closed
so there is no race-around condition
2015-09-07 16:52:48 +08:00
Marina Glancy 56c0af9224 MDL-50921 message: allow popup messages from noreply user
Thanks Gary Harris for the patch
2015-09-07 08:15:08 +00:00
Mark Nelson 30d813d44e MDL-49561 core_lib: added info to bennu readme
Also did some minor tweaks to existing code.
2015-09-04 19:39:55 -07:00
Lars Anderson b7dffc34f5 MDL-49561 core_calendar: Fix ical export for events with no duration 2015-09-04 19:39:55 -07:00
lazydaisy e7444eb62e MDL-51194 theme_bootstrapbase: Move CSS classes from /less/moodle.less 2015-09-04 22:50:27 +01:00
Juan Leyva d8c9588662 MDL-51325 notes: Fix external get_course_notes to return site notes 2015-09-04 11:05:47 +02:00
Marina Glancy 2e3e1ae283 MDL-41042 coursecat: better handle changes in coursecontact 2015-09-04 11:53:58 +08:00
AMOS bot 28987b3c9d Automatically generated installer lang files 2015-09-04 00:04:09 +08:00
Juan Leyva 0fce1a1a6b MDL-51281 completion: Fixed incorrect returned parameter type
Parameter status in external function get_course_completion_status
2015-09-03 15:57:39 +02:00
Dan Poltawski a64e1f3684 weekly release 2.9.1+ 2015-09-03 12:31:58 +01:00
Dan Poltawski 2da85b88b9 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-09-03 12:31:56 +01:00
rajesh Taneja dec22fcdf6 MDL-51090 behat: switch to main window 2015-09-03 10:26:50 +01:00
David Monllao 37cec3335b Merge branch 'MDL-51179-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE
Conflicts:
	lib/upgrade.txt
2015-09-03 10:35:38 +02:00
Ryan Wyllie 956f281bd6 MDL-49536 theme_clean: update help text for logo
Updated the help text on the theme settings page to
mention that the theme logo will only be displayed on
the front page and login page.
2015-09-03 10:32:01 +02:00
rajesh Taneja 776f291ffd MDL-51285 mod_forum: Discussion post should not have same time stamp
Discussion post are sorted by timemodified
if they have same timemodified then results
will be random
2015-09-03 15:34:07 +08:00
Tim Hunt 3e280b70e6 MDL-51090 question manual grading: fixing for testing issues 2015-09-02 15:09:48 +08:00
David Monllao cd232214c2 MDL-51172 core_files: Using an invented file format 2015-09-02 10:37:23 +08:00
Ramindu Deshapriya 4b58bce051 MDL-51172 core_files: Added Behat test to automate MDLQA-8166 2015-09-02 10:37:19 +08:00
David Monllao d3b8ae917a Merge branch 'MDL-51090_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-02 09:49:46 +08:00
David Monllao ca36c9eecb Merge branch 'MDL-50971-m29' of git://github.com/NeillM/moodle into MOODLE_29_STABLE 2015-09-02 09:39:49 +08:00
David Monllao 0c9d44b050 Merge branch 'MDL-50920-2.9' of git://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-09-02 08:45:01 +08:00
Eloy Lafuente (stronk7) 7a43fe824c Merge branch 'MDL-50641-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-09-02 01:53:22 +02:00
Tim Hunt 5b203b3edb MDL-51090 question: further refinements to validating manual grades 2015-09-01 23:09:08 +01:00
Nelson Moller 9f3a76cb07 MDL-51090: mod_quiz grading validation of an essay question
An invalid format is casted to 0 (if a string) or to some truncated value in other cases (ex: 10..5).
2015-09-01 23:09:07 +01:00
David Mudrák a0c74d2ad9 MDL-48165 workshop: Validate the rubric editing form 2015-09-01 22:57:59 +02:00
David Mudrák 95778c3e51 MDL-48165 workshop: Add support for assessment forms validation 2015-09-01 22:57:04 +02:00
Dan Poltawski 758e773b97 MDL-50690 themes: fix commenting coding style
(See also CONTRIB-5891)
2015-09-01 21:12:33 +01:00
Dan Poltawski 301bb0954a Merge branch 'wip_MDL-50690_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2015-09-01 20:59:58 +01:00
AMOS bot ca8260190a Automatically generated installer lang files 2015-09-02 00:05:33 +08:00
Dan Poltawski 3652b59313 Merge branch 'MDL-51236-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-09-01 15:33:02 +01:00
David Monllao 7d98676efc Merge branch 'MDL-51234-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2015-09-01 18:34:16 +08:00
David Monllao d1dd5d0c20 Merge branch 'MDL-51109-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-09-01 18:31:40 +08:00
Dan Poltawski c378540995 MDL-51109 task: more debug info for failed scheduled tasks 2015-09-01 11:00:36 +01:00
Dan Poltawski b11c542a13 Merge branch 'MDL-45841_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-09-01 10:14:45 +01:00
David Monllao a7b1ab1629 Merge branch 'wip-mdl-50963-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-09-01 16:06:29 +08:00
rajesh Taneja 5fa0153289 MDL-50963 behat: fixed error string in behat 2015-09-01 14:43:52 +08:00
David Monllao 9067f9b0d4 Merge branch 'MDL-50999-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-09-01 14:35:42 +08:00
Damyon Wiese 3dcdac00a1 MDL-51179 Atto: Extend autosave fix to cover text changes
Added new functions to editor api - set/get_text so the
original form text can be determined from an editor.

When calling use_editor() you should first call set_text() with
the text that will be inserted in the form element.

There is also a new scheduled task for cleaning Atto autosave drafts.
2015-09-01 13:39:24 +08:00
Damyon Wiese db50734bd6 MDL-51179 Atto: Add a behat test for autosave 2015-09-01 13:39:24 +08:00
Damyon Wiese 9314b26c12 MDL-51179 Atto: When a resume is aborted - create a fresh draft for future saves. 2015-09-01 13:39:24 +08:00
Damyon Wiese b94dcc42c0 MDL-51179 Atto: Abort autosave if there are more recent changes to the files
If the files in the draft area have been modified more recently than the timestamp
of the draft - do not restore the files, or you will delete any newer files. We
cannot really guess here - merging the 2 lists of files will be wrong.
2015-09-01 13:39:24 +08:00
Marina Glancy 7964285dd5 MDL-50791 auth: add heading on signup form page 2015-09-01 01:58:48 +02:00
Marina Glancy 18bc684a56 MDL-50791 forms: make server validation errors accessible 2015-09-01 01:58:48 +02:00
Clement Smith 492d18b67d MDL-50963 lang/en/grades.php: Improve bad grade error message
The error message received when inputting a grade value that is too
low indicates that zero is a valid grade value. This is incorrect as
the lowest valid grade value is 1. This updates the error message to
indicate the minimum acceptable grade value is 1, not 0.
2015-09-01 01:45:47 +02:00
Eloy Lafuente (stronk7) 78e0a308da Merge branch 'MDL-49536-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-31 20:48:28 +02:00
Eloy Lafuente (stronk7) 3b96fd4c4d Merge branch 'MDL-50677-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-31 20:31:40 +02:00
David Monllao 3daf01d5c4 Merge branch 'MDL-51131-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-31 14:08:03 +08:00
David Monllao e56cf432d7 Merge branch 'MDL-51084-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-31 12:54:22 +08:00
Michael Aherne 121ab83eb5 MDL-51181 config: Correct documentation of lock_factory 2015-08-31 10:55:40 +08:00
David Monllao 258bd55190 Merge branch 'MDL-51215-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-31 10:45:32 +08:00
Jinu Abraham 328732592e MDL-51232 mod_book: Filter name header 2015-08-31 12:05:34 +09:30
lazydaisy 4df0cdb191 MDL-51234 theme_bootstrapbase: hover hardly visible on invert/collapse 2015-08-30 20:04:27 +01:00
Kevin Wiliarty 38458cc314 MDL-51229 theme: display docked block on top of fixed navbar 2015-08-30 09:41:51 -04:00
Neill Magill b1c395be36 MDL-50971 ActionMenu: Action menus cause page to jump when closing
This patch changes the behavior of open action menus when using a mouse.

Before this patch when clicking on the page with an open action menu the focus would be
returned to the action menu's call button. This could cause the page to jump when a
mouse user did not close an action menu, scrolled and then tried to perform another
action on the page.

After this patch when clicking the focus will not be returned to the action menu's call button.
The behavior of the script will not be changed when using the keyboard.
2015-08-28 12:15:01 +01:00
Marina Glancy 875b5d8adf MDL-51084 tool_customlang: return to the same page after submit 2015-08-28 16:20:59 +08:00
Marina Glancy cdf0f5c144 MDL-44707 block_html: copy files when copying instance 2015-08-28 16:04:36 +08:00
Dan Poltawski f563d2066d weekly release 2.9.1+ 2015-08-28 07:38:15 +01:00
Andrew Nicols d7caed18da MDL-51236 phpunit: Prevent testsuite name conflicts
The testsuite name is fed straight into a class_exists() in
PHPUnit_Framework_TestSuite. In some cases, e.g. cachestore_static, the
class does exist, it's then fed into a ReflectionClass, and the test fails.

The testsuite needs to not conflict with any classes which could be
autoloaded in Moodle core.
2015-08-28 14:26:55 +08:00
Ryan Wyllie 067ff3bdb6 MDL-49536 theme_clean: logo only on front and login
The logo for the clean and more themes will only be
displayed on the front page and login page as it was
replacing the header information on other pages within
Moodle, causing users to lose information on the page.
2015-08-28 02:41:38 +00:00
Daniel Thies 8049148bcf MDL-51228 editor_atto: Apply style in plugins if selection is collapsed 2015-08-27 12:31:27 -05:00
Gareth J Barnard 6e9edacd2c MDL-50690 themes: Theme cache SVG images are not created. 2015-08-27 15:38:08 +01:00
Dan Poltawski c1c0a3e5cd MDL-49826 grade: hide singleview links when no permissions
Singleview only supports grade editors not viewers at this time.
2015-08-27 13:17:15 +02:00
Eloy Lafuente (stronk7) 2a5e171e38 Merge branch 'MDL-51148-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-08-27 12:55:07 +02:00
Frederic Massart ef9291481f MDL-50677 user: Prefix custom fields node name in profile tree 2015-08-27 17:49:21 +08:00
Marina Glancy 4966e4ba41 MDL-51215 course: redirect to manage appropriate category 2015-08-27 17:04:49 +08:00
Helen Foster 389065d313 MDL-51148 lang: Merge English strings from the en_fix language pack 2015-08-26 17:17:56 +02:00
Dan Poltawski c7fab83ae6 MDL-50641 rss: fix front page rss links
Fallback to guest user token when no user is specified in rss_get_url
rather than generating a junk token which is no use to anyone, this
matches existing logic which has been in place in forum for a while
and avoids custom handling all over the place.
2015-08-26 08:10:08 +01:00
David Monllao 0a9b9f2192 Merge branch 'wip_MDL-50869_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2015-08-26 09:45:11 +08:00
Marina Glancy 124e381eeb MDL-50923 themes: content-only class added before region-only 2015-08-26 03:41:38 +02:00
Marina Glancy 9898944941 MDL-50923 theme: add missing content-only css class 2015-08-25 11:35:14 +02:00
David Monllao 1d6945afc5 Merge branch 'MDL-50933_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-08-25 14:28:23 +08:00
David Monllao f892e8e0ba Merge branch 'MDL-50996_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-08-25 14:27:01 +08:00
Marina Glancy b929c12f9e MDL-51131 tags: remove instances when course is deleted 2015-08-25 13:15:15 +08:00
Marina Glancy 3b6e267b24 MDL-50973 admin: do not throw exception on /admin/ 2015-08-25 10:15:46 +08:00
Clement Smith a8af89ac13 MDL-50957 grade/report/user: Fix division by zero
When using "sum of grades" and $grademax is zero, a division by zero
error occurs in fill_contributions_column() in
grade/report/user/lib.php.
2015-08-25 10:09:00 +08:00
Eloy Lafuente (stronk7) c592c17e96 Merge branch 'MDL-50714-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-25 00:06:12 +02:00
Tim Hunt 4a0e7a2a80 MDL-45841 forum: show unread posts on blog-style forum front page 2015-08-24 21:45:33 +01:00
Dan Poltawski 1eca49da48 Merge branch 'MDL-49701_29' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-08-24 15:14:15 +01:00
Dan Poltawski 0908a7c14d Merge branch 'MDL-40179-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-24 13:40:13 +01:00
Davo Smith 6b610880dc MDL-49826 gradereport_singleview: fix permission check
Users with capability 'moodle/grade:edit' should be able to edit grade values
- 'moodle/grade:manage' is not needed, as grade items are not being changed.
2015-08-24 10:39:41 +01:00
Dan Poltawski 5f4980811d Merge branch 'MDL-47450-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-24 10:25:32 +01:00
Tim Hunt fc2a25837f MDL-50996 quiz: fix review error with unusual permissions 2015-08-24 09:59:36 +01:00
David Monllao ed05747ed5 Merge branch 'MDL-50958-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-24 15:40:29 +08:00
David Monllao 13897daf53 Merge branch 'MDL-51184-29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-24 15:31:56 +08:00
Marina Glancy d4f8522545 MDL-51184 themes: correctly check $CFG->svgicons
Thanks to Ralf Wiederhold for pointing out the bug
2015-08-24 11:11:46 +08:00
Bruce Silver 576aa6bbda MDL-50958 block_messages: declare missing stdClass object 2015-08-24 10:34:36 +08:00
Damyon Wiese b9705008a1 MDL-51116 Mustache: Caching issue exists with mustache templates
The first ajax load fetches the template and puts it in localstorage + a js var

The second load gets it from local storage, but does not put it in the js var.

The pix_icon helper expects it to be in the js var always.
2015-08-24 10:17:29 +08:00
Tim Hunt bf76e3fd7f MDL-50933 quiz: improve completion behat tests
These now use the faster set-up methods.
2015-08-21 17:56:31 +01:00
Andrew Nicols fc95ad105d MDL-51170 core: Scheme section of URL should be case insensitive 2015-08-21 12:27:04 +08:00
Andrew Nicols 78fdc72794 MDL-50714 mod_forum: Add tests for all groupmodes 2015-08-21 08:21:19 +08:00
Andrew Nicols 6f1dc75492 MDL-50714 mod_forum: Correct use of movedicussions cap when posting
The ability to view the group dropdown was too closely related to the
movediscussions capability when posting, or editing a forum post.

The movedicussions capability should only be considered for some parts of
this logic. Users should be able to select the group to post to when
writing message, as long as they have access to that group.
2015-08-21 08:21:15 +08:00
Gareth J Barnard fcda61ba37 MDL-50869 themes: Quiz feedback colours are not accessible. 2015-08-20 16:50:54 +01:00
Dan Poltawski 8fb6ac2cb7 weekly release 2.9.1+ 2015-08-20 14:24:36 +01:00
Dan Poltawski c4e1aae15e Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-08-20 14:24:34 +01:00
Andrew Nicols e1c41f3c70 MDL-42634 theme: Increase margin on activity instance to not cover controls
Conflicts:
	theme/bootstrapbase/style/moodle.css
2015-08-20 15:43:23 +08:00
Marina Glancy eb7adebc48 MDL-50880 message: correctly compare with empty string
Thanks to David Herney Bernal for providing a fix
2015-08-20 10:32:04 +08:00
David Monllao c395cb2dbb MDL-50391 mod_lti: Fixing indentation 2015-08-20 09:49:29 +08:00
Eloy Lafuente (stronk7) ecdacbfc97 Merge branch 'MDL-50801_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-08-19 20:50:01 +02:00
Simey Lameze 9130e94980 MDL-40179 auth_cas: change is_proxybypass parameter to use server url 2015-08-19 14:32:05 +08:00
Andrew Nicols 116ae934c2 MDL-42634 theme: Increase margin on sectionname to not cover controls 2015-08-19 04:48:12 +02:00
Eloy Lafuente (stronk7) 4b1dd6e471 Merge branch 'MDL-49085_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-08-19 01:05:56 +02:00
Eloy Lafuente (stronk7) bb1744fb50 Merge branch 'MDL-46078-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-08-19 00:59:57 +02:00
AMOS bot 852f1a8646 Automatically generated installer lang files 2015-08-19 00:04:20 +08:00
Dan Poltawski 2b4fd22388 Merge branch 'wip-MDL-30315-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-08-18 13:19:59 +01:00
Eloy Lafuente (stronk7) 3d05b9f57a Merge branch 'MDL-47449-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-18 13:35:56 +02:00
Dan Poltawski c65835a156 MDL-46387 shifter: missing built changes 2015-08-18 12:32:54 +01:00
Dan Poltawski a3ef8e4744 Merge branch 'MDL-46387-m29-master' of https://github.com/dthies/moodle into MOODLE_29_STABLE 2015-08-18 12:22:16 +01:00
Dan Poltawski 2b3795a55f Merge branch 'MDL-49841-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-18 11:02:57 +01:00
Adrian Greeve fc607b307a MDL-30315 grades: Unit test for grade import. 2015-08-18 17:04:17 +08:00
Adrian Greeve efa7a8a9e4 MDL-30315 gradebook: Uploading feedback doesn't override grades. 2015-08-18 17:04:16 +08:00
Dan Poltawski 471d59d053 Merge branch 'MDL-50127-29-squashed' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-08-18 09:54:06 +01:00
David Monllao 3f2e092c9f Merge branch 'MDL-50391-MOODLE_29' of git://github.com/aspark21/moodle into MOODLE_29_STABLE 2015-08-18 12:12:48 +08:00
David Monllao c32a27e5e8 MDL-49085 block_tag_youtube: Using Youtube data api v3 2015-08-18 11:11:20 +08:00
David Monllao 58c274dcb3 Merge branch 'MDL-51102-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-18 10:25:32 +08:00
Dan Poltawski 629975a563 Merge branch 'MDL-44828-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-08-17 14:24:58 +01:00
Dan Poltawski 8bfbebcc56 Merge branch 'MDL-42634-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-17 11:45:09 +01:00
David Monllao df5222b3ac Merge branch 'wip-MDL-50962-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-08-17 14:56:44 +08:00
David Monllao 315939d98c Merge branch 'MDL-51016-m29' of git://github.com/micaherne/moodle into MOODLE_29_STABLE 2015-08-17 14:22:07 +08:00
David Monllao 1426599d63 Merge branch 'MDL-50637-2.9' of git://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-08-17 13:56:42 +08:00
David Monllao eb6cfca764 Merge branch 'wip-MDL-51095-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-17 12:07:35 +08:00
David Monllao f315095e42 Merge branch 'wip-MDL-50881-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-17 12:03:49 +08:00
David Monllao a7da0416b2 Merge branch 'MDL-50911-moodle29' of git://github.com/StudiUM/moodle into MOODLE_29_STABLE 2015-08-17 11:59:06 +08:00
Marina Glancy d4f667ed1e MDL-50932 cache: fix bug in prescanned file store
Thanks to Mark Nielsen for providing a patch
2015-08-17 11:45:39 +08:00
Bruce Silver 654c69c08b MDL-50962 user: Profile fields display properly
The department and idnumber fields were not displaying
properly on the user profile pages.
2015-08-17 10:35:46 +08:00
David Monllao 7923a04c42 Merge branch 'MDL-51057-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-08-17 09:54:32 +08:00
David Monllao 5e325f5dce Merge branch 'MDL-51077-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-17 09:46:38 +08:00
David Monllao b4173ea1ad Merge branch 'MDL-51088-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-17 09:26:20 +08:00
David Monllao e30c799185 Merge branch 'wip-mdl-51106-m29' of git://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-08-17 09:02:03 +08:00
David Monllao 285ca6ffbf Merge branch 'MDL-51100-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-08-17 08:51:16 +08:00
Andrew Nicols 14d54450e7 MDL-51102 behat: Add a non-JS version of wait 2015-08-17 08:12:57 +08:00
Daniel Thies 2ed920e774 MDL-46387 editor_atto: Add behat test for sub/sup 2015-08-16 16:00:03 -05:00
sam marshall a73b0208ea MDL-51077 Availability: Date restriction unit test static not cleared 2015-08-14 10:52:40 +01:00
Frederic Massart 47699db7f4 MDL-50127 mod_data: RTL styles for the required image 2015-08-14 16:47:51 +08:00
John Okely d03817a4eb MDL-50127 mod_data: Fix required icons in add entry screen 2015-08-14 16:47:51 +08:00
Andrew Nicols d0741e9791 MDL-47449 completion: Ignore timemodified when comparing 2015-08-14 10:54:20 +08:00
Andrew Nicols 4dcaaed6e0 MDL-47449 phpunit: Add comparitor for isEqual with exceptions
We often do isEqual tests but where a field, may have a single exception.
Ordinarily we can handle this easily by breaking the test down, but when
dealing with mocked objects we can only pass an instance of a
PHPUnit_Framework_Constraint, or a single value (which is cast to an
instance of PHPUnit_Framework_Constraint_IsEqual).

To deal with instances of time-based exception, we need to be able to
compare simple objects and classes where one or two values may be
different.
2015-08-14 10:54:19 +08:00
Andrew Nicols 28268cb20e MDL-49841 testing: Correct composer incantation 2015-08-14 10:29:12 +08:00
Jun Pataleta aed2279b50 MDL-44828 filelib: Fix open error for force-downloaded files in mobile
Allow guessing of file's MIME type by default. Fallback to
application/octet-stream if MIME type cannot be determined.
2015-08-14 09:55:13 +08:00
Rajesh Taneja 8c89201543 MDL-51100 behat: Remove javascript tag from usermenu steps 2015-08-14 08:57:11 +08:00
Andrew Nicols a746101872 MDL-51100 behat: Remove javascript tag from usermenu steps
These tests only needed the javascript tag because of the user menu.
Now that issue has been resolved, they do not need it.

Note: Some were also not using the singleselect feature, so would fail
without changes to use this too as they were not handling proper selection
of the singleselect element.
2015-08-14 08:57:11 +08:00
Andrew Nicols 2635b929d9 MDL-51100 behat: Correct javascript requirement of user menu step 2015-08-14 08:57:10 +08:00
Andrew Nicols cdf311cd4f MDL-51088 mod_forum: Improve mod_forum behat performance 2015-08-14 07:57:59 +08:00
Andrew Nicols 1a7fcb9d52 MDL-51088 completion: Do not require hover to confirm xpath 2015-08-14 07:57:59 +08:00
lazydaisy 0dde4b7536 MDL-51057 theme_base: RTL fix adds missing padding to block header h2. 2015-08-14 00:32:30 +01:00
Daniel Thies 265cf9f7c7 MDL-46387 editor-atto: Toggle sub/sup tags using rangy
In order to have a consistant browser behavior and prevent nesting of
subscripts and superscripts, tags are converted to CSS classes and then
the CSS classes in the selection are toggeled using the rangy crossbrowser
selection library already included in Atto without using an execCommand.
2015-08-13 15:50:24 -05:00
Alistair Spark 7ae86a915c MDL-50391 format_singleactivity: fix LTI Tool opens in existing window 2015-08-13 14:12:13 +01:00
Marina Glancy a0f2d25ccd MDL-50391 format_singleactivity: fix activity_has_subtypes() 2015-08-13 14:12:13 +01:00
Dan Poltawski 47b5927c10 MDL-51110 badges: prevent duplicate award of badges
Previously duplicate users could be returned when they had
done duplicate badge criteria - this would lead to a duplicate
constraint being hit as they were attempted to be awarded twice.
2015-08-13 13:28:12 +01:00
Eloy Lafuente (stronk7) f5e48d21ec weekly release 2.9.1+ 2015-08-13 12:17:02 +02:00
Eloy Lafuente (stronk7) e805a8afcb Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-08-13 12:16:57 +02:00
Rajesh Taneja d744140220 MDL-51106 behat: Fixed misuse of javascript tag 2015-08-13 13:26:17 +08:00
Andrew Nicols 4aae37f7a7 MDL-51100 behat: Remove javascript tag where not required
These tests only needed the javascript tag because of the user menu.
Now that issue has been resolved, they do not need it.

Note: Some were also not using the singleselect feature, so would fail
without changes to use this too as they were not handling proper selection
of the singleselect element.
2015-08-13 13:17:50 +08:00
Andrew Nicols 9fe1f70c4d MDL-51100 behat: Correct javascript requirement of user menu step 2015-08-13 13:17:50 +08:00
Marina Glancy 9b7c56ed0d MDL-51095 enrol_meta: add missing include
Thanks to Shaun Meyer for providing a patch
2015-08-13 12:30:01 +08:00
AMOS bot f799599c76 Automatically generated installer lang files 2015-08-13 00:04:25 +08:00
AMOS bot 3bd64b35db Automatically generated installer lang files 2015-08-13 00:04:25 +08:00
Skylar Kelty 2492e22a3b MDL-50920 enrol: Remove pointless DB update in enrol_meta 2015-08-12 11:55:07 +01:00
David Monllao 27384b2589 Merge branch 'MDL-46860-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-12 10:46:10 +08:00
David Monllao b995470d68 Merge branch 'MDL-51053-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-12 08:23:57 +08:00
Eloy Lafuente (stronk7) 9a45788698 Merge branch 'MDL-50062-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-12 01:47:17 +02:00
Eloy Lafuente (stronk7) c1e6db4538 Merge branch 'MDL-50446-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-12 00:15:52 +02:00
Eloy Lafuente (stronk7) a75c62d090 Merge branch 'MDL-50307-29-3' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-08-11 23:45:10 +02:00
Andrew Nicols 8856004b3a MDL-49293 db: Pass sql_concat_join to sql_concat 2015-08-11 23:08:39 +02:00
Andrew Nicols f95118c1ee MDL-49293 db: Test sql_concat_join with more conditions 2015-08-11 23:08:38 +02:00
Eloy Lafuente (stronk7) 9ac618ebfe Merge branch 'MDL-50642_29' of https://github.com/ecampbell/moodle into MOODLE_29_STABLE 2015-08-11 22:38:01 +02:00
Alain Benoit 24c9c630cb MDL-50911 Quiz: edit settings page not responsive 2015-08-11 09:18:19 -04:00
sam marshall c237ec4c29 MDL-51053 Restore: Static cache breaks unit tests 2015-08-11 14:08:25 +01:00
Eloy Lafuente (stronk7) 3c78c0df57 Merge branch 'MDL-50894_29' of https://github.com/gedion/moodle into MOODLE_29_STABLE 2015-08-11 14:18:42 +02:00
Eloy Lafuente (stronk7) 79f47fd1b3 Merge branch 'm29_MDL-51015' of git://github.com/danmarsden/moodle into MOODLE_29_STABLE 2015-08-11 14:09:49 +02:00
Frederic Massart e85112f074 MDL-42634 theme: Action menu is displayed correctly with hidden elements 2015-08-11 14:54:37 +08:00
David Monllao 19b6e5512f Merge branch 'MDL-51014-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-11 13:09:30 +08:00
Marina Glancy e53efac19c MDL-50881 calendar: do not throw exception without sesskey 2015-08-11 12:52:26 +08:00
John Okely b61a30c5ff MDL-50307 auth_db: Stop using AS to prevent error with some drivers 2015-08-11 12:13:33 +08:00
John Okely 1dd3f049e0 MDL-50307 auth_db: Fix associative fetching in ADODB 2.19 2015-08-11 12:13:32 +08:00
AMOS bot f969608c68 Automatically generated installer lang files 2015-08-11 00:04:06 +08:00
Mark Johnson 4575ba6f34 MDL-51014 behat: Wait for filepicker to load repository 2015-08-10 13:37:51 +01:00
David Monllao 593f2842e7 Merge branch 'wip-MDL-51062-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-10 14:24:08 +08:00
Marina Glancy 02bc23c784 MDL-51062 behat: permission steps should work without js 2015-08-10 11:58:43 +08:00
David Monllao cba771a588 Merge branch 'MDL-50992-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-08-10 11:17:59 +08:00
David Monllao eea7fbc292 Merge branch 'MDL-51007-m29' of git://github.com/sammarshallou/moodle into MOODLE_29_STABLE 2015-08-10 11:08:16 +08:00
David Monllao 33d551abbb MDL-50801 atto_table: Closing caption tag 2015-08-10 10:53:19 +08:00
Ryan Wyllie 4f43ea59c8 MDL-46860 filepicker: change responsive styling
Changed the filepicker's responsive styling to kick in
on screen width less than 768px (which is the bootstrap
standard) rather than 873px. This allows the standard
styling to apply within an iframe.
2015-08-10 02:20:40 +00:00
Ryan Wyllie c7007d2c20 MDL-46860 filepicker: iframe context aware
The filepicker now checks if it's within an iframe when
creating the dialogue, if so it will set the dialogue width
to fit within the iframe and disable dragging.
2015-08-10 02:19:48 +00:00
Andrew Nicols 09ae51738f MDL-50949 cache: Improve cache performance tests 2015-08-10 08:19:44 +08:00
Andrew Nicols 35728d3595 Merge branch 'MDL-50949-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-10 08:14:19 +08:00
Frederic Massart fd7f843022 MDL-47450 blocks: Blocks can be moved on the site profile 2015-08-07 15:10:54 +08:00
AMOS bot fb892eb383 Automatically generated installer lang files 2015-08-07 00:04:05 +08:00
Eoin Campbell 894d2d2b3b MDL-50642 qformat_xml: fix import of tags in Cloze questions 2015-08-06 16:02:05 +01:00
Michael Aherne af4266eac7 MDL-51016 messaging: Fix email attachments on Windows 2015-08-06 13:02:16 +01:00
Dan Marsden f6597fa087 MDL-51015 mod_scorm: tidy up messy code, remove use of eval() 2015-08-06 22:21:26 +12:00
Andrew Nicols 49fa660aca weekly release 2.9.1+ 2015-08-06 12:11:44 +08:00
Andrew Nicols ff7896adc7 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-08-06 12:11:33 +08:00
Frederic Massart a42d0d98fb MDL-50062 behat: Handle category mapping for grade items generator 2015-08-06 12:01:09 +08:00
Frederic Massart b26f764754 MDL-50062 grades: Behat tests for aggregation changes 2015-08-06 12:01:08 +08:00
Frederic Massart 5e0af40734 MDL-50062 grades: Fix false positives in Behat tests 2015-08-06 12:01:08 +08:00
Frederic Massart 0ba8e843b1 MDL-50062 grades: Tests for item::set_aggregation_fields_for_aggregation 2015-08-06 12:01:08 +08:00
Frederic Massart 488ba5c1ef MDL-50062 grades: Carry agg. settings between categories when possible 2015-08-06 12:01:08 +08:00
Dave Cooper b8ca7925c0 MDL-50062 gradebook: Fixed behaviour when changing aggregation mathods. 2015-08-06 12:01:08 +08:00
Eloy Lafuente (stronk7) a4209ab67a Merge branch 'MDL-44840-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-05 20:47:39 +02:00
Eloy Lafuente (stronk7) a74ead4260 Merge branch 'MDL-50816-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-08-05 18:21:36 +02:00
AMOS bot 411a4b4082 Automatically generated installer lang files 2015-08-06 00:04:15 +08:00
AMOS bot 1aa3ead079 Automatically generated installer lang files 2015-08-06 00:04:15 +08:00
Eloy Lafuente (stronk7) b963701081 Merge branch 'MDL-48970_2.9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-08-05 16:20:47 +02:00
sam marshall bdf512f2c1 MDL-51007 Availability: Unit test fails with extra plugins 2015-08-05 14:30:01 +01:00
Eloy Lafuente (stronk7) 89a762ca8c Merge branch 'MDL-38230_29' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-08-05 12:39:31 +02:00
Andrew Nicols 9241c64f97 MDL-50999 dock: Stop adding commands to DOM
The commands div should not be added to the DOM. The version shown in the
dock is different to the standard version in the block, and is manually
added to the dock panel when it is displayed.

The docked version contains additional actions (e.g. the undock button).

The original version of the dock should ideally remain untouched.

Note: A duplicate delegation was discovered when fixing this issue. This
was previosuly not triggered because the watched Node was removed
before the delegation took effect.
2015-08-05 10:08:16 +08:00
Andrew Nicols 4baad0fd5c Merge branch 'MDL-48202-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-08-05 09:09:15 +08:00
Eloy Lafuente (stronk7) 71c6272dfe MDL-35027 mod_forum: verify forced subscriptions cannot be edited
This commit adds a new scenario to verify that the option
to turn edition of subscribers is not available anymore
for forced-subscription activities.

It also gets rid of the @javascript tag in a just introduced
scenario not needing it.
2015-08-05 02:09:04 +02:00
Eloy Lafuente (stronk7) 1e0cc67b0e Merge branch 'MDL-35027-B-29' of https://github.com/bostelm/moodle into MOODLE_29_STABLE 2015-08-05 02:08:54 +02:00
Eloy Lafuente (stronk7) 6532dc07f5 Merge branch 'MDL-50416-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-08-04 20:03:19 +02:00
Eloy Lafuente (stronk7) c7d4aa10ce MDL-46963 env: adding missing check_database_tables_row_format check 2015-08-04 19:47:03 +02:00
Eloy Lafuente (stronk7) 6f91dc9497 MDL-50624 env: adding missing restrict_php_version_7 check 2015-08-04 19:30:11 +02:00
Bruce Silver 0ff0722b2f MDL-50992 lti: Fix debugging warning when creating a new tool 2015-08-04 22:25:51 +08:00
Andrew Nicols e2bbadf137 Merge branch 'MDL-50893_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-08-04 16:00:10 +08:00
Andrew Nicols 7daf0d32d0 Merge branch 'MDL-45113-29' of https://github.com/mackensen/moodle into MOODLE_29_STABLE 2015-08-04 15:22:32 +08:00
Andrew Nicols a6f919b8c8 Merge branch 'MDL-43709-29' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2015-08-04 12:44:21 +08:00
Andrew Nicols bd7a798d11 Merge branch 'MDL-50532-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-08-04 12:13:49 +08:00
Andrew Nicols d6802fd4a7 MDL-50493 mod_forum: Correct style issues 2015-08-04 11:55:31 +08:00
Andrew Nicols 2e173e6a23 Merge branch 'MDL-50493-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-08-04 11:54:55 +08:00
Andrew Nicols 8854ba9bda Merge branch 'MDL-50771_29' of git://github.com/stronk7/moodle into MOODLE_29_STABLE 2015-08-04 10:28:16 +08:00
Andrew Nicols f47b39cbea Merge branch 'MDL-42626-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-08-04 10:10:36 +08:00
Andrew Nicols db526aa03a Merge branch 'MDL-45772-29-4' of git://github.com/xow/moodle into MOODLE_29_STABLE 2015-08-04 10:01:33 +08:00
John Okely 56b63c4151 MDL-45772 admin: Stop browsers from autofilling passwords incorrectly 2015-08-04 09:54:56 +08:00
Simey Lameze 78b0d423b1 MDL-50416 environment: add missing slasharguments checks 2015-08-04 09:44:50 +08:00
Eloy Lafuente (stronk7) 9d4c7b6573 Merge branch 'MDL-50515_29' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-08-04 01:28:09 +02:00
AMOS bot eb644d98b5 Automatically generated installer lang files 2015-08-04 00:04:23 +08:00
Henning Bostelmann add21c5f20 MDL-35027 mod_forum: Fix subscriber list in hidden forums
If the forum is force-subscribed and hidden, only subscribers that can
view hidden activities will be shown in the subscriber list.
2015-08-03 12:13:31 +01:00
Eloy Lafuente (stronk7) 4893167372 MDL-50771 oracle: Bind long (>4000byte) text as CLOB
While we already were detecting @ normalise_value()
both BLOBs and CLOBs properly on insert and update
statements (by introspectind the column specs), when
a long TEXT is being passed as part of an arbitrary
SQL, or within the conditions... it was being bound
as VARCHAR, leading to problems if used in combination
with DBMS_LOB functions.

This patch just ensures that any TEXT > 4000 bytes not
detected by normalise_value() will be, always, bound as CLOB,
unconditionally.

Covered with tests both covering its use with DBMS_LOB (the
reported bug) and also in general raw statements.
2015-08-03 10:52:00 +02:00
Jean-Michel Vedrine 313bba607a MDL-38230 mod_quiz: Create UI for removing of quiz access rule addons 2015-08-03 09:00:44 +02:00
Andrew Nicols 1c548b8006 Merge branch 'wip-MDL-22819-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-08-03 10:23:12 +08:00
Andrew Nicols 1fcd127797 Merge branch 'MDL-49864-29' of git://github.com/junpataleta/moodle into MOODLE_29_STABLE 2015-08-03 09:43:59 +08:00
Andrew Nicols bee6faa8ac Merge branch 'MDL-50624-29' of git://github.com/ryanwyllie/moodle into MOODLE_29_STABLE 2015-08-03 09:20:25 +08:00
Jun Pataleta 3999a761eb MDL-49864 mod_assign: Fix missing annotations when viewing PDF
Added 'draft = 1' criteria for the delete query in
page_editor::set_annotations in order to prevent the deletion of non-draft
annotations while the PDF is being edited.
2015-08-03 09:11:32 +08:00
Ryan Wyllie d4c0adb685 MDL-50624 environment: add PHP7 as unsupported version
Added PHP7 as an unsupported version for Moodle 2.8 and 2.9 in
the environment checks
2015-08-03 01:02:27 +00:00
lazydaisy 0b91dd902a MDL-48202 theme_bootstrapbase: blocks are 6px taller after undocking. 2015-08-02 21:39:19 +01:00
Jean-Michel Vedrine e4e72baa5d MDL-49701 mod_lesson: open time should be before close time 2015-08-02 10:35:30 +02:00
Jean-Michel Vedrine 67de7818ba MDL-50515 mod_lesson: Can't remove content buttons from content page 2015-08-02 09:47:40 +02:00
Charles Fulton e5ca803a40 MDL-45113 auth: add is_configured method and convert auth_db to use it 2015-07-31 15:18:07 +00:00
Simey Lameze 13a140400c MDL-50416 environment: remove slasharguments warning from install 2015-07-31 11:37:14 +08:00
Andrew Nicols eb1d954cda weekly release 2.9.1+ 2015-07-30 14:42:15 +08:00
Andrew Nicols c39133315e Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-07-30 14:42:09 +08:00
Ryan Wyllie 92434b8f2b MDL-50446 block_site_main_menu: Test add URL resource
Behat tests to confirm that adding a URL resource to
the main menu block doens't break the javascript.
2015-07-30 04:34:29 +00:00
Ryan Wyllie d2d6ab4f88 MDL-50446 block_site_main_menu: Fix the onclick property handling 2015-07-30 04:34:21 +00:00
AMOS bot caede15d09 Automatically generated installer lang files 2015-07-30 00:04:06 +08:00
Frederic Massart 4ca8a308d6 MDL-50949 cache: Tests for performance debugging of cache usage 2015-07-29 14:39:28 +08:00
Frederic Massart e92750abc2 MDL-50949 cache: Performance debug keeps track of hits/misses/sets 2015-07-29 14:39:27 +08:00
Mark Nelson 0ae2f41141 MDL-50535 core_grades: fixed behat failing 2015-07-29 14:23:35 +08:00
Frederic Massart 9f970d338d MDL-50532 tasks: Delete obsolete tasks during upgrade 2015-07-29 11:25:54 +08:00
Jean-Michel Vedrine ad70c80da3 MDL-44840 mod_lesson: fix import of truefalse questions 2015-07-29 11:05:50 +08:00
Tim Hunt 670344b164 MDL-50893 questions: cannot create a question with name 0 2015-07-28 18:19:30 +01:00
Dan Poltawski a2cefb4228 Merge branch 'MDL-50535_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-07-28 13:14:27 +01:00
Barbara Ramiro 56b35937fa MDL-50370 Icons: Filetype icon for ePub 2015-07-28 12:43:33 +01:00
Dan Poltawski b3b49df108 Merge branch 'MDL-50833-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-28 12:38:52 +01:00
Dan Poltawski 3718b75234 Merge branch 'MDL-50868-29' of git://github.com/jethac/moodle into MOODLE_29_STABLE 2015-07-28 12:19:09 +01:00
spvickers 6504c740b6 MDL-49629 mod_lti: Add icon fields
Icon fields added to input form when defining an external tool at the
admin level.  The icon for a tool derived from a tool proxy can be
overridden.  Course cache is cleared if current icon value is changed.

Add text boxes to edit form for entering icon URLs.
2015-07-28 12:04:35 +01:00
Andrew Nicols 6edb0474e3 Merge branch 'wip-MDL-50874-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-28 15:01:55 +08:00
Andrew Nicols 9923f33a1a Merge branch 'MDL-50295-29' of git://github.com/danpoltawski/moodle into MOODLE_29_STABLE 2015-07-28 14:04:15 +08:00
Andrew Nicols bdf1e4e617 Merge branch 'MDL-44962_29' of https://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-07-28 11:29:48 +08:00
Andrew Nicols 6e8ca5db5a Merge branch 'MDL-35148-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-07-28 11:07:48 +08:00
Frederic Massart 6f7fc58710 MDL-35148 themes: Updated checks deciding when mobile themes are used
Now, if a site-theme is set for tablet/phone AND the user is using
a tablet/phone that site-theme will be used, always. In any other
case the normal theme resolution will be used: course, category, ...
2015-07-28 11:01:54 +08:00
Damyon Wiese 57b6aa814e MDL-46078 Assign: Completion is not using assignment API.
Should not be directly querying the DB to get the submission, use the API!
2015-07-28 10:28:43 +08:00
Juan Leyva 443d5b3aa5 MDL-42626 messages: Hide deleted users in contact/blocked list 2015-07-27 16:34:32 +02:00
Charles Fulton 3a68038421 MDL-41598 auth_shibboleth: don't override wantsurl 2015-07-27 15:25:15 +01:00
Dan Poltawski 0d8674d771 Merge branch 'MDL-43785-29' of git://github.com/andrewnicols/moodle into MOODLE_29_STABLE 2015-07-27 14:49:40 +01:00
Dan Poltawski 1fc557af41 Merge branch 'MDL-49360-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-07-27 12:08:47 +01:00
Dan Poltawski 1f42924fdd Merge branch 'wip-MDL-50649-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-27 12:00:02 +01:00
Andrew Nicols e54053e712 Merge branch 'MDL-46232-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-07-27 15:58:04 +08:00
Frederic Massart 1a29f44649 MDL-46232 user: Handle bulk delete of users without email addresses 2015-07-27 15:48:42 +08:00
Andrew Nicols 462104b7b4 MDL-43785 lib: Improve session timeout warnings 2015-07-27 14:30:24 +08:00
Simey Lameze ac62233074 MDL-49360 core_lib: add new method get_local_referer()
This commit also replace all usages of $_SERVER['HTTP_REFERER'] and get_referer().
2015-07-27 11:59:28 +08:00
AMOS bot 5dd4dd5e24 Automatically generated installer lang files 2015-07-26 00:04:04 +08:00
Mark Nelson 9aa6d6a434 MDL-50535 core_course: disabled 'gradepass' field when no ratings set 2015-07-24 13:48:01 -07:00
Gedion Woldeselassie 28b91e26c1 MDL-50894 lib/conditionlib: Occasional cron error
Inhibit division by zero error warnings when rawgrademax and rawgrademin are
equal. The change does not affect existing functional behavior.
2015-07-24 11:16:57 -05:00
David Monllao 358cd4e54a MDL-44962 mod_wiki: No input filter
Thanks to Tim Lock for the partial fix.
2015-07-24 16:34:29 +02:00
Marina Glancy c3bf02945a MDL-22819 tags: fix breadcrumb on manage tags page 2015-07-24 21:28:17 +08:00
Marina Glancy e2b49dde9e MDL-50649 report: query optimisation 2015-07-24 17:39:01 +08:00
Jetha Chan f4935dd9fe MDL-50868 weblib: add unit test for ruby support 2015-07-24 14:12:01 +09:00
Jetha Chan 841fe2b2e8 MDL-50868 weblib: add ruby support to purify_html 2015-07-24 14:12:01 +09:00
AMOS bot a3f0e47c49 Automatically generated installer lang files 2015-07-24 00:04:20 +08:00
Dan Poltawski cd02b264bd weekly release 2.9.1+ 2015-07-22 20:43:03 +01:00
Dan Poltawski d821b4a848 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-07-22 20:43:00 +01:00
Andrew Nicols f23a44de04 Merge branch 'MDL-50563-m29' of https://github.com/NeillM/moodle into MOODLE_29_STABLE 2015-07-22 09:19:32 +08:00
Andrew Nicols 7dd47eec3e Merge branch 'MDL-50762-MOODLE29' of https://github.com/luryus/moodle into MOODLE_29_STABLE 2015-07-22 09:12:50 +08:00
Andrew Nicols d1c480c72d Merge branch 'MDL-50699-29' of https://github.com/pauln/moodle into MOODLE_29_STABLE 2015-07-22 09:07:54 +08:00
Andrew Nicols 0964d538fe Merge branch 'MDL-50525_2.9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-07-22 08:58:39 +08:00
Andrew Nicols ca719d2df8 Merge branch 'MDL-50523_2.9' of https://github.com/andrewhancox/moodle into MOODLE_29_STABLE 2015-07-22 08:46:56 +08:00
Dan Poltawski cce7558a9f MDL-50663 blocks: minor style fixes 2015-07-21 15:41:39 +01:00
Dan Poltawski 2d87c112f8 Merge branch 'MDL-50663' of https://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-07-21 15:40:16 +01:00
Dan Poltawski 106fd4f300 Merge branch 'MDL-50293_29' of https://github.com/Syxton/moodle into MOODLE_29_STABLE 2015-07-21 12:51:58 +01:00
Marina Glancy e6e6926103 MDL-50874 block: basic tests for tag-related blocks 2015-07-21 17:01:21 +08:00
Dan Poltawski 52788d744e Merge branch 'MDL-50639_mod_book_fontsize_M29' of https://github.com/barrysspace/moodle into MOODLE_29_STABLE 2015-07-21 09:08:14 +01:00
Andrew Nicols 6fb892c16f Merge branch 'MDL-49618-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-21 12:16:46 +08:00
Andrew Nicols c5d7c66e51 Merge branch 'MDL-47230_M29' of https://github.com/barrysspace/moodle into MOODLE_29_STABLE 2015-07-21 11:23:00 +08:00
Andrew Nicols f7b362485c Merge branch 'wip-MDL-41650-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-21 09:37:08 +08:00
Andrew Hancox 3439fa1a22 MDL-50523 mod_assign: Conditionally disable activity setting
On activity settings form if "Students submit in groups" is set to no then
disable "Require group to make submission" setting.
2015-07-20 19:45:28 +01:00
Andrew Hancox bd103e4288 MDL-50525 mod_assign: Moved preventsubmissionnotingroup
Moved preventsubmissionnotingroup to between teamsubmission and
requireallteammemberssubmit to keep all settings related to
group submissions together.
2015-07-20 19:43:01 +01:00
AMOS bot 35b097d9fa Automatically generated installer lang files 2015-07-21 00:04:37 +08:00
pau.ferrer-ocana a457117ca8 MDL-49440 lib: Date picker duplicated week day names repaired
Thanks Marc Català for the patch
2015-07-20 14:03:07 +01:00
Dan Poltawski 54588deffa Merge branch 'wip-MDL-50678-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-20 13:54:02 +01:00
Dan Poltawski 496955cc9f Merge branch 'wip-MDL-50612-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-07-20 10:12:25 +01:00
AMOS bot 3d4c68aa36 Automatically generated installer lang files 2015-07-20 00:05:01 +08:00
apsdehal b6852df791 MDL-41650 Tags: Changed css classes of errors and success notice 2015-07-19 20:23:35 +08:00
AMOS bot b1f85cb018 Automatically generated installer lang files 2015-07-18 00:05:22 +08:00
Lauri Koskela 6532e2871e MDL-50762 tool_capability: Do not hide first capability in list 2015-07-17 15:32:53 +03:00
Neill Magill bb4bab30bd MDL-50563 blocks: A hidden block that is dropped should be dimmed
Before this patch when dragging and dropping a hidden block it would display as though visible when it was dropped.

This is only a display issue, as a page refresh caused it to be dimmed in its new position.
2015-07-17 09:24:11 +01:00
Barry Oosthuizen aa7742e105 MDL-50639 mod_book: Remove 0.8em font sizes 2015-07-17 08:48:14 +01:00
AMOS bot 9d2c5fb75b Automatically generated installer lang files 2015-07-17 00:05:06 +08:00
Syxton f1f4daba91 MDL-50293 navigation: File name not wrapping
A long File name doesn't always wrap correctly in the Navigation block.
2015-07-16 10:24:34 -04:00
Michael Aherne 8621a178a1 MDL-50490 cron: Prevent tasks from leaving uncommitted transactions 2015-07-16 11:43:35 +01:00
Dan Poltawski 7fa73576b5 weekly release 2.9.1+ 2015-07-16 08:16:21 +01:00
Juan Leyva fc0103cc80 MDL-50816 notes: Delete never met condition code 2015-07-15 15:27:33 +02:00
Eric Merrill 141ce827df MDL-50833 report: Still make a chart if there are no logs 2015-07-15 09:13:58 -04:00
Barry Oosthuizen a00cff0291 MDL-47230 mod_book: Sub chapter bullet formatting 2015-07-15 09:35:56 +01:00
Marina Glancy c82ce1017b MDL-50678 mod_glossary: removed extra login check 2015-07-15 14:19:26 +08:00
Dan Poltawski 9d5e9a3d4d Merge branch 'MDL-37832-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-07-14 10:14:13 +01:00
Dan Poltawski 30ce935ea8 Merge branch 'MDL-50814-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-07-14 08:55:07 +01:00
Mary Evans e842d0538d MDL-37832 theme: Improved "My Moodle" expandable/collapsible caption. 2015-07-14 08:53:31 +01:00
Marina Glancy 12b24e0893 MDL-50612 grades: remove gradepass if there is no grading 2015-07-14 13:15:08 +08:00
Pierre GUINOISEAU 82860ddf9a MDL-50612 grades: do not remove grade box if gradepass field exists 2015-07-14 13:15:08 +08:00
Dan Poltawski 4d12cb69e4 Merge branch 'MDL-50711_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-07-13 16:14:17 +01:00
Dan Poltawski 3721921799 Merge branch 'MDL-50799-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-13 16:08:20 +01:00
Damyon Wiese 60b6746994 MDL-50784 ajax: Require a sesskey for all ajax requests.
This needs to be done before we can expose any webservices that
change state, or return private info to ajax (to prevent CSRF).

Currently there are no webservices exposed to ajax that meet these
criteria - so this issue is to prevent future security issues.
2015-07-13 16:49:04 +02:00
Juan Leyva d1c463d65e MDL-50814 badges: Fix incorrect default ordering 2015-07-13 15:09:59 +02:00
Dan Poltawski 2f238bcf59 Merge branch 'MDL-50806-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-13 13:45:58 +01:00
Dan Poltawski 34ab3eea77 Merge branch 'MDL-50798-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-07-13 13:35:31 +01:00
Dan Poltawski 9908ce7f04 Merge branch 'MDL29-50800' of https://github.com/dkleto/moodle into MOODLE_29_STABLE 2015-07-13 13:27:39 +01:00
Dan Poltawski 6066cb4f1d Merge branch 'm29_MDL-49647' of https://github.com/danmarsden/moodle into MOODLE_29_STABLE 2015-07-13 10:05:26 +01:00
Paul Nicholls 2d858fb001 MDL-43709 Forum: Reset forums not working with multiple forum types
The SQL being generated from the selected forum types on the course reset
form was using AND, resulting in never matching anything if more than one
forum type was selected for resetting (as each forum can only have one
type).  This should use $DB->get_in_or_equal() to generate sensible SQL.
2015-07-13 16:18:49 +12:00
Adam Riddell 5ca31b1621 MDL-50800 question: Add missing make_answer method
question/type/calculatedmulti/questiontype.php:
        - Add public make_answer method so that apply_attempt_state
          method in qtype_multichoice_base does not cause a fatal
          error when attempting to call make_answer.
2015-07-13 09:45:32 +10:00
Mary Evans bba5f72513 MDL-50711 theme_bootstrapbase: Added inverse horizontal divider colors. 2015-07-12 02:54:28 +01:00
Eloy Lafuente (stronk7) c736b82694 weekly release 2.9.1+ 2015-07-10 18:11:30 +02:00
Eric Merrill 9aa4a14744 MDL-50806 questions: Allow more memory when doing a question import 2015-07-09 12:46:41 -04:00
Dan Marsden 1a4957d59d MDL-49647 mod_scorm: correct escaping of javascript content. 2015-07-09 16:57:36 +12:00
Eric Merrill a47e912d14 MDL-50799 question: Improve Show all text to be more accurate 2015-07-08 22:03:11 -04:00
Marina Glancy eed580748c MDL-49618 forum: apply format_string 2015-07-09 08:02:52 +08:00
Eric Merrill f39d3f94b8 MDL-50798 question: Raise time limit when rendering questions
Rendering a large number of questions may be quite slow, so we want to
raise the limit.

We don’t call raise() in the loop because the quiz buffer captures this
function for a AJAX script, and we should only call raise if we expect
a corresponding output to the users browser. This helps to prevent
unexpected load balancer disconnects. See core_php_time_limit::raise()
for more details.
2015-07-08 15:49:48 -04:00
Eloy Lafuente (stronk7) a09d176ea9 Merge branch 'MDL-50489-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-07-07 19:13:08 +02:00
Eloy Lafuente (stronk7) f9f4fe80e6 Merge branch 'MDL-49185-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-07-07 16:59:17 +02:00
Dan Poltawski 25717253d6 MDL-50466 logstore: bump version to load new task definitions 2015-07-07 15:09:24 +01:00
Dan Poltawski a3acae963d MDL-50295 output: prevent 'emoji' arrows
We need to append U+FE0E VARIATION SELECTOR-15 to the arrow to ensure
our l/rarrows are displayed as text icons, not 'emoji' icons.

See http://unicode.org/reports/tr51/#Diversity for more details of why
this changed in iOS 8.3+.
2015-07-07 14:26:54 +01:00
Michael Aherne 200ff69b41 MDL-50466 tasks: Specific minute values for log cleanup 2015-07-07 09:39:05 +01:00
Dan Poltawski 5a178ce23c MDL-50653 myprofilelib: fix stray ending dl tag
(That is outputing content, rest of function is not!)
2015-07-07 08:54:15 +01:00
Dan Poltawski cccef4ca28 Merge branch 'MDL-50653-m29' of https://github.com/bmbrands/moodle into MOODLE_29_STABLE 2015-07-07 08:54:11 +01:00
Dan Poltawski c746755c15 MDL-50749 js: add some TODOs to some small hacks 2015-07-07 08:50:40 +01:00
Dan Poltawski 564f346e12 Merge branch 'MDL-50749-29' of https://github.com/mackensen/moodle into MOODLE_29_STABLE 2015-07-07 08:50:33 +01:00
Bas Brands 2aeb97163e MDL-50653 user: forgotten closing div tag on the page
The /user/view.php was missing a closing div for the <div class="description">
causing the page grid to break on any Bootstrap 3 based theme.
2015-07-06 09:39:11 +02:00
Charles Fulton e50d52bd3a MDL-50749 course: add fake element for behat compatibility 2015-07-03 19:54:45 +00:00
Eloy Lafuente (stronk7) c948f378b9 Moodle release 2.9.1 2015-07-03 13:38:26 +02:00
Eloy Lafuente (stronk7) 9ecb4e3abd Merge branch 'MDL-50757-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-07-03 11:27:17 +02:00
Damyon Wiese 17bb213dd3 MDL-50757 upgrade: Unset config value that will never be used again 2015-07-03 16:46:01 +08:00
Adrian Greeve 3c23a2cd2e MDL-50757 gradebook: Update fix for pre 2.8 upgrades.
Moodle installations that updated before the 2.8 grade push
were being flagged for a gradebook freeze. This was resulting in
calculated grades being shown as different to how they were
displayed before the upgrade. This fix retains the original
grade value.
2015-07-03 13:16:29 +08:00
Dan Poltawski 461f479dde weekly release 2.9+ 2015-07-02 14:26:11 +01:00
Dan Poltawski 8946171eca Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-07-02 14:26:06 +01:00
Juan Leyva 54f5401149 MDL-50489 forum: Handle qanda forums in get_forum_discussions_paginated
I removed the last qanda checks in forum_user_can_see_discussion because they are not necessary and
they make the external function fail.

A user in a qanda forum can always see a discussion (he needs to see the discussion to be able to reply).
What he cannot see are the other user posts unless he has replied to the discussion once and the edition period
(usually 30 minutes) has ended.

Note also that forum_user_can_see_discussion was originally only used when displaying forums in blog format
in order to display the button show more or not, this is the reason this wasn't detected before.
2015-07-02 10:54:50 +02:00
Marina Glancy 038b33f0fd MDL-48239 grades: corrected docs url for calculation changes 2015-07-02 15:49:59 +08:00
Marina Glancy ff6fe05733 MDL-48239 grades: fix notification class 2015-07-02 15:49:56 +08:00
Adrian Greeve 9ca6dcd3ba MDL-48239 gradebook: Oracle fix for string compare.
Update to upgradelib.php where string comparisions cause
phpunit failures in Oracle.
2015-07-02 12:30:33 +08:00
Eloy Lafuente (stronk7) 7d803c4c52 Merge branch 'wip-MDL-48239-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-07-02 05:42:23 +02:00
Adrian Greeve 5ab9f04410 MDL-48239 gradebook: Change to calculated grade item min and max.
Regardless of the setting 'Min and max grades used in calculation'
Calculated grade items will always update the min and max raw grade.
2015-07-02 11:27:12 +08:00
Adrian Greeve 9b84c81dfd MDL-48239 gradebook: Unit test for upgrade function. 2015-07-02 11:27:12 +08:00
Adrian Greeve 4a6ed0cf53 MDL-48239 gradebook: Behat tests for calculated grade items. 2015-07-02 11:27:11 +08:00
Adrian Greeve c81c8a2ae8 MDL-48239 gradebook: Calculated grades maxgrade now able to be set. 2015-07-02 11:27:11 +08:00
Andrew Hancox 4d0d11b6d6 MDL-48970 groups: Fix hover description on groups overview page
If a course exists within multiple groupings then the description
should display when you mouseover any instance of it on the overview
page.
2015-07-01 21:27:40 +01:00
Rajesh Taneja e6ad444ea1 MDL-50481 behat: SingleSelect can be urlselect and should support id/name 2015-07-01 11:23:33 +08:00
David Monllao e87f4d63c3 Merge branch 'MDL-50497-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2015-07-01 08:56:08 +08:00
Juan Leyva a809a8dcce MDL-50130 users: Filter profile fields data in external functions 2015-06-30 19:51:38 +02:00
AMOS bot 6314335c49 Automatically generated installer lang files 2015-07-01 00:04:59 +08:00
Dan Poltawski 3cb39c2a04 Merge branch 'wip-mdl-50481-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-30 12:25:53 +02:00
Dan Poltawski 30e59bbc21 Merge branch 'MDL-33765_m29_offset' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-30 12:20:09 +02:00
Dan Poltawski e228ce6e04 Merge branch 'MDL-47787-m29' of https://github.com/tbannister/moodle into MOODLE_29_STABLE 2015-06-30 10:25:15 +02:00
David Monllao d2cb356582 MDL-50569 backup: Missing get_target call 2015-06-30 10:33:14 +08:00
Dan Marsden 46460a2303 MDL-50614 mod_scorm: Improve validation on currentorg 2015-06-30 10:14:12 +08:00
David Monllao 0b715c77f2 Merge branch 'MDL-50569-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-06-30 09:32:31 +08:00
Mark Nelson adb234e19d MDL-50220 mod_forum: added missing capability check 2015-06-29 18:49:21 +02:00
Eloy Lafuente (stronk7) 5656fdb9c9 Merge branch 'wip-mdl-50675-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-29 18:33:08 +02:00
Eloy Lafuente (stronk7) 5710353976 MDL-50688 lib: small cleanup + http/https coverage. 2015-06-29 17:49:41 +02:00
Petr Skoda 9580c08e9e MDL-50688 lib: fix local url validation bug
Change-Id: I350bb8c9ace5cc0403f083f728c100097be7aa7e
Reviewed-on: https://review.totaralms.com/8101
Tested-by: Jenkins Automation <jenkins@totaralms.com>
Reviewed-by: Sam Hemelryk <sam.hemelryk@totaralms.com>
Reviewed-by: Alastair Munro <alastair.munro@totaralms.com>
2015-06-29 17:49:38 +02:00
Skylar Kelty 27478ecd47 MDL-50663 blocks: Fix /my/ page when in non-user context 2015-06-29 11:34:10 +01:00
Nadav Kavalerchik a2f36ceef5 MDL-50708 SCORM: Right align menu item folder icon, when in RTL mode. 2015-06-29 15:58:13 +08:00
Frederic Massart d3e9d99ccb MDL-50569 grades: Restore as merge always ignores minmaxtouse 2015-06-29 14:25:58 +08:00
Frederic Massart a603cb5af4 MDL-50569 grades: Handle minmaxtouse in backup/restore 2015-06-29 14:25:58 +08:00
David Monllao f9b6810d4e Merge branch 'MDL-50646-29-preflang' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-06-29 13:36:27 +08:00
David Monllao 0b89c8dd85 Merge branch 'MDL-50652_29' of git://github.com/reskit/moodle into MOODLE_29_STABLE 2015-06-29 13:02:06 +08:00
Mark Nelson f521c1e769 MDL-33765 filter_glossary: fixed jshint warning 2015-06-28 21:45:44 -07:00
Martin Mastny 4ca8ff532b MDL-33765 filter_glossary: Stacking JS windows with offset 2015-06-28 21:45:44 -07:00
Martin Mastny d5720db41e MDL-33765 mod_glossary: Concept in ajax request not linking to itself 2015-06-28 21:45:44 -07:00
David Monllao b04406e697 Merge branch 'wip_MDL-50659_m29' of git://github.com/gjb2048/moodle into MOODLE_29_STABLE 2015-06-29 11:48:12 +08:00
Rajesh Taneja 064cfdff92 MDL-50675 repository_wikimedia: Fixed title varaible 2015-06-29 09:57:03 +08:00
Rajesh Taneja dfec225a37 MDL-50675 repository_wikimedia: Wikimedia is using https and not http 2015-06-29 09:57:02 +08:00
Mary Evans b4faba939d MDL-50497 theme_bootstrapbase: Divider colours look wrong when inverted 2015-06-26 22:49:54 +01:00
Gareth J Barnard 5409b5a7ec MDL-50659 themes: Regression: Drag a link makes icons move. 2015-06-26 11:43:53 +01:00
Paul Nicholls b930cd1515 MDL-50699 Lesson: "Link to next activity" empty until Lesson saved
Due to a logic bug, the "Link to next activity" dropdown was empty (only
contains the "None" option) until the Lesson had been saved.  This minor
change allows a "next activity" to be specified when initially creating
the Lesson whilst still preventing the user from choosing the Lesson as its
own next activity.
2015-06-26 15:53:31 +12:00
Tyler Bannister 8f683efff3 MDL-47787 course: Added question delete to cm delete. 2015-06-25 16:37:52 -04:00
Marc Català d68806edf9 MDL-50652 workshop: Workshop module allows duplicated ID number 2015-06-25 14:26:29 +02:00
Marina Glancy a8646c70fa MDL-49257 grades: apply freeze when restoring with contents deleting 2015-06-25 14:40:36 +08:00
David Monllao d783a8fba7 weekly release 2.9+ 2015-06-25 13:50:14 +08:00
David Monllao 147aca3043 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-06-25 13:50:12 +08:00
Rajesh Taneja 532acaf5ac MDL-50481 core_grades: Fixed behat feature and step to work with non-js
xPath used in step is not using proper oring
and fails with goutee driver. Also, feature don't
really need to be executed in js, so setting that
as non-js
2015-06-25 13:14:08 +08:00
Rajesh Taneja bc7b926591 MDL-50481 behat: Press go button for given single select in non-js
For non-js mode, ensure we press the go button
for the specified single select, as there can be
multiple single selects on the page with go button
2015-06-25 13:14:08 +08:00
Marina Glancy b3892e62a5 MDL-49257 grades: strings adjustments 2015-06-25 10:00:02 +08:00
Eloy Lafuente (stronk7) e09d38647b MDL-49022 auth_ldap: keep method visibility unmodified. 2015-06-24 03:07:21 +02:00
Eloy Lafuente (stronk7) 005ead1f8a Merge branch 'wip-mdl-49022-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-24 03:03:07 +02:00
Eloy Lafuente (stronk7) c5bc16fe8a MDL-49497 curl: keep api private and test it using reflection.
While strictly we should not be testing private APIs, in order
to get this backported to stables without changing visibility
we use reflection to access to such private properties and methods.

Also added one exttest to verify user agent is properly sent.

Finally, fix some wrong whitespace and changed the helper class name
to better alternative.
2015-06-23 16:25:53 +01:00
Dan Poltawski cdca00ca81 Merge branch 'MDL-49497-29' of git://github.com/gurgus/moodle into MOODLE_29_STABLE 2015-06-23 16:25:40 +01:00
Dan Poltawski b29b31dc12 Merge branch 'MDL-50533-29' of git://github.com/jethac/moodle into MOODLE_29_STABLE 2015-06-23 14:13:13 +01:00
Dan Poltawski 4342a37310 Merge branch 'wip-MDL-49257-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-23 11:20:28 +01:00
Rajesh Taneja 824bbbcb3f MDL-49022 auth_ldap: Updated unit test, checking sync_user events 2015-06-23 17:02:36 +08:00
Mark Ward fd954ad01b MDL-49022 auth_ldap: trigger event when required.
When calling update_user_record() for auth_ldap the method
now has option to trigger event core\event\user_updated when
syncing with domain controller.
This means that the event will be triggered by sync_users()
but not by user_signup().
2015-06-23 17:02:36 +08:00
Marina Glancy 5edd9315d1 MDL-49257 grades: behat tests for extra credit 2015-06-23 14:24:37 +08:00
Marina Glancy 9c4b068082 MDL-49257 grades: fix bugs with extra credit weights
When we adjust the weights in natural grading (setup screen), the extra credit items
should not depend on other overrides. If extra credit item's weight was overriden, it stays as it is.
Otherwise it is calculated as itemgrademax / totalgrademax (total excludes extra credit items)
2015-06-23 14:24:37 +08:00
Marina Glancy e806e2c9f7 MDL-49257 grades: introduce calculation freeze
In order to prevent changes in the existing grades when we fix bugs
we are introducing the gradebook code versioning. Each course may
"freeze" the code version to the older date. Freezing is usually done
during upgrade or restore and can be removed by the teacher by pressing
the button and accepting potential grade changes. There is no visible
setting and not possible to change the version back manually.

See MDL-50432 and MDL-50522
2015-06-23 14:24:33 +08:00
David Monllao ba0e10425f MDL-50611 testing: Extra http status code checking 2015-06-23 10:38:00 +08:00
David Monllao 0c2db45a76 Merge branch 'MDL-50611-29' of git://github.com/LukeCarrier/moodle into MOODLE_29_STABLE 2015-06-23 10:28:19 +08:00
spvickers bfebfd5b28 MDL-49185 mod_lti: Check for all capabilities
Added check for explicit and implicit enabled capabilities when parsing
a custom parameter.
2015-06-23 10:26:18 +08:00
Eloy Lafuente (stronk7) 3f33350e0d Merge branch 'MDL-50171-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-23 01:43:08 +02:00
Eloy Lafuente (stronk7) c9f8064b23 Merge branch 'MDL-50089-29' of git://github.com/merrill-oakland/moodle into MOODLE_29_STABLE 2015-06-22 19:59:14 +02:00
Eloy Lafuente (stronk7) e107f6227c Merge branch 'MDL-50583_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-06-22 19:22:48 +02:00
Eric Merrill f5273c374f MDL-50089 grades: Use grade item min/max in exports 2015-06-22 12:59:30 -04:00
Luke Carrier 0e1a2090b8 MDL-50611 test: use cURL extension to download Composer
The curl binary is nowhere near as common in Windows environments as it is
in Linux and Mac ones. In order to encourage more users to adopt Behat and
PHPUnit for their testing, we should avoid introducing unnecessary
hurdles.
2015-06-22 15:50:46 +01:00
Dan Poltawski 1ee0876d3d Merge branch 'MDL-50460_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-06-22 13:29:12 +01:00
Dan Poltawski a6640dcbe5 Merge branch 'MDL-50091_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-06-22 12:06:50 +01:00
David Monllao 73441dca38 Merge branch 'MDL-50622-29-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-06-22 17:44:31 +08:00
David Monllao f8cc4ea4a1 Merge branch 'MDL-50561-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-22 16:04:10 +08:00
David Monllao 9d1d7caafd Merge branch 'wip-MDL-50568-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-22 15:33:28 +08:00
David Monllao d88fa5e681 Merge branch 'wip-MDL-50580-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-22 12:50:29 +08:00
Tim Hunt 76ef7726e2 MDL-50648 grader report: columns misaligned with some permissions
If a user can see the grader report and singleview report, but not
the user report ($CFG->grade_profilereport) then the colspans
were wrong and so the columns did not line up under the right headers.
2015-06-19 12:37:24 +01:00
David Mudrák 5ac3194c6f MDL-50646 admin: Use site default lang as new user's preferred lang
As a result of MDL-49632, the preferred language is no longer part of
the "Add a new user" form. So the lang property is not passed to the
user_create_user() when creating a new user and the value always falls
back to "en" (which is the default defined in the database for this
column).

This patch makes sure that the site default language is used in such
case.
2015-06-19 13:17:52 +02:00
Helen Foster 497e490a6b MDL-50622 lang: Merge English strings from the en_fix language pack 2015-06-19 12:13:48 +02:00
Juan Leyva 5b41ec52f7 MDL-50561 messages: Add missing __isset magic method 2015-06-19 09:44:59 +02:00
Juan Leyva 45ced3d17d MDL-50171 data: Fixed incorrect text formatting in external functions 2015-06-19 09:44:07 +02:00
Mary Evans 200e4da537 MDL-50460 theme_bootstrapbase: Profile image overlays docked blocks. 2015-06-19 02:50:38 +01:00
AMOS bot 11189884a8 Automatically generated installer lang files 2015-06-19 00:04:11 +08:00
Dan Poltawski ca587e8819 weekly release 2.9+ 2015-06-18 14:03:11 +01:00
Dan Poltawski bffd9c6ad2 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-06-18 14:03:09 +01:00
Skylar Kelty dc4e443256 MDL-50637 calendar: Fix subscription table layout 2015-06-18 13:23:27 +01:00
Tim Hunt 0aa98ebda1 MDL-50091 grade singleview: use standard API to build the link
Acutally the necessary code was already there. There was just some
unnecessary code that was added with the issue number MDL-47746. I have
just stripped out the unused code, which fixes the bug where a missing
activity caused a fatal error.
2015-06-17 13:56:31 +01:00
Eloy Lafuente (stronk7) 78c315db76 Merge branch 'MDL-50004-M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-06-17 00:59:05 +02:00
Eloy Lafuente (stronk7) 8ceecd98a8 Merge branch 'MDL-50107-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-17 00:16:34 +02:00
AMOS bot 775f5d6a9f Automatically generated installer lang files 2015-06-17 00:04:02 +08:00
AMOS bot 99f4c550f2 Automatically generated installer lang files 2015-06-17 00:04:02 +08:00
Dan Poltawski f102573e45 Merge branch 'MDL-49959_course_dnd_message_MDL29' of https://github.com/barrysspace/moodle into MOODLE_29_STABLE 2015-06-16 13:08:40 +01:00
Martin Mastny b848eeacc8 MDL-49744 JavaScript: Glossary term window is draggable 2015-06-16 10:19:23 +01:00
Jetha Chan c74f2c3e70 MDL-50533 theme_bootstrapbase: retarget collapse styles 2015-06-16 16:29:12 +08:00
Andrew Nicols 95554b45b6 Merge branch 'wip-MDL-50216-29' of git://github.com/abgreeve/moodle into MOODLE_29_STABLE 2015-06-16 12:22:28 +08:00
Andrew Nicols 2bea2a1918 MDL-39353 xmlrpc: Add note to upgrde.txt regarding proxybypass 2015-06-16 11:34:21 +08:00
Andrew Nicols f934fdf46c Merge branch 'MDL-39353-29' of https://github.com/rtcn2/moodle into MOODLE_29_STABLE 2015-06-16 11:33:16 +08:00
Martin Mastny 7d1d36e036 MDL-50216 JavaScript: Default visibility of M.core.info set to false 2015-06-16 11:20:51 +08:00
Andrew Nicols ca4c8b1942 Merge branch 'MDL-50380-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-06-16 07:58:16 +08:00
Dan Poltawski d0a5d336f7 Merge branch 'MDL-49368_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-06-15 12:33:30 +01:00
Marina Glancy 893d5e69a0 MDL-50580 signup: move recaptcha outside of category 2015-06-15 17:14:59 +08:00
Andrew Nicols f74ae05201 Merge branch 'MDL-50459-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-06-15 16:03:38 +08:00
Andrew Nicols 14e7f3c3b7 Merge branch 'wip-MDL-50222-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-06-15 15:17:04 +08:00
GeekSmith 7c6d8dd8e0 MDL-50583 upgrade: Optimize upgrade_minmaxgrade
Reverse join order to use existing database keys. Changed query to use the
more easily read NOT IN.
2015-06-15 10:39:26 +08:00
Andrew Nicols e82c2eb2b1 Merge branch 'MDL-50438-29' of git://github.com/mastnym/moodle into MOODLE_29_STABLE 2015-06-15 10:21:13 +08:00
Andrew Nicols 87cd84ddb7 Merge branch 'MDL-50509-29-vartypo' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-06-15 09:59:25 +08:00
Andrew Nicols 531908df75 MDL-50554 themes: Rebuild of bootstrapbase 2015-06-15 09:46:29 +08:00
Andrew Nicols ced7d04d07 Merge branch 'MDL-50520-29' of git://github.com/jethac/moodle into MOODLE_29_STABLE 2015-06-15 09:26:36 +08:00
Mary Evans d16724b42b MDL-50004 theme: Fixes frontpage coursename and enrolment icons. 2015-06-15 00:25:56 +01:00
Gareth J Barnard e0a114e4f5 MDL-50554 themes: Drag a link move mouse makes icons move in Chrome. 2015-06-14 21:40:16 +01:00
Dan Poltawski 0d7f387b37 weekly release 2.9+ 2015-06-12 10:24:43 +01:00
Dan Poltawski b8e8cbf3bb Merge branch 'MDL-48618_29-test-calculated' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-06-12 10:19:31 +01:00
Eloy Lafuente (stronk7) 887d0618cc MDL-50176 repository_youtube: delay loading google service stuff
Loading Google client services is a little monster, eating around
2MB (opcache enabled) of memory. As far as we instantiate the
repository instances really early, no matter they are not used
later (editor, file picker, admin...).. we are delaying the
load of the service until we know we are going to use it.

Surely applying this very same (sort of lazy load) techinque
to other repositories could lead to a nice memory reduction
in lots of pages.

MDL-50176 repository_youtube: also delay the inclusion of client.

While memory was fixed with previous commit, still some extra included
files where being reported, so go crazy and move all the stuff to
the new init delayed method.
2015-06-12 10:29:03 +02:00
David Monllao ab4665046a MDL-48618 grades: Testing calculated items with minmaxtouse 2015-06-12 14:06:18 +08:00
Marina Glancy 72e0a56673 MDL-50568 navigation: correct cap check 2015-06-12 10:48:08 +08:00
Frederic Massart eaf0d255b4 MDL-48618 grades: Do not run minmax upgrade for fresh installs 2015-06-11 17:16:40 +08:00
Rajesh Taneja ebae161cdf MDL-49659 theme_clean: Add login info in the nav bar 2015-06-11 10:00:30 +01:00
David Monllao 691c2913bb MDL-48618 upgrade: Matching conditions and upgrade savepoints 2015-06-11 15:03:19 +08:00
David Monllao fce1153108 MDL-48618 grades: Forcing new upgrade savepoint 2015-06-11 14:34:25 +08:00
David Monllao 2817ff06ae Merge branch 'MDL-48618-29' of git://github.com/FMCorz/moodle into MOODLE_29_STABLE 2015-06-11 14:22:27 +08:00
Juan Leyva 61c8747a39 MDL-50107 webservices: Enable CORS in login/token.php 2015-06-10 11:36:28 +02:00
Rod Norfor 6e0401d61f MDL-39353 xmlrpc: Add proxy support 2015-06-10 08:19:39 +01:00
Frederic Massart 3391ece9f8 MDL-48618 grades: Test for the minmax upgrade step 2015-06-10 12:42:57 +08:00
Frederic Massart 6be25bc988 MDL-48618 grades: Behat tests to cover min/max grade changes
The values provided as part of this test are similar to values
that can be found in 2.7. This is to ensure that users will not
experience changes in grades.
2015-06-10 12:42:57 +08:00
Frederic Massart 3eb9b4a316 MDL-48618 grades: Unit tests for grade_grade::get_min/max_grade() 2015-06-10 12:42:56 +08:00
Frederic Massart f872eef1e9 MDL-48618 grades: Handling of inconsistencies due to min/max grades 2015-06-10 12:42:54 +08:00
Eric Merrill 0624b774d0 MDL-48618 gradebook: Only use individual min/max for aggrigate grades 2015-06-10 12:37:09 +08:00
Eloy Lafuente (stronk7) 3783dde956 Merge branch 'MDL-47480-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-06-10 00:33:20 +02:00
Eloy Lafuente (stronk7) 98a8ef2777 Merge branch 'MDL-50145_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-09 20:43:01 +02:00
Eloy Lafuente (stronk7) e3cd190100 Merge branch 'm29_MDL-50415_Add_PHP_Variables_In_PHPInfo_Admin_Page' of https://github.com/scara/moodle into MOODLE_29_STABLE 2015-06-09 20:37:19 +02:00
Eloy Lafuente (stronk7) 9b1539c5d6 Merge branch 'wip-mdl-50179-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-06-09 20:33:04 +02:00
Eloy Lafuente (stronk7) d4990e4c94 Merge branch 'MDL-50176_29' of git://github.com/aolley/moodle into MOODLE_29_STABLE
Fixed the plugin version to have sticky YYYYMMDD
2015-06-09 20:17:45 +02:00
Ramindu Deshapriya 99422f333b MDL-43731 mod_book: Added Behat test to automate MDLQA-1791 2015-06-09 15:01:31 +01:00
Dan Poltawski 128a866390 Merge branch 'MDL-49659_M29' of git://github.com/lazydaisy/moodle into MOODLE_29_STABLE 2015-06-09 14:42:04 +01:00
Marina Glancy 1187ce03ec MDL-50222 admin: do not use deprecated print_textarea() 2015-06-09 20:58:32 +08:00
Andrew Davis 8f1d67ea09 MDL-49885 core_blocks: fixed course_overview block applicable_formats() 2015-06-09 13:57:44 +01:00
Martin Mastny 97c9eaefa8 MDL-50186 forms: Removed special characters from id attribute 2015-06-09 13:32:59 +01:00
Mark Nelson ca0042ca80 MDL-50145 mod_lesson: added behat test for multiple dashboard lessons 2015-06-09 00:49:19 -07:00
Mark Nelson bc10960447 MDL-50145 mod_lesson: fixed issue with duplicate values 2015-06-09 00:49:18 -07:00
Jetha Chan 7d0bdbe264 MDL-50520 templates: fix helpers not firing inside pix helper 2015-06-09 15:23:43 +08:00
Rajesh Taneja 4c07dea461 MDL-50179 lesson: Get student/attempts only when showing overview 2015-06-09 09:35:02 +08:00
Rajesh Taneja b09e7b4c7d MDL-50179 behat: Use %d for windows compatibility 2015-06-09 09:34:52 +08:00
Eloy Lafuente (stronk7) c0be92c749 Merge branch 'MDL-50394_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-08 18:40:38 +02:00
Eloy Lafuente (stronk7) ee4c6f78c6 Merge branch 'MDL-50408_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-06-08 15:49:16 +02:00
Juan Leyva e003e65ea8 MDL-50459 messages: Handle deleted users in external functions 2015-06-08 14:38:43 +02:00
David Mudrák b25bb3cf29 MDL-50509 datalib: Fix the typo in the variable name
The line is supposed to sanitize the function parameter.
2015-06-08 11:16:39 +02:00
Dave Cooper 5d8cfda315 MDL-49497 curl: Add configurable User-Agent unit tests. 2015-06-08 17:02:54 +08:00
Dave Cooper 1f2fbac207 MDL-49497 curl: Allow configurable User-Agent.
Thanks to Kartik Yadav for assistance with this patch.
2015-06-08 17:02:54 +08:00
Barry Oosthuizen 7955318e45 MDL-49959 course: Fix hidden drag and drop message 2015-06-08 09:35:59 +01:00
David Monllao 2799e8f70e MDL-50408 tool_log: Extra deprecation tip
Adding a debugging message and returning alternative data to keep backwards
compatibility as get_readers is a widely used function.
2015-06-08 15:57:41 +08:00
Eloy Lafuente (stronk7) 69ece23a48 Merge branch 'MDL-50456-29' of git://github.com/damyon/moodle into MOODLE_29_STABLE 2015-06-07 21:56:37 +02:00
Juan Leyva 1eb297becf MDL-50493 forum: Handle correctly qanda forums in get_discussion_posts 2015-06-06 00:01:34 +02:00
Mary Evans a81d590726 MDL-49659 theme: Removed home link and limited login info in secure.php
Credits: Thanks go to Andreas Hruska [https://github.com/ahruska] for the original patch for this issue.
2015-06-04 17:45:51 +01:00
Eloy Lafuente (stronk7) c3661ca0cc weekly release 2.9+ 2015-06-04 12:09:15 +02:00
Eloy Lafuente (stronk7) 5be5d4d2c9 Merge branch 'install_29_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_29_STABLE 2015-06-04 12:09:10 +02:00
Rajesh Taneja 629f298ce7 MDL-47995 lib: encode title properly, before additing it to image title 2015-06-04 12:56:20 +08:00
Matteo Scaramuccia 8172729a07 MDL-50415 Admin: added the PHP Variables section in the PHPinfo page. 2015-06-03 21:19:07 +02:00
Eloy Lafuente (stronk7) 78285d5c9c Merge branch 'MDL-47995-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-06-03 11:10:57 +02:00
Simey Lameze 1fab00298d MDL-50380 mod_wiki: fix missing parameter on wiki edit files page
Also fixing a typo on the $referer variable.
2015-06-03 16:46:25 +08:00
Damyon Wiese e27f30b7c8 MDL-50456 Javascript: Fix simple logic error in core/url amd module 2015-06-03 15:59:53 +08:00
Mark Nelson 3af357dd2c MDL-50394 core_course: fixed form validation of 'gradepass' 2015-06-03 00:36:13 -07:00
Dan Poltawski c5e83ccab0 Merge branch 'MDL-49323-29' of git://github.com/nmoller/moodle into MOODLE_29_STABLE 2015-06-02 13:23:29 +01:00
Dan Poltawski ea20d927ad Merge branch 'MDL-46927_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-02 09:03:53 +01:00
Martin Mastny 6964dc6e73 MDL-50438 filter_glossary: Added missing exception classes 2015-06-02 14:22:43 +08:00
Mark Nelson 80f8e00bd7 MDL-46927 core_files: fixed issue with system course restores
When clicking on 'Restore' next to a file in the 'Course
backup area' in the system context the message 'Sorry,
the requested file could not be found' was displayed.
This fix adds missing functionality to the class
'file_info_context_system' so that the file information
is correctly returned.
2015-06-01 23:09:17 -07:00
Ankit Agarwal 53f0b8ae3c MDL-47480 tasks: Define order for getting tasks 2015-06-02 08:18:42 +05:30
AMOS bot 377ec4c107 Automatically generated installer lang files 2015-06-02 00:04:16 +08:00
Nelson Moller 659c60614b MDL-49323 mod_assign: Fixed numeric validation in grade form.
The behat test for another decimal separator was incorporated.
2015-06-01 11:00:12 -04:00
Dan Poltawski f0a7bbcd14 Merge branch 'MDL-50341_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-06-01 15:03:42 +01:00
Dan Poltawski 3372a99e13 MDL-50322 forum: add basic split post behat coverage
Also bump version for autoloading new class.
2015-06-01 14:59:41 +01:00
Martin Mastny 6f7bf269b2 MDL-50322 mod_forum: Added validation when spliting discussions 2015-06-01 14:56:31 +01:00
Dan Poltawski a48f97d414 Merge branch 'MDL-50304_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2015-06-01 13:21:55 +01:00
Dan Poltawski 8f4a31ce65 MDL-50406 less: build css 2015-06-01 12:01:07 +01:00
Dan Poltawski 4f27bea28b Merge branch 'MDL-50406_M29' of git://github.com/nadavkav/moodle into MOODLE_29_STABLE 2015-06-01 11:42:23 +01:00
Dan Poltawski caaf4113ce Merge branch 'MDL-50309_m29' of git://github.com/markn86/moodle into MOODLE_29_STABLE 2015-06-01 10:26:50 +01:00
Dan Poltawski 5ed79f4e97 Merge branch 'MDL-49707-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-06-01 10:19:37 +01:00
Ankit Agarwal 1f797413d4 MDL-49707 inbound: localpart should be < 15 2015-06-01 10:10:39 +05:30
Adam Olley 28e427c0f9 MDL-50176 repository_youtube: Switch to using YouTube Data API
As of April 20, 2015, the old API used by repository_youtube is no longer
accessible. This change switches over to using the standard Google Data
API v3.

Unfortunately this means that to search YouTube, a developer api key is now
*required*.

Special thanks to UNSW for sponsoring this work.
2015-06-01 09:40:14 +09:30
Tim Hunt 71b448e27d MDL-50341 quiz statistics: non-attempted questions broke first-try stats
For behaviours that allow multiple tries, and when the teacher had chosen to
generate statistics for the first tries only, and when a student had not
attempted one question, then an error occurred. It should have been classified
as no response.
2015-05-31 13:53:08 +01:00
AMOS bot 47596be087 Automatically generated installer lang files 2015-05-31 00:03:58 +08:00
Nadav Kavalerchik 199fbeb647 MDL-50406 Messages: Right align messages menu box, in RTL mode. 2015-05-30 12:13:16 +03:00
AMOS bot 8389e416a4 Automatically generated installer lang files 2015-05-30 00:04:06 +08:00
AMOS bot 3143816be1 Automatically generated installer lang files 2015-05-29 00:03:59 +08:00
jinhofer 5a561e90c3 MDL-50304 atto/plugins/table: Fixed _addRowAfter function 2015-05-28 07:55:26 -05:00
AMOS bot 314eb4342c Automatically generated installer lang files 2015-05-28 14:21:58 +08:00
Mark Nelson b73491b280 MDL-50309 core_upgrade: fixed undefined '$customusermenuitems' notice 2015-05-27 22:43:25 -07:00
David Monllao d91491569c weekly release 2.9+ 2015-05-28 10:55:09 +08:00
David Monllao a38b6660e4 Merge branch 'MDL-50373_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-05-28 09:28:10 +08:00
Tim Hunt 18dd4e5d9b MDL-50373 questions: random Qs must not pick deleted or sub- questions
This was a regression caused by MDL-6340. I missed the necessary
    AND parent = 0 AND hidden = 0
in one query of the question table.
2015-05-27 20:35:24 +01:00
Eloy Lafuente (stronk7) 3d944b0454 Merge branch 'wip-mdl-49806-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-27 12:36:49 +02:00
David Monllao a8b977172a MDL-50330 blog: Make other users blogs accessible 2015-05-27 14:10:20 +08:00
David Monllao deb125fa6d Merge branch 'MDL-50340-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-05-27 11:58:41 +08:00
Rajesh Taneja 1cb3091780 MDL-49772 behat: Removed optimization as it's not required
This api is called very few times in behat
initilisation process, so such optimization
is an over engineer. Hence removing it.
2015-05-27 11:51:34 +08:00
Rajesh Taneja 3ac8f0c5e3 MDL-49806 behat: Ensure user is marked complete before runnning cron 2015-05-27 09:25:47 +08:00
Aaron Barnes 7ee737690a MDL-49611 completion: Update dangling err_nocriteria lang strings 2015-05-27 08:49:46 +08:00
Eloy Lafuente (stronk7) e600df800c Merge branch 'wip-mdl-49772-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-27 01:45:50 +02:00
Eloy Lafuente (stronk7) b77a45c3a2 Merge branch 'wip-MDL-50191-m29' of https://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-05-26 18:19:49 +02:00
Dan Poltawski 0e0e83abdf Merge branch 'MDL-50318-29-courseresources' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-26 13:05:06 +01:00
Dan Poltawski 777f822fad Merge branch 'MDL-49787_email_attachments_symlink_fix_29' of https://github.com/iamandrew/moodle into MOODLE_29_STABLE 2015-05-26 12:56:31 +01:00
Dan Poltawski a694acd9b8 Merge branch 'MDL-49776-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-05-26 11:53:46 +01:00
Marina Glancy 0676b9c186 MDL-49560 webservice: avoid recursion in soap
Thanks to El Leonidych for providing a patch
2015-05-26 11:33:42 +01:00
Dan Poltawski 5c5fb8bd8f Merge branch 'MDL-50271-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE 2015-05-26 11:31:48 +01:00
David Monllao cdd1fcbf45 Merge branch 'MDL-50344-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-05-26 17:29:38 +08:00
Jetha Chan 55cf90e9db MDL-48664 output: change paging_bar to not use non-breaking spaces 2015-05-26 14:46:12 +08:00
Ankit Agarwal f59d6a6fcf MDL-50340 adminstration: Fix restore course links 2015-05-26 12:04:41 +05:30
David Monllao ad9131d75d Merge branch 'MDL-46550-29' of git://github.com/ankitagarwal/moodle into MOODLE_29_STABLE 2015-05-26 12:29:17 +08:00
David Monllao 6e54261fe8 Merge branch 'MDL-50289-29-notes' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-26 12:23:34 +08:00
Dan Poltawski fdfea113b5 Merge branch 'MDL-50313-29-featureidnumber' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-25 13:54:06 +01:00
Dan Poltawski 267238bac4 Merge branch 'MDL-50321-29-modupgradetxt' of git://github.com/mudrd8mz/moodle into MOODLE_29_STABLE 2015-05-25 12:30:34 +01:00
Nadav Kavalerchik 83a061c8e8 MDL-40592 assign/grading: Display default user picture, if none is set. 2015-05-25 12:28:49 +01:00
Martin Mastny e1cd01e60e MDL-49493 backup: Implemented missing methods for anonymous backup 2015-05-25 12:02:02 +01:00
David Mudrák 32eb50d49b MDL-50289 notes: No navigation to notes if the feature is disabled 2015-05-25 12:36:10 +02:00
David Monllao c3b65cc9e9 Merge branch 'wip-MDL-49572-m29' of git://github.com/marinaglancy/moodle into MOODLE_29_STABLE 2015-05-25 17:54:31 +08:00
Damien Bezborodov 544a4f57ec MDL-50285 gradereport_user: Grade categories calculate wrong with suspended users (Student's view) 2015-05-25 17:44:09 +08:00
Ankit Agarwal 44ad175eda MDL-50344 restore: Make restore file required 2015-05-25 12:08:51 +05:30
spvickers 628bee355e MDL-49776 mod_lti: Set parameter in privacy check
Moved sending of the lis_result_sourcedid parameter to within the block
which checks that grades are being accepted for the link.
2015-05-25 13:02:11 +08:00
iclearn fcd6880e1e MDL-47995 mod_url: add proper title encoding on url mod 2015-05-25 12:55:22 +08:00
iclearn 159a8fda78 MDL-47995 mod_resource: properly encode resource title 2015-05-25 12:55:22 +08:00
Juan Leyva ecdadf2a18 MDL-50271 webservices: Allow to load multiple themes in WS_SERVER mode 2015-05-22 13:27:14 +02:00
Adrian Greeve c1813cf5d9 MDL-50330 blog: Behat test for blog visibility. 2015-05-22 16:15:59 +08:00
Adrian Greeve ed97ad100b MDL-50330 blog: Fixed fatal error accessing blogs. 2015-05-22 16:15:46 +08:00
Tim Hunt 609e3cfc0b MDL-49368 qtypes match & multichice: cope with editing after attempt
Teachers should not radically edit a question after it has been
attempted. However, if they do, we should handle it gracefully, rather
than triggering PHP errors.
2015-05-21 18:17:40 +01:00
David Mudrák f2a6afba21 MDL-50321 docs: Add info about deprecated method into mod/upgrade.txt
This was forgotten in MDL-49101.
2015-05-21 18:03:26 +02:00
David Mudrák 60fa8157f2 MDL-50318 course: Fix the URL of embedded images at resources overview
Not only mod_resource instances are listed here. All modules that
declare their FEATURE_MOD_ARCHETYPE as MOD_ARCHETYPE_RESOURCE (well, all
but those without own view page, such as mod_label) are listed. So we
must use the real plugin name when rendering the intro field.
2015-05-21 17:22:42 +02:00
David Mudrák 723f9b73eb MDL-50313 docs: Fix the documentation for the FEATURE_IDNUMBER constant
The constant is used by course/moodleform_mod.php to decide whether the
field 'ID number' (cmidnumber) should be included in the common module
settings section of the activity settings form. Activity modules that do
not use grades (such as the Label) can explicitly return false when
checking for this feature support. By default, all activity modules are
supposed to support it.
2015-05-21 16:51:31 +02:00
Eloy Lafuente (stronk7) 4cf3969700 weekly release 2.9+ 2015-05-21 12:37:27 +02:00
Rajesh Taneja 73cc1d04c9 MDL-49772 behat: Added support to updatestep file by parallel run 2015-05-21 14:46:13 +08:00
Marina Glancy bd13927c47 MDL-50191 cohorts: check manage cap to display hide icon 2015-05-21 11:11:42 +08:00
Andrew Nicols 198c3fb3f0 MDL-50277 Javascript: Hardcode nodejs dependencies
In order to produce a consistent build across the board, we must hardcode
several package versions. We must additionally specify compatible
versions for any sub-dependency that we have a requirement upon.

In this instance, the only sub-dependency which has an effect upon the
overall output is grunt-contrib-uglify's dependency upon uglify-js.

Since change in uglify-js may lead to changes in the generated output, we
must specify a fixed version of that dependency. That version must be
compatible with the dependency signature for grunt-contrib-uglify or the
dependency manager will just download a different version.

This issue also bumps the version of uglify-js to a version which changes
the output. This is the latest version at time of commit.
2015-05-20 11:09:25 +02:00
Marina Glancy 690725416b MDL-49572 cache: correctly purge cache on event 2015-05-20 14:07:11 +08:00
Rajesh Taneja 058b07958b MDL-49061 behat: Fixed input name to use full activity name 2015-05-20 10:18:53 +08:00
Eloy Lafuente (stronk7) d5307d89e3 Merge branch 'wip-mdl-50259-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-19 18:02:43 +02:00
Marina Glancy d5df44623f MDL-49061 reports: call format_string on activities names 2015-05-19 15:00:46 +01:00
Dan Poltawski dfa7e964c5 Merge branch 'wip-mdl-50203-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-19 12:38:58 +01:00
Ankit Agarwal 7c964c9fac MDL-50276 forums: Add a new line in forum emails 2015-05-19 15:47:02 +08:00
Dan Poltawski d014bdea09 Merge branch 'wip-mdl-50116-m29' of https://github.com/rajeshtaneja/moodle into MOODLE_29_STABLE 2015-05-19 08:27:56 +01:00
Rajesh Taneja 5c57e2ad47 MDL-50259 behat: Use strict activity name checking
contains might select wrong activity
so using strict activity text checking
2015-05-19 14:47:24 +08:00
Rajesh Taneja 7e41013038 MDL-50116 behat: Fixed xpath for selecting table row 2015-05-19 13:36:07 +08:00
Skylar Kelty 35a0d15031 MDL-50169: Fix grade report SQL logic 2015-05-19 02:03:30 +02:00
Eloy Lafuente (stronk7) aff87a12e2 Merge branch 'MDL-50280_29' of https://github.com/sk-unikent/moodle into MOODLE_29_STABLE 2015-05-19 01:43:13 +02:00
Eric Merrill 954626a2b9 MDL-48467 atto: Clean the textarea during submission when in HTML mode 2015-05-19 01:38:29 +02:00
Eloy Lafuente (stronk7) 41c398aa5c Merge branch 'MDL-50197_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-05-19 00:35:40 +02:00
Eloy Lafuente (stronk7) 0809c38938 Merge branch 'MDL-50245_29' of git://github.com/timhunt/moodle into MOODLE_29_STABLE 2015-05-19 00:33:15 +02:00
Skylar Kelty 69afba56e6 MDL-50280 WebCT import scripts don't always clean up 2015-05-18 16:47:25 +01:00
Martin Mastny 44be211cb2 MDL-49949 grader: Using method to determine item name 2015-05-18 15:34:06 +01:00
Dan Poltawski 3dd7be272f Merge branch 'MDL-49764_29' of https://github.com/jinhofer/moodle into MOODLE_29_STABLE 2015-05-18 15:28:59 +01:00
Dan Poltawski ea3f6e2b75 Merge branch 'MDL-49906-29' of git://github.com/lameze/moodle into MOODLE_29_STABLE 2015-05-18 14:04:12 +01:00
Dan Poltawski 22d4ded11f Merge branch 'MDL-50092_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-05-18 13:58:21 +01:00
jinhofer 0161f4f957 MDL-49764 grade/report/grader: Fixed height issue for IE 2015-05-18 07:48:43 -05:00
Damyon Wiese 383aa049c0 MDL-50254 Mustache: Missing alias for namespaced class in mustache
Thanks to Francesco Bigiarini for the report and suggested fix.
2015-05-18 13:09:54 +01:00
Dan Poltawski 3257b829a8 Merge branch 'MDL-50177_29' of git://github.com/dmonllao/moodle into MOODLE_29_STABLE 2015-05-18 13:03:25 +01:00
Andrew Davidson 38a659dc10 MDL-49787 email: Updated email attachement path check to use realpath() in order to allow for symlinked temp directories 2015-05-18 12:03:40 +01:00
Ankit Agarwal 356c4ae63e MDL-46550 logs: Fix incorrect url
Thanks to Nadav Kavalerchik for the suggestion on patch
2015-05-18 12:02:48 +05:30
Adrian Greeve 3f87e8e54b MDL-49742 lib: Removed additional names on tables for sorting.
When additional names are disabled, they are no longer shown as
sortable headings in the enrolment and admin user tables.
2015-05-15 15:45:04 +08:00
Rajesh Taneja 859aac85c4 MDL-50116 behat: updated symfony/symfony version 2015-05-15 10:10:13 +08:00
Tim Hunt 55f468ff62 MDL-50245 quiz: fix CSS of search options in the qbank dialogue 2015-05-14 14:41:14 +01:00
David Monllao 2138e7eddc weekly release 2.9+ 2015-05-14 11:34:32 +08:00
Rajesh Taneja f47d844c68 MDL-50203 behat: Click on link in student 1 row 2015-05-13 15:21:00 +08:00
Simey Lameze f007447294 MDL-49906 core_user: add require login exception message 2015-05-13 13:54:48 +08:00
Damyon Wiese 4590d1be1e MDL-25138 core_tags: remove duplicated related tags 2015-05-13 10:25:17 +08:00
Simey Lameze a236699367 MDL-25138 core_tag: fix correlated tags query unique error 2015-05-13 10:25:11 +08:00
David Monllao f461827532 MDL-50187 docs: Including all x.y releases 2015-05-12 09:51:55 +02:00
David Monllao 406af5521c MDL-50177 completion: Also accepting cm integer strings 2015-05-12 12:21:39 +08:00
David Monllao a229c2fb0f Merge branch 'MDL-34102' of git://github.com/jmvedrine/moodle into MOODLE_29_STABLE 2015-05-12 12:09:06 +08:00
Eloy Lafuente (stronk7) 057cf60bd7 MDL-50183 upgrade: add 2.9.0 separation line to all upgrade scripts 2015-05-12 00:23:59 +02:00
Tim Hunt cd3cd9ffc3 MDL-50197 quiz editing: fix dialogue titles at the end of the quiz 2015-05-11 17:21:02 +01:00
David Monllao 5e236840b0 MDL-50092 enrol_imsenterprise: Fixing wrong field name
Thanks to JD for the fix.
2015-05-11 14:55:22 +08:00
3731 changed files with 162340 additions and 336141 deletions
+4
View File
@@ -0,0 +1,4 @@
**/yui/build/** -diff
**/amd/build/** -diff
theme/bootstrapbase/style/editor.css -diff
theme/bootstrapbase/style/moodle.css -diff
+1 -2
View File
@@ -35,8 +35,7 @@
"plusplus": false,
"predef": [
"M",
"define",
"require"
"define"
],
"proto": false,
"regexdash": false,
+10 -41
View File
@@ -12,16 +12,11 @@ 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.
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 5.6
# - 5.5
- 5.4
# We hope to offer PHP 7 support in the near future.
- nightly
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.
@@ -45,34 +40,26 @@ 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 latest.
# - 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
install:
# Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
- rm /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# Set the encrypted GITHUB_TOKEN if it's available to raise the API limit.
- if [ -n "$GITHUB_APITOKEN" ]; then composer config github-oauth.github.com $GITHUB_APITOKEN; fi
@@ -165,20 +152,10 @@ script:
# The local_ci repository does the actual checking.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci
# Determine the branch
grep '^$release.*dev' version.php > /dev/null
if [ $? -eq 0 ];
then
# This is master
export branchname='master';
else
# This is a stable branch. Use the version from version.php to determine which one.
export branchname="MOODLE_`grep '^$branch' version.php | sed "s/^.*'\([0-9]*\)'.*$/\1/"`_STABLE";
fi
# We need the official upstream for comparison
git remote add upstream https://github.com/moodle/moodle.git;
git fetch upstream "$branchname";
git fetch upstream MOODLE_29_STABLE;
export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`";
export GIT_COMMIT="$TRAVIS_COMMIT";
export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD`
@@ -189,14 +166,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' ];
+162 -141
View File
@@ -12,6 +12,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/**
* @copyright 2014 Andrew Nicols
@@ -24,100 +25,163 @@
module.exports = function(grunt) {
var path = require('path'),
fs = require('fs'),
tasks = {},
cwd = process.env.PWD || process.cwd();
// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
if (grunt.option('root')) {
var root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = path.join(__dirname, root);
grunt.log.ok('Setting root to '+cwd);
} else {
grunt.fail.fatal('Setting root to '+root+' failed - path does not exist');
}
}
var inAMD = path.basename(cwd) == 'amd';
// Globbing pattern for matching all AMD JS source files.
var amdSrc = [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js'];
/**
* Function to generate the destination for the uglify task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
*
* @param {String} destPath the current destination
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
var uglify_rename = function (destPath, srcPath) {
destPath = srcPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
destPath = path.resolve(cwd, destPath);
return destPath;
};
// Project configuration.
grunt.initConfig({
jshint: {
options: {jshintrc: '.jshintrc'},
files: ['**/amd/src/*.js']
amd: { src: amdSrc }
},
uglify: {
dynamic_mappings: {
files: grunt.file.expandMapping(
['**/src/*.js', '!**/node_modules/**'],
'',
{
cwd: cwd,
rename: function(destBase, destPath) {
destPath = destPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
destPath = path.resolve(cwd, destPath);
return destPath;
}
}
)
amd: {
files: [{
expand: true,
src: amdSrc,
rename: uglify_rename
}]
}
},
less: {
bootstrapbase: {
files: {
"theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
"theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
},
options: {
compress: true
}
}
},
watch: {
options: {
nospawn: true // We need not to spawn so config can be changed dynamically.
},
amd: {
files: ['**/amd/src/**/*.js'],
tasks: ['amd']
},
bootstrapbase: {
files: ["theme/bootstrapbase/less/**/*.less"],
tasks: ["less:bootstrapbase"]
},
yui: {
files: ['**/yui/src/**/*.js'],
tasks: ['shifter']
},
},
shifter: {
options: {
recursive: true,
paths: [cwd]
}
}
});
/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
*
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
* so be careful to to call done().
*/
tasks.shifter = function() {
var exec = require('child_process').spawn,
var async = require('async'),
done = this.async(),
args = [],
options = {
recursive: true,
watch: false,
walk: false,
module: false
},
shifter;
options = grunt.config('shifter.options');
// Run the shifter processes one at a time to avoid confusing output.
async.eachSeries(options.paths, function (src, filedone) {
var args = [];
args.push( path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
// Determine the most appropriate options to run with based upon the current location.
if (path.basename(cwd) === 'src') {
// Detect whether we're in a src directory.
grunt.log.debug('In a src directory');
args.push('--walk');
options.walk = true;
} else if (path.basename(path.dirname(cwd)) === 'src') {
// Detect whether we're in a module directory.
grunt.log.debug('In a module directory');
options.module = true;
}
if (grunt.option('watch')) {
if (!options.walk && !options.module) {
grunt.fail.fatal('Unable to watch unless in a src or module directory');
}
// It is not advisable to run with recursivity and watch - this
// leads to building the build directory in a race-like fashion.
grunt.log.debug('Detected a watch - disabling recursivity');
options.recursive = false;
args.push('--watch');
}
if (options.recursive) {
args.push('--recursive');
}
// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');
// Determine the most appropriate options to run with based upon the current location.
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
// When passed a JS file, build our containing module (this happen with
// watch).
grunt.log.debug('Shifter passed a specific JS file');
src = path.dirname(path.dirname(src));
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src', src)) {
// When in a src directory --walk all modules.
grunt.log.debug('In a src directory');
args.push('--walk');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
// When in module, only build our module.
grunt.log.debug('In a module directory');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
// When in module src, only build our module.
grunt.log.debug('In a source directory');
src = path.dirname(src);
options.recursive = false;
}
if (grunt.option('watch')) {
grunt.fail.fatal('The --watch option has been removed, please use `grunt watch` instead');
}
// Add the stderr option if appropriate
if (grunt.option('verbose')) {
args.push('--lint-stderr');
}
if (grunt.option('no-color')) {
args.push('--color=false');
}
var execShifter = function() {
shifter = exec("node", args, {
cwd: cwd,
stdio: 'inherit',
env: process.env
});
// Tidy up after exec.
shifter.on('exit', function (code) {
grunt.log.ok("Running shifter on " + src);
grunt.util.spawn({
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
}, function (error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
grunt.log.ok('Shifter build complete.');
done();
filedone();
}
});
};
@@ -127,79 +191,15 @@ module.exports = function(grunt) {
execShifter();
} else {
// Check that there are yui modules otherwise shifter ends with exit code 1.
var found = false;
var hasYuiModules = function(directory, callback) {
fs.readdir(directory, function(err, files) {
if (err) {
return callback(err, null);
}
// If we already found a match there is no need to continue scanning.
if (found === true) {
return;
}
// We need to track the number of files to know when we return a result.
var pending = files.length;
// We first check files, so if there is a match we don't need further
// async calls and we just return a true.
for (var i = 0; i < files.length; i++) {
if (files[i] === 'yui') {
return callback(null, true);
}
}
// Iterate through subdirs if there were no matches.
files.forEach(function (file) {
var p = path.join(directory, file);
stat = fs.statSync(p);
if (!stat.isDirectory()) {
pending--;
} else {
// We defer the pending-1 until we scan the whole dir and subdirs.
hasYuiModules(p, function(err, result) {
if (err) {
return callback(err);
}
if (result === true) {
// Once we get a true we notify the caller.
found = true;
return callback(null, true);
}
pending--;
if (pending === 0) {
// Notify the caller that the whole dir has been scaned and there are no matches.
return callback(null, false);
}
});
}
// No subdirs here, otherwise the return would be deferred until all subdirs are scanned.
if (pending === 0) {
return callback(null, false);
}
});
});
};
hasYuiModules(cwd, function(err, result) {
if (err) {
grunt.fail.fatal(err.message);
}
if (result === true) {
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
done();
}
});
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
args.push('--recursive');
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
filedone();
}
}
}, done);
};
tasks.startup = function() {
@@ -207,24 +207,45 @@ module.exports = function(grunt) {
if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
grunt.task.run('shifter');
// Are we in an AMD directory?
} else if (path.basename(cwd) == 'amd') {
grunt.task.run('jshint');
grunt.task.run('uglify');
} else if (inAMD) {
grunt.task.run('amd');
} else {
// Run them all!.
grunt.task.run('shifter');
grunt.task.run('jshint');
grunt.task.run('uglify');
grunt.task.run('css');
grunt.task.run('js');
}
};
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
var changedFiles = Object.create(null);
var onChange = grunt.util._.debounce(function() {
var files = Object.keys(changedFiles);
grunt.config('jshint.amd.src', files);
grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglify_rename }]);
grunt.config('shifter.options.paths', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', function(action, filepath) {
changedFiles[filepath] = action;
onChange();
});
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
// Register the shifter task.
// Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
grunt.registerTask('amd', ['jshint', 'uglify']);
grunt.registerTask('js', ['amd', 'shifter']);
// Register CSS taks.
grunt.registerTask('css', ['less:bootstrapbase']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
+2
View File
@@ -148,6 +148,8 @@ function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts,
// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
} elseif ($fieldname == 'phone1') {
$fieldname = get_string('phone');
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
+2 -1
View File
@@ -155,7 +155,8 @@
} else if ($blocksettings instanceof admin_settingpage) {
$settings = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=blocksetting'.$block->name.'">'.$strsettings.'</a>';
} else {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
debugging('Warning: block_'.$block->name.' returns true in has_config() but does not provide a settings.php file',
DEBUG_DEVELOPER);
}
}
+10 -50
View File
@@ -74,14 +74,12 @@ Options:
--adminpass=PASSWORD Password for the moodle admin account,
required in non-interactive mode.
--adminemail=STRING Email address for the moodle admin account.
--upgradekey=STRING The upgrade key to be set in the config.php, leave empty to not set it.
--non-interactive No interactive questions, installation fails if any
problem encountered.
--agree-license Indicates agreement with software license,
required in non-interactive mode.
--allow-unstable Install even if the version is not marked as stable yet,
required in non-interactive mode.
--skip-database Stop the installation before installing the database.
-h, --help Print out this help
Example:
@@ -259,11 +257,9 @@ list($options, $unrecognized) = cli_get_params(
'adminuser' => 'admin',
'adminpass' => '',
'adminemail' => '',
'upgradekey' => '',
'non-interactive' => false,
'agree-license' => false,
'allow-unstable' => false,
'skip-database' => false,
'help' => false
),
array(
@@ -275,8 +271,7 @@ $interactive = empty($options['non-interactive']);
// set up language
$lang = clean_param($options['lang'], PARAM_SAFEDIR);
$languages = get_string_manager()->get_list_of_translations();
if (array_key_exists($lang, $languages)) {
if (file_exists($CFG->dirroot.'/install/lang/'.$lang)) {
$CFG->lang = $lang;
}
@@ -291,41 +286,28 @@ if ($options['help']) {
}
//Print header
cli_logo();
echo PHP_EOL;
echo get_string('cliinstallheader', 'install', $CFG->target_release)."\n";
//Fist select language
if ($interactive) {
cli_separator();
$languages = get_string_manager()->get_list_of_translations();
// Do not put the langs into columns because it is not compatible with RTL.
$langlist = implode("\n", $languages);
$default = $CFG->lang;
cli_heading(get_string('chooselanguagehead', 'install'));
if (array_key_exists($default, $languages)) {
echo $default.' - '.$languages[$default]."\n";
}
if ($default !== 'en') {
echo 'en - English (en)'."\n";
}
echo '? - '.get_string('availablelangs', 'install')."\n";
cli_heading(get_string('availablelangs', 'install'));
echo $langlist."\n";
$prompt = get_string('clitypevaluedefault', 'admin', $CFG->lang);
$error = '';
do {
echo $error;
$input = cli_input($prompt, $default);
$input = clean_param($input, PARAM_SAFEDIR);
if ($input === '?') {
echo implode("\n", $languages)."\n";
$error = "\n";
if (!file_exists($CFG->dirroot.'/install/lang/'.$input)) {
$error = get_string('cliincorrectvalueretry', 'admin')."\n";
} else {
$input = clean_param($input, PARAM_SAFEDIR);
if (!array_key_exists($input, $languages)) {
$error = get_string('cliincorrectvalueretry', 'admin')."\n";
} else {
$error = '';
}
$error = '';
}
} while ($error !== '');
$CFG->lang = $input;
@@ -724,24 +706,6 @@ if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Ask for the upgrade key.
if ($interactive) {
cli_separator();
cli_heading(get_string('upgradekeyset', 'admin'));
if ($options['upgradekey'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['upgradekey']);
$options['upgradekey'] = cli_input($prompt, $options['upgradekey']);
} else {
$prompt = get_string('clitypevalue', 'admin');
$options['upgradekey'] = cli_input($prompt);
}
}
// Set the upgrade key if it was provided.
if ($options['upgradekey'] !== '') {
$CFG->upgradekey = $options['upgradekey'];
}
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
@@ -806,11 +770,7 @@ if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_error(get_string('pluginschecktodo', 'admin'));
}
if (!$options['skip-database']) {
install_cli_database($options, $interactive);
} else {
echo get_string('cliskipdatabase', 'install')."\n";
}
install_cli_database($options, $interactive);
echo get_string('cliinstallfinished', 'install')."\n";
exit(0); // 0 means success
+285 -1
View File
@@ -1434,7 +1434,6 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1559,4 +1558,289 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.1" requires="2.7">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.2" requires="2.7">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+52 -294
View File
@@ -54,16 +54,6 @@ if (!function_exists('json_encode') || !function_exists('json_decode')) {
define('NO_OUTPUT_BUFFERING', true);
if (isset($_POST['upgradekey'])) {
// Before you start reporting issues about the collision attacks against
// SHA-1, you should understand that we are not actually attempting to do
// any cryptography here. This is hashed purely so that the key is not
// that apparent in the address bar itself. Anyone who catches the HTTP
// traffic can immediately use it as a valid admin key.
header('Location: index.php?cache=0&upgradekeyhash='.sha1($_POST['upgradekey']));
die();
}
if ((isset($_GET['cache']) and $_GET['cache'] === '0')
or (isset($_POST['cache']) and $_POST['cache'] === '0')
or (!isset($_POST['cache']) and !isset($_GET['cache']) and empty($_GET['sesskey']) and empty($_POST['sesskey']))) {
@@ -98,51 +88,22 @@ core_component::get_core_subsystems();
require_once($CFG->libdir.'/adminlib.php'); // various admin-only functions
require_once($CFG->libdir.'/upgradelib.php'); // general upgrade/install related functions
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL); // Core upgrade confirmed?
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL); // Core release info and server checks confirmed?
$confirmplugins = optional_param('confirmplugincheck', 0, PARAM_BOOL); // Plugins check page confirmed?
$showallplugins = optional_param('showallplugins', 0, PARAM_BOOL); // Show all plugins on the plugins check page?
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL); // GPL license confirmed for installation?
$fetchupdates = optional_param('fetchupdates', 0, PARAM_BOOL); // Should check for available updates?
$newaddonreq = optional_param('installaddonrequest', null, PARAM_RAW); // Plugin installation requested at moodle.org/plugins.
$upgradekeyhash = optional_param('upgradekeyhash', null, PARAM_ALPHANUM); // Hash of provided upgrade key.
$installdep = optional_param('installdep', null, PARAM_COMPONENT); // Install given missing dependency (required plugin).
$installdepx = optional_param('installdepx', false, PARAM_BOOL); // Install all missing dependencies.
$confirminstalldep = optional_param('confirminstalldep', false, PARAM_BOOL); // Installing dependencies confirmed.
$abortinstall = optional_param('abortinstall', null, PARAM_COMPONENT); // Cancel installation of the given new plugin.
$abortinstallx = optional_param('abortinstallx', null, PARAM_BOOL); // Cancel installation of all new plugins.
$confirmabortinstall = optional_param('confirmabortinstall', false, PARAM_BOOL); // Installation cancel confirmed.
$abortupgrade = optional_param('abortupgrade', null, PARAM_COMPONENT); // Cancel upgrade of the given existing plugin.
$abortupgradex = optional_param('abortupgradex', null, PARAM_BOOL); // Cancel upgrade of all upgradable plugins.
$confirmabortupgrade = optional_param('confirmabortupgrade', false, PARAM_BOOL); // Upgrade cancel confirmed.
$installupdate = optional_param('installupdate', null, PARAM_COMPONENT); // Install given available update.
$installupdateversion = optional_param('installupdateversion', null, PARAM_INT); // Version of the available update to install.
$installupdatex = optional_param('installupdatex', false, PARAM_BOOL); // Install all available plugin updates.
$confirminstallupdate = optional_param('confirminstallupdate', false, PARAM_BOOL); // Available update(s) install confirmed?
if (!empty($CFG->disableupdateautodeploy)) {
// Invalidate all requests to install plugins via the admin UI.
$newaddonreq = null;
$installdep = null;
$installdepx = false;
$abortupgrade = null;
$abortupgradex = null;
$installupdate = null;
$installupdateversion = null;
$installupdatex = false;
}
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
$confirmplugins = optional_param('confirmplugincheck', 0, PARAM_BOOL);
$showallplugins = optional_param('showallplugins', 0, PARAM_BOOL);
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
$fetchupdates = optional_param('fetchupdates', 0, PARAM_BOOL);
$newaddonreq = optional_param('installaddonrequest', null, PARAM_RAW);
// Set up PAGE.
$url = new moodle_url('/admin/index.php');
$url->param('cache', $cache);
if (isset($upgradekeyhash)) {
$url->param('upgradekeyhash', $upgradekeyhash);
}
$PAGE->set_url($url);
unset($url);
// Are we returning from an add-on installation request at moodle.org/plugins?
if ($newaddonreq and !$cache and empty($CFG->disableupdateautodeploy)) {
if ($newaddonreq and !$cache and empty($CFG->disableonclickaddoninstall)) {
$target = new moodle_url('/admin/tool/installaddon/index.php', array(
'installaddonrequest' => $newaddonreq,
'confirm' => 0));
@@ -213,6 +174,7 @@ if (!core_tables_exist()) {
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->install_licence_page();
die();
@@ -227,6 +189,7 @@ if (!core_tables_exist()) {
$PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
$PAGE->set_cacheable(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->install_environment_page($maturity, $envstatus, $environment_results, $release);
die();
@@ -240,7 +203,7 @@ if (!core_tables_exist()) {
$PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
$output = $PAGE->get_renderer('core', 'admin');
$url = new moodle_url($PAGE->url, array('agreelicense' => 1, 'confirmrelease' => 1, 'lang' => $CFG->lang));
$url = new moodle_url('/admin/index.php', array('agreelicense' => 1, 'confirmrelease' => 1, 'lang' => $CFG->lang));
echo $output->unsatisfied_dependencies_page($version, $failed, $url);
die();
}
@@ -290,19 +253,11 @@ if (empty($CFG->version)) {
// Detect config cache inconsistency, this happens when you switch branches on dev servers.
if ($CFG->version != $DB->get_field('config', 'value', array('name'=>'version'))) {
purge_all_caches();
redirect(new moodle_url($PAGE->url), 'Config cache inconsistency detected, resetting caches...');
redirect(new moodle_url('/admin/index.php'), 'Config cache inconsistency detected, resetting caches...');
}
if (!$cache and $version > $CFG->version) { // upgrade
$PAGE->set_url(new moodle_url($PAGE->url, array(
'confirmupgrade' => $confirmupgrade,
'confirmrelease' => $confirmrelease,
'confirmplugincheck' => $confirmplugins,
)));
check_upgrade_key($upgradekeyhash);
// Warning about upgrading a test site.
$testsite = false;
if (defined('BEHAT_SITE_RUNNING')) {
@@ -318,6 +273,7 @@ if (!$cache and $version > $CFG->version) { // upgrade
// We then purge the regular caches.
purge_all_caches();
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
if (upgrade_stale_php_files_present()) {
@@ -362,137 +318,40 @@ if (!$cache and $version > $CFG->version) { // upgrade
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
$pluginman = core_plugin_manager::instance();
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
// Check for available updates.
if ($fetchupdates) {
// No sesskey support guaranteed here, because sessions might not work yet.
$updateschecker = \core\update\checker::instance();
if ($updateschecker->enabled()) {
$updateschecker->fetch();
}
redirect($PAGE->url);
redirect($reloadurl);
}
// Cancel all plugin installations.
if ($abortinstallx) {
// No sesskey support guaranteed here, because sessions might not work yet.
$abortables = $pluginman->list_cancellable_installations();
if ($abortables) {
if ($confirmabortinstall) {
foreach ($abortables as $plugin) {
$pluginman->cancel_plugin_installation($plugin->component);
}
redirect($PAGE->url);
} else {
$continue = new moodle_url($PAGE->url, array('abortinstallx' => $abortinstallx, 'confirmabortinstall' => 1));
echo $output->upgrade_confirm_abort_install_page($abortables, $continue);
die();
}
}
redirect($PAGE->url);
}
$deployer = \core\update\deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($reloadurl, $reloadurl);
// Cancel single plugin installation.
if ($abortinstall) {
// No sesskey support guaranteed here, because sessions might not work yet.
if ($confirmabortinstall) {
$pluginman->cancel_plugin_installation($abortinstall);
redirect($PAGE->url);
} else {
$continue = new moodle_url($PAGE->url, array('abortinstall' => $abortinstall, 'confirmabortinstall' => 1));
$abortable = $pluginman->get_plugin_info($abortinstall);
if ($pluginman->can_cancel_plugin_installation($abortable)) {
echo $output->upgrade_confirm_abort_install_page(array($abortable), $continue);
die();
}
redirect($PAGE->url);
}
}
// Cancel all plugins upgrades (that is, restore archived versions).
if ($abortupgradex) {
// No sesskey support guaranteed here, because sessions might not work yet.
$restorable = $pluginman->list_restorable_archives();
if ($restorable) {
upgrade_install_plugins($restorable, $confirmabortupgrade,
get_string('cancelupgradehead', 'core_plugin'),
new moodle_url($PAGE->url, array('abortupgradex' => 1, 'confirmabortupgrade' => 1))
);
}
redirect($PAGE->url);
}
// Cancel single plugin upgrade (that is, install the archived version).
if ($abortupgrade) {
// No sesskey support guaranteed here, because sessions might not work yet.
$restorable = $pluginman->list_restorable_archives();
if (isset($restorable[$abortupgrade])) {
$restorable = array($restorable[$abortupgrade]);
upgrade_install_plugins($restorable, $confirmabortupgrade,
get_string('cancelupgradehead', 'core_plugin'),
new moodle_url($PAGE->url, array('abortupgrade' => $abortupgrade, 'confirmabortupgrade' => 1))
);
}
redirect($PAGE->url);
}
// Install all available missing dependencies.
if ($installdepx) {
// No sesskey support guaranteed here, because sessions might not work yet.
$installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
upgrade_install_plugins($installable, $confirminstalldep,
get_string('dependencyinstallhead', 'core_plugin'),
new moodle_url($PAGE->url, array('installdepx' => 1, 'confirminstalldep' => 1))
);
}
// Install single available missing dependency.
if ($installdep) {
// No sesskey support guaranteed here, because sessions might not work yet.
$installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
if (!empty($installable[$installdep])) {
$installable = array($installable[$installdep]);
upgrade_install_plugins($installable, $confirminstalldep,
get_string('dependencyinstallhead', 'core_plugin'),
new moodle_url($PAGE->url, array('installdep' => $installdep, 'confirminstalldep' => 1))
);
}
}
// Install all available updates.
if ($installupdatex) {
// No sesskey support guaranteed here, because sessions might not work yet.
$installable = $pluginman->filter_installable($pluginman->available_updates());
upgrade_install_plugins($installable, $confirminstallupdate,
get_string('updateavailableinstallallhead', 'core_admin'),
new moodle_url($PAGE->url, array('installupdatex' => 1, 'confirminstallupdate' => 1))
);
}
// Install single available update.
if ($installupdate and $installupdateversion) {
// No sesskey support guaranteed here, because sessions might not work yet.
if ($pluginman->is_remote_plugin_installable($installupdate, $installupdateversion)) {
$installable = array($pluginman->get_remote_plugin_info($installupdate, $installupdateversion, true));
upgrade_install_plugins($installable, $confirminstallupdate,
get_string('updateavailableinstallallhead', 'core_admin'),
new moodle_url($PAGE->url, array('installupdate' => $installupdate,
'installupdateversion' => $installupdateversion, 'confirminstallupdate' => 1)
)
);
$deploydata = $deployer->submitted_data();
if (!empty($deploydata)) {
// No sesskey support guaranteed here, because sessions might not work yet.
echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
die();
}
}
echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
$version, $showallplugins, $PAGE->url, new moodle_url($PAGE->url, array('confirmplugincheck' => 1)));
$version, $showallplugins, $reloadurl,
new moodle_url('/admin/index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1, 'cache'=>0)));
die();
} else {
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
@@ -515,17 +374,9 @@ if (!$cache and $branch <> $CFG->branch) { // Update the branch
}
if (!$cache and moodle_needs_upgrading()) {
$PAGE->set_url(new moodle_url($PAGE->url, array('confirmplugincheck' => $confirmplugins)));
check_upgrade_key($upgradekeyhash);
if (!$PAGE->headerprinted) {
// means core upgrade or installation was not already done
$pluginman = core_plugin_manager::instance();
$output = $PAGE->get_renderer('core', 'admin');
if (!$confirmplugins) {
$strplugincheck = get_string('plugincheck');
@@ -534,7 +385,6 @@ if (!$cache and moodle_needs_upgrading()) {
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
// Check for available updates.
if ($fetchupdates) {
require_sesskey();
$updateschecker = \core\update\checker::instance();
@@ -544,130 +394,36 @@ if (!$cache and moodle_needs_upgrading()) {
redirect($PAGE->url);
}
// Cancel all plugin installations.
if ($abortinstallx) {
require_sesskey();
$abortables = $pluginman->list_cancellable_installations();
if ($abortables) {
if ($confirmabortinstall) {
foreach ($abortables as $plugin) {
$pluginman->cancel_plugin_installation($plugin->component);
}
redirect($PAGE->url);
} else {
$continue = new moodle_url($PAGE->url, array('abortinstallx' => $abortinstallx,
'confirmabortinstall' => 1));
echo $output->upgrade_confirm_abort_install_page($abortables, $continue);
die();
}
}
redirect($PAGE->url);
}
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
// Cancel single plugin installation.
if ($abortinstall) {
require_sesskey();
if ($confirmabortinstall) {
$pluginman->cancel_plugin_installation($abortinstall);
redirect($PAGE->url);
} else {
$continue = new moodle_url($PAGE->url, array('abortinstall' => $abortinstall, 'confirmabortinstall' => 1));
$abortable = $pluginman->get_plugin_info($abortinstall);
if ($pluginman->can_cancel_plugin_installation($abortable)) {
echo $output->upgrade_confirm_abort_install_page(array($abortable), $continue);
die();
}
redirect($PAGE->url);
}
}
$deployer = \core\update\deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($PAGE->url, $PAGE->url);
// Cancel all plugins upgrades (that is, restore archived versions).
if ($abortupgradex) {
require_sesskey();
$restorable = $pluginman->list_restorable_archives();
if ($restorable) {
upgrade_install_plugins($restorable, $confirmabortupgrade,
get_string('cancelupgradehead', 'core_plugin'),
new moodle_url($PAGE->url, array('abortupgradex' => 1, 'confirmabortupgrade' => 1))
);
}
redirect($PAGE->url);
}
// Cancel single plugin upgrade (that is, install the archived version).
if ($abortupgrade) {
require_sesskey();
$restorable = $pluginman->list_restorable_archives();
if (isset($restorable[$abortupgrade])) {
$restorable = array($restorable[$abortupgrade]);
upgrade_install_plugins($restorable, $confirmabortupgrade,
get_string('cancelupgradehead', 'core_plugin'),
new moodle_url($PAGE->url, array('abortupgrade' => $abortupgrade, 'confirmabortupgrade' => 1))
);
}
redirect($PAGE->url);
}
// Install all available missing dependencies.
if ($installdepx) {
require_sesskey();
$installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
upgrade_install_plugins($installable, $confirminstalldep,
get_string('dependencyinstallhead', 'core_plugin'),
new moodle_url($PAGE->url, array('installdepx' => 1, 'confirminstalldep' => 1))
);
}
// Install single available missing dependency.
if ($installdep) {
require_sesskey();
$installable = $pluginman->filter_installable($pluginman->missing_dependencies(true));
if (!empty($installable[$installdep])) {
$installable = array($installable[$installdep]);
upgrade_install_plugins($installable, $confirminstalldep,
get_string('dependencyinstallhead', 'core_plugin'),
new moodle_url($PAGE->url, array('installdep' => $installdep, 'confirminstalldep' => 1))
);
}
}
// Install all available updates.
if ($installupdatex) {
require_sesskey();
$installable = $pluginman->filter_installable($pluginman->available_updates());
upgrade_install_plugins($installable, $confirminstallupdate,
get_string('updateavailableinstallallhead', 'core_admin'),
new moodle_url($PAGE->url, array('installupdatex' => 1, 'confirminstallupdate' => 1))
);
}
// Install single available update.
if ($installupdate and $installupdateversion) {
require_sesskey();
if ($pluginman->is_remote_plugin_installable($installupdate, $installupdateversion)) {
$installable = array($pluginman->get_remote_plugin_info($installupdate, $installupdateversion, true));
upgrade_install_plugins($installable, $confirminstallupdate,
get_string('updateavailableinstallallhead', 'core_admin'),
new moodle_url($PAGE->url, array('installupdate' => $installupdate,
'installupdateversion' => $installupdateversion, 'confirminstallupdate' => 1)
)
);
$deploydata = $deployer->submitted_data();
if (!empty($deploydata)) {
require_sesskey();
echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
die();
}
}
// Show plugins info.
echo $output->upgrade_plugin_check_page($pluginman, \core\update\checker::instance(),
echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
$version, $showallplugins,
new moodle_url($PAGE->url),
new moodle_url($PAGE->url, array('confirmplugincheck' => 1, 'cache' => 0)));
new moodle_url('/admin/index.php', array('confirmplugincheck'=>1, 'cache'=>0)));
die();
}
// Make sure plugin dependencies are always checked.
$failed = array();
if (!$pluginman->all_plugins_ok($version, $failed)) {
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
$reloadurl = new moodle_url('/admin/index.php', array('cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
@@ -813,7 +569,7 @@ $updateschecker = \core\update\checker::instance();
$availableupdates = array();
$availableupdatesfetch = null;
if ($updateschecker->enabled()) {
if (empty($CFG->disableupdatenotifications)) {
// Only compute the update information when it is going to be displayed to the user.
$availableupdates['core'] = $updateschecker->get_update_info('core',
array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds));
@@ -822,13 +578,14 @@ if ($updateschecker->enabled()) {
$pluginman = core_plugin_manager::instance();
foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
foreach ($plugintypeinstances as $pluginname => $plugininfo) {
$pluginavailableupdates = $plugininfo->available_updates();
if (!empty($pluginavailableupdates)) {
foreach ($pluginavailableupdates as $pluginavailableupdate) {
if (!isset($availableupdates[$plugintype.'_'.$pluginname])) {
$availableupdates[$plugintype.'_'.$pluginname] = array();
if (!empty($plugininfo->availableupdates)) {
foreach ($plugininfo->availableupdates as $pluginavailableupdate) {
if ($pluginavailableupdate->version > $plugininfo->versiondisk) {
if (!isset($availableupdates[$plugintype.'_'.$pluginname])) {
$availableupdates[$plugintype.'_'.$pluginname] = array();
}
$availableupdates[$plugintype.'_'.$pluginname][] = $pluginavailableupdate;
}
$availableupdates[$plugintype.'_'.$pluginname][] = $pluginavailableupdate;
}
}
}
@@ -846,6 +603,7 @@ $cachewarnings = cache_helper::warnings();
admin_externalpage_setup('adminnotifications');
/* @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
+53 -62
View File
@@ -18,6 +18,15 @@
/**
* UI for general plugins management
*
* Supported HTTP parameters:
*
* ?fetchremote=1 - check for available updates
* ?updatesonly=1 - display plugins with available update only
* ?contribonly=1 - display non-standard add-ons only
* ?uninstall=foo_bar - uninstall the given plugin
* ?delete=foo_bar - delete the plugin folder (it must not be installed)
* &confirm=1 - confirm the uninstall or delete action
*
* @package core
* @subpackage admin
* @copyright 2011 David Mudrak <david@moodle.com>
@@ -28,17 +37,13 @@ require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/filelib.php');
$fetchupdates = optional_param('fetchupdates', false, PARAM_BOOL); // Check for available plugins updates.
$updatesonly = optional_param('updatesonly', false, PARAM_BOOL); // Show updateable plugins only.
$contribonly = optional_param('contribonly', false, PARAM_BOOL); // Show additional plugins only.
$uninstall = optional_param('uninstall', '', PARAM_COMPONENT); // Uninstall the plugin.
$delete = optional_param('delete', '', PARAM_COMPONENT); // Delete the plugin folder after it is uninstalled.
$confirmed = optional_param('confirm', false, PARAM_BOOL); // Confirm the uninstall/delete action.
$return = optional_param('return', 'overview', PARAM_ALPHA); // Where to return after uninstall.
$installupdate = optional_param('installupdate', null, PARAM_COMPONENT); // Install given available update.
$installupdateversion = optional_param('installupdateversion', null, PARAM_INT); // Version of the available update to install.
$installupdatex = optional_param('installupdatex', false, PARAM_BOOL); // Install all available plugin updates.
$confirminstallupdate = optional_param('confirminstallupdate', false, PARAM_BOOL); // Available update(s) install confirmed?
$fetchremote = optional_param('fetchremote', false, PARAM_BOOL);
$updatesonly = optional_param('updatesonly', false, PARAM_BOOL);
$contribonly = optional_param('contribonly', false, PARAM_BOOL);
$uninstall = optional_param('uninstall', '', PARAM_COMPONENT);
$delete = optional_param('delete', '', PARAM_COMPONENT);
$confirmed = optional_param('confirm', false, PARAM_BOOL);
$return = optional_param('return', 'overview', PARAM_ALPHA);
// NOTE: do not use admin_externalpage_setup() here because it loads
// full admin tree which is not possible during uninstallation.
@@ -47,19 +52,15 @@ require_login();
$syscontext = context_system::instance();
require_capability('moodle/site:config', $syscontext);
// URL params we want to maintain on redirects.
$pageparams = array('updatesonly' => $updatesonly, 'contribonly' => $contribonly);
$pageurl = new moodle_url('/admin/plugins.php', $pageparams);
$pluginman = core_plugin_manager::instance();
if ($uninstall) {
require_sesskey();
if (!$confirmed) {
admin_externalpage_setup('pluginsoverview', '', $pageparams);
admin_externalpage_setup('pluginsoverview');
} else {
$PAGE->set_url($pageurl);
$PAGE->set_url('/admin/plugins.php');
$PAGE->set_context($syscontext);
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
@@ -121,7 +122,7 @@ if ($uninstall) {
if ($delete and $confirmed) {
require_sesskey();
$PAGE->set_url($pageurl);
$PAGE->set_url('/admin/plugins.php');
$PAGE->set_context($syscontext);
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
@@ -148,6 +149,13 @@ if ($delete and $confirmed) {
'core_plugin_manager::get_plugin_info() returned not-null versiondb for the plugin to be deleted');
}
// Make sure the folder is removable.
if (!$pluginman->is_plugin_folder_removable($pluginfo->component)) {
throw new moodle_exception('err_removing_unremovable_folder', 'core_plugin', '',
array('plugin' => $pluginfo->component, 'rootdir' => $pluginfo->rootdir),
'plugin root folder is not removable as expected');
}
// Make sure the folder is within Moodle installation tree.
if (strpos($pluginfo->rootdir, $CFG->dirroot) !== 0) {
throw new moodle_exception('err_unexpected_plugin_rootdir', 'core_plugin', '',
@@ -156,61 +164,44 @@ if ($delete and $confirmed) {
}
// So long, and thanks for all the bugs.
$pluginman->remove_plugin_folder($pluginfo);
fulldelete($pluginfo->rootdir);
// Reset op code caches.
if (function_exists('opcache_reset')) {
opcache_reset();
}
// We need to execute upgrade to make sure everything including caches is up to date.
redirect(new moodle_url('/admin/index.php'));
}
// Install all avilable updates.
if ($installupdatex) {
require_once($CFG->libdir.'/upgradelib.php');
require_sesskey();
$PAGE->set_url($pageurl);
$PAGE->set_context($syscontext);
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$installable = $pluginman->filter_installable($pluginman->available_updates());
upgrade_install_plugins($installable, $confirminstallupdate,
get_string('updateavailableinstallallhead', 'core_admin'),
new moodle_url($PAGE->url, array('installupdatex' => 1, 'confirminstallupdate' => 1))
);
}
// Install single available update.
if ($installupdate and $installupdateversion) {
require_once($CFG->libdir.'/upgradelib.php');
require_sesskey();
$PAGE->set_url($pageurl);
$PAGE->set_context($syscontext);
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
if ($pluginman->is_remote_plugin_installable($installupdate, $installupdateversion)) {
$installable = array($pluginman->get_remote_plugin_info($installupdate, $installupdateversion, true));
upgrade_install_plugins($installable, $confirminstallupdate,
get_string('updateavailableinstallallhead', 'core_admin'),
new moodle_url($PAGE->url, array('installupdate' => $installupdate,
'installupdateversion' => $installupdateversion, 'confirminstallupdate' => 1)
)
);
}
}
admin_externalpage_setup('pluginsoverview', '', $pageparams);
admin_externalpage_setup('pluginsoverview');
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$checker = \core\update\checker::instance();
if ($fetchupdates) {
// Filtering options.
$options = array(
'updatesonly' => $updatesonly,
'contribonly' => $contribonly,
);
if ($fetchremote) {
require_sesskey();
$checker->fetch();
redirect($PAGE->url);
redirect(new moodle_url($PAGE->url, $options));
}
echo $output->plugin_management_page($pluginman, $checker, $pageparams);
$deployer = \core\update\deployer::instance();
if ($deployer->enabled()) {
$myurl = new moodle_url($PAGE->url, array('updatesonly' => $updatesonly, 'contribonly' => $contribonly));
$deployer->initialize($myurl, new moodle_url('/admin'));
$deploydata = $deployer->submitted_data();
if (!empty($deploydata)) {
echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
die();
}
}
echo $output->plugin_management_page($pluginman, $checker, $options);
+2
View File
@@ -39,6 +39,8 @@ require_once($CFG->dirroot . '/' . $CFG->admin . '/registration/forms.php');
require_once($CFG->dirroot . '/webservice/lib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/registration/lib.php');
require_sesskey();
$huburl = required_param('huburl', PARAM_URL);
$huburl = rtrim($huburl, "/");
+280 -644
View File
File diff suppressed because it is too large Load Diff
-81
View File
@@ -1,81 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This file processes AJAX requests and returns JSON
*
* This is a server part of yui permissions manager module
*
* @package core_role
* @copyright 2015 Martin Mastny
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('AJAX_SCRIPT', true);
require(__DIR__ . '/../../config.php');
$contextid = required_param('contextid', PARAM_INT);
$getroles = optional_param('getroles', 0, PARAM_BOOL);
list($context, $course, $cm) = get_context_info_array($contextid);
require_login($course, false, $cm);
require_capability('moodle/role:review', $context);
require_sesskey();
list($overridableroles, $overridecounts, $nameswithcounts) = get_overridable_roles($context,
ROLENAME_BOTH, true);
if ($getroles) {
echo json_encode($overridableroles);
die();
}
$capability = required_param('capability', PARAM_CAPABILITY);
$roleid = required_param('roleid', PARAM_INT);
$action = required_param('action', PARAM_ALPHA);
$capability = $DB->get_record('capabilities', array('name' => $capability), '*', MUST_EXIST);
if (!isset($overridableroles[$roleid])) {
throw new moodle_exception('invalidarguments');
}
if (!has_capability('moodle/role:override', $context)) {
if (!has_capability('moodle/role:safeoverride', $context) || !is_safe_capability($capability)) {
require_capability('moodle/role:override', $context);
}
}
switch ($action) {
case 'allow':
role_change_permission($roleid, $context, $capability->name, CAP_ALLOW);
break;
case 'prevent':
role_change_permission($roleid, $context, $capability->name, CAP_PREVENT);
break;
case 'prohibit':
role_change_permission($roleid, $context, $capability->name, CAP_PROHIBIT);
break;
case 'unprohibit':
role_change_permission($roleid, $context, $capability->name, CAP_INHERIT);
break;
default:
throw new moodle_exception('invalidarguments');
}
echo json_encode($action);
die();
+6 -22
View File
@@ -106,22 +106,18 @@ abstract class core_role_capability_table_base {
$component = $capability->component;
// Start the row.
$rowattributes = $this->get_row_attributes($capability);
// Handle class attributes same as other.
$rowclasses = array_unique(array_merge(array('rolecap'), $this->get_row_classes($capability)));
if (array_key_exists('class', $rowattributes)) {
$rowclasses = array_unique(array_merge($rowclasses, array($rowattributes['class'])));
}
$rowattributes['class'] = implode(' ', $rowclasses);
echo '<tr class="' . implode(' ', array_unique(array_merge(array('rolecap'),
$this->get_row_classes($capability)))) . '">';
// Table cell for the capability name.
$contents = '<th scope="row" class="name"><span class="cap-desc">' . get_capability_docs_link($capability) .
echo '<th scope="row" class="name"><span class="cap-desc">' . get_capability_docs_link($capability) .
'<span class="cap-name">' . $capability->name . '</span></span></th>';
// Add the cells specific to this table.
$contents .= $this->add_row_cells($capability);
$this->add_row_cells($capability);
echo html_writer::tag('tr', $contents, $rowattributes);
// End the row.
echo "</tr>\n";
}
// End of the table.
@@ -171,17 +167,6 @@ abstract class core_role_capability_table_base {
return array();
}
/**
* For subclasses to override. Additional attributes to be added to
* each table row for the capability
*
* @param stdClass $capability the capability this row relates to.
* @return array attribute names and their values.
*/
protected function get_row_attributes($capability) {
return array();
}
/**
* For subclasses to override. Output the data cells for this capability. The
* capability name cell will already have been output.
@@ -189,7 +174,6 @@ abstract class core_role_capability_table_base {
* You can rely on get_row_classes always being called before add_row_cells.
*
* @param stdClass $capability the capability this row relates to.
* @return string html of row cells
*/
protected abstract function add_row_cells($capability);
}
@@ -163,16 +163,15 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
protected abstract function add_permission_cells($capability);
protected function add_row_cells($capability) {
$cells = $this->add_permission_cells($capability);
$this->add_permission_cells($capability);
// One cell for each possible risk.
foreach ($this->allrisks as $riskname => $risk) {
$cells .= '<td class="risk ' . str_replace('risk', '', $riskname) . '">';
echo '<td class="risk ' . str_replace('risk', '', $riskname) . '">';
if ($risk & (int)$capability->riskbitmask) {
$cells .= $this->get_risk_icon($riskname);
echo $this->get_risk_icon($riskname);
}
$cells .= '</td>';
echo '</td>';
}
return $cells;
}
/**
@@ -79,6 +79,6 @@ class core_role_check_capability_table extends core_role_capability_table_base {
$a->fullname = $this->fullname;
$a->capability = $capability->name;
$a->context = $this->contextname;
return '<td>' . $result . '</td>';
echo '<td>' . $result . '</td>';
}
}
@@ -628,7 +628,6 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
protected function add_permission_cells($capability) {
// One cell for each possible permission.
$content = '';
foreach ($this->displaypermissions as $perm => $permname) {
$strperm = $this->strperms[$permname];
$extraclass = '';
@@ -639,12 +638,11 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
if ($this->permissions[$capability->name] == $perm) {
$checked = 'checked="checked" ';
}
$content .= '<td class="' . $permname . $extraclass . '">';
$content .= '<label><input type="radio" name="' . $capability->name .
echo '<td class="' . $permname . $extraclass . '">';
echo '<label><input type="radio" name="' . $capability->name .
'" value="' . $perm . '" ' . $checked . '/> ';
$content .= '<span class="note">' . $strperm . '</span>';
$content .= '</label></td>';
echo '<span class="note">' . $strperm . '</span>';
echo '</label></td>';
}
return $content;
}
}
@@ -45,20 +45,19 @@ class core_role_define_role_table_basic extends core_role_define_role_table_adva
$perm = $this->permissions[$capability->name];
$permname = $this->allpermissions[$perm];
$defaultperm = $this->allpermissions[$this->parentpermissions[$capability->name]];
$content = '<td class="' . $permname . '">';
echo '<td class="' . $permname . '">';
if ($perm == CAP_ALLOW || $perm == CAP_INHERIT) {
$checked = '';
if ($perm == CAP_ALLOW) {
$checked = 'checked="checked" ';
}
$content .= '<input type="hidden" name="' . $capability->name . '" value="' . CAP_INHERIT . '" />';
$content .= '<label><input type="checkbox" name="' . $capability->name .
echo '<input type="hidden" name="' . $capability->name . '" value="' . CAP_INHERIT . '" />';
echo '<label><input type="checkbox" name="' . $capability->name .
'" value="' . CAP_ALLOW . '" ' . $checked . '/> ' . $this->strallow . '</label>';
} else {
$content .= '<input type="hidden" name="' . $capability->name . '" value="' . $perm . '" />';
$content .= $this->strperms[$permname] . '<span class="note">' . $this->stradvmessage . '</span>';
echo '<input type="hidden" name="' . $capability->name . '" value="' . $perm . '" />';
echo $this->strperms[$permname] . '<span class="note">' . $this->stradvmessage . '</span>';
}
$content .= '</td>';
return $content;
echo '</td>';
}
}
@@ -73,7 +73,6 @@ class core_role_override_permissions_table_advanced extends core_role_capability
}
// One cell for each possible permission.
$content = '';
foreach ($this->displaypermissions as $perm => $permname) {
$strperm = $this->strperms[$permname];
$extraclass = '';
@@ -84,8 +83,8 @@ class core_role_override_permissions_table_advanced extends core_role_capability
if ($this->permissions[$capability->name] == $perm) {
$checked = 'checked="checked" ';
}
$content .= '<td class="' . $permname . $extraclass . '">';
$content .= '<label><input type="radio" name="' . $capability->name .
echo '<td class="' . $permname . $extraclass . '">';
echo '<label><input type="radio" name="' . $capability->name .
'" value="' . $perm . '" ' . $checked . $disabled . '/> ';
if ($perm == CAP_INHERIT) {
$inherited = $this->parentpermissions[$capability->name];
@@ -96,9 +95,8 @@ class core_role_override_permissions_table_advanced extends core_role_capability
}
$strperm .= ' (' . $inherited . ')';
}
$content .= '<span class="note">' . $strperm . '</span>';
$content .= '</label></td>';
echo '<span class="note">' . $strperm . '</span>';
echo '</label></td>';
}
return $content;
}
}
+16 -41
View File
@@ -67,8 +67,6 @@ class core_role_permissions_table extends core_role_capability_table_base {
protected function add_row_cells($capability) {
global $OUTPUT, $PAGE;
$renderer = $PAGE->get_renderer('core');
$adminurl = new moodle_url("/admin/");
$context = $this->context;
$contextid = $this->context->id;
@@ -77,6 +75,7 @@ class core_role_permissions_table extends core_role_capability_table_base {
$overridableroles = $this->overridableroles;
$roles = $this->roles;
list($needed, $forbidden) = get_roles_with_cap_in_context($context, $capability->name);
$neededroles = array();
$forbiddenroles = array();
@@ -92,50 +91,40 @@ class core_role_permissions_table extends core_role_capability_table_base {
foreach ($roles as $id => $name) {
if (isset($needed[$id])) {
$templatecontext = array("rolename" => $name, "roleid" => $id, "action" => "prevent", "spanclass" => "allowed",
"linkclass" => "preventlink", "adminurl" => $adminurl->out(), "imageurl" => "");
$neededroles[$id] = $roles[$id];
if (isset($overridableroles[$id]) and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$templatecontext['imageurl'] = $renderer->pix_url('t/delete');
$preventurl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'roleid'=>$id, 'capability'=>$capability->name, 'prevent'=>1));
$neededroles[$id] .= $OUTPUT->action_icon($preventurl, new pix_icon('t/delete', get_string('prevent', 'core_role')));
}
$neededroles[$id] = $renderer->render_from_template('core/permissionmanager_role', $templatecontext);
}
}
$neededroles = implode(' ', $neededroles);
$neededroles = implode(', ', $neededroles);
foreach ($roles as $id => $name) {
if (isset($forbidden[$id]) and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$templatecontext = array("rolename" => $name, "roleid" => $id, "action" => "unprohibit",
"spanclass" => "forbidden", "linkclass" => "unprohibitlink", "adminurl" => $adminurl->out(),
"imageurl" => "");
$forbiddenroles[$id] = $roles[$id];
if (isset($overridableroles[$id]) and prohibit_is_removable($id, $context, $capability->name)) {
$templatecontext['imageurl'] = $renderer->pix_url('t/delete');
$unprohibiturl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'roleid'=>$id, 'capability'=>$capability->name, 'unprohibit'=>1));
$forbiddenroles[$id] .= $OUTPUT->action_icon($unprohibiturl, new pix_icon('t/delete', get_string('delete')));
}
$forbiddenroles[$id] = $renderer->render_from_template('core/permissionmanager_role', $templatecontext);
}
}
$forbiddenroles = implode(' ', $forbiddenroles);
$forbiddenroles = implode(', ', $forbiddenroles);
if ($allowable and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$allowurl = new moodle_url($PAGE->url, array('contextid' => $contextid,
'capability' => $capability->name, 'allow' => 1));
$allowicon = $OUTPUT->action_icon($allowurl, new pix_icon('t/add', get_string('allow', 'core_role')), null,
array('class' => 'allowlink', 'data-action' => 'allow'));
$neededroles .= html_writer::div($allowicon, 'allowmore');
$allowurl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'capability'=>$capability->name, 'allow'=>1));
$neededroles .= '<div class="allowmore">'.$OUTPUT->action_icon($allowurl, new pix_icon('t/add', get_string('allow', 'core_role'))).'</div>';
}
if ($forbitable and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$prohibiturl = new moodle_url($PAGE->url, array('contextid' => $contextid,
'capability' => $capability->name, 'prohibit' => 1));
$prohibiticon = $OUTPUT->action_icon($prohibiturl, new pix_icon('t/add', get_string('prohibit', 'core_role')), null,
array('class' => 'prohibitlink', 'data-action' => 'prohibit'));
$forbiddenroles .= html_writer::div($prohibiticon, 'prohibitmore');
$prohibiturl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'capability'=>$capability->name, 'prohibit'=>1));
$forbiddenroles .= '<div class="prohibitmore">'.$OUTPUT->action_icon($prohibiturl, new pix_icon('t/add', get_string('prohibit', 'core_role'))).'</div>';
}
$risks = $this->get_risks($capability);
$contents = html_writer::tag('td', $risks, array('class' => 'risks'));
$contents .= html_writer::tag('td', $neededroles, array('class' => 'allowedroles'));
$contents .= html_writer::tag('td', $forbiddenroles, array('class' => 'forbiddenroles'));
return $contents;
echo '<td>' . $risks . '</td>';
echo '<td>' . $neededroles . '</td>';
echo '<td>' . $forbiddenroles . '</td>';
}
protected function get_risks($capability) {
@@ -158,18 +147,4 @@ class core_role_permissions_table extends core_role_capability_table_base {
return $return;
}
/**
* Add additional attributes to row
*
* @param stdClass $capability capability that this table row relates to.
* @return array key value pairs of attribute names and values.
*/
protected function get_row_attributes($capability) {
return array(
'data-id' => $capability->id,
'data-name' => $capability->name,
'data-humanname' => get_capability_string($capability->name),
);
}
}
@@ -129,7 +129,7 @@ class core_role_view_role_definition_table extends core_role_define_role_table_a
} else {
$default = "&#xa0;";
}
return '<td class="' . $permname . '">' . $this->strperms[$permname] . '<span class="note">' .
echo '<td class="' . $permname . '">' . $this->strperms[$permname] . '<span class="note">' .
$default . '</span></td>';
}
+1 -1
View File
@@ -201,7 +201,7 @@ if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey() && $de
$event = \core\event\role_capabilities_updated::create(
array(
'context' => $systemcontext,
'objectid' => $roleid
'objectid' => $tableroleid
)
);
$event->set_legacy_logdata(array(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' . $tableroleid,
-9
View File
@@ -195,15 +195,6 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$adminurl = new moodle_url('/admin/');
$arguments = array('contextid' => $contextid,
'contextname' => $contextname,
'adminurl' => $adminurl->out());
$PAGE->requires->strings_for_js(
array('roleprohibitinfo', 'roleprohibitheader', 'roleallowinfo', 'roleallowheader',
'confirmunassigntitle', 'confirmroleunprohibit', 'confirmroleprevent', 'confirmunassignyes',
'confirmunassignno'), 'core_role');
$PAGE->requires->js_call_amd('core/permissionmanager', 'initialize', array($arguments));
$table = new core_role_permissions_table($context, $contextname, $allowoverrides, $allowsafeoverrides, $overridableroles);
echo $OUTPUT->box_start('generalbox capbox');
// Print link to advanced override page.
+5 -1
View File
@@ -20,7 +20,11 @@ $adminroot = admin_get_root(); // need all settings
$settingspage = $adminroot->locate($section, true);
if (empty($settingspage) or !($settingspage instanceof admin_settingpage)) {
print_error('sectionerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
if (moodle_needs_upgrading()) {
redirect(new moodle_url('/admin/index.php'));
} else {
print_error('sectionerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
}
die;
}
+5 -40
View File
@@ -205,6 +205,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
// Create a page for general import configuration and defaults.
$temp = new admin_settingpage('importgeneralsettings', new lang_string('importgeneralsettings', 'backup'), 'moodle/backup:backupcourse');
$temp->add(new admin_setting_configtext('backup/import_general_maxresults', new lang_string('importgeneralmaxresults', 'backup'), new lang_string('importgeneralmaxresults_desc', 'backup'), 10));
$temp->add(new admin_setting_configcheckbox('backup/import_general_duplicate_admin_allowed',
new lang_string('importgeneralduplicateadminallowed', 'backup'),
new lang_string('importgeneralduplicateadminallowed_desc', 'backup'), 0));
$ADMIN->add('backups', $temp);
// Create a page for automated backups configuration and defaults.
@@ -226,8 +229,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
);
$temp->add(new admin_setting_configselect('backup/backup_auto_storage', new lang_string('automatedstorage', 'backup'), new lang_string('automatedstoragehelp', 'backup'), 0, $storageoptions));
$temp->add(new admin_setting_special_backup_auto_destination());
$maxkeptoptions = array(
$keepoptoins = array(
0 => new lang_string('all'), 1 => '1',
2 => '2',
5 => '5',
@@ -241,44 +243,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
300 => '300',
400 => '400',
500 => '500');
$temp->add(new admin_setting_configselect('backup/backup_auto_max_kept', new lang_string('automatedmaxkept', 'backup'),
new lang_string('automatedmaxkepthelp', 'backup'), 1, $maxkeptoptions));
$automateddeletedaysoptions = array(
0 => new lang_string('never'),
1000 => new lang_string('numdays', '', 1000),
365 => new lang_string('numdays', '', 365),
180 => new lang_string('numdays', '', 180),
150 => new lang_string('numdays', '', 150),
120 => new lang_string('numdays', '', 120),
90 => new lang_string('numdays', '', 90),
60 => new lang_string('numdays', '', 60),
35 => new lang_string('numdays', '', 35),
10 => new lang_string('numdays', '', 10),
5 => new lang_string('numdays', '', 5),
2 => new lang_string('numdays', '', 2)
);
$temp->add(new admin_setting_configselect('backup/backup_auto_delete_days', new lang_string('automateddeletedays', 'backup'),
'', 0, $automateddeletedaysoptions));
$minkeptoptions = array(
0 => new lang_string('none'),
1 => '1',
2 => '2',
5 => '5',
10 => '10',
20 => '20',
30 => '30',
40 => '40',
50 => '50',
100 => '100',
200 => '200',
300 => '300',
400 => '400'
);
$temp->add(new admin_setting_configselect('backup/backup_auto_min_kept', new lang_string('automatedminkept', 'backup'),
new lang_string('automatedminkepthelp', 'backup'), 0, $minkeptoptions));
$temp->add(new admin_setting_configselect('backup/backup_auto_keep', new lang_string('keep'), new lang_string('backupkeephelp'), 1, $keepoptoins));
$temp->add(new admin_setting_configcheckbox('backup/backup_shortname', new lang_string('backup_shortname', 'admin'), new lang_string('backup_shortnamehelp', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_skip_hidden', new lang_string('skiphidden', 'backup'), new lang_string('skiphiddenhelp', 'backup'), 1));
$temp->add(new admin_setting_configselect('backup/backup_auto_skip_modif_days', new lang_string('skipmodifdays', 'backup'), new lang_string('skipmodifdayshelp', 'backup'), 30, array(
+7 -17
View File
@@ -33,13 +33,13 @@ if ($hassiteconfig) {
// activity modules
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
$ADMIN->add('modsettings', new admin_page_managemods());
$temp = new admin_settingpage('managemodulescommon', new lang_string('commonsettings', 'admin'));
$temp = new admin_settingpage('managemodulescommon', new lang_string('commonactivitysettings', 'admin'));
$temp->add(new admin_setting_configcheckbox('requiremodintro',
get_string('requiremodintro', 'admin'), get_string('requiremodintro_desc', 'admin'), 0));
$ADMIN->add('modsettings', $temp);
$ADMIN->add('modsettings', new admin_page_managemods());
foreach (core_plugin_manager::instance()->get_plugins_of_type('mod') as $plugin) {
/** @var \core\plugininfo\mod $plugin */
$plugin->load_settings($ADMIN, 'modsettings', $hassiteconfig);
@@ -80,9 +80,6 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_heading('manageauthscommonheading', new lang_string('commonsettings', 'admin'), ''));
$temp->add(new admin_setting_special_registerauth());
$temp->add(new admin_setting_configcheckbox('authloginviaemail', new lang_string('authloginviaemail', 'core_auth'), new lang_string('authloginviaemail_desc', 'core_auth'), 0));
$temp->add(new admin_setting_configcheckbox('allowaccountssameemail',
new lang_string('allowaccountssameemail', 'core_auth'),
new lang_string('allowaccountssameemail_desc', 'core_auth'), 0));
$temp->add(new admin_setting_configcheckbox('authpreventaccountcreation', new lang_string('authpreventaccountcreation', 'admin'), new lang_string('authpreventaccountcreation_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('loginpageautofocus', new lang_string('loginpageautofocus', 'admin'), new lang_string('loginpageautofocus_help', 'admin'), 0));
$temp->add(new admin_setting_configselect('guestloginbutton', new lang_string('guestloginbutton', 'auth'),
@@ -277,18 +274,11 @@ if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('webservicesettings', new lang_string('webservices', 'webservice')));
// Mobile
$temp = new admin_settingpage('mobile', new lang_string('mobile','admin'), 'moodle/site:config', false);
// We should wait to the installation to finish since we depend on some configuration values that are set once
// the admin user profile is configured.
if (!during_initial_install()) {
$enablemobiledocurl = new moodle_url(get_docs_url('Enable_mobile_web_services'));
$enablemobiledoclink = html_writer::link($enablemobiledocurl, new lang_string('documentation'));
$default = is_https() ? 1 : 0;
$temp->add(new admin_setting_enablemobileservice('enablemobilewebservice',
new lang_string('enablemobilewebservice', 'admin'),
new lang_string('configenablemobilewebservice', 'admin', $enablemobiledoclink), $default));
}
$enablemobiledocurl = new moodle_url(get_docs_url('Enable_mobile_web_services'));
$enablemobiledoclink = html_writer::link($enablemobiledocurl, new lang_string('documentation'));
$temp->add(new admin_setting_enablemobileservice('enablemobilewebservice',
new lang_string('enablemobilewebservice', 'admin'),
new lang_string('configenablemobilewebservice', 'admin', $enablemobiledoclink), 0));
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'admin'), new lang_string('configmobilecssurl','admin'), '', PARAM_URL));
$ADMIN->add('webservicesettings', $temp);
/// overview page
+2 -1
View File
@@ -35,7 +35,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$params = new stdClass();
$params->bytes = $defaultuserquota;
$params->displaysize = display_size($defaultuserquota);
$temp->add(new admin_setting_configtext('userquota', new lang_string('userquota', 'admin'), new lang_string('configuserquota', 'admin', $params), $defaultuserquota));
$temp->add(new admin_setting_configtext('userquota', new lang_string('userquota', 'admin'),
new lang_string('configuserquota', 'admin', $params), $defaultuserquota, PARAM_INT, 30));
$temp->add(new admin_setting_configcheckbox('allowobjectembed', new lang_string('allowobjectembed', 'admin'), new lang_string('configallowobjectembed', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('enabletrusttext', new lang_string('enabletrusttext', 'admin'), new lang_string('configenabletrusttext', 'admin'), 0));
+8 -5
View File
@@ -18,11 +18,10 @@ $ADMIN->add('server', $temp);
// "supportcontact" settingpage
$temp = new admin_settingpage('supportcontact', new lang_string('supportcontact','admin'));
if (isloggedin()) {
global $USER;
$primaryadminemail = $USER->email;
$primaryadminname = fullname($USER, true);
$primaryadmin = get_admin();
if ($primaryadmin) {
$primaryadminemail = $primaryadmin->email;
$primaryadminname = fullname($primaryadmin, true);
} else {
// no defaults during installation - admin user must be created first
$primaryadminemail = NULL;
@@ -215,6 +214,10 @@ if (empty($CFG->disableupdatenotifications)) {
$temp = new admin_settingpage('updatenotifications', new lang_string('updatenotifications', 'core_admin'));
$temp->add(new admin_setting_configcheckbox('updateautocheck', new lang_string('updateautocheck', 'core_admin'),
new lang_string('updateautocheck_desc', 'core_admin'), 1));
if (empty($CFG->disableupdateautodeploy)) {
$temp->add(new admin_setting_configcheckbox('updateautodeploy', new lang_string('updateautodeploy', 'core_admin'),
new lang_string('updateautodeploy_desc', 'core_admin'), 0));
}
$temp->add(new admin_setting_configselect('updateminmaturity', new lang_string('updateminmaturity', 'core_admin'),
new lang_string('updateminmaturity_desc', 'core_admin'), MATURITY_STABLE,
array(
+1 -1
View File
@@ -11,7 +11,7 @@ $hassiteconfig = has_capability('moodle/site:config', $systemcontext);
$ADMIN->add('root', new admin_externalpage('adminnotifications', new lang_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
$ADMIN->add('root', new admin_externalpage('registrationmoodleorg', new lang_string('registration', 'admin'),
"$CFG->wwwroot/$CFG->admin/registration/register.php?huburl=" . HUB_MOODLEORGHUBURL . "&hubname=Moodle.org"));
"$CFG->wwwroot/$CFG->admin/registration/register.php?huburl=" . HUB_MOODLEORGHUBURL . "&hubname=Moodle.org&sesskey=" . sesskey()));
$ADMIN->add('root', new admin_externalpage('registrationhub', new lang_string('registerwith', 'hub'),
"$CFG->wwwroot/$CFG->admin/registration/register.php", 'moodle/site:config', true));
$ADMIN->add('root', new admin_externalpage('registrationhubs', new lang_string('hubs', 'admin'),
+1 -1
View File
@@ -185,7 +185,7 @@ if ($hassiteconfig
new lang_string('showuseridentity_desc', 'admin'), array('email' => 1), array(
'idnumber' => new lang_string('idnumber'),
'email' => new lang_string('email'),
'phone1' => new lang_string('phone1'),
'phone1' => new lang_string('phone'),
'phone2' => new lang_string('phone2'),
'department' => new lang_string('department'),
'institution' => new lang_string('institution'),
-2
View File
@@ -27,7 +27,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I add "User Three (three@example.com)" user to "CH1" cohort members
And I follow "Browse list of users"
@javascript
Scenario: Filter user accounts by role and cohort
When I set the following fields to these values:
| courserole_rl | Student |
@@ -51,7 +50,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I should see "User Three"
And I should see "User Four"
@javascript
Scenario: Filter user accounts by confirm and authentication method
When I set the following fields to these values:
| Confirmed | No |
+12 -7
View File
@@ -120,8 +120,8 @@ $tags = '';
if ($options['profile']) {
$profile = $options['profile'];
if (!isset($CFG->behat_config[$profile])) {
echo "Invalid profile passed: " . $profile;
if (!isset($CFG->behat_config[$profile]) && !isset($CFG->behat_profiles[$profile])) {
echo "Invalid profile passed: " . $profile . PHP_EOL;
exit(1);
}
$extraopts[] = '--profile="' . $profile . '"';
@@ -226,22 +226,27 @@ $exitcodes = print_combined_run_output($processes, $stoponfail);
$time = round(microtime(true) - $time, 1);
echo "Finished in " . gmdate("G\h i\m s\s", $time) . PHP_EOL . PHP_EOL;
ksort($exitcodes);
// Print exit info from each run.
$status = false;
// Status bits contains pass/fail status of parallel runs.
$status = 0;
$processcounter = 0;
foreach ($exitcodes as $exitcode) {
$status = (bool)$status || (bool)$exitcode;
if ($exitcode) {
$status |= (1 << $processcounter);
}
$processcounter++;
}
// Run finished. Show exit code and output from individual process.
$verbose = empty($options['verbose']) ? false : true;
$verbose = $verbose || $status;
$verbose = $verbose || !empty($status);
// Show exit code from each process, if any process failed.
if ($verbose) {
// Echo exit codes.
echo "Exit codes for each behat run: " . PHP_EOL;
ksort($exitcodes);
foreach ($exitcodes as $run => $exitcode) {
echo $run . ": " . $exitcode . PHP_EOL;
}
@@ -263,7 +268,7 @@ print_each_process_info($processes, $verbose);
// Remove site symlink if necessary.
behat_config_manager::drop_parallel_site_links();
exit((int) $status);
exit($status);
/**
* Signal handler for terminal exit.
+1
View File
@@ -173,6 +173,7 @@ if ($options['install']) {
// This is only displayed once for parallel install.
if (empty($options['run'])) {
$runtestscommand = behat_command::get_behat_command(true, !empty($options['run']));
$runtestscommand .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
@@ -351,7 +351,7 @@ Feature: Set up contextual data for tests
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I expand "Setup" node
And I follow "Gradebook setup"
And I follow "Categories and items"
Then I should see "Test Grade Item 1"
And I follow "Edit Test Grade Item 1"
And I expand all fieldsets
@@ -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"
@@ -434,10 +434,22 @@ Feature: Set up contextual data for tests
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I expand "Setup" node
And I follow "Gradebook setup"
And I follow "Categories and items"
Then I should see "Test Outcome Grade Item 1"
And I follow "Edit Test Outcome Grade Item 1"
And the field "Outcome" matches value "Grade outcome 1"
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"
@@ -15,22 +15,20 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Forum post renderable for e-mail.
* Display environment used for running behat.
*
* @package mod_forum
* @copyright 2015 Andrew Nicols <andrew@nicols.co.uk>
* This file is used for behat testing to ensure cli and apache
* version of environment is same.
*
* @package tool_behat
* @copyright 2016 onwards Rajesh Taneja
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace mod_forum\output;
require_once(__DIR__.'/../../../../../../config.php');
defined('MOODLE_INTERNAL') || die();
// Only continue for behat site.
defined('BEHAT_SITE_RUNNING') || die();
/**
* Forum post renderable for use in e-mail.
*
* @copyright 2015 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class forum_post_email extends forum_post {
}
require_once($CFG->libdir.'/behat/classes/util.php');
echo json_encode(behat_util::get_environment(), true);
@@ -35,33 +35,53 @@ Feature: Verify that all form fields values can be get and set
And I log in as "admin"
And I expand "Site administration" node
And I expand "Appearance" node
And I am on site homepage
And I follow "Course 1"
And I follow "Reset"
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
And the "Unenrol users" select box should contain "No roles"
And the "Unenrol users" select box should contain "Student"
And the "Unenrol users" select box should contain "Non-editing teacher"
And the "Unenrol users" select box should contain "Teacher"
And the "Unenrol users" select box should contain "Manager"
And the "Unenrol users" select box should contain "No roles, Student, Non-editing teacher, Teacher, Manager"
And the "Unenrol users" select box should contain "Manager, Teacher, Non-editing teacher, Student, No roles"
And the "Unenrol users" select box should not contain "President"
And the "Unenrol users" select box should not contain "Baker"
And the "Unenrol users" select box should not contain "President, Baker"
And I follow "Manage tags"
# Select (multi-select) - We will check "I set the field...".
And I set the field "otagsadd" to "OT1, OT2, OT3, OT4, OT5"
And I press "Add official tags"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I follow "Test this one"
And I press "Create page"
# Select (multi-select) - Checking "the select box should contain".
And the "tags[officialtags][]" select box should contain "OT1"
And the "tags[officialtags][]" select box should contain "OT2"
And the "tags[officialtags][]" select box should contain "OT3"
And the "tags[officialtags][]" select box should contain "OT4"
And the "tags[officialtags][]" select box should contain "OT5"
And the "tags[officialtags][]" select box should contain "OT1, OT2, OT3, OT4, OT5"
And the "tags[officialtags][]" select box should contain "OT5, OT4, OT3, OT2, OT1"
And the "tags[officialtags][]" select box should not contain "OT6"
And the "tags[officialtags][]" select box should not contain "OT7"
And the "tags[officialtags][]" select box should not contain "OT6, OT7"
# Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
When I set the following fields to these values:
| HTML format | Student page contents |
| HTML format | Student page contents to be tagged |
| tags[officialtags][] | OT1, OT3, OT5 |
And I press "Save"
Then I should see "Student page contents" in the "region-main" "region"
Then I should see "Student page contents to be tagged" in the "region-main" "region"
And I should see "OT1" in the ".wiki-tags" "css_element"
And I should see "OT3" in the ".wiki-tags" "css_element"
And I should see "OT5" in the ".wiki-tags" "css_element"
And I should not see "OT2" in the ".wiki-tags" "css_element"
And I should not see "OT4" in the ".wiki-tags" "css_element"
And I follow "Edit"
# Select (multi-select) - Checking "I set the field".
And I set the field "tags[officialtags][]" to "OT2, OT4"
And I press "Save"
And I should see "OT2" in the ".wiki-tags" "css_element"
And I should see "OT4" in the ".wiki-tags" "css_element"
And I should not see "OT1" in the ".wiki-tags" "css_element"
And I should not see "OT3" in the ".wiki-tags" "css_element"
And I should not see "OT5" in the ".wiki-tags" "css_element"
And I follow "Edit"
# Select (multi-select) - Checking "the field matches value" and "the field does not match value".
And the field "tags[officialtags][]" matches value "OT2, OT4"
And the field "tags[officialtags][]" does not match value "OT4"
And the field "tags[officialtags][]" does not match value "OT2"
And the field "tags[officialtags][]" does not match value "OT1, OT3, OT5"
And I press "Cancel"
And I follow "Edit settings"
And I expand all fieldsets
# Checkbox - Checking "I set the field".
@@ -253,7 +253,8 @@ class tool_generator_course_backend extends tool_generator_backend {
$courserecord = array(
'shortname' => $this->shortname,
'fullname' => $this->fullname,
'numsections' => self::$paramsections[$this->size]
'numsections' => self::$paramsections[$this->size],
'startdate' => usergetmidnight(time())
);
if (strlen($this->summary) > 0) {
$courserecord['summary'] = $this->summary;
@@ -113,7 +113,3 @@ $backend = new tool_generator_course_backend(
FORMAT_HTML
);
$id = $backend->make();
if (empty($options['quiet'])) {
echo PHP_EOL.'Generated course: '.course_get_url($id).PHP_EOL;
}
+1 -1
View File
@@ -53,7 +53,7 @@ function tool_generator_pluginfile($course, $cm, $context, $filearea, $args, $fo
$file = $fs->get_file($context->id, 'tool_generator', $filearea, $args[0], '/', $args[1]);
// Send the file, always forcing download, we don't want options.
\core\session\manager::write_close();
session_get_instance()->write_close();
send_stored_file($file, 0, 0, true);
}
+363 -24
View File
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Provides tool_installaddon_installer class.
* Provides tool_installaddon_installer related classes
*
* @package tool_installaddon
* @subpackage classes
@@ -103,16 +103,69 @@ class tool_installaddon_installer {
}
/**
* Makes a unique writable storage for uploaded ZIP packages.
* Saves the ZIP file from the {@link tool_installaddon_installfromzip_form} form
*
* We need the saved ZIP to survive across multiple requests so that it can
* be used by the plugin manager after the installation is confirmed. In
* other words, we cannot use make_request_directory() here.
* The file is saved into the given temporary location for inspection and eventual
* deployment. The form is expected to be submitted and validated.
*
* @return string full path to the directory
* @param tool_installaddon_installfromzip_form $form
* @param string $targetdir full path to the directory where the ZIP should be stored to
* @return string filename of the saved file relative to the given target
*/
public function make_installfromzip_storage() {
return make_unique_writable_directory(make_temp_directory('tool_installaddon'));
public function save_installfromzip_file(tool_installaddon_installfromzip_form $form, $targetdir) {
$filename = clean_param($form->get_new_filename('zipfile'), PARAM_FILE);
$form->save_file('zipfile', $targetdir.'/'.$filename);
return $filename;
}
/**
* Extracts the saved file previously saved by {self::save_installfromzip_file()}
*
* The list of files found in the ZIP is returned via $zipcontentfiles parameter
* by reference. The format of that list is array of (string)filerelpath => (bool|string)
* where the array value is either true or a string describing the problematic file.
*
* @see zip_packer::extract_to_pathname()
* @param string $zipfilepath full path to the saved ZIP file
* @param string $targetdir full path to the directory to extract the ZIP file to
* @param string $rootdir explicitly rename the root directory of the ZIP into this non-empty value
* @param array list of extracted files as returned by {@link zip_packer::extract_to_pathname()}
*/
public function extract_installfromzip_file($zipfilepath, $targetdir, $rootdir = '') {
global $CFG;
require_once($CFG->libdir.'/filelib.php');
$fp = get_file_packer('application/zip');
$files = $fp->extract_to_pathname($zipfilepath, $targetdir);
if (!$files) {
return array();
}
if (!empty($rootdir)) {
$files = $this->rename_extracted_rootdir($targetdir, $rootdir, $files);
}
// Sometimes zip may not contain all parent directories, add them to make it consistent.
foreach ($files as $path => $status) {
if ($status !== true) {
continue;
}
$parts = explode('/', trim($path, '/'));
while (array_pop($parts)) {
if (empty($parts)) {
break;
}
$dir = implode('/', $parts).'/';
if (!isset($files[$dir])) {
$files[$dir] = true;
}
}
}
return $files;
}
/**
@@ -133,6 +186,57 @@ class tool_installaddon_installer {
return $menu;
}
/**
* Returns the full path of the root of the given plugin type
*
* Null is returned if the plugin type is not known. False is returned if the plugin type
* root is expected but not found. Otherwise, string is returned.
*
* @param string $plugintype
* @return string|bool|null
*/
public function get_plugintype_root($plugintype) {
$plugintypepath = null;
foreach (core_component::get_plugin_types() as $type => $fullpath) {
if ($type === $plugintype) {
$plugintypepath = $fullpath;
break;
}
}
if (is_null($plugintypepath)) {
return null;
}
if (!is_dir($plugintypepath)) {
return false;
}
return $plugintypepath;
}
/**
* Is it possible to create a new plugin directory for the given plugin type?
*
* @throws coding_exception for invalid plugin types or non-existing plugin type locations
* @param string $plugintype
* @return boolean
*/
public function is_plugintype_writable($plugintype) {
$plugintypepath = $this->get_plugintype_root($plugintype);
if (is_null($plugintypepath)) {
throw new coding_exception('Unknown plugin type!');
}
if ($plugintypepath === false) {
throw new coding_exception('Plugin type location does not exist!');
}
return is_writable($plugintypepath);
}
/**
* Hook method to handle the remote request to install an add-on
*
@@ -141,12 +245,15 @@ class tool_installaddon_installer {
* it.
*
* This hook is called early from admin/tool/installaddon/index.php page so that
* it has opportunity to take over the UI and display the first confirmation screen.
* it has opportunity to take over the UI.
*
* @param tool_installaddon_renderer $output
* @param string|null $request
* @param bool $confirmed
*/
public function handle_remote_request(tool_installaddon_renderer $output, $request) {
public function handle_remote_request(tool_installaddon_renderer $output, $request, $confirmed = false) {
global $CFG;
require_once(dirname(__FILE__).'/pluginfo_client.php');
if (is_null($request)) {
return;
@@ -160,34 +267,196 @@ class tool_installaddon_installer {
}
list($plugintype, $pluginname) = core_component::normalize_component($data->component);
$pluginman = core_plugin_manager::instance();
$plugintypepath = $pluginman->get_plugintype_root($plugintype);
$plugintypepath = $this->get_plugintype_root($plugintype);
if (file_exists($plugintypepath.'/'.$pluginname)) {
echo $output->remote_request_alreadyinstalled_page($data, $this->index_url());
exit();
}
if (!$pluginman->is_plugintype_writable($plugintype)) {
if (!$this->is_plugintype_writable($plugintype)) {
$continueurl = $this->index_url(array('installaddonrequest' => $request));
echo $output->remote_request_permcheck_page($data, $plugintypepath, $continueurl, $this->index_url());
exit();
}
if (!$pluginman->is_remote_plugin_installable($data->component, $data->version, $reason)) {
$data->reason = $reason;
echo $output->remote_request_non_installable_page($data, $this->index_url());
$continueurl = $this->index_url(array(
'installaddonrequest' => $request,
'confirm' => 1,
'sesskey' => sesskey()));
if (!$confirmed) {
echo $output->remote_request_confirm_page($data, $continueurl, $this->index_url());
exit();
}
$continueurl = $this->index_url(array(
'installremote' => $data->component,
'installremoteversion' => $data->version
));
// The admin has confirmed their intention to install the add-on.
require_sesskey();
echo $output->remote_request_confirm_page($data, $continueurl, $this->index_url());
exit();
// Fetch the plugin info. The essential information is the URL to download the ZIP
// and the MD5 hash of the ZIP, obtained via HTTPS.
$client = tool_installaddon_pluginfo_client::instance();
try {
$pluginfo = $client->get_pluginfo($data->component, $data->version);
} catch (tool_installaddon_pluginfo_exception $e) {
if (debugging()) {
throw $e;
} else {
echo $output->remote_request_pluginfo_exception($data, $e, $this->index_url());
exit();
}
}
// Fetch the ZIP with the plugin version
$jobid = md5(rand().uniqid('', true));
$sourcedir = make_temp_directory('tool_installaddon/'.$jobid.'/source');
$zipfilename = 'downloaded.zip';
try {
$this->download_file($pluginfo->downloadurl, $sourcedir.'/'.$zipfilename);
} catch (tool_installaddon_installer_exception $e) {
if (debugging()) {
throw $e;
} else {
echo $output->installer_exception($e, $this->index_url());
exit();
}
}
// Check the MD5 checksum
$md5expected = $pluginfo->downloadmd5;
$md5actual = md5_file($sourcedir.'/'.$zipfilename);
if ($md5expected !== $md5actual) {
$e = new tool_installaddon_installer_exception('err_zip_md5', array('expected' => $md5expected, 'actual' => $md5actual));
if (debugging()) {
throw $e;
} else {
echo $output->installer_exception($e, $this->index_url());
exit();
}
}
// Redirect to the validation page.
$nexturl = new moodle_url('/admin/tool/installaddon/validate.php', array(
'sesskey' => sesskey(),
'jobid' => $jobid,
'zip' => $zipfilename,
'type' => $plugintype));
redirect($nexturl);
}
/**
* Download the given file into the given destination.
*
* This is basically a simplified version of {@link download_file_content()} from
* Moodle itself, tuned for fetching files from moodle.org servers. Same code is used
* in mdeploy.php for fetching available updates.
*
* @param string $source file url starting with http(s)://
* @param string $target store the downloaded content to this file (full path)
* @throws tool_installaddon_installer_exception
*/
public function download_file($source, $target) {
global $CFG;
require_once($CFG->libdir.'/filelib.php');
$targetfile = fopen($target, 'w');
if (!$targetfile) {
throw new tool_installaddon_installer_exception('err_download_write_file', $target);
}
$options = array(
'file' => $targetfile,
'timeout' => 300,
'followlocation' => true,
'maxredirs' => 3,
'ssl_verifypeer' => true,
'ssl_verifyhost' => 2,
);
$curl = new curl(array('proxy' => true));
$result = $curl->download_one($source, null, $options);
$curlinfo = $curl->get_info();
fclose($targetfile);
if ($result !== true) {
throw new tool_installaddon_installer_exception('err_curl_exec', array(
'url' => $source, 'errorno' => $curl->get_errno(), 'error' => $result));
} else if (empty($curlinfo['http_code']) or $curlinfo['http_code'] != 200) {
throw new tool_installaddon_installer_exception('err_curl_http_code', array(
'url' => $source, 'http_code' => $curlinfo['http_code']));
} else if (isset($curlinfo['ssl_verify_result']) and $curlinfo['ssl_verify_result'] != 0) {
throw new tool_installaddon_installer_exception('err_curl_ssl_verify', array(
'url' => $source, 'ssl_verify_result' => $curlinfo['ssl_verify_result']));
}
}
/**
* Moves the given source into a new location recursively
*
* This is cross-device safe implementation to be used instead of the native rename() function.
* See https://bugs.php.net/bug.php?id=54097 for more details.
*
* @param string $source full path to the existing directory
* @param string $target full path to the new location of the directory
* @param int $dirpermissions
* @param int $filepermissions
*/
public function move_directory($source, $target, $dirpermissions, $filepermissions) {
if (file_exists($target)) {
throw new tool_installaddon_installer_exception('err_folder_already_exists', array('path' => $target));
}
if (is_dir($source)) {
$handle = opendir($source);
} else {
throw new tool_installaddon_installer_exception('err_no_such_folder', array('path' => $source));
}
if (!file_exists($target)) {
// Do not use make_writable_directory() here - it is intended for dataroot only.
mkdir($target, true);
@chmod($target, $dirpermissions);
}
if (!is_writable($target)) {
closedir($handle);
throw new tool_installaddon_installer_exception('err_folder_not_writable', array('path' => $target));
}
while ($filename = readdir($handle)) {
$sourcepath = $source.'/'.$filename;
$targetpath = $target.'/'.$filename;
if ($filename === '.' or $filename === '..') {
continue;
}
if (is_dir($sourcepath)) {
$this->move_directory($sourcepath, $targetpath, $dirpermissions, $filepermissions);
} else {
rename($sourcepath, $targetpath);
@chmod($targetpath, $filepermissions);
}
}
closedir($handle);
rmdir($source);
clearstatcache();
}
/**
@@ -197,11 +466,11 @@ class tool_installaddon_installer {
* are supported.
*
* @param string $zipfilepath full path to the saved ZIP file
* @param string $workdir full path to the directory we can use for extracting required bits from the archive
* @return string|bool declared component name or false if unable to detect
*/
public function detect_plugin_component($zipfilepath) {
public function detect_plugin_component($zipfilepath, $workdir) {
$workdir = make_request_directory();
$versionphp = $this->extract_versionphp_file($zipfilepath, $workdir);
if (empty($versionphp)) {
@@ -270,6 +539,58 @@ class tool_installaddon_installer {
return true;
}
/**
* Renames the root directory of the extracted ZIP package.
*
* This method does not validate the presence of the single root directory
* (the validator does it later). It just searches for the first directory
* under the given location and renames it.
*
* The method will not rename the root if the requested location already
* exists.
*
* @param string $dirname the location of the extracted ZIP package
* @param string $rootdir the requested name of the root directory
* @param array $files list of extracted files
* @return array eventually amended list of extracted files
*/
protected function rename_extracted_rootdir($dirname, $rootdir, array $files) {
if (!is_dir($dirname)) {
debugging('Unable to rename rootdir of non-existing content', DEBUG_DEVELOPER);
return $files;
}
if (file_exists($dirname.'/'.$rootdir)) {
debugging('Unable to rename rootdir to already existing folder', DEBUG_DEVELOPER);
return $files;
}
$found = null; // The name of the first subdirectory under the $dirname.
foreach (scandir($dirname) as $item) {
if (substr($item, 0, 1) === '.') {
continue;
}
if (is_dir($dirname.'/'.$item)) {
$found = $item;
break;
}
}
if (!is_null($found)) {
if (rename($dirname.'/'.$found, $dirname.'/'.$rootdir)) {
$newfiles = array();
foreach ($files as $filepath => $status) {
$newpath = preg_replace('~^'.preg_quote($found.'/').'~', preg_quote($rootdir.'/'), $filepath);
$newfiles[$newpath] = $status;
}
return $newfiles;
}
}
return $files;
}
/**
* Decode the request from the Moodle Plugins directory
*
@@ -407,3 +728,21 @@ class tool_installaddon_installer {
return false;
}
}
/**
* General exception thrown by {@link tool_installaddon_installer} class
*
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_installaddon_installer_exception extends moodle_exception {
/**
* @param string $errorcode exception description identifier
* @param mixed $debuginfo debugging data to display
*/
public function __construct($errorcode, $a=null, $debuginfo=null) {
parent::__construct($errorcode, 'tool_installaddon', '', $a, print_r($debuginfo, true));
}
}
@@ -86,21 +86,6 @@ class tool_installaddon_installfromzip_form extends moodleform {
$mform->insertElementBefore($typedetectionfailed, 'permcheck');
}
/**
* Warn that the selected plugin type does not match the detected one.
*
* @param string $detected detected plugin type
*/
public function selected_plugintype_mismatch($detected) {
$mform = $this->_form;
$mform->addRule('plugintype', get_string('required'), 'required', null, 'client');
$mform->setAdvanced('plugintype', false);
$mform->setAdvanced('permcheck', false);
$mform->insertElementBefore($mform->createElement('static', 'selectedplugintypemismatch', '',
html_writer::span(get_string('typedetectionmismatch', 'tool_installaddon', $detected), 'error')), 'permcheck');
}
/**
* Validate the form fields
*
@@ -110,12 +95,12 @@ class tool_installaddon_installfromzip_form extends moodleform {
*/
public function validation($data, $files) {
$pluginman = core_plugin_manager::instance();
$installer = $this->_customdata['installer'];
$errors = parent::validation($data, $files);
if (!empty($data['plugintype'])) {
if (!$pluginman->is_plugintype_writable($data['plugintype'])) {
$path = $pluginman->get_plugintype_root($data['plugintype']);
if (!$installer->is_plugintype_writable($data['plugintype'])) {
$path = $installer->get_plugintype_root($data['plugintype']);
$errors['plugintype'] = get_string('permcheckresultno', 'tool_installaddon', array('path' => $path));
}
}
@@ -0,0 +1,209 @@
<?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/>.
/**
* Provides tool_installaddon_pluginfo_client and related classes
*
* @package tool_installaddon
* @subpackage classes
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Implements a client for https://download.moodle.org/api/x.y/pluginfo.php service
*
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_installaddon_pluginfo_client {
/**
* Factory method returning an instance of this class.
*
* @return tool_installaddon_pluginfo_client
*/
public static function instance() {
return new static();
}
/**
* Return the information about the plugin
*
* @throws tool_installaddon_pluginfo_exception
* @param string $component
* @param string $version
* @return stdClass the pluginfo structure
*/
public function get_pluginfo($component, $version) {
$response = $this->call_service($component, $version);
$response = $this->decode_response($response);
$this->validate_response($response);
return $response->pluginfo;
}
// End of external API /////////////////////////////////////////////////
/**
* @see self::instance()
*/
protected function __construct() {
}
/**
* Calls the pluginfo.php service and returns the raw response
*
* @param string $component
* @param string $version
* @return string
*/
protected function call_service($component, $version) {
global $CFG;
require_once($CFG->libdir.'/filelib.php');
$curl = new curl(array('proxy' => true));
$response = $curl->get(
$this->service_request_url(),
$this->service_request_params($component, $version),
$this->service_request_options());
$curlerrno = $curl->get_errno();
$curlinfo = $curl->get_info();
if (!empty($curlerrno)) {
throw new tool_installaddon_pluginfo_exception('err_curl_exec', array(
'url' => $curlinfo['url'], 'errno' => $curlerrno, 'error' => $curl->error));
} else if ($curlinfo['http_code'] != 200) {
throw new tool_installaddon_pluginfo_exception('err_curl_http_code', array(
'url' => $curlinfo['url'], 'http_code' => $curlinfo['http_code']));
} else if (isset($curlinfo['ssl_verify_result']) and $curlinfo['ssl_verify_result'] != 0) {
throw new tool_installaddon_pluginfo_exception('err_curl_ssl_verify', array(
'url' => $curlinfo['url'], 'ssl_verify_result' => $curlinfo['ssl_verify_result']));
}
return $response;
}
/**
* Return URL to the pluginfo.php service
*
* @return moodle_url
*/
protected function service_request_url() {
global $CFG;
if (!empty($CFG->config_php_settings['alternativepluginfoserviceurl'])) {
$url = $CFG->config_php_settings['alternativepluginfoserviceurl'];
} else {
$url = 'https://download.moodle.org/api/1.2/pluginfo.php';
}
return new moodle_url($url);
}
/**
* Return list of pluginfo service parameters
*
* @param string $component
* @param string $version
* @return array
*/
protected function service_request_params($component, $version) {
$params = array();
$params['format'] = 'json';
$params['plugin'] = $component.'@'.$version;
return $params;
}
/**
* Return cURL options for the service request
*
* @return array of (string)param => (string)value
*/
protected function service_request_options() {
global $CFG;
$options = array(
'CURLOPT_SSL_VERIFYHOST' => 2, // this is the default in {@link curl} class but just in case
'CURLOPT_SSL_VERIFYPEER' => true,
);
return $options;
}
/**
* Decode the raw service response
*
* @param string $raw
* @return stdClass
*/
protected function decode_response($raw) {
return json_decode($raw);
}
/**
* Validate decoded service response
*
* @param stdClass $response
*/
protected function validate_response($response) {
if (empty($response)) {
throw new tool_installaddon_pluginfo_exception('err_response_empty');
}
if (empty($response->status) or $response->status !== 'OK') {
throw new tool_installaddon_pluginfo_exception('err_response_status', $response->status);
}
if (empty($response->apiver) or $response->apiver !== '1.2') {
throw new tool_installaddon_pluginfo_exception('err_response_api_version', $response->apiver);
}
if (empty($response->pluginfo->component) or empty($response->pluginfo->downloadurl)
or empty($response->pluginfo->downloadmd5)) {
throw new tool_installaddon_pluginfo_exception('err_response_pluginfo');
}
}
}
/**
* General exception thrown by {@link tool_installaddon_pluginfo_client} class
*
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_installaddon_pluginfo_exception extends moodle_exception {
/**
* @param string $errorcode exception description identifier
* @param mixed $debuginfo debugging data to display
*/
public function __construct($errorcode, $a=null, $debuginfo=null) {
parent::__construct($errorcode, 'tool_installaddon', '', $a, print_r($debuginfo, true));
}
}
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -20,34 +21,27 @@
* Uses fragments of the local_plugins_archive_validator class copyrighted by
* Marina Glancy that is part of the local_plugins plugin.
*
* @package core_plugin
* @subpackage validation
* @copyright 2013, 2015 David Mudrak <david@moodle.com>
* @package tool_installaddon
* @subpackage classes
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core\update;
use core_component;
use core_plugin_manager;
use help_icon;
use coding_exception;
defined('MOODLE_INTERNAL') || die();
if (!defined('T_ML_COMMENT')) {
define('T_ML_COMMENT', T_COMMENT);
define('T_ML_COMMENT', T_COMMENT);
} else {
define('T_DOC_COMMENT', T_ML_COMMENT);
define('T_DOC_COMMENT', T_ML_COMMENT);
}
/**
* Validates the contents of extracted plugin ZIP file
*
* @copyright 2013, 2015 David Mudrak <david@moodle.com>
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class validator {
class tool_installaddon_validator {
/** Critical error message level, causes the validation fail. */
const ERROR = 'error';
@@ -85,12 +79,15 @@ class validator {
/** @var string|null the name of found English language file without the .php extension */
protected $langfilename = null;
/** @var moodle_url|null URL to continue with the installation of validated add-on */
protected $continueurl = null;
/**
* Factory method returning instance of the validator
*
* @param string $zipcontentpath full path to the extracted ZIP contents
* @param array $zipcontentfiles (string)filerelpath => (bool|string)true or error
* @return \core\update\validator
* @return tool_installaddon_validator
*/
public static function instance($zipcontentpath, array $zipcontentfiles) {
return new static($zipcontentpath, $zipcontentfiles);
@@ -161,76 +158,13 @@ class validator {
return $this->messages;
}
/**
* Returns human readable localised name of the given log level.
*
* @param string $level e.g. self::INFO
* @return string
*/
public function message_level_name($level) {
return get_string('validationmsglevel_'.$level, 'core_plugin');
}
/**
* If defined, returns human readable validation code.
*
* Otherwise, it simply returns the code itself as a fallback.
*
* @param string $msgcode
* @return string
*/
public function message_code_name($msgcode) {
$stringman = get_string_manager();
if ($stringman->string_exists('validationmsg_'.$msgcode, 'core_plugin')) {
return get_string('validationmsg_'.$msgcode, 'core_plugin');
}
return $msgcode;
}
/**
* Returns help icon for the message code if defined.
*
* @param string $msgcode
* @return \help_icon|false
*/
public function message_help_icon($msgcode) {
$stringman = get_string_manager();
if ($stringman->string_exists('validationmsg_'.$msgcode.'_help', 'core_plugin')) {
return new help_icon('validationmsg_'.$msgcode, 'core_plugin');
}
return false;
}
/**
* Localizes the message additional info if it exists.
*
* @param string $msgcode
* @param array|string|null $addinfo value for the $a placeholder in the string
* @return string
*/
public function message_code_info($msgcode, $addinfo) {
$stringman = get_string_manager();
if ($addinfo !== null and $stringman->string_exists('validationmsg_'.$msgcode.'_info', 'core_plugin')) {
return get_string('validationmsg_'.$msgcode.'_info', 'core_plugin', $addinfo);
}
return '';
}
/**
* Return the information provided by the the plugin's version.php
*
* If version.php was not found in the plugin, null is returned. Otherwise
* the array is returned. It may be empty if no information was parsed
* (which should not happen).
* If version.php was not found in the plugin (which is tolerated for
* themes only at the moment), null is returned. Otherwise the array
* is returned. It may be empty if no information was parsed (which
* should not happen).
*
* @return null|array
*/
@@ -260,11 +194,29 @@ class validator {
return $this->rootdir;
}
// End of external API.
/**
* Sets the URL to continue to after successful validation
*
* @param moodle_url $url
*/
public function set_continue_url(moodle_url $url) {
$this->continueurl = $url;
}
/**
* No public constructor, use {@link self::instance()} instead.
* Get the URL to continue to after successful validation
*
* Null is returned if the URL has not been explicitly set by the caller.
*
* @return moodle_url|null
*/
public function get_continue_url() {
return $this->continueurl;
}
// End of external API /////////////////////////////////////////////////////
/**
* @param string $zipcontentpath full path to the extracted ZIP contents
* @param array $zipcontentfiles (string)filerelpath => (bool|string)true or error
*/
@@ -273,17 +225,15 @@ class validator {
$this->extractfiles = $zipcontentfiles;
}
// Validation methods.
// Validation methods //////////////////////////////////////////////////////
/**
* Returns false if files in the ZIP do not have required layout.
*
* @return bool
* @return bool false if files in the ZIP do not have required layout
*/
protected function validate_files_layout() {
if (!is_array($this->extractfiles) or count($this->extractfiles) < 4) {
// We need the English language pack with the name of the plugin at least.
// We need the English language pack with the name of the plugin at least
$this->add_message(self::ERROR, 'filesnumber');
return false;
}
@@ -304,8 +254,7 @@ class validator {
foreach (array_keys($this->extractfiles) as $filerelname) {
$matches = array();
if (!preg_match("#^([^/]+)/#", $filerelname, $matches)
or (!is_null($this->rootdir) and $this->rootdir !== $matches[1])) {
if (!preg_match("#^([^/]+)/#", $filerelname, $matches) or (!is_null($this->rootdir) and $this->rootdir !== $matches[1])) {
$this->add_message(self::ERROR, 'onedir');
return false;
}
@@ -323,9 +272,7 @@ class validator {
}
/**
* Returns false if the version.php file does not declare required information.
*
* @return bool
* @return bool false if the version.php file does not declare required information
*/
protected function validate_version_php() {
@@ -353,21 +300,29 @@ class validator {
$this->versionphp = array();
$info = $this->parse_version_php($fullpath);
if (isset($info['module->version'])) {
$this->add_message(self::ERROR, 'versionphpsyntax', '$module');
return false;
}
if (isset($info['plugin->version'])) {
$this->versionphp['version'] = $info['plugin->version'];
$this->add_message(self::INFO, 'pluginversion', $this->versionphp['version']);
if ($this->assertions['plugintype'] === 'mod') {
$type = 'module';
} else {
$this->add_message(self::ERROR, 'missingversion');
return false;
$type = 'plugin';
}
if (isset($info['plugin->requires'])) {
$this->versionphp['requires'] = $info['plugin->requires'];
if (!isset($info[$type.'->version'])) {
if ($type === 'module' and isset($info['plugin->version'])) {
// Expect the activity module using $plugin in version.php instead of $module.
$type = 'plugin';
$this->versionphp['version'] = $info[$type.'->version'];
$this->add_message(self::INFO, 'pluginversion', $this->versionphp['version']);
} else {
$this->add_message(self::ERROR, 'missingversion');
return false;
}
} else {
$this->versionphp['version'] = $info[$type.'->version'];
$this->add_message(self::INFO, 'pluginversion', $this->versionphp['version']);
}
if (isset($info[$type.'->requires'])) {
$this->versionphp['requires'] = $info[$type.'->requires'];
if ($this->versionphp['requires'] > $this->assertions['moodleversion']) {
$this->add_message(self::ERROR, 'requiresmoodle', $this->versionphp['requires']);
return false;
@@ -375,27 +330,24 @@ class validator {
$this->add_message(self::INFO, 'requiresmoodle', $this->versionphp['requires']);
}
if (!isset($info['plugin->component'])) {
$this->add_message(self::ERROR, 'missingcomponent');
return false;
if (isset($info[$type.'->component'])) {
$this->versionphp['component'] = $info[$type.'->component'];
list($reqtype, $reqname) = core_component::normalize_component($this->versionphp['component']);
if ($reqtype !== $this->assertions['plugintype']) {
$this->add_message(self::ERROR, 'componentmismatchtype', array(
'expected' => $this->assertions['plugintype'],
'found' => $reqtype));
return false;
}
if ($reqname !== $this->rootdir) {
$this->add_message(self::ERROR, 'componentmismatchname', $reqname);
return false;
}
$this->add_message(self::INFO, 'componentmatch', $this->versionphp['component']);
}
$this->versionphp['component'] = $info['plugin->component'];
list($reqtype, $reqname) = core_component::normalize_component($this->versionphp['component']);
if ($reqtype !== $this->assertions['plugintype']) {
$this->add_message(self::ERROR, 'componentmismatchtype', array(
'expected' => $this->assertions['plugintype'],
'found' => $reqtype));
return false;
}
if ($reqname !== $this->rootdir) {
$this->add_message(self::ERROR, 'componentmismatchname', $reqname);
return false;
}
$this->add_message(self::INFO, 'componentmatch', $this->versionphp['component']);
if (isset($info['plugin->maturity'])) {
$this->versionphp['maturity'] = $info['plugin->maturity'];
if (isset($info[$type.'->maturity'])) {
$this->versionphp['maturity'] = $info[$type.'->maturity'];
if ($this->versionphp['maturity'] === 'MATURITY_STABLE') {
$this->add_message(self::INFO, 'maturity', $this->versionphp['maturity']);
} else {
@@ -403,8 +355,8 @@ class validator {
}
}
if (isset($info['plugin->release'])) {
$this->versionphp['release'] = $info['plugin->release'];
if (isset($info[$type.'->release'])) {
$this->versionphp['release'] = $info[$type.'->release'];
$this->add_message(self::INFO, 'release', $this->versionphp['release']);
}
@@ -412,9 +364,7 @@ class validator {
}
/**
* Returns false if the English language pack is not provided correctly.
*
* @return bool
* @return bool false if the English language pack is not provided correctly
*/
protected function validate_language_pack() {
@@ -463,10 +413,9 @@ class validator {
return true;
}
/**
* Returns false of the given add-on can't be installed into its location.
*
* @return bool
* @return bool false of the given add-on can't be installed into its location
*/
public function validate_target_location() {
@@ -485,42 +434,29 @@ class validator {
throw new coding_exception('Plugin type location does not exist!');
}
// Always check that the plugintype root is writable.
if (!is_writable($plugintypepath)) {
$this->add_message(self::ERROR, 'pathwritable', $plugintypepath);
$target = $plugintypepath.'/'.$this->rootdir;
if (file_exists($target)) {
$this->add_message(self::ERROR, 'targetexists', $target);
return false;
} else {
$this->add_message(self::INFO, 'pathwritable', $plugintypepath);
}
// The target location itself may or may not exist. Even if installing an
// available update, the code could have been removed by accident (and
// be reported as missing) etc. So we just make sure that the code
// can be replaced if it already exists.
$target = $plugintypepath.'/'.$this->rootdir;
if (file_exists($target)) {
if (!is_dir($target)) {
$this->add_message(self::ERROR, 'targetnotdir', $target);
return false;
}
$this->add_message(self::WARNING, 'targetexists', $target);
if ($this->get_plugin_manager()->is_directory_removable($target)) {
$this->add_message(self::INFO, 'pathwritable', $target);
} else {
$this->add_message(self::ERROR, 'pathwritable', $target);
return false;
}
if (is_writable($plugintypepath)) {
$this->add_message(self::INFO, 'pathwritable', $plugintypepath);
} else {
$this->add_message(self::ERROR, 'pathwritable', $plugintypepath);
return false;
}
return true;
}
// Helper methods.
// Helper methods //////////////////////////////////////////////////////////
/**
* Get as much information from existing version.php as possible
*
* @param string $fullpath full path to the version.php file
* @param string full path to the version.php file
* @return array of found meta-info declarations
*/
protected function parse_version_php($fullpath) {
@@ -586,52 +522,54 @@ class validator {
list($id, $text) = $token;
}
switch ($id) {
case T_WHITESPACE:
case T_COMMENT:
case T_ML_COMMENT:
case T_DOC_COMMENT:
// Ignore whitespaces, inline comments, multiline comments and docblocks.
break;
case T_OPEN_TAG:
// Start processing.
$doprocess = true;
break;
case T_CLOSE_TAG:
// Stop processing.
$doprocess = false;
break;
default:
// Anything else is within PHP tags, return it as is.
if ($doprocess) {
$output .= $text;
if ($text === 'function') {
// Explicitly keep the whitespace that would be ignored.
$output .= ' ';
}
case T_WHITESPACE:
case T_COMMENT:
case T_ML_COMMENT:
case T_DOC_COMMENT:
// Ignore whitespaces, inline comments, multiline comments and docblocks.
break;
case T_OPEN_TAG:
// Start processing.
$doprocess = true;
break;
case T_CLOSE_TAG:
// Stop processing.
$doprocess = false;
break;
default:
// Anything else is within PHP tags, return it as is.
if ($doprocess) {
$output .= $text;
if ($text === 'function') {
// Explicitly keep the whitespace that would be ignored.
$output .= ' ';
}
break;
}
break;
}
}
return $output;
}
/**
* Returns the full path to the root directory of the given plugin type.
* Returns the full path to the root directory of the given plugin type
*
* @param string $plugintype
* @return string|null
*/
public function get_plugintype_location($plugintype) {
return $this->get_plugin_manager()->get_plugintype_root($plugintype);
}
/**
* Returns plugin manager to use.
*
* @return core_plugin_manager
*/
protected function get_plugin_manager() {
return core_plugin_manager::instance();
$plugintypepath = null;
foreach (core_component::get_plugin_types() as $type => $fullpath) {
if ($type === $plugintype) {
$plugintypepath = $fullpath;
break;
}
}
return $plugintypepath;
}
}
+78
View File
@@ -0,0 +1,78 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Deploy the validated contents of the ZIP package to the $CFG->dirroot
*
* @package tool_installaddon
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir.'/filelib.php');
require_login();
require_capability('moodle/site:config', context_system::instance());
if (!empty($CFG->disableonclickaddoninstall)) {
notice(get_string('featuredisabled', 'tool_installaddon'));
}
require_sesskey();
$jobid = required_param('jobid', PARAM_ALPHANUM);
$plugintype = required_param('type', PARAM_ALPHANUMEXT);
$pluginname = required_param('name', PARAM_PLUGIN);
$zipcontentpath = $CFG->tempdir.'/tool_installaddon/'.$jobid.'/contents';
if (!is_dir($zipcontentpath)) {
debugging('Invalid location of the extracted ZIP package: '.s($zipcontentpath), DEBUG_DEVELOPER);
redirect(new moodle_url('/admin/tool/installaddon/index.php'),
get_string('invaliddata', 'core_error'));
}
if (!is_dir($zipcontentpath.'/'.$pluginname)) {
debugging('Invalid location of the plugin root directory: '.$zipcontentpath.'/'.$pluginname, DEBUG_DEVELOPER);
redirect(new moodle_url('/admin/tool/installaddon/index.php'),
get_string('invaliddata', 'core_error'));
}
$installer = tool_installaddon_installer::instance();
if (!$installer->is_plugintype_writable($plugintype)) {
debugging('Plugin type location not writable', DEBUG_DEVELOPER);
redirect(new moodle_url('/admin/tool/installaddon/index.php'),
get_string('invaliddata', 'core_error'));
}
$plugintypepath = $installer->get_plugintype_root($plugintype);
if (file_exists($plugintypepath.'/'.$pluginname)) {
debugging('Target location already exists', DEBUG_DEVELOPER);
redirect(new moodle_url('/admin/tool/installaddon/index.php'),
get_string('invaliddata', 'core_error'));
}
// Copy permissions form the plugin type directory.
$dirpermissions = fileperms($plugintypepath);
$filepermissions = ($dirpermissions & 0666); // Strip execute flags.
$installer->move_directory($zipcontentpath.'/'.$pluginname, $plugintypepath.'/'.$pluginname, $dirpermissions, $filepermissions);
fulldelete($CFG->tempdir.'/tool_installaddon/'.$jobid);
redirect(new moodle_url('/admin'));
+28 -88
View File
@@ -28,11 +28,10 @@ require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('tool_installaddon_index');
if (!empty($CFG->disableupdateautodeploy)) {
if (!empty($CFG->disableonclickaddoninstall)) {
notice(get_string('featuredisabled', 'tool_installaddon'));
}
$pluginman = core_plugin_manager::instance();
$installer = tool_installaddon_installer::instance();
$output = $PAGE->get_renderer('tool_installaddon');
@@ -40,55 +39,8 @@ $output->set_installer_instance($installer);
// Handle the eventual request for installing from remote repository.
$remoterequest = optional_param('installaddonrequest', null, PARAM_RAW);
$installer->handle_remote_request($output, $remoterequest);
// Handle the confirmed installation request.
$installremote = optional_param('installremote', null, PARAM_COMPONENT);
$installremoteversion = optional_param('installremoteversion', null, PARAM_INT);
$installremoteconfirm = optional_param('installremoteconfirm', false, PARAM_BOOL);
if ($installremote and $installremoteversion) {
require_sesskey();
require_once($CFG->libdir.'/upgradelib.php');
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
if ($pluginman->is_remote_plugin_installable($installremote, $installremoteversion)) {
$installable = array($pluginman->get_remote_plugin_info($installremote, $installremoteversion, true));
upgrade_install_plugins($installable, $installremoteconfirm,
get_string('installfromrepo', 'tool_installaddon'),
new moodle_url($PAGE->url, array('installremote' => $installremote,
'installremoteversion' => $installremoteversion, 'installremoteconfirm' => 1)
)
);
}
// We should never get here.
throw new moodle_exception('installing_non_installable_component', 'tool_installaddon');
}
// Handle installation of a plugin from the ZIP file.
$installzipcomponent = optional_param('installzipcomponent', null, PARAM_COMPONENT);
$installzipstorage = optional_param('installzipstorage', null, PARAM_FILE);
$installzipconfirm = optional_param('installzipconfirm', false, PARAM_BOOL);
if ($installzipcomponent and $installzipstorage) {
require_sesskey();
require_once($CFG->libdir.'/upgradelib.php');
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$installable = array((object)array(
'component' => $installzipcomponent,
'zipfilepath' => make_temp_directory('tool_installaddon').'/'.$installzipstorage.'/plugin.zip',
));
upgrade_install_plugins($installable, $installzipconfirm, get_string('installfromzip', 'tool_installaddon'),
new moodle_url($installer->index_url(), array('installzipcomponent' => $installzipcomponent,
'installzipstorage' => $installzipstorage, 'installzipconfirm' => 1)
)
);
}
$confirmed = optional_param('confirm', false, PARAM_BOOL);
$installer->handle_remote_request($output, $remoterequest, $confirmed);
$form = $installer->get_installfromzip_form();
@@ -96,47 +48,35 @@ if ($form->is_cancelled()) {
redirect($PAGE->url);
} else if ($data = $form->get_data()) {
$storage = $installer->make_installfromzip_storage();
$form->save_file('zipfile', $storage.'/plugin.zip');
$ziprootdir = $pluginman->get_plugin_zip_root_dir($storage.'/plugin.zip');
if (empty($ziprootdir)) {
echo $output->zip_not_valid_plugin_package_page($installer->index_url());
die();
}
$component = $installer->detect_plugin_component($storage.'/plugin.zip');
if (!empty($component) and !empty($data->plugintype)) {
// If the plugin type was explicitly set, make sure it matches the detected one.
list($detectedtype, $detectedname) = core_component::normalize_component($component);
if ($detectedtype !== $data->plugintype) {
$form->selected_plugintype_mismatch($detectedtype);
echo $output->index_page();
die();
}
}
if (empty($component)) {
// This should not happen as all plugins are supposed to declare their
// component. Still, let admins upload legacy packages if they want/need.
if (empty($data->plugintype)) {
// Save the ZIP file into a temporary location.
$jobid = md5(rand().uniqid('', true));
$sourcedir = make_temp_directory('tool_installaddon/'.$jobid.'/source');
$zipfilename = $installer->save_installfromzip_file($form, $sourcedir);
if (empty($data->plugintype)) {
$versiondir = make_temp_directory('tool_installaddon/'.$jobid.'/version');
$detected = $installer->detect_plugin_component($sourcedir.'/'.$zipfilename, $versiondir);
if (empty($detected)) {
$form->require_explicit_plugintype();
echo $output->index_page();
die();
}
if (!empty($data->rootdir)) {
$usepluginname = $data->rootdir;
} else {
$usepluginname = $ziprootdir;
list($detectedtype, $detectedname) = core_component::normalize_component($detected);
if ($detectedtype and $detectedname and $detectedtype !== 'core') {
$data->plugintype = $detectedtype;
} else {
$form->require_explicit_plugintype();
}
}
$component = $data->plugintype.'_'.$usepluginname;
}
redirect($installer->index_url(array(
'installzipcomponent' => $component,
'installzipstorage' => basename($storage),
'sesskey' => sesskey(),
)));
// Redirect to the validation page.
if (!empty($data->plugintype)) {
$nexturl = new moodle_url('/admin/tool/installaddon/validate.php', array(
'sesskey' => sesskey(),
'jobid' => $jobid,
'zip' => $zipfilename,
'type' => $data->plugintype,
'rootdir' => $data->rootdir));
redirect($nexturl);
}
}
// Display the tool main page.
// Output starts here.
echo $output->index_page();
@@ -31,13 +31,13 @@ $string['acknowledgementtext'] = 'I understand that it is my responsibility to h
$string['featuredisabled'] = 'The plugin installer is disabled on this site.';
$string['installaddon'] = 'Install plugin!';
$string['installaddons'] = 'Install plugins';
$string['installexception'] = 'Oops... An error occurred while trying to install the plugin. Turn debugging mode on to see details of the error.';
$string['installfromrepo'] = 'Install plugins from the Moodle plugins directory';
$string['installfromrepo_help'] = 'You will be redirected to the Moodle plugins directory to search for and install a plugin. Note that your site full name, URL and Moodle version will be sent as well, to make the installation process easier for you.';
$string['installfromzip'] = 'Install plugin from ZIP file';
$string['installfromzip_help'] = 'An alternative to installing a plugin directly from the Moodle plugins directory is to upload a ZIP package of the plugin. The ZIP package should have the same structure as a package downloaded from the Moodle plugins directory.';
$string['installfromzipfile'] = 'ZIP package';
$string['installfromzipfile_help'] = 'The plugin ZIP package must contain just one directory, named to match the plugin name. The ZIP will be extracted into an appropriate location for the plugin type. If the package has been downloaded from the Moodle plugins directory then it will have this structure.';
$string['installfromzipinvalid'] = 'The plugin ZIP package must contain just one directory, named to match the plugin name. Provided file is not a valid plugin ZIP package.';
$string['installfromzipfile_help'] = 'The plugin ZIP package must contain just one directory, named to match the plugin. The ZIP will be extracted into an appropriate location for the plugin type. If the package has been downloaded from the Moodle plugins directory then it will have this structure.';
$string['installfromziprootdir'] = 'Rename the root directory';
$string['installfromziprootdir_help'] = 'Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. If so, the correct name may be entered here.';
$string['installfromzipsubmit'] = 'Install plugin from the ZIP file';
@@ -56,6 +56,50 @@ $string['remoterequestconfirm'] = 'There is a request to install plugin <strong>
$string['remoterequestinvalid'] = 'There is a request to install a plugin from the Moodle plugins directory on this site. Unfortunately the request is not valid and so the plugin cannot be installed.';
$string['remoterequestpermcheck'] = 'There is a request to install plugin {$a->name} ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. However, the location <strong>{$a->typepath}</strong> is <strong>not writable</strong>. You need to give write access for the web server user to the location, then press the continue button to repeat the check.';
$string['remoterequestpluginfoexception'] = 'Oops... An error occurred while trying to obtain information about the plugin {$a->name} ({$a->component}) version {$a->version}. The plugin cannot be installed. Turn debugging mode on to see details of the error.';
$string['remoterequestnoninstallable'] = 'There is a request to install plugin {$a->name} ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. However, the plugin installation pre-check failed (reason code: {$a->reason}).';
$string['typedetectionfailed'] = 'Unable to detect the plugin type. Please choose the plugin type manually.';
$string['typedetectionmismatch'] = 'The selected plugin type does not match the one declared by the plugin: {$a}';
$string['validation'] = 'Plugin package validation';
$string['validationmsg_componentmatch'] = 'Full component name';
$string['validationmsg_componentmismatchname'] = 'Plugin name mismatch';
$string['validationmsg_componentmismatchname_help'] = 'Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. You need to fix the name of the root directory to match the declared plugin name.';
$string['validationmsg_componentmismatchname_info'] = 'The plugin declares its name is \'{$a}\' but that does not match the name of the root directory.';
$string['validationmsg_componentmismatchtype'] = 'Plugin type mismatch';
$string['validationmsg_componentmismatchtype_info'] = 'Expected type \'{$a->expected}\' but the plugin declares its type is \'{$a->found}\'.';
$string['validationmsg_filenotexists'] = 'Extracted file not found';
$string['validationmsg_filesnumber'] = 'Not enough files found in the package';
$string['validationmsg_filestatus'] = 'Unable to extract all files';
$string['validationmsg_filestatus_info'] = 'Attempting to extract file {$a->file} resulted in error \'{$a->status}\'.';
$string['validationmsg_foundlangfile'] = 'Found language file';
$string['validationmsg_maturity'] = 'Declared maturity level';
$string['validationmsg_maturity_help'] = 'The plugin can declare its maturity level. If the maintainer considers the plugin stable, the declared maturity level will read MATURITY_STABLE. All other maturity levels (such as alpha or beta) should be considered unstable and a warning is raised.';
$string['validationmsg_missingexpectedlangenfile'] = 'English language file name mismatch';
$string['validationmsg_missingexpectedlangenfile_info'] = 'The given plugin type is missing the expected English language file {$a}.';
$string['validationmsg_missinglangenfile'] = 'No English language file found';
$string['validationmsg_missinglangenfolder'] = 'Missing English language folder';
$string['validationmsg_missingversion'] = 'Plugin does not declare its version';
$string['validationmsg_missingversionphp'] = 'File version.php not found';
$string['validationmsg_multiplelangenfiles'] = 'Multiple English language files found';
$string['validationmsg_onedir'] = 'Invalid structure of the ZIP package.';
$string['validationmsg_onedir_help'] = 'The ZIP package must contain just one root directory that holds the plugin code. The name of that root directory must match the name of the plugin.';
$string['validationmsg_pathwritable'] = 'Write access check';
$string['validationmsg_pluginversion'] = 'Plugin version';
$string['validationmsg_release'] = 'Plugin release';
$string['validationmsg_requiresmoodle'] = 'Required Moodle version';
$string['validationmsg_rootdir'] = 'Name of the plugin to be installed';
$string['validationmsg_rootdir_help'] = 'The name of the root directory in the ZIP package forms the name of the plugin to be installed. If the name is not correct, you may wish to rename the root directory in the ZIP prior to installing the plugin.';
$string['validationmsg_rootdirinvalid'] = 'Invalid plugin name';
$string['validationmsg_rootdirinvalid_help'] = 'The name of the root directory in the ZIP package violates formal syntax requirements. Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. You need to fix the name of the root directory to match the plugin name.';
$string['validationmsg_targetexists'] = 'Target location already exists';
$string['validationmsg_targetexists_help'] = 'The directory that the plugin is to be installed to must not yet exist.';
$string['validationmsg_unknowntype'] = 'Unknown plugin type';
$string['validationmsglevel_debug'] = 'Debug';
$string['validationmsglevel_error'] = 'Error';
$string['validationmsglevel_info'] = 'OK';
$string['validationmsglevel_warning'] = 'Warning';
$string['validationresult0'] = 'Validation failed!';
$string['validationresult0_help'] = 'A serious problem was detected and so it is not safe to install the plugin. See the validation log messages for details.';
$string['validationresult1'] = 'Validation passed!';
$string['validationresult2_help'] = 'No serious problems were detected. You can continue with the plugin installation. See the validation log messages for more details and eventual warnings.';
$string['validationresult1_help'] = 'The plugin package has been validated and no serious problems were detected.';
$string['validationresultinfo'] = 'Info';
$string['validationresultmsg'] = 'Message';
$string['validationresultstatus'] = 'Status';
+4 -4
View File
@@ -36,7 +36,7 @@ if (!has_capability('moodle/site:config', context_system::instance())) {
die();
}
if (!empty($CFG->disableupdateautodeploy)) {
if (!empty($CFG->disableonclickaddoninstall)) {
header('HTTP/1.1 403 Forbidden');
die();
}
@@ -52,9 +52,9 @@ if (is_null($plugintype)) {
die();
}
$pluginman = core_plugin_manager::instance();
$installer = tool_installaddon_installer::instance();
$plugintypepath = $pluginman->get_plugintype_root($plugintype);
$plugintypepath = $installer->get_plugintype_root($plugintype);
if (empty($plugintypepath)) {
header('HTTP/1.1 400 Bad Request');
@@ -63,7 +63,7 @@ if (empty($plugintypepath)) {
$response = array('path' => $plugintypepath);
if ($pluginman->is_plugintype_writable($plugintype)) {
if ($installer->is_plugintype_writable($plugintype)) {
$response['writable'] = 1;
} else {
$response['writable'] = 0;
+180 -10
View File
@@ -37,6 +37,9 @@ class tool_installaddon_renderer extends plugin_renderer_base {
/** @var tool_installaddon_installer */
protected $installer = null;
/** @var tool_installaddon_validator */
protected $validator = null;
/**
* Sets the tool_installaddon_installer instance being used.
*
@@ -51,6 +54,20 @@ class tool_installaddon_renderer extends plugin_renderer_base {
}
}
/**
* Sets the tool_installaddon_validator instance being used.
*
* @throws coding_exception if the validator has been already set
* @param tool_installaddon_validator $validator
*/
public function set_validator_instance(tool_installaddon_validator $validator) {
if (is_null($this->validator)) {
$this->validator = $validator;
} else {
throw new coding_exception('Attempting to reset the validator instance.');
}
}
/**
* Defines the index page layout
*
@@ -79,17 +96,24 @@ class tool_installaddon_renderer extends plugin_renderer_base {
}
/**
* Inform the user that the ZIP is not a valid plugin package file.
* Defines the validation results page layout
*
* @param moodle_url $continueurl
* @return string
*/
public function zip_not_valid_plugin_package_page(moodle_url $continueurl) {
public function validation_page() {
if (is_null($this->installer)) {
throw new coding_exception('Installer instance has not been set.');
}
if (is_null($this->validator)) {
throw new coding_exception('Validator instance has not been set.');
}
$out = $this->output->header();
$out .= $this->output->heading(get_string('installfromzip', 'tool_installaddon'));
$out .= $this->output->box(get_string('installfromzipinvalid', 'tool_installaddon'), 'generalbox', 'notice');
$out .= $this->output->continue_button($continueurl, 'get');
$out .= $this->validation_page_heading();
$out .= $this->validation_page_messages();
$out .= $this->validation_page_continue();
$out .= $this->output->footer();
return $out;
@@ -170,17 +194,44 @@ class tool_installaddon_renderer extends plugin_renderer_base {
}
/**
* Inform the user that the requested remote plugin is not installable.
* Inform the user about pluginfo service call exception
*
* @param stdClass $data decoded request data with ->reason property added
* This implementation does not actually use the passed exception. Custom renderers might want to
* display additional data obtained via {@link get_exception_info()}. Also note, this method is called
* in non-debugging mode only. If debugging is allowed at the site, default exception handler is triggered.
*
* @param stdClass $data decoded request data
* @param tool_installaddon_pluginfo_exception $e thrown exception
* @param moodle_url $continueurl
* @return string
*/
public function remote_request_non_installable_page(stdClass $data, moodle_url $continueurl) {
public function remote_request_pluginfo_exception(stdClass $data, tool_installaddon_pluginfo_exception $e, moodle_url $continueurl) {
$out = $this->output->header();
$out .= $this->output->heading(get_string('installfromrepo', 'tool_installaddon'));
$out .= $this->output->box(get_string('remoterequestnoninstallable', 'tool_installaddon', $data), 'generalbox', 'notice');
$out .= $this->output->box(get_string('remoterequestpluginfoexception', 'tool_installaddon', $data), 'generalbox', 'notice');
$out .= $this->output->continue_button($continueurl, 'get');
$out .= $this->output->footer();
return $out;
}
/**
* Inform the user about the installer exception
*
* This implementation does not actually use the passed exception. Custom renderers might want to
* display additional data obtained via {@link get_exception_info()}. Also note, this method is called
* in non-debugging mode only. If debugging is allowed at the site, default exception handler is triggered.
*
* @param tool_installaddon_installer_exception $e thrown exception
* @param moodle_url $continueurl
* @return string
*/
public function installer_exception(tool_installaddon_installer_exception $e, moodle_url $continueurl) {
$out = $this->output->header();
$out .= $this->output->heading(get_string('installfromrepo', 'tool_installaddon'));
$out .= $this->output->box(get_string('installexception', 'tool_installaddon'), 'generalbox', 'notice');
$out .= $this->output->continue_button($continueurl, 'get');
$out .= $this->output->footer();
@@ -233,4 +284,123 @@ class tool_installaddon_renderer extends plugin_renderer_base {
return $out;
}
/**
* Renders the page title and the overall validation verdict
*
* @return string
*/
protected function validation_page_heading() {
$heading = $this->output->heading(get_string('validation', 'tool_installaddon'));
if ($this->validator->get_result()) {
$status = $this->output->container(
html_writer::span(get_string('validationresult1', 'tool_installaddon'), 'verdict').
$this->output->help_icon('validationresult1', 'tool_installaddon'),
array('validationresult', 'success')
);
} else {
$status = $this->output->container(
html_writer::span(get_string('validationresult0', 'tool_installaddon'), 'verdict').
$this->output->help_icon('validationresult0', 'tool_installaddon'),
array('validationresult', 'failure')
);
}
return $heading . $status;
}
/**
* Renders validation log messages.
*
* @return string
*/
protected function validation_page_messages() {
$validator = $this->validator; // We need this to be able to use their constants.
$messages = $validator->get_messages();
if (empty($messages)) {
return '';
}
$table = new html_table();
$table->attributes['class'] = 'validationmessages generaltable';
$table->head = array(
get_string('validationresultstatus', 'tool_installaddon'),
get_string('validationresultmsg', 'tool_installaddon'),
get_string('validationresultinfo', 'tool_installaddon')
);
$table->colclasses = array('msgstatus', 'msgtext', 'msginfo');
$stringman = get_string_manager();
foreach ($messages as $message) {
if ($message->level === $validator::DEBUG and !debugging()) {
continue;
}
$msgstatus = get_string('validationmsglevel_'.$message->level, 'tool_installaddon');
$msgtext = $msgtext = s($message->msgcode);
if (is_null($message->addinfo)) {
$msginfo = '';
} else {
$msginfo = html_writer::tag('pre', s(print_r($message->addinfo, true)));
}
$msghelp = '';
// Replace the message code with the string if it is defined.
if ($stringman->string_exists('validationmsg_'.$message->msgcode, 'tool_installaddon')) {
$msgtext = get_string('validationmsg_'.$message->msgcode, 'tool_installaddon');
// And check for the eventual help, too.
if ($stringman->string_exists('validationmsg_'.$message->msgcode.'_help', 'tool_installaddon')) {
$msghelp = $this->output->help_icon('validationmsg_'.$message->msgcode, 'tool_installaddon');
}
}
// Re-format the message info using a string if it is define.
if (!is_null($message->addinfo) and $stringman->string_exists('validationmsg_'.$message->msgcode.'_info', 'tool_installaddon')) {
$msginfo = get_string('validationmsg_'.$message->msgcode.'_info', 'tool_installaddon', $message->addinfo);
}
$row = new html_table_row(array($msgstatus, $msgtext.$msghelp, $msginfo));
$row->attributes['class'] = 'level-'.$message->level.' '.$message->msgcode;
$table->data[] = $row;
}
return html_writer::table($table);
}
/**
* Renders widgets to continue from the validation results page
*
* @return string
*/
protected function validation_page_continue() {
$output = '';
$conturl = $this->validator->get_continue_url();
if (is_null($conturl)) {
$contbutton = '';
} else {
$contbutton = $this->output->single_button(
$conturl, get_string('installaddon', 'tool_installaddon'), 'post',
array('class' => 'singlebutton continuebutton'));
$output .= $this->output->heading(get_string('acknowledgement', 'tool_installaddon'), 3);
$output .= $this->output->container(get_string('acknowledgementtext', 'tool_installaddon'));
}
$cancelbutton = $this->output->single_button(
new moodle_url('/admin/tool/installaddon/index.php'), get_string('cancel', 'core'), 'get',
array('class' => 'singlebutton cancelbutton'));
$output .= $this->output->container($cancelbutton.$contbutton, 'postvalidationbuttons');
return $output;
}
}
+7 -1
View File
@@ -25,9 +25,15 @@
defined('MOODLE_INTERNAL') || die();
if ($hassiteconfig and empty($CFG->disableupdateautodeploy)) {
if ($hassiteconfig and empty($CFG->disableonclickaddoninstall)) {
$ADMIN->add('modules', new admin_externalpage('tool_installaddon_index',
get_string('installaddons', 'tool_installaddon'),
"$CFG->wwwroot/$CFG->admin/tool/installaddon/index.php"), 'modsettings');
$ADMIN->add('modules', new admin_externalpage('tool_installaddon_validate',
get_string('validation', 'tool_installaddon'),
"$CFG->wwwroot/$CFG->admin/tool/installaddon/validate.php",
'moodle/site:config',
true), 'modsettings');
}
+55
View File
@@ -11,3 +11,58 @@
#page-admin-tool-installaddon-index #installfromrepobox .singlebutton input[type=submit] {
padding: 1em;
}
#page-admin-tool-installaddon-validate .validationresult {
margin: 2em auto;
text-align: center;
}
#page-admin-tool-installaddon-validate .validationresult .verdict {
margin: 0em 0.5em;
padding: 0.5em;
border: 2px solid;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
font-weight: bold;
}
#page-admin-tool-installaddon-validate .validationresult.success .verdict {
background-color: #e7f1c3;
border-color: #aaeeaa;
}
#page-admin-tool-installaddon-validate .validationresult.failure .verdict {
background-color: #ffd3d9;
border-color: #eeaaaa;
}
#page-admin-tool-installaddon-validate .validationmessages {
margin: 0px auto;
}
#page-admin-tool-installaddon-validate .validationmessages .level-error .msgstatus {
background-color: #ffd3d9;
}
#page-admin-tool-installaddon-validate .validationmessages .level-warning .msgstatus {
background-color: #f3f2aa;
}
#page-admin-tool-installaddon-validate .validationmessages .level-info .msgstatus {
background-color: #e7f1c3;
}
#page-admin-tool-installaddon-validate .validationmessages .level-debug .msgstatus {
background-color: #d2ebff;
}
#page-admin-tool-installaddon-validate .postvalidationbuttons {
text-align: center;
margin: 1em auto;
}
#page-admin-tool-installaddon-validate .postvalidationbuttons .singlebutton {
display: inline-block;
margin: 1em 1em;
}
@@ -1,3 +1,4 @@
<?php
$plugin->component = 'repository_mahara';
$plugin->version = 2014010100;
@@ -1,2 +1,3 @@
<?php
echo 'One, my little hobbit, never installs malicisous add-ons';
@@ -1,3 +1,4 @@
<?php
$plugin->version = 2013031900;
$plugin->component = 'local_greenbar';
@@ -1,2 +1,3 @@
<?php
$plugin->component = 'local_one';
@@ -0,0 +1 @@
<?php
@@ -0,0 +1 @@
<?php
@@ -1,2 +1,3 @@
<?php
$string['pluginnname'] = 'Root directory mismatch';
@@ -0,0 +1,3 @@
<?php
@@ -1,3 +1,4 @@
<?php
$module->version = 2014122455;
$plugin->version = 2014122455;
$plugin->component = 'mod_bah';
@@ -1,2 +1,3 @@
<?php
echo 'Do not use hardcoded strings, provide the language pack';
@@ -1,2 +1,3 @@
<?php
$string['pluginversion'] = 'Activity module with no version.php';
@@ -0,0 +1,3 @@
<?php
// index.php
@@ -1,2 +1,3 @@
<?php
$string['pluginname'] = 'Foo!';
@@ -1,2 +1,3 @@
<?php // $Id$
// I don't miss CVS, do you?
@@ -1,2 +1,3 @@
<?php
echo 'One, my little hobbit, never installs malicisous add-ons';
@@ -0,0 +1,9 @@
<?php
$module->version = 10; // Ignored, this should use $plugin
$plugin->version = 2013031900;
$plugin->component = 'local_foobar';
$plugin->requires = 2013031200;
$module->release = 'We are not an activity module!';
$plugin->maturity = MATURITY_ALPHA;
//$plugin->release = 'And this is commented';
@@ -1,60 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Provides {@link testable_tool_installaddon_installer} class.
*
* @package tool_installaddon
* @subpackage fixtures
* @category test
* @copyright 2013, 2015 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Testable subclass of the tested class
*
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testable_tool_installaddon_installer extends tool_installaddon_installer {
public function get_site_fullname() {
return strip_tags('<h1 onmouseover="alert(\'Hello Moodle.org!\');">Nasty site</h1>');
}
public function get_site_url() {
return 'file:///etc/passwd';
}
public function get_site_major_version() {
return "2.5'; DROP TABLE mdl_user; --";
}
public function testable_decode_remote_request($request) {
return parent::decode_remote_request($request);
}
protected function should_send_site_info() {
return true;
}
public function testable_detect_plugin_component_from_versionphp($code) {
return parent::detect_plugin_component_from_versionphp($code);
}
}
@@ -23,9 +23,9 @@ Replace $plugin with $module for activity modules, as in
$plugin->component
= 'old_foobar';//$plugin->component='commented';
$plugin->component =
$plugin->component =
'block_foobar';
$plugin->version = 2013010100;
////////$plugin->version = 0;
/* for activity
@@ -26,8 +26,6 @@
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once(__DIR__.'/fixtures/testable_installer.php');
/**
* Unit tests for the {@link tool_installaddon_installer} class
@@ -51,6 +49,29 @@ class tool_installaddon_installer_testcase extends advanced_testcase {
$this->assertSame("2.5'; DROP TABLE mdl_user; --", $site['majorversion']);
}
public function test_extract_installfromzip_file() {
$jobid = md5(rand().uniqid('test_', true));
$sourcedir = make_temp_directory('tool_installaddon/'.$jobid.'/source');
$contentsdir = make_temp_directory('tool_installaddon/'.$jobid.'/contents');
copy(dirname(__FILE__).'/fixtures/zips/invalidroot.zip', $sourcedir.'/testinvalidroot.zip');
$installer = tool_installaddon_installer::instance();
$files = $installer->extract_installfromzip_file($sourcedir.'/testinvalidroot.zip', $contentsdir, 'fixed_root');
$this->assertInternalType('array', $files);
$this->assertCount(4, $files);
$this->assertSame(true, $files['fixed_root/']);
$this->assertSame(true, $files['fixed_root/lang/']);
$this->assertSame(true, $files['fixed_root/lang/en/']);
$this->assertSame(true, $files['fixed_root/lang/en/fixed_root.php']);
foreach ($files as $file => $status) {
if (substr($file, -1) === '/') {
$this->assertTrue(is_dir($contentsdir.'/'.$file));
} else {
$this->assertTrue(is_file($contentsdir.'/'.$file));
}
}
}
public function test_decode_remote_request() {
$installer = testable_tool_installaddon_installer::instance();
@@ -109,51 +130,66 @@ class tool_installaddon_installer_testcase extends advanced_testcase {
$this->assertSame(false, $installer->testable_decode_remote_request($request));
}
public function test_detect_plugin_component() {
global $CFG;
public function test_move_directory() {
$jobid = md5(rand().uniqid('test_', true));
$jobroot = make_temp_directory('tool_installaddon/'.$jobid);
$contentsdir = make_temp_directory('tool_installaddon/'.$jobid.'/contents/sub/folder');
file_put_contents($contentsdir.'/readme.txt', 'Hello world!');
$installer = tool_installaddon_installer::instance();
$installer->move_directory($jobroot.'/contents', $jobroot.'/moved', 0777, 0666);
$zipfile = $CFG->libdir.'/tests/fixtures/update_validator/zips/bar.zip';
$this->assertEquals('foo_bar', $installer->detect_plugin_component($zipfile));
$this->assertFalse(is_dir($jobroot.'/contents'));
$this->assertTrue(is_file($jobroot.'/moved/sub/folder/readme.txt'));
$this->assertSame('Hello world!', file_get_contents($jobroot.'/moved/sub/folder/readme.txt'));
}
$zipfile = $CFG->libdir.'/tests/fixtures/update_validator/zips/invalidroot.zip';
$this->assertFalse($installer->detect_plugin_component($zipfile));
public function test_detect_plugin_component() {
$jobid = md5(rand().uniqid('test_', true));
$workdir = make_temp_directory('tool_installaddon/'.$jobid.'/version');
$zipfile = __DIR__.'/fixtures/zips/bar.zip';
$installer = tool_installaddon_installer::instance();
$this->assertEquals('foo_bar', $installer->detect_plugin_component($zipfile, $workdir));
}
public function test_detect_plugin_component_from_versionphp() {
global $CFG;
$installer = testable_tool_installaddon_installer::instance();
$fixtures = $CFG->libdir.'/tests/fixtures/update_validator/';
$this->assertEquals('bar_bar_conan', $installer->testable_detect_plugin_component_from_versionphp('
$this->assertEquals('bar_bar_conan', $installer->detect_plugin_component_from_versionphp('
$plugin->version = 2014121300;
$plugin->component= "bar_bar_conan" ; // Go Arnie go!'));
$versionphp = file_get_contents($fixtures.'/github/moodle-repository_mahara-master/version.php');
$this->assertEquals('repository_mahara', $installer->testable_detect_plugin_component_from_versionphp($versionphp));
$versionphp = file_get_contents($fixtures.'/nocomponent/baz/version.php');
$this->assertFalse($installer->testable_detect_plugin_component_from_versionphp($versionphp));
}
public function test_make_installfromzip_storage() {
$installer = testable_tool_installaddon_installer::instance();
// Check we get writable directory.
$storage1 = $installer->make_installfromzip_storage();
$this->assertTrue(is_dir($storage1));
$this->assertTrue(is_writable($storage1));
file_put_contents($storage1.'/hello.txt', 'Find me if you can!');
// Check we get unique directory on each call.
$storage2 = $installer->make_installfromzip_storage();
$this->assertTrue(is_dir($storage2));
$this->assertTrue(is_writable($storage2));
$this->assertFalse(file_exists($storage2.'/hello.txt'));
// Check both are in the same parent directory.
$this->assertEquals(dirname($storage1), dirname($storage2));
}
}
/**
* Testable subclass of the tested class
*
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testable_tool_installaddon_installer extends tool_installaddon_installer {
public function get_site_fullname() {
return strip_tags('<h1 onmouseover="alert(\'Hello Moodle.org!\');">Nasty site</h1>');
}
public function get_site_url() {
return 'file:///etc/passwd';
}
public function get_site_major_version() {
return "2.5'; DROP TABLE mdl_user; --";
}
public function testable_decode_remote_request($request) {
return parent::decode_remote_request($request);
}
protected function should_send_site_info() {
return true;
}
public function detect_plugin_component_from_versionphp($code) {
return parent::detect_plugin_component_from_versionphp($code);
}
}
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -17,40 +18,39 @@
/**
* Provides the unit tests class and some helper classes
*
* @package core_plugin
* @package tool_installaddon
* @category test
* @copyright 2013, 2015 David Mudrak <david@moodle.com>
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__.'/fixtures/testable_update_validator.php');
/**
* Unit tests for the {@link \core\update\validator} class
* Unit tests for the {@link tool_installaddon_installer} class
*
* @copyright 2013, 2015 David Mudrak <david@moodle.com>
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_update_validator_testcase extends advanced_testcase {
class tool_installaddon_validator_testcase extends basic_testcase {
public function test_validate_files_layout() {
$fixtures = __DIR__.'/fixtures/update_validator';
$fixtures = dirname(__FILE__).'/fixtures';
// Non-existing directory.
$validator = testable_core_update_validator::instance($fixtures.'/nulldir', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/nulldir', array(
'null/' => true,
'null/lang/' => true,
'null/lang/en/' => true,
'null/lang/en/null.php' => true));
$this->assertEquals('testable_core_update_validator', get_class($validator));
$this->assertEquals('testable_tool_installaddon_validator', get_class($validator));
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR,
'filenotexists', array('file' => 'null/')));
// Missing expected file.
$validator = testable_core_update_validator::instance($fixtures.'/plugindir', array(
// Missing expected file
$validator = testable_tool_installaddon_validator::instance($fixtures.'/plugindir', array(
'foobar/' => true,
'foobar/version.php' => true,
'foobar/index.php' => true,
@@ -62,8 +62,8 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR,
'filenotexists', array('file' => 'foobar/NOTEXISTS.txt')));
// Errors during ZIP extraction.
$validator = testable_core_update_validator::instance($fixtures.'/multidir', array(
// Errors during ZIP extraction
$validator = testable_tool_installaddon_validator::instance($fixtures.'/multidir', array(
'one/' => true,
'one/version.php' => 'Can not write target file',
'two/' => true,
@@ -72,15 +72,15 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'filestatus',
array('file' => 'one/version.php', 'status' => 'Can not write target file')));
// Insufficient number of extracted files.
$validator = testable_core_update_validator::instance($fixtures.'/emptydir', array(
// Insufficient number of extracted files
$validator = testable_tool_installaddon_validator::instance($fixtures.'/emptydir', array(
'emptydir/' => true,
'emptydir/README.txt' => true));
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'filesnumber'));
// No wrapping directory.
$validator = testable_core_update_validator::instance($fixtures.'/nowrapdir', array(
// No wrapping directory
$validator = testable_tool_installaddon_validator::instance($fixtures.'/nowrapdir', array(
'version.php' => true,
'index.php' => true,
'lang/' => true,
@@ -89,8 +89,8 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'onedir'));
// Multiple directories.
$validator = testable_core_update_validator::instance($fixtures.'/multidir', array(
// Multiple directories
$validator = testable_tool_installaddon_validator::instance($fixtures.'/multidir', array(
'one/' => true,
'one/version.php' => true,
'two/' => true,
@@ -98,8 +98,8 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'onedir'));
// Invalid root directory name.
$validator = testable_core_update_validator::instance($fixtures.'/github', array(
// Invalid root directory name
$validator = testable_tool_installaddon_validator::instance($fixtures.'/github', array(
'moodle-repository_mahara-master/' => true,
'moodle-repository_mahara-master/lang/' => true,
'moodle-repository_mahara-master/lang/en/' => true,
@@ -111,9 +111,9 @@ class core_update_validator_testcase extends advanced_testcase {
}
public function test_validate_version_php() {
$fixtures = __DIR__.'/fixtures/update_validator';
$fixtures = dirname(__FILE__).'/fixtures';
$validator = testable_core_update_validator::instance($fixtures.'/noversiontheme', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/noversiontheme', array(
'noversion/' => true,
'noversion/lang/' => true,
'noversion/lang/en/' => true,
@@ -124,7 +124,7 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertTrue($this->has_message($validator->get_messages(), $validator::DEBUG, 'missingversionphp'));
$this->assertTrue(is_null($validator->get_versionphp_info()));
$validator = testable_core_update_validator::instance($fixtures.'/noversionmod', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/noversionmod', array(
'noversion/' => true,
'noversion/lang/' => true,
'noversion/lang/en/' => true,
@@ -134,29 +134,7 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'missingversionphp'));
$validator = testable_core_update_validator::instance($fixtures.'/plugindir', array(
'legacymod/' => true,
'legacymod/version.php' => true,
'legacymod/lang/' => true,
'legacymod/lang/en/' => true,
'legacymod/lang/en/legacymod.php' => true));
$validator->assert_plugin_type('mod');
$validator->assert_moodle_version(0);
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'versionphpsyntax', '$module'));
$validator = testable_core_update_validator::instance($fixtures.'/nocomponent', array(
'baz/' => true,
'baz/version.php' => true,
'baz/lang/' => true,
'baz/lang/en/' => true,
'baz/lang/en/auth_baz.php' => true));
$validator->assert_plugin_type('auth');
$validator->assert_moodle_version(0);
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'missingcomponent'));
$validator = testable_core_update_validator::instance($fixtures.'/plugindir', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/plugindir', array(
'foobar/' => true,
'foobar/version.php' => true,
'foobar/index.php' => true,
@@ -167,7 +145,7 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'componentmismatchtype',
array('expected' => 'block', 'found' => 'local')));
$validator = testable_core_update_validator::instance($fixtures.'/plugindir', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/plugindir', array(
'foobar/' => true,
'foobar/version.php' => true,
'foobar/index.php' => true,
@@ -192,9 +170,9 @@ class core_update_validator_testcase extends advanced_testcase {
}
public function test_validate_language_pack() {
$fixtures = __DIR__.'/fixtures/update_validator';
$fixtures = dirname(__FILE__).'/fixtures';
$validator = testable_core_update_validator::instance($fixtures.'/nolang', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/nolang', array(
'bah/' => true,
'bah/index.php' => true,
'bah/view.php' => true,
@@ -204,7 +182,7 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'missinglangenfolder'));
$validator = testable_core_update_validator::instance($fixtures.'/nolang', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/nolang', array(
'bah/' => true,
'bah/version.php' => true,
'bah/lang/' => true,
@@ -214,7 +192,7 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'missinglangenfile'));
$validator = testable_core_update_validator::instance($fixtures.'/nolang', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/nolang', array(
'bah/' => true,
'bah/version.php' => true,
'bah/lang/' => true,
@@ -227,7 +205,7 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertTrue($this->has_message($validator->get_messages(), $validator::WARNING, 'multiplelangenfiles'));
$this->assertTrue(is_null($validator->get_language_file_name()));
$validator = testable_core_update_validator::instance($fixtures.'/wronglang', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/nolang', array(
'bah/' => true,
'bah/version.php' => true,
'bah/lang/' => true,
@@ -236,11 +214,10 @@ class core_update_validator_testcase extends advanced_testcase {
$validator->assert_plugin_type('block');
$validator->assert_moodle_version(0);
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'missingexpectedlangenfile',
'block_bah.php'));
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'missingexpectedlangenfile', 'block_bah.php'));
$this->assertEquals('bah', $validator->get_language_file_name());
$validator = testable_core_update_validator::instance($fixtures.'/noversiontheme', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/noversiontheme', array(
'noversion/' => true,
'noversion/lang/' => true,
'noversion/lang/en/' => true,
@@ -251,7 +228,7 @@ class core_update_validator_testcase extends advanced_testcase {
$this->assertTrue($this->has_message($validator->get_messages(), $validator::DEBUG, 'foundlangfile', 'theme_noversion'));
$this->assertEquals('theme_noversion', $validator->get_language_file_name());
$validator = testable_core_update_validator::instance($fixtures.'/plugindir', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/plugindir', array(
'foobar/' => true,
'foobar/version.php' => true,
'foobar/index.php' => true,
@@ -266,9 +243,9 @@ class core_update_validator_testcase extends advanced_testcase {
}
public function test_validate_target_location() {
$fixtures = __DIR__.'/fixtures/update_validator';
$fixtures = dirname(__FILE__).'/fixtures';
$validator = testable_core_update_validator::instance($fixtures.'/installed', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/installed', array(
'greenbar/' => true,
'greenbar/version.php' => true,
'greenbar/index.php' => true,
@@ -277,27 +254,11 @@ class core_update_validator_testcase extends advanced_testcase {
'greenbar/lang/en/local_greenbar.php' => true));
$validator->assert_plugin_type('local');
$validator->assert_moodle_version('2013031400.00');
$this->assertTrue($validator->execute());
$this->assertFalse($this->has_message($validator->get_messages(), $validator::WARNING, 'targetexists',
$validator->get_plugintype_location('local').'/greenbar'));
$typeroot = $validator->get_plugintype_location('local');
make_writable_directory($typeroot.'/greenbar');
$this->assertTrue($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::WARNING, 'targetexists',
$validator->get_plugintype_location('local').'/greenbar'));
remove_dir($typeroot.'/greenbar');
file_put_contents($typeroot.'/greenbar', 'This file occupies a place where a plugin should land.');
$this->assertFalse($validator->execute());
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'targetnotdir',
$this->assertTrue($this->has_message($validator->get_messages(), $validator::ERROR, 'targetexists',
$validator->get_plugintype_location('local').'/greenbar'));
unlink($typeroot.'/greenbar');
$this->assertTrue($validator->execute());
$validator = testable_core_update_validator::instance($fixtures.'/plugindir', array(
$validator = testable_tool_installaddon_validator::instance($fixtures.'/plugindir', array(
'foobar/' => true,
'foobar/version.php' => true,
'foobar/index.php' => true,
@@ -312,56 +273,25 @@ class core_update_validator_testcase extends advanced_testcase {
}
public function test_parse_version_php() {
$fixtures = __DIR__.'/fixtures/update_validator/versionphp';
$fixtures = dirname(__FILE__).'/fixtures/versionphp';
$validator = testable_core_update_validator::instance($fixtures, array());
$this->assertEquals('testable_core_update_validator', get_class($validator));
$validator = testable_tool_installaddon_validator::instance($fixtures, array());
$this->assertEquals('testable_tool_installaddon_validator', get_class($validator));
$info = $validator->testable_parse_version_php($fixtures.'/version1.php');
$this->assertInternalType('array', $info);
$this->assertCount(7, $info);
$this->assertEquals('block_foobar', $info['plugin->component']); // Later in the file.
$this->assertEquals('2013010100', $info['plugin->version']); // Numeric wins over strings.
$this->assertEquals('2012122401', $info['plugin->requires']); // Commented.
$this->assertEquals('MATURITY_STABLE', $info['module->maturity']);// Constant wins regardless the order (non-PHP behaviour).
$this->assertEquals('MATURITY_ALPHA', $info['plugin->maturity']); // Constant wins regardless the order (non-PHP behaviour).
$this->assertEquals('v2.3', $info['module->release']); // String wins over numeric (non-PHP behaviour).
$this->assertEquals('v2.4', $info['plugin->release']); // String wins over numeric (non-PHP behaviour).
$this->assertEquals('block_foobar', $info['plugin->component']); // Later in the file.
$this->assertEquals('2013010100', $info['plugin->version']); // Numeric wins over strings.
$this->assertEquals('2012122401', $info['plugin->requires']); // Commented.
$this->assertEquals('MATURITY_STABLE', $info['module->maturity']); // Constant wins regardless the order (non-PHP behaviour).
$this->assertEquals('MATURITY_ALPHA', $info['plugin->maturity']); // Constant wins regardless the order (non-PHP behaviour).
$this->assertEquals('v2.3', $info['module->release']); // String wins over numeric (non-PHP behaviour).
$this->assertEquals('v2.4', $info['plugin->release']); // String wins over numeric (non-PHP behaviour).
}
public function test_messages_output() {
$fixtures = __DIR__.'/fixtures/update_validator';
$validator = testable_core_update_validator::instance($fixtures, array());
// Helper methods //////////////////////////////////////////////////////////
$this->assertDebuggingNotCalled();
$this->assertNotEmpty($validator->message_level_name($validator::ERROR));
$this->assertNotEmpty($validator->message_level_name($validator::WARNING));
$this->assertNotEmpty($validator->message_level_name($validator::INFO));
$this->assertNotEmpty($validator->message_level_name($validator::DEBUG));
$this->assertNotEmpty($validator->message_code_name('missingversion'));
$this->assertSame(
'some_really_crazy_message_code_that_is_not_localised',
$validator->message_code_name('some_really_crazy_message_code_that_is_not_localised')
);
$this->assertInstanceOf('help_icon', $validator->message_help_icon('onedir'));
$this->assertFalse($validator->message_help_icon('some_really_crazy_message_code_that_is_not_localised'));
$this->assertNotEmpty($validator->message_code_info('missingexpectedlangenfile', 'something'));
$this->assertSame('', $validator->message_code_info('missingexpectedlangenfile', null));
$this->assertSame('', $validator->message_code_info('some_really_crazy_message_code_that_is_not_localised', 'something'));
}
/**
* Helper method for checking if the given message has been raised by the validator.
*
* @param array $messages list of returned messages
* @param string $level expected message severity level
* @param string $msgcode expected message code
* @param string|array $addinfo expected additional info
* @return bool
*/
protected function has_message(array $messages, $level, $msgcode, $addinfo = null) {
foreach ($messages as $message) {
if ($message->level === $level and $message->msgcode === $msgcode and $message->addinfo === $addinfo) {
@@ -371,3 +301,32 @@ class core_update_validator_testcase extends advanced_testcase {
return false;
}
}
/**
* Provides access to protected methods we want to explicitly test
*
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testable_tool_installaddon_validator extends tool_installaddon_validator {
public function testable_parse_version_php($fullpath) {
return parent::parse_version_php($fullpath);
}
public function get_plugintype_location($plugintype) {
$testableroot = make_temp_directory('testable_tool_installaddon_validator/plugintypes');
if (!is_dir($testableroot.'/'.$plugintype)) {
make_temp_directory('testable_tool_installaddon_validator/plugintypes/'.$plugintype);
}
if ($plugintype === 'local') {
// We need the following for the test_validate_target_location() method
make_temp_directory('testable_tool_installaddon_validator/plugintypes/local/greenbar');
}
return $testableroot.'/'.$plugintype;
}
}
+78
View File
@@ -0,0 +1,78 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The ZIP package validation.
*
* @package tool_installaddon
* @copyright 2013 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/filelib.php');
navigation_node::override_active_url(new moodle_url('/admin/tool/installaddon/index.php'));
admin_externalpage_setup('tool_installaddon_validate');
if (!empty($CFG->disableonclickaddoninstall)) {
notice(get_string('featuredisabled', 'tool_installaddon'));
}
require_sesskey();
$jobid = required_param('jobid', PARAM_ALPHANUM);
$zipfilename = required_param('zip', PARAM_FILE);
$plugintype = required_param('type', PARAM_ALPHANUMEXT);
$rootdir = optional_param('rootdir', '', PARAM_PLUGIN);
$zipfilepath = $CFG->tempdir.'/tool_installaddon/'.$jobid.'/source/'.$zipfilename;
if (!file_exists($zipfilepath)) {
redirect(new moodle_url('/admin/tool/installaddon/index.php'),
get_string('invaliddata', 'core_error'));
}
$installer = tool_installaddon_installer::instance();
// Extract the ZIP contents.
fulldelete($CFG->tempdir.'/tool_installaddon/'.$jobid.'/contents');
$zipcontentpath = make_temp_directory('tool_installaddon/'.$jobid.'/contents');
$zipcontentfiles = $installer->extract_installfromzip_file($zipfilepath, $zipcontentpath, $rootdir);
// Validate the contents of the plugin ZIP file.
$validator = tool_installaddon_validator::instance($zipcontentpath, $zipcontentfiles);
$validator->assert_plugin_type($plugintype);
$validator->assert_moodle_version($CFG->version);
$result = $validator->execute();
if ($result) {
$validator->set_continue_url(new moodle_url('/admin/tool/installaddon/deploy.php', array(
'sesskey' => sesskey(),
'jobid' => $jobid,
'type' => $plugintype,
'name' => $validator->get_rootdir())));
} else {
fulldelete($CFG->tempdir.'/tool_installaddon/'.$jobid);
}
// Display the validation results.
$output = $PAGE->get_renderer('tool_installaddon');
$output->set_installer_instance($installer);
$output->set_validator_instance($validator);
echo $output->validation_page();
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'tool_installaddon';
$plugin->version = 2015080601;
$plugin->version = 2015051100;
$plugin->requires = 2015050500;
$plugin->maturity = MATURITY_STABLE;
+1 -1
View File
@@ -128,7 +128,7 @@ class controller {
event\langpack_removed::event_with_langcode($lang)->trigger();
return true;
} else { // Nothing deleted, possibly due to permission error.
$this->errors[] = get_string('langpacknotremoved', 'tool_langimport', $lang);
$this->errors[] = 'An error has occurred, language pack is not completely uninstalled, please check file permissions';
return false;
}
}
@@ -112,9 +112,4 @@ class langpack_imported extends \core\event\base {
throw new \coding_exception('The \'langcode\' value must be set to a valid language code');
}
}
public static function get_other_mapping() {
// No mapping required for this event because this event is not backed up.
return false;
}
}
@@ -113,9 +113,4 @@ class langpack_removed extends \core\event\base {
throw new \coding_exception('The \'langcode\' value must be set to a valid language code');
}
}
public static function get_other_mapping() {
// No mapping required for this event because this event is not backed up.
return false;
}
}
@@ -112,9 +112,4 @@ class langpack_updated extends \core\event\base {
throw new \coding_exception('The \'langcode\' value must be set to a valid language code');
}
}
public static function get_other_mapping() {
// No mapping required for this event because this event is not backed up.
return false;
}
}
+16 -36
View File
@@ -37,11 +37,11 @@ if (empty($CFG->langotherroot)) {
throw new moodle_exception('missingcfglangotherroot', 'tool_langimport');
}
$mode = optional_param('mode', 0, PARAM_INT); // action
$pack = optional_param_array('pack', array(), PARAM_SAFEDIR); // pack to install
$uninstalllang = optional_param_array('uninstalllang', array(), PARAM_LANG);// installed pack to uninstall
$confirmtounistall = optional_param('confirmtouninstall', '', PARAM_ALPHAEXT); // uninstallation confirmation
$purgecaches = optional_param('purgecaches', false, PARAM_BOOL); // explicit caches reset
$mode = optional_param('mode', 0, PARAM_INT); // action
$pack = optional_param_array('pack', array(), PARAM_SAFEDIR); // pack to install
$uninstalllang = optional_param('uninstalllang', '', PARAM_LANG); // installed pack to uninstall
$confirm = optional_param('confirm', 0, PARAM_BOOL); // uninstallation confirmation
$purgecaches = optional_param('purgecaches', false, PARAM_BOOL); // explicit caches reset
if ($purgecaches) {
require_sesskey();
@@ -70,30 +70,21 @@ if (($mode == INSTALLATION_OF_SELECTED_LANG) and confirm_sesskey() and !empty($p
$controller->install_languagepacks($pack);
}
if ($mode == DELETION_OF_SELECTED_LANG and (!empty($uninstalllang) or !empty($confirmtounistall))) {
// Actually deleting languages, languages to delete are passed as GET parameter as string
// ...need to populate them to array.
if (empty($uninstalllang)) {
$uninstalllang = explode('-', $confirmtounistall);
}
if (in_array('en', $uninstalllang)) {
if ($mode == DELETION_OF_SELECTED_LANG and !empty($uninstalllang)) {
if ($uninstalllang == 'en') {
// TODO.
$controller->errors[] = get_string('noenglishuninstall', 'tool_langimport');
$controller->errors[] = 'English language pack can not be uninstalled';
} else if (empty($confirmtounistall) and confirm_sesskey()) { // User chose langs to be deleted, show confirmation.
} else if (!$confirm and confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('uninstallconfirm', 'tool_langimport', implode(', ', $uninstalllang)),
'index.php?mode='.DELETION_OF_SELECTED_LANG.'&confirmtouninstall='.implode('-', $uninstalllang),
echo $OUTPUT->confirm(get_string('uninstallconfirm', 'tool_langimport', $uninstalllang),
'index.php?mode='.DELETION_OF_SELECTED_LANG.'&uninstalllang='.$uninstalllang.'&confirm=1',
'index.php');
echo $OUTPUT->footer();
die;
} else if (confirm_sesskey()) { // Deleting languages.
foreach ($uninstalllang as $ulang) {
$controller->uninstall_language($ulang);
}
} else if (confirm_sesskey()) {
$controller->uninstall_language($uninstalllang);
}
}
@@ -167,13 +158,10 @@ echo html_writer::start_tag('form', array('id' => 'uninstallform', 'action' => $
echo html_writer::start_tag('fieldset');
echo html_writer::label(get_string('installedlangs', 'tool_langimport'), 'menuuninstalllang');
echo html_writer::empty_tag('br');
echo html_writer::select($installedlangs, 'uninstalllang[]', '', false, array('size' => 15, 'multiple' => 'multiple'));
echo html_writer::select($installedlangs, 'uninstalllang', '', false, array('size' => 15));
echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));
echo html_writer::empty_tag('br');
echo html_writer::empty_tag('input', array('id' => 'languninstallbutton',
'type' => 'submit',
'value' => get_string('uninstall', 'tool_langimport'))
);
echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('uninstall', 'tool_langimport')));
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
if ($remote) {
@@ -188,7 +176,7 @@ echo html_writer::end_tag('td');
$options = array();
foreach ($availablelangs as $alang) {
if (!empty($alang[0]) and trim($alang[0]) !== 'en' and !$controller->is_installed_lang($alang[0], $alang[1])) {
$options[$alang[0]] = $alang[2].' ('.$alang[0].')';
$options[$alang[0]] = $alang[2].' &lrm;('.$alang[0].')&lrm;';
}
}
if (!empty($options)) {
@@ -210,13 +198,5 @@ if (!empty($options)) {
echo html_writer::end_tag('tr');
echo html_writer::end_tag('table');
echo $OUTPUT->box_end();
$uninstallurl = new moodle_url('/admin/tool/langimport/index.php');
$PAGE->requires->strings_for_js(array('uninstallconfirm', 'uninstall', 'selectlangs', 'noenglishuninstall'),
'tool_langimport');
$PAGE->requires->yui_module('moodle-core-languninstallconfirm',
'Y.M.core.languninstallconfirm.init',
array(array('uninstallUrl' => $uninstallurl->out()))
);
echo $OUTPUT->footer();
die();
@@ -30,7 +30,6 @@ $string['langimportdisabled'] = 'Language import feature has been disabled. You
$string['langpackinstalled'] = 'Language pack \'{$a}\' was successfully installed';
$string['langpackinstalledevent'] = 'Language pack installed';
$string['langpackremoved'] = 'Language pack \'{$a}\' was uninstalled';
$string['langpacknotremoved'] = 'An error has occurred; language pack \'{$a}\' is not completely uninstalled. Please check file permissions.';
$string['langpackremovedevent'] = 'Language pack uninstalled';
$string['langpackupdateskipped'] = 'Update of \'{$a}\' language pack skipped';
$string['langpackuptodate'] = 'Language pack \'{$a}\' is up-to-date';
@@ -39,12 +38,11 @@ $string['langpackupdatedevent'] = 'Language pack updated';
$string['langupdatecomplete'] = 'Language pack update completed';
$string['missingcfglangotherroot'] = 'Missing configuration value $CFG->langotherroot';
$string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of <em>{$a->lang}</em>.';
$string['noenglishuninstall'] = 'English language pack can not be uninstalled';
$string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
$string['pluginname'] = 'Language packs';
$string['purgestringcaches'] = 'Purge string caches';
$string['remotelangnotavailable'] = 'Because Moodle cannot connect to download.moodle.org, it is not possible for language packs to be installed automatically. Please download the appropriate ZIP file(s) from <a href="https://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['selectlangs'] = 'Select languages to unistall!';
$string['uninstall'] = 'Uninstall selected language pack(s)';
$string['uninstallconfirm'] = 'You are about to completely uninstall these language packs: <strong>{$a}</strong>. Are you sure?';
$string['uninstall'] = 'Uninstall selected language pack';
$string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
$string['updatelangs'] = 'Update all installed language packs';
@@ -38,7 +38,7 @@ Feature: Manage language packs
And I set the field "Available language packs" to "English - Pirate (en_ar)"
And I press "Install selected language pack(s)"
When I set the field "Installed language packs" to "English - Pirate (en_ar)"
And I press "Uninstall selected language pack(s)"
And I press "Uninstall selected language pack"
And I press "Continue"
Then I should see "Language pack 'en_ar' was uninstalled"
And the "Installed language packs" select box should not contain "English - Pirate (en_ar)"
@@ -52,7 +52,7 @@ Feature: Manage language packs
Given I log in as "admin"
And I navigate to "Language packs" node in "Site administration > Language"
When I set the field "Installed language packs" to "English (en)"
And I press "Uninstall selected language pack(s)"
And I press "Uninstall selected language pack"
Then I should see "English language pack can not be uninstalled"
And I navigate to "Live logs" node in "Site administration > Reports"
And I should not see "Language pack uninstalled"
@@ -1,37 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Backup support for tool_log logstore subplugins.
*
* @package tool_log
* @category backup
* @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();
/**
* Parent class of all the logstore subplugin implementations.
*
* Note: While this intermediate class is not strictly required and all the
* subplugin implementations can extend directly {@link backup_subplugin},
* it is always recommended to have it, both for better testing and also
* for sharing code between all subplugins.
*/
abstract class backup_tool_log_logstore_subplugin extends backup_subplugin {
}
@@ -1,152 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Restore support for tool_log logstore subplugins.
*
* @package tool_log
* @category backup
* @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();
/**
* Parent class of all the logstore subplugin implementations.
*
* Note: While this intermediate class is not strictly required and all the
* subplugin implementations can extend directly {@link restore_subplugin},
* it is always recommended to have it, both for better testing and also
* for sharing code between all subplugins.
*/
abstract class restore_tool_log_logstore_subplugin extends restore_subplugin {
/**
* Process log entries.
*
* This method proceeds to read, complete, remap and, finally,
* discard or save every log entry.
*
* @param array $data log entry.
* @return object|null $dataobject A data object with values for one or more fields in the record,
* or null if we are not going to process the log.
*/
protected function process_log($data) {
$data = (object) $data;
// Complete the information that does not come from backup.
$contextid = $data->contextid;
if (!$data->contextid = $this->get_mappingid('context', $contextid)) {
$message = "Context id \"$contextid\" could not be mapped. Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return;
}
$context = context::instance_by_id($data->contextid, MUST_EXIST);
$data->contextlevel = $context->contextlevel;
$data->contextinstanceid = $context->instanceid;
$data->courseid = $this->task->get_courseid();
// Remap users.
$userid = $data->userid;
if (!$data->userid = $this->get_mappingid('user', $userid)) {
$message = "User id \"$userid\" could not be mapped. Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return;
}
if (!empty($data->relateduserid)) { // This is optional.
$relateduserid = $data->relateduserid;
if (!$data->relateduserid = $this->get_mappingid('user', $relateduserid)) {
$message = "Related user id \"$relateduserid\" could not be mapped. Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return;
}
}
if (!empty($data->realuserid)) { // This is optional.
$realuserid = $data->realuserid;
if (!$data->realuserid = $this->get_mappingid('user', $realuserid)) {
$message = "Real user id \"$realuserid\" could not be mapped. Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return;
}
}
// Roll dates.
$data->timecreated = $this->apply_date_offset($data->timecreated);
// Revert other to its original php way.
$data->other = unserialize(base64_decode($data->other));
// Arrived here, we have both 'objectid' and 'other' to be converted. This is the tricky part.
// Both are pointing to other records id, but the sources are not identified in the
// same way restore mappings work. So we need to delegate them to some resolver that
// will give us the correct restore mapping to be used.
if (!empty($data->objectid)) {
// Check if there is an available class for this event we can use to map this value.
$eventclass = $data->eventname;
if (class_exists($eventclass)) {
$mapping = $eventclass::get_objectid_mapping();
if ($mapping) {
// Check if it can not be mapped.
if ((is_int($mapping) && $mapping === \core\event\base::NOT_MAPPED) ||
($mapping['restore'] === \core\event\base::NOT_MAPPED)) {
$data->objectid = \core\event\base::NOT_MAPPED;
} else {
$data->objectid = $this->get_mappingid($mapping['restore'], $data->objectid,
\core\event\base::NOT_FOUND);
}
}
} else {
$message = "Event class not found: \"$eventclass\". Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return; // No such class, can not restore.
}
}
if (!empty($data->other)) {
// Check if there is an available class for this event we can use to map this value.
$eventclass = $data->eventname;
if (class_exists($eventclass)) {
$othermapping = $eventclass::get_other_mapping();
if ($othermapping) {
// Go through the data we have.
foreach ($data->other as $key => $value) {
// Check if there is a corresponding key we can use to map to.
if (isset($othermapping[$key]) && !empty($value)) {
// Ok, let's map this.
$mapping = $othermapping[$key];
// Check if it can not be mapped.
if ((is_int($mapping) && $mapping === \core\event\base::NOT_MAPPED) ||
($mapping['restore'] === \core\event\base::NOT_MAPPED)) {
$data->other[$key] = \core\event\base::NOT_MAPPED;
} else {
$data->other[$key] = $this->get_mappingid($mapping['restore'], $value,
\core\event\base::NOT_FOUND);
}
}
}
}
// Now we want to serialize it so we can store it in the DB.
$data->other = serialize($data->other);
} else {
$message = "Event class not found: \"$eventclass\". Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return; // No such class, can not restore.
}
}
return $data;
}
}
@@ -1,98 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Backup implementation for the (tool_log) logstore_database nested element.
*
* @package logstore_database
* @category backup
* @copyright 2015 Damyon Wiese <damyon@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Custom subclass of backup_nested_element that iterates over an external DB connection.
*
* @package logstore_database
* @category backup
* @copyright 2015 Damyon Wiese <damyon@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_logstore_database_nested_element extends backup_nested_element {
/**
* @var \moodle_database $sourcedb
*/
protected $sourcedb;
/**
* Constructor - instantiates one backup_nested_element, specifying its basic info.
*
* @param string $name name of the element
* @param array $attributes attributes this element will handle (optional, defaults to null)
* @param array $finalelements this element will handle (optional, defaults to null)
*/
public function __construct($name, $attributes = null, $finalelements = null) {
global $DB;
parent::__construct($name, $attributes, $finalelements);
$this->sourcedb = $DB;
}
/**
* For sql or table datasources, this will iterate over the "external" DB connection
* stored in this class instead of the default $DB. All other cases use the parent default.
* @param object $processor the processor
*/
protected function get_iterator($processor) {
if ($this->get_source_table() !== null) { // It's one table, return recordset iterator.
return $this->get_source_db()->get_recordset(
$this->get_source_table(),
backup_structure_dbops::convert_params_to_values($this->procparams, $processor),
$this->get_source_table_sortby()
);
} else if ($this->get_source_sql() !== null) { // It's one sql, return recordset iterator.
return $this->get_source_db()->get_recordset_sql(
$this->get_source_sql(),
backup_structure_dbops::convert_params_to_values($this->procparams, $processor)
);
}
return parent::get_iterator($processor);
}
/**
* Set the database we want to use.
*
* @param \moodle_database $db
*/
public function set_source_db($db) {
$this->sourcedb = $db;
}
/**
* Get the database we want to use.
*
* @return \moodle_database $db
*/
public function get_source_db() {
return $this->sourcedb;
}
}
@@ -1,65 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Backup implementation for the (tool_log) logstore_database subplugin.
*
* @package logstore_database
* @category backup
* @copyright 2015 Mark Nelson <markn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once('backup_logstore_database_nested_element.php');
class backup_logstore_database_subplugin extends backup_tool_log_logstore_subplugin {
/**
* Returns the subplugin structure to attach to the 'logstore' XML element.
*
* @return backup_subplugin_element the subplugin structure to be attached.
*/
protected function define_logstore_subplugin_structure() {
$subplugin = $this->get_subplugin_element();
$subpluginwrapper = new backup_nested_element($this->get_recommended_name());
// Create the custom (base64 encoded, xml safe) 'other' final element.
$otherelement = new base64_encode_final_element('other');
$subpluginlog = new backup_logstore_database_nested_element('logstore_database_log', array('id'), array(
'eventname', 'component', 'action', 'target', 'objecttable',
'objectid', 'crud', 'edulevel', 'contextid', 'userid', 'relateduserid',
'anonymous', $otherelement, 'timecreated', 'ip', 'realuserid'));
$subplugin->add_child($subpluginwrapper);
$subpluginwrapper->add_child($subpluginlog);
// Get the details for the external database.
$manager = new \tool_log\log\manager();
$store = new \logstore_database\log\store($manager);
$extdb = $store->get_extdb();
if (!$extdb) {
return false;
}
$subpluginlog->set_source_db($extdb);
$subpluginlog->set_source_table($store->get_config_value('dbtable'), array('contextid' => backup::VAR_CONTEXTID));
return $subplugin;
}
}
@@ -1,102 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Restore implementation for the (tool_log) logstore_database subplugin.
*
* @package logstore_database
* @category backup
* @copyright 2015 Mark Nelson <markn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
class restore_logstore_database_subplugin extends restore_tool_log_logstore_subplugin {
/**
* @var moodle_database the external database.
*/
private static $extdb = null;
/**
* @var string the external database table name.
*/
private static $extdbtablename = null;
/**
* The constructor for this logstore.
*
* @param string $subplugintype the subplugin type.
* @param string $subpluginname the subplugin name.
* @param restore_structure_step $step.
*/
public function __construct($subplugintype, $subpluginname, $step) {
// Check that the logstore is enabled before setting variables.
$enabledlogstores = explode(',', get_config('tool_log', 'enabled_stores'));
if (in_array('logstore_database', $enabledlogstores)) {
$manager = new \tool_log\log\manager();
$store = new \logstore_database\log\store($manager);
self::$extdb = $store->get_extdb();
self::$extdbtablename = $store->get_config_value('dbtable');
}
parent::__construct($subplugintype, $subpluginname, $step);
}
/**
* Returns the subplugin structure to attach to the 'logstore' XML element.
*
* @return restore_path_element[] array of elements to be processed on restore.
*/
protected function define_logstore_subplugin_structure() {
// If the logstore is not enabled we don't add structures for it.
$enabledlogstores = explode(',', get_config('tool_log', 'enabled_stores'));
if (!in_array('logstore_database', $enabledlogstores)) {
return array(); // The logstore is not enabled, nothing to restore.
}
$paths = array();
$elename = $this->get_namefor('log');
$elepath = $this->get_pathfor('/logstore_database_log');
$paths[] = new restore_path_element($elename, $elepath);
return $paths;
}
/**
* Process logstore_database_log entries.
*
* This method proceeds to read, complete, remap and, finally,
* discard or save every log entry.
*
* @param array() $data log entry.
* @return null if we are not restoring the log.
*/
public function process_logstore_database_log($data) {
// Do not bother processing if we can not add it to a database.
if (!self::$extdb || !self::$extdbtablename) {
return;
}
$data = $this->process_log($data);
if ($data) {
self::$extdb->insert_record(self::$extdbtablename, $data);
}
}
}
@@ -258,30 +258,6 @@ class store implements \tool_log\log\writer, \core\log\sql_reader {
return $this->extdb->count_records_select($dbtable, $selectwhere, $params);
}
/**
* Get a config value for the store.
*
* @param string $name Config name
* @param mixed $default default value
* @return mixed config value if set, else the default value.
*/
public function get_config_value($name, $default = null) {
return $this->get_config($name, $default);
}
/**
* Get the external database object.
*
* @return \moodle_database $extdb
*/
public function get_extdb() {
if (!$this->init()) {
return false;
}
return $this->extdb;
}
/**
* Are the new events appearing in the reader?
*
@@ -52,8 +52,7 @@ class logstore_database_store_testcase extends advanced_testcase {
$this->assertCount(0, $stores);
// Fake the settings, we will abuse the standard plugin table here...
$parts = explode('_', get_class($DB));
set_config('dbdriver', $parts[1] . '/' . $parts[0], 'logstore_database');
set_config('dbdriver', $CFG->dblibrary . '/' . $CFG->dbtype, 'logstore_database');
set_config('dbhost', $CFG->dbhost, 'logstore_database');
set_config('dbuser', $CFG->dbuser, 'logstore_database');
set_config('dbpass', $CFG->dbpass, 'logstore_database');
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2015070700; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2015051101; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2015050500; // Requires this Moodle version.
$plugin->component = 'logstore_legacy'; // Full name of the plugin (used for diagnostics).
@@ -1,55 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Backup implementation for the (tool_log) logstore_standard subplugin.
*
* @package logstore_standard
* @category backup
* @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();
class backup_logstore_standard_subplugin extends backup_tool_log_logstore_subplugin {
/**
* Returns the subplugin structure to attach to the 'logstore' XML element.
*
* @return backup_subplugin_element the subplugin structure to be attached.
*/
protected function define_logstore_subplugin_structure() {
$subplugin = $this->get_subplugin_element();
$subpluginwrapper = new backup_nested_element($this->get_recommended_name());
// Create the custom (base64 encoded, xml safe) 'other' final element.
$otherelement = new base64_encode_final_element('other');
$subpluginlog = new backup_nested_element('logstore_standard_log', array('id'), array(
'eventname', 'component', 'action', 'target', 'objecttable',
'objectid', 'crud', 'edulevel', 'contextid', 'userid', 'relateduserid',
'anonymous', $otherelement, 'timecreated', 'ip', 'realuserid'));
$subplugin->add_child($subpluginwrapper);
$subpluginwrapper->add_child($subpluginlog);
$subpluginlog->set_source_table('logstore_standard_log', array('contextid' => backup::VAR_CONTEXTID));
return $subplugin;
}
}
@@ -1,69 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Restore implementation for the (tool_log) logstore_standard subplugin.
*
* @package logstore_standard
* @category backup
* @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();
class restore_logstore_standard_subplugin extends restore_tool_log_logstore_subplugin {
/**
* Returns the subplugin structure to attach to the 'logstore' XML element.
*
* @return restore_path_element[] array of elements to be processed on restore.
*/
protected function define_logstore_subplugin_structure() {
// If the logstore is not enabled we don't add structures for it.
$enabledlogstores = explode(',', get_config('tool_log', 'enabled_stores'));
if (!in_array('logstore_standard', $enabledlogstores)) {
return array(); // The logstore is not enabled, nothing to restore.
}
$paths = array();
$elename = $this->get_namefor('log');
$elepath = $this->get_pathfor('/logstore_standard_log');
$paths[] = new restore_path_element($elename, $elepath);
return $paths;
}
/**
* Process logstore_standard_log entries.
*
* This method proceeds to read, complete, remap and, finally,
* discard or save every log entry.
*
* @param array() $data log entry.
*/
public function process_logstore_standard_log($data) {
global $DB;
$data = $this->process_log($data);
if ($data) {
$DB->insert_record('logstore_standard_log', $data);
}
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2015070700; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2015051101; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2015050500; // Requires this Moodle version.
$plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
+26 -1
View File
@@ -102,6 +102,10 @@ class manager {
try {
$this->client->login();
mtrace("Connection established.");
// Ensure that mailboxes exist.
$this->ensure_mailboxes_exist();
return true;
} catch (\Horde_Imap_Client_Exception $e) {
@@ -741,6 +745,27 @@ class manager {
return in_array($flag, $flags);
}
/**
* Ensure that all mailboxes exist.
*/
private function ensure_mailboxes_exist() {
$requiredmailboxes = array(
self::MAILBOX,
self::CONFIRMATIONFOLDER,
);
$existingmailboxes = $this->client->listMailboxes($requiredmailboxes);
foreach ($requiredmailboxes as $mailbox) {
if (isset($existingmailboxes[$mailbox])) {
// This mailbox was found.
continue;
}
mtrace("Unable to find the '{$mailbox}' mailbox - creating it.");
$this->client->createMailbox($mailbox);
}
}
/**
* Attempt to determine whether this message is a bulk message (e.g. automated reply).
*
@@ -873,7 +898,7 @@ class manager {
$userfrom->customheaders[] = 'In-Reply-To: ' . $messageid;
// The message will be sent from the intended user.
$eventdata->userfrom = \core_user::get_noreply_user();
$eventdata->userfrom = \core_user::get_support_user();
$eventdata->userto = $USER;
$eventdata->subject = $this->get_reply_subject($this->currentmessagedata->envelope->subject);
$eventdata->fullmessage = get_string('invalidrecipientdescription', 'tool_messageinbound', $this->currentmessagedata);
@@ -74,9 +74,4 @@ class rule_created extends \core\event\base {
return new \moodle_url('/admin/tool/monitor/edit.php', array('ruleid' => $this->objectid,
'courseid' => $this->courseid));
}
public static function get_objectid_mapping() {
// No mapping required for this event because event monitor rules are not backed up.
return array('db' => 'tool_monitor_rules', 'restore' => \core\event\base::NOT_MAPPED);
}
}

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