Compare commits

...

737 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) fb8bd4eefe Moodle release 2.7.14 2016-05-08 00:23:31 +02:00
Eloy Lafuente (stronk7) 764a377498 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2016-05-08 00:23:27 +02:00
Simey Lameze a4bacca03b MDL-53913 core_user: make parameters consistent across versions 2016-05-06 09:50:52 +08:00
Andrew Nicols 0cc5fd542c MDL-53589 badges: Correct context 2016-05-06 09:50:51 +08:00
Eloy Lafuente (stronk7) 932572a65f MDL-54018 timezones: Updated to 2016d 2016-05-06 09:50:51 +08:00
Frederic Massart 188a3e7f70 MDL-51369 course: Adding tests to cover restoring course info 2016-05-06 09:50:50 +08:00
Frederic Massart 24b0c3c86a 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:50:50 +08:00
Frederic Massart 4c27175d35 MDL-53954 user: Prevent locked profile fields from being edited 2016-05-06 09:50:50 +08:00
Andrew Nicols 1f5c494f76 MDL-53755 forum: Check session when marking posts 2016-05-06 09:50:49 +08:00
Dan Marsden 3b0357ec11 MDL-53546 SCORM: Set window.opener to null 2016-05-06 09:50:49 +08:00
AMOS bot 3c3a2e5a9b Automatically generated installer lang files 2016-05-05 00:05:14 +08:00
David Monllao e7bca5e773 MDL-54008 tz: Avoid using Caracas tz
Changed in May 2016.
2016-05-02 16:45:19 +08:00
AMOS bot ea28e5c16f Automatically generated installer lang files 2016-05-02 00:04:56 +08:00
AMOS bot f85098f750 Automatically generated installer lang files 2016-04-30 00:07:31 +08:00
Dan Poltawski bf659cf992 weekly release 2.7.13+ 2016-04-29 15:55:15 +01:00
Dan Poltawski 3ac5c9214f Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2016-04-29 15:55:12 +01:00
Eloy Lafuente (stronk7) a33bcb1ad4 MDL-53928 environment: add xmlreader requirement for 3.1 2016-04-24 01:38:08 +02:00
AMOS bot 58bdad73f9 Automatically generated installer lang files 2016-04-13 00:04:52 +08:00
AMOS bot 4f3d703a04 Automatically generated installer lang files 2016-04-07 00:05:44 +08:00
AMOS bot dfe76fd4aa Automatically generated installer lang files 2016-04-01 00:05:29 +08:00
Dan Poltawski 3a775835f7 weekly release 2.7.13+ 2016-03-31 14:06:57 +08:00
Dan Poltawski 858d152f00 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2016-03-31 14:06:54 +08:00
AMOS bot f507b978cb Automatically generated installer lang files 2016-03-30 00:04:55 +08:00
AMOS bot 83174c10ed Automatically generated installer lang files 2016-03-29 00:04:53 +08:00
AMOS bot 8b41f763fd Automatically generated installer lang files 2016-03-25 00:05:15 +08:00
Eloy Lafuente (stronk7) a5ea6951e4 MDL-53585 timezones: Updated to 2016b 2016-03-23 13:20:59 +01:00
Eloy Lafuente (stronk7) e7acb5cfca Moodle release 2.7.13 2016-03-12 00:37:46 +01:00
Eloy Lafuente (stronk7) 89a50ced1f Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2016-03-12 00:37:42 +01:00
Simey Lameze f4fcb1c4f7 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:23:36 +01:00
Simey Lameze 3b214760fb 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:23:31 +01:00
Simey Lameze 55ba3a26d2 MDL-53031 mod_assign: add session check on assignment plugins management 2016-03-08 19:55:02 +01:00
Jun Pataleta 089ab60017 MDL-52433 user: Remove unnecessary capability check 2016-03-08 12:25:05 +01:00
Cameron Ball 9f91c23536 MDL-52651 htmlpurifier: Append rel=noreferrer to links.
Thank you to Zachary Durber for originally working on this issue.
2016-03-08 02:09:13 +01:00
Krista Koivisto ea8987644f 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:32:05 +01:00
Juan Leyva 11106f6cee MDL-52901 mod_assign: Check due dates in external save_submission 2016-03-08 00:14:49 +01:00
Juan Leyva c631b112d6 MDL-52808 calendar: Do not return events for hidden activities 2016-03-07 22:31:30 +01:00
David Mudrák 87e60e5299 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, the s() seems to be 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:06:50 +01:00
AMOS bot 246a8720f4 Automatically generated installer lang files 2016-03-03 22:24:42 +08:00
AMOS bot 9d0328d512 Automatically generated installer lang files 2016-03-03 22:24:42 +08:00
AMOS bot 7816a936f4 Automatically generated installer lang files 2016-03-03 00:04:54 +08:00
AMOS bot 64c2c35e47 Automatically generated installer lang files 2016-02-28 00:04:47 +08:00
AMOS bot 77798e3ab5 Automatically generated installer lang files 2016-02-25 00:12:17 +08:00
AMOS bot c1b28f4c53 Automatically generated installer lang files 2016-02-24 00:05:05 +08:00
Dan Poltawski c8eb9ee629 weekly release 2.7.12+ 2016-02-22 09:11:08 +00:00
Dan Poltawski 958b261ba3 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2016-02-22 09:11:07 +00:00
AMOS bot a927e80033 Automatically generated installer lang files 2016-02-13 00:04:58 +08:00
Eloy Lafuente (stronk7) 8459a1e0c9 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-10 18:29:07 +01:00
AMOS bot 9f7e43b966 Automatically generated installer lang files 2016-02-10 00:04:50 +08:00
AMOS bot 467f7d4663 Automatically generated installer lang files 2016-02-06 00:04:45 +08:00
AMOS bot 6b1b3d6970 Automatically generated installer lang files 2016-02-04 00:04:50 +08:00
AMOS bot 5243e075d2 Automatically generated installer lang files 2016-01-28 00:04:58 +08:00
AMOS bot 5c8c9eb2b1 Automatically generated installer lang files 2016-01-26 00:04:42 +08:00
AMOS bot 048c1dfd12 Automatically generated installer lang files 2016-01-25 00:04:44 +08:00
AMOS bot 0b1befe942 Automatically generated installer lang files 2016-01-23 00:04:56 +08:00
AMOS bot 691048cf99 Automatically generated installer lang files 2016-01-19 00:05:26 +08:00
AMOS bot 314f6cfe4c Automatically generated installer lang files 2016-01-13 00:04:35 +08:00
Eloy Lafuente (stronk7) 3f85661e18 Moodle release 2.7.12 2016-01-09 00:49:38 +01:00
Eloy Lafuente (stronk7) 0d8f9cfa23 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2016-01-09 00:49:34 +01:00
AMOS bot cbc01e026f Automatically generated installer lang files 2016-01-06 00:04:36 +08:00
Juan Leyva c14e2d624c MDL-52072 enrol: Fix course visibility checks in external functions 2016-01-05 10:31:42 +00:00
AMOS bot 6db07d4ba7 Automatically generated installer lang files 2016-01-04 00:04:59 +08:00
AMOS bot 0be0a9a6c6 Automatically generated installer lang files 2015-12-25 00:04:40 +08:00
AMOS bot 58224a3895 Automatically generated installer lang files 2015-12-20 00:05:52 +08:00
Dan Poltawski 25cc38fa1b weekly release 2.7.11+ 2015-12-18 12:27:21 +00:00
Dan Poltawski 9d5c4e3a31 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-12-18 12:27:19 +00:00
Marina Glancy 44ecaa6858 MDL-52438 core: allow Moodle 3.0 to be used with PHP7 2015-12-10 17:58:06 +08:00
AMOS bot 476931bd9d Automatically generated installer lang files 2015-12-05 00:05:18 +08:00
AMOS bot a0a823432e Automatically generated installer lang files 2015-12-04 00:05:16 +08:00
AMOS bot a41b505a22 Automatically generated installer lang files 2015-11-25 00:04:54 +08:00
Dan Poltawski d27a325e72 weekly release 2.7.11+ 2015-11-19 09:20:43 +00:00
Dan Poltawski 39656c43ea Merge branch 'wip-MDL-52194-m27' of https://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-11-19 06:49:41 +00:00
Marina Glancy 5486cc980c MDL-52194 flowplayer: do not check request
$_REQUEST variable may contain cookies in some php configurations. See also MDL-48085
2015-11-18 15:38:27 +08:00
Eloy Lafuente (stronk7) ab881c73e9 weekly release 2.7.11+ 2015-11-10 10:49:45 +01:00
Eloy Lafuente (stronk7) 9abe17f825 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-11-10 10:49:38 +01:00
AMOS bot d503e1badd Automatically generated installer lang files 2015-11-10 00:04:44 +08:00
David Monllao a55bf44fc5 Merge branch 'MDL-49473-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-11-09 15:13:34 +08:00
Eloy Lafuente (stronk7) 059c03d494 Moodle release 2.7.11 2015-11-06 20:51:29 +01:00
rajesh Taneja d01512e36c MDL-50837 mod_scorm: include locallib to access function 2015-11-06 20:44:25 +01:00
Dan Poltawski 8f097731ad weekly release 2.7.10+ 2015-11-06 11:56:46 +00:00
Dan Poltawski cb550d707c Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-11-06 11:56:44 +00:00
Eloy Lafuente (stronk7) ff9f974ad8 MDL-51861 enrol: added missing external cleanup for formal compliance 2015-11-06 10:07:44 +00:00
Dani Palou 12bc713081 MDL-51861 enrol: Don't get all parts in get_enrolled_users with groups 2015-11-06 15:13:14 +08:00
Eloy Lafuente (stronk7) 3b6de196e5 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:13:07 +08:00
John Okely fb2491effb MDL-51569 mod_choice: Prevent users from updating choices with curl 2015-11-06 14:53:46 +08:00
Damyon Wiese 97394274ee 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:56:36 +00:00
David Monllao d70f610615 MDL-51684 badges: Make sure 'moodle/badges:viewbadges' is respected
Credit to Yuliya Bozhko.
2015-11-04 13:02:58 +00:00
Juan Leyva 3d58fd5841 MDL-50837 mod_scorm: Fix availability checks 2015-11-04 12:56:34 +01:00
Juan Leyva bdaa571437 MDL-51569 mod_choice: Check choice availability prior to do any action 2015-11-04 11:08:59 +00:00
Cameron Ball a1168a7427 MDL-51091 core_registration: session key check in registration. 2015-11-04 18:46:29 +08:00
Simey Lameze fd14d2902f MDL-49940 mod_survey: Fix XSS on survey module 2015-11-04 18:46:29 +08:00
Hugh Davenport 86cec86942 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:29 +08:00
Simey Lameze f75333766c MDL-48109 mod_lesson: prevent CSRF on 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:29 +08:00
Petr Skoda 26da47c704 MDL-48085 flowplayer: prevent flash parameters via url 2015-11-04 10:38:22 +00:00
Adrian Greeve 7d6e5d78d6 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:18:55 +08:00
AMOS bot b249fb78b1 Automatically generated installer lang files 2015-11-04 00:04:57 +08:00
Dan Poltawski 5be2cb4ffa MDL-49473 logs: ensure exported logs contain year 2015-11-03 11:38:45 +00:00
Adrian Greeve 9735a1a4a5 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-03 16:47:42 +08:00
Dan Poltawski d70a6a7235 weekly release 2.7.10+ 2015-10-30 21:08:50 +00:00
Dan Poltawski cbbbd25d60 Merge branch 'MDL-51939-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-10-29 14:16:22 +00:00
Eloy Lafuente (stronk7) f857f7c443 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:04:24 +08:00
Andrew Nicols 14d3f19dd8 weekly release 2.7.10+ 2015-10-28 12:57:52 +08:00
Andrew Nicols 59b8d89ba8 MDL-51939 mod_forum: Correct empty groupinfo check 2015-10-28 12:11:34 +08:00
Eloy Lafuente (stronk7) ab937ab868 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:57:31 +00:00
Dan Poltawski 840ae905cc weekly release 2.7.10+ 2015-10-23 12:51:58 +01:00
David Monllao 77993ae5e4 MDL-51822 timezones: Update to IANA 2015g 2015-10-20 10:07:51 +08:00
Eloy Lafuente (stronk7) 69cde92e60 weekly release 2.7.10+ 2015-10-16 12:51:11 +02:00
Eloy Lafuente (stronk7) 364bcdcd10 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-10-16 12:51:05 +02:00
Andrew Nicols c1e723b8e6 Merge branch 'MDL-50182_27' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2015-10-16 08:16:14 +08:00
Eloy Lafuente (stronk7) 730529d4f2 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:36:31 +02:00
Mifsud Gaël 3c6d9d5392 MDL-51083 admin: Prevent password autofill in authentication settings 2015-10-09 14:34:17 +08:00
AMOS bot bf4da5f6e6 Automatically generated installer lang files 2015-09-28 00:04:21 +08:00
Eloy Lafuente (stronk7) 8f64e05ae0 weekly release 2.7.10+ 2015-09-24 16:07:06 +02:00
Paul Nicholls 08e02452dc 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:25:43 +12:00
Eloy Lafuente (stronk7) c92478291f Moodle release 2.7.10 2015-09-12 02:02:53 +02:00
Eloy Lafuente (stronk7) d430445562 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-09-12 02:02:47 +02:00
Marina Glancy 936facab28 MDL-50744 enrol_meta: fix incorrect role assign (#2) 2015-09-11 08:14:15 +08:00
rajesh Taneja 2ad7733c07 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:53:17 +08:00
Andrew Nicols c3757ed868 Merge branch 'MDL-50852-27' of git://github.com/junpataleta/moodle into MOODLE_27_STABLE 2015-09-09 15:42:36 +08:00
Jun Pataleta f91ea3f848 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:40:39 +08:00
Mark Nelson 748d8a982b MDL-50516 mod_lesson: changes to existing behat tests 2015-09-09 15:33:05 +08:00
Mark Nelson 1d017fb8cd MDL-50516 mod_lesson: added behat tests 2015-09-09 15:33:05 +08:00
Mark Nelson b22e3e6170 MDL-50516 core_behat: added ability to go back, forward and reload the browser 2015-09-09 15:33:04 +08:00
Mark Nelson ca74203efd 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:33:04 +08:00
Mark Nelson e7288eaabe 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:33:04 +08:00
Mark Nelson 3071f08591 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:33:04 +08:00
Ankit Agarwal 4015226623 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 2 commits but for amending purposes they have
been squashed.
2015-09-09 04:53:35 +02:00
Andrew Nicols 0bbeac0d0d MDL-50576 mod_forum: Correct use of movedicussions cap when posting This is a partial backport of the logic added on MDL-50714 to post.php to prevent users to post to a forum without permission.
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-09-08 16:43:21 +02:00
Simey Lameze 7824b2f6d9 MDL-50576 mod_forum: prevent posting to a non-member group
Thanks Fred for the help on the issue.
2015-09-08 16:43:21 +02:00
John Okely 45f3b5302d MDL-50709 groups: Prevent XSS in grouping description 2015-09-08 12:50:12 +02:00
Petr Skoda 6e8224365f MDL-50860 core: improve creation of random strings 2015-09-08 01:09:28 +02:00
Eloy Lafuente (stronk7) a178221dcc MDL-42670 mod_assign: include missing assign/localib.php 2015-09-07 22:56:55 +02:00
Tim Lock acefd2e24f MDL-42670 mod_assign: Fix recent activity block when blind marking is on 2015-09-07 22:45:15 +02:00
Marina Glancy dff6cdc883 MDL-50744 enrol_meta: fix incorrect role assign 2015-09-07 10:29:12 +01:00
Adrian Greeve 78de2e86e8 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:29 +01:00
AMOS bot e9cb74ea3c Automatically generated installer lang files 2015-09-04 00:04:17 +08:00
AMOS bot e0e0a2346a Automatically generated installer lang files 2015-09-02 00:05:38 +08:00
Marina Glancy ddd6ae29fb MDL-51131 tags: remove instances when course is deleted 2015-08-25 13:16:24 +08:00
Eloy Lafuente (stronk7) 7e5fc27be9 weekly release 2.7.9+ 2015-08-13 12:16:44 +02:00
Eloy Lafuente (stronk7) 68d9b2583a Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-08-13 12:16:39 +02:00
AMOS bot 029bb76641 Automatically generated installer lang files 2015-08-13 00:04:33 +08:00
AMOS bot b227a2c771 Automatically generated installer lang files 2015-08-13 00:04:33 +08:00
John Okely 826c79f4b2 MDL-51050 admin: Stop browsers from autofilling passwords incorrectly
Backport of MDL-45772.
2015-08-09 19:26:45 +02:00
AMOS bot 3f58ec1385 Automatically generated installer lang files 2015-08-07 00:04:12 +08:00
Andrew Nicols c66e940849 weekly release 2.7.9+ 2015-08-06 12:11:15 +08:00
Andrew Nicols 1bd23e0728 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-08-06 12:11:09 +08:00
AMOS bot ca0366e03f Automatically generated installer lang files 2015-08-06 00:04:20 +08:00
AMOS bot d0ef635c4e Automatically generated installer lang files 2015-08-06 00:04:20 +08:00
Eloy Lafuente (stronk7) 2faa6cee53 Merge branch 'MDL-50416-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-08-04 19:56:37 +02:00
Simey Lameze 578f992731 MDL-50416 environment: remove slasharguments warning from install 2015-08-04 09:53:05 +08:00
Ryan Wyllie 81d961ba3a MDL-50624 environment: add PHP7 as unsupported version
Added PHP7 as an unsupported version for Moodle 2.7, 2.8 and 2.9
in the environment checks
2015-08-04 01:36:33 +00:00
AMOS bot 2ef21fc1de Automatically generated installer lang files 2015-08-04 00:04:29 +08:00
AMOS bot 0b777c448a Automatically generated installer lang files 2015-07-26 00:04:10 +08:00
AMOS bot 76a37f3a42 Automatically generated installer lang files 2015-07-24 00:04:27 +08:00
AMOS bot e1a7d6b0c3 Automatically generated installer lang files 2015-07-21 00:04:43 +08:00
AMOS bot b9facf0b41 Automatically generated installer lang files 2015-07-20 00:05:16 +08:00
AMOS bot 447e895db9 Automatically generated installer lang files 2015-07-18 00:05:26 +08:00
AMOS bot 3dcc3440d1 Automatically generated installer lang files 2015-07-17 00:05:14 +08:00
Eloy Lafuente (stronk7) fa54db9c03 Moodle release 2.7.9 2015-07-03 13:38:11 +02:00
Eloy Lafuente (stronk7) a7c5b8b2c7 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-07-03 13:38:05 +02:00
Juan Leyva ffe5c78488 MDL-50130 users: Filter profile fields data in external functions 2015-06-30 19:50:48 +02:00
AMOS bot 6ac71df086 Automatically generated installer lang files 2015-07-01 00:05:08 +08:00
Dan Marsden f3e7afedb9 MDL-50614 mod_scorm: Improve validation on currentorg 2015-06-30 10:14:56 +08:00
Eloy Lafuente (stronk7) 630b8fdaea MDL-50688 lib: small cleanup + http/https coverage. 2015-06-29 17:50:23 +02:00
Petr Skoda 5673aae914 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:50:16 +02:00
AMOS bot 5b25b33fa7 Automatically generated installer lang files 2015-06-19 00:04:18 +08:00
Dan Poltawski c8a1646ab8 weekly release 2.7.8+ 2015-06-18 16:11:43 +01:00
Dan Poltawski 76cd16e6e4 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-06-18 16:11:41 +01:00
AMOS bot f886f76e7f Automatically generated installer lang files 2015-06-17 00:04:15 +08:00
AMOS bot 2d6c0ecd0d Automatically generated installer lang files 2015-06-17 00:04:14 +08:00
Andrew Nicols 920d2d9585 Merge branch 'MDL-50380-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-06-16 07:59:12 +08:00
Simey Lameze 2bd8a55dfd MDL-50380 mod_wiki: fix missing parameter on wiki edit files page
Also fixing a typo on the $referer variable.
2015-06-03 16:49:55 +08:00
AMOS bot 2f6c18c88c Automatically generated installer lang files 2015-06-02 00:04:22 +08:00
AMOS bot baa9517b57 Automatically generated installer lang files 2015-05-30 00:04:15 +08:00
AMOS bot 5330c5c2d4 Automatically generated installer lang files 2015-05-29 00:04:08 +08:00
AMOS bot 30aeabb79e Automatically generated installer lang files 2015-05-27 00:03:57 +08:00
AMOS bot 2f63a6883f Automatically generated installer lang files 2015-05-23 00:04:11 +08:00
AMOS bot ebb8f60603 Automatically generated installer lang files 2015-05-22 00:03:58 +08:00
Eloy Lafuente (stronk7) 37fd0a3d81 weekly release 2.7.8+ 2015-05-21 12:37:12 +02:00
Eloy Lafuente (stronk7) 547932e130 Merge branch 'MDL-50275-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-05-19 17:45:33 +02:00
Dan Poltawski ee612f1ed2 MDL-50275 quiz: version bump for MDL-49941
Otherwise the new capability risk does not get loaded
2015-05-19 15:47:13 +01:00
Dan Poltawski 67ac2b0cee Merge branch 'MDL-50177_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-05-18 13:05:02 +01:00
David Monllao a5155586fe MDL-50177 completion: Also accepting cm integer strings 2015-05-12 12:22:07 +08:00
Eloy Lafuente (stronk7) 12e29080e1 Moodle release 2.7.8 2015-05-10 11:39:14 +02:00
Eloy Lafuente (stronk7) 70a3da5396 weekly release 2.7.7+ 2015-05-08 12:14:24 +02:00
Eloy Lafuente (stronk7) 3109a202db Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-05-08 12:14:09 +02:00
Rajesh Taneja 3a22694267 MDL-50154 behat: Click on Grades link under navigation 2015-05-08 13:36:49 +08:00
Rajesh Taneja bda6ef6fe9 MDL-50154 behat: Resize pdf window so toolbar is always visible 2015-05-08 13:36:42 +08:00
Frederic Massart a13f667276 MDL-50128 mod_data: String needed escaping before being used in regex 2015-05-07 11:26:09 +08:00
Andrew Nicols 295fad3d07 Merge branch 'm27_MDL-50133' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-05-07 10:26:45 +08:00
Andrew Nicols fee5de5adf Merge branch 'MDL-49783-27' of git://github.com/mastnym/moodle into MOODLE_27_STABLE 2015-05-07 09:43:58 +08:00
Martin Mastny dfea73010d MDL-49783 forms: Collapsed form section is opened on error 2015-05-07 09:28:22 +08:00
Dan Marsden 3c542cdda5 MDL-50133 mod_scorm: use correct captypes 2015-05-07 11:47:15 +12:00
Dan Poltawski 9f1cd92626 Merge branch 'MDL-49664' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2015-05-06 09:33:04 +01:00
Dan Poltawski 045be2b1a7 Merge branch 'MDL-49664-27' of https://github.com/LukeCarrier/moodle into MOODLE_27_STABLE 2015-05-06 08:04:38 +01:00
Marina Glancy b7d307e807 MDL-49788 navigation: Ensure we only check active enrolments 2015-05-06 08:02:47 +01:00
Salih Gedik 70bd537332 MDL-49789 mod_book: filter book chapter content 2015-05-06 13:55:21 +08:00
Marina Glancy b4da1e0ae4 MDL-49718 externallib: unittest correction 2015-05-06 13:02:02 +08:00
Marina Glancy 78ec6751fc MDL-50090 user: suspended user can login upon conrimation 2015-05-06 11:02:26 +08:00
Juan Leyva 28947c1d7d MDL-49718 webservices: Fix forced format and force external text cleaning 2015-05-06 10:56:23 +08:00
Juan Leyva 350397da93 MDL-49994 files: Prevent to browse private files when are disabled 2015-05-06 10:27:40 +08:00
AMOS bot 4068025c04 Automatically generated installer lang files 2015-05-06 00:04:03 +08:00
Marina Glancy 80eb5bc7b7 MDL-50099 auth: less verbose account confirmed message 2015-05-05 15:34:02 +01:00
Frederic Massart 19bf8ae268 MDL-49179 setuplib: print_error() uses local URLs exclusively 2015-05-05 18:31:14 +08:00
Frederic Massart 7f426dd24f MDL-49179 weblib: Secure the direct usage of $_SERVER['HTTP_REFERER'] 2015-05-05 18:31:14 +08:00
Frederic Massart 278cd8f20f MDL-49179 mod_forum, mod_quiz: Prevent misuse of get_referer() 2015-05-05 18:31:14 +08:00
Tim Hunt 39ae18a2f9 MDL-49941 quiz: mod/quiz:grade should declare RISK_XSS 2015-05-05 18:31:14 +08:00
Frederic Massart df96662b0e MDL-49401 moodlelib: PARAM_LOCALURL supports loginhttps 2015-05-05 18:31:14 +08:00
Eloy Lafuente (stronk7) 323f3745fe weekly release 2.7.7+ 2015-05-05 12:28:40 +02:00
David Monllao 8cad4af03e Merge branch 'MDL-50055-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-05-05 10:52:29 +08:00
John Okely afa1a8e3fb MDL-49848 message: Make messaging interface responsive 2015-05-05 10:31:08 +08:00
Andrew Nicols 0a2c4e7eca MDL-50055 enrol: Stop requiring javascript for behat tests 2015-05-05 10:25:18 +08:00
Andrew Nicols 79da0b1581 MDL-50055 tests: Add new step to deal with Single Selects 2015-05-05 10:25:13 +08:00
David Monllao 03e35c77fd Merge branch 'MDL-49954-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-05-04 15:16:47 +08:00
David Monllao 8e20b6da45 MDL-50103 mod_assign: Fixing behat test
The participant number is dynamically generated so it is not possible to
match known values.

Match on the submission text instead.
2015-05-04 09:36:15 +08:00
David Monllao dbfaa2da32 weekly release 2.7.7+ 2015-05-01 16:47:20 +08:00
David Monllao 7f99e1d1ea MDL-49232 enrol_self: Adapting unit test to new can_self_enrol() output 2015-05-01 15:49:44 +08:00
Andrew Nicols e534e99afd Merge branch 'MDL-49232_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-05-01 09:28:13 +08:00
Dan Poltawski 29b97d94bb Merge branch 'MDL-50028_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-04-30 16:07:01 +01:00
Andrew Nicols a25eef762f Merge branch 'MDL-49583-m27' of https://github.com/NeillM/moodle into MOODLE_27_STABLE 2015-04-30 15:23:21 +08:00
Andrew Nicols 5473b69ade Merge branch 'MDL-50038-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-30 14:56:54 +08:00
Andrew Nicols 4d711ff280 Merge branch 'MDL-50033-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2015-04-30 10:52:27 +08:00
Andrew Nicols 04b42e3077 MDL-49232 enrol_self: Add behat test for non-guest self-enrolment 2015-04-29 18:02:51 -07:00
Mark Nelson 1a8400f5eb MDL-49232 enrol_self: display continue button 2015-04-29 18:02:50 -07:00
David Mudrák a1b09ffb52 MDL-50033 lang: Update Behat scenario to use the new string 2015-04-29 23:49:38 +02:00
Helen Foster ffce507736 MDL-50033 lang: Merge English strings from the en_fix language pack 2015-04-29 23:48:24 +02:00
Frederic Massart f78f3fb749 MDL-50038 my: Redirect admin users to the notifications page when needed 2015-04-29 19:05:14 +08:00
Neill Magill e4e261bd7e MDL-49583 enrol: enrol/index.php page doesn't handle direct access well
Before this patch if a user who is not logged in to Moodle accesses the
enrol/index.php page directly they were redirected to the Moodle front
page after login, rather than back to a page that would allow them to
self enrol, if it is enabled on the course.

This change will cause a user who directly accesses the page to be
redirected back to it after they have logged in, unless the course has guest
access enabled.

Thanks to Marina Glancy for suggesting the use of get_referer()
2015-04-29 09:14:38 +01:00
David Monllao 1354593011 Merge branch 'MDL-49637-m27' of git://github.com/NeillM/moodle into MOODLE_27_STABLE 2015-04-29 12:05:36 +08:00
Tim Hunt be18b7c593 MDL-50028 qtype_match: fix correct answer display
Atto's stupid tendency to create HTML like
<p>You don't need a br at the end of a paragraph!</br></p>
was breaking it.
2015-04-28 13:08:23 +01:00
Tim Hunt f7db06401e MDL-50028 questions: split into one testcase class per file 2015-04-28 13:08:21 +01:00
Dan Poltawski 697929847f weekly release 2.7.7+ 2015-04-28 09:28:14 +01:00
Dan Poltawski bbeaad5052 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-04-28 09:28:12 +01:00
Neill Magill 21c59d05e1 MDL-49637 assign: Workflow & blind marking do not always show feedback
Before this patch if an assignment has workflow and blind marking enabled if a teacher
sets a submission to have its grades released to students before they reveal student
identities the feedback they have given is not displayed to the student.

The patch causes the reveal_identities() method to pass the correct value to the
get_feedback_plugin_by_type() function in the assign class.
2015-04-28 09:12:12 +01:00
Neill Magill 62099b3be0 MDL-49637 assign: Behat test for blind marking with workflow
This test checks that that if reveal student identities is used before or after the submissions grades have
been set released that the teacher's feedback is displayed to students.
2015-04-28 09:11:59 +01:00
David Monllao 3a33d06d85 Merge branch 'MDL-42449-2.7' of git://github.com/andrewhancox/moodle into MOODLE_27_STABLE 2015-04-28 11:08:40 +08:00
David Monllao e22d6ad0ed Merge branch 'MDL-49911-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-28 09:47:16 +08:00
Eloy Lafuente (stronk7) a9074a2649 MDL-49664 renderers: Verify expected render methods are called.
For various renderables (core, plugin, namespaced), all them
against the base and plugin renderers.
2015-04-27 18:41:24 +02:00
Juan Leyva d89e4bc0e6 MDL-49954 forum: Use clean_returnvalue properly in external unit tests 2015-04-27 18:25:55 +02:00
AMOS bot df967d0185 Automatically generated installer lang files 2015-04-28 00:04:18 +08:00
Dan Poltawski d9f965c1e4 Merge branch 'MDL-49993_27' of git://github.com/grabs/moodle into MOODLE_27_STABLE 2015-04-27 14:48:01 +01:00
Dan Poltawski 2842b48847 Merge branch 'MDL-49913_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-04-27 14:28:36 +01:00
Dan Poltawski bba516205b Merge branch 'MDL-49977_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-04-27 10:53:21 +01:00
Andreas Grabs ade5a860b5 MDL-49993 mod_feedback: Question auto numbers have no space between number and question 2015-04-26 19:03:34 +02:00
AMOS bot 5452cc62f2 Automatically generated installer lang files 2015-04-25 00:04:12 +08:00
Andrew Hancox 9aae67ec07 MDL-42449 backup: Fix for activity grade category
Retain grade category when restoring an activity into the course that
it came from
2015-04-24 14:04:51 +01:00
Dan Poltawski e47d9d12c6 weekly release 2.7.7+ 2015-04-24 12:10:41 +01:00
Dan Poltawski e07cff97f1 Merge branch 'MDL-49960-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-24 09:06:38 +01:00
Frederic Massart 056e2ea0be MDL-49911 admin: Prevent notices when updatenotifications is disabled 2015-04-24 14:49:16 +08:00
Andrew Nicols 436463209e Merge branch 'MDL-49311-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-04-24 11:53:00 +08:00
papillon 2a9e7de93c MDL-49311 user: fix default sorting problem 2015-04-24 09:12:06 +08:00
Mark Nelson 86a79e2578 MDL-49977 mod_assign: added missing page titles 2015-04-23 17:08:55 -07:00
Dan Poltawski 40d66dfdd0 Merge branch 'MDL-49946_27' of https://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-04-23 13:32:36 +01:00
Andrew Nicols d2d64d0264 Merge branch 'MDL-49319_backport_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-04-23 15:24:28 +08:00
Frederic Massart 467fe2e4b1 MDL-49960 message: Adding behat test for recent conversations 2015-04-23 14:56:03 +08:00
Jean-Michel Vedrine 16ade9d88c MDL-49913 mod_lesson: studentanswer format should be HTML 2015-04-23 08:44:13 +02:00
Jean-Michel Vedrine b34be49db4 MDL-49913 mod_lesson: fix import scores and jumps 2015-04-23 08:44:11 +02:00
Jean-Michel Vedrine a5f4089c68 MDL-49913 mod_lesson: defaultanswer to avoid duplication 2015-04-23 08:39:05 +02:00
Jean-Michel Vedrine a6e090b15f MDL-49913 mod_lesson: round question grades on import 2015-04-23 08:31:05 +02:00
Andrew Nicols 26507a9a67 Merge branch 'MDL-49477-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-23 13:53:56 +08:00
Andrew Nicols 83180e040a Merge branch 'MDL-34921_27_unwanted-sitehome-redirects' of https://github.com/colin-umn/moodle into MOODLE_27_STABLE 2015-04-23 12:34:49 +08:00
Andrew Nicols 2ab166e39e Merge branch 'MDL-49613-m27' of https://github.com/NeillM/moodle into MOODLE_27_STABLE 2015-04-23 11:28:41 +08:00
Jean-Michel Vedrine 46ebedce58 MDL-49946 mod_lesson: improve qformat_default::defaultquestion 2015-04-22 19:57:17 +02:00
Dan Poltawski 70cb53466d Merge branch 'MDL-49921-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-22 16:40:58 +01:00
Andrew Davis a164589209 MDL-49319 core_registration: altered registration strings 2015-04-22 20:28:08 +08:00
Viduranga Wijesooriya 5ae7cc6255 MDL-49477 availability_grade-form: checkbox disable problem fixed
Signed-off-by: Viduranga Wijesooriya <vpowerrc@gmail.com>
2015-04-22 17:35:09 +08:00
Tony Butler 52cdd42a89 MDL-49933 mod_assign: Sort marker select lists alphabetically by name 2015-04-22 17:02:45 +08:00
Neill Magill 43f35d037e MDL-49613 access: count_role_users gives unexpected results
The count_role_users function in lib/accesslib.php gives the wrong results if a user has the
same role at multiple levels in a context path.

For example a user is a coursecreator on a course and the category that the course is in,
in this case they would be counted twice, rather than being recognised as the same user.

This change will make the function only count unique users.
2015-04-22 09:28:42 +01:00
Neill Magill 07f50b7284 MDL-49613 access: Unit test for count_role_users 2015-04-22 09:28:41 +01:00
Juan Leyva 852d96580b MDL-49921 forum: Handle exceptions correctly in get_forums_by_courses 2015-04-22 09:52:40 +02:00
Andrew Nicols 4d3bad7e51 Merge branch 'MDL-49753-m27' of https://github.com/alexmitin/moodle into MOODLE_27_STABLE 2015-04-22 11:07:04 +08:00
Dan Poltawski b4a592aa3b weekly release 2.7.7+ 2015-04-21 11:16:50 +01:00
Andrew Nicols a94e5a405d MDL-40811 uploaduser: Optimise testuser code 2015-04-21 11:38:58 +08:00
Andrew Nicols 3428cd4c9b Merge branch 'wip-mdl-40881-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-21 11:38:45 +08:00
Brian Barnes 6cb449dc0f MDL-49782 general: removed uses of window.status 2015-04-21 10:46:22 +08:00
Nadav Kavalerchik de8958e8ac MDL-40881 uploaduser: Validate profile fields unique values 2015-04-21 10:21:23 +08:00
Andrew Nicols 267f12abe1 Merge branch 'wip-mdl-49799-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-20 12:32:34 +08:00
Rajesh Taneja e69a1a6b6f MDL-49799 behat: use example.com as test email
asd.com is a valid domain, we should use reserved domain names for testing
2015-04-20 12:30:32 +08:00
David Monllao 83503c9838 Merge branch 'MDL-48187_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-04-20 12:19:50 +08:00
David Monllao fca58b02df Merge branch 'wip-MDL-49880-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2015-04-20 12:13:10 +08:00
Mark Nelson c0ffc90640 MDL-48187 core_course: use updated '$grade_item' 2015-04-19 20:30:42 -07:00
David Monllao 5ee0d1d3ee Merge branch 'm27_MDL-49904' of git://github.com/totara/moodle into MOODLE_27_STABLE 2015-04-20 10:42:02 +08:00
Adrian Greeve fd6358feaa MDL-49880 mod_lesson: Fixed notice while importing questions.
Cloze questions (not supported by lesson) threw up a notice saying that
the course wasn't set.
2015-04-20 08:43:46 +08:00
Dan Poltawski 99a5af9eda weekly release 2.7.7+ 2015-04-17 10:53:49 +01:00
David Monllao e0caa3031d Merge branch 'MDL-48723_27_forum-plagiarism_errors' of git://github.com/colin-umn/moodle into MOODLE_27_STABLE 2015-04-17 10:41:48 +08:00
Brian Barnes 62990c9d11 MDL-49904 user: set title when editing another user 2015-04-17 11:46:58 +12:00
Dan Poltawski 0bbacc0e2f Merge branch 'MDL-49837-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-16 12:17:32 +01:00
David Monllao 300503ddd6 Merge branch 'MDL-45131-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-16 17:05:23 +08:00
Juan Leyva 3d1c374bd5 MDL-45131 notes: Add validation for returned parameters in WS tests 2015-04-16 10:31:19 +02:00
Juan Leyva 59061012b8 MDL-45131 user: Add validation for returned parameters in WS tests 2015-04-16 10:31:07 +02:00
Juan Leyva df2f832789 MDL-45131 message: Add validation for returned parameters in WS tests 2015-04-16 10:30:52 +02:00
Juan Leyva 3135752ba0 MDL-45131 files: Add validation for returned parameters in WS tests 2015-04-16 10:30:41 +02:00
Juan Leyva d6fd894a76 MDL-45131 enrol: Add validation for returned parameters in WS tests 2015-04-16 10:30:28 +02:00
Juan Leyva 433b5c28db MDL-45131 course: Add validation for returned parameters in WS tests 2015-04-16 10:30:12 +02:00
Juan Leyva ef394f5aa9 MDL-45131 cohort: Add validation for returned parameters in WS tests 2015-04-16 10:28:33 +02:00
Juan Leyva 982440c14f MDL-45131 calendar: Add validation for returned parameters in WS tests 2015-04-16 10:28:22 +02:00
Skylar Kelty 715d55c963 MDL-49489 caching: Prevent full coursecontact purge 2015-04-16 07:50:08 +08:00
Dan Poltawski 8b011c7b2e Merge branch 'MDL-49803_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-04-15 15:06:20 +01:00
David Monllao 1106aa4c4c Revert "MDL-46963 core_upgrade: change the call to guess_antelope_row_size"
This reverts commit c85de44a7b.
2015-04-15 15:53:07 +08:00
David Monllao 840cb4e4d6 MDL-49803 mod_quiz: Fixing overrides restore 2015-04-15 15:31:18 +08:00
Simey Lameze c85de44a7b MDL-46963 core_upgrade: change the call to guess_antelope_row_size 2015-04-15 15:01:42 +08:00
David Monllao 59728f1a7c Merge branch 'MDL-46963-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-04-15 13:37:00 +08:00
Dan Poltawski 6378ece404 weekly release 2.7.7+ 2015-04-14 16:49:08 +01:00
Dan Poltawski a82add34eb Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-04-14 16:49:06 +01:00
Rajesh Taneja 8a8ae4df07 MDL-44611 behat: Description is required field and should be set 2015-04-14 12:17:26 +08:00
AMOS bot 62f8da23af Automatically generated installer lang files 2015-04-14 00:04:19 +08:00
Juan Leyva 24eae8af65 MDL-49837 assign: Use correct assertions and fix return params cleaning 2015-04-13 17:36:54 +02:00
Juan Leyva 16dde93127 MDL-49837 assign: Fix external functions return declaration
Incorrect use of external_warnings function
2015-04-13 17:36:53 +02:00
Dan Poltawski 81c0cd9644 Merge branch 'MDL-48702_backport_log_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-04-13 16:26:50 +01:00
Dan Poltawski ab3ac68481 Merge branch 'MDL-49166_site_rego_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-04-13 15:34:48 +01:00
Dan Poltawski 55b5acd0a8 Merge branch 'MDL-49756-27' of git://github.com/mr-russ/moodle into MOODLE_27_STABLE 2015-04-13 15:05:58 +01:00
Andrew Nicols b0761ac9bd Merge branch 'MDL-49426-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-13 14:33:06 +08:00
Simey Lameze d0a74e4db9 MDL-46963 environment: add check for antelope row format 2015-04-13 14:30:55 +08:00
Andrew Nicols 91afdf5f61 Merge branch 'MDL-33328_search_enrol_users_MDL27' of https://github.com/barrysspace/moodle into MOODLE_27_STABLE 2015-04-13 13:49:35 +08:00
Andrew Nicols 9eb5bab913 Merge branch 'MDL-48836_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-04-13 13:33:15 +08:00
Ramindu Deshapriya 8ecc51ed61 MDL-44611 core_course: Added Behat test to automate MDLQA 5252 2015-04-13 11:13:21 +08:00
Russell Smith 409722bf2f MDL-49756 course: Add unit tests for section_options. 2015-04-11 08:07:43 +10:00
Russell Smith 3b19fb6319 MDL-49756 course: Allow unit tests to set course formats.
This is a backport of 2.8 changes that allows testing using custom
course format classes that aren't plugins.  It's required to add
unit tests in MDL-49756 for 2.7.
2015-04-11 08:07:43 +10:00
Russell Smith 3e7ae2b7da MDL-48836 backup: Use a trie for grouped path detection.
Backport of MDL-41674.
2015-04-10 14:10:33 -07:00
Juan Leyva b09e0ba6c4 MDL-49426 webservices: Allow upload to draft area always 2015-04-10 10:43:50 +02:00
Barry Oosthuizen e5e2a01924 MDL-33328 enrol_manual: use correct parameter in search function
Searching for user from "Enrol users" panel causes blocks to dock in IE
2015-04-09 18:58:43 +01:00
Dan Poltawski b0682b9333 weekly release 2.7.7+ 2015-04-09 10:27:02 +01:00
Dan Poltawski 5e5a7b24b3 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-04-09 10:27:00 +01:00
Colin Campbell 2bcfe2567e MDL-48723 mod/forum: Fix cron task error on digest attachments. 2015-04-08 13:24:40 -05:00
Andrew Davis 70cbcfe454 MDL-49166 registration: now states whether or not site is registered 2015-04-08 20:45:59 +08:00
AMOS bot 68f9c67088 Automatically generated installer lang files 2015-04-08 00:04:18 +08:00
Eloy Lafuente (stronk7) 4f1e546cc7 Merge branch 'MDL-48205_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2015-04-07 14:21:53 +02:00
Brendan Heywood 6d2f958fc5 MDL-49740 Lock: Fixed task lock release bugs 2015-04-07 13:09:45 +01:00
David Monllao 41fecc5d7f MDL-43558 theme_base: We don't need edit toggle if modeditingmenu is disabled 2015-04-07 16:25:37 +08:00
Alex Mitin c428924fbf MDL-49753 enrolments: preselct status filter if needed 2015-04-07 16:15:52 +08:00
David Monllao 3c5c1fc348 Merge branch 'MDL-37984-27' of git://github.com/mastnym/moodle into MOODLE_27_STABLE 2015-04-07 16:09:08 +08:00
Andrew Nicols bef2cf1d28 MDL-49395 core: add more unit tests for get_enrolled_sql 2015-04-07 15:28:16 +08:00
Andrew Nicols 52df0b99ee Merge branch 'suspended_userids_memory_27' of git://github.com/tlevi/moodle into MOODLE_27_STABLE 2015-04-07 15:28:14 +08:00
Dan Poltawski a0c267eaa8 Merge branch 'mdl38210-moodle27' of https://github.com/tlock/moodle into MOODLE_27_STABLE 2015-04-06 12:36:21 +01:00
Colin Campbell e9d861b105 MDL-34921 course/format: Fix unwanted redirects from Site home 2015-04-04 21:33:37 -05:00
Luke Carrier c57d132ebb MDL-49664 output: backport renderer namespacing fix 2015-04-02 16:16:16 +01:00
Eloy Lafuente (stronk7) 06d2bb239e weekly release 2.7.7+ 2015-04-02 11:48:54 +02:00
Tony Levi 5bc1cf85db MDL-49395 accesslib: Make get_suspended_userids more efficient 2015-04-02 13:55:17 +10:30
Andrew Nicols 8f59956765 Merge branch 'MDL-49686-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-04-01 18:48:10 +08:00
Andrew Nicols 56e611331e Merge branch 'wip-mdl-49513-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-01 18:32:55 +08:00
Rajesh Taneja a1952e8f70 MDL-49513 behat: Set admin config using php api
Added a new set to set config using set_config() api
to make steps faster and more efficient
2015-04-01 14:31:01 +08:00
Andrew Nicols e9a4047b81 Merge branch 'MDL-49693-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-04-01 12:39:04 +08:00
Tim Lock 0f8a6f5696 MDL-38210 report_participation: implement get view/post actions 2015-04-01 10:29:08 +10:30
Eloy Lafuente (stronk7) 08c50738b3 Merge branch 'wip-mdl-48605-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-01 01:13:28 +02:00
Dan Poltawski 55588fd82e Merge branch 'MDL-49564-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-03-31 19:35:47 +01:00
Dan Poltawski ab0fb67e46 Merge branch 'MDL-49666_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-31 19:18:11 +01:00
Tim Hunt 39cf27cf64 MDL-49666 qbehaviour_informationitem: respect $options->readonly 2015-03-31 15:18:58 +01:00
Dan Poltawski 453a4c9202 Merge branch 'MDL-49671-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-31 15:11:08 +01:00
Rajesh Taneja 9070a896ae MDL-48605 unit_test: Only touch real file/dir 2015-03-31 21:46:49 +08:00
Dan Poltawski 2003c6ef66 Merge branch 'MDL-49547_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-31 14:44:10 +01:00
Dan Poltawski d77da9c15a Merge branch 'MDL-49645_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-03-31 13:28:22 +01:00
Dan Poltawski 0edc188114 Merge branch 'MDL-49641-get_external_files_m27' of https://github.com/jpahullo/moodle into MOODLE_27_STABLE 2015-03-31 13:15:10 +01:00
Dan Poltawski aa6b26be8c Merge branch 'MDL-49674-27-commentformat' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2015-03-31 12:17:27 +01:00
Dan Poltawski 1cd346e6a7 Merge branch 'MDL-48880_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-31 11:19:24 +01:00
Dan Poltawski 2bce61f247 Merge branch 'm27_MDL-43818_Unable_Download_Package_Via_URL' of https://github.com/scara/moodle into MOODLE_27_STABLE 2015-03-31 09:27:56 +01:00
Andrew Nicols 85978ff0d1 Merge branch 'MDL-49695_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-03-31 15:15:48 +08:00
Rajesh Taneja f679a1e068 MDL-48605 unit_test: Fixed file_temp_cleanup_task
touch should only work on temp and below
dir's. With path we get temp/.. and temp/.
So we were modfying moodledata dir as well
and it was failing because of permission issues.
2015-03-31 14:57:40 +08:00
Andrew Nicols ca92a72426 MDL-49294 logging: Improve cleanup tests 2015-03-31 14:15:38 +08:00
Andrew Nicols cdca415c62 Merge branch 'log_cleanup_27' of https://github.com/tlevi/moodle into MOODLE_27_STABLE 2015-03-31 14:15:32 +08:00
Andrew Nicols 9225863595 MDL-49669 badges: Add comment to explain CURLOPT_POSTREDIR 2015-03-31 12:26:19 +08:00
Andrew Nicols ebfb2e51e3 Merge branch 'MDL-49669_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2015-03-31 12:25:40 +08:00
Yuliya Bozhko 4659117d2e MDL-48205 badges: Get rid of ucfirst() and make modnames translatable
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-31 16:46:41 +13:00
David Monllao 877ea00888 Merge branch 'MDL-49114-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-03-31 11:29:42 +08:00
Andrew Nicols f6267b1f20 Merge branch 'm27_MDL-46805' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-31 08:18:36 +08:00
Dan Marsden 847de86adf MDL-46805 SCORM: AICC restricts allowed characters in the username 2015-03-31 10:41:27 +13:00
Matteo Scaramuccia 1d86f3c18e MDL-43818 SCORM: unable to download the Package via URL. 2015-03-30 20:40:21 +02:00
Eloy Lafuente (stronk7) c2217dea2c Merge branch 'wip-mdl-49708-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-30 13:27:45 +02:00
Dan Poltawski f5afe1acb0 Merge branch 'wip-MDL-47337-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-03-30 11:06:40 +01:00
Rajesh Taneja 1280d41691 MDL-49708 behat: Resize window back to default
Leaving window size to large fails in chrome
Reset it to default size works to ensure stamp
is visible by selenium driver
2015-03-30 17:30:32 +08:00
Rajesh Taneja 7c6628941b MDL-49708 behat: Fix chromedriver failure
Chromedriver tries to click in center of link
As these links wrap on next line it fails to
click on links on small screen
2015-03-30 12:36:33 +08:00
David Monllao 38ebaa270d Merge branch 'mdl36506-moodle27' of git://github.com/tlock/moodle into MOODLE_27_STABLE 2015-03-30 10:32:32 +08:00
Simey Lameze 22335cfd9d MDL-49114 environment: add slasharguments warning message 2015-03-30 10:17:55 +08:00
Jean-Michel Vedrine 7198eb72d9 MDL-48880 mod_lesson: clean lesson_branch on update and restore 2015-03-29 21:53:26 +02:00
Jean-Michel Vedrine b582e4b1f1 MDL-48880 mod_lesson: clean lesson_branch when a page is deleted 2015-03-29 21:53:26 +02:00
Mark Nelson ba8240b429 MDL-49695 tool_behat: fixed URL 2015-03-27 16:54:51 -07:00
Eric Merrill c25f161423 MDL-49693 atto: Clean textarea contents before inserting into editor 2015-03-27 12:27:35 -04:00
Eric Merrill 737df5ca1b MDL-49686 atto: Process style and class attributes in sub-functions
To ensure we only clean style and classes, first we select the inside
of those attributes and "replace" them with handler functions. Those
functions scan the actual attribute values for class or styles that
we want to exclude.

The first level regex has 3 groups. group1 selects everything in the
tag leading up to the attribute values, group2 has the attributes,
group3 has the trailing quote mark. We work on group2 then return
the combination of group1, group2, and group3.
2015-03-27 11:36:39 -04:00
Eric Merrill 0fddb5735c MDL-49671 atto: Any pastes that don't have html should clean everything
Browsers may not provide html content in the clipboard object event
though it will really be pasted as such. This includes Firefox on
Windows, Internet Explorer, and some niche cases in Safari.

Because of this, we need to scrub the entire editor anytime we can't
intercept a paste event.

In some magical day in the future when there is better cross browser
support, we can undo this.
2015-03-26 23:58:35 -04:00
Eric Merrill b365d5cc2d MDL-49564 atto: Improve empty span removal
Paste from MS word, followed by cleaning, may leave many many unused
spans. Try to remove them.
2015-03-26 23:09:33 -04:00
Marina Glancy c301086a1f MDL-47337 course: merge section options during restore 2015-03-27 08:49:58 +08:00
Mark Nelson 412b144b98 MDL-49645 core_backup: fixed 'expirythreshold' setting not being saved 2015-03-26 16:38:55 -07:00
Yuliya Bozhko 51a31cbec1 MDL-49669 badges: Handle curl redirects when posting to backpack
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-27 09:31:24 +13:00
Tim Hunt 3142069285 MDL-49547 question restore: avoid tag-related notices. 2015-03-26 15:30:08 +00:00
David Mudrák e34d82ac30 MDL-49674 comment: Use correct format when displaying the comment
The plugin callback executed above can eventually change the format. We
need to use that one to have the formatting of the first AJAX response
consistent with following displays.
2015-03-26 13:02:23 +01:00
Eloy Lafuente (stronk7) 0582523ced weekly release 2.7.7+ 2015-03-26 10:47:59 +01:00
Eloy Lafuente (stronk7) a1f4486b19 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-03-26 10:47:53 +01:00
David Monllao 5aa2e6a6c8 MDL-47002 editor_atto: Remove all after html when pasting 2015-03-26 10:09:35 +01:00
David Monllao dd504eded3 MDL-47002 editor_atto: Clean the comments separately 2015-03-26 14:51:20 +08:00
Tony Levi 036c72ea8a MDL-49294 logging: Cleanup runs in smaller chunks
Just running a huge log cleanup will probably cause big problems on large sites.
So we break this down into smaller day-by-day chunks until reaching the target.
2015-03-26 12:02:08 +10:30
Eloy Lafuente (stronk7) 87f1d0aeab Merge branch 'MDL-47002-int-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-25 18:23:13 +01:00
Eric Merrill 7cf70d686e MDL-47002 atto: Prevent removal of Rangy spans 2015-03-25 10:03:08 -04:00
Martin Mastny e532ca42e5 MDL-37984 portfolio: using older Google libraries 2015-03-25 17:22:31 +08:00
Eric Merrill 8885056125 MDL-47003 atto: Update behat test for copyright symbol 2015-03-25 15:21:12 +08:00
Jordi Pujol Ahulló 16d070960d MDL-49641 repository_dropbox: preventing poor performance.
get_external_files placed with second argument as '' to prevent poor performance.
2015-03-25 07:59:12 +01:00
Martin Mastny 6d20d0f39e MDL-37984 portfolio: Google drive using official client library 2015-03-25 12:40:43 +08:00
David Monllao e2ac2c6692 MDL-45619 repository: Don't allow repository_recent to be uninstalled
We have tests that depends on it and it
is a simple repo that can just be disabled.
2015-03-25 09:40:26 +08:00
David Monllao bcecb03bbf Merge branch 'MDL-45619_m27' of git://github.com/sbourget/moodle into MOODLE_27_STABLE 2015-03-25 09:40:13 +08:00
David Monllao 7a9544773f Merge branch 'MDL-49558_M27' of git://github.com/nadavkav/moodle into MOODLE_27_STABLE 2015-03-25 08:36:46 +08:00
Nadav Kavalerchik 225526cd29 MDL-49558 user grades: Fix range & percent grade display in RTL mode 2015-03-24 19:55:23 +02:00
Dan Poltawski 83bcf92ca4 Merge branch 'MDL-49354-27' of https://github.com/mtavella-netspot/moodle into MOODLE_27_STABLE 2015-03-24 15:14:12 +00:00
Dan Poltawski 1c21735b18 Merge branch 'MDL-48918-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-03-24 15:10:56 +00:00
Eloy Lafuente (stronk7) 32fae6b5e3 Merge branch 'MDL-48795_27' of https://github.com/apsdehal/moodle into MOODLE_27_STABLE 2015-03-24 15:45:11 +01:00
Dan Poltawski a45058e2a4 Merge branch 'wip-mdl-49374-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-24 13:36:57 +00:00
Dan Poltawski 6eac74a233 Merge branch 'MDL-49070_scheduled_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-03-24 13:33:54 +00:00
Dan Poltawski a4546be3a8 Merge branch 'wip_MDL-49631_27_utfregex' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2015-03-24 11:11:39 +00:00
Dan Poltawski a3aa563b60 Merge branch 'MDL-46746-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-03-24 11:04:29 +00:00
Dan Poltawski 1fad87a81c Merge branch 'MDL-49565-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-24 09:57:22 +00:00
Dan Poltawski 83190c6188 Merge branch 'wip_MDL-49327_2.7_guide_getinstance' of https://github.com/nixorv/moodle into MOODLE_27_STABLE
Conflicts:
	grade/grading/form/guide/tests/guide_test.php
2015-03-24 09:31:41 +00:00
David Monllao f33400b3a8 Merge branch 'MDL-49555-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-03-24 11:00:39 +08:00
David Monllao 299ea13687 Merge branch 'MDL-47003-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-24 10:17:49 +08:00
Tim Lock 9ad24a034e MDL-36506 mod_book: Skip legacy files migration if missing a CM record 2015-03-24 12:47:48 +10:30
Mohamed Alsharaf 9c1a586e4c MDL-35482 lesson: return to previous page after edit and page save 2015-03-24 00:41:32 +01:00
Nikita Kalinin 82c8214fdd MDL-49327 marking guide: Added condition on definitionid. 2015-03-24 00:10:16 +03:00
AMOS bot 72ca43735f Automatically generated installer lang files 2015-03-24 00:06:36 +08:00
Dan Poltawski 7e39143012 Merge branch 'wip_MDL-49327_2.7_guide_getinstance' of https://github.com/nixorv/moodle into MOODLE_27_STABLE 2015-03-23 15:49:07 +00:00
Dan Poltawski 51b1d8cb99 Merge branch 'MDL-48443-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-03-23 15:04:00 +00:00
Dan Poltawski 061bfe9071 Merge branch 'wip-mdl-49432-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-23 12:37:09 +00:00
Dan Poltawski 01cf3fc45e Merge branch 'MDL-48787-27' of https://github.com/pauln/moodle into MOODLE_27_STABLE 2015-03-23 11:58:12 +00:00
Dan Poltawski 194f690f1b Merge branch 'm27_MDL-48419' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-23 11:17:15 +00:00
Dan Poltawski a1df482ac4 Merge branch 'MDL-21201-27-feedback_anon' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_27_STABLE 2015-03-23 11:03:31 +00:00
David Monllao 55211a8d66 MDL-48456 course: Using default max int value 2015-03-23 15:18:27 +08:00
David Monllao 2608c20590 Merge branch 'MDL-48456-27' of git://github.com/dkns/moodle into MOODLE_27_STABLE 2015-03-23 15:18:20 +08:00
David Monllao aea1c25f07 Merge branch 'MDL-47002-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-23 14:59:45 +08:00
Petr Skoda 36d5d6d51b MDL-49631 fix incorrect whitespace remplacements 2015-03-23 17:41:26 +13:00
AMOS bot ed18a447b1 Automatically generated installer lang files 2015-03-23 00:04:22 +08:00
Daniel Kosinski f70f73517c MDL-48456 course: increase timeout when deleting all courses in category 2015-03-22 16:25:00 +01:00
AMOS bot 5ffcd725ce Automatically generated installer lang files 2015-03-21 00:04:11 +08:00
Julien Boulen baf58176f0 MDL-21201 Feedback: hide anonymous responses in recent activity reports 2015-03-20 16:25:14 +01:00
Nikita Kalinin 1a27d1b1fa MDL-49327 marking guide: Added condition on definitionid. 2015-03-20 12:19:24 +03:00
Rajesh Taneja 5cc5164228 MDL-49374 behat: Get install or re-install error code after composer
After composer is installed make sure we just process only
install or re-install
2015-03-20 14:06:20 +08:00
Rajesh Taneja e4643add2f MDL-49432 behat: guzzle packages has been unified
Current version of goutte is pointing to old guzzle packages
guzzle/common, guzzle/stream, guzzle/parser and guzzle/http.
They have been unified to guzzlehttp/guzzle, so include it to
avoid using old packages
2015-03-20 12:18:05 +08:00
Eloy Lafuente (stronk7) bac2631892 weekly release 2.7.7+ 2015-03-19 12:42:05 +01:00
Eloy Lafuente (stronk7) cfc17e4d61 NOBUG: Fixed file access permissions 2015-03-19 12:42:05 +01:00
Marina Glancy f1a1e58f91 MDL-45619 repository: corrections to uninstall, display link 2015-03-18 13:46:01 -04:00
Stephen Bourget 86fdfa6e6e MDL-45619 Repository: Allow repositories to be uninstalled 2015-03-18 13:45:57 -04:00
Eric Merrill 5cb340368f MDL-49565 atto: Allow html comments in editor code 2015-03-18 12:29:47 -04:00
Eric Merrill 0a45b86dca MDL-46746 atto: Remove unnecessary filtering of unicode characters 2015-03-18 12:09:21 -04:00
Eric Merrill 111141b38a MDL-47003 atto: Make code cleanup more targeted
Apply different, stricter, code cleanup when we receive HTML (WYSIWYG)
paste events, but be more lax the rest of the time.

Also, update the regexes to be more targeted for specific code patterns
pasted from office packages.
2015-03-18 11:47:54 -04:00
Eric Merrill b199c83c3a MDL-47002 atto: Improve paste behaviour to ensure propper cleanup
Old code failed to clean the editor div which resulted in
undesirable code being being left in the div for editing. To properly
handel incoming code, we should try to intercept and clean before the
paste, or clean the entire editable div.
2015-03-18 09:30:57 -04:00
info@ewallah.net 1359e4db0b MDL-49555 enrol_paypal: Only display icon if method available 2015-03-18 14:23:14 +01:00
Juan Leyva 37dadfe23e MDL-48443 webservices: Prevent duplicated user devices 2015-03-18 11:45:54 +01:00
Dan Marsden 7df2c28ca4 MDL-48419 mod_scorm: Check net script too agressive
in some cases high latency and network issues result in longer
than 2 sec responses from a server, increase this to avoid
excessive warnings.
2015-03-18 20:04:38 +13:00
David Monllao cc2957a8b8 Revert "Merge branch 'MDL-49445_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE"
This reverts commit b8062ad45c, reversing
changes made to d856439a71.
2015-03-18 10:51:47 +08:00
Adam Olley 788ca28e2a MDL-48787 quiz: Fix css of random question on order and paging screen 2015-03-18 14:52:14 +13:00
Eloy Lafuente (stronk7) 4e47cc03ac Merge branch 'MDL-49296_m27v3' of https://github.com/sbourget/moodle into MOODLE_27_STABLE 2015-03-17 12:05:36 +01:00
Dan Poltawski 93971a7435 Merge branch 'MDL-49359_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-03-17 08:53:33 +00:00
Mark Nelson b71319ecff MDL-49359 install: warn against using MyISAM 2015-03-16 20:47:22 -07:00
Stephen Bourget 38335b585e MDL-49296 Lesson: Add titles to action links 2015-03-16 20:37:17 -04:00
Eloy Lafuente (stronk7) 883bf7b4ba Merge branch 'MDL-49389_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-17 00:30:00 +01:00
Mike Grant dad3040e87 MDL-49276 config-dist: Removed legacy config options
Both $CFG->logsql and $CFG->dblogerror had no use in moodle core
since ages ago (just the former had one use for nothing). Good time
to get rid of both as they are 100% misleading.
2015-03-16 23:43:38 +01:00
Dan Poltawski a264c46f06 Merge branch 'MDL-48965_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-16 21:05:59 +00:00
Dan Poltawski 2c4557c760 Merge branch 'wip-MDL-49267-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-03-16 15:52:40 +00:00
Dan Poltawski d7bbbdcd39 Merge branch 'MDL-49104-27' of git://github.com/DanBennettUK/moodle into MOODLE_27_STABLE 2015-03-16 15:05:16 +00:00
Dan Poltawski e8c6bca2c8 Merge branch 'MDL-49187-27' of https://github.com/spvickers/moodle into MOODLE_27_STABLE 2015-03-16 14:48:11 +00:00
Dan Poltawski ce980d24f4 Merge branch 'MDL-49442-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2015-03-16 13:31:09 +00:00
David Monllao b8062ad45c Merge branch 'MDL-49445_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-16 15:38:23 +08:00
David Monllao d856439a71 MDL-47712 question_multianswer: Concat as string 2015-03-16 13:51:31 +08:00
David Monllao cda5471399 Merge branch 'MDL-47712-m27-master' of git://github.com/dthies/moodle into MOODLE_27_STABLE 2015-03-16 10:33:52 +08:00
David Monllao 5dcc5dc2ba Merge branch 'm27_MDL-44548' of git://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-16 10:04:51 +08:00
David Monllao 1164d83897 Merge branch 'wip-MDL-47729-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-03-16 09:50:43 +08:00
Dan Marsden 65c0f42251 MDL-44548 mod_scorm: force an external sync to check for updated files. 2015-03-16 09:03:29 +13:00
Daniel Thies 393f5575b0 MDL-47712 qtype_multianswer: Move mathjaxloader spans to outer question 2015-03-13 21:35:05 -05:00
Tim Hunt 41f5bf1300 MDL-49446 behat: should_not_be_visible steps were not working
I fixed all similar problems in this class, even ones where it did
actually work becuase the two exceptions were of different types.
This pattern seems to have been copied and pasted a lot in this class,
and I am sure that will happen again, so I did not want to leave any
dangerous potential examples around.
2015-03-13 14:21:19 +00:00
Tim Hunt 67f6370208 MDL-49445 behat: selectors should match the most specific tr or li
I also fixed the text rule, which already did this, to use the same
idiom. It is unnecessarily inefficient to count all the things and
compare to 0. Not exists should be faster.

Also, updated all the selectors here to consistently start relative to
the current node (.//, not //).
2015-03-13 14:21:11 +00:00
Tim Hunt 9b3049630d MDL-49389 blocklib: avoid notices when moving blocks to the bottom 2015-03-13 14:21:03 +00:00
Marina Glancy c957fdc649 MDL-47729 repository_filesystem: smarter sync of references
It was noticed that if file content was once imported the following
synchronisations do not discover the changes
2015-03-13 11:21:30 +08:00
David Monllao c228f82bbb weekly release 2.7.7+ 2015-03-13 10:27:32 +08:00
David Monllao a0f47922fc Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-03-13 10:27:30 +08:00
AMOS bot 784fe082be Automatically generated installer lang files 2015-03-12 00:04:11 +08:00
David Monllao e495eb5a52 Merge branch 'MDL-48897_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-11 08:52:47 +08:00
David Monllao 8c4d6cc3a7 Merge branch 'MDL-48858-27' of git://github.com/mastnym/moodle into MOODLE_27_STABLE 2015-03-11 08:47:30 +08:00
Tim Hunt 4aee467e1b MDL-49315 questions: unit tests for each behaviour type class 2015-03-11 08:28:28 +08:00
Dan Poltawski 1cdc355053 Merge branch 'wip_MDL-49074_M27' of git://github.com/gjb2048/moodle into MOODLE_27_STABLE 2015-03-10 11:51:47 +00:00
Dan Poltawski 3478cf2337 Merge branch 'wip-mdl-49402-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-10 08:33:35 +00:00
Dan Poltawski cd5be28db8 Merge branch 'MDL-49376_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-03-10 08:27:33 +00:00
David Monllao 928f68efc6 Merge branch 'MDL-49346-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-03-10 15:32:17 +08:00
David Monllao 69067fb44b Merge branch 'MDL-49351-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-03-10 15:21:39 +08:00
David Monllao 723e307909 Merge branch 'MDL-49366_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-10 14:42:08 +08:00
Jetha Chan d3c05d5bab MDL-49442 javascript: add handlebars hashtable to support get_string 2015-03-10 13:07:38 +08:00
David Monllao 28a33650aa Merge branch 'MDL-49107-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-03-10 11:43:41 +08:00
David Monllao 154356ede5 Merge branch 'MDL-49332-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-10 10:43:23 +08:00
David Monllao 9de52c1c5b Merge branch 'MDL-48572_27' of git://github.com/rlorenzo/moodle into MOODLE_27_STABLE 2015-03-10 10:35:48 +08:00
David Monllao 8581b4aaa0 Merge branch 'MDL-39262_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-10 10:13:14 +08:00
Eloy Lafuente (stronk7) fad0937a82 Moodle release 2.7.7 2015-03-10 00:42:36 +01:00
Dan Bennett 5b1e0822ac MDL-49104 repository_s3: backport of MDL-43725 2015-03-09 16:13:52 +00:00
Eloy Lafuente (stronk7) c1106792b1 weekly release 2.7.6+ 2015-03-09 16:47:46 +01:00
Marina Glancy 44b789cc6d MDL-49418 core: partial revert of MDL-48804
this is a quick fix for the issue 'Course module with two or more availability restrictions is not accessible'
MDL-49434 is created to deal with the renderer access inside availability check
2015-03-09 11:32:19 +08:00
Jean-Michel Vedrine ffd413d436 MDL-39262 mod_lesson: disable shortforms in lesson question display
Conflicts:
	mod/lesson/pagetypes/shortanswer.php
2015-03-08 11:25:07 +01:00
Amanpreet Singh cbf87a42c8 MDL-48795 lang: Update message for nothingnew
In lang/en/moodle.php file
2015-03-08 10:05:53 +05:30
Jean-Michel Vedrine 52f5987d67 MDL-48897 mod_lesson: behat tests for pages edition
This is a backport of MDL-48675.
2015-03-07 22:16:49 +01:00
Jean-Michel Vedrine f911807a10 MDL-48897 mod_lesson: Error displayed while editing content page jumps
This change also fix MDL-32343 and MDL-31778 related to problems
when editing cluster pages.

This is a backport of MDL-48675.
2015-03-07 22:16:48 +01:00
Jean-Michel Vedrine 9ab0b3da2b MDL-48965 mod_lesson: avoid short answer question without any answers 2015-03-07 22:09:10 +01:00
Eloy Lafuente (stronk7) 8533cba2ae Moodle release 2.7.6 2015-03-07 11:23:38 +01:00
spvickers 37a00d0eae MDL-49187 mod_lti: Fix tool config lookup
Changed code to look for a tool ID before then matching on the URL.
2015-03-06 20:57:05 -07:00
Juan Leyva 86b1847c71 MDL-49346 ratings: ratingarea should be a required parameter 2015-03-06 11:44:59 +01:00
Juan Leyva 5f6ae21a57 MDL-49351 ratings: Correct check of viewallratings permission 2015-03-06 11:43:00 +01:00
Marina Glancy 4a3d2cf9ff MDL-49267 mod_wiki: always apply filters to the wiki name 2015-03-06 13:58:15 +08:00
Andrew Nicols 4e482832b3 MDL-48918 course: Fix keyboard drag/drop after dropped resource 2015-03-06 12:38:42 +08:00
Rajesh Taneja 6af3c65f4f MDL-49402 behat: Fixed feature file with same scenario name
1. We should not have same scanrio name in 1 feature file
   As it doesn't explain what is being tested. So modified.
2. Removed empty line, to keep it consistnet with other features
2015-03-06 11:49:21 +08:00
David Monllao ef381fdae1 MDL-49376 behat: Fixing resize step regex 2015-03-06 11:00:12 +08:00
Rex Lorenzo 4e54faadc0 MDL-48572 gradereport_grader: Average wrong with suspended users 2015-03-05 11:38:53 -08:00
Eric Merrill 69031e3e1d MDL-49332 gradebook: Raise time limit if we get into regrade
Because all regrading should (and does) start from this point, it
is safe and best to call it just once, from this point.
2015-03-05 10:10:19 -05:00
Tim Hunt 002f6fe9c0 MDL-49366 questions: avoid PHP notices from bad pluginfile URLs 2015-03-05 12:14:46 +00:00
Eloy Lafuente (stronk7) b855cfcfee weekly release 2.7.5+ 2015-03-05 11:26:40 +01:00
Eloy Lafuente (stronk7) 94218cb1af Merge branch 'MDL-49379_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-03-04 10:50:34 +01:00
Mark Nelson 5c6dd1dc5b MDL-49379 core_webservice: fixed ability to edit services 2015-03-04 01:37:01 -08:00
Andrew Nicols 25327eecff MDL-49303 mod_scorm: Fix JS errors with default values 2015-03-04 15:06:03 +08:00
David Monllao 2924ba1c73 MDL-49204 core_message: Checking current user 2015-03-04 10:06:03 +08:00
Andrew Nicols b707f76f64 Merge branch 'MDL-49364_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-04 08:53:34 +08:00
Andrew Nicols 7f8230f8df Merge branch 'mdl27_MDL-46390' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-04 07:56:57 +08:00
Dan Marsden 5a96b851a2 MDL-46390 mod_scorm: Find correct sco to launch when org based sco is selected
Also tidies up some redundant code in scorm_format_toc_for_droplist()
2015-03-04 09:29:35 +13:00
Eloy Lafuente (stronk7) 5e9a15e516 Merge branch 'MDL-49214_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE 2015-03-03 19:36:54 +01:00
Dan Poltawski e8e4d45620 Merge branch 'MDL-49335_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-03 14:46:37 +00:00
Dan Poltawski 1456b2674d Merge branch 'MDL-49334_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-03 13:25:36 +00:00
Dan Poltawski fb53bebd1d Merge branch 'MDL-47000-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-03 13:21:33 +00:00
Tim Hunt ceab40d186 MDL-49364 quiz statistics: escape output in the response analysis 2015-03-03 13:05:05 +00:00
Tim Hunt daab241a0b MDL-49335 quiz behat: new test of attempting a quiz
This separates out attempting the quiz into a separate .feature, away
from the monolithic add_quiz.feature. At some point we should clean that
up, but for now I am just adding this.

Really, the main reason for this test is to verify the two Behat
enhancememnts I just did.
2015-03-03 11:37:50 +00:00
Tim Hunt cf5cc056b4 MDL-49335 quiz behat: improved step for adding questions to a quiz
Explicit headings make the script more readable, and pave the way for
new options that are due to be added.
2015-03-03 11:37:49 +00:00
Tim Hunt b45ff8b856 MDL-49335 Behat: new question selector
So you can say things like
    And I click on "True" "radio" in the "First question" "question"
2015-03-03 11:37:38 +00:00
Tim Hunt 7042dfe5f3 MDL-49334 behat: sort selector lists 2015-03-03 11:21:22 +00:00
Dan Poltawski 629df3afd0 Merge branch 'MDL-34006_m27v7' of https://github.com/sbourget/moodle into MOODLE_27_STABLE 2015-03-03 11:03:15 +00:00
Gareth J Barnard 4ea8fc0a7e MDL-49074 themes: WOFF2 fonts are not supported. Backport of MDL-46728. 2015-03-03 10:43:18 +00:00
Stephen Bourget 5e89c05368 MDL-45621 Portfolio: Allow portfolios to be uninstalled 2015-03-03 11:00:08 +01:00
Andrew Nicols 74a2c781f7 Merge branch 'wip-mdl-49110-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-03 16:27:35 +08:00
Andrew Nicols 48213fc8ad Merge branch 'MDL-38485-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2015-03-03 16:15:29 +08:00
Andrew Nicols 81e8eb60a9 Merge branch 'MDL-49075-27' of https://github.com/lucisgit/moodle into MOODLE_27_STABLE 2015-03-03 15:44:23 +08:00
pau.ferrer-ocana 379c492a98 MDL-49234 oracle: Remove variables passed by reference error 2015-03-03 15:14:57 +08:00
Andrew Nicols bfc0273f12 Merge branch 'MDL-49247_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-03 15:08:13 +08:00
Andrew Nicols 72bb4ca411 Merge branch 'MDL-49284_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-03 13:49:48 +08:00
Adrian Greeve e1e21e55e6 MDL-48858 mod_data: Update to behat tests
A bulk delete of entries has been added to
the behat tests.
2015-03-03 11:27:35 +08:00
Eloy Lafuente (stronk7) 84f9f60b67 MDL-49087 mdeploy: now relying on config.php documented 2015-03-03 02:47:05 +01:00
Andrew Nicols a47aabc783 MDL-49087 mnet: Ensure typeroot is in dirroot 2015-03-03 02:46:17 +01:00
Andrew Nicols 76da7e9bc8 MDL-49087 mnet: Use real dataroot instead of user-provided 2015-03-03 02:46:17 +01:00
Eloy Lafuente (stronk7) 1bdc5cc997 Merge branch 'MDL-37470_27' of https://github.com/mike-grant/moodle into MOODLE_27_STABLE 2015-03-03 01:44:04 +01:00
Eloy Lafuente (stronk7) 429aa0f321 Merge branch 'MDL-49240-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2015-03-03 01:11:32 +01:00
Matthew Tavella b4c0270557 MDL-49354 YUI: Remove event-autohide module from yui-moodlesimple rollup 2015-03-03 10:30:47 +10:30
Dan Poltawski da53b55002 Merge branch 'MOODLE_27_STABLE' of https://github.com/mitstek/moodle into MOODLE_27_STABLE 2015-03-02 17:27:18 +00:00
Dan Poltawski 67957f5683 Merge branch '27_MDL-49303' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-02 16:57:56 +00:00
Marina Glancy cd060b5fe2 MDL-48804 core: do not set current course until login validated 2015-03-02 16:51:29 +01:00
Juan Leyva b0abcbda17 MDL-48691 webservices: Check if the user must be changing password 2015-03-02 14:40:05 +00:00
Simey Lameze 1a344ea46f MDL-49084 core_tag: add capability check to flag as inappropriate action 2015-03-02 12:52:16 +00:00
Andrew Nicols 3a89cea7f7 MDL-49144 blocks: Sanitise alt and title for block controls 2015-03-02 12:09:58 +00:00
Andrew Nicols 3657649aaa MDL-49144 blocks: Add behat test to ensury sanity of block title 2015-03-02 12:09:57 +00:00
Ankit Agarwal 12ba38e725 MDL-38466 filters: Redos protection and unit tests 2015-03-02 11:31:04 +01:00
Zachary Durber fdab8c0a51 MDL-38466 filters: ReDoS protection for text to URL conversion. 2015-03-02 11:31:04 +01:00
Dan Poltawski 1bf41ebcd8 Merge branch 'MDL-23273-27' of git://github.com/zbdd/moodle into MOODLE_27_STABLE 2015-03-02 09:33:59 +00:00
Mary Evans 70d5d05c0e MDL-49214 theme_bootstrapbase: OL list numbers cut off in Clean theme
Conflicts:

	theme/bootstrapbase/style/moodle.css
2015-03-01 19:36:33 +00:00
Tony Butler 2ceee45b76 MDL-49075 mod_assign: Add assertions to marking workflow unit test
Make sure grades aren't pushed to gradebook for marking workflow
states other than 'released'.
2015-02-26 11:59:23 +00:00
Tony Butler 952db2245b MDL-49075 mod_assign: Keep unreleased assign grades out of gradebook 2015-02-26 11:59:23 +00:00
Dan Marsden 4d6cfa8e4f MDL-49303 mod_scorm: Initialise student preference on re-entry. 2015-02-26 20:51:42 +13:00
Tim Hunt 845ecec21e MDL-49284 formslib: fix strict validation of HTML. 2015-02-25 17:39:12 +00:00
Frederic Massart ac5e89c4f4 MDL-49107 atto_link: Insert link even when selection is empty 2015-02-25 16:37:38 +01:00
Stephen Bourget bf6c92065d MDL-34006 Lesson: Behat tests 2015-02-25 10:33:23 -05:00
Stephen Bourget f0ecdada22 MDL-34006 Lesson: Resume lesson loads wrong page 2015-02-25 10:32:45 -05:00
Dan Poltawski deea56cf6f weekly release 2.7.5+ 2015-02-25 14:57:34 +00:00
Dan Poltawski ff6092696c Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-02-25 14:57:32 +00:00
Mitsuhiro Yoshida 56479e0721 MDL-49259 lib: Fix for unzipped Japanese filename character corruption 2015-02-25 23:27:57 +09:00
Eric Merrill 8012d5ad5e MDL-47000 session: Update memcached version referecnes to 2.2.0 2015-02-24 15:19:35 -05:00
Dan Poltawski a9558a0559 Merge branch 'MDL-49241-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2015-02-24 16:53:56 +00:00
Dan Poltawski e2abf6048c Merge branch 'wip_MDL-49184_m27_choice' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2015-02-24 10:43:36 +00:00
Brian Barnes 8527a343e1 MDL-48519 accessibility: improved accessibility of user filters 2015-02-24 17:53:36 +08:00
Andrew Nicols 4b4466e559 Merge branch 'MDL-49078_m27' of git://github.com/shashirepo/moodle into MOODLE_27_STABLE 2015-02-24 17:08:52 +08:00
Andrew Nicols b70c6fcf87 Merge branch 'MDL-49008_lang_vanish_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-02-24 16:55:08 +08:00
Shashikant Vaishnav 98b1c93d11 MDL-49078 theme_bootstrapbase: 'Create new course' text too high
Thanks to  Gareth J Barnard  for the code suggestion
2015-02-24 14:22:27 +05:30
Dan Poltawski 0aadd59a87 Merge branch 'MDL-49216-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-02-24 08:31:57 +00:00
Andrew Davis e742ba8b7e MDL-49008 lang: dont preemptively delete lang packs when updating 2015-02-24 09:18:06 +01:00
David Monllao 938d6e9def Merge branch 'MDL-48899-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-02-24 16:17:37 +08:00
Zachary Durber 0396e811bb MDL-23273 mod_choice: error continue button redirects back to choice
Locks only occur when a choice is using limits.
2015-02-24 12:58:04 +08:00
Andrew Nicols 0eaac55d01 Merge branch 'mdl27_MDL-46408' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-02-24 11:36:49 +08:00
Ankit Agarwal 7cbb09aaa3 MDL-38485 calendar: Carry over line breaks on imports
Thanks to Matthias Schwabe for the patch suggestion
2015-02-24 08:55:12 +05:30
Andrew Nicols 933fa26e63 MDL-49216 mod_forum: Move subquery to outer component
It is not possible to order sub-query results with some RDBMs, and the
subquery is not necessary anyway.
2015-02-24 08:31:43 +08:00
Andrew Nicols d0284fe719 MDL-49216 mod_forum: Add tests for discussion reply count 2015-02-24 08:31:36 +08:00
Helen Foster 2017880f90 MDL-49241 lang: Merge English strings from the en_fix language pack 2015-02-23 21:17:31 +01:00
Dan Poltawski 8bcfbda511 Merge branch 'MDL-49198_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-02-23 16:29:27 +00:00
Dan Poltawski a06527d280 Merge branch 'MDL-49200_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-02-23 16:20:06 +00:00
Dan Poltawski d830e39f28 Merge branch 'MOODLE_27_STABLE' of https://github.com/eberhardt/moodle into MOODLE_27_STABLE 2015-02-23 15:55:39 +00:00
Andrew Nicols bb323b1876 MDL-48807 accesslib: Change create_level_instance to recordset 2015-02-23 16:03:23 +08:00
Andrew Nicols 6253df7309 Merge branch 'MDL-48807-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-02-23 15:09:49 +08:00
Simey Lameze 817837bdd1 MDL-48807 core_task: change create_contexts_task to daily frequency 2015-02-23 14:44:04 +08:00
Simey Lameze 1cf194adaa MDL-48807 accesslib: table locking fix on all create_level_instance 2015-02-23 14:41:05 +08:00
Zachary Durber 93f6e83dce MDL-23273 mod_choice: Using locks to ensure choice limits 2015-02-23 10:48:51 +08:00
David Monllao 4bc553ab04 MDL-49145 report_log: Moving conditions
Now get_url() does not need to be resolved when
we are downloading.
2015-02-23 10:39:09 +08:00
Andrew Nicols 1092970fda Merge branch 'MDL-49174-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-02-23 09:37:01 +08:00
Andrew Nicols 12e121ed33 Merge branch 'MDL-35392-27' of git://github.com/zbdd/moodle into MOODLE_27_STABLE 2015-02-23 09:22:26 +08:00
Zachary Durber 6e040c0593 MDL-35392 mod_assign: Push feedback to gradebook when releasing grades
When bulk changing workflow status a mismatch in variable
names meant that feedback wasn't being sent to the gradebook.
2015-02-23 09:17:17 +08:00
Andrew Nicols 0488bd92cd Merge branch 'MDL-49145_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-02-23 09:06:26 +08:00
David Monllao 036bf6ec37 MDL-49145 report_log: Fixing condition
Credit and thanks to Tyler Bannister and Renaat Debleu.
2015-02-23 08:47:08 +08:00
Dan Marsden 772ec0a6e3 MDL-46408 mod_scorm: check param is set before using.
The default org is only set if it exists in the imsmanifest.xml
2015-02-20 13:42:57 +13:00
Tim Hunt b01f29882b MDL-49247 question restore: avoid unique key errors from old bad data
Several tables have had unique keys added to enforce a constraint that
should always have been there. It is possible for old sites to have
data that violate the constraints, and sometimes people want to backup
data from those old sites, and restore them into a new Moodle.
Therefore, we need to guard agains the unique key violation errors.
2015-02-19 21:51:09 +00:00
AMOS bot 89b06d239f Automatically generated installer lang files 2015-02-20 00:04:19 +08:00
Jan Eberhardt fcf8a305ea MDL-31578 auth_shibboleth: Custom fields added to shibboleth settings
Since LDAP is able to sync custom user profile fields, this feature was
requested for Shibboleth.
2015-02-19 13:56:26 +00:00
Eloy Lafuente (stronk7) 327272881a weekly release 2.7.5+ 2015-02-19 10:44:36 +01:00
Damyon Wiese 21d6db9b77 MDL-49240 webservices: core_get_string and friends bad lang handling
The core_get_string webservice and friends have never passed lang values
properly, (so never worked) and when I fixed that I found they were passing
lang parameter into the lazyload parameter.
2015-02-19 17:43:45 +08:00
Andrew Nicols 86d20a95c8 Revert "Merge branch 'MDL-49154_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE"
This reverts commit e0312ddb49, reversing
changes made to 636eb3726c.
2015-02-19 09:18:40 +08:00
Andrew Davis a1d4beea54 MDL-49070 core_registration: improved site registration scheduled task 2015-02-18 09:42:11 +01:00
Rajesh Taneja fd77d51e5d MDL-48841 admin: Fixed changed string 2015-02-18 16:33:38 +08:00
Rajesh Taneja 992a8a42d5 MDL-48841 admin: Behat table row should start with first row 2015-02-18 15:47:46 +08:00
Botond Hegedus bd3332ff6e MDL-49198 core_webservice: Fix error when using existing service name 2015-02-17 23:14:29 -08:00
David Monllao 94c912d7c4 Merge branch 'MDL-49034_m27' of git://github.com/mattporritt/moodle into MOODLE_27_STABLE 2015-02-18 09:36:49 +08:00
Eloy Lafuente (stronk7) 3692b5dd8b Merge branch 'MDL-49211_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE 2015-02-18 00:04:08 +01:00
Eloy Lafuente (stronk7) f423902be7 Merge branch 'MDL-48973_27' of https://github.com/pauln/moodle into MOODLE_27_STABLE 2015-02-17 23:53:00 +01:00
Eloy Lafuente (stronk7) e0312ddb49 Merge branch 'MDL-49154_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-02-17 23:47:13 +01:00
Eloy Lafuente (stronk7) 636eb3726c Merge branch 'MDL-49170_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2015-02-17 23:43:44 +01:00
Eloy Lafuente (stronk7) 98e374b38f Merge branch 'MDL-49205_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-02-17 22:19:04 +01:00
Juan Leyva a698a4d1f2 MDL-49174 webservices: Return front page contents in get_contents ws 2015-02-17 21:33:35 +01:00
Eloy Lafuente (stronk7) edbe1e67f1 Merge branch 'MDL-49041_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-02-17 21:10:12 +01:00
Eloy Lafuente (stronk7) e9265276b8 Merge branch 'MDL-49059-split_27' of https://github.com/pauln/moodle into MOODLE_27_STABLE 2015-02-17 20:59:03 +01:00
David Monllao e530410232 Merge branch 'MDL-48993-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-02-17 17:24:56 +08:00
David Monllao e282453aea Merge branch 'MDL-49167-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2015-02-17 17:01:39 +08:00
David Monllao 6a03a96e47 Merge branch 'MDL-48884_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-02-17 14:44:18 +08:00
David Monllao 0df2edf254 Merge branch 'MDL-48841-MOODLE_27_STABLE' of git://github.com/lucisgit/moodle into MOODLE_27_STABLE 2015-02-17 14:25:22 +08:00
Andrew Nicols 73d3d0d37f Merge branch 'wip-mdl-48670-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-02-17 14:06:45 +08:00
David Monllao 71ae878ca9 Merge branch 'MDL-49169_27' of git://github.com/grabs/moodle into MOODLE_27_STABLE 2015-02-17 14:01:23 +08:00
Mark Nelson 21e6dc4d52 MDL-49200 core_form: corrected string 2015-02-16 21:59:46 -08:00
David Monllao 3adfe5f72f Merge branch 'MDL-48215_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-02-17 13:24:47 +08:00
Petr Skoda 62baf63445 MDL-49184 choice: fix block actions
The problems was that blocks editing breaks if you redirect
after if (data_submitted()) - all form actions must make sure
it is really their form, otherwise they may hijack the post from
block actions.

Note that this is not a problem for mforms, only legacy forms
are affected.
2015-02-17 16:58:34 +13:00
David Monllao 685fba3ffe Merge branch 'MDL-48543-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2015-02-17 11:16:03 +08:00
David Monllao 113a06cd95 Merge branch 'MDL-48709_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-02-17 09:17:38 +08:00
Michael Hughes 175883c223 MDL-48215 gradingform_guide: Name length validation
Validating both criterion name and guide name to be 255 chars.
2015-02-15 21:53:02 -08:00
David Monllao 00ce45b9aa Merge branch 'MDL-47529-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-02-16 11:56:08 +08:00
Damyon Wiese 21929ef07d MDL-49167 YUI: Fix for theme/yui_combo.php and $CFG->yuislashargs
It was too aggressively cleaning it's params (broken in MDL-48980).
2015-02-16 11:26:57 +08:00
Frederic Massart 049943b708 MDL-47529 lock: Fix typo on lock factory in config-dist 2015-02-16 11:14:05 +08:00
Frederic Massart 27548ec845 MDL-47529 task: Remove usage of lock when editing a task 2015-02-16 11:14:05 +08:00
Frederic Massart c33fdb5834 MDL-47529 task: Do not use lock when updating task records 2015-02-16 11:14:05 +08:00
David Monllao 3bd8407407 Merge branch 'MDL-40776_27' of git://github.com/s-cenni/moodle into MOODLE_27_STABLE 2015-02-16 10:35:41 +08:00
Yuliya Bozhko 91b8101c16 MDL-49170 badges: Backpack connection missing a port colon in URL
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-02-16 09:35:32 +13:00
Mary Evans 822c4b9c40 MDL-49211 theme_bootstrapbase: Text alignment issue in CLOZE questions.
Conflicts:

	theme/bootstrapbase/style/moodle.css
2015-02-15 19:04:39 +00:00
Jean-Michel Vedrine 476fa05c08 MDL-48709 mod_lesson: subclusters are not working 2015-02-14 18:18:32 +01:00
Tim Hunt 2a7241b3a1 MDL-49205 behat: fix I set the field with xpath fail message. 2015-02-13 16:16:27 +00:00
Paul Nicholls 5e5b5b393d MDL-48973 Atto: Atto does not listen to the drop event
The 'drop' event fires before the native ContentEditable drop handler, so
in order to update the underlying textarea we need to call updateOriginal
with a brief delay so that the dropped content has actually been added to
the editor.
2015-02-13 14:51:24 +13:00
Rajesh Taneja 5fe6298a05 MDL-48670 behat: Set timezone to Australia/perth
Behat tests might rely on time related tests
Ensure we have default timezone set to Australia/Perth
2015-02-13 08:13:41 +08:00
Eric Merrill 56e9f5c166 MDL-48993 gradebook: When importing new items, treat blank or - as empty 2015-02-12 17:18:30 -05:00
Paul Nicholls f65b1f10ad MDL-49059 medialib: Add test cases for invalid Youtube URL param values
Tests to ensure that we're not allowing injection via invalid values of
the Youtube start time and playlist parameters.
2015-02-13 09:49:16 +13:00
Paul Nicholls a16e03df3f MDL-49059 medialib: Support links to Youtube videos within playlists
As well as embedding playlists, you can embed specific videos from them -
resulting in the playlist UI displaying, but starting with the specified
video rather than the first in the playlist.  Previously, just the
specified video would embed - without the playlist UI.
2015-02-13 09:49:16 +13:00
Paul Nicholls b516be1d7e MDL-49059 medialib: Support start time params in Youtube URLs
Medialib (and thus the Multimedia Plugins filter) was ignoring start time
parameters on YouTube video URLs, meaning that the video would always
start at the start, even when the appropriate parameter was present.
2015-02-13 09:49:16 +13:00
Paul Nicholls 85a61d783e MDL-49059 medialib: Add tests for Youtube videos within playlists
As well as embedding playlists, you can embed specific videos from them -
resulting in the playlist UI displaying, but starting with the specified
video rather than the first in the playlist.  These URLs should be covered
by the tests to ensure that we're handling them properly.
2015-02-13 09:49:15 +13:00
Paul Nicholls 48b7540b31 MDL-49059 medialib: Add test cases for Youtube start times
Add test cases to core_medialib_testcase to cover YouTube videos with
start times.
2015-02-13 09:49:15 +13:00
Tim Hunt 3d3b2669c9 MDL-49154 behat: step to type with focus on a given element 2015-02-12 20:15:52 +00:00
Andreas Grabs 497e25d8f4 MDL-49169 user - After MDL-48978-Fix description is not saved anymore 2015-02-12 12:25:29 +01:00
Mike Grant 8cb2cbbf98 MDL-37470 blocklib: Respect block weight and offset 2015-02-12 09:42:05 +00:00
David Monllao cfab858010 weekly release 2.7.5+ 2015-02-12 15:30:13 +08:00
David Monllao 298aa05da8 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-02-12 15:30:12 +08:00
David Monllao 20b114ec27 Revert "Merge branch 'MDL-36009-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE"
This reverts commit abb41a5363, reversing
changes made to 2b8b2e876e.
2015-02-12 13:46:59 +08:00
AMOS bot 5bae4138e9 Automatically generated installer lang files 2015-02-12 00:04:18 +08:00
Ruslan Kabalin 46471489f5 MDL-48841 admin: Fix scheduled task reset to defaults finctionality.
It is safe to make fields as non-required, because form validation will not
pass through any empty field anyway.
2015-02-11 11:13:50 +00:00
Marina Glancy 7a6581f6c2 MDL-49003 login: prevent signup when user is logged in 2015-02-11 00:04:46 +01:00
AMOS bot 76b5719bbb Automatically generated installer lang files 2015-02-11 00:04:14 +08:00
Eloy Lafuente (stronk7) e314024bdd Merge branch 'MDL-48910_block_my_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-02-10 13:23:17 +01:00
Sara Cenni 4d65e9527e MDL-40776 grade: fix query for report outcomes
Add a missing space to the query for report outcomes to avoid error with Oracle.
2015-02-10 12:10:07 +01:00
Dan Poltawski d612b63001 Merge branch 'wip-mdl-49081-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-02-10 09:18:00 +00:00
David Monllao 9bec924781 MDL-48805 theme: Fixing trailing whitespace 2015-02-10 15:48:34 +08:00
David Monllao 812ed49a93 Merge branch 'm27_MDL-48805' of git://github.com/totara/moodle into MOODLE_27_STABLE 2015-02-10 15:27:16 +08:00
Andrew Davis a43200104c MDL-48910 core_block: user_can_addto() respects applicable formats 2015-02-10 08:20:23 +01:00
Mark Nelson 9e0b0f76bb MDL-48884 mod_assign: prevented setting gradebook feedback unnecessarily 2015-02-09 22:18:21 -08:00
David Monllao c7b96ac18a Merge branch 'm27_MDL-49064' of git://github.com/totara/moodle into MOODLE_27_STABLE 2015-02-10 11:58:12 +08:00
David Monllao 9c95bd6d03 Merge branch 'MDL-48960-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-02-10 11:12:45 +08:00
Matt Porritt cc980d0197 MDL-49034 enrol_self: Enforce maxlength in self enrolment form fields.
Alter self enrolment creation form to enforce max field lengths.
Limit "Custom instance name" (name) form field to 255 characters via maxlength.
Limit "Enrolment key" (password) form field to 50 characters via maxlength.

Fix for when the form is submitted causing a database write error to be thrown
as corresponding field "name" in the table mdl_enrol is set to varchar(255) and
database field "password" is varying(50).
2015-02-10 13:20:31 +11:00
Eloy Lafuente (stronk7) 0370128f35 Merge branch 'MDL-49073-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2015-02-10 01:07:45 +01:00
Dan Poltawski 00e8070f00 Merge branch 'MDL-48544-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-02-09 22:42:15 +00:00
Eloy Lafuente (stronk7) 42559a9df0 Merge branch 'wip_MDL-49125_m27_install' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2015-02-09 20:02:44 +01:00
Eloy Lafuente (stronk7) 078e04775e Merge branch 'MDL-48357-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-02-09 15:51:53 +01:00
Dan Poltawski 4cd7c56432 Merge branch 'wip-MDL-47558-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-02-09 14:50:38 +00:00
Andrew Nicols 8bc846ff7a MDL-48544 blocks: Only add docked tags if all blocks are docked
Previously, if all blocks were hidden, then the region was reported as
being docked eroniously and it was not possible to unhide the blocks.

Docking should have no relation to the presence of block content.
2015-02-09 20:56:04 +08:00
Eloy Lafuente (stronk7) 33446800b7 Merge branch 'wip-MDL-48794-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-02-09 13:05:24 +01:00
Dan Poltawski 4f0874c0cf Merge branch 'MDL-44520-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2015-02-09 11:33:16 +00:00
Dan Poltawski 19e7fb0ca0 Merge branch 'MDL-48294-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-02-09 11:28:22 +00:00
Dan Poltawski 62f5dc3fdc Merge branch 'MDL_47085_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2015-02-09 10:29:20 +00:00
Dan Poltawski b2792006aa Merge branch 'MDL-47953-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-02-09 10:21:44 +00:00
David Monllao f5d47e3648 Merge branch 'MDL-42138-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2015-02-09 17:18:59 +08:00
David Monllao abb41a5363 Merge branch 'MDL-36009-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2015-02-09 16:59:40 +08:00
Damyon Wiese 77d4380533 MDL-48543 Mathjax: Update default config for JAWS Math player
JAWS Maths player does not recognise the math content when manually specifying the config for MathJax.
If you use one of the default config files it works.
So - we switch our config to the Accessible.js config that it is based off anyway.
There are no features changes with this approach.

Conflicts:
	filter/mathjaxloader/db/upgrade.php
	filter/mathjaxloader/version.php
2015-02-09 16:33:22 +08:00
Jetha Chan 3be4c8751c MDL-36009 grader_gradereport: filler and extra user cells should not be headers 2015-02-09 13:52:59 +08:00
Yuliya Bozhko 4582c3d4fa MDL-47085 badges: Fix badges file download issues
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-02-09 16:01:51 +13:00
Petr Skoda a6ba98c2c9 MDL-49125 install: fix installer notices 2015-02-07 13:12:55 +13:00
Adrian Greeve 2b8b2e876e MDL-48038 mod_tag: Unit tests for tag cron functions. 2015-02-06 14:53:06 +08:00
Adrian Greeve 102d449fa9 MDL-48038 mod_tag: Improvement of tag cron. 2015-02-06 14:53:06 +08:00
Marina Glancy f702287188 MDL-47558 resource: allow to edit module without being redirected
Thanks to Nathan Lewis for the code suggestion
2015-02-06 13:13:32 +08:00
Rajesh Taneja b7b0a28dc6 MDL-49110 behat: No expand form required in non-js mode 2015-02-06 13:05:45 +08:00
Tony Levi 9443735f27 MDL-49110 behat: Do not poll within spin for non-javascript mode 2015-02-06 13:05:23 +08:00
John Okely 52b817b6ba MDL-44520 behat: Change behat features to use new section selectors 2015-02-06 10:35:05 +08:00
John Okely d025f8a226 MDL-44520 behat: Add behat selectors for section, activity 2015-02-06 10:35:05 +08:00
John Okely ddbc062458 MDL-42138 user: Require custom profile fields when registering as guest
Previously when someone registers after logging in as a guest, required
custom profile fields would not be required.

Thanks to Andreas Diendorfer for providing the patch.
2015-02-06 10:04:32 +08:00
Tim Hunt 76f1a72720 MDL-49041 qtype_multianswer: don't reveal marks on partial responses
This commit also fixes MDL-32049 about the lack or valdiation message
when an incomplete respnses is submitted.

AMOS BEGIN
 CPY [pleaseananswerallparts,qtype_match],[pleaseananswerallparts,qtype_multianswer]
AMOS END
2015-02-05 20:00:45 +00:00
Dan Poltawski ba9a541797 weekly release 2.7.5+ 2015-02-05 10:07:17 +00:00
Dan Poltawski 40020334e3 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-02-05 10:07:15 +00:00
Dan Poltawski 232a79c81c MDL-48960 output: use nofollow attribute to stop crawling invalid links
Both the calendar set url and switch theme links are displayed to
non-logged in users which mean they get crawled by search bots. This
prevents the search bots following these links.
2015-02-05 08:14:14 +00:00
Frederic Massart 87914aa407 MDL-47953 gradereport_grader: Accurate pagination with suspended users
Thanks to Zvonko Martinovic for pointing out the source of the bug.
2015-02-05 15:08:00 +08:00
AMOS bot 2df1e26d6b Automatically generated installer lang files 2015-02-05 00:04:13 +08:00
Juan Leyva af5f6b7300 MDL-48294 settings: enablemobilewebservice appears twice 2015-02-04 10:26:49 +01:00
Jetha Chan 3ba01c11b4 MDL-49073 timezones: update to 2015a (2323 rules) 2015-02-04 13:19:16 +08:00
Rajesh Taneja 0402c8c069 MDL-49081 tests: Removed dev option from composer
dev option is enabled by default in composer, so not required.
https://github.com/composer/composer/blob/master/CHANGELOG.md
2015-02-04 10:21:38 +08:00
Dan Poltawski 6b6125b949 Merge branch 'MDL-48942_survey_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-02-03 15:55:25 +00:00
Dan Poltawski 734df0d567 Merge branch 'MDL-48955-27' of https://github.com/vadimonus/moodle into MOODLE_27_STABLE 2015-02-03 14:05:02 +00:00
Dan Poltawski c14e541347 Merge branch 'm27_MDL-48799_Incorrect_Legacy_Dir_Fallback' of https://github.com/scara/moodle into MOODLE_27_STABLE 2015-02-03 13:15:20 +00:00
Dan Poltawski a07b461a4a Merge branch 'm27_MDL-48907' of https://github.com/totara/moodle into MOODLE_27_STABLE 2015-02-03 12:56:45 +00:00
Eloy Lafuente (stronk7) d9985cf497 MDL-48920 tool_generator: fix unit tests 2015-02-03 12:39:34 +00:00
Dan Poltawski 4a21f1b58b Merge branch 'MDL-44071-27' of git://github.com/zbdd/moodle into MOODLE_27_STABLE 2015-02-03 12:17:51 +00:00
Dan Poltawski ae2faed37d Merge branch 'MDL-48533_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-02-03 11:13:51 +00:00
Dan Poltawski 47dfdfcfbe MDL-48624 behat: fix trailing whitespace 2015-02-03 11:02:48 +00:00
Dan Poltawski a84ea4944a Merge branch 'wip-mdl-48624-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-02-03 11:01:58 +00:00
Eloy Lafuente (stronk7) 27ccaa5f29 Merge branch 'wip-mdl-49015-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-02-03 11:52:32 +01:00
Andrew Nicols 82d8e53dec Merge branch 'MDL-48865-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2015-02-03 16:42:06 +08:00
Neill Magill a2b22dd5df MDL-48865 core_block: Show regions with only hidden blocks when editing
Before this patch if all the blocks in a block region are set to hidden the region will be docked even when editing is enabled.
This meant that as a user I would need to add a new block to the page and move it to that region via the configuration
menu before I could manipulate the hidden blocks again.
2015-02-03 16:14:42 +08:00
Andrew Nicols cb4f747758 Merge branch 'MDL-48920-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-02-03 16:12:22 +08:00
Andrew Nicols 4d70a24d32 Merge branch 'tgz_fixing27' of https://github.com/tlevi/moodle into MOODLE_27_STABLE 2015-02-03 16:04:30 +08:00
Andrew Nicols 5c5559abb8 Merge branch '48968-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2015-02-03 14:25:15 +08:00
Andrew Nicols 068925e251 Merge branch 'MDL-48929-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-02-03 14:11:02 +08:00
Andrew Nicols 8d3e6e385d MDL-48484 admin: Improve coding style 2015-02-03 13:44:47 +08:00
Andrew Nicols 1030084f6e Merge branch 'm27_MDL-48484' of https://github.com/totara/moodle into MOODLE_27_STABLE 2015-02-03 13:44:21 +08:00
Andrew Nicols 7f866e3c18 Merge branch 'm27_MDL-46467' of https://github.com/totara/moodle into MOODLE_27_STABLE 2015-02-03 12:59:46 +08:00
Eloy Lafuente (stronk7) 9e4f60924c Merge branch 'MDL-48578-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-02-03 00:47:53 +01:00
Brian Barnes 36d81e9ef2 MDL-49064 bootstrapbase: fixed rtl alignment of leftalign CSS class 2015-02-03 09:14:23 +13:00
David Monllao 1ad756e4ed Merge branch 'MDL-31036-27' of git://github.com/zbdd/moodle into MOODLE_27_STABLE 2015-02-02 14:55:31 +08:00
David Monllao 5e4ddeab88 Merge branch 'wip-mdl-46626-m27' of git://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-02-02 12:08:49 +08:00
Brian Barnes 51f931fea7 MDL-48484 admin: Added labels to configtime settings 2015-02-02 16:46:33 +13:00
Matteo Scaramuccia 61cff2855e MDL-48799 Files API: fixed legacy directory fallback. 2015-02-01 09:18:49 +01:00
Zachary Durber 3d10a0b762 MDL-31036 mod_assign: Don't strip quickgrading feedback of special chars 2015-01-30 14:38:46 +08:00
Andrew Nicols 40c809b83e MDL-48899 lib: Use the wwwroot to inform the message-ID
PHPMailer can sometimes fail to get a valid hostname when trying to
determine a Message-ID.

Rather than relying entirely on the serverHostname, fall back on the
wwwroot when unable to determine the real hostname.
2015-01-30 11:01:11 +08:00
Tyler Bannister 14fe039d20 MDL-46626 report_log: Removed HTML from log report export
This is a partial backport of MDL-34867
2015-01-30 09:10:09 +08:00
Rajesh Taneja a9d59d433a MDL-49015 mod_lesson: Don't rely on external links in behat 2015-01-30 08:59:26 +08:00
Rajesh Taneja 379a362bca MDL-48624 behat: Added page load check in workshop step
i_allocate_submissions_in_workshop_as step sometimes
fails because of server speed. Added page load check
with extended timout.
2015-01-30 08:55:54 +08:00
Rajesh Taneja b6fcba4636 MDL-48624 behat: Added extended timeout to ensure step pass
following_should_download_between_and_bytes step sometimes
fails because of server speed. Added extended timout
ensuring they wait enough before failing.
Also, not calling force download while running behat site
2015-01-30 08:55:54 +08:00
Vadim Dvorovenko d9e865148d MDL-48955 filter_mathjax: Regexp fix for texfiltercompatibility mode
Fixing incorrect regexp for replacing text like
"$$a$$ and $$b$$" to "\(a\) and \(b\)". This is needed for
texfiltercompatibility to work as expected.
2015-01-29 23:16:07 +07:00
Juan Leyva bdc6977dc7 MDL-48357 webservices: Missing instance property in course contents ws 2015-01-29 14:13:33 +01:00
Tony Levi edcb9e619f MDL-48924 backup: Fix some get_file_packer() calls for enabletgzbackups 2015-01-29 22:53:01 +10:30
Juan Leyva ff936081dc MDL-48578 webservices: Fixed missing required library 2015-01-28 14:44:28 +01:00
James Henestofel ec711d5bbd MDL-44071 webservices: Sorting courses post deletion.
Signed-off-by: Zachary Durber <zdurber@gmail.com>
2015-01-27 11:46:21 +08:00
Frederic Massart f321e5a222 MDL-48920 tool_generator: Use 'real' names during course generation 2015-01-27 11:27:37 +08:00
Brian Barnes cecc812fa0 MDL-46467 forms: Labels have "for" attribute even when frozen 2015-01-27 14:38:09 +13:00
Andrew Davis 32f0ad84c6 MDL-48942 mod_survey: synced security checks in view.php and graph.php 2015-01-26 15:06:36 +01:00
Brian Barnes 33f9b3b1e1 MDL-48805 theme: Collapse now collapses all data-target 2015-01-26 11:24:57 +13:00
Valerii Kuznetsov 20ef0b4257 MDL-48968 blocks: fixed bug with pagetype handling 2015-01-26 09:28:39 +13:00
Nelson Moller ce534d5dfa MDL-48929 repository_filesystem: Valide relative path against realpath
On Windows systems, there could have been a mix of back and forward
slashes, causing the validation of the relative path to fail. Now
we will always get the realpath before comparing.
2015-01-23 17:28:09 +08:00
Brian Barnes 4758a64934 MDL-48907 grades: fixed display of grade tabs 2015-01-21 10:30:53 +13:00
Marina Glancy 154685629a MDL-48794 report_log: make sure y-axis gridlines in graphs are integers 2015-01-12 16:22:23 +08:00
Andrew Davis 9f1149e66a MDL-48702 logs: switched retrieval to get_recordset_select() 2015-01-08 08:54:07 +01:00
Mark Nelson 127210170d MDL-48533 report_backups: added ability to view backup logs 2015-01-07 22:24:44 -08:00
Mark Nelson 0b2e01db96 MDL-48533 core_backup: use default log level when none specified 2015-01-07 22:24:43 -08:00
681 changed files with 14374 additions and 4985 deletions
+2
View File
@@ -64,6 +64,8 @@ echo "<form id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n";
echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
// auth plugin description
echo $OUTPUT->box_start();
+439
View File
@@ -1027,6 +1027,7 @@
<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>
@@ -1134,9 +1135,292 @@
<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="2.8" requires="2.2">
<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">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</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="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="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="2.9" requires="2.2">
<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">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</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="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.0" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
@@ -1252,11 +1536,166 @@
</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.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>
</COMPATIBILITY_MATRIX>
+21 -16
View File
@@ -561,31 +561,36 @@ $cronoverdue = ($lastcron < time() - 3600 * 24);
$dbproblems = $DB->diagnose();
$maintenancemode = !empty($CFG->maintenance_enabled);
// Available updates for Moodle core
// Available updates for Moodle core.
$updateschecker = \core\update\checker::instance();
$availableupdates = array();
$availableupdates['core'] = $updateschecker->get_update_info('core',
array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds));
$availableupdatesfetch = null;
// Available updates for contributed plugins
$pluginman = core_plugin_manager::instance();
foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
foreach ($plugintypeinstances as $pluginname => $plugininfo) {
if (!empty($plugininfo->availableupdates)) {
foreach ($plugininfo->availableupdates as $pluginavailableupdate) {
if ($pluginavailableupdate->version > $plugininfo->versiondisk) {
if (!isset($availableupdates[$plugintype.'_'.$pluginname])) {
$availableupdates[$plugintype.'_'.$pluginname] = array();
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));
// Available updates for contributed plugins
$pluginman = core_plugin_manager::instance();
foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
foreach ($plugintypeinstances as $pluginname => $plugininfo) {
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;
}
}
}
}
}
// The timestamp of the most recent check for available updates
$availableupdatesfetch = $updateschecker->get_last_timefetched();
// The timestamp of the most recent check for available updates
$availableupdatesfetch = $updateschecker->get_last_timefetched();
}
$buggyiconvnomb = (!function_exists('mb_convert_encoding') and @iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
//check if the site is registered on Moodle.org
+1 -1
View File
@@ -65,7 +65,7 @@ if (!empty($registeredhub) and $registeredhub->token == $token) {
$registeredhub->hubname = $hubname;
$registrationmanager->update_registeredhub($registeredhub);
//display notficiation message
// Display notification message.
$notificationmessage = $OUTPUT->notification(
get_string('registrationconfirmedon', 'hub', $hublink), 'notifysuccess');
echo $notificationmessage;
+3 -3
View File
@@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* On this page the administrator selects which hub he wants to register,
* except for MOOCH. Admins can register with MOOCH with the top admin menu "Registration" link.
* On this page the administrator can also unregister from any hubs, including MOOCH.
* On this page the administrator selects which hub he wants to register (except for moodle.net)
* Admins can register with moodle.net via the site admin menu "Registration" link.
* On this page the administrator can also unregister from any hubs including moodle.net.
*/
require('../../config.php');
+28 -24
View File
@@ -53,32 +53,36 @@ class registration_manager {
public function cron() {
global $CFG;
if (extension_loaded('xmlrpc')) {
//check if the last registration cron update was less than a week ago
$lastcron = get_config('registration', 'crontime');
if ($lastcron === false or $lastcron < strtotime("-7 day")) { //set to a week, see MDL-23704
$function = 'hub_update_site_info';
require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php");
//update all hub where the site is registered on
$hubs = $this->get_registered_on_hubs();
foreach ($hubs as $hub) {
//update the registration
$siteinfo = $this->get_site_info($hub->huburl);
$params = array('siteinfo' => $siteinfo);
$serverurl = $hub->huburl . "/local/hub/webservice/webservices.php";
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $hub->token);
try {
$result = $xmlrpcclient->call($function, $params);
mtrace(get_string('siteupdatedcron', 'hub', $hub->hubname));
} catch (Exception $e) {
$errorparam = new stdClass();
$errorparam->errormessage = $e->getMessage();
$errorparam->hubname = $hub->hubname;
mtrace(get_string('errorcron', 'hub', $errorparam));
}
}
set_config('crontime', time(), 'registration');
if ($lastcron > strtotime("-7 day")) { // Prevent this happening more than once a week.
return;
}
$function = 'hub_update_site_info';
require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php");
// Update all hubs where the site is registered.
$hubs = $this->get_registered_on_hubs();
if (empty($hubs)) {
mtrace(get_string('registrationwarning', 'admin'));
}
foreach ($hubs as $hub) {
// Update the registration.
$siteinfo = $this->get_site_info($hub->huburl);
$params = array('siteinfo' => $siteinfo);
$serverurl = $hub->huburl . "/local/hub/webservice/webservices.php";
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $hub->token);
try {
$result = $xmlrpcclient->call($function, $params);
mtrace(get_string('siteupdatedcron', 'hub', $hub->hubname));
} catch (Exception $e) {
$errorparam = new stdClass();
$errorparam->errormessage = $e->getMessage();
$errorparam->hubname = $hub->hubname;
mtrace(get_string('errorcron', 'hub', $errorparam));
}
}
set_config('crontime', time(), 'registration');
} else {
mtrace(get_string('errorcronnoxmlrpc', 'hub'));
}
+9
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, "/");
@@ -177,6 +179,13 @@ if (!empty($error)) {
//some Moodle.org resitration explanation
if ($huburl == HUB_MOODLEORGHUBURL) {
if (!empty($registeredhub->token)) {
$registrationmessage = get_string('pleaserefreshregistration', 'admin');
} else {
$registrationmessage = get_string('registrationwarning', 'admin');
}
echo $OUTPUT->notification($registrationmessage);
echo $OUTPUT->heading(get_string('registerwithmoodleorg', 'admin'));
$renderer = $PAGE->get_renderer('core', 'register');
echo $renderer->moodleorg_registration_message();
+11 -6
View File
@@ -36,13 +36,18 @@ class core_register_renderer extends plugin_renderer_base {
* @return string
*/
public function moodleorg_registration_message() {
$moodleorgurl = html_writer::link('http://moodle.org', 'Moodle.org');
$moodleorgstatsurl = html_writer::link('http://moodle.org/stats', get_string('statsmoodleorg', 'admin'));
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, get_string('moodleorghubname', 'admin'));
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $moodleorgurl);
$moodleorgstatslink = html_writer::link('http://moodle.net/stats',
get_string('statsmoodleorg', 'admin'),
array('target' => '_blank'));
$hublink = html_writer::link('https://moodle.net/mod/page/view.php?id=1',
get_string('moodleorghubname', 'admin'),
array('target' => '_blank'));
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $hublink);
$items = array(get_string('registermoodleorgli1', 'admin'),
get_string('registermoodleorgli2', 'admin', $moodleorgstatsurl),
get_string('registermoodleorgli3', 'admin', $moochurl));
get_string('registermoodleorgli2', 'admin', $moodleorgstatslink));
$moodleorgregmsg .= html_writer::alist($items);
return $moodleorgregmsg;
}
+14 -4
View File
@@ -264,6 +264,7 @@ if (($action == 'edit') || ($action == 'new')) {
$strshow = get_string('on', 'repository');
$strhide = get_string('off', 'repository');
$strdelete = get_string('disabled', 'repository');
$struninstall = get_string('uninstallplugin', 'core_admin');
$actionchoicesforexisting = array(
'show' => $strshow,
@@ -286,9 +287,9 @@ if (($action == 'edit') || ($action == 'new')) {
// Table to list plug-ins
$table = new html_table();
$table->head = array(get_string('name'), get_string('isactive', 'repository'), get_string('order'), $settingsstr);
$table->head = array(get_string('name'), get_string('isactive', 'repository'), get_string('order'), $settingsstr, $struninstall);
$table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
$table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
$table->id = 'repositoriessetting';
$table->data = array();
$table->attributes['class'] = 'admintable generaltable';
@@ -384,7 +385,12 @@ if (($action == 'edit') || ($action == 'new')) {
$updowncount++;
$table->data[] = array($i->get_readablename(), $OUTPUT->render($select), $updown, $settings);
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('repository_' . $typename, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$table->data[] = array($i->get_readablename(), $OUTPUT->render($select), $updown, $settings, $uninstall);
if (!in_array($typename, $alreadyplugins)) {
$alreadyplugins[] = $typename;
@@ -400,7 +406,11 @@ if (($action == 'edit') || ($action == 'new')) {
if (!in_array($plugin, $alreadyplugins)) {
$select = new single_select(repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
$select->set_label(get_string('action'), array('class' => 'accesshide'));
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('repository_' . $plugin, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '', $uninstall);
}
}
}
+2
View File
@@ -46,6 +46,8 @@ $resultshtml = admin_search_settings_html($query); // case insensitive search on
echo '<form action="' . $PAGE->url->out(true) . '" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo '</div>';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
+4
View File
@@ -77,6 +77,8 @@ if (empty($SITE->fullname)) {
echo html_writer::input_hidden_params($PAGE->url);
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo $settingspage->output_html();
@@ -119,6 +121,8 @@ if (empty($SITE->fullname)) {
echo html_writer::input_hidden_params($PAGE->url);
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo $OUTPUT->heading($settingspage->visiblename);
echo $settingspage->output_html();
-3
View File
@@ -278,9 +278,6 @@ if ($hassiteconfig) {
$ADMIN->add('webservicesettings', new admin_externalpage('webservicedocumentation', new lang_string('wsdocapi', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/documentation.php", 'moodle/site:config', false));
/// manage service
$temp = new admin_settingpage('externalservices', new lang_string('externalservices', 'webservice'));
$temp->add(new admin_setting_enablemobileservice('enablemobilewebservice',
new lang_string('enablemobilewebservice', 'admin'),
new lang_string('configenablemobilewebservice', 'admin', $enablemobiledoclink), 0));
$temp->add(new admin_setting_heading('manageserviceshelpexplaination', new lang_string('information', 'webservice'), new lang_string('servicehelpexplanation', 'webservice')));
$temp->add(new admin_setting_manageexternalservices());
$ADMIN->add('webservicesettings', $temp);
+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'),
+24
View File
@@ -114,6 +114,30 @@ class behat_admin extends behat_base {
}
}
/**
* Sets the specified site settings. A table with | config | value | (optional)plugin | is expected.
*
* @Given /^the following config values are set as admin:$/
* @param TableNode $table
*/
public function the_following_config_values_are_set_as_admin(TableNode $table) {
if (!$data = $table->getRowsHash()) {
return;
}
foreach ($data as $config => $value) {
// Default plugin value is null.
$plugin = null;
if (is_array($value)) {
$plugin = $value[1];
$value = $value[0];
}
set_config($config, $value, $plugin);
}
}
/**
* Waits with the provided params if we are running a JS session.
*
+6 -6
View File
@@ -7,10 +7,10 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
Background:
Given the following "users" exist:
| username | firstname | lastname | email | auth | confirmed |
| user1 | User | One | one@asd.com | manual | 0 |
| user2 | User | Two | two@asd.com | ldap | 1 |
| user3 | User | Three | three@asd.com | manual | 1 |
| user4 | User | Four | four@asd.com | ldap | 0 |
| user1 | User | One | one@example.com | manual | 0 |
| user2 | User | Two | two@example.com | ldap | 1 |
| user3 | User | Three | three@example.com | manual | 1 |
| user4 | User | Four | four@example.com | ldap | 0 |
And the following "cohorts" exist:
| name | idnumber |
| Cohort 1 | CH1 |
@@ -23,8 +23,8 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
| user2 | C1 | student |
| user3 | C1 | student |
And I log in as "admin"
And I add "User Two (two@asd.com)" user to "CH1" cohort members
And I add "User Three (three@asd.com)" user to "CH1" cohort members
And I add "User Two (two@example.com)" user to "CH1" cohort members
And I add "User Three (three@example.com)" user to "CH1" cohort members
And I follow "Browse list of users"
@javascript
@@ -13,15 +13,13 @@ Feature: Set admin settings value
And I should not see "C_shortname Course fullname"
Scenario: set admin value with full name
Given I set the following administration settings values:
| Display extended course names | 1 |
When I press "Save changes"
Given the following config values are set as admin:
| courselistshortnames | 1 |
And I am on homepage
Then I should see "C_shortname Course fullname"
Scenario: set admin value with short name
Given I set the following administration settings values:
Given the following config values are set as admin:
| courselistshortnames | 1 |
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
+2 -2
View File
@@ -21,7 +21,7 @@ Feature: Upload users
And I should see "Tom"
And I should see "Jones"
And I should see "verysecret"
And I should see "jonest@someplace.edu"
And I should see "jonest@example.com"
And I should see "Reznor"
And I should see "course1"
And I should see "math102"
@@ -32,7 +32,7 @@ Feature: Upload users
And I follow "Browse list of users"
And I should see "Tom Jones"
And I should see "Trent Reznor"
And I should see "reznor@someplace.edu"
And I should see "reznor@example.com"
And I am on homepage
And I follow "Maths"
And I expand "Users" node
@@ -13,8 +13,8 @@ Feature: Manage availability conditions
Then I should not see "Availability restrictions"
# Enable it and check I can now see and click on it.
And I set the following administration settings values:
| Enable conditional access | 1 |
And the following config values are set as admin:
| enableavailability | 1 |
And I am on homepage
And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
@@ -28,9 +28,9 @@ Feature: Manage availability conditions
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I am on homepage
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
+8 -16
View File
@@ -44,13 +44,19 @@ require_once(__DIR__ . '/../../../../lib/behat/lib.php');
chdir(__DIR__);
$output = null;
exec("php util.php --diag", $output, $code);
// Ensure we have composer installed, before we install or re-install test site.
if ($code == BEHAT_EXITCODE_COMPOSER || $code == BEHAT_EXITCODE_INSTALL || $code == BEHAT_EXITCODE_REINSTALL) {
testing_update_composer_dependencies();
chdir(__DIR__);
exec("php util.php --diag", $output, $code);
}
if ($code == 0) {
echo "Behat test environment already installed\n";
} else if ($code == BEHAT_EXITCODE_INSTALL) {
testing_update_composer_dependencies();
// Behat and dependencies are installed and we need to install the test site.
chdir(__DIR__);
passthru("php util.php --install", $code);
@@ -60,8 +66,6 @@ if ($code == 0) {
} else if ($code == BEHAT_EXITCODE_REINSTALL) {
testing_update_composer_dependencies();
// Test site data is outdated.
chdir(__DIR__);
passthru("php util.php --drop", $code);
@@ -74,18 +78,6 @@ if ($code == 0) {
exit($code);
}
} else if ($code == BEHAT_EXITCODE_COMPOSER) {
// Missing Behat dependencies.
testing_update_composer_dependencies();
// Returning to admin/tool/behat/cli.
chdir(__DIR__);
passthru("php util.php --install", $code);
if ($code != 0) {
exit($code);
}
} else {
// Generic error, we just output it.
echo implode("\n", $output)."\n";
+1 -1
View File
@@ -165,7 +165,7 @@ class tool_behat_renderer extends plugin_renderer_base {
// Info.
$installurl = behat_command::DOCS_URL . '#Installation';
$installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
$writetestsurl = behat_command::DOCS_URL . '#Writting_features';
$writetestsurl = behat_command::DOCS_URL . '#Writing_features';
$writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
$writestepsurl = behat_command::DOCS_URL . '#Adding_steps_definitions';
$writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank'));
@@ -69,8 +69,8 @@ Feature: Set up contextual data for tests
Scenario: Role overrides
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
@@ -99,7 +99,7 @@ Feature: Set up contextual data for tests
Scenario: Add course enrolments
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
@@ -117,11 +117,11 @@ Feature: Set up contextual data for tests
| Custom student | custom2 | | |
And the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@moodlemoodle.com |
| user2 | User | 2 | user2@moodlemoodle.com |
| user3 | User | 3 | user3@moodlemoodle.com |
| user4 | User | 4 | user4@moodlemoodle.com |
| user5 | User | 5 | user5@moodlemoodle.com |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
| user3 | User | 3 | user3@example.com |
| user4 | User | 4 | user4@example.com |
| user5 | User | 5 | user5@example.com |
And the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
@@ -219,8 +219,8 @@ Feature: Set up contextual data for tests
Scenario: Add relations between users and groups
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
@@ -259,8 +259,8 @@ Feature: Set up contextual data for tests
| Cat 1 | 0 | CAT1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "cohorts" exist:
| name | idnumber |
| System cohort A | CHSA |
@@ -7,7 +7,7 @@ Feature: Edit capabilities
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
@@ -10,9 +10,9 @@ Feature: Verify that all form fields values can be get and set
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | email | firstname | lastname |
| student1 | s1@asd.com | Student | 1 |
| student2 | s2@asd.com | Student | 2 |
| student3 | s3@asd.com | Student | 3 |
| student1 | s1@example.com | Student | 1 |
| student2 | s2@example.com | Student | 2 |
| student3 | s3@example.com | Student | 3 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
@@ -308,8 +308,7 @@ class tool_generator_course_backend extends tool_generator_backend {
$username = 'tool_generator_' . $textnumber;
// Create user account.
$record = array('firstname' => get_string('firstname', 'tool_generator'),
'lastname' => $number, 'username' => $username);
$record = array('username' => $username, 'idnumber' => $number);
// We add a user password if it has been specified.
if (!empty($CFG->tool_generator_users_password)) {
@@ -62,7 +62,6 @@ $string['error_nonexistingcourse'] = 'The specified course does not exist';
$string['error_nopageinstances'] = 'The selected course does not contain page module instances';
$string['error_notdebugging'] = 'Not available on this server because debugging is not set to DEVELOPER';
$string['error_nouserspassword'] = 'You need to set $CFG->tool_generator_users_password in config.php to generate the test plan';
$string['firstname'] = 'Test course user';
$string['fullname'] = 'Test course: {$a->size}';
$string['maketestcourse'] = 'Make test course';
$string['maketestplan'] = 'Make JMeter test plan';
@@ -136,7 +136,7 @@ class tool_generator_maketestcourse_testcase extends advanced_testcase {
$lastusernumber = 0;
$discussionstarters = array();
foreach ($discussions as $discussion) {
$usernumber = intval($discussion->lastname);
$usernumber = core_user::get_user($discussion->userid, 'id, idnumber')->idnumber;
// Checks that the users are odd numbers.
$this->assertEquals(1, $usernumber % 2);
-27
View File
@@ -164,33 +164,6 @@ if ($mode == UPDATE_ALL_LANG) {
make_temp_directory('');
make_upload_directory('lang');
// clean-up currently installed versions of the packs
foreach ($neededlangs as $packindex => $pack) {
if ($pack == 'en') {
continue;
}
// delete old directories
$dest1 = $CFG->dataroot.'/lang/'.$pack;
$dest2 = $CFG->dirroot.'/lang/'.$pack;
$rm1 = false;
$rm2 = false;
if (file_exists($dest1)) {
if (!remove_dir($dest1)) {
$notice_error[] = 'Could not delete old directory '.$dest1.', update of '.$pack.' failed, please check permissions.';
unset($neededlangs[$packindex]);
continue;
}
}
if (file_exists($dest2)) {
if (!remove_dir($dest2)) {
$notice_error[] = 'Could not delete old directory '.$dest2.', update of '.$pack.' failed, please check permissions.';
unset($neededlangs[$packindex]);
continue;
}
}
}
// install all needed language packs
$installer->set_queue($neededlangs);
$results = $installer->run();
@@ -91,19 +91,24 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
// Replace the query with hardcoded mappings required for core.
list($selectwhere, $params, $sort) = self::replace_sql_legacy($selectwhere, $params, $sort);
$events = array();
$records = array();
try {
$records = $DB->get_records_select('log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
// A custom report + on the fly SQL rewriting = a possible exception.
$records = $DB->get_recordset_select('log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
} catch (\moodle_exception $ex) {
debugging("error converting legacy event data " . $ex->getMessage() . $ex->debuginfo, DEBUG_DEVELOPER);
return array();
}
$events = array();
foreach ($records as $data) {
$events[$data->id] = \logstore_legacy\event\legacy_logged::restore_legacy($data);
}
$records->close();
return $events;
}
@@ -44,11 +44,26 @@ class cleanup_task extends \core\task\scheduled_task {
public function execute() {
global $CFG, $DB;
// Delete old logs to save space (this might need a timer to slow it down...).
if (!empty($CFG->loglifetime)) { // Value in days.
$loglifetime = time(0) - ($CFG->loglifetime * 3600 * 24);
$DB->delete_records_select("log", "time < ?", array($loglifetime));
mtrace(" Deleted old legacy log records");
if (empty($CFG->loglifetime)) {
return;
}
$loglifetime = time() - ($CFG->loglifetime * 3600 * 24); // Value in days.
$lifetimep = array($loglifetime);
$start = time();
while ($min = $DB->get_field_select("log", "MIN(time)", "time < ?", $lifetimep)) {
// Break this down into chunks to avoid transaction for too long and generally thrashing database.
// Experiments suggest deleting one day takes up to a few seconds; probably a reasonable chunk size usually.
// If the cleanup has just been enabled, it might take e.g a month to clean the years of logs.
$params = array(min($min + 3600 * 24, $loglifetime));
$DB->delete_records_select("log", "time < ?", $params);
if (time() > $start + 300) {
// Do not churn on log deletion for too long each run.
break;
}
}
mtrace(" Deleted old legacy log records");
}
}
@@ -273,4 +273,33 @@ class logstore_legacy_store_testcase extends advanced_testcase {
$this->assertContains($expectedreport, $reports);
}
}
/**
* Test that the legacy log cleanup works correctly.
*/
public function test_cleanup_task() {
global $DB;
$this->resetAfterTest();
// Create some records spread over various days; test multiple iterations in cleanup.
$record = (object) array('time' => time());
$DB->insert_record('log', $record);
$record->time -= 3600 * 24 * 30;
$DB->insert_record('log', $record);
$record->time -= 3600 * 24 * 30;
$DB->insert_record('log', $record);
$record->time -= 3600 * 24 * 30;
$DB->insert_record('log', $record);
$this->assertEquals(4, $DB->count_records('log'));
// Remove all logs before "today".
set_config('loglifetime', 1);
$this->expectOutputString(" Deleted old legacy log records\n");
$clean = new \logstore_legacy\task\cleanup_task();
$clean->execute();
$this->assertEquals(1, $DB->count_records('log'));
}
}
@@ -72,7 +72,7 @@ class store implements \tool_log\log\writer, \core\log\sql_internal_reader {
$sort = self::tweak_sort_by_id($sort);
$events = array();
$records = $DB->get_records_select('logstore_standard_log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
$records = $DB->get_recordset_select('logstore_standard_log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
foreach ($records as $data) {
$extra = array('origin' => $data->origin, 'ip' => $data->ip, 'realuserid' => $data->realuserid);
@@ -94,6 +94,8 @@ class store implements \tool_log\log\writer, \core\log\sql_internal_reader {
}
}
$records->close();
return $events;
}
@@ -43,12 +43,29 @@ class cleanup_task extends \core\task\scheduled_task {
*/
public function execute() {
global $DB;
$loglifetime = (int)get_config('logstore_standard', 'loglifetime');
if ($loglifetime > 0) {
$loglifetime = time() - ($loglifetime * 3600 * 24); // Value in days.
$DB->delete_records_select("logstore_standard_log", "timecreated < ?", array($loglifetime));
mtrace(" Deleted old log records from standard store.");
if (empty($loglifetime) || $loglifetime < 0) {
return;
}
$loglifetime = time() - ($loglifetime * 3600 * 24); // Value in days.
$lifetimep = array($loglifetime);
$start = time();
while ($min = $DB->get_field_select("logstore_standard_log", "MIN(timecreated)", "timecreated < ?", $lifetimep)) {
// Break this down into chunks to avoid transaction for too long and generally thrashing database.
// Experiments suggest deleting one day takes up to a few seconds; probably a reasonable chunk size usually.
// If the cleanup has just been enabled, it might take e.g a month to clean the years of logs.
$params = array(min($min + 3600 * 24, $loglifetime));
$DB->delete_records_select("logstore_standard_log", "timecreated < ?", $params);
if (time() > $start + 300) {
// Do not churn on log deletion for too long each run.
break;
}
}
mtrace(" Deleted old log records from standard store.");
}
}
@@ -218,4 +218,41 @@ class logstore_standard_store_testcase extends advanced_testcase {
$this->assertContains($expectedreport, $reports);
}
}
/**
* Test that the standard log cleanup works correctly.
*/
public function test_cleanup_task() {
global $DB;
$this->resetAfterTest();
// Create some records spread over various days; test multiple iterations in cleanup.
$ctx = context_course::instance(1);
$record = (object) array(
'edulevel' => 0,
'contextid' => $ctx->id,
'contextlevel' => $ctx->contextlevel,
'contextinstanceid' => $ctx->instanceid,
'userid' => 1,
'timecreated' => time(),
);
$DB->insert_record('logstore_standard_log', $record);
$record->timecreated -= 3600 * 24 * 30;
$DB->insert_record('logstore_standard_log', $record);
$record->timecreated -= 3600 * 24 * 30;
$DB->insert_record('logstore_standard_log', $record);
$record->timecreated -= 3600 * 24 * 30;
$DB->insert_record('logstore_standard_log', $record);
$this->assertEquals(4, $DB->count_records('logstore_standard_log'));
// Remove all logs before "today".
set_config('loglifetime', 1, 'logstore_standard');
$this->expectOutputString(" Deleted old log records from standard store.\n");
$clean = new \logstore_standard\task\cleanup_task();
$clean->execute();
$this->assertEquals(1, $DB->count_records('logstore_standard_log'));
}
}
@@ -53,27 +53,22 @@ class tool_task_edit_scheduled_task_form extends moodleform {
$mform->addElement('text', 'minute', get_string('taskscheduleminute', 'tool_task'));
$mform->setType('minute', PARAM_RAW);
$mform->addHelpButton('minute', 'taskscheduleminute', 'tool_task');
$mform->addRule('minute', get_string('required'), 'required');
$mform->addElement('text', 'hour', get_string('taskschedulehour', 'tool_task'));
$mform->setType('hour', PARAM_RAW);
$mform->addHelpButton('hour', 'taskschedulehour', 'tool_task');
$mform->addRule('hour', get_string('required'), 'required');
$mform->addElement('text', 'day', get_string('taskscheduleday', 'tool_task'));
$mform->setType('day', PARAM_RAW);
$mform->addHelpButton('day', 'taskscheduleday', 'tool_task');
$mform->addRule('day', get_string('required'), 'required');
$mform->addElement('text', 'month', get_string('taskschedulemonth', 'tool_task'));
$mform->setType('month', PARAM_RAW);
$mform->addHelpButton('month', 'taskschedulemonth', 'tool_task');
$mform->addRule('month', get_string('required'), 'required');
$mform->addElement('text', 'dayofweek', get_string('taskscheduledayofweek', 'tool_task'));
$mform->setType('dayofweek', PARAM_RAW);
$mform->addHelpButton('dayofweek', 'taskscheduledayofweek', 'tool_task');
$mform->addRule('dayofweek', get_string('required'), 'required');
$mform->addElement('advcheckbox', 'disabled', get_string('disabled', 'tool_task'));
$mform->addHelpButton('disabled', 'disabled', 'tool_task');
+22 -18
View File
@@ -104,25 +104,29 @@ if ($execute = $options['execute']) {
$predbqueries = $DB->perf_get_queries();
$pretime = microtime(true);
mtrace("Scheduled task: " . $task->get_name());
// NOTE: it would be tricky to move this code to \core\task\manager class,
// because we want to do detailed error reporting.
$cronlockfactory = \core\lock\lock_config::get_lock_factory('cron');
if (!$cronlock = $cronlockfactory->get_lock('core_cron', 10)) {
mtrace('Cannot obtain cron lock');
exit(129);
}
if (!$lock = $cronlockfactory->get_lock('\\' . get_class($task), 10)) {
$cronlock->release();
mtrace('Cannot obtain task lock');
exit(130);
}
$task->set_lock($lock);
if (!$task->is_blocking()) {
$cronlock->release();
} else {
$task->set_cron_lock($cronlock);
}
try {
mtrace("Scheduled task: " . $task->get_name());
// NOTE: it would be tricky to move this code to \core\task\manager class,
// because we want to do detailed error reporting.
$cronlockfactory = \core\lock\lock_config::get_lock_factory('cron');
if (!$cronlock = $cronlockfactory->get_lock('core_cron', 10)) {
mtrace('Cannot obtain cron lock');
exit(129);
}
if (!$lock = $cronlockfactory->get_lock('\\' . get_class($task), 10)) {
mtrace('Cannot obtain task lock');
exit(130);
}
$task->set_lock($lock);
if (!$task->is_blocking()) {
$cronlock->release();
} else {
$task->set_cron_lock($cronlock);
}
get_mailer('buffer');
$task->execute();
if (isset($predbqueries)) {
@@ -0,0 +1,53 @@
@tool @tool_task @javascript
Feature: Manage scheduled tasks
In order to configure scheduled tasks
As an admin
I need to be able to disable, enable, edit and reset to default scheduled tasks
Background:
Given I log in as "admin"
And I navigate to "Scheduled tasks" node in "Site administration > Server"
Scenario: Disable scheduled task
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
Then I should see "Edit task schedule: Log table cleanup"
And I set the following fields to these values:
| disabled | 1 |
And I press "Save changes"
Then I should see "Changes saved"
And I should see "Disabled" in the "Log table cleanup" "table_row"
Scenario: Enable scheduled task
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
Then I should see "Edit task schedule: Log table cleanup"
And I set the following fields to these values:
| disabled | 0 |
And I press "Save changes"
Then I should see "Changes saved"
And I should not see "Task disabled" in the "Log table cleanup" "table_row"
Scenario: Edit scheduled task
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
Then I should see "Edit task schedule: Log table cleanup"
And I set the following fields to these values:
| minute | */5 |
| hour | 1 |
| day | 2 |
| month | 3 |
| dayofweek | 4 |
And I press "Save changes"
Then I should see "Changes saved"
And the following should exist in the "admintable" table:
| Component | Minute | Hour | Day | Day of week | Month |
| Standard log | */5 | 1 | 2 | 4 | 3 |
Scenario: Reset scheduled task to default
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
Then I should see "Edit task schedule: Log table cleanup"
And I set the following fields to these values:
| resettodefaults | 1 |
And I press "Save changes"
Then I should see "Changes saved"
And the following should not exist in the "admintable" table:
| Name | Component | Minute | Hour | Day | Day of week | Month |
| Log table cleanup | Standard log | */5 | 1 | 2 | 4 | 3 |
+19 -2
View File
@@ -402,8 +402,14 @@ function uu_pre_process_custom_profile_data($data) {
function uu_check_custom_profile_data(&$data) {
global $CFG, $DB;
$noerror = true;
$testuserid = null;
// find custom profile fields and check if data needs to converted.
if (!empty($data['username'])) {
if (preg_match('/id=(.*)"/i', $data['username'], $result)) {
$testuserid = $result[1];
}
}
// Find custom profile fields and check if data needs to converted.
foreach ($data as $key => $value) {
if (preg_match('/^profile_field_/', $key)) {
$shortname = str_replace('profile_field_', '', $key);
@@ -417,9 +423,20 @@ function uu_check_custom_profile_data(&$data) {
$data['status'][] = get_string('invaliduserfield', 'error', $shortname);
$noerror = false;
}
// Check for duplicate value.
if (method_exists($formfield, 'edit_validate_field') ) {
$testuser = new stdClass();
$testuser->{$key} = $value;
$testuser->id = $testuserid;
$err = $formfield->edit_validate_field($testuser);
if (!empty($err[$key])) {
$data['status'][] = $err[$key].' ('.$key.')';
$noerror = false;
}
}
}
}
}
}
return $noerror;
}
}
+2
View File
@@ -63,6 +63,8 @@ echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
echo $newsettingshtml;
+7
View File
@@ -157,6 +157,13 @@ class external_service_form extends moodleform {
$errors = parent::validation($data, $files);
// Add field validation check for duplicate name.
if ($webservice = $DB->get_record('external_services', array('name' => $data['name']))) {
if (empty($data['id']) || $webservice->id != $data['id']) {
$errors['name'] = get_string('nameexists', 'webservice');
}
}
// Add field validation check for duplicate shortname.
// Allow duplicated "empty" shortnames.
if (!empty($data['shortname'])) {
+28
View File
@@ -300,6 +300,7 @@ class auth_plugin_db extends auth_plugin_base {
$updateuser = new stdClass();
$updateuser->id = $user->id;
$updateuser->suspended = 1;
$updateuser = $this->clean_data($updateuser);
user_update_user($updateuser, false);
$trace->output(get_string('auth_dbsuspenduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)), 1);
}
@@ -381,6 +382,7 @@ class auth_plugin_db extends auth_plugin_base {
foreach($add_users as $user) {
$username = $user;
if ($this->config->removeuser == AUTH_REMOVEUSER_SUSPEND) {
if ($old_user = $DB->get_record('user', array('username'=>$username, 'deleted'=>0, 'suspended'=>1, 'mnethostid'=>$CFG->mnet_localhost_id, 'auth'=>$this->authtype))) {
$DB->set_field('user', 'suspended', 0, array('id'=>$old_user->id));
$trace->output(get_string('auth_dbreviveduser', 'auth_db', array('name'=>$username, 'id'=>$old_user->id)), 1);
@@ -412,6 +414,7 @@ class auth_plugin_db extends auth_plugin_base {
$trace->output(get_string('auth_dbinsertuserduplicate', 'auth_db', array('username'=>$user->username, 'auth'=>$collision->auth)), 1);
continue;
}
$user = $this->clean_data($user);
try {
$id = $DB->insert_record ('user', $user); // it is truly a new user
@@ -553,6 +556,7 @@ class auth_plugin_db extends auth_plugin_base {
}
}
}
if ($updated) {
$DB->set_field('user', 'timemodified', time(), array('id'=>$userid));
@@ -870,6 +874,30 @@ class auth_plugin_db extends auth_plugin_base {
error_reporting($CFG->debug);
ob_end_flush();
}
/**
* Clean the user data that comes from an external database.
*
* @param array $user the user data to be validated against properties definition.
* @return stdClass $user the cleaned user data.
*/
public function clean_data($user) {
if (empty($user)) {
return $user;
}
foreach ($user as $field => $value) {
// Get the property parameter type and do the cleaning.
try {
$property = core_user::get_property_definition($field);
$user->$field = clean_param($value, $property['type']);
} catch (coding_exception $e) {
debugging("The property '$field' could not be cleaned.", DEBUG_DEVELOPER);
}
}
return $user;
}
}
+73
View File
@@ -374,4 +374,77 @@ class auth_db_testcase extends advanced_testcase {
$this->cleanup_auth_database();
}
/**
* Testing the clean_data() method.
*/
public function test_clean_data() {
global $DB;
$this->resetAfterTest(false);
$this->preventResetByRollback();
$this->init_auth_database();
$auth = get_auth_plugin('db');
$auth->db_init();
// Create users on external table.
$extdbuser1 = (object)array('name'=>'u1', 'pass'=>'heslo', 'email'=>'u1@example.com');
$extdbuser1->id = $DB->insert_record('auth_db_users', $extdbuser1);
// User with malicious data on the name.
$extdbuser2 = (object)array('name'=>'user<script>alert(1);</script>xss', 'pass'=>'heslo', 'email'=>'xssuser@example.com');
$extdbuser2->id = $DB->insert_record('auth_db_users', $extdbuser2);
$trace = new null_progress_trace();
// Let's test user sync make sure still works as expected..
$auth->sync_users($trace, true);
// Get the user on moodle user table.
$user2 = $DB->get_record('user', array('email'=> $extdbuser2->email, 'auth'=>'db'));
// The malicious code should be sanitized.
$this->assertEquals($user2->username, 'userscriptalert1scriptxss');
$this->assertNotEquals($user2->username, $extdbuser2->name);
// User with correct data, should be equal to external db.
$user1 = $DB->get_record('user', array('email'=> $extdbuser1->email, 'auth'=>'db'));
$this->assertEquals($extdbuser1->name, $user1->username);
$this->assertEquals($extdbuser1->email, $user1->email);
// Now, let's update the name.
$extdbuser2->name = 'user no xss anymore';
$DB->update_record('auth_db_users', $extdbuser2);
// Run sync again to update the user data.
$auth->sync_users($trace, true);
// The user information should be updated.
$user2 = $DB->get_record('user', array('username' => 'usernoxssanymore', 'auth' => 'db'));
// The spaces should be removed, as it's the username.
$this->assertEquals($user2->username, 'usernoxssanymore');
// Now let's test just the clean_data() method isolated.
// Testing PARAM_USERNAME, PARAM_NOTAGS, PARAM_RAW_TRIMMED and others.
$user3 = new stdClass();
$user3->firstname = 'John <script>alert(1)</script> Doe';
$user3->username = 'john%#&~%*_doe';
$user3->email = ' john@testing.com ';
$user3->deleted = 'no';
$user3->description = '<b>A description about myself.</b>';
$user3cleaned = $auth->clean_data($user3);
// Expected results.
$this->assertEquals($user3cleaned->firstname, 'John alert(1) Doe');
$this->assertEquals($user3cleaned->email, 'john@testing.com');
$this->assertEquals($user3cleaned->deleted, 0);
$this->assertEquals($user3->description, '<b>A description about myself.</b>');
$this->assertEquals($user3->username, 'john_doe');
// Try to clean an invalid property (fullname).
$user3->fullname = 'John Doe';
$auth->clean_data($user3);
$this->assertDebuggingCalled("The property 'fullname' could not be cleaned.");
$this->cleanup_auth_database();
}
}
+2 -2
View File
@@ -58,7 +58,7 @@ class auth_db_events_testcase extends advanced_testcase {
$user = new stdClass();
$user->name = 'mark';
$user->pass = 'password123';
$user->email = 'what@legend.com';
$user->email = 'what@example.com';
$user->id = $DB->insert_record('auth_db_users', $user);
// Run sync_users and capture the user_created event.
@@ -107,7 +107,7 @@ class auth_db_events_testcase extends advanced_testcase {
$user = new stdClass();
$user->name = 'mark';
$user->pass = 'password123';
$user->email = 'what@legend.com';
$user->email = 'what@example.com';
$user->id = $DB->insert_record('auth_db_users', $user);
// Set the config to remove the suspension on the user.
+4 -4
View File
@@ -139,12 +139,12 @@ class auth_plugin_email extends auth_plugin_base {
$user = get_complete_user_data('username', $username);
if (!empty($user)) {
if ($user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->auth != $this->authtype) {
if ($user->auth != $this->authtype) {
return AUTH_CONFIRM_ERROR;
} else if ($user->secret == $confirmsecret && $user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
$DB->set_field("user", "confirmed", 1, array("id"=>$user->id));
if ($user->firstaccess == 0) {
+1 -1
View File
@@ -24,7 +24,7 @@
$string['auth_emaildescription'] = '<p>Email-based self-registration enables a user to create their own account via a \'Create new account\' button on the login page. The user then receives an email containing a secure link to a page where they can confirm their account. Future logins just check the username and password against the stored values in the Moodle database.</p><p>Note: In addition to enabling the plugin, email-based self-registration must also be selected from the self registration drop-down menu on the \'Manage authentication\' page.</p>';
$string['auth_emailnoemail'] = 'Tried to send you an email but failed!';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the signup page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha/learnmore for more details. <br /><em>PHP cURL extension is required.</em>';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the sign-up page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha for more details.';
$string['auth_emailrecaptcha_key'] = 'Enable reCAPTCHA element';
$string['auth_emailsettings'] = 'Settings';
$string['pluginname'] = 'Email-based self-registration';
+6 -5
View File
@@ -604,12 +604,12 @@ class auth_plugin_ldap extends auth_plugin_base {
$user = get_complete_user_data('username', $username);
if (!empty($user)) {
if ($user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->auth != $this->authtype) {
if ($user->auth != $this->authtype) {
return AUTH_CONFIRM_ERROR;
} else if ($user->secret == $confirmsecret && $user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
if (!$this->user_activate($username)) {
return AUTH_CONFIRM_FAIL;
@@ -1653,7 +1653,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$_SERVER['HTTP_REFERER'] != $CFG->wwwroot &&
$_SERVER['HTTP_REFERER'] != $CFG->wwwroot.'/' &&
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/' &&
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/index.php')
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/index.php' &&
clean_param($_SERVER['HTTP_REFERER'], PARAM_LOCALURL) != '')
? $_SERVER['HTTP_REFERER'] : NULL;
}
+1 -1
View File
@@ -296,7 +296,7 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
'lastnamephonetic' => '最後のお名前のテスト一号',
'firstnamephonetic' => 'お名前のテスト一号',
'alternatename' => 'Alternate Name User Test 1',
'email' => 'usersignuptest1@email.com',
'email' => 'usersignuptest1@example.com',
'description' => 'This is a description for user 1',
'city' => 'Perth',
'country' => 'au',
+2 -1
View File
@@ -143,7 +143,8 @@ class auth_plugin_shibboleth extends auth_plugin_base {
$configarray = (array) $this->config;
$moodleattributes = array();
foreach ($this->userfields as $field) {
$userfields = array_merge($this->userfields, $this->get_custom_user_profile_fields());
foreach ($userfields as $field) {
if (isset($configarray["field_map_$field"])) {
$moodleattributes[$field] = $configarray["field_map_$field"];
}
+1 -1
View File
@@ -138,7 +138,7 @@ urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/
<?php
print_auth_lock_options($this->authtype, $user_fields, '<!-- empty help -->', true, false);
print_auth_lock_options($this->authtype, $user_fields, '<!-- empty help -->', true, false, $this->get_custom_user_profile_fields());
?>
</table>
+2 -2
View File
@@ -16,7 +16,7 @@ Feature: Authentication
Scenario: Log in as an existing admin user filling the form
Given the following "users" exist:
| username | password | firstname | lastname | email |
| testuser | testuser | Test | User | moodle@moodlemoodle.com |
| testuser | testuser | Test | User | moodle@example.com |
And I am on homepage
When I follow "Log in"
And I set the field "Username" to "testuser"
@@ -27,7 +27,7 @@ Feature: Authentication
Scenario: Log in as an unexisting user filling the form
Given the following "users" exist:
| username | password | firstname | lastname | email |
| testuser | testuser | Test | User | moodle@moodlemoodle.com |
| testuser | testuser | Test | User | moodle@example.com |
And I am on homepage
When I follow "Log in"
And I set the field "Username" to "testuser"
@@ -53,8 +53,8 @@ class condition extends \core_availability\condition {
*/
public function __construct($structure) {
// Get cmid.
if (isset($structure->cm) && is_int($structure->cm)) {
$this->cmid = $structure->cm;
if (isset($structure->cm) && is_number($structure->cm)) {
$this->cmid = (int)$structure->cm;
} else {
throw new \coding_exception('Missing or invalid ->cm for completion condition');
}
@@ -16,11 +16,9 @@ Feature: availability_completion
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
| Enable completion tracking | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
| enablecompletion | 1 |
@javascript
Scenario: Test condition
@@ -16,10 +16,8 @@ Feature: availability_date
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -10,16 +10,14 @@ Feature: availability_grade
| Course 1 | C1 | topics | 1 |
And the following "users" exist:
| username | email |
| teacher1 | t@example.org |
| student1 | s@example.org |
| teacher1 | t@example.com |
| student1 | s@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -60,8 +58,22 @@ Feature: availability_grade
And I set the field "Grade" to "A1"
And I click on "min" "checkbox" in the ".availability-item" "css_element"
And I set the field "Minimum grade percentage (inclusive)" to "50"
And I click on "max" "checkbox" in the ".availability-item" "css_element"
And I set the field "Maximum grade percentage (exclusive)" to "80"
And I press "Save and return to course"
# Check if disabling a part of the restriction is get saved.
And I open "P3" actions menu
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And I click on "max" "checkbox" in the ".availability-item" "css_element"
And I press "Save and return to course"
And I open "P3" actions menu
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And the field "Maximum grade percentage (exclusive)" matches value ""
And I follow "Course 1"
# Add a Page with a grade condition for 10%.
And I add a "Page" to section "4"
And I set the following fields to these values:
@@ -103,8 +115,8 @@ Feature: availability_grade
# Give the assignment 40%.
And I follow "A1"
And I follow "View/grade all submissions"
# Pick the grade link in the row that has s@example.org in it.
And I click on "//a[contains(@href, 'action=grade') and ancestor::tr/td[normalize-space(.) = 's@example.org']]/img" "xpath_element"
# Pick the grade link in the row that has s@example.com in it.
And I click on "//a[contains(@href, 'action=grade') and ancestor::tr/td[normalize-space(.) = 's@example.com']]/img" "xpath_element"
And I set the field "Grade out of 100" to "40"
And I click on "Save changes" "button"
@@ -95,6 +95,7 @@ M.availability_grade.form.getNode = function(json) {
root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');
root.delegate('valuechange', function() {
@@ -1 +1 @@
YUI.add("moodle-availability_grade-form",function(e,t){M.availability_grade=M.availability_grade||{},M.availability_grade.form=e.Object(M.core_availability.plugin),M.availability_grade.form.grades=null,M.availability_grade.form.initInner=function(e){this.grades=e,this.nodesSoFar=0},M.availability_grade.form.getNode=function(t){this.nodesSoFar++;var n=M.str.availability_grade,r="<label>"+n.title+' <span class="availability-group">'+'<select name="id"><option value="0">'+M.str.moodle.choosedots+"</option>";for(var i=0;i<this.grades.length;i++){var s=this.grades[i];r+='<option value="'+s.id+'">'+s.name+"</option>"}r+='</select></span></label> <span class="availability-group"><label><input type="checkbox" name="min"/>'+n.option_min+'</label> <label><span class="accesshide">'+n.label_min+'</span><input type="text" name="minval" title="'+n.label_min+'"/></label>%</span>'+'<span class="availability-group">'+'<label><input type="checkbox" name="max"/>'+n.option_max+'</label> <label><span class="accesshide">'+n.label_max+'</span><input type="text" name="maxval" title="'+n.label_max+'"/></label>%</span>';var o=e.Node.create("<span>"+r+"</span>");t.id!==undefined&&o.one("select[name=id] > option[value="+t.id+"]")&&o.one("select[name=id]").set("value",""+t.id),t.min!==undefined&&(o.one("input[name=min]").set("checked",!0),o.one("input[name=minval]").set("value",t.min)),t.max!==undefined&&(o.one("input[name=max]").set("checked",!0),o.one("input[name=maxval]").set("value",t.max));var u=function(e,t){var n=e.ancestor("label").next("label").one("input"),r=e.get("checked");return n.set("disabled",!r),t&&r&&n.focus(),r};o.all("input[type=checkbox]").each(u);if(!M.availability_grade.form.addedEvents){M.availability_grade.form.addedEvents=!0;var a=e.one("#fitem_id_availabilityconditionsjson");a.delegate("change",function(){M.core_availability.form.update()},".availability_grade select[name=id]"),a.delegate("click",function(){u(this,!0)},".availability_grade input[type=checkbox]"),a.delegate("valuechange",function(){M.core_availability.form.update()},".availability_grade input[type=text]")}return o},M.availability_grade.form.fillValue=function(e,t){e.id=parseInt(t.one("select[name=id]").get("value"),10),t.one("input[name=min]").get("checked")&&(e.min=this.getValue("minval",t)),t.one("input[name=max]").get("checked")&&(e.max=this.getValue("maxval",t))},M.availability_grade.form.getValue=function(e,t){var n=t.one("input[name="+e+"]").get("value");if(!/^[0-9]+([.,][0-9]+)?$/.test(n))return n;var r=parseFloat(n.replace(",","."));return r<0||r>100?n:r},M.availability_grade.form.fillErrors=function(e,t){var n={};this.fillValue(n,t),n.id===0&&e.push("availability_grade:error_selectgradeid"),n.min!==undefined&&typeof n.min=="string"||n.max!==undefined&&typeof n.max=="string"?e.push("availability_grade:error_invalidnumber"):n.min!==undefined&&n.max!==undefined&&n.min>=n.max&&e.push("availability_grade:error_backwardrange")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
YUI.add("moodle-availability_grade-form",function(e,t){M.availability_grade=M.availability_grade||{},M.availability_grade.form=e.Object(M.core_availability.plugin),M.availability_grade.form.grades=null,M.availability_grade.form.initInner=function(e){this.grades=e,this.nodesSoFar=0},M.availability_grade.form.getNode=function(t){this.nodesSoFar++;var n=M.str.availability_grade,r="<label>"+n.title+' <span class="availability-group">'+'<select name="id"><option value="0">'+M.str.moodle.choosedots+"</option>";for(var i=0;i<this.grades.length;i++){var s=this.grades[i];r+='<option value="'+s.id+'">'+s.name+"</option>"}r+='</select></span></label> <span class="availability-group"><label><input type="checkbox" name="min"/>'+n.option_min+'</label> <label><span class="accesshide">'+n.label_min+'</span><input type="text" name="minval" title="'+n.label_min+'"/></label>%</span>'+'<span class="availability-group">'+'<label><input type="checkbox" name="max"/>'+n.option_max+'</label> <label><span class="accesshide">'+n.label_max+'</span><input type="text" name="maxval" title="'+n.label_max+'"/></label>%</span>';var o=e.Node.create("<span>"+r+"</span>");t.id!==undefined&&o.one("select[name=id] > option[value="+t.id+"]")&&o.one("select[name=id]").set("value",""+t.id),t.min!==undefined&&(o.one("input[name=min]").set("checked",!0),o.one("input[name=minval]").set("value",t.min)),t.max!==undefined&&(o.one("input[name=max]").set("checked",!0),o.one("input[name=maxval]").set("value",t.max));var u=function(e,t){var n=e.ancestor("label").next("label").one("input"),r=e.get("checked");return n.set("disabled",!r),t&&r&&n.focus(),r};o.all("input[type=checkbox]").each(u);if(!M.availability_grade.form.addedEvents){M.availability_grade.form.addedEvents=!0;var a=e.one("#fitem_id_availabilityconditionsjson");a.delegate("change",function(){M.core_availability.form.update()},".availability_grade select[name=id]"),a.delegate("click",function(){u(this,!0),M.core_availability.form.update()},".availability_grade input[type=checkbox]"),a.delegate("valuechange",function(){M.core_availability.form.update()},".availability_grade input[type=text]")}return o},M.availability_grade.form.fillValue=function(e,t){e.id=parseInt(t.one("select[name=id]").get("value"),10),t.one("input[name=min]").get("checked")&&(e.min=this.getValue("minval",t)),t.one("input[name=max]").get("checked")&&(e.max=this.getValue("maxval",t))},M.availability_grade.form.getValue=function(e,t){var n=t.one("input[name="+e+"]").get("value");if(!/^[0-9]+([.,][0-9]+)?$/.test(n))return n;var r=parseFloat(n.replace(",","."));return r<0||r>100?n:r},M.availability_grade.form.fillErrors=function(e,t){var n={};this.fillValue(n,t),n.id===0&&e.push("availability_grade:error_selectgradeid"),n.min!==undefined&&typeof n.min=="string"||n.max!==undefined&&typeof n.max=="string"?e.push("availability_grade:error_invalidnumber"):n.min!==undefined&&n.max!==undefined&&n.min>=n.max&&e.push("availability_grade:error_backwardrange")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
@@ -95,6 +95,7 @@ M.availability_grade.form.getNode = function(json) {
root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');
root.delegate('valuechange', function() {
+1
View File
@@ -93,6 +93,7 @@ M.availability_grade.form.getNode = function(json) {
root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');
root.delegate('valuechange', function() {
@@ -16,10 +16,8 @@ Feature: availability_group
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -22,10 +22,8 @@ Feature: availability_grouping
And the following "group members" exist:
| user | group |
| student1 | GI1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -10,16 +10,14 @@ Feature: availability_profile
| Course 1 | C1 | topics | 1 |
And the following "users" exist:
| username | email |
| teacher1 | t@example.org |
| student1 | s@example.org |
| teacher1 | t@example.com |
| student1 | s@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -38,7 +36,7 @@ Feature: availability_profile
And I click on "Add restriction..." "button"
And I click on "User profile" "button"
And I set the field "User profile field" to "Email address"
And I set the field "Value to compare against" to "s@example.org"
And I set the field "Value to compare against" to "s@example.com"
And I click on ".availability-item .availability-eye img" "css_element"
And I click on "Save and return to course" "button"
@@ -52,7 +50,7 @@ Feature: availability_profile
And I click on "Add restriction..." "button"
And I click on "User profile" "button"
And I set the field "User profile field" to "Email address"
And I set the field "Value to compare against" to "q@example.org"
And I set the field "Value to compare against" to "q@example.com"
And I click on ".availability-item .availability-eye img" "css_element"
And I click on "Save and return to course" "button"
@@ -78,7 +76,7 @@ Feature: availability_profile
# Set field value for user.
And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
And I click on "a[title=Edit]" "css_element" in the "s@example.org" "table_row"
And I click on "a[title=Edit]" "css_element" in the "s@example.com" "table_row"
And I expand all fieldsets
And I set the field "Super field" to "Bananaman"
And I click on "Update profile" "button"
@@ -34,10 +34,8 @@ Feature: display_availability
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Activity availability display
@@ -76,7 +74,7 @@ Feature: display_availability
And I press "Add restriction..."
And I click on "User profile" "button" in the "Add restriction..." "dialogue"
And I set the field "User profile field" to "Email address"
And I set the field "Value to compare against" to "email@example.org"
And I set the field "Value to compare against" to "email@example.com"
And I set the field "Method of comparison" to "is equal to"
And I press "Save and return to course"
@@ -109,17 +107,17 @@ Feature: display_availability
# Page 1 display still there but should be dimmed and not a link.
Then I should see "Page 1" in the "#section-1 .dimmed_text" "css_element"
And ".activityinstance a" "css_element" should not exist in the "#section-1" "css_element"
And ".activityinstance a" "css_element" should not exist in the "Topic 1" "section"
# Date display should be present.
And I should see "Available until" in the "#section-1" "css_element"
And I should see "Available until" in the "Topic 1" "section"
# Page 2 display not there at all
And I should not see "Page 2" in the "region-main" "region"
# Page 3 display and link
And I should see "Page 3" in the "region-main" "region"
And ".activityinstance a" "css_element" should exist in the "#section-3" "css_element"
And ".activityinstance a" "css_element" should exist in the "Topic 3" "section"
@javascript
Scenario: Section availability display
@@ -39,15 +39,10 @@ Feature: edit_availability
When I edit the section "1"
Then "Restrict access" "fieldset" should not exist
When I log out
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And the following config values are set as admin:
| enableavailability | 1 |
When I log out
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should exist
@@ -58,10 +53,8 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in activity form
# Set up.
Given I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
@@ -153,10 +146,8 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in section form
# Set up.
Given I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -172,3 +163,4 @@ Feature: edit_availability
And I should not see "None" in the "Restrict access" "fieldset"
And "Restriction type" "select" should be visible
And I should see "Date" in the "Restrict access" "fieldset"
+3 -3
View File
@@ -299,7 +299,7 @@
<IDNUMBER>891220979</IDNUMBER>
<FIRSTNAME>Admin</FIRSTNAME>
<LASTNAME>User</LASTNAME>
<EMAIL>adamzap@gmail.com</EMAIL>
<EMAIL>adamzap@example.com</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
@@ -368,7 +368,7 @@
<IDNUMBER>891111111</IDNUMBER>
<FIRSTNAME>Adam</FIRSTNAME>
<LASTNAME>Zapletal</LASTNAME>
<EMAIL>azaple1@lsu.edu</EMAIL>
<EMAIL>azaple1@example.com</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
@@ -481,7 +481,7 @@
<IDNUMBER></IDNUMBER>
<FIRSTNAME>Philip</FIRSTNAME>
<LASTNAME>Cali</LASTNAME>
<EMAIL>pcali1@lsu.edu</EMAIL>
<EMAIL>pcali1@example.com</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
+1 -1
View File
@@ -516,7 +516,7 @@ class backup_enrolments_structure_step extends backup_structure_step {
$enrol = new backup_nested_element('enrol', array('id'), array(
'enrol', 'status', 'name', 'enrolperiod', 'enrolstartdate',
'enrolenddate', 'expirynotify', 'expirytreshold', 'notifyall',
'enrolenddate', 'expirynotify', 'expirythreshold', 'notifyall',
'password', 'cost', 'currency', 'roleid',
'customint1', 'customint2', 'customint3', 'customint4', 'customint5', 'customint6', 'customint7', 'customint8',
'customchar1', 'customchar2', 'customchar3',
+76 -21
View File
@@ -1386,13 +1386,31 @@ class restore_section_structure_step extends restore_structure_step {
public function process_course_format_options($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
unset($data->id);
$data->sectionid = $this->task->get_sectionid();
$data->courseid = $this->get_courseid();
$newid = $DB->insert_record('course_format_options', $data);
$this->set_mapping('course_format_options', $oldid, $newid);
static $courseformats = array();
$courseid = $this->get_courseid();
if (!array_key_exists($courseid, $courseformats)) {
// It is safe to have a static cache of course formats because format can not be changed after this point.
$courseformats[$courseid] = $DB->get_field('course', 'format', array('id' => $courseid));
}
$data = (array)$data;
if ($courseformats[$courseid] === $data['format']) {
// Import section format options only if both courses (the one that was backed up
// and the one we are restoring into) have same formats.
$params = array(
'courseid' => $this->get_courseid(),
'sectionid' => $this->task->get_sectionid(),
'format' => $data['format'],
'name' => $data['name']
);
if ($record = $DB->get_record('course_format_options', $params, 'id, value')) {
// Do not overwrite existing information.
$newid = $record->id;
} else {
$params['value'] = $data['value'];
$newid = $DB->insert_record('course_format_options', $params);
}
$this->set_mapping('course_format_options', $data['id'], $newid);
}
}
protected function after_execute() {
@@ -1460,27 +1478,54 @@ class restore_course_structure_step extends restore_structure_step {
*/
public function process_course($data) {
global $CFG, $DB;
$context = context::instance_by_id($this->task->get_contextid());
$userid = $this->task->get_userid();
$target = $this->get_task()->get_target();
$isnewcourse = $target != backup::TARGET_CURRENT_ADDING && $target != backup::TARGET_EXISTING_ADDING;
// When restoring to a new course we can set all the things except for the ID number.
$canchangeidnumber = $isnewcourse || has_capability('moodle/course:changeidnumber', $context, $userid);
$canchangeshortname = $isnewcourse || has_capability('moodle/course:changeshortname', $context, $userid);
$canchangefullname = $isnewcourse || has_capability('moodle/course:changefullname', $context, $userid);
$canchangesummary = $isnewcourse || has_capability('moodle/course:changesummary', $context, $userid);
$data = (object)$data;
$data->id = $this->get_courseid();
$fullname = $this->get_setting_value('course_fullname');
$shortname = $this->get_setting_value('course_shortname');
$startdate = $this->get_setting_value('course_startdate');
// Calculate final course names, to avoid dupes
// Calculate final course names, to avoid dupes.
list($fullname, $shortname) = restore_dbops::calculate_course_names($this->get_courseid(), $fullname, $shortname);
// Need to change some fields before updating the course record
$data->id = $this->get_courseid();
$data->fullname = $fullname;
$data->shortname= $shortname;
if ($canchangefullname) {
$data->fullname = $fullname;
} else {
unset($data->fullname);
}
if ($canchangeshortname) {
$data->shortname = $shortname;
} else {
unset($data->shortname);
}
if (!$canchangesummary) {
unset($data->summary);
unset($data->summaryformat);
}
// Only allow the idnumber to be set if the user has permission and the idnumber is not already in use by
// another course on this site.
$context = context::instance_by_id($this->task->get_contextid());
if (!empty($data->idnumber) && has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid()) &&
$this->task->is_samesite() && !$DB->record_exists('course', array('idnumber' => $data->idnumber))) {
if (!empty($data->idnumber) && $canchangeidnumber && $this->task->is_samesite()
&& !$DB->record_exists('course', array('idnumber' => $data->idnumber))) {
// Do not reset idnumber.
} else if (!$isnewcourse) {
// Prevent override when restoring as merge.
unset($data->idnumber);
} else {
$data->idnumber = '';
}
@@ -2901,11 +2946,6 @@ class restore_activity_grades_structure_step extends restore_structure_step {
$oldparentid = $data->categoryid;
$courseid = $this->get_courseid();
// make sure top course category exists, all grade items will be associated
// to it. Later, if restoring the whole gradebook, categories will be introduced
$coursecat = grade_category::fetch_course_category($courseid);
$coursecatid = $coursecat->id; // Get the categoryid to be used
$idnumber = null;
if (!empty($data->idnumber)) {
// Don't get any idnumber from course module. Keep them as they are in grade_item->idnumber
@@ -2930,8 +2970,18 @@ class restore_activity_grades_structure_step extends restore_structure_step {
}
}
if (!empty($data->categoryid)) {
// If the grade category id of the grade item being restored belongs to this course
// then it is a fair assumption that this is the correct grade category for the activity
// and we should leave it in place, if not then unset it.
// TODO MDL-34790 Gradebook does not import if target course has gradebook categories.
$conditions = array('id' => $data->categoryid, 'courseid' => $courseid);
if (!$this->task->is_samesite() || !$DB->record_exists('grade_categories', $conditions)) {
unset($data->categoryid);
}
}
unset($data->id);
$data->categoryid = $coursecatid;
$data->courseid = $this->get_courseid();
$data->iteminstance = $this->task->get_activityid();
$data->idnumber = $idnumber;
@@ -3688,6 +3738,11 @@ class restore_create_categories_and_questions extends restore_structure_step {
$data = (object)$data;
$newquestion = $this->get_new_parentid('question');
$questioncreated = (bool) $this->get_mappingid('question_created', $this->get_old_parentid('question'));
if (!$questioncreated) {
// This question already exists in the question bank. Nothing for us to do.
return;
}
if (!empty($CFG->usetags)) { // if enabled in server
// TODO: This is highly inefficient. Each time we add one tag
@@ -0,0 +1,237 @@
<?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/>.
/**
* Tests for Moodle 2 format backup operation.
*
* @package core_backup
* @copyright 2014 Russell Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
require_once($CFG->dirroot . '/course/format/topics/lib.php');
require_once($CFG->libdir . '/completionlib.php');
/**
* Tests for Moodle 2 course format section_options backup operation.
*
* @package core_backup
* @copyright 2014 Russell Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_backup_moodle2_course_format_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
/**
* Tests a backup and restore adds the required section option data
* when the same course format is used.
*/
public function test_course_format_options_restore() {
global $DB, $CFG;
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
$CFG->enablecompletion = true;
// Create a course with some availability data set.
$generator = $this->getDataGenerator();
$course = $generator->create_course(
array('format' => 'test_cs_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$courseobject = format_base::instance($course->id);
$section = $DB->get_record('course_sections',
array('course' => $course->id, 'section' => 1), '*', MUST_EXIST);
$data = array('id' => $section->id,
'numdaystocomplete' => 2);
$courseobject->update_section_format_options($data);
// Backup and restore it.
$this->backup_and_restore($course);
$sectionoptions = $courseobject->get_format_options(1);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
$this->assertEquals(2, $sectionoptions['numdaystocomplete']);
}
/**
* Tests an import into the same subject successfully
* restores the options without error.
*/
public function test_course_format_options_import_myself() {
global $DB, $CFG;
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
$CFG->enablecompletion = true;
// Create a course with some availability data set.
$generator = $this->getDataGenerator();
$course = $generator->create_course(
array('format' => 'test_cs_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$courseobject = format_base::instance($course->id);
$section = $DB->get_record('course_sections',
array('course' => $course->id, 'section' => 1), '*', MUST_EXIST);
$data = array('id' => $section->id,
'numdaystocomplete' => 2);
$courseobject->update_section_format_options($data);
$this->backup_and_restore($course, $course);
$sectionoptions = $courseobject->get_format_options(1);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
$this->assertArrayNotHasKey('secondparameter', $sectionoptions);
$this->assertEquals(2, $sectionoptions['numdaystocomplete']);
}
/**
* Tests that all section options are copied when the course format is changed.
* None of the data is copied.
*
* It is a future enhancement to copy;
* 1. Only the relevant options.
* 2. Only the data associated with relevant options.
*/
public function test_course_format_options_restore_new_format() {
global $DB, $CFG;
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
$CFG->enablecompletion = true;
// Create a course with some availability data set.
$generator = $this->getDataGenerator();
$course = $generator->create_course(
array('format' => 'test_cs2_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$newcourse = $generator->create_course(
array('format' => 'test_cs_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$courseobject = format_base::instance($course->id);
$section = $DB->get_record('course_sections',
array('course' => $course->id, 'section' => 1), '*', MUST_EXIST);
$data = array('id' => $section->id,
'numdaystocomplete' => 2,
'secondparameter' => 8);
$courseobject->update_section_format_options($data);
// Backup and restore it.
$this->backup_and_restore($course, $newcourse);
$newcourseobject = format_base::instance($newcourse->id);
$sectionoptions = $newcourseobject->get_format_options(1);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
$this->assertArrayHasKey('secondparameter', $sectionoptions);
$this->assertEquals(0, $sectionoptions['numdaystocomplete']);
$this->assertEquals(0, $sectionoptions['secondparameter']);
}
/**
* Backs a course up and restores it.
*
* @param stdClass $srccourse Course object to backup
* @param stdClass $dstcourse Course object to restore into
* @return int ID of newly restored course
*/
protected function backup_and_restore($srccourse, $dstcourse = null) {
global $USER, $CFG;
// Turn off file logging, otherwise it can't delete the file (Windows).
$CFG->backup_file_logger_level = backup::LOG_NONE;
// Do backup with default settings. MODE_IMPORT means it will just
// create the directory and not zip it.
$bc = new backup_controller(backup::TYPE_1COURSE, $srccourse->id,
backup::FORMAT_MOODLE, backup::INTERACTIVE_NO, backup::MODE_IMPORT,
$USER->id);
$backupid = $bc->get_backupid();
$bc->execute_plan();
$bc->destroy();
// Do restore to new course with default settings.
if ($dstcourse !== null) {
$newcourseid = $dstcourse->id;
} else {
$newcourseid = restore_dbops::create_new_course(
$srccourse->fullname, $srccourse->shortname . '_2', $srccourse->category);
}
$rc = new restore_controller($backupid, $newcourseid,
backup::INTERACTIVE_NO, backup::MODE_GENERAL, $USER->id,
backup::TARGET_NEW_COURSE);
$this->assertTrue($rc->execute_precheck());
$rc->execute_plan();
$rc->destroy();
return $newcourseid;
}
}
/**
* Class format_test_cs_options
*
* Test course format that has 1 option.
*/
class format_test_cs_options extends format_topics {
public function section_format_options($foreditform = false) {
return array(
'numdaystocomplete' => array(
'type' => PARAM_INT,
'label' => 'Test days',
'element_type' => 'text',
'default' => 0,
),
);
}
}
/**
* Class format_test_cs2_options
*
* Test course format that has 2 options, 1 inherited.
*/
class format_test_cs2_options extends format_test_cs_options {
public function section_format_options($foreditform = false) {
return array(
'secondparameter' => array(
'type' => PARAM_INT,
'label' => 'Test Parmater',
'element_type' => 'text',
'default' => 0,
),
) + parent::section_format_options($foreditform);
}
}
@@ -66,7 +66,7 @@ abstract class backup_factory {
// Create database_logger, observing $CFG->backup_database_logger_level and defaulting to LOG_WARNING
// and pointing to the backup_logs table
$dllevel = isset($CFG->backup_database_logger_level) ? $CFG->backup_database_logger_level : backup::LOG_WARNING;
$dllevel = isset($CFG->backup_database_logger_level) ? $CFG->backup_database_logger_level : $dfltloglevel;
$columns = array('backupid' => $backupid);
$enabledloggers[] = new database_logger($dllevel, 'timecreated', 'loglevel', 'message', 'backup_logs', $columns);
@@ -11,7 +11,7 @@ Feature: Duplicate activities
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -34,6 +34,6 @@ Feature: Duplicate activities
| Name | Duplicated database name |
| Description | Duplicated database description |
And I press "Save and return to course"
Then I should see "Original database name" in the "#section-1" "css_element"
And I should see "Duplicated database name" in the "#section-1" "css_element"
Then I should see "Original database name" in the "Topic 1" "section"
And I should see "Duplicated database name" in the "Topic 1" "section"
And "Original database name" "link" should appear before "Duplicated database name" "link"
@@ -12,7 +12,7 @@ Feature: Import course's contents into another course
| Course 2 | C2 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -129,5 +129,5 @@ Feature: Restore Moodle 2 course backups
And section "3" should be hidden
And section "7" should be hidden
And section "15" should be visible
And I should see "Test URL name" in the "#section-3" "css_element"
And I should see "Test forum name" in the "#section-1" "css_element"
And I should see "Test URL name" in the "Topic 3" "section"
And I should see "Test forum name" in the "Topic 1" "section"
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -43,6 +42,22 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
protected $groupedpaths; // Paths we are requesting grouped
protected $currentdata; // Where we'll be acummulating data
// We create a array that stores each of the paths in a tree fashion
// like the filesystem. Each element stores all the child elements that are
// part of a full path that builds the grouped parent path we are storing.
// eg Array keys are stored as follows;
// root => a => b
// => b
// => c => d
// => e => f.
// Grouped paths here are; /a/b, /b, /c/d, /c/e/f.
// There are no nested parent paths, that is an enforced rule so
// we store an empty array to designate that the particular XML path element
// is in fact a grouped path.
// eg; $this->groupedparentprefixtree['a']['b'] = array();
/** @var array Search tree storing the grouped paths. */
protected $groupedparentprefixtree;
/**
* Keep cache of parent directory paths for XML parsing.
* @var array
@@ -78,6 +93,18 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
throw new progressive_parser_exception('xml_grouped_child_found', $a);
}
$this->groupedpaths[$path] = true;
// We check earlier in the function if there is a parent that is above the path
// to be added so we can be sure no parent exists in the tree.
$patharray = explode('/', $path);
$currentpos = &$this->groupedparentprefixtree;
foreach ($patharray as $item) {
if (!isset($currentpos[$item])) {
$currentpos[$item] = array();
}
// Update the current array position using a reference to allow in-place updates to the array.
$currentpos = &$currentpos[$item];
}
}
parent::add_path($path);
}
@@ -162,13 +189,29 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
* false if not
*/
protected function grouped_parent_exists($path) {
$parentpath = $this->get_parent_path($path);
while ($parentpath != '/') {
if ($this->path_is_grouped($parentpath)) {
return $parentpath;
// Search the tree structure to find out if one of the paths
// above the $path is a grouped path.
$patharray = explode('/', $this->get_parent_path($path));
$groupedpath = '';
$currentpos = &$this->groupedparentprefixtree;
foreach ($patharray as $item) {
// When the item isn't set in the array we know
// there is no parent grouped path.
if (!isset($currentpos[$item])) {
return false;
}
$parentpath = $this->get_parent_path($parentpath);
// When we aren't at the start of the path, continue to build
// a string representation of the path that is traversed. We will
// return the grouped path to the caller if we find one.
if ($item != '') {
$groupedpath .= '/'.$item;
}
if ($currentpos[$item] == array()) {
return $groupedpath;
}
$currentpos = &$currentpos[$item];
}
return false;
}
+1 -1
View File
@@ -49,7 +49,7 @@ $assertion = filter_input(
// Audience is the site url scheme + host + port only.
$wwwparts = parse_url($CFG->wwwroot);
$audience = $wwwparts['scheme'] . '://' . $wwwparts['host'];
$audience .= isset($wwwparts['port']) ? $wwwparts['port'] : '';
$audience .= isset($wwwparts['port']) ? ':' . $wwwparts['port'] : '';
$params = 'assertion=' . urlencode($assertion) . '&audience=' .
urlencode($audience);
+5 -6
View File
@@ -26,6 +26,7 @@
require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir . '/badgeslib.php');
require_once($CFG->libdir . '/filelib.php');
$id = required_param('hash', PARAM_ALPHANUM);
$bake = optional_param('bake', 0, PARAM_BOOL);
@@ -37,12 +38,10 @@ $badge = new issued_badge($id);
if ($bake && ($badge->recipient->id == $USER->id)) {
$name = str_replace(' ', '_', $badge->badgeclass['name']) . '.png';
ob_start();
$file = badges_bake($id, $badge->badgeid);
header('Content-Type: image/png');
header('Content-Disposition: attachment; filename="'. $name .'"');
readfile($file);
ob_flush();
$filehash = badges_bake($id, $badge->badgeid, $USER->id, true);
$fs = get_file_storage();
$file = $fs->get_file_by_hash($filehash);
send_stored_file($file, 0, 0, true, array('filename' => $name));
}
$PAGE->set_url('/badges/badge.php', array('hash' => $id));
+2 -2
View File
@@ -87,7 +87,7 @@ class award_criteria_activity extends award_criteria {
if (!$mod) {
$str = $OUTPUT->error_text(get_string('error:nosuchmod', 'badges'));
} else {
$str = html_writer::tag('b', '"' . ucfirst($mod->modname) . ' - ' . $mod->name . '"');
$str = html_writer::tag('b', '"' . get_string('modulename', $mod->modname) . ' - ' . $mod->name . '"');
if (isset($p['bydate'])) {
$str .= get_string('criteria_descr_bydate', 'badges', userdate($p['bydate'], get_string('strftimedate', 'core_langconfig')));
}
@@ -142,7 +142,7 @@ class award_criteria_activity extends award_criteria {
}
$param = array('id' => $mod->id,
'checked' => $checked,
'name' => ucfirst($mod->modname) . ' - ' . $mod->name,
'name' => get_string('modulename', $mod->modname) . ' - ' . $mod->name,
'error' => false
);
+1 -1
View File
@@ -164,7 +164,7 @@ class award_criteria_courseset extends award_criteria {
$param = array(
'id' => $course->id,
'checked' => true,
'name' => ucfirst(format_string($course->fullname, true, array('context' => $coursecontext))),
'name' => format_string($course->fullname, true, array('context' => $coursecontext)),
'error' => false
);
+8 -6
View File
@@ -59,13 +59,15 @@ class OpenBadgesBackpackHandler {
break;
}
$curl->setHeader(array('Accept: application/json', 'Expect:'));
$options = array(
'FRESH_CONNECT' => true,
'RETURNTRANSFER' => true,
'FORBID_REUSE' => true,
'HEADER' => 0,
'HTTPHEADER' => array('Expect:'),
'CONNECTTIMEOUT' => 3,
'FRESH_CONNECT' => true,
'RETURNTRANSFER' => true,
'FORBID_REUSE' => true,
'HEADER' => 0,
'CONNECTTIMEOUT' => 3,
// Follow redirects with the same type of request when sent 301, or 302 redirects.
'CURLOPT_POSTREDIR' => 3
);
if ($action == 'user') {
+5 -8
View File
@@ -26,6 +26,7 @@
require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir . '/badgeslib.php');
require_once($CFG->libdir . '/filelib.php');
$page = optional_param('page', 0, PARAM_INT);
$search = optional_param('search', '', PARAM_CLEAN);
@@ -71,17 +72,13 @@ if ($hide) {
require_sesskey();
$badge = new badge($download);
$name = str_replace(' ', '_', $badge->name) . '.png';
ob_start();
$file = badges_bake($hash, $download);
header('Content-Type: image/png');
header('Content-Disposition: attachment; filename="'. $name .'"');
readfile($file);
ob_flush();
$filehash = badges_bake($hash, $download, $USER->id, true);
$fs = get_file_storage();
$file = $fs->get_file_by_hash($filehash);
send_stored_file($file, 0, 0, true, array('filename' => $name));
} else if ($downloadall) {
require_sesskey();
ob_start();
badges_download($USER->id);
ob_flush();
}
$context = context_user::instance($USER->id);
+3 -1
View File
@@ -61,6 +61,8 @@ $PAGE->set_heading($badge->name);
$PAGE->set_title($badge->name);
$PAGE->navbar->add($badge->name);
require_capability('moodle/badges:viewbadges', $context);
echo $OUTPUT->header();
echo $OUTPUT->heading(print_badge_image($badge, $context, 'small') . ' ' . $badge->name);
@@ -75,4 +77,4 @@ echo $output->print_badge_status_box($badge);
$output->print_badge_tabs($badgeid, $context, 'overview');
echo $output->print_badge_overview($badge, $context);
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+3 -3
View File
@@ -14,10 +14,10 @@ Feature: Add badges to the system
And I expand "Badges" node
And I follow "Badges settings"
And I set the field "Default badge issuer name" to "Test Badge Site"
And I set the field "Default badge issuer contact details" to "testuser@test-badge-site.com"
And I set the field "Default badge issuer contact details" to "testuser@example.com"
And I press "Save changes"
When I follow "Add a new badge"
Then the field "issuercontact" matches value "testuser@test-badge-site.com"
Then the field "issuercontact" matches value "testuser@example.com"
And the field "issuername" matches value "Test Badge Site"
@javascript
@@ -35,7 +35,7 @@ Feature: Add badges to the system
| Name | Test Badge |
| Description | Test badge description |
| issuername | Test Badge Site |
| issuercontact | testuser@test-badge-site.com |
| issuercontact | testuser@example.com |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
When I press "Create badge"
Then I should see "Edit details"
+20 -26
View File
@@ -12,7 +12,7 @@ Feature: Award badges
| Name | Profile Badge |
| Description | Test badge description |
| issuername | Test Badge Site |
| issuercontact | testuser@test-badge-site.com |
| issuercontact | testuser@example.com |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
And I press "Create badge"
And I set the field "type" to "Profile completion"
@@ -39,8 +39,8 @@ Feature: Award badges
Scenario: Award site badge
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher | teacher | 1 | teacher1@asd.com |
| student | student | 1 | student1@asd.com |
| teacher | teacher | 1 | teacher1@example.com |
| student | student | 1 | student1@example.com |
And I log in as "admin"
And I navigate to "Add a new badge" node in "Site administration > Badges"
And I set the following fields to these values:
@@ -56,9 +56,9 @@ Feature: Award badges
And I press "Continue"
And I follow "Recipients (0)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "teacher 1 (teacher1@asd.com)"
And I set the field "potentialrecipients[]" to "teacher 1 (teacher1@example.com)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "student 1 (student1@asd.com)"
And I set the field "potentialrecipients[]" to "student 1 (student1@example.com)"
And I press "Award badge"
When I follow "Site Badge"
Then I should see "Recipients (2)"
@@ -72,9 +72,9 @@ Feature: Award badges
Scenario: Award course badge
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
@@ -100,9 +100,9 @@ Feature: Award badges
And I press "Continue"
And I follow "Recipients (0)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 2 (student2@asd.com)"
And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 1 (student1@asd.com)"
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
When I press "Award badge"
And I follow "Course Badge"
Then I should see "Recipients (2)"
@@ -120,16 +120,15 @@ Feature: Award badges
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I follow "Home"
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I set the following fields to these values:
@@ -139,8 +138,6 @@ Feature: Award badges
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "//span[text()='Badges']" "xpath_element" in the "Administration" "block"
And I follow "Add a new badge"
@@ -175,16 +172,15 @@ Feature: Award badges
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I follow "Home"
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I set the following fields to these values:
@@ -200,8 +196,6 @@ Feature: Award badges
And I click on "Condition: Activity completion" "link"
And I set the field "Assign - Test assignment name" to "1"
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "//span[text()='Badges']" "xpath_element" in the "Administration" "block"
And I follow "Add a new badge"
+3 -1
View File
@@ -75,6 +75,8 @@ if ($type == BADGE_TYPE_SITE) {
$PAGE->set_heading($title);
}
require_capability('moodle/badges:viewbadges', $PAGE->context);
$PAGE->set_title($title);
$output = $PAGE->get_renderer('core', 'badges');
@@ -103,4 +105,4 @@ if ($totalcount) {
echo $output->notification(get_string('nobadges', 'badges'));
}
echo $output->footer();
echo $output->footer();
@@ -10,8 +10,8 @@ Feature: Add a comment to the comments block
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -11,8 +11,8 @@ Feature: Delete comment block messages
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | First | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -25,7 +25,7 @@
$string['activityoverview'] = 'You have {$a}s that need attention';
$string['alwaysshowall'] = 'Always show all';
$string['collapseall'] = 'Collapse all course lists';
$string['configotherexpanded'] = 'If enabled, other courses will be expanded by default unless overriden by user preferences.';
$string['configotherexpanded'] = 'If enabled, other courses will be expanded by default unless overridden by user preferences.';
$string['configpreservestates'] = 'If enabled, the collapsed/expanded states set by the user are stored and used on each load.';
$string['course_overview:addinstance'] = 'Add a new course overview block';
$string['course_overview:myaddinstance'] = 'Add a new course overview block to My home';
@@ -10,8 +10,8 @@ Feature: Course summary block used in a course
| Course 1 | C101 | Proved the course summary block works! |0 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@asd.com |
| teacher1 | Teacher | One | teacher1@asd.com |
| student1 | Sam | Student | student1@example.com |
| teacher1 | Teacher | One | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C101 | student |
@@ -10,8 +10,8 @@ Feature: Random glossary entry block is used in a course
| Course 1 | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@test.com |
| teacher1 | Terry1 | Teacher1 | teacher1@test.com |
| student1 | Sam1 | Student1 | student1@example.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
+2 -2
View File
@@ -7,8 +7,8 @@ Feature: HTML blocks in a course
Scenario: Adding HTML block in a course
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher@asd.com |
| student1 | Sam1 | Student1 | student1@asd.com |
| teacher1 | Terry1 | Teacher1 | teacher@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
+1 -1
View File
@@ -7,7 +7,7 @@ Feature: Login from a block
Background:
Given the following "users" exist:
| username | password | firstname | lastname | email |
| testuser | testpass | Test | User | student1@asd.com |
| testuser | testpass | Test | User | student1@example.com |
And I log in as "admin"
And I navigate to "Turn editing on" node in "Front page settings"
And I add the "Login" block
+15 -3
View File
@@ -584,9 +584,21 @@ class block_base {
&& $page->context->contextlevel == CONTEXT_USER // Page belongs to a user
&& $page->context->instanceid == $USER->id // Page belongs to this user
&& $page->pagetype == 'my-index') { // Ensure we are on the My Moodle page
$capability = 'block/' . $this->name() . ':myaddinstance';
return $this->has_add_block_capability($page, $capability)
&& has_capability('moodle/my:manageblocks', $page->context);
// If the block cannot be displayed on /my it is ok if the myaddinstance capability is not defined.
$formats = $this->applicable_formats();
// Is 'my' explicitly forbidden?
// If 'all' has not been allowed, has 'my' been explicitly allowed?
if ((isset($formats['my']) && $formats['my'] == false)
|| (empty($formats['all']) && empty($formats['my']))) {
// Block cannot be added to /my regardless of capabilities.
return false;
} else {
$capability = 'block/' . $this->name() . ':myaddinstance';
return $this->has_add_block_capability($page, $capability)
&& has_capability('moodle/my:manageblocks', $page->context);
}
}
$capability = 'block/' . $this->name() . ':addinstance';
@@ -7,8 +7,8 @@ Feature: Expand the courses nodes within the navigation block
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@local.host |
| student1 | Student | 1 | student1@local.host |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist:
| name | category | idnumber | visible |
| cat1 | 0 | cat1 | 1 |
@@ -187,4 +187,4 @@ Feature: Expand the courses nodes within the navigation block
And navigation node "c1" should not be expandable
And navigation node "c2" should be expandable
And navigation node "c3" should not be expandable
And navigation node "c4" should not be expandable
And navigation node "c4" should not be expandable
@@ -7,7 +7,7 @@ Feature: View my courses in navigation block
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist:
| name | category | idnumber |
| cat1 | 0 | cat1 |
@@ -29,13 +29,11 @@ Feature: View my courses in navigation block
| student1 | c1 | student |
| student1 | c31 | student |
| student1 | c331 | student |
And I log in as "admin"
@javascript
Scenario: The plain list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 0 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 0 |
And I log in as "student1"
When I follow "My home"
Then I should not see "cat1" in the "Navigation" "block"
@@ -49,9 +47,8 @@ Feature: View my courses in navigation block
@javascript
Scenario: The nested list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 1 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 1 |
And I log in as "student1"
When I follow "My home"
Then I should see "cat1" in the "Navigation" "block"
@@ -69,10 +66,9 @@ Feature: View my courses in navigation block
@javascript
Scenario: I can expand categories and courses as guest
Given I set the following administration settings values:
| Show my course categories | 1 |
| Show all courses | 1 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 1 |
| navshowallcourses | 1 |
And I expand "Courses" node
And I should see "cat1" in the "Navigation" "block"
And I should see "cat2" in the "Navigation" "block"
@@ -8,7 +8,7 @@ Feature: Latest news block displays the course latest news
Scenario: Latest course news are displayed and can be configured
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And I log in as "admin"
And I create a course with:
| Course full name | Course 1 |
@@ -10,7 +10,7 @@ Feature: People Block used in a course
| Course 1 | C101 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@asd.com |
| student1 | Sam | Student | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C101 | student |
@@ -7,7 +7,7 @@ Feature: People Block used on frontpage
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@asd.com |
| student1 | Sam | Student | student1@example.com |
And I log in as "admin"
And I navigate to "Turn editing on" node in "Front page settings"
And I add the "People" block
@@ -40,7 +40,7 @@ $string['config_show_best'] = 'How many of the highest grades should be shown (0
$string['config_show_worst'] = 'How many of the lowest grades should be shown (0 to disable)?';
$string['configuredtoshownothing'] = 'This block\'s configuration currently does not allow it to show any results. You may want to either configure it or hide it.';
$string['config_use_groups'] = 'Show groups instead of students (only if the quiz supports groups)?';
$string['error_emptyquizid'] = 'There is an error right now with this block: you need to select which quiz it should display results from.';
$string['error_emptyquizid'] = 'Please configure this block and select which quiz it should display results from.';
$string['error_emptyquizrecord'] = 'There is an error right now with this block: the selected quiz does not seem to exist in the database.';
$string['error_nogroupsexist'] = 'There is an error right now with this block: it is set to display grades in group mode, but the course has no defined groups.';
$string['pluginname'] = 'Quiz results';
@@ -10,11 +10,11 @@ Feature: View structural changes in recent activity block
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@asd.com |
| assistant1 | Terry2 | Teacher2 | teacher2@asd.com |
| student1 | Sam1 | Student1 | student1@asd.com |
| student2 | Sam2 | Student2 | student2@asd.com |
| student3 | Sam3 | Student3 | student3@asd.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
| assistant1 | Terry2 | Teacher2 | teacher2@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| student3 | Sam3 | Student3 | student3@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -46,10 +46,8 @@ Feature: View structural changes in recent activity block
| GG3 | G2 |
Scenario: Check that Added module information is displayed respecting view capability
Given I log in as "admin"
And I set the following administration settings values:
| Enable group members only | 1 |
And I log out
Given the following config values are set as admin:
| enablegroupmembersonly | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
+2 -2
View File
@@ -7,8 +7,8 @@ Feature: Add blocks
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
@@ -10,7 +10,7 @@ Feature: Add and configure blocks throughout the site
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@asd.com |
| manager1 | Manager | 1 | manager1@example.com |
And the following "system role assigns" exist:
| user | course | role |
| manager1 | Acceptance test site | manager |
@@ -36,7 +36,7 @@ Feature: Add and configure blocks throughout the site
Scenario: My home does not allow assignation of roles on blocks
Given the following "users" exist:
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@asd.com |
| manager1 | Manager | 1 | manager1@example.com |
And I log in as "manager1"
And I click on "My home" "link" in the "Navigation" "block"
When I press "Customise this page"
@@ -56,3 +56,16 @@ Feature: Add and configure blocks throughout the site
And I follow "Course 1"
And I follow "Turn editing on"
Then I should see "Assign roles in Search forums block"
@javascript
Scenario: Blocks can safely be customised
Given I log in as "admin"
And I click on "My home" "link" in the "Navigation" "block"
And I press "Customise this page"
And I add the "HTML" block
And I configure the "(new HTML block)" block
And I set the following fields to these values:
| Block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt="
| Content | Example
When I press "Save changes"
Then I should see "Course overview"
@@ -0,0 +1,49 @@
@core @core_block
Feature: Show hidden blocks in a docked block region when editing
In order to edit blocks in a hidden region
As a teacher
I need to be able to see the blocks when editing is on
Background:
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| admin | C1 | editingteacher |
And I log in as "admin"
And I follow "Course 1"
And I turn editing mode on
# Hide all the blocks in the non-default region
And I configure the "Search forums" block
And I set the following fields to these values:
| Visible | No |
And I click on "Save changes" "button"
And I configure the "Latest news" block
And I set the following fields to these values:
| Visible | No |
And I click on "Save changes" "button"
And I configure the "Upcoming events" block
And I set the following fields to these values:
| Visible | No |
And I click on "Save changes" "button"
And I configure the "Recent activity" block
And I set the following fields to these values:
| Visible | No |
When I click on "Save changes" "button"
# Editing is on so they should be visible
Then I should see "Search forums"
And I should see "Latest news"
And I should see "Upcoming events"
And I should see "Recent activity"
And I turn editing mode off
# Editing is off, so they should no longer be visible
And I should not see "Search forums"
And I should not see "Latest news"
And I should not see "Upcoming events"
And I should not see "Recent activity"
@javascript
Scenario: Check that a region with only hidden blocks is not docked in editing mode (javascript enabled)
Scenario: Check that a region with only hidden blocks is not docked in editing mode (javascript disabled)
+28
View File
@@ -0,0 +1,28 @@
@core @core_block
Feature: Block visibility
In order to configure blocks visibility
As a teacher
I need to show and hide blocks on a page
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I am on homepage
And I follow "Course 1"
And I follow "Turn editing on"
@javascript
Scenario: Hiding all blocks on the page should remove the column they're in
Given I open the "Search forums" blocks action menu
And I click on "Hide Search forums block" "link" in the "Search forums" "block"
And I open the "Latest news" blocks action menu
And I click on "Hide Latest news block" "link" in the "Latest news" "block"
And I open the "Upcoming events" blocks action menu
And I click on "Hide Upcoming events block" "link" in the "Upcoming events" "block"
And I open the "Recent activity" blocks action menu
When I click on "Hide Recent activity block" "link" in the "Recent activity" "block"
Then ".empty-region-side-post" "css_element" should not exist in the "body" "css_element"
And I follow "Turn editing off"
And ".empty-region-side-post" "css_element" should exist in the "body" "css_element"

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