Compare commits

..

1360 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 92ac518fdc Moodle release 2.6.3 2014-05-10 18:30:45 +02:00
AMOS bot afe9a42240 Automatically generated installer lang files 2014-05-10 00:46:41 +00:00
AMOS bot 1dfa14ed5c Automatically generated installer lang files 2014-05-09 00:40:56 +00:00
Eloy Lafuente (stronk7) a1858e9509 weekly release 2.6.2+ 2014-05-08 16:35:55 +02:00
Marina Glancy 30dc7fe149 Merge branch 'MDL-45462-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-08 19:51:31 +08:00
Eloy Lafuente (stronk7) a1336aea88 Merge branch 'wip-mdl-44262-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-05-08 12:00:46 +02:00
Rajesh Taneja f2791d4944 MDL-44262 Behat: Bump behat version to get format fix 2014-05-08 17:38:17 +08:00
Frederic Massart 5c276a4c32 MDL-45332 repository_url: URL parameter is using PARAM_URL 2014-05-08 15:35:08 +08:00
Marina Glancy 7a950591a9 MDL-45414 wiki: blank image for page index icons 2014-05-08 12:12:34 +08:00
Frederic Massart f395f30b03 MDL-45462 flickr: Requests are now done over HTTPS 2014-05-08 11:28:32 +08:00
Dan Poltawski b5505253bc MDL-43312 tinymce: bump plugin version 2014-05-08 10:53:21 +08:00
Dan Poltawski a9d14d2a36 Merge branch 'MDL-43312-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-05-08 10:51:53 +08:00
Damyon Wiese f6f25e4040 Merge branch 'MDL-45304-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-05-08 10:04:03 +08:00
Simey Lameze b6c8f92f0b MDL-45304 events: Triggering event course module update actions. 2014-05-07 17:30:13 +08:00
Marina Glancy da6b75343a Merge branch 'MDL-45282_message_26' of git://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-05-07 16:53:16 +08:00
Damyon Wiese 1a8c8084ef MDL-44750 Assign: Do not reveal student identities to screen readers 2014-05-07 16:50:10 +08:00
Dan Poltawski 20b65746e3 Merge branch 'MDL-45410-en_fix-26' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-05-07 16:40:42 +08:00
Marina Glancy fcf199e7a1 MDL-45126 do not allow guests see name and summary of hidden course 2014-05-07 16:22:22 +08:00
Juan Leyva 14c16a4163 MDL-43119 Add valid until dates for tokens created by login/token.php
3 months were decided
2014-05-07 16:14:03 +08:00
Andrew Davis 21a1cee106 MDL-45282 core_user: fixed up some oddities in the bulk user messaging screen 2014-05-07 15:57:39 +08:00
Frederic Massart 568514ee7f MDL-43877 blocks: Files from blocks in my/ were accessible to the world 2014-05-07 14:27:27 +08:00
Damyon Wiese 333e42243c MDL-44606 assign: Disable sesskey protection for unit test. 2014-05-07 14:08:03 +08:00
Damyon Wiese 64e366c82b Merge branch 'MDL-45290-26-fix2' of https://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-07 13:29:42 +08:00
Marina Glancy 9b33dd001f Merge branch 'MDL-45201-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-07 13:07:18 +08:00
Marina Glancy 80efce1bc9 Merge branch 'MDL-45387-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-07 13:07:08 +08:00
Damyon Wiese 2f0fa43133 MDL-43312 TinyMCE: Version bump to 3.5.10. Remove all the hacks.
I retested the old bugs that required custom hacks to tinymce and could not reproduce them,
so I have not reimplemented the hacks.
2014-05-07 12:53:35 +08:00
Damyon Wiese f977d376c9 MDL-44606 Assign: Some grading functions are missing sesskey protection 2014-05-07 12:37:08 +08:00
Dan Poltawski c1d62ed25d Merge branch 'wip-MDL-45414-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-05-07 12:05:43 +08:00
Dan Poltawski 34d75ff115 Merge branch 'wip-MDL-45429-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-05-07 11:50:13 +08:00
Jetha Chan 5b80099806 MDL-45387 core_form: erroneous escaping on reference list
Fixed erroneous escaping in JS.
2014-05-07 10:56:55 +08:00
Helen Foster 2966be7e01 MDL-45410 Merge English strings from the en_fix language pack 2014-05-07 00:21:56 +02:00
Marina Glancy a9b8d52d84 MDL-45429 block_glossary_random: check capability before suggesting to edit 2014-05-06 17:24:00 +08:00
Jetha Chan a0cb023389 MDL-45290 rubrics: overflow, delete button alignment
Adjusted delete button alignment, restored overflow rule, amended button alignment, minor RTL fixes.
2014-05-06 16:42:30 +08:00
Damyon Wiese b37c9cf233 MDL-45412 Cache: Look for the newer classname first (mongo store) 2014-05-06 12:02:51 +08:00
Damyon Wiese 5684f787ee Merge branch '45412-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-05-06 12:02:33 +08:00
Marina Glancy ca0f287dad MDL-45414 wiki: fix broken image 2014-05-06 11:33:20 +08:00
Damyon Wiese 53a28c9528 Merge branch 'MDL-45290-26-fix' of http://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-06 11:25:10 +08:00
Dan Poltawski e8d36cbc1a Merge branch 'MDL-45376-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-05-06 11:16:40 +08:00
Jetha Chan 502deae544 MDL-45290 rubric: IE8 and minor fixes, RTL
Added a fallback style for IE8, adjusted some minor styles, added RTL capability.
2014-05-06 10:47:05 +08:00
Dan Poltawski 9ea9d487af Merge branch 'MDL-42956-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-05-06 10:18:44 +08:00
Sam Hemelryk f627c8b770 MDL-45412 cachestore_mongodb: fixed use of deprecated Mongo class 2014-05-06 09:31:01 +12:00
Marina Glancy 74d62545da Merge branch 'MDL-34904-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-05 17:44:02 +08:00
Damyon Wiese 5a0e3521b9 Merge branch 'MDL-45359-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-05-05 17:25:05 +08:00
Marina Glancy d1f5077f84 Merge branch 'MDL-43319-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-05-05 17:19:51 +08:00
Marina Glancy 8dfd2e2407 Merge branch 'MDL-45342-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-05 17:19:39 +08:00
Marina Glancy 09bf74f265 Merge branch 'MDL-44174-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-05 17:19:29 +08:00
Ankit Agarwal 78995d63a3 MDL-45201 recent_activity: Fix set type notice in recent activity form 2014-05-05 13:31:20 +08:00
Damyon Wiese 76e28ec58a Merge branch 'MDL-45290-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-05 10:53:18 +08:00
Marina Glancy a0a7521e5b Merge branch 'wip-MDL-45127-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-05-05 10:18:25 +08:00
Dan Poltawski af41a7ef13 weekly release 2.6.2+ 2014-05-02 17:45:44 +08:00
Dan Poltawski 30453f2bc8 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-05-02 17:45:41 +08:00
Adrian Greeve cb6a69a1b6 MDL-45127 mod_lesson: Behat test for reviewing a lesson. 2014-05-02 16:12:30 +08:00
Adrian Greeve 6dd0e57020 MDL-45127 mod_lesson: Fixed reviewing lesson answers changing the lesson grade. 2014-05-02 16:12:30 +08:00
Adrian Greeve 745f876b3e MDL-45127 mod_lesson: Updated question edit screen with more help text.
Unless the custom scores is selected in the lesson settings the score section
in the question settings will be disabled. A help link has been added with
a description similar to this one.
2014-05-02 16:12:30 +08:00
Jetha Chan 15081f54a4 MDL-45290 rubric: visual fixups
Fixed up visual issues with rubric editor on Clean.
2014-05-02 14:21:14 +08:00
Ankit Agarwal 9cca987e0a MDL-34904 lti: Fix notice while using lti in frontpage 2014-05-02 14:07:55 +08:00
Ankit Agarwal e322d80a06 MDL-45342 book: Automate MDLQA-2423 - A teacher can create book chapters and subchapters 2014-05-02 13:27:21 +08:00
Frederic Massart 38bbd78ebe MDL-44174 theme_clean: Updating information in readme file 2014-05-02 12:56:32 +08:00
AMOS bot a201d4b6a8 Automatically generated installer lang files 2014-05-02 00:39:11 +00:00
sam marshall 62e02e583f MDL-45376 Completion: Form locking is still not working right
On submit of the form, it called 'freeze' on the completion-related
fields (even though they shouldn't have been frozen because you
already clicked the unlock button).
2014-05-01 18:16:14 +01:00
Tim Hunt 66bf3fb986 MDL-45273 quiz fixup settings initialisation. 2014-05-01 21:18:27 +08:00
Jetha Chan e2ab510709 MDL-36836 filepicker: alfresco select box fix
Adjusted position of alfresco select box; amended border/background application in base.
2014-05-01 17:14:45 +08:00
Dan Poltawski 8cc974000b Merge branch 'MDL-45365-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-05-01 14:52:06 +08:00
Dan Poltawski 3959ea18ca MDL-43570 uprade: fix indentation 2014-05-01 14:45:29 +08:00
Dan Poltawski 47cdef3d70 Merge branch 'MDL-43570-M26' of https://github.com/KristerV/moodle into MOODLE_26_STABLE 2014-05-01 14:36:06 +08:00
Marina Glancy 3e1b758044 Merge branch 'MDL-44398-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-01 14:21:59 +08:00
Damyon Wiese cd999ba175 MDL-45365 Courselib unit tests: cmid -> instanceid confusion
Yet again an instanceid is being passed instead of a cmid.
2014-05-01 14:03:25 +08:00
Andrew Nicols d59b21dcf1 MDL-45359 JS: Only change mask zIndex on modal dialogues
When dealing with a non-modal dialogue within a modal dialogue, we should
not update the z-index of the underyling maskNode as it does not belong to
this dialogue.
2014-05-01 14:01:29 +08:00
Dan Poltawski 84529fcf60 MDL-43319 phpdoc: fix too much ham consumption by developers 2014-05-01 13:35:33 +08:00
Dan Poltawski 278d605714 Merge branch 'MDL-45165_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-05-01 12:36:00 +08:00
Marina Glancy 62b945b70a MDL-45273 quiz: whitespace fix 2014-05-01 12:21:02 +08:00
Marina Glancy 10d96f0e37 Merge branch 'MDL-45273_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-05-01 12:20:07 +08:00
Marina Glancy 3d7b978247 Merge branch 'MDL-45292-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-01 11:48:47 +08:00
Dan Poltawski 62fa6fc6d5 Merge branch 'MDL-45283-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-01 10:40:58 +08:00
Krister Viirsaar aba7899302 MDL-43570 filetypes: Added new filetypes - ddoc, bdoc, cdoc 2014-04-30 13:08:26 +03:00
Damyon Wiese 4176b66597 Merge branch 'MDL-45166_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-30 17:23:50 +08:00
Damyon Wiese 68798bec46 Merge branch 'mdl44575-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-04-30 15:58:07 +08:00
Dan Poltawski e363a0fb6a Merge branch 'MDL-45256-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-30 15:48:58 +08:00
Frederic Massart d3f1d516e0 MDL-45256 portfolio: Adding missing global in testcase 2014-04-30 15:31:22 +08:00
Dan Poltawski 8f8f583406 Merge branch 'MDL-45256-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-30 14:58:49 +08:00
Frederic Massart 17753f88b1 MDL-45283 restore: Prevent failure when user course grade exists
When we restore a course, the grade that a user has for the
grade item of the course cannot be created twice. If we try
to create it when it already exists, a database exception is
raised because of index duplication.

The safest way to proceed is certainly to ignore the grade
information from the backup, otherwise we could potentially
overwrite existing information. Though, this only applies
to restore as merge, and it does not affect the update of
the course grade.
2014-04-30 12:17:14 +08:00
Simey Lameze 3c0307d623 MDL-42956 auth: Fix hard-coded LIMIT clause on keepalive_client method. 2014-04-30 10:51:52 +08:00
Marina Glancy 067a1bcb4d Merge branch 'MDL-45315-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-30 09:54:39 +08:00
Marina Glancy 049c8ed4d1 Merge branch 'MDL-27459-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-30 09:54:27 +08:00
Krister 5e3da2f722 MDL-42635 lesson: change from error to user friendly message 2014-04-30 09:52:26 +08:00
Eloy Lafuente (stronk7) a76fb41a02 MDL-45221 Allow unit tests to pass under any OS
This commit gets rid of the old lib/tests/other/executable.php
file completely because it was only executable under unix OSs
and moves the check to be performed against some mimetex binaries
that are known to be executable and bundled with every installation.

Note this was discovered because the weekly rolling process changed
the execution permissions of the "fixture" file and, at the end
we decided to get rid of it completely, folowing the plan above.
2014-04-29 19:32:13 +02:00
Eloy Lafuente (stronk7) 3bd12f7156 weekly release 2.6.2+ 2014-04-29 15:13:57 +02:00
Eloy Lafuente (stronk7) 72ed847d63 NOBUG: Fixed file access permissions 2014-04-29 15:13:56 +02:00
Tim Hunt fddcf077ab MDL-45273 quiz: Fix codechecker issues. 2014-04-29 11:57:32 +01:00
Tim Hunt 6f9a441023 MDL-45273 only create the quiz settings if necessary. 2014-04-29 11:57:31 +01:00
Tim Hunt 22f09398cd MDL-45273 remove the need for quiz settings.php to include locallib.php. 2014-04-29 11:57:29 +01:00
Tim Hunt f57d7f3f95 MDL-45273 quiz: move admin settings into classes folder. 2014-04-29 11:57:27 +01:00
Frederic Massart 687e149038 MDL-45256 portfolio: Unit tests for rewrite pluginfile urls 2014-04-29 17:44:10 +08:00
Frederic Massart b647aa51b1 MDL-45256 portfolio: Do not require strict XML when parsing content 2014-04-29 17:44:10 +08:00
Marina Glancy cb5260014a Revert "Merge branch 'MDL-45229-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE"
This reverts commit d6eb354664, reversing
changes made to 93b2d3baca.
2014-04-29 17:29:01 +08:00
Dan Poltawski 5244995a26 MDL-45315 block_news_items: Add missing depedency 2014-04-29 14:29:18 +08:00
Marina Glancy a632d590f3 Merge branch 'MDL-45289-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-29 12:50:05 +08:00
Damyon Wiese c814c5f947 Merge branch 'MDL-44916-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2014-04-29 10:22:01 +08:00
Dan Poltawski 1f5f345d65 MDL-45289 block_course_summary: Add behat tests 2014-04-29 10:06:50 +08:00
Sam Hemelryk ff6a130dcd Merge branch 'MDL-45312_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-04-29 10:24:23 +12:00
Sam Hemelryk d1b900ea92 Merge branch 'MDL-45221-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-29 09:10:12 +12:00
Tim Hunt 1be0a4c812 MDL-45312 qtype_missingtype or qbehaviour_missing cannot be uninstalled.
They are required by the system.
2014-04-28 21:46:13 +01:00
Sam Hemelryk d6eb354664 Merge branch 'MDL-45229-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-29 08:40:20 +12:00
Marina Glancy 93b2d3baca Merge branch 'w18_MDL-45287_m26_dbreset' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-28 20:18:19 +08:00
Marina Glancy 795fb4aea4 Merge branch 'MDL-45266-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-28 18:02:36 +08:00
Marina Glancy 7b6bdc91e9 Merge branch 'MDL-45156_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 18:02:25 +08:00
Petr Skoda 2e123e7120 MDL-45287 fix behat database reset between scenarios
We cannot find out if DB received any writes because behat
web access runs in different request.

This was affecting only scenarios without generators.
2014-04-28 17:13:29 +08:00
Damyon Wiese f91bf9a768 Merge branch 'MDL-45079_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-04-28 17:08:12 +08:00
Jetha Chan 1a039ee822 MDL-45292 filepicker: fixed border style
Fixed base style issues on RTL.
2014-04-28 15:55:27 +08:00
Marina Glancy 14df84f65e Merge branch 'MDL-45288_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 13:49:02 +08:00
David Monllao d15809bb81 MDL-45156 behat: Changing html_writer::empty_tag for start_tag
Credits to Daniele Cordella.
2014-04-28 12:30:35 +07:00
Marina Glancy 7ca387b3cf Merge branch 'MDL-44614_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 13:04:08 +08:00
Andrew Nicols 29fe6d8155 MDL-45221 admin: configexecutable admin settings should only accept files 2014-04-28 12:21:42 +08:00
Frederic Massart 0d84ac90bf MDL-45229 event: Validate sectionnum in course_section_updated 2014-04-28 11:40:54 +08:00
Jason Fowler 418cbf32ed MDL-44916 Question: Fixing alignment in bootstrap themes
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-28 11:38:39 +08:00
David Monllao 70cbedd4cf MDL-45288 behat: Restricting click to .logininfo 2014-04-28 10:27:45 +07:00
Marina Glancy 4f214c3b64 Merge branch 'MDL-44004-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-28 11:17:06 +08:00
Damyon Wiese b7a172cc23 Merge branch 'MDL-45268-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-28 10:52:46 +08:00
Marina Glancy 1f2e95e7eb Merge branch 'm26_MDL-45210' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-04-28 10:46:50 +08:00
Dan Poltawski 1a1cb928dd MDL-45266 behat: tests for login block 2014-04-28 10:45:39 +08:00
Sam Hemelryk 5701d152e5 Merge branch 'MDL-45164_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 14:09:29 +12:00
Sam Hemelryk 3638582c2f Merge branch 'MDL-45284_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 14:09:21 +12:00
Sam Hemelryk 2f9955d4cc Merge branch 'wip-MDL-45280-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-28 12:22:51 +12:00
Eloy Lafuente (stronk7) 9d3933d4ad MDL-45286 timezones: updated to 2014b 2014-04-28 01:01:56 +02:00
Yuliya Bozhko 40b34dc0e3 MDL-45079 badges: Remove user email address from badge page
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-04-28 10:05:58 +12:00
David Monllao 408c5347e7 MDL-44614 behat: Automate MDLQA-61
In an Offline activity assignment, a teacher can
grade and give comments on an assignment completed
offline.
2014-04-27 13:06:09 +07:00
David Monllao 80f0d099ee MDL-45164 behat: Automate MDLQA-1464
A student can add submission comments to an
online text type assignment.
2014-04-27 12:28:18 +07:00
David Monllao fa5d2874b9 MDL-45165 behat: Automating MDLQA-20
Database activity entries can be viewed in a list
or singly or they can be searched or browsed.
2014-04-27 12:27:13 +07:00
David Monllao 689451731c MDL-45165 behat: Adding text selector
Same behaviour than I should see step,
it looks for the text in the node + descendants,
but, to get the lower level match discards the
nodes with children that also contains the
same text.
2014-04-27 12:27:13 +07:00
David Monllao 6dac47a69c MDL-45166 behat: MDLQA-18 converted to a behat scenario
In a database activity, students can add
entries to a database.
2014-04-27 12:26:22 +07:00
David Monllao 7eaa6e208b MDL-45166 behat: Steps to speed up mod_data features creation
A step to add a field to a database and
another one to add a database entry.
2014-04-27 12:26:22 +07:00
David Monllao 32aea6a84f MDL-45284 behat: Replace wrongly triggered not found exception 2014-04-27 11:57:03 +07:00
Marina Glancy cf5b0a4be5 MDL-45280 wrtie default value for admin_setting_configstoredfile
this fixes regression from MDL-45134
2014-04-26 10:38:37 +08:00
Dan Poltawski e374bfd61a MDL-45268 behat: tests for participants block 2014-04-25 16:21:27 +08:00
Dan Poltawski eabcd76d4d weekly release 2.6.2+ 2014-04-24 17:56:49 +08:00
Dan Poltawski e679eb6c27 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-04-24 17:56:45 +08:00
Ankit Agarwal a5657deada MDL-44398 tags: Fix incorrect usage of caps 2014-04-24 16:39:31 +08:00
Frederic Massart 2133c33314 MDL-44004 grading_rubric: Ensure that score is set before using it 2014-04-24 16:22:09 +08:00
Dan Poltawski 53318d684a Merge branch '45046-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-04-24 10:00:59 +08:00
Steve Clay 06a76addad MDL-45096 block_navigation: Check for existence of the siteadminbranch before modifying it
Prevents JS errors in some themes when admin block is hidden
2014-04-24 12:15:56 +12:00
Sam Hemelryk 291bb582ad Merge branch 'MDL-45124-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-24 11:03:22 +12:00
Sam Hemelryk 7b292552dd Merge branch 'MDL-45186-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-24 11:01:41 +12:00
Dan Poltawski 5d933a6abe Merge branch 'MDL-45172_block_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-04-23 16:40:26 +08:00
Dan Poltawski 4a85e96b97 Merge branch 'MDL-45075-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-23 16:18:14 +08:00
Andrew Nicols 07e57c28ea MDL-45075 mod_forum: Add unit tests for forum subscription on forum creation 2014-04-23 16:08:11 +08:00
Simon Coggins 3ccba78a57 MDL-45210: Fix broken link when plagiarism plugins are disabled 2014-04-23 19:45:16 +12:00
Marina Glancy 5db4854d64 Merge branch 'MDL-45134-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-23 14:46:16 +08:00
Dan Poltawski e3986158bf Merge branch 'wip-MDL-45148-26' of https://github.com/mackensen/moodle into MOODLE_26_STABLE 2014-04-23 14:22:21 +08:00
Marina Glancy b3799a8678 Merge branch 'MDL-44991-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-23 13:25:38 +08:00
Marina Glancy b212e89231 Merge branch 'MDL-44855-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-23 13:13:56 +08:00
Frederic Massart ffc6df1ba2 MDL-45134 adminlib: No more validation error when a config file is not set
When the destination draft area existed and the user draft area has not
been used, and thus does not exist, an error was displayed to the user
saying that they could not save the setting.

This was intended to handle the cases where the draft area disappears
and would overwrite the content of the destination area, deleting
all its content. But now we do not prompt with an error when
overwriting empty with empty.
2014-04-23 12:40:50 +08:00
Andrew Davis b7055f89d4 MDL-45172 block_completionstatus: added a check for an empty string before appending 2014-04-23 11:42:05 +08:00
AMOS bot cf12210cbe Automatically generated installer lang files 2014-04-23 00:38:07 +00:00
AMOS bot 9ae6b73caf Merge branch 'MOODLE_26_STABLE' into install_26_STABLE 2014-04-23 00:38:06 +00:00
AMOS bot 20b0dd3910 Automatically generated installer lang files 2014-04-22 11:15:12 +00:00
Eloy Lafuente (stronk7) 0afcad7c36 weekly release 2.6.2+ 2014-04-22 12:26:47 +02:00
Andrew Nicols 89b63282b4 MDL-44855 AJAX: Arrays and Objects should be defined in the initializer
JavaScript is a prototypal language and complex types should be defined as
null in the prototype, and set up in the initializer instead.
2014-04-22 17:06:08 +08:00
Andrew Nicols 6930901d9e MDL-45124 dndupload: Lowercase types when comparing
IE helpfull uses a mixed-case version of 'Text' which fails the string
comparison. All other browsers use lowercase for their mime-types.
2014-04-22 16:10:39 +08:00
Andrew Nicols c07b42d7d8 MDL-40716 report_completion: Set RTL 2014-04-22 15:22:09 +08:00
Dan Poltawski 0574e41f62 Merge branch 'wip-MDL-45154-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-22 12:36:02 +08:00
Frederic Massart 7e570b2248 MDL-45186 mod_quiz: Some RTL improvements on quiz edit page 2014-04-22 12:34:39 +08:00
Marina Glancy 79040c7534 Merge branch 'MDL-43673_26' of git://github.com/stronk7/moodle into MOODLE_26_STABLE 2014-04-22 12:28:54 +08:00
Marina Glancy bad25f1c4d MDL-45154 user profiles: category name duplication error 2014-04-22 10:45:41 +08:00
Sam Hemelryk b6ac19d4d9 Merge branch 'wip-MDL-45045_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-04-22 10:47:27 +12:00
Sam Hemelryk 6049011264 Merge branch 'MDL-43145-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-22 10:39:26 +12:00
Sam Hemelryk 96ce0b22d6 Merge branch 'mdl45012-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-04-22 10:10:11 +12:00
Sam Hemelryk ff7061d521 Merge branch 'wip-MDL-45037-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-22 09:59:09 +12:00
Sam Hemelryk 8a51e2d563 Merge branch 'MDL-44270_26' of git://github.com/jonof/moodle into MOODLE_26_STABLE 2014-04-22 09:18:28 +12:00
Matt Petro 8f1498e562 MDL-45118 shibboleth: set context on index page 2014-04-22 09:17:05 +12:00
Sam Hemelryk abe2fe6180 Merge branch 'MDL-42761-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-22 08:57:33 +12:00
Dan Poltawski 1e19ea00d8 Merge branch 'w16_MDL-45049_m26_debugging' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-21 14:41:46 +08:00
Dan Poltawski e0b9784138 Merge branch 'MDL-44468_26_STABLE' of git://github.com/ds125v/moodle into MOODLE_26_STABLE 2014-04-18 15:27:41 +08:00
Nadav Kavalerchik 58a309c392 MDL-40716 - Activity labels are not visible in course completion report, when in RTL mode (theme/clean , bootstrap) 2014-04-18 15:16:12 +08:00
Dan Poltawski fc67885300 Merge branch 'MDL-45010-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-18 14:55:33 +08:00
Sam Hemelryk cb8e625f94 MDL-45147 my: automate testing of block restriction 2014-04-18 14:17:49 +08:00
Rajeev S 99849ce131 MDL-43789: coursename disallows spaces in user bulk actions filter
Spaces and other non alphanumeric characters are disallowed in
coursename filter for user bulk actions.This prevents filtering
based upon courserole if the coursename contains spaces or other non
alphanumeric characters.
2014-04-18 11:06:47 +08:00
Dan Poltawski f21e920beb Merge branch 'wip-MDL-43626-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-18 10:52:48 +08:00
Dan Poltawski 8019375e12 Merge branch 'wip-MDL-45036-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-18 10:50:07 +08:00
Dan Poltawski 3c9bd29d89 Merge branch 'MDL-45071_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-04-18 10:47:06 +08:00
Dan Poltawski cafeac819f Merge branch 'MDL-44981-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2014-04-18 10:32:18 +08:00
Dan Poltawski 6e674be060 Merge branch 'MDL-41975-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-18 10:05:27 +08:00
Dan Poltawski 84cff47814 Merge branch 'wip-MDL-45154-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-18 09:57:22 +08:00
Eloy Lafuente (stronk7) bbbd0556e5 weekly release 2.6.2+ 2014-04-17 15:49:27 +02:00
Charles Fulton 184af2f471 MDL-45148 unit testing: pass role id instead of user id 2014-04-17 04:46:53 -07:00
Dan Poltawski b2f7a0b31f Merge branch 'MDL-44619_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-17 17:01:43 +08:00
Marina Glancy 86702277af MDL-45154 user profiles: avoid redirection warnings 2014-04-17 14:53:44 +08:00
Frederic Massart 0c30255b32 MDL-42761 badges: Remove H2s from help popup 2014-04-17 12:46:42 +08:00
Andrew Nicols 422737c54e MDL-45119 editpdf: Do not load quick comments in read-only mode 2014-04-17 11:48:58 +08:00
Andrew Nicols 9bab08a4e6 MDL-45119 ajax: Correct use of COUNT in exception dialogue 2014-04-17 11:48:58 +08:00
Andrew Nicols ab38ff96e5 MDL-45119 ajax: AJAX exceptions need a String in the Link 2014-04-17 11:48:57 +08:00
Sam Hemelryk 1a5748b258 Merge branch 'MDL-44616_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-17 08:52:10 +12:00
Sam Hemelryk d947f5d08f Merge branch 'wip-MDL-45116-MOODLE_26_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_26_STABLE 2014-04-17 08:39:39 +12:00
Eloy Lafuente (stronk7) 1e1acdfa77 Merge branch 'MDL-45132-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-16 19:09:58 +02:00
sam marshall 9deb25b785 MDL-27459 Completion: When ratings off, disallow grade completion
For activities that use ratings, there is no grade unless ratings
are enabled. The completion system still lets you select 'complete
when user gets a grade', which leads to later errors.

This change simply disables the 'completion on grade' field if
ratings are enabled for the activity, but not turned on in the form.
2014-04-16 15:06:00 +01:00
Kevin Wiliarty 395d730013 MDL-45116: Workshop submission title displays behind author picture 2014-04-16 09:07:12 -04:00
Frederic Massart 40cf8f62b9 MDL-45132 curl: Unit Tests for file uploads 2014-04-16 17:35:45 +08:00
Marina Glancy 65b84ebe7d Merge branch 'MDL-44951-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-16 14:45:00 +08:00
Dan Poltawski 8ce6a7dfd3 Merge branch 'wip-mdl-44977-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-04-16 14:35:01 +08:00
Frederic Massart 8fe97a4be4 MDL-41975 repository_alfresco: Updating details about Alfresco URL and timestamps 2014-04-16 13:57:09 +08:00
Michael Woods 0ca5c122aa MDL-41975 repository_alfresco: Ensure Moodle sends GMT time to Alfresco 2014-04-16 13:57:09 +08:00
Dan Poltawski 63a9c2522c Merge branch 'wip-mdl-44979-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-04-16 13:56:39 +08:00
Marina Glancy 29088f4bf5 Merge branch 'MDL-45081-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-16 11:52:16 +08:00
Dan Poltawski 9b7456b82e Merge branch 'MDL-44295_v26' of https://github.com/scyrma/moodle into MOODLE_26_STABLE 2014-04-16 11:39:50 +08:00
Damyon Wiese edaf96a19a Merge branch 'MDL-43277-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-16 11:13:12 +08:00
Dan Poltawski f588d0efad Merge branch 'MDL-44941-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-16 10:30:45 +08:00
Dan Poltawski 1c5bdb54b7 Merge branch 'MDL-45076-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-16 09:10:32 +08:00
Sam Hemelryk 5c3c27ac6a Merge branch 'w16_MDL-45100_m26_coursecontext' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-16 11:43:59 +12:00
Eloy Lafuente (stronk7) 1f405407fc weekly release 2.6.2+ 2014-04-15 16:33:02 +02:00
Frederic Massart 74b89ac031 MDL-44941 core: Removing irrelevant assertion causing failures
The timemodified property is not called when the user logs in, and
so we should not be checking if its value matches the current time.
2014-04-15 17:28:00 +08:00
David Monllao be6583cfef MDL-44616 behat: Adding steps to test MDLQA-1709 and MDLQA-62
- In an assignment with file submissions enabled,
  students can upload a set number of files.
- In assignments with file uploading enabled
  the Student can use File Picker to upload files.
2014-04-15 16:03:54 +07:00
Petr Škoda d6a3f86b2e MDL-45100 fix course_context classname PHPDdos typo in context API 2014-04-15 15:47:01 +08:00
Damyon Wiese 060c55b39a Merge branch 'w16_MDL-45098_m26_mariaenv' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-15 15:03:38 +08:00
Marina Glancy 28ff871c4a Merge branch 'MDL-45035-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-04-15 14:34:48 +08:00
Tony Levi 08ab12bd48 MDL-44908: Fix upgrade_grade_item_fix_sortorder performance 2014-04-15 14:27:54 +08:00
Nadav Kavalerchik e3d3ed5afd MDL-40674 - Main menu's "sub menu" should open to the left in RTL mode (theme/clean , bootstrapbase) 2014-04-15 17:07:48 +12:00
Frederic Massart 5054d25aa2 MDL-45076 theme_bootstrapbase: Clean up participants controls LESS
Conflicts:

	theme/bootstrapbase/style/moodle.css
2014-04-15 12:21:00 +08:00
Frederic Massart ea96ccb2e4 MDL-45076 theme_bootstrapbase: Select placement in participants page
Usually the group selector is aligned with the label, but as we want
it to be consistent with the rest of the selects in the participants
page we need an override.

Conflicts:

	theme/bootstrapbase/style/moodle.css
2014-04-15 12:20:58 +08:00
Jonathon Fowler 911d3e9f0b MDL-44270 files: handle drag-drop js error when event has null types
This can happen when the 'dragover' event fires as has been observed
in Safari. When the dataTransfer.types property of the event is null,
accessing types.length throws a JavaScript error.
2014-04-15 14:20:01 +10:00
Dan Poltawski 8240dc0f01 Merge branch 'MDL-45003-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2014-04-15 10:33:16 +08:00
Dan Poltawski 812bee0f4f Merge branch '44354-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-04-15 10:27:09 +08:00
Andrew Nicols 570affa81b MDL-43277 block_navigation: Trim from the left for long names 2014-04-15 10:25:48 +08:00
Petr Škoda 52e403c1a3 MDL-45098 backport support for MariaDB 10.x
This will allow admins to verify 2.7 compatibility from existing 2.6 sites.
2014-04-15 09:44:30 +08:00
Nadav Kavalerchik 50333ecb3b MDL-41891 Theme: Bullets and Numbering are missing from lists, When in RTL mode (theme/clean) 2014-04-15 11:27:58 +12:00
Frederic Massart f984420e48 MDL-45081 curl: Prefer usage of CURLFile over @file arguments 2014-04-14 17:43:25 +08:00
Dan Poltawski 8939d65608 Merge branch 'wip-MDL-43719-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-14 15:23:18 +08:00
Petr Škoda c4f6292cc8 MDL-45049 improve debugging output in error log for NO_DEBUG_DISPLAY scripts 2014-04-14 13:17:53 +08:00
Damyon Wiese da4533bcd4 Merge branch 'MDL-44936-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-14 11:47:45 +08:00
Adrian Greeve 7a1d3e4db8 MDL-45037 gradebook: Allow dashes in xml grade values to be ignored.
This was delivering an error message when trying to import an exported
xml file (from Moodle).
2014-04-14 10:48:42 +08:00
Dan Poltawski 951ba5e8a6 Merge branch 'MDL-45048-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-14 10:02:01 +08:00
Mark Nelson 55a579c960 MDL-45071 mod_quiz: retrieve all the name fields when deleting a user override 2014-04-13 18:42:24 -07:00
Tim Lock 6769f7302b MDL-45012: Enable support for wma files within tinymce Moodle Media plugin 2014-04-14 08:32:11 +09:30
Andrew Nicols b3cf6fa12a MDL-43145 dock: Enable regions before the drag operation starts 2014-04-13 18:27:09 +08:00
Sam Hemelryk edb5a21285 MDL-43145 dock: fixed up region_completely_docked code to ignore empty regions 2014-04-13 18:27:00 +08:00
Gareth J Barnard 1f8f7aea0a MDL-45045 block theme: Fake blocks show empty region when editing and clicked.
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-04-11 13:17:05 +01:00
sam marshall 10d98c1b73 MDL-44991 Behat: step to check if attribute does not contain text
The step checks that an attribute exists, but doesn't contain the
specified text.

Example:
Then the "class" attribute of "#mydiv" "css_element" should
not contain "accesshide"
2014-04-11 11:26:46 +01:00
Eloy Lafuente (stronk7) 629e98b575 MDL-43673 wiki: verify page tags work as expected
This covers MDL-43109, verifying that saved tags
are available on re-edition of a page, without any warning/error.

Also official tags are verified to be working ok. With support
for multiple options added by MDL-43713 and MDL-43738.
2014-04-11 10:38:33 +02:00
Jetha Chan 2f06c0bb34 MDL-44951 theme_bootstrapbase: forum post css tweaks
Adjusted forum post CSS for cleaner appearance.
2014-04-11 16:18:43 +08:00
Frederic Massart 3acaa40e0d MDL-45048 repository_wikimedia: Abusing usage of optional_param
The optional_param call was moved outside of the constructor
because it was called every time the repository would be initialised.
That was leading to problems when the parameter was defined from
another form and not complying with its expected type.
2014-04-11 15:20:36 +08:00
James Pratt 9cf2bc9d3f MDL-45003 qtype numeric : classify invalid response as no response. 2014-04-11 14:14:14 +07:00
James Pratt 6569d675f1 MDL-44981 quiz statistics report : Differentiating '0' and no response
in numeric questions.
2014-04-11 13:36:15 +07:00
Adrian Greeve 76204f6898 MDL-45036 blocks: Update to the mentee block sql to incorporate additional name fields. 2014-04-11 14:02:10 +08:00
Adrian Greeve f2ae72dcf0 MDL-43719 tags: Fix the sql statement in the tag management page.
MSSQL and Oracle require that all fields in teh select also be present
in the group by section.
2014-04-11 13:55:31 +08:00
Ankit Agarwal 6aa4c5186a MDL-45035 events: Fix @package and @since tags in Moodle 2.6 events 2014-04-11 13:38:12 +08:00
Adrian Greeve 8bfd7dbe2c MDL-43626 survey: Addition of additional names to survey. 2014-04-11 13:35:37 +08:00
Frederic Massart 0ae185c9d3 MDL-44936 csslib: Chunking supports @media queries and commas in rules 2014-04-11 12:04:53 +08:00
Dan Poltawski c16911b50f weekly release 2.6.2+ 2014-04-11 11:40:10 +08:00
Dan Poltawski a219c38b13 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-04-11 11:40:06 +08:00
AMOS bot 56b837c82b Automatically generated installer lang files 2014-04-10 22:38:41 +00:00
Sam Hemelryk 6c334f7875 MDL-45046 output: reviewed standard/base layouts and converted where a better option was available 2014-04-11 09:30:55 +12:00
Damyon Wiese fd06eb6d79 MDL-44170 LTI - fix unit tests. 2014-04-10 14:15:50 +08:00
Adrian Fish 83543ffcb9 MDL-44170 Added form field for url matched type.
Added a new mod_form field called urlmatchedtypeid which is populated
by mod_form.js when a matched url is entered. On save, if typeid is 0
and urlmatchedtypeid is supplied, the type id is set to the url matched
id.
2014-04-10 13:41:46 +08:00
Sam Hemelryk bdaa857d78 MDL-44354 page: fixed ignored property when fetching a renderer 2014-04-10 15:15:38 +12:00
Rajesh Taneja 1706f96ce7 MDL-44979 behat: no need to purge all cache again 2014-04-10 11:02:12 +08:00
David Monllao f791924e98 MDL-44619 behat: Converting MDLQA-8
In a standard forum, students can start discussions
add replies and attach files to their posts.
2014-04-09 20:09:11 +07:00
David Monllao 0786df6ebe MDL-44619 behat: filemanager field manager
Enough to allow attachments use in multi-field steps.
2014-04-09 19:37:12 +07:00
David Monllao c3499ca3f2 MDL-44619 behat: Helper to init contexts outside behat 2014-04-09 19:37:12 +07:00
Marina Glancy 52194ac12d MDL-40843 chat: fixed bug in SQL query in recent activity block 2014-04-09 15:45:04 +08:00
Mark Nelson 1b1350947e MDL-42462 mod_feedback: added $OUTPUT to list of global variables used to avoid error 2014-04-09 15:37:52 +08:00
Damyon Wiese 077c9b0dcb MDL-42195 Bootstrap: Make selector for responsive images 100% the same as bootstrap3.
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-09 15:16:48 +08:00
Frederic Massart 76dcccc1e3 MDL-45010 mod_chat: Use H3 instead of H2 in recent activity info 2014-04-09 15:11:18 +08:00
Damyon Wiese 8c3065911b Merge branch 'mdl44669-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-04-09 13:11:45 +08:00
Dan Poltawski b54edd00e2 Merge branch 'MDL-29572_moodle26' of https://github.com/jrchamp/moodle into MOODLE_26_STABLE 2014-04-09 11:41:26 +08:00
Ashley Holman 9a1e5b9911 MDL-39740 grade: Fix grade_item::add_idnumber strict type checking 2014-04-09 11:13:05 +08:00
David Scotson 40a88c19a0 MDL-44468 backup: use html_writer::div call
Simplify the renderer code with the new html_writer
div function.
2014-04-08 12:10:35 +01:00
David Scotson 68de16b334 MDL-44468 backup: use notification API
Replace a hardcoded div.notifyproblem with a API call that,
in Standard theme, outputs the same HTML.

Also removes the .notifyproblem class from the heading,
as that might cause problems for themers who expect it to be
used consistently with the API.
2014-04-08 12:10:25 +01:00
Damyon Wiese a1bb397cf4 MDL-42195 Bootstrap - put border and vertical-align back in the reset for all images
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-08 17:09:05 +08:00
Michael Milette e69ef947b4 MDL-42462 - Feedback - Fix for WCAG 2.0 issue with Informational and Error Content Displayed in red
1) The same code used in other Moodle forms is now used in Feedback to display the "There are required fields in this form marked (*/Required field)" message at the top of the screen and each of the asterisks next to required fields.

2) Feedback specific styles (missingrequire, feeback_required_mark), which were used to highlight required and error fields, have been eliminated. These colours are now controlled by the common Moodle styles (mform1, mform, fdescription, required, req and error) that are used throughout the rest of Moodle for a more uniform appearance.

3) Field level error reporting now displays a message instead of just highlighting the field in a similar way that other Moodle forms do.

Affected files:

- /mod/feedback/styles.css
- /mod/feedback/complete.php
- /mod/feedback/complete_guest.php
- /mod/feedback/edit.php
- /mod/feedback/print.php
- /mod/feedback/item/captcha/lib.php
- /mod/feedback/item/info/lib.php
- /mod/feedback/item/multichoice/lib.php
- /mod/feedback/item/multichoicerated/lib.php
- /mod/feedback/item/numeric/lib.php
- /mod/feedback/item/textarea/lib.php
- /mod/feedback/item/textfield/lib.php
- /mod/feedback/lang/en/feedback.php

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-04-08 14:12:14 +08:00
Damyon Wiese ed14b4c8e2 Merge branch 'MDL-41895-m26' of https://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-04-08 13:17:09 +08:00
Marina Glancy 6520c5362b Merge branch 'MDL-44891-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-08 11:15:39 +08:00
Dan Poltawski 8cb19a633b Merge branch '42317-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-08 09:22:21 +08:00
Marina Glancy 1ec21eb0cd Merge branch 'MDL-42195-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-04-08 08:54:27 +08:00
Marina Glancy 87618534eb Merge branch 'm26_MDL-44938' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-08 08:54:14 +08:00
Sam Hemelryk 7e9b7392ca Merge branch 'MDL-38183_M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-04-08 11:31:01 +12:00
AMOS bot 6726fa2c1b Automatically generated installer lang files 2014-04-07 22:39:50 +00:00
Damyon Wiese b2b6b83028 Merge branch 'wip-MDL-40843-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-07 16:27:37 +08:00
Marina Glancy fce220eb97 Merge branch 'wip-mdl-44873-m26' of git://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-04-07 16:16:47 +08:00
Damyon Wiese 55a65aed19 Merge branch 'wip-MDL-43021-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-07 15:21:34 +08:00
Rajesh Taneja c6aeca6c8f MDL-44977 tool_profiling: set xhprof default settings
Set xhprof default settings, even if xhprof is not installed.
If xhprof is not installed, hide profiling admin settings,
else show them.
This is needed, because if xhprof is installed, then it will
fail all non-js behats which navigate to setting under
site administration, as profiling settings get displayed on
default admin page.
2014-04-07 14:57:56 +08:00
Dan Poltawski 80787633cc Merge branch 'wip-MDL-33486-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-07 13:10:41 +08:00
Sam Hemelryk 2a20285c35 Merge branch 'm26_MDL-44738' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-07 16:02:56 +12:00
Sam Hemelryk 333d189d9f Merge branch 'w15_MDL-44882_m26_upgrademaint' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-07 15:43:15 +12:00
Petr Škoda 09df45e044 MDL-44882 always set maintenance mode on non-cached admin pages
This should resolve all issues with themes during upgrades.
2014-04-06 20:38:26 +08:00
Sam Hemelryk 62e299a73a MDL-42317 theme_bootstrapbase: more responsive styling for forms with blocks pre && post 2014-04-06 15:25:17 +12:00
Sam Hemelryk 2112362c40 MDL-41551 theme_base: improved custom block region handling for base 2014-04-06 15:17:42 +12:00
Sam Hemelryk bd82f5806a MDL-41551 blocks: added tracking and recognition of custom block regions 2014-04-06 15:17:42 +12:00
Sam Hemelryk a65cbb009c MDL-41511 blocks: improved how custom block regions were being rendered.
There is a new theme property 'blockrendermethod' that can be set by the
theme in its config.php and tells Moodle what method it is using to render
blocks in the layout files.
Either blocks, or blocks_for_region.
Then when adding custom block regions to a page content we ensure we use
the same method the theme is using elsewhere.

This is really a hack becuase we (I) didn't properly deprecate
blocks_for_region when I added the blocks method.

Conflicts:
	lib/outputlib.php
2014-04-06 15:17:42 +12:00
Mary Evans 82cce3b097 MDL-38183 themes: Removed redundant css rules for #adminsettings .form-overridden from standard and formal_white. 2014-04-05 17:11:07 +01:00
sam marshall 90761f1a8c MDL-44891 Behat: Add step to check attribute
This commit creates a Behat step of the form:

Then the "title" attribute of "Toggle visibility" "button"
should contain "Show"

This is useful because unless I missed something there is currently
no step that checks attribute values; this seems like a simple
generic step. Behat is intended to check user-visible effects in
the resulting HTML, and sometimes these effects are implemented
using attribute values (two common examples are the alt= attribute,
which is visible to screenreader users, and the title= attribute,
which is visible to all users; there's also the src attribute of
images, and lots of other possibilities too).
2014-04-04 18:29:32 +01:00
Marina Glancy 28e8c6e95c MDL-40843 workshop: sort entries in recent activity block by time 2014-04-04 17:05:20 +08:00
Marina Glancy 2a91ea91b9 MDL-40843 workshop: show user names in recent activity 2014-04-04 17:05:20 +08:00
Marina Glancy b0bbb673e0 MDL-40843 recent_activity: corrections to grouping and user fields 2014-04-04 17:05:20 +08:00
Marina Glancy d66bbb7f6f MDL-40872 Restore functionality of showrecentsubmissions setting 2014-04-04 17:05:00 +08:00
Rajesh Taneja b25d44c200 MDL-44873 behat: Added suppport for clean error class. 2014-04-04 17:00:44 +08:00
Rajesh Taneja cfaaab6656 MDL-44873 theme_bootstrapbase: Added support for notifytiny class 2014-04-04 17:00:39 +08:00
Dan Marsden 626d97248d MDL-44738 SCORM: don't show heading when in popup mode. 2014-04-04 11:42:47 +13:00
Dan Marsden 0b26fbc7be MDL-44938 SCORM: missing constant definition during upgrade. 2014-04-04 09:39:57 +13:00
Mathieu Petit-Clair 61ebf8e5af MDL-44295 auth: Update truncate_userinfo to match current DB fields size. 2014-04-03 10:19:36 -04:00
AMOS bot 42a7a084d3 Automatically generated installer lang files 2014-04-03 09:28:13 +00:00
Marina Glancy 89117976b8 weekly release 2.6.2+ 2014-04-03 12:39:51 +08:00
Marina Glancy 6815afcc89 MDL-43021 course: corrections to the shortname and idnumber uniqueness validation 2014-04-03 11:07:56 +08:00
Damyon Wiese ff34886e8f MDL-42195 Bootstrap: Make bootstrap responsive images "opt-in".
This responsive image behaviour prevents setting of image sizes in text editors,
as well as a string of pix icon bugs / profile image bugs across Moodle.

We are switching to Bootstrap 3 syntax where you need img-responsive class to images
that want this behaviour.
2014-04-03 09:23:27 +08:00
Damyon Wiese 82fbf80171 Merge branch 'm26_MDL-44753' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-02 16:35:27 +08:00
Dan Marsden eee676dcd8 MDL-44753 SCORM: make correct selection of first sco - also fixes MDL-44896 2014-04-02 20:51:48 +13:00
Marina Glancy e0f47ce98c Merge branch 'MDL-41063_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-04-02 09:46:50 +08:00
Eloy Lafuente (stronk7) 13689e7d20 Merge branch 'MDL-31262_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-04-02 03:23:42 +02:00
Marina Glancy 7b5cd3154d Merge branch 'm26_MDL-44753' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-02 09:16:26 +08:00
Marina Glancy acc0d89f5b MDL-34012 chat: removing repetetive db query (performance) 2014-04-02 02:58:02 +02:00
Eloy Lafuente (stronk7) ee21ac5333 Merge branch 'wip-MDL-43398-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-02 02:50:34 +02:00
Eloy Lafuente (stronk7) 001247f3c9 Merge branch 'w14_MDL-44843_m26_localedash' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-02 02:23:46 +02:00
Eloy Lafuente (stronk7) c6008a30cd Merge branch 'wip-MDL-41102-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-02 02:20:44 +02:00
Sam Hemelryk d7680b1f23 Merge branch 'w14_MDL-44824_m26_subplugins' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-02 13:04:52 +13:00
Dan Marsden 8fb32f86dd MDL-44753 SCORM: add check during SCORM restore to make sure valid launch sco is set 2014-04-02 10:03:40 +13:00
Sam Hemelryk 15f780a797 Merge branch 'MDL-43284-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2014-04-02 09:27:07 +13:00
Eloy Lafuente (stronk7) 8414fb7073 Merge branch 'wip-MDL-35305-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-01 21:50:23 +02:00
Michael Aherne 195a68a508 MDL-41895 conditions Show details of grouping restriction 2014-04-01 13:39:18 +01:00
Marina Glancy 4c0e7741c3 Merge branch '26STABLE-wip-MDL44021' of git://github.com/jennymgray/moodle into MOODLE_26_STABLE 2014-04-01 17:40:57 +08:00
Jenny Gray c1fa0dce9e MDL-44021 mod_glossary - fixed search multiple keywords sql duplicate parameter error 2014-04-01 09:40:58 +01:00
Marina Glancy 0cbcd72e8f Merge branch 'W14_MDL-44862_m26_pgsocket' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-01 15:33:54 +08:00
Marina Glancy d19792d5de Merge branch 'MDL-44746_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-04-01 13:52:52 +08:00
Marina Glancy 3b7b097f2a Merge branch 'MDL-44701_26' of git://github.com/aolley/moodle into MOODLE_26_STABLE 2014-04-01 11:06:48 +08:00
Marina Glancy 1a0bc77645 Merge branch 'MDL-44670-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-01 11:05:45 +08:00
Marina Glancy 37de060263 Merge branch 'MDL-44590-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-01 11:05:09 +08:00
Marina Glancy b3aed4e5aa Merge branch 'MDL-44837-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-01 10:40:07 +08:00
Marina Glancy ea3d172274 Merge branch 'wip_MDL-44854_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2014-04-01 10:37:56 +08:00
Marina Glancy cc247afe18 Merge branch 'wip-MDL-44850_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2014-04-01 10:36:39 +08:00
sam marshall d0434cb119 MDL-44837 Behat: 'dialogue' selector only works for confirm dialogues
The dialogue selector in Behat (used only in one place) didn't work for
other types of standard Moodle notification dialogue.
2014-03-31 13:50:47 +01:00
Gareth J Barnard 16b4059ca3 MDL-44854 theme: 'svg' font type not served. 2014-03-31 11:07:47 +01:00
Gareth J Barnard 5b74abc38d MDL-44850 theme: 'eot' font type not served. 2014-03-31 11:05:08 +01:00
Damyon Wiese 6d458076d5 MDL-44583 Assign: performance fixes 2014-03-31 12:53:41 +08:00
Marina Glancy 26a44fc7bb Merge branch 'MDL-44822_26' of git://github.com/aolley/moodle into MOODLE_26_STABLE 2014-03-31 12:47:14 +08:00
Eloy Lafuente (stronk7) 106f3e9ce9 MDL-44862 postgres: tests to support socket & port
Both the database auth and enrol plugins use ADOdb
to perform connections. Socket and port are allowed
there if passed as "socket:port", so, when both are
configured in CFG, we pass them that way. Else
ADOdb defaults to standard port (5432).
2014-03-31 09:29:53 +08:00
Jean-Michel Vedrine 081468fdb1 MDL-41063 Lesson qformat_default class is missing an error function 2014-03-30 09:22:25 +02:00
Petr Škoda d94e9570c7 MDL-44862 always add dbport to dbsocket in pg driver
This should hopefully resolve problems when using sockets connection
to pg servers running on non-standard ports.
2014-03-30 10:13:08 +08:00
Mark Nelson d27dadca87 MDL-44746 core_events: minor changes to the user_deleted event 2014-03-28 17:08:55 -07:00
Mark Nelson 12d0bf448f MDL-44746 core_events: removed incorrect use of snapshot 2014-03-28 16:55:24 -07:00
Tim Hunt bb42f6d46f MDL-31262 fix quiz review capability check.
This change is logically the same as changing
    $this->has_capability('mod/quiz:viewreports')
to
    $this->has_capability('mod/quiz:viewreports') || $this->has_capability('mod/quiz:preview')
in the original code. However, I rewrote the logic so that we test the
most common and performance-critical case first - that of a student
lookign at their own attempt.
2014-03-28 18:40:07 +00:00
Marina Glancy e0529dfbad MDL-41102 report_performance: correctly check state of automated backups
Thanks to Renaat Debleu for the patch
2014-03-28 16:41:24 +08:00
Marina Glancy 1e6e35e277 MDL-33486 wiki: allow searching individual wikis 2014-03-28 14:16:55 +08:00
Petr Škoda fb3ed1a19a MDL-44843 try to hack around strict locale names in OSX 2014-03-28 11:49:15 +08:00
Marina Glancy 2877a60763 MDL-35305 wiki: backup and restore files
Thanks to Tatsuya Shirai for the patch
2014-03-28 10:29:20 +08:00
Marina Glancy 18b388efe7 weekly release 2.6.2+ 2014-03-27 16:52:20 +08:00
Marina Glancy 6f29595eba Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-03-27 16:52:19 +08:00
Marina Glancy d654a1e6d2 MDL-43398 wiki: remove extra Choose... option from select 2014-03-27 14:57:26 +08:00
Jerome Mouneyrac ec7de91744 MDL-43398 Wiki: Choose... options cause SQL errors or seen inappropriate. 2014-03-27 14:57:08 +08:00
Adam Olley e4f7b38325 MDL-44701 gradereport_grader: Display warning on navigation if unsaved grades are present 2014-03-27 14:59:07 +10:30
Petr Škoda e21117fdc0 MDL-44824 add missing subplugin type names 2014-03-27 11:47:51 +08:00
Petr Škoda 60b1e67bae MDL-44824 add missing subplugin type names 2014-03-27 11:47:42 +08:00
Jason Fowler 8340935745 MDL-43284 Theme: Clean theme errors with padding in Question Bank fixed 2014-03-27 10:39:53 +08:00
AMOS bot 428f3d8988 Automatically generated installer lang files 2014-03-27 00:48:27 +00:00
Adam Olley bb57cb8e34 MDL-44822 assignfeedback_editpdf: Stop test generation in is_enabled()
This change also moves one of the checks in test_gs_path. If
generateimage is false, there's no need to stat for the fixture file.
2014-03-27 10:16:38 +10:30
Tim Lock 3e12cb397a MDL-44575: Prevent cron from sending feedback notifications when assignments are hidden in the gradebook 2014-03-26 09:47:48 +10:30
Dan Poltawski 683c7ee245 Merge branch 'wip-MDL-44686-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-26 05:17:55 +08:00
Eloy Lafuente (stronk7) 1179ba8aaa Merge branch 'wip-MDL-41285-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-25 21:53:53 +01:00
Marina Glancy 15ca2aede6 Merge branch 'mdl44573-moodle26' of git://github.com/tlock/moodle into MOODLE_26_STABLE 2014-03-25 16:21:20 +08:00
Marina Glancy 0f10b86557 Merge branch 'MDL-44665_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-25 14:29:23 +08:00
Frederic Massart b3a0c630c8 MDL-44670 theme_clean: Updating screenshot 2014-03-25 12:36:56 +08:00
Sam Hemelryk 50fea8055f Merge branch 'MDL-43960-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-25 12:30:47 +13:00
Jonathan Champ 338fd396b7 MDL-29572 Grade Import: Avoid creating invalid temporary rows; Provide feedback on error 2014-03-22 21:42:25 -04:00
Tim Hunt 91148a2bb5 MDL-44665 declare all quiz page types in the blocks UI. 2014-03-21 14:43:42 +00:00
Marina Glancy c0a9f0139a MDL-44686 behat: limit failure filename length to 255 chars 2014-03-21 15:50:31 +08:00
Marina Glancy ceeac6bcc6 MDL-41285 block_recent_activity: behat test for structural changes 2014-03-21 15:47:20 +08:00
Damyon Wiese 941f4597b0 MDL-43985 Assign: Allow teachers to skip notifying students about grade update.
backport of MDL-33600
2014-03-21 14:45:12 +08:00
Marina Glancy b8604eb33b weekly release 2.6.2+ 2014-03-20 16:00:14 +08:00
Jetha Chan 8c2ec9a11a MDL-44582 installer: added check for php json extension 2014-03-19 16:17:54 +13:00
Marina Glancy 4a7ab01717 MDL-42025 behat: changed behat tag _only_local to _file_upload 2014-03-19 10:40:41 +08:00
Marina Glancy 140caa5b67 Merge branch 'MDL-43341_26' of git://github.com/nobelium/moodle into MOODLE_26_STABLE 2014-03-19 10:35:44 +08:00
Marina Glancy d632f1b82a MDL-44141 restore: added phpdocs 'since' for new method 2014-03-19 10:09:06 +08:00
Marina Glancy c21f8f13e5 Merge branch 'MDL-44141-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-03-19 09:50:11 +08:00
Nobelium 4c6bf7a9ff MDL-43341 SCORM Report: spacer.gif must be managed with ->spacer 2014-03-18 19:41:41 +00:00
sam marshall 0f2929fab1 MDL-44141 Completion: System updates data during restore
The completion system has code which is supposed to prevent it
updating completion status while grades are being restored. This
code was a nasty hack and had not worked for some time. As a result
completion dates were restored incorrectly.

This commit implements a 'proper' way to find out if a restore is
currently running, replacing the previous hack.
2014-03-18 13:25:37 +00:00
Andreas Grabs 7ef24c3bde MDL-44653 mod_feedback - Include additional name fields using user_picture::fields() 2014-03-18 18:25:09 +08:00
Marina Glancy d64521fec2 Merge branch 'MDL-38636-26' of git://github.com/roelmann/moodle into MOODLE_26_STABLE 2014-03-18 17:40:09 +08:00
Jerome Mouneyrac 1df485f566 MDL-42025 assignfeedback_editpdf: add behat tests 2014-03-18 17:17:45 +08:00
Marina Glancy 2aacf70ebd Merge branch 'w12_MDL-44191_m26_mysql56' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-18 16:04:16 +08:00
Marina Glancy 99c8dbc2dd Merge branch 'MDL-44246_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-18 15:33:20 +08:00
Marina Glancy 7e0af0cdd5 Merge branch 'MDL-44416_26' of git://github.com/appalachianstate/moodle into MOODLE_26_STABLE 2014-03-18 14:46:25 +08:00
Marina Glancy cb470c3c70 Merge branch 'MDL-44148-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-03-18 14:33:42 +08:00
Jetha Chan 3a1237997a MDL-44148 portfolio: set_user_config usage fix
Amended user/portfolio.php's use of portfolio_plugin_base::set_user_config to be consistent with the API.
2014-03-18 14:27:02 +08:00
Sam Hemelryk 03ba50f556 Merge branch 'wip-MDL-44542-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-18 17:05:05 +13:00
Marina Glancy c1db0e40d6 MDL-44524 feedback: fix bug in sql under oracle
Thanks to Rob King"
2014-03-18 11:59:30 +08:00
Sam Hemelryk 7b78b30212 Merge branch 'MDL-44502-26' of https://github.com/bostelm/moodle into MOODLE_26_STABLE 2014-03-18 14:41:07 +13:00
Sam Hemelryk 8b0892d605 Merge branch 'MDL-44433-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-03-18 14:36:04 +13:00
Mary Evans ecdec8f8c7 MDL-44381 theme_brick: Removed whitespace and reference to arialist theme in config.php. 2014-03-18 14:33:41 +13:00
Sam Hemelryk a2db21c633 Merge branch 'mdl44499-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-03-18 14:27:08 +13:00
Tim Lock 85165b9473 MDL-44669: mod/assign: fix batchoperations JS when using select all checkboxes. 2014-03-18 11:10:23 +10:30
Petr Škoda 5809fcf52f MDL-44527 import latest certificate bundle 2014-03-18 12:52:35 +13:00
Sam Hemelryk 80440a4a66 Merge branch 'w12_MDL-44516_m26_purifier' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-18 11:48:34 +13:00
Sam Hemelryk 683b5caa06 Merge branch 'MDL-44585-moodle26' of https://github.com/StudiUM/moodle into MOODLE_26_STABLE 2014-03-18 09:03:31 +13:00
Marina Glancy 031d1e3f7d Merge branch 'MDL-44588_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-17 18:19:19 +08:00
Marina Glancy 234e7b0066 Merge branch 'w12_MDL-44624_m26_dmltest' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-17 18:12:55 +08:00
Marina Glancy 682f0db9f6 Merge branch 'MDL-44356-M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-03-17 17:09:47 +08:00
Marina Glancy 322baf1570 Merge branch 'm26_MDL-39568' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-17 16:21:33 +08:00
Marina Glancy b28a4887f5 Merge branch 'w12_MDL-44635_m26_ajaxlogs' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-17 14:29:42 +08:00
Marina Glancy 1cd64d1208 Merge branch 'w12_MDL-44339_m26_testdebug' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-17 13:53:01 +08:00
Petr Škoda 672de8ff9d MDL-44635 discard error logging during ajax tests 2014-03-17 11:31:56 +08:00
Tim Lock bd5fbede39 MDL-44573: Remove HTML tags in outputs column in offline grading worksheet 2014-03-17 12:44:21 +10:30
Petr Škoda 678ab4101a MDL-44300 force PHP 5.6.x to return raw file names for our own guessing 2014-03-17 12:34:13 +13:00
Trevor Cunningham 33c621255d MDL-39568 gradinform_guide: show maxgrade to students when viewing marking guide 2014-03-17 09:03:26 +13:00
Mary Evans 834848461c MDL-44356 theme_bootstrapbase: Centralize the drag and drop arrow in filemanager. 2014-03-15 21:30:14 +00:00
roelmann 963009a0f8 modified: core.css 2014-03-15 20:54:47 +00:00
Henning Bostelmann 4b05939d2f MDL-44502 filelib: Add mimetype for Maple worksheets 2014-03-14 11:40:18 +00:00
Gilles-Philippe Leblanc 7ae964bf89 MDL-44585 grade_import: Restrict the accepted types in the gradebook import 2014-03-14 07:37:19 -04:00
Petr Škoda a12c7eff9f MDL-44624 fix false failures in DML tests 2014-03-14 14:15:47 +08:00
Petr Škoda 9d66c76277 MDL-44516 import htmlpurifier 4.6.0 2014-03-14 12:12:22 +08:00
Petr Škoda fa4dea1472 MDL-44339 treat unexpected debugging() calls in phpunit tests as errors 2014-03-14 11:44:48 +08:00
Petr Škoda 59de93ccdf MDL-44299 resolve collision with session_gc() in PHP 5.6 2014-03-14 11:35:05 +08:00
Petr Škoda 59f3898185 MDL-44191 hack around MySQL 5.6 inability to lower auto_increment 2014-03-14 11:32:23 +08:00
Fred Woolard 69c3994c3c MDL-44416 Correct detail view paging 2014-03-13 19:45:48 -04:00
Eloy Lafuente (stronk7) 872f4e2899 weekly release 2.6.2+ 2014-03-13 23:56:07 +01:00
Eloy Lafuente (stronk7) d91852cc7e MDL-43266 testing: avoid assoc arrays for json
Last commit switched from raw arrays to associative
arrays. That leads to json_encode() to generate an
object instead of an array, ultimately leading to
problems with the rest of code expecting an array.

By using array_values() we are moving back to the
non-associative array.

Also, fix some file permissions.
2014-03-13 22:14:50 +01:00
Dan Poltawski 70fbd52bfd MDL-44433 lang: Update the name of country code CV
ISO-3166 has updated this name to Cabo Verde:
https://www.iso.org/obp/ui/#iso:code:3166:CV
2014-03-13 17:16:33 +08:00
Damyon Wiese d58964b320 MDL-43960 assign: Add missing include
There was a report of mod_assign_save_grade webservice failing because of this.
I couldn't reproduce it, but grepping the code found one place where this include
should be added.
2014-03-13 12:47:38 +08:00
Dan Poltawski 720b69eca6 MDL-44590 behat: Add test for course category idnumber duplication 2014-03-13 10:06:33 +08:00
Dan Poltawski 6bc5172b88 MDL-44590 category: correct get_string component 2014-03-13 10:06:32 +08:00
Eloy Lafuente (stronk7) 3dd695bce0 Merge branch 'MDL-43266_26-last-fixes' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-12 23:26:25 +01:00
Tim Hunt 77437a0e61 MDL-44588 quiz: fix crazy variable called $this. 2014-03-12 18:22:10 +00:00
David Monllao 8efc71b90c MDL-43266 testing: Removing duplicated keys 2014-03-12 17:51:07 +08:00
Frederic Massart ff189a25a9 MDL-44334 lockscroll: Fix wrong warning message 2014-03-12 15:43:34 +08:00
Dan Poltawski 8a9b350182 Merge branch 'm26_MDL-43247' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-12 09:32:51 +08:00
Sam Hemelryk 390188606e Merge branch 'm26_MDL-37733' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-12 14:13:14 +13:00
Dan Poltawski 2fabb89456 Merge branch 'MDL-44061-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-03-12 09:08:52 +08:00
Eloy Lafuente (stronk7) 6d8f9d4756 Merge branch 'wip-MDL-32699-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-12 00:19:11 +01:00
Sam Hemelryk 559834f786 Merge branch 'MDL-42368-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-03-12 11:57:01 +13:00
Sam Hemelryk ce05c00453 Merge branch 'MDL-44345-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-03-12 11:21:59 +13:00
David Monllao 0b5ac03e36 MDL-44246 behat: New mod_quiz test when JS is disabled 2014-03-11 17:22:18 +08:00
Dan Poltawski 1c57cd34e6 Merge branch 'MDL-44095_m26' of https://github.com/shashirepo/moodle into MOODLE_26_STABLE 2014-03-11 15:50:42 +08:00
Dan Poltawski ab9986bf05 Merge branch 'wip-MDL-44337-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 15:41:51 +08:00
Dan Poltawski a808f24536 Merge branch 'MDL-44480-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-03-11 14:35:40 +08:00
Dan Poltawski 666af83e4e Merge branch 'wip-MDL-42870-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 11:37:45 +08:00
Dan Poltawski af80706515 Merge branch 'm26_MDL-44066' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-11 11:29:00 +08:00
Sam Hemelryk 509f371389 Merge branch 'wip-MDL-40721-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 14:22:41 +13:00
Sam Hemelryk 4294de1edf Merge branch 'w11_MDL-44451_m26_addonloc' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-11 14:18:14 +13:00
Eloy Lafuente (stronk7) b17149ee38 Merge branch '44547-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-03-11 00:28:47 +01:00
Sam Hemelryk 598bae139d MDL-44547 repository_alfresco: version bump 2014-03-11 12:05:10 +13:00
Sam Hemelryk 5caac6a494 Merge branch 'MDL-44334-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-03-11 10:10:28 +13:00
Sam Hemelryk 6b347521e3 Merge branch 'MDL-43721-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-11 08:54:39 +13:00
Sam Hemelryk 2f5288dea0 Merge branch 'wip-MDL-44471-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 08:46:11 +13:00
Dan Poltawski f9835ffed0 Merge branch 'MDL-44440_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-10 13:45:27 +08:00
David Monllao d295418ee6 MDL-44440 behat: Changing , for > as a navigation tree nodes separator
Using greater than as seems a more natural separator
than the comma when separating nodes which have a
hierarchy relation.
2014-03-10 13:35:12 +08:00
Dan Poltawski aacc48a7e6 Merge branch 'MDL-43236_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-10 12:04:16 +08:00
David Monllao 4e8c18cc86 MDL-43236 behat: Backporting new method to ease backporting future scenarios 2014-03-10 11:45:19 +08:00
Niclas Tollstorff 45ac1dc77b MDL-37733 SCORM: Correct check for force new attempt 2014-03-08 21:23:05 +13:00
Dan Marsden e75b7988ef MDL-44066 Restore: Restore source field.
Causes problems when restoring a SCORM pacakge that uses an alias.
2014-03-08 21:10:13 +13:00
Dan Marsden 34d0ed1cbf MDL-43247 SCORM: improve pop-up handling and redirect to homepage on close. 2014-03-08 21:03:38 +13:00
Eloy Lafuente (stronk7) ef0ee34df0 Moodle release 2.6.2 2014-03-07 18:51:51 +01:00
David Monllao d7f1447861 MDL-44440 behat: Refactoring features to use I navigate to
Replacing multiple "I expand node" steps by the
new "I navigate to". Also fixing few I navigate to
when dealing with non-JS.
2014-03-07 14:54:11 +08:00
David Monllao c4934eed77 MDL-44440 behat: Other fixes to make clean work properly
- Update the step to follow links inside a treeview
  to work also when JS is disabled.
- Make regions accept header and footer.
- Change some locators refering to non-clean compatible
  regions.
- Restricting click to the table row in forum tracking
  because seems to conflict with the navigation bar when
  using narrow window sizes.
2014-03-07 14:54:11 +08:00
Rajesh Taneja ca29a8f865 MDL-44440 navigation: Added behat step to navigate from navigation/Admin block
This step will help navigate to different parts of moodle
using navigation or adminstration block.
2014-03-07 14:54:11 +08:00
David Monllao b04af90c33 MDL-44440 behat: Log out compatible with clean
.navbar needs to be clicked before following
log in or log out links.
2014-03-07 14:54:11 +08:00
Tim Lock 56e19b54af MDL-44499: Fix PHP warning in upload_manager class 2014-03-07 14:18:41 +10:30
Krister eec5c76ce1 MDL-42368 Themes: Anomaly breadcrumb fix
Previously the editing button could become unreachable with small window
sizes.
2014-03-07 11:37:17 +08:00
Marina Glancy 10bf53490d MDL-42870 completion: show failed activities as incompleted 2014-03-07 10:22:56 +08:00
Marina Glancy a2ae0a7643 MDL-44471 Revert "MDL-42238 mod_wiki: Alternate name sql update to wiki_print_recent_activity"
This reverts commit 6d3d9bd927.
2014-03-07 10:00:51 +08:00
Marina Glancy 417f7b6ecd MDL-44337 glossary: behat test for glossary categories 2014-03-07 10:00:27 +08:00
Marina Glancy cdd3ca573a MDL-40721 wiki: missing page->set_url() when restoring wiki 2014-03-07 09:58:23 +08:00
Marina Glancy b7c751a60c MDL-32699 wiki: only edit capability is required to restore wiki revision 2014-03-07 09:58:05 +08:00
Eloy Lafuente (stronk7) 7330bdebff weekly release 2.6.1+ 2014-03-06 22:17:22 +01:00
Eloy Lafuente (stronk7) 3fb5bd96e8 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-03-06 22:17:16 +01:00
Andrew Nicols 2e29720f21 MDL-44480 Javascript: Correct dialogue ID generation 2014-03-06 17:05:45 +08:00
Damyon Wiese 0a0c276e28 MDL-43721 Assign + groups: Improve performance of assign grading table
Add a function to the groups lib to filter a list of users down
to the ones who can see the module. Required because calling
groups_course_module_visible() for a list of users is too slow
and we shouldn't spread group logic outside of grouplib.php.

Using it in the assign grading table reduces DB queries from 6198/1 to 256/3.

This is 12secs down to 2.5secs.
2014-03-06 15:51:22 +08:00
Damyon Wiese 3ff7c4e389 MDL-43721 Assign: Static cache for plugin is_enabled and is_visible because they get used alot 2014-03-06 15:51:22 +08:00
Yuliya Bozhko 28c8ac2c4a MDL-44140 badges: Prevent non-owners to change visibility of issued badges
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-03-06 14:37:03 +08:00
Damyon Wiese b9d8d54be2 Merge branch 'wip-MDL-44403-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-06 09:22:13 +08:00
Dan Poltawski e5636247a1 Revert "MDL-43852 Filters Fixed naked-OR conditions."
While the patch worked as intended, we discovered some other concerns
about use of this setting in testing.

This reverts commit edf55404ff.
2014-03-06 09:05:27 +08:00
Eloy Lafuente (stronk7) 728ece64e4 Merge branch 'MDL-44425-en_fix_26' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-03-06 00:36:27 +01:00
Helen Foster eecdbbf315 MDL-44425 Merge English strings from the en_fix language pack 2014-03-05 13:35:06 +01:00
Frederic Massart 76170febcc MDL-44345 repository_youtube: Endless loop when reaching last results 2014-03-05 16:58:44 +08:00
Andrew Nicols 2bc980a970 MDL-44061 Ajax: Log whitespace issues to the server error log 2014-03-05 16:34:57 +08:00
Petr Škoda 8f85cea647 MDL-44451 fix plugin_misplaced_exception exception 2014-03-05 16:34:49 +08:00
Damyon Wiese 6b1e9b0cd4 Merge branch 'MDL-43635-m26' of https://github.com/brentboghosian/moodle2 into MOODLE_26_STABLE 2014-03-05 14:51:18 +08:00
Dan Poltawski 864ea90d6d Merge branch 'wip-MDL-44287-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-05 14:18:22 +08:00
Dan Poltawski 7442e32e87 Merge branch 'MDL-43930-26-fix1' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-05 14:13:35 +08:00
Andrew Nicols 798c04b25d MDL-44334 Javascript: Prevent scroll locking for small screen heights 2014-03-05 14:08:26 +08:00
Damyon Wiese abfc156859 Merge branch 'MDL-44370-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-03-05 14:00:57 +08:00
Yuliya Bozhko 857f80ef77 MDL-41585 badges: Add a note that badge recipient is a deleted user
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-03-05 13:18:21 +08:00
Damyon Wiese 3efe930987 MDL-43930 Assign: Fix unit tests.
The tests were expecting exact log data to match, I changed the data
but missed updating the test.
2014-03-05 12:51:15 +08:00
Dan Poltawski a77f82dacf Merge branch 'MDL-41248_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-05 12:39:56 +08:00
Dan Poltawski ed9e1428d1 Merge branch 'MDL-43930-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-05 11:22:37 +08:00
Dan Poltawski 730440dcf4 Merge branch 'MDL-44065-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-03-05 10:52:50 +08:00
Damyon Wiese c6465439d0 Merge branch 'wip-MDL-44074-M26_4' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2014-03-05 09:58:54 +08:00
AMOS bot 25488a1120 Automatically generated installer lang files 2014-03-05 00:54:43 +00:00
Dan Poltawski 602a3bd3de Merge branch 'wip-MDL-44258-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-04 17:50:07 +08:00
Ankit Agarwal d57ce0312a MDL-44370 calendar: Add support for restoring calendar log rules 2014-03-04 16:13:59 +08:00
Ankit Agarwal bdff56f737 MDL-44370 calendar: Fix calendar url in reports 2014-03-04 16:13:59 +08:00
Dan Poltawski 5b2f2af6cd Merge branch 'MDL-44272-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-03-04 16:00:01 +08:00
Dan Poltawski 6a37f9898e Merge branch 'MDL-44278_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-04 15:43:26 +08:00
Marina Glancy 76f9954066 MDL-44403 events: bug fix in legacy event data for unknown_service_api_called 2014-03-04 15:26:17 +08:00
Marina Glancy ce3b9d2f59 MDL-44403 events: added public methods to get eventdata 2014-03-04 15:26:14 +08:00
Frederic Massart f96b8a1c67 MDL-43468 mod_assign: Webservice parameters were not safely cleaned 2014-03-04 14:49:28 +08:00
Dan Poltawski 5d4abb97b2 Merge branch 'MDL-44436-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-03-04 14:41:32 +08:00
Frederic Massart 7ffe38cebf MDL-44436 context: Context IDs are forced to be int
The method context::insert_context_record() sets the context::$id to
an int, while when we create an instance, the $id is often read from
a DB $record object, and is a string. The ID should always be an int.
2014-03-04 14:25:37 +08:00
Damyon Wiese 0fc189a4b4 Merge branch 'MDL-43738_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-04 13:28:18 +08:00
Dan Poltawski 013de6d5d4 Merge branch 'm26_MDL-43852_SWF_Not_Embedded_By_Mediaplugin_Filter' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-03-04 12:56:13 +08:00
Dan Poltawski 41a19bffee MDL-43146 enrol_imsenterprise: missing sesskey protection 2014-03-04 12:26:02 +08:00
Frederic Massart ee8f17db89 MDL-29409 repository_alfresco: Drop support for URL/link
The current solution has two major issues. Firstly, it is using the
session key in the file URL, allowing anyone with the link to steal
the identify of the poster. Secondly, the links are not presistent
and become broken as soon as the server is restarted. Let's not
support this any more until a proper solution is found in MDL-26454.
2014-03-04 11:34:58 +08:00
Brent Boghosian e7fa4cde7b MDL-43635: Further support custom contexts: reading from config DB table and reset method for after plugin install
Add PHPUnit test for custom context changes
2014-03-03 12:03:09 -05:00
Dan Poltawski 51214dd2d1 Merge branch 'MDL-44377_26' of https://github.com/stronk7/moodle into MOODLE_26_STABLE 2014-03-03 15:15:20 +08:00
Marina Glancy e6499fb8a4 MDL-39990 wiki: more detailed validation of view/edit access 2014-03-03 14:45:40 +08:00
Dan Poltawski d5c7462a6a Merge branch 'wip-MDL-44362-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-03 13:34:35 +08:00
Andrew Davis 4d4867503c MDL-44082 mod_chat: added a security check for users already in the chat activity 2014-03-03 12:16:48 +08:00
Tomasz Muras 71037bf26c MDL-43656 mod_feedback: availablity date logic incorrect 2014-03-03 11:24:23 +08:00
Maria Torres db4e2c4cd4 MDL-43916 - Email addresses incorrectly displayed
When capabilities and settings do not allow it.
2014-03-03 10:37:22 +08:00
Dan Poltawski 6b25f55ec9 Merge branch 'w06_MDL-43344_m26_flow' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-03 10:07:15 +08:00
Gareth J Barnard 0bd4dca7be MDL-44074 theme_bootstrapbase: No 768px-979px & 1200px+ empty blk span calcs. 2014-03-01 09:18:34 +00:00
AMOS bot 9b1cc0bb86 Automatically generated installer lang files 2014-03-01 00:56:04 +00:00
Gordon Bateson edf55404ff MDL-43852 Filters Fixed naked-OR conditions. 2014-02-28 23:56:35 +01:00
Eloy Lafuente (stronk7) 36f74f56d8 MDL-44377 dml: enforce non-empty prefix for sqlsrv
Only MySQL is allowed to run Moodle instances without
(with an empty) database prefix. The rationale is that
"user" is a reserved word in every RDBMS but MySQL.

Before this patch, installation was breaking badly, when
the "user" CREATE TABLE statement was issued. With this
patch the error is shown earlier (on connection) preventing
any advance/use of the database.

This check is present in all the drivers, just sqlsrv was missing it.
2014-02-28 10:12:27 +01:00
Marina Glancy 51294319af MDL-44362 recentactivity: fix regressions from MDL-44055 2014-02-28 16:33:54 +08:00
Marina Glancy c89fa51c0e MDL-44258 Behat test for workshop, automate MDLQA-99 2014-02-28 16:33:32 +08:00
Marina Glancy e7198624aa MDL-44287 glossary: fixing warnings when importing as new module 2014-02-28 16:33:21 +08:00
Marina Glancy 971b916b44 MDL-44287 glossary: do not output before redirecting 2014-02-28 16:33:21 +08:00
Tim Hunt 65a90d2d9b MDL-44278 Quiz time overrides: use the same step everywhere.
On the main form, you could select to the nearest minute. On
the override form you could only select to the nearest 5 minutes.
2014-02-28 09:00:54 +01:00
Tim Hunt 379a3fcee3 MDL-41248 completion: fix non-translatable text.
There were two hard-coded strings. Thanks to Guido Hornig for the suggested fix.
2014-02-28 08:10:26 +01:00
Damyon Wiese ed0a48b2c1 weekly release 2.6.1+ 2014-02-28 10:02:43 +08:00
Damyon Wiese a97718eaed Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-02-28 10:02:41 +08:00
David Monllao 5ee96bbcf1 MDL-43738 behat: Refactoring the field type guesser
The previous behaviour delegates the responsability
of overwriting the 3 public methods to the child
classes, now the field type or moodleform field is
guessed earlier in the execution flow.

Other changes introduced here:
- Fix wrong moodleform detection when there is a form
  in the page but the field we are dealing with is
  not inside it.
- Some coding style changes
2014-02-27 18:47:03 +08:00
David Monllao 158eb2af96 MDL-43738 behat: Backporting new 2.7 methods to 2.6
We encourage backporting new feature files, adding
here also these Moodle 2.7 new step definitions so
future features will be easier to backport as we
would be able to directly cherry-pick them.
2014-02-27 18:06:31 +08:00
David Monllao 42e5f933b6 MDL-43738 behat: New step to adapt to radio buttons behaviour
Now we interact with radio fields through it's value
or text.
2014-02-27 18:06:31 +08:00
David Monllao 08066a2ab2 MDL-43738 behat: Normalization and major refactoring of getters and setters
Every single step that sets or gets a value from a field
has been updated to follow the same behaviour both when
using it through a single step or through generic steps
like "I fill the moodle form with:", to resume all the
changes:
- Created a behat_form_group to re-guess the field type
  and act appropriately setting and getting it's value
- Normalize all getters and setters to use behat_form_field
  children
- Complete behat_form_checkbox to trigger the appropiate JS
  event needed to perform some JS scripts that are listening
- Refactor MDL-43713 multi-select changes and remove
  the two new steps introduced there as that behaviour can
  be managed from the generic getter
2014-02-27 18:06:29 +08:00
David Monllao 8ee37654e5 MDL-43738 behat: Functional tests for fields management
We are cheating with this .feature file as this
is not a behaviour and we are just testing the
framework, but in this case I think that everybody
will agree on the need of doing it, as every browser
behaves differently and minor changes in the getters
and setters can easily end up breaking the behaviours.

All credit goes to Eloy Lafuente (stronk7).
2014-02-27 18:05:51 +08:00
Eloy Lafuente (stronk7) 5fbf4638ab MDL-43713 behat: improve multi-select support
This patch implements:

1) Normalization of options. Before the patch options
in a select were being returned as "op1 op2 op3" by selenium
and "op1 op2 op3" by goutte. With the patch, those lists
are always returned like "op1, op2, op3". If real commas are
needed when handling multiple selects they should
be escaped with backslash in feature files.

2) Support for selecting multiple options. Before the patch
only one option was selected and a new selection was cleaning the
previous one. With the patch it's possible to pass "op1, op2" in
these steps:
  - I fill the moodle form with (table)
  - I select "OPTION_STRING" from "SELECT_STRING"

3) Ability to match multiple options in this steps. Before the
patch matching of multiple was really random, now every every
passed option ("opt1, opt2") is individually verified. It applies
to these 2 steps:
  - the "ELEMENT" select box should contain "OPTIONS"
  - the "ELEMENT" select box should not contain "OPTIONS"

4) Two new steps able to verify if a form have some options selected or no:
  - the "ELEMENT" select box should contain "OPTIONS" selected
  - the "ELEMENT" select box should contain "OPTIONS" not selected

5) Change get_value from xpath search to Mink's getValue() that is immediate
(does not need form submission) and works for all browsers but Safari, that
fails because of the extra ->click() issued.

Note all the changes 1-4 only affect to multi-select fields. Single
selects should continue working 100% the same.

The change 5) causes Safari to fail. The problem has been traced down to
the extra ->click() present there. Anyway there are not test cases
requiring that "immediate" evaluation right now. Only the special feature
file attached verifies it.
2014-02-27 18:05:51 +08:00
David Monllao c7db26dab9 MDL-44286 behat: Fixing JS code error
PhantomJS console shows a JS error regarding
an undefined Syn var; as explained by Andrew
Nicols this is caused by Syn supported features
checker, the change in moodle-behat-extension
solves this problem.
2014-02-27 11:54:54 +08:00
shashirepo 33ca478a19 MDL-44095 frontend: fix typos in readme file 2014-02-26 16:04:19 +05:30
Damyon Wiese 0f73fa60b9 MDL-43723 Blocks drag and drop: Javascript cleanup
Declare the selector instead of repeating it several times.
2014-02-25 17:05:45 +08:00
Damyon Wiese b174b543d8 Merge branch 'MDL-43723-26' of git://github.com/mouneyrac/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-02-25 16:44:48 +08:00
Dan Poltawski 233f8b265a Merge branch 'MDL-43882_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-25 15:34:00 +08:00
Jerome Mouneyrac ed2bd8e4d3 MDL-43266 Testing sites are cleaning all test dataroot contents 2014-02-25 14:48:59 +08:00
David Monllao aa5916d94c MDL-43882 lib: Adding info about the change in upgrade.txt 2014-02-25 11:24:00 +08:00
Damyon Wiese 2db5aef32e MDL-40619 mod_quiz: Remove commented non-js behat scenario 2014-02-25 11:05:08 +08:00
Damyon Wiese 0e0bbd9922 Merge branch 'wip-MDL-40619-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-25 11:04:40 +08:00
Dan Poltawski e274eece15 Merge branch 'MDL-43405_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-02-25 10:30:36 +08:00
Ankit Agarwal 0483a5ad93 MDL-44272 events: Fix incorrect urls in course module events 2014-02-24 17:05:02 +08:00
Damyon Wiese 7c9f70acd4 Merge branch 'MDL-43837_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-24 16:56:21 +08:00
Damyon Wiese 5f98c897b4 Merge branch 'MDL-44111_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-24 15:40:28 +08:00
Damyon Wiese 9334d95009 Merge branch 'wip-MDL-44168_26' of git://github.com/ds125v/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-24 15:22:42 +08:00
Damyon Wiese ede0d15765 Merge branch 'MDL-44247-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-02-24 14:30:08 +08:00
Damyon Wiese ff7b9d9d8f Merge branch '44279-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-24 13:38:33 +08:00
Damyon Wiese 1998e85cf1 Merge branch 'MDL-44286_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-24 13:33:42 +08:00
Damyon Wiese e2f19c6b33 Merge branch 'MDL-44288_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-24 13:27:45 +08:00
Michael Aherne 96942337fb MDL-44066 caching Don't advertise session mode for MongoDB and memcached 2014-02-24 12:49:51 +08:00
Damyon Wiese ebe9c36cb5 Merge branch '44217-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-24 11:14:05 +08:00
Damyon Wiese 24d6ab75fc Merge branch 'MDL-34319_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-02-24 11:09:57 +08:00
Sam Hemelryk 82403a6f38 MDL-44217 theme_bootstrapbase: darkend link colour by 5% for accessibility 2014-02-24 16:07:23 +13:00
Damyon Wiese 41a10883b6 Merge branch 'MDL-41767-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-02-24 10:41:25 +08:00
David Monllao 235847ecd5 MDL-43837 behat: Adding reduced timeouts
There are steps where we want to check that
"something" does not appear in the page
or does not exist. We still have to spin
but we don't need to spin for 6 seconds.
2014-02-24 09:43:58 +08:00
David Monllao 8102409895 MDL-44111 behat: Limiting dump files filename size 2014-02-21 13:25:11 +08:00
David Monllao 0710e4944f MDL-43882 dml: New test for perf_get_xxxx() methods 2014-02-21 13:20:51 +08:00
David Monllao 1b6b3b66df MDL-43882 performance: New metric, time spent by the database
This patch adds a new performance metric to the performance
info shown by MDL_PERF* vars, the time spent by the database,
it was one of the wonderful @poltawski ideas. To be more specific
the value displayed is the sum of the time elapsed between query_start()
and query_end().
2014-02-21 13:20:51 +08:00
David Monllao aafe8337df MDL-44286 behat: Updating to our custom Syn library 2014-02-21 10:18:23 +08:00
AMOS bot e3caf032d7 Automatically generated installer lang files 2014-02-21 00:45:30 +00:00
Sam Hemelryk 25c950b63b MDL-42279 user: fixed typo in user_get_user_details_courses 2014-02-21 08:34:42 +13:00
Sam Hemelryk d1ac630093 MDL-44279 user: added unit test to trigger known bug 2014-02-21 08:34:42 +13:00
Tim Hunt 193cb51042 MDL-44288 qtype_calculatedsimple fix validation notice.
The notice happend if you clicked Save changes before Find the wild
cards {x..} present in the correct answer formulas.
2014-02-20 12:59:50 +00:00
Eloy Lafuente (stronk7) 05636776e3 weekly release 2.6.1+ 2014-02-20 12:43:31 +01:00
Eloy Lafuente (stronk7) 3bcd0f23ff Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-02-20 12:43:25 +01:00
Damyon Wiese 15378769f2 MDL-43930 assign: Do not log when user is logged in as someone else.
I do not agree with this behaviour - but this makes it consistent with other modules.
2014-02-20 12:32:05 +08:00
Damyon Wiese 5e9d6beaa3 Merge branch 'MDL-44118_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-19 09:20:07 +08:00
Dan Poltawski a43aa9fbf1 Merge branch 'MDL-43182_26' of git://github.com/mr-russ/moodle into MOODLE_26_STABLE 2014-02-19 09:16:49 +08:00
Eloy Lafuente (stronk7) 3f4a9df9f7 MDL-43265 question: incorrect closing parenthesis 2014-02-19 00:11:35 +01:00
Eloy Lafuente (stronk7) 9f5ac013a3 Merge branch 'MDL-43265_26' of https://github.com/jacks92/moodle into MOODLE_26_STABLE 2014-02-18 23:56:12 +01:00
Eloy Lafuente (stronk7) 77da718f1b Merge branch 'MDL-43337-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-02-18 23:25:30 +01:00
Tim Hunt 652413ce70 MDL-44118 new environment check are all quiz attempts upgraded.
In Moodle 2.1, there was a major DB upgrade relating to questions, and
it was possible to delay some of that upgrade. Now, those DB tables are
changing again, and the time has come to insist that all the updata has
been upgraded (or deleted).
2014-02-18 12:01:38 +00:00
Dan Poltawski 29b3c5dfc6 Merge branch 'm26_MDL-43541' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-02-18 14:14:00 +08:00
Damyon Wiese 28ac492db3 Merge branch 'MDL-43802_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-18 14:05:32 +08:00
Damyon Wiese fa0016a8a2 Merge branch 'MDL-41646_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-18 12:41:42 +08:00
Eloy Lafuente (stronk7) 0f678757a4 Merge branch '43822-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-18 02:06:19 +01:00
David Scotson 8895425e41 MDL-44168 html: border=1 on regexdetect table 2014-02-17 11:47:18 +00:00
sam marshall f76c4edf01 MDL-44065 Course: _add_instance exception leads to inconsistent db
If an exception occurs during a module's _add_instance function, this
results in a course_modules entry with instance=0. The system already
handled returning false to this function, but did not handle
exceptions.
2014-02-17 10:52:10 +00:00
Frederic Massart 6e1688f7ba MDL-44247 mod_scorm: Reference to SYSTEM_CONTEXT instead of real context 2014-02-17 15:59:26 +08:00
Dan Marsden 9f3a4cbbcf MDL-43541 SCORM: set first launchable sco correctly. 2014-02-17 19:57:37 +13:00
Damyon Wiese 590a9dc30a Merge branch 'MDL-43169_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-02-17 14:35:36 +08:00
Damyon Wiese 31ab685057 Merge branch 'MDL-43504-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-17 14:23:40 +08:00
Marina Glancy 2dfed6304e MDL-40619 behat: test for creating a one-question quiz 2014-02-17 14:20:00 +08:00
Matt Switlik 823640c16d MDL-42618 fix grade importing of whitespace idnumbers 2014-02-17 12:14:23 +08:00
Dan Poltawski 06a8eb06f3 Merge branch 'MDL-27414_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-02-17 12:06:46 +08:00
Andrew Nicols 4f88b83de9 MDL-43504 Course: Include the course/category collapse JS correctly
This was previously only included when there were hidden categories to show
which were not yet visible. As a result, if all categories were visible,
then the JS was not included.
2014-02-17 11:40:09 +08:00
David Monllao 6fcf292760 MDL-43802 behat: Testing deleted activity with JS enabled 2014-02-17 11:02:36 +08:00
Dan Poltawski f23808515b Merge branch 'MDL-42033_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-02-17 10:32:38 +08:00
Jerome Mouneyrac fd9233c1b9 MDL-43723 restrict the drag and drop to the move icon instead of dragging the entire block header
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-02-17 09:21:58 +08:00
Damyon Wiese 759e616eb6 Merge branch 'MDL-44018_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-17 09:21:46 +08:00
fabmen a0815efa5d MDL-43405 auth_ldap: Fixed issue with undefined variable: ldap_cookie 2014-02-16 14:23:17 -08:00
fabmen 25d981659b MDL-34319 auth_cas: Fixed issue with undefined variable: ldapconnection 2014-02-16 14:20:41 -08:00
Mark Nelson ce7c5de2e9 MDL-43169 core_calendar: introduced calendar type system setting (Backport of MDL-42932) 2014-02-16 13:52:57 -08:00
Sam Hemelryk bfb99b7e1d Merge branch 'MDL-44037_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-17 10:16:39 +13:00
Sam Hemelryk 90e7406e29 Merge branch 'MDL-42404_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-17 10:15:41 +13:00
Sam Hemelryk 2f31445ff8 Merge branch 'MDL-44142-26' of git://github.com/mrverrall/moodle into MOODLE_26_STABLE 2014-02-17 09:16:41 +13:00
Sam Hemelryk 0b420fab17 Merge branch 'MDL-44042-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-17 09:07:02 +13:00
Sam Hemelryk a413d15875 Merge branch 'MDL-44055-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-17 09:04:51 +13:00
Sam Hemelryk ba0f2d978b Merge branch 'MDL-44079-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-02-17 08:49:12 +13:00
Sam Hemelryk 3c60db1a84 Merge branch 'MDL-43979-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-02-17 08:28:06 +13:00
Jean-Michel Vedrine a00bff10e5 MDL-42033 Files in subdirs not exported correctly by question XML format 2014-02-16 19:46:10 +01:00
Simon Coggins a837a7c721 MDL-43049 accesslib: Fix typo in memory optimization code 2014-02-16 20:14:04 +11:00
Sam Hemelryk 19cb367592 MDL-43822 theme_bootstrapbase: blocks less tidied and reorganised
Thanks Gareth for the peer-review.
2014-02-16 14:26:11 +13:00
AMOS bot dfbde06b40 Automatically generated installer lang files 2014-02-15 00:43:51 +00:00
Jean-Michel Vedrine a1b2b00736 MDL-27414 Upgrade the randomsamatch qtype to the new question engine
Added XML import/export
Different randomsamatch questions in the same quiz can now pick the same
shortanswer question.
Images are not preserved if shortanswer question is deleted after being
used in a randomsamatch attempt.
2014-02-14 16:59:32 +01:00
Paul Verrall 0ec77cdea6 MDL-44142 Cohorts: Use maxusersperpage for list of current users. 2014-02-13 16:18:04 +00:00
Eloy Lafuente (stronk7) acbd69f7ee weekly release 2.6.1+ 2014-02-13 15:30:08 +01:00
Eloy Lafuente (stronk7) 47e4397538 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-02-13 15:30:03 +01:00
Jayesh Anandani 08e9a32e5f MDL-43265 Fix question name text to 255 chars 2014-02-13 17:06:10 +05:30
David Monllao 9a8544daf6 MDL-44037 behat: New feature -> publishing rubric templates
This patch automates MDLQA-1186; rubrics can be
shared as templates.
2014-02-13 16:50:53 +08:00
David Monllao 0a1c3118ba MDL-42404 behat: Covering MDL-39710 with behat features
I've contributed to a large an ugly scenario
in favour of performance as separating it in another
scenario or feature would add 3 or 4 minutes to the suite.
2014-02-13 16:49:45 +08:00
David Monllao 782e32e3e4 MDL-42404 behat: Adding feature to test reusing user's rubrics
Automates MDLQA-1187, teachers can reuse their
rubrics in other activity.
2014-02-13 16:49:45 +08:00
David Monllao 577efa89cd MDL-42404 behat: Adding rubrics step definitions 2014-02-13 16:49:45 +08:00
David Monllao c644877218 MDL-42404 behat: Adding edit rubrics feature
Automates the following MDLQA-1185, MDLQA-1188
and MDLQA-1427. All of them related with the
expected outcomes after editing rubrics definitions
that were already used to grade students.
2014-02-13 16:49:45 +08:00
David Monllao a63fd3a6a8 MDL-42404 behat: Adding yui-dialog to dialogue selector 2014-02-13 16:49:45 +08:00
Frederic Massart 53a09b3886 MDL-43337 enrol: More tests for get_enrolled_users_with_capability 2014-02-13 12:07:06 +08:00
Frederic Massart 07b9d5e9df MDL-43337 enrol: Missing break in get_enrolled_users WS 2014-02-13 12:07:06 +08:00
apsdehal c9c9a4a76b MDL-43337 WebService: Missing break statement added
In function get_enrolled_users_with_capability
2014-02-13 12:07:06 +08:00
Andrew Nicols a5be87d234 MDL-44042 Javascript: Handle moving to the top of the current section with keyboard 2014-02-13 10:13:38 +08:00
Sam Hemelryk a70818530e Merge branch 'int26_MDL-43200' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-02-13 08:25:32 +13:00
Petr Škoda 6279184e14 MDL-43200 fix enrol_manual externallib tests 2014-02-12 16:03:01 +08:00
Andrew Nicols 11a788e420 MDL-43941 Behat: Section visibility tests should not check if activities are visible
It should be possible for activities to be visible even when the section
they are in is hidden.

However, when a section is hidden, all activities in that section are also
then initially hidden. Therefore, this commit splits out the hidden test to
a new test so that the initial state of activities after hiding can still
be tested.
2014-02-12 11:55:15 +08:00
AMOS bot c0aac4e36f Automatically generated installer lang files 2014-02-12 00:42:50 +00:00
Sam Hemelryk 7a27c83bc0 Merge branch 'MDL-41644_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-12 09:24:11 +13:00
Marina Glancy efdbd1bd1d Merge branch '28567-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-02-11 14:42:59 +08:00
Marina Glancy 28e5849960 MDL-42505 whitespace correction 2014-02-11 14:36:52 +08:00
Michael Milette 761a10f8d5 MDL-42505 - Feedback plugin: Inappropriate use of fieldset tags around form and cancel button
Changes:
* Removed the fieldset HTML tags around the Cancel button at the bottom of the form.
* Removed the fieldset HTML tags around the whole form.
* Added missing fieldset tags around groups of radio buttons and checkboxes.
* Removed unordered list wrapping dropdown lists.
* Removed duplicate label for dropdown lists.

Modified Files:
* mod/feedback/complete.php
* mod/feedback/complete_guest.php
* mod/feedback/item/multichoice/lib.php
* mod/feedback/item/multichoicerated/lib.php

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-02-11 14:15:00 +08:00
Andrew Nicols aebc072dd4 MDL-44079 Javascript: EditPDF editor should be modal 2014-02-11 12:25:34 +08:00
Andrew Nicols 3c78500c9f MDL-44079 Javascript: Closing a tooltip should pass event details 2014-02-11 12:25:15 +08:00
Andrew Nicols 624feb24f2 MDL-44079 Javascript: Check whether a dialogue is focused before closing 2014-02-11 12:25:00 +08:00
Andrew Nicols a1f3fe6617 MDL-44055 mod_glossary: Add missing alternate name fields 2014-02-11 10:02:08 +08:00
Andrew Nicols 4ba46b8618 MDL-44055 mod_quiz: Add missing alternate name fields 2014-02-11 10:02:07 +08:00
Sam Hemelryk 58ce5122b2 Merge branch 'MDL-43941-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-11 14:10:58 +13:00
AMOS bot 38a69deafa Automatically generated installer lang files 2014-02-11 00:42:11 +00:00
Andrew Nicols f47b4fec8f MDL-43994 Blocks: Hide the move icon when blocks are docked on Afterburner too 2014-02-11 00:08:55 +01:00
Sam Hemelryk ec5dc1fab7 Merge branch 'MDL-43929_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-11 08:27:44 +13:00
Andrew Nicols 5ce1ff33ce MDL-43979 Javascript: Correct checking of attributes during dialogue init
Various dialogue attributes are optional and are provided by the parent and
not provided as attributes to the dialogue being initted.

As a result, if the setting is not provided during init, we were assuming
that the value would be false rather than checking the real attribute.
2014-02-10 22:00:44 +08:00
Marina Glancy 98c5ac4358 Merge branch '43977-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-10 18:16:42 +08:00
Andrew Nicols c1e725bbd1 MDL-43504 Javascript: Frontpage collapsing should not depend on enableajax
This is an oversight, but we should not depend on the enableajax setting
which we're trying to deprecate.
2014-02-10 15:45:51 +08:00
Tim Hunt f10763ebc0 MDL-43929 question manual grading: keep comment when validation fails.
If the validation failed, so the manual grading page was re-displayed
with a validation error, then any comment that had just been typed in
was getting lost. This fixes that.
2014-02-10 07:34:21 +00:00
Sam Hemelryk 5eb9a4f631 Merge branch 'wip_26_mdl-32724' of https://github.com/iarenaza/moodle into MOODLE_26_STABLE 2014-02-10 15:26:24 +13:00
Sam Hemelryk e2b27417dc Merge branch 'MDL-43774_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-02-10 15:20:25 +13:00
Sam Hemelryk 8ebaf4bd74 Merge branch 'MDL-43267-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 14:53:55 +13:00
Sam Hemelryk 7aaf82deb6 Merge branch 'MDL-40938-26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-02-10 14:16:22 +13:00
Sam Hemelryk 83fffcb97a Merge branch 'MDL-43200_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-10 14:11:36 +13:00
Sam Hemelryk a5a7dd624f Merge branch 'MDL-42882-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-02-10 13:13:03 +13:00
Sam Hemelryk b41b2b2e18 MDL-44056 question: added new default property to unit tests 2014-02-10 12:56:48 +13:00
Sam Hemelryk 4acc62f2c4 Merge branch 'MDL-43641-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 11:50:34 +13:00
Sam Hemelryk e32b3de09e Merge branch 'MDL-44056_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-10 11:30:20 +13:00
Sam Hemelryk 7082e945b2 Merge branch 'MDL-43838_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-10 11:27:12 +13:00
Sam Hemelryk ab4ec7a21c Merge branch 'MDL-43969-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 09:48:22 +13:00
Sam Hemelryk 4e4fabd197 Merge branch 'MDL-43992-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 09:40:21 +13:00
Sam Hemelryk 7ca837ef2c MDL-44020 core: version bump for service change 2014-02-10 09:37:52 +13:00
Sam Hemelryk 8ef741eeca Merge branch 'MDL-44020-STABLE-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-02-10 09:31:04 +13:00
Sam Hemelryk 764d330c3e Merge branch 'MDL-44046_m26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-02-10 09:28:19 +13:00
Sam Hemelryk a95a356322 Merge branch 'MDL-43978_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-02-10 09:24:01 +13:00
Sam Hemelryk dfc8d1d7f5 Merge branch 'MDL-43994-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-10 09:06:40 +13:00
Sam Hemelryk fdf33244b5 Merge branch 'MDL-44029-quiz-group-delete-handler-bug_26_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_26_STABLE 2014-02-10 08:44:56 +13:00
Sam Hemelryk 3b6aa4f70c Merge branch 'MDL-43946_m26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-02-10 08:43:05 +13:00
Sam Hemelryk a7695377d7 MDL-43977 theme_bootstrapbase: small fix to make custom menu work with JS disabled 2014-02-10 08:37:00 +13:00
Sam Hemelryk dc606a57a7 MLD-28567 calendar: improved course filter process 2014-02-10 08:31:43 +13:00
Tim Hunt a82e15de84 MDL-44056 questions: restore essay attempts from 2.0 notice. 2014-02-09 17:50:59 +00:00
AMOS bot 80e5c694d3 Automatically generated installer lang files 2014-02-09 00:42:13 +00:00
Mary Evans 39790f906c MDL-40938 theme_bootstrapbase: Fix for text fields in login block. 2014-02-08 15:09:52 +00:00
Tim Hunt aa083d663b MDL-44018 quesiton variant was not backed up or restored. 2014-02-07 21:55:57 +00:00
Eric Merrill 2a2176186d MDL-44046 gradebook Reduce duplicates returned during sortorder fixing. 2014-02-07 09:30:08 -05:00
Juan Leyva ae4ce123e5 MDL-44020 Add core_calendar_get_calendar_events function to the Moodle Mobile service 2014-02-07 11:22:10 +01:00
Andrew Nicols 8f71903132 MDL-43994 Blocks: Hide the move icon when blocks are docked 2014-02-07 17:42:23 +08:00
Andrew Nicols b269650d8a MDL-43992 Javascript: Remove <return> key listener for confirmation
The listener was previously confirming, even when the cancel or 'No'
buttons were selected. However, having the default action as 'Confirm'
seems dangerous in this situation, so removing this option entirely.
2014-02-07 16:32:59 +08:00
Andrew Nicols 684424a6e6 MDL-43969 Forms: Adjust ARIA attributes for short forms
The aria-live="polite" attribute is incorrectly added to the fieldset,
causing the entire fieldset to be read out on change in some browsers. This
is unnecessary.
It also does not announce the current state of the fieldset (collaped or
open) and should.
2014-02-07 16:20:21 +08:00
Andrew Nicols 4974d22b8d MDL-43267 Javascript: Improve focus before and after drag/drop 2014-02-07 15:12:18 +08:00
Andrew Nicols 472b07b8e7 MDL-43267 Javascript: Remove aria drag/drop related attributes for drag/drop
Since we provide an alternative interface rather than describing the
locations for each drop, we should not add aria-grabbed, or
aria-dropeffect.
2014-02-07 14:17:27 +08:00
Andrew Nicols de5c64fa7c MDL-43267 Javascript: Improve accessibility of keyboard move
Change the keyboard move descriptions to allow for more detailed
descriptions such as:
* "After 'X'"; or
* "To top of section 'Y'"
2014-02-07 14:12:45 +08:00
Petr Skoda 98d135fea3 MDL-43344 upgrade to latest Flowplayer 2014-02-07 13:12:00 +08:00
Sam Hemelryk 27ebbdd703 weekly release 2.6.1+ 2014-02-07 11:46:12 +13:00
Yuliya Bozhko 79405669f9 MDL-43978 badges: Fix lang string 2014-02-07 09:10:47 +13:00
Matt Petro 82d0300757 MDL-44029 mod_quiz: Fixing group deleted handler so it does not remove user overrides. 2014-02-06 14:14:21 -05:00
Russell Smith 905b88c69c MDL-43926 files: Unit tests cannot assume id values. 2014-02-06 09:49:44 +08:00
Sam Hemelryk 155771cb4b Merge branch 'MDL-43936_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-06 10:04:06 +13:00
apsdehal a1b52cb282 MDL-43200 WebServices: Reset Instance variable 2014-02-06 01:05:29 +05:30
Eric Merrill e29585b206 MDL-43946 gradebook upgrade Improve SQL to find duplicate sortorders. 2014-02-05 09:57:30 -05:00
Tim Hunt 7e00410338 MDL-43936 questions: fix my lame spelling in upgrade.txt.
Thanks to Mark Nelson for the suggested improvements.
2014-02-05 11:59:53 +00:00
Marina Glancy 270cd52103 Merge branch 'MDL-42339_m26' of git://github.com/rwijaya/moodle into MOODLE_26_STABLE 2014-02-05 15:57:21 +08:00
Rossiani Wijaya a3b0030e04 MDL-42339 - removed double formatting for set_title() and set_heading() 2014-02-05 15:40:25 +08:00
Dan Poltawski 824fef6892 MDL-42882 upgrade: Improvements to upgrade code
Suggested by Petr:
* Don't rely on single user for upgrade
* Make the pathnamehash generation a bit clearer (and add
  a test to verify its correctly formed).
2014-02-05 14:40:32 +08:00
Yuliya Bozhko b70d618c04 MDL-43774 badges: Stop overriding default course navigation 2014-02-05 10:47:57 +13:00
Yuliya Bozhko 256731fd39 MDL-43978 badges: Display error message to guest users viewing "My Badges" page 2014-02-05 09:57:52 +13:00
Iñaki Arenaza b1f5a038f3 MDL-32724: LDAP Auth function user_update() returns true even if update has failed 2014-02-04 19:28:06 +01:00
Eloy Lafuente (stronk7) d088fbebac Merge branch 'MDL-43911-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-04 10:53:28 +01:00
Eloy Lafuente (stronk7) 4947703a0b Merge branch 'wip-MDL-41384-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-04 10:40:57 +01:00
Andrew Nicols 066bfe30b0 MDL-43641 Javascript: Correct default dialogue centering 2014-02-04 15:40:42 +08:00
Damyon Wiese ce296e211f MDL-43805 assign: Prevent behat fail on ci - editpdf is not available there
Ghostscript is not setup on the ci servers, so the editpdf feature will be automatically
disabled. This means that I cannot click on "Hide Annotate PDF".
2014-02-04 13:44:07 +08:00
Andrew Nicols e719c59c0e MDL-43941 Course: Allow AJAX show/hide of activities in hidden and orphaned sections 2014-02-04 10:57:46 +08:00
Sam Hemelryk 82bef99867 Merge branch 'MDL-43369-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2014-02-04 15:24:02 +13:00
Andrew Nicols b954cb004c MDL-43911 Behat: Save dumps of the page content to disk on scenario failure 2014-02-04 08:53:19 +08:00
Oleg Sychev c5a229c2f1 MDL-42456: add Mercurial vcs support to plugin_external_source 2014-02-04 13:10:57 +13:00
Sam Hemelryk 93289de65e Merge branch 'MDL-43885-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-02-04 12:38:28 +13:00
Marina Glancy b207d05e48 MDL-43821 completion: fix bug in section completion progress
Thanks to Shane Dye for the provided patch
2014-02-04 00:11:52 +01:00
Eloy Lafuente (stronk7) e28eb21659 Merge branch 'wip-MDL-43828-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-03 23:58:14 +01:00
Sam Hemelryk 5dce0f2a1a Merge branch 'MDL-43892_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-04 10:57:37 +13:00
Sam Hemelryk 90c15466d8 Merge branch 'wip-MDL-33920-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-02-04 10:47:09 +13:00
Sam Hemelryk c78f073a41 Merge branch 'MDL-43936_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-02-04 10:11:47 +13:00
Gordon Bateson cb5639ca1c MDL-40410 remove ampersands required for PHP strict standards lib/tablelib.php 2014-02-04 10:05:53 +13:00
Sam Hemelryk 2ad02f9c91 Merge branch 'MDL-43884-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-02-04 09:11:41 +13:00
Sam Hemelryk fa0b936d59 Merge branch 'wip-MDL-39942-MOODLE_26_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_26_STABLE 2014-02-04 08:29:17 +13:00
Eloy Lafuente (stronk7) fa10d60b15 Merge branch 'm26_MDL-37714' of git://github.com/greg-or/moodle into MOODLE_26_STABLE 2014-02-03 17:58:38 +01:00
Marina Glancy 8ded044775 Merge branch 'MDL-41647_26' of git://github.com/apsdehal/moodle into MOODLE_26_STABLE 2014-02-03 17:34:57 +08:00
Dan Poltawski b7f4097043 MDL-42882 upgrade: improved SQL query
Kudos to Tim Hunt who came up with this, on mysql with 4 milion
records (and a fast SSD) the performance difference is:

Original: 36.83 sec
New query: 8.63 sec
2014-02-03 17:30:21 +08:00
Dan Poltawski 5f38edeefd MDL-42882 upgrade: unit tests for root folders upgrade
Just verifying the original behaviour
2014-02-03 17:30:20 +08:00
David Monllao 74d357b1c2 MDL-43838 behat: Clean theme compatibility with small and medium screen sizes 2014-02-03 17:01:48 +08:00
Marina Glancy 839b58679d Merge branch 'MDL-43805-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-02-03 16:09:37 +08:00
Marina Glancy 79efe4f22b Merge branch 'w05_MDL-43905_m26_loginevents' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-02-03 15:34:32 +08:00
Marina Glancy 18a28dde45 Merge branch 'MDL-43593-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-02-03 15:07:53 +08:00
Marina Glancy 94776f1bfa Merge branch 'MDL-43951_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-02-03 14:54:11 +08:00
David Monllao 9a13b1108f MDL-43951 behat: Fixing random failure
NodeElement->hasAttribute() (JS enabled) queries selenium
about whether it has any attribute or not, if due to an
AJAX request the field node changed selenium can not access
that node and throws an exception.
2014-02-03 13:59:32 +08:00
Marina Glancy 52b3120916 Merge branch 'MDL-43440-26' of git://github.com/mr-russ/moodle into MOODLE_26_STABLE 2014-02-03 13:43:50 +08:00
apsdehal 3a1ade2544 MDL-41646 Wiki: Removed unnecessary wiki_info class 2014-02-02 15:51:30 +05:30
apsdehal 1ab256742d MDL-41647 WebServices: Changed notification CSS class 2014-02-02 15:24:40 +05:30
apsdehal 3a98e73a54 MDL-41644 Backup: Update CSS class .notifywarning with .notifyproblem 2014-02-02 03:31:37 +05:30
Tim Hunt bdeb5d0bf1 MDL-43936 questions: document renderer API change. 2014-01-31 14:12:35 +00:00
Tim Hunt 9b62fec54a MDL-43926 Unit tests shouldn't assume only one category on install 2014-01-31 10:46:35 +00:00
Marina Glancy cfd46e76c6 MDL-43828 forum: allow to select single available group when posting 2014-01-31 17:00:19 +08:00
Marina Glancy 1c4b2c0b8d MDL-41384 course: do not show debugging message if $COURSE contains format options
before showing debugging message make sure that field exists in database and not only in the object
2014-01-31 16:59:54 +08:00
Marina Glancy e262d58d6c MDL-41384 upgrade: make sure to re-read $SITE from DB when course table is altered 2014-01-31 16:59:54 +08:00
Marina Glancy 97eb0e4473 MDL-33920 filepicker: hide 'save as' field when not applicable 2014-01-31 16:48:16 +08:00
Marina Glancy 4f6e4f8d86 weekly release 2.6.1+ 2014-01-31 14:11:19 +08:00
Marina Glancy 814a6297ec Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-31 14:11:18 +08:00
Petr Škoda 4d7f209923 MDL-43905 fix update of user login times
There needs to be only one event during user login.
The timemodified field is not supposed to be updated during login.
2014-01-31 10:07:20 +08:00
Gregory Faller 1d8d52cdd9 MDL-37714: Correctly identify frequently used comments during restore 2014-01-31 10:24:59 +10:30
Andrew Nicols c5609f6dc5 MDL-42928 Filepicker: Disable behat tests run by phantom
There seems to be a bug relating to overflow: hidden on the body tag in
some cases which is only showing for dialogues which belong to the
filepicker.

Disabling these for the moment as this issue may be related to MDL-43712
which is a work in progress.
2014-01-30 17:13:56 +08:00
Damyon Wiese e008e04db1 MDL-43805 assign: Behat test for quickgrading bug 2014-01-29 20:42:41 +08:00
Damyon Wiese 6b23bd16da MDL-43805 assign: Quickgrading wipes out grades for hidden columns.
Grr.. quickgrading will always be a hack.
2014-01-29 20:42:38 +08:00
Andrew Nicols 20a93a61db MDL-43885 Javascript: Make the [X] button work like 'No' in relevant dialogues
The [X] button on the dialogue is another form of the 'No' button and
should behave as such. In some dialogues this matters more than others
because the dialogue is destroyed.
2014-01-29 11:17:03 +08:00
Tim Hunt e82aee6895 MDL-43892 dbtransfer: Fix missing string. 2014-01-28 15:56:28 +00:00
Eloy Lafuente (stronk7) 04224a6dc7 Merge branch 'MDL-42928-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-28 12:22:56 +01:00
Ankit Agarwal 90ace35a9d MDL-43884 database: Fix get_tables() api for external stores 2014-01-28 16:54:35 +08:00
Kevin Wiliarty 414fcf2584 MDL-39942: invite only users who can post to discuss 2014-01-27 22:35:17 -05:00
Andrew Nicols c81672b56d MDL-42928 JavaScript: Disable lockScroll for small chooserdialogues 2014-01-28 09:50:45 +08:00
Andrew Nicols eb97871058 MDL-42928 JavaScript: Add LockScroll to all modal dialogues 2014-01-28 09:50:27 +08:00
Andrew Nicols d07b03422d MDL-42928 JavaScript: Create a module to handle page scroll locking 2014-01-28 09:50:11 +08:00
Eloy Lafuente (stronk7) 960dfcae59 Merge branch 'm26_MDL-43797' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-01-28 00:44:24 +01:00
David Curry 9eb88a59dd MDL-43797 lib/db/upgrade.php: Optimise sql for my_pages deletion
Change-Id: Ibf8da394e3357fdde351eac49627539eb412e247
2014-01-28 12:34:11 +13:00
Sam Hemelryk 9681639337 Merge branch 'MDL-43246_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-28 12:16:26 +13:00
Eloy Lafuente (stronk7) 115707c2b5 Merge branch '43688-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-28 00:00:16 +01:00
Eloy Lafuente (stronk7) d9613f122f Merge branch 'MDL-43874_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-27 23:53:33 +01:00
David Curry ade2c99109 MDL-43797 lib/db/upgrade.php: Remove custom pages for deleted users
Change-Id: Ief5ec1dd0930e55b6f0bf2e0d2caa3febec07b18
2014-01-28 11:30:00 +13:00
David Curry ee7d0bbfcf MDL-43797 lib/moodlelib.php: Remove custom homepages on user deletion
Change-Id: I43359a630c0b668ed3312828c15acc9cc220e49b
2014-01-28 11:27:40 +13:00
Eloy Lafuente (stronk7) 646f774a0f Merge branch 'MDL-43757_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-27 21:20:37 +01:00
Sam Hemelryk 83bfad45a5 Merge branch 'wip-MDL-43643-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-28 08:40:48 +13:00
Eloy Lafuente (stronk7) 408b3ee93f Merge branch 'wip-mdl-43765-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-27 19:23:35 +01:00
Eloy Lafuente (stronk7) 06b2987aad Merge branch 'wip-mdl-43766-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-27 19:20:02 +01:00
Eloy Lafuente (stronk7) 227164c9b6 Merge branch 'MDL-43773-MOODLE_26_STABLE' of https://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-01-27 17:22:49 +01:00
Eloy Lafuente (stronk7) ff04a96ba2 Merge branch 'MDL-43581_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-27 17:04:11 +01:00
Tim Hunt b006c3f9ff MDL-43874 quiz, teacher comments should respect display options.
Whether the comments on manually graded questions were visible to
students should have been controlled by the 'Specific feedback' Review
option in the quiz settings. However, the quiz was not setting
$displayoptions->manualcomment, so it did not work.
2014-01-27 12:26:59 +00:00
Eloy Lafuente (stronk7) 866bbb05f7 Merge branch 'wip-MDL-43800-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-27 12:02:36 +01:00
James Pratt b98bc5cb98 MDL-43369 : quiz statistics - average across attempts where item seen
and not across all attempts for subqs.
2014-01-27 17:37:39 +07:00
Tim Hunt b8e91060b1 MDL-43581 additionalhtmlfooter should be added to every page
Not just pages with a visible footer.
2014-01-27 10:26:02 +00:00
Eloy Lafuente (stronk7) 7a6ad10586 Merge branch 'MDL-43809_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-27 11:00:32 +01:00
AMOS bot e73eb478c4 Automatically generated installer lang files 2014-01-27 00:42:36 +00:00
Mark Nielsen 91e6e56014 MDL-43734: Prevent purging of all user session cache 2014-01-27 00:28:53 +01:00
Sam Hemelryk 250611b579 Merge branch 'w04_MDL-43746_m26_courselogin' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-27 11:32:25 +13:00
Sam Hemelryk 5ccfa40292 Merge branch 'MDL-43794_m26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-01-27 11:16:15 +13:00
Tony Butler bd538db810 MDL-43773 mod_choice: Swap order of name column headings in text export 2014-01-24 11:22:39 +00:00
Damyon Wiese e205c062b1 MDL-43593 Assign editpdf: More robust handling of errors from TCPDF.
This includes a check to see if there are 0 pages in the combined pdf,
catching exceptions and suppressing php warnings and errors from bad pdf files.

Also - Use TCPDF directly to check if pdfs are compatible. The previous check was
letting dodgy PDFs through which then failed at generation time. This way dodgy
pdfs will get run through ghostscript early and cleaned up.
2014-01-24 16:17:29 +08:00
David Monllao 9cb75a10bf MDL-43757 behat: Allowing the form field guesser to detect TinyMCE
It includes 2 more minor fixes:
- Escapes values sent to TinyMCE as it was breaking
  when values contained double quotes.
- Adding seconds to the screenshots directory to
  avoid using the same folder for multiple runs.
2014-01-24 15:12:18 +08:00
David Monllao c18481fab8 MDL-43757 messaging: Behat feature to test participants messaging
The new test checks that messages can be sent from
the participants block and they can be read when
accesing user's recent conversations.
2014-01-24 15:12:12 +08:00
Petr Skoda c22d036916 MDL-43746 fix require_course_login regression caused by MDL-25981 2014-01-24 13:51:54 +08:00
Russell Smith cac73cf1ec MDL-43440 unit testing: Use cmid in unit tests when it should be used.
instance is has been used instead of cmid.  This works as all id's are 1
in most cases, but not always.

accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.

Conflicts from extra tests in master:
	blocks/comments/tests/events_test.php
	mod/assign/submission/comments/tests/events_test.php
	mod/data/tests/lib_test.php
	mod/glossary/tests/events_test.php
2014-01-24 14:56:53 +11:00
AMOS bot d4f1027e54 Automatically generated installer lang files 2014-01-24 00:42:09 +00:00
Jason Fowler a4ea4e2b1a MDL-40786 User profile: Fixing narrow screen RTL collapse 2014-01-24 08:38:27 +08:00
Nadav Kavalerchik d86801bed7 MDL-40786 User Profile: Right align profile fields in RTL mode (theme/bootstrapbase, theme/clean) 2014-01-24 08:38:23 +08:00
Sam Hemelryk a3e2211c5f MDL-43688 dndupload: fixed positioning across themes 2014-01-24 09:52:40 +13:00
Tim Hunt 8b080d52ff MDL-43809 qformat_xml messes up $s in multianswer questions. 2014-01-23 15:19:13 +00:00
Tim Hunt 68575baff3 MDL-43246 question engine: avoid order-by id.
This was breaking with oracle master/master replication. Fortunately all
the places that needed to be changed were private to datalib.php. There
is still some ordering by id there, but only places where we want a
consitent, rather than meaningful, order, so that is OK.

The queries changed by this patch all have subqueries in aggregate
queries that pull out the latest step for a question_attempt. Those
queries used to look for MAX(id) but now they look for
MAX(sequencenumber). This is equivalent (for databases where ids always
increase with time, except for auto-saved steps. In the past,  an
auto-saved step might have been considered latest. Now the latest step
will always be one that has been properly processed. You can aruge that
this change is an improvement. Anyway, it is a moot point. All these
queries are only used in reports which are run on completed attempts,
where there will not be any autosaved data.
2014-01-23 15:18:56 +00:00
Tim Hunt 7e71efabf9 MDL-43246 some question data mapper unit tests
With fixes for the issues unearthed by these tests.
2014-01-23 15:18:55 +00:00
Tim Hunt 4caa3de6db MDL-43246 give unit tests class a better name. 2014-01-23 15:18:55 +00:00
Eloy Lafuente (stronk7) b88bb98ab7 weekly release 2.6.1+ 2014-01-23 12:38:43 +01:00
Eloy Lafuente (stronk7) fc27206268 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-23 12:38:39 +01:00
Marina Glancy 929b5b3210 MDL-43643 chat: do not assign to nonexisting cm_info properties 2014-01-23 11:00:33 +08:00
Marina Glancy 9b4e4b7f64 MDL-43800 course: groupings are sorted alphabetically 2014-01-23 09:07:54 +08:00
Eric Merrill ff71f55265 MDL-43794 Files API Set the mtime of files to extraction time.
The restore cleanup code expects the mtime to be the time of extraction
not the mtime before archiving. If set to the old mtime, the restore
files may be cleaned up before the restore is complete.

This behaviour also matches the behaviour of the zip unpacker.
2014-01-22 11:07:07 -05:00
Dan Poltawski 8f89ca5780 Merge branch 'MDL-41506-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 23:29:25 +08:00
Dan Poltawski 32418eeee0 Merge branch 'mdl34020-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-01-21 15:21:20 +08:00
Dan Poltawski 0469922b5f Merge branch '43714-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-21 14:49:27 +08:00
Dan Poltawski 1cbda6fabd Merge branch 'MDL-43760-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-01-21 14:28:52 +08:00
Damyon Wiese eef0d3043c Merge branch 'MDL-43725-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-01-21 13:55:49 +08:00
Dan Poltawski 1f77f14fb9 Merge branch 'wip-MDL-43700-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-01-21 12:24:41 +08:00
Dan Poltawski 574111a94e Merge branch 'MDL-43717_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-21 12:19:36 +08:00
Dan Poltawski 66b74e5aa5 Merge branch 'MDL-43693-MOODLE_26_STABLE' of https://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-01-21 11:21:54 +08:00
Rajesh Taneja 81efab0cbb MDL-43765 reports: Fixed addtional name warning
Fix the alternate name warning which is generated when course participation report
is viewed
2014-01-21 11:00:45 +08:00
Damyon Wiese 9717c4b19c Merge branch 'MDL-41688-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 09:37:04 +08:00
Damyon Wiese d6d18a2b7b Merge branch 'MDL-43732_m26' of github.com:merrill-oakland/moodle into MOODLE_26_STABLE 2014-01-21 09:29:40 +08:00
Eloy Lafuente (stronk7) 8d8e51b073 Merge branch 'wip-MDL-43333-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-21 02:01:35 +01:00
Eric Merrill 2d73ec85ea MDL-43732 quiz Fix styles so that question div doesn't overlap controls. 2014-01-20 19:57:10 -05:00
Eloy Lafuente (stronk7) b61b21d7ee Merge branch 'wip-MDL-43211-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-21 01:54:09 +01:00
Eloy Lafuente (stronk7) a45dbb214b Merge branch 'MDL-43401-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 01:46:54 +01:00
Eloy Lafuente (stronk7) f973e5f968 Merge branch 'MDL-43480_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-21 01:44:45 +01:00
Eloy Lafuente (stronk7) 3e1eb36d77 Merge branch 'MDL-41693-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 01:13:54 +01:00
Eloy Lafuente (stronk7) 3677e0c1aa Merge branch 'MDL-39684-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:20:51 +01:00
Eloy Lafuente (stronk7) 133e38fdbb Merge branch 'MDL-40533-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-21 00:17:39 +01:00
Eloy Lafuente (stronk7) 7c5074ce82 Merge branch 'MDL-43743_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-21 00:05:11 +01:00
Eloy Lafuente (stronk7) a7029b542e Merge branch 'MDL-41362-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:02:11 +01:00
Frederic Massart ff66e9daa8 MDL-41767 themes: Support for parent-specific sheets in plugins 2014-01-20 13:31:58 +01:00
Frederic Massart b12cc0679f MDL-41688 gradebook: Improved grading layout on bootstrapbase themes 2014-01-20 10:43:10 +01:00
Tony Butler cfd4b8a3f5 MDL-43632 mod_feedback: Use SSL for reCAPTCHA API request if Moodle is using it 2014-01-20 17:14:38 +08:00
Rajesh Taneja ee7bb53ccd MDL-43766 reports: Fixed wrong string variable 2014-01-20 16:47:01 +08:00
Dan Poltawski 5f074a6bb0 Merge branch 'wip-MDL-41062-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-20 15:29:21 +08:00
Dan Poltawski 4f02d0074a Merge branch '42682-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-20 15:25:49 +08:00
Dan Poltawski 1605660ad2 Merge branch 'MDL-43690_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-20 14:24:44 +08:00
Damyon Wiese 62415470ae MDL-43760 Potential fix for fletcher scott issues with fullname. 2014-01-20 13:39:19 +08:00
Damyon Wiese e35e70f83d Merge branch 'MDL-42495-m26' of git://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-01-20 13:21:34 +08:00
Dan Poltawski 8a073e4364 Merge branch 'MDL-42980_m26' of git://github.com/rwijaya/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 12:56:20 +08:00
Marina Glancy 8de9100136 MDL-41062 gradebook: corrections to grade_item upgrade script, more tests 2014-01-20 12:25:56 +08:00
Damyon Wiese b53af0f2a6 Merge branch 'MDL-39683-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 11:29:21 +08:00
Damyon Wiese 5b860c69a2 Merge branch '43675-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-20 10:56:34 +08:00
Dan Poltawski 37b0d3adad Merge branch 'MDL-43671_message_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-20 10:53:53 +08:00
Dan Poltawski da2e9d519b Merge branch 'MDL-40139-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-20 10:33:38 +08:00
Ankit Agarwal 6cfed595c9 MDL-43725 report_loglive: Fixing undefined variable error
AMOS BEGIN
 CPY [page,report_log],[page,report_loglive]
AMOS END
2014-01-20 10:23:55 +08:00
Damyon Wiese df25d33379 Merge branch 'MDL-43733_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-20 10:13:54 +08:00
Andrew Davis 9fade08632 MDL-43671 message: removed an overly cautious check 2014-01-20 10:06:27 +08:00
Dan Poltawski e53eb2a208 Merge branch 'wip-mdl-43306-m26' of git://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-20 09:45:44 +08:00
David Monllao 2998a4cb30 MDL-43743 mod_scorm: Adding package disclaimer
As the package is licensed under CC 3.0 we should
be compliant with attribution.
2014-01-20 09:32:17 +08:00
Dan Poltawski 0b8749c892 Merge branch 'MDL-40752-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 09:26:12 +08:00
AMOS bot e1882ddaef Automatically generated installer lang files 2014-01-20 00:41:22 +00:00
AMOS bot bb2e1de1c2 Automatically generated installer lang files 2014-01-19 00:41:56 +00:00
Tim Hunt 4c4fc6d629 MDL-43733 use any auto-saved responses when questions are finished.
Before this, autosave was only working to save data when a student went
back in to continue an attempt. If the student, having crashed out,
never went back in and continued the attempt, their auto-saved responses
were not used when the attempt was automatically finished. That was a
rather bad oversight, which should now be fixed.
2014-01-17 17:17:49 +00:00
Tim Hunt 217d839ded MDL-43690 quiz_question_tostring missing s().
This meant that the edit quiz page sometimes had invalid HTML.
2014-01-17 10:47:00 +00:00
David Monllao cd554c4287 MDL-43743 behat: Lightweight scorm package
The previous used package were adding a second iframe
inside the scorm iframe and was slow loading it;
this patch replaces it for a simple one without any
extra iframe.
2014-01-17 17:43:25 +08:00
Dan Poltawski 15fac63956 MDL-41062 gradebook: remove sortorder duplicates
* Upgrade function to remove duplicates from the grade item duplicates
  column. Duplicates were causing sorting to fail in some cases.
* Add some unit tests which simulate sort order duplicate data and
  verify that they have been removed.
2014-01-17 17:36:37 +08:00
rwijaya dc842aaa36 MDL-42980 clean theme: fixed add/cancel buttons position for safari on iPhone with ios7. 2014-01-17 16:14:14 +08:00
David Monllao ef967ae424 MDL-43480 behat: Adding @_file_upload and @_alert tags
Keeping the previous @_only_local and @_alerts as
this is a stable branch.
2014-01-17 10:42:22 +08:00
David Monllao 8279060aca MDL-43480 behat: Removing @_only_local tags from steps where it is not necessary 2014-01-17 10:42:22 +08:00
David Monllao 2ab17fbdeb MDL-43717 behat: Replacing 2050 for a date eariler than the max timestamp 32bit limit
All credit goes to Michael de Raadt.
2014-01-17 10:37:27 +08:00
AMOS bot 4a45541511 Automatically generated installer lang files 2014-01-17 00:48:06 +00:00
Sam Hemelryk 9b93e7b472 MDL-43714 blocks: fixed notice when moving to an empty region 2014-01-17 10:47:23 +13:00
Sam Hemelryk aafc6872e4 MDL-43675 navigation: courses branch is now recognised as expandable 2014-01-17 10:27:05 +13:00
Sam Hemelryk d073c81248 MDL-42682 theme_bootstrapbase: fixed styling of discussion selector
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-17 10:25:26 +13:00
Sam Hemelryk 74aa973e8e MDL-42682 theme_bootstrapbase: fixed forum search alignment
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-17 10:25:24 +13:00
Eloy Lafuente (stronk7) 9c1c9d8954 weekly release 2.6.1+ 2014-01-16 18:51:19 +01:00
Eloy Lafuente (stronk7) 40e8488c8d Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-16 18:51:14 +01:00
AMOS bot 9a57b4bc0b Automatically generated installer lang files 2014-01-16 00:43:16 +00:00
Eloy Lafuente (stronk7) ba541f01b6 Merge branch 'm26_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-01-15 22:02:29 +01:00
Dan Marsden 64156342ad MDL-43222 SCORM: Fix invalid sql 2014-01-16 09:49:36 +13:00
Rajesh Taneja ebc09cc3ad MDL-43306 restore: Fix grade_item sortorder after restoring course
While restoring course/activity, restore will blindly insert grade_item
sortorder. Which cause dulicate sortorder and lead to unpredicatble sorting
results.

Now we will call grade_item::fix_duplicate_sortorder() after restore is finished
to fix duplicate sortorder and order grade items to the closest order possible
2014-01-15 13:31:57 +08:00
Damyon Wiese 5af6a32866 Merge branch 'MDL-43621_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-01-15 13:30:58 +08:00
Adrian Greeve cbfbe43604 MDL-43700 reports: Update to the sql in the comment locallib to include additional name fields. 2014-01-15 12:05:40 +08:00
Yuliya Bozhko f0040e7daf MDL-43621 badges: Fix has_awards() result when deleted users are the only recipients of a badge 2014-01-15 16:25:48 +13:00
Eloy Lafuente (stronk7) 893139fd12 Merge branch 'MDL-43439_26-dateformat' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-15 04:01:11 +01:00
Damyon Wiese f5d810b4f3 Merge branch 'MDL-43461_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-15 09:38:46 +08:00
David Monllao e5ee31453a MDL-43439 behat: Dir date without - separators 2014-01-15 09:18:55 +08:00
Dan Poltawski 05297cc0a8 Merge branch 'MDL-43619-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-01-15 08:20:39 +08:00
Eloy Lafuente (stronk7) 66e46b4859 Merge branch 'MDL-43439_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-15 00:11:18 +01:00
Yuliya Bozhko 4768a4768b MDL-43621 badges: Don't count deleted users as badge recipients 2014-01-15 09:57:26 +13:00
Yuliya Bozhko b4918e7d8a MDL-43621 badges: Don't display deleted users in badge recipients list 2014-01-15 09:54:19 +13:00
Eloy Lafuente (stronk7) 65e9de16c2 Merge branch 'wip-MDL-31597-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-01-14 21:49:37 +01:00
Frederic Massart 1e8b6e0087 MDL-40533 block_html: Remove styles specific to the block 2014-01-14 19:07:22 +01:00
Ruslan Kabalin 9d649ad7a3 MDL-43693: assignment: Fix JS error on grading page. 2014-01-14 16:14:41 +00:00
Eloy Lafuente (stronk7) ff48f6f0e7 Merge branch 'MDL-43332_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-01-14 16:53:40 +01:00
Eloy Lafuente (stronk7) f5191afd30 Merge branch 'm26_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-01-14 16:45:38 +01:00
sam marshall a6a14f2155 MDL-43619 Roles: reset_role_capabilities unit test, cache fix 2014-01-14 13:47:38 +00:00
sam marshall bf2c42e8ee MDL-43619 Roles: reset_role_capabilities function destroys overrides 2014-01-14 13:47:37 +00:00
Frederic Massart b31c53a372 MDL-41506 theme_bootstrapbase: Implement highlight class 2014-01-14 11:24:10 +01:00
Dan Poltawski f9d14c4cd7 Merge branch 'MDL-43664-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-14 16:50:09 +08:00
Dan Poltawski 79c8b9fcae Merge branch 'm26_MDL-43577_Incorrect_Variable_Expansion' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-14 15:58:12 +08:00
Dan Poltawski 33d83d755a Merge branch 'MDL-43642_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-14 15:48:52 +08:00
Dan Poltawski 4a2ac9676a Merge branch 'm26_MDL-43575_Typo_In_The_Overridden_setOption' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-14 15:37:04 +08:00
Dan Poltawski 30354dc0d2 Merge branch 'MDL-43178_forum_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-14 15:26:52 +08:00
David Monllao e906a85cc3 MDL-43439 behat: Save the screenshots to the specified location 2014-01-14 15:24:09 +08:00
Damyon Wiese 7b0e78bf83 Merge branch 'w02_MDL-43511_m26_bankcache' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-14 14:29:34 +08:00
Damyon Wiese 24607ba326 Merge branch 'MDL-43371-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-14 14:05:27 +08:00
Damyon Wiese eb8f1fef79 Merge branch 'MDL-43460-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-14 13:33:30 +08:00
Damyon Wiese 5a0cf2cda0 Merge branch 'w02_MDL-43488_m26_signreq' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-14 13:18:35 +08:00
David Monllao 58dd0d506e MDL-43461 testing: Avoid switching to .bat files when running MinGW
MinGW can not execute .bat files (http://sourceforge.net/p/mingw/bugs/1902)
so we should not switch to .bat files when running MinGW.
2014-01-14 13:14:40 +08:00
David Monllao 22a09b7d40 MDL-43461 behat: Using linux-style directory separators when using cygwin 2014-01-14 13:14:14 +08:00
Damyon Wiese 020705cca0 Merge branch 'MDL-43610-m26' of git://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-01-14 12:37:17 +08:00
Adrian Greeve e5eddec0b7 MDL-31597 gradebook: Update to gradebook behat tests to include testing grade weightings. 2014-01-14 11:48:36 +08:00
Adrian Greeve 7269154b44 MDL-31597 gradebook: Removed the percentage symbol from weights in the gradebook. 2014-01-14 11:48:12 +08:00
Dan Poltawski 1e65c37e97 Merge branch 'm26_MDL-42792' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-01-14 11:28:44 +08:00
Dan Poltawski b3eacbd5da Merge branch 'MDL-43412_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-14 10:46:34 +08:00
Andrew Nicols 56f0dc64ed MDL-43664 Javascript: Use YUI indexOf for pending_js tracking
Some old browsers do not support indexOf and so cannot determine whether JS
script is in progress. The YUI Y.Array module polyfills the indexOf
functionality when it does not exist.
2014-01-14 10:40:39 +08:00
Nadav Kavalerchik f4075b7127 MDL-40752 Login RTL: Swapping the panels on two-panel login pages for RTL
Additions to the patch made by Jason Fowler <phalacee@gmail.com>
2014-01-14 09:23:46 +08:00
AMOS bot 1b696dcde0 Automatically generated installer lang files 2014-01-14 00:45:37 +00:00
Mark Nelson 0deddeed2f MDL-43332 core_grades: automated basic grade viewing functionality performed in MDLQA-317 2014-01-13 15:48:12 -08:00
Eloy Lafuente (stronk7) 8c75f05721 Merge branch 'MDL-43109_26' of https://github.com/mdikih/moodle into MOODLE_26_STABLE 2014-01-13 21:51:54 +01:00
Matteo Scaramuccia fc33a35857 MDL-43575 Libraries Google_CurlIO ext, typo in the overridden setOption(). 2014-01-13 21:34:48 +01:00
Matteo Scaramuccia 5725c1850f MDL-43577 Messages Incorrect variable expansion in the message template. 2014-01-13 21:11:09 +01:00
Frederic Massart c7d4465070 MDL-41362 theme_bootstrapbase: Alignment of User Selector controls 2014-01-13 18:41:32 +01:00
Frederic Massart b4eed40953 MDL-39684 theme: RTL align of restrictions label in file manager 2014-01-13 16:27:52 +01:00
Frederic Massart 08a491e16d MDL-39683 message: RTL alignment of messages in theme_base 2014-01-13 15:41:30 +01:00
Nadav Kavalerchik 53a26c87d6 MDL-39683 Messages, Themes: Fix "my" and "other person" message alignment in RTL mode (theme/clean) 2014-01-13 15:29:53 +01:00
Dan Poltawski a377868a50 Merge branch 'MDL-40849-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-13 15:50:34 +08:00
Frederic Massart 7e343b7304 MDL-40849 gradingform_guide: Fixed CSS issues with Bootstrapbase 2014-01-13 08:12:18 +01:00
Dan Poltawski 4d2984c136 Merge branch '43598-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 12:37:26 +08:00
Dan Poltawski 6719aa5ec5 Merge branch 'MDL-39603-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 12:34:58 +08:00
Dan Poltawski d9dcb97bbe Merge branch '41226-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 11:11:12 +08:00
Dan Poltawski 51bced46a7 Merge branch '40821-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 11:03:37 +08:00
Dan Poltawski a893680091 Merge branch '40693-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-13 10:07:54 +08:00
Dan Poltawski 67a75acaff Merge branch 'MDL-41152-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 10:03:47 +08:00
Sam Hemelryk 6060234de5 MDL-40205 theme: fixed overflow of block headers
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:41:25 +08:00
Dan Poltawski 892173b3f3 Merge branch 'MDL-40705-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:36:12 +08:00
Dan Poltawski bc7a77f14d Merge branch 'MDL-39661-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-13 08:54:23 +08:00
Sam Hemelryk a2fb18da50 MDL-43598 dialogue: fixed bug with render procedure
Conflicts:
	lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-01-13 08:25:42 +13:00
Sam Hemelryk cdd7fe6a48 MDL-40821 theme_bootstrapbase: fixed positioning of profile controls
Conflicts:
	theme/bootstrapbase/style/moodle.css

Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 08:17:12 +13:00
Sam Hemelryk fe7bf6425a MDL-40821 theme_bootstrapbase: show the current lang in the menu 2014-01-13 08:16:04 +13:00
Sam Hemelryk 495a02bb5a MDL-40693 theme_bootstrapbase: changed navbar separator to official separator 2014-01-13 08:15:39 +13:00
Petr Škoda a27c1faa9f MDL-43488 remoe city and country requirement from signup
This was supposed to be part of MDL-28558.
2014-01-12 18:23:56 +08:00
Petr Škoda 6b4ae63ac8 MDL-43511 do not cache the MUC cache in question code 2014-01-12 18:21:29 +08:00
Eloy Lafuente (stronk7) 0e088aec08 Moodle release 2.6.1 2014-01-11 15:57:34 +01:00
Eloy Lafuente (stronk7) 378240d57d MDL-43646 "disapprove" changed to "undo approval" 2014-01-10 19:55:23 +01:00
Eloy Lafuente (stronk7) d339d41274 MDL-43590 move unapprove to undo approval 2014-01-10 18:55:17 +01:00
Michael Aherne 4b6c90cb17 MDL-46310 assign Prevent blind marking submission notification email being sent to noreplyemail address 2014-01-10 16:03:17 +00:00
Frederic Massart 543397a50d MDL-40139 block_privatefiles: Prevent usage of unmaintained edit page 2014-01-10 13:01:56 +01:00
Frederic Massart 0047b06264 MDL-41693 group: Use standard layout for group related pages 2014-01-10 12:29:56 +01:00
Damyon Wiese 134462ae28 MDL-43439: Behat - new $CFG param - behat_screenshot_after_failure 2014-01-10 17:56:04 +08:00
David Monllao 52a027398e MDL-43642 behat: Setting the correct files @package 2014-01-10 17:47:49 +08:00
Eloy Lafuente (stronk7) 02b5deb65a Merge branch 'MDL-43590-en_fix_26' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-01-10 10:10:27 +01:00
Dan Marsden e71ac727e3 MDL-43222 SCORM: correct check for list of attempts and make correct check for current attempt in scorm_get_toc 2014-01-10 22:04:54 +13:00
Dan Marsden 8c5dd5e5eb MDL-42792 SCORM: Prevent JS error when network connection fails. - return false to SCORM package so that issue can be detected and reported. 2014-01-10 21:06:39 +13:00
Damyon Wiese 704ecfea00 weekly release 2.6+ 2014-01-10 14:20:58 +08:00
Damyon Wiese 8aaad0d2b6 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-10 14:20:52 +08:00
Marina Glancy 0078652172 MDL-43333 blocks: move activity icon in social and main menu 2014-01-10 12:09:09 +08:00
Eloy Lafuente (stronk7) 8d5b7ed598 MDL-36721 make upgrade queries cross-db 2014-01-10 11:20:52 +08:00
Andrew Davis b4de89cc95 MDL-43178 mod_forum: fixed the digest setting confirmation message 2014-01-10 08:42:21 +08:00
Eloy Lafuente (stronk7) d9aa7cbb6f Merge branch 'wip-MDL-43283-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-09 23:07:52 +01:00
Frederic Massart 750f660990 MDL-43401 mod_lesson: Fix serving of the pluginfile mediafile 2014-01-09 16:56:06 +01:00
Frederic Massart 7e3c5c34d6 MDL-43371 mod_lesson: Remove files upon page or module deletion 2014-01-09 16:23:17 +01:00
Frederic Massart 9a093f57a1 MDL-41152 theme_bootstrapbase: Optimise width for gradebook tree view 2014-01-09 10:44:40 +01:00
Marina Glancy 69d44a56fe MDL-43211 blocks: style edit icons in main menu and social activities 2014-01-09 17:29:30 +08:00
Marina Glancy 41391dfd9d MDL-43211 course: do not return indent icon if not needed 2014-01-09 17:29:25 +08:00
Marina Glancy 61d35d7b9d MDL-43283 mod_chat: corrected SQL query to follow strict groupping rules 2014-01-09 15:38:29 +08:00
AMOS bot 963e29f6b2 Automatically generated installer lang files 2014-01-09 00:42:12 +00:00
Helen Foster 8772689453 MDL-43590 Merge English strings from the en_fix language pack 2014-01-09 01:11:59 +01:00
Tim Hunt 4cbc5af3a6 MDL-43412 quiz with grade period and password did not work.
Once the attempt became overdue, it was impossible to get in to submit
it because of a redirect loop. This fix resovles that loop, so the
student can enter their password and get in.
2014-01-08 18:00:56 +00:00
Andrew Nicols 5cf42ac843 MDL-40119 Forms: Remove cursor style override for calendar button 2014-01-08 11:14:37 +01:00
Frederic Massart bc936e8ac8 MDL-39603 theme_bootstrapbase: Alignment of filter form elements on enrol page 2014-01-08 10:45:13 +01:00
David Monllao 5bb7f7e0dc MDL-43423 behat: Increasing the timeout to 6 seconds 2014-01-08 09:56:10 +01:00
Dan Poltawski 135634fbd3 Merge branch 'wip-MDL-43606-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-08 14:33:11 +08:00
Marina Glancy 6f70004a0d MDL-43606 tinymce_managefiles: bump version
to allow smooth upgrade from contributed plugin in 2.5
2014-01-08 13:57:54 +08:00
Dan Poltawski d99f765ee6 Merge branch 'MDL-43595-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-01-08 11:34:48 +08:00
Damyon Wiese 87f4750d75 MDL-43595: The dropdowns for editpdf stopped working due to a recent change. 2014-01-08 09:20:04 +08:00
Eloy Lafuente (stronk7) a3fa0ca96f Merge branch 'MDL-40119-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-08 02:17:42 +01:00
Eloy Lafuente (stronk7) 895e16ff28 Merge branch 'w01_MDL-42797_m26_admin' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-08 02:10:36 +01:00
Eloy Lafuente (stronk7) 93073173ce Merge branch 'MDL-43423_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-08 02:02:56 +01:00
Eloy Lafuente (stronk7) 5c283bb713 Merge branch 'wip-MDL-42310-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-01-08 01:52:12 +01:00
Dan Poltawski e86b3c7335 Merge branch 'MDL-43173_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-08 08:21:09 +08:00
Eloy Lafuente (stronk7) 52d8541b5b Merge branch 'm26_MDL-43508_Invalid_String_Identifier' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-08 00:46:13 +01:00
Eloy Lafuente (stronk7) 99a57908f5 Merge branch 'MDL-42607_rss_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-08 00:42:45 +01:00
Eloy Lafuente (stronk7) ebe415f889 Merge branch 'MDL-42392-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-08 00:33:48 +01:00
Eloy Lafuente (stronk7) f0d61c012d Merge branch 'MDL-43451-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-07 23:38:28 +01:00
Dan Poltawski d829440fed Merge branch 'w01_MDL-43510_m26_test404' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-07 17:26:01 +08:00
Dan Poltawski e57bc1637c Merge branch 'm26_MDL-43482_Lot_Of_Passed_By_Reference_Messages' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-07 17:20:49 +08:00
Damyon Wiese 708e0804b8 Merge branch 'w01_MDL-43585_m26_userlib' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-07 13:33:53 +08:00
Damyon Wiese 3a8e16ecab Merge branch 'MDL-43411-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-07 12:52:49 +08:00
Dan Poltawski 9fe6a6f42b Merge branch 'm26_MDL-40379_Prevent_Some_Mobile_Network_Providers_From_Modifying_Content' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-07 12:43:29 +08:00
Petr Škoda 7f5a384c99 MDL-43585 remove incorrect user/lib.php include 2014-01-07 12:16:34 +08:00
Dan Poltawski 836399115b Merge branch 'MDL-42995-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-07 11:51:18 +08:00
Dan Poltawski adb28ab708 Merge branch 'wip-mdl-43521-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-07 11:08:28 +08:00
Rajesh Taneja c783a874f0 MDL-42643 course: Member in same group should only loginas
If course groupmode is set to SEPARATEGROUPS, and user doesn't have
site:accessallgroups capability than only allow user to loginas if
current user is in same group as loginas user
2014-01-07 11:05:27 +08:00
Dan Poltawski 883ea035af Merge branch 'MDL-43394a-26' of https://github.com/srynot4sale/moodle into MOODLE_26_STABLE 2014-01-07 11:00:12 +08:00
Tony Butler c56a930df8 MDL-43373 core_enrol: Display enrolments dimmed if outside of start or end times 2014-01-07 10:44:29 +08:00
Damyon Wiese 28abbabae5 Merge branch 'MDL-43448_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-07 09:22:15 +08:00
AMOS bot 2010db2cd4 Automatically generated installer lang files 2014-01-07 00:41:52 +00:00
Frederic Massart bf6527407d MDL-40705 theme_bootstrapbase: Handling of long words in block content 2014-01-06 15:45:19 +01:00
Frederic Massart 2424069da2 MDL-39661 blocks: Removed notice when moving a block 2014-01-06 12:44:23 +01:00
Frederic Massart 8d1293da86 MDL-43460 calendar: Decode event description links on restore 2014-01-06 11:46:56 +01:00
Frederic Massart 396b5cc75b MDL-42995 mod_assign: Extended tests for update_calendar method 2014-01-06 10:32:06 +01:00
Frederic Massart 49a9cc9bd1 MDL-42995 mod_assign: Remove files from calendar event description 2014-01-06 10:32:00 +01:00
Frederic Massart 5bf8b2e969 MDL-42995 libraries: Global function to strip pluginfile content 2014-01-06 10:31:48 +01:00
Damyon Wiese 9ce83d0908 Merge branch 'MDL-43399-26' of git://github.com/mouneyrac/moodle into MOODLE_26_STABLE 2014-01-06 16:14:02 +08:00
Damyon Wiese 0f399f7f74 Merge branch 'MDL-43454-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-06 15:52:17 +08:00
Damyon Wiese 5726fe6263 Merge branch 'w01_MDL-36721_m26_passlog' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-06 14:51:16 +08:00
Dan Poltawski e3e938b861 Merge branch '43349-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-06 14:21:45 +08:00
Rajesh Taneja 3dd7b4f805 MDL-42883 Administration: Check sessionkey before taking action on user profile fields 2014-01-06 13:58:59 +08:00
Tony Butler cf3f46344e MDL-43408 gradereport_grader: Display users with expired enrolments as inactive in grader report 2014-01-06 10:38:13 +08:00
Sam Hemelryk 0cb1903bfd Merge branch 'MDL-35973_redirect_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-06 11:28:25 +13:00
Sam Hemelryk 8571b889f3 Merge branch 'MDL-43281-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-06 11:22:09 +13:00
Sam Hemelryk ec9f2a7d3f Merge branch 'MDL-42212-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-06 10:30:13 +13:00
Sam Hemelryk 97e9098927 Merge branch 'MDL-42801-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-06 10:20:39 +13:00
Andrew Davis 44b74479cb MDL-35973 lib: added a page title to redirect() and added 2 seconds to the page redirection when posting in a forum 2014-01-05 20:08:05 +08:00
AMOS bot 6a4e20e239 Automatically generated installer lang files 2014-01-04 00:51:51 +00:00
David Monllao adf125a30b MDL-43173 behat: Thowing an exception if the JS is not ready 2014-01-03 11:29:56 +08:00
Rajesh Taneja 3db84ae082 MDL-43521 block_admin_bookmarks: Site admin node is of type TYPE_SITE_ADMIN
Since 2.6 Site admin node is of type TYPE_SITE_ADMIN, previously it was TYPE_SETTING
2014-01-03 10:47:39 +08:00
Michael Milette 025000a221 MDL-42310 feedback mod - Enable filtering of multichoice and multichoice rated controls
Conflicts:
	mod/feedback/item/multichoice/lib.php
	mod/feedback/item/multichoicerated/lib.php

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-01-03 10:30:11 +08:00
Andrew Davis a90069245d MDL-42607 mod_forum:fixed some inefficiencies in forum RSS generation 2014-01-02 10:50:54 +08:00
Petr Škoda ddc72f06ef MDL-42797 require real user login on upgrade settings page 2014-01-02 09:17:38 +08:00
Sam Hemelryk 55f4cb7299 MDL-43349 cache: init now checks store requirements are met 2014-01-02 09:22:42 +13:00
Petr Škoda 9d904936c8 MDL-42797 require real user login on admin page 2014-01-01 15:19:34 +08:00
Andrew Nicols 560672aaa1 MDL-43451 Cron: Retrieve additional name fields when creating passwords 2014-01-01 02:25:42 +08:00
Andrew Nicols 5aee2507d4 MDL-43281 Blocks: Retrieve a newly created block after creating it
Although we were previously creating the DOM markup for a block region if
it did not exist, we were not making use of it.

This change ensures that we make use of that block region as part of the
blocks code.
2014-01-01 02:20:15 +08:00
Andrew Nicols 1f5b61e1db MDL-40119 Forms: Date selector should use images for the calendar popup toggle
The calendar popup toggle must use an image, rather than an input with type
of image as the latter is actually a form of submit button, and hence it
steals the focus away from the real submit button.
2013-12-30 15:54:42 +08:00
AMOS bot c15270df73 Automatically generated installer lang files 2013-12-30 00:43:23 +00:00
Petr Škoda 5e10746ae7 MDL-43510 fix 404 unit test server incompatibility 2013-12-29 15:29:30 +08:00
AMOS bot 84510e3b82 Automatically generated installer lang files 2013-12-29 00:43:25 +00:00
Matteo Scaramuccia a9df6656b8 MDL-40379 Files Prevent mobile network providers from modifying content. 2013-12-28 14:02:18 +01:00
Matteo Scaramuccia b33cc5d748 MDL-43508 Quiz Invalid get_string() identifier. 2013-12-28 11:21:36 +01:00
Andrew Nicols 74b0aca7eb MDL-42801 JavaScript: Fix dndupload to match actual style 2013-12-28 09:15:27 +08:00
Andrew Nicols e9ca5e144c MDL-42392 Blocks: Do not hide blocks if JS is disabled
With JS disabled, it is not possible to change the block visibility
user preference and therefore not possible to show content which was
hidden.

Since the block hiding functionality is a nicety, and we have no controls
to show and hide the blocks when JS is disabled, we should instead show the
block content regardless of the user preference.
2013-12-28 08:42:02 +08:00
Petr Škoda be6128fcd5 MDL-36721 do not store passwords in config logs 2013-12-27 11:18:50 +08:00
Petr Škoda 424c3248c7 MDL-43196 do not load file management for guests and when not managing files 2013-12-27 11:12:33 +08:00
AMOS bot 81de3795fa Automatically generated installer lang files 2013-12-25 00:42:49 +00:00
Matteo Scaramuccia f29b93ad61 MDL-43482 Chat Lot of "Only variables should be passed by reference". 2013-12-24 11:06:22 +01:00
Sam Hemelryk e71a5333a3 weekly release 2.6+ 2013-12-24 17:17:49 +13:00
Sam Hemelryk 910dc3393c Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2013-12-24 17:17:46 +13:00
Sam Hemelryk 5ac473e356 Merge branch 'wip-MDL-41788_M26_3' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2013-12-24 12:52:02 +13:00
Eloy Lafuente (stronk7) 93b6f3c79e Merge branch 'w52_MDL-43314_m26_floats' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-24 00:46:12 +01:00
Sam Hemelryk 10beedc18f Merge branch 'MDL-41246-moodle26' of git://github.com/StudiUM/moodle into MOODLE_26_STABLE 2013-12-24 11:41:32 +13:00
Sam Hemelryk 83797afa91 Merge branch 'MDL-43438-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-12-24 11:23:06 +13:00
Sam Hemelryk d3220e229e Merge branch 'MDL-43250-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-24 10:44:04 +13:00
Sam Hemelryk f2b1768da6 Merge branch 'MDL-43410-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-24 09:12:47 +13:00
AMOS bot e200f7a382 Automatically generated installer lang files 2013-12-23 12:40:11 +00:00
AMOS bot 2d92ee0ad5 Automatically generated installer lang files 2013-12-23 12:26:27 +00:00
Aaron Barnes a6cf46f473 MDL-43394 behat: Fix checkbox action 2013-12-23 16:00:06 +13:00
Sam Hemelryk 1c5052e29f Merge branch 'MDL-35032-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-12-23 15:57:49 +13:00
Andrew Nicols 5c7d7dec73 MDL-43411 JavaScript: Correct checks for section support to use helper function 2013-12-23 09:45:24 +08:00
Sam Hemelryk 61dde025a1 Merge branch 'MDL-30195-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-12-23 14:35:07 +13:00
Sam Hemelryk b10fec1750 Merge branch 'w52_MDL-43367_m26_contextpath' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-23 14:31:50 +13:00
Eloy Lafuente (stronk7) a4c14b94ca Merge branch 'MDL-43318-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-23 00:39:48 +01:00
Sam Hemelryk 072ce9a5e7 MDL-34182 js: fixed typo in ajaxException use 2013-12-23 09:43:16 +13:00
Sam Hemelryk 2347fe5450 Merge branch 'MDL-43325-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2013-12-23 08:50:48 +13:00
Sam Hemelryk 43d6e05c24 Merge branch 'MDL-34182-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-23 08:16:23 +13:00
Petr Škoda b3e24b7f60 MDL-43314 make float serialize consistent on all systems
This should resolve problems with plugin version change detection.
2013-12-22 16:06:52 +08:00
Petr Škoda 2a8d78c00f MDL-43367 stop returning of bogus context children when path unknown
This also prevents deletion of system context.
2013-12-22 16:00:09 +08:00
Tim Hunt 69be43879e MDL-43448 Links to the gradebook not fixed on restore.
Note we can only fix certain generic links, we can't handle ones like
/grade/report/{reportname}/index.php, but fortunately, we were only
using the generic ones.

I added a couple of other likely things too (badges and participants
list).
2013-12-20 12:27:42 +00:00
Damyon Wiese 5d2169e053 weekly release 2.6+ 2013-12-20 11:58:11 +08:00
Damyon Wiese 996c1d5b15 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2013-12-20 11:58:07 +08:00
Damyon Wiese 206b1f6d6d MDL-43318 Assign: Fix bug when editing previous attempt feedback 2013-12-20 11:15:00 +08:00
Gareth J Barnard 997731210c MDL-41788 theme_bootstrapbase: Custom menus - sub-menus breaking. 2013-12-19 12:11:15 +00:00
David Monllao 83e305fa8c MDL-43404 behat: Avoid failures at framework level as much as possible
- Move them to i_look_for_exceptions() so they will be
  thrown at a step (scenario) level.
- Accept alerts only when they are detected to avoid
  all the following scenarios to be failing; they would
  continue executing, but they will all fail if the alert
  is still there
- Add a step to avoid add_scorm.feature to fail
- Refine the UnknownError catch
2013-12-19 16:03:40 +08:00
Frederic Massart 50809576b5 MDL-43454 mod_assignment: Use of undefined constants FILE_* 2013-12-19 07:22:06 +01:00
Eloy Lafuente (stronk7) 2d2faf8087 Revert "MDL-43306 restore: fix grade item sortorder restoration"
This reverts commit 6afd79df8d.
2013-12-19 02:14:03 +01:00
AMOS bot 5f41d7ce6b Automatically generated installer lang files 2013-12-19 00:44:14 +00:00
Jean-Philippe Gaudreau adcddcf776 MDL-41246 cache: Fix PHP notice of non well formed numeric values for the memcache store 2013-12-18 08:52:59 -05:00
Frederic Massart 15d16015b7 MDL-43438 mod_assignment: Prevent double inclusion of plugin files 2013-12-18 09:18:07 +01:00
David Monllao 6acf61d35e MDL-43235 behat: Remove notice about undeclared var 2013-12-18 16:03:29 +08:00
Dan Poltawski 8d7c3b0d50 Merge branch 'MDL-41198-26' of https://github.com/mr-russ/moodle into MOODLE_26_STABLE 2013-12-18 14:59:59 +08:00
Russell Smith 4902bfaf3e MDL-41198 lib: Add comment about the changes to srand on adodb 2013-12-18 16:53:17 +11:00
Russell Smith 9c5c2dbf5a MDL-41198 lib: Allow PHP to generate random seed on script start
Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.
2013-12-18 16:53:10 +11:00
Russell Smith dd7e948dba MDL-41198 lib: Allow PHP to generate random seed on script start
All mt_srand instances are removed to allow PHP to do the work.
2013-12-18 16:53:04 +11:00
Eloy Lafuente (stronk7) ae20e634d7 Merge branch 'MDL-43404_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-18 02:24:19 +01:00
Russell Smith c25dbc446a MDL-41292 cache: only update identifiers if they change 2013-12-18 02:23:36 +01:00
Sam Hemelryk 12c847fed9 Merge branch 'MDL-43235_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-18 11:19:26 +13:00
Eloy Lafuente (stronk7) 04b53e0e0c Merge branch 'MDL-43025-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-17 22:59:14 +01:00
Sam Hemelryk 6a8e8ac25e Merge branch 'MDL-43355_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-18 10:45:02 +13:00
Sam Hemelryk f01cac675a Merge branch 'MDL-43074-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-18 09:58:51 +13:00
Andrew Nicols 6d69cf1045 MDL-43234 JavaScript: Clone dialogue configuration before initialising
Since we modify the config object when instantiating a new Dialogue, we
need to clone the configuration to prevent those changes from being
reflected back in the caller.
2013-12-18 09:53:35 +13:00
Sam Hemelryk 3aa576a8ef Merge branch 'MDL-38698-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-12-18 09:21:31 +13:00
David Monllao cc8ba5f12a MDL-43404 behat: Form change checker disabled when running behat 2013-12-17 18:40:13 +08:00
David Monllao 303ea5f34e MDL-43404 behat: Removing auto accept_alert 2013-12-17 18:40:06 +08:00
David Monllao 63e764faba MDL-43423 behat: Running hooks before and after each step of a chained step 2013-12-17 18:14:48 +08:00
Eloy Lafuente (stronk7) e74f735a99 Merge branch 'MDL-43306-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2013-12-17 10:29:34 +01:00
Frederic Massart ae5884f8e6 MDL-38698 filter_urltolink: Remove performance test in Unit Test 2013-12-17 07:06:01 +01:00
Frederic Massart 2490febd82 MDL-38698 filter_urltolink: Do not link the URL property of CSS 2013-12-17 07:06:01 +01:00
Marina Glancy df1914d111 Merge branch 'MDL-37679-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2013-12-17 16:37:42 +11:00
Marina Glancy 6e39ee0c82 Merge branch 'wip-MDL-43295-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2013-12-17 16:36:00 +11:00
Mark Nielsen 13e8736049 MDL-37679 Course: Adding section to page title on section only pages 2013-12-17 11:42:38 +08:00
Adrian Greeve d868e5331c MDL-43295 mod_assign: Removed wrongly used format_text call in online text submission. 2013-12-17 10:44:36 +08:00
Andrew Nicols 829897be3e MDL-43410 JavaScript: Stop event propagation when opening the action menu
In certain situations, the click event is propagated through to the
hideIfOutside and immediately closes the menu.

This happens when blocks are dock for example.
2013-12-17 09:57:58 +08:00
Marina Glancy 20b9e53010 Merge branch 'MDL-41075-26' of git://github.com/mouneyrac/moodle into MOODLE_26_STABLE 2013-12-17 11:24:08 +11:00
Russell Smith 5470f3859f MDL-39725 database: Apply database statistics update to daily stats 2013-12-17 10:26:49 +13:00
Russell Smith 9cd60b20d0 MDL-39725 database: Include stats collections in unit tests 2013-12-17 10:26:48 +13:00
Russell Smith bd8dbfdbc3 MDL-39725 database: Add statistics collection functions
Conflicts:
	lib/dml/moodle_database.php
2013-12-17 10:26:46 +13:00
Sam Hemelryk 21bb4f142c Merge branch 'MDL-25473-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2013-12-17 08:54:22 +13:00
Sam Hemelryk 7809633d79 Merge branch 'MDL-34321-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2013-12-17 08:47:51 +13:00
Sam Hemelryk 7f574aadff Merge branch 'MDL-36984-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2013-12-17 08:44:52 +13:00
Sam Hemelryk 9c099d21eb Merge branch 'w51_MDL-43268_m26_filternotice' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-17 08:24:52 +13:00
Frederic Massart 8ee06a7b17 MDL-30195 portfolio_googledocs: Allow export of rich HTML 2013-12-16 11:06:57 +01:00
Jerome Mouneyrac 22c5c2f04c MDL-43399 Badge: the Choose... option can still be selected once a role is choosen. 2013-12-16 14:33:45 +08:00
Frederic Massart 83818b0452 MDL-42212 mod_lesson: Use autoloading for mod_lesson_file_info 2013-12-16 07:26:13 +01:00
Frederic Massart e81efe7691 MDL-42212 mod_lesson: Localise area names 2013-12-16 07:26:13 +01:00
Frederic Massart a256d06cfd MDL-42212 mod_lesson: Fix callbacks retrieving activity files 2013-12-16 07:26:13 +01:00
Jerome Mouneyrac ef483684d3 MDL-41075 Remove "Choose..." option from participants page. 2013-12-16 12:08:36 +08:00
Damyon Wiese 147c966a46 MDL-43250 Assign: separate groups mode fix
When in separate groups mode, only get graders in a group that is in the course module grouping.
2013-12-16 10:50:23 +08:00
Sam Hemelryk a3a8490d3a Merge branch 'wip-mdl-21180-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2013-12-16 15:43:47 +13:00
Sam Hemelryk e9623e55e3 Merge branch 'MDL-43062-26' of git://github.com/mouneyrac/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-12-16 15:40:25 +13:00
Rajesh Taneja ae1baf9042 MDL-21180 Gradebook: Consistent handling of change in aggregation
Change from/to GRADE_AGGREGATE_WEIGHTED_MEAN and GRADE_AGGREGATE_EXTRACREDIT_MEAN was only
handled prior to this patch. GRADE_AGGREGATE_SUM and GRADE_AGGREGATE_WEIGHTED_MEAN2 also
behave similar and should be handled same way
2013-12-16 09:58:26 +08:00
Marina Glancy be7a37d442 Merge branch 'MDL-37972-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2013-12-16 12:27:59 +11:00
Sam Hemelryk e646b89f8b Merge branch 'wip-MDL-43348_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2013-12-16 14:09:52 +13:00
Sam Hemelryk a0f5d96f1e Merge branch 'MDL-40096-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-16 13:52:03 +13:00
Sam Hemelryk 45c0583312 Merge branch 'MDL-40436-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-12-16 11:31:13 +13:00
Sam Hemelryk 05a423d850 Merge branch 'w51_MDL-42931_m26_env27' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-16 11:17:46 +13:00
Sam Hemelryk 12869bfdb1 Merge branch 'MDL-42085-26' of git://github.com/mouneyrac/moodle into MOODLE_26_STABLE 2013-12-16 11:11:26 +13:00
Sam Hemelryk 909f01f17e Merge branch 'MDL-43326-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-16 09:46:32 +13:00
Frederic Massart d8a4219d47 MDL-35032 mod_book: 1.9 backup restore convertis files to book area 2013-12-13 10:26:58 +01:00
David Monllao c56dbe9c28 MDL-43235 behat: Ensure that behat_config_manager::get_config_file_contents() has always a behat_wwwroot 2013-12-13 14:33:52 +08:00
Andrew Nicols d0e04db7fb MDL-34182 Repositories: Check for and warn on invalid output in the file picker 2013-12-13 14:15:10 +08:00
Andrew Nicols 2e96609a93 MDL-34182 AJAX: Change to use shared method when checking the siteadminbranch for invalid output 2013-12-13 14:15:10 +08:00
Andrew Nicols 207f2c8880 MDL-34182: Add functions to warn of output in AJAX scripts
We need to be able to capture output when including contributed code as it
may add additional content which makes makes the json we output invalid.

We only warn of these errors if the site is in debugdeveloper, otherwise
we silently drop them.
2013-12-13 14:15:09 +08:00
Petr Škoda 2f7a48c0a9 MDL-42931 set new requirements for 2.7 2013-12-13 14:06:20 +08:00
Petr Škoda ad2d2f19a3 MDL-43268 fix filter notice when not in debug mode 2013-12-13 13:59:31 +08:00
Jerome Mouneyrac 834f172c77 MDL-43062 course: Content of label is left-aligned, regardless of alignment chosen
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-12-13 13:55:51 +08:00
Sam Hemelryk 8703e6530c weekly release 2.6+ 2013-12-13 16:59:33 +13:00
Sam Hemelryk 40d3bc442f Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2013-12-13 16:59:31 +13:00
AMOS bot 3c790ba117 Automatically generated installer lang files 2013-12-13 00:42:12 +00:00
Gareth J Barnard f10d0d2745 MDL-43348 theme: html <nav> element on the wrong content. 2013-12-12 16:14:50 +00:00
David Monllao 668505a9e4 MDL-42625 behat: Wrapping select an option extra actions in a try & catch
To select an option is specially painful, every browser
behaves differently and phantomjs just joined the party
throwing "Element does not exist in cache" random
exceptions that we need to catch.
2013-12-12 12:20:34 +01:00
David Monllao b1915ed987 MDL-43355 testing: Return the hash when HEAD points to a hash 2013-12-12 17:39:37 +08:00
Andrew Nicols bccff20039 MDL-43325 JavaScript: Set a default visibility for most Moodle dialogues
We used to ignore the 'visible' field in the initializer, but now we hide
dialogues if visible is false. This was an unintentional change from the
stable API and means that confirmation boxes, alerts, and exceptions are no
longer shown by default.
2013-12-12 16:21:30 +08:00
Frederic Massart 736ce96319 MDL-40436 block_course_list: Fix bad context resolution
We were trying to get the course context of a remote course
from a completely unrelated ID. It would sometimes work if the
ID was matching the one of a local course. In other places
we are not trying to find a context for the remote course, we
simply use the $PAGE context in format_string. So the usage
of the context has been removed here too.
2013-12-12 09:10:45 +01:00
Jerome Mouneyrac 4a6fb4a2ca MDL-42085 Enrol: Always apply enrolment duration.
Before the fix, the startdates and duration fields were integrated to HTML code only
when the user clicked on the collapsible region to see them.
It was wrong because their values were not sent by the form
if ever the user didn't expand this Enrolment options region.
2013-12-12 16:07:33 +08:00
Jason Fowler d06e9d3bef MDL-36984 Assign: Add redirect after saving grades 2013-12-12 14:19:51 +08:00
Marina Glancy 06805cb54f Merge branch 'MDL-42625_26-failures-fix' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-12 16:51:05 +11:00
David Monllao fff8b97ebc MDL-42625 behat: Fixing failures
* Expanding fieldsets before setting the course format
* Ensure editors are loaded moved to expand_all_fieldsets
* Return true rather than false when JS is disabled and
  non-allowed steps should continue without throwing an
  exception.
2013-12-12 13:42:56 +08:00
Marina Glancy 26023575ba Merge branch 'mucupdates26' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-12 15:39:51 +11:00
Petr Škoda 1a815ef7d4 MDL-42973 fix MUC caching issue when fetching available updates 2013-12-12 11:36:36 +08:00
Jason Fowler 9fc09121a8 MDL-34321 Assignment2.2 - Fixing submission count 2013-12-12 10:36:08 +08:00
Eloy Lafuente (stronk7) 26f9407892 MDL-31410 paypal: fix problem on notifications
This commit fixes a PHP warning about using a
unititialised variable and also the problems when
notifications are enabled and there is not yet a
teacher in the course, defaulting to admin for student
notifications and preventing teacher notifications to happen.
2013-12-12 02:22:23 +01:00
Eloy Lafuente (stronk7) 4701b68a51 Merge branch 'w50_MDL-31410_m26_paypalipn' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-12 01:16:38 +01:00
David Monllao a80eba9500 MDL-42625 behat: Fixing ExpectationException::__construct() call
Also adding an extra checking to the selector to
ensure it is no updating the list of files.
2013-12-11 10:26:58 +01:00
Damyon Wiese 1ac6fd0322 MDL-43326 Assign: Start new attempt from previous missing sesskey 2013-12-11 13:11:26 +08:00
Marina Glancy 1562e8d3eb MDL-43218 blog: prepare the blog navigation only when needed 2013-12-11 15:37:36 +13:00
Simon Coggins 139a8556e8 MDL-43218 navigation: Remove link to blogs when they are disabled 2013-12-11 15:37:36 +13:00
Marina Glancy 856be66774 Merge branch 'MDL-43071-MOODLE_26_STABLE' of https://github.com/lucisgit/moodle into MOODLE_26_STABLE 2013-12-11 12:47:00 +11:00
Eloy Lafuente (stronk7) 3675c98506 Merge branch 'MDL-42625_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-10 23:31:51 +01:00
sam marshall 43ed2ccbf2 MDL-42815 Backup/restore: Error saving files - log messages unhelpful
This commit contains three changes in the three files:
1. A bug in the backup process meant that anything logged after a
   certain point did not appear in the on-screen display of the
   backup log, because the logger was serialised and deserialised
   but display code referred to the old version. Changed so that
   code retrieves new object.
2. Add more information to backup log when there is a missing file.
3. Add more information to restore log when there is a missing file
   (and remove existing code duplication of the current message).

The 'missing file' situation is one that generally shouldn't occur in
normal usage, but when it does happen, it is useful to have full
information about the file.
2013-12-10 23:25:19 +01:00
Sam Hemelryk 5fbc32ebdb Merge branch 'MDL-42796-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-11 11:12:55 +13:00
Sam Hemelryk 9f00dabf86 Merge branch 'MDL-43252-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2013-12-11 11:03:23 +13:00
Sam Hemelryk 51d311f703 Merge branch 'wip-MDL-43279-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-12-11 10:58:49 +13:00
Sam Hemelryk 3ef86b3909 Merge branch 'w50_MDL-31625_m26_replace' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-11 10:51:21 +13:00
Eloy Lafuente (stronk7) 6085ca703d Merge branch 'wip-MDL-43150-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-12-10 22:47:29 +01:00
Sam Hemelryk bdb2677b79 Merge branch 'MDL-42959-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-11 10:34:04 +13:00
Eloy Lafuente (stronk7) 8a630a771c Merge branch 'wip-MDL-42174-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-12-10 22:13:17 +01:00
Eloy Lafuente (stronk7) 409e4794d7 Merge branch '26STABLE-wip-MDL-43135' of https://github.com/jennymgray/moodle into MOODLE_26_STABLE 2013-12-10 19:46:31 +01:00
Jenny Gray 30ce0cd396 MDL-43135 Guest Enrol: new language string for with key icon
AMOS BEGIN
CPY [pluginname,enrol_guest], [guestaccess_withpassword,enrol_guest]
CPY [pluginname,enrol_guest], [guestaccess_withoutpassword,enrol_guest]
AMOS END
2013-12-10 11:19:50 +00:00
Sam Chaffee e5a0c16bd3 MDL-37972 Assignment: fixing settings link for upload single submissions 2013-12-10 14:09:16 +08:00
Dan Poltawski 6afd79df8d MDL-43306 restore: fix grade item sortorder restoration
Previously, restore was blindly inserting the old sort order into the
database, causing duplicate sortorders which lead to unpredicatble
sorting results.

Now we will use the api function to add it after the original sortorder,
this means if a duplicate exists in the original location, this item
will appear after it.
2013-12-10 12:34:08 +08:00
Marina Glancy 9f2e956580 Merge branch 'MDL-43199-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-10 15:16:08 +11:00
Marina Glancy 4bc1b2151e Merge branch 'm26_MDL-43082_IE9_Compat_View_SVG_Say_No' of https://github.com/scara/moodle into MOODLE_26_STABLE 2013-12-10 14:47:52 +11:00
Michael Dikih 79f0a612c4 MDL-43109: mod/wiki - When editing pages populate the default value for the tags input. 2013-12-10 14:17:17 +10:30
Marina Glancy 66a437aca8 Merge branch 'MDL-43215_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2013-12-10 14:26:14 +11:00
Marina Glancy 3b70fdaaf3 Merge branch 'MDL-43131_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2013-12-10 14:10:29 +11:00
Marina Glancy 08f6d5de07 Merge branch 'mdl42487-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2013-12-10 13:57:20 +11:00
Jason Fowler 39d505664e MDL-25473 mediaplayer - prevent embedded videos from looping 2013-12-10 10:47:47 +08:00
Marina Glancy 286348d97f MDL-43279 block_blog_recent: fixed undefined property notice 2013-12-10 09:28:40 +11:00
Sam Hemelryk e5bb9741b6 Merge branch 'MDL-43164-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-10 09:50:27 +13:00
Sam Hemelryk c7f545bbb0 Merge branch 'm26_MDL-43159_Wrong_Naming_Convention_For_Variable' of https://github.com/scara/moodle into MOODLE_26_STABLE 2013-12-10 09:20:33 +13:00
Sam Hemelryk b2a803d5d1 Merge branch 'MDL-43194-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-10 08:48:04 +13:00
Sam Hemelryk 8eb717f993 Merge branch 'MDL-43152-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-10 08:43:36 +13:00
Eloy Lafuente (stronk7) f37e3f357d Merge branch 'MDL-40003-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-12-09 16:24:35 +01:00
sam marshall b1b09903b0 MDL-43252 Group menu in wrong order when groupings used 2013-12-09 13:02:43 +00:00
Sam Chaffee 2470b6ea89 MDL-40003 mod_assign: Fixed submission comments not being restored 2013-12-09 11:04:39 +01:00
Marina Glancy cc2aca7c23 Merge branch 'wip-MDL-43175-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2013-12-09 18:56:15 +11:00
Marina Glancy d66fe9c1aa Merge branch 'wip-mdl-43224-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2013-12-09 18:46:36 +11:00
Marina Glancy 6203fc19f2 Merge branch 'w50_MDL-42973_m26_addonupd' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-09 18:28:35 +11:00
Marina Glancy 64c03072a9 Merge branch 'MDL-43092_M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2013-12-09 17:50:53 +11:00
Marina Glancy 780dc00ce5 Merge branch 'w50_MDL-43137_m26_openbasedir' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-09 16:15:59 +11:00
Damyon Wiese 75ceca0bf5 MDL-43025 EditPDF: Increase memory limit when reading source pdfs. 2013-12-09 12:53:29 +08:00
David Monllao db13e21956 MDL-42625 behat: Make behat pacient
* When looking for texts inside the page or inside
  other containers we should wait until the elements
  are visible.
* Same when expanding tree nodes.
* Normalizing loops to spin() function using
  behat_base::TIMEOUT and behat_base::EXTENDED_TIMEOUT,
  leaving TIMEOUT for DOM load processes and
  EXTENDED_TIMEOUT for long processes that involves JS
  too.
* Add page load waits between actions that involves
  reloading the page.
2013-12-09 11:11:48 +08:00
Damyon Wiese 42515a2e58 MDL-43074 assignfeedback_editpdf: Use escapeshellarg for all args in exec command.
This is to fix a reported problem with windows compatibility (e.g. when ghostscript is installed in
a folder with spaces in the name).
2013-12-09 11:00:13 +08:00
Damyon Wiese ced275af37 MDL-40096 assign: Prevent js error because uniqid() is not unique.
Use html_writer::random_id instead because it incorporates a static counter.
2013-12-09 10:26:05 +08:00
Andrew Nicols 6eb703ad69 MDL-42959 JavaScript: Backport fix from https://github.com/yui/yui3/pull/1465 2013-12-09 10:25:33 +08:00
Marina Glancy c4bc562172 Merge branch 'm26_MDL-43192' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2013-12-09 11:28:32 +11:00
Gareth J Barnard 45d1c530d2 MDL-40213 theme_clean: Layout "secure.php" missing settings. 2013-12-09 11:14:07 +11:00
Andrew Nicols e6caeefe0c MDL-42796 ActionMenu: Add additional keyboard event handling
Add additional handling for up/down/escape key presses and consolidate them
with the existing tab/shift+tab handling.
2013-12-06 16:21:13 +08:00
Andrew Nicols b8351f4c24 MDL-42796 ActionMenu: Move event handlers to showMenu 2013-12-06 16:20:49 +08:00
Damyon Wiese fb64bae5e2 MDL-42625 TinyMCE: Hook into API to track the progress of the init script 2013-12-06 15:53:58 +08:00
David Monllao 9f8ef4294a MDL-42625 behat: Step definitions + related changes in features
In general aiming for compatibility with multiple browsers,
firefox, chrome and phantomjs to be more specific.

* Removing hardcoded waits
* Adding @_alert, @_switch_window and @_switch_frame tags,
  to label actions that different drivers have problems with.
* Adding missing @_files_upload and @_only_local tags to features that
  uploads files.
* Fixing a few wait for page ready what specified miliseconds.
* New methods to ensure elements (usual selectors), sections and editors
  are ready to interact with
* Changing the select an option implementation to deal with the different
  drivers implementations when listening to JS events.
2013-12-06 15:53:55 +08:00
David Monllao 503c8dddcc MDL-42625 behat: Editing .feature files 2013-12-06 15:53:50 +08:00
Andrew Nicols 40daab14a4 MDL-41030 JavaScript: Convert remaining YUI2 IO calls to YUI3 2013-12-06 15:53:47 +08:00
Damyon Wiese 01426638cb MDL-41030 Behat: Add support for waiting for javascript
This is so that phantomjs (which runs faster than selenium) can pass the tests.
2013-12-06 15:53:40 +08:00
David Monllao f5940bfb5f MDL-41030 behat: Dock blocks compatible with both selenium and phantomjs 2013-12-06 15:53:38 +08:00
Marina Glancy ae3dd7efdb MDL-42174 behat: change word filepicker to filemanager in step definitions 2013-12-06 17:31:58 +11:00
Marina Glancy 35c2c697ce MDL-42174 behat: replace word filepicker with filemanager in file upload step 2013-12-06 17:31:58 +11:00
Marina Glancy 4ec1b7b094 MDL-42174 More behat tests for filepicker 2013-12-06 17:31:55 +11:00
Pavel Sokolov a2afdf4691 MDL-43199 assign: fix js error when expanding comments for non editing teachers in assign grading table 2013-12-06 12:58:18 +08:00
Rajesh Taneja 738e1d3556 MDL-43224 navigation: Load local plugin navigation in site admin via ajax
Local plugin can add navigation nodes to site admin and while loading
site admin via ajax this should be considered.
2013-12-06 10:28:42 +08:00
Petr Škoda c673cdfee7 MDL-31410 always send 200 in PayPal IPN response and hide all errors 2013-12-06 10:02:43 +08:00
Petr Škoda b4d2e7f267 MDL-31625 fix multiple global search-replace issues
Includes following fixes:
* support for MS SQL Server
* optional trimming of of oversized VARCHAR fields
* conversion to forms library
* full localisation
* other cleanup
2013-12-06 09:52:47 +08:00
Petr Škoda 4bc526cc8a MDL-42973 fix multiple addon update issues 2013-12-06 09:37:28 +08:00
Petr Škoda 7ed7cabf5f MDL-43137 fix open_basedir regression in classloader 2013-12-06 09:30:08 +08:00
Andrew Nicols d33dffe53a MDL-43152 JavaScript: Add update instructions for gallery-bootstrap 2013-12-06 09:20:05 +08:00
Andrew Nicols 19b1ff816f MDL-43152 JavaScript: Fix linting issues with moodle-theme_bootstrapbase 2013-12-06 09:20:02 +08:00
Andrew Nicols 40f2d64856 MDL-43152 JavaScript: Fix linting issues with moodle-core-blocks 2013-12-06 09:19:58 +08:00
Andrew Nicols d6c8107249 MDL-43152 JavaScript: Fix linting issue with navigation JS 2013-12-06 09:09:01 +08:00
Matteo Scaramuccia fcf15debfc MDL-43159 Libraries Wrong naming convention in $compat_view. 2013-12-05 16:08:14 +01:00
Matteo Scaramuccia eadcc99eea MDL-43082 Themes IE 9 Compatibility View doesn't support SVG. 2013-12-05 15:57:00 +01:00
Tim Hunt 102fe39706 MDL-43131 qbank: Fix show question text when first viewing.
When you followed the link to the question bank, the checkbox for the
"Show question text in the question list" option correctly reflected the
user's preference, but what was actually shown in the question bank did
not.
2013-12-05 11:06:46 +00:00
Dan Poltawski 3e6e38b2e3 weekly release 2.6+ 2013-12-05 15:10:16 +08:00
Dan Poltawski d04814641b Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2013-12-05 15:10:13 +08:00
Mark Nelson b4d09c2db0 MDL-43215 core_webservice: retrieve all user name fields when adding a token 2013-12-04 20:57:24 -08:00
David Monllao 2fc28aa794 MDL-41592 behat: Setting a default value for CFG->behat_wwwroot in case it is empty 2013-12-05 17:06:18 +13:00
Adrian Greeve c5f2967a64 MDL-43175 events: Base event unit tests for JSON encoding / decoding comparison. 2013-12-05 10:03:51 +08:00
Adrian Greeve 9a7713304c MDL-43175 events: Changed JSON encoding decoding comparison to be less strict.
Debugging messages would be sent when other contained a float that is a whole number.
When encoding and decoding using JSON the number is changed to an integer and the
comparison fails.
2013-12-05 10:03:37 +08:00
Frederic Massart 85c39e437b MDL-43185 behat: Use realpath on existing paths 2013-12-05 08:18:05 +13:00
Andrew Nicols e37014fafb MDL-43194 JavaScript: Correct maxlen jshint configuration 2013-12-04 16:40:21 +08:00
Dan Marsden 77492a3e62 MDL-43192 Repository: param doesn't exist - should use function 2013-12-04 20:57:32 +13:00
Dan Poltawski b01548ecba Merge branch 'wip-MDL-40191-2-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-12-04 15:44:08 +08:00
Marina Glancy dd75bf89ff MDL-40191 folder: Do not check capability in renderer
Capability to access the module is already checked before calling the renderer. Extra check works bad together with switching roles
2013-12-04 18:30:09 +11:00
Dan Poltawski 307d961277 Merge branch 'wip-mdl-43028-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2013-12-04 15:06:30 +08:00
Rajesh Taneja bc7ac30669 MDL-43028 navigation: fixed section for profilepage
section for profile page is profilepage and not mypage
2013-12-04 14:50:35 +08:00
Tim Lock 56dc43f3d2 MDL-34020: Further work on IMS package importing when using Blackboard packages 2013-12-04 15:18:13 +10:30
Tomasz Muras fa4e8ee5c9 MDL-42563 Correct version of GPL license to GPL 2+ for AlgParser.pm 2013-12-04 11:30:57 +08:00
Tomasz Muras efdb216ca9 MDL-42563 Add thirdpartylibs.xml for AlgParser.pm. 2013-12-04 11:30:43 +08:00
Jason Fowler 62f68371df MDL-43084 Themes: fixing dialog header in standard theme 2013-12-04 15:32:31 +13:00
Jason Fowler 3690a9db9f MDL-43083 Course: Swapping the edit/cog for the right size icon 2013-12-04 09:53:42 +08:00
AMOS bot 952292945c Automatically generated installer lang files 2013-12-04 00:43:13 +00:00
Eloy Lafuente (stronk7) ac184c9db2 Merge branch 'MDL-41446-master' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2013-12-03 23:55:49 +01:00
Sam Hemelryk 8e60097af8 Merge branch 'MDL-41592_26' of https://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-04 11:52:18 +13:00
Eloy Lafuente (stronk7) 786f04f485 Merge branch 'MDL-43142_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2013-12-03 23:41:24 +01:00
Eloy Lafuente (stronk7) 310cf52b37 Merge branch 'MDL-43140_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2013-12-03 23:25:33 +01:00
Tim Hunt 3893b5fa32 MDL-43093 update repeat_elements PHPdoc. 2013-12-04 10:12:25 +13:00
Sam Hemelryk f5a134213d Merge branch 'MDL-43065-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE
Conflicts:
	backup/util/ui/base_moodleform.class.php
2013-12-04 09:43:24 +13:00
Sam Hemelryk 7ac9576825 Merge branch 'MDL-42919-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2013-12-04 09:42:34 +13:00
Eloy Lafuente (stronk7) b5036ee20c Merge branch 'wip-MDL-43058-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2013-12-03 19:33:30 +01:00
Eloy Lafuente (stronk7) 1abaa0c22e Merge branch 'MDL-43105-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-03 19:16:08 +01:00
Eloy Lafuente (stronk7) 9a734d1862 Merge branch 'moodle26-mdl33971' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2013-12-03 17:18:02 +01:00
Mary Evans a108795999 MDL-43092 theme_afterburner: Activity or Resource dialog greyed-out for non-empty courses 2013-12-03 15:04:02 +00:00
James Pratt 7ef639c709 MDL-43079 quiz statistics : fix stats graph when all grades zero 2013-12-03 15:39:09 +01:00
Damyon Wiese cb891e57f0 Merge branch 'wip-MDL-42731-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-12-03 17:29:57 +08:00
Eloy Lafuente (stronk7) b470112643 Merge branch 'MDL-42885_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2013-12-03 10:01:43 +01:00
Damyon Wiese 4e14b95f0e Merge branch 'MDL-42627_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-03 16:29:39 +08:00
Damyon Wiese 4d32c0c6d0 Merge branch 'wip-MDL-43026-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-12-03 16:12:08 +08:00
Dan Poltawski 0e44ba37cf Merge branch 'moodle26-mdl43020' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2013-12-03 16:08:22 +08:00
Andrew Nicols 5259c6b402 MDL-42989 JavaScript: Check result of navigation IO requests before reporting errors
When making a request which fails, we need to ensure that the AJAX query
was not aborted before displaying the error.

This ensures that if the navigation tree is being requested at the same
time as a page load is being processed, the abortion of the AJAX request is
not displayed before the page reloads.
2013-12-03 16:05:18 +08:00
Andrew Nicols ed52eb4c88 MDL-42989 JavaScript: Do not attempt to expand navigation when opening link
When clicking on a link which is also expandable, we should not attempt to
expand it.
2013-12-03 16:05:09 +08:00
Dan Poltawski 77325154af Merge branch 'wip-mdl-43028-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2013-12-03 13:46:26 +08:00
Jason Fowler b136969308 MDL-43076 Activity Chooser: Fixing the white bar at the bottom of the dialogue
Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-12-03 13:30:15 +08:00
Dan Poltawski 47d9d4cd00 MDL-43081 upgrade.txt: note generator change
Conflicts:

	lib/upgrade.txt
2013-12-03 13:04:26 +08:00
Dan Poltawski 61ae30255c Merge branch 'MDL-43066_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-12-03 12:36:52 +08:00
Damyon Wiese e2a2209ed6 Merge branch 'wip-mdl-43048-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2013-12-03 11:43:53 +08:00
Damyon Wiese 1cf504414d Merge branch 'wip-mdl-42904-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE
Conflicts:
	enrol/self/db/upgrade.php
2013-12-03 11:25:36 +08:00
Andrew Nicols 2d6dfcde3e MDL-43164 JavaScript: Use the up/down move icon for non-AJAX courses
When a course format does not support AJAX, or AJAX is disabled at the site
level, we should revert back to the old-style move icon.

This helps to clarify that you cannot drag/drop the icon, but must click
instead.
2013-12-03 10:49:42 +08:00
Sam Hemelryk 1cb0536bcb Merge branch 'w48_MDL-41819_m26_maxinputvars' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-03 09:58:10 +13:00
Michael Aherne 217c5d8208 MDL-42495 lesson Prevent coding error for invalid user 2013-12-02 10:53:20 +00:00
Dan Poltawski d8be1d9ac5 Merge branch 'MDL-42989-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-02 14:53:37 +08:00
Damyon Wiese 88c5d93aa1 Merge branch 'm26_MDL-43039_SessionDiskFull_False_Positive' of https://github.com/scara/moodle into MOODLE_26_STABLE 2013-12-02 14:37:03 +08:00
Andrew Nicols cbb87c9568 MDL-42989 Admin: Clean output when building site administration tree for JS
Previously, any inappropriate whitespace found whilst building the admin
tree caused a JSON error and for the site administration tree retrieval to
fail.

This change ensures that access to the site administration tree is unbroken
for non-developers, whilst still alerting developers that there is an
issue.
2013-12-02 14:34:11 +08:00
Jerome Mouneyrac 7d2f938cf0 MDL-42969 Main Menu Block loses ability to move resource or activity up or down (add back exact same behavior than in 2.5) 2013-12-02 14:24:16 +08:00
David Monllao eb1931ccd1 MDL-41592 general: Also checking the site path 2013-12-02 14:19:25 +08:00
David Monllao 5f717f7aac MDL-41592 behat: Config settings more flexible
Adding the option to just set ->behat_wwwroot to
allow switching to the behat test site.
2013-12-02 14:19:25 +08:00
Aaron Barnes 64c5119637 MDL-41592 behat: Allow alt wwwroot to be set for acceptance testing
To set add $CFG->behat_wwwroot = 'http://alturl'; in your config.php
2013-12-02 14:19:25 +08:00
David Monllao dad1bc64c5 MDL-42627 behat: Replacing calls to deprecated step
Switching to the selector-based ..in the "LOCATOR" "table_row"
2013-12-02 14:13:49 +08:00
David Monllao 812fa23e82 MDL-43066 behat: Checking that the site is not already installed 2013-12-02 14:11:33 +08:00
Damyon Wiese fe0d1d488b MDL-43018 Fix unit tests for minify changes. 2013-12-02 12:52:43 +08:00
Dan Poltawski d76bc30606 Merge branch 'w49_MDL-43106_m26_doublecookie' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-12-02 11:58:23 +08:00
Damyon Wiese 39177fd3a7 Merge branch 'MDL-43018-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2013-12-02 11:23:23 +08:00
Dan Poltawski 0c94afe7af Merge branch 'wip-MDL-40191-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-12-02 11:19:45 +08:00
Tim Hunt b14196043d MDL-43068 course&gradebook: show/hide cm & CONTROLS_GRADE_VISIBILITY
Making a quiz visible on the course page, of via the settings form,
could cause the grade item to become visible in the gradebook, even
though the quiz supports FEATURE_CONTROLS_GRADE_VISIBILITY to ensure
that when the grades are hidden in the quiz settings, they do not appear
in the gradebook.

Now, if a module supports FEATURE_CONTROLS_GRADE_VISIBILITY, then
set_coursemodule_visible calls the _grade_item_update callback to update
the grade item(s).

In addition, there was a bug when saving the quiz form, where it used
the value of $cm->visible from the database, which was wrong if the
value of cm->visible had just been changed on the setting form.
2013-12-02 11:12:53 +08:00
Damyon Wiese 2f6a01e094 Merge branch '43033-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2013-12-02 09:51:08 +08:00
Jerome Mouneyrac c68fa5fcbb MDL-42876 Screen reader does not trigger the keyboard move 2013-12-02 14:07:28 +13:00
Marina Glancy 4f7ec48046 MDL-43150 tinymce_managefiles: fixed unattractive background 2013-12-02 12:02:04 +11:00
AMOS bot fe0f1f5c19 Automatically generated installer lang files 2013-12-02 00:42:53 +00:00
Sam Hemelryk f098ca6d97 Merge branch 'MDL-42918_m26' of git://github.com/rwijaya/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-12-02 13:39:51 +13:00
Petr Škoda 8aac99eb3d MDL-41819 try to work around max_input_vars restriction 2013-12-02 08:29:41 +08:00
Marina Glancy 1affdad829 MDL-40191 navigation: do not throw an error if activity is not visible
navigationlib is not the place to check it, let the page itself decide what to do in this case
2013-12-02 10:48:38 +11:00
Marina Glancy f497fd1de8 MDL-43026 behat: add tests for all available module generators 2013-12-02 10:38:29 +11:00
Marina Glancy 0a44a45fea MDL-42731 block_activity_modules: added behat tests 2013-12-02 10:15:52 +11:00
Marina Glancy fdc93e4092 MDL-42731 behat: load 'Site administration' when expanding node in non-javascript mode 2013-12-02 10:15:33 +11:00
Frederic Massart add7675e51 MDL-42951 curl: Re-organise Unit Tests in smaller chunks 2013-12-02 10:55:57 +13:00
Frederic Massart 20f8cd8551 MDL-42951 curl: Always keep the last headers of a request 2013-12-02 10:55:57 +13:00
Sam Hemelryk 7ac884d457 MDL-43033 cache: added stats logging to set_many methods 2013-12-02 09:29:44 +13:00
Sam Hemelryk 4bbbd50202 MDL-43033 cache: fixed display of definition stores in admin interface 2013-12-02 09:29:44 +13:00
Sam Hemelryk e6175024e6 MDL-43033 cache: added a warning icon for mappings
We now show a warning icon with an explanatory alt if the user
has mapped a store as a mode default that doesn't not fulfill the
requirements of every known definition.
2013-12-02 09:29:44 +13:00
Sam Hemelryk c21a04f63e MDL-43033 cache: fixed mode map event invalidation scenario 2013-12-02 09:29:44 +13:00
Sam Hemelryk ad3bbeb5c0 MDL-43033 cache: added stats logging to get_many methods 2013-12-02 09:29:44 +13:00
Matteo Scaramuccia 18d2aac902 MDL-43039 Libraries "The session partition is full." false positive. 2013-11-30 14:35:31 +01:00
Mark Nelson 5546df9078 MDL-43140 mnet: display header after redirects to avoid warning 2013-11-29 14:26:08 -08:00
Mark Nelson d0e29366de MDL-43142 mnet: fixed typo in variable passed to get_string 2013-11-29 14:15:24 -08:00
Petr Škoda 78da7d9529 MDL-43106 fix double cookies on first access 2013-11-29 15:47:52 +08:00
Dan Poltawski ea04def291 weekly release 2.6+ 2013-11-29 12:52:56 +08:00
Dan Poltawski 6ba3f5d72a Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2013-11-29 12:52:52 +08:00
Tim Lock 2153633aac MDL-42487: Forced userprofile dl style to be displayed: inline-block. 2013-11-29 09:26:52 +10:30
Eloy Lafuente (stronk7) d6ece9f7f0 Merge branch 'MDL-42957-26' of https://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2013-11-28 12:44:13 +01:00
James Pratt a69c78724e MDL-42957 (3) quiz statistics : removing assertEquals(time(), ..) tests 2013-11-28 17:59:05 +07:00
James Pratt 7968f77edb MDL-42957 (2) quiz statistics : Hardcoded sql LIMIT clause
Fixing some typos and adding some tests.
2013-11-28 17:35:39 +07:00
AMOS bot 6d7583c9b2 Automatically generated installer lang files 2013-11-28 09:12:40 +00:00
Andrew Nicols 6dae822543 MDL-43105 JavaScript: Use the correct versions of our rollups 2013-11-28 12:32:18 +08:00
Andrew Nicols 451044df4e MDL-43018 JavaScript: Correct joining of multiple minified JS
When minifiying JS, unnecessary semi-colons are removed - this includes the
trailing semi-colon.

Since we join multiple files together after minification, we need to add an
additional semi-colon in this situation to produce valid JavaScript.
2013-11-28 11:54:53 +08:00
Adrian Greeve 9daaa37aac MDL-43058 reports: updated sql to return fullnames in security check reports. 2013-11-27 14:57:11 +08:00
Rajesh Taneja 1880d3684c MDL-43048 block_tags: Initalised content->text for tags block 2013-11-27 14:37:07 +08:00
Mark Nelson dcef51b614 MDL-42885 tool_uploaduser: removed misleading debugging message 2013-11-26 21:26:23 -08:00
Dan Poltawski 66d40a5dae MDL-42942 behat: increment version 2013-11-27 11:37:32 +08:00
Dan Poltawski 9e56dabab6 Merge branch 'MDL-42942_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-11-27 11:37:25 +08:00
Marina Glancy 168e14feee MDL-42508 folder: add module generator 2013-11-27 12:36:12 +13:00
Marina Glancy 137778af00 MDL-42508 imspcp: add module generator 2013-11-27 12:36:11 +13:00
Marina Glancy d4d848343b MDL-42508 scorm: add module generator 2013-11-27 12:36:11 +13:00
Tim Lock 7f3fca8ff1 MDL-33971: When viewing course log entries for Quiz View Summary a number is displayed not the quiz name 2013-11-27 08:14:04 +10:30
Eloy Lafuente (stronk7) a01d727a31 Merge branch 'm26_MDL-43045' of git://github.com/totara/moodle into MOODLE_26_STABLE 2013-11-26 21:28:25 +01:00
Ruslan Kabalin d149d894a0 MDL-43071 assign: Fix offline grades import for scale grading. 2013-11-26 16:44:41 +00:00
rwijaya 4c1ac80799 MDL-42918: fixed fullscreen width for multichoice answers editor 2013-11-26 18:34:55 +08:00
Damyon Wiese 1e9c117f50 Merge branch 'wip-MDL-43008-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2013-11-26 16:59:04 +08:00
Adrian Greeve 55b02e02e6 MDL-43008 calendar: Allow calendar plugins to display setting pages. 2013-11-26 15:50:31 +08:00
Tim Hunt cead41882b MDL-43000 shortanswer qtype: handle patterns with many *s
Teachers were typing patterns like
********************************<em>****************************</em>
which translates into a pattern like .*.*.*.*, which is very inefficient
to try to match, althought it is equivalent ot a single .*. At a certain
point preg was just giving up.

Since people actually do this, we should simplify the regex by treating
runs of * like a single *.
2013-11-26 15:06:15 +08:00
Dan Poltawski 44e5ac93bc Merge branch 'MDL-40741_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-11-26 14:57:15 +08:00
Damyon Wiese b451ddf416 MDL-43065 Backup: Prevent any responsiveness in backup/restore forms
Adding 'unresponsive' class to any moodle form will prevent the default
collapsing on screens < 1200px.
2013-11-26 14:50:21 +08:00
Dan Poltawski 46d1d519f8 Merge branch 'MDL-42851_m26' of git://github.com/rwijaya/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-26 14:48:38 +08:00
Damyon Wiese c18fe9ec19 MDL-42919 Question: Remove &#160; from empty labels
This allows the form elements with empty labels to "fold" properly.
2013-11-26 13:32:46 +08:00
Damyon Wiese f5af9b62e8 MDL-41919 Forms: Add a class to form elements with an empty label
This means they can be styled properly when the form is folded with
the labels above the form fields.
2013-11-26 13:32:11 +08:00
Dan Poltawski ace15cee6d Merge branch 'wip-MDL-43006-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-11-26 13:24:41 +08:00
David Monllao addedcb142 MDL-40741 behat: Changing xpaths for clean theme
Keeps compatibility with standard theme.
2013-11-26 13:00:24 +08:00
Dan Poltawski e55207d9d7 Merge branch 'MDL-42733_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-11-26 12:09:47 +08:00
Tim Lock 4743fdf290 MDL-42998: Fix user selection search options autoselectunique. 2013-11-26 10:50:17 +08:00
Dan Poltawski 5ffad8a406 Merge branch 'MDL-43050_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2013-11-26 10:42:08 +08:00
Dan Poltawski 00b965f609 Merge branch 'wip-mdl-41635-m26' of git://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2013-11-26 10:25:01 +08:00
Damyon Wiese 5f9aa41321 Merge branch 'wip-MDL-40850-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-11-26 09:33:36 +08:00
Ankit Agarwal 5c1adaddba MDL-43005 blogs: Fix issues with blog tags 2013-11-26 08:43:39 +13:00
Sam Hemelryk 390896d3d9 Merge branch 'MDL-43037_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2013-11-26 08:36:09 +13:00
Simon Coggins eab8b262be MDL-43045 report: Fix missing role name in security overview report 2013-11-26 08:22:37 +13:00
David Monllao 5464179b31 MDL-42842 behat: Adding a new formatter
Based on ProgressFormatter, the site info
will be displayed when the suite begins.
2013-11-25 16:01:52 +08:00
David Monllao 99a4c833b6 MDL-42842 testing: Generalization of the site info 2013-11-25 16:00:43 +08:00
David Monllao da920040ad MDL-43050 behat: Fixing moodlehq/behat-extension version 2013-11-25 15:48:04 +08:00
Marina Glancy fdbd1d7a9d MDL-42925 course: Changed help string for course format selection 2013-11-25 15:44:06 +08:00
rwijaya bb68dfc002 MDL-42858 Course Management: Update phpunit test for core_course_management_helper_test 2013-11-25 15:40:07 +08:00
Frederic Massart 72cf8c6ca3 MDL-42985 curl: Correctly apply rule proxybypass 2013-11-25 14:51:18 +08:00
Damyon Wiese a1554ea241 Merge branch 'wip-MDL-41257-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2013-11-25 14:02:30 +08:00
Dan Poltawski 749db57b4c Merge branch 'w48_MDL-37016_m26_sloppymysql' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-11-25 13:40:56 +08:00
Marina Glancy 3b62f94787 MDL-43028 navigation: correct capability check 2013-11-25 13:29:11 +08:00
Rajesh Taneja 13d5afea34 MDL-43028 Navigation: Setting proper page properties on admin pages 2013-11-25 13:29:02 +08:00
Damyon Wiese 025bd122a6 Merge branch 'wip-mdl-42924-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2013-11-25 13:16:37 +08:00
Tim Lock 7ce782e654 MDL-43020: Fix lesson scale warnings when deleting user attempts 2013-11-25 15:10:05 +10:30
Damyon Wiese c3208c17d1 Merge branch 'MDL-42913a-26' of https://github.com/srynot4sale/moodle into MOODLE_26_STABLE 2013-11-25 12:30:23 +08:00
Dan Poltawski 0f4ea5911c Merge branch '43016-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2013-11-25 12:22:56 +08:00
Marina Glancy b955d07c33 MDL-43006 behat: adding javascript tag because of behat bug
behat without JS does not submit the empty textarea field causing notice in the form processing
2013-11-25 15:00:28 +11:00
Dan Marsden 60ee7cebc7 MDL-42992 SCORM: Always allow IE to resize window 2013-11-25 11:18:18 +08:00
Dan Poltawski 6508a3c68e Merge branch 'wip-MDL-43024-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2013-11-25 11:06:41 +08:00
Dan Poltawski 9e2bc0490f Merge branch 'MDL-42858_m26' of git://github.com/rwijaya/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-25 10:49:02 +08:00
Dan Poltawski a2aceccdbe Merge branch 'MDL-42957-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2013-11-25 10:43:31 +08:00
Dan Poltawski d3ec6a9dcf Merge branch 'MDL-42547_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2013-11-25 10:37:36 +08:00
Rajesh Taneja 80140c4592 MDL-42904 self_enrol: Set customint1 if it's null 2013-11-25 10:02:01 +08:00
Tim Lock 7a2b15647e MDL-43020: Fix calculation of lesson scale value warning 2013-11-25 09:33:14 +10:30
Petr Škoda bf5a6920bc MDL-37016 fix sloppy mysql nulls in event.uuid 2013-11-24 15:11:33 +08:00
Mark Nelson 295b622b0b MDL-43037 mod_quiz: retrieve all name fields for the user override pages 2013-11-23 16:18:12 -08:00
rwijaya aa5b71c005 MDL-42851 frontpage: fix rtl in clean theme for course listings 2013-11-22 15:49:06 +08:00
Marina Glancy 5ad8fa096d MDL-43024 course: fixed bug for accessing section options 2013-11-22 12:39:55 +11:00
Tim Lock ab077b368c MDL-43020: Lesson using a scale always gives the minimum scale value 2013-11-22 07:20:24 +10:30
Sam Hemelryk 5e946b2ceb MDL-43016 block_navigation: fixed category link display 2013-11-22 09:00:09 +13:00
Eloy Lafuente (stronk7) ca3b210680 weekly release 2.6+ 2013-11-21 19:33:44 +01:00
rwijaya 2834f79e73 MDL-42858 Course Management: fix regression for subcategories visibility 2013-11-21 15:34:40 +08:00
David Monllao bf752eb38b MDL-42733 behat: Removing the restriction of an started output to handle the PHP errors 2013-11-21 14:35:43 +08:00
Marina Glancy 5018c28e43 MDL-40850 editor: Manage files popup correctly sets the course/cm context 2013-11-21 11:56:36 +11:00
Mark Nelson 2f874214ba MDL-42547 tool_uploaduser: trim values before uploading users 2013-11-20 00:32:15 -08:00
Damyon Wiese 981e960d34 MDL-42930 Release upgrade line: Fix ordering for tinymce 2013-11-20 11:50:38 +08:00
FilipBenco 7843fb7e14 MDL-41635 Reports: Added missing string in loglive reports
Under course administration navigation log live doesn't appear
or appear with empty string (in some themes), this is happening
because text passed is empty.
2013-11-20 11:26:15 +08:00
Ankit Agarwal dbc251e25c MDL-42767 events: Remove ob_clean from tests 2013-11-20 13:22:27 +11:00
Ankit Agarwal bdfb46a2d0 MDL-42767 notes: Delete notes on a course delete 2013-11-20 13:22:07 +11:00
Michael Milette 9da8b39169 MDL-41257 calendar: Day and Upcoming-Events view not processed through text_filters() function
This fix adds text filtering to the Calendar Day view and Upcoming Events view, specifically the event name and event description.

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2013-11-20 09:59:39 +08:00
Aaron Barnes b642702aa2 MDL-42913 lib/grouplib.php: Avoid cache sometimes for groups_get_all_groups
The new groups cache returns unexpected results when you pass
in a field parameter than would normally change the result array index
2013-11-20 12:02:15 +13:00
Rajesh Taneja 740d260ce7 MDL-42924 Administration: use normalize_component to extract plugin name and type 2013-11-19 11:56:04 +08:00
Rajesh Taneja ffe199b1fa MDL-42403 course: Added behat to check visibility of bluk move action 2013-11-19 11:44:48 +08:00
Rajesh Taneja d583059471 MDL-42403 course: Show bluk move to category only when something selected 2013-11-19 11:44:43 +08:00
Dan Poltawski 5af5a205a3 Merge branch '42060-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2013-11-19 10:39:33 +08:00
Tim Hunt 6c816ca22c MDL-42504 quiz autosave: alert users if connection lost.
When the auto-save fails, we alert the user that they may have lost their
internet connection so that they don't do more work that they might just
lose.
2013-11-19 10:31:37 +08:00
M Kassaei f6240d9eea MDL-42181 quiz nav: highight all buttons when all Qs on one page 2013-11-19 10:08:22 +08:00
Damyon Wiese 49d367d47e Merge branch 'm26_MDL-40223' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2013-11-19 09:50:49 +08:00
sam marshall f068ae74db MDL-42905 Backup progress: Pointless line of code should be deleted 2013-11-19 14:39:56 +13:00
Mark Nelson dd7b9d1dce MDL-42553 core_calendar: third party calendar types can now be uninstalled 2013-11-19 14:32:25 +13:00
Adrian Greeve c7232a325a MDL-42850 administration: Updated bulk user upload errors to be more descriptive. 2013-11-19 14:20:32 +13:00
Dan Marsden be335eb8db MDL-40223 SCORM: pass limit into function instead of hardcoding to allow cross-db 2013-11-19 13:24:25 +13:00
Ankit Agarwal ff8cadd271 MDL-41316 tool_spamcleaner: Fix sql queries
AS keyword is not allowed in sql qeries for table alias as Oracle doesn't support it
Thanks to Sara Cenni for suggesting the patch
2013-11-19 12:28:37 +13:00
Sam Hemelryk a34073eeb8 Merge branch 'w47_MDL-42612_m26_paypalruble' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2013-11-19 12:24:41 +13:00
Andrew Nicols 223f133f88 MDL-42774 JavaScript: Ensure that shifter cleans build directories before running 2013-11-19 12:06:59 +13:00
Tim Hunt a47b6805be MDL-42863 make capabilities overview more fault-tolerant. 2013-11-19 12:03:55 +13:00
Tim Hunt 99b936835d MDL-42865 Make XMLDB foreign key check more robust.
Otherwise, installing one bad add-on can completely break this report.
2013-11-19 11:51:06 +13:00
Sam Hemelryk 8bd0487a4b MDL-42852 theme_bootstrapbase: fixed whitespace 2013-11-19 11:44:50 +13:00
Gareth J Barnard 600ad57d35 MDL-42852 lib: Blocks disappear in Clean in RTL.
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-19 11:42:56 +13:00
Jerome Mouneyrac 7628ac73f4 MDL-42184 bootstrapbase: popup should have no header 2013-11-19 10:16:35 +13:00
Sam Hemelryk 64b4fbebd8 Merge branch 'MDL-42853-master' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-19 10:09:18 +13:00
Damyon Wiese 52454bedee Merge branch 'MDL-42100_master' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2013-11-18 16:08:31 +08:00
Tim Hunt 8f74fa4366 MDL-42880 quiz settings: remove unnecessary disabledif rules.
These rules were causing problems in the case where the form was
sumitted with validation errors. In that case, the During the attempt ->
The attempt checkbox was becoming unset, and hence the other During the
attmept checkboxes became disabled, and the values were not saved.

Thanks to Sam Marshall for suggesting this fix.
2013-11-18 15:37:15 +08:00
Damyon Wiese 02e45bf269 Merge branch 'MDL-42808-master' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-11-18 15:27:22 +08:00
Damyon Wiese 28fccc09ce Merge branch 'm26_MDL-41695' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2013-11-18 15:21:01 +08:00
sam marshall 7ed24ca351 MDL-42582 Availability: Restriction display incorrect for multi-para Labels
When a label has multiple paragraphs, its name (converted to plain text)
contains a line feed. Due to an error in regular expressions that don't
accept the line feed, this caused incorrect display on the course page
when that label is shown as a requirement for accessing another activity.
2013-11-18 14:54:55 +08:00
Mark Nelson e98f145ccc MDL-42884 core_user: fixed issue when deleting users with invalid emails throws invalidusername exception 2013-11-18 14:48:36 +08:00
Dan Poltawski 904f5815c7 Merge branch 'MDL-42930-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE
Conflicts:
	mod/scorm/db/upgrade.php
2013-11-18 14:30:50 +08:00
Damyon Wiese d29a7827c4 Merge branch 'm26_MDL-40223' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2013-11-18 14:04:23 +08:00
Petr Škoda 5cd5271673 MDL-42612 add support for Russian Ruble in PayPal 2013-11-18 11:47:18 +08:00
Damyon Wiese 005e784e22 MDL-42930 Add 2.6.0 upgrade line 2013-11-18 11:41:59 +08:00
Sam Hemelryk c20f615105 MDL-42060 block_course_list: fixed sorting of mycourses 2013-11-18 11:15:35 +13:00
Dan Marsden 685badbb2b MDL-41695 SCORM: allow unlimited decimal places in CMIDecimal 2013-11-18 10:27:59 +13:00
Dan Marsden eef55a6333 MDL-40223 SCORM: update scorm->launch param after restore - also check that scorm->launch is valid. 2013-11-18 09:48:02 +13:00
Eloy Lafuente (stronk7) fa28975f25 MDL-42929 backup: keep own version & release updated. 2013-11-17 02:34:50 +01:00
70907 changed files with 1656469 additions and 8232551 deletions
-185
View File
@@ -1,185 +0,0 @@
// 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/>.
/**
* Generates tsconfig.aliases.json for cross-component TypeScript imports.
*
* Moodle ESM source files can import from other components using the alias
* scheme @moodle/lms/<component>/* (e.g. @moodle/lms/core/SomeUtil). This
* file reads the Moodle component registry (.grunt/components.js), finds every
* component that has a js/esm/src/ directory, and writes the corresponding
* TypeScript path mappings to tsconfig.aliases.json.
*
* tsconfig.json extends tsconfig.aliases.json, so TypeScript picks up the
* mappings automatically. The file is skipped if its content is unchanged, to
* avoid unnecessary rebuilds.
*
* This must run before esbuild compilation. The Grunt `jsconfig` task calls
* generateAliases() so that both jsconfig.json and tsconfig.aliases.json are
* kept in sync. The `react` task depends on `jsconfig`, so aliases are always
* up to date before a React build.
*
* @copyright 2026 Adrian Greeve <adrian@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import fs from "fs";
import path from "path";
import { createRequire } from "module";
const rootDir = process.cwd();
const tsconfigOut = path.join(rootDir, "tsconfig.aliases.json");
const TS_ALIASES_WARNING =
"// WARNING: Do not edit this file manually. It is generated by `grunt jsconfig`.\n";
/**
* Load Moodle component paths from `.grunt/components.js`.
*
* @returns {Record<string, string>} Map of component paths to component names.
*/
function loadComponentPathMap() {
const require = createRequire(import.meta.url);
// Load Moodle's components data from .grunt/components.js.
const { fetchComponentData } = require(
path.join(process.cwd(), ".grunt", "components.js")
);
// Format: `{ components: { "public/lib": "core", ... } }`.
const componentsData = fetchComponentData().components;
// Expected:
// `{ "public/lib": "core", "public/ai": "core_ai", ... }`.
return componentsData;
}
/**
* Compare two TypeScript `paths` maps for exact equality.
*
* @param {Record<string, string[]>} a First paths map.
* @param {Record<string, string[]>} b Second paths map.
* @returns {boolean} True when keys and values match in order.
*/
function pathsEqual(a, b) {
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) {
return false;
}
for (const key of aKeys) {
if (!Object.prototype.hasOwnProperty.call(b, key)) {
return false;
}
const aArr = a[key] ?? [];
const bArr = b[key] ?? [];
if (aArr.length !== bArr.length) {
return false;
}
for (let i = 0; i < aArr.length; i++) {
if (aArr[i] !== bArr[i]) {
return false;
}
}
}
return true;
}
/**
* Parse JSON content and tolerate line comments.
*
* @param {string} content Raw JSON/JSONC file content.
* @returns {unknown}
*/
function parseJsonWithComments(content) {
const stripped = content
.replace(/^\uFEFF/, "")
.replace(/^\s*\/\/.*$/gm, "");
return JSON.parse(stripped);
}
/**
* Convert JSON output so single-value arrays are rendered on one line.
*
* @param {unknown} obj Data to stringify.
* @returns {string} JSON string with flattened single-value arrays.
*/
function stringifyFlatArrays(obj) {
const json = JSON.stringify(obj, null, 2);
return TS_ALIASES_WARNING + json.replace(/\[\s+\"(.*?)\"\s+\]/g, '["$1"]') + "\n";
}
/**
* Generate `tsconfig.aliases.json` from Moodle component metadata.
*
* Includes core aliases, discovers plugin React source aliases, and skips
* rewriting when aliases have not changed.
*
* @returns {void}
*/
export function generateAliases() {
const componentPathMap = loadComponentPathMap();
// Build TS paths for tsconfig.aliases.json
/** @type {Record<string, string[]>} */
const tsPaths = {
// Always include core alias.
"@moodle/lms/core/*": ["./public/lib/js/esm/src/*"],
};
for (const [componentPath, componentName] of Object.entries(componentPathMap)) {
const runtimeAliasKey = `@moodle/lms/${componentName}/*`;
const targetPattern = `./${path
.join(componentPath, "js", "esm", "src", "*")
.replace(/\\/g, "/")}`;
tsPaths[runtimeAliasKey] = [targetPattern];
}
const tsconfig = {
compilerOptions: { paths: tsPaths },
};
// If tsconfig paths didn't change, skip regeneration
let previousPaths = null;
let hasWarningHeader = false;
if (fs.existsSync(tsconfigOut)) {
try {
const previousContent = fs.readFileSync(tsconfigOut, "utf8");
hasWarningHeader = previousContent.startsWith(TS_ALIASES_WARNING);
const previousTsconfig = /** @type {{compilerOptions?: {paths?: Record<string, string[]>}}} */ (
parseJsonWithComments(previousContent)
);
previousPaths = previousTsconfig.compilerOptions?.paths ?? {};
} catch {
// ignore parse errors and treat as "no previous cache"
previousPaths = null;
}
}
if (previousPaths && hasWarningHeader && pathsEqual(previousPaths, tsPaths)) {
console.log("✓ Generating tsconfig.aliases.json was skipped. No alias modifications detected.");
return;
}
// Write tsconfig.aliases.json
fs.writeFileSync(tsconfigOut, stringifyFlatArrays(tsconfig));
console.log("✓ Generating tsconfig.aliases.json");
}
-324
View File
@@ -1,324 +0,0 @@
// 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/>.
/**
* Core esbuild library for Moodle ESM components.
*
* This is the single source of all build logic. The Grunt tasks
* (.grunt/tasks/react.js) import from here rather than duplicating
* configuration or build steps.
*
* Source layout convention:
* <component>/js/esm/src/**\/*.{ts,tsx} → <component>/js/esm/build/**\/*.js
*
* Exports:
* createBuildConfig(isDev) esbuild config object; pass isDev=true
* to disable minification / add sourcemaps.
* buildPluginComponents(isDev) Glob for every js/esm/src tree across
* core and plugins, compile all in parallel.
* buildSingleFile(filePath, isDev) Compile one source file; used by the
* Grunt watch task on incremental changes.
* watchComponents(isDev) Start esbuild's native watch mode so the
* compiler rebuilds affected files on save.
* resolveComponentPaths(entry) Map an absolute source path to its
* relative input path and output path.
*
* @copyright 2026 Adrian Greeve <adrian@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import esbuild from "esbuild";
import { glob } from "glob";
import chalk from "chalk";
import path from "path";
import fs from "fs";
const projectRoot = process.cwd();
/**
* Resolve a path from the current project root.
*
* @param {...string} segments Path segments to resolve.
* @returns {string} Absolute path from project root.
*/
const fromRoot = (...segments) => path.resolve(projectRoot, ...segments);
/**
* Create an incremental dot progress indicator.
* Prints one dot per completed build and wraps lines for readability.
*
* @param {number} total Total number of items to build.
* @returns {{ start: () => void, tick: () => void, succeed: (msg: string) => void, fail: (msg: string) => void }}
*/
function createDotProgress(total) {
const dotsPerLine = 60;
let printed = 0;
return {
start: () => {
process.stdout.write(`${chalk.cyan("Building")} `);
},
tick: () => {
printed++;
process.stdout.write(chalk.cyan("."));
if (printed % dotsPerLine === 0 && printed < total) {
process.stdout.write(` ${chalk.dim(`[${printed}/${total}]`)}\n`);
}
},
succeed: (msg) => {
process.stdout.write(` ${chalk.dim(`[${printed}/${total}]`)}\n`);
process.stdout.write(`${chalk.green("✓")} ${msg}\n`);
},
fail: (msg) => {
process.stdout.write(` ${chalk.dim(`[${printed}/${total}]`)}\n`);
process.stdout.write(`${chalk.red("✗")} ${msg}\n`);
},
};
}
/**
* Build a single React component entry file.
*
* @param {string} entry Absolute entry file path.
* @param {import('esbuild').BuildOptions} buildConfig Shared esbuild configuration.
* @returns {Promise<{file: string, output?: string, error: Error|null}>}
*/
async function buildComponent(entry, buildConfig) {
const resolved = resolveComponentPaths(entry);
if (!resolved) {
return { file: entry, error: new Error(`Unknown path pattern: ${entry}`) };
}
const { file, output } = resolved;
fs.mkdirSync(path.dirname(output), { recursive: true });
try {
await esbuild.build({
...buildConfig,
entryPoints: [entry],
outfile: output,
});
return { file, output, error: null };
} catch (error) {
return { file, error: error instanceof Error ? error : new Error(String(error)) };
}
}
/**
* Resolve source and output paths for a component entry.
*
* @param {string} entry Absolute component source path.
* @returns {{file: string, output: string} | null} Relative file info and output path, or null for unsupported paths.
*/
export function resolveComponentPaths(entry) {
const rel = path.relative(projectRoot, entry);
if (rel.includes(path.join('esm', 'src'))) {
const [part, rawFile] = rel.split(path.join('esm', 'src'));
const file = rawFile.replace(/^[\/\\]/, '');
return {
file,
output: fromRoot(part, 'esm', 'build', file.replace(/\.(ts|tsx)$/, '.js')),
};
}
return null;
}
/**
* Run all builds in parallel, showing incremental dot progress.
*
* @param {string[]} entryPoints Absolute entry file paths.
* @param {import('esbuild').BuildOptions} buildConfig Shared esbuild configuration.
* @returns {Promise<{errors: {file: string, output?: string, error: Error|null}[]}>}
*/
async function runParallelBuilds(entryPoints, buildConfig) {
const total = entryPoints.length;
/** @type {{file: string, output?: string, error: Error|null}[]} */
const errors = [];
const startTime = Date.now();
const progress = createDotProgress(total);
progress.start();
await Promise.all(entryPoints.map(async (entry) => {
const result = await buildComponent(entry, buildConfig);
if (result.error) {
errors.push(result);
}
progress.tick();
}));
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
const succeeded = total - errors.length;
if (errors.length > 0) {
progress.fail(`${succeeded}/${total} built · ${elapsed}s`);
for (const e of errors) {
console.error(chalk.red(`${e.file}: ${e.error?.message ?? ''}`));
}
} else {
progress.succeed(chalk.bold(`${total} components built`) + chalk.dim(` · ${elapsed}s`));
}
return { errors };
}
/**
* Create the shared esbuild build configuration.
*
* @param {boolean} isDev Whether development mode is enabled.
* @returns {import('esbuild').BuildOptions} esbuild configuration object.
*/
export function createBuildConfig(isDev) {
return {
bundle: true,
format: "esm",
external: ["react", "react/*", "react-dom", "react-dom/*", "@moodlehq/design-system", "@moodlehq/design-system/*", "@moodle/lms", "@moodle/lms/*"],
jsx: "automatic",
minify: !isDev,
sourcemap: isDev ? 'inline' : false,
jsxDev: isDev,
keepNames: isDev,
treeShaking: !isDev,
define: { 'process.env.NODE_ENV': isDev ? '"development"' : '"production"' },
};
}
/**
* Build all plugin and core React components.
*
* @param {boolean} isDev Whether development mode is enabled.
* @returns {Promise<void>}
*/
export async function buildPluginComponents(isDev) {
console.log(chalk.green('> Building components...'));
const entryPoints = glob.sync("**/js/esm/src/**/*.{ts,tsx}", {
cwd: projectRoot,
absolute: true,
ignore: [
`${process.cwd()}/node_modules/**`,
`${process.cwd()}/vendor/**`,
],
});
const buildConfig = createBuildConfig(isDev);
const { errors } = await runParallelBuilds(entryPoints, buildConfig);
if (errors.length > 0) {
throw new Error(`React build failed: ${errors.length} component(s) could not be built`);
}
}
/**
* Start esbuild in native watch mode over all React components.
*
* Creates a single incremental build context for all entry points so that
* esbuild can reuse its internal graph between rebuilds instead of starting
* from scratch on every file change.
*
* @param {boolean} isDev Whether to build in development mode.
* @param {((srcFiles: string[]) => void) | undefined} [onRebuild] Called with the rebuilt entry source
* files (relative to project root) after each non-initial successful rebuild. Use this to run
* follow-up tasks such as linting without coupling them to this module.
* @returns {Promise<import('esbuild').BuildContext|null>} The active context, or null if no source files exist.
*/
export async function watchComponents(isDev, onRebuild) {
const entryPoints = glob.sync("**/js/esm/src/**/*.{ts,tsx}", {
cwd: projectRoot,
absolute: true,
ignore: [
`${process.cwd()}/node_modules/**`,
`${process.cwd()}/vendor/**`,
],
});
if (entryPoints.length === 0) {
return null;
}
const buildConfig = createBuildConfig(isDev);
// Map each source file to an {in, out} pair so esbuild can write each
// component to its custom output directory while sharing a single context.
// The 'out' path is relative to outdir (projectRoot) and has no extension —
// esbuild appends the appropriate extension automatically.
// Build entry pairs and ensure output directories exist in a single pass.
const entryPairs = entryPoints.flatMap(entry => {
const resolved = resolveComponentPaths(entry);
if (!resolved) {
return [];
}
fs.mkdirSync(path.dirname(resolved.output), { recursive: true });
return [{ in: entry, out: path.relative(projectRoot, resolved.output).replace(/\.js$/, '') }];
});
// Report build results to the terminal after every build (initial and on each change).
// metafile: true populates result.metafile.outputs so we know which files were written.
// On a rebuild only the affected outputs appear, so it effectively names the changed file.
/** @type {import('esbuild').Plugin} */
const watchReporter = {
name: 'watch-reporter',
setup(build) {
let isInitial = true;
let startTime = 0;
build.onStart(() => {
startTime = Date.now();
});
build.onEnd(result => {
const now = new Date().toLocaleTimeString();
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
if (result.errors.length > 0) {
console.error(chalk.red(`[${now}] ✗ Build failed (${result.errors.length} error(s))`) + chalk.dim(` · ${elapsed}s`));
return;
}
const outputs = Object.keys(result.metafile?.outputs ?? {});
console.log(chalk.green(`[${now}] ✓ ${outputs.length} component(s) built`) + chalk.dim(` · ${elapsed}s`));
if (isInitial) {
isInitial = false;
} else if (onRebuild) {
// entryPoint is the source file (relative to projectRoot) that triggered
// this rebuild. Pass it to the caller so they can run follow-up tasks
// (e.g. linting) without this module needing to know about them.
const srcFiles = Object.values(result.metafile?.outputs ?? {})
.map(output => output.entryPoint)
.filter(/** @param {string|undefined} f */ f => !!f);
onRebuild(/** @type {string[]} */ (srcFiles));
}
});
},
};
const ctx = await esbuild.context({
...buildConfig,
entryPoints: entryPairs,
outdir: projectRoot,
metafile: true,
plugins: [watchReporter],
});
await ctx.watch();
return ctx;
}
-266
View File
@@ -1,266 +0,0 @@
{
'plugins': [
'@babel',
'promise',
'jsdoc'
],
'extends': [
'eslint:recommended',
'plugin:promise/recommended'
],
'env': {
'browser': true,
// Enable ES6+ features by default.
// See http://eslint.org/docs/user-guide/configuring#specifying-environments
// Note: The YUI override must exactly match this when disabling the ES6+ version because those features are not supported by Shifter.
'es2020': true,
'amd': true
},
'globals': {
'M': true,
'Y': true
},
// Warn about unused eslint-disable statements.
'reportUnusedDisableDirectives': true,
'rules': {
// See http://eslint.org/docs/rules/ for all rules and explanations of all
// rules.
// === Possible Errors ===
'comma-dangle': 'off',
'no-console': 'error',
'no-empty': 'warn',
'no-extra-parens': 'off',
'no-prototype-builtins': 'off',
'no-unreachable': 'warn',
// === Best Practices ===
// (these mostly match our jshint config)
'array-callback-return': 'warn',
'block-scoped-var': 'warn',
'complexity': 'warn',
'consistent-return': 'warn',
'curly': 'error',
'dot-notation': 'warn',
'no-alert': 'warn',
'no-caller': 'error',
'no-div-regex': 'error',
'no-empty-function': 'warn',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'warn',
'no-floating-decimal': 'warn',
'no-global-assign': 'warn',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-labels': 'error',
'no-loop-func': 'error',
'no-multi-spaces': 'warn',
'no-multi-str': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-redeclare': 'warn',
'no-restricted-globals': ['error', { 'name': 'Notification' }],
'no-return-assign': 'error',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'warn',
'no-throw-literal': 'warn',
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'warn',
'no-useless-escape': 'warn',
'wrap-iife': ['error', 'any'],
// === Variables ===
'no-undef-init': 'error',
'no-unused-vars': ['error', { 'caughtErrors': 'none' }],
// === Stylistic Issues ===
'array-bracket-spacing': 'warn',
'block-spacing': 'warn',
'brace-style': ['warn', '1tbs'],
'camelcase': 'warn',
'capitalized-comments': ['warn', 'always', { 'ignoreConsecutiveComments': true }],
'comma-spacing': ['warn', { 'before': false, 'after': true }],
'comma-style': ['warn', 'last'],
'computed-property-spacing': 'error',
'consistent-this': 'off',
'eol-last': 'off',
'func-call-spacing': ['warn', 'never'],
'func-names': 'off',
'func-style': 'off',
// indent currently not doing well with our wrapping style, so disabled.
'indent': ['off', 4, { 'SwitchCase': 1 }],
'key-spacing': ['warn', { 'beforeColon': false, 'afterColon': true, 'mode': minimum }],
'keyword-spacing': 'warn',
'linebreak-style': ['error', 'unix'],
'lines-around-comment': 'off',
'max-len': ['error', 132],
'max-lines': 'off',
'max-depth': 'warn',
'max-nested-callbacks': ['warn', 5],
'max-params': 'off',
'max-statements': 'off',
'max-statements-per-line': ['warn', { max: 2 }],
'new-cap': ['warn', { 'properties': false }],
'new-parens': 'warn',
'newline-per-chained-call': 'off',
'no-array-constructor': 'off',
'no-bitwise': 'error',
'no-continue': 'off',
'no-inline-comments': 'off',
'no-lonely-if': 'off',
'no-mixed-operators': 'off',
'no-multiple-empty-lines': 'warn',
'no-negated-condition': 'off',
'no-nested-ternary': 'warn',
'no-new-object': 'off',
'no-plusplus': 'off',
'no-tabs': 'error',
'no-ternary': 'off',
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'off',
'no-unneeded-ternary': 'off',
'no-whitespace-before-property': 'warn',
'object-curly-newline': 'off',
'object-curly-spacing': 'warn',
'object-property-newline': 'off',
'one-var': 'off',
'one-var-declaration-per-line': ['warn', 'initializations'],
'operator-assignment': 'off',
'operator-linebreak': 'off',
'padded-blocks': 'off',
'quote-props': ['warn', 'as-needed', {'unnecessary': false, 'keywords': true, 'numbers': true}],
'quotes': 'off',
'semi': 'error',
'semi-spacing': ['warn', {'before': false, 'after': true}],
'sort-vars': 'off',
'space-before-blocks': 'warn',
'space-before-function-paren': ['warn', 'never'],
'space-in-parens': 'warn',
'space-infix-ops': 'warn',
'space-unary-ops': 'warn',
'spaced-comment': 'warn',
'unicode-bom': 'error',
'wrap-regex': 'off',
// === Promises (override plugin:promise/recommended) ===
'promise/always-return': 'warn',
'promise/no-return-wrap': 'warn',
'promise/param-names': 'warn',
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail', 'always'], allowFinally: true}],
'promise/no-native': 'warn',
'promise/avoid-new': 'warn',
// === Deprecations ===
"no-restricted-properties": ['warn', {
'object': 'M',
'property': 'str',
'message': 'Use "core/str" module or M.util.get_string()'
}],
},
overrides: [
{
files: ["**/yui/src/**/*.js"],
'env': {
// Disable ES6+ for YUI files.
'es2020': false,
},
// Disable some rules which we can't safely define for YUI rollups.
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'no-unused-expressions': 'off',
// === JSDocs ===
"jsdoc/check-access": 'off',
"jsdoc/check-alignment": 'off',
"jsdoc/check-param-names": 'off',
"jsdoc/check-property-names": 'off',
"jsdoc/empty-tags": 'off',
"jsdoc/implements-on-classes": 'off',
"jsdoc/multiline-blocks": 'off',
"jsdoc/require-jsdoc": 'off',
"jsdoc/require-param": 'off',
"jsdoc/require-param-name": 'off',
"jsdoc/require-param-type": 'off',
"jsdoc/require-property": 'off',
"jsdoc/require-property-name": 'off',
"jsdoc/require-property-type": 'off',
}
},
{
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile.js", ".grunt/*.js", ".grunt/tasks/*.js", "jsdoc.conf.js"],
// We're using babel transpiling so use their parser
// for linting.
parser: '@babel/eslint-parser',
// Check AMD with some slightly stricter rules.
rules: {
'no-implicit-globals': 'error',
// Disable all of the rules that have babel versions.
'new-cap': 'off',
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'no-invalid-this': 'off',
'object-curly-spacing': 'off',
'quotes': 'off',
'semi': 'off',
'no-unused-expressions': 'off',
// Enable all of the babel version of these rules.
'@babel/new-cap': ['warn', { 'properties': false }],
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'@babel/no-invalid-this': 'off',
'@babel/object-curly-spacing': 'warn',
'@babel/semi': 'error',
'@babel/no-unused-expressions': 'error',
// === Promises ===
// We have Promise now that we're using ES6.
'promise/no-native': 'off',
'promise/avoid-new': 'off',
// === JSDocs ===
'jsdoc/check-access': 'error',
'jsdoc/check-alignment': 1, // Recommended.
'jsdoc/check-param-names': 'error',
'jsdoc/check-property-names': 'error',
'jsdoc/empty-tags': 'error',
'jsdoc/implements-on-classes': 'error',
'jsdoc/multiline-blocks': 'error',
'jsdoc/require-jsdoc': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/require-property': 'error',
'jsdoc/require-property-name': 'error',
'jsdoc/require-property-type': 'error'
},
parserOptions: {
'sourceType': 'module',
'requireConfigFile': false
}
},
{
files: ["**/*.ts", "**/*.tsx"],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true
},
allowSyntheticDefaultImports: true
},
rules: {
// promise/no-native crashes on TypeScript ASTs (same reason it is
// disabled for AMD files above). Native Promises are standard in TS.
'promise/no-native': 'off',
'promise/avoid-new': 'off',
}
}
]
}
-24
View File
@@ -1,24 +0,0 @@
{
"indentation": ["on",{
"Feature": 0,
"Background": 2,
"Scenario": 2,
"Examples": 4,
"example": 6,
"Step": 4,
"given": 4,
"and": 4
}],
"no-dupe-feature-names": "on",
"no-dupe-scenario-names": "off",
"no-empty-file": "on",
"no-files-without-scenarios": "on",
"no-multiple-empty-lines": "on",
"no-partially-commented-tag-lines": "on",
"no-trailing-spaces": "on",
"no-unnamed-features": "on",
"no-unnamed-scenarios": "on",
"no-scenario-outlines-without-examples": "on",
"no-examples-in-scenarios": "on",
"new-line-at-eof": ["on", "yes"]
}
-9
View File
@@ -1,9 +0,0 @@
**/yui/build/** -diff
**/amd/build/** -diff
**.js.map -diff
**-min.js -diff
**.min.js -diff
# Remove composer lock file changes from standard diff views.
/composer.lock -diff
/lib/js/bundles/*/*.js -diff
-2
View File
@@ -1,2 +0,0 @@
# Primary donations pages.
custom: ["https://moodle.com/donations/"]
-7
View File
@@ -1,7 +0,0 @@
*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***
The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.
See CONTRIBUTING.md guidelines for how to contribute patches for Moodle. Thank you.
--
-6
View File
@@ -1,6 +0,0 @@
> [!IMPORTANT]
> PLEASE DO NOT PUBLISH SECURITY FINDINGS PUBLICLY.
If you discover a potential security issue, please report it via our [Security Submission Form](https://moodle.org/security/report).
For more information about our security processes and responsible disclosure policy, see the [Security Procedures documentation](https://moodledev.io/general/development/process/security).
-1
View File
@@ -1 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1231.24 314.44" preserveAspectRatio="xMinYMid meet"><defs><style>.cls-1{fill:#f48020;}.cls-2,.cls-3{fill:#383738;stroke:#4a4a4c;}.cls-2{stroke-width:2.37px;}.cls-3{stroke-width:2.38px;}.cls-4{fill:#585858;}</style></defs><title>Moodle_Logo_UseonBlack_RGB</title><path class="cls-1" d="M1086.3,235.34a53.42,53.42,0,0,0,16.71,29q13.26,12.27,29.48,12.27,11.29,0,24.56-5.89,16.23-6.88,16.22-16.22l58-.49q-12.29,29-41.76,45.2-27.52,15.23-60.43,15.24-42.25,0-70-26.29t-27.75-68.54q0-43.73,27.75-69.51t72-25.8q48.15,0,75.17,31.94,25.07,29.47,25.06,79.1Zm89.91-33.91q-3.43-17.69-14.73-29-12.8-12.28-29.49-12.29-17.21,0-28.74,11.79t-15.47,29.48Z"/><path class="cls-1" d="M965.45,308.54V0h55V308.54Z"/><path class="cls-1" d="M892.69,308.54V290.36q-7.38,9.83-25.06,15.72a92.31,92.31,0,0,1-30,5.41q-39.31,0-63.13-27T750.7,217.65q0-39.3,23.34-65.84t62.15-26.53q43.71,0,56.5,23.58V0h53.55V308.54Zm0-102.68q0-14.75-14-28.26t-28.74-13.51q-21.12,0-33.41,17.2-10.8,15.24-10.8,37.33,0,21.63,10.8,36.85,12.29,17.71,33.41,17.69,12.78,0,27.76-12t15-24.81Z"/><path class="cls-1" d="M647,313.45q-41.77,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.75,0,69.27,26.53t27.52,68.28q0,41.79-27.52,68.3T647,313.45ZM647,168q-19.89,0-30.58,15.07t-10.68,35.79q0,20.73,9.94,35.05,11.43,16.31,31.32,16.28t31.32-16.28q10.44-14.31,10.44-35.05t-9.94-35Q667.42,168,647,168Z"/><path class="cls-1" d="M448.07,313.45q-41.76,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.74,0,69.28,26.53t27.5,68.28q0,41.79-27.5,68.3T448.07,313.45Zm0-145.43q-19.89,0-30.59,15.07t-10.69,35.79q0,20.73,9.94,35.05,11.43,16.31,31.34,16.28t31.32-16.28q10.42-14.31,10.44-35.05t-9.94-35Q468.45,168,448.07,168Z"/><path class="cls-1" d="M288.89,309.11V201q0-33.9-28-33.9t-28,33.9V309.11h-55V201q0-33.9-27.52-33.9-28,0-28,33.9V309.11h-55V194.65q0-35.37,24.56-53.54,21.61-16.22,58.46-16.22,37.35,0,55,19.16,15.23-19.16,55.51-19.16,36.86,0,58.45,16.22,24.57,18.16,24.57,53.54V309.11Z"/><path class="cls-2" d="M.76,145.76"/><path class="cls-3" d="M1.73,145.32"/><path class="cls-4" d="M173.86,116.85l55.08-40.1-.7-2.44C135,83.92,80.42,96.44,0,144.13l.73,2.38,21-.67c15.17.52,30.85,1.26,46,1.32-1,24.09.83,32.65.83,32.65,51.92,17.58,101.22,1.53,127.14-43.9A248.72,248.72,0,0,0,173.86,116.85Z"/><path class="cls-4" d="M113.78,110c-.3-1.08-2.23-1.48-4.28-.9a4.73,4.73,0,0,0-3.14,2.19c-18.53,5-49.16,13.72-70.73,21l-1.33.45c-16.68,5.61-24.73,8.49-25.22,12.55-2.29,18.44-.87,42.18-.86,42.48l.19,6.4c-9.74,27.56.06,49.6,8.38,69.77.06-24.92,1.07-45.22-6-71-.2-3.82-1.49-30.36.61-47.34.34-2.75,11.65-6.56,23.63-10.59l1.33-.44c22-7.42,53.57-16.39,71.9-21.29a6.75,6.75,0,0,0,2.29-.25C112.64,112.43,114.08,111.09,113.78,110Z"/></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

-31
View File
@@ -1,31 +0,0 @@
name: 'Close Pull Requests'
on:
pull_request_target:
types: opened
workflow_dispatch:
jobs:
close:
# Avoid forks to run this job
if: github.repository_owner == 'moodle'
name: Close Pull Requests
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v4
with:
process-only: prs
close-pr: true
skip-closed-pr-comment: true
pr-comment: >
**Please, don't open pull requests via GitHub.**
This repository (moodle.git) at GitHub is just a mirror of the official Moodle repository.
For how to contribute patches for Moodle see
[CONTRIBUTING.md](https://github.com/moodle/moodle/blob/main/CONTRIBUTING.md).
Closing this pull request.
-118
View File
@@ -1,118 +0,0 @@
name: Run tests in a Composed Moodle Setup
on:
push:
branches-ignore:
- main
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.4
jobs:
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
postgres:
image: ${{ matrix.db == 'pgsql' && 'postgres:16' || '' }}
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-24.04
php: 8.3
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-24.04
php: 8.4
db: pgsql
steps:
- name: Run MySQL Server
if: ${{ matrix.db == 'mysqli' }}
run: |
docker run --rm \
-e MYSQL_DATABASE=test \
-e MYSQL_USER=test \
-e MYSQL_PASSWORD=test \
-e MYSQL_ROOT_PASSWORD=test \
-p 3306:3306 \
-d \
--tmpfs /var/lib/mysql:rw,noexec,nosuid,size=1024M \
mysql:8.4 \
--skip-log-bin \
--collation-server=utf8mb4_bin
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v5
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
tools: composer
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v6
with:
path: 'moodle'
- name: 'Preparing the environment'
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
sudo locale-gen en_AU.UTF-8
- name: Create the new Composer Project
run: |
mkdir testsite
cp moodle/.github/workflows/composed/composer.json testsite/composer.json
cp moodle/.github/workflows/composed/config.php testsite/config.php
mkdir -p testsite/data/moodledata
mkdir -p testsite/data/phpunitdata
- name: Install the Moodle test site
working-directory: testsite
run: |
composer install --no-interaction
- name: Setting up PHPUnit
working-directory: testsite
env:
dbtype: ${{ matrix.db }}
run: |
php moodle/public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
working-directory: testsite
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: |
vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
-25
View File
@@ -1,25 +0,0 @@
{
"type": "project",
"require": {
"moodle/composer-installer": "^1",
"moodle/moodle-composer-scaffold": "^1",
"moodle/moodle": "@dev",
"moodle/moodle-testing": "^1.0"
},
"repositories": [
{
"name": "moodleundertest",
"type": "path",
"url": "../moodle"
}
],
"config": {
"audit": {
"block-insecure": false
},
"allow-plugins": {
"moodle/composer-installer": true,
"moodle/moodle-composer-scaffold": true
}
}
}
-67
View File
@@ -1,67 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Template configuraton file for GitHub Actions CI/CD using Composer.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a GitHub Actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = __DIR__ . '/data/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = __DIR__ . '/data/phpunitdata';
$CFG->phpunit_prefix = 't_';
$CFG->routerconfigured = true;
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
-73
View File
@@ -1,73 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Template configuraton file for github actions CI/CD.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a github actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = realpath(dirname(__DIR__)) . '/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = realpath(dirname(__DIR__)) . '/phpunitdata';
$CFG->phpunit_prefix = 't_';
$CFG->routerconfigured = true;
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
// TODO: add others (solr, mongodb, memcached, ldap...).
// Too much for now: define('PHPUNIT_LONGTEST', true); // Only leaves a few tests out and they are run later by CI.
require_once(__DIR__ . '/lib/setup.php');
-143
View File
@@ -1,143 +0,0 @@
name: One by One Testing
# Run all the individual unit tests one by one, with
# fully independent PHPUnit executions. Useful to
# detect issues with some tests that are using stuff
# that has been made available by others, but is not
# available when running individually.
#
# Note that we aren't using PHPUnit's own isolation
# here but completely separated runs, one for each
# test.
#
# The workflow will fail reporting all the tests
# that have failed (and will pass if no failure is
# detected, of course).
#
# It's only executed via workflow dispatch (automated
# or manual), not by push/tag. And acceptd configuration
# of phpunit, specially useful to run it with PHPUnit's
# own isolation or any other option.
on:
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
chunks: 7
jobs:
collect:
name: Collect individual unit tests
runs-on: ubuntu-latest
outputs:
matrix: ${{steps.individual-tests.outputs.matrix }}
steps:
- name: Checking out code
uses: actions/checkout@v4
- name: Looking for all individual tests
id: individual-tests
run: |
count=0 # Number of individual tests found.
while read -r testfile; do # For each test file.
while read -r testname; do # For each unit test in a file.
count=$((count + 1))
# Sent it to the correct chunk file.
chunk=$(((($count % $chunks)) + 1))
echo "$testname $testfile" >> ./chunk_$chunk.txt
done < <(grep "function test_" "${testfile}" | sed -r "s/^.*function (test_[a-zA-Z0-9_]+).*/\1/")
done < <(find . -name "*_test.php" -not -path "*/fixtures/*")
# Generate the matrix to run tests.
echo "matrix=$(ls -1 chunk_*.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
echo "$count individual tests collected in $chunks files"
- name: Upload individual tests files
uses: actions/upload-artifact@v4
with:
name: individual_tests
path: chunk_*.txt
retention-days: 1
test:
name: Run tests
needs: collect
runs-on: ubuntu-latest
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.collect.outputs.matrix) }}
steps:
- name: Setting up DB pgsql
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 16
postgresql db: test
postgresql user: test
postgresql password: test
- name: Setting up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
ini-values: max_input_vars=5000
coverage: none
- name: Checking out code
uses: actions/checkout@v4
- name: Download individual test files
uses: actions/download-artifact@v4
with:
name: individual_tests # Make all the chunk files available for the next steps.
- name: Setting up PHPUnit
env:
dbtype: pgsql
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Run PHPUnit test (one by one)
env:
dbtype: pgsql
run: |
status=0
count=0
while read -r line; do # For each line in the chunk file
count=$((count + 1))
filter="${line% *}"
file="${line#* }"
# Run the individual unit test and report problems if needed to.
if ! php vendor/bin/phpunit \
--fail-on-empty-test-suite \
--fail-on-warning \
--fail-on-risky \
--filter "$filter" ${{ inputs.phpunit_extra_options }} \
"$file" >/dev/null 2>&1; then
if [ $status -eq 0 ]; then
echo "Problems found, list of PHPUnit commands failing:"
fi
echo "vendor/bin/phpunit --filter '${filter}' ${{ inputs.phpunit_extra_options }} $file"
status=$((status + 1))
fi
done < ${{ matrix.file }}
echo "Finished: $count individual tests executed, $status tests failed"
exit $status
-128
View File
@@ -1,128 +0,0 @@
name: Core
on:
push:
branches-ignore:
- main
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.4
jobs:
Grunt:
runs-on: ubuntu-24.04
steps:
- name: Checking out code
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm install
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
postgres:
image: ${{ matrix.db == 'pgsql' && 'postgres:16' || '' }}
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-24.04
php: 8.3
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-24.04
php: 8.4
db: pgsql
steps:
- name: Run MySQL Server
if: ${{ matrix.db == 'mysqli' }}
run: |
docker run --rm \
-e MYSQL_DATABASE=test \
-e MYSQL_USER=test \
-e MYSQL_PASSWORD=test \
-e MYSQL_ROOT_PASSWORD=test \
-p 3306:3306 \
-d \
--tmpfs /var/lib/mysql:rw,noexec,nosuid,size=1024M \
mysql:8.4 \
--skip-log-bin \
--collation-server=utf8mb4_bin
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v4
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v4
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
- name: Git status
run: git status
-23
View File
@@ -1,23 +0,0 @@
name: Web Installer Testing
on:
workflow_dispatch:
jobs:
InstallationTest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.4]
steps:
- name: Construct repository URL
run: echo "REPOSITORY_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> $GITHUB_ENV
shell: bash
- uses: moodlehq/moodle-webinstaller-test@main
with:
repository: ${{ env.REPOSITORY_URL }}
branch: ${{ github.ref_name }}
php: ${{ matrix.php }}
-149
View File
@@ -1,149 +0,0 @@
name: Windows Testing
on:
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.4
jobs:
Grunt:
runs-on: windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checking out code
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm ci
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
php: 8.4
# Ideally we should use mysql/mariadb, but they are 4x slower without tweaks and configuration
# so let's run only postgres (1.5h vs 6h) only, If some day we want to improve the mysql runs,
# this is the place to enable them.
# db: mysqli
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
- os: windows-latest
php: 8.3
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: 8.4
user: test
password: test
- name: Creating DB mysql
if: ${{ matrix.db == 'mysqli' }}
run: mysql --host 127.0.0.1 -utest -ptest -e 'CREATE DATABASE IF NOT EXISTS test COLLATE = utf8mb4_bin;';
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
run: |
# TODO: Remove these conf. modifications when php74 or php80 are lowest.
# Change to old md5 auth, because php73 does not support it.
# #password_encryption = scram-sha-256
(Get-Content "$env:PGDATA\postgresql.conf"). `
replace('#password_encryption = scram-sha-256', 'password_encryption = md5') | `
Set-Content "$env:PGDATA\postgresql.conf"
(Get-Content "$env:PGDATA\pg_hba.conf"). `
replace('scram-sha-256', 'md5') | `
Set-Content "$env:PGDATA\pg_hba.conf"
$pgService = Get-Service -Name postgresql*
Set-Service -InputObject $pgService -Status running -StartupType automatic
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
& $env:PGBIN\psql --command="CREATE USER test PASSWORD 'test'" --command="\du"
- name: Creating DB pgsql
if: ${{ matrix.db == 'pgsql' }}
run: |
& $env:PGBIN\createdb --owner=test test
$env:PGPASSWORD = 'test'
& $env:PGBIN\psql --username=test --host=localhost --list test
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v4
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v4
# Needs to be done after php is available, git configured and Moodle checkout has happened.
- name: Setting up moodle-exttests service
run: |
git clone https://github.com/moodlehq/moodle-exttests.git
nssm install php-built-in C:\tools\php\php.exe -S localhost:8080 -t D:\a\moodle\moodle\moodle-exttests
nssm start php-built-in
- name: Setting up redis service
run: |
choco install redis --version 5.0.7 --no-progress
nssm install redis redis-server
nssm start redis
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
shell: bash
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
php public/admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
+6 -34
View File
@@ -9,26 +9,15 @@
#
# See gitignore(5) man page for more details
#
# Swap files (vim)
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Temporary files including undo
*~
#
/config.php
/lib/editor/tinymce/extra/tools/temp/
*~
*.swp
/tags
/TAGS
/cscope.*
/.patches/
/.idea/
.phpstorm.*
!/.phpstorm.meta.php/
/.phpstorm.meta.php/*
!/.phpstorm.meta.php/di.php
/nbproject/
CVS
.DS_Store
@@ -36,28 +25,11 @@ CVS
/.project
/.buildpath
/.cache
.phpunit.result.cache
phpunit.xml
# Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us.
# Composer support - only composer.json is to be in git, the rest is installed in each checkout.
composer.phar
composer.lock
/vendor/
/behat.yml
*/yui/build/*/*-coverage.js
/public/lib/yuilib/*/build/*/*-coverage.js
# lib/yuilib/version/module/module-coverage.js
/public/lib/yuilib/*/*/*-coverage.js
atlassian-ide-plugin.xml
/node_modules/
/.vscode/
moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
/public/admin/tool/componentlibrary/docs
/public/admin/tool/componentlibrary/hugo/site/data/my-index.json
.hugo_build.lock
phpcs.xml
jsconfig.json
UPGRADING-CURRENT.md
.phpunit.cache
tsconfig.aliases.json
/lib/yuilib/*/build/*/*-coverage.js
-169
View File
@@ -1,169 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This is a babel plugin to add the Moodle module names to the AMD modules
* as part of the transpiling process.
*
* In addition it will also add a return statement for the default export if the
* module is using default exports. This is a highly specific Moodle thing because
* we're transpiling to AMD and none of the existing Babel 7 plugins work correctly.
*
* This will fix the issue where an ES6 module using "export default Foo" will be
* transpiled into an AMD module that returns {default: Foo}; Instead it will now
* just simply return Foo.
*
* Note: This means all other named exports in that module are ignored and won't be
* exported.
*
* @copyright 2018 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
module.exports = ({template, types}) => {
const fs = require('fs');
const path = require('path');
const cwd = process.cwd();
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
/**
* Search the list of components that match the given file name
* and return the Moodle component for that file, if found.
*
* Throw an exception if no matching component is found.
*
* @throws {Error}
* @param {string} searchFileName The file name to look for.
* @return {string} Moodle component
*/
function getModuleNameFromFileName(searchFileName) {
searchFileName = fs.realpathSync(searchFileName);
const relativeFileName = searchFileName.replace(`${cwd}${path.sep}`, '').replace(/\\/g, '/');
const [componentPath, file] = relativeFileName.split('/amd/src/');
const fileName = file.replace('.js', '');
// Check subsystems first which require an exact match.
const componentName = ComponentList.getComponentFromPath(componentPath);
if (componentName) {
return `${componentName}/${fileName}`;
}
// This matches the previous PHP behaviour that would throw an exception
// if it couldn't parse an AMD file.
throw new Error(`Unable to find module name for ${searchFileName} (${componentPath}::${file}}`);
}
/**
* This is heavily inspired by the babel-plugin-add-module-exports plugin.
* See: https://github.com/59naga/babel-plugin-add-module-exports
*
* This is used when we detect a module using "export default Foo;" to make
* sure the transpiled code just returns Foo directly rather than an object
* with the default property (i.e. {default: Foo}).
*
* Note: This means that we can't support modules that combine named exports
* with a default export.
*
* @param {String} path
* @param {String} exportObjectName
*/
function addModuleExportsDefaults(path, exportObjectName) {
const rootPath = path.findParent(path => {
return path.key === 'body' || !path.parentPath;
});
// HACK: `path.node.body.push` instead of path.pushContainer(due doesn't work in Plugin.post).
// This is hardcoded to work specifically with AMD.
rootPath.node.body.push(template(`return ${exportObjectName}.default`)());
}
return {
pre() {
this.seenDefine = false;
this.addedReturnForDefaultExport = false;
},
visitor: {
// Plugin ordering is only respected if we visit the "Program" node.
// See: https://babeljs.io/docs/en/plugins.html#plugin-preset-ordering
//
// We require this to run after the other AMD module transformation so
// let's visit the "Program" node.
Program: {
exit(path) {
path.traverse({
CallExpression(path) {
// If we find a "define" function call.
if (!this.seenDefine && path.get('callee').isIdentifier({name: 'define'})) {
// We only want to modify the first instance of define that we find.
this.seenDefine = true;
// Get the Moodle component for the file being processed.
var moduleName = getModuleNameFromFileName(this.file.opts.filename);
// The function signature of `define()` is:
// define = function (name, deps, callback) {...}
// Ensure that if the moduel supplied its own name that it is replaced.
if (path.node.arguments.length > 0) {
// Ensure that there is only one name.
if (path.node.arguments[0].type === 'StringLiteral') {
// eslint-disable-next-line
console.log(`Replacing module name '${path.node.arguments[0].extra.rawValue}' with ${moduleName}`);
path.node.arguments.shift();
}
}
// Add the module name as the first argument to the define function.
path.node.arguments.unshift(types.stringLiteral(moduleName));
// Add a space after the define function in the built file so that previous versions
// of Moodle will not try to add the module name to the file when it's being served
// by PHP. This forces the regex in PHP to not match for this file.
path.node.callee.name = 'define ';
}
// Check for any Object.defineProperty('exports', 'default') calls.
if (!this.addedReturnForDefaultExport && path.get('callee').matchesPattern('Object.defineProperty')) {
const [identifier, prop] = path.get('arguments');
const objectName = identifier.get('name').node;
const propertyName = prop.get('value').node;
if ((objectName === 'exports' || objectName === '_exports') && propertyName === 'default') {
addModuleExportsDefaults(path, objectName);
this.addedReturnForDefaultExport = true;
}
}
},
AssignmentExpression(path) {
// Check for an exports.default assignments.
if (
!this.addedReturnForDefaultExport &&
(
path.get('left').matchesPattern('exports.default') ||
path.get('left').matchesPattern('_exports.default')
)
) {
const objectName = path.get('left.object.name').node;
addModuleExportsDefaults(path, objectName);
this.addedReturnForDefaultExport = true;
}
}
}, this);
}
}
}
};
};
-455
View File
@@ -1,455 +0,0 @@
// 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/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
/** @var {Object} A list of subsystems in Moodle */
const componentData = {};
/**
* Load details of all moodle modules.
*
* @returns {object}
*/
const fetchComponentData = () => {
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const gruntFilePath = process.cwd();
if (!Object.entries(componentData).length) {
componentData.subsystems = {};
componentData.pathList = [];
componentData.components = {};
componentData.standardComponents = {};
// Fetch the component definiitions from the distributed JSON file.
const components = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/components.json`));
const pluginData = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/plugins.json`));
componentData.pluginTypes = components.plugintypes
const standardPlugins = Object.entries(pluginData.standard).map(
([pluginType, pluginNames]) => {
return pluginNames.map(pluginName => `${pluginType}_${pluginName}`);
}
).reduce((acc, val) => acc.concat(val), []);
// Build the list of moodle subsystems.
componentData.subsystems['public/lib'] = 'core';
componentData.pathList.push(`${process.cwd()}/public/lib`);
for (const [component, thisPath] of Object.entries(components.subsystems)) {
if (thisPath) {
// Prefix "core_" to the front of the subsystems.
componentData.subsystems[thisPath] = `core_${component}`;
componentData.pathList.push(`${process.cwd()}/${thisPath}`);
}
}
// The list of components includes the list of subsystems.
componentData.components = Object.fromEntries(
Object.entries(componentData.subsystems)
.map(([path, name]) => ([path, name]))
);
const subpluginAdder = (subpluginType, subpluginTypePath) => {
glob.sync(`${subpluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${subpluginType}_${componentName}`;
componentData.components[`${subpluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
});
};
// Go through each of the plugintypes.
Object.entries(components.plugintypes).forEach(([pluginType, pluginTypePath]) => {
// We don't allow any code in this place..?
glob.sync(`${pluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${pluginType}_${componentName}`;
componentData.components[`${pluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
// Look for any subplugins.
const subPluginConfigurationFile = `${componentPath}/db/subplugins.json`;
if (fs.existsSync(subPluginConfigurationFile)) {
const subpluginList = JSON.parse(fs.readFileSync(fs.realpathSync(subPluginConfigurationFile)));
if (subpluginList.subplugintypes) {
Object.entries(subpluginList.subplugintypes).forEach(([subpluginType, subpluginTypePath]) => {
subpluginAdder(
subpluginType,
`${pluginTypePath}/${componentName}/${subpluginTypePath}`
);
});
} else if (subpluginList.plugintypes) {
Object.entries(subpluginList.plugintypes).forEach(([subpluginType, subpluginTypePath]) => {
subpluginAdder(subpluginType, `public/${subpluginTypePath}`);
});
}
}
});
});
// Create a list of the standard subsystem and plugins.
componentData.standardComponents = Object.fromEntries(
Object.entries(componentData.components).filter(([, name]) => {
if (name === 'core' || name.startsWith('core_')) {
return true;
}
return standardPlugins.indexOf(name) !== -1;
})
);
componentData.componentMapping = Object.fromEntries(
Object.entries(componentData.components).map(([path, name]) => [name, path])
);
}
return componentData;
};
/**
* Get the list of component paths.
*
* @param {string} relativeTo
* @returns {array}
*/
const getComponentPaths = (relativeTo = '') => fetchComponentData().pathList.map(componentPath => {
return componentPath.replace(relativeTo, '');
});
/**
* Get the list of paths to build AMD sources.
*
* @returns {Array}
*/
const getAmdSrcGlobList = () => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
globList.push(`${componentPath}/amd/src/*.js`);
globList.push(`${componentPath}/amd/src/**/*.js`);
});
return globList;
};
/**
* Get the list of paths to build YUI sources.
*
* @param {String} relativeTo
* @returns {Array}
*/
const getYuiSrcGlobList = relativeTo => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
const relativeComponentPath = componentPath.replace(relativeTo, '');
globList.push(`${relativeComponentPath}/yui/src/**/*.js`);
});
return globList;
};
/**
* Get the list of paths to thirdpartylibs.xml.
*
* @param {String} relativeTo
* @returns {Array}
*/
const getThirdPartyLibsList = relativeTo => {
const fs = require('fs');
const path = require('path');
const pathList = fetchComponentData().pathList
.map(componentPath => path.relative(relativeTo, componentPath) + '/thirdpartylibs.xml')
.map(componentPath => componentPath.replace(/\\/g, '/'))
.filter(path => fs.existsSync(path));
pathList.push('lib/thirdpartylibs.xml');
return pathList.sort();
};
/**
* Get the list of thirdparty library paths.
*
* @returns {array}
*/
const getThirdPartyPaths = () => {
const DOMParser = require('@xmldom/xmldom').DOMParser;
const fs = require('fs');
const path = require('path');
const xpath = require('xpath');
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
const libs = ['node_modules/', 'vendor/'];
const addLibToList = lib => {
if (!lib.match('\\*') && fs.statSync(lib).isDirectory()) {
// Ensure trailing slash on dirs.
lib = lib.replace(/\/?$/, '/');
}
// Look for duplicate paths before adding to array.
if (libs.indexOf(lib) === -1) {
libs.push(lib);
}
};
thirdpartyfiles.forEach(function(file) {
const dirname = path.dirname(file);
const xmlContent = fs.readFileSync(file, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const nodes = xpath.select("/libraries/library/location/text()", doc);
nodes.forEach(function(node) {
let lib = path.posix.join(dirname, node.toString());
addLibToList(lib);
});
});
return libs;
};
/**
* Find the name of the component matching the specified path.
*
* @param {String} path
* @returns {String|null} Name of matching component.
*/
const getComponentFromPath = path => {
const componentList = fetchComponentData().components;
if (componentList.hasOwnProperty(path)) {
return componentList[path];
}
return null;
};
/**
* Check whether the supplied path, relative to the Gruntfile.js, is in a known component.
*
* @param {String} checkPath The path to check. This can be with either Windows, or Linux directory separators.
* @returns {String|null}
*/
const getOwningComponentDirectory = checkPath => {
const path = require('path');
// Fetch all components into a reverse sorted array.
// This ensures that components which are within the directory of another component match first.
const pathList = Object.keys(fetchComponentData().components).sort().reverse();
for (const componentPath of pathList) {
// If the componentPath is the directory being checked, it will be empty.
// If the componentPath is a parent of the directory being checked, the relative directory will not start with ..
if (!path.relative(componentPath, checkPath).startsWith('..')) {
return componentPath;
}
}
return null;
};
/**
* Get the latest tag in a remote GitHub repository.
*
* @param {string} url The remote repository.
* @returns {Array}
*/
const getRepositoryTags = async(url) => {
const gtr = require('git-tags-remote');
try {
const tags = await gtr.get(url);
if (tags !== undefined) {
return tags;
}
} catch (error) {
return [];
}
return [];
};
/**
* Get the list of thirdparty libraries that could be upgraded.
*
* @returns {Array}
*/
const getThirdPartyLibsUpgradable = async() => {
const libraries = getThirdPartyLibsData().filter((library) => !!library.repository);
const upgradableLibraries = [];
const versionCompare = (a, b) => {
if (a === b) {
return 0;
}
const aParts = a.split('.');
const bParts = b.split('.');
for (let i = 0; i < Math.min(aParts.length, bParts.length); i++) {
const aPart = parseInt(aParts[i], 10);
const bPart = parseInt(bParts[i], 10);
if (aPart > bPart) {
// 1.1.0 > 1.0.9
return 1;
} else if (aPart < bPart) {
// 1.0.9 < 1.1.0
return -1;
} else {
// Same version.
continue;
}
}
if (aParts.length > bParts.length) {
// 1.0.1 > 1.0
return 1;
}
// 1.0 < 1.0.1
return -1;
};
for (let library of libraries) {
upgradableLibraries.push(
getRepositoryTags(library.repository).then((tagMap) => {
library.version = library.version.replace(/^v/, '');
const currentVersion = library.version.replace(/moodle-/, '');
const currentMajorVersion = library.version.split('.')[0];
const tags = [...tagMap]
.map((tagData) => tagData[0])
.filter((tag) => !tag.match(/(alpha|beta|rc)/))
.map((tag) => tag.replace(/^v/, ''))
.sort((a, b) => versionCompare(b, a));
if (!tags.length) {
library.warning = "Unable to find any comparable tags.";
return library;
}
library.latestVersion = tags[0];
tags.some((tag) => {
if (!tag) {
return false;
}
// See if the version part matches.
const majorVersion = tag.split('.')[0];
if (majorVersion === currentMajorVersion) {
library.latestSameMajorVersion = tag;
return true;
}
return false;
});
if (versionCompare(currentVersion, library.latestVersion) > 0) {
// Moodle somehow has a newer version than the latest version.
library.warning = `Newer version found: ${currentVersion} > ${library.latestVersion} for ${library.name}`;
return library;
}
if (library.version !== library.latestVersion) {
// Delete version and add it again at the end of the array. That way, current and new will stay closer.
delete library.version;
library.version = currentVersion;
return library;
}
return null;
})
);
}
return (await Promise.all(upgradableLibraries)).filter((library) => !!library);
};
/**
* Get the list of paths to build react sources.
*
* @param {string} relativeTo
* @returns {string[]}
*/
const getReactTsSrcGlobList = (relativeTo = '') => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
const relativeComponentPath = componentPath.replace(relativeTo, '');
globList.push(`${relativeComponentPath}/js/esm/src/**/*.ts`);
globList.push(`${relativeComponentPath}/js/esm/src/**/*.tsx`);
});
return globList.map(componentPath => componentPath.replace(/\\/g, '/'));
};
/**
* Get the list of thirdparty libraries.
*
* @returns {Array}
*/
const getThirdPartyLibsData = () => {
const DOMParser = require('@xmldom/xmldom').DOMParser;
const fs = require('fs');
const xpath = require('xpath');
const path = require('path');
const libraryList = [];
const libraryFields = [
'location',
'name',
'version',
'repository',
];
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
thirdpartyfiles.forEach(function(libraryPath) {
const xmlContent = fs.readFileSync(libraryPath, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const libraries = xpath.select("/libraries/library", doc);
for (const library of libraries) {
const libraryData = [];
for (const field of libraryFields) {
libraryData[field] = xpath.select(`${field}/text()`, library)?.toString();
}
libraryData.location = path.join(path.dirname(libraryPath), libraryData.location);
libraryList.push(libraryData);
}
});
return libraryList.sort((a, b) => a.location.localeCompare(b.location));
};
module.exports = {
fetchComponentData,
getAmdSrcGlobList,
getComponentFromPath,
getComponentPaths,
getOwningComponentDirectory,
getYuiSrcGlobList,
getThirdPartyLibsList,
getThirdPartyPaths,
getThirdPartyLibsUpgradable,
getReactTsSrcGlobList,
};
-19
View File
@@ -1,19 +0,0 @@
# Moodle JavaScript Documentation
```
.-..-.
_____ | || |
/____/-.---_ .---. .---. .-.| || | .---.
| | _ _ |/ _ \/ _ \/ _ || |/ __ \
* | | | | | || |_| || |_| || |_| || || |___/
|_| |_| |_|\_____/\_____/\_____||_|\_____)
Moodle - the world's open source learning platform
```
## About
This generated documentation includes API documentation for JavaScript written in the AMD and ES2015 module formats within Moodle.
## Related information
See [https://moodledev.io](https://moodledev.io) for other related Developer Documentation.
-131
View File
@@ -1,131 +0,0 @@
// 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/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
// Do not include any plugins as stanard.
const plugins = [];
plugins.push('plugins/markdown');
/**
* Get the source configuration.
*
* @return {Object}
*/
const getSource = () => {
const glob = require('glob');
const path = require('path');
const ComponentList = require(path.resolve('.grunt/components.js'));
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
const source = {
include: [],
includePattern: ".+\\.js$",
};
let includeList = [];
ComponentList.getAmdSrcGlobList().forEach(async pattern => {
includeList.push(...glob.sync(pattern));
});
const cwdLength = process.cwd().length + 1;
includeList.forEach(path => {
if (source.include.indexOf(path) !== -1) {
// Ensure no duplicates.
return;
}
const relPath = path.substring(cwdLength);
if (thirdPartyPaths.indexOf(relPath) !== -1) {
return;
}
source.include.push(path);
});
source.include.push('.grunt/jsdoc/README.md');
return source;
};
const tags = {
// Allow the use of unknown tags.
// We have a lot of legacy uses of these.
allowUnknownTags: true,
// We make use of jsdoc and closure dictionaries as standard.
dictionaries: [
'jsdoc',
'closure',
],
};
// Template configuraiton.
const templates = {
cleverLinks: false,
monospaceLinks: false,
};
module.exports = {
opts: {
destination: "./public/jsdoc/",
template: "node_modules/docdash",
},
plugins,
recurseDepth: 10,
source: getSource(),
sourceType: 'module',
tags,
templates,
docdash: {
collapse: true,
search: true,
sort: true,
sectionOrder: [
"Namespaces",
"Modules",
"Events",
"Classes",
"Externals",
"Mixins",
"Tutorials",
"Interfaces"
],
"menu": {
"Developer Docs": {
href: "https://moodledev.io",
target: "_blank",
"class": "menu-item",
id: "devdocs"
},
"MDN Docs": {
href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
target: "_blank",
"class": "menu-item",
id: "mdndocs",
},
},
typedefs: true,
},
};
-138
View File
@@ -1,138 +0,0 @@
// 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/>.
import * as Components from '../../components.js';
const componentData = Components.fetchComponentData();
/**
* The standard components shipped with core Moodle.
*
* @type {Object}
*/
export const standardComponents = componentData.standardComponents;
/**
* All components of the current Moodle instance.
*
* @type {Object}
*/
export const allComponents = componentData.components;
/**
* Get all components of the current Moodle instance.
*
* @returns {Array}
*/
export const getAllComponents = () => {
let components = new Map(Object.entries(componentData.pluginTypes).map(([value, path]) => ([path,{
path,
value,
name: `${value} (plugin type)`,
}])));
Object
.entries(componentData.components)
.filter(([path, value]) => Object.values(componentData.standardComponents).includes(value))
.forEach(([path, value]) => {
const entry = {
path,
value,
name: value,
};
if (Object.values(componentData.subsystems).includes(value)) {
if (components.has(path)) {
entry.name = `${value} (subsystem / plugintype)`;
} else {
entry.name = `${value} (subsystem)`;
}
}
components.set(path, entry);
});
return Array.from(components.values());
};
/**
* Whether the specified component is a standard component shipped with core Moodle.
*
* @param {string} componentName
* @returns {boolean}
*/
export const isStandardComponent = (componentName) => {
if (Object.values(componentData.standardComponents).includes(componentName)) {
return true;
}
if (Object.keys(componentData.pluginTypes).includes(componentName)) {
return true;
}
return false;
};
export const rewritePlugintypeAsSubsystem = (componentName) => {
if (Object.keys(componentData.pluginTypes).includes(componentName)) {
const pluginTypePath = componentData.pluginTypes[componentName];
if (Object.keys(componentData.subsystems).includes(pluginTypePath)) {
return true;
}
}
return false;
};
/**
* Whether the specified component is a community component.
*
* @param {string} componentName
* @returns {boolean}
*/
export const isCommunityComponent = (componentName) => {
if (isStandardComponent(componentName)) {
return false;
}
return Object.values(componentData.components).indexOf(componentName) !== -1;
};
/**
* Sort method for components.
*
* This method sorts components putting `core` first, followed by core subsystems, then everything else.
*
* @param {String} a
* @param {String} b
* @returns {Number}
*/
export const sortComponents = (a, b) => {
// Always put 'core' first.
if (a === 'core') {
return -1;
} else if (b === 'core') {
return 1;
}
// Put core subsystems next.
if (a.startsWith('core_') && !b.startsWith('core_')) {
return -1;
} else if (b.startsWith('core_') && !a.startsWith('core_')) {
return 1;
}
// Sort alphabetically for everything else.
return a.localeCompare(b);
};
-85
View File
@@ -1,85 +0,0 @@
#!/usr/bin/env node
// 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/>.
import inquirer from 'inquirer';
import chalk from 'chalk';
import { createNote } from './note.mjs';
import { getInitialValues, getIssueNumberFromBranchName } from './helpers.mjs';
import * as Prompts from './prompts.mjs';
import logger from './logger.mjs';
export default async (options) => {
// Processs the initial values.
const initialValues = getInitialValues(options);
// Fetch information.
const messages = [];
const { issueNumber } = await inquirer.prompt([
Prompts.getIssuePrompt(getIssueNumberFromBranchName()),
], initialValues);
let selection = {};
let notePath;
do {
selection = {};
selection = await inquirer.prompt([
Prompts.getComponentsPrompt(),
Prompts.getTypePrompt(),
Prompts.getMessagePromptInput(),
], initialValues);
if (selection.message === '') {
selection = Object.assign(
selection,
await inquirer.prompt([
Prompts.getMessagePromptEditor(),
]),
);
}
logger.info(`
Creating upgrade note with the following options:
- Issue: ${chalk.bold(issueNumber)}
- Component: ${chalk.bold(selection.components)}
- Type: ${chalk.bold(selection.type)}
- Message:
${chalk.bold(selection.message)}
`);
messages.push({
components: [selection.components],
type: selection.type,
message: selection.message,
});
// Save the note so far.
if (notePath) {
await createNote(issueNumber, messages, notePath);
logger.info(`Updated note at: ${chalk.underline(chalk.bold(notePath))}`);
} else {
notePath = await createNote(issueNumber, messages);
logger.info(`Note created at: ${chalk.underline(chalk.bold(notePath))}`);
}
selection = Object.assign(
selection,
await inquirer.prompt([
Prompts.getAddAnotherPrompt(),
], initialValues),
);
} while (selection.addAnother);
};
-357
View File
@@ -1,357 +0,0 @@
#!/usr/bin/env node
// 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/>.
import chalk from 'chalk';
import { getAllComponents } from './components.mjs';
import { getCombinedNotesByComponent, deleteAllNotes } from './note.mjs';
import { getNoteName } from './noteTypes.mjs';
import { writeFile, readFile, unlink } from 'fs/promises';
import { join as joinPath } from 'path';
import logger from './logger.mjs';
import { getCurrentVersion } from './helpers.mjs';
/**
* Helper to fetch the current notes from a file.
*
* @param {string} file
* @returns {Promise<string>}
*/
const getCurrentNotes = async (file) => {
try {
return await readFile(file, 'utf8');
} catch (error) {
return null;
}
}
/**
* Update the UPGRADING.md file.
*
* @param {string} upgradeNotes
* @param {Object} options
* @param {boolean} options.deleteNotes
* @returns {Promise<void>}
*/
const updateUpgradeNotes = async (upgradeNotes, options) => {
const fileName = 'UPGRADING.md';
// Write the notes to a file.
logger.info(`Writing notes to ${chalk.underline(chalk.bold(fileName))}`);
// Prepend to the existing file.
const existingContent = await getCurrentNotes(fileName);
if (existingContent) {
await writeFile(fileName, getUpdatedNotes(existingContent, upgradeNotes));
} else {
// This should not normally happen.
await writeFile(fileName, upgradeNotes);
}
if (options.deleteNotes) {
logger.warn(`>>> Deleting all notes <<<`)
// Delete the notes.
deleteAllNotes();
}
};
/**
* Create the current summary notes.
*
* @param {string} upgradeNotes
* @returns {Promise<void>}
*/
const createCurrentSummary = async (upgradeNotes) => {
const fileName = 'UPGRADING-CURRENT.md';
const notes = `# Moodle upgrade notes\n\n${upgradeNotes}`;
await writeFile(fileName, notes);
logger.info(`Running upgrade notes written to ${chalk.underline(chalk.bold(fileName))}`);
};
/**
* Get the indexes of the lines that contain the version headings.
*
* @param {array<string>} lines
* @returns {array<object>}
*/
const getVersionLineIndexes = (lines) => {
const h2Indexes = [];
lines.forEach((line, index) => {
const matches = line.match(/^##\s(?<version>.*)$/);
if (matches) {
h2Indexes.push({
index,
line,
version: matches.groups.version,
});
}
});
return h2Indexes;
};
/**
* Find the index of the Unreleased heading.
*
* @param {array<object>} versionHeadings
* @returns {number}
*/
const findUnreleasedHeadingIndex = (versionHeadings) => versionHeadings.findIndex((heading) => {
if (heading.version === 'Unreleased') {
// Used if version cannot be guessed.
return true;
}
if (heading.version.endsWith('+')) {
// Weekly release for a stable branch.
return true;
}
if (heading.version.match(/beta|rc\d/)) {
// Beta and RC rolls are treated as weeklies.
return true;
}
if (heading.version.endsWith('dev')) {
// Development version.
return true;
}
return false;
});
/**
* Get the before and after content, to facilitate replacing any existing Unreleased notes.
*
* @param {array<string>} lines
* @returns {Object} {beforeContent: string, afterContent: string}
*/
const getBeforeAndAfterContent = (lines) => {
const existingLines = lines.split('\n');
const versionHeadings = getVersionLineIndexes(existingLines);
if (versionHeadings.length > 0) {
const unreleasedHeadingIndex = findUnreleasedHeadingIndex(versionHeadings);
if (unreleasedHeadingIndex !== -1) {
const beforeContent = existingLines.slice(0, versionHeadings[unreleasedHeadingIndex].index).join('\n');
if (versionHeadings.length > unreleasedHeadingIndex + 1) {
const afterContent = existingLines.slice(versionHeadings[unreleasedHeadingIndex + 1].index).join('\n');
return {
beforeContent,
afterContent,
};
}
return {
beforeContent,
afterContent: '',
};
}
return {
beforeContent: existingLines.slice(0, versionHeadings[0].index).join('\n'),
afterContent: existingLines.slice(versionHeadings[0].index).join('\n'),
};
}
return {
beforeContent: existingLines.join('\n'),
afterContent: '',
}
};
/**
* Get the notes for the component.
*
* @param {string} types
* @param {Number} headingLevel
* @returns {string}
*/
const getNotesForComponent = (types, headingLevel) => {
let upgradeNotes = '';
Object.entries(types).forEach(([type, notes]) => {
upgradeNotes += '#'.repeat(headingLevel);
upgradeNotes += ` ${getNoteName(type)}\n\n`;
notes.forEach(({ message, issueNumber }) => {
// Split the message into lines, removing empty lines.
const messageLines = message
.split('\n')
// Remove empty lines between tables, and list entries, but not after lists.
.filter((line, index, lines) => {
if (line.trim().length === 0) {
// This line is empty.
// If it's the first line in the file, remove it.
if (index === 0) {
return false;
}
// This is the last line in the file, remove it.
if (index === lines.length - 1) {
return false;
}
// If the previous line relates to a table, remove this line.
if (lines[index - 1].match(/^\s*\|/)) {
return false;
}
// If the next line is also empty, do not remove this line.
if (lines[index + 1].trim().length === 0) {
return true;
}
// Do not remove the line if the previous line was a list item.
if (lines[index - 1].match(/^\s*[-*]\s/)) {
return true;
}
if (lines[index - 1].match(/^\s*\d+\.\s/)) {
return true;
}
// Preserve all other empty lines by default.
return true;
}
// Keep any line which has content.
return true;
});
const firstLine = messageLines.shift().trim();
upgradeNotes += `- ${firstLine}\n`;
messageLines
.forEach((line) => {
upgradeNotes += ` ${line}`.trimEnd() + `\n`;
});
upgradeNotes += `\n For more information see [${issueNumber}](https://tracker.moodle.org/browse/${issueNumber})\n`;
});
upgradeNotes += '\n';
});
return upgradeNotes;
};
/**
* Get the updated notes mixed with existing content.
*
* @param {string} existingContent
* @param {string} upgradeNotes
*/
const getUpdatedNotes = (existingContent, upgradeNotes) => {
const { beforeContent, afterContent } = getBeforeAndAfterContent(existingContent);
const newContent = `${beforeContent}\n${upgradeNotes}\n${afterContent}`
.split('\n')
.filter((line, index, lines) => {
if (line === '' && lines[index - 1] === '') {
// Remove multiple consecutive empty lines.
return false;
}
return true;
})
.join('\n');
return newContent;
};
/**
* Update the notes for each component.
*/
const updateComponentNotes = (
notes,
version,
notesFileName = 'UPGRADING.md',
removeEmpty = false,
) => {
return getAllComponents().map(async (component) => {
logger.verbose(`Updating notes for ${component.name} into ${component.path}`);
const fileName = joinPath(component.path, notesFileName);
const existingContent = await getCurrentNotes(fileName);
if (!existingContent) {
if (!notes[component.value]) {
// No existing notes, and no new notes to add.
return;
}
} else {
if (!notes[component.value]) {
// There is existing content, but nothing to add.
if (removeEmpty) {
logger.verbose(`Removing empty notes file ${fileName}`);
await unlink(fileName);
}
return;
}
}
const componentNotes = notes[component.value];
let upgradeNotes = `## ${version}\n\n`;
upgradeNotes += getNotesForComponent(componentNotes, 3);
if (existingContent) {
await writeFile(fileName, getUpdatedNotes(existingContent, upgradeNotes));
} else {
await writeFile(
fileName,
`# ${component.name} Upgrade notes\n\n${upgradeNotes}`,
);
}
});
}
/**
* Generate the upgrade notes for a new release.
*
* @param {string|undefined} version
* @param {Object} options
* @param {boolean} options.generateUpgradeNotes
* @param {boolean} options.deleteNotes
* @returns {Promise<void>}
*/
export default async (version, options = {}) => {
const notes = await getCombinedNotesByComponent();
if (Object.keys(notes).length === 0) {
logger.warn('No notes to generate');
return;
}
if (!version) {
version = await getCurrentVersion();
}
// Generate the upgrade notes for this release.
// We have
// - a title with the release name
// - the change types
// - which contain the components
// - which document each change
let upgradeNotes = `## ${version}\n\n`;
Object.entries(notes).forEach(([component, types]) => {
upgradeNotes += `### ${component}\n\n`;
upgradeNotes += getNotesForComponent(types, 4);
});
await Promise.all([
createCurrentSummary(upgradeNotes),
...updateComponentNotes(notes, version, 'UPGRADING-CURRENT.md', true),
]);
if (options.generateUpgradeNotes) {
await Promise.all(updateComponentNotes(notes, version));
await updateUpgradeNotes(upgradeNotes, options);
}
};
-244
View File
@@ -1,244 +0,0 @@
// 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/>.
import chalk from 'chalk';
import branchName from 'current-git-branch';
import { isStandardComponent, isCommunityComponent, rewritePlugintypeAsSubsystem } from './components.mjs';
import { isValidNoteName } from './noteTypes.mjs';
import logger from './logger.mjs';
import { readFile } from 'fs/promises';
/**
* Validate an issue number input
*
* @param {string} input
* @returns {string|boolean}
*/
export const validateIssueNumber = (input) => {
if (!input) {
return 'You must provide a tracker issue number';
}
if (input.match(/^[a-zA-Z]*-\d+$/)) {
return true;
}
if (input.match(/^\d+$/)) {
return true;
}
return 'The issue number was not recognised as a valid issue number';
};
/**
* Format an issue number input.
*
* @param {string} input
* @returns {string}
*/
export const formatIssueNumber = (input) => {
if (input.match(/^[a-zA-Z]*-\d+$/)) {
return input;
}
if (input.match(/^\d+$/)) {
return `MDL-${input}`;
}
return input;
};
/**
* Get the issue number, based off current git branch name
*
* @returns {string|null}
*/
export const getIssueNumberFromBranchName = () => {
const issueNumber = String(branchName()).match(/^[a-zA-Z]*-\d+/);
if (issueNumber) {
return formatIssueNumber(issueNumber[0]);
}
return null;
};
/**
* Validate a component.
*
* @param {string} input
* @returns {string|boolean}
*/
export const validateComponent = (input) => {
if (isStandardComponent(input)) {
return true;
}
if (isCommunityComponent(input)) {
return 'Currently only core plugins are supported.';
}
return 'The component was not recognised as a standard component';
};
export const formatComponent = (input) => {
if (rewritePlugintypeAsSubsystem(input)) {
return `core_${input}`;
}
return input;
}
/**
* Get the initial values from the options.
*
* @param {object} options
* @returns {object}
*/
export const getInitialValues = (options) => {
const initialValues = {};
const type = getInitialTypeValue(options);
if (type) {
initialValues.type = type;
}
const issueNumber = getInitialIssueValue(options);
if (issueNumber) {
initialValues.issueNumber = issueNumber;
}
const component = getInitialComponentValue(options);
if (component) {
initialValues.components = component;
}
const message = getInitialMessageValue(options);
if (message) {
initialValues.message = message
initialValues.addAnother = false;
}
return initialValues;
};
/**
* Get the initial type value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialTypeValue = (options) => {
if (!options.type) {
return;
}
options.type = options.type.trim().toLowerCase();
if (isValidNoteName(options.type)) {
return options.type;
}
logger.warn(`Note type "${chalk.underline(chalk.red(options.type))}" is not valid.`);
};
/**
* Get the initial issue number value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialIssueValue = (options) => {
if (!options.issue) {
return;
}
options.issue = options.issue.trim().toUpperCase();
const issueNumberValidated = validateIssueNumber(options.issue);
if (issueNumberValidated === true) {
const issueNumber = formatIssueNumber(options.issue);
if (issueNumber !== options.issue) {
logger.warn(
`Issue number "${chalk.underline(chalk.red(options.issue))}" was updated to ` +
`"${chalk.underline(chalk.green(issueNumber))}"`
);
}
return issueNumber;
} else {
logger.warn(`Issue number "${chalk.underline(chalk.red(options.issue))}" is not valid: ${issueNumberValidated}`);
}
};
/**
* Get the initial component value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialComponentValue = (options) => {
if (!options.component) {
return;
}
options.component = options.component.trim().toLowerCase();
const componentValidated = validateComponent(options.component);
if (componentValidated === true) {
const component = formatComponent(options.component);
if (component !== options.component) {
logger.warn(
`Component "${chalk.underline(chalk.red(options.component))}" was updated to ` +
`"${chalk.underline(chalk.green(component))}"`
);
}
return component;
} else {
logger.warn(`Component "${chalk.underline(chalk.red(options.component))}" is not valid: ${componentValidated}`);
}
};
/**
* Get the initial message value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialMessageValue = (options) => {
if (!options.message) {
return;
}
return options.message.trim();
};
/**
* Get the current version from the project /version.php file.
*
* @returns {Promise<string>}
*/
export const getCurrentVersion = async () => {
const versionRegex = new RegExp(/^ *\$release *= *['\"](?<release>[^ \+]+\+?) *\(Build:.*/m);
try {
const versionFile = await readFile('public/version.php', 'utf8');
const match = versionFile.match(versionRegex);
if (match) {
return match.groups.release;
}
} catch(error) {
logger.error('Unable to read the version file');
}
return "Unreleased";
}
-30
View File
@@ -1,30 +0,0 @@
#!/usr/bin/env node
// 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/>.
import winston from 'winston';
const logger = winston.createLogger({
level: 'info',
format: winston.format.combine(
winston.format.colorize(),
winston.format.simple()
),
transports: [
new winston.transports.Console(),
],
});
export default logger;
-194
View File
@@ -1,194 +0,0 @@
// 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/>.
import yaml from 'js-yaml';
import path from 'path';
import { writeFile, mkdir, readdir, readFile, unlink } from 'fs/promises';
import { isValidNoteName, sortNoteTypes } from './noteTypes.mjs';
import { sortComponents } from './components.mjs';
const unreleasedPath = path.resolve('.upgradenotes');
/**
* Get the filename for the note.
*
* @param {string} issueNumnber The issue number
* @returns {string}
*/
const getFilename = (issueNumber) => {
const dateTimeFormat = new Intl.DateTimeFormat(undefined, {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
fractionalSecondDigits: 2,
timeZone: 'UTC',
});
const date = Object.fromEntries(
dateTimeFormat.formatToParts(new Date())
.filter((p) => p.type !== 'literal')
.map((p) => ([p.type, p.value]))
);
const dateString = [
date.year,
date.month,
date.day,
date.hour,
date.minute,
date.second,
date.fractionalSecond,
].join('');
return `${issueNumber}-${dateString}.yml`;
};
/**
* Create a new note.
*
* @param {string} issueNumber
* @param {[type: string]: {message: string}} messages
* @returns {string} The path to the note on disk
*/
export const createNote = async (
issueNumber,
messages,
notePath,
) => {
const note = {
issueNumber,
notes: {},
};
messages.forEach(({components, type, message}) => {
note.notes[components] = note.notes[components] || [];
note.notes[components].push({message, type});
});
if (!notePath) {
notePath = path.resolve(unreleasedPath, getFilename(issueNumber));
}
const noteContent = yaml.dump(note);
await mkdir(unreleasedPath, {recursive: true});
await writeFile(notePath, noteContent);
return notePath;
};
/**
* Get all unreleased notes.
*
* @returns {Promise<{issueNumber: string, components: string[], types: {[type: string]: {message: string}[]}}[]>
*/
export const getAllNotes = async () => {
const files = await readdir(unreleasedPath);
const notes = files
.filter((file) => file.endsWith('.yml'))
.map(async (file) => {
const filePath = path.resolve(unreleasedPath, file);
const fileContent = await readFile(filePath, 'utf8');
return {
...yaml.load(fileContent),
filePath,
};
});
return Promise.all(notes);
};
/**
* Get the list of notes, grouped by note type, then component.
*
* @returns {Promise<{[type: string]: {[components: string]: {message: string, issueNumber: string}[]}}>}
*/
export const getCombinedNotes = async () => {
const notes = await getAllNotes();
const combinedNotes = {};
notes.forEach((note) => {
Object.entries(note.notes).forEach(([components, data]) => {
data.forEach((entry) => {
if (!isValidNoteName(entry.type)) {
throw new Error(`Invalid note type: "${entry.type}" in file ${note.filePath}`);
}
combinedNotes[entry.type] = combinedNotes[entry.type] || {};
combinedNotes[entry.type][components] = combinedNotes[entry.type][components] || [];
combinedNotes[entry.type][components].push({message: entry.message, issueNumber: note.issueNumber});
});
});
});
return combinedNotes;
};
/**
* Get the list of notes, grouped by component, then by note type.
*
* @returns {Promise<{[component: string]: {[type: string]: {message: string, issueNumber: string}[]}}>}
*/
export const getCombinedNotesByComponent = async () => {
const notes = await getAllNotes();
const combinedNotes = {};
notes.forEach((note) => {
Object.entries(note.notes).forEach(([component, data]) => {
combinedNotes[component] = combinedNotes[component] || {};
data.forEach((entry) => {
if (!isValidNoteName(entry.type)) {
throw new Error(`Invalid note type: "${entry.type}" in file ${note.filePath}`);
}
combinedNotes[component][entry.type] = combinedNotes[component][entry.type] || [];
combinedNotes[component][entry.type].push({
component,
message: entry.message,
issueNumber: note.issueNumber,
type: entry.type,
});
});
});
});
// Sort notes by note type.
Object.entries(combinedNotes).forEach(([component, types]) => {
combinedNotes[component] = Object.fromEntries(
Object.entries(types).sort(([a], [b]) => sortNoteTypes(a, b))
);
});
// Sort components.
return Object.fromEntries(
Object.entries(combinedNotes).sort(([a], [b]) => sortComponents(a, b))
);
};
/**
* Delete all unreleased notes.
*
* @returns {Promise<void>}
*/
export const deleteAllNotes = async () => {
const files = await readdir(unreleasedPath);
return Promise.all(
files
.filter((item, index) => files.indexOf(item) === index)
.filter((file) => file.endsWith('.yml'))
.map((file) => unlink(`${unreleasedPath}/${file}`))
);
};
-80
View File
@@ -1,80 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The note types.
*
* Matches the suggested order in https://keepachangelog.com/en/1.1.0/.
* @type {Object<string, string>}
*/
const noteTypes = {
'improved': 'Added',
'changed': 'Changed',
'deprecated': 'Deprecated',
'removed': 'Removed',
'fixed': 'Fixed',
};
/**
* The preferred order of note types.
*
* @type {string[]}
*/
const preferredOrder = Object.keys(noteTypes);
/**
* Comparison method to sort note types.
*
* @param {String} a
* @param {String} b
* @returns {Number}
*/
export const sortNoteTypes = (a, b) => {
const aIndex = preferredOrder.indexOf(a);
const bIndex = preferredOrder.indexOf(b);
if (aIndex === -1) {
return 1;
}
if (bIndex === -1) {
return -1;
}
return aIndex - bIndex;
};
/**
* Get the note names.
*
* @returns {string[]}
*/
export const getNoteNames = () => Object.keys(noteTypes);
/**
* Get the human-readable note name.
*
* @param {string} type
* @returns {string}
*/
export const getNoteName = (type) => noteTypes[type];
/**
* Whether the note name is valid.
*
* @param {string} type
* @returns {boolean}
*/
export const isValidNoteName = (type) => noteTypes[type] !== undefined;
-153
View File
@@ -1,153 +0,0 @@
// 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/>.
import inquirer from 'inquirer';
import SearchList from 'inquirer-search-list';
import { getNoteNames } from './noteTypes.mjs';
import { getAllComponents } from './components.mjs';
import {
formatComponent,
formatIssueNumber,
validateComponent,
validateIssueNumber,
} from './helpers.mjs';
/**
* A Search List which accepts an initial value.
*/
class SearchListWithInitialValue extends SearchList {
constructor(options, ...args) {
super(options, ...args);
if (options.default) {
const pointer = this.filterList.findIndex((item) => {
return item.value === options.default;
});
if (pointer > -1) {
this.pointer = pointer;
}
}
}
}
inquirer.registerPrompt('search-list', SearchListWithInitialValue);
/**
* Get the issue type prompt.
*
* @param {string} defaultData The initially selected value
* @returns {Object}
*/
export const getTypePrompt = (defaultData) => ({
default: defaultData,
type: 'search-list',
message: 'Type of change',
name: 'type',
choices: getNoteNames(),
validate: (selection) => {
if (selection.length < 1) {
return 'You must select at least one type of change';
}
return true;
},
});
/**
* Get the component prompt.
*
* @param {string} [defaultValue='core'] The initally selected value.
* @returns
*/
export const getComponentsPrompt = (defaultValue) => {
if (!defaultValue ) {
defaultValue = 'core';
}
return {
choices: getAllComponents(),
default: defaultValue,
type: 'search-list',
message: 'Component',
name: 'components',
validate: validateComponent,
filter: formatComponent,
};
};
/**
* Get the issue number prompt as an inline input.
*
* @param {string} defaultData
* @returns {object}
*/
export const getIssuePrompt = (defaultData) => ({
default: defaultData,
type: 'input',
message: 'Tracker issue number',
name: 'issueNumber',
validate: validateIssueNumber,
filter: formatIssueNumber,
});
/**
* Get a message prompt.
*
* @param {string} defaultData
* @returns
*/
export const getMessagePromptEditor = (defaultData) => ({
default: defaultData,
type: process.stdin.isTTY ? 'editor' : 'input',
postfix: '.md',
message: 'Message',
name: 'message',
waitUserInput: false,
validate: (input) => {
if (!input) {
return 'You must provide a message';
}
return true;
},
// Remove any trailing whitespace.
filter: (input) => input.split('\n').map((line) => line.trimEnd()).join('\n'),
});
/**
* Get a message prompt.
*
* @param {string} defaultData
* @returns
*/
export const getMessagePromptInput = (defaultData) => ({
default: defaultData,
type: 'input',
message: 'Message (leave empty to use editor)',
name: 'message',
filter: (input) => input.trim(),
});
/**
* Get a prompt to ask the user if they wish to add another entry.
*
* @returns {Object}
*/
export const getAddAnotherPrompt = () => ({
type: 'confirm',
message: 'Do you want to add another note?',
default: false,
name: 'addAnother',
});
-58
View File
@@ -1,58 +0,0 @@
#!/usr/bin/env node
// 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/>.
import { getAllComponents } from './components.mjs';
import { getCombinedNotesByComponent } from './note.mjs';
import logger from './logger.mjs';
import { existsSync } from 'fs';
/**
* Generate links to component-specific upgrade notes for each component.
*
* @param {string|undefined} tag The git tag to link to
* @returns {Promise<void>}
*/
export default async (tag) => {
const notes = await getCombinedNotesByComponent();
if (Object.keys(notes).length === 0) {
logger.warn('No notes to generate');
return;
}
if (!tag) {
logger.error('No tag provided');
return;
}
// Generate the links for the components which have upgrade notes in this release.
let upgradeNotes = `### Component API updates\n<!--cspell: disable -->\n\n`;
const componentList = Object.fromEntries(
Object.values(getAllComponents()).map(({path, value}) => [value, path]),
);
Object.entries(notes)
.map(([component]) => ({
component,
componentPath: componentList[component],
}))
.filter(({ componentPath }) => existsSync(`./${componentPath}/UPGRADING.md`))
.forEach(({component, componentPath}) => {
upgradeNotes += `- [${component}](https://github.com/moodle/moodle/blob/${tag}/${componentPath}/UPGRADING.md)\n`;
});
console.log(upgradeNotes);
};
-142
View File
@@ -1,142 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* Component Library build tasks.
*
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Get a child path of the component library.
*
* @param {string} path
* @returns {string}
*/
const getCLPath = path => `public/admin/tool/componentlibrary/${path}`;
/**
* Get a spawn handler.
*
* This is a generic function to write the spawn output, and then to exit if required and mark the async task as
* complete.
*
* @param {Promise} done
* @returns {function}
*/
const getSpawnHandler = done => (error, result, code) => {
grunt.log.write(result);
if (error) {
grunt.log.error(result.stdout);
process.exit(code);
}
done();
};
/**
* Spawn a function against Node with the provided args.
*
* @param {array} args
* @returns {object}
*/
const spawnNodeCall = (args) => grunt.util.spawn({
cmd: 'node',
args,
}, getSpawnHandler(grunt.task.current.async()));
/**
* Build the docs using Hugo.
*
* @returns {Object} Reference to the spawned task
*/
const docsBuild = () => spawnNodeCall([
'node_modules/hugo-bin/cli.js',
'--config', getCLPath('config.yml'),
'--cleanDestinationDir',
]);
/**
* Build the docs index using the hugo-lunr-indexer.
*
* @returns {Object} Reference to the spawned task
*/
const indexBuild = () => spawnNodeCall([
'node_modules/hugo-lunr-indexer/bin/hli.js',
'-i', getCLPath('content/**'),
'-o', getCLPath('hugo/site/data/my-index.json'),
'-l', 'yaml',
'-d', '---',
]);
/**
* Build the hugo CSS.
*
* @returns {Object} Reference to the spawned task
*/
const cssBuild = () => spawnNodeCall([
'node_modules/sass/sass.js',
'--style', 'expanded',
'--source-map',
'--embed-sources',
'--precision', 6,
'--load-path', `${process.cwd()}/public`,
getCLPath('hugo/scss/docs.scss'),
getCLPath('hugo/dist/css/docs.css'),
]);
// Register the various component library tasks.
grunt.registerTask('componentlibrary:docsBuild', 'Build the component library', docsBuild);
grunt.registerTask('componentlibrary:cssBuild', 'Build the component library', cssBuild);
grunt.registerTask('componentlibrary:indexBuild', 'Build the component library', indexBuild);
grunt.registerTask('componentlibrary', 'Build the component library', [
'componentlibrary:docsBuild',
'componentlibrary:cssBuild',
'componentlibrary:indexBuild',
]);
grunt.config.merge({
watch: {
componentLibraryDocs: {
files: [
getCLPath('content/**/*.md'),
getCLPath('hugo'),
],
tasks: ['componentlibrary:docsBuild', 'componentlibrary:indexBuild'],
},
componentLibraryCSS: {
files: [
getCLPath('hugo/scss/**/*.scss'),
'hugo',
],
tasks: ['componentlibrary:cssBuild'],
},
},
});
// Add the 'componentlibrary' task as a startup task.
grunt.moodleEnv.startupTasks.push('componentlibrary');
return {
docsBuild,
cssBuild,
indexBuild,
};
};
-72
View File
@@ -1,72 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
const files = grunt.moodleEnv.files;
// Project configuration.
grunt.config.merge({
eslint: {
// Even though warnings dont stop the build we don't display warnings by default because
// at this moment we've got too many core warnings.
// To display warnings call: grunt eslint --show-lint-warnings
// To fail on warnings call: grunt eslint --max-lint-warnings=0
// Also --max-lint-warnings=-1 can be used to display warnings but not fail.
options: {
quiet: (!grunt.option('show-lint-warnings')) && (typeof grunt.option('max-lint-warnings') === 'undefined'),
maxWarnings: ((typeof grunt.option('max-lint-warnings') !== 'undefined') ? grunt.option('max-lint-warnings') : -1)
},
// Check AMD src files.
amd: {src: files ? files : grunt.moodleEnv.amdSrc},
// Check YUI module source files.
yui: {src: files ? files : grunt.moodleEnv.yuiSrc},
// Check React source files.
'react': {
options: {
fix: true,
},
src: files ? files : grunt.moodleEnv.reactSrc,
},
},
});
grunt.loadNpmTasks('grunt-eslint');
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('eslint.amd.src', files);
grunt.config('eslint.yui.src', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', (action, filepath) => {
changedFiles[filepath] = action;
onChange();
});
};
-92
View File
@@ -1,92 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Get the list of feature files to pass to the gherkin linter.
*
* @returns {Array}
*/
const getGherkinLintTargets = () => {
if (grunt.moodleEnv.files) {
// Specific files were requested. Only check these.
return grunt.moodleEnv.files;
}
if (grunt.moodleEnv.inComponent) {
return [`${grunt.moodleEnv.runDir}/tests/behat/*.feature`];
}
return ['**/tests/behat/*.feature'];
};
const handler = function() {
const done = this.async();
const options = grunt.config('gherkinlint.options');
// Grab the gherkin-lint linter and required scaffolding.
const linter = require('gherkin-lint/dist/linter.js');
const featureFinder = require('gherkin-lint/dist/feature-finder.js');
const configParser = require('gherkin-lint/dist/config-parser.js');
const formatter = require('gherkin-lint/dist/formatters/stylish.js');
// Run the linter.
return linter.lint(
featureFinder.getFeatureFiles(grunt.file.expand(options.files)),
configParser.getConfiguration(configParser.defaultConfigFileName)
)
.then(results => {
// Print the results out uncondtionally.
formatter.printResults(results);
return results;
})
.then(results => {
// Report on the results.
// The done function takes a bool whereby a falsey statement causes the task to fail.
return results.every(result => result.errors.length === 0);
})
.then(done); // eslint-disable-line promise/no-callback-in-promise
};
grunt.registerTask('gherkinlint', 'Run gherkinlint against the current directory', handler);
grunt.config.set('gherkinlint', {
options: {
files: getGherkinLintTargets(),
}
});
grunt.config.merge({
watch: {
gherkinlint: {
files: [grunt.moodleEnv.inComponent ? 'tests/behat/*.feature' : '**/tests/behat/*.feature'],
tasks: ['gherkinlint'],
},
},
});
// Add the 'gherkinlint' task as a startup task.
grunt.moodleEnv.startupTasks.push('gherkinlint');
return handler;
};
-139
View File
@@ -1,139 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate the PHPCS configuration.
*
* @param {Object} thirdPartyPaths
*/
const phpcsIgnore = (thirdPartyPaths) => {
const {toXML} = require('jstoxml');
const config = {
_name: 'ruleset',
_attrs: {
name: "MoodleCore",
},
_content: [
{
rule: {
_attrs: {
ref: './phpcs.xml.dist',
},
},
},
],
};
thirdPartyPaths.forEach(library => {
config._content.push({
'exclude-pattern': library,
});
});
grunt.file.write('phpcs.xml', toXML(config, {
header: true,
indent: ' ',
}) + "\n");
};
/**
* Extracts ignore entries from a local ignore file.
*
* @param {string} componentPath the file path to the component, relative to the code base directory
* @param {string} ignoreFilePath the path to the ignore file
* @return {array} array of ignore paths to be included in the global ignore files
*/
const getEntriesFromLocalIgnoreFile = (componentPath, ignoreFilePath) => {
const ignorePaths = [];
if (grunt.file.exists(ignoreFilePath)) {
const ignoreFile = grunt.file.read(ignoreFilePath);
const entries = ignoreFile.split('\n');
entries.forEach(entry => {
entry = entry.trim();
if (entry.length > 0 && !entry.startsWith('#') && !entry.startsWith('!')) {
while (entry.startsWith('/')) {
entry = entry.substring(1);
}
ignorePaths.push(componentPath + '/' + entry);
}
});
}
return ignorePaths;
};
/**
* Generate ignore files (utilising thirdpartylibs.xml data)
*/
const handler = function() {
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// An array of paths to third party directories.
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
const localStylelintIgnorePaths = [];
const localEslintIgnorePaths = [];
ComponentList.getComponentPaths(process.cwd() + '/').forEach(componentPath => {
const localEslintIgnorePath = process.cwd() + '/' + componentPath + '/.eslintignore';
const localEslintIgnoreEntries = getEntriesFromLocalIgnoreFile(componentPath, localEslintIgnorePath);
if (localEslintIgnoreEntries.length > 0) {
localEslintIgnorePaths.push(...localEslintIgnoreEntries);
}
const localStylelintIgnorePath = process.cwd() + '/' + componentPath + '/.stylelintignore';
const localStylelintIgnoreEntries = getEntriesFromLocalIgnoreFile(componentPath, localStylelintIgnorePath);
if (localStylelintIgnoreEntries.length > 0) {
localStylelintIgnorePaths.push(...localStylelintIgnoreEntries);
}
});
// Generate .eslintignore.
const eslintIgnores = [
'# Generated by "grunt ignorefiles"',
// Do not ignore the .grunt directory.
'!/.grunt',
// Ignore all yui/src meta directories and build directories.
'*/**/yui/src/*/meta/',
'*/**/build/',
].concat(thirdPartyPaths).concat(localEslintIgnorePaths);
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
// Generate .stylelintignore.
const stylelintIgnores = [
'# Generated by "grunt ignorefiles"',
'**/yui/build/*',
'public/theme/boost/style/moodle.css',
'public/theme/classic/style/moodle.css',
'jsdoc/styles/*.css',
'public/admin/tool/componentlibrary/hugo/dist/css/docs.css',
].concat(thirdPartyPaths).concat(localStylelintIgnorePaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
phpcsIgnore(thirdPartyPaths);
};
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', handler);
return handler;
};
-218
View File
@@ -1,218 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Function to generate the destination for the minification task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
*
* @param {String} destPath the current destination
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
const babelRename = function(destPath, srcPath) {
destPath = srcPath.replace(`amd/src`, `amd/build`);
destPath = destPath.replace(/\.js$/, '.min.js');
return destPath;
};
module.exports = grunt => {
// Load the React build tasks.
require('./react')(grunt);
// Load the Ignorefiles tasks.
require('./ignorefiles')(grunt);
// Load the Shifter tasks.
require('./shifter')(grunt);
// Load ESLint.
require('./eslint')(grunt);
// Load jsconfig.
require('./jsconfig')(grunt);
// Load JSDoc.
require('./jsdoc')(grunt);
const path = require('path');
// Register JS tasks.
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'rollup']);
grunt.registerTask('js', ['amd', 'yui', 'react']);
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-rollup');
const babelTransform = require('@babel/core').transform;
const babel = (options = {}) => {
return {
name: 'babel',
transform: (code, id) => {
grunt.log.debug(`Transforming ${id}`);
options.filename = id;
const transformed = babelTransform(code, options);
return {
code: transformed.code,
map: transformed.map
};
}
};
};
// Note: We have to use a rate limit plugin here because rollup runs all tasks asynchronously and in parallel.
// When we kick off a full run, if we kick off a rollup of every file this will fork-bomb the machine.
// To work around this we use a concurrent Promise queue based on the number of available processors.
const rateLimit = () => {
const queue = [];
let queueRunner;
const startQueue = () => {
if (queueRunner) {
return;
}
queueRunner = setTimeout(() => {
const limit = Math.max(1, require('os').cpus().length / 2);
grunt.log.debug(`Starting rollup with queue size of ${limit}`);
runQueue(limit);
}, 100);
};
// The queue runner will run the next `size` items in the queue.
const runQueue = (size = 1) => {
queue.splice(0, size).forEach(resolve => {
grunt.log.debug(`Item resolved. Kicking off next one.`);
resolve();
});
};
return {
name: 'ratelimit',
// The options hook is run in parallel.
// We can return an unresolved Promise which is queued for later resolution.
options: async(options) => {
return new Promise(resolve => {
queue.push(resolve);
startQueue();
return options;
});
},
// When an item in the queue completes, start the next item in the queue.
generateBundle: (options, bundle) => {
grunt.log.debug(`Finished output phase for ${Object.keys(bundle).join(', ')}`);
runQueue();
},
};
};
const terser = require('rollup-plugin-terser').terser;
grunt.config.merge({
rollup: {
options: {
format: 'esm',
dir: 'output',
sourcemap: true,
treeshake: false,
context: 'window',
plugins: [
rateLimit(),
babel({
sourceMaps: true,
comments: false,
compact: false,
plugins: [
'transform-es2015-modules-amd-lazy',
'system-import-transformer',
// This plugin modifies the Babel transpiling for "export default"
// so that if it's used then only the exported value is returned
// by the generated AMD module.
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('.grunt/babel-plugin-add-module-to-define.js')
],
presets: [
['@babel/preset-env', {
modules: false,
useBuiltIns: false
}]
]
}),
terser({
// Do not mangle variables.
// Makes debugging easier.
mangle: false,
}),
],
},
dist: {
files: [{
expand: true,
src: grunt.moodleEnv.files ? grunt.moodleEnv.files : grunt.moodleEnv.amdSrc,
rename: babelRename
}],
},
},
});
grunt.config.merge({
watch: {
amd: {
files: grunt.moodleEnv.inComponent
? ['amd/src/*.js', 'amd/src/**/*.js']
: ['**/amd/src/**/*.js'],
tasks: ['amd']
},
},
});
// Add the 'js' task as a startup task.
grunt.moodleEnv.startupTasks.push('js');
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('rollup.dist.files', [{expand: true, src: files, rename: babelRename}]);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', function(action, filepath) {
changedFiles[filepath] = action;
onChange();
});
return {
babelRename,
};
};
-83
View File
@@ -1,83 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
// @ts-nocheck
/**
* @copyright 2022 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
const configuration = {
compilerOptions: {
baseUrl: ".",
paths: {
},
target: "es2015",
allowSyntheticDefaultImports: false,
},
exclude: [
"node_modules",
],
include: [],
};
/**
* Generate jsconfig.json with AMD module path aliases for all components.
*
* @param {object} grunt The Grunt instance.
*/
const generateJsconfig = (grunt) => {
const jsconfigData = Object.assign({}, configuration);
const path = require('path');
const {fetchComponentData} = require(path.join(process.cwd(), '.grunt', 'components.js'));
const componentData = fetchComponentData().components;
for (const [thisPath, component] of Object.entries(componentData)) {
jsconfigData.compilerOptions.paths[`${component}/*`] = [`${thisPath}/amd/src/*`];
jsconfigData.include.push(`${thisPath}/amd/src/**/*`);
}
grunt.file.write('jsconfig.json', JSON.stringify(jsconfigData, null, " ") + "\n");
grunt.log.write('✓ Generating jsconfig.json\n');
};
/**
* Generate tsconfig.aliases.json with TypeScript path aliases for all ESM components.
*
* @returns {Promise<void>}
*/
const generateTsAliases = async() => {
const {generateAliases} = await import('../../.esbuild/generate-aliases.mjs');
generateAliases();
};
module.exports = (grunt) => {
const handler = async function() {
const done = this.async();
try {
generateJsconfig(grunt);
await generateTsAliases();
done();
} catch (err) {
grunt.log.error(err.message);
done(false);
}
};
grunt.registerTask('jsconfig', 'Generate a jsconfig configuration compatible with the LSP', handler);
};
-52
View File
@@ -1,52 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = (grunt) => {
const path = require('path');
grunt.registerTask('jsdoc', 'Generate JavaScript documentation using jsdoc', function() {
const done = this.async();
const configuration = path.resolve('.grunt/jsdoc/jsdoc.conf.js');
grunt.util.spawn({
cmd: 'jsdoc',
args: [
'--configure',
configuration,
]
}, function(error, result, code) {
if (result.stdout) {
grunt.log.write(result.stdout);
}
if (result.stderr) {
grunt.log.error(result.stderr);
}
if (error) {
grunt.fail.fatal(`JSDoc failed with error code ${code}`);
} else {
grunt.log.write('JSDoc completed successfully'.green);
}
done();
});
});
};
-111
View File
@@ -1,111 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
// @ts-nocheck
/**
* Grunt tasks for building React components.
*
* @copyright Meirza <meirza.arson@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Register react task — build or watch React components.
*
* Modes:
* grunt react — production build
* grunt react:dev — development build (sourcemaps, no minification)
* grunt react:watch — esbuild native watch (dev mode, incremental context)
*
* Note: react:watch uses esbuild's own context.watch() and is intentionally
* separate from grunt-contrib-watch. This keeps esbuild's incremental build
* graph alive between rebuilds rather than restarting from scratch on each change.
*/
grunt.registerTask('react', 'Build all React components', function(mode) {
const done = this.async();
const isWatch = mode === 'watch';
const isDev = isWatch || mode === 'dev';
if (isWatch) {
const path = require('path');
const {spawn} = require('child_process');
// Run ESLint on the rebuilt source files in check-only mode (no --fix)
// to avoid writing changes that would re-trigger esbuild.
const eslintBin = path.join(grunt.moodleEnv.gruntFilePath, 'node_modules', '.bin', 'eslint');
const onRebuild = (srcFiles) => {
if (srcFiles.length === 0) {
return;
}
const absSrcFiles = srcFiles.map(f => path.join(grunt.moodleEnv.gruntFilePath, f));
spawn(eslintBin, absSrcFiles, {stdio: 'inherit'})
.on('error', err => grunt.log.error(`ESLint: ${err.message}`));
};
(async() => {
try {
const {watchComponents} = await import('../../.esbuild/plugin/plugincomponents.mjs');
const { generateAliases } = await import('../../.esbuild/generate-aliases.mjs');
const { buildPluginComponents } = await import('../../.esbuild/plugin/plugincomponents.mjs');
generateAliases();
await buildPluginComponents(isDev);
const ctx = await watchComponents(true, onRebuild);
if (!ctx) {
grunt.log.warn('No React source files found. Nothing to watch.');
done();
return;
}
grunt.log.ok('esbuild is watching for React changes. Press Ctrl+C to stop.');
// Keep the process alive until the user interrupts. done() is intentionally
// not called here — grunt's async mechanism holds the process open.
process.on('SIGINT', async() => {
await ctx.dispose();
done();
});
} catch (err) {
grunt.log.error(err.message);
done(false);
}
})();
return;
}
grunt.log.writeln(`Building React components in ${isDev ? 'DEVELOPMENT' : 'PRODUCTION'} mode...`);
(async() => {
try {
const {generateAliases} = await import('../../.esbuild/generate-aliases.mjs');
const {buildPluginComponents} = await import('../../.esbuild/plugin/plugincomponents.mjs');
generateAliases();
await buildPluginComponents(isDev);
done();
} catch (err) {
grunt.log.error(err.message);
done(false);
}
})();
});
};
-43
View File
@@ -1,43 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
grunt.loadNpmTasks('grunt-sass');
grunt.config.merge({
sass: {
dist: {
files: {
"public/theme/boost/style/moodle.css": "public/theme/boost/scss/preset/default.scss",
"public/theme/classic/style/moodle.css": "public/theme/classic/scss/classicgrunt.scss"
}
},
options: {
implementation: require('sass'),
includePaths: [
"public/theme/boost/scss/",
"public/theme/classic/scss/",
]
}
},
});
};
-155
View File
@@ -1,155 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/* eslint-env node */
module.exports = grunt => {
/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
*
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
* so be careful to to call done().
*/
const handler = function() {
const done = this.async();
const options = grunt.config('shifter.options');
const async = require('async');
const path = require('path');
// Run the shifter processes one at a time to avoid confusing output.
async.eachSeries(options.paths, function(src, filedone) {
var args = [];
args.push(path.normalize(process.cwd() + '/node_modules/shifter/bin/shifter'));
// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');
// Determine the most appropriate options to run with based upon the current location.
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
// When passed a JS file, build our containing module (this happen with
// watch).
grunt.log.debug('Shifter passed a specific JS file');
src = path.dirname(path.dirname(src));
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src', src)) {
// When in a src directory --walk all modules.
grunt.log.debug('In a src directory');
args.push('--walk');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
// When in module, only build our module.
grunt.log.debug('In a module directory');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
// When in module src, only build our module.
grunt.log.debug('In a source directory');
src = path.dirname(src);
options.recursive = false;
}
if (grunt.option('watch')) {
grunt.fail.fatal('The --watch option has been removed, please use `grunt watch` instead');
}
// Add the stderr option if appropriate
if (grunt.option('verbose')) {
args.push('--lint-stderr');
}
if (grunt.option('no-color')) {
args.push('--color=false');
}
var execShifter = function() {
grunt.log.ok("Running shifter on " + src);
grunt.util.spawn({
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
}, function(error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
grunt.log.ok('Shifter build complete.');
filedone();
}
});
};
// Actually run shifter.
if (!options.recursive) {
execShifter();
} else {
// Check that there are yui modules otherwise shifter ends with exit code 1.
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
args.push('--recursive');
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
filedone();
}
}
}, done);
};
// Register the shifter task.
grunt.registerTask('shifter', 'Run Shifter against the current directory', handler);
// Configure it.
grunt.config.set('shifter', {
options: {
recursive: true,
// Shifter takes a relative path.
paths: grunt.moodleEnv.files ? grunt.moodleEnv.files : [grunt.moodleEnv.runDir]
}
});
grunt.config.merge({
watch: {
yui: {
files: grunt.moodleEnv.inComponent
? ['yui/src/*.json', 'yui/src/**/*.js']
: ['**/yui/src/**/*.js'],
tasks: ['yui']
},
},
});
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('shifter.options.paths', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', (action, filepath) => {
changedFiles[filepath] = action;
onChange();
});
return handler;
};
-49
View File
@@ -1,49 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate ignore files (utilising thirdpartylibs.xml data)
*/
const handler = function() {
const path = require('path');
// Are we in a YUI directory?
if (path.basename(path.resolve(grunt.moodleEnv.cwd, '../../')) == 'yui') {
grunt.task.run('yui');
// Are we in an AMD directory?
} else if (grunt.moodleEnv.inAMD) {
grunt.task.run('amd');
// Are we in an ESM source directory?
} else if (grunt.moodleEnv.inEsm) {
grunt.task.run('react');
} else {
// Run all of the requested startup tasks.
grunt.moodleEnv.startupTasks.forEach(taskName => grunt.task.run(taskName));
}
};
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', handler);
return handler;
};
-35
View File
@@ -1,35 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
// Load the ignorefiles tasks.
require('./ignorefiles')(grunt);
// Load the Style Lint tasks.
require('./stylelint')(grunt);
// Load the SASS tasks.
require('./sass')(grunt);
// Add the 'css' task as a startup task.
grunt.moodleEnv.startupTasks.push('css');
};
-187
View File
@@ -1,187 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
const getCssConfigForFiles = files => {
return {
stylelint: {
css: {
// Use a fully-qualified path.
src: files,
options: {
quietDeprecationWarnings: true,
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
"at-rule-no-unknown": true,
}
}
}
},
},
};
};
const getScssConfigForFiles = files => {
return {
stylelint: {
scss: {
options: {
quietDeprecationWarnings: true,
customSyntax: 'postcss-scss',
},
src: files,
},
},
};
};
/**
* Register any stylelint tasks.
*
* @param {Object} grunt
* @param {Array} files
* @param {String} fullRunDir
*/
const registerStyleLintTasks = () => {
const glob = require('glob');
// The stylelinters do not handle the case where a configuration was provided but no files were included.
// Keep track of whether any files were found.
let hasCss = false;
let hasScss = false;
// The stylelint processors do not take a path argument. They always check all provided values.
// As a result we must check through each glob and determine if any files match the current directory.
const scssFiles = [];
const cssFiles = [];
const requestedFiles = grunt.moodleEnv.files;
if (requestedFiles) {
// Grunt was called with a files argument.
// Check whether each of the requested files matches either the CSS or SCSS source file list.
requestedFiles.forEach(changedFilePath => {
let matchesGlob;
// Check whether this watched path matches any watched SCSS file.
matchesGlob = grunt.moodleEnv.scssSrc.some(watchedPathGlob => {
return glob.sync(watchedPathGlob).indexOf(changedFilePath) !== -1;
});
if (matchesGlob) {
scssFiles.push(changedFilePath);
hasScss = true;
}
// Check whether this watched path matches any watched CSS file.
matchesGlob = grunt.moodleEnv.cssSrc.some(watchedPathGlob => {
return glob.sync(watchedPathGlob).indexOf(changedFilePath) !== -1;
});
if (matchesGlob) {
cssFiles.push(changedFilePath);
hasCss = true;
}
});
} else {
// Grunt was called without a list of files.
// The start directory (runDir) may be a child dir of the project.
// Check each scssSrc file to see if it's in the start directory.
// This means that we can lint just mod/*/styles.css if started in the mod directory.
grunt.moodleEnv.scssSrc.forEach(path => {
if (path.startsWith(grunt.moodleEnv.runDir)) {
scssFiles.push(path);
hasScss = true;
}
});
grunt.moodleEnv.cssSrc.forEach(path => {
if (path.startsWith(grunt.moodleEnv.runDir)) {
cssFiles.push(path);
hasCss = true;
}
});
}
// Register the tasks.
const scssTasks = ['sass'];
if (hasScss) {
grunt.config.merge(getScssConfigForFiles(scssFiles));
scssTasks.unshift('stylelint:scss');
}
scssTasks.unshift('ignorefiles');
const cssTasks = ['ignorefiles'];
if (hasCss) {
grunt.config.merge(getCssConfigForFiles(cssFiles));
cssTasks.push('stylelint:css');
}
// The tasks must be registered, even if empty to ensure a consistent command list.
// They jsut won't run anything.
grunt.registerTask('scss', scssTasks);
grunt.registerTask('rawcss', cssTasks);
};
// Register CSS tasks.
grunt.loadNpmTasks('grunt-stylelint');
// Register the style lint tasks.
registerStyleLintTasks();
grunt.registerTask('css', ['scss', 'rawcss']);
const getCoreThemeMatches = () => {
const scssMatch = 'scss/**/*.scss';
if (grunt.moodleEnv.inTheme) {
return [scssMatch];
}
if (grunt.moodleEnv.runDir.startsWith('theme')) {
return [`*/${scssMatch}`];
}
return [`theme/*/${scssMatch}`];
};
// Add the watch configuration for rawcss, and scss.
grunt.config.merge({
watch: {
rawcss: {
files: [
'**/*.css',
],
excludes: [
'**/moodle.css',
'**/editor.css',
'jsdoc/styles/*.css',
],
tasks: ['rawcss']
},
scss: {
files: getCoreThemeMatches(),
tasks: ['scss']
},
},
});
};
-42
View File
@@ -1,42 +0,0 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2023 Sara Arjona <sara@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate upgradable third-party libraries (utilising thirdpartylibs.xml data)
*/
grunt.registerTask('upgradablelibs', 'Generate upgradable third-party libraries', async function() {
const done = this.async();
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// An array of third party libraries that have a newer version in their repositories.
const thirdPartyLibs = await ComponentList.getThirdPartyLibsUpgradable({progress: true});
for (let library of thirdPartyLibs) {
grunt.log.ok(JSON.stringify(Object.assign({}, library), null, 4));
}
done();
});
};
-276
View File
@@ -1,276 +0,0 @@
/**
* This is a wrapper task to handle the grunt watch command. It attempts to use
* Watchman to monitor for file changes, if it's installed, because it's much faster.
*
* If Watchman isn't installed then it falls back to the grunt-contrib-watch file
* watcher for backwards compatibility.
*/
/* eslint-env node */
module.exports = grunt => {
/**
* This is a wrapper task to handle the grunt watch command. It attempts to use
* Watchman to monitor for file changes, if it's installed, because it's much faster.
*
* If Watchman isn't installed then it falls back to the grunt-contrib-watch file
* watcher for backwards compatibility.
*/
const watchHandler = function() {
const async = require('async');
const watchTaskDone = this.async();
let watchInitialised = false;
let watchTaskQueue = {};
let processingQueue = false;
const watchman = require('fb-watchman');
const watchmanClient = new watchman.Client();
// Grab the tasks and files that have been queued up and execute them.
var processWatchTaskQueue = function() {
if (!Object.keys(watchTaskQueue).length || processingQueue) {
// If there is nothing in the queue or we're already processing then wait.
return;
}
processingQueue = true;
// Grab all tasks currently in the queue.
var queueToProcess = watchTaskQueue;
// Reset the queue.
watchTaskQueue = {};
async.forEachSeries(
Object.keys(queueToProcess),
function(task, next) {
var files = queueToProcess[task];
var filesOption = '--files=' + files.join(',');
grunt.log.ok('Running task ' + task + ' for files ' + filesOption);
// Spawn the task in a child process so that it doesn't kill this one
// if it failed.
var args = [task, filesOption];
if (grunt.option('force')) {
args.push('--force');
}
grunt.util.spawn(
{
// Spawn with the grunt bin.
grunt: true,
// Run from current working dir and inherit stdio from process.
opts: {
cwd: grunt.moodleEnv.fullRunDir,
stdio: 'inherit'
},
args: args
},
function(err, res, code) {
if (code !== 0) {
// The grunt task failed.
grunt.log.error(err);
}
// Move on to the next task.
next();
}
);
},
function() {
// No longer processing.
processingQueue = false;
// Once all of the tasks are done then recurse just in case more tasks
// were queued while we were processing.
processWatchTaskQueue();
}
);
};
const originalWatchConfig = grunt.config.get(['watch']);
const watchConfig = Object.keys(originalWatchConfig).reduce(function(carry, key) {
if (key == 'options') {
return carry;
}
const value = originalWatchConfig[key];
const taskNames = value.tasks;
const files = value.files;
let excludes = [];
if (value.excludes) {
excludes = value.excludes;
}
taskNames.forEach(function(taskName) {
carry[taskName] = {
files,
excludes,
};
});
return carry;
}, {});
watchmanClient.on('error', function(error) {
// We have to add an error handler here and parse the error string because the
// example way from the docs to check if Watchman is installed doesn't actually work!!
// See: https://github.com/facebook/watchman/issues/509
if (error.message.match('Watchman was not found')) {
// If watchman isn't installed then we should fallback to the other watch task.
grunt.log.ok('It is recommended that you install Watchman for better performance using the "watch" command.');
// Fallback to the old grunt-contrib-watch task.
grunt.renameTask('watch-grunt', 'watch');
grunt.task.run(['watch']);
// This task is finished.
watchTaskDone(0);
} else {
grunt.log.error(error);
// Fatal error.
watchTaskDone(1);
}
});
watchmanClient.on('subscription', function(resp) {
if (resp.subscription !== 'grunt-watch') {
return;
}
resp.files.forEach(function(file) {
grunt.log.ok('File changed: ' + file.name);
var fullPath = grunt.moodleEnv.fullRunDir + '/' + file.name;
Object.keys(watchConfig).forEach(function(task) {
const fileGlobs = watchConfig[task].files;
var match = fileGlobs.some(function(fileGlob) {
return grunt.file.isMatch(`**/${fileGlob}`, fullPath);
});
if (match) {
// If we are watching a subdirectory then the file.name will be relative
// to that directory. However the grunt tasks expect the file paths to be
// relative to the Gruntfile.js location so let's normalise them before
// adding them to the queue.
var relativePath = fullPath.replace(grunt.moodleEnv.gruntFilePath + '/', '');
if (task in watchTaskQueue) {
if (!watchTaskQueue[task].includes(relativePath)) {
watchTaskQueue[task] = watchTaskQueue[task].concat(relativePath);
}
} else {
watchTaskQueue[task] = [relativePath];
}
}
});
});
processWatchTaskQueue();
});
process.on('SIGINT', function() {
// Let the user know that they may need to manually stop the Watchman daemon if they
// no longer want it running.
if (watchInitialised) {
grunt.log.ok('The Watchman daemon may still be running and may need to be stopped manually.');
}
process.exit();
});
// Initiate the watch on the current directory.
watchmanClient.command(['watch-project', grunt.moodleEnv.fullRunDir], function(watchError, watchResponse) {
if (watchError) {
grunt.log.error('Error initiating watch:', watchError);
watchTaskDone(1);
return;
}
if ('warning' in watchResponse) {
grunt.log.error('warning: ', watchResponse.warning);
}
var watch = watchResponse.watch;
var relativePath = watchResponse.relative_path;
watchInitialised = true;
watchmanClient.command(['clock', watch], function(clockError, clockResponse) {
if (clockError) {
grunt.log.error('Failed to query clock:', clockError);
watchTaskDone(1);
return;
}
// Generate the expression query used by watchman.
// Documentation is limited, but see https://facebook.github.io/watchman/docs/expr/allof.html for examples.
// We generate an expression to match any value in the files list of all of our tasks, but excluding
// all value in the excludes list of that task.
//
// [anyof, [
// [allof, [
// [anyof, [
// ['match', validPath, 'wholename'],
// ['match', validPath, 'wholename'],
// ],
// [not,
// [anyof, [
// ['match', invalidPath, 'wholename'],
// ['match', invalidPath, 'wholename'],
// ],
// ],
// ],
var matchWholeName = fileGlob => ['match', fileGlob, 'wholename'];
var matches = Object.keys(watchConfig).map(function(task) {
const matchAll = [];
matchAll.push(['anyof'].concat(watchConfig[task].files.map(matchWholeName)));
if (watchConfig[task].excludes.length) {
matchAll.push(['not', ['anyof'].concat(watchConfig[task].excludes.map(matchWholeName))]);
}
return ['allof'].concat(matchAll);
});
matches = ['anyof'].concat(matches);
var sub = {
expression: matches,
// Which fields we're interested in.
fields: ["name", "size", "type"],
// Add our time constraint.
since: clockResponse.clock
};
if (relativePath) {
/* eslint-disable camelcase */
sub.relative_root = relativePath;
}
watchmanClient.command(['subscribe', watch, 'grunt-watch', sub], function(subscribeError) {
if (subscribeError) {
// Probably an error in the subscription criteria.
grunt.log.error('failed to subscribe: ', subscribeError);
watchTaskDone(1);
return;
}
grunt.log.ok('Listening for changes to files in ' + grunt.moodleEnv.fullRunDir);
});
});
});
};
// Rename the grunt-contrib-watch "watch" task because we're going to wrap it.
grunt.renameTask('watch', 'watch-grunt');
// Register the new watch handler.
grunt.registerTask('watch', 'Run tasks on file changes', watchHandler);
grunt.config.merge({
watch: {
options: {
nospawn: true // We need not to spawn so config can be changed dynamically.
},
},
});
return watchHandler;
};
-111
View File
@@ -1,111 +0,0 @@
#!/usr/bin/env node
// 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/>.
import { Argument, Option, program } from 'commander';
import chalk from 'chalk';
import { getNoteNames } from './notes/src/noteTypes.mjs';
import createAction from './notes/src/create.mjs';
import generateAction from './notes/src/generate.mjs';
import generateReleaseNotesLinks from './notes/src/releasenotes.mjs';
import logger from './notes/src/logger.mjs';
console.log(`
${chalk.bold(chalk.underline(chalk.green('Moodle Upgrade Notes Generator')))}
This tool is used to generate the upgrade notes for changes you make in Moodle.
Please remember that the intended audience of these changes is
${chalk.italic('plugin developers')} who need to know how to update their plugins
for a new Moodle version.
Upgrade notes should not be used to document changes for site administrators, or
for internal API changes which are not expected to be used outside of the
relevant component.
`)
program.configureHelp({
helpWidth: 100,
});
program.on('option:verbose', () => {
logger.level = 'verbose';
});
program.addOption(
new Option(
'-v, --verbose',
'Output more information during the generation process',
)
.default(false)
);
// Define the command line options.
program
.command('create')
.summary('Generate a new upgrade note')
.addOption(
new Option('-t, --type <type>', `The type of change to document. Valid types are: ${getNoteNames().join(', ')}`)
)
.addOption(new Option('-i, --issue <issue>', 'The tracker issue number'))
.addOption(new Option('-c, --component <component>', 'The component to write a note for'))
.addOption(new Option(
'-m, --message <message>',
'The message to use for the upgrade note',
))
.action((options) => createAction(options));
program
.command('summary')
.summary('Generate a local copy of the upgrade notes summary')
.addArgument(
new Argument('[version]', 'The Moodle version to create the summary notes for')
)
.action((version) => generateAction(version));
program
.command('releasenotes')
.summary('Generate a list of upgrade notes for individual components in markdown format for the release notes')
.addArgument(
new Argument('[tag]', 'The Moodle tag')
)
.action((tag) => generateReleaseNotesLinks(tag));
program
.command('release')
.summary('Generate the markdown copies of the upgrade notes for a Moodle release')
.addArgument(
new Argument('[version]', 'The Moodle version to create the release notes for')
)
.addOption(
new Option(
'--generate-upgrade-notes',
'Generate the UPGRADING.md notes for the release. ' +
'Note: This option is intended for use by the release manager when generating the upgrade notes.',
)
.default(true)
)
.addOption(
new Option(
'-d, --delete-notes',
'Delete the notes after generating the UPGRADING.md notes for the release. ' +
'Note: This option is intended for use by the release manager when generating the upgrade notes.' +
'This option has no effect unless --generate-upgrade-notes is also set.'
)
.default(false)
)
.action((version, options) => generateAction(version, options));
program.parse();
-2
View File
@@ -1,2 +0,0 @@
**/amd/**
/*.js
+22 -32
View File
@@ -1,58 +1,48 @@
// NOTE: We use eslint now. This file is used only by shifter. We keep the configuration
// here because shifter uses jshint after modules have been concating. Eslint can't
// currently do this.
{
"asi": false,
"bitwise": true,
"boss": false,
"browser": true,
"yui": true,
"bitwise": true,
"curly": true,
"eqeqeq": true,
"forin": false,
"immed": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"strict": false,
"trailing": true,
"unused": true,
"white": false,
"asi": false,
"boss": false,
"debug": false,
"eqeqeq": false,
"eqnull": false,
"es5": false,
"esnext": false,
"evil": false,
"expr": false,
"forin": false,
"funcscope": false,
"globalstrict": false,
"immed": true,
"indent": 4,
"iterator": false,
"lastsemic": false,
"latedef": true,
"laxbreak": true,
"laxcomma": false,
"loopfunc": false,
"maxerr": 500,
"maxlen": 132,
"multistr": false,
"newcap": true,
"noarg": true,
"noempty": true,
"nomen": false,
"onecase": false,
"onevar": false,
"passfail": false,
"plusplus": false,
"predef": [
"M",
"define",
"require"
],
"proto": false,
"regexdash": false,
"regexp": false,
"scripturl": false,
"shadow": false,
"smarttabs": false,
"strict": false,
"sub": false,
"supernew": false,
"trailing": true,
"undef": true,
"unused": true,
"white": false,
"yui": true
"maxerr": 500,
"maxlen": 180,
"passfail": false,
"latedef": true
}
-1
View File
@@ -1 +0,0 @@
lts/jod
-40
View File
@@ -1,40 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Helper file for PhpStorm, and other IDEs, to provide better code completion.
*
* @package core
* @copyright 2024 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace PHPSTORM_META;
// Assume that anything returned by \core\di::get('...') is an instance of the first argument.
override(\core\di::get(0), map([
'' => '@',
]));
// Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument.
override(\Psr\Container\ContainerInterface::get(0), map([
'' => '@',
]));
// Assume that anything returned by \DI\Container::get('...') is an instance of the first argument.
override(\DI\Container::get(0), map([
'' => '@',
]));
-107
View File
@@ -1,107 +0,0 @@
{
"customSyntax": "postcss-scss",
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": {
"syntaxExtensions": [
"sass"
]
},
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-no-unknown": null, # Enabled for non-scss in grunt.
"at-rule-semicolon-newline-after": "always",
"at-rule-semicolon-space-before": "never",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"block-closing-brace-space-before": "always-single-line",
"block-no-empty": true,
"block-opening-brace-newline-after": "always",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"color-hex-case": ["lower", { "severity": "warning" }],
"color-hex-length": ["short", { "severity": "warning" }],
"color-no-invalid-hex": true,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-no-important": true,
"font-family-no-duplicate-names": true,
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-max-empty-lines": 0,
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-url-scheme-disallowed-list": ["data"],
"function-whitespace-after": "always",
"indentation": 4,
"keyframe-declaration-no-important": true,
"length-zero-no-unit": [true, { "severity": "warning" }],
"max-empty-lines": 2,
"max-line-length": [132, { "severity": "warning" }],
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": [true, { "severity": "warning" }],
"no-invalid-double-slash-comments": true,
"no-unknown-animations": true,
"property-case": "lower",
"property-no-unknown": true,
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"string-no-newline": true,
"time-min-milliseconds": 100,
"unit-disallowed-list": ["pt"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
},
"overrides": [
{
"files": ["**/yui/**/*.css"],
"rules": {
}
}
]
}
@@ -1,7 +0,0 @@
issueNumber: MDL-51152
notes:
enrol_manual:
- message: >-
The unused parameter 'roleid' has been removed from the external
function `unenrol_users()`
type: removed
@@ -1,22 +0,0 @@
issueNumber: MDL-71368
notes:
core:
- message: >
The `arg_separator.output` has been changed from a default of `amp;` to
a default of `&` in line with PHP defaults.
If you were previously relying on the legacy default when using
`http_build_query()` then you should _actively_ specify the value as the
third
parameter, for example:
```
http_build_query($formdata, '', '&amp;');
```
type: changed
@@ -1,8 +0,0 @@
issueNumber: MDL-73602
notes:
core:
- message: >-
Removed `qtype_random` from core.
`core\component::is_valid_plugin_name` has an additional check to ensure no-one can create a new plugin called qtype_random,
as this would conflict with the support for restoring old backups.
type: removed
@@ -1,8 +0,0 @@
issueNumber: MDL-75067
notes:
tool_behat:
- message: >-
The `behat_session_trait::ensure_element_[does_not_]exists(...)` methods
now accept optional `$container` parameter to define the parent node to
look within
type: improved
@@ -1,5 +0,0 @@
issueNumber: MDL-77894
notes:
core:
- message: Appending an exclamation mark to template names ignores theme overrides
type: improved
@@ -1,10 +0,0 @@
issueNumber: MDL-78325
notes:
core_grades:
- message: >-
In Moodle 4.2, the legacy Gradebook base widget from 4.1 has been removed and
replaced with a simpler class-based system due to a breaking change and
excessive complexity in the old pattern. The files `core/grades/basewidget.js` and
templates in `grade/templates/searchwidget/` have been deleted,
with minimal expected third-party impact.
type: removed
@@ -1,13 +0,0 @@
issueNumber: MDL-79182
notes:
core:
- message: >
The following AMD modules have been removed following the final
deprecation process. It is no longer possible or necessary to manually
register modal types. See MDL-78324 for further details.
- `core/modal_registry`
- `core/modal_factory`
type: removed
@@ -1,7 +0,0 @@
issueNumber: MDL-79574
notes:
core:
- message: >-
The `\core\persistent::get_records(...)` class method now returns
instances keyed by record ID
type: changed
@@ -1,13 +0,0 @@
issueNumber: MDL-81514
notes:
core_group:
- message: >
`groups_print_activity_menu()` and `groups_get_activity_group()` now
include an additional `$participationonly` parameter, which is true by
default. This can be set false when we want the user to be able to
select a non-participation group within an activity, for example if a
teacher wants to filter assignment submissions by non-participation
groups. It should never be used when the menu is displayed to students,
as this may allow them to participate using non-participation groups.
Non-participation groups are labeled as such.
type: improved
@@ -1,8 +0,0 @@
issueNumber: MDL-81608
notes:
mod_quiz:
- message: >-
The language strings `addpagebreak` and `removepagebreak` have been
deprecated and should no longer be used. These have been replaced by
the `addpagebreakafter` and `removepagebreakafter` language strings.
type: deprecated
@@ -1,12 +0,0 @@
issueNumber: MDL-81961
notes:
core_question:
- message: |
core_question:
- message: |
Final deprecation of `moodle-question-chooser` YUI module.
type: removed
- message: |
Final deprecation of `core_question/qbank_chooser` template.
type: removed
type: removed
-13
View File
@@ -1,13 +0,0 @@
issueNumber: MDL-81962
notes:
core:
- message: The `moodle-core-notification-confirm` YUI module has been removed after an extensive deprecation period. Please use the AMD `core/modal` module as a replacement.
type: removed
- message: |
The following feaetures of the `moodle-core-notification` YUI module have been removed after an extensive deprecation process.:
- method: `keyDelegation`
- property: `lightbox`
There is no direct replacement for these features, but they were not widely used and their removal should not cause significant issues. If you were using these features, you will need to implement your own solutions for key delegation and lightbox functionality.
type: removed
@@ -1,7 +0,0 @@
issueNumber: MDL-82284
notes:
core:
- message: >-
Legacy constructors have been removed. These relate to PHP 4 and
earlier.
type: removed
@@ -1,15 +0,0 @@
issueNumber: MDL-83902
notes:
core_badges:
- message: >-
The following classes and functions are now also available in the following new
locations. They will continue to work in their old locations:
| Old classname/function | New classname/function |
| --- | --- |
| `\badge_award_selector_base` | `\core_badges\award_selector_base` |
| `\badge_potential_users_selector` | `\core_badges\potential_award_selector` |
| `\badge_existing_users_selector` | `\core_badges\existing_award_selector` |
| `process_manual_award()` | `\core_badges\award_manager::process_manual_award()` |
| `process_manual_revoke()` | `\core_badges\award_manager::process_manual_revoke()` |
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-84082
notes:
core_reportbuilder:
- message: >-
The text filter "Contains" and "Not contains" operators now support `*`
and `?` wildcard characters for better text content filtering
type: improved
@@ -1,30 +0,0 @@
issueNumber: MDL-84960
notes:
core:
- message: >-
Several core web services now include a new initials field in user data
structures. This change is backward-compatible and only adds an optional
field; no existing fields or field semantics have been changed.
Client applications should ensure they can handle the additional initials
field in web service responses, but clients that ignore unknown fields can
continue working without changes. The affected web services are:
- core_enrol_get_enrolled_users
- core_enrol_get_enrolled_users_with_capability
- core_enrol_get_potential_users
- core_enrol_search_users
- core_user_get_users_by_field
- core_user_get_users
- core_user_get_course_user_profiles
- core_grades_get_enrolled_users_for_selector
- core_grades_get_gradable_users
- gradereport_grader_get_users_in_report
- core_message_get_contact_requests
- core_message_get_conversation_members
- core_message_message_search_users
- core_message_get_user_contacts
- core_message_get_member_info
- core_message_get_conversation_messages
- mod_assign_list_participants
- mod_assign_get_participant
- mod_forum_get_forum_discussions
type: improved
@@ -1,9 +0,0 @@
issueNumber: MDL-85233
notes:
core_filters:
- message: >-
MimeTeX support has been removed from both `filter_tex` and
`filter_algebra`. These filters now depend on LaTeX tools (`latex`,
`dvips`, and `convert`/`dvisvgm`), and as a result, the `pathmimetex`
setting has been removed.
type: removed
@@ -1,8 +0,0 @@
issueNumber: MDL-85322
notes:
block_html:
- message: >-
Treat Dashboard (pagetype 'my-index') as trusted in web services so
get_content_for_external preserves embedded HTML (e.g. iframes) on user
Dashboard.
type: changed
@@ -1,8 +0,0 @@
issueNumber: MDL-85336
notes:
core:
- message: >-
Redis connection timeout settings for cachestores and sessions have been
split into connection timeout and read timeout to allow for finer
control. These settings now also accept floats.
type: improved
@@ -1,9 +0,0 @@
issueNumber: MDL-85405
notes:
core_course:
- message: >-
The external function `core_course_get_course_contents` now includes the
`candisplay` property for each returned module. If this is false, the
module should not be displayed on the course page (for example, for
question banks).
type: improved
@@ -1,5 +0,0 @@
issueNumber: MDL-85621
notes:
core_badges:
- message: The create_issued_badge generator now returns the issued badge object.
type: changed
@@ -1,11 +0,0 @@
issueNumber: MDL-85621
notes:
core_badges:
- message: >-
The class core_badges_assertion has been deprecated and replaced by
\core_badges\achievement_credential.
The method badges_get_default_issuer() has also been deprecated because
it is no longer needed.
The file badges/endorsement.php has been removed because it stopped being used
when MDL-84323 was integrated.
type: deprecated
@@ -1,17 +0,0 @@
issueNumber: MDL-85975
notes:
core:
- message: >
`restore_qtype_plugin::unset_excluded_fields` now returns the modified
questiondata structure,
in order to support structures that contain arrays.
If your qtype plugin overrides
`restore_qtype_plugin::remove_excluded_question_data` without
calling the parent method, you may need to modify your overridden method
to use the returned
value.
type: fixed
@@ -1,8 +0,0 @@
issueNumber: MDL-86332
notes:
core_completion:
- message: >-
The `completion_info::clear_criteria` method takes an optional
`$removetypecriteria` to determine whether to remove course type
criteria from other courses that refer to the current course
type: changed
@@ -1,26 +0,0 @@
issueNumber: MDL-86493
notes:
mod_quiz:
- message: >-
The quiz overrides cache implementation has been replaced with a faster alternative with a different API.
This should be a transparent change but any direct references will still need to be updated.
type: deprecated
- message: >
`mod_quiz_cm_info_dynamic()` now uses the new `quiz_overrides` cache via `override_manager`, performing a single cache fetch per quiz/user.
This significantly reduces cache calls on course pages with many quizzes and groups.
The new `mod_quiz:quiz_overrides` cache is keyed by `quizid_userid` using datasource `\mod_quiz\cache\quiz_overrides_cache`.
This cache returns all applicable overrides for a user in a quiz (the user override, if any, plus all group overrides for groups they belong to in the quiz's course).
New class `\mod_quiz\local\quiz_overrides_cache_manager` to interact with the cache:
- `get_overrides(int $quizid, int $userid): array`
- `purge_for_user(int $quizid, int $userid): void`
- `purge_for_users(int $quizid, array $userids): void`
- `purge_for_group(int $quizid, int $groupid): void`
- `purge_for_group_members(int $groupid, array $userids): void`
Hook callbacks in `db/hooks.php` to keep the cache in sync with group
membership changes:
- `\core_group\hook\after_group_membership_added`
- `\core_group\hook\after_group_membership_removed`
type: improved
@@ -1,12 +0,0 @@
issueNumber: MDL-86524
notes:
core_question:
- message: >-
During restore of a question_set_reference, mapping of IDs in the
filtercondition is now delegated to qbank plugins.
If your qbank plugin defines a filter condition that uses database
IDs, add an override of `restore_filtercondition()` to the `condition`
class, which checks the condition's data and replaces the IDs with
mapped values if required. See
`qbank_managecategories\category_condition` for an example.
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86607
notes:
mod_feedback:
- message: >-
The method `feedback_init_feedback_session()` has been deprecated, along
with all other direct access to `$SESSION` from the module
type: deprecated
@@ -1,7 +0,0 @@
issueNumber: MDL-86660
notes:
core_courseformat:
- message: >-
The `$cm` attribute in `activityoverviewbase` has been updated to public
visibility, allowing direct access to the course module instance
type: changed
@@ -1,8 +0,0 @@
issueNumber: MDL-86660
notes:
core_courseformat:
- message: >-
A new `available` attribute has been added to `activityname_exporter`
class. It allows the external API to return the activity's availability
status relative to the current user.
type: changed
@@ -1,9 +0,0 @@
issueNumber: MDL-86660
notes:
core_courseformat:
- message: >-
Two new public static methods have been added to the `overviewtable`
class:
- `is_cm_displayable`: Determines if a course module should be listed in the overview table.
- `is_cm_available`: Checks if a course module is accessible to the user (and should therefore be rendered as a link).
type: changed
@@ -1,19 +0,0 @@
issueNumber: MDL-86678
notes:
core_reportbuilder:
- message: >-
The base entity class now implements a default `initialise` method, that
will automatically call each of the following methods to load entity
report data:
* `get_available_columns()`
* `get_available_filters()`
* `get_available_conditions()`
This change allows for a lot of boilerplate to be removed from report
entity classes
type: improved
@@ -1,12 +0,0 @@
issueNumber: MDL-86699
notes:
core_reportbuilder:
- message: >-
There are two new entities intended for reports specific to course
module data, in order to provide a baseline in terms of module reporting
and API usage:
*
`core_course\reportbuilder\local\entities\{course_module,course_module_base}`
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86699
notes:
mod_forum:
- message: >-
The forum report entity `->get_context_joins()` method is deprecated,
replaced with `->get_course_modules_joins(...)`
type: deprecated
@@ -1,17 +0,0 @@
issueNumber: MDL-86798
notes:
core_question:
- message: >
In order to prevent re-use of question version numbers after a version
is deleted, the `nextversion` column was added to
`question_bank_entries`. This serves as a counter incremented each time
a version is created.
Do not query this field directly. Instead use
`core_question\versions::get_next_version()` to read the value, which
will initialise it based on the existing versions if it is not set yet.
By default, it will increment the version number automatically, unless
you pass `increment: false`. Because of this, it is advisable to call
it inside a transaction, that is only committed after the version number
is used in a `question_versions` record.
type: fixed
@@ -1,7 +0,0 @@
issueNumber: MDL-86798
notes:
core_question:
- message: >-
`get_next_version()` from questionlib.php is now deprecated. Use
`\core_question\versions::get_next_version()` instead.
type: deprecated
@@ -1,5 +0,0 @@
issueNumber: MDL-86832
notes:
core_block:
- message: Removed block_activity_modules from Moodle 5.2.
type: removed
@@ -1,10 +0,0 @@
issueNumber: MDL-86839
notes:
core:
- message: >
"grunt watch" now accepts a force flag. Run "grunt watch -f" or "grunt
watch --force" to prevent grunt from cancelling builds when errors
occur. This is especially useful during development, because js build
files will be built even if, for example, jslint errors are still
present in the files.
type: improved
@@ -1,8 +0,0 @@
issueNumber: MDL-86846
notes:
core:
- message: >-
The `core/drag_handle` template has been modified to use a native HTML
button for a more accessible experience and a consistent look with other
buttons on the page.
type: changed
@@ -1,7 +0,0 @@
issueNumber: MDL-86854
notes:
core_courseformat:
- message: >-
Add core_courseformat\cmactions::move_before that will allow to move a coursemodule to a position before another coursemodule.
Add core_courseformat\cmactions::move_end_section that will allow to move a coursemodule the end of a section.
type: improved
@@ -1,8 +0,0 @@
issueNumber: MDL-86854
notes:
core_course:
- message: >-
Deprecates moveto_module (core_course) in favor of
cmactions::move_before or cmactions::move_end_section
(core_courseformat\local\cmactions).
type: deprecated
@@ -1,11 +0,0 @@
issueNumber: MDL-86855
notes:
qbank_columnsortorder:
- message: >-
The Behat selector `column move handle` for the `qbank_columnsortorder` plugin has been removed.
When interacting with the column's move handle, please use the move handle's accessible name and type.
For example:
- `And I drag "Move Created by" "button" and I drop it in "Move T" "button"`
type: removed
@@ -1,9 +0,0 @@
issueNumber: MDL-86856
notes:
core_course:
- message: >-
The following methods have been deprecated and should no longer be used:
- `course_delete_module`
- `course_module_flag_for_async_deletion`
Please consider using the equivalent methods, delete and delete_async, in `core_courseformat\local\cmactions` instead.
type: deprecated
@@ -1,5 +0,0 @@
issueNumber: MDL-86856
notes:
core_courseformat:
- message: Add delete method to the core_courseformat\cmactions
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86857
notes:
core_courseformat:
- message: >-
Add set_groupmode method to the core_courseformat\cmactions (course
format actions)
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86857
notes:
core_course:
- message: >-
Deprecates set_coursemodule_groupmode in favor of
core_courseformat\cmactions::set_groupmode
type: deprecated
@@ -1,7 +0,0 @@
issueNumber: MDL-86858
notes:
core_courseformat:
- message: >-
Create a new core_courseformat\cmactions::duplicate aiming to replace
the course/lib.php version
type: improved
@@ -1,7 +0,0 @@
issueNumber: MDL-86858
notes:
core_course:
- message: >-
The duplicate_module has been deprecated in favor of
core_courseformat\cmactions::duplicate
type: deprecated

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