Compare commits

...

955 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 6926971a0f Moodle release 2.7.4 2015-01-10 13:12:47 +01:00
AMOS bot cddf2faa78 Automatically generated installer lang files 2015-01-09 00:04:17 +08:00
Dan Poltawski 3caea827cc weekly release 2.7.3+ 2015-01-08 10:00:23 +00:00
Dan Poltawski fb0cdc6b3c Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-01-08 10:00:22 +00:00
Eloy Lafuente (stronk7) 3ce5c34735 Merge branch 'MDL-37584-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2015-01-08 00:46:49 +01:00
Eloy Lafuente (stronk7) 6f1cd6d47d Merge branch '37680-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2015-01-08 00:41:03 +01:00
Zachary Durber 25191bc311 MDL-48546 filters: Split on all tags for multimedia filter check. 2015-01-07 18:57:05 +01:00
Eloy Lafuente (stronk7) b5e6324f77 Merge branch 'MDL-48748-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2015-01-07 17:24:29 +01:00
AMOS bot afff26bbe1 Automatically generated installer lang files 2015-01-08 00:04:01 +08:00
David Monllao 3c8d8865a8 Merge branch 'MDL-48069-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-01-07 14:47:01 +08:00
Mark Nelson 91484edf1b MDL-46498 mod_assign: fixed failing behat test due to GS 2015-01-07 13:30:20 +08:00
Zachary Durber 70229b7ec7 MDL-48546 filters: ReDoS protection for multimedia links. 2015-01-07 12:27:13 +08:00
Andrew Nicols d160027694 Merge branch 'MDL-45930-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-01-07 12:14:49 +08:00
David Monllao 5d39accc72 Merge branch 'MDL-48549_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-01-07 09:40:40 +08:00
Eloy Lafuente (stronk7) db3646757a Merge branch 'MDL-32088-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-01-07 02:12:06 +01:00
David Monllao d17d0095ef Merge branch 'MDL-48697-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2015-01-07 09:08:04 +08:00
Helen Foster bdc83459f7 MDL-48748 lang: Merge English strings from the en_fix language pack 2015-01-06 22:01:57 +01:00
Dan Poltawski 7e025d62a0 Merge branch 'MDL-44393-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2015-01-06 12:21:05 +00:00
Dan Poltawski 2a247d8363 Merge branch 'MDL-46015_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-01-06 12:04:10 +00:00
Dan Poltawski adfda6b19f Merge branch 'MDL-48372-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2015-01-06 11:24:31 +00:00
Dan Poltawski d532fa77e3 Merge branch 'MDL-48442-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2015-01-06 11:19:39 +00:00
Dan Poltawski ec82925fb5 Merge branch 'MDL-48534_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-01-06 11:11:47 +00:00
Dan Poltawski b21d1db3c3 Merge branch 'MDL-48655-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-01-06 11:09:44 +00:00
Simey Lameze b82b4c562b MDL-47964 auth_shibboleth: Fix DOS on the shibboleth logout 2015-01-06 11:05:30 +00:00
Marco Rougeth c06e97f7f6 MDL-48640 report_configchanges: Remove duplicated code 2015-01-06 15:53:31 +08:00
David Monllao b665aebe00 Merge branch 'MDL-38222_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-01-06 12:27:34 +08:00
Andrew Nicols 39e53d30ac Merge branch 'MDL-48707_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-01-06 11:54:25 +08:00
Andrew Nicols c22c31c5c7 Merge branch '28067-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2015-01-06 10:54:39 +08:00
Andrew Nicols 53b91996aa MDL-20304 lesson: Remove Description from behat tests
The description field was added to mod_lesson in Moodle 2.8
2015-01-06 10:38:23 +08:00
Andrew Nicols b0de178292 MDL-20304 lesson: Uncomment tests following MDL-48631 2015-01-06 10:38:22 +08:00
Andrew Nicols 16e8cdf026 Merge branch 'MDL-20304-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-01-06 10:38:16 +08:00
David Monllao 0416e372ba Merge branch 'MDL-35078-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-01-06 10:34:37 +08:00
David Monllao ca00192a66 Merge branch 'MDL-48631_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-01-06 09:09:56 +08:00
Dan Poltawski c33c15f3cc Merge branch 'MDL-48441_profile_guest_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-01-05 18:30:21 +00:00
Dan Poltawski bf4dcc4518 Merge branch 'MDL-46498_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-01-05 17:48:41 +00:00
Andrew Nicols d569c47219 MDL-48104 mod_assign: Strip out use of eval() for string parsing
I've also replaced other  occurrences of M.str with the correct use of
M.util.get_string() instead.
2015-01-05 17:33:52 +00:00
Dan Poltawski 69d0012088 Merge branch 'MDL-43679-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-01-05 15:49:28 +00:00
Simey Lameze cdb4e29e57 MDL-48017 core_calendar: add context validation to get_calendar_events 2015-01-05 14:13:49 +00:00
Andrew Nicols c4250ef4f2 MDL-48106 mod_glossary: Add missing sesskey checks 2015-01-05 13:38:05 +00:00
David Monllao 051f3e4db7 MDL-48329 core_message: Checking that messaging system is enabled 2015-01-05 13:14:07 +00:00
Simey Lameze 7a15c996eb MDL-48368 course: fix xss on course request pending page 2015-01-05 12:58:58 +00:00
Jetha Chan fc6619d5c0 MDL-47920 mod_lti: add capability checks, http headers 2015-01-05 12:50:15 +00:00
Andrew Nicols 7f722404af Merge branch 'MDL-42519_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-01-05 16:18:46 +08:00
Andrew Nicols 0b3ae20700 Merge branch 'MDL-48644_restoreLegacyLogs27' of https://github.com/moodlerooms/moodle into MOODLE_27_STABLE 2015-01-05 14:33:04 +08:00
Andrew Nicols d4b5a097a2 Merge branch 'MDL-46183-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-01-05 13:58:45 +08:00
Andrew Nicols 5a7eccbb65 Merge branch 'wip-MDL-40097-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2015-01-05 13:42:06 +08:00
Aaron Barnes 77fd878edb MDL-40097 completion: Apply robust role detection to samesite restores. 2015-01-05 10:38:24 +08:00
Adrian Greeve 9ad864a97c MDL-40097 completion: Update of code to meet guidlines. 2015-01-05 10:38:14 +08:00
Aaron Barnes 43ed7bfd0f MDL-40097 completion: Make restoring grade criteria more robust 2015-01-05 10:38:01 +08:00
Ankit Agarwal 4ccf2a872c MDL-48442 tasks: Make sure first run is as per schedule 2015-01-02 14:54:54 +05:30
Frederic Massart 2c6b80f400 MDL-48069 files: Switch the field order of index on mdl_files_reference
To improve performance of file_storage::search_references
2015-01-02 17:19:20 +08:00
Ankit Agarwal 36d4f2016a MDL-44393 tasks: Add unit tests for cron field validations 2015-01-02 11:02:47 +05:30
Ankit Agarwal a6bd69bb6e MDL-44393 tasks: Validate cron fields 2015-01-02 11:02:47 +05:30
Ankit Agarwal fd38ccef83 MDL-48372 mod_data: Add http to urls without it during import 2015-01-02 10:47:08 +05:30
Frederic Massart 848e0ced2d MDL-43679 core: Handle Meridio user agents with MS Word 2015-01-02 11:23:40 +08:00
Frederic Massart 0bbddb0a9a MDL-43679 core: Never use HTTP redirect when the user agent is MS Word 2015-01-02 11:23:40 +08:00
Paul Nicholls 55f193d531 MDL-43679 core_useragent: add test cases for MS Word
The new is_msword() check should always return false for regular browsers.
It should return true for known MS Word, but false for known MS Outlook.
2015-01-02 11:23:40 +08:00
Paul Nicholls 762f716834 MDL-43679 core_useragent: add basic MS Word detection
Basic detection for MS Word's internal link checker.  This is not perfect,
as older versions use IE6/7 user agent string with no identifying marks,
and newer versions don't necessarily identify themselves as Word (just as
Office).  Version information is not reliably available, even when there
is sufficient other information to identify it as Word's link checker.
This is also based on a small sample of Word / OS version pairings, so
there may be some which are identifiable but not currently covered.
2015-01-02 11:23:40 +08:00
Ankit Agarwal b61a836f50 MDL-37584 tasks: Use a senisible maximum time window for the task 2014-12-31 14:02:46 +05:30
Dan Poltawski 52e3faa7d4 MDL-45930 filemanager: Don't display filesize when unknown
Thanks to Marina Glancy for the patch

Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-12-30 14:23:21 +00:00
Vishal Raheja 7d0a054ae7 MDL-32088 user: Correct the Moodle docs link
This patch links the moodle docs link to user profile Moodle doc when
the user sees the user profile for a particular course. The page is set
to course view type to load course specific blocks. So, we use
set_docs_path to change the Moodle docs link instead of changing the
pagetype.
2014-12-30 13:47:53 +00:00
Mark Nielsen a4bdf85e8a MDL-48644 backup tool_log: Fixing coding style
Wrap long function definition
to next line.
2014-12-29 11:27:04 -08:00
Dan Poltawski c5edcb73af MDL-43198 folder: respect ignorefilesizelimits permission
Thanks to Miryan Salas for the patch.
2014-12-29 12:13:27 +00:00
Jean-Michel Vedrine 6e6a2c73ee MDL-48631 mod_lesson: tables 'grade' item have incorrect precision
Conflicts:
	mod/lesson/db/upgrade.php
	mod/lesson/version.php
2014-12-29 11:01:41 +01:00
Eugene Venter 5dca125113 MDL-46015 lesson: Optimise report - use recordsets
Change-Id: I61f3ed30c6dbd8f88d1dfb1adfe2fc291853e0e1
2014-12-28 11:12:48 +01:00
AMOS bot 5b6ba3d90e Automatically generated installer lang files 2014-12-28 00:04:18 +08:00
Mark Nelson de17153b4c MDL-48549 mod_assign: added upgrade to clean the tables 2014-12-26 18:58:22 -08:00
Mark Nelson 935c6a5539 MDL-48549 mod_assign: delete entries from the flags/mapping tables 2014-12-26 18:57:31 -08:00
Mark Nelson 7eeca30cef MDL-46498 mod_assign: added behat tests 2014-12-26 17:51:10 -08:00
Mark Nelson 383a8dfb04 MDL-46498 mod_assign: display correct grading status 2014-12-26 17:24:24 -08:00
Jean-Michel Vedrine cd01a8ab42 MDL-48707 mod_lesson: ignore plugins question types during import 2014-12-26 08:30:34 +01:00
Jean-Michel Vedrine 6682e3f745 MDL-38222 mod_lesson: Error in Lesson Cluster for Unseen Questions 2014-12-25 21:17:50 +01:00
Dan Poltawski 56624fa968 weekly release 2.7.3+ 2014-12-24 13:22:25 +00:00
Dan Poltawski 31f819b272 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-12-24 13:22:23 +00:00
Mark Nelson 9caa4c6005 MDL-48534 mod_assign: display correct workflow state and marker 2014-12-23 22:58:37 -08:00
Ankit Agarwal 439c3fd59a MDL-48697 libraries: Use proper path for core_completion 2014-12-24 08:13:18 +05:30
Dan Poltawski 75e0e92397 MDL-20304 lesson: add behat test for practice lessons 2014-12-23 17:04:43 +00:00
Dan Poltawski 708b1070d5 MDL-20304 lesson: do not display gradebook link when in practice mode
Practice mode means the grades do not go to the gradebook, so do not
display the gradebook link at the end of the lesson
2014-12-23 17:04:43 +00:00
Atanas Atanasov fb374e61d4 MDL-20304 lesson: do not send practice lesson grades to gradebook 2014-12-23 17:04:42 +00:00
Dan Poltawski 1dca0feabd Merge branch 'MDL-48213-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE 2014-12-23 16:13:37 +00:00
AMOS bot 9e4a7f1edd Automatically generated installer lang files 2014-12-24 00:04:17 +08:00
Dan Poltawski 0e045c4c20 Revert "Merge branch 'MDL-48534_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE"
This reverts commit 8bdafc9460, reversing
changes made to dc94f80ec7.
2014-12-23 10:46:23 +00:00
Dan Poltawski 72ce39de7c Revert "Merge branch 'MDL-48591_m27' of https://github.com/jrchamp/moodle into MOODLE_27_STABLE"
This reverts commit 1d8e6ecebe, reversing
changes made to 6a2cd3d21d.
2014-12-23 10:43:25 +00:00
Frederic Massart 8ef45d82f9 MDL-46183 theme_more: Background is seen through the activity chooser 2014-12-23 17:16:42 +08:00
Eloy Lafuente (stronk7) d8283bf54f MDL-48410 quiz behat: add missing CFG global or editlib stuff will fail 2014-12-23 02:35:40 +01:00
Tim Hunt 2b982b0a66 MDL-42519 qformat_xml: Correctly export questions containing ]]> 2014-12-22 19:47:43 +00:00
Eloy Lafuente (stronk7) 96c4315931 Merge branch 'MDL-48639_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-22 19:10:01 +01:00
Dan Poltawski d1da638540 Merge branch 'MDL27-48421' of https://github.com/timpricecatalyst/moodle into MOODLE_27_STABLE 2014-12-22 17:01:11 +00:00
Dan Poltawski f38da6c2e0 MDL-48638 course: update unit test to new message 2014-12-22 16:25:55 +00:00
Dan Poltawski 060cec7391 Merge branch 'MDL-48638-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-12-22 15:28:57 +00:00
Dan Poltawski 7c167e5d7d MDL-43004 blog: fix upgrade.txt typo 2014-12-22 15:14:09 +00:00
Dan Poltawski c8f22b65e7 Merge branch 'MDL-48062-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE 2014-12-22 14:34:57 +00:00
Brian Barnes 83906584e2 MDL-48423 messages: improved accessibility of contacts list 2014-12-22 14:16:44 +00:00
Dan Poltawski 9549cd267e Merge branch 'MDL-48224-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-12-22 14:04:29 +00:00
Josh Marshall b54980affd MDL-48445 report_loguser: Include logstore parameter for pagination 2014-12-22 13:57:04 +00:00
Dan Poltawski 8bdafc9460 Merge branch 'MDL-48534_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-12-22 13:52:44 +00:00
Dan Poltawski dc94f80ec7 Merge branch 'm27_MDL-48483' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-12-22 13:44:33 +00:00
Dan Poltawski 2e83315def Merge branch 'MDL-48580-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-12-22 13:41:15 +00:00
Dan Poltawski 1d8e6ecebe Merge branch 'MDL-48591_m27' of https://github.com/jrchamp/moodle into MOODLE_27_STABLE 2014-12-22 13:38:04 +00:00
Dan Poltawski 6a2cd3d21d MDL-48653 behat: fix incorrect phpdoc 2014-12-22 13:13:55 +00:00
Dan Poltawski a163de2fa8 Merge branch 'MDL-48653_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-22 13:10:48 +00:00
Dan Poltawski 9752358c50 Merge branch 'MDL-48088-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-12-22 13:07:48 +00:00
Dan Poltawski cd56eaff2e Merge branch 'MDL-48666_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-22 12:10:22 +00:00
Andrew Davis cc2bfc4cb3 MDL-48441 core_user: profile.php, view.php now handle guests the same 2014-12-22 10:02:43 +01:00
AMOS bot 1050a21a32 Automatically generated installer lang files 2014-12-22 00:04:12 +08:00
AMOS bot 734724bec2 Automatically generated installer lang files 2014-12-20 00:04:16 +08:00
Tim Hunt a0ecc72e1c MDL-48666 quiz: let JS to get a Qs slot number on the summary page 2014-12-19 14:39:43 +00:00
Tim Hunt 47f7c656ba MDL-48639 behat upload: support absolute paths & better errors
In a custom step I needed to be able to upload a file I had previously
saved to $CFG->dataroot/temp, but that was not possible.

Also, the failure was not at all obvious. I have made it throw a clear
exception if the file you are trying to upload does not exist.
2014-12-19 12:00:20 +00:00
Brian Barnes aa74912351 MDL-48483 admin: attached color label to input control 2014-12-19 14:09:42 +13:00
Daniel Thies 931317eba9 MDL-48062 atto_image: Add image select on single click 2014-12-18 18:33:11 -06:00
Daniel Thies f69e7f2263 MDL-48213 filter_algebra,filter_tex: Require sesskey for debug actions 2014-12-18 16:38:19 -06:00
Tim Price 297a18d3e9 MDL-48421 navigation: accounting for potential regression 2014-12-19 09:17:56 +11:00
Tim Price 3a20c85849 MDL-48421 navigation: correctly load child categories if parent is loaded 2014-12-19 09:17:55 +11:00
Eric Merrill ab391cddf0 MDL-48655 gradebook: Don't treat a scale with a gradepass of 0 as passed 2014-12-18 16:18:40 -05:00
Mark Nielsen 1463260443 MDL-48644 backup: Preserve log IP and time during restore 2014-12-18 11:38:22 -08:00
Tim Hunt 0cb5521993 MDL-48653 behat: Steps to click and dismiss a dialogue.
We already had the corresponding
    I click on "Home" "link" confirming the dialogue
but I needed the opposite
    I click on "Home" "link" dismissing the dialogue
2014-12-18 19:31:17 +00:00
Eric Merrill 7b306524e2 MDL-48638 database SQL: Fix typo in exception constructor 2014-12-18 13:34:23 -05:00
jrchamp a8b326b554 MDL-48591 calendar: Mini Cal Display DST Events 2014-12-18 09:27:41 -05:00
Dan Poltawski 7e58ab50a4 weekly release 2.7.3+ 2014-12-18 11:25:04 +00:00
Dan Poltawski 91b95c8724 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-12-18 11:25:02 +00:00
Mark Nelson e9c069bec4 MDL-45324 mod_assign: always notify students when requested 2014-12-18 14:09:56 +08:00
Mark Nelson 4909617ad2 MDL-48534 mod_assign: display correct workflow state and marker 2014-12-17 20:43:29 -08:00
David Monllao aa2592e659 Merge branch 'MDL-48235-27-fixes' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-12-18 12:37:20 +08:00
Zachary Durber bc11b05907 MDL-47442 mod_assign: Notify student when quick-grading grade 2014-12-18 12:16:33 +08:00
Marina Glancy 951e70ff57 MDL-48452 Completion: js correction to behat test 2014-12-18 11:29:59 +08:00
John Okely f6c54bfbd3 MDL-48235 mod_assign: Fix grade of 0 not showing on feedback page in oracle 2014-12-18 10:25:40 +08:00
Wiktor Wandachowicz c326563453 MDL-35078 enrol: allow times to be chose on bulk enrolment forms
Previously only a date was available, which made it ambigious whether
the the enrolment was inclusive of the date. Now we use a time to make
it less ambigious.

This matches changes done in other forms in MDL-41173.
2014-12-17 12:02:43 +00:00
Dan Poltawski bc79a75d50 Merge branch 'MDL-44829_MOODLE_27_STABLE' of git://github.com/BenKelada/moodle into MOODLE_27_STABLE 2014-12-17 10:11:44 +00:00
BKelada 40287b3c30 MDL-44829 libraries: Update android user agent detection 2014-12-17 16:38:10 +11:00
David Monllao 84e88c74af Merge branch 'MDL-48243_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE 2014-12-17 11:50:36 +08:00
Dan Poltawski 8ea9052ae2 Merge branch 'MDL-43462_landscape_pdf_27' of git://github.com/davosmith/moodle into MOODLE_27_STABLE 2014-12-16 19:20:25 +00:00
Dan Poltawski 589d9bbeff Merge branch 'MDL-42501-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-12-16 19:18:09 +00:00
Eloy Lafuente (stronk7) 4968840724 Merge branch 'MDL-48452-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-12-16 18:52:40 +01:00
sam marshall f2830925e5 MDL-48452 Completion: Expected date doesn't save when form is locked
The completion fields are locked when a user has already completed the
task, to prevent you accidentally causing it to recalculate the data.

This lock doesn't apply to the expected date field, as this doesn't
affect user completion. However, changes to the field in this
situation were incorrectly not saved.
2014-12-16 17:32:19 +00:00
Dan Poltawski 3502a07c88 Merge branch 'MDL-48587-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-12-16 17:05:08 +00:00
Eloy Lafuente (stronk7) e2548c1d2d Merge branch 'm27_MDL-48532' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-12-16 15:47:44 +01:00
Dan Poltawski 534fae49b1 Merge branch 'MDL-46442-27' of git://github.com/zbdd/moodle into MOODLE_27_STABLE 2014-12-16 13:54:15 +00:00
Dan Poltawski b6d40f849a Merge branch 'MDL-46651-MOODLE_27_STABLE-restore-course-completion-duplicate-key' of https://github.com/Trii/moodle into MOODLE_27_STABLE 2014-12-16 11:58:40 +00:00
Davo Smith fc4da5659e MDL-43462 assignfeedback_editpdf: fix display of landscape PDFs
The size of the drawing canvas is now set from the size of the generated page image, with automatic
scrolling if it is too wide to display
Absolutely-positioned nodes (comments + stamps) are repositioned as the drawing canvas is scrolled
2014-12-16 11:54:42 +00:00
Zachary Durber 6edc717d0d MDL-47694 mod_assign: Grades require a grade to show as graded
Special thanks to Howard Miller.
2014-12-16 11:20:26 +01:00
Frederic Massart 195c33fcf3 MDL-48495 curl: Limit usage of curl to HTTP and HTTPS protocols 2014-12-16 10:08:54 +00:00
David Monllao d70814b233 Merge branch 'MDL-48318-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-12-16 16:42:19 +08:00
David Monllao 87e1c8fd5c Merge branch 'MDL-48547-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-12-16 14:12:02 +08:00
Brian Barnes 7bd9a47bd0 MDL-48286 core_files: Improved accessibility of file management 2014-12-16 13:28:40 +08:00
Simey Lameze 9ed4f0b3b7 MDL-48580 report_log: fix site errors dropdown
Thanks Renaat Debleu for pointing this bug and share a solution.
2014-12-16 12:39:34 +08:00
David Monllao 46369b4e02 Merge branch 'wip-MDL-48569-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-12-16 12:28:01 +08:00
Andrew Nicols af44f81242 Merge branch 'MDL-46472_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-12-16 10:40:31 +08:00
Eloy Lafuente (stronk7) e796e4e4f2 Merge branch 'MDL-47037-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-12-16 01:42:51 +01:00
Eloy Lafuente (stronk7) c891992b10 Merge branch 'MDL-46491-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-12-16 00:36:28 +01:00
Eloy Lafuente (stronk7) 2fd5a01c79 Merge branch 'MDL-48556-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-12-15 17:54:20 +01:00
Dan Poltawski 4d76973693 Merge branch 'MDL-38128_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-12-15 16:10:20 +00:00
Dan Poltawski c363aaee5d Merge branch 'MDL-45324_27' of git://github.com/jonof/moodle into MOODLE_27_STABLE 2014-12-15 14:59:39 +00:00
Dan Poltawski a53354abbb Merge branch 'MDL-47176_MOODLE_27_STABLE' of https://github.com/crazyserver/moodle into MOODLE_27_STABLE 2014-12-15 14:14:38 +00:00
Dan Poltawski 3c17bf4186 Merge branch 'MDL-48570-27' of https://github.com/pjking07/moodle into MOODLE_27_STABLE 2014-12-15 14:04:23 +00:00
Dan Poltawski ef32f26066 Merge branch 'MDL-47475-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-12-15 12:21:13 +00:00
Joseph Rezeau 9ed5262408 MDL-36673 mod_lesson: slideshow mode not working 2014-12-15 11:55:38 +00:00
David Monllao 4508c5d733 Merge branch 'MDL-48235-assign-reopen-until-pass-27_STABLE' of git://github.com/mpetrowi/moodle into MOODLE_27_STABLE 2014-12-15 17:34:28 +08:00
John Okely a8c8e8821e MDL-48587 core: Fix error in getremoteaddr for unsupported php versions 2014-12-15 16:57:05 +08:00
Simey Lameze 7ae332a5b2 MDL-42501 course: add help icon on delete gradebook options 2014-12-15 16:27:05 +08:00
Jetha Chan 1b514458f6 MDL-48088 calendar: normalize DTEND, add romance standard time
Thanks to Cedric Mortiers (cmortiers@stjohns.be) for providing the patch.
2014-12-15 12:10:36 +08:00
Andrew Nicols 840f924e75 MDL-47475 mod_assign: Copy files to other group members for editpdf 2014-12-15 08:51:13 +08:00
AMOS bot b2c74e642e Automatically generated installer lang files 2014-12-13 00:04:00 +08:00
Pau Ferrer Ocaña e1670910cd MDL-47176 qtype_match: Avoid sql_compare to solve problems with Oracle 2014-12-12 16:00:59 +01:00
PJ King 6dbf687b62 MDL-48570 course: Moved course search above course list.
Fixed regression from MDL-46295 'Course search box in course/index.php doesn't show when you navigate to the page.'
2014-12-12 06:31:49 -05:00
David Monllao bc4a8d86f3 MDL-38128 mod_assign: Counts and groups unit tests 2014-12-12 14:04:30 +08:00
David Monllao f683389194 MDL-38128 mod_assign: Fixing count teams and submissions with status
We should restrict the groups to the activity active group. Also
improving performance caching get_submission_group() results.
2014-12-12 14:04:29 +08:00
David Monllao a867a557c2 MDL-46472 theme: Removing standard as an uninstallable theme 2014-12-12 13:34:33 +08:00
David Monllao 1a59856bb3 MDL-38128 mod_assign: Adding group selector to grading summary page
Thanks to Pau Ferrer Ocaña and Avi Levy for
their work on this issue.
2014-12-12 13:25:26 +08:00
Andrew Nicols 23fdeb32a5 MDL-48224 cron: Buffer SMTP connections around tasks 2014-12-12 10:39:26 +08:00
Marina Glancy 8fdad7d2cd MDL-48569 profile: behat test for user full profile access 2014-12-12 10:29:53 +08:00
Marina Glancy fe8ffd169a MDL-48569 profile: show link to full profile if anybody can see it 2014-12-12 10:29:53 +08:00
Daniel Thies cd09c30f92 MDL-48213 filter_algebra: Allow cookies in debug script 2014-12-11 19:58:40 -06:00
Sam Hemelryk aad07e5ae1 MDL-28067 navigation: my private files in profile only 2014-12-12 13:48:16 +13:00
Sam Hemelryk ab36762b6d MDL-37680 repositories: added blocks to manage page 2014-12-12 13:37:07 +13:00
Joshua Johnston c5d0af083f MDL-46651 Backup: Handle duplicate course completions during restore
Cron can cause duplicate completion records if triggered during a long
running restore process. If this is the case, replace the new record
with the record from the backup file
2014-12-11 15:56:13 -05:00
Dan Poltawski 9258886927 weekly release 2.7.3+ 2014-12-11 09:55:14 +00:00
Dan Poltawski dd8d001a9e Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-12-11 09:55:12 +00:00
Ankit Agarwal d658f3f6fa MDL-48556 backup: Use correct conditions before checking dir permissions 2014-12-11 14:33:54 +05:30
Andrew Nicols 0f381d4158 MDL-46491 course: Correct activity visibility on section show 2014-12-11 14:51:07 +08:00
Zachary Durber b43cd17b0d MDL-46442 mod_assign: Notify users when grades are changed 2014-12-11 13:27:43 +08:00
Avi Levy db8006919a MDL-47037 grader_gradereport: Enable sort in other language then English 2014-12-11 07:40:32 +08:00
Frederic Massart 81fd67f566 MDL-48496 block_rss_client: Do not display curl error messages 2014-12-11 00:27:04 +01:00
AMOS bot cbdda5316e Automatically generated installer lang files 2014-12-11 00:04:08 +08:00
Dan Poltawski 4920ba49ed Merge branch 'MDL-48410_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-10 12:31:35 +00:00
Jonathon Fowler 7b9a54432a MDL-45324 assign: notify when workflow is Off, or if state is Released
When marking workflow is enabled, students will be notified only when
the workflow state transitions to 'Released'. Until that happens,
sending of messages will be held and the 'Notify students' grading
form option will be locked.

Additionally, the batch set marking workflow state facility gains
the 'Notify students' option.

Credit to Steve Upton and David Balch for the basis of this patch.
2014-12-10 22:28:07 +10:00
pau.ferrer-ocana e039d5384c MDL-48430 custom_menu: Malformed url in custom menu cannot break the platform 2014-12-10 13:27:35 +01:00
Tim Hunt e3f04ff410 MDL-48410 quiz behat: add missing require_once. 2014-12-10 12:12:47 +00:00
Dan Poltawski 944ade8b86 MDL-48547 thirdparty: remove incorrect entry 2014-12-09 23:13:20 +00:00
Dan Poltawski 49ba5a31c9 Merge branch 'MDL-47323-enrol-plugin-backup-27_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_27_STABLE 2014-12-09 22:30:04 +00:00
Dan Poltawski a855438a96 Merge branch 'MDL-45430-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-12-09 21:22:21 +00:00
Sam Hemelryk 8d666a6154 Merge branch 'm27_MDL-48389' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-12-10 09:27:23 +13:00
Matt Petro ad2cacf152 MDL-48235 mod_assign: Fix reopen until pass behavior 2014-12-09 10:53:01 -05:00
Eloy Lafuente (stronk7) 91bdacf6fd Merge branch 'MDL-31822_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-12-09 16:12:47 +01:00
Dan Poltawski 4ecfca089d MDL-45679 mod_lesson: do not overqualify styles 2014-12-09 12:35:20 +00:00
Dan Poltawski 779d592ce5 Merge branch 'MDL-45679_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-12-09 12:34:16 +00:00
Dan Poltawski 83d5e8af7f Merge branch 'MDL-41846-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-12-09 10:38:24 +00:00
Sam Hemelryk 903cc3a6a0 Merge branch 'wip_MDL-36499_M27' of git://github.com/gjb2048/moodle into MOODLE_27_STABLE 2014-12-09 16:57:07 +13:00
David Monllao 12ebb740fe MDL-31822 course: Formatting the section name 2014-12-09 11:53:39 +08:00
David Balch 453fe5b92f MDL-31822 course: Show custom Section name on Front page. 2014-12-09 11:53:35 +08:00
Sam Hemelryk 55307e61c6 Merge branch 'wip-MDL-46486-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-12-09 16:20:45 +13:00
Dan Poltawski 499462d90b MDL-40552 course: fixup unit test
Previously there was an assertion which was never used, now
we ensure to test the course themes functionality each time.
2014-12-09 16:14:27 +13:00
Sam Hemelryk 745992c3ee Merge branch 'MDL-34437-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-12-09 15:58:51 +13:00
Sam Hemelryk 7bdce11859 Merge branch 'm27_MDL-46172' of https://github.com/greg-or/moodle-mod_assign into MOODLE_27_STABLE 2014-12-09 15:38:45 +13:00
Sam Hemelryk dd818b9b17 Merge branch 'mdl48517_27' of https://github.com/tlevi/moodle into MOODLE_27_STABLE 2014-12-09 15:15:56 +13:00
Brian Barnes e80a960d35 MDL-48389 forms: added page title to help text 2014-12-09 15:02:43 +13:00
Brian Barnes f051bed3bc MDL-48532 core_roles: Set correct heading on user roles page 2014-12-09 14:21:08 +13:00
Sam Hemelryk 0f5ebed1b7 Merge branch 'wip-MDL-48366-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-12-09 13:43:34 +13:00
Sam Hemelryk 5e9b48a351 Merge branch 'wip-mdl-48426-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-12-09 12:13:32 +13:00
Eloy Lafuente (stronk7) 4c1de220d1 Merge branch 'MDL-48255-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-12-08 19:15:34 +01:00
Dan Poltawski 5985ad804b Merge branch 'MDL-48410_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-08 15:19:13 +00:00
Dan Poltawski caf50470f4 Merge branch 'MDL-48373_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-08 15:15:43 +00:00
Dongsheng Cai 80361bf252 MDL-35983 Try to use real file name from EQUELLA 2014-12-08 14:24:15 +00:00
Dan Poltawski c55f204f31 Merge branch 'MDL-47246_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-12-08 13:34:05 +00:00
Dan Poltawski 79dfb7a9a7 Merge branch 'MDL-14908-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-12-08 13:22:20 +00:00
David Monllao 070281e779 MDL-47246 mod_forum: Limit last post restriction to Q and A 2014-12-08 14:50:07 +08:00
Tony Levi 8ca8a16886 MDL-48517: behat: Fix reset ordering reversal (MDL-48302) 2014-12-08 13:07:03 +10:30
Sam Hemelryk dc0d55a1aa Merge branch 'MDL-37704-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-12-08 14:50:57 +13:00
Sam Hemelryk 3bc123b2fd Merge branch 'MDL-48058-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-12-08 13:58:20 +13:00
Gareth J Barnard b21aab6238 MDL-36499 javascript: Expand height of the file element in embedded view. 2014-12-06 12:14:40 +00:00
Gregory Faller 402cc8811f MDL-46172 mod/assign: Stop suspended users getting assign group emails 2014-12-06 08:27:30 +10:30
AMOS bot f9f21efa4b Automatically generated installer lang files 2014-12-06 00:03:57 +08:00
Jean-Michel Vedrine 38cf6b205b MDL-45679 mod_lesson: Essay grading page has no mark for essay status 2014-12-05 15:07:36 +01:00
Tim Hunt 0f0855277b MDL-48410 behat, quiz: step for efficiently adding questions 2014-12-05 12:19:18 +00:00
Tim Hunt e75707f6e1 MDL-48373 behat, questions: convert tests to use the new steps
The new steps make it more efficient to create questions.

While making the changes, I took the opportunity to alter the tests to
follow Behat best practices, and only test one thing per scenario.
2014-12-05 12:19:18 +00:00
Tim Hunt b60fb27879 MDL-48373 behat: generators for questions and categories 2014-12-05 12:19:17 +00:00
Tim Hunt af33173512 MDL-48373 behat: find table columns better.
It was not possible to select the question bank 'Created by'
or 'Modified by' columns without this change.
2014-12-05 12:19:17 +00:00
Tim Hunt 94b0ebcec6 MDL-48373 behat: new container selector for list items. 2014-12-05 12:19:16 +00:00
Eloy Lafuente (stronk7) dbe2143aba weekly release 2.7.3+ 2014-12-05 11:05:20 +01:00
Eloy Lafuente (stronk7) ebf166813a Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-12-05 11:05:15 +01:00
Mark Nielsen 81bc8888a2 MDL-48058 core_message: Default message outputs: Maintain Forced status 2014-12-05 14:44:17 +08:00
Ankit Agarwal dd889e05c8 MDL-45430 mod_book: Automate MDLQA-2428
This test verifies that an admin can generate and view all the book log entries
2014-12-05 09:26:15 +05:30
Rajesh Taneja a9326881bf MDL-48318 behat: Fixed JS Exception
M is not created on all pages, like cron and
Steps which check for exported data. So we need
to ensure M is defined, before using it in
behat_hooks::wait_for_pending_js()
2014-12-05 11:49:50 +08:00
John Okely cdeefed901 MDL-41846 repository_url: Escape > < ' " in input url
And throw an exception when a url is incorrectly formatted
2014-12-05 11:24:00 +08:00
John Okely 0ce7dfb2d4 MDL-41846 repository_url: Convert spaces to %20 in input url 2014-12-05 11:23:59 +08:00
Eloy Lafuente (stronk7) daa212dd6e Merge branch '48425-48374-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-12-04 13:26:59 +01:00
Eloy Lafuente (stronk7) 71b1aefcf6 MDL-48374 behat: Added missing $session 2014-12-04 13:26:58 +01:00
Rajesh Taneja d17de5db94 MDL-48374 behat: Check flag before searching for span on page 2014-12-04 13:26:58 +01:00
Andrew Nicols 4ef9c95b97 MDL-48374 behat: improved page load detection
Check that page load detection was correctly started before testing that a
new page was loaded.

Without this, it is possible to have mutliple subsequent cases of:
    And a new page should have loaded since I started watching

Without first starting the page load detection.
2014-12-04 13:26:58 +01:00
Sam Hemelryk 21174ebcc1 Merge branch 'M27_MDL46116_IMSCP_container_items.updates_2014-11-11' of https://github.com/Dave-B/moodle into MOODLE_27_STABLE 2014-12-04 13:26:57 +01:00
Dan Poltawski 90c4c87e20 Merge branch 'wip-mdl-48290-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-12-04 13:26:56 +01:00
Dan Poltawski a007dcd629 Merge branch 'MDL-34627_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-12-04 13:26:56 +01:00
Eloy Lafuente (stronk7) 20f629e84d Merge branch '48374-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-12-04 13:26:56 +01:00
Sam Hemelryk 36f4c617b1 Merge branch 'MDL-40419-27-2nd' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-12-04 13:26:55 +01:00
Dan Poltawski 2c31a2e3db Merge branch 'wip_MDL-48420_m27_lasttypo' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-12-04 13:26:55 +01:00
Dan Poltawski 932fe5122c Merge branch 'MDL-48342_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-12-04 13:26:54 +01:00
Dan Poltawski 2a2a593b1d Merge branch 'MDL-40241_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-12-04 13:26:54 +01:00
Marina Glancy 44af7085dd MDL-48366 blocks: always display custom regions in dropdown 2014-12-04 16:08:50 +08:00
AMOS bot a9a8c0e89b Automatically generated installer lang files 2014-12-04 00:04:38 +08:00
Matt Petro d05cc63706 MDL-47323 backup: added enrol plugin backup structure and annotation 2014-12-02 22:02:00 -05:00
David Balch 8f03492b89 MDL-46116 mod_imscp: Fix some jshint issues. 2014-12-02 11:17:33 +00:00
Simey Lameze d9f52e704d MDL-48255 auth_ldap: make ldap cookie check more robust
Thanks to Baptiste Desprez for spotting this and provide a solution.
2014-12-02 15:39:11 +08:00
Ankit Agarwal 913ba48905 MDL-37704 user_profile: Make sure description field can be locked
Thanks JD for the initial patch.
2014-12-02 09:44:15 +05:30
Rajesh Taneja 67e7d60b56 MDL-48290 behat: Add log out after checking exported file
If the download step is the last in the scenario then we
can sometimes run into the situation where the download page
causes a http redirect but behat has already conducted its
reset (generating an error). By putting a logout step we avoid
behat doing the reset until we are off that page.
2014-12-02 09:39:52 +08:00
Sam Hemelryk 1c86ce8fcd MDL-48425 course: management behat tests improved 2014-12-02 11:45:01 +13:00
Sam Hemelryk fd6dab3d50 MDL-48374 behat: improved page load exceptions
The following improvements have been made to the page load watching:
* Improved the exceptions when a page load expectation fails.
* Added an exception if start watching happens twice without a page load.
* Improved the page load span and xpath to make it faster and less likely
  to interfer in the future.
2014-12-02 11:44:06 +13:00
Tim Hunt 8fbf748b27 MDL-48374 behat: new steps for detecting page loads. 2014-12-02 08:58:19 +13:00
Mary Evans aaeb91d65a MDL-48243 theme_bootstrapbase: Fixed inconsistancy between LTR/RTL LESS 2014-12-01 17:41:36 +00:00
Didier Raboud 0cf19119b5 MDL-34437 shibboleth: Correct the shibboleth wiki links. 2014-12-01 14:57:51 +05:30
Frederic Massart c35dbd1e5b MDL-14908 user: Parents are not restricted when separated groups is used 2014-12-01 15:16:03 +08:00
David Monllao 646a06c894 MDL-40241 core_completion: Minor fixes to provided patch
Thanks to Aaron Barnes and Jon Sharp for working on this issue.
2014-12-01 15:00:09 +08:00
Marina Glancy 1e3de4b4b4 MDL-46486 coursecat: remove function forgotten in MDL-38147 2014-12-01 13:11:49 +08:00
Rajesh Taneja 1c6e42379e MDL-48426 behat: soft-reset mink session before scenario 2014-12-01 12:40:38 +08:00
Rajesh Taneja 2457cfd841 MDL-48426 behat: Wait for redirection after save
After saving wiki comment, page is redirected
Make sure to wait for redirection after save
to avoid random fails
2014-12-01 11:26:06 +08:00
Charles Fulton 67379b3396 MDL-34627 feedback: Convert default format value during restore 2014-12-01 10:57:31 +08:00
Aaron Barnes 43cd6dfaab MDL-40241 blocks_completionstatus: Fix notices 2014-12-01 10:03:25 +08:00
Aaron Barnes 21f5b786a6 MDL-40241 completion: Default roles unable to manually complete course
Thanks to Jon Sharp for authoring the original patch!
2014-12-01 10:03:16 +08:00
Sam Hemelryk 545d15da8e Merge branch 'wip-MDL-48377-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-12-01 14:02:12 +13:00
Sam Hemelryk 90254c5b6c Merge branch 'MDL-48382_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-01 13:58:17 +13:00
Sam Hemelryk 56204564e5 Merge branch 'MDL-46618_m27' of git://github.com/kordan/moodle into MOODLE_27_STABLE 2014-12-01 11:59:32 +13:00
Sam Hemelryk 2f0a90c22f Merge branch 'MDL-14402-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-12-01 11:35:49 +13:00
Sam Hemelryk eeab296542 Merge branch 'MDL-48384-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-12-01 11:31:33 +13:00
Sam Hemelryk 5fe069725b MDL-47133 editor_atto: fixed lint errors 2014-12-01 10:36:42 +13:00
Sam Hemelryk 6fae37e111 Merge branch 'MDL-47133-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-12-01 10:19:27 +13:00
Petr Skoda 800ddc416a MDL-48420 test: fix lasttnamephonetic typo 2014-12-01 09:28:21 +13:00
Ankit Agarwal dca3bab337 MDL-42717 backups: set correct backup status and add logs
Set a correct backup status of ERROR when we fail to copy a file to an external directory given the backup configs demand it.
Also a lot of logs are added around this area to let admins easily find the problem if backup fails because of directory permissions.
2014-12-01 09:11:10 +13:00
AMOS bot 6d0a8e6813 Automatically generated installer lang files 2014-11-29 00:04:06 +08:00
Jean-Michel Vedrine 2a4c8dd7ff MDL-48342 Question: qformat_default::readquestion is broken
Conflicts:
	question/format.php
2014-11-28 15:30:39 +01:00
Tim Hunt f79f761d1a MDL-48382 quiz behat: make add question step more robust. 2014-11-28 13:43:42 +00:00
Dan Poltawski ab3effc0c6 weekly release 2.7.3+ 2014-11-28 08:04:44 +00:00
Dan Poltawski 3bcc3c0a47 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-11-28 08:04:42 +00:00
Damyon Wiese 9f04a2f0ab Revert "Merge branch 'MDL-38128_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE"
This reverts commit 86fd1a8625.

This reverts commit 04334d635f, reversing
changes made to e91872f276.
2014-11-28 15:10:42 +08:00
David Monllao 86fd1a8625 MDL-38128 mod_assign: Changes in grading summary page using team submissions
If there is an active group and (groupmode != NOGROUPS)
the displayed info is related with that single group.
2014-11-28 05:33:30 +08:00
Dan Poltawski d6ff91bb4f Revert "Merge branch 'MDL-43127-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE"
This reverts commit 6ae2ce8802, reversing
changes made to 04334d635f.
2014-11-27 09:35:35 +00:00
Dan Poltawski f9ed85a8e5 Revert "Merge branch 'MDL-43127-27-fixup' of https://github.com/FMCorz/moodle into MOODLE_27_STABLE"
This reverts commit 7cda7d47a2, reversing
changes made to 8272ee15ed.
2014-11-27 09:35:33 +00:00
Frederic Massart 37c2a7aba9 MDL-40419 backup: Advanced comparison when restoring blocks in course 2014-11-27 16:19:54 +08:00
Frederic Massart 96d699b4d8 MDL-40419 blocks: Function to get page type patterns from pattern 2014-11-27 16:19:54 +08:00
Dave Cooper afe863ed4a MDL-41155 Lesson: Fix behat tests for multiple question attempts 2014-11-27 12:02:31 +08:00
Eloy Lafuente (stronk7) 4a3cbcee39 Merge branch 'wip-mdl-48190-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-26 13:25:59 +01:00
Dan Poltawski c620a73539 MDL-48384 thirdpartylibs: correct location of yui 2014-11-26 12:13:17 +00:00
Frederic Massart 693c2aaf32 MDL-47133 editor_atto: Use strict validation of keyboard shortcuts 2014-11-26 17:40:41 +08:00
Dan Poltawski 7cda7d47a2 Merge branch 'MDL-43127-27-fixup' of https://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-11-26 09:23:16 +00:00
Frederic Massart 8c2dd12b46 MDL-43127 tool_uploadcourse: Empty enrolment method is acceptable
Without the patch a course would not be created if it contained
an enrolment method column with an empty value. e.g.:

shortname,fullname,category,enrolment_1,enrolment_1_disable
courserestored,Course restored,1,,
courserestored2,Course restored 2,manual,1
2014-11-26 17:14:35 +08:00
Dan Poltawski 8272ee15ed Merge branch 'MDL-48210-27-checker-caching' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-26 08:20:39 +00:00
David Mudrák 3ade25f0b2 MDL-48210 updates checker: Fix empty return type
Credit goes to Marina Glancy for catching during the testing.
2014-11-26 09:11:04 +01:00
Marina Glancy eb21c1cbf3 MDL-48377 forum: do not swallow spaces in notification emails 2014-11-26 12:13:55 +08:00
Sam Hemelryk d5f17c854b Merge branch 'MDL-47329-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-11-26 08:43:34 +13:00
Eloy Lafuente (stronk7) c1d2598083 Merge branch 'MDL-48276-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-11-25 18:45:40 +01:00
Eloy Lafuente (stronk7) 736e200028 Merge branch 'MDL-48277-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-11-25 18:42:28 +01:00
Heiko Schach 333c3dbf1d MDL-48036 course: change multilang cache key 2014-11-25 14:35:10 +00:00
Dan Poltawski aac37e5afd Merge branch 'MDL-41155-27' of git://github.com/gurgus/moodle into MOODLE_27_STABLE 2014-11-25 13:18:20 +00:00
Eloy Lafuente (stronk7) 6d99454e61 Merge branch 'MDL-48210-27-checker-caching' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-25 13:22:36 +01:00
Dan Poltawski d298907913 Merge branch 'MDL-46416-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-11-25 11:21:23 +00:00
Dan Poltawski 6ae2ce8802 Merge branch 'MDL-43127-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-11-25 11:18:54 +00:00
Dan Poltawski 04334d635f Merge branch 'MDL-38128_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-11-25 11:07:56 +00:00
Eloy Lafuente (stronk7) e91872f276 Merge branch '48189-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-25 11:26:06 +01:00
Dave Cooper b0038007fd MDL-41155 Lesson: Fixed multiple question attempts logic
Thanks to Rajneel Totaram for providing this patch.
2014-11-25 14:16:50 +08:00
Dave Cooper 9469336c58 MDL-41155 Lesson: Added behat tests for multiple question attempts 2014-11-25 14:16:49 +08:00
Frederic Massart acd52a33ec MDL-43127 tool_uploadcourse: Add support for more enrolment methods 2014-11-25 11:01:22 +08:00
Sam Hemelryk b15c43b197 Merge branch 'MDL-22043-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-25 15:54:16 +13:00
David Monllao b145ec7cec MDL-38128 mod_assign: Adding group selector to grading summary page
Thanks to Pau Ferrer Ocaña and Avi Levy for
their work on this issue.
2014-11-25 10:54:09 +08:00
Sam Hemelryk 76a3bfec12 Merge branch 'MDL-46534-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-25 15:47:57 +13:00
Sam Hemelryk 8c0edd2692 MDL-48189 grade: letters now covered by behat 2014-11-25 15:37:25 +13:00
Sam Hemelryk 76e29031f3 MDL-23839 navigation: fixed php5.5ism 2014-11-25 14:36:03 +13:00
Sam Hemelryk 70554009a3 Merge branch 'MDL-23839-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-25 14:07:16 +13:00
Sam Hemelryk 06b1368f88 Merge branch 'MDL-23912-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-11-25 12:29:01 +13:00
Eloy Lafuente (stronk7) 4d4e1edf2c Merge branch '38343-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-25 00:28:26 +01:00
Eloy Lafuente (stronk7) 806aba002a Merge branch '48304-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-25 00:24:05 +01:00
Sam Hemelryk 0db7d1b6a2 Merge branch 'MDL-48246-M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-11-25 10:52:52 +13:00
Sam Hemelryk 7d6ac9b85f Merge branch 'm27_MDL-48265' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-11-25 09:42:51 +13:00
Dan Poltawski 009ac9f0fb Merge branch '47832-27-removed' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-24 17:30:28 +00:00
Dan Poltawski fe893fd43e Merge branch 'MDL-45867-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE 2014-11-24 17:11:18 +00:00
Dan Poltawski e7f3fb0d42 Merge branch 'MDL-47601_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-11-24 17:02:14 +00:00
Dan Poltawski a0542940c5 Merge branch 'wip-MDL-48252-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-11-24 16:29:37 +00:00
AMOS bot a6ebe87656 Automatically generated installer lang files 2014-11-25 00:04:14 +08:00
Dan Poltawski 688b5dc16b Merge branch 'wip-mdl-48302-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-24 11:57:15 +00:00
David Mudrák aa61ebaad7 MDL-48210 updates checker: Improve cron notifications processing
These are cosmetic improvements spotted while working on the issue.

1. Do not waste time if there are no changes to notify about.
2. Fix the legacy plugin manager's get_plugins() call.
2014-11-24 10:24:45 +01:00
David Mudrák b862253564 MDL-48210 plugin_manager: Invalidate caches after fetching updates info 2014-11-24 10:24:38 +01:00
Sam Hemelryk 14eec5af8f Merge branch 'MDL-48064-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE 2014-11-24 14:54:21 +13:00
Sam Hemelryk f9ed19e476 Merge branch 'MDL-35494_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-11-24 10:06:04 +13:00
Rajesh Taneja 54c83a9e6a MDL-48190 behat: Fixed visit background in MoodleScenarioTester 2014-11-21 12:12:09 +08:00
Rajesh Taneja b04d715851 MDL-48302 behat: Reset all data, before starting behat suite 2014-11-21 10:44:07 +08:00
Rajesh Taneja f6a8e98fa3 MDL-48302 behat: Make sure to clear php file cache 2014-11-21 10:43:58 +08:00
Rajesh Taneja b525a13b9e MDL-48302 behat: Reset cache before scenario 2014-11-21 10:43:54 +08:00
Jetha Chan 016b6a4304 MDL-47329 mod_book: missing RTL styles, added page body selectors 2014-11-21 10:34:24 +08:00
Jetha Chan 41f8d3bb47 MDL-47329 mod_book: use embedded pagetype instead of hardcoded HTML 2014-11-21 10:34:23 +08:00
Kordan d9717a12a0 MDL-46618 tool_xmldb: added styles_bootstrapbase.css 2014-11-20 10:50:36 +01:00
Dan Poltawski 06378d1069 weekly release 2.7.3+ 2014-11-20 08:38:20 +00:00
Dan Poltawski a249452e3b Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-11-20 08:38:18 +00:00
Sam Hemelryk 57476f6444 MDL-48304 moodle_url: compare now considers anchor 2014-11-20 15:38:54 +13:00
Adrian Greeve f45fad60fd MDL-48252 scheduled tasks: Unit test for file_temp_cleanup_task. 2014-11-20 10:32:32 +08:00
Sam Hemelryk da983ee1c5 MDL-47832 cache: removed data source aggregate functionality
Cache data source aggregate functionality was found to be broken
and unused, because of this the decision was made to remove it
rather than fix it.
As it was broken we did not follow typical deprecation methods and
instead the code was removed outright with only structure
remaining and left deprecated.
2014-11-20 11:26:10 +13:00
Sam Hemelryk ca3cf469fe MDL-43628 mod_assign: fixed formatting of statement 2014-11-20 10:19:11 +13:00
Eloy Lafuente (stronk7) 446674cd9d Merge branch '48206-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-19 21:19:59 +01:00
Dan Poltawski add3b8a8b5 MDL-29585 wiki: fix unit test fails 2014-11-19 11:40:42 +00:00
Frederic Massart 83cfd8a37a MDL-29585 mod_wiki: Prevent broken links in editable sections
When a section name ended with a URL, the '<a' part of [edit] link
that is appended to the section was considered as part of the URL
in the section, thus causing the [edit] link to be broken.
2014-11-19 10:34:53 +00:00
Dan Poltawski 9373d34f9a MDL-48277 css: initial csslint config file 2014-11-19 09:19:53 +00:00
Dan Poltawski 14605dc0fd Merge branch 'wip-mdl-46865-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-19 06:40:48 +00:00
Dan Poltawski cf599bc889 MDL-48276 qformat_xhtml: avoid uncessary html in .css file
In order to help automated tools move the html out of the css
file.
2014-11-19 05:56:16 +00:00
Andrew Nicols c131db4761 MDL-22043 mod_forum: Fix toggle subscription editing button behaviour
Update the user session property before generating the button which relies
upon it.
2014-11-19 13:32:40 +08:00
Andrew Nicols 49f7f2e20a MDL-14402 blocks: Do not show assign roles on my home 2014-11-19 11:19:06 +08:00
Rajesh Taneja 2b803aedcf MDL-46865 report_log: Fixed site name in behat step 2014-11-19 10:20:21 +08:00
Andrew Nicols c2787a78d0 MDL-23839 navigation: Check for assignable course category roles 2014-11-19 08:56:13 +08:00
Sam Hemelryk 7bc338e156 MDL-33606 tests: fixed broken unit test 2014-11-19 11:31:10 +13:00
Sam Hemelryk 0391103027 Merge branch 'MDL-33606_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-11-19 09:37:21 +13:00
Daniel Thies 9f12a1b03b MDL-45867 atto_equation: Change preview update to asynchronous 2014-11-18 13:30:01 -06:00
Mary Evans a5ec0acae5 MDL-47915 mod/scorm: Added JS fallback for themes using copied layouts. 2014-11-18 17:48:27 +00:00
AMOS bot aec41fb0d0 Automatically generated installer lang files 2014-11-19 00:05:42 +08:00
Dan Poltawski c2aac9f91c Merge branch 'MDL-48146_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-18 12:04:49 +00:00
Dan Poltawski b734d64a1c Merge branch 'MDL-47700-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-11-18 10:04:28 +00:00
Andrew Nicols b23f217145 MDL-46534 course: Remove calls to error_log in activity duplication 2014-11-18 15:54:05 +08:00
Adrian Greeve 405b413dd8 MDL-48252 scheduled tasks: file_temp_cleanup_task does full delete.
This scheduled task was previously only doing a partial delete
due to the fact that the directory modification time would be
updated when a child file was deleted. It would then have to
wait another week before that directory could be deleted.
2014-11-18 15:00:17 +08:00
Sam Hemelryk f51988665f Merge branch 'wip-mdl-48250-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-18 17:38:03 +13:00
Sam Hemelryk ecda42ce1f Merge branch 'MDL-29585-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-11-18 16:47:27 +13:00
Brian Barnes c0c96e8261 MDL-48265 feedback: Added alt text to ghostscript test image 2014-11-18 16:40:04 +13:00
Jetha Chan d31e71b0d5 MDL-23912 core_comment: update count after deletion 2014-11-18 09:35:55 +08:00
Sam Hemelryk 46c6c237d2 MDL-38343 cache: better test server strings 2014-11-18 12:33:59 +13:00
Sam Hemelryk 2337865922 Merge branch 'MDL-47618_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-18 11:12:30 +13:00
Daniel Thies d6ddfdc23a MDL-48064 atto_editor: Expand event subscription for saving selection 2014-11-17 11:37:59 -06:00
Dan Poltawski 504397d251 Merge branch 'MDL-30619_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-11-17 16:48:30 +00:00
Dan Poltawski e44b4ab746 Merge branch 'MDL-48199_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-11-17 16:42:47 +00:00
Dan Poltawski fe53059c04 Merge branch 'MDL-47648_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-17 15:41:52 +00:00
Dan Poltawski 8e8429f318 Merge branch 'wip-mdl-46865-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-17 15:33:44 +00:00
Dan Poltawski 1f04068364 Merge branch 'm27_MDL-48023_Theme_Setting_Files_Cacheable_By_Both_Browsers_And_Proxies' of https://github.com/scara/moodle into MOODLE_27_STABLE 2014-11-17 15:20:19 +00:00
Mary Evans 7653947d27 MDL-48246 theme: Fixed typo in 'hidepanelicon'
Conflicts:

    theme/bootstrapbase/style/moodle.css
2014-11-17 15:16:10 +00:00
Dan Poltawski b0abfdeefa Merge branch 'MDL-48042_27' of git://github.com/ppichet/moodle into MOODLE_27_STABLE 2014-11-17 15:13:25 +00:00
Dan Poltawski 07db3050e9 Merge branch 'MDL-42756_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-11-17 13:52:45 +00:00
Dan Poltawski 038e41c918 Merge branch 'wip-MDL-36240-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-11-17 13:31:31 +00:00
Dan Poltawski 8725f5ba66 Merge branch 'MDL-43987-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-11-17 13:17:41 +00:00
Dan Poltawski cba7b87887 Merge branch 'MDL-46640-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-11-17 12:52:42 +00:00
Mark Nelson 1b748664e9 MDL-47601 core_backup: ensure removal of automated backups 2014-11-16 23:58:39 -08:00
Mark Nelson 598fa03646 MDL-35494 core_backup: fixed activity restoration issue 2014-11-16 22:52:50 -08:00
Rajesh Taneja a02312c1d6 MDL-48250 enrol_ldap: set default category
As in other enrol plugins (database), set default
category to 1 (pointing to Miscellaneous)
2014-11-17 14:42:47 +08:00
Mark Nelson 8d3d6a0041 MDL-30619 mod_data: fixed deletion of files on reset 2014-11-16 21:43:13 -08:00
Frederic Massart 0839240a82 MDL-46640 navigation: Handle block contexts within a category 2014-11-17 12:42:00 +08:00
Frederic Massart 7e60483084 MDL-29585 mod_wiki: Handle special characters in headings/sections 2014-11-17 10:39:15 +08:00
Adrian Greeve 3c40f7eb61 MDL-36240 backup: Activity calendar events backed up.
Activity calendar events can now be backed up and restored
when no user data is selected.
2014-11-17 10:13:37 +08:00
Sam Hemelryk e0ad83acbe MDL-48196 phpunit: fixed the fail after this change 2014-11-17 15:07:43 +13:00
John Okely 84432ba61c MDL-43987 core: Remove port numbers in cleanremoteaddr 2014-11-17 09:48:37 +08:00
Sam Hemelryk d02d0a4f31 Merge branch 'MDL-48115_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-11-17 14:37:53 +13:00
Sam Hemelryk 88aefc4910 Merge branch 'MDL-48194-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-17 13:39:13 +13:00
Mary Evans 121a45e388 MDL-48199 theme_bootstrapbase: Page padding left is wrong when in RTL
Conflicts:

    theme/bootstrapbase/style/moodle.css
2014-11-17 00:11:13 +00:00
Sam Hemelryk 399e3f33a1 Merge branch 'MDL-48179-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-11-17 12:48:08 +13:00
Sam Hemelryk d38d8313df Merge branch 'MDL-48196-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-17 12:34:12 +13:00
Sam Hemelryk 6769628da6 Merge branch 'm27_MDL-47993' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-11-17 12:21:49 +13:00
Mathieu Petit-Clair 8ef5fbfa09 MDL-43628 assign: make submissionagreement usable on multilingual sites 2014-11-17 11:48:34 +13:00
Sam Hemelryk fbcf4385a4 Merge branch 'MDL-35638-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-11-17 10:39:50 +13:00
Sam Hemelryk 7a7ad4e500 Merge branch 'MDL-47590_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-17 10:39:49 +13:00
Sam Hemelryk 32df8695ba Merge branch 'MDL-44657-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-11-17 10:39:49 +13:00
Matteo Scaramuccia dbfa535dfc MDL-48023 Files API: Theme files must be cache-able by shared proxies.
The profile image AKA user icon will be cache-able by shared proxies too,
under its specific accessibility constraints/conditions.
2014-11-16 10:01:55 +01:00
Pierre Pichet 6aa10e4182 MDL-48042 Questions: Reset Calculated qtype comments on datasets
Reset back the modifications of Calculated qtype comments on datasets
    done by MDL-47224

Signed-off-by: Pierre Pichet <pichet.pierre@uqam.ca>
2014-11-15 17:00:05 -05:00
sam marshall beadba759a MDL-48179 Backup progress: Can time out when compressing large backup 2014-11-14 18:31:38 +00:00
Daniel Thies 31a8fc3acb MDL-48064 atto_editor: Check if activeElement is child node in isActive 2014-11-14 12:10:40 -06:00
Tim Hunt 23b8588f81 MDL-47590 question backup: include response file only with userdata 2014-11-14 16:21:41 +00:00
Sam Hemelryk 784188fcdf MDL-48206 block_comments: textarea width 100% 2014-11-14 11:40:30 +13:00
Oleg Demeshev 5b5f07ac39 MDL-47993 calendar: Fix ical import Microsoft calendar issue 2014-11-14 10:41:46 +13:00
Paul Holden 23f202a2b8 MDL-44657 forms: Form identifiers should only contain basic characters 2014-11-13 16:25:04 +08:00
Rajesh Taneja 0a4794bb0d MDL-46865 report_log: Fixed showuser and showcourse in report log 2014-11-13 15:21:11 +08:00
John Okely 8bcd939123 MDL-47700 Grades: Fix incorrect config for overview report showrank 2014-11-13 14:48:45 +08:00
Tim Lock 09a9270640 MDL-47700 Grades: Sitewide overview report isn't visible in some cases
Showing a overview report rank sitewide isn't visible to student in same cases
2014-11-13 14:48:45 +08:00
Andrew Nicols fbe9cfab3c MDL-48196 phpunit: Set e-mail address for admin user at installation 2014-11-13 08:58:27 +08:00
Tim Hunt 00102dba3e MDL-48146 quiz settings: fix non-percent feedback boundaries 2014-11-12 15:47:07 +00:00
Dan Poltawski 0ac6d59990 weekly release 2.7.3+ 2014-11-12 11:33:27 +00:00
David Monllao 1aa756ad5d MDL-30968 mod_forum: No picture link to group when no groups mode 2014-11-12 07:42:35 +00:00
David Monllao 1f1390e8c2 MDL-33606 course: Adding section info to course_viewed log 2014-11-12 13:57:24 +08:00
Andrew Nicols cc2621c403 MDL-48194 testing: Adjust naming of testsuites in phpunit.xml
This will make it easier to run phpunit for a specific component by making
all testsuite names consistent, guessable, and in-line with the naming of
the parameter (testsuite vs. test suite).
2014-11-12 12:01:11 +08:00
Adam Olley 7ed58a20ae MDL-42756 dock: Trigger actionmenu enhance when showing dock panel
Additionally fixes the styling for the actionmenu icon size in
bootstrapbase'd themes.
2014-11-12 14:09:13 +10:30
Sam Hemelryk ecb90615b8 Merge branch 'MDL-47391_M27' of github.com:ninelanterns/moodle into MOODLE_27_STABLE 2014-11-12 12:33:43 +13:00
Sam Hemelryk 8ed36ec5b0 Merge branch 'MDL-39692-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-11-12 09:42:02 +13:00
Yuliya Bozhko 890de30213 MDL-48115 badges: Fix strtoupper() output in badges
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-11-12 09:31:20 +13:00
Sam Hemelryk 5c4f15ae31 Merge branch 'MDL-30968-m27-forum-group-link' of https://github.com/amandadoughty/moodle into MOODLE_27_STABLE 2014-11-12 08:58:58 +13:00
Dan Poltawski 01b4948dcf MDL-47502 statslib tests: improve test
While integrating I noticed some problems which already existed in this
test:
* The enrolment data generator was not used
* The student roleid was hardocded
* The role assignment was at site level..
2014-11-11 19:24:56 +00:00
Dan Poltawski 4fdf2871a9 Merge branch 'MDL-47502' of https://github.com/eugeneventer/moodle-fixes into MOODLE_27_STABLE 2014-11-11 19:12:18 +00:00
Dan Poltawski a876e6b182 Merge branch 'MDL-47975-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-11-11 19:05:47 +00:00
Dan Poltawski 9e70547e23 Merge branch 'MDL-48093-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-11-11 18:59:58 +00:00
David Balch 6ae1482652 MDL-46116 mod_imscp: Display first item with content on load. 2014-11-11 18:52:09 +00:00
David Balch 6841850e5b MDL-46116 mod_imscp: Don't create links on items without content. 2014-11-11 18:52:09 +00:00
Tim Hunt 9775fc1672 MDL-47618 quiz statistics: fatal error with groups.
The problem was that the names of query placeholders were changing. The
fix was to do things ourself, rather than using get_in_or_equal.
2014-11-11 18:29:36 +00:00
Tim Hunt 53d9983e93 MDL-47648 admin unit tests: fix file perms on mimetex.exe
This was causing the
core_admintree_testcase::test_admin_setting_configexecutable unit test
to fail.
2014-11-11 14:04:58 +00:00
Ankit Agarwal 9d66334d73 MDL-35638 backup: Do not print headers during redirects 2014-11-11 11:09:04 +05:30
sam marshall fc7a247b54 MDL-48093 HTML 5 video: Firefox now supports .mp4 2014-11-10 10:50:25 +00:00
Darko Miletic eb963e4e6f MDL-39376 enrol: Optimized setting for ldap and database 2014-11-10 16:46:37 +08:00
Frederic Massart 21a51e41a8 MDL-39692 grade: Little code clean up of letter boundary deletion 2014-11-10 13:06:32 +08:00
Huy Hoang 5b29dbc781 MDL-39692 grade: Ability to delete letter boundary 2014-11-10 13:06:28 +08:00
James Ballard e77b7cff66 MDL-47391 Update pagelayout for default profile configuration for MOODLE_27_STABLE 2014-11-10 09:20:08 +11:00
Eugene Venter 0161a20167 MDL-47502 test_statslib_cron_daily: fix provider
Fiddling with the database in the data provider causes "out of sync"
errors when running suite tests.
2014-11-10 10:17:06 +13:00
Eloy Lafuente (stronk7) 803ddf9af3 Moodle release 2.7.3 2014-11-08 23:30:01 +01:00
AMOS bot 35842d38af Automatically generated installer lang files 2014-11-09 00:05:36 +08:00
Eloy Lafuente (stronk7) e29bdea42e weekly release 2.7.2+ 2014-11-07 16:53:22 +01:00
John Okely a866ad40be MDL-47949 mod_wiki: Validate parameters for page deletion 2014-11-07 15:13:25 +08:00
Frederic Massart df44fd80ff MDL-46416 group: Use a revision number for group pictures 2014-11-07 14:48:14 +08:00
Damyon Wiese 125cb6df08 Merge branch 'wip-MDL-48091-m27-2' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-07 09:29:22 +08:00
Eloy Lafuente (stronk7) e88e7ae3ad Merge branch 'MDL-47943-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE 2014-11-06 18:47:38 +01:00
Marina Glancy bacb95612e MDL-48091 users: revert MDL-42875
Rvert of: "Show only profile visible roles on participants list"

This reverts commit ecc8244e62.
2014-11-06 18:41:05 +08:00
Eloy Lafuente (stronk7) 4752706116 Merge branch 'MDL-48035-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-06 11:15:13 +01:00
David Mudrák 07ff315180 MDL-48035 Fix Behat tests regressions after merging en_fix strings 2014-11-06 10:55:41 +01:00
John Okely 4800d01e2e MDL-47930 mod_forum: Detect subscription to subscription disabled forums
Return forums with disabled subscription that you are subscribed to in
forum_get_subscribed forums
2014-11-06 08:40:50 +00:00
Damyon Wiese e9d3aad54c MDL-43430 ldap: whitespace fix 2014-11-06 12:06:42 +08:00
Damyon Wiese 8b91ec3dda Merge branch 'wip_27_mdl-43430' of https://github.com/iarenaza/moodle into MOODLE_27_STABLE 2014-11-06 11:59:39 +08:00
Marina Glancy 3925a3e287 Merge branch 'wip_MDL-48083_m27_rollback' of git://github.com/skodak/moodle into MOODLE_27_STABLE 2014-11-06 11:42:23 +08:00
Petr Skoda 489e91282b MDL-48083 dml: Empty buffers on forced rollback 2014-11-06 15:53:29 +13:00
Eloy Lafuente (stronk7) a618d35082 Merge branch 'wip-MDL-47174-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-06 02:15:54 +01:00
Marina Glancy d8b19527fe MDL-47174 events: new calendar event may have 0 timestart 2014-11-06 08:58:16 +08:00
Eloy Lafuente (stronk7) 7ef5172818 Merge branch 'wip-mdl-45416-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-06 00:58:12 +01:00
Eloy Lafuente (stronk7) 2b46342766 Merge branch 'MDL-47990_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-06 00:24:15 +01:00
Dan Poltawski a647d27ad7 Merge branch 'MDL-47466-MOODLE_27_STABLE' of https://github.com/tehanuyor/moodle into MOODLE_27_STABLE 2014-11-05 16:26:03 +00:00
Daniel Thies 3c2b67f5d4 MDL-47943 editor_atto: Save selection on mouseleave for Chrome 2014-11-05 09:37:24 -06:00
Andrew Nicols c812956efd MDL-48019 mod_forum: Add sesskey checks when setting tracking prefs
This also removes set_url() and changes require_course_login to
require_login as guests cannot set tracking.
2014-11-05 10:34:56 +00:00
Damyon Wiese 4289728d7c Merge branch 'MDL-46500_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-11-05 16:44:01 +08:00
Iñaki Arenaza ce45e0b188 MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis
While testing the fix, it was found that ldap_stripslashes() was broken and
using a deprecated PCRE patter modifier, so it's also been fixed.

Thanks to Damyon Wiese, some units tests have been added to cover
ldap_addslashes() and ldap_stripslashes().
2014-11-05 09:02:56 +01:00
Damyon Wiese f427d8efd6 Merge branch '48025-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-05 15:52:48 +08:00
Damyon Wiese be17a78d5c Merge branch 'wip-MDL-46262-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-05 14:40:31 +08:00
Damyon Wiese 7ce72e385d MDL-47793 assign: trivial fix for inconsistent use of get_instance() 2014-11-05 14:29:16 +08:00
Damyon Wiese 250b70735b Merge branch 'MDL-47793-m27' of https://github.com/micaherne/moodle into MOODLE_27_STABLE 2014-11-05 14:29:01 +08:00
Damyon Wiese 9aefa9c8d3 Merge branch 'MDL-47930-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-05 14:21:28 +08:00
Damyon Wiese 24422c9028 MDL-27930 lesson: Remove custom styling from timer 2014-11-05 13:58:52 +08:00
Damyon Wiese 845b9de5c6 Merge branch 'MDL-27930_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-11-05 13:51:52 +08:00
Rajesh Taneja 691bb2a90f MDL-45416 enrol_ldap: Use null_progress_trace while running phpunit 2014-11-05 11:13:10 +08:00
Eloy Lafuente (stronk7) 98d1b938a3 Merge branch 'MDL-48035-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-05 01:16:20 +01:00
Helen Foster 13523e51e4 MDL-48035 Merge English strings from the en_fix language pack 2014-11-04 22:05:07 +01:00
Jean-Michel Vedrine 0db87f6d4a MDL-27930 Lesson: the count-down timer does not work 2014-11-04 14:56:51 +01:00
Eloy Lafuente (stronk7) d91b8d1c6f weekly release 2.7.2+ 2014-11-04 11:35:14 +01:00
Eloy Lafuente (stronk7) 1b1634740e Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-11-04 11:35:09 +01:00
Damyon Wiese bddb47374d Merge branch 'MDL-45636-course_M27' of https://github.com/eSrem/moodle into MOODLE_27_STABLE 2014-11-04 12:07:07 +08:00
Eloy Lafuente (stronk7) 478ab0f602 Merge branch 'MDL-47883-27-foundlangfile' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-04 02:03:24 +01:00
Eloy Lafuente (stronk7) d5fc05e2a0 Merge branch '47969-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-04 01:57:07 +01:00
Eloy Lafuente (stronk7) 17a90193bb Merge branch '47968-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-04 01:55:19 +01:00
Petr Skoda 2f87351d54 MDL-47868 ws: verify upload areas 2014-11-04 01:50:03 +01:00
Petr Skoda e1331607a8 MDL-48013 calendar: force download of user files 2014-11-04 01:41:48 +01:00
Eloy Lafuente (stronk7) cc74fd9ea2 Merge branch '47917-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-04 00:03:58 +01:00
Damyon Wiese 44e712e9b7 MDL-47927 LTI: Use PARAM_TEXT and p() for returned messages and errors 2014-11-04 11:47:06 +13:00
Frederic Massart 932694ca59 MDL-47965 tag: Enforcing security of tag auto completion 2014-11-04 11:27:54 +13:00
David Monllao bac38b11ab MDL-47924 mod_lti: Fixing missing sesskey checkings
Also fixing a missing capability checking.
2014-11-04 11:03:00 +13:00
Yuliya Bozhko ab96babbb4 MDL-47190 Ensure badges cannot be awarded without a role
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-11-04 10:16:40 +13:00
Frederic Massart 324b018bbc MDL-47321 iplookup: Prevent guest users from using iplookup 2014-11-04 10:01:34 +13:00
Adrian Greeve 3e312a16f4 MDL-47697 mod_data: Fix group id change when editing.
When a teacher edits an entry in the database module
it would change the group ID to the one that the teacher
currently had selected.

Thanks to Steve Bond for providing a patch.
2014-11-04 09:58:09 +13:00
Juan Leyva 3aa9d93c7a MDL-45303 Web Services: forum_get_discussions ws misses permissions check 2014-11-03 21:53:42 +01:00
Juan Leyva 3b8876f5ef MDL-47766 web services: get_grades exposes hidden grades to students 2014-11-04 09:13:35 +13:00
John Okely 263f78b8b8 MDL-47921 mod_lti: Add access control to mod/lti/launch.php 2014-11-04 09:09:11 +13:00
Dave Cooper 04f2e83ce7 MDL-47050 core_wordlist: Updated wordlist to include only animals. 2014-11-04 09:06:13 +13:00
Amanda Doughty 90cc4dcd53 MDL-30968 mod/forum Fixed group link 2014-11-03 14:32:09 +00:00
Damyon Wiese 25612b59ee Merge branch 'MDL-48010_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-03 17:15:49 +08:00
Petr Skoda 84baa6b141 MDL-47287 prevent web access to phpunit boostrap 2014-11-03 17:10:56 +08:00
Marina Glancy 2cb907d11d Merge branch 'wip-mdl-45204-m27' of git://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-03 17:04:20 +08:00
Damyon Wiese 1dd7fab104 MDL-47275 Grades: Sum of grades bug in max grade with extra credit
Sum of grades is not calculating max grade with extra credit for students
2014-11-03 16:56:48 +08:00
Andreas Grabs 8bf49b7377 MDL-47865 mod_feedback - XSS through $searchstring in mod/feedback/mapcourse.php 2014-11-03 14:56:44 +08:00
Damyon Wiese d3e7b45d27 MDL-45538 Fix version bump. 2014-11-03 14:26:09 +08:00
Damyon Wiese 10b07bf8cc Merge branch 'wip-MDL-45538-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-03 14:25:45 +08:00
Damyon Wiese 07304c8ee7 Merge branch 'MDL-35008_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-11-03 14:04:41 +08:00
pau.ferrer-ocana c2b8c7c8c2 MDL-26447 gradebook: Default gradedisplaytype fixed for all locales 2014-11-03 13:56:56 +08:00
Damyon Wiese 2d10a2cebb Merge branch 'wip_MDL-47966_m27_defaultheaders' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-11-03 13:08:02 +08:00
Sam Hemelryk aba092e128 MDL-47917 cachestore_memcached: fixed get_many ordering 2014-11-03 14:55:25 +13:00
Sam Hemelryk f8bf49f137 MDL-48025 user: fixed typo in user_search HTML 2014-11-03 10:08:19 +13:00
Sam Hemelryk b6bf71702d MDL-47969 mod_survey: fixed HTML5 validation of index.php 2014-11-03 08:55:09 +13:00
Sam Hemelryk 5d45f54b6c MDL-47968 mod_forum: fixed search form HTML5 validation 2014-11-03 08:54:54 +13:00
AMOS bot b37e3a818b Automatically generated installer lang files 2014-11-02 00:05:38 +08:00
Marina Glancy 6eef37f045 MDL-46262 availability: validation of fields without value
Thanks to Tomasz Pawlik | CKO USl for the patch
2014-11-01 16:58:51 +08:00
Tim Hunt 82bf77561f MDL-48010 grade import from URL: don't corrupt the URL. 2014-10-31 19:53:34 +00:00
Tim Hunt c268bbc9e6 MDL-48008 gradeimport_xml: report errors usefully 2014-10-31 19:53:33 +00:00
Tim Hunt c3d1ced72e MDL-47797 quesion preview: improve the behat script
Tests a few more buttons, and also verify more of the UI.
2014-10-31 15:52:38 +00:00
Tim Hunt 78ac8f6045 MDL-47797 question preview: show more technical info
It is helpful for developers creating question types (at least) to be
able to see this.
2014-10-31 15:52:36 +00:00
David Mudrák 52184908fa MDL-47883 admin: Fix missing string in the plugin validation 2014-10-31 12:59:26 +01:00
Dan Poltawski cdb1de64e4 weekly release 2.7.2+ 2014-10-31 09:08:53 +00:00
Rajesh Taneja abacf844f9 MDL-45204 phpunit: Fixed test_localcachedir test
make_localcache_directory is the first call to make
localcache, which is already created by reset. So deleting
existing localcache directory will pass this test
2014-10-31 16:46:52 +08:00
Damyon Wiese 6bee9ff6ab MDL-47975 assign: Stop gap fix for random time fails. 2014-10-31 13:01:53 +08:00
Petr Skoda ac6e453d11 MDL-47966 Add default content type and encoding 2014-10-31 14:01:46 +13:00
Sam Hemelryk 244be92c8e Merge branch 'MDL-47875_MOODLE_27_STABLE' of https://github.com/crazyserver/moodle into MOODLE_27_STABLE 2014-10-31 11:15:21 +13:00
Iñaki Arenaza f7b5782d5c MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis
The group names we get from ldap_find_user_groups() can contain invalid LDAP
filter characters. So we need to escape them for LDAP filter usage.
2014-10-30 22:52:33 +01:00
Iñaki Arenaza 1d17b54861 MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis
As part of fixing MDL-43430, a typo has been detected in the
quoted alphanumeric characters (the '=' and '>' were transposed).
2014-10-30 22:52:33 +01:00
pau.ferrer-ocana 3d5e1f113d MDL-47875 choice: chat module strings not required from Choice anymore
AMOS BEGIN
 CPY [chatintro,mod_chat],[description,mod_choice]
AMOS END
2014-10-30 22:51:16 +01:00
pau.ferrer-ocana ecc8244e62 MDL-42875 users: Show only profile visible roles on participants list 2014-10-31 10:36:44 +13:00
Tim Hunt dd22636bef MDL-47990 qtype_multichoice: fix test response import/export 2014-10-30 18:26:00 +00:00
Jean-Michel Vedrine 6a59a3e073 MDL-35008 Lesson: url decode rules not applied to answers and responses 2014-10-30 13:25:29 +01:00
Marina Glancy 7892e8dd6a Merge branch 'MDL-25057-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-30 17:14:42 +08:00
Marina Glancy 6d5a4e733b Merge branch 'MDL-47569_CC_Errors27' of git://github.com/moodlerooms/moodle into MOODLE_27_STABLE 2014-10-30 16:16:32 +08:00
Marina Glancy eccad2d4bc Merge branch '47970-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-30 16:16:23 +08:00
David Monllao 9a08527acf MDL-46500 mod_data: Removing duplicate filemanager initialisations 2014-10-30 16:09:47 +08:00
Marina Glancy 0081072ff1 Merge branch 'MDL-29873_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-10-30 14:17:55 +08:00
Andrew Nicols 906ecbfd05 MDL-25057 mod_forum: Stop duplicating forum_read posts from cron
This also includes an upgrade script to delete the existing duplicates.
2014-10-30 13:34:42 +08:00
Ben Kelada aa39745d05 MDL-46500 filepicker: prevent error when element does not exist 2014-10-30 13:07:20 +08:00
Marina Glancy 7dcabab098 MDL-45538 files: restore missing records in draft areas 2014-10-30 10:46:59 +08:00
Sam Hemelryk eede7b3efe MDL-47970 mod_scorm: fixed HTML5 validation error 2014-10-30 14:56:04 +13:00
Mark Nielsen 3315c01e0f MDL-47569 backup: Do not close questions tag if never opened
This can happen when restoring quizzes that
do not have any questions.
2014-10-29 14:30:58 -07:00
Mark Nielsen d9e9e79954 MDL-47569 backup: Escape section summary for XML
This was causing the parsing of the XML
to fail because things like & were not
escaped.
2014-10-29 14:30:47 -07:00
Dan Poltawski 5906d379db Merge branch 'wip_MDL-40949_m27_pathsettings' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-10-29 14:20:26 +00:00
Michael Aherne f4ec918f9b MDL-47793 assign: Reset reveal identities 2014-10-29 11:20:05 +00:00
Julien Boulen aa4318a823 MDL-47584 database SQL: add debug info on connection error notices 2014-10-29 16:55:30 +08:00
Damyon Wiese 917d5e1caa Merge branch 'wip-MDL-47647-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-10-29 16:18:29 +08:00
Marina Glancy b33d633510 Merge branch 'MDL-47916-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-29 16:15:32 +08:00
Damyon Wiese f9aab389e6 Merge branch 'MDL-47790-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-10-29 15:49:57 +08:00
Daniel Kosinski df0a353377 MDL-46219 assignment: delete files when resetting assign activities 2014-10-29 15:39:24 +08:00
Damyon Wiese e92a430405 Merge branch 'MDL-47755_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-10-29 15:31:45 +08:00
Damyon Wiese cdb3a6b6c1 Merge branch 'wip-MDL-47796-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-10-29 15:16:14 +08:00
Damyon Wiese dad46c5c1f Merge branch 'MDL-47612-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-29 14:49:13 +08:00
Damyon Wiese e1cc83875f Merge branch 'MDL-47227_MOODLE_27_STABLE' of https://github.com/crazyserver/moodle into MOODLE_27_STABLE 2014-10-29 14:43:38 +08:00
Damyon Wiese c40485aeee Merge branch 'MDL-47201-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-10-29 14:27:17 +08:00
Adrian Greeve 99cf374a42 MDL-47796 mod_data: Fix display of group records.
When viewing entries as a teacher in separate group
mode, changing the group would result in random
entries being shown.
2014-10-29 14:09:34 +08:00
Damyon Wiese 203ef3bd3e Merge branch 'MDL-47898-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-29 13:36:40 +08:00
Dan Marsden af4417f0aa MDL-33939 gradingform_guide: use correct max grade for scales. 2014-10-29 13:23:46 +08:00
Damyon Wiese 37e7a3849b Merge branch 'wip-MDL-46517-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-29 13:13:58 +08:00
David Scotson fc8984234c MDL-40343 forum: indent less when mobile, nested
Changes the indenting of forum replies to be relative to the width of
the parent container, so the indent decreases as threads get nested
deeper. Also reduces the indent size automatically for smaller screen
sizes.
2014-10-29 12:55:37 +08:00
Andrea Bicciolo c00787ae08 MDL-47201 Reports: Read from multiple log stores in outline report 2014-10-29 12:48:43 +08:00
Andrew Nicols 2fe3a171c4 MDL-47930 mod_forum: Display all forum statuses correctly
It is possible for users with the mod/forum:managesubscriptions to
subscribe to forums with subscription disabled. This is handled by
forum_get_subscribe_link() already and should have been handled here all
along.
2014-10-29 11:53:13 +08:00
Marina Glancy 451ea7b118 MDL-46517 calendar: adjust display for DST
Thanks to Jo Matthews for providing a patch
2014-10-29 11:25:32 +08:00
Damyon Wiese a6113f4dd1 Merge branch 'MDL-47835_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-10-29 11:23:51 +08:00
Corey Wallis e8db7737da MDL-46517 calendar: adjust dates for DST
Change-Id: I269382031e4ffa714396f3d9ce2315a5c96d929c
2014-10-29 11:01:33 +08:00
David Monllao 321bfdbedf MDL-47835 block_recent_activity: Same entry keys order
insert_records() is sensitive to the order of the keys
assigned to the inserted objects (inserted as arrays in
this case). Now keys are assigned using the same order.
2014-10-29 10:53:23 +08:00
Damyon Wiese 86594f9a95 Merge branch 'wip-MDL-36987-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-29 10:38:56 +08:00
Petr Skoda d42ba3d0af MDL-40949 admin: Fix $CFG->preventexecpath hints
This setting restricts all local paths, not just
executables.
2014-10-29 10:47:33 +13:00
Dan Poltawski 3803574711 weekly release 2.7.2+ 2014-10-28 12:32:20 +00:00
Dan Poltawski 25c57e8cc2 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-28 12:32:18 +00:00
Juan Leyva d8c1ffd0a0 MDL-47916 web services: Fixed invalid returned value type 2014-10-28 10:28:38 +01:00
Pau Ferrer Ocaña 5776292b94 MDL-47227 admin: Fix user bulk selection over 1000 2014-10-28 08:52:00 +01:00
Kordan 43163295a5 MDL-47790 core_outputcomponents: added one more <tr> around <td clspan="xx"> when $table->data[] = "hr" is provided 2014-10-28 15:49:39 +08:00
Marina Glancy 63f1e3b287 Merge branch '47914-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-28 12:24:01 +08:00
Sam Hemelryk 09d83a4038 MDL-47183 post-integration fixes
* Fixed typo with context_module::instance
* Fixed use of $mod->get_context()
2014-10-28 15:50:17 +13:00
Sam Hemelryk 76b6d2e750 Merge branch 'MDL-47183-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-28 14:02:28 +13:00
Andrew Nicols f3e6ff8a6c MDL-47898 mod_quiz: Correct path when checking content_editable
Addresses a number of issues when using the text editor in a quiz using
secure mode.
2014-10-28 07:32:42 +08:00
Sam Hemelryk 61685bb0df MDL-47914 report_stats: better handling of user and mode 2014-10-28 11:52:51 +13:00
Sam Hemelryk c18c38f3f6 Merge branch 'wip-MDL-47585-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-28 09:28:17 +13:00
AMOS bot 3e0fd2ed8e Automatically generated installer lang files 2014-10-28 00:05:36 +08:00
Adrian Greeve 1a67124e67 MDL-47647 lib: Fix message unit test failure.
Messaging unit tests on Windows were failing because
of a comparison between two file paths. Part of the
path would have a forward slash instead of a backslash
and so would fail.
2014-10-27 16:42:00 +08:00
Damyon Wiese fc9ff77426 Merge branch 'MDL-47588_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-27 15:30:20 +08:00
Damyon Wiese ff8b2535d7 Merge branch 'm27_MDL-47210_IIS_PATH_INFO_Ignored_In_Required_Login_Pluginfile_Redirect' of https://github.com/scara/moodle into MOODLE_27_STABLE 2014-10-27 14:00:12 +08:00
Marina Glancy 7047ebb7a3 Merge branch 'MDL-47882_scorm_loadsco_invalid_html_27_STABLE' of git://github.com/MorrisR2/moodle into MOODLE_27_STABLE 2014-10-27 11:49:01 +08:00
Damyon Wiese 3217e572cb MDL-47690 Course: Remove unused variable from unit tests. 2014-10-27 11:27:55 +08:00
Damyon Wiese a4e7898729 Merge branch 'MDL-47690-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-27 11:27:40 +08:00
Damyon Wiese c187aa03c4 Merge branch 'wip-MDL-30358-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-27 10:31:11 +08:00
Matteo Scaramuccia 2ebfef8f7b MDL-47210 Files API: IIS, PATH_INFO ignored in required login redirect. 2014-10-26 08:05:23 +01:00
Ray Morris 784b3b9262 MDL-47882 SCORM: invalid HTML in loadSCO.php 2014-10-24 16:54:57 -05:00
Tim Hunt 8f089f100c MDL-47588 question behat tests: don't close the preview window.
If you do. Chrome + Selenium2 gets stuck (on Windows at least). Selenium
must be trying to send commands ot a window that does not exist any
more.
2014-10-24 17:48:39 +01:00
Tim Hunt 2be10633d8 MDL-47588 behat: fix switching back to the main window in Chrome
This fix is mostly based on what Colin Chambers found out. This commit
is a simplification of his work.

The problem is that the Chrome / Selenium 2 integration cannot swich to
a window with a blank name. The work-around applied here is, when we
switch away from an unnamed window, we set a name on it. Then we can use
that name to switch back.
2014-10-24 17:48:38 +01:00
Tim Hunt e6d8ca248d MDL-46088 quiz secure window: further Atto JS fixes. 2014-10-24 17:11:24 +01:00
Damyon Wiese d61b59175c MDL-46088 Quiz: Prevent alert when clicking in editor in secure popup 2014-10-24 17:11:16 +01:00
Dan Poltawski 8afccaf846 Merge branch 'MDL-46712-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-10-24 15:37:31 +01:00
Dan Poltawski 3d86260c08 Merge branch 'MDL-47780_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-10-24 15:19:49 +01:00
Dan Poltawski a0088bb79b Merge branch 'wip-MDL-47760-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-24 15:18:33 +01:00
Dan Poltawski f393fbb08b Merge branch '46518-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-24 15:16:56 +01:00
Dan Poltawski 73715b3aa8 Merge branch 'MDL-47804_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-10-24 15:14:38 +01:00
Dan Poltawski 61cd8bb3cd Merge branch '47608-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-24 15:13:16 +01:00
Dan Poltawski 19089bc416 Merge branch 'MDL-47397-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-24 15:09:55 +01:00
Dan Poltawski e6035a8b38 weekly release 2.7.2+ 2014-10-24 11:15:12 +01:00
Dan Poltawski edfa06b103 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-24 11:15:10 +01:00
Juan Leyva deb9221748 MDL-47690 web services: Fixed invalid return parameter type in mod_url 2014-10-24 10:30:08 +02:00
Adam Olley 09352c5677 MDL-47804 events: calendar_event_updated needs to accept a timestart == 0 2014-10-24 15:35:14 +10:30
Marina Glancy 779d68eb8a Merge branch 'MDL-47340-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-10-24 11:55:16 +08:00
Damyon Wiese 441a8a209b Merge branch '46499-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-24 11:03:36 +08:00
Damyon Wiese ba639bb069 Merge branch 'MDL-47740_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-24 09:50:41 +08:00
Sam Hemelryk e68b0e289d NOBUG: fixed whitespace 2014-10-24 14:44:11 +13:00
Sam Hemelryk 6606760811 MDL-46332 fixed whitespace 2014-10-24 14:34:46 +13:00
Sam Hemelryk c43bfca338 Merge branch 'MDL-46332-grouping-remove-button-27' of git://github.com/DanBennettUK/moodle into MOODLE_27_STABLE 2014-10-24 12:02:18 +13:00
Sam Hemelryk 1ecb6d4d1b Merge branch 'MDL-47555_27' of https://github.com/rlorenzo/moodle into MOODLE_27_STABLE 2014-10-24 11:17:04 +13:00
Sam Hemelryk 148a0db4cf Merge branch 'wip_MDL-47795_M27' of git://github.com/gjb2048/moodle into MOODLE_27_STABLE 2014-10-24 09:59:01 +13:00
gdharris cdc2fedcac MDL-46853 calendar: fix import of no duration events 2014-10-24 09:55:50 +13:00
Dan Poltawski 3c795ec9cb Merge branch 'MDL-47815-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-10-23 17:28:40 +01:00
Dan Poltawski e7b026846b Merge branch '47684-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-23 16:33:27 +01:00
Dan Poltawski db2ba9f335 Merge branch '47752-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-23 16:32:22 +01:00
Frederic Massart c3d5443a43 MDL-47397 assignfeedback_editpdf: Tests use reliable way to annotate PDF
The drag and drop step did not work, so we moved to using the stamps
to annotate the PDF. They do not rely on drag&drop and produce the same
effects.
2014-10-23 17:56:48 +08:00
Frederic Massart cc9e6ebbf7 MDL-47397 assignfeedback_editpdf: Copy stamps to other students in team
During a team submission the stamps were attached to the user that
was graded and not to the other users. This could lead to errors when
generating the PDF for each user.
2014-10-23 17:56:47 +08:00
Frederic Massart 04cc05c0d3 MDL-47397 editor_atto: Properly close confirm dialogue in Behat test 2014-10-23 17:56:47 +08:00
Damyon Wiese eba4b02677 MDL-47499 tasks: Scheduled tasks custom schedule is reset on upgrade.
Add a unit test for reset_scheduled_tasks_for_component and make sure it doesn't clear
customised schedules for existing tasks.
2014-10-23 10:23:12 +01:00
Marina Glancy eefedf7a06 Merge branch 'wip-MDL-47675-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-10-23 16:58:13 +08:00
Damyon Wiese 139c36d5d4 Merge branch '47077-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-23 16:10:11 +08:00
Damyon Wiese d7ee0ce9db Merge branch 'MDL-32616_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-23 12:03:32 +08:00
Adrian Greeve 9c630abcd7 MDL-47675 phpunit: Update unit tests to pass on MSSQL
Unit tests were failing on MSSQL. gc_collect_cycles() was
removed from the phpunit utils.php file to save time in running
the tests, but MSSQL doesn't clean up open files as well as
other databases.

This patch includes the garbage collection for the unit tests
that require it.
2014-10-23 08:54:35 +08:00
Tim Hunt 191dc626dd MDL-32616 question engine: set_max_mark_in_attempts MySQL perf
The MySQL (& Maria DB) query 'optimizer' was failing to handle this
query, so for that DB only, we give it an equivalent query that it can
get right.

With unit test.
2014-10-22 11:01:20 +01:00
Tim Hunt 4b9d9d281c MDL-32616 question engine: move unit test to better name 2014-10-22 11:01:19 +01:00
Damyon Wiese eceb11d200 MDL-47815 assign: Fix random unit test fails
This test was failing when it was run really slowly (looking at you oracle).
2014-10-22 17:01:53 +08:00
Andrew Nicols 9cc49c2f58 MDL-47706 gradebook: Update pageload time between changes
Since MDL-38732 we reject changes if another change has been made more
recently. As a result, if process_data is called, and then we roll into the
next millisecond period before process_data is called again, the change is
rejected.

Different errors were seen because the millisecond rollover occurred at
different time within the test.

Different error conditions were seen because not all of the tests check for
an error from the call to process_data(), instead just checking that the
value had been updated correctly.
2014-10-22 13:19:23 +08:00
Damyon Wiese 2fe83c2c9b MDL-46527 Grades: Webservice only returns first activity grade. 2014-10-22 11:22:15 +08:00
Damyon Wiese c274f4dd62 Merge branch 'MDL-46527-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-22 10:24:06 +08:00
AMOS bot 9e6714f148 Automatically generated installer lang files 2014-10-22 00:07:40 +08:00
Gareth J Barnard 87e7e6a130 MDL-47795 SCORM: SCORM report not a report. 2014-10-21 15:42:32 +01:00
Tim Hunt 5151147372 MDL-47740 question engine: let qs update variant later if appropriate
Variant has two purposes. First to determine which version of the
question the student will see. Hence it is used to set up the state
of the quetsion when the question is started. Then the internal state of
the question is saved in the first step.

Once that has been done, the variant number is purely informative, and
just used to break down the statistics.

In some cases (the one I have in mind is qtype_opaque) then there is a
complex randomisation process, which may lead to several inital variant
numbers acutally giving the same version of the question. In this case
it is nice if the question can update the stored variant number, to make
the statistics more meaningful.
2014-10-21 11:44:10 +01:00
Juan Leyva 0fdb3d3fdc MDL-46527 grades: grade_get_grades external function rewritten 2014-10-21 12:33:40 +02:00
Mark Nelson 702e2eb195 MDL-47780 core: corrected docs for get_user_capability_course() 2014-10-21 00:53:19 -07:00
Damyon Wiese 7cdb32a8ea Merge branch 'wip_MDL-41593_m27_preventexecdefault' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-10-21 13:23:33 +08:00
Yuliya Bozhko 08574f01cc MDL-47755 badges: Fix internal message output
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-10-21 16:28:38 +13:00
Sam Hemelryk b12d387f93 Merge branch 'm27_MDL-36669_UFO_references_in_filelib' of https://github.com/scara/moodle into MOODLE_27_STABLE 2014-10-21 15:17:59 +13:00
Matteo Scaramuccia 8cdcbf3455 MDL-36669 Filters: Remove the last ref to the UFO library. 2014-10-20 23:23:25 +02:00
Dan Poltawski 41ce6946d2 Merge branch 'MDL-38172_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-10-20 18:28:48 +01:00
Dan Poltawski 0930a859ac Merge branch 'MDL-47651_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:44:35 +01:00
Dan Poltawski 2c1a9dcca6 Merge branch 'MDL-47666_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:31:58 +01:00
Dan Poltawski 813e70a35a Merge branch 'MDL-47711_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:28:54 +01:00
Dan Poltawski 520308af7e Merge branch 'MDL-47726_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:26:38 +01:00
Dan Poltawski 7bb3575813 Merge branch 'MDL-47673_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:21:43 +01:00
Tim Hunt 362d958e5a MDL-47726 availability: fix tests when there is a text custom field
This unit tests assumed that on a fresh install, there were no custom
user-profile fields. Given some third-party plugins, that assumption is
false.
2014-10-20 16:15:59 +01:00
Tim Hunt d313ad40e6 MDL-47711 behat: make it easier to copy the init.php command. 2014-10-20 12:05:50 +01:00
Tim Hunt bb7030cf98 MDL-47673 quiz generator: default grade 100 & fix review options
The review option defaults need to be like what you get from the editing
form, no what is stored in the database, or they don't work!
2014-10-20 12:05:42 +01:00
Tim Hunt 9812ea0a62 MDL-47666 DB auth & enrol: unit tests fail with custom DB drivers
Changed to used $DB->get_db_family, rather than hard-coding the list of
class names.
2014-10-20 12:05:34 +01:00
Tim Hunt c5b928ce4a MDL-47651 quiz responses: allow for qtypes without responses 2014-10-20 12:05:26 +01:00
Jetha Chan f5beaa7e00 MDL-47340 action_menu: selector, RTL, consistency fixes 2014-10-20 17:10:05 +08:00
Marina Glancy d8a7d44a65 Merge branch 'wip_MDL-47754_m27_installredir' of git://github.com/skodak/moodle into MOODLE_27_STABLE 2014-10-20 17:04:42 +08:00
Dan Bennett bbe7727499 MDL-46332 : Display of 'Remove' button in Add/Remove Groups in Grouping
Fixed styling of Add/Remove Groups in Grouping to now use the same
layout as the Group Members page.
This fixes the issue with buttons being unaligned and introduces
consistency between pages.
2014-10-20 09:47:23 +01:00
Marina Glancy 97f240e7b6 Merge branch 'MDL-38065-fix-27' of git://github.com/jmarthaler/moodle into MOODLE_27_STABLE 2014-10-20 14:08:34 +08:00
Marina Glancy a23348da27 MDL-47760 grades: dim category name if hidden 2014-10-20 14:05:50 +08:00
Petr Skoda 49e057453f MDL-47754 install: fix redirect loop 2014-10-20 12:53:04 +13:00
Sam Hemelryk 8d76895d08 MDL-46518 navigation: site glossaries now expand properly 2014-10-20 11:20:13 +13:00
Sam Hemelryk 19e095a757 MDL-47608 cachestore_mongo: fixed unit test error
If you configured your site to run mongo unit tests and had
the mongo extension and backend installed but did not have the
mongo service running you would get a fatal error when running
the unit tests.
That problem has been fixed by checking the mongo test instance
is ready before returning it.
2014-10-20 11:04:54 +13:00
Sam Hemelryk f7492e8526 MDL-47077 report_participation: fixed pagination in groups 2014-10-20 11:01:31 +13:00
Sam Hemelryk 0cd220c870 MDL-46499 navigation: better enrolled course limit
We now user $CFG->navcourselimit to limit the number of
courses shown in the navigation when browsing another users
full profile. Previously it showed all courses which caused
some slowdown.
2014-10-20 10:58:37 +13:00
Sam Hemelryk 7c23f7f865 MDL-47752 grading: fixed bugs with the modgrade element 2014-10-20 10:34:09 +13:00
Sam Hemelryk fb7c991ed5 MDL-47684 mod: better validation of rating options 2014-10-20 08:44:27 +13:00
Jean-Michel Vedrine fcc5996cda MDL-29873 Lesson: Essays not shown on grade page with SQL server 2014-10-18 19:57:46 +02:00
Jean-Michel Vedrine 458cb3927a MDL-38172 Lesson: Additional Info not displayed at end of lesson 2014-10-17 17:12:40 +02:00
Dan Poltawski 3eeb53655e weekly release 2.7.2+ 2014-10-17 14:31:38 +01:00
Dan Poltawski 5728a1f51c Revert "MDL-47684 mod: better validation of rating options"
This reverts commit c58758d207.
2014-10-17 14:28:19 +01:00
Dan Poltawski c91ddd50e6 Revert "MDL-44548 mod_scorm: force an external sync to check for updated files."
This reverts commit 8af706e33b.
2014-10-17 09:31:29 +01:00
Jon Marthaler 4fab973d4b MDL-38065 gradebook: Fix issue with hidden categories breaking rowspan.
Hidden subcategories break the rowspan in the gradebook; this fix corrects
the calculation of the rowspan.
2014-10-16 22:26:45 -05:00
Dan Poltawski b41bcab492 Merge branch '47631-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-16 15:04:14 +01:00
Dan Poltawski 875f3b001c Merge branch 'm27_MDL-44548' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-10-16 11:46:34 +01:00
Dan Poltawski bb4245f1a4 Merge branch 'MDL-47710_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-16 11:35:29 +01:00
Marina Glancy c6458c381a MDL-36987 auth_manual: fix config for field locking
Thanks to Sergey for the patch
2014-10-16 18:17:25 +08:00
Tim Hunt 898f7f9eab MDL-47710 qformat_gift: fix bahat fails due to different ids in exports 2014-10-16 11:04:44 +01:00
Dan Poltawski af236997dd Merge branch '47684-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-16 11:02:37 +01:00
Dan Poltawski 5033b3cf73 Merge branch 'MDL-47657-27' of git://github.com/gurgus/moodle into MOODLE_27_STABLE 2014-10-16 10:52:59 +01:00
Dan Poltawski 7d92cb5719 Merge branch 'MDL-47686-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-10-16 10:40:03 +01:00
Damyon Wiese 5d82824d6d Merge branch 'MDL-47667_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-16 13:17:23 +08:00
Sam Hemelryk c58758d207 MDL-47684 mod: better validation of rating options 2014-10-16 16:24:59 +13:00
Dave Cooper 255d191a1d MDL-47657 mod_glossary: Fixed wrong error message on edit timeout. 2014-10-16 09:44:10 +08:00
Sam Hemelryk 85e3c16479 Merge branch 'MDL-47594_M27' of git://github.com/kordan/moodle into MOODLE_27_STABLE 2014-10-16 11:05:02 +13:00
Sam Hemelryk 30cc99cd98 Merge branch 'wip-MDL-47629-MOODLE_27_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_27_STABLE 2014-10-16 10:31:28 +13:00
Yolanda Ordóñez Rufat e1250d89fb MDL-47466 calendar: fixed error ORA-01795 in calendar_get_events 2014-10-15 14:19:23 +02:00
Damyon Wiese a14b534965 Merge branch 'wip-MDL-47613-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-15 16:58:48 +08:00
Damyon Wiese 6d126348e2 MDL-47686 assign: Fix restoring from a mod_assignment backup.
This was only working for admins.
2014-10-15 15:58:32 +08:00
Dan Poltawski 8b3c12ec5b Merge branch 'MDL-38732-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-15 08:41:13 +01:00
Dan Marsden 0b2494f82d MDL-47431 advanced grading: correct use of frankenstyle names for consistency 2014-10-15 14:56:10 +08:00
Damyon Wiese 7364b0fea5 Merge branch 'MDL-47646_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-15 14:30:05 +08:00
Damyon Wiese b57cfa8462 Merge branch 'wip-MDL-47572-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-15 14:09:07 +08:00
Damyon Wiese f6b9c0f77b Merge branch 'wip-MDL-47583-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-15 13:50:38 +08:00
Frederic Massart f1c933f470 MDL-38732 gradereport_grader: Undefined variable in unit tests 2014-10-15 12:23:34 +08:00
Marina Glancy c396f64224 MDL-30358 forms: strict validation is too strict 2014-10-15 11:58:09 +08:00
Kevin Wiliarty 295f32737f MDL-47629 quiz review: display cloze feedback on top of "Check" button 2014-10-14 15:40:05 -04:00
Dan Poltawski 450e3f27c9 Merge branch 'MDL-38732-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-14 19:02:11 +01:00
Dan Poltawski 45f4833f90 weekly release 2.7.2+ 2014-10-14 18:03:14 +01:00
Dan Poltawski 05c1422566 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-14 18:03:11 +01:00
Dan Poltawski a58d2935dd MDL-46235/MDL-46971 mysql_compress_rows: fix typo 2014-10-14 15:12:01 +01:00
Dan Poltawski 7252078d48 Merge branch 'wip_MDL-46235_m27_innodbtext' of github.com:skodak/moodle into MOODLE_27_STABLE 2014-10-14 12:27:03 +01:00
Tim Hunt fd03bcae29 MDL-47667 profile unit tests: don't assume none by default.
E.g. if an add-on creates a user profile field on install, the test was
failing.
2014-10-14 12:12:05 +01:00
Damyon Wiese 0cda7b5785 Merge branch '46151-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-14 15:33:52 +08:00
Sam Hemelryk d1a370838c MDL-46151 cachestore_memcache: set_many now uses set 2014-10-14 20:04:20 +13:00
Frederic Massart 84dd6d42ce MDL-38732 gradereport_grader: Handle simultaneous graders 2014-10-14 13:50:17 +08:00
Adrian Greeve 2baeeeb9fa MDL-46546 core_grades: Move error checking after csv load. 2014-10-14 10:31:03 +08:00
Damyon Wiese 0914be8afe MDL-46235 Admin: Fix typos in mysql_compressed_rows.php cli script 2014-10-14 10:04:41 +13:00
Sam Hemelryk 4ad4c19b58 MDL-46151 cachestore_memcache: now checks extension version for support 2014-10-14 08:27:33 +13:00
AMOS bot a35e7562d5 Automatically generated installer lang files 2014-10-14 00:05:39 +08:00
Tim Hunt 8c0c30dd66 MDL-47646 CURL redirect unit test: handle broken servers 2014-10-13 15:53:26 +01:00
Andrew Nicols 6e2ae29005 MDL-47612 gradereport_grader: Remove max-width for RTL
For some reason, Safari behaves incorrectly when dealing with RTL
content where the table has a max-width of 100%.
2014-10-13 11:28:54 +08:00
Adrian Greeve cdc1f7f709 MDL-46546 gradebook: Grade import gives error on bad csv upload. 2014-10-13 10:48:40 +08:00
Sam Hemelryk d3046f1761 MDL-47631 report_participation: fixed filtering by letter 2014-10-13 12:28:31 +13:00
Rex Lorenzo 5719e3f0fa MDL-47555 core_availability: Issue with page layout & grade restriction
* Set pagelayout before getting section info, otherwise conditional activity renderers will default to the default 'base' layout.
2014-10-10 14:57:41 -07:00
Dan Poltawski 6a10ec4260 weekly release 2.7.2+ 2014-10-10 12:08:54 +01:00
Dan Poltawski 124da5b9bf Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-10 12:08:51 +01:00
Marina Glancy 2d022e4c3e MDL-47613 wiki: allow searching several words
Thanks to Sandeep B for suggested solution
2014-10-10 16:34:04 +08:00
Kordan 893ded8a91 MDL-47594 core_accesslib: removed three useless lines of code 2014-10-10 08:44:07 +02:00
Dan Marsden 8af706e33b MDL-44548 mod_scorm: force an external sync to check for updated files. 2014-10-10 15:14:50 +13:00
AMOS bot ddda9e2d5f Automatically generated installer lang files 2014-10-10 00:05:31 +08:00
Dan Poltawski 60f462b19d MDL-47497 qformat_gift: fix bad backported behat test 2014-10-09 13:24:24 +01:00
Marina Glancy b530fdbb36 MDL-47585 stats: fixed incorrect user dropdown 2014-10-09 14:35:15 +08:00
Dan Poltawski 79d84a5c72 Merge branch 'MDL-46647-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-09 07:10:19 +01:00
Marina Glancy a8812800e5 MDL-47583 atto_managefiles: correctly decode filename 2014-10-09 10:58:44 +08:00
Marina Glancy 3ef132fe0e MDL-47583 tinymce_managefiles: correctly decode filename 2014-10-09 10:55:37 +08:00
Sam Hemelryk 15dfb316cf Merge branch 'MDL-46984_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-10-09 09:16:47 +13:00
Dan Poltawski 92cdd5338b Merge branch 'MDL-47536_27' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2014-10-08 15:24:39 +01:00
Damyon Wiese d682a9d31d Merge branch 'wip-mdl-46987-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-10-08 21:35:08 +08:00
Tim Hunt da1e9ff3af MDL-47497 qformats gift and xml: basic test of export.
Really, this is just to test the new behat setps, as much as anything.

Note that the details of what is written to the export files is tested in
the unit tests.
2014-10-08 19:54:07 +08:00
Tim Hunt 74d0792515 MDL-47497 behat: steps for basic download testing.
These steps were created by sam marshall and Jes Ackland-Snow at the Open
University. I just altered them to make them a bit more generic, and
submitted them to Moodle core, at the point when I wanted to reuse them
in another plugin.

This commit introduces two new steps:

Then following "XXX" should download "YY" bytes
Then following "XXX" should download between "YY" and "ZZ" bytes

At the moment, this only works for links with href attributes.
2014-10-08 19:54:07 +08:00
Damyon Wiese 3a77bc290a Merge branch 'wip-MDL-47492-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-08 16:55:48 +08:00
Marina Glancy 1e10504ff8 MDL-47572 libraries: modify unittest to avoid random timing fail
Thanks to Nigel Cunningham
2014-10-08 10:59:46 +08:00
Sam Hemelryk a4534af8b7 Merge branch 'MDL-47470-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-10-08 12:21:41 +13:00
Sam Hemelryk 2cfba2cb2e Merge branch 'MDL-47474-27' of https://github.com/bostelm/moodle into MOODLE_27_STABLE 2014-10-08 11:52:23 +13:00
Sam Hemelryk 80165b6ee8 Merge branch 'MDL-47481-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-10-08 11:51:38 +13:00
Sam Hemelryk 2e16cac8a2 Merge branch 'MDL-47484_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-10-08 11:40:53 +13:00
Sam Hemelryk 80802921d4 Merge branch 'MDL-46182_MOODLE_27_STABLE' of https://github.com/NeillM/moodle into MOODLE_27_STABLE 2014-10-08 11:28:32 +13:00
Sam Hemelryk e3eea31d67 Merge branch 'MDL-28075_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-08 10:57:22 +13:00
Sam Hemelryk dae0eba253 Merge branch 'MDL-46391-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-10-08 10:45:37 +13:00
Sam Hemelryk 94b702b49b Revert "MDL-46978 gradebook: Edit grade item changes visibility of category"
This reverts commit a7566c53e5.
2014-10-08 10:37:29 +13:00
AMOS bot 3281f6b0ad Automatically generated installer lang files 2014-10-08 00:05:28 +08:00
Dan Poltawski c2b4959b36 Merge branch 'MDL-47518_27' of https://github.com/rlorenzo/moodle into MOODLE_27_STABLE 2014-10-07 14:33:07 +01:00
Frederic Massart 256616c5e0 MDL-46647 core_grades: Adding tests for fetch_all_helper() 2014-10-07 15:26:40 +08:00
Eloy Lafuente (stronk7) 1d09472f1f MDL-46647 grades: Fix fetch_all_helper() towards cross-db
That helper, used to fetch information from DB by all the grade_object
chidren classes was not behaving properly handling TEXT/CLOB columns.

Instead of creating a property within every class listing the
existing columns, it seems to be a better solution to instrospect
the database metadata (cached) to ensure the correct SQL is generated
in every case.
2014-10-07 15:26:40 +08:00
Sam Hemelryk 4e6d7fb30b Merge branch 'MDL-36460-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-07 15:16:59 +13:00
Marina Glancy fce57fd26e MDL-31936 workshop: version bump and @since phpdocs 2014-10-07 10:10:12 +08:00
Marina Glancy 58f87868d0 Merge branch 'MDL-31936-27-workshop-reset' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-10-07 10:10:06 +08:00
Petr Skoda e22af76803 MDL-41593 admin: use default setting if preventexecpath active
This resolves problems when installing Moodle
and addons when preventexecpath active.

Please note the admin_setting_configfile is still
incorrectly restricted - this will be resolved by
MDL-40949.
2014-10-07 11:30:32 +13:00
Sam Hemelryk 98844557ae Merge branch 'MDL-46295-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-10-07 10:36:53 +13:00
David Mudrák abb876c334 MDL-31936 workshop: Improve unit tests for the course reset support 2014-10-06 23:30:18 +02:00
Sam Hemelryk d5eea92499 Merge branch 'MDL-46978-27' of https://github.com/danielneis/moodle into MOODLE_27_STABLE 2014-10-07 10:26:25 +13:00
David Mudrák 5de218bcb3 MDL-31936 workshop: Generator able to create submissions and assessments
This is a basic implementation of the actual content generation in the workshop
generator. Note the we do not generate actual grading form data (which is what
the grading strategy plugins would do), just their results.
2014-10-06 23:13:54 +02:00
David Mudrák fcb3fe7238 MDL-31936 workshop: Add more options to the course reset form
This is built upon original work by Michael Hughes. We now have separate
settings for deleting workshop submissions, assessments and for resetting the
workshop phase.
2014-10-06 23:13:53 +02:00
David Mudrák 5d0c6ae61e MDL-31936 workshop: Delete attachments on record removal
The methods workshop::delete_submission() and workshop::delete_assessment() did
not delete files (embedded and attachments) associated with the given
submission or assessment. This is fixed now.

Additionally, the delete_assessment() method now cleans-up records from the
table workshop_grades, too. This internal workshop API still does not give
workshop subplugins a chance to clean up their data, should they store them in
their own tables instead of the workshop_grades one. This should be improved in
the future yet.
2014-10-06 23:13:53 +02:00
David Mudrák 9d873205b1 MDL-31936 workshop: Fix overall feedback content processing order
This is unrelated to the issue but was spotted while testing it. The order of
format_text() and file_rewrite_pluginfile_urls() was incorrect and threw
debugging message. Fixed now.
2014-10-06 23:13:53 +02:00
Dan Poltawski 647c6bf8a5 Merge branch 'MDL-46054-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-06 16:01:31 +01:00
Dan Poltawski 8669550962 Merge branch 'MDL-45504_27' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2014-10-06 15:48:11 +01:00
Dan Poltawski 17bdcc11aa Merge branch 'MDL-47426_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-06 08:56:26 +01:00
Gregory Faller d2d568a034 MDL-46712: Center EditPDF window on browser resize / zoom 2014-10-06 14:54:45 +08:00
Andrew Nicols ac4f596acd MDL-47183: viewhiddenactivities should use the module context
Thanks to Paulo Matos for the forum part of this change.
2014-10-06 12:22:09 +08:00
Eloy Lafuente (stronk7) 24b4ee9814 MDL-47536 timezones: update to 2014h (2296 rules) 2014-10-06 01:55:15 +02:00
Eloy Lafuente (stronk7) 2e261e4a88 MDL-45504 environment: define 2.8 requirements
No changes from 2.7, so this is a simple copy of them.

The MyISAM case (MDL-46064) will be considered for 2.9.
2014-10-06 01:16:28 +02:00
Sam Hemelryk b2ea054081 Merge branch 'm27_MDL-47316' of git://git.catalyst.net.nz/moodle-r2 into MOODLE_27_STABLE 2014-10-06 11:15:50 +13:00
AMOS bot db94a9a86e Automatically generated installer lang files 2014-10-05 00:05:34 +08:00
Daniel Neis Araujo a7566c53e5 MDL-46978 gradebook: Edit grade item changes visibility of category 2014-10-03 14:08:27 -03:00
Neill Magill 68153616be MDL-46182 Inefficient query during Moodle upgrade on course_section table.
This part of the code is changing an index on the course_sections table to be unique, for this to happen in the upgrade script the index must be deleted and then the new version added.

Before this change the following was being done:

* The index is removed
* A query to delete records that were not unique on this index is performed
* The unique version of the index is added

After this change the following happens:

* A query to delete records that were not unique on this index is performed
* The index is removed
* The unique version of the index is added

When the original index is present the query uses it, which greatly improves the execution plan.

Before the change an upgrade on a site with around 387967 course_section records the upgrade would be stuck on the delete query for many hours, after the change the time can be measured in minutes.
2014-10-03 10:25:54 +01:00
Michael Hughes 079944a878 MDL-31936 workshop: Add unit tests for the workshop reset 2014-10-03 11:06:46 +02:00
Michael Hughes a55a982746 MDL-31936 workshop: Initial implementation of the course reset support 2014-10-03 11:03:47 +02:00
David Mudrák ad3d8dbaa3 MDL-44536 workshop: Fix missing phpDoc for user report callbacks 2014-10-03 10:00:16 +02:00
David Mudrák 78ed559f5f MDL-44536 workshop: Instantiate with the plain course module record
When the workshop class constructor signature was designed, the class
cm_info did not exist yet. Instead, plain course modules records were
used everywhere - including the $mod parameter in the
workshop_user_complete() callback. Even if cm_info is backwards
compatible with the plain data record when it comes to behaviour, it
must not be passed where the workshop API expects the stdClass (coding
error is thrown).

Alternative solution would be to remove the type hinting in the workshop
constructor. That is what the 'assign' class does, for example (the
inline docs describe the expected type to be stdClass, but that is not
forced via the method declaration).

As the problem seems to be pretty sole, I prefer not touching the
workshop internal API for now. So we let the cm_info degrade back into
the stdClass to make the workshop constructor happy without significant
performance lost.
2014-10-03 10:00:16 +02:00
Andrew Nicols fbb6559b82 MDL-36460 mod_forum: Restrict forum subsription list based on availability info 2014-10-03 11:56:43 +08:00
Rex Lorenzo d0b0227d4e MDL-47518 report_log: Logfiles of single users no longer accessible
* Removing join on courseid if it is the SITEID.
2014-10-02 16:35:02 -07:00
Tim Hunt f812f9b6d2 MDL-28075 question editing: tidy code
Remove an unnecessary else (the if, and else if, always end in a redirect)
and unindent that code.
2014-10-02 21:55:05 +01:00
Tim Hunt e680e70098 MDL-28075 question editing: sort out nav bar when editing in a quiz
If you edited a question from the Edit quiz page in a quiz, the navigation
bar was far too long. This was due to some odd code that was trying too
hard to be clever.

Instead, editing a question is now always treated as being logically within
the question bank for the purposes of navigation. That is, even if the
returnurl will end up taking you back to where you where when you have finished.
2014-10-02 21:54:29 +01:00
Tim Hunt 25a487b90a MDL-47426 assign local roles: rewrite query for better performance.
This is an extremely dangerous query, because it includes the user
table twice, along-side two other potentially large tables,
role_assignments and user_enrolments.

The solution is to rewrite the query so that:

1. The subquery is JOINed, not WHERE ... INed. Typically query
   optimisers handle the JOIN case better.

2. Before the join was role-assignments <-> users <-> subquery.
   That is, everything was linked to u.id.

   Now the linking is role-assignments <-> subquery <-> users,
   so the SELECT DISTINT eu1_u.id FROM {enrolled users} is central.
   That seems to send a strong hint to the query optimiser about
   a good order to execute the query.
2014-10-02 17:10:57 +01:00
Dan Poltawski 29507f2816 weekly release 2.7.2+ 2014-10-02 15:19:05 +01:00
Dan Poltawski c9a4dda024 NOBUG: Fixed file access permissions 2014-10-02 15:19:05 +01:00
Dan Poltawski 885b34c751 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-02 15:19:01 +01:00
sam marshall 805122a72f MDL-47481 Availability: Profile condition error if no users 2014-10-02 10:47:06 +01:00
Dan Poltawski 23ba64bdc3 Merge branch 'MDL-37707-27-fixup' of https://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-02 09:50:50 +01:00
Marina Glancy b1cdf13013 MDL-47492 core_grades: Behat test for using scales and mingrade in gradebook 2014-10-02 15:59:53 +08:00
Marina Glancy f4df7d7961 MDL-47492 behat: refer to table column indexes instead of names 2014-10-02 15:59:48 +08:00
Sam Hemelryk 670eb0f171 Merge branch 'MDL-47408-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-10-02 17:31:10 +13:00
Dmitry Nefedov 0d7c8bb4b0 MDL-47408 user: Add checking before adding blog's link.
Checking enableblogs  and bloglevel, userid, constant  BLOG_USER_LEVEL.
2014-10-02 12:21:32 +08:00
Willy Lee 1da93e09d0 MDL-46295 course: add search box to all course listings, manage button when appropriate 2014-10-01 22:37:03 +08:00
Henning Bostelmann cdf3cdd608 MDL-47474 Calendar export: Fix user id in authorization check 2014-10-01 15:24:50 +01:00
Dan Poltawski f857cd49d9 Merge branch 'MDL-47214-27' of github.com:andrewnicols/moodle into MOODLE_27_STABLE 2014-10-01 08:38:20 +01:00
Andrew Nicols 9c8f956e9d MDL-47214 core: IPs should be cleaned 2014-10-01 15:29:30 +08:00
Adam Olley 8e0093973f MDL-47484 atto_indent: Prevent loss of rangy markers in some cases 2014-10-01 13:56:53 +09:30
Frederic Massart 6cc503ee87 MDL-37707 mod_assign: Prevent user from changing grouping in team submissions 2014-10-01 11:29:10 +08:00
Sam Hemelryk c00fb90718 Revert "MDL-47033 general: Fix incorrect use of 'course' layout"
This reverts commit 92f89f593c.
2014-10-01 15:49:25 +13:00
Sam Hemelryk f0f3d01025 Merge branch 'm27_MDL-47404' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-10-01 15:38:07 +13:00
Dan Marsden ac1751b29a MDL-47404 filelib: Prevent flash from treating files as uploads
added to send_stored_file as well.
2014-10-01 15:08:51 +13:00
Sam Hemelryk c90137561b MDL-47428 language: fixed typo 2014-09-30 23:43:35 +02:00
zbdd 5d39d47ab6 MDL-42993 auth: spaces removed from usernames by default only
Functionality by default does not change with this patch.
However spaces are no longer stripped when cleaning usernames IF
$CFG->extendedusernamechars has been set.

Also included 2 trim statements where small issues were found with reading
external usernames in that  were not filtered for trailing whitespaces.
2014-10-01 08:29:28 +13:00
Dan Poltawski 622c15ca7c MDL-47470 behat: fix 'I navigate to' exception
When a child page is not found
2014-09-30 15:30:11 +01:00
Yolanda Ordóñez Rufat 91d693643b MDL-47466 calendar: use get_in_or_equal() in function calendar_get_events to fix problem with ORA-01795 2014-09-30 14:07:26 +02:00
Dan Poltawski 3ddbd23f09 Merge branch 'MDL-47385-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-09-30 11:41:40 +01:00
Dan Poltawski 2e17bba40b Merge branch 'm27_MDL-47097' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-30 08:31:01 +01:00
Dan Poltawski 85cb248688 Merge branch 'MDL-32275-27' of git://github.com/gurgus/moodle into MOODLE_27_STABLE 2014-09-30 08:29:03 +01:00
Julien Boulen 59ae54dffe MDL-46984 core_course: added grouping name for activities with no link 2014-09-29 20:45:14 -07:00
Stephen Bourget c4829d57e2 MDL-46084 Calendar: Fix importing of full day events from Google 2014-09-30 11:28:43 +13:00
Sam Hemelryk ca4bb8441c Merge branch 'm27_MDL-47170' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-30 10:03:17 +13:00
Sam Hemelryk 6657094417 Merge branch 'MDL-47214-ClientIp-wrong-with-multiple-proxies_27_STABLE' of https://github.com/mhughes2k/moodle into MOODLE_27_STABLE 2014-09-30 08:48:28 +13:00
Dan Poltawski 196f94ec09 Merge branch 'MDL-46920-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-09-29 16:25:48 +01:00
Juan Leyva 495ab49e82 MDL-46054 web_services: Fixed invalid parameter definitions 2014-09-29 16:02:06 +02:00
Marina Glancy 7f6875287f MDL-46054 web_services: wrong key in exception string 2014-09-29 16:02:06 +02:00
Marina Glancy 395c27abcf MDL-46054 web_services: bug fix in core_user_get_users
Thanks to Mikko Rantanen for the patch
2014-09-29 16:01:53 +02:00
Dan Poltawski b79a21df51 Merge branch 'wip-mdl-47154-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-09-29 12:50:12 +01:00
Dan Poltawski 6fdf8bcc53 Merge branch 'MDL-47069-27-plugin-dependency' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-09-29 12:46:53 +01:00
Dan Poltawski 6b57d95fe3 Merge branch 'MDL-47322-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-29 10:55:13 +01:00
Dan Poltawski 43bac317f8 Merge branch 'wip_MDL-47333_m27_fonts' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-09-29 10:44:27 +01:00
Dmitry Nefedov 3234f4324e MDL-46391 messages: Add search button under contact list.
Add search button to only Message navigation -> Contacts section.
2014-09-29 17:19:30 +08:00
Sam Hemelryk 6e0760db2b Merge branch 'MDL-47033_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-09-29 15:18:09 +13:00
Sam Hemelryk 1fcb39fbb2 Merge branch 'wip-MDL-47398-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-29 14:35:15 +13:00
Sam Hemelryk 3d9daae5a9 Merge branch 'MDL-47408-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-09-29 14:32:51 +13:00
Sam Hemelryk 5f78ef781f Merge branch 'm27_MDL-47404' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-09-29 14:23:31 +13:00
Sam Hemelryk c05e69c836 Merge branch 'MDL-39190_27' of https://github.com/pauln/moodle into MOODLE_27_STABLE 2014-09-29 14:20:08 +13:00
David Mudrák e0acb17830 MDL-47411 admin: Check if the plugin is a git submodule on uninstalling
Credit goes to PJ King. I was trying to add unit tests for this new
behaviour but it turned out there are many hard-coded dependencies and
it's not easy to make the whole machinery support alternative location
of testable (fake) plugins.
2014-09-29 01:43:57 +02:00
Sam Hemelryk dfefc00f56 Merge branch 'MDL-37707-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-09-29 11:35:32 +13:00
Sam Hemelryk 3f6243f4be Merge branch 'MDL-42974-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-29 11:21:24 +13:00
Sam Hemelryk 015d47f67d Merge branch 'MDL-47378-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-09-29 11:19:10 +13:00
Sam Hemelryk 37fe4b68ea Merge branch 'MDL-43566-27' of https://github.com/willylee/moodle into MOODLE_27_STABLE 2014-09-29 09:51:45 +13:00
Sam Hemelryk 95944b32fd Merge branch 'MDL-47381_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-29 09:06:42 +13:00
Sam Hemelryk 7686d4b3b7 Merge branch 'MDL-47380-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-29 09:02:57 +13:00
Eloy Lafuente (stronk7) ad39e5550e MDL-47242 theme_bootstrapbase: Fixed whitespace (take2)
Seems that previous whitespace fix was not ok.
2014-09-28 18:33:46 +02:00
AMOS bot 3b008d30cb Automatically generated installer lang files 2014-09-28 00:09:30 +08:00
Dmitry Nefedov 6e9aeadd75 MDL-47408 user: Add enableblogs checking before adding blog's link. 2014-09-27 15:20:21 +08:00
sam marshall dea57f0107 MDL-47380 Availability: Editing interface broken in IE8 2014-09-26 15:46:02 +01:00
sam marshall eb2e5d8a83 MDL-42974 UI: Modal dialogs do not work in IE8 2014-09-26 15:45:43 +01:00
sam marshall 0e290bc008 MDL-47322 Availability: empty availability should be saved as null 2014-09-26 15:43:53 +01:00
Tim Hunt df9589e32c MDL-47381 qformat: Behat tests have wrong plugin type. 2014-09-26 11:30:41 +01:00
Dave Cooper 6b4ab27d4f MDL-32275 enrol: Last site access column now shows last course access 2014-09-26 11:29:30 +08:00
Petr Skoda 207f4b22cc MDL-47333 fix support for custom fonts in tcpdf 2014-09-26 13:58:54 +12:00
David Mudrák 4a3dd577a9 MDL-47069 admin: Add option to upload required ZIP at the check page
The plugins check page displays other plugins that the current one
depends on.  Previously, we always displayed the other plugin as a link
to the plugins directory. This did not work well in two scenarios:

* The admin wants/needs to upload the other plugin from the ZIP file
  (e.g. it is not available in the plugins directory),

* the other plugin is actually a standard plugin that is not supposed to
  be registered with the plugins directory.

This patch displays the Install or Upload or Check for updates links
next to the required plugin instead, as appropriate.
2014-09-25 16:49:05 +02:00
Dmitry Nefedov d1ab9d16ac MDL-47385 coursecat: Mistake line in phpdocs deleted. 2014-09-25 21:16:31 +08:00
Willy Lee 387ec15d2d MDL-43566 course: add delete icon to search returns in course management listings 2014-09-25 05:59:32 -07:00
Dan Poltawski 8c85081478 weekly release 2.7.2+ 2014-09-25 11:18:03 +01:00
Dan Poltawski c52defd7c4 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-09-25 11:18:00 +01:00
Marina Glancy 3c3012388d MDL-47398 core_grades: fix grade category generator 2014-09-25 10:32:35 +08:00
Dan Marsden 68406d778c MDL-47404 filelib: Prevent flash from treating files as uploads
Flash treats files as uploads if filename is passed in content-disposition
this causes security to be enforced that causes issues with SCORM packages
2014-09-25 13:22:17 +12:00
Sam Hemelryk d593522699 MDL-47242: Fixed whitespace 2014-09-25 12:19:41 +12:00
Dan Poltawski 5921dfb9c4 MDL-47378 mod_assign: prevent debugging notice
Parameters come out of get_user_preferences as strings.
2014-09-24 15:42:22 +01:00
Pavel Sokolov 155e70008b MDL-37707 mod_assign: Prevent user from switching to and from team submissions 2014-09-24 16:08:13 +08:00
Jetha Chan b4dad816b1 MDL-47242 theme_bootstrapbase: inverted color and RTL fixes 2014-09-24 15:54:57 +08:00
David Mudrák 2795a7cee0 MDL-47248 Use new Moodle logo for RSS feeds generated by Moodle
Themes can override this logo as any other core pix file. The new logo copied
from https://moodle.org/logo/ and resized to match the previous logo size
(140x35px).
2014-09-24 01:38:12 +02:00
Eloy Lafuente (stronk7) 5d6d351f02 Merge branch 'MDL-47224_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-09-24 01:27:06 +02:00
Eloy Lafuente (stronk7) d9016fd581 MDL-47180 qformat_webct: whitespace cleanup 2014-09-24 00:58:04 +02:00
Eloy Lafuente (stronk7) bacf193e66 Merge branch 'MDL-47180_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-09-24 00:41:01 +02:00
AMOS bot ea6b6393e4 Automatically generated installer lang files 2014-09-24 00:05:56 +08:00
Jean-Michel Vedrine ba50cd880c MDL-47180 qformat_webct: Import of calculated questions broken 2014-09-23 14:47:36 +02:00
Paul Nicholls 86f2e36939 MDL-39190 Javascript: Pop-up calendar days of week wrong
The YUI2 calendar widget (still used via 2in3) uses midnight as the time
component of its Date objects, which triggers a Safari bug resulting in
11pm Saturday being returned instead of midnight Sunday when subtracting
days to get the last few days of the previous month.  This shows up ONLY
on the month after DST begins, if DST begins on the last Sunday of a given
month (and the Calendar widget is set to Sunday as the first day of the
week).  The fix/workaround of using noon instead of midnight is employed
by YUI3 and others.
2014-09-23 16:38:09 +12:00
Sam Hemelryk d56c53c90e Merge branch 'MDL-46811-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-09-23 16:36:14 +12:00
Jonathan Harker f5fb4991bd MDL-47316 mod_forum: Fix course overview performance regression
make more efficient use of mod_info cache by processing courses
 sequentially.

Change-Id: I03b808c8a7efc42879ec2689fbd2a9fe7a8f1103
2014-09-23 12:55:08 +12:00
Sam Hemelryk 8bcc9fbff7 Merge branch 'MDL-47242-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-09-23 12:04:31 +12:00
Eloy Lafuente (stronk7) 1d4b21c07d Merge branch 'MDL-47182-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-09-23 01:52:21 +02:00
Eloy Lafuente (stronk7) 292f350282 Merge branch 'MDL-47269_M27' of https://github.com/nadavkav/moodle into MOODLE_27_STABLE 2014-09-23 01:29:33 +02:00
Eloy Lafuente (stronk7) 2893aa4904 Merge branch 'MDL-47266_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-23 01:12:22 +02:00
Tim Hunt a733c2ce43 MDL-37998 quiz settings: disableif rules should account for overrides.
Some form fields are disabled if only one attempt is allowed. However,
there may be an override allowing some students more attempts. We need
to account for that possiblity when setting up the disabled if rules.

Note the disabledIf is good for usability on this complex form, which is
why I don't just want to get rid of them.
2014-09-22 16:24:51 +01:00
Dan Poltawski 7e36f977b1 Merge branch 'MDL-47238_guest_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-09-22 16:13:42 +01:00
Dan Poltawski 42db1010f0 Merge branch 'MDL-47270-core-component-classmap-ordering_27_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_27_STABLE 2014-09-22 16:03:53 +01:00
Dan Poltawski dec70bc47e Merge branch 'MDL-40006_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-22 11:55:50 +01:00
Dan Poltawski 300510afc1 Merge branch 'MDL-46991-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-22 10:57:56 +01:00
Nadav Kavalerchik c3676d6c33 MDL-47269 yui/src/dock: Invert dock reset blocks icon, in RTL mode 2014-09-22 11:42:20 +03:00
Rajesh Taneja 6edd1ef671 MDL-46987 report_participation: Count duplicate logs as 1
Some of the actions generate more then 1 event.
Example: forum post create generate:
- post_created and
- accessible_uploaded
events which  gets logged at the same time.
Count them as 1 action and not 2, as it is
single action and report should show 1 and not 2
2014-09-22 15:22:26 +08:00
Marina Glancy fe38ae10d3 MDL-47154 behat: escape user supplied strings in xpath 2014-09-22 13:24:21 +08:00
Rajesh Taneja 7a7546eb64 MDL-47154 behat: extended table head look up to check if header is link
Header can be a link, this step will now look if
header has a text or header link has the text

Part of MDL-46191
2014-09-22 13:24:13 +08:00
Andrew Davis ac9425c993 MDL-47238 core_user: added an error message if guests access user profiles and they aren't allowed to 2014-09-22 11:37:00 +08:00
AMOS bot 2898461aec Automatically generated installer lang files 2014-09-21 00:08:57 +08:00
Tim Hunt 77c9d6d7e5 MDL-40006 searchableselector does not work in IE or Safari.
This fix is a horrible hack, but one I have used for years in tool_editrolesbycap
https://github.com/moodleou/moodle-tool_editrolesbycap/blob/master/yui/capabilityformfield/capabilityformfield.js
and it seems to be reliable.

As an added bonus, I removed the use of YUI2 here.

Also, I fixed the related button in quiz to be GET not POST.
2014-09-19 21:57:56 +01:00
AMOS bot 9dfb587ff8 Automatically generated installer lang files 2014-09-20 00:05:43 +08:00
Adam Olley d629afa0e2 MDL-47224 qtype_calculated: Calculated qtype comment on datasetitems should follow formatting rules 2014-09-19 09:32:54 +09:30
sam marshall 81c4057908 MDL-46991 Availability: Conditional dates not updated on restore 2014-09-18 16:36:38 +01:00
Dan Poltawski 8152e9fa60 weekly release 2.7.2+ 2014-09-18 07:41:10 +01:00
Jetha Chan 73c01865f6 MDL-46920 theme_bootstrapbase: fix dropdown to use data-target 2014-09-17 15:32:40 +08:00
Matt Petro 8349864b0e MDL-47270 core_component: make cache independent of filesystem ordering 2014-09-16 13:18:39 -04:00
Eloy Lafuente (stronk7) 8da5cf92c9 Merge branch 'MDL-46613-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-16 19:10:52 +02:00
Dan Poltawski 9efa6cf36d MDL-47182 admin: warn about delayed scheduled tasks
Rather than using module cron, use scheduled tasks to work out
if cron has been running recently.

This is not perfect, the admin could disble all tasks, or reschedule
them - but its not complex to compute.
2014-09-16 17:52:10 +01:00
Eloy Lafuente (stronk7) 074b467000 Merge branch 'wip-MDL-47079-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-16 18:38:53 +02:00
Tim Hunt 3024caa173 MDL-47266 quiz: fix restore log message. 2014-09-16 14:42:31 +01:00
Juan Leyva 439a1a4d8c MDL-46613 grades ws: Fixed external function declaration
Gradebook items with overridden grades was causing error as Web
Services response

coding style
2014-09-16 10:08:28 +02:00
Damyon Wiese 35fa1656ab MDL-44257 Message: Update phpdocs for email_to_user function 2014-09-16 15:07:48 +08:00
Damyon Wiese 0bdbe84828 Merge branch 'MDL-44257-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-09-16 15:03:53 +08:00
Simey Lameze 7972603cc4 MDL-44257 lib: fix the attachment code to accept tempdir and dataroot.
Credit goes to Damyon, thanks.
2014-09-16 10:34:05 +08:00
Simey Lameze 1780c99e06 MDL-44257 message: added test to make sure the stored file still exists 2014-09-16 10:23:58 +08:00
Simey Lameze bd2519c596 MDL-44257 message: check if the attachment exists before remove it
Credit goes to Mark Nielsen, thanks.
2014-09-16 10:23:58 +08:00
Marina Glancy df45195a04 MDL-47079 user: behat test for deleting users 2014-09-16 09:54:07 +08:00
Eloy Lafuente (stronk7) a0f94236fa Merge branch 'MDL-46588-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-16 00:23:00 +02:00
Dan Poltawski b5ecf0dbae Merge branch 'MDL-46195_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 16:07:09 +01:00
Dan Poltawski e7697e57f7 Merge branch 'MDL-46331_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 12:18:56 +01:00
Dan Poltawski 7194a13a33 Merge branch 'wip-MDL-47187-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-15 11:21:37 +01:00
Jetha Chan aace1408ec MDL-47242 theme_bootstrapbase: fix nested custom_menu responsive display 2014-09-15 17:36:39 +08:00
Damyon Wiese 8693c8f373 Merge branch 'MDL-47143_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 16:14:02 +08:00
Damyon Wiese 86df808aa5 Merge branch 'MDL-47167_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 15:55:21 +08:00
Damyon Wiese d2c77503c5 Merge branch 'MDL-46944-27-lti-iframe' of git://github.com/schmod/moodle into MOODLE_27_STABLE 2014-09-15 15:25:07 +08:00
Brian Barnes e7da6db9ca MDL-47186 calendar: Changed month name to h2 from h1 2014-09-15 14:20:59 +08:00
Damyon Wiese f2211e7c9a Merge branch 'MDL-46747_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 14:05:58 +08:00
Damyon Wiese 9f54825718 Merge branch 'MDL-47209-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-09-15 13:56:32 +08:00
Damyon Wiese 86e09bfb9c Merge branch 'MDL-47208_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-09-15 12:18:39 +08:00
Damyon Wiese 574b53efde Merge branch 'MDL-46088_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 11:32:29 +08:00
Juan Leyva b189a26f3d MDL-46588 web services: Fixed system context instanceid eq 0 case 2014-09-12 11:26:42 +02:00
Juan Leyva 3c354a42ed MDL-46588 web services: Unit tests added 2014-09-12 11:26:42 +02:00
Juan Leyva 4712967f4c MDL-46588 web services: Fixed invalid check of empty contextid in function get_context_from_params 2014-09-12 11:26:42 +02:00
Adam Olley 2181953d43 MDL-47208 core_availability: Return false when cm isnt in modinfo list
If a cm isn't in modinfo's cm list, then the user shouldn't be able to see that cm.
This fixes an issue where hidden activities would cause users to be unable to use moodle.
2014-09-12 09:15:26 +09:30
Tim Hunt ca01459727 MDL-46747 questions: add More info link to qbehaviour help.
Thanks to Tony Gardner-Medwin for the suggestion.
2014-09-11 16:13:45 +01:00
Dan Poltawski 9a45421093 weekly release 2.7.2+ 2014-09-11 15:44:37 +01:00
Dan Poltawski ee566d2482 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-09-11 15:44:34 +01:00
Michael Hughes ce31bc5d36 MDL-47214 General: Multiple IP addresses in X-Forwarded-For Fixed
Fixed getremoteaddr() function handle multiple IP addresses
2014-09-11 15:01:25 +01:00
Frederic Massart c7dfb90672 MDL-47209 repository_skydrive: Use new oauth URLs 2014-09-11 15:17:41 +08:00
Marina Glancy 871f534785 MDL-46834 dndupload: check course dndupload cap on course level 2014-09-11 12:12:43 +08:00
AMOS bot f374e53b8d Automatically generated installer lang files 2014-09-11 00:05:40 +08:00
Andrew Schmadel 19b0b0bb7f MDL-46844 Embed LTI External Tools with an IFrame
Clears up weird browser issues that occur when embedding content with an
`<object>` tag.
2014-09-10 09:01:07 -04:00
Marina Glancy 6f7320673b MDL-46834 dndupload: check course dndupload cap on course level 2014-09-10 08:08:40 +01:00
Marina Glancy 12a88823f0 MDL-47187 assign: fixed timing unittest failure 2014-09-10 11:57:02 +08:00
Frederic Massart 28dfc4eebc MDL-46818 core_grade: Prevent form checker to catch move fields 2014-09-10 10:44:02 +08:00
Tim Hunt 3bafe8d0c4 MDL-46331 GIFT question import was breaking content inside <pre>.
Also, adding a Behat tests to verify GIFT import works without errors
(but leaving the detailed testing for the unit tests).
2014-09-09 22:59:20 +01:00
Tim Hunt 074aec1846 MDL-47167 XML question format: behat tests 2014-09-09 22:57:00 +01:00
Tim Hunt aef4661635 MDL-46195 WebCT question import: Behat test 2014-09-09 22:54:42 +01:00
AMOS bot e9d4d084e3 Automatically generated installer lang files 2014-09-10 00:05:33 +08:00
Dan Poltawski 5101f9b131 MDL-46811 update download.moodle.org url to https
https is now the prefferd protocol for this site
2014-09-09 16:37:28 +01:00
Marina Glancy 0a70f84dde Merge branch 'MDL-46997-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-09-09 17:18:53 +08:00
Marina Glancy a8d69de7bd Merge branch 'm27_MDL-47076' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-09 17:13:09 +08:00
Dan Poltawski b30bf418c8 Merge branch 'wip-MDL-47080-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-09 10:06:03 +01:00
Dan Poltawski 20758f187d Merge branch 'wip-MDL-46834-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-09 08:11:12 +01:00
Damyon Wiese 589e140d83 MDL-46997 Grades: fix sum of grades with hidden items with differing maxgrades 2014-09-09 14:02:14 +08:00
Damyon Wiese 78c55e13a2 MDL-46997 Grades: Fix aggregation when hiding is excluded and items have nested dependencies
Includes a unit test for the dependency flattening function.
2014-09-09 14:02:13 +08:00
Damyon Wiese b5415ecd9d MDL-46997 Grades: Improve the behat tests for grade aggregation
The tests now cover hidden grades in sub categories for all aggregation types. This change
includes a data generator for grade categories, with unit tests and behat tests for
the generator.

Conflicts:
	admin/tool/behat/tests/behat/data_generators.feature
	grade/tests/behat/grade_aggregation.feature
	lib/tests/behat/behat_data_generators.php
2014-09-09 14:02:06 +08:00
David Curry 3ae804809e MDL-47076 badges: Add checks to user fields during badges restoration
Change-Id: I49d2137666d2d7c1f6abca7ae83c07b326d9b0c4
2014-09-09 16:20:41 +12:00
Brian Barnes 90f7b090b9 MDL-47170 tiny_mce: Fixed display of bullets in rtl languages 2014-09-09 15:56:41 +12:00
Marina Glancy d0965c1dc4 MDL-46834 dndupload: Hide dnd message when user cant upload files 2014-09-09 10:03:25 +08:00
Marina Glancy 7f0bfd592e MDL-46834 filepicker: dnd upload should respect the current context id 2014-09-09 10:03:25 +08:00
Eloy Lafuente (stronk7) 309c82bf0e Merge branch 'm27_MDL-47054' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-09 02:19:42 +02:00
Tim Hunt aec38d6b33 MDL-46195 fix error handling. 2014-09-08 22:26:33 +01:00
Tim Hunt c73d96bc91 MDL-46195 Fix fractionsaddwrong string component in lesson & qformat_webct.
I know. You should not refer to strings from other plugins, but

* qformat_webct is importing multichoice questions in that bit of code.
  I suppose a pedant would say that qformat_webct should declare dependencies
  on all the qtypes it relies on, but that would be silly.

* Lesson should be using the question engine, rather than doing its own thing.
2014-09-08 21:57:51 +01:00
Dan Poltawski 937ccd60b2 Merge branch 'MDL-40451-m27-random-glossary-block-title' of git://github.com/amandadoughty/moodle into MOODLE_27_STABLE 2014-09-08 17:26:57 +01:00
Dan Poltawski 98cf5b4f0c Merge branch 'wip-MDL-45602-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-08 16:30:56 +01:00
Dan Poltawski 01afa79fe7 Merge branch 'MDL-46586-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-08 15:31:12 +01:00
Dan Poltawski 9b31e3bc3f Merge branch 'wip-MDL-43739-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-08 15:16:39 +01:00
Dan Poltawski ee977370d2 Merge branch 'MDL-46982_m27' of https://github.com/shashirepo/moodle into MOODLE_27_STABLE 2014-09-08 12:22:28 +01:00
Dan Poltawski 5e61e7b667 Merge branch 'MDL-47014-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-08 12:19:34 +01:00
Dan Poltawski 9ded19fe12 Merge branch 'wip-MDL-46254-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-08 12:16:12 +01:00
Juan Leyva 95afe143d7 MDL-47014 airnotifier: Missing require of filelib.php 2014-09-08 11:46:50 +02:00
Marina Glancy dc2e48bda7 Merge branch 'MDL-46818_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-09-08 14:05:06 +08:00
Marina Glancy 5260b523c3 MDL-43739 block_course_overview: allow resorting of big number of courses
previously an exception was thrown if the user preference exceeds 1333 chars
2014-09-08 14:00:48 +08:00
Marina Glancy 55c051f352 MDL-47080 theme: call format_string on site shortname 2014-09-08 13:57:40 +08:00
Marina Glancy f0dd12dfc1 MDL-46254 theme: apply filters to theme footnote 2014-09-08 13:57:17 +08:00
Marina Glancy 55111d2bf4 MDL-45602 behat: add members to cohorts 2014-09-08 13:56:46 +08:00
Marina Glancy b7b5d98a24 Merge branch 'MDL-46564_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-09-08 13:49:41 +08:00
Marina Glancy 09deaef4e9 Merge branch 'MDL-46821-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-09-08 13:49:28 +08:00
Marina Glancy bd8eae5245 Merge branch 'MDL-46761_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-08 13:49:16 +08:00
Marina Glancy 7b6eb2a1ac Merge branch 'MDL-46587-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-08 13:49:01 +08:00
Marina Glancy 36d9887093 Merge branch 'MDL-44304-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-09-08 12:58:12 +08:00
Tim Hunt 16ebf7a574 MDL-47143 questions: fix default for question_preview/marks setting. 2014-09-07 12:58:30 +01:00
Tim Hunt 1d02898b38 MDL-46761 fix PHPdocs on question_usage_by_activity::get_total_mark
Thanks to Tony Gardner-Medwin for spotting this.
2014-09-07 11:39:28 +01:00
Tim Hunt cb81111118 MDL-46088 Impossible to click on Atto in a Quiz in 'Secure' mode. 2014-09-06 18:18:36 +01:00
Juan Leyva 5bc6887180 MDL-46587 files: Invalid $itemid conversion in core_files_get_files Web Service 2014-09-05 13:45:52 +02:00
Juan Leyva 18aba19678 MDL-46586 files: Invalid return parameters definition in core_files_get_files external function 2014-09-05 13:41:52 +02:00
shashirepo ad2b5cdd9f MDL-46982 core: fixes wrong opening div tag 2014-09-05 10:21:30 +05:30
Yuliya Bozhko 92f89f593c MDL-47033 general: Fix incorrect use of 'course' layout
It should use 'incourse' layout in most cases

Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-09-05 09:30:21 +12:00
Brian Barnes 4ce01c9d96 MDL-47097 theme: Fixed issue with dd's sliding up 2014-09-04 14:25:12 +12:00
Brian Barnes 5c779defab MDL-47054 theme: fixed issue with the user rtl table 2014-09-04 09:38:42 +12:00
Amanda Doughty 7740ad458d MDL-40451 block/glossary_random Fixed missing header when adding new block 2014-09-03 14:04:04 +01:00
Yuliya Bozhko 6797273854 MDL-46564 badges: Fix 'All' option in badges block
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-09-03 18:45:04 +12:00
Ankit Agarwal d99bb10f68 MDL-46821 gradereport_user: Fix background color of user report 2014-09-03 12:12:18 +05:30
Mark Nelson 9d4861fa75 MDL-46818 core_grades: added YUI form change validation 2014-09-01 23:02:33 -07:00
Virgil Ashruf db765d575b MDL-45636 course_rest: changed modcontext to coursecontext 2014-09-01 11:27:07 +02:00
Petr Skoda 91f1dbd319 MDL-46235 ddl: add support for large number of text fields in one database table 2014-09-01 08:42:52 +12:00
Damyon Wiese a02eefb35e MDL-44304 assignfeedback_editpdf: Fix fatal error when viewing team assignments with editpdf responses. 2014-08-21 12:09:39 +08:00
Damyon Wiese 6a449a9719 MDL-44304 assignfeedback_editpdf: Behat test for group submissions 2014-08-21 12:09:39 +08:00
604 changed files with 14798 additions and 5266 deletions
+3
View File
@@ -0,0 +1,3 @@
--errors=errors,duplicate-properties
--warnings=known-properties,display-property-grouping,empty-rules,important
--exclude-list=vendor/,lib/editor/tinymce/,lib/yuilib/,theme/bootstrapbase/style/
+202
View File
@@ -0,0 +1,202 @@
<?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/>.
/**
* MySQL table row compression tool tool.
*
* @package core
* @copyright 2014 Totara Learning Solutions Ltd {@link http://www.totaralms.com/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Petr Skoda <petr.skoda@totaralms.com>
*/
define('CLI_SCRIPT', true);
require(dirname(__FILE__).'/../../config.php');
require_once($CFG->libdir . '/clilib.php');
if ($DB->get_dbfamily() !== 'mysql') {
cli_error('This script is used for MySQL databases only.');
}
$engine = strtolower($DB->get_dbengine());
if ($engine !== 'innodb' and $engine !== 'xtradb') {
cli_error('This script is for MySQL servers using InnoDB or XtraDB engines only.');
}
list($options, $unrecognized) = cli_get_params(
array('help' => false, 'info' => false, 'list' => false, 'fix' => false, 'showsql' => false),
array('h' => 'help', 'i' => 'info', 'l' => 'list', 'f' => 'fix', 's' => 'showsql')
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$help =
"Script for detection of row size problems in MySQL InnoDB tables.
By default InnoDB storage table is using legacy Antelope file format
which has major restriction on database row size.
Use this script to detect and fix database tables with potential data
overflow problems.
Options:
-i, --info Show database information
-l, --list List problematic tables
-f, --fix Attempt to fix all tables (requires SUPER privilege)
-s, --showsql Print SQL statements for fixing of tables
-h, --help Print out this help
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/mysql_compressed_rows.php -l
";
/** @var mysql_sql_generator $generator */
$generator = $DB->get_manager()->generator;
$info = $DB->get_server_info();
$filepertable = $DB->get_record_sql("SHOW VARIABLES LIKE 'innodb_file_per_table'");
$filepertable = $filepertable ? $filepertable->value : '';
$fileformat = $DB->get_record_sql("SHOW VARIABLES LIKE 'innodb_file_format'");
$fileformat = $fileformat ? $fileformat->value : '';
$prefix = $DB->get_prefix();
$database = $CFG->dbname;
if (!empty($options['info'])) {
echo "Database version: " . $info['description'] . "\n";
echo "Database name: $database\n";
echo "Database engine: " . $DB->get_dbengine() . "\n";
echo "innodb_file_per_table: $filepertable\n";
echo "innodb_file_format: $fileformat\n";
exit(0);
} else if (!empty($options['list'])) {
$problem = false;
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT);
echo str_pad($format, 11, ' ', STR_PAD_RIGHT);
if ($format === 'Compact' or $format === 'Redundant') {
$problem = true;
echo " (needs fixing)\n";
} else if ($format !== 'Compressed' and $format !== 'Dynamic') {
echo " (unknown)\n";
} else {
echo "\n";
}
}
if ($problem) {
exit(1);
}
exit(0);
} else if (!empty($options['fix'])) {
$fixtables = array();
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
if ($format === 'Compact' or $format === 'Redundant') {
$fixtables[$table] = $table;
}
}
if (!$fixtables) {
echo "No changes necessary\n";
exit(0);
}
if ($filepertable !== 'ON') {
try {
$DB->execute("SET GLOBAL innodb_file_per_table=1");
} catch (dml_exception $e) {
echo "Cannot enable GLOBAL innodb_file_per_table setting, use --showsql option and execute the statements manually.";
throw $e;
}
}
if ($fileformat !== 'Barracuda') {
try {
$DB->execute("SET GLOBAL innodb_file_format=Barracuda");
} catch (dml_exception $e) {
echo "Cannot change GLOBAL innodb_file_format setting, use --showsql option and execute the statements manually.";
throw $e;
}
}
if (!$DB->is_compressed_row_format_supported(false)) {
echo "MySQL server is not compatible with compressed row format.";
exit(1);
}
foreach ($fixtables as $table) {
$DB->change_database_structure("ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed");
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT) . " ... Compressed\n";
}
exit(0);
} else if (!empty($options['showsql'])) {
$fixtables = array();
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
if ($format === 'Compact' or $format === 'Redundant') {
$fixtables[$table] = $table;
}
}
if (!$fixtables) {
echo "No changes necessary\n";
exit(0);
}
echo "Copy the following SQL statements and execute them using account with SUPER privilege:\n\n";
echo "USE $database;\n";
echo "SET SESSION sql_mode=STRICT_ALL_TABLES;\n";
echo "SET GLOBAL innodb_file_per_table=1;\n";
echo "SET GLOBAL innodb_file_format=Barracuda;\n";
foreach ($fixtables as $table) {
echo "ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed;\n";
}
echo "\n";
exit(0);
} else {
echo $help;
die;
}
+2 -2
View File
@@ -45,7 +45,7 @@ admin_externalpage_setup('environment', '', $extraurlparams);
// Handle the 'updatecomponent' action
if ($action == 'updatecomponent' && confirm_sesskey()) {
// Create component installer and execute it
if ($cd = new component_installer('http://download.moodle.org',
if ($cd = new component_installer('https://download.moodle.org',
'environment',
'environment.zip')) {
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
@@ -53,7 +53,7 @@ if ($action == 'updatecomponent' && confirm_sesskey()) {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/environment/environment.zip';
$a->url = 'https://download.moodle.org/environment/environment.zip';
$a->dest = $CFG->dataroot . '/';
print_error($cd->get_error(), 'error', $PAGE->url, $a);
die();
+123
View File
@@ -1136,4 +1136,127 @@
</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">
</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_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+2 -1
View File
@@ -555,7 +555,8 @@ if (isset($SESSION->pluginuninstallreturn)) {
// Print default admin page with notifications.
$errorsdisplayed = defined('WARN_DISPLAY_ERRORS_ENABLED');
$lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}');
// We make the assumption that at least one schedule task should run once per day.
$lastcron = $DB->get_field_sql('SELECT MAX(lastruntime) FROM {task_scheduled}');
$cronoverdue = ($lastcron < time() - 3600 * 24);
$dbproblems = $DB->diagnose();
$maintenancemode = !empty($CFG->maintenance_enabled);
+21 -12
View File
@@ -1039,19 +1039,28 @@ class core_admin_renderer extends plugin_renderer_base {
}
foreach ($plugin->get_other_required_plugins() as $component => $requiredversion) {
$ok = true;
$otherplugin = $pluginman->get_plugin_info($component);
$actions = array();
if (is_null($otherplugin)) {
$ok = false;
} else if ($requiredversion != ANY_VERSION and $otherplugin->versiondisk < $requiredversion) {
$ok = false;
}
// The required plugin is not installed.
$class = 'requires-failed requires-missing';
$installurl = new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $component));
$uploadurl = new moodle_url('/admin/tool/installaddon/');
$actions[] = html_writer::link($installurl, get_string('dependencyinstall', 'core_plugin'));
$actions[] = html_writer::link($uploadurl, get_string('dependencyupload', 'core_plugin'));
} else if ($requiredversion != ANY_VERSION and $otherplugin->versiondisk < $requiredversion) {
// The required plugin is installed but needs to be updated.
$class = 'requires-failed requires-outdated';
if (!$otherplugin->is_standard()) {
$updateurl = new moodle_url($this->page->url, array('sesskey' => sesskey(), 'fetchupdates' => 1));
$actions[] = html_writer::link($updateurl, get_string('checkforupdates', 'core_plugin'));
}
if ($ok) {
$class = 'requires-ok';
} else {
$class = 'requires-failed';
// Already installed plugin with sufficient version.
$class = 'requires-ok';
}
if ($requiredversion != ANY_VERSION) {
@@ -1059,11 +1068,11 @@ class core_admin_renderer extends plugin_renderer_base {
} else {
$str = 'otherplugin';
}
$componenturl = new moodle_url('https://moodle.org/plugins/view.php?plugin='.$component);
$componenturl = html_writer::tag('a', $component, array('href' => $componenturl->out()));
$requires[] = html_writer::tag('li',
get_string($str, 'core_plugin',
array('component' => $componenturl, 'version' => $requiredversion)),
html_writer::div(get_string($str, 'core_plugin',
array('component' => $component, 'version' => $requiredversion)), 'component').
html_writer::div(implode(' | ', $actions), 'actions'),
array('class' => $class));
}
@@ -48,11 +48,12 @@ class core_role_potential_assignees_below_course extends core_role_assign_user_s
$fields = 'SELECT ' . $this->required_fields_sql('u');
$countfields = 'SELECT COUNT(u.id)';
$sql = " FROM {user} u
LEFT JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.roleid = :roleid AND ra.contextid = :contextid)
WHERE u.id IN ($enrolsql)
$wherecondition
AND ra.id IS NULL";
$sql = " FROM ($enrolsql) enrolled_users_view
JOIN {user} u ON u.id = enrolled_users_view.id
LEFT JOIN {role_assignments} ra ON (ra.userid = enrolled_users_view.id AND
ra.roleid = :roleid AND ra.contextid = :contextid)
WHERE ra.id IS NULL
$wherecondition";
$params['contextid'] = $this->context->id;
$params['roleid'] = $this->roleid;
+1 -1
View File
@@ -132,7 +132,7 @@ if ($courseid == SITEID) {
$PAGE->set_heading($course->fullname.': '.$fullname);
}
echo $OUTPUT->header();
echo $OUTPUT->heading($title, 3);
echo $OUTPUT->heading($title);
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
// Display them.
+1 -1
View File
@@ -358,7 +358,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
2 => get_string('showmarkandmax', 'question'),
);
$settings->add(new admin_setting_configselect('question_preview/marks',
get_string('marks', 'question'), '', 1, $marksoptions));
get_string('marks', 'question'), '', 2, $marksoptions));
$settings->add(new admin_setting_configselect('question_preview/markdp',
get_string('decimalplacesingrades', 'question'), '', 2, array(0, 1, 2, 3, 4, 5, 6, 7)));
@@ -253,24 +253,57 @@ Feature: Set up contextual data for tests
And I set the field "groups" to "Group 2 (1)"
And the "members" select box should contain "Student 2"
Scenario: Add cohorts with data generator
Scenario: Add cohorts and cohort members with data generator
Given the following "categories" exist:
| name | category | idnumber |
| 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 |
And the following "cohorts" exist:
| name | idnumber |
| System cohort 1 | CH01 |
| System cohort A | CHSA |
And the following "cohorts" exist:
| name | idnumber | contextlevel | reference |
| System cohort 2 | CH02 | System | |
| Cohort in category 1 | CH1 | Category | CAT1 |
| System cohort B | CHSB | System | |
| Cohort in category | CHC | Category | CAT1 |
| Empty cohort | CHE | Category | CAT1 |
And the following "cohort members" exist:
| user | cohort |
| student1 | CHSA |
| student2 | CHSB |
| student1 | CHSB |
| student1 | CHC |
When I log in as "admin"
And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
Then I should see "System cohort 1"
And I should see "System cohort 2"
Then the following should exist in the "cohorts" table:
| Name | Cohort size |
| System cohort A | 1 |
| System cohort B | 2 |
And I should not see "Cohort in category"
And I follow "Courses"
And I follow "Cat 1"
And I follow "Cohorts"
And I should see "Cohort in category 1"
And I should not see "System cohort"
And the following should exist in the "cohorts" table:
| Name | Cohort size |
| Cohort in category | 1 |
| Empty cohort | 0 |
Scenario: Add grade categories with data generator
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "grade categories" exist:
| fullname | course |
| Grade category 1 | C1|
And the following "grade categories" exist:
| fullname | course | gradecategory |
| Grade sub category 2 | C1 | Grade category 1|
When I log in as "admin"
And I follow "Courses"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
@@ -66,6 +66,7 @@ $string['validationmsg_filenotexists'] = 'Extracted file not found';
$string['validationmsg_filesnumber'] = 'Not enough files found in the package';
$string['validationmsg_filestatus'] = 'Unable to extract all files';
$string['validationmsg_filestatus_info'] = 'Attempting to extract file {$a->file} resulted in error \'{$a->status}\'.';
$string['validationmsg_foundlangfile'] = 'Found language file';
$string['validationmsg_maturity'] = 'Declared maturity level';
$string['validationmsg_maturity_help'] = 'The plugin can declare its maturity level. If the maintainer considers the plugin stable, the declared maturity level will read MATURITY_STABLE. All other maturity levels (such as alpha or beta) should be considered unstable and a warning is raised.';
$string['validationmsg_missingexpectedlangenfile'] = 'English language file name mismatch';
+1 -1
View File
@@ -17,7 +17,7 @@
/**
* Fetches language packages from download.moodle.org server
*
* Language packages are available at http://download.moodle.org/langpack/
* Language packages are available at https://download.moodle.org/langpack/
* in ZIP format together with a file languages.md5 containing their hashes
* and meta info.
* Locally, language packs are saved into $CFG->dataroot/lang/
@@ -37,7 +37,7 @@ $string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of
$string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
$string['pluginname'] = 'Language packs';
$string['purgestringcaches'] = 'Purge string caches';
$string['remotelangnotavailable'] = 'Because Moodle cannot connect to download.moodle.org, it is not possible for language packs to be installed automatically. Please download the appropriate ZIP file(s) from <a href="http://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['remotelangnotavailable'] = 'Because Moodle cannot connect to download.moodle.org, it is not possible for language packs to be installed automatically. Please download the appropriate ZIP file(s) from <a href="https://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['uninstall'] = 'Uninstall selected language pack';
$string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
$string['updatelangs'] = 'Update all installed language packs';
+5 -2
View File
@@ -213,11 +213,14 @@ class manager implements \core\log\manager {
* @param string $info Additional description information
* @param int $cm The course_module->id if there is one
* @param int|\stdClass $user If log regards $user other than $USER
* @param string $ip Override the IP, should only be used for restore.
* @param int $time Override the log time, should only be used for restore.
*/
public function legacy_add_to_log($courseid, $module, $action, $url = '', $info = '', $cm = 0, $user = 0) {
public function legacy_add_to_log($courseid, $module, $action, $url = '', $info = '',
$cm = 0, $user = 0, $ip = null, $time = null) {
$this->init();
if (isset($this->stores['logstore_legacy'])) {
$this->stores['logstore_legacy']->legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user);
$this->stores['logstore_legacy']->legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user, $ip, $time);
}
}
}
@@ -143,8 +143,10 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
* @param string $info Additional description information
* @param int $cm The course_module->id if there is one
* @param int|\stdClass $user If log regards $user other than $USER
* @param string $ip Override the IP, should only be used for restore.
* @param int $time Override the log time, should only be used for restore.
*/
public function legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user) {
public function legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user, $ip = null, $time = null) {
// Note that this function intentionally does not follow the normal Moodle DB access idioms.
// This is for a good reason: it is the most frequently used DB update function,
// so it has been optimised for speed.
@@ -172,9 +174,9 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
}
}
$remoteaddr = getremoteaddr();
$remoteaddr = (is_null($ip)) ? getremoteaddr() : $ip;
$timenow = time();
$timenow = (is_null($time)) ? time() : $time;
if (!empty($url)) { // Could break doing html_entity_decode on an empty var.
$url = html_entity_decode($url, ENT_QUOTES, 'UTF-8');
} else {
+1 -1
View File
@@ -26,7 +26,7 @@
$string['cannotfit'] = 'The replacement is longer than original and shortening is not allow, cannot continue.';
$string['disclaimer'] = 'I understand the risks of this operation';
$string['doit'] = 'Yes, do it!';
$string['excludedtables'] = 'Several tables are not updated as part of the text replacement. This include configuration, log, events, and session tables.';
$string['excludedtables'] = 'Several tables are not updated as part of the text replacement. These include configuration, log, events, and session tables.';
$string['pageheader'] = 'Search and replace text throughout the whole database';
$string['notifyfinished'] = '...finished';
$string['notifyrebuilding'] = 'Rebuilding course cache...';
@@ -53,22 +53,27 @@ 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');
@@ -92,5 +97,63 @@ class tool_task_edit_scheduled_task_form extends moodleform {
// Do not use defaults for existing values, the set_data() is the correct way.
$this->set_data(\core\task\manager::record_from_scheduled_task($task));
}
/**
* Custom validations.
*
* @param array $data
* @param array $files
*
* @return array
*/
public function validation($data, $files) {
$error = parent::validation($data, $files);
$fields = array('minute', 'hour', 'day', 'month', 'dayofweek');
foreach ($fields as $field) {
if (!self::validate_fields($field, $data[$field])) {
$error[$field] = get_string('invaliddata', 'core_error');
}
}
return $error;
}
/**
* Helper function that validates the submitted data.
*
* Explanation of the regex:-
*
* \A\*\z - matches *
* \A[0-5]?[0-9]\z - matches entries like 23
* \A\*\/[0-5]?[0-9]\z - matches entries like * / 5
* \A[0-5]?[0-9](,[0-5]?[0-9])*\z - matches entries like 1,2,3
* \A[0-5]?[0-9]-[0-5]?[0-9]\z - matches entries like 2-10
*
* @param string $field field to validate
* @param string $value value
*
* @return bool true if validation passes, false other wise.
*/
public static function validate_fields($field, $value) {
switch ($field) {
case 'minute' :
case 'hour' :
$regex = "/\A\*\z|\A[0-5]?[0-9]\z|\A\*\/[0-5]?[0-9]\z|\A[0-5]?[0-9](,[0-5]?[0-9])*\z|\A[0-5]?[0-9]-[0-5]?[0-9]\z/";
break;
case 'day':
$regex = "/\A\*\z|\A([1-2]?[0-9]|3[0-1])\z|\A\*\/([1-2]?[0-9]|3[0-1])\z|";
$regex .= "\A([1-2]?[0-9]|3[0-1])(,([1-2]?[0-9]|3[0-1]))*\z|\A([1-2]?[0-9]|3[0-1])-([1-2]?[0-9]|3[0-1])\z/";
break;
case 'month':
$regex = "/\A\*\z|\A([0-9]|1[0-2])\z|\A\*\/([0-9]|1[0-2])\z|\A([0-9]|1[0-2])(,([0-9]|1[0-2]))*\z|";
$regex .= "\A([0-9]|1[0-2])-([0-9]|1[0-2])\z/";
break;
case 'dayofweek':
$regex = "/\A\*\z|\A[0-6]\z|\A\*\/[0-6]\z|\A[0-6](,[0-6])*\z|\A[0-6]-[0-6]\z/";
break;
default:
return false;
}
return (bool)preg_match($regex, $value);
}
}
+3
View File
@@ -123,6 +123,7 @@ if ($execute = $options['execute']) {
} else {
$task->set_cron_lock($cronlock);
}
get_mailer('buffer');
$task->execute();
if (isset($predbqueries)) {
mtrace("... used " . ($DB->perf_get_queries() - $predbqueries) . " dbqueries");
@@ -130,6 +131,7 @@ if ($execute = $options['execute']) {
}
mtrace("Task completed.");
\core\task\manager::scheduled_task_complete($task);
get_mailer('close');
exit(0);
} catch (Exception $e) {
if ($DB->is_transaction_started()) {
@@ -139,6 +141,7 @@ if ($execute = $options['execute']) {
mtrace("... used " . (microtime(true) - $pretime) . " seconds");
mtrace("Task failed: " . $e->getMessage());
\core\task\manager::scheduled_task_failed($task);
get_mailer('close');
exit(1);
}
}
+275
View File
@@ -0,0 +1,275 @@
<?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/>.
/**
* File containing tests for the mform class.
*
* @package tool_task
* @copyright 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
/**
* Mform test class.
*
* @package tool_task
* @copyright 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late
*/
class tool_task_form_testcase extends advanced_testcase {
/**
* Test validations for minute field.
*/
public function test_validate_fields_minute() {
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '*');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '65');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '*/');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '*/1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '*/20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '*/65');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '1,2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '2,20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '20,30,45');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '65,20,30');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '25,75');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '1-2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '2-20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '20-30');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '65-20');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('minute', '25-75');
$this->assertFalse($valid);
}
/**
* Test validations for minute hour.
*/
public function test_validate_fields_hour() {
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '*');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '65');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '*/');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '*/1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '*/20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '*/65');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '1,2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '2,20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '20,30,45');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '65,20,30');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '25,75');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '1-2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '2-20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '20-30');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '65-20');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('hour', '25-75');
$this->assertFalse($valid);
}
/**
* Test validations for day field.
*/
public function test_validate_fields_day() {
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '*');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '65');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '*/');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '*/1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '*/20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '*/65');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '*/35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '1,2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '2,20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '20,30,25');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '65,20,30');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '25,35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '1-2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '2-20');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '20-30');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '65-20');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('day', '25-35');
$this->assertFalse($valid);
}
/**
* Test validations for month field.
*/
public function test_validate_fields_month() {
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '*');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '10');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '13');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '*/');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '*/1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '*/12');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '*/13');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '*/35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '1,2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '2,11');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '2,10,12');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '65,2,13');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '25,35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '1-2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '2-12');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '3-6');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '65-2');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('month', '25-26');
$this->assertFalse($valid);
}
/**
* Test validations for dayofweek field.
*/
public function test_validate_fields_dayofweek() {
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '*');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '0');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '6');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '7');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '20');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '*/');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '*/1');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '*/6');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '*/13');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '*/35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '1,2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '2,6');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '2,6,3');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '65,2,13');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '25,35');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '1-2');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '2-6');
$this->assertTrue($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '65-2');
$this->assertFalse($valid);
$valid = \tool_task_edit_scheduled_task_form::validate_fields('dayofweek', '3-7');
$this->assertFalse($valid);
}
}
+2 -2
View File
@@ -45,7 +45,7 @@
$message = '<br /><br />';
$message .= $CFG->tempdir.'/olson.txt<br />';
$message .= $CFG->tempdir.'/timezone.txt<br />';
$message .= '<a href="http://download.moodle.org/timezone/">http://download.moodle.org/timezone/</a><br />';
$message .= '<a href="https://download.moodle.org/timezone/">https://download.moodle.org/timezone/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezone.txt">'.$CFG->dirroot.'/lib/timezone.txt</a><br />';
$message .= '<br />';
@@ -83,7 +83,7 @@
}
/// Otherwise, let's try moodle.org's copy
$source = 'http://download.moodle.org/timezone/';
$source = 'https://download.moodle.org/timezone/';
if (!$importdone && ($content=download_file_content($source))) {
if ($file = fopen($CFG->tempdir.'/timezone.txt', 'w')) { // Make local copy
fwrite($file, $content);
@@ -35,6 +35,13 @@ global $CFG;
*/
class tool_uploadcourse_course_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
public function test_proceed_without_prepare() {
$this->resetAfterTest(true);
$mode = tool_uploadcourse_processor::MODE_CREATE_NEW;
@@ -36,6 +36,13 @@ require_once($CFG->libdir . '/csvlib.class.php');
*/
class tool_uploadcourse_processor_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
public function test_basic() {
global $DB;
$this->resetAfterTest(true);
@@ -0,0 +1,3 @@
.path-admin-tool-xmldb a[name="lastused"] {
padding-top: 50px;
}
-5
View File
@@ -256,17 +256,12 @@
$table->colclasses = array();
$table->head[] = $fullnamedisplay;
$table->attributes['class'] = 'admintable generaltable';
$table->colclasses[] = 'leftalign';
foreach ($extracolumns as $field) {
$table->head[] = ${$field};
$table->colclasses[] = 'leftalign';
}
$table->head[] = $city;
$table->colclasses[] = 'leftalign';
$table->head[] = $country;
$table->colclasses[] = 'leftalign';
$table->head[] = $lastaccess;
$table->colclasses[] = 'leftalign';
$table->head[] = get_string('edit');
$table->colclasses[] = 'centeralign';
$table->head[] = "";
+3 -3
View File
@@ -35,12 +35,12 @@ function get_selection_data($ufiltering) {
if ($scount) {
if ($scount < MAX_BULK_USERS) {
$in = implode(',', $SESSION->bulk_users);
$bulkusers = $SESSION->bulk_users;
} else {
$bulkusers = array_slice($SESSION->bulk_users, 0, MAX_BULK_USERS, true);
$in = implode(',', $bulkusers);
}
$userlist['susers'] = $DB->get_records_select_menu('user', "id IN ($in)", null, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
list($in, $inparams) = $DB->get_in_or_equal($bulkusers);
$userlist['susers'] = $DB->get_records_select_menu('user', "id $in", $inparams, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
}
return $userlist;
+11 -12
View File
@@ -52,14 +52,9 @@ class auth_db_testcase extends advanced_testcase {
set_config('host', $CFG->dbhost.':'.$CFG->dboptions['dbport'], 'auth/db');
}
switch (get_class($DB)) {
case 'mssql_native_moodle_database':
set_config('type', 'mssql_n', 'auth/db');
set_config('sybasequoting', '1', 'auth/db');
break;
switch ($DB->get_dbfamily()) {
case 'mariadb_native_moodle_database':
case 'mysqli_native_moodle_database':
case 'mysql':
set_config('type', 'mysqli', 'auth/db');
set_config('setupsql', "SET NAMES 'UTF-8'", 'auth/db');
set_config('sybasequoting', '0', 'auth/db');
@@ -72,12 +67,12 @@ class auth_db_testcase extends advanced_testcase {
}
break;
case 'oci_native_moodle_database':
case 'oracle':
set_config('type', 'oci8po', 'auth/db');
set_config('sybasequoting', '1', 'auth/db');
break;
case 'pgsql_native_moodle_database':
case 'postgres':
set_config('type', 'postgres7', 'auth/db');
$setupsql = "SET NAMES 'UTF-8'";
if (!empty($CFG->dboptions['dbschema'])) {
@@ -98,13 +93,17 @@ class auth_db_testcase extends advanced_testcase {
}
break;
case 'sqlsrv_native_moodle_database':
set_config('type', 'mssqlnative', 'auth/db');
case 'mssql':
if (get_class($DB) == 'mssql_native_moodle_database') {
set_config('type', 'mssql_n', 'auth/db');
} else {
set_config('type', 'mssqlnative', 'auth/db');
}
set_config('sybasequoting', '1', 'auth/db');
break;
default:
throw new exception('Unknown database driver '.get_class($DB));
throw new exception('Unknown database family ' . $DB->get_dbfamily());
}
$table = new xmldb_table('auth_db_users');
+2 -1
View File
@@ -737,11 +737,12 @@ class auth_plugin_ldap extends auth_plugin_base {
do {
$value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute);
$value = core_text::convert($value[0], $this->config->ldapencoding, 'utf-8');
$value = trim($value);
$this->ldap_bulk_insert($value);
} while ($entry = ldap_next_entry($ldapconnection, $entry));
}
unset($ldap_result); // Free mem.
} while ($ldap_pagedresults && !empty($ldap_cookie));
} while ($ldap_pagedresults && $ldap_cookie !== null && $ldap_cookie != '');
}
// If LDAP paged results were used, the current connection must be completely
+1 -1
View File
@@ -79,7 +79,7 @@ $string['auth_ldap_passtype'] = 'Specify the format of new or changed passwords
$string['auth_ldap_passtype_key'] = 'Password format';
$string['auth_ldap_passwdexpire_settings'] = 'LDAP password expiration settings.';
$string['auth_ldap_preventpassindb'] = 'Select yes to prevent passwords from being stored in Moodle\'s DB.';
$string['auth_ldap_preventpassindb_key'] = 'Hide passwords';
$string['auth_ldap_preventpassindb_key'] = 'Don\'t cache passwords';
$string['auth_ldap_search_sub'] = 'Search users from subcontexts.';
$string['auth_ldap_search_sub_key'] = 'Search subcontexts';
$string['auth_ldap_server_settings'] = 'LDAP server settings';
+4 -1
View File
@@ -41,13 +41,16 @@ class auth_plugin_manual extends auth_plugin_base {
* The name of the component. Used by the configuration.
*/
const COMPONENT_NAME = 'auth_manual';
const LEGACY_COMPONENT_NAME = 'auth/manual';
/**
* Constructor.
*/
function auth_plugin_manual() {
$this->authtype = 'manual';
$this->config = get_config(self::COMPONENT_NAME);
$config = get_config(self::COMPONENT_NAME);
$legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
$this->config = (object)array_merge((array)$legacyconfig, (array)$config);
}
/**
+6 -6
View File
@@ -61,8 +61,8 @@ Moodle Configuration with Dual login
--
Also see:
https://spaces.internet2.edu/display/SHIB2/NativeSPRequestMapper and
https://spaces.internet2.edu/display/SHIB2/NativeSPAccessControl
https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPRequestMapper and
https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAccessControl
2. As Moodle admin, go to the 'Administrations >> Users >> Authentication' and
click on the the 'Shibboleth' settings.
@@ -101,8 +101,8 @@ Moodle Configuration with Dual login
to the same host. If no SessionInitiator URL is given, the default one
'/Shibboleth.sso' (only works for Shibboleth 1.3.x) will be used. For
Shibboleth 2.x you have to add '/Shibboleth.sso/DS' as a SessionInitiator.
Also see https://spaces.internet2.edu/display/SHIB/SessionInitiator
and https://spaces.internet2.edu/display/SHIB2/NativeSPSessionInitiator
Also see https://wiki.shibboleth.net/confluence/display/SHIB/SessionInitiator
and https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPSessionInitiator
Important Note: If you upgraded from a previous version of Moodle and now
want to use the integrated WAYF, you have to make sure that
@@ -324,8 +324,8 @@ logout. Hopefully, the Moodle logout helps to motivate the developers to
implement SLO. On the other hand, the easiest and safest way to log out
still is to tell users to quit their web browsers :)
Also see https://spaces.internet2.edu/display/SHIB2/SLOIssues and
https://spaces.internet2.edu/display/SHIB2/NativeSPLogoutInitiator for some
Also see https://wiki.shibboleth.net/confluence/display/SHIB2/SLOIssues and
https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPLogoutInitiator for some
background information on this topic.
--------------------------------------------------------------------------------
+22 -28
View File
@@ -1,13 +1,15 @@
<?php
// Implements logout for Shibboleth authenticated users according to:
// - https://spaces.internet2.edu/display/SHIB2/NativeSPLogoutInitiator
// - https://spaces.internet2.edu/display/SHIB2/NativeSPNotify
// - https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPLogoutInitiator
// - https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPNotify
require_once("../../config.php");
require_once($CFG->dirroot."/auth/shibboleth/auth.php");
$action = optional_param('action', '', PARAM_ALPHA);
$redirect = optional_param('return', '', PARAM_URL);
// Find out whether host supports https
$protocol = 'http://';
@@ -15,38 +17,32 @@ if ( isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']
$protocol = 'https://';
}
// Front channel logout
if (
isset($_GET['return'])
&& isset($_GET['action'])
&& $_GET['action'] == 'logout'
){
// Logout out user from application
// E.g. destroy application session/cookie etc
require_logout();
// Finally, send user to the return URL
redirect($_GET['return']);
// If the shibboleth plugin is not enable, throw an exception.
if (!is_enabled_auth('shibboleth')) {
throw new moodle_exception(get_string('pluginnotenabled', 'auth', 'shibboleth'));
}
// Back channel logout
elseif (!empty($HTTP_RAW_POST_DATA)) {
// Front channel logout.
if ($action == 'logout' && !empty($redirect)) {
// Requires PHP 5
if ($USER->auth == 'shibboleth') {
// Logout out user from application.
require_logout();
// Finally, send user to the return URL.
redirect($redirect);
}
} else if (!empty($HTTP_RAW_POST_DATA)) {
// Set SOAP header
// Back channel logout.
// Set SOAP header.
$server = new SoapServer($protocol.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'/LogoutNotification.wsdl');
$server->addFunction("LogoutNotification");
$server->handle();
}
// Return WSDL
else {
} else {
// Return WSDL.
header('Content-Type: text/xml');
echo <<<WSDL
@@ -66,8 +62,8 @@ Because neither of these two variants seems to be the case, the WSDL file for
the web service is returned.
For more information see:
- https://spaces.internet2.edu/display/SHIB2/NativeSPLogoutInitiator
- https://spaces.internet2.edu/display/SHIB2/NativeSPNotify
- https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPLogoutInitiator
- https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPNotify
-->
<types>
@@ -119,9 +115,7 @@ For more information see:
</definitions>
WSDL;
exit;
}
/******************************************************************************/
function LogoutNotification($SessionID){
+25 -1
View File
@@ -49,6 +49,9 @@ abstract class info {
/** @var tree Availability configuration, decoded from JSON; null if unset */
protected $availabilitytree;
/** @var array|null Array of information about current restore if any */
protected static $restoreinfo = null;
/**
* Constructs with item details.
*
@@ -307,9 +310,12 @@ abstract class info {
* @param string $restoreid Restore identifier
* @param int $courseid Target course id
* @param \base_logger $logger Logger for any warnings
* @param int $dateoffset Date offset to be added to any dates (0 = none)
*/
public function update_after_restore($restoreid, $courseid, \base_logger $logger) {
public function update_after_restore($restoreid, $courseid, \base_logger $logger, $dateoffset) {
$tree = $this->get_availability_tree();
// Set static data for use by get_restore_date_offset function.
self::$restoreinfo = array('restoreid' => $restoreid, 'dateoffset' => $dateoffset);
$changed = $tree->update_after_restore($restoreid, $courseid, $logger,
$this->get_thing_name());
if ($changed) {
@@ -319,6 +325,24 @@ abstract class info {
}
}
/**
* Gets the date offset (amount by which any date values should be
* adjusted) for the current restore.
*
* @param string $restoreid Restore identifier
* @return int Date offset (0 if none)
* @throws coding_exception If not in a restore (or not in that restore)
*/
public static function get_restore_date_offset($restoreid) {
if (!self::$restoreinfo) {
throw new coding_exception('Only valid during restore');
}
if (self::$restoreinfo['restoreid'] !== $restoreid) {
throw new coding_exception('Data not available for that restore id');
}
return self::$restoreinfo['dateoffset'];
}
/**
* Obtains the name of the item (cm_info or section_info, at present) that
* this is controlling availability of. Name should be formatted ready
+8 -1
View File
@@ -187,6 +187,13 @@ class info_module extends info {
// As a result we cannot take short cuts any longer and must get
// standard modinfo.
$modinfo = get_fast_modinfo($cm->course, $userid);
return $modinfo->get_cm($cm->id)->uservisible;
$cms = $modinfo->get_cms();
if (!isset($cms[$cm->id])) {
// In some cases this might get called with a cmid that is no longer
// available, for example when a module is hidden at system level.
debugging('info_module::is_user_visible called with invalid cmid ' . $cm->id, DEBUG_DEVELOPER);
return false;
}
return $cms[$cm->id]->uservisible;
}
}
+15 -4
View File
@@ -560,10 +560,13 @@ class tree extends tree_node {
public function save() {
$result = new \stdClass();
$result->op = $this->op;
if ($this->op === self::OP_AND || $this->op === self::OP_NOT_OR) {
$result->showc = $this->showchildren;
} else {
$result->show = $this->show;
// Only root tree has the 'show' options.
if ($this->root) {
if ($this->op === self::OP_AND || $this->op === self::OP_NOT_OR) {
$result->showc = $this->showchildren;
} else {
$result->show = $this->show;
}
}
$result->c = array();
foreach ($this->children as $child) {
@@ -572,6 +575,14 @@ class tree extends tree_node {
return $result;
}
/**
* Checks whether this tree is empty (contains no children).
* @return boolean True if empty
*/
public function is_empty() {
return count($this->children) === 0;
}
/**
* Recursively gets all children of a particular class (you can use a base
* class to get all conditions, or a specific class).
+3
View File
@@ -87,6 +87,9 @@ abstract class tree_node {
* The default behaviour is simply to return false. If there is a problem
* with the update, $logger can be used to output a warning.
*
* Note: If you need information about the date offset, call
* \core_availability\info::get_restore_date_offset($restoreid).
*
* @param string $restoreid Restore ID
* @param int $courseid ID of target course
* @param \base_logger $logger Logger for any warnings
@@ -209,4 +209,15 @@ class condition extends \core_availability\condition {
protected static function is_midnight($time) {
return usergetmidnight($time) == $time;
}
public function update_after_restore(
$restoreid, $courseid, \base_logger $logger, $name) {
// Update the date, if restoring with changed date.
$dateoffset = \core_availability\info::get_restore_date_offset($restoreid);
if ($dateoffset) {
$this->time += $dateoffset;
return true;
}
return false;
}
}
@@ -176,6 +176,12 @@ class condition extends \core_availability\condition {
public function filter_user_list(array $users, $not, \core_availability\info $info,
\core_availability\capability_checker $checker) {
global $CFG, $DB;
// If the array is empty already, just return it.
if (!$users) {
return $users;
}
require_once($CFG->libdir . '/grouplib.php');
$course = $info->get_course();
@@ -209,6 +209,11 @@ class condition extends \core_availability\condition {
\core_availability\capability_checker $checker) {
global $CFG, $DB;
// If the array is empty already, just return it.
if (!$users) {
return $users;
}
// List users for this course who match the condition.
$groupingusers = $DB->get_records_sql("
SELECT DISTINCT gm.userid
@@ -416,6 +416,11 @@ class condition extends \core_availability\condition {
\core_availability\capability_checker $checker) {
global $CFG, $DB;
// If the array is empty already, just return it.
if (!$users) {
return $users;
}
// Get all users from the list who match the condition.
list ($sql, $params) = $DB->get_in_or_equal(array_keys($users));
@@ -337,7 +337,8 @@ class availability_profile_condition_testcase extends advanced_testcase {
// The list of fields should include the text field added in setUp(),
// but should not include the textarea field added just now.
$fields = condition::get_custom_profile_fields();
$this->assertEquals(array('frogtype'), array_keys($fields));
$this->assertArrayHasKey('frogtype', $fields);
$this->assertArrayNotHasKey('longtext', $fields);
}
/**
@@ -74,6 +74,9 @@ M.availability_profile.form.getNode = function(json) {
if (json.op !== undefined &&
node.one('select[name=op] > option[value=' + json.op + ']')) {
node.one('select[name=op]').set('value', json.op);
if (json.op === 'isempty' || json.op === 'isnotempty') {
node.one('input[name=value]').set('disabled', true);
}
}
if (json.v !== undefined) {
node.one('input').set('value', json.v);
@@ -1 +1 @@
YUI.add("moodle-availability_profile-form",function(e,t){M.availability_profile=M.availability_profile||{},M.availability_profile.form=e.Object(M.core_availability.plugin),M.availability_profile.form.profiles=null,M.availability_profile.form.initInner=function(e,t){this.standardFields=e,this.customFields=t},M.availability_profile.form.getNode=function(t){var n=M.str.availability_profile,r='<span class="availability-group"><label>'+n.conditiontitle+" "+'<select name="field">'+'<option value="choose">'+M.str.moodle.choosedots+"</option>",i;for(var s=0;s<this.standardFields.length;s++)i=this.standardFields[s],r+='<option value="sf_'+i.field+'">'+i.display+"</option>";for(s=0;s<this.customFields.length;s++)i=this.customFields[s],r+='<option value="cf_'+i.field+'">'+i.display+"</option>";r+='</select></label> <label><span class="accesshide">'+n.label_operator+' </span><select name="op" title="'+n.label_operator+'">';var o=["isequalto","contains","doesnotcontain","startswith","endswith","isempty","isnotempty"];for(s=0;s<o.length;s++)r+='<option value="'+o[s]+'">'+n["op_"+o[s]]+"</option>";r+='</select></label> <label><span class="accesshide">'+n.label_value+'</span><input name="value" type="text" style="width: 10em" title="'+n.label_value+'"/></label></span>';var u=e.Node.create("<span>"+r+"</span>");t.sf!==undefined&&u.one("select[name=field] > option[value=sf_"+t.sf+"]")?u.one("select[name=field]").set("value","sf_"+t.sf):t.cf!==undefined&&u.one("select[name=field] > option[value=cf_"+t.cf+"]")&&u.one("select[name=field]").set("value","cf_"+t.cf),t.op!==undefined&&u.one("select[name=op] > option[value="+t.op+"]")&&u.one("select[name=op]").set("value",t.op),t.v!==undefined&&u.one("input").set("value",t.v);if(!M.availability_profile.form.addedEvents){M.availability_profile.form.addedEvents=!0;var a=function(e){var t=e.ancestor("span.availability_profile"),n=t.one("select[name=op]"),r=n.get("value")==="isempty"||n.get("value")==="isnotempty";t.one("input[name=value]").set("disabled",r),M.core_availability.form.update()},f=e.one("#fitem_id_availabilityconditionsjson");f.delegate("change",function(){a(this)},".availability_profile select"),f.delegate("change",function(){a(this)},".availability_profile input[name=value]")}return u},M.availability_profile.form.fillValue=function(e,t){var n=t.one("select[name=field]").get("value");n.substr(0,3)==="sf_"?e.sf=n.substr(3):n.substr(0,3)==="cf_"&&(e.cf=n.substr(3)),e.op=t.one("select[name=op]").get("value");var r=t.one("input[name=value]");r.get("disabled")||(e.v=r.get("value"))},M.availability_profile.form.fillErrors=function(e,t){var n={};this.fillValue(n,t),n.sf===undefined&&n.cf===undefined&&e.push("availability_profile:error_selectfield"),n.v!==undefined&&/^\s*$/.test(n.v)&&e.push("availability_profile:error_setvalue")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
YUI.add("moodle-availability_profile-form",function(e,t){M.availability_profile=M.availability_profile||{},M.availability_profile.form=e.Object(M.core_availability.plugin),M.availability_profile.form.profiles=null,M.availability_profile.form.initInner=function(e,t){this.standardFields=e,this.customFields=t},M.availability_profile.form.getNode=function(t){var n=M.str.availability_profile,r='<span class="availability-group"><label>'+n.conditiontitle+" "+'<select name="field">'+'<option value="choose">'+M.str.moodle.choosedots+"</option>",i;for(var s=0;s<this.standardFields.length;s++)i=this.standardFields[s],r+='<option value="sf_'+i.field+'">'+i.display+"</option>";for(s=0;s<this.customFields.length;s++)i=this.customFields[s],r+='<option value="cf_'+i.field+'">'+i.display+"</option>";r+='</select></label> <label><span class="accesshide">'+n.label_operator+' </span><select name="op" title="'+n.label_operator+'">';var o=["isequalto","contains","doesnotcontain","startswith","endswith","isempty","isnotempty"];for(s=0;s<o.length;s++)r+='<option value="'+o[s]+'">'+n["op_"+o[s]]+"</option>";r+='</select></label> <label><span class="accesshide">'+n.label_value+'</span><input name="value" type="text" style="width: 10em" title="'+n.label_value+'"/></label></span>';var u=e.Node.create("<span>"+r+"</span>");t.sf!==undefined&&u.one("select[name=field] > option[value=sf_"+t.sf+"]")?u.one("select[name=field]").set("value","sf_"+t.sf):t.cf!==undefined&&u.one("select[name=field] > option[value=cf_"+t.cf+"]")&&u.one("select[name=field]").set("value","cf_"+t.cf),t.op!==undefined&&u.one("select[name=op] > option[value="+t.op+"]")&&(u.one("select[name=op]").set("value",t.op),(t.op==="isempty"||t.op==="isnotempty")&&u.one("input[name=value]").set("disabled",!0)),t.v!==undefined&&u.one("input").set("value",t.v);if(!M.availability_profile.form.addedEvents){M.availability_profile.form.addedEvents=!0;var a=function(e){var t=e.ancestor("span.availability_profile"),n=t.one("select[name=op]"),r=n.get("value")==="isempty"||n.get("value")==="isnotempty";t.one("input[name=value]").set("disabled",r),M.core_availability.form.update()},f=e.one("#fitem_id_availabilityconditionsjson");f.delegate("change",function(){a(this)},".availability_profile select"),f.delegate("change",function(){a(this)},".availability_profile input[name=value]")}return u},M.availability_profile.form.fillValue=function(e,t){var n=t.one("select[name=field]").get("value");n.substr(0,3)==="sf_"?e.sf=n.substr(3):n.substr(0,3)==="cf_"&&(e.cf=n.substr(3)),e.op=t.one("select[name=op]").get("value");var r=t.one("input[name=value]");r.get("disabled")||(e.v=r.get("value"))},M.availability_profile.form.fillErrors=function(e,t){var n={};this.fillValue(n,t),n.sf===undefined&&n.cf===undefined&&e.push("availability_profile:error_selectfield"),n.v!==undefined&&/^\s*$/.test(n.v)&&e.push("availability_profile:error_setvalue")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
@@ -74,6 +74,9 @@ M.availability_profile.form.getNode = function(json) {
if (json.op !== undefined &&
node.one('select[name=op] > option[value=' + json.op + ']')) {
node.one('select[name=op]').set('value', json.op);
if (json.op === 'isempty' || json.op === 'isnotempty') {
node.one('input[name=value]').set('disabled', true);
}
}
if (json.v !== undefined) {
node.one('input').set('value', json.v);
@@ -72,6 +72,9 @@ M.availability_profile.form.getNode = function(json) {
if (json.op !== undefined &&
node.one('select[name=op] > option[value=' + json.op + ']')) {
node.one('select[name=op]').set('value', json.op);
if (json.op === 'isempty' || json.op === 'isnotempty') {
node.one('input[name=value]').set('disabled', true);
}
}
if (json.v !== undefined) {
node.one('input').set('value', json.v);
+16
View File
@@ -23,6 +23,7 @@
*/
use core_availability\capability_checker;
use \core_availability\tree;
defined('MOODLE_INTERNAL') || die();
@@ -488,6 +489,21 @@ class tree_testcase extends \advanced_testcase {
$tree->get_full_information($info));
}
/**
* Tests the is_empty() function.
*/
public function test_is_empty() {
// Tree with nothing in should be empty.
$structure = self::tree(array());
$tree = new tree($structure);
$this->assertTrue($tree->is_empty());
// Tree with something in is not empty.
$structure = self::tree(array(self::mock(array('m' => '1'))));
$tree = new tree($structure);
$this->assertFalse($tree->is_empty());
}
/**
* Tests the get_all_children() function.
*/
@@ -928,20 +928,19 @@ M.core_availability.Item.prototype.pluginNode = null;
M.core_availability.EyeIcon = function(individual, shown) {
this.individual = individual;
this.span = Y.Node.create('<a class="availability-eye" href="#" role="button">');
var iconBase = M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/core/' + M.cfg.themerev;
var icon = Y.Node.create('<img />');
this.span.appendChild(icon);
// Set up button text and icon.
var suffix = individual ? '_individual' : '_all';
var setHidden = function() {
icon.set('src', iconBase + '/i/show');
icon.set('src', M.util.image_url('i/show', 'core'));
icon.set('alt', M.str.availability['hidden' + suffix]);
this.span.set('title', M.str.availability['hidden' + suffix] + ' \u2022 ' +
M.str.availability.show_verb);
};
var setShown = function() {
icon.set('src', iconBase + '/i/hide');
icon.set('src', M.util.image_url('i/hide', 'core'));
icon.set('alt', M.str.availability['shown' + suffix]);
this.span.set('title', M.str.availability['shown' + suffix] + ' \u2022 ' +
M.str.availability.hide_verb);
@@ -1006,9 +1005,8 @@ M.core_availability.EyeIcon.prototype.isHidden = function() {
M.core_availability.DeleteIcon = function(toDelete) {
this.span = Y.Node.create('<a class="availability-delete" href="#" title="' +
M.str.moodle['delete'] + '" role="button">');
var img = Y.Node.create('<img src="' +
M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/core/' + M.cfg.themerev +
'/t/delete" alt="' + M.str.moodle['delete'] + '" />');
var img = Y.Node.create('<img src="' + M.util.image_url('t/delete', 'core') +
'" alt="' + M.str.moodle['delete'] + '" />');
this.span.appendChild(img);
var click = function(e) {
e.preventDefault();
File diff suppressed because one or more lines are too long
@@ -928,20 +928,19 @@ M.core_availability.Item.prototype.pluginNode = null;
M.core_availability.EyeIcon = function(individual, shown) {
this.individual = individual;
this.span = Y.Node.create('<a class="availability-eye" href="#" role="button">');
var iconBase = M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/core/' + M.cfg.themerev;
var icon = Y.Node.create('<img />');
this.span.appendChild(icon);
// Set up button text and icon.
var suffix = individual ? '_individual' : '_all';
var setHidden = function() {
icon.set('src', iconBase + '/i/show');
icon.set('src', M.util.image_url('i/show', 'core'));
icon.set('alt', M.str.availability['hidden' + suffix]);
this.span.set('title', M.str.availability['hidden' + suffix] + ' \u2022 ' +
M.str.availability.show_verb);
};
var setShown = function() {
icon.set('src', iconBase + '/i/hide');
icon.set('src', M.util.image_url('i/hide', 'core'));
icon.set('alt', M.str.availability['shown' + suffix]);
this.span.set('title', M.str.availability['shown' + suffix] + ' \u2022 ' +
M.str.availability.hide_verb);
@@ -1006,9 +1005,8 @@ M.core_availability.EyeIcon.prototype.isHidden = function() {
M.core_availability.DeleteIcon = function(toDelete) {
this.span = Y.Node.create('<a class="availability-delete" href="#" title="' +
M.str.moodle['delete'] + '" role="button">');
var img = Y.Node.create('<img src="' +
M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/core/' + M.cfg.themerev +
'/t/delete" alt="' + M.str.moodle['delete'] + '" />');
var img = Y.Node.create('<img src="' + M.util.image_url('t/delete', 'core') +
'" alt="' + M.str.moodle['delete'] + '" />');
this.span.appendChild(img);
var click = function(e) {
e.preventDefault();
+4 -6
View File
@@ -926,20 +926,19 @@ M.core_availability.Item.prototype.pluginNode = null;
M.core_availability.EyeIcon = function(individual, shown) {
this.individual = individual;
this.span = Y.Node.create('<a class="availability-eye" href="#" role="button">');
var iconBase = M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/core/' + M.cfg.themerev;
var icon = Y.Node.create('<img />');
this.span.appendChild(icon);
// Set up button text and icon.
var suffix = individual ? '_individual' : '_all';
var setHidden = function() {
icon.set('src', iconBase + '/i/show');
icon.set('src', M.util.image_url('i/show', 'core'));
icon.set('alt', M.str.availability['hidden' + suffix]);
this.span.set('title', M.str.availability['hidden' + suffix] + ' \u2022 ' +
M.str.availability.show_verb);
};
var setShown = function() {
icon.set('src', iconBase + '/i/hide');
icon.set('src', M.util.image_url('i/hide', 'core'));
icon.set('alt', M.str.availability['shown' + suffix]);
this.span.set('title', M.str.availability['shown' + suffix] + ' \u2022 ' +
M.str.availability.hide_verb);
@@ -1004,9 +1003,8 @@ M.core_availability.EyeIcon.prototype.isHidden = function() {
M.core_availability.DeleteIcon = function(toDelete) {
this.span = Y.Node.create('<a class="availability-delete" href="#" title="' +
M.str.moodle['delete'] + '" role="button">');
var img = Y.Node.create('<img src="' +
M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/core/' + M.cfg.themerev +
'/t/delete" alt="' + M.str.moodle['delete'] + '" />');
var img = Y.Node.create('<img src="' + M.util.image_url('t/delete', 'core') +
'" alt="' + M.str.moodle['delete'] + '" />');
this.span.appendChild(img);
var click = function(e) {
e.preventDefault();
+1 -1
View File
@@ -338,7 +338,7 @@ class cc2moodle {
$replace_values = array($i,
$i - 1,
$topic['title'],
entities::safexml($topic['title']),
$node_node_course_sections_section_mods_mod);
} else {
+3 -1
View File
@@ -1292,7 +1292,9 @@ class moodle1_question_bank_handler extends moodle1_xml_handler {
* Closes the questions wrapper
*/
public function on_questions_end() {
$this->xmlwriter->end_tag('questions');
if ($this->questionswrapperwritten) {
$this->xmlwriter->end_tag('questions');
}
}
/**
@@ -80,6 +80,9 @@ class backup_course_task extends backup_task {
$this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
}
// Annotate enrolment custom fields.
$this->add_step(new backup_enrolments_execution_step('annotate_enrol_custom_fields'));
// Annotate all the groups and groupings belonging to the course
$this->add_step(new backup_annotate_course_groups_and_groupings('annotate_course_groups'));
@@ -0,0 +1,39 @@
<?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/>.
/**
* Defines backup_enrol_plugin class.
*
* @package core_backup
* @subpackage moodle2
* @category backup
* @copyright 2014 University of Wisconsin
* @author Matt petro
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Base class for enrol backup plugins.
*
* @package core_backup
* @copyright 2014 University of Wisconsin
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class backup_enrol_plugin extends backup_plugin {
// Use default parent behaviour.
}
@@ -44,6 +44,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_theme_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_report_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_coursereport_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plagiarism_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_enrol_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_subplugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_settingslib.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_stepslib.php');
+1 -2
View File
@@ -129,11 +129,10 @@ class backup_root_task extends backup_task {
$activities->add_dependency($badges);
$users->add_dependency($badges);
// Define calendar events (dependent of users)
// Define calendar events.
$events = new backup_calendarevents_setting('calendarevents', base_setting::IS_BOOLEAN, true);
$events->set_ui(new backup_setting_ui_checkbox($events, get_string('rootsettingcalendarevents', 'backup')));
$this->add_setting($events);
$users->add_dependency($events);
// Define completion (dependent of users)
$completion = new backup_userscompletion_setting('userscompletion', base_setting::IS_BOOLEAN, true);
+90 -17
View File
@@ -547,7 +547,8 @@ class backup_enrolments_structure_step extends backup_structure_step {
$enrol->annotate_ids('role', 'roleid');
//TODO: let plugins annotate custom fields too and add more children
// Add enrol plugin structure.
$this->add_plugin_structure('enrol', $enrol, false);
return $enrolments;
}
@@ -1682,9 +1683,23 @@ class backup_zip_contents extends backup_execution_step implements file_progress
// Get the zip packer
$zippacker = get_file_packer('application/vnd.moodle.backup');
// Track overall progress for the 2 long-running steps (archive to
// pathname, get backup information).
$reporter = $this->task->get_progress();
$reporter->start_progress('backup_zip_contents', 2);
// Zip files
$result = $zippacker->archive_to_pathname($files, $zipfile, true, $this);
// If any sub-progress happened, end it.
if ($this->startedprogress) {
$this->task->get_progress()->end_progress();
$this->startedprogress = false;
} else {
// No progress was reported, manually move it on to the next overall task.
$reporter->progress(1);
}
// Something went wrong.
if ($result === false) {
@unlink($zipfile);
@@ -1692,16 +1707,20 @@ class backup_zip_contents extends backup_execution_step implements file_progress
}
// Read to make sure it is a valid backup. Refer MDL-37877 . Delete it, if found not to be valid.
try {
backup_general_helper::get_backup_information_from_mbz($zipfile);
backup_general_helper::get_backup_information_from_mbz($zipfile, $this);
} catch (backup_helper_exception $e) {
@unlink($zipfile);
throw new backup_step_exception('error_zip_packing', '', $e->debuginfo);
}
// If any progress happened, end it.
// If any sub-progress happened, end it.
if ($this->startedprogress) {
$this->task->get_progress()->end_progress();
$this->startedprogress = false;
} else {
$reporter->progress(2);
}
$reporter->end_progress();
}
/**
@@ -1770,6 +1789,47 @@ class backup_activity_grade_items_to_ids extends backup_execution_step {
}
}
/**
* This step allows enrol plugins to annotate custom fields.
*
* @package core_backup
* @copyright 2014 University of Wisconsin
* @author Matt Petro
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_enrolments_execution_step extends backup_execution_step {
/**
* Function that will contain all the code to be executed.
*/
protected function define_execution() {
global $DB;
$plugins = enrol_get_plugins(true);
$enrols = $DB->get_records('enrol', array(
'courseid' => $this->task->get_courseid()));
// Allow each enrol plugin to add annotations.
foreach ($enrols as $enrol) {
if (isset($plugins[$enrol->enrol])) {
$plugins[$enrol->enrol]->backup_annotate_custom_fields($this, $enrol);
}
}
}
/**
* Annotate a single name/id pair.
* This can be called from {@link enrol_plugin::backup_annotate_custom_fields()}.
*
* @param string $itemname
* @param int $itemid
*/
public function annotate_id($itemname, $itemid) {
backup_structure_dbops::insert_backup_ids_record($this->get_backupid(), $itemname, $itemid);
}
}
/**
* This step will annotate all the groups and groupings belonging to the course
*/
@@ -1865,13 +1925,22 @@ class backup_annotate_all_question_files extends backup_execution_step {
$components = backup_qtype_plugin::get_components_and_fileareas();
// Let's loop
foreach($rs as $record) {
// We don't need to specify filearea nor itemid as far as by
// component and context it's enough to annotate the whole bank files
// This backups "questiontext", "generalfeedback" and "answerfeedback" fileareas (all them
// belonging to the "question" component
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', null, null);
// Again, it is enough to pick files only by context and component
// Do it for qtype specific components
// Backup all the file areas the are managed by the core question component.
// That is, by the question_type base class. In particular, we don't want
// to include files belonging to responses here.
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'questiontext', null);
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'generalfeedback', null);
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'answer', null);
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'answerfeedback', null);
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'hint', null);
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'correctfeedback', null);
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'partiallycorrectfeedback', null);
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, 'question', 'incorrectfeedback', null);
// For files belonging to question types, we make the leap of faith that
// all the files belonging to the question type are part of the question definition,
// so we can just backup all the files in bulk, without specifying each
// file area name separately.
foreach ($components as $component => $fileareas) {
backup_structure_dbops::annotate_files($this->get_backupid(), $record->contextid, $component, null, null);
}
@@ -2188,7 +2257,8 @@ class backup_course_completion_structure_step extends backup_structure_step {
$cc = new backup_nested_element('course_completion');
$criteria = new backup_nested_element('course_completion_criteria', array('id'), array(
'course','criteriatype', 'module', 'moduleinstance', 'courseinstanceshortname', 'enrolperiod', 'timeend', 'gradepass', 'role'
'course', 'criteriatype', 'module', 'moduleinstance', 'courseinstanceshortname', 'enrolperiod',
'timeend', 'gradepass', 'role', 'roleshortname'
));
$criteriacompletions = new backup_nested_element('course_completion_crit_completions');
@@ -2211,12 +2281,15 @@ class backup_course_completion_structure_step extends backup_structure_step {
$cc->add_child($coursecompletions);
$cc->add_child($aggregatemethod);
// We need to get the courseinstances shortname rather than an ID for restore
$criteria->set_source_sql("SELECT ccc.*, c.shortname AS courseinstanceshortname
FROM {course_completion_criteria} ccc
LEFT JOIN {course} c ON c.id = ccc.courseinstance
WHERE ccc.course = ?", array(backup::VAR_COURSEID));
// We need some extra data for the restore.
// - courseinstances shortname rather than an ID.
// - roleshortname in case restoring on a different site.
$sourcesql = "SELECT ccc.*, c.shortname AS courseinstanceshortname, r.shortname AS roleshortname
FROM {course_completion_criteria} ccc
LEFT JOIN {course} c ON c.id = ccc.courseinstance
LEFT JOIN {role} r ON r.id = ccc.role
WHERE ccc.course = ?";
$criteria->set_source_sql($sourcesql, array(backup::VAR_COURSEID));
$aggregatemethod->set_source_table('course_completion_aggr_methd', array('course' => backup::VAR_COURSEID));
@@ -0,0 +1,39 @@
<?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/>.
/**
* Defines restore_enrol_plugin class.
*
* @package core_backup
* @subpackage moodle2
* @category backup
* @copyright 2014 University of Wisconsin
* @author Matt petro
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Base class for enrol backup plugins.
*
* @package core_backup
* @copyright 2014 University of Wisconsin
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class restore_enrol_plugin extends restore_plugin {
// Use default parent behaviour.
}
@@ -43,6 +43,7 @@ require_once($CFG->dirroot . '/backup/moodle2/restore_report_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_coursereport_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_plagiarism_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_gradingform_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_enrol_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_qtype_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_format_plugin.class.php');
@@ -52,6 +53,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_report_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_coursereport_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plagiarism_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_gradingform_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_enrol_plugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_subplugin.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_settingslib.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_stepslib.php');
+1 -2
View File
@@ -195,7 +195,7 @@ class restore_root_task extends restore_task {
$activities->add_dependency($badges);
$users->add_dependency($badges);
// Define Calendar events (dependent of users)
// Define Calendar events.
$defaultvalue = false; // Safer default
$changeable = false;
if (isset($rootsettings['calendarevents']) && $rootsettings['calendarevents']) { // Only enabled when available
@@ -206,7 +206,6 @@ class restore_root_task extends restore_task {
$events->set_ui(new backup_setting_ui_checkbox($events, get_string('rootsettingcalendarevents', 'backup')));
$events->get_ui()->set_changeable($changeable);
$this->add_setting($events);
$users->add_dependency($events);
// Define completion (dependent of users)
$defaultvalue = false; // Safer default
+137 -39
View File
@@ -564,6 +564,9 @@ class restore_update_availability extends restore_execution_step {
rebuild_course_cache($this->get_courseid(), true);
$modinfo = get_fast_modinfo($this->get_courseid());
// Get the date offset for this restore.
$dateoffset = $this->apply_date_offset(1) - 1;
// Update all sections that were restored.
$params = array('backupid' => $this->get_restoreid(), 'itemname' => 'course_section');
$rs = $DB->get_recordset('backup_ids_temp', $params, '', 'newitemid');
@@ -586,7 +589,7 @@ class restore_update_availability extends restore_execution_step {
if (!is_null($section->availability)) {
$info = new \core_availability\info_section($section);
$info->update_after_restore($this->get_restoreid(),
$this->get_courseid(), $this->get_logger());
$this->get_courseid(), $this->get_logger(), $dateoffset);
}
}
$rs->close();
@@ -606,7 +609,7 @@ class restore_update_availability extends restore_execution_step {
if (!is_null($cm->availability)) {
$info = new \core_availability\info_module($cm);
$info->update_after_restore($this->get_restoreid(),
$this->get_courseid(), $this->get_logger());
$this->get_courseid(), $this->get_logger(), $dateoffset);
}
}
$rs->close();
@@ -1777,12 +1780,12 @@ class restore_enrolments_structure_step extends restore_structure_step {
protected function define_structure() {
$paths = array();
$enrol = new restore_path_element('enrol', '/enrolments/enrols/enrol');
$enrolment = new restore_path_element('enrolment', '/enrolments/enrols/enrol/user_enrolments/enrolment');
// Attach local plugin stucture to enrol element.
$this->add_plugin_structure('enrol', $enrol);
$paths[] = new restore_path_element('enrol', '/enrolments/enrols/enrol');
$paths[] = new restore_path_element('enrolment', '/enrolments/enrols/enrol/user_enrolments/enrolment');
return $paths;
return array($enrol, $enrolment);
}
/**
@@ -2114,7 +2117,13 @@ class restore_badges_structure_step extends restore_structure_step {
$data = (object)$data;
$data->usercreated = $this->get_mappingid('user', $data->usercreated);
if (empty($data->usercreated)) {
$data->usercreated = $this->task->get_userid();
}
$data->usermodified = $this->get_mappingid('user', $data->usermodified);
if (empty($data->usermodified)) {
$data->usermodified = $this->task->get_userid();
}
// We'll restore the badge image.
$restorefiles = true;
@@ -2211,6 +2220,12 @@ class restore_badges_structure_step extends restore_structure_step {
'issuerrole' => $role,
'datemet' => $this->apply_date_offset($data->datemet)
);
// Skip the manual award if recipient or issuer can not be mapped to.
if (empty($award['recipientid']) || empty($award['issuerid'])) {
return;
}
$DB->insert_record('badge_manual_award', $award);
}
}
@@ -2236,15 +2251,17 @@ class restore_calendarevents_structure_step extends restore_structure_step {
}
public function process_calendarevents($data) {
global $DB, $SITE;
global $DB, $SITE, $USER;
$data = (object)$data;
$oldid = $data->id;
$restorefiles = true; // We'll restore the files
// Find the userid and the groupid associated with the event. Return if not found.
// Find the userid and the groupid associated with the event.
$data->userid = $this->get_mappingid('user', $data->userid);
if ($data->userid === false) {
return;
// Blank user ID means that we are dealing with module generated events such as quiz starting times.
// Use the current user ID for these events.
$data->userid = $USER->id;
}
if (!empty($data->groupid)) {
$data->groupid = $this->get_mappingid('group', $data->groupid);
@@ -2401,18 +2418,42 @@ class restore_course_completion_structure_step extends restore_structure_step {
$data->timeend = $this->apply_date_offset($data->timeend);
// Map the role from the criteria
if (!empty($data->role)) {
$data->role = $this->get_mappingid('role', $data->role);
}
if (isset($data->role) && $data->role != '') {
// Newer backups should include roleshortname, which makes this much easier.
if (!empty($data->roleshortname)) {
$roleinstanceid = $DB->get_field('role', 'id', array('shortname' => $data->roleshortname));
if (!$roleinstanceid) {
$this->log(
'Could not match the role shortname in course_completion_criteria, so skipping',
backup::LOG_DEBUG
);
return;
}
$data->role = $roleinstanceid;
} else {
$data->role = $this->get_mappingid('role', $data->role);
}
$skipcriteria = false;
// Check we have an id, otherwise it causes all sorts of bugs.
if (!$data->role) {
$this->log(
'Could not match role in course_completion_criteria, so skipping',
backup::LOG_DEBUG
);
return;
}
}
// If the completion criteria is for a module we need to map the module instance
// to the new module id.
if (!empty($data->moduleinstance) && !empty($data->module)) {
$data->moduleinstance = $this->get_mappingid('course_module', $data->moduleinstance);
if (empty($data->moduleinstance)) {
$skipcriteria = true;
$this->log(
'Could not match the module instance in course_completion_criteria, so skipping',
backup::LOG_DEBUG
);
return;
}
} else {
$data->module = null;
@@ -2423,28 +2464,30 @@ class restore_course_completion_structure_step extends restore_structure_step {
if (!empty($data->courseinstanceshortname)) {
$courseinstanceid = $DB->get_field('course', 'id', array('shortname'=>$data->courseinstanceshortname));
if (!$courseinstanceid) {
$skipcriteria = true;
$this->log(
'Could not match the course instance in course_completion_criteria, so skipping',
backup::LOG_DEBUG
);
return;
}
} else {
$courseinstanceid = null;
}
$data->courseinstance = $courseinstanceid;
if (!$skipcriteria) {
$params = array(
'course' => $data->course,
'criteriatype' => $data->criteriatype,
'enrolperiod' => $data->enrolperiod,
'courseinstance' => $data->courseinstance,
'module' => $data->module,
'moduleinstance' => $data->moduleinstance,
'timeend' => $data->timeend,
'gradepass' => $data->gradepass,
'role' => $data->role
);
$newid = $DB->insert_record('course_completion_criteria', $params);
$this->set_mapping('course_completion_criteria', $data->id, $newid);
}
$params = array(
'course' => $data->course,
'criteriatype' => $data->criteriatype,
'enrolperiod' => $data->enrolperiod,
'courseinstance' => $data->courseinstance,
'module' => $data->module,
'moduleinstance' => $data->moduleinstance,
'timeend' => $data->timeend,
'gradepass' => $data->gradepass,
'role' => $data->role
);
$newid = $DB->insert_record('course_completion_criteria', $params);
$this->set_mapping('course_completion_criteria', $data->id, $newid);
}
/**
@@ -2504,7 +2547,21 @@ class restore_course_completion_structure_step extends restore_structure_step {
'timecompleted' => $this->apply_date_offset($data->timecompleted),
'reaggregate' => $data->reaggregate
);
$DB->insert_record('course_completions', $params);
$existing = $DB->get_record('course_completions', array(
'userid' => $data->userid,
'course' => $data->course
));
// MDL-46651 - If cron writes out a new record before we get to it
// then we should replace it with the Truth data from the backup.
// This may be obsolete after MDL-48518 is resolved
if ($existing) {
$params['id'] = $existing->id;
$DB->update_record('course_completions', $params);
} else {
$DB->insert_record('course_completions', $params);
}
}
}
@@ -2622,7 +2679,7 @@ class restore_course_logs_structure_step extends restore_structure_step {
$manager = get_log_manager();
if (method_exists($manager, 'legacy_add_to_log')) {
$manager->legacy_add_to_log($data->course, $data->module, $data->action, $data->url,
$data->info, $data->cmid, $data->userid);
$data->info, $data->cmid, $data->userid, $data->ip, $data->time);
}
}
}
@@ -2671,7 +2728,7 @@ class restore_activity_logs_structure_step extends restore_course_logs_structure
$manager = get_log_manager();
if (method_exists($manager, 'legacy_add_to_log')) {
$manager->legacy_add_to_log($data->course, $data->module, $data->action, $data->url,
$data->info, $data->cmid, $data->userid);
$data->info, $data->cmid, $data->userid, $data->ip, $data->time);
}
}
}
@@ -2985,11 +3042,52 @@ class restore_block_instance_structure_step extends restore_structure_step {
}
if (!$bi->instance_allow_multiple()) {
if ($DB->record_exists_sql("SELECT bi.id
FROM {block_instances} bi
JOIN {block} b ON b.name = bi.blockname
WHERE bi.parentcontextid = ?
AND bi.blockname = ?", array($data->parentcontextid, $data->blockname))) {
// The block cannot be added twice, so we will check if the same block is already being
// displayed on the same page. For this, rather than mocking a page and using the block_manager
// we use a similar query to the one in block_manager::load_blocks(), this will give us
// a very good idea of the blocks already displayed in the context.
$params = array(
'blockname' => $data->blockname
);
// Context matching test.
$context = context::instance_by_id($data->parentcontextid);
$contextsql = 'bi.parentcontextid = :contextid';
$params['contextid'] = $context->id;
$parentcontextids = $context->get_parent_context_ids();
if ($parentcontextids) {
list($parentcontextsql, $parentcontextparams) =
$DB->get_in_or_equal($parentcontextids, SQL_PARAMS_NAMED);
$contextsql = "($contextsql OR (bi.showinsubcontexts = 1 AND bi.parentcontextid $parentcontextsql))";
$params = array_merge($params, $parentcontextparams);
}
// Page type pattern test.
$pagetypepatterns = matching_page_type_patterns_from_pattern($data->pagetypepattern);
list($pagetypepatternsql, $pagetypepatternparams) =
$DB->get_in_or_equal($pagetypepatterns, SQL_PARAMS_NAMED);
$params = array_merge($params, $pagetypepatternparams);
// Sub page pattern test.
$subpagepatternsql = 'bi.subpagepattern IS NULL';
if ($data->subpagepattern !== null) {
$subpagepatternsql = "($subpagepatternsql OR bi.subpagepattern = :subpagepattern)";
$params['subpagepattern'] = $data->subpagepattern;
}
$exists = $DB->record_exists_sql("SELECT bi.id
FROM {block_instances} bi
JOIN {block} b ON b.name = bi.blockname
WHERE bi.blockname = :blockname
AND $contextsql
AND bi.pagetypepattern $pagetypepatternsql
AND $subpagepatternsql", $params);
if ($exists) {
// There is at least one very similar block visible on the page where we
// are trying to restore the block. In these circumstances the block API
// would not allow the user to add another instance of the block, so we
// apply the same rule here.
return false;
}
}
+65 -1
View File
@@ -38,6 +38,13 @@ require_once($CFG->libdir . '/completionlib.php');
*/
class core_backup_moodle2_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
/**
* Tests the availability field on modules and sections is correctly
* backed up and restored.
@@ -331,13 +338,67 @@ class core_backup_moodle2_testcase extends advanced_testcase {
$this->assertEquals($expected, $actual);
}
/**
* When restoring a course, you can change the start date, which shifts other
* dates. This test checks that certain dates are correctly modified.
*/
public function test_restore_dates() {
global $DB, $CFG;
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
// Create a course with specific start date.
$generator = $this->getDataGenerator();
$course = $generator->create_course(array(
'startdate' => strtotime('1 Jan 2014 00:00 GMT')));
// Add a forum with conditional availability date restriction, including
// one of them nested inside a tree.
$availability = '{"op":"&","showc":[true,true],"c":[' .
'{"op":"&","c":[{"type":"date","d":">=","t":DATE1}]},' .
'{"type":"date","d":"<","t":DATE2}]}';
$before = str_replace(
array('DATE1', 'DATE2'),
array(strtotime('1 Feb 2014 00:00 GMT'), strtotime('10 Feb 2014 00:00 GMT')),
$availability);
$forum = $generator->create_module('forum', array('course' => $course->id,
'availability' => $before));
// Add an assign with defined start date.
$assign = $generator->create_module('assign', array('course' => $course->id,
'allowsubmissionsfromdate' => strtotime('7 Jan 2014 16:00 GMT')));
// Do backup and restore.
$newcourseid = $this->backup_and_restore($course, strtotime('3 Jan 2015 00:00 GMT'));
$modinfo = get_fast_modinfo($newcourseid);
// Check forum dates are modified by the same amount as the course start.
$newforums = $modinfo->get_instances_of('forum');
$newforum = reset($newforums);
$after = str_replace(
array('DATE1', 'DATE2'),
array(strtotime('3 Feb 2015 00:00 GMT'), strtotime('12 Feb 2015 00:00 GMT')),
$availability);
$this->assertEquals($after, $newforum->availability);
// Check assign date.
$newassigns = $modinfo->get_instances_of('assign');
$newassign = reset($newassigns);
$this->assertEquals(strtotime('9 Jan 2015 16:00 GMT'), $DB->get_field(
'assign', 'allowsubmissionsfromdate', array('id' => $newassign->instance)));
}
/**
* Backs a course up and restores it.
*
* @param stdClass $course Course object to backup
* @param int $newdate If non-zero, specifies custom date for new course
* @return int ID of newly restored course
*/
protected function backup_and_restore($course) {
protected function backup_and_restore($course, $newdate = 0) {
global $USER, $CFG;
// Turn off file logging, otherwise it can't delete the file (Windows).
@@ -358,6 +419,9 @@ class core_backup_moodle2_testcase extends advanced_testcase {
$rc = new restore_controller($backupid, $newcourseid,
backup::INTERACTIVE_NO, backup::MODE_GENERAL, $USER->id,
backup::TARGET_NEW_COURSE);
if ($newdate) {
$rc->get_plan()->get_setting('course_startdate')->set_value($newdate);
}
$this->assertTrue($rc->execute_precheck());
$rc->execute_plan();
$rc->destroy();
+5 -1
View File
@@ -6,6 +6,7 @@ require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
$contextid = required_param('contextid', PARAM_INT);
$stage = optional_param('stage', restore_ui::STAGE_CONFIRM, PARAM_INT);
$cancel = optional_param('cancel', '', PARAM_ALPHA);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -30,7 +31,10 @@ $PAGE->set_title($courseshortname . ': ' . get_string('restore'));
$PAGE->set_heading($coursefullname);
$renderer = $PAGE->get_renderer('core','backup');
echo $OUTPUT->header();
if (empty($cancel)) {
// Do not print the header if user cancelled the process, as we are going to redirect the user.
echo $OUTPUT->header();
}
// Prepare a progress bar which can display optionally during long-running
// operations while setting up the UI.
+22 -10
View File
@@ -396,18 +396,36 @@ abstract class backup_cron_automated_helper {
$results = $bc->get_results();
$outcome = self::outcome_from_results($results);
$file = $results['backup_destination']; // May be empty if file already moved to target location.
if (!file_exists($dir) || !is_dir($dir) || !is_writable($dir)) {
if (empty($dir) && $storage !== 0) {
// This is intentionally left as a warning instead of an error because of the current behaviour of backup settings.
// See MDL-48266 for details.
$bc->log('No directory specified for automated backups',
backup::LOG_WARNING);
$outcome = self::BACKUP_STATUS_WARNING;
} else if ($storage !== 0 && (!file_exists($dir) || !is_dir($dir) || !is_writable($dir))) {
// If we need to copy the backup file to an external dir and it is not writable, change status to error.
$bc->log('Specified backup directory is not writable - ',
backup::LOG_ERROR, $dir);
$dir = null;
$outcome = self::BACKUP_STATUS_ERROR;
}
// Copy file only if there was no error.
if ($file && !empty($dir) && $storage !== 0 && $outcome != self::BACKUP_STATUS_ERROR) {
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised,
!$config->backup_shortname);
if (!$file->copy_content_to($dir.'/'.$filename)) {
$bc->log('Attempt to copy backup file to the specified directory failed - ',
backup::LOG_ERROR, $dir);
$outcome = self::BACKUP_STATUS_ERROR;
}
if ($outcome != self::BACKUP_STATUS_ERROR && $storage === 1) {
$file->delete();
if (!$file->delete()) {
$outcome = self::BACKUP_STATUS_WARNING;
$bc->log('Attempt to delete the backup file from course automated backup area failed - ',
backup::LOG_WARNING, $file->get_filename());
}
}
}
@@ -556,9 +574,6 @@ abstract class backup_cron_automated_helper {
return true;
}
$backupword = str_replace(' ', '_', core_text::strtolower(get_string('backupfilename')));
$backupword = trim(clean_filename($backupword), '_');
if (!file_exists($dir) || !is_dir($dir) || !is_writable($dir)) {
$dir = null;
}
@@ -573,9 +588,6 @@ abstract class backup_cron_automated_helper {
$files = array();
// Store all the matching files into timemodified => stored_file array.
foreach ($fs->get_area_files($context->id, $component, $filearea, $itemid) as $file) {
if (strpos($file->get_filename(), $backupword) !== 0) {
continue;
}
$files[$file->get_timemodified()] = $file;
}
if (count($files) <= $keep) {
@@ -595,8 +607,8 @@ abstract class backup_cron_automated_helper {
if (!empty($dir) && ($storage == 1 || $storage == 2)) {
// Calculate backup filename regex, ignoring the date/time/info parts that can be
// variable, depending of languages, formats and automated backup settings.
$filename = $backupword . '-' . backup::FORMAT_MOODLE . '-' . backup::TYPE_1COURSE . '-' . $course->id . '-';
$regex = '#^'.preg_quote($filename, '#').'.*\.mbz$#';
$filename = backup::FORMAT_MOODLE . '-' . backup::TYPE_1COURSE . '-' . $course->id . '-';
$regex = '#' . preg_quote($filename, '#') . '.*\.mbz$#';
// Store all the matching files into filename => timemodified array.
$files = array();
@@ -230,11 +230,15 @@ abstract class backup_general_helper extends backup_helper {
* This will only extract the moodle_backup.xml file from an MBZ
* file and then call {@link self::get_backup_information()}.
*
* This can be a long-running (multi-minute) operation for large backups.
* Pass a $progress value to receive progress updates.
*
* @param string $filepath absolute path to the MBZ file.
* @param file_progress $progress Progress updates
* @return stdClass containing information.
* @since Moodle 2.4
*/
public static function get_backup_information_from_mbz($filepath) {
public static function get_backup_information_from_mbz($filepath, file_progress $progress = null) {
global $CFG;
if (!is_readable($filepath)) {
throw new backup_helper_exception('missing_moodle_backup_file', $filepath);
@@ -245,7 +249,7 @@ abstract class backup_general_helper extends backup_helper {
$tmpdir = $CFG->tempdir . '/backup/' . $tmpname;
$fp = get_file_packer('application/vnd.moodle.backup');
$extracted = $fp->extract_to_pathname($filepath, $tmpdir, array('moodle_backup.xml'));
$extracted = $fp->extract_to_pathname($filepath, $tmpdir, array('moodle_backup.xml'), $progress);
$moodlefile = $tmpdir . '/' . 'moodle_backup.xml';
if (!$extracted || !is_readable($moodlefile)) {
throw new backup_helper_exception('missing_moodle_backup_xml_file', $moodlefile);
@@ -298,6 +298,10 @@ abstract class backup_helper {
@chmod($filedest, $CFG->filepermissions); // may fail because the permissions may not make sense outside of dataroot
unlink($filepath);
return null;
} else {
$bc = backup_controller::load_controller($backupid);
$bc->log('Attempt to copy backup file to the specified directory using filesystem failed - ',
backup::LOG_WARNING, $dir);
}
// bad luck, try to deal with the file the old way - keep backup in file area if we can not copy to ext system
}
+49
View File
@@ -45,6 +45,55 @@ abstract class restore_step extends base_step {
}
return $this->task->get_restoreid();
}
/**
* Apply course startdate offset based in original course startdate and course_offset_startdate setting
* Note we are using one static cache here, but *by restoreid*, so it's ok for concurrence/multiple
* executions in the same request
*
* @param int $value Time value (seconds since epoch), or empty for nothing
* @return int Time value after applying the date offset, or empty for nothing
*/
public function apply_date_offset($value) {
// Empties don't offset - zeros (int and string), false and nulls return original value.
if (empty($value)) {
return $value;
}
static $cache = array();
// Lookup cache.
if (isset($cache[$this->get_restoreid()])) {
return $value + $cache[$this->get_restoreid()];
}
// No cache, let's calculate the offset.
$original = $this->task->get_info()->original_course_startdate;
$setting = 0;
if ($this->setting_exists('course_startdate')) { // Seting may not exist (MDL-25019).
$setting = $this->get_setting_value('course_startdate');
}
if (empty($original) || empty($setting)) {
// Original course has not startdate or setting doesn't exist, offset = 0.
$cache[$this->get_restoreid()] = 0;
} else if (abs($setting - $original) < 24 * 60 * 60) {
// Less than 24h of difference, offset = 0 (this avoids some problems with timezones).
$cache[$this->get_restoreid()] = 0;
} else if (!has_capability('moodle/restore:rolldates',
context_course::instance($this->get_courseid()), $this->task->get_userid())) {
// Re-enforce 'moodle/restore:rolldates' capability for the user in the course, just in case.
$cache[$this->get_restoreid()] = 0;
} else {
// Arrived here, let's calculate the real offset.
$cache[$this->get_restoreid()] = $setting - $original;
}
// Return the passed value with cached offset applied.
return $value + $cache[$this->get_restoreid()];
}
}
/*
@@ -245,53 +245,6 @@ abstract class restore_structure_step extends restore_step {
$this->task->add_result($resultstoadd);
}
/**
* Apply course startdate offset based in original course startdate and course_offset_startdate setting
* Note we are using one static cache here, but *by restoreid*, so it's ok for concurrence/multiple
* executions in the same request
*/
public function apply_date_offset($value) {
// empties don't offset - zeros (int and string), false and nulls return original value
if (empty($value)) {
return $value;
}
static $cache = array();
// Lookup cache
if (isset($cache[$this->get_restoreid()])) {
return $value + $cache[$this->get_restoreid()];
}
// No cache, let's calculate the offset
$original = $this->task->get_info()->original_course_startdate;
$setting = 0;
if ($this->setting_exists('course_startdate')) { // Seting may not exist (MDL-25019)
$setting = $this->get_setting_value('course_startdate');
}
// Original course has not startdate or setting doesn't exist, offset = 0
if (empty($original) || empty($setting)) {
$cache[$this->get_restoreid()] = 0;
// Less than 24h of difference, offset = 0 (this avoids some problems with timezones)
} else if (abs($setting - $original) < 24 * 60 * 60) {
$cache[$this->get_restoreid()] = 0;
// Re-enforce 'moodle/restore:rolldates' capability for the user in the course, just in case
} else if (!has_capability('moodle/restore:rolldates',
context_course::instance($this->get_courseid()),
$this->task->get_userid())) {
$cache[$this->get_restoreid()] = 0;
// Arrived here, let's calculate the real offset
} else {
$cache[$this->get_restoreid()] = $setting - $original;
}
// Return the passed value with cached offset applied
return $value + $cache[$this->get_restoreid()];
}
/**
* As far as restore structure steps are implementing restore_plugin stuff, they need to
* have the parent task available for wrapping purposes (get course/context....)
+5 -3
View File
@@ -301,6 +301,11 @@ class core_backup_renderer extends plugin_renderer_base {
$html .= html_writer::end_tag('form');
}
// If we are restoring an activity, then include the current course.
if (!$wholecourse) {
$courses->invalidate_results(); // Clean list of courses.
$courses->set_include_currentcourse();
}
if (!empty($courses) && ($courses->get_count() > 0 || $courses->get_search())) {
// Existing course
$hasrestoreoption = true;
@@ -311,10 +316,7 @@ class core_backup_renderer extends plugin_renderer_base {
$html .= $this->backup_detail_input(get_string('restoretoexistingcourseadding', 'backup'), 'radio', 'target', backup::TARGET_EXISTING_ADDING, array('checked'=>'checked'));
$html .= $this->backup_detail_input(get_string('restoretoexistingcoursedeleting', 'backup'), 'radio', 'target', backup::TARGET_EXISTING_DELETING);
} else {
// We only allow restore adding to existing for now. Enforce it here.
$html .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'target', 'value'=>backup::TARGET_EXISTING_ADDING));
$courses->invalidate_results(); // Clean list of courses
$courses->set_include_currentcourse(); // Show current course in the list
}
$selectacoursehtml = $this->backup_detail_pair(get_string('selectacourse', 'backup'), $this->render($courses));
// Display the course selection as required if the form was submitted but this data was not supplied.
+8
View File
@@ -81,6 +81,14 @@ $output = $PAGE->get_renderer('core', 'badges');
// Roles that can award this badge.
$acceptedroles = array_keys($badge->criteria[BADGE_CRITERIA_TYPE_MANUAL]->params);
if (empty($acceptedroles)) {
echo $OUTPUT->header();
$return = html_writer::link(new moodle_url('recipients.php', array('id' => $badge->id)), $strrecipients);
echo $OUTPUT->notification(get_string('notacceptedrole', 'badges', $return));
echo $OUTPUT->footer();
die();
}
if (count($acceptedroles) > 1) {
// If there is more than one role that can award a badge, prompt user to make a selection.
// If it is an admin, include all accepted roles, otherwise only the ones that current user has in this context.
+1 -1
View File
@@ -223,7 +223,7 @@ abstract class award_criteria {
if (!empty($this->params)) {
if (count($this->params) > 1) {
echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges',
strtoupper($agg[$data->get_aggregation_method($this->criteriatype)])), array('clearfix'));
core_text::strtoupper($agg[$data->get_aggregation_method($this->criteriatype)])), array('clearfix'));
} else {
echo $OUTPUT->box(get_string('criteria_descr_single_' . $this->criteriatype , 'badges'), array('clearfix'));
}
@@ -150,6 +150,11 @@ class award_criteria_manual extends award_criteria {
public function review($userid, $filtered = false) {
global $DB;
// Roles should always have a parameter.
if (empty($this->params)) {
return false;
}
// Users were already filtered by criteria completion.
if ($filtered) {
return true;
+1 -1
View File
@@ -60,7 +60,7 @@ class award_criteria_overall extends award_criteria {
echo html_writer::table($table);
} else {
echo $OUTPUT->box(get_string('criteria_descr_' . $this->criteriatype, 'badges',
strtoupper($agg[$data->get_aggregation_method()])), 'clearfix');
core_text::strtoupper($agg[$data->get_aggregation_method()])), 'clearfix');
}
echo $OUTPUT->box_end();
}
+3 -3
View File
@@ -374,7 +374,7 @@ class core_badges_renderer extends plugin_renderer_base {
$items[] = get_string('criteria_descr_single_' . $type , 'badges') . $c->get_details();
} else {
$items[] = get_string('criteria_descr_' . $type , 'badges',
strtoupper($agg[$badge->get_aggregation_method($type)])) . $c->get_details();
core_text::strtoupper($agg[$badge->get_aggregation_method($type)])) . $c->get_details();
}
}
}
@@ -732,7 +732,7 @@ class core_badges_renderer extends plugin_renderer_base {
}
} else {
$output .= get_string('criteria_descr_' . $short . BADGE_CRITERIA_TYPE_OVERALL, 'badges',
strtoupper($agg[$badge->get_aggregation_method()]));
core_text::strtoupper($agg[$badge->get_aggregation_method()]));
}
$items = array();
unset($badge->criteria[BADGE_CRITERIA_TYPE_OVERALL]);
@@ -741,7 +741,7 @@ class core_badges_renderer extends plugin_renderer_base {
$items[] = get_string('criteria_descr_single_' . $short . $type , 'badges') . $c->get_details($short);
} else {
$items[] = get_string('criteria_descr_' . $short . $type , 'badges',
strtoupper($agg[$badge->get_aggregation_method($type)])) . $c->get_details($short);
core_text::strtoupper($agg[$badge->get_aggregation_method($type)])) . $c->get_details($short);
}
}
$output .= html_writer::alist($items, array(), 'ul');
@@ -55,7 +55,7 @@ Feature: Block activity modules
And I click on "Forums" "link" in the "Activities" "block"
And I should see "Frontpage forum name"
And I am on homepage
And I click on "External Tools" "link" in the "Activities" "block"
And I click on "External tools" "link" in the "Activities" "block"
And I should see "Frontpage lti name"
And I am on homepage
And I click on "Quizzes" "link" in the "Activities" "block"
@@ -134,7 +134,7 @@ Feature: Block activity modules
And I click on "Forums" "link" in the "Activities" "block"
And I should see "Test forum name"
And I follow "Course 1"
And I click on "External Tools" "link" in the "Activities" "block"
And I click on "External tools" "link" in the "Activities" "block"
And I should see "Test lti name"
And I follow "Course 1"
And I click on "Quizzes" "link" in the "Activities" "block"
+1 -1
View File
@@ -78,7 +78,7 @@ class block_badges extends block_base {
}
// Number of badges to display.
if (empty($this->config->numberofbadges)) {
if (!isset($this->config->numberofbadges)) {
$this->config->numberofbadges = 10;
}
+1
View File
@@ -78,6 +78,7 @@ class block_comments extends block_base {
$args->displaycancel = false;
$comment = new comment($args);
$comment->set_view_permission(true);
$comment->set_fullwidth();
$this->content = new stdClass();
$this->content->text = $comment->output(true);
@@ -57,6 +57,8 @@ class block_completionstatus extends block_base {
// Create empty content.
$this->content = new stdClass();
$this->content->text = '';
$this->content->footer = '';
// Can edit settings?
$can_edit = has_capability('moodle/course:update', $context);
@@ -67,13 +69,13 @@ class block_completionstatus extends block_base {
// Don't display if completion isn't enabled!
if (!completion_info::is_enabled_for_site()) {
if ($can_edit) {
$this->content->text = get_string('completionnotenabledforsite', 'completion');
$this->content->text .= get_string('completionnotenabledforsite', 'completion');
}
return $this->content;
} else if (!$info->is_enabled()) {
if ($can_edit) {
$this->content->text = get_string('completionnotenabledforcourse', 'completion');
$this->content->text .= get_string('completionnotenabledforcourse', 'completion');
}
return $this->content;
}
@@ -84,7 +86,7 @@ class block_completionstatus extends block_base {
// Check if this course has any criteria.
if (empty($completions)) {
if ($can_edit) {
$this->content->text = get_string('nocriteriaset', 'completion');
$this->content->text .= get_string('nocriteriaset', 'completion');
}
return $this->content;
}
@@ -230,11 +232,11 @@ class block_completionstatus extends block_base {
$rows = array_merge($rows, $srows);
$table->data = $rows;
$this->content->text = html_writer::table($table);
$this->content->text .= html_writer::table($table);
// Display link to detailed view.
$details = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id));
$this->content->footer = html_writer::link($details, get_string('moredetails', 'completion'));
$this->content->footer .= html_writer::link($details, get_string('moredetails', 'completion'));
} else {
// If user is not enrolled, show error.
$this->content->text = get_string('nottracked', 'completion');
+27 -6
View File
@@ -59,10 +59,34 @@ function block_course_overview_update_mynumber($number) {
/**
* Sets user course sorting preference in course_overview block
*
* @param array $sortorder sort order of course
* @param array $sortorder list of course ids
*/
function block_course_overview_update_myorder($sortorder) {
set_user_preference('course_overview_course_order', serialize($sortorder));
$value = implode(',', $sortorder);
if (core_text::strlen($value) > 1333) {
// The value won't fit into the user preference. Remove courses in the end of the list (mostly likely user won't even notice).
$value = preg_replace('/,[\d]*$/', '', core_text::substr($value, 0, 1334));
}
set_user_preference('course_overview_course_sortorder', $value);
}
/**
* Gets user course sorting preference in course_overview block
*
* @return array list of course ids
*/
function block_course_overview_get_myorder() {
if ($value = get_user_preferences('course_overview_course_sortorder')) {
return explode(',', $value);
}
// If preference was not found, look in the old location and convert if found.
$order = array();
if ($value = get_user_preferences('course_overview_course_order')) {
$order = unserialize($value);
block_course_overview_update_myorder($order);
unset_user_preference('course_overview_course_order');
}
return $order;
}
/**
@@ -167,10 +191,7 @@ function block_course_overview_get_sorted_courses($showallcourses = false) {
$courses[$remoteid] = $val;
}
$order = array();
if (!is_null($usersortorder = get_user_preferences('course_overview_course_order'))) {
$order = unserialize($usersortorder);
}
$order = block_course_overview_get_myorder();
$sortedcourses = array();
$counter = 0;
+6
View File
@@ -84,6 +84,12 @@ class block_edit_form extends moodleform {
$weightoptions[$last] = get_string('bracketlast', 'block', $last);
$regionoptions = $this->page->theme->get_all_block_regions();
foreach ($this->page->blocks->get_regions() as $region) {
// Make sure to add all custom regions of this particular page too.
if (!isset($regionoptions[$region])) {
$regionoptions[$region] = $region;
}
}
$parentcontext = context::instance_by_id($this->block->instance->parentcontextid);
$mform->addElement('hidden', 'bui_parentcontextid', $parentcontext->id);
@@ -245,12 +245,5 @@ class block_glossary_random extends block_base {
return $this->content;
}
function hide_header() {
if (empty($this->config->title)) {
return true;
}
return false;
}
}
@@ -294,12 +294,12 @@ class block_recent_activity extends block_base {
if (!isset($modinfo->instances[$modname][$instanceid])) {
continue;
}
$entry['cmid'] = $modinfo->instances[$modname][$instanceid]->id;
if ($log->action == 'add mod') {
$entry['action'] = 0;
} else {
$entry['action'] = 1;
}
$entry['cmid'] = $modinfo->instances[$modname][$instanceid]->id;
}
$entries[] = $entry;
}
+2 -3
View File
@@ -142,7 +142,7 @@
$feed->set_cache_duration($CFG->block_rss_client_timeout*60);
}
if(debugging() && $feed->error()){
if ($CFG->debugdeveloper && $feed->error()) {
return '<p>'. $feedrecord->url .' Failed with code: '.$feed->error().'</p>';
}
@@ -314,8 +314,7 @@
$feed->init();
if ($feed->error()) {
mtrace ('error');
mtrace ('SimplePie failed with error:'.$feed->error());
mtrace('Error: could not load/find the RSS feed');
$status = false;
} else {
mtrace ('ok');
+1 -1
View File
@@ -89,7 +89,7 @@ class feed_edit_form extends moodleform {
$rss->init();
if ($rss->error()) {
$errors['url'] = get_string('errorloadingfeed', 'block_rss_client', $rss->error());
$errors['url'] = get_string('couldnotfindloadrssfeed', 'block_rss_client');
} else {
$this->title = $rss->get_title();
$this->description = $rss->get_description();
@@ -33,6 +33,7 @@ $string['clientshowchannellinklabel'] = 'Should a link to the original site (cha
$string['clientshowimagelabel'] = 'Show channel image if available :';
$string['configblock'] = 'Configure this block';
$string['couldnotfindfeed'] = 'Could not find feed with id';
$string['couldnotfindloadrssfeed'] = 'Could not find or load the RSS feed.';
$string['customtitlelabel'] = 'Custom title (leave blank to use title supplied by feed):';
$string['deletefeedconfirm'] = 'Are you sure you want to delete this feed?';
$string['disabledrssfeeds'] = 'RSS feeds are disabled';
@@ -128,7 +128,7 @@ class block_site_main_menu extends block_list {
} else {
$editbuttons = '';
}
if ($mod->visible || has_capability('moodle/course:viewhiddenactivities', $context)) {
if ($mod->visible || has_capability('moodle/course:viewhiddenactivities', $mod->context)) {
if ($ismoving) {
if ($mod->id == $USER->activitycopy) {
continue;
@@ -130,7 +130,7 @@ class block_social_activities extends block_list {
} else {
$editbuttons = '';
}
if ($mod->visible || has_capability('moodle/course:viewhiddenactivities', $context)) {
if ($mod->visible || has_capability('moodle/course:viewhiddenactivities', $mod->context)) {
if ($ismoving) {
if ($mod->id == $USER->activitycopy) {
continue;
@@ -169,5 +169,3 @@ class block_social_activities extends block_list {
return $this->content;
}
}
@@ -32,3 +32,27 @@ Feature: Add and configure blocks throughout the site
And I follow "Course 1"
# The first block matching the pattern should be top-left block
And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element"
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 |
And I log in as "manager1"
And I click on "My home" "link" in the "Navigation" "block"
When I press "Customise this page"
Then I should not see "Assign roles in Navigation block"
Scenario: Blocks on courses can have roles assigned to them
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | teacher | 1 | teacher@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Turn editing on"
Then I should see "Assign roles in Search forums block"
+2 -2
View File
@@ -1,4 +1,4 @@
=== 2.7 ===
* blog_entry->add_association() does not accept any params.
* blog_entry->add_associations() accepts only one param.
* blog_entry->add_associations() does not accept any params.
* blog_entry->add_association() accepts only one param.
+4 -4
View File
@@ -242,7 +242,8 @@ class cache_definition {
protected $datasourcefile = null;
/**
* The data source class aggregate to use. This is a super advanced setting.
* Deprecated - this is completely unused.
* @deprecated since 2.7.4
* @var string
*/
protected $datasourceaggregate = null;
@@ -324,11 +325,11 @@ class cache_definition {
*
* @param string $id
* @param array $definition
* @param string $datasourceaggregate
* @param string $unused Used to be datasourceaggregate but that was removed and this is now unused.
* @return cache_definition
* @throws coding_exception
*/
public static function load($id, array $definition, $datasourceaggregate = null) {
public static function load($id, array $definition, $unused = null) {
global $CFG;
if (!array_key_exists('mode', $definition)) {
@@ -520,7 +521,6 @@ class cache_definition {
$cachedefinition->overrideclassfile = $overrideclassfile;
$cachedefinition->datasource = $datasource;
$cachedefinition->datasourcefile = $datasourcefile;
$cachedefinition->datasourceaggregate = $datasourceaggregate;
$cachedefinition->staticacceleration = $staticacceleration;
$cachedefinition->staticaccelerationsize = $staticaccelerationsize;
$cachedefinition->ttl = $ttl;
+9 -17
View File
@@ -178,17 +178,17 @@ class cache_factory {
* @param string $component
* @param string $area
* @param array $identifiers
* @param string $aggregate
* @param string $unused Used to be data source aggregate however that was removed and this is now unused.
* @return cache_application|cache_session|cache_request
*/
public function create_cache_from_definition($component, $area, array $identifiers = array(), $aggregate = null) {
public function create_cache_from_definition($component, $area, array $identifiers = array(), $unused = null) {
$definitionname = $component.'/'.$area;
if (isset($this->cachesfromdefinitions[$definitionname])) {
$cache = $this->cachesfromdefinitions[$definitionname];
$cache->set_identifiers($identifiers);
return $cache;
}
$definition = $this->create_definition($component, $area, $aggregate);
$definition = $this->create_definition($component, $area);
$definition->set_identifiers($identifiers);
$cache = $this->create_cache($definition, $identifiers);
// Loaders are always held onto to speed up subsequent requests.
@@ -379,14 +379,13 @@ class cache_factory {
* Creates a definition instance or returns the existing one if it has already been created.
* @param string $component
* @param string $area
* @param string $aggregate
* @param string $unused This used to be data source aggregate - however that functionality has been removed and
* this argument is now unused.
* @return cache_definition
* @throws coding_exception If the definition cannot be found.
*/
public function create_definition($component, $area, $aggregate = null) {
public function create_definition($component, $area, $unused = null) {
$id = $component.'/'.$area;
if ($aggregate) {
$id .= '::'.$aggregate;
}
if (!isset($this->definitions[$id])) {
// This is the first time this definition has been requested.
if ($this->is_initialising()) {
@@ -408,13 +407,6 @@ class cache_factory {
// To serve this purpose and avoid errors we are going to make use of an ad-hoc cache rather than
// search for the definition which would possibly cause an infitite loop trying to initialise the cache.
$definition = cache_definition::load_adhoc(cache_store::MODE_REQUEST, $component, $area);
if ($aggregate !== null) {
// If you get here you deserve a warning. We have to use an ad-hoc cache here, so we can't find the definition and therefor
// can't find any information about the datasource or any of its aggregated.
// Best of luck.
debugging('An unknown cache was requested during development with an aggregate that could not be loaded. Ad-hoc cache used instead.', DEBUG_DEVELOPER);
$aggregate = null;
}
} else {
// Either a typo of the developer has just created the definition and is using it for the first time.
$this->reset();
@@ -427,10 +419,10 @@ class cache_factory {
debugging('Cache definitions reparsed causing cache reset in order to locate definition.
You should bump the version number to ensure definitions are reprocessed.', DEBUG_DEVELOPER);
}
$definition = cache_definition::load($id, $definition, $aggregate);
$definition = cache_definition::load($id, $definition);
}
} else {
$definition = cache_definition::load($id, $definition, $aggregate);
$definition = cache_definition::load($id, $definition);
}
}
$this->definitions[$id] = $definition;
-8
View File
@@ -280,13 +280,6 @@ class cache_helper {
/**
* Purges the cache for a specific definition.
*
* If you need to purge a definition that requires identifiers or an aggregate and you don't
* know the details of those please use cache_helper::purge_stores_used_by_definition instead.
* It is a more aggressive purge and will purge all data within the store, not just the data
* belonging to the given definition.
*
* @todo MDL-36660: Change the signature: $aggregate must be added.
*
* @param string $component
* @param string $area
* @param array $identifiers
@@ -298,7 +291,6 @@ class cache_helper {
// Initialise, in case of a store.
if ($cache instanceof cache_store) {
$factory = cache_factory::instance();
// TODO MDL-36660: Providing $aggregate is required for purging purposes: $definition->get_id()
$definition = $factory->create_definition($component, $area, null);
$definition->set_identifiers($identifiers);
$cache->initialise($definition);
+3 -3
View File
@@ -166,12 +166,12 @@ class cache implements cache_loader {
* @param string $component The component for the definition
* @param string $area The area for the definition
* @param array $identifiers Any additional identifiers that should be provided to the definition.
* @param string $aggregate Super advanced feature. More docs later.
* @param string $unused Used to be datasourceaggregate but that was removed and this is now unused.
* @return cache_application|cache_session|cache_store
*/
public static function make($component, $area, array $identifiers = array(), $aggregate = null) {
public static function make($component, $area, array $identifiers = array(), $unused = null) {
$factory = cache_factory::instance();
return $factory->create_cache_from_definition($component, $area, $identifiers, $aggregate);
return $factory->create_cache_from_definition($component, $area, $identifiers);
}
/**
+5 -5
View File
@@ -184,10 +184,10 @@ class cache_factory_disabled extends cache_factory {
*
* @param string $component
* @param string $area
* @param string $aggregate Unused.
* @param string $unused Used to be datasourceaggregate but that was removed and this is now unused.
* @return cache_definition
*/
public function create_definition($component, $area, $aggregate = null) {
public function create_definition($component, $area, $unused = null) {
return cache_definition::load_adhoc(cache_store::MODE_REQUEST, $component, $area);
}
@@ -208,11 +208,11 @@ class cache_factory_disabled extends cache_factory {
* @param string $component
* @param string $area
* @param array $identifiers
* @param string $aggregate
* @param string $unused Used to be datasourceaggregate but that was removed and this is now unused.
* @return cache_application|cache_session|cache_request
*/
public function create_cache_from_definition($component, $area, array $identifiers = array(), $aggregate = null) {
$definition = $this->create_definition($component, $area, $aggregate);
public function create_cache_from_definition($component, $area, array $identifiers = array(), $unused = null) {
$definition = $this->create_definition($component, $area);
$cache = $this->create_cache($definition, $identifiers);
return $cache;
}
+2 -2
View File
@@ -45,5 +45,5 @@ servername:port:weight
</pre>';
$string['sessionhandlerconflict'] = 'Warning: A memcache instance ({$a}) has being configured to use the same memcached server as sessions. Purging all caches will lead to sessions also being purged.';
$string['testservers'] = 'Test servers';
$string['testservers_desc'] = 'The test servers get used for unit tests and for performance tests. It is entirely optional to set up test servers. Servers should be defined one per line and consist of a server address and optionally a port and weight.
If no port is provided then the default port (11211) is used.';
$string['testservers_desc'] = 'One or more connection strings for memcache servers to test against. If a test server has been specified then memcache performance can be tested using the cache performance page in the administration block.
As an example: 127.0.0.1:11211';
+38 -2
View File
@@ -87,6 +87,12 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
*/
protected $definition;
/**
* If true data going in and out will be encoded.
* @var bool
*/
protected $encode = true;
/**
* Default prefix for key names.
* @var string
@@ -150,6 +156,24 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
}
$this->definition = $definition;
$this->isinitialised = true;
$this->encode = self::require_encoding();
}
/**
* Tests if encoding is going to be required.
*
* Prior to memcache 3.0.3 scalar data types were not preserved.
* For earlier versions of the memcache extension we need to encode and decode scalar types
* to ensure that it is preserved.
*
* @param string $version The version to check, if null it is fetched from PHP.
* @return bool
*/
public static function require_encoding($version = null) {
if (!$version) {
$version = phpversion('memcache');
}
return (version_compare($version, '3.0.3', '<'));
}
/**
@@ -240,7 +264,11 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
* @return mixed The data that was associated with the key, or false if the key did not exist.
*/
public function get($key) {
return $this->connection->get($this->parse_key($key));
$result = $this->connection->get($this->parse_key($key));
if ($this->encode && $result !== false) {
return @unserialize($result);
}
return $result;
}
/**
@@ -267,6 +295,9 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
$return[$key] = false;
} else {
$return[$key] = $result[$mkey];
if ($this->encode && $return[$key] !== false) {
$return[$key] = @unserialize($return[$key]);
}
}
}
return $return;
@@ -280,6 +311,11 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
* @return bool True if the operation was a success false otherwise.
*/
public function set($key, $data) {
if ($this->encode) {
// We must serialise this data.
$data = serialize($data);
}
return $this->connection->set($this->parse_key($key), $data, MEMCACHE_COMPRESSED, $this->definition->get_ttl());
}
@@ -294,7 +330,7 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
public function set_many(array $keyvaluearray) {
$count = 0;
foreach ($keyvaluearray as $pair) {
if ($this->connection->set($this->parse_key($pair['key']), $pair['value'], MEMCACHE_COMPRESSED, $this->definition->get_ttl())) {
if ($this->set($pair['key'], $pair['value'])) {
$count++;
}
}
+26
View File
@@ -90,4 +90,30 @@ class cachestore_memcache_test extends cachestore_tests {
$this->assertEquals($key, $value);
}
}
/**
* Test our checks for encoding.
*/
public function test_require_encoding() {
$this->assertTrue(cachestore_memcache::require_encoding('dev'));
$this->assertTrue(cachestore_memcache::require_encoding('1.0'));
$this->assertTrue(cachestore_memcache::require_encoding('1.0.0'));
$this->assertTrue(cachestore_memcache::require_encoding('2.0'));
$this->assertTrue(cachestore_memcache::require_encoding('2.0.8'));
$this->assertTrue(cachestore_memcache::require_encoding('2.2.8'));
$this->assertTrue(cachestore_memcache::require_encoding('3.0'));
$this->assertTrue(cachestore_memcache::require_encoding('3.0-dev'));
$this->assertTrue(cachestore_memcache::require_encoding('3.0.0'));
$this->assertTrue(cachestore_memcache::require_encoding('3.0.1'));
$this->assertTrue(cachestore_memcache::require_encoding('3.0.2-dev'));
$this->assertTrue(cachestore_memcache::require_encoding('3.0.2'));
$this->assertTrue(cachestore_memcache::require_encoding('3.0.3-dev'));
$this->assertFalse(cachestore_memcache::require_encoding('3.0.3'));
$this->assertFalse(cachestore_memcache::require_encoding('3.0.4'));
$this->assertFalse(cachestore_memcache::require_encoding('3.0.4-dev'));
$this->assertFalse(cachestore_memcache::require_encoding('3.0.8'));
$this->assertFalse(cachestore_memcache::require_encoding('3.1.0'));
$this->assertFalse(cachestore_memcache::require_encoding('3.1.2'));
}
}
+3 -3
View File
@@ -59,11 +59,11 @@ servername:port:weight
</pre>';
$string['sessionhandlerconflict'] = 'Warning: A memcached instance ({$a}) has being configured to use the same memcached server as sessions. Purging all caches will lead to sessions also being purged.';
$string['testservers'] = 'Test servers';
$string['testservers_desc'] = 'The test servers get used for unit tests and for performance tests. It is entirely optional to set up test servers. Servers should be defined one per line and consist of a server address and optionally a port and weight.
If no port is provided then the default port (11211) is used.';
$string['testservers_desc'] = 'One or more connection strings for memcached servers to test against. If a test server has been specified then memcached performance can be tested using the cache performance page in the administration block.
As an example: 127.0.0.1:11211';
$string['usecompression'] = 'Use compression';
$string['usecompression_help'] = 'Enables or disables payload compression. When enabled, item values longer than a certain threshold (currently 100 bytes) will be compressed during storage and decompressed during retrieval transparently.';
$string['useserialiser'] = 'Use serialiser';
$string['useserialiser_help'] = 'Specifies the serializer to use for serializing non-scalar values.
The valid serializers are Memcached::SERIALIZER_PHP or Memcached::SERIALIZER_IGBINARY.
The latter is supported only when memcached is configured with --enable-memcached-igbinary option and the igbinary extension is loaded.';
The latter is supported only when memcached is configured with --enable-memcached-igbinary option and the igbinary extension is loaded.';
+5 -2
View File
@@ -247,16 +247,19 @@ class cachestore_memcached extends cache_store implements cache_is_configurable
* be set to false.
*/
public function get_many($keys) {
$return = array();
$result = $this->connection->getMulti($keys);
if (!is_array($result)) {
$result = array();
}
foreach ($keys as $key) {
if (!array_key_exists($key, $result)) {
$result[$key] = false;
$return[$key] = false;
} else {
$return[$key] = $result[$key];
}
}
return $result;
return $return;
}
/**
+2 -1
View File
@@ -35,7 +35,8 @@ $string['replicaset_help'] = 'The name of the replica set to connect to. If this
$string['server'] = 'Server';
$string['server_help'] = 'This is the connection string for the server you want to use. Multiple servers can be specified using a comma-separated list.';
$string['testserver'] = 'Test server';
$string['testserver_desc'] = 'This is the connection string for the test server you want to use. Test servers are entirely optional, by specifiying a test server you can run PHPunit tests for this store and can run the performance tests.';
$string['testserver_desc'] = 'The connection string for a server to use for testing. If a test server has been specified then MongoDB performance can be tested using the cache performance page in the administration block.
As an example: mongodb://127.0.0.1:27017';
$string['username'] = 'Username';
$string['username_help'] = 'The username to use when making a connection.';
$string['usesafe'] = 'Use safe';
+3
View File
@@ -556,6 +556,9 @@ class cachestore_mongodb extends cache_store implements cache_is_configurable {
}
$store = new cachestore_mongodb('Test mongodb', $configuration);
if (!$store->is_ready()) {
return false;
}
$store->initialise($definition);
return $store;

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