Compare commits

..

2477 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 13987d4beb Moodle release 2.6.6 2014-11-08 23:29:51 +01:00
AMOS bot 7a999238f7 Automatically generated installer lang files 2014-11-09 00:05:40 +08:00
Eloy Lafuente (stronk7) 387838ce81 weekly release 2.6.5+ 2014-11-07 16:53:13 +01:00
John Okely e2a8ac6b11 MDL-47949 mod_wiki: Validate parameters for page deletion 2014-11-07 15:14:16 +08:00
Damyon Wiese e3e9a02b9d MDL-48091 users: Revert "MDL-42875 users: Show only profile visible ...
This reverts commit 33ed15457c.
2014-11-07 09:28:15 +08:00
Eloy Lafuente (stronk7) b066a3587d Merge branch 'MDL-48035-26-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-11-06 11:15:26 +01:00
David Mudrák f51cb90193 MDL-48035 Fix Behat tests regressions after merging en_fix strings 2014-11-06 10:57:01 +01:00
John Okely 57c1fc6915 MDL-47930 mod_forum: Detect subscription to subscription disabled forums
Return forums with disabled subscription that you are subscribed to in
forum_get_subscribed forums
2014-11-06 08:41:18 +00:00
Damyon Wiese 6ffbd71f15 MDL-43430 ldap: whitespace fix 2014-11-06 12:06:56 +08:00
Damyon Wiese 38b686048a Merge branch 'wip_26_mdl-43430' of https://github.com/iarenaza/moodle into MOODLE_26_STABLE 2014-11-06 11:58:33 +08:00
Marina Glancy 8e799494e9 Merge branch 'wip_MDL-48083_m26_rollback' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-11-06 11:42:39 +08:00
Petr Skoda b44d4b6600 MDL-48083 dml: Empty buffers on forced rollback 2014-11-06 15:57:36 +13:00
Eloy Lafuente (stronk7) f5a3d48cf0 Merge branch 'wip-mdl-45416-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-11-06 00:58:24 +01:00
Dan Poltawski 956798d317 Merge branch 'MDL-47466-MOODLE_26_STABLE' of https://github.com/tehanuyor/moodle into MOODLE_26_STABLE 2014-11-05 16:26:29 +00:00
Andrew Nicols 545eb1bcfd MDL-48019 mod_forum: Add sesskey checks when setting tracking prefs
This also removes set_url() and changes require_course_login to
require_login as guests cannot set tracking.
2014-11-05 10:34:40 +00:00
Damyon Wiese d10fd7edc9 Merge branch 'MDL-46500_26' of https://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-11-05 16:44:21 +08:00
Iñaki Arenaza ab90473e2b MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis
While testing the fix, it was found that ldap_stripslashes() was broken and
using a deprecated PCRE patter modifier, so it's also been fixed.

Thanks to Damyon Wiese, some units tests have been added to cover
ldap_addslashes() and ldap_stripslashes().
2014-11-05 09:03:38 +01:00
Damyon Wiese 95e2dd7444 MDL-47793 assign: trivial fix for inconsistent use of get_instance() 2014-11-05 14:29:54 +08:00
Damyon Wiese 36cb249bdf Merge branch 'MDL-47793-m26' of https://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-11-05 14:29:38 +08:00
Damyon Wiese 82ac4ed273 Merge branch 'MDL-47930-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-11-05 14:21:05 +08:00
Damyon Wiese 1a9c29fa1b MDL-27930 lesson: Remove custom styling from timer 2014-11-05 13:57:08 +08:00
Damyon Wiese 61ff661932 Merge branch 'MDL-27930_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-11-05 13:52:13 +08:00
Rajesh Taneja 687b67b793 MDL-45416 enrol_ldap: Use null_progress_trace while running phpunit 2014-11-05 11:13:47 +08:00
Eloy Lafuente (stronk7) 6a6b58830b Merge branch 'MDL-48035-26-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-11-05 01:16:31 +01:00
Helen Foster 9fbeb94cdd MDL-48035 Merge English strings from the en_fix language pack 2014-11-04 22:20:35 +01:00
Jean-Michel Vedrine f63d5f3410 MDL-27930 Lesson: the count-down timer does not work 2014-11-04 15:03:40 +01:00
Eloy Lafuente (stronk7) 1a8a8eea79 weekly release 2.6.5+ 2014-11-04 11:35:05 +01:00
Damyon Wiese 1274a32d8c Merge branch 'MDL-45636-course_M26' of https://github.com/eSrem/moodle into MOODLE_26_STABLE 2014-11-04 12:07:47 +08:00
Eloy Lafuente (stronk7) e612805d75 Merge branch 'MDL-47883-26-foundlangfile' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-11-04 02:03:34 +01:00
Eloy Lafuente (stronk7) b0f4a3d438 Merge branch '47969-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-11-04 01:57:19 +01:00
Eloy Lafuente (stronk7) 43f1868e14 Merge branch '47968-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-11-04 01:55:25 +01:00
Petr Skoda ea1fbc0028 MDL-47868 ws: verify upload areas 2014-11-04 01:50:27 +01:00
Petr Skoda b35be396ff MDL-48013 calendar: force download of user files 2014-11-04 01:42:02 +01:00
Eloy Lafuente (stronk7) 75387b8acb Merge branch '47917-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-11-04 00:04:08 +01:00
Damyon Wiese 339c6eca3c MDL-47927 LTI: Use PARAM_TEXT and p() for returned messages and errors 2014-11-04 11:47:12 +13:00
Frederic Massart bb69623c5c MDL-47965 tag: Enforcing security of tag auto completion 2014-11-04 11:27:49 +13:00
David Monllao 75d7e25198 MDL-47924 mod_lti: Fixing missing sesskey checkings
Also fixing a missing capability checking.
2014-11-04 11:04:32 +13:00
Yuliya Bozhko b2fa954d75 MDL-47190 Ensure badges cannot be awarded without a role
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-11-04 10:16:29 +13:00
Frederic Massart 35a60cbb38 MDL-47321 iplookup: Prevent guest users from using iplookup 2014-11-04 10:01:17 +13:00
Adrian Greeve 2c639e85a3 MDL-47697 mod_data: Fix group id change when editing.
When a teacher edits an entry in the database module
it would change the group ID to the one that the teacher
currently had selected.

Thanks to Steve Bond for providing a patch.
2014-11-04 09:58:05 +13:00
Juan Leyva 79eda0e9a0 MDL-45303 Web Services: forum_get_discussions web service misses group permissions check 2014-11-03 21:52:18 +01:00
John Okely fe8430e0dc MDL-47921 mod_lti: Add access control to mod/lti/launch.php 2014-11-04 09:09:05 +13:00
Dave Cooper ece03f3b13 MDL-47050 core_wordlist: Updated wordlist to include only animals. 2014-11-04 09:06:20 +13:00
Damyon Wiese ebab15d140 Merge branch 'MDL-48010_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-11-03 17:16:09 +08:00
Petr Skoda 0baf976363 MDL-47287 prevent web access to phpunit boostrap 2014-11-03 17:11:09 +08:00
Marina Glancy 818a6ef982 Merge branch 'wip-mdl-45204-m26' of git://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-11-03 17:05:26 +08:00
Damyon Wiese 765f45cbf0 MDL-47275 Grades: Sum of grades bug in max grade with extra credit
Sum of grades is not calculating max grade with extra credit for students
2014-11-03 16:57:04 +08:00
Andreas Grabs c6b6e5dece MDL-47865 mod_feedback - XSS through $searchstring in mod/feedback/mapcourse.php 2014-11-03 14:56:51 +08:00
Damyon Wiese 958703efe5 MDL-45538 Draft files fix: Fix version bump. 2014-11-03 14:24:29 +08:00
Damyon Wiese c645bf7bc3 Merge branch 'wip-MDL-45538-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-11-03 14:24:04 +08:00
Damyon Wiese b23074d9fb Merge branch 'MDL-35008_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-11-03 14:06:39 +08:00
pau.ferrer-ocana 1bcf7faa53 MDL-26447 gradebook: Default gradedisplaytype fixed for all locales 2014-11-03 13:57:17 +08:00
Damyon Wiese 35f8458b81 Merge branch 'wip_MDL-47966_m26_defaultheaders' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-11-03 13:08:28 +08:00
Sam Hemelryk 56d37916d5 MDL-47917 cachestore_memcached: fixed get_many ordering 2014-11-03 14:55:32 +13:00
Sam Hemelryk 2989fceeca MDL-47969 mod_survey: fixed HTML5 validation of index.php 2014-11-03 08:55:05 +13:00
Sam Hemelryk 0aaa4208d3 MDL-47968 mod_forum: fixed search form HTML5 validation 2014-11-03 08:54:50 +13:00
Tim Hunt 938ace15c4 MDL-48010 grade import from URL: don't corrupt the URL. 2014-10-31 19:53:35 +00:00
Tim Hunt 9139195273 MDL-48008 gradeimport_xml: report errors usefully 2014-10-31 19:53:33 +00:00
Tim Hunt 2c17b0ae74 MDL-47797 quesion preview: improve the behat script
Tests a few more buttons, and also verify more of the UI.
2014-10-31 16:01:08 +00:00
Tim Hunt 67d39dea34 MDL-47797 question preview: show more technical info
It is helpful for developers creating question types (at least) to be
able to see this.
2014-10-31 15:57:03 +00:00
David Mudrák c58c99db60 MDL-47883 admin: Fix missing string in the plugin validation 2014-10-31 12:57:00 +01:00
Dan Poltawski 7deea8e56a weekly release 2.6.5+ 2014-10-31 09:08:42 +00:00
Rajesh Taneja 3879943dde MDL-45204 phpunit: Fixed test_localcachedir test
make_localcache_directory is the first call to make
localcache, which is already created by reset. So deleting
existing localcache directory will pass this test
2014-10-31 16:48:23 +08:00
Petr Skoda 0a0145c5e8 MDL-47966 Add default content type and encoding 2014-10-31 14:02:19 +13:00
Sam Hemelryk 866551d73a Merge branch 'MDL-47875_MOODLE_26_STABLE' of https://github.com/crazyserver/moodle into MOODLE_26_STABLE 2014-10-31 11:15:16 +13:00
Iñaki Arenaza afa86df420 MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis
The group names we get from ldap_find_user_groups() can contain invalid LDAP
filter characters. So we need to escape them for LDAP filter usage.
2014-10-30 23:09:29 +01:00
Iñaki Arenaza b00d775eb2 MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis
As part of fixing MDL-43430, a typo has been detected in the
quoted alphanumeric characters (the '=' and '>' were transposed).
2014-10-30 23:09:25 +01:00
pau.ferrer-ocana 09c09e84f7 MDL-47875 choice: chat module strings not required from Choice anymore
AMOS BEGIN
 CPY [chatintro,mod_chat],[description,mod_choice]
AMOS END
2014-10-30 22:55:23 +01:00
pau.ferrer-ocana 33ed15457c MDL-42875 users: Show only profile visible roles on participants list 2014-10-31 10:36:02 +13:00
Jean-Michel Vedrine ba8baab3a5 MDL-35008 Lesson: url decode rules not applied to answers and responses 2014-10-30 13:22:12 +01:00
Marina Glancy dc8a9a1b83 Merge branch 'MDL-25057-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-10-30 17:15:59 +08:00
Marina Glancy 5023b2e9d8 Merge branch 'MDL-47569_CC_Errors26' of git://github.com/moodlerooms/moodle into MOODLE_26_STABLE 2014-10-30 16:17:06 +08:00
Marina Glancy 015934fd01 Merge branch '47970-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-30 16:16:59 +08:00
David Monllao f31e885dd6 MDL-46500 mod_data: Removing duplicate filemanager initialisations 2014-10-30 16:09:31 +08:00
Marina Glancy 9ca5b7d845 Merge branch 'MDL-29873_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-10-30 14:18:07 +08:00
Andrew Nicols deb5eed574 MDL-25057 mod_forum: Stop duplicating forum_read posts from cron
This also includes an upgrade script to delete the existing duplicates.
2014-10-30 14:03:53 +08:00
Ben Kelada aaabecb3d8 MDL-46500 filepicker: prevent error when element does not exist 2014-10-30 13:50:58 +08:00
Marina Glancy aa267ec48f MDL-45538 files: restore missing records in draft areas 2014-10-30 10:51:23 +08:00
Sam Hemelryk 262785290a MDL-47970 mod_scorm: fixed HTML5 validation error 2014-10-30 14:55:55 +13:00
Mark Nielsen 5e04ac3201 MDL-47569 backup: Do not close questions tag if never opened
This can happen when restoring quizzes that
do not have any questions.
2014-10-29 14:32:49 -07:00
Mark Nielsen b0b22030a9 MDL-47569 backup: Escape section summary for XML
This was causing the parsing of the XML
to fail because things like & were not
escaped.
2014-10-29 14:32:41 -07:00
Dan Poltawski 8699d48e7d Merge branch 'wip_MDL-40949_m26_pathsettings' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-10-29 13:24:23 +00:00
Michael Aherne fba86dfd98 MDL-47793 assign: Reset reveal identities 2014-10-29 11:21:31 +00:00
Julien Boulen c7bcbf6fe3 MDL-47584 database SQL: add debug info on connection error notices 2014-10-29 16:56:01 +08:00
Damyon Wiese adc40f1175 Merge branch 'wip-MDL-47647-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-10-29 16:18:53 +08:00
Damyon Wiese 02b80f49d4 Merge branch 'MDL-47790-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-10-29 15:50:19 +08:00
Daniel Kosinski a001ca90b4 MDL-46219 assignment: delete files when resetting assign activities 2014-10-29 15:39:56 +08:00
Damyon Wiese 575b851317 Merge branch 'MDL-47755_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-10-29 15:31:26 +08:00
Damyon Wiese dbd4537be7 Merge branch 'wip-MDL-47796-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-10-29 15:16:32 +08:00
Damyon Wiese 14a50cf362 Merge branch 'MDL-47612-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-10-29 14:54:04 +08:00
Damyon Wiese 7fdf5d0cb0 Merge branch 'MDL-47227_MOODLE_26_STABLE' of https://github.com/crazyserver/moodle into MOODLE_26_STABLE 2014-10-29 14:43:49 +08:00
Adrian Greeve 32b5098b68 MDL-47796 mod_data: Fix display of group records.
When viewing entries as a teacher in separate group
mode, changing the group would result in random
entries being shown.
2014-10-29 14:11:38 +08:00
Dan Marsden 91ea2b9eef MDL-33939 gradingform_guide: use correct max grade for scales. 2014-10-29 13:23:55 +08:00
Damyon Wiese f47c0ff1e3 Merge branch 'wip-MDL-46517-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-10-29 13:14:18 +08:00
David Scotson 3bfec1d6bf MDL-40343 forum: indent less when mobile, nested
Changes the indenting of forum replies to be relative to the width of
the parent container, so the indent decreases as threads get nested
deeper. Also reduces the indent size automatically for smaller screen
sizes.
2014-10-29 12:56:26 +08:00
Andrew Nicols 80fb3a95f6 MDL-47930 mod_forum: Display all forum statuses correctly
It is possible for users with the mod/forum:managesubscriptions to
subscribe to forums with subscription disabled. This is handled by
forum_get_subscribe_link() already and should have been handled here all
along.
2014-10-29 11:53:31 +08:00
Marina Glancy c472a46522 MDL-46517 calendar: adjust display for DST
Thanks to Jo Matthews for providing a patch
2014-10-29 11:26:23 +08:00
Corey Wallis 84dbe70d1e MDL-46517 calendar: adjust dates for DST
Change-Id: I269382031e4ffa714396f3d9ce2315a5c96d929c
2014-10-29 11:26:23 +08:00
Petr Skoda 6aab0acaba MDL-40949 admin: Fix $CFG->preventexecpath hints
This setting restricts all local paths, not just
executables.
2014-10-29 10:49:16 +13:00
Dan Poltawski 481667d333 weekly release 2.6.5+ 2014-10-28 12:32:10 +00:00
Dan Poltawski de0df15ea7 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-10-28 12:32:08 +00:00
Pau Ferrer Ocaña 95224eaea4 MDL-47227 admin: Fix user bulk selection over 1000 2014-10-28 09:00:05 +01:00
Kordan 18e749e45e MDL-47790 core_outputcomponents: added one more <tr> around <td clspan="xx"> when $table->data[] = "hr" is provided 2014-10-28 15:49:40 +08:00
Marina Glancy 6ef51ef5aa Merge branch '47914-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-28 12:24:24 +08:00
Sam Hemelryk 7e49daa8b0 MDL-47183 post-integration fixes
* Fixed typo with context_module::instance
* Fixed use of $mod->get_context()
2014-10-28 15:50:06 +13:00
Sam Hemelryk c07cee9092 Merge branch 'MDL-47183-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-10-28 14:02:24 +13:00
Sam Hemelryk e68de10404 MDL-47914 report_stats: better handling of user and mode 2014-10-28 11:53:00 +13:00
Marina Glancy 9ab3d25e12 MDL-47585 stats: fixed incorrect user dropdown 2014-10-28 10:51:07 +13:00
AMOS bot 5cfb31b4d1 Automatically generated installer lang files 2014-10-28 00:05:39 +08:00
Adrian Greeve 30e7ca9449 MDL-47647 lib: Fix message unit test failure.
Messaging unit tests on Windows were failing because
of a comparison between two file paths. Part of the
path would have a forward slash instead of a backslash
and so would fail.
2014-10-27 16:44:14 +08:00
Damyon Wiese 7ec44150c4 Merge branch 'MDL-47588_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-27 15:31:21 +08:00
Damyon Wiese 99689a94cd Merge branch 'm26_MDL-47210_IIS_PATH_INFO_Ignored_In_Required_Login_Pluginfile_Redirect' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-10-27 14:01:37 +08:00
Marina Glancy 66f6a6ff30 Merge branch 'MDL-47882_scorm_loadsco_invalid_html_26_STABLE' of git://github.com/MorrisR2/moodle into MOODLE_26_STABLE 2014-10-27 11:49:48 +08:00
Damyon Wiese ab3d20a5b1 MDL-47690 Course: Remove unused variable from unit tests. 2014-10-27 11:28:36 +08:00
Damyon Wiese b37556c830 Merge branch 'MDL-47690-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-10-27 11:28:20 +08:00
Damyon Wiese 77f2a17524 Merge branch 'wip-MDL-30358-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-10-27 10:31:35 +08:00
Matteo Scaramuccia 304db1ce07 MDL-47210 Files API: IIS, PATH_INFO ignored in required login redirect. 2014-10-26 08:07:10 +01:00
Ray Morris bf84bf48ee MDL-47882 SCORM: invalid HTML in loadSCO.php 2014-10-24 17:05:00 -05:00
Tim Hunt f2a6427854 MDL-47588 question behat tests: don't close the preview window.
If you do. Chrome + Selenium2 gets stuck (on Windows at least). Selenium
must be trying to send commands ot a window that does not exist any
more.
2014-10-24 17:55:03 +01:00
Tim Hunt 474f626ed9 MDL-47588 behat: fix switching back to the main window in Chrome
This fix is mostly based on what Colin Chambers found out. This commit
is a simplification of his work.

The problem is that the Chrome / Selenium 2 integration cannot swich to
a window with a blank name. The work-around applied here is, when we
switch away from an unnamed window, we set a name on it. Then we can use
that name to switch back.
2014-10-24 17:48:47 +01:00
Dan Poltawski 024077a38e Merge branch 'MDL-46712-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-10-24 15:37:27 +01:00
Dan Poltawski 16ca7c28ba Merge branch 'MDL-47780_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-10-24 15:19:50 +01:00
Dan Poltawski 2e014c035b Merge branch 'wip-MDL-47760-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-10-24 15:18:35 +01:00
Dan Poltawski 85f6922b00 Merge branch '46518-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-24 15:16:59 +01:00
Dan Poltawski fc74e6573e Merge branch '47608-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-24 15:13:27 +01:00
Dan Poltawski 182870087e Merge branch 'MDL-47397-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-10-24 15:09:50 +01:00
Dan Poltawski 8322bdabed weekly release 2.6.5+ 2014-10-24 11:15:07 +01:00
Dan Poltawski 5acd7ad70f Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-10-24 11:15:05 +01:00
Juan Leyva ee37c81e26 MDL-47690 web services: Fixed invalid return parameter type in mod_url 2014-10-24 10:19:05 +02:00
Dan Bennett 642298073c MDL-46332 : Display of 'Remove' button in Add/Remove Groups in Grouping
Fixed styling of Add/Remove Groups in Grouping to now use the same
layout as the Group Members page.
This fixes the issue with buttons being unaligned and introduces
consistency between pages.
2014-10-24 13:41:04 +08:00
Marina Glancy 81e20e1477 Merge branch 'MDL-47340-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-10-24 11:55:42 +08:00
Damyon Wiese 7b159792bc Merge branch '46499-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-24 11:12:00 +08:00
Sam Hemelryk 2df4bc7d2d Merge branch 'wip_MDL-47795_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2014-10-24 09:58:57 +13:00
gdharris 06bcc7c770 MDL-46853 calendar: fix import of no duration events 2014-10-24 09:55:58 +13:00
Dan Poltawski a87c0ddd46 Merge branch 'MDL-47815-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-10-23 17:28:42 +01:00
Dan Poltawski 59258b0433 Merge branch '47684-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-23 16:33:00 +01:00
Frederic Massart bb83e02d10 MDL-47397 assignfeedback_editpdf: Tests use reliable way to annotate PDF
The drag and drop step did not work, so we moved to using the stamps
to annotate the PDF. They do not rely on drag&drop and produce the same
effects.
2014-10-23 17:57:37 +08:00
Frederic Massart 0ba6b48e14 MDL-47397 assignfeedback_editpdf: Copy stamps to other students in team
During a team submission the stamps were attached to the user that
was graded and not to the other users. This could lead to errors when
generating the PDF for each user.
2014-10-23 17:57:32 +08:00
Marina Glancy fd0713b18b Merge branch 'wip-MDL-47675-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-10-23 16:58:34 +08:00
Damyon Wiese 7f6b6ddd64 Merge branch 'MDL-47817-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-10-23 16:16:13 +08:00
Sam Hemelryk cd4cb7a727 MDL-47077 report_participation: fixed pagination in groups 2014-10-23 16:11:54 +08:00
Adrian Greeve 42a69e3e0b MDL-47675 phpunit: Update unit tests to pass on MSSQL
Unit tests were failing on MSSQL. gc_collect_cycles() was
removed from the phpunit utils.php file to save time in running
the tests, but MSSQL doesn't clean up open files as well as
other databases.

This patch includes the garbage collection for the unit tests
that require it.
2014-10-23 14:24:45 +08:00
Damyon Wiese 2f0a76475c Merge branch 'MDL-32616_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-23 12:03:55 +08:00
Juan Leyva 8fa84ae035 MDL-47817 web services: Fixed check of inexistent constant WS_SERVER 2014-10-22 13:23:19 +02:00
Tim Hunt fdc3d8c577 MDL-32616 question engine: set_max_mark_in_attempts MySQL perf
The MySQL (& Maria DB) query 'optimizer' was failing to handle this
query, so for that DB only, we give it an equivalent query that it can
get right.

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

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

Different error conditions were seen because not all of the tests check for
an error from the call to process_data(), instead just checking that the
value had been updated correctly.
2014-10-22 13:20:06 +08:00
AMOS bot 197df84351 Automatically generated installer lang files 2014-10-22 00:07:42 +08:00
Gareth J Barnard a5cf997f29 MDL-47795 SCORM: SCORM report not a report. 2014-10-21 15:47:19 +01:00
Mark Nelson 4219b1ad72 MDL-47780 core: corrected docs for get_user_capability_course() 2014-10-21 00:53:15 -07:00
Damyon Wiese 0a5454143d Merge branch 'wip_MDL-41593_m26_preventexecdefault' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-10-21 12:46:16 +08:00
Yuliya Bozhko 9ef8ea3a57 MDL-47755 badges: Fix internal message output
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-10-21 16:29:13 +13:00
Sam Hemelryk 0b295ad076 Merge branch 'm26_MDL-36669_UFO_references_in_filelib' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-10-21 15:17:56 +13:00
Matteo Scaramuccia 317eaa569b MDL-36669 Filters: Remove the last ref to the UFO library. 2014-10-20 23:27:58 +02:00
Dan Poltawski e9afccf2fc Merge branch 'MDL-38172_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-10-20 18:28:51 +01:00
Dan Poltawski b8992b5585 Merge branch 'MDL-47666_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-20 17:31:57 +01:00
Dan Poltawski 3eff69cace Merge branch 'MDL-47711_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-20 17:28:52 +01:00
Dan Poltawski 8362a44e32 Merge branch 'MDL-47673_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-20 17:21:42 +01:00
Tim Hunt 04049991ef MDL-47711 behat: make it easier to copy the init.php command. 2014-10-20 12:05:24 +01:00
Tim Hunt 01e6702bef MDL-47673 quiz generator: default grade 100 & fix review options
The review option defaults need to be like what you get from the editing
form, no what is stored in the database, or they don't work!
2014-10-20 12:05:14 +01:00
Tim Hunt 12659680cb MDL-47666 DB auth & enrol: unit tests fail with custom DB drivers
Changed to used $DB->get_db_family, rather than hard-coding the list of
class names.
2014-10-20 12:05:04 +01:00
Jetha Chan d00b7a99d8 MDL-47340 action_menu: selector, RTL, consistency fixes 2014-10-20 17:10:39 +08:00
Marina Glancy 6f0276ceaf Merge branch 'wip_MDL-47754_m26_installredir' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-10-20 17:04:54 +08:00
Marina Glancy be54fc0412 Merge branch 'MDL-38065-fix-26' of git://github.com/jmarthaler/moodle into MOODLE_26_STABLE 2014-10-20 14:09:02 +08:00
Marina Glancy 442375e28e MDL-47760 grades: dim category name if hidden 2014-10-20 14:06:03 +08:00
Petr Skoda ba5fd909d4 MDL-47754 install: fix redirect loop
Conflicts:
	user/editadvanced.php
2014-10-20 12:55:24 +13:00
Sam Hemelryk ef378ff38e MDL-46518 navigation: site glossaries now expand properly 2014-10-20 11:19:47 +13:00
Sam Hemelryk cd6a37e53b MDL-47608 cachestore_mongo: fixed unit test error
If you configured your site to run mongo unit tests and had
the mongo extension and backend installed but did not have the
mongo service running you would get a fatal error when running
the unit tests.
That problem has been fixed by checking the mongo test instance
is ready before returning it.
2014-10-20 11:05:10 +13:00
Sam Hemelryk 3fa8adb3a6 MDL-46499 navigation: better enrolled course limit
We now user $CFG->navcourselimit to limit the number of
courses shown in the navigation when browsing another users
full profile. Previously it showed all courses which caused
some slowdown.
2014-10-20 10:58:34 +13:00
Sam Hemelryk 5bcbd25687 MDL-47684 mod: better validation of rating options 2014-10-20 08:44:18 +13:00
Jean-Michel Vedrine 5a9575e2a1 MDL-29873 Lesson: Essays not shown on grade page with SQL server 2014-10-18 20:00:33 +02:00
Jean-Michel Vedrine 8407738e91 MDL-38172 Lesson: Additional Info not displayed at end of lesson 2014-10-17 17:07:53 +02:00
Dan Poltawski e4fe4fdabe weekly release 2.6.5+ 2014-10-17 14:31:33 +01:00
Dan Poltawski 22e31aeb87 Revert "MDL-47684 mod: better validation of rating options"
This reverts commit ee1389b8f7.
2014-10-17 14:28:23 +01:00
Dan Poltawski 7b3addded7 Revert "MDL-44548 mod_scorm: force an external sync to check for updated files."
This reverts commit d159b4f18c.
2014-10-17 09:31:27 +01:00
Jon Marthaler 80c90ea46b MDL-38065 gradebook: Fix issue with hidden categories breaking rowspan.
Hidden subcategories break the rowspan in the gradebook; this fix corrects
the calculation of the rowspan.
2014-10-16 22:24:27 -05:00
Dan Poltawski 52af752236 Merge branch 'm26_MDL-44548' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-10-16 11:46:36 +01:00
Dan Poltawski 29b097ba25 Merge branch 'MDL-47710_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-16 11:35:32 +01:00
Tim Hunt 24cc2d5dee MDL-47710 qformat_gift: fix bahat fails due to different ids in exports 2014-10-16 11:05:12 +01:00
Dan Poltawski 45e983598d Merge branch '47684-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-16 11:02:37 +01:00
Dan Poltawski bc636cb602 Merge branch 'MDL-47657-26' of git://github.com/gurgus/moodle into MOODLE_26_STABLE 2014-10-16 10:53:25 +01:00
Sam Hemelryk ee1389b8f7 MDL-47684 mod: better validation of rating options 2014-10-16 16:25:19 +13:00
Dave Cooper c27db9da76 MDL-47657 mod_glossary: Fixed wrong error message on edit timeout. 2014-10-16 09:44:02 +08:00
Sam Hemelryk f8224f9153 Merge branch 'MDL-47594_M26' of git://github.com/kordan/moodle into MOODLE_26_STABLE 2014-10-16 11:04:57 +13:00
Sam Hemelryk 3b5e7df222 Merge branch 'wip-MDL-47629-MOODLE_26_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_26_STABLE 2014-10-16 10:31:24 +13:00
Yolanda Ordóñez Rufat fd3a596616 MDL-47466 calendar: fixed error ORA-01795 in calendar_get_events 2014-10-15 14:17:12 +02:00
Damyon Wiese 4df478537c Merge branch 'wip-MDL-47613-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-10-15 16:59:14 +08:00
Dan Poltawski ac94e15c3d Merge branch 'MDL-38732-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-10-15 08:41:59 +01:00
Dan Marsden 9f5c2ab26d MDL-47431 advanced grading: correct use of frankenstyle names for consistency 2014-10-15 14:56:26 +08:00
Damyon Wiese 84f9cf527f Merge branch 'MDL-47646_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-15 14:39:08 +08:00
Damyon Wiese a8b623bffd Merge branch 'wip-MDL-47572-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-10-15 14:09:54 +08:00
Damyon Wiese 4676cdea2a Merge branch 'wip-MDL-47583-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-10-15 13:51:09 +08:00
Frederic Massart b847d5ed6b MDL-38732 gradereport_grader: Undefined variable in unit tests 2014-10-15 12:24:21 +08:00
Marina Glancy 6929837ade MDL-30358 forms: strict validation is too strict 2014-10-15 11:57:45 +08:00
Kevin Wiliarty de104ef9f5 MDL-47629 quiz review: display cloze feedback on top of "Check" button 2014-10-14 15:43:04 -04:00
Dan Poltawski 229f42c207 Merge branch 'MDL-38732-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-10-14 19:02:13 +01:00
Dan Poltawski 09d7d68f59 weekly release 2.6.5+ 2014-10-14 18:03:08 +01:00
Dan Poltawski 3283b5b41d Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-10-14 18:03:05 +01:00
Dan Poltawski 965482e923 MDL-46235/MDL-46971 mysql_compress_rows: fix typo 2014-10-14 15:12:09 +01:00
Dan Poltawski ce417bc33f MDL-46235 fix trailing whitespace 2014-10-14 14:49:46 +01:00
Dan Poltawski c7134a38cb Merge branch 'wip_MDL-46235_m26_innodbtext' of github.com:skodak/moodle into MOODLE_26_STABLE 2014-10-14 12:27:03 +01:00
Damyon Wiese 4d34c4acab Merge branch '46151-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-10-14 15:29:41 +08:00
Sam Hemelryk 11a4bfc401 MDL-46151 cachestore_memcache: set_many now uses set 2014-10-14 20:03:52 +13:00
Frederic Massart 92e3f3efca MDL-38732 gradereport_grader: Handle simultaneous graders 2014-10-14 13:54:40 +08:00
Adrian Greeve 48c28358bc MDL-46546 core_grades: Move error checking after csv upload. 2014-10-14 10:29:16 +08:00
Damyon Wiese 2a186dc273 MDL-46235 Admin: Fix typos in mysql_compressed_rows.php cli script 2014-10-14 10:05:07 +13:00
Sam Hemelryk cfa09c2f8c MDL-46151 cachestore_memcache: now checks extension version for support 2014-10-14 08:27:20 +13:00
AMOS bot c9e2d15904 Automatically generated installer lang files 2014-10-14 00:05:43 +08:00
Tim Hunt 93bb298519 MDL-47646 CURL redirect unit test: handle broken servers 2014-10-13 15:53:21 +01:00
Andrew Nicols ca38a5720b MDL-47612 gradereport_grader: Remove max-width for RTL
For some reason, Safari behaves incorrectly when dealing with RTL
content where the table has a max-width of 100%.
2014-10-13 11:30:25 +08:00
Adrian Greeve 53e4a029c1 MDL-46546 gradebook: Grade import gives error on bad csv upload. 2014-10-13 10:50:59 +08:00
Dan Poltawski 23fcbc4cdf weekly release 2.6.5+ 2014-10-10 12:08:48 +01:00
Dan Poltawski b62c768a96 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-10-10 12:08:44 +01:00
Marina Glancy 97ea09ad3a MDL-47613 wiki: allow searching several words
Thanks to Sandeep B for suggested solution
2014-10-10 16:35:06 +08:00
Kordan 97257142fe MDL-47594 core_accesslib: removed three useless lines of code 2014-10-10 08:42:24 +02:00
Dan Marsden d159b4f18c MDL-44548 mod_scorm: force an external sync to check for updated files. 2014-10-10 15:14:19 +13:00
AMOS bot a9569a1aa2 Automatically generated installer lang files 2014-10-10 00:05:34 +08:00
Dan Poltawski 35375e4da5 MDL-47497 qformat_gift: fix bad backported behat test 2014-10-09 13:21:03 +01:00
Dan Poltawski 75381ff958 Merge branch 'MDL-46647-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-10-09 07:10:19 +01:00
Marina Glancy cc30034a69 MDL-47583 tinymce_managefiles: correctly decode filename 2014-10-09 10:54:46 +08:00
Sam Hemelryk 0cd53ea8cd Merge branch 'MDL-46984_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-10-09 09:16:43 +13:00
Dan Poltawski f93ee66dd3 Merge branch 'MDL-47536_26' of git://github.com/stronk7/moodle into MOODLE_26_STABLE 2014-10-08 15:24:42 +01:00
Tim Hunt a985612eeb MDL-47497 qformats gift and xml: basic test of export.
Really, this is just to test the new behat setps, as much as anything.

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

This commit introduces two new steps:

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

At the moment, this only works for links with href attributes.
2014-10-08 19:53:30 +08:00
Damyon Wiese 372276a6c7 Merge branch 'wip-MDL-47492-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-10-08 17:00:28 +08:00
Marina Glancy 7809798e4e MDL-47572 libraries: modify unittest to avoid random timing fail
Thanks to Nigel Cunningham
2014-10-08 10:57:40 +08:00
Sam Hemelryk 22362b965f Merge branch 'MDL-47470-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-10-08 12:21:37 +13:00
Sam Hemelryk 99324aaa38 Merge branch 'MDL-46182_MOODLE_26_STABLE' of https://github.com/NeillM/moodle into MOODLE_26_STABLE 2014-10-08 11:28:26 +13:00
Sam Hemelryk c73108bb4d Merge branch 'MDL-28075_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-08 10:57:18 +13:00
Sam Hemelryk e06146cea9 Merge branch 'MDL-46391-26' of https://github.com/DmitryNefedov/moodle into MOODLE_26_STABLE 2014-10-08 10:45:29 +13:00
Sam Hemelryk 01fd426bfa Revert "MDL-46978 gradebook: Edit grade item changes visibility of category"
This reverts commit f9f37ec8f4.
2014-10-08 10:37:42 +13:00
Marina Glancy 5f0def5568 Merge branch 'MDL-31936-26-workshop-reset' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-10-07 17:16:11 +08:00
Frederic Massart 9b741f8ce1 MDL-46647 core_grades: Adding tests for fetch_all_helper() 2014-10-07 15:26:31 +08:00
Eloy Lafuente (stronk7) c56af2ca94 MDL-46647 grades: Fix fetch_all_helper() towards cross-db
That helper, used to fetch information from DB by all the grade_object
chidren classes was not behaving properly handling TEXT/CLOB columns.

Instead of creating a property within every class listing the
existing columns, it seems to be a better solution to instrospect
the database metadata (cached) to ensure the correct SQL is generated
in every case.
2014-10-07 15:26:31 +08:00
David Mudrák 3cd5ad2dbd MDL-31936 workshop: Backport unit test improvements from 2.7
This is required to be able to fully test the workshop reset features.
2014-10-07 09:24:19 +02:00
Sam Hemelryk 534e4706b7 Merge branch 'MDL-36460-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-10-07 15:16:56 +13:00
Marina Glancy 763f8ac0c1 MDL-31936 workshop: version bump and @since phpdocs 2014-10-07 10:12:28 +08:00
Marina Glancy 5104bb8a24 Merge branch 'MDL-31936-26-workshop-reset' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-10-07 10:10:33 +08:00
Petr Skoda 77d5a775d9 MDL-41593 admin: use default setting if preventexecpath active
This resolves problems when installing Moodle
and addons when preventexecpath active.

Please note the admin_setting_configfile is still
incorrectly restricted - this will be resolved by
MDL-40949.
2014-10-07 11:30:57 +13:00
Willy Lee 6505278244 MDL-46295 course: add search box to all course listings, manage button when appropriate 2014-10-07 11:01:35 +13:00
David Mudrák a9b0e33a44 MDL-31936 workshop: Implement the course reset support
Backported from 2.7. Co-authored by Michael Hughes
<michaelhughes@strath.ac.uk>
2014-10-06 23:36:56 +02:00
Sam Hemelryk d5f68fcfdc Merge branch 'MDL-46978-26' of https://github.com/danielneis/moodle into MOODLE_26_STABLE 2014-10-07 10:26:19 +13:00
Dan Poltawski 7c9c1aa3f7 Merge branch 'MDL-46054-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-10-06 16:01:36 +01:00
Dan Poltawski a8e9a54165 Merge branch 'MDL-45504_26' of git://github.com/stronk7/moodle into MOODLE_26_STABLE 2014-10-06 15:48:30 +01:00
Dan Poltawski 091f2f08a9 Merge branch 'MDL-47426_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-10-06 08:56:32 +01:00
Gregory Faller 83d3fbccb6 MDL-46712: Center EditPDF window on browser resize / zoom 2014-10-06 14:56:11 +08:00
Andrew Nicols 2763a571d2 MDL-47183: viewhiddenactivities should use the module context
Thanks to Paulo Matos for the forum part of this change.
2014-10-06 12:22:19 +08:00
Eloy Lafuente (stronk7) 8ae928cfe4 MDL-47536 timezones: update to 2014h (2296 rules) 2014-10-06 01:55:35 +02:00
Eloy Lafuente (stronk7) 271b1dfe68 MDL-45504 environment: define 2.8 requirements
No changes from 2.7, so this is a simple copy of them.

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

Before this change the following was being done:

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

After this change the following happens:

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

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

Before the change an upgrade on a site with around 387967 course_section records the upgrade would be stuck on the delete query for many hours, after the change the time can be measured in minutes.
2014-10-03 10:24:32 +01:00
David Mudrák 1399d7bf0f MDL-44536 workshop: Fix missing phpDoc for user report callbacks 2014-10-03 10:01:22 +02:00
Ray Hernandez 9e22a6008b MDL-44536 workshop: Instantiate with the plain course module record 2014-10-03 10:01:22 +02:00
Andrew Nicols 9d15ad6f09 MDL-36460 mod_forum: Restrict forum subsription list based on availability info 2014-10-03 12:00:44 +08:00
Tim Hunt f401669045 MDL-28075 question editing: tidy code
Remove an unnecessary else (the if, and else if, always end in a redirect)
and unindent that code.
2014-10-02 21:56:15 +01:00
Tim Hunt 3e27d19008 MDL-28075 question editing: sort out nav bar when editing in a quiz
If you edited a question from the Edit quiz page in a quiz, the navigation
bar was far too long. This was due to some odd code that was trying too
hard to be clever.

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

The solution is to rewrite the query so that:

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

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

   Now the linking is role-assignments <-> subquery <-> users,
   so the SELECT DISTINT eu1_u.id FROM {enrolled users} is central.
   That seems to send a strong hint to the query optimiser about
   a good order to execute the query.
2014-10-02 17:11:00 +01:00
Dan Poltawski dcf18dcec6 weekly release 2.6.5+ 2014-10-02 15:18:58 +01:00
Dan Poltawski 59df04c620 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-10-02 15:18:55 +01:00
Dan Poltawski a1b0efdc71 Merge branch 'MDL-37707-26-fixup' of https://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-10-02 09:49:33 +01:00
Marina Glancy 6defac8b95 MDL-47492 core_grades: Behat test for using scales and mingrade in gradebook 2014-10-02 16:02:23 +08:00
Marina Glancy 1426c7c710 MDL-47492 behat: refer to table column indexes instead of names 2014-10-02 16:02:17 +08:00
Sam Hemelryk 00c7641fb7 Merge branch 'MDL-47408-26' of https://github.com/DmitryNefedov/moodle into MOODLE_26_STABLE 2014-10-02 17:31:25 +13:00
Dmitry Nefedov b587eeadae MDL-47408 user: Add checking before adding blog's link.
Checking enableblogs  and bloglevel, userid, constant  BLOG_USER_LEVEL.
2014-10-02 12:19:51 +08:00
Frederic Massart c5d420e272 MDL-37707 mod_assign: Prevent user from changing grouping in team submissions 2014-10-01 11:28:59 +08:00
Sam Hemelryk d94cd229c9 Revert "MDL-47033 general: Fix incorrect use of 'course' layout"
This reverts commit 8d26cf3eda.
2014-10-01 15:49:40 +13:00
Sam Hemelryk 724aa37de9 Merge branch 'm26_MDL-47404' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-10-01 15:38:02 +13:00
Dan Marsden 6b84a536e8 MDL-47404 filelib: Prevent flash from treating files as uploads
added to send_stored_file as well.
2014-10-01 15:09:24 +13:00
Sam Hemelryk 2437dac26a MDL-47428 language: fixed typo 2014-09-30 23:43:48 +02:00
zbdd 0df8bfefd1 MDL-42993 auth: spaces removed from usernames by default only
Functionality by default does not change with this patch.
However spaces are no longer stripped when cleaning usernames IF
$CFG->extendedusernamechars has been set.

Also included 2 trim statements where small issues were found with reading
external usernames in that  were not filtered for trailing whitespaces.
2014-10-01 08:29:47 +13:00
Dan Poltawski 1bad2d137b MDL-47470 behat: fix 'I navigate to' exception
When a child page is not found
2014-09-30 15:20:25 +01:00
Yolanda Ordóñez Rufat 00fbac668e MDL-47466 calendar: use get_in_or_equal() in function calendar_get_events to fix problem with ORA-01795 2014-09-30 14:03:27 +02:00
Dan Poltawski d2a072ffce Merge branch 'MDL-47385-26' of https://github.com/DmitryNefedov/moodle into MOODLE_26_STABLE 2014-09-30 11:41:42 +01:00
Dan Poltawski b76c62ee31 Merge branch 'm26_MDL-47097' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-09-30 08:31:03 +01:00
Dan Poltawski e795621da7 Merge branch 'MDL-32275-26' of git://github.com/gurgus/moodle into MOODLE_26_STABLE 2014-09-30 08:29:06 +01:00
Julien Boulen 3f1e846902 MDL-46984 core_course: added grouping name for activities with no link 2014-09-29 20:45:22 -07:00
Sam Hemelryk 27499a59d6 Merge branch 'm26_MDL-47170' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-09-30 10:03:12 +13:00
Dan Poltawski b5d4f3e1eb Merge branch 'MDL-46920-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-09-29 16:25:50 +01:00
Marina Glancy 6b0954161e MDL-46054 web_services: wrong key in exception string 2014-09-29 15:38:13 +02:00
Dan Poltawski 5d89699bbb Merge branch 'wip-mdl-47154-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-09-29 12:50:31 +01:00
Dan Poltawski 007763c3c4 Merge branch 'MDL-47069-26-plugin-dependency' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-09-29 12:47:17 +01:00
Dan Poltawski d7737f17c8 Merge branch 'wip_MDL-47333_m26_fonts' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-09-29 10:44:30 +01:00
Dmitry Nefedov 0ed4a94bee MDL-46391 messages: Display search button under contact list.
Add search button to only Message navigation -> Contacts section.
2014-09-29 17:28:16 +08:00
Sam Hemelryk c2f9e31e74 Merge branch 'MDL-47033_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-09-29 15:18:06 +13:00
Sam Hemelryk eb5b0622b0 Merge branch 'wip-MDL-47398-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-29 14:35:10 +13:00
Sam Hemelryk 40eb3d691c Merge branch 'MDL-47408-26' of https://github.com/DmitryNefedov/moodle into MOODLE_26_STABLE 2014-09-29 14:32:44 +13:00
Sam Hemelryk 8590c0e798 Merge branch 'm26_MDL-47404' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-09-29 14:23:26 +13:00
Sam Hemelryk 6abdfab12f Merge branch 'MDL-39190_26' of https://github.com/pauln/moodle into MOODLE_26_STABLE 2014-09-29 14:20:02 +13:00
David Mudrák aea7c4793a MDL-47411 admin: Check if the plugin is a git submodule on uninstalling
Credit goes to PJ King. I was trying to add unit tests for this new
behaviour but it turned out there are many hard-coded dependencies and
it's not easy to make the whole machinery support alternative location
of testable (fake) plugins.
2014-09-29 01:43:38 +02:00
Sam Hemelryk 811f235fb6 Merge branch 'MDL-37707-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-09-29 11:35:27 +13:00
Sam Hemelryk 9ff32d8533 Merge branch 'MDL-43566-26' of https://github.com/willylee/moodle into MOODLE_26_STABLE 2014-09-29 09:51:40 +13:00
Sam Hemelryk 1e26495fc7 Merge branch 'MDL-47381_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-09-29 09:06:39 +13:00
Eloy Lafuente (stronk7) 0faa4740d0 MDL-47242 theme_bootstrapbase: Fixed whitespace (take2)
Seems that previous whitespace fix was not ok.
2014-09-28 18:34:11 +02:00
AMOS bot 74efb854a1 Automatically generated installer lang files 2014-09-28 00:09:34 +08:00
Dmitry Nefedov a9d02522f5 MDL-47408 user: Add enableblogs checking before adding blog's link. 2014-09-27 15:17:14 +08:00
Dave Cooper f0ba13d41f MDL-32275 enrol: Last site access column now shows last course access
Conflicts:
	user/index.php
2014-09-26 11:42:23 +08:00
Petr Skoda a288d420e2 MDL-47333 fix support for custom fonts in tcpdf 2014-09-26 13:47:21 +12:00
David Mudrák dc1b234060 MDL-47069 admin: Add option to upload required ZIP at the check page
The plugins check page displays other plugins that the current one
depends on.  Previously, we always displayed the other plugin as a link
to the plugins directory. This did not work well in two scenarios:

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

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

This patch displays the Install or Upload or Check for updates links
next to the required plugin instead, as appropriate.
2014-09-25 16:55:50 +02:00
Dmitry Nefedov 7a366a2a3f MDL-47385 coursecat: Mistake line in phpdocs deleted. 2014-09-25 21:14:26 +08:00
Willy Lee ab95bd1c76 MDL-43566 course: add delete icon to search returns in course management listings 2014-09-25 06:03:04 -07:00
Dan Poltawski e26204c0cd weekly release 2.6.5+ 2014-09-25 11:17:57 +01:00
Dan Poltawski 711d35d7bf Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-09-25 11:17:54 +01:00
Marina Glancy 607a001c8e MDL-47398 core_grades: fix grade category generator 2014-09-25 10:39:46 +08:00
Dan Marsden 106317ea84 MDL-47404 filelib: Prevent flash from treating files as uploads
Flash treats files as uploads if filename is passed in content-disposition
this causes security to be enforced that causes issues with SCORM packages
2014-09-25 13:22:46 +12:00
Sam Hemelryk f8ba5fe93b MDL-47242: Fixed whitespace 2014-09-25 12:19:47 +12:00
Pavel Sokolov 9fd75edd91 MDL-37707 mod_assign: Prevent user from switching to and from team submissions 2014-09-24 16:08:00 +08:00
Jetha Chan 80b1aa6138 MDL-47242 theme_bootstrapbase: inverted color and RTL fixes 2014-09-24 15:55:31 +08:00
Eloy Lafuente (stronk7) 88b305ac6c Merge branch 'MDL-47224_26' of git://github.com/aolley/moodle into MOODLE_26_STABLE 2014-09-24 01:27:22 +02:00
Eloy Lafuente (stronk7) 3f91c3b2ce MDL-47180 qformat_webct: whitespace cleanup 2014-09-24 00:58:30 +02:00
Eloy Lafuente (stronk7) 018edb8b4d Merge branch 'MDL-47180_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-09-24 00:41:27 +02:00
AMOS bot a02a228c1b Automatically generated installer lang files 2014-09-24 00:06:05 +08:00
Tim Hunt 6bc01b7186 MDL-47381 qformat: Behat tests have wrong plugin type. 2014-09-23 11:57:05 +01:00
Sam Hemelryk e971132854 Merge branch 'MDL-46811-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-09-23 16:36:09 +12:00
Paul Nicholls 7c8aeeb8d9 MDL-39190 Javascript: Pop-up calendar days of week wrong
The YUI2 calendar widget (still used via 2in3) uses midnight as the time
component of its Date objects, which triggers a Safari bug resulting in
11pm Saturday being returned instead of midnight Sunday when subtracting
days to get the last few days of the previous month.  This shows up ONLY
on the month after DST begins, if DST begins on the last Sunday of a given
month (and the Calendar widget is set to Sunday as the first day of the
week).  The fix/workaround of using noon instead of midnight is employed
by YUI3 and others.
2014-09-23 16:33:56 +12:00
Adam Olley c45b61797c MDL-47224 qtype_calculated: Calculated qtype comment on datasetitems should follow formatting rules 2014-09-23 11:07:58 +09:30
Jonathan Harker 6b356ae385 MDL-47316 mod_forum: Fix course overview performance regression
make more efficient use of mod_info cache by processing courses
 sequentially.

Change-Id: I03b808c8a7efc42879ec2689fbd2a9fe7a8f1103
2014-09-23 12:52:51 +12:00
Sam Hemelryk dc58a459c3 Merge branch 'MDL-47242-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-09-23 12:04:29 +12:00
Eloy Lafuente (stronk7) 323172ff31 Merge branch 'MDL-47269_M26' of https://github.com/nadavkav/moodle into MOODLE_26_STABLE 2014-09-23 01:30:37 +02:00
Tim Hunt 99a63b29e1 MDL-37998 quiz settings: disableif rules should account for overrides.
Some form fields are disabled if only one attempt is allowed. However,
there may be an override allowing some students more attempts. We need
to account for that possiblity when setting up the disabled if rules.

Note the disabledIf is good for usability on this complex form, which is
why I don't just want to get rid of them.
2014-09-22 16:25:37 +01:00
Dan Poltawski f37bebbc54 Merge branch 'MDL-47238_guest_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-09-22 16:13:44 +01:00
Dan Poltawski 1034de8d4d Merge branch 'MDL-47270-core-component-classmap-ordering_26_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_26_STABLE 2014-09-22 16:03:55 +01:00
Nadav Kavalerchik afcc9eb060 MDL-47269 yui/src/dock: Invert dock reset blocks icon, in RTL mode 2014-09-22 11:43:47 +03:00
Marina Glancy 3a382d2db0 MDL-47154 behat: escape user supplied strings in xpath 2014-09-22 13:16:18 +08:00
Rajesh Taneja 6e4485774c MDL-47154 behat: extended table head look up to check if header is link
Header can be a link, this step will now look if
header has a text or header link has the text

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

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

Also, I fixed the related button in quiz to be GET not POST.
2014-09-19 21:55:48 +01:00
Jean-Michel Vedrine 7ea93f9af9 MDL-47180 qformat_webct: Import of calculated questions broken 2014-09-18 18:35:00 +02:00
Dan Poltawski cbc60dd58b weekly release 2.6.5+ 2014-09-18 07:41:05 +01:00
Brian Barnes 2675552253 MDL-47186 calendar: Changed month name to h2 from h1 2014-09-18 10:36:48 +08:00
Jetha Chan 76cb69b171 MDL-46920 theme_bootstrapbase: fix dropdown to use data-target 2014-09-17 15:32:48 +08:00
Matt Petro c866f963ce MDL-47270 core_component: make cache independent of filesystem ordering 2014-09-16 13:14:26 -04:00
Eloy Lafuente (stronk7) dfc54de168 Merge branch 'wip-MDL-47079-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-16 18:39:20 +02:00
Damyon Wiese 352e654ec7 MDL-44257 Message: Update phpdocs for email_to_user function 2014-09-16 15:06:36 +08:00
Damyon Wiese b068dc7b2d Merge branch 'MDL-44257-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-09-16 15:05:16 +08:00
Simey Lameze be0d33ac97 MDL-44257 lib: fix the attachment code to accept tempdir and dataroot.
Credit goes to Damyon, thanks.
2014-09-16 10:39:08 +08:00
Simey Lameze f96d071f2a MDL-44257 message: added test to make sure the stored file still exists 2014-09-16 10:38:09 +08:00
Simey Lameze 0e32d35eff MDL-44257 message: check if the attachment exists before remove it
Credit goes to Mark Nielsen, thanks.
2014-09-16 10:38:09 +08:00
Marina Glancy 05a90fcddd MDL-47079 user: behat test for deleting users 2014-09-16 10:00:17 +08:00
Eloy Lafuente (stronk7) bc5014bef1 Merge branch 'MDL-46588-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-09-15 23:28:39 +02:00
Dan Poltawski 5fd02c3a6e Merge branch 'MDL-46195_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-09-15 16:07:14 +01:00
Dan Poltawski b4820a9249 Merge branch 'MDL-46331_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-09-15 12:18:58 +01:00
Dan Poltawski 1c736ac83d Merge branch 'wip-MDL-47187-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-15 11:21:39 +01:00
Jetha Chan e96d4734e1 MDL-47242 theme_bootstrapbase: fix nested custom_menu responsive display 2014-09-15 17:37:46 +08:00
Damyon Wiese 1ed853704a Merge branch 'MDL-47143_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-09-15 16:15:28 +08:00
Tim Hunt 452eb56182 MDL-47167 XML question format: behat tests 2014-09-15 15:46:48 +08:00
Damyon Wiese 2c1454edbd Merge branch 'MDL-46944-26-lti-iframe' of git://github.com/schmod/moodle into MOODLE_26_STABLE 2014-09-15 15:28:51 +08:00
Damyon Wiese dfe1d29d2d Merge branch 'MDL-46747_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-09-15 14:05:18 +08:00
Damyon Wiese 3412052bb1 Merge branch 'MDL-47209-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-09-15 13:57:11 +08:00
Juan Leyva 4b8a9f2f6a MDL-46588 web services: Fixed system context instanceid eq 0 case 2014-09-12 11:27:12 +02:00
Juan Leyva 2a8ec1ce68 MDL-46588 web services: Unit tests added 2014-09-12 11:27:12 +02:00
Juan Leyva 6933d61c68 MDL-46588 web services: Fixed invalid check of empty contextid in function get_context_from_params 2014-09-12 11:27:12 +02:00
Tim Hunt e2e907bd5e MDL-46747 questions: add More info link to qbehaviour help.
Thanks to Tony Gardner-Medwin for the suggestion.
2014-09-11 16:13:51 +01:00
Dan Poltawski 35143c155f weekly release 2.6.5+ 2014-09-11 15:44:31 +01:00
Dan Poltawski e9907e3985 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-09-11 15:44:28 +01:00
Frederic Massart 2947377afb MDL-47209 repository_skydrive: Use new oauth URLs 2014-09-11 15:17:17 +08:00
Marina Glancy 308cfc169d MDL-46834 dndupload: check course dndupload cap on course level 2014-09-11 12:13:52 +08:00
AMOS bot 08680d0825 Automatically generated installer lang files 2014-09-11 00:05:44 +08:00
Andrew Schmadel 53f93548c7 MDL-46844 Embed LTI External Tools with an IFrame
Clears up weird browser issues that occur when embedding content with an
`<object>` tag.
2014-09-10 09:15:40 -04:00
Marina Glancy 9cc0f01b15 MDL-46834 dndupload: check course dndupload cap on course level 2014-09-10 08:08:43 +01:00
Marina Glancy a997d44c02 MDL-47187 assign: fixed timing unittest failure 2014-09-10 11:55:03 +08:00
Frederic Massart 97c99ad5bd MDL-46818 core_grade: Prevent form checker to catch move fields 2014-09-10 10:43:48 +08:00
Tim Hunt 3b5ff54a74 MDL-46331 GIFT question import was breaking content inside <pre>.
Also, adding a Behat tests to verify GIFT import works without errors
(but leaving the detailed testing for the unit tests).
2014-09-09 22:59:37 +01:00
AMOS bot b4b08392e3 Automatically generated installer lang files 2014-09-10 00:05:36 +08:00
Dan Poltawski bdf034ae93 MDL-46811 update download.moodle.org url to https
https is now the prefferd protocol for this site
2014-09-09 16:38:19 +01:00
Marina Glancy 88fc9ca21a Merge branch 'MDL-46997-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-09-09 17:19:02 +08:00
Marina Glancy 99756ca2b4 Merge branch 'm26_MDL-47076' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-09-09 17:13:23 +08:00
Dan Poltawski 68a040b811 Merge branch 'wip-MDL-47080-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-09 10:05:15 +01:00
Dan Poltawski 982894ab47 Merge branch 'wip-MDL-46834-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-09 08:11:16 +01:00
Damyon Wiese 019c6fe54e MDL-46997 Grades: fix sum of grades with hidden items with differing maxgrades 2014-09-09 14:08:44 +08:00
Damyon Wiese e3620081f2 MDL-46997 Grades: Fix aggregation when hiding is excluded and items have nested dependencies
Includes a unit test for the dependency flattening function.
2014-09-09 14:08:33 +08:00
Damyon Wiese f27636fe7e MDL-46997 Grades: Improve the behat tests for grade aggregation
The tests now cover hidden grades in sub categories for all aggregation types. This change
includes a data generator for grade categories, with unit tests and behat tests for
the generator.

Conflicts:
	admin/tool/behat/tests/behat/data_generators.feature
	grade/tests/behat/grade_aggregation.feature
	lib/tests/behat/behat_data_generators.php

Conflicts:
	lib/tests/behat/behat_data_generators.php
2014-09-09 14:08:15 +08:00
Brian Barnes 1f987c8dde MDL-47170 tiny_mce: Fixed display of bullets in rtl languages 2014-09-09 16:09:35 +12:00
David Curry 3ff84f56eb MDL-47076 badges: Add checks to user fields during badges restoration
Change-Id: Ib429092fa5c125d1bf57f886036b7c6617f1ec6f
2014-09-09 15:54:51 +12:00
Marina Glancy 9ba4fc1585 MDL-46834 dndupload: Hide dnd message when user cant upload files 2014-09-09 10:04:14 +08:00
Marina Glancy 6b6b8b9403 MDL-46834 filepicker: dnd upload should respect the current context id 2014-09-09 10:04:13 +08:00
Eloy Lafuente (stronk7) af9405732a Merge branch 'm26_MDL-47054' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-09-09 02:19:58 +02:00
Tim Hunt b5e613e4ec MDL-46195 fix error handling. 2014-09-08 22:24:38 +01:00
Tim Hunt efe2f20335 MDL-46195 Fix fractionsaddwrong string component in lesson & qformat_webct.
I know. You should not refer to strings from other plugins, but

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

* Lesson should be using the question engine, rather than doing its own thing.
2014-09-08 21:55:32 +01:00
Dan Poltawski 1dd2ce2ecc Merge branch 'MDL-40451-m26-random-glossary-block-title' of git://github.com/amandadoughty/moodle into MOODLE_26_STABLE 2014-09-08 17:26:59 +01:00
Dan Poltawski f75e12e12b Merge branch 'wip-MDL-45602-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-08 16:30:59 +01:00
Dan Poltawski 01f8713aba Merge branch 'MDL-46586-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-09-08 15:31:14 +01:00
Dan Poltawski cac9e2e270 Merge branch 'wip-MDL-43739-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-08 15:16:41 +01:00
Dan Poltawski be516f9452 Merge branch 'MDL-46982_m26' of https://github.com/shashirepo/moodle into MOODLE_26_STABLE 2014-09-08 12:22:30 +01:00
Dan Poltawski 1a14acc38e Merge branch 'wip-MDL-46254-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-08 12:16:18 +01:00
Marina Glancy 6b2f31d930 Merge branch 'MDL-46818_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-09-08 14:07:26 +08:00
Marina Glancy 45cb7a246e MDL-43739 block_course_overview: allow resorting of big number of courses
previously an exception was thrown if the user preference exceeds 1333 chars
2014-09-08 14:00:29 +08:00
Marina Glancy fbce3b9f5d MDL-47080 theme: call format_string on site shortname 2014-09-08 13:58:54 +08:00
Marina Glancy 13826627e9 MDL-46254 theme: apply filters to theme footnote 2014-09-08 13:58:40 +08:00
Marina Glancy b6fed31236 MDL-45602 behat: add members to cohorts 2014-09-08 13:58:14 +08:00
Marina Glancy 9251dcc683 Merge branch 'MDL-46564_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-09-08 13:50:44 +08:00
Marina Glancy cf923754c6 Merge branch 'MDL-46761_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-09-08 13:50:27 +08:00
Marina Glancy dee890f67e Merge branch 'MDL-46587-26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-09-08 13:50:19 +08:00
Marina Glancy 84ddbba784 Merge branch 'MDL-44304-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-09-08 12:58:41 +08:00
Tim Hunt b5cf4244c6 MDL-47143 questions: fix default for question_preview/marks setting. 2014-09-07 12:58:39 +01:00
Tim Hunt 9f00a10ef2 MDL-46761 fix PHPdocs on question_usage_by_activity::get_total_mark
Thanks to Tony Gardner-Medwin for spotting this.
2014-09-07 11:39:36 +01:00
Eloy Lafuente (stronk7) ddadff9655 Moodle release 2.6.5 2014-09-06 13:01:43 +02:00
Juan Leyva d94e525769 MDL-46587 files: Invalid $itemid conversion in core_files_get_files Web Service 2014-09-05 13:46:43 +02:00
Juan Leyva 55eb6b3f18 MDL-46586 files: Invalid return parameters definition in core_files_get_files external function 2014-09-05 13:42:37 +02:00
shashirepo 66a9cf9bf3 MDL-46982 core: fixes wrong opening div tag 2014-09-05 10:24:21 +05:30
Yuliya Bozhko 8d26cf3eda MDL-47033 general: Fix incorrect use of 'course' layout
It should use 'incourse' layout in most cases

Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-09-05 09:31:43 +12:00
Eloy Lafuente (stronk7) 1e13288d77 weekly release 2.6.4+ 2014-09-04 19:55:01 +02:00
Eloy Lafuente (stronk7) 60ae7e9e3e Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-09-04 19:54:56 +02:00
Damyon Wiese 1541440ddc Merge branch 'wip-MDL-46464-MOODLE_26_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_26_STABLE 2014-09-04 13:32:11 +08:00
Kevin Wiliarty 552f77e155 MDL-46464 supplies missing method (and PHPUnit test) for grading workflow 2014-09-04 00:22:51 -04:00
Brian Barnes 8403c09692 MDL-47097 theme: Fixed issue with dd's sliding up 2014-09-04 14:32:16 +12:00
Brian Barnes 1890b9e000 MDL-47054 theme: fixed issue with the user rtl table 2014-09-04 09:43:32 +12:00
Eloy Lafuente (stronk7) 34bf5fa890 Merge branch 'MDL-47031-26-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-09-03 19:26:04 +02:00
Amanda Doughty 50a9ec8cf1 MDL-40451 block/glossary_random Fixed missing header when adding new block 2014-09-03 14:03:13 +01:00
Helen Foster f3bdb845c4 MDL-47031 Merge English strings from the en_fix language pack 2014-09-03 13:00:25 +02:00
Marina Glancy 6e4c10f987 Merge branch 'm26_MDL-46639' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-09-03 16:59:38 +08:00
Dan Marsden df5fd3cd97 MDL-46639 SCORM: incorrect setting of launch param, it is done in scorm_parse_aicc 2014-09-03 20:22:19 +12:00
Yuliya Bozhko af96fd4ca6 MDL-46564 badges: Fix 'All' option in badges block
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-09-03 18:45:53 +12:00
Charles Fulton 0cc57751e4 MDL-30414 block_private_files: convert button to inline link 2014-09-03 01:09:56 +02:00
Mark Nelson 53c52a7122 MDL-46818 core_grades: added YUI form change validation 2014-09-01 23:02:40 -07:00
Michael de Raadt ebbff90562 MDL-46619 Forum: link to the discussion only if users cannot see posts. 2014-09-02 10:11:16 +08:00
Michael de Raadt 982c8524dd MDL-46619 Forum: only output last poster's name if user can view it. 2014-09-02 10:11:13 +08:00
Marina Glancy 390645bd44 Merge branch 'MDL-45952_26' of git://github.com/Syxton/moodle into MOODLE_26_STABLE 2014-09-02 09:59:20 +08:00
Eloy Lafuente (stronk7) 59be24cc60 Merge branch 'MDL-46633_m26' of https://github.com/shashirepo/moodle into MOODLE_26_STABLE 2014-09-02 02:12:30 +02:00
Eloy Lafuente (stronk7) 64e07a390e Merge branch 'wip_MDL-46679_m26_addonenv' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-09-02 02:08:54 +02:00
Eloy Lafuente (stronk7) 19cd96e561 Merge branch 'MDL-46979_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-09-02 01:49:05 +02:00
Eloy Lafuente (stronk7) 0bd6dee49f Merge branch 'MDL-43639_updatePassEveryLogin_26' of https://github.com/moodlerooms/moodle into MOODLE_26_STABLE 2014-09-02 01:07:55 +02:00
Virgil Ashruf 6f6943ad95 MDL-45636 course_rest: changed modcontext to coursecontext 2014-09-01 11:25:30 +02:00
Damyon Wiese d5cfda4734 Merge branch 'MDL-46852-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-09-01 16:16:55 +08:00
Damyon Wiese b7c42f0d7e Merge branch 'MDL-46902_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-09-01 15:54:40 +08:00
Henning Bostelmann 333db4598d MDL-46911 Database activity: jump to correct place in list after (un)approve 2014-09-01 15:46:19 +08:00
Damyon Wiese a5580bc618 Merge branch 'm26_MDL-46985_7ZIP_RAR_MIME_types_missing' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-09-01 15:35:52 +08:00
Damyon Wiese dea12fe893 Merge branch 'm26_MDL-46961' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-09-01 15:30:01 +08:00
Marina Glancy bb5b3ee263 Merge branch 'm26_MDL-46639' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-09-01 14:35:39 +08:00
Marina Glancy 6e1fdb0951 Merge branch 'MDL-46539-fix-26' of https://github.com/jmarthaler/moodle into MOODLE_26_STABLE 2014-09-01 14:35:33 +08:00
Frederic Massart 69866e0377 MDL-46852 mod_lesson: More accurate comparison of shortanswer answers 2014-09-01 14:24:58 +08:00
Damyon Wiese 2b51c3212a Merge branch 'wip-MDL-39233-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-09-01 13:42:06 +08:00
Damyon Wiese 99772c2ba1 MDL-46619 Forum: whitespace fixes 2014-09-01 11:35:31 +08:00
Damyon Wiese 861822dc1b Merge branch 'MDL-46619-2.6-visisble-authors-qanda' of https://github.com/amandadoughty/moodle into MOODLE_26_STABLE 2014-09-01 11:29:49 +08:00
Damyon Wiese e5d4b3d409 Merge branch 'm26_MDL-46737' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-09-01 10:56:15 +08:00
Petr Skoda d235052532 MDL-46235 ddl: add support for large number of text fields in one database table 2014-09-01 11:24:12 +12:00
Matteo Scaramuccia 34b17698c4 MDL-46985 Added 7-Zip and RAR MIME types. 2014-08-31 22:58:15 +02:00
Petr Skoda c8ec7b8a53 MDL-39840 environment: add support for environment.xml in plugins
New features:

* environment.xml files in all types of plugins
* support for plugin strings via new optional plugin attribute in FEEDBACK
* support for class_name::method_name custom callbacks and classloader
2014-09-01 08:39:53 +12:00
AMOS bot d63f2a10bc Automatically generated installer lang files 2014-09-01 00:05:45 +08:00
Mark Nelson 4e29893160 MDL-46902 core_course: display meaningful message when no courses found 2014-08-29 14:33:06 -07:00
AMOS bot a1cd496b31 Automatically generated installer lang files 2014-08-30 00:05:38 +08:00
zbdd a6d8e2b35e MDL-37312 backup: Keep course idnumber on same site course restore
When the course idnumber is set during a same site course restore,
retain the course idnumber if there are no duplicates.
2014-08-29 07:21:36 +00:00
Tim Hunt df27344e9a MDL-46979 backup: remove duplicate string.
Thanks to Matt Sammarco for spotting this.
2014-08-28 20:44:31 +01:00
Eloy Lafuente (stronk7) 0628d17bfa weekly release 2.6.4+ 2014-08-28 19:12:10 +02:00
Eloy Lafuente (stronk7) 44e3a9bdc6 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-08-28 19:12:05 +02:00
shashirepo c34a0a0acb MDL-46633 chat: Chat send button gets stuck
Conflicts:
	mod/chat/gui_ajax/module.js
2014-08-28 14:54:37 +05:30
Syxton 4c9103a485 MDL-45952 feedback: non-respondents in groupings
Fixes feedback non-respondents list to show only members in groups in
the selected grouping if "Available for group members only" is selected.
2014-08-27 15:17:02 -04:00
Mark Nielsen ae376d3b2f MDL-43639: Prevent user updated event on every login
If auth plugin prevents local passwords, then user
is updated and event is triggered on every login.
2014-08-27 11:30:04 -07:00
Jon Marthaler 14a2ef282b MDL-46539 assign calendar: Fix lastcron value for assign cron 2014-08-27 11:11:11 -05:00
AMOS bot ab39338705 Automatically generated installer lang files 2014-08-28 00:05:36 +08:00
Damyon Wiese 6c4e723d6b Merge branch 'wip-MDL-39888-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-08-27 09:56:17 +08:00
Faisal Kaleem 892eb5d190 MDL-46961 SCORM: JavaScript Hoisting issue. 2014-08-27 13:09:31 +12:00
Eloy Lafuente (stronk7) f0640eb7d2 MDL-46875 tinymce: keep stable version YYYMMDD constant
Note this has been integrated together with previous commit
so nobody should get a "downgrade" ever (but Brian, I'm sorry :-)
2014-08-27 02:10:14 +02:00
Eloy Lafuente (stronk7) 60f1480cdc Merge branch 'm26_MDL-46875' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-08-27 02:08:26 +02:00
Adrian Greeve 53ed4016e6 MDL-39888 mnet: Added a warning message that no logging may be reveived from other clients.
Moodle client machines that are running 2.6 or above that are not using the legacy log store
will not generate any logs to be transfered to the parent site.
2014-08-26 15:02:56 +08:00
Marina Glancy 76d6b7a9b4 MDL-39233 mod_url: added unittest for get_course_content 2014-08-26 13:56:14 +08:00
Jason 97c36ae969 MDL-39233 mod_url: fix php notice 2014-08-26 13:56:14 +08:00
Damyon Wiese 8e2d62e5e2 MDL-46842 assign: Fix for unit tests - previous patch was completely ignoring manually reopening attempts. 2014-08-26 10:36:27 +08:00
Brian Barnes 8d42b3ceb5 MDL-46875 tinymce: Fixed issue with full screen and spelling 2014-08-26 13:26:49 +12:00
Eloy Lafuente (stronk7) b5570e07ca Merge branch 'MDL-46477_m26' of https://github.com/shashirepo/moodle into MOODLE_26_STABLE 2014-08-26 02:24:50 +02:00
Eloy Lafuente (stronk7) d5ee2634bd Merge branch 'MDL-46753-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-08-26 02:08:35 +02:00
Eloy Lafuente (stronk7) cc2ef7a505 Merge branch 'm26_MDL-46842' of https://github.com/greg-or/moodle-mod_assign into MOODLE_26_STABLE 2014-08-26 01:59:40 +02:00
Eloy Lafuente (stronk7) 49f1a64cb0 Merge branch 'm26_MDL-46816' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-08-26 00:11:04 +02:00
Eloy Lafuente (stronk7) bf7c584ffe Merge branch 'wip-MDL-46874-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-08-25 22:11:43 +02:00
Eloy Lafuente (stronk7) fa74d00ca6 Merge branch 'm26_MDL-46900' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-08-25 20:55:44 +02:00
Marina Glancy 124aa2558a Merge branch 'MDL-46894_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-08-25 16:54:08 +08:00
Tim Hunt 8e321075bd MDL-46916 behat: improve question state test. 2014-08-25 16:50:30 +08:00
Damyon Wiese 9a72e79050 Merge branch 'MDL-46923_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-08-25 16:47:55 +08:00
Damyon Wiese ea254fc7dd Merge branch 'wip_MDL-43918_m26_cm' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-08-25 16:46:29 +08:00
Marina Glancy 514a13e431 Merge branch 'M26_MDL46887_assignment_file_max_size' of git://github.com/Dave-B/moodle into MOODLE_26_STABLE 2014-08-25 16:30:01 +08:00
Colin Chambers a9568d3d7f MDL-46895 qtype_calculated_find_formula_errors not defined causes Calculated question type test to fail 2014-08-25 16:28:25 +08:00
Rex Lorenzo 269695f48b MDL-46776 gradereport_grader: Improve Grader report user interface
* Adding assignments to test course generator to more easily test the grader report with large number of students and graded activities.
2014-08-25 16:20:56 +08:00
Dan Marsden 9dc8c0f8b1 MDL-46639 mod_scorm: Fix load of simple AICC content
Thanks to Ian Wild for the report and suggested patch.
2014-08-25 20:03:01 +12:00
Damyon Wiese 4b4fb1ce8b Merge branch 'wip-MDL-46812_M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-08-25 14:03:36 +08:00
Damyon Wiese 4157b01343 Merge branch 'wip-MDL-46703-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-08-25 13:54:12 +08:00
Petr Skoda 98af233a16 MDL-43918 add more validation to $modulename parameter when fetching cms 2014-08-25 12:19:43 +12:00
Eloy Lafuente (stronk7) 3312fc1ed5 MDL-46918 ddl: cover behavior with unit test 2014-08-21 18:33:55 +01:00
Tim Hunt f45e49f01b MDL-46918 ddl: fix error when renaming table already exists 2014-08-21 18:33:55 +01:00
AMOS bot b463508597 Automatically generated installer lang files 2014-08-22 00:05:35 +08:00
Tim Hunt 7464e1b39d MDL-46894 make Behat backup steps more robust. 2014-08-21 14:15:20 +01:00
Amanda Doughty 1c5d2aefd1 MDL-46619 Forum: author showing in Q and A forum 2014-08-21 13:10:55 +01:00
shashirepo 910043d965 MDL-46477 chat:hard coded string in mod/chat 2014-08-21 17:34:30 +05:30
Mary Evans f29d5f891a MDL-46812 grade/report/grader: Need to tie up loose ends in Gradebook after MDL-43824
commit 47f382e509ec41bed7b0e7c12e7d798d2b5ba2f7
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Fri Aug 15 01:47:49 2014 +0100

    MDL-46812 grade/report/grader: Fixes gradebook in 2.6.

    also removed two redundent CSS rules in base/style/grade.css.
2014-08-21 11:27:33 +01:00
Mark Nelson 1d9c8d95f2 MDL-46923 core_behat: fixed typos in function names 2014-08-20 22:11:39 -07:00
Damyon Wiese 168b3cb523 MDL-44304 assignfeedback_editpdf: Fix fatal error when viewing team assignments with editpdf responses. 2014-08-21 12:09:58 +08:00
Damyon Wiese 90e9f8b88f MDL-44304 assignfeedback_editpdf: Behat test for group submissions 2014-08-21 12:09:58 +08:00
Brian Barnes d489ecd1eb MDL-46900 theme: allowed more than 1 nav collapse element 2014-08-21 15:05:37 +12:00
Marina Glancy fd72531964 weekly release 2.6.4+ 2014-08-21 10:18:47 +08:00
Marina Glancy ebb8098668 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-08-21 10:18:46 +08:00
AMOS bot 911ab1a334 Automatically generated installer lang files 2014-08-21 00:05:34 +08:00
Gregory Faller fc86ba1b68 MDL-46842: Reopen assignment submissions when using offline grading worksheet 2014-08-20 19:12:15 +09:30
Damyon Wiese 24d7efcec3 Merge branch 'MDL-45029-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE
Conflicts:
	course/modlib.php
2014-08-20 13:59:45 +08:00
Simey Lameze 66dbc14778 MDL-45029 core_course: set aggregationcoef while creating a new course module 2014-08-20 12:07:40 +08:00
Mark Nelson ec5fda6d6f MDL-46188 core_course: use correct hide/show icon 2014-08-20 12:05:25 +08:00
Damyon Wiese cb86d02348 Merge branch 'MDL-45029-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-08-20 10:22:08 +08:00
Mark Nielsen 8faaca0ea2 MDL-46536: OAuth signature fails with inconsistent new lines
When the LTI intro contains a single \n or
\r newline character then the OAuth signature
fails.  All newlines should be \r\n

Conflicts:
	mod/lti/tests/locallib_test.php
2014-08-19 22:17:04 +02:00
AMOS bot b16e3e2217 Automatically generated installer lang files 2014-08-20 00:05:33 +08:00
Eloy Lafuente (stronk7) 881af32789 Merge branch 'MDL-46051_LTI_event26' of https://github.com/moodlerooms/moodle into MOODLE_26_STABLE 2014-08-19 17:24:37 +02:00
Michael Wheeler 2cb77a22ff Normalize request header names. 2014-08-19 15:39:27 +02:00
David Balch 68305e513b MDL-46887 mod_assign: Enforce module's maxbytes setting at submission. 2014-08-19 14:03:13 +01:00
Simey Lameze fe845dd3c2 MDL-45029 core_course: set aggregationcoef while creating a new course module 2014-08-19 17:08:18 +08:00
Marina Glancy 135efed7f1 MDL-46538 theme_base: recompiled moodle.css 2014-08-19 16:53:30 +08:00
Marina Glancy 2a8877376a Merge branch 'MDL-46538_M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-08-19 16:53:09 +08:00
Marina Glancy 26929ce1a7 Merge branch 'MDL-46281-MOODLE_26_STABLE' of git://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-08-19 16:23:00 +08:00
Marina Glancy 3e15af69de Merge branch 'MDL-46833-MOODLE_26_STABLE' of git://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-08-19 14:22:01 +08:00
Damyon Wiese a69107e549 Merge branch 'MDL-41513-Scrollbar_not_working-26' of https://github.com/MorrisR2/moodle into MOODLE_26_STABLE 2014-08-19 14:07:39 +08:00
Marina Glancy 0f9d61091b Merge branch 'wip-mdl-46817-m26' of git://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-08-19 14:04:21 +08:00
Marina Glancy f09f95fefa Merge branch 'MDL-43197-26-2nd' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-08-19 13:26:19 +08:00
Damyon Wiese 4e6eb5b8be Merge branch 'MDL-46188_m26' of https://github.com/shashirepo/moodle into MOODLE_26_STABLE 2014-08-19 13:15:13 +08:00
Marina Glancy 8b50f60a64 MDL-46874 gradereport: replace usage of class hidden with dimmed_text 2014-08-19 12:56:43 +08:00
Michael Wheeler 25da4fa204 MDL-46794 install: Fixed typo in config-dist.php 2014-08-19 11:27:46 +08:00
Marina Glancy c8c0aa21e4 Merge branch 'm26_MDL-46775' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-08-19 11:22:09 +08:00
Frederic Massart 0eef41f639 MDL-43197 gradereport_user: Parents/mentors can see all the relevant grades 2014-08-19 10:49:09 +08:00
Marina Glancy 0a88b33a6a MDL-46691 mod_choice: apply filters to user input 2014-08-19 03:05:55 +02:00
James Henestofel d79710afde MDL-42231 auth: custom profile fields to support numbers at the end.
For data mapping LDAP or CAS.  Change order of fieldname display checks to verify
custom profile fields first to allow custom field shortname to contain number at the end.
2014-08-19 02:44:14 +02:00
Eloy Lafuente (stronk7) 829eb491e0 Merge branch 'MDL-44894_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-08-19 02:35:04 +02:00
Petr Skoda f460295a58 MDL-46552 session: add support for multiple servers in memcached session driver 2014-08-19 02:30:30 +02:00
Eloy Lafuente (stronk7) de25146b0a Merge branch 'MDL-45874-26' of https://github.com/danielneis/moodle into MOODLE_26_STABLE 2014-08-19 02:12:32 +02:00
Eloy Lafuente (stronk7) 432785d430 Merge branch 'wip-MDL-46826-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-08-18 20:08:52 +02:00
Eric Merrill ad94c5efb4 MDL-46766 auth_cas: Upgrading to phpCAS 1.3.3 2014-08-18 16:40:42 +08:00
Simey Lameze e3a51bcd28 MDL-46753 auth_cas: Replace hardcoded logout_return_url to user defined URL.
Credit goes to Mitsuru Udagawa, thanks!
2014-08-18 15:01:20 +08:00
Damyon Wiese e2aa68b154 Merge branch 'm26_MDL-46760' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-08-18 12:41:29 +08:00
Rajesh Taneja 618704b6a5 MDL-46817 behat: Step to check if value exist/not in table column 2014-08-18 10:02:13 +08:00
AMOS bot f55eb23bde Automatically generated installer lang files 2014-08-18 00:07:54 +08:00
Marina Glancy 59829c0511 MDL-46703 mod_data: limit the width of select element when editing templates
Thanks to Hittesh for the provided solution
2014-08-16 13:26:34 +08:00
Mary Evans dcc5d2df3d MDL-46538 theme_base/theme_bootstrapbase: Removed incorrect RTL CSS. 2014-08-16 01:19:02 +01:00
Daniel Neis 3395def1fa MDL-45874 Fix access to users reports in navigation when using separate groups 2014-08-15 17:04:36 -03:00
Rajesh Taneja 60177550ee MDL-46817 behat: Table selector support css
Previously table selector supported id and caption only.
But in few cases we don't have proper id, so added support
for css
2014-08-15 13:20:47 +08:00
Marina Glancy 756d8f1171 MDL-46826 forum: make sql query indexed, regression from MDL-31089 2014-08-15 11:47:03 +08:00
Ray Morris edafa7ce90 MDL-41513 mod_quiz: Scrollbar not working in JS Security Popup 2014-08-14 15:46:37 -05:00
Ruslan Kabalin 61560c2b72 MDL-46833 mod_assign: Fix assignment view when available for group members only.
When assignment is "Available for group members only" and no users with
mod/assign:submit role permision is enrolled (students),
groups_filter_users_by_course_module_visible is causing error (as $users
array is empty). The patch resolves the issue.
2014-08-14 17:11:25 +01:00
shashirepo b8d5bd3da0 MDL-46188 course:show/hide button disappears after action 2014-08-14 20:36:03 +05:30
Tony Butler 3b7336fff2 MDL-46281 core_backup: Add class_exists check for backup_<mod>_activity_task
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-08-14 12:57:56 +01:00
Tim Hunt 82e46ef9ea MDL-44894 question editing: fix validation with odd permissions
For users with edit permissions, but not add permissions, it was
impossible to save the editing form. The validation assuemd this value
was present, but it was not. Other code checks this field too, so I
added it rather than changing the validation and all the other uses.
2014-08-14 11:26:50 +01:00
Marina Glancy e95c5eed2c weekly release 2.6.4+ 2014-08-14 14:52:19 +08:00
Marina Glancy aec0fcdb6e Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-08-14 14:52:15 +08:00
Dan Marsden 4b3814f85e MDL-46816 mod_asssign plagiarism: Remove unnecessary code. 2014-08-14 13:10:59 +12:00
Dan Marsden 151b3a299b MDL-46760 mod_scorm: Fix js error when preview mode disabled 2014-08-14 10:11:28 +12:00
Mark Nielsen 9408170cb3 MDL-46051 mod_lti: Fixing errors in unknown_service_api_called class
Also adding unit tests.
2014-08-13 09:06:25 -07:00
AMOS bot e11cf87496 Automatically generated installer lang files 2014-08-14 00:05:49 +08:00
Marina Glancy 81c65c089a Revert "Merge branch 'm26_MDL-46643' of git://github.com/totara/moodle into MOODLE_26_STABLE"
This reverts commit c750f3de63, reversing
changes made to af8ef3b1da.
2014-08-13 16:32:47 +08:00
Eloy Lafuente (stronk7) 934a342fef Merge branch 'wip-MDL-46470-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-08-13 00:26:27 +02:00
Tim Hunt b483b31dab MDL-45642 questions: add required index to question_attempts.
It is important to be able to tell which behaviours are in use, and
without this index, it requires a complete scan of this table, which can
be very big, to verify that a behaviour is unused.
2014-08-12 11:37:50 +01:00
Dan Poltawski 82b7d129d7 Merge branch 'MDL-43824-M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-08-12 11:08:13 +01:00
Dan Poltawski a672c8337f Merge branch 'm26_MDL-46718' of https://github.com/greg-or/moodle-mod_assign into MOODLE_26_STABLE 2014-08-12 11:02:20 +01:00
Marina Glancy 63edba375c Merge branch 'MDL-46308_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-08-12 16:03:07 +08:00
Marina Glancy 530da41f30 Merge branch 'MDL-21042_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-08-12 16:02:29 +08:00
Marina Glancy 0a94ca9765 Merge branch 'm26_MDL-46315' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-08-12 15:03:00 +08:00
Marina Glancy a17f12e801 Merge branch 'MDL-46600_import_failed_26' of git://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-08-12 15:02:51 +08:00
Marina Glancy 0faeeeea27 Merge branch 'wip_MDL-46480_m26_footernan' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-08-12 15:02:36 +08:00
Marina Glancy c750f3de63 Merge branch 'm26_MDL-46643' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-08-12 13:32:03 +08:00
Marina Glancy af8ef3b1da Merge branch 'MDL-43740_manual_none_26' of git://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-08-12 13:29:43 +08:00
Simon Coggins 1a68d6e7e1 MDL-46775: Fix call to unavailable function when loading an invalid JS file 2014-08-12 14:34:17 +12:00
Eloy Lafuente (stronk7) cb51189dce Merge branch 'MDL-46676_2.6' of https://github.com/ikawhero/moodle into MOODLE_26_STABLE 2014-08-12 01:48:26 +02:00
Eloy Lafuente (stronk7) f9a93a6aab Merge branch 'MDL-46681_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-08-12 01:44:29 +02:00
Mary Evans 2b6526e717 MDL-43824 core/grade/report/grader: Fix for misalignment of static rows with scale grades. 2014-08-12 00:06:08 +01:00
Dan Poltawski 86a42029e3 Merge branch 'MDL-46496-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-08-11 14:38:47 +01:00
Dan Poltawski 278c04a414 Merge branch 'm26_MDL-44015' of https://github.com/greg-or/moodle-mod_assign into MOODLE_26_STABLE 2014-08-11 14:31:06 +01:00
Dan Poltawski db6c4fc975 Merge branch 'MDL-46688_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-08-11 14:13:17 +01:00
Andrew Davis 23f1bddc01 MDL-43740 core_grade: Thanks to Robert Russo for the patch. Removed the ability to set manual grade items to grade type "None" 2014-08-11 20:20:36 +08:00
Dan Poltawski 7051114f00 Merge branch 'wip-MDL-30668-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-08-11 10:41:44 +01:00
Damyon Wiese ceea52abf6 MDL-35984 Grades: Fix deprecation of grade_category::aggregate_values 2014-08-11 14:24:37 +08:00
Damyon Wiese 1285dadea3 MDL-35984 grade: Recalculate min/max for sum of grades when hidden grades are involved. 2014-08-11 14:24:22 +08:00
Damyon Wiese e26695f647 MDL-35984 grade: Add behat tests for grade aggregations 2014-08-11 14:23:59 +08:00
Tim Hunt 25c302c393 MDL-46308 qformat_xml: fix import of broken calculated questions.
Questions like this should not exist, of course. But they do, so we
should avoid generating errors in this case.
2014-08-08 17:59:21 +01:00
Tim Hunt b7dda99c5e MDL-46688 weblib: improve the highlight function.
Thanks to Joseph Baxter for suggesting some of the test cases.
2014-08-08 17:53:08 +01:00
Marina Glancy 8238f53d71 MDL-30668 gradereport_grader: split user preferences into individual courses
This solves the DB exception when users were trying to insert very large string in DB
2014-08-08 15:17:50 +08:00
Andrew Nicols b6c2f9333c MDL-46496 JS: Replace jQuery UI 1.10.3 minified CSS
The original version contained some invalid paths for images. I'm unsure
where these came from as the version from the offical jQuery UI does not
contain these, and these were the only differences in the files.
2014-08-08 14:05:03 +08:00
Gregory Faller f707b67259 MDL-46718: Return user to last accessed page when quick grading 2014-08-08 14:48:13 +09:30
Dan Marsden c15f312ff0 MDL-46737 SCORM: correct dml syntax. 2014-08-08 15:10:58 +12:00
Petr Skoda 8f73f2a160 MDL-46480 fix get_htmlelement_size() to deal with hidden or non-block elements 2014-08-08 10:29:17 +12:00
Tim Hunt 822ba7d3d8 MDL-46681 qtype_multichoice: disabled unused options
For questions set to 'One answer only', the 'Clear incorrect responses'
and 'Show the number of correct responses' hint options make not sense,
and are not used. Hence we disableIf them.
2014-08-07 14:23:13 +01:00
Marina Glancy c1b4e91098 weekly release 2.6.4+ 2014-08-07 13:15:01 +08:00
Marina Glancy 8e349b6d67 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-08-07 13:15:00 +08:00
Paul Holden 9d4a316732 MDL-21042 report_security: don't display warning for riskbackup unnecessarily 2014-08-06 19:54:28 -07:00
Andrew Davis b6e158c52f MDL-46600 core_grades: made it explicit in the error message that a failed grade import means nothing was imported. 2014-08-07 09:16:58 +08:00
Shane Elliott 8dd43942d3 MDL-46676 profilefield_datetime: Use moodle time API 2014-08-06 16:36:43 +08:00
Gregory Faller 0eddbe018e MDL-44015: EditPDF scrolls instead of drawing on iOS 2014-08-06 15:28:41 +09:30
Brian Barnes bdfa413c98 MDL-46643 calendar: improved tab order of calendar detail pages 2014-08-06 15:56:07 +12:00
Marina Glancy faf858b6d4 MDL-46470 bootstrapbase: support linkedwhenselected attribute for tabs 2014-08-06 11:48:12 +08:00
Brian Barnes ee483e0520 MDL-46625 theme: Added a way to target the current page 2014-08-05 13:05:29 +02:00
Brian Barnes 73ae7da37b MDL-46315 themes: Fixed display inconsistancy with help modals 2014-08-05 13:04:09 +12:00
Eloy Lafuente (stronk7) 4bdc10db61 Merge branch 'MDL-44149-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-08-04 17:11:55 +02:00
Damyon Wiese 5d839b02c2 MDL-44149 Assign: Reopen attempts from quick grading (reopenuntilpass)
Conflicts:
	mod/assign/locallib.php
2014-08-04 15:56:18 +08:00
Marina Glancy 3000cb1ee2 Merge branch 'MDL-44794-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-08-04 14:25:16 +08:00
Simey Lameze 8be9386bdc MDL-44794 group: unit test for get_groups method. 2014-08-04 12:07:24 +08:00
Simey Lameze 4325b460cc MDL-44794 group: unit test for groups_get_user_groups method. 2014-08-04 12:07:01 +08:00
Marina Glancy 216da8ebb0 Merge branch 'MDL-46457_26' of git://github.com/aolley/moodle into MOODLE_26_STABLE 2014-08-04 11:25:10 +08:00
Eloy Lafuente (stronk7) 71591d7822 Merge branch 'MDL-46620-26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-08-03 20:01:51 +02:00
AMOS bot a7f445318d Automatically generated installer lang files 2014-08-01 00:05:41 +08:00
Dan Poltawski 753493ae11 weekly release 2.6.4+ 2014-07-31 09:37:18 +01:00
Dan Poltawski f73bb3a21a Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-07-31 09:37:14 +01:00
Eric Merrill e89b812518 MDL-46620 messages Make sure full message is used for read marking
message_mark_message_read needs to have the full message object,
otherwise data will be lost.
2014-07-30 15:58:08 -04:00
Dan Poltawski 4fe1c7647c Merge branch 'MDL-46236_26' of git://github.com/nobelium/moodle into MOODLE_26_STABLE 2014-07-29 12:04:34 +01:00
AMOS bot 3c1814cac7 Automatically generated installer lang files 2014-07-29 16:02:25 +08:00
Dan Poltawski 765ba4ce1e Merge branch 'wip-MDL-46338-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-07-29 08:50:40 +01:00
Marina Glancy 2d1ac616e8 Merge branch 'm26_MDL-46325' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-07-29 11:59:29 +08:00
Sam Hemelryk 23bf420120 Merge branch 'MDL-43908-MOODLE_26_STABLE' of https://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-07-29 15:51:03 +12:00
Sam Hemelryk 5175bb487e Merge branch 'MDL-45041_26_STABLE' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-07-29 15:47:18 +12:00
Marina Glancy 198c28cda2 MDL-46338 enrol_self: Icon should indicate enrolment availability 2014-07-29 09:52:34 +08:00
Adam Olley 2b413491e3 MDL-46457 mod_lti: Render lti description through standard format_module_intro 2014-07-29 10:40:52 +09:30
Sam Hemelryk 98311522ed Merge branch 'MDL-45044-m26-master' of https://github.com/dthies/moodle into MOODLE_26_STABLE 2014-07-29 08:46:55 +12:00
Dan Poltawski 0a346972f3 Merge branch 'MDL-45594_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-07-28 12:54:19 +01:00
Dan Poltawski 54021dcedb Merge branch 'wip-MDL-46503-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-07-28 12:49:17 +01:00
Dan Poltawski abeb9d6544 Merge branch 'm26_MDL-45715' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-07-28 12:47:35 +01:00
Dan Poltawski 2c28f42bae Merge branch 'MDL-46433-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-07-28 11:49:40 +01:00
Dan Poltawski f5b49d8004 Merge branch 'MDL-46504_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-07-28 10:56:50 +01:00
Nobelium c02b2fc931 MDL-46236 mod_scorm : Setting lauch options for scorm in popup 2014-07-28 06:35:33 +00:00
Sam Hemelryk 3390644156 Merge branch 'MDL-43390_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-07-28 12:22:45 +12:00
Sam Hemelryk fcb1e8a9c2 Merge branch 'wip-MDL-46525-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-07-28 12:13:48 +12:00
Sam Hemelryk cedd791b19 Merge branch 'MDL-46506-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-07-28 08:46:07 +12:00
Tony Butler 072e93e26e MDL-43908 mod_assign: Order submissions by course id then cm id
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-07-25 10:28:47 +01:00
Tony Butler f249f9f41a MDL-43908 mod_assign: Remove redundant code and improve SQL query
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-07-25 10:28:47 +01:00
Tony Butler d53cc3da71 MDL-43908 mod_assign: Prevent notifications for unavailable assignments
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>

Conflicts:
	mod/assign/locallib.php
2014-07-25 09:54:49 +01:00
Tony Butler 1d3c72cafd MDL-43908 mod_assign: Defer notifications for unavailable assignments
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-07-25 09:54:49 +01:00
Juan Leyva 4f3ed071d4 MDL-45041 Web Service: add_user_device doesn't store entries for different users using the same push key 2014-07-25 10:42:27 +02:00
Marina Glancy 9de849779c MDL-46525 enrol_cohort: fix JS error 2014-07-25 14:45:53 +08:00
Brian Barnes 67c5420a1f MDL-46325 behat: Fixed issue where 'teacher1' didn't exist 2014-07-25 14:37:27 +12:00
AMOS bot 7dfed7234c Automatically generated installer lang files 2014-07-24 22:42:05 +00:00
Daniel Thies 3b80e3f77a MDL-45044 filter_tex: properly escape excutable pathnames for Windows 2014-07-24 14:06:02 -05:00
Dan Poltawski 2d43ffd1a9 weekly release 2.6.4+ 2014-07-24 09:50:58 +01:00
Dan Poltawski 899c251521 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-07-24 09:50:55 +01:00
Damyon Wiese 1bbe91bf16 MDL-46506 Assign: fix php warning on grant extension page
This code was missed when the extensionduedate was moved to the userflags table.
2014-07-24 11:26:28 +08:00
David Monllao 924cc85e08 MDL-46504 libraries: Fixing typo 2014-07-24 11:17:02 +08:00
Damyon Wiese 0ea2c043bc MDL-46017 Assign: Restore can't rely allocated marker fields existing in backup 2014-07-24 10:58:33 +08:00
Marina Glancy a164b026c7 MDL-46503 behat: cohort generator allows to create cohort in category 2014-07-24 10:05:06 +08:00
Mark Nelson 475cf8be48 MDL-45594 core_message: added unit tests 2014-07-23 16:40:32 -07:00
Mark Nelson aea298fc35 MDL-45594 core_message: ordered recent notifications by timecreated 2014-07-23 16:40:31 -07:00
Tim Hunt ca0074bf89 MDL-45594 simplify message_get_recent_conversations SQL
I am pretty sure that this new SQL is logically equivalent to
the original, and it passes Mark's unit tests. However, it is
hard to be 100% sure.
2014-07-23 16:40:31 -07:00
AMOS bot c4dd3d8dbf Automatically generated installer lang files 2014-07-23 22:46:24 +00:00
Simey Lameze f754b93fb0 MDL-46433 blog: fix error message when creating an external blog 2014-07-23 16:12:09 +08:00
Dan Poltawski 5414931209 Revert "Merge branch 'MDL-45594_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE"
This reverts commit 9e32e3befc, reversing
changes made to 695553b1a5.
2014-07-23 09:02:28 +01:00
Dan Marsden f320b2b391 MDL-45715 assign: disable marking allocation if markingworkflow is not set. 2014-07-23 19:22:00 +12:00
Damyon Wiese 170007b939 MDL-37509 Assign: Do not put description in calendar before it should be shown to students 2014-07-23 13:14:51 +08:00
Sam Hemelryk cd60515114 MDL-45724 cache: fixed warning structure bug 2014-07-23 15:24:16 +12:00
AMOS bot e9f88e7793 Automatically generated installer lang files 2014-07-22 22:49:19 +00:00
Dan Poltawski 5199fcd7cb Merge branch 'MDL-37509-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-07-22 15:56:59 +01:00
Dan Poltawski 00d4919e69 Merge branch 'MDL-34248_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-07-22 12:01:06 +01:00
Dan Poltawski e14bbecd57 Merge branch '45724-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-07-22 09:07:27 +01:00
Sam Hemelryk 9e32e3befc Merge branch 'MDL-45594_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-07-22 11:12:13 +12:00
Sam Hemelryk 695553b1a5 Merge branch 'MDL-43063-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-07-22 09:49:07 +12:00
Dan Poltawski c081554c0c Merge branch '46335-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-07-21 09:59:08 +01:00
Dan Poltawski b73aaa678c Merge branch 'MDL-46370_26' of https://github.com/moodlerooms/moodle into MOODLE_26_STABLE 2014-07-21 09:54:59 +01:00
Damyon Wiese 47c938a31b MDL-46017 Assign: Fix restore of marking workflow data 2014-07-21 16:39:01 +08:00
Simey Lameze bad139d09d MDL-43063 core: fix phpdoc comment codechecker issue. 2014-07-21 10:17:29 +08:00
Sam Hemelryk 3a8a3bc3f9 MDL-42909 course: fixed whitespace 2014-07-21 11:43:08 +12:00
Sam Hemelryk e8b0dadd6b Merge branch 'MDL-42909-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2014-07-21 11:35:50 +12:00
David Balch 4b2a23e36f MDL-40479 mod_assign: Fix the colour of grading success messages. 2014-07-21 11:33:25 +12:00
Brian Barnes 294629be5f MDL-46406 core_auth: Placed remember username before submit login form 2014-07-21 11:24:24 +12:00
Sam Hemelryk 2e8d176e27 Merge branch 'mdl-46427-m26' of git://github.com/deraadt/moodle into MOODLE_26_STABLE 2014-07-21 11:12:08 +12:00
Willy Lee d8d64eef11 MDL-46159 course: Add search box to course management pages 2014-07-21 10:56:27 +12:00
Sam Hemelryk 997be8cd2d Merge branch 'MDL-45339-26' of git://github.com/xow/moodle into MOODLE_26_STABLE 2014-07-21 10:49:29 +12:00
Sam Hemelryk 6958e7ebb0 Merge branch 'm26_MDL-46363' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-07-21 10:45:38 +12:00
Sam Hemelryk a3f41f5840 Merge branch 'wip-mdl-46372-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-07-21 10:42:35 +12:00
Sam Hemelryk f7a54f619a MDL-45724 cache: added cache API warnings to the admin notifications page 2014-07-21 09:49:45 +12:00
Sam Hemelryk 7bc4ca8b88 MDL-45724 cache: admin screen now shows store warnings
Implemented a means by which cache store instance can communicate
warnings due to things such as conflicting configurations etc.
2014-07-21 09:39:41 +12:00
AMOS bot 1980338f38 Automatically generated installer lang files 2014-07-20 00:44:31 +00:00
AMOS bot d7bd06bfde Automatically generated installer lang files 2014-07-19 00:41:57 +00:00
Michael de Raadt a74dd5b58c MDL-46427 Course: Correcting dimmed course link class on profile pages. 2014-07-18 15:54:16 +08:00
Jason Fowler 8ed407023d MDL-42909 Course: Fix title for move-targets 2014-07-18 14:43:11 +08:00
Mark Nelson fef6a23626 MDL-34248 core_backup: used API instead of inserting into the log table directly 2014-07-17 18:34:29 -07:00
Mark Nelson 46ca4a9099 MDL-34248 core_backup: added missing end quotation 2014-07-17 18:13:29 -07:00
Jim Thorpe 9df4af3757 enrol_imsenterprise: MDL-46363 including course lib when create_course is
used
2014-07-18 11:26:14 +12:00
Sam Hemelryk 4a77758f38 MDL-46335 backup: fixed casting issue with setting labels
The issue was that clean_param took an int and returned a string
and the result was used in an exact comparison.
The type change mean the comparison failed.
The solution was to ensure the param was cast as a string.
2014-07-18 08:29:48 +12:00
John Okely 803d739f4a MDL-45339 Libraries: Add a note to docblock of get_config, set_config, and unset_config to note they are used in lib/db/upgrade.php 2014-07-17 17:48:15 +08:00
Dan Poltawski 22ffc39685 weekly release 2.6.4+ 2014-07-17 09:22:49 +01:00
Dan Poltawski daf2f76125 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-07-17 09:22:46 +01:00
AMOS bot 760bce86ea Automatically generated installer lang files 2014-07-17 00:53:00 +00:00
AMOS bot 8fec45ebf0 Automatically generated installer lang files 2014-07-17 00:53:00 +00:00
Mark Nelson 23aab8e694 MDL-45594 core_message: added unit tests 2014-07-16 17:06:48 -07:00
Mark Nelson e87c4986dd MDL-45594 core_message: ordered recent notifications by timecreated 2014-07-16 17:06:48 -07:00
Tim Hunt a62cfc3245 MDL-45594 simplify message_get_recent_conversations SQL
I am pretty sure that this new SQL is logically equivalent to
the original, and it passes Mark's unit tests. However, it is
hard to be 100% sure.
2014-07-16 17:06:47 -07:00
Sam Chaffee 01865c55bd MDL-46370 Ajax and Javascript - Fixes docked blocks not expanding when using dock on right 2014-07-16 12:01:31 -06:00
Dan Poltawski e9b7ea41c4 Revert "MDL-46226 core: pix_icon no longer sets title to the alt text"
This reverts commit b440662be2.
2014-07-16 13:45:46 +01:00
Dan Poltawski c82fa0c8ad Revert "MDL-46226 fix unit tests"
This reverts commit 42f05b95c6.
2014-07-16 13:45:45 +01:00
Rajesh Taneja bab46e77d7 MDL-30431 behat: Fixed wiki behat 2014-07-16 09:19:05 +02:00
Eloy Lafuente (stronk7) 6aff5581f6 MDL-30431 mod_wiki: whitespace fix 2014-07-16 01:19:13 +02:00
Eloy Lafuente (stronk7) 5cefb82acb Merge branch 'MDL-30431_wiki_comments_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-07-16 01:16:33 +02:00
Rajesh Taneja 9a24fe056e Backport event trigger from MDL-45641
While backporting MDL-45641, event trigger was missed
on editadavnced page.
2014-07-15 11:46:17 +08:00
Eloy Lafuente (stronk7) e60ca92e1d Merge branch 'MDL-46080_26' of https://github.com/jonof/moodle into MOODLE_26_STABLE 2014-07-14 23:30:34 +02:00
Sam Hemelryk 522cbb467c Merge branch 'MDL-42179-003-26' of https://github.com/dbezborodovrp/moodle into MOODLE_26_STABLE 2014-07-15 08:41:46 +12:00
Eloy Lafuente (stronk7) d7a9bd9da7 Merge branch 'm26_MDL-31366' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-07-14 18:17:59 +02:00
Dan Poltawski 1aefe49544 Merge branch 'MDL-42752-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2014-07-14 16:09:28 +01:00
Dan Poltawski 42f05b95c6 MDL-46226 fix unit tests 2014-07-14 15:47:25 +01:00
Dan Poltawski 90e35c8929 Merge branch 'MDL-46218_disabled2_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-07-14 15:33:24 +01:00
Eloy Lafuente (stronk7) 674ce27e1b Merge branch 'm26_MDL-46197' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-07-14 16:25:18 +02:00
Dan Poltawski 8bbc71406d Merge branch 'm26_MDL-46226' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-07-14 15:15:07 +01:00
David Monllao e946e06322 MDL-43390 files: Only lock when locking is not prevented 2014-07-14 13:04:59 +08:00
Damien Bezborodov c50968f185 MDL-42179 mod_assign: Time remaining issue for group assignment 2014-07-14 13:53:29 +09:30
Sam Hemelryk 85cd13b837 Merge branch 'MDL-42214_popup_blocked_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-07-14 15:28:01 +12:00
Sam Hemelryk ff12f87c62 Merge branch 'MDL-46073_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-07-14 15:16:11 +12:00
Andrew Davis 0257a401f7 MDL-42214 core_message:prevented popup notifications of messages from blocked users 2014-07-14 10:22:30 +08:00
Andrew Davis 9d9aef2fb0 MDL-30431 mod_wiki: clarified the logic around editing and deleting wiki comments and added behat tests 2014-07-14 08:16:47 +08:00
Sam Hemelryk 4a8103d97b Merge branch 'MDL-45765-moodle26' of https://github.com/StudiUM/moodle into MOODLE_26_STABLE 2014-07-14 12:10:03 +12:00
Sam Hemelryk 571516003b Merge branch 'wip-MDL-46280-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-07-14 10:32:53 +12:00
Gilles-Philippe Leblanc 82d84457a0 MDL-22469 auth_cas: CAS module : parameter authCAS=NOCAS not properly handled 2014-07-14 10:22:01 +12:00
Sam Hemelryk cfaf9dc5a7 Merge branch 'MDL-31089_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-07-14 09:51:27 +12:00
Sam Hemelryk 23dab427de Merge branch 'MDL-45562-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-07-14 08:41:53 +12:00
Eloy Lafuente (stronk7) d25049c0fc Moodle release 2.6.4 2014-07-12 19:10:37 +02:00
David Monllao 00e1213a81 MDL-31089 mod_forum: Filtering non-visible groups 2014-07-11 16:50:38 +08:00
Simey Lameze 021ee71b69 MDL-45562 blog: fixed issues when creating/editing an external blog. 2014-07-11 15:22:28 +08:00
Dan Marsden 64ced100cc MDL-31366 Feedback: decode htmlchars on output to excel 2014-07-11 13:29:43 +12:00
Brian Barnes 4c2f38ace1 MDL-46197 core_calendar: Added label text to duration in minutes field 2014-07-11 09:01:03 +12:00
Brian Barnes b440662be2 MDL-46226 core: pix_icon no longer sets title to the alt text 2014-07-11 08:37:54 +12:00
Jean-Philippe Gaudreau 2d8c7cccd9 MDL-45765 Calendar import: Fix undefined variable in cron when updating calendar subscriptions 2014-07-10 16:08:32 -04:00
Eloy Lafuente (stronk7) 6d00d81b84 weekly release 2.6.3+ 2014-07-10 19:15:32 +02:00
Eloy Lafuente (stronk7) 61fdbd038e Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-07-10 19:15:27 +02:00
Ankit Agarwal 72d8a0a12e MDL-46148 qtype_calculated: low-level defence against bad formulas
This catches things like:
 * Malicious equations coming from backup files.
 * Malicious equations in old questions in the database.
2014-07-10 17:54:52 +08:00
Andrew Nicols 5c74e0daca MDL-38990 mod_forum: Restrict ability to post to all groups in a forum
In order to post to all groups in a forum, you must have the
moodle/site:accessallgroups capability.

Thanks to Jakob Ackermann <jackermann@onlineschool.ca> for part of the fix
on this one.
2014-07-10 11:53:06 +08:00
Damyon Wiese 4a46fd643f MDL-46148 questions: Added missing allow_commit for transaction 2014-07-10 11:37:24 +08:00
Andrew Davis 60770bb0a7 MDL-46218 reshuffled access checks in blog and notes 2014-07-10 11:25:23 +08:00
Damyon Wiese 62a1434588 Merge branch 'MDL-19270_moodle26stable' of https://github.com/nadavkav/moodle into MOODLE_26_STABLE
Conflicts:
	lib/graphlib.php
2014-07-10 10:00:03 +08:00
Tim Hunt 20af9d3c0f MDL-46148 qtype_calculatedsimple: fix notice
... when adding a dataset with a formula error.
2014-07-09 14:11:43 +01:00
Tim Hunt 7bf7ef3919 MDL-46148 qtype_calculated: fix validation when importing.
In order to do this in a sane way, I cleaned up a lot of old mess,
inclduing:

1. Previously, qtype_calcuated used ->answeres when importing, and
->answer when saving the form. This was crazy, so I fixed it, and
stripped out the code that made the alternative variable name work.

2. Similarly, it could handle ->answer being either an array, such as
you would get form the HTML editor, or a simple string, which is what
you get form the form. I simplified that too.

3. Finally, I made import use a transaction around saving each
question, so we don't get half questions in the database when an error
occurs.
2014-07-09 14:11:42 +01:00
Tim Hunt f8a6c3d6f0 MDL-46148 qtype_calculated: removed unused method. 2014-07-09 14:11:42 +01:00
Nadav Kavalerchik 6499a17d78 MDL-19270 - Quiz graph - Fix reverse display of Hebrew legend text in RTL mode 2014-07-09 16:09:10 +03:00
David Mudrák 8ecc049f7f MDL-46223 Fix frequently used comments in the marking guide
When the frequently used comment contains a character like >, re-use it
directly instead of its HTML entitiy.
2014-07-09 16:44:28 +08:00
David Mudrák 68299e6154 MDL-46223 Improve the display of marking guide validation message 2014-07-09 16:44:25 +08:00
Dan Poltawski 48bdbf5a4a MDL-44605 calendar: improved returnurl validation
Now we will only redirect to a local url (though sesskey was
already preventing this redirect from being open)
2014-07-09 01:06:46 +02:00
Dan Poltawski 648bf857d3 Merge branch 'MDL-44492_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-07-08 14:17:58 +01:00
Frederic Massart 166e18d7cb MDL-45471 javascript: Escape content of exception dialogs
Conflicts:

	lib/yui/build/moodle-core-notification-ajaxexception/moodle-core-notification-ajaxexception-min.js
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js
	lib/yui/build/moodle-core-notification-exception/moodle-core-notification-exception-min.js
2014-07-08 14:13:29 +01:00
Tim Hunt 2c78623121 MDL-44492 quiz: fix hilighting of graded attempt
In various places, when showing several attempts, we try to hilight the
most significant one (the one that gave the final grade if the quiz is
set to first/last/best attempt). That was not working because the table
zebra stripes were a more specific rule.

Also, the colour was inconsistent, not nice, and not very bootstrapy, so
I changed it.
2014-07-08 14:03:46 +01:00
Tim Hunt 89b8ba6dba MDL-44492 quiz reports: revert some style overrides.
But add one more. This makes Clean theme look a lot better.
2014-07-08 14:03:45 +01:00
Tim Hunt 5c8ef12940 MDL-44492 Rough unit test for the report SQL.
We really ought to test more cases, but this hits one of the most tricky cases.
2014-07-08 14:03:43 +01:00
Tim Hunt d1ff9b957a MDL-44492 quiz reports: make show only graded attempt work.
It needs to only affect finished attempts, and the wording needs to be
modified to make it clear that is what it does.
2014-07-08 14:03:41 +01:00
Dan Poltawski 077703b235 Merge branch 'MDL-45596-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-07-08 10:50:56 +01:00
Marina Glancy 980903e56a MDL-43948 forms: setting types to filemanager and editor elements 2014-07-08 10:47:36 +01:00
Dan Poltawski d830bd9a33 Merge branch 'MDL-46231-26-en_fix' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-07-08 08:32:37 +01:00
Marina Glancy 8f2db3c1a1 Merge branch 'MDL-46229_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-07-08 13:51:57 +08:00
David Mudrák 666248c264 MDL-46223 Improve the marking guide output 2014-07-08 13:20:03 +08:00
David Mudrák 1f8eb08428 MDL-46223 Improve the rubric output 2014-07-08 13:20:03 +08:00
Marina Glancy ada0205360 MDL-46280 filter_activitynames: sort activities by length in reverse order 2014-07-08 11:48:59 +08:00
Sam Hemelryk 20c80d9e2f Merge branch 'MDL-46248_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-07-08 14:40:17 +12:00
Sam Hemelryk fc22f80e9c Merge branch 'MDL-46016_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-07-08 14:27:55 +12:00
Sam Hemelryk bdf5ae0e92 MDL-19270 core_text: added unit tests for strrev 2014-07-08 14:15:06 +12:00
Sam Hemelryk fadff0062a Merge branch 'MDL-19270_moodle26stable' of https://github.com/nadavkav/moodle into MOODLE_26_STABLE 2014-07-08 13:53:47 +12:00
Sam Hemelryk 849c19022c Merge branch 'mdl45982-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-07-08 13:26:51 +12:00
Sam Hemelryk 0076ac2d1c Merge branch 'm26_MDL-46144' of https://github.com/totara/moodle into MOODLE_26_STABLE 2014-07-08 13:10:33 +12:00
Eloy Lafuente (stronk7) 792fb3ea61 Merge branch '46208-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-07-08 02:15:51 +02:00
Sam Hemelryk 15dcd5a535 MDL-45678 cache: renamed new cache and better comments 2014-07-08 09:52:57 +12:00
Sam Hemelryk 8ce2f33f9e Merge branch 'MDL-45678-006-26' of https://github.com/dbezborodovrp/moodle into MOODLE_26_STABLE 2014-07-08 09:42:43 +12:00
Yuliya Bozhko dcf8e1f5d8 MDL-46073 badges: Make sure html tags are not used in badge description
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-07-08 09:37:27 +12:00
Sam Hemelryk ca13549a89 Merge branch 'wip_MDL-46126_m26_passnulls' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-07-08 09:37:14 +12:00
Sam Hemelryk 20e563e825 Merge branch 'MDL-43347-26' of https://github.com/mackensen/moodle into MOODLE_26_STABLE 2014-07-08 09:28:25 +12:00
Yuliya Bozhko 0174a0a57f MDL-46042 badges: Clean up external badge data
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-07-07 16:37:48 +01:00
Dan Poltawski 7047adfdbe Merge branch 'MDL-42393-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-07-07 16:27:34 +01:00
Dan Poltawski 47de7aac75 Merge branch 'MDL-41389_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-07-07 16:10:28 +01:00
Osanda Malith Jayathissa 739d227c58 MDL-45683 user: Escaping Skype ID used in profile 2014-07-07 16:05:10 +01:00
Marina Glancy 74556525de MDL-45760 make sure to check permission before setting header 2014-07-07 15:06:42 +01:00
Tim Hunt 9d8348e13f MDL-46148 qtype_calculated: fix formula validation. 2014-07-07 14:34:02 +01:00
Frederic Massart bbc12d9cb5 MDL-45417 mod_imscp: Prevent entity injections from package content 2014-07-07 13:03:07 +01:00
Frederic Massart 4637ad6f7e MDL-45463 mod_lti: Prevent XML entity injections from provider 2014-07-07 13:00:43 +01:00
Marina Glancy 40d52d4067 MDL-45616 repositories: use json encoding instead of serialization 2014-07-07 15:23:02 +08:00
Marina Glancy 68170f0b01 MDL-45616 repositories: more clearly distinguish when we use source and when reference
Function repository::get_moodle_file() should always be called on packed reference and not on the source received from user.
Also added phpdocs to some other methods that were confusing source and reference
2014-07-07 15:23:02 +08:00
Jason Fowler a5ac47089e MDL-42752 File-picker: Fix tabbing to disabled icons 2014-07-07 14:33:51 +08:00
Dan Poltawski 7d6e6ffceb MDL-43848 messages: do not display message content in popups
The user is not in control of when these popups show up and it
may not be appropiate to have part of this content display whilst
in the presence of other users.
2014-07-07 13:48:08 +08:00
Nadav Kavalerchik 0057543e5e MDL-19270 - Quiz graph - Fix reverse display of Hebrew legend text in RTL mode 2014-07-06 18:51:11 +03:00
Helen Foster 07d9521c49 MDL-46231 Merge English strings from the en_fix language pack 2014-07-04 22:43:32 +02:00
Damien Bezborodov 4ee23c10bb MDL-45678 assignsubmission_comments: Improve performance for permissions checking 2014-07-04 14:25:32 +09:30
Petr Skoda 37648d141f MDL-46126 upgrade: fix bogus nulls in user.password before changing precission
Note: there is no need to deal with Oracle empty strings here
because only MySQL running in non-strict mode is affected.
2014-07-04 16:29:58 +12:00
Frederic Massart 3fd99e0ff6 MDL-45596 roles: Escape filter value before using it in form field 2014-07-04 11:49:32 +08:00
Mark Nelson 2d47c45485 MDL-41389 auth_db: added unit tests for events 2014-07-03 20:19:10 -07:00
AMOS bot f214d6e69a Automatically generated installer lang files 2014-07-04 00:44:28 +00:00
Daniel Neis Araujo e0cd470f1d MDL-46248 calendar: HTML validation check fails on add event screen (Backport of MDL-42869) 2014-07-03 17:20:34 -07:00
Mark Nelson 5e44d5abaa MDL-46016 auth_shibboleth: updated misleading comment
Also generated a random string for the password field in case it is ever used.
2014-07-03 16:16:02 -07:00
Mark Nelson dba2527290 MDL-41389 auth_db: added user_updated/created event triggers 2014-07-03 15:11:47 -07:00
Sam Hemelryk 0b7cbdb0e6 MDL-46208 cachestore_mongo: fixed invalid collection name use 2014-07-04 08:11:21 +12:00
Dan Poltawski 92e7886965 weekly release 2.6.3+ 2014-07-03 10:53:21 +01:00
Dan Poltawski 7b414e6258 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-07-03 10:53:18 +01:00
Frederic Massart 880c2fb8ba MDL-42393 calendar: Preventing open/close loop in events overlay 2014-07-03 10:17:25 +08:00
Yuliya Bozhko e68af16896 MDL-46229 badges: Fix missing additional names fields
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-07-03 09:35:06 +12:00
AMOS bot a2a8e3edf9 Automatically generated installer lang files 2014-07-02 00:44:47 +00:00
Eloy Lafuente (stronk7) 333c9cd9df Merge branch 'wip-mdl-45889-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-07-02 00:57:09 +02:00
Eloy Lafuente (stronk7) 5d4923ffcc Merge branch '45209-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-07-01 23:43:28 +02:00
Sam Hemelryk 2ce17661e8 Merge branch 'wip-MDL-46147-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-07-02 09:31:10 +12:00
Mary Evans dc22f74419 MDL-45507 theme_bootstrapbase: Fix regression for theme based custom menu
in renderers/core_renderer.php.
2014-07-02 09:22:49 +12:00
Eloy Lafuente (stronk7) f7adf8a010 Merge branch 'MDL-45961_MOODLE_26_STABLE' of https://github.com/NeillM/moodle into MOODLE_26_STABLE 2014-07-01 19:23:46 +02:00
Dan Poltawski 92267ed9fe Merge branch 'MDL-46063_26' of git://github.com/schach/moodle into MOODLE_26_STABLE 2014-07-01 17:29:18 +01:00
Dan Poltawski d520b92579 Merge branch 'MDL-46036_survey_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-07-01 16:34:32 +01:00
Charles Fulton 83f78c7c5e MDL-43347 grades: convert keep highest to text field 2014-07-01 07:36:15 -07:00
Charles Fulton 78e6292f47 MDL-43347 grades: consistent interface for drop lowest setting 2014-07-01 07:36:08 -07:00
Dan Poltawski e666c72330 Merge branch 'MDL-46107_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-07-01 14:20:53 +01:00
Dan Poltawski db1cf750bd Merge branch 'wip_MDL-46099_m26_userglobal' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-07-01 10:39:18 +01:00
Marina Glancy 2522a179b0 MDL-46147 modinfo: performance improvement for course page (check filterall) 2014-07-01 15:32:48 +08:00
Damyon Wiese 30e2727e72 MDL-46147 modinfo: performance improvement for course page
This is a big win in a specific situation, ie filters enabled for content+headings,
and no activity descriptions visible on the course page.
2014-07-01 15:32:41 +08:00
Brian Barnes faa963ba9a MDL-46144 core_calendar:Fixed label linking in calendar 2014-07-01 13:51:40 +12:00
Sam Hemelryk 3bbb37741f Merge branch 'MDL-40805-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-07-01 09:06:16 +12:00
Petr Skoda d0dd8d33bb MDL-46099 session: fix use of references for session globals
This reverses the references used for global $USER and $SESSION,
the reason is that PHP does not allow references to references.
$USER is a reference to $GLOBALS['USER'] which means we cannot
put any references to it. Solution is to store the current user and session
objects in $GLOBALS['USER'] and $GLOBALS['SESSIOn'] are reference
them in $_SESSION.

This patch makes the session code behave the same way in CLI,
phpunit and normal web requests - this allows use to finally
unit test most aspects of the session code in Moodle.
2014-07-01 08:38:52 +12:00
Dan Poltawski 824303bada MDL-45641 fix trailing whitespace 2014-06-30 15:47:27 +01:00
Dan Poltawski cb49ea51eb Merge branch 'wip-mdl-45641-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-06-30 15:26:39 +01:00
Dan Poltawski c1f759ab50 Merge branch 'MDL-42467_database_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-06-30 15:09:54 +01:00
Dan Poltawski d183fbaf60 Merge branch 'MDL-45833_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-06-30 13:27:18 +01:00
Dan Poltawski 0d0552d430 Merge branch 'MDL-46044-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-06-30 11:45:32 +01:00
Heiko Schach 55ab8ab731 MDL-46063 feedback: Fix user pictures 2014-06-30 13:28:34 +03:00
Dan Poltawski f50f41c507 Merge branch 'MDL-40228-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-06-30 08:56:47 +01:00
AMOS bot 86573d4ee6 Automatically generated installer lang files 2014-06-29 00:42:58 +00:00
Rajesh Taneja 548e5ecd1b MDL-45641 event: Ldap user_signup unit test added 2014-06-27 16:18:45 +08:00
Rajesh Taneja 695dc96b0e MDL-45641 event: Manually trigger event where needed.
Some places, user_created_user and user_updated_user
events should be triggred after profile data is saved.
2014-06-27 16:18:45 +08:00
Rajesh Taneja 7345a2af94 MDL-45641 event: Option to trigger user event manually
On some pages full user data is not stored before user_created/
user_updated event is triggred. So giving option to trigger that
manually, so it can be triggred after all data is saved
2014-06-27 16:18:45 +08:00
NeillM 2479cecad9 MDL-45961 Customise this page button on user profile page only works correctly for users own profile 2014-06-27 09:04:41 +01:00
Damyon Wiese de55ebff23 MDL-46044 Assign: Add conditions to the inner query for performance 2014-06-27 15:01:35 +08:00
Damyon Wiese 157e5a9f9c MDL-46044 Assign: Modify myhome query to only use the maxattempt from the submission
Using mismatches from the submissions/grades tables does not make much sense, we
should always only consider only the maxattempt from the submissions table.
2014-06-27 14:23:37 +08:00
Damyon Wiese b7860604f7 MDL-46044 Assign: Move common setup to setUp method (share it for all of lib_test.php) 2014-06-27 14:19:59 +08:00
Damyon Wiese eba3393014 MDL-46044 Assign: Fix print_overview function when there are multiple attempts 2014-06-27 14:19:51 +08:00
Damyon Wiese 16266791a0 MDL-46044 Assign: Update unit test to test multiple attempts on overview page 2014-06-27 14:19:44 +08:00
David Monllao 2427ceef62 MDL-45833 event: Removing courseid as the context is higher than course context 2014-06-27 11:25:00 +08:00
Yuliya Bozhko 3e9dfd7f62 MDL-46107 badges: Fix badges navigation and remove empty breadcrumbs on pages using Clean
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-06-27 12:49:00 +12:00
Sam Hemelryk dc9363a651 MDL-45209 course: fixed navbar when creating,editing courses 2014-06-27 09:39:43 +12:00
Eloy Lafuente (stronk7) 5c1049f72b weekly release 2.6.3+ 2014-06-26 10:35:50 +02:00
Eloy Lafuente (stronk7) 125ca896df Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-06-26 10:35:45 +02:00
Eloy Lafuente (stronk7) 65684fa600 Revert " MDL-45044 filter_tex: properly escape excutable pathnames for Windows"
This reverts commit 07a50c2f29.
2014-06-26 10:03:25 +02:00
Rajesh Taneja c7b0eeee8e MDL-45889 behat: Allow admin config to set by shortname 2014-06-26 13:19:21 +08:00
Andrew Davis dbf541f8e1 MDL-46036 mod_survey: added logic to prevent user trying to download when there are no results 2014-06-26 11:20:58 +08:00
Andrew Davis 5636246c95 MDL-42467 mod_data: added code to delete cached RSS feeds when database or glossary entries are deleted 2014-06-26 09:18:21 +08:00
Jonathon Fowler 15e7db4e1d MDL-46080 assign: fix offline grading worksheet marker column 2014-06-25 12:23:12 +10:00
AMOS bot 50ca770bc6 Automatically generated installer lang files 2014-06-25 00:45:35 +00:00
AMOS bot 21d1577972 Automatically generated installer lang files 2014-06-25 00:45:34 +00:00
Eloy Lafuente (stronk7) 9d5a2e6f1c Merge branch 'MDL-46079-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-06-25 01:34:02 +02:00
Eloy Lafuente (stronk7) 004659a6d0 Merge branch 'MDL-41258-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-06-24 20:09:35 +02:00
Damyon Wiese 47042403ca Merge branch 'MDL-45652_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-06-24 17:00:17 +08:00
Damyon Wiese fc463d34e8 Merge branch 'MDL-10115-26' of git://github.com/xow/moodle into MOODLE_26_STABLE 2014-06-24 16:04:28 +08:00
John Okely 188c45aef6 MDL-10115 User profile: Use title to aid in the ellipsis link being understood by screen readers 2014-06-24 15:39:23 +08:00
Marina Glancy 76b320818a Merge branch 'MDL-45933-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-06-24 13:52:54 +08:00
Marina Glancy e0e6a127fa Merge branch 'MDL-45044-m26-master' of git://github.com/dthies/moodle into MOODLE_26_STABLE 2014-06-24 13:29:20 +08:00
Damyon Wiese b1e4d8b119 Merge branch 'MDL-46035_survey_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-06-24 13:08:52 +08:00
Damyon Wiese 80fa42a001 Merge branch 'MDL-46076-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-06-24 11:31:54 +08:00
Damyon Wiese 63de1463f8 Merge branch 'MDL-44512-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-06-24 10:58:47 +08:00
Eloy Lafuente (stronk7) 1510a9d6a1 MDL-39883 events: fix tests to avoid warning
Only needed in 26 and older, we are handling those
changes automatically in 27 and up.
2014-06-24 02:06:08 +02:00
Eloy Lafuente (stronk7) 4fdbb24243 Merge branch 'MDL-45721_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-06-24 01:00:21 +02:00
Eloy Lafuente (stronk7) 32b48768d4 Merge branch 'MDL-39883-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-06-24 00:50:05 +02:00
Eloy Lafuente (stronk7) a23eb149a8 Merge branch 'MDL-45764_generalTool_26' of https://github.com/moodlerooms/moodle into MOODLE_26_STABLE 2014-06-24 00:03:42 +02:00
Simey Lameze f0a38fd4c0 MDL-40805 auth_cas : Trigger user_loggedout event before CAS logout. 2014-06-23 15:20:53 +08:00
Damyon Wiese 1b25b037dc Merge branch 'MDL-45580-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-06-23 15:20:40 +08:00
Frederic Massart e7acf36d0d MDL-45580 assignfeedback_editpdf: Save readonly version in backup 2014-06-23 14:56:25 +08:00
Frederic Massart 75c74acfa1 MDL-45580 assignfeedback_editpdf: Delete draft content on new submission 2014-06-23 14:56:25 +08:00
Frederic Massart 2df40c4f90 MDL-45580 assignfeedback_editpdf: Store a readonly version of the PDF 2014-06-23 14:56:21 +08:00
Damyon Wiese 3f3ecc0311 Merge branch '37145-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-06-23 14:40:33 +08:00
Damyon Wiese 20ab72d496 Merge branch 'MDL-38693-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-06-23 13:54:59 +08:00
Damyon Wiese f208379c9f MDL-41746 External api: Allow multiple calls to validate_context at different levels
(Only from webservices)
2014-06-23 13:39:53 +08:00
Damyon Wiese d61f480fb6 Merge branch 'MDL-35453_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-06-23 12:30:18 +08:00
Mark Nielsen 45ddf2980a MDL-46013 theme: Uninstall theme unconditionally unsets configs 2014-06-23 11:35:07 +08:00
Sam Hemelryk d57563edd6 MDL-37145 caching: noted recommendation for dedicated memcache servers
Several reports have been made about the unexpected purging of entire
memcached servers when MUC is configured to use Memcache and caches
get purged.
This is expected and occurs because the memcache extenions don't
provide isolated containers. Moodle data is stored along side any other
data in the cache and when caches get purged all data gets removed
whether it belongs to Moodle or not.

The docs cover this point and here I've added notes about this to both
config-dist.php and cache/README.md
2014-06-23 11:02:48 +12:00
AMOS bot a095ad50c1 Automatically generated installer lang files 2014-06-21 00:43:44 +00:00
Tim Hunt 905050d73e MDL-35453 quiz reports: don't order by id.
We were using ORDER BY id even though there was a perfectly good
attempt column to order the attempts by one user at one quiz.

Also, Oracle was complaining:
Debug info: ORA-01799: a column may not be outer-joined to a subquery
2014-06-20 16:54:20 +01:00
sam marshall d20d8938a7 MDL-46079 Restore: Can run out of memory in get_records call 2014-06-20 14:12:58 +01:00
sam marshall e1d76a33e3 MDL-46076 Lib: Allow javascript-static.js to somewhat work in IE7 [2.6] 2014-06-20 14:10:57 +01:00
Frederic Massart 8fc9105a7a MDL-40228 backup: Settings were ignored during automated backups 2014-06-20 15:38:09 +08:00
Daniel Thies 07a50c2f29 MDL-45044 filter_tex: properly escape excutable pathnames for Windows 2014-06-19 22:08:21 -05:00
Andrew Davis f87c073039 MDL-46035 mod_survey: a string change to make an error message always correct 2014-06-20 08:58:45 +08:00
Jetha Chan 28b751b244 MDL-44512 themes: fix for custom menu submenu arrows on RTL languages 2014-06-19 15:18:18 +08:00
Damyon Wiese 9663e6f8a5 weekly release 2.6.3+ 2014-06-19 14:13:11 +08:00
Damyon Wiese 13f327b533 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-06-19 14:13:08 +08:00
AMOS bot e7b7b7fd8e Automatically generated installer lang files 2014-06-19 00:42:58 +00:00
Ankit Agarwal 90db0fb726 MDL-39883 events: Trigger a module created event when duplicating a module 2014-06-18 16:02:43 +08:00
Ankit Agarwal fd554631f8 MDL-39883 events: Create a new api create_from_cm for module create event 2014-06-18 16:02:42 +08:00
Damyon Wiese 8bf65f15dd MDL-45933 Assign: Prevent fatal error when there are no users in the grading table 2014-06-18 15:17:38 +08:00
Mark Nelson ca0678bd96 MDL-45652 core_backup: display warning on restore destination form when necessary data is missing 2014-06-17 21:56:26 -07:00
Mark Nelson 9f6a3aee95 MDL-45721 core_backup: only trigger the course_restored event when restoring a course 2014-06-17 19:38:36 -07:00
AMOS bot 08c9c27c01 Automatically generated installer lang files 2014-06-18 00:42:34 +00:00
Andrew Nicols 9b6218949a MDL-41258 Forum: Add additional unit tests for forum digest settings 2014-06-17 16:17:35 +08:00
Damyon Wiese 05dd6551bd MDL-45582 Editpdf: Prevent debugging when there is no pdf 2014-06-17 10:21:42 +08:00
Damyon Wiese 5f8a991828 Merge branch 'm26_MDL-45582' of git://github.com/greg-or/moodle-mod_assign into MOODLE_26_STABLE 2014-06-17 10:21:34 +08:00
Eloy Lafuente (stronk7) d7b83310a7 Merge branch 'MDL-45970_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-06-17 01:15:54 +02:00
Eloy Lafuente (stronk7) a25529102c Merge branch 'MDL-45611-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-06-17 01:12:34 +02:00
Eloy Lafuente (stronk7) 883656ceb8 Merge branch 'wip-mdl-45719-m26' of https://github.com/deraadt/moodle into MOODLE_26_STABLE 2014-06-17 01:04:08 +02:00
Eloy Lafuente (stronk7) c005cb8947 Merge branch 'MDL-45870-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-06-17 00:51:46 +02:00
Marina Glancy 827fbc4515 Merge branch 'MDL-45901_Quiz_MOODLE-26-STABLE' of git://github.com/nadavkav/moodle into MOODLE_26_STABLE 2014-06-16 17:27:54 +08:00
Jonathon Fowler f8840f947c MDL-42531 assign: refactor batch operations to use forms properly
Avoids a lot of ugly optional_param() use. Also fixes the
non-functional cancel buttons.

Conflicts:
	mod/assign/locallib.php
	mod/assign/tests/base_test.php
	mod/assign/tests/events_test.php
2014-06-16 17:00:04 +08:00
Gregory Faller 41b20b6e18 MDL-45582: Apply grades and feedback to entire group does not work with Annotate PDF feature 2014-06-16 18:07:56 +09:30
Marina Glancy 0e96add931 Merge branch 'MDL-35648-v26' of git://github.com/danielneis/moodle into MOODLE_26_STABLE 2014-06-16 14:24:22 +08:00
Marina Glancy 196c818a91 Merge branch 'MDL-45935-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-06-16 14:23:01 +08:00
John Okely 8791ab3304 MDL-10115 User profile: Use moodle_url and html_writer::link for course links on user profiles 2014-06-16 14:22:28 +08:00
AMOS bot fc06491c75 Automatically generated installer lang files 2014-06-15 00:42:51 +00:00
Nadav Kavalerchik b70337b38c MDL-45901 - Quiz - Random question category question are not visible,in RTL mode 2014-06-14 00:47:10 +03:00
Jason Fowler 08f2855d64 MDL-45611 Questions: Fixing the layout of the 'points box' 2014-06-13 10:24:59 +08:00
AMOS bot eb4b4c7ba0 Merge branch 'MOODLE_26_STABLE' into install_26_STABLE 2014-06-13 00:42:09 +00:00
Tim Lock 23c3ce59ff MDL-45982: Implement displaying of non error messages from a provider. 2014-06-13 10:08:03 +09:30
Andreas Grabs 87aa044351 MDL-31998 mod_feedback - Feedback depend questions bug 2014-06-13 01:44:35 +02:00
Tim Hunt fa5cfedf4e MDL-45970 quiz editing: fix display of random questions.
The pass by reference meant the function was clobbering the variable in
the calling function. Once that was change, it was not strictly
necessary to rename the variable in the function, but I did anyway for
clarity.

Thanks to Rajesh Taneja for finding the problem, and identifying which
bit of code was broken. I really just made the patch.
2014-06-12 19:43:31 +01:00
Eloy Lafuente (stronk7) 89c7782a91 weekly release 2.6.3+ 2014-06-12 18:59:00 +02:00
Eloy Lafuente (stronk7) e17dc7bcfa Merge branch 'MDL-42835-26' of http://github.com/damyon/moodle into MOODLE_26_STABLE 2014-06-12 10:00:01 +02:00
John Okely 64f2725233 MDL-10115 User profile: Allow full list of courses to be viewed on a user's profile 2014-06-12 15:20:34 +08:00
Rajesh Taneja 6e5c445714 MDL-45808 enrol_self: Fixed behat to observe the group key policy
Conflicts:
	enrol/self/tests/behat/self_enrolment.feature
2014-06-12 14:39:42 +08:00
Damyon Wiese 95ef465948 MDL-42835 Scorm: Fix for JS error because no nodes are selected in the toc. 2014-06-12 14:00:04 +08:00
AMOS bot 0d893ad97b Automatically generated installer lang files 2014-06-12 00:43:43 +00:00
Damyon Wiese 1110aed46a MDL-45763 Question types: Allow saving '0' as question text. 2014-06-11 17:29:55 +08:00
Marina Glancy 86fdc9dd64 MDL-39726 backup: fix SQL syntax for Oracle 2014-06-11 17:16:15 +08:00
Marina Glancy d66cfec3f0 MDL-39726 backup: fix SQL syntax for Oracle 2014-06-11 12:19:15 +08:00
Marina Glancy 677267791a MDL-45763 question: fix SQL syntax for Oracle 2014-06-11 12:19:15 +08:00
Eloy Lafuente (stronk7) 8e9115725e Merge branch 'm26_MDL-29708_Typo_Extra_Slashes' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-06-11 01:46:08 +02:00
Frederic Massart 179515b4de MDL-45808 group: Observe the group key policy upon group creation 2014-06-10 23:03:37 +02:00
Eloy Lafuente (stronk7) 871c0ec7c5 Merge branch 'MDL-45579-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-06-10 22:26:12 +02:00
Eloy Lafuente (stronk7) e7bc2568a6 Merge branch 'MDL-45418_26' of git://github.com/stronk7/moodle into MOODLE_26_STABLE 2014-06-10 20:13:58 +02:00
Barbara Ramiro 9fca4525dc MDL-45943: Replacement for publisher icons 2014-06-10 19:38:35 +02:00
Jason Fowler 5fd16a3761 MDL-45418 Files: Adding upgrade steps for publisher docs
Conflicts:
	lib/db/upgrade.php
	lib/db/upgradelib.php
	version.php
2014-06-10 19:37:29 +02:00
James McLean af21acd472 MDL-45418 Files: Adding publisher docs to Filetypes 2014-06-10 19:34:08 +02:00
Eric Merrill 272878cab9 MDL-45763 question: Correct random question text if set to true or false 2014-06-10 20:08:35 +08:00
Marina Glancy 38083d7ff3 Merge branch 'MDL-20154-26' of git://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-06-10 15:42:27 +08:00
Damyon Wiese 86af5cb87c Merge branch '45524-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-06-10 15:31:25 +08:00
Marina Glancy fde80766e2 Merge branch '26STABLE-wip-MDL45846' of git://github.com/jennymgray/moodle into MOODLE_26_STABLE 2014-06-10 14:20:34 +08:00
Damyon Wiese 2f3c3abc1f Merge branch 'wip-mdl-44309-m26' of https://github.com/deraadt/moodle into MOODLE_26_STABLE 2014-06-10 14:08:30 +08:00
Damyon Wiese 871a036c74 Merge branch 'MDL-45767_returnInstanceid_26' of https://github.com/moodlerooms/moodle into MOODLE_26_STABLE 2014-06-10 13:52:18 +08:00
Damyon Wiese eb6e5390c9 Merge branch 'MDL-45763-26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-06-10 13:14:38 +08:00
Andrew Nicols ac86e96914 MDL-45935 tests: Specify step names during backup/restore tests 2014-06-10 12:18:24 +08:00
Frederic Massart 66f93d133a MDL-45870 mod_assign: Behat test covering some outcome usage 2014-06-10 11:58:19 +08:00
Michael de Raadt ae527646a1 MDL-45719 mod_lti - Pass language strings to inline JS to allow for escaping 2014-06-10 11:40:28 +08:00
Eloy Lafuente (stronk7) 0034fd8816 Merge branch 'MDL-42782-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-06-10 01:10:40 +02:00
Eloy Lafuente (stronk7) 4c3f6d562f Merge branch 'MDL-42835_26' of git://github.com/nobelium/moodle into MOODLE_26_STABLE 2014-06-10 00:37:34 +02:00
Eloy Lafuente (stronk7) b2d285491c Merge branch 'MDL-45574-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-06-09 21:49:44 +02:00
Eloy Lafuente (stronk7) 4d7544a3a0 Merge branch 'wip-MDL-44501-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-06-09 18:59:37 +02:00
Jenny Gray 1d20e997a0 MDL-45846 Libraries custom user agent device detection unit test added 2014-06-09 14:04:36 +01:00
Marina Glancy a9af7d94e1 Merge branch 'MDL-45560-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-06-09 17:25:22 +08:00
Jetha Chan 3a6f3f906a MDL-38693 themes: amended z-indexes
Amended #dock z-index level from 11000 to 5000 across all themes; amended z-index style of #page-header in Overlay theme such that elements no longer occlude TinyMCE.
2014-06-09 14:09:55 +08:00
Damyon Wiese 8beb255c10 Merge branch 'MDL-39726-26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-06-09 12:43:04 +08:00
Damyon Wiese c800196f03 Merge branch 'MDL-45714-26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-06-09 09:20:09 +08:00
Sam Hemelryk 7a684b732c MDL-45524 navigation: fixed non-expandable node behat tests 2014-06-09 09:33:59 +12:00
Sam Hemelryk 82358535df MDL-44711 navigation: improved expandable course calculation 2014-06-09 09:33:59 +12:00
Matteo Scaramuccia 6637cf27b9 MDL-29708 Fixed file_exception() arguments in rename(). 2014-06-07 09:59:01 +02:00
Matteo Scaramuccia 874db754ce MDL-29708 Fixed extra slashes in $string['storedfilenotcreated']. 2014-06-07 09:58:59 +02:00
sam marshall 7aa0860eca MDL-45574 Backup progress: Can time out with large number of files
When there are many files inside a single resource, it's possible
for the backup to time out because it does not report progress
while adding entries to the backup_ids table.
2014-06-06 10:44:19 +01:00
Jenny Gray 807c670765 MDL-45846 Libraries Reinstate custom user agent device detection 2014-06-06 10:04:27 +01:00
Frederic Massart 36cef83e08 MDL-45870 mod_assign: Outcomes are saved for each group member 2014-06-06 12:26:27 +08:00
Daniel Neis Araujo 877ce4a64d MDL-35648 (backport) adding missing distinct selector in sql on participation report 2014-06-05 20:45:12 -03:00
Nobelium a5a3c48851 MDL-42835 mod_scorm: Close tree nodes using TreeView API 2014-06-05 22:30:29 +00:00
Sam Chaffee 464280a23d MDL-45767: Fixed DB error when returning to course from external tool
The instance ID is not always returned from the external
tool provider.
2014-06-05 09:38:46 -07:00
Eloy Lafuente (stronk7) afce57cbea weekly release 2.6.3+ 2014-06-05 16:58:45 +02:00
Eloy Lafuente (stronk7) 6e3438036a Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-06-05 16:58:39 +02:00
Michael de Raadt 0d7ed311f8 MDL-44309 Administration - correcting inproperly assigned column classes in environment table 2014-06-05 10:44:06 +08:00
Eric Merrill 52878b707a MDL-20154 questions: question_delete_question should not check perms
By Moodle convention, library functions should not implement permission
checks, they are to be handled by the invoking code.
2014-06-04 17:45:05 -04:00
Eric Merrill 3616569d45 MDL-20154 quiz: Remove unused random questions
When a random question is removed from a quiz, and it is not
in use elsewhere, it should be deleted.

Conflicts:
	mod/quiz/editlib.php
	mod/quiz/lib.php
2014-06-04 17:45:02 -04:00
Mark Nielsen a6afe639ca MDL-45764 mod_lti: Fix adding General Tool
This error only occurs when a ltisource
plugin is present that implements the
get_types callback.
2014-06-04 08:10:56 -07:00
Eric Merrill 200862ff6e MDL-39726 backup: Move question files by context, not one at a time
Use question category contexts to send file to the file pool in bulk.
Questions are only restored in whole category chunks, so this is safe
to do.
2014-06-04 09:20:05 -04:00
Adrian Greeve 7de5920dd8 MDL-44501 mod_data: Only attempt to export files when a file exists.
The error only occurs when portfolios are enabled and there is only one field which is
a file field.
2014-06-04 15:31:34 +08:00
Frederic Massart ed94a2affd MDL-45579 group: Behat tests to cover group enrolment key rules 2014-06-04 15:12:04 +08:00
Frederic Massart e2f577e074 MDL-45579 group: Prevent duplicate enrolment keys in course groups 2014-06-04 15:12:03 +08:00
Andrew Nicols 0ad0ddd1ea MDL-18162 mod_forum: Correct @param type in phpdoc to use stdClass 2014-06-04 11:26:19 +08:00
Eloy Lafuente (stronk7) 9a5044fa5c Merge branch 'MDL-44620_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-06-03 18:11:56 +02:00
Dan Poltawski 7c3e7cdae9 Merge branch '45333-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-06-03 15:26:03 +01:00
Eloy Lafuente (stronk7) acfc4c0b4d Merge branch 'MDL-42953-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2014-06-03 12:11:52 +02:00
Damyon Wiese 65f3549893 Merge branch 'MDL-45592_26' of git://github.com/grabs/moodle into MOODLE_26_STABLE 2014-06-03 16:22:07 +08:00
Damyon Wiese 50df05ef78 Merge branch 'm26_MDL-44098' of git://github.com/greg-or/moodle-mod_assign into MOODLE_26_STABLE 2014-06-03 13:10:16 +08:00
Damyon Wiese 322a1fa453 Merge branch 'MDL-45781_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-06-03 11:58:52 +08:00
Jetha Chan 15601a33d9 MDL-42782 usability: fix for extreme course page indenting 2014-06-03 11:16:36 +08:00
Sam Hemelryk 42a1546bf8 Merge branch 'MDL-18162-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-06-03 15:00:31 +12:00
Eric Merrill 0babaf208d MDL-45714 backup: Less aggressive removal of old backup dirs
The old 4 hour standard was too aggressive and can cause backup files
to be removed while they were still in use. Now the same as cron,
1 week.
2014-06-02 21:50:54 -04:00
Eloy Lafuente (stronk7) 9514d99333 Merge branch 'm26_MDL-45726' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-06-03 02:20:02 +02:00
Sam Hemelryk b51ee5ac52 Merge branch 'MDL-33763-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-06-03 08:57:35 +12:00
Eric Merrill 2f4815a05b MDL-45763 question Random qtype should use '0' or '1' question text.
Some time ago, it when from using '0' for no-subcategories to blank.
Change to properly define '0' or '1', update old questions, and make
sure to fix newly restored questions.

Conflicts:
	mod/quiz/editlib.php
	question/type/random/version.php
2014-06-02 15:35:40 -04:00
Albert Gasset 1a997d4b11 MDL-35514 mod_forum: Fixed warning message to students in forums with groups 2014-06-02 18:25:40 +02:00
Tim Hunt d03434111a MDL-45781 quiz autosave: detect and report when the session is lost.
and also other errors.
2014-05-30 16:30:16 +01:00
AMOS bot 888d681014 Automatically generated installer lang files 2014-05-30 01:24:34 +00:00
AMOS bot 2dbb5e22f7 Automatically generated installer lang files 2014-05-30 01:24:34 +00:00
Ciaran Irvine 49c4454cec MDL-45726 SCORM: Correct check for forcenewattempt 2014-05-30 09:49:18 +12:00
Sam Hemelryk 19a43c48bf MDL-45333 output: navbar is now wrapped in a <nav> tag 2014-05-30 08:41:39 +12:00
Andreas Grabs 4532c861e1 MDL-45592 mod_feedback - unwanted linebreak after import or duplicating a feedback 2014-05-29 17:15:48 +02:00
Eloy Lafuente (stronk7) 1132d30d1f weekly release 2.6.3+ 2014-05-29 12:51:33 +02:00
Eloy Lafuente (stronk7) 6e415f6a59 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-05-29 12:51:28 +02:00
Damyon Wiese a42f023698 MDL-45654 Cron: Fix for unit test that was causing integer overflow in 32 bit php 2014-05-29 16:30:06 +12:00
Sam Hemelryk 18c31e25b6 Merge branch 'wip-mdl-45698-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-05-29 14:28:07 +12:00
Rajesh Taneja 6a46c626d6 MDL-45698 behat: Fixed behat and symfony versions 2014-05-29 09:49:20 +08:00
Sam Hemelryk 321a4a90ab MDL-45654 cron: fixed dataprovider timestamp issue 2014-05-29 11:21:05 +12:00
Sam Hemelryk bc389ac7c8 Merge branch 'wip-mdl-45565-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-05-29 08:12:37 +12:00
Andrew Nicols 54c9783e5c MDL-45560 report_log: Close sessions before download only
If the session is closed too early, then preferences made in the body of
the page will not be saved to the session.
2014-05-29 01:02:25 +08:00
Andrew Nicols 646021e728 MDL-18162 mod_forum: Correct phpdoc for forum_clean_search_terms 2014-05-28 09:36:02 +08:00
Dan Poltawski 56f23662b1 Merge branch 'MDL-45544-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-05-27 07:50:03 +01:00
David Monllao e002c90dab MDL-44620 behat: Automate MDLQA-7
- MDLQA-7: By default, a new course contains a Latest
News block which displays a specific number of recent
discussions from the news forum
2014-05-27 13:13:48 +07:00
David Monllao 94ba162660 MDL-44620 behat: Automates MDLQA-6
- MDLQA-6: By default, a new course contains a news
forum in which only teachers can post and subscription
is forced
2014-05-27 13:13:48 +07:00
Rajesh Taneja b24571ea7d MDL-45565 phpunit: Changed testsuite_name, so as to avoid class collision 2014-05-27 09:50:21 +08:00
Rajesh Taneja d160b700e8 MDL-45565 core_message: Reset internal users in phpunit 2014-05-27 09:50:21 +08:00
Gregory Faller 33f29f5adc MDL-44098: Late submissions with extension calculate period of lateness incorrectly 2014-05-27 11:08:29 +09:30
Dan Poltawski c5549ab475 Merge branch 'MDL-45676_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-05-26 12:02:43 +01:00
Dan Poltawski 1ec46dca1d Merge branch 'MDL-45675_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-05-26 11:59:26 +01:00
Marina Glancy a8b6eaa3c4 Merge branch 'MDL-45661-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-05-26 14:46:55 +08:00
Marina Glancy 25f6bc111d Merge branch 'MDL-44482-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-26 14:46:47 +08:00
Simey Lameze 7874aa6eb7 MDL-45544 events: Add event user_profile_viewed trigger to user/profile.php 2014-05-26 14:10:59 +08:00
Jetha Chan addeb650b9 MDL-44482 mod_lti: use localized dates
Fixed an issue where LTI external tools had creation datestamps of NaN/NaN/NaN under particular non-English languages.
2014-05-26 14:01:05 +08:00
Damyon Wiese c3131a4ac2 Merge branch 'wip-MDL-45688-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-05-26 12:48:33 +08:00
Damyon Wiese d60e4f6684 MDL-45661 Assign: Clean bad data from DB after MDL-42526
Conflicts:
	mod/assign/db/upgrade.php
	mod/assign/version.php
2014-05-26 12:37:19 +08:00
Damyon Wiese cd2297972b Merge branch '45499-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-05-26 12:13:02 +08:00
Marina Glancy 7c399a1ba0 Merge branch 'MDL-44014-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-05-26 11:59:47 +08:00
Ankit Agarwal 1b308f725a MDL-33763 notes: Fix issue with incorrect node highlighting in the nav tree 2014-05-26 10:41:51 +08:00
Mark Nelson 47235557d2 MDL-45675 mod_data: initialise options as an empty array to avoid error when there are none 2014-05-25 19:29:39 -07:00
Sam Hemelryk 5abf0019f5 Merge branch 'MDL-45650_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-05-26 13:59:14 +12:00
Sam Hemelryk 7ec197fd64 Merge branch 'MDL-45192_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-05-26 13:23:06 +12:00
Sam Hemelryk 967d16dd52 Merge branch 'MDL-45660_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-05-26 11:52:35 +12:00
Sam Hemelryk 5b4b64fc58 Merge branch 'MDL-45686_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-05-26 10:55:14 +12:00
Sam Hemelryk 362598367c Merge branch 'MDL-45635-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/src/notification/js/confirm.js
2014-05-26 10:38:22 +12:00
Sam Hemelryk 43b611f566 Merge branch 'm26_MDL-45623' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-05-26 09:58:59 +12:00
Sam Hemelryk 9832d18ab5 Merge branch 'MDL-45607_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-05-26 09:53:46 +12:00
Sam Hemelryk 201d502a9b Merge branch 'MDL-42526-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2014-05-26 09:02:49 +12:00
Sam Hemelryk 53bdea7476 MDL-45499 admin: fixed error when displaying page settings 2014-05-26 09:01:09 +12:00
Sam Hemelryk 1a49438ade Merge branch 'MDL-45654-26' of https://github.com/rtcn2/moodle into MOODLE_26_STABLE 2014-05-26 08:58:08 +12:00
Jean-Michel Vedrine 4fb94f7f96 MDL-45686 qtype_multichoice get_num_selected_choices return wrong result 2014-05-25 09:15:21 +02:00
Marina Glancy 5638eb7c35 MDL-45688 added missing library requirement 2014-05-24 18:30:28 +08:00
Rajesh Taneja 543ef5fa7c MDL-45565 core_message: Added unit tests. 2014-05-23 16:47:50 +08:00
Rajesh Taneja c27601c459 MDL-45565 core_message: Fixed strangers array
Strangers get mixed with noreply user and support user,
if  noreply/support users real user.
To avoid duplication use userid as array index. Also,
avoid fetching data again for noreply and support users,
if they are real users, then data is already feteched.
2014-05-23 16:47:43 +08:00
Andrew Nicols 6c66c20107 MDL-45635 javascript: Make core dialogue translatable 2014-05-23 16:19:15 +08:00
Mark Nelson 7221132d11 MDL-45676 mod_data: added missing additional name fields 2014-05-22 22:00:15 -07:00
AMOS bot c38626b055 Automatically generated installer lang files 2014-05-23 00:52:52 +00:00
Tim Hunt 7d99d3e9c4 MDL-45660 question statistics: fix regression added by MDL-44981.
Also, make comparison more robust.
2014-05-22 16:16:03 +01:00
Eloy Lafuente (stronk7) 529d4cdbc6 weekly release 2.6.3+ 2014-05-22 16:47:12 +02:00
Eloy Lafuente (stronk7) cd07fceed1 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-05-22 16:47:07 +02:00
James Pratt 26ae6e5792 MDL-42526 mod_assignment : fix record insert with assigment.id 0 2014-05-22 12:54:45 +07:00
AMOS bot 217613ab21 Automatically generated installer lang files 2014-05-22 01:08:09 +00:00
Simon Coggins c017cc5ca9 MDL-45623: Fix assigned users count on role delete confirmation page 2014-05-22 08:16:46 +12:00
Rod Norfor 03966a4ec0 MDL-45654 cron: fix non-empty directories deletion
Remove errors when attempting to delete non-empty directories when
    child directories do not get removed since the mtime was updated when
    files were removed from the child directory.
2014-05-21 17:24:02 +01:00
Sam Hemelryk b1cb63b24f MDL-44711 course: fixed navigation expansion in course tests 2014-05-21 20:58:35 +12:00
Mark Nelson ec373efd6d MDL-45650 events: ensure correct objectid passed when triggering user_profile_viewed event 2014-05-21 00:25:48 -07:00
Mark Nelson 4a9dcf3f17 MDL-45607 events: changed the context passed to the user_profile_viewed event 2014-05-20 21:13:28 -07:00
Marina Glancy f01e4739fd MDL-45469 profile: make sure profile fields can be initialised without arguments 2014-05-21 11:53:53 +08:00
Dan Poltawski 7d5774aaa2 Merge branch 'wip-MDL-45371-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-05-21 10:03:09 +08:00
Marina Glancy 7a562bf521 MDL-45320 behat: change to block selector 2014-05-20 20:52:37 +08:00
Marina Glancy 0c11e7ed30 MDL-45320 block_html: behat tests 2014-05-20 20:52:14 +08:00
Marina Glancy a33bc20d2e MDL-45320 behat: Step definitions for blocks 2014-05-20 20:52:01 +08:00
David Monllao e3353f92fc MDL-45294 behat: Updating block references to aria label value
Also improving moodle selectors xpath expressions
readability.
2014-05-20 20:47:48 +08:00
David Monllao 28e5ece329 MDL-45294 behat: Supporting an aria-label as a block ref 2014-05-20 20:47:48 +08:00
Dan Poltawski 239db05eec Merge branch '44711-26-r2' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-05-20 20:32:02 +08:00
Sam Hemelryk 4fc9f74029 MDL-44711 block_navigation: fixed typo in behat tests 2014-05-20 23:38:25 +12:00
Damyon Wiese e679a371ef MDL-45606 Unit test fix for MySQL and added a comment about the removed code. 2014-05-20 18:07:28 +08:00
Dan Poltawski af8bd4de8e Merge branch 'MDL-45496-m26' of https://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-05-20 15:55:13 +08:00
Marina Glancy 1cbfc11612 Merge branch 'MDL-45525-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 14:30:14 +08:00
Marina Glancy bf75a73cc5 Merge branch 'MDL-45536-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 14:26:31 +08:00
Marina Glancy 97dc7bfc0b Merge branch 'wip-MDL-45512-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-05-20 14:22:51 +08:00
Marina Glancy f60c23a781 Merge branch 'MDL-43669-m26' of git://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-05-20 14:16:27 +08:00
Marina Glancy 2b0b60631d Merge branch 'MDL-44333_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-05-20 14:11:57 +08:00
Andrew Nicols 51a6bf7f1a MDL-45536 theme: Use width auto for inputs and textareas specifying them 2014-05-20 14:08:58 +08:00
Damyon Wiese 2a6cc872ff Merge branch 'm26_MDL-45583' of github.com:danmarsden/moodle into MOODLE_26_STABLE 2014-05-20 13:30:37 +08:00
Damyon Wiese 350e34d177 Merge branch 'MDL-45323-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-05-20 13:29:30 +08:00
Dan Poltawski 67f6ebacff Merge branch 'MDL-45545-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-20 12:21:58 +08:00
Sam Hemelryk e77dcc602d Merge branch 'MDL-44323-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/less/moodle/admin.less
	theme/bootstrapbase/style/moodle.css
2014-05-20 15:45:21 +12:00
Sam Hemelryk aa1d665a3a Merge branch 'MDL-44027-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-05-20 15:39:31 +12:00
Dan Poltawski 2b0ea3051d Merge branch 'MDL-45605-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-05-20 10:51:27 +08:00
Dan Poltawski fa496d3fe1 Merge branch 'MDL-45546-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-20 10:24:40 +08:00
Dan Poltawski fa4ff1bd10 Merge branch '44711-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-05-20 10:14:24 +08:00
Sam Hemelryk 43f39c235f Merge branch 'MDL-45603-26' of https://github.com/merrill-oakland/moodle into MOODLE_26_STABLE 2014-05-20 13:59:33 +12:00
Marina Glancy 0e46c03356 Merge branch 'MDL-45469-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-05-20 09:52:48 +08:00
Dan Poltawski 940269660f Merge branch 'MDL-44449_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-05-20 09:50:51 +08:00
Damyon Wiese 4c2ba6794b Merge branch '44974-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-05-20 09:01:24 +08:00
Sam Hemelryk 7d14ae30e9 Merge branch 'MDL-45477-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-05-20 11:58:18 +12:00
Sam Hemelryk 8ffb738721 Merge branch 'MDL-45535-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-05-20 11:55:47 +12:00
Sam Hemelryk cf1cf9499f Merge branch 'MDL-37838-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-05-20 10:42:19 +12:00
Sam Hemelryk d18bc9dc02 Merge branch 'MDL-45380-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 08:53:11 +12:00
Sam Hemelryk 17f8fb7f3e Merge branch 'MDL-45135-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-05-20 08:47:21 +12:00
Tim Hunt 969c26def0 MDL-44449 quiz access rules should have a delete hook.
So they can clean up their settings when the quiz is deleted.

See
https://github.com/moodleou/moodle-quizaccess_honestycheck/commit/babf149c2cc6dd734c272cd332b2032cc19db7d8
for an example of using this.
2014-05-19 16:59:21 +01:00
Damyon Wiese cbaad47bf2 Merge branch 'MDL-45472-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-05-19 20:47:49 +08:00
Damyon Wiese 9ccd8759ea Merge branch 'MDL-43833_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-05-19 20:12:20 +08:00
Damyon Wiese 5b26aca437 Merge branch 'MDL-45527-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-19 20:07:00 +08:00
Damyon Wiese 2e0b5708f1 Merge branch 'MDL-45455_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-05-19 19:57:57 +08:00
Dan Poltawski ce400f61e6 Merge branch 'MDL-45432-MOODLE_26_STABLE' of https://github.com/lucisgit/moodle into MOODLE_26_STABLE 2014-05-19 18:43:17 +08:00
Michael Aherne 8257e19b7a MDL-43669 messaging Enable sending email only from no-reply address 2014-05-19 09:52:23 +01:00
Marina Glancy 8e73bb6328 MDL-45371 behat: Tests for block glossary_random 2014-05-19 15:20:10 +08:00
Dan Poltawski 2fa8db79cc Merge branch 'MDL-41109-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-05-19 15:07:53 +08:00
Dan Poltawski 1ad0beaf4f Merge branch 'wip-MDL-34914-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-05-19 14:59:36 +08:00
Damyon Wiese 60802ff32e Merge branch 'MDL-32543-26' of https://github.com/danielneis/moodle into MOODLE_26_STABLE 2014-05-19 12:55:31 +08:00
Damyon Wiese b29da693b6 Merge branch 'MDL-23566_26' of https://github.com/aolley/moodle into MOODLE_26_STABLE 2014-05-19 12:43:45 +08:00
Marina Glancy 709f70145f Merge branch 'wip-MDL-45483-MOODLE_26_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_26_STABLE 2014-05-19 12:38:47 +08:00
Damyon Wiese 9d14dcd64e Merge branch 'MDL-44634-26' of https://github.com/dbezborodovrp/moodle into MOODLE_26_STABLE 2014-05-19 12:20:38 +08:00
Frederic Massart da14c5dff1 MDL-45527 cron: Already deleted unconfirmed users are ignored 2014-05-19 12:06:49 +08:00
Damyon Wiese d38ef5cfe0 Merge branch '43995-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-05-19 11:53:34 +08:00
Sam Hemelryk e6e58c7a92 MDL-38923 theme_bootstrapbase: pre-integration fixups
* Fixed the way we added the block class to the dock panel in dock.js
* Added a class to the h2 that is used to test dock title width
* Fixed RTL alignment issues as best I could at present
* Fixed overlap of dock + navbar on small screens
* Fixed the docked block width to be constrained to the available space
* Fixed hidden actions on docked blocks

Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-19 15:28:00 +12:00
Damyon Wiese eba90af0d3 MDL-45605 Phpunit: Do not call gc_collect_cycles as part of reset.
This takes 25% of the time in running tests and there is no benefit. The
behaviour of destructors is the same before/after the patch.
2014-05-19 10:38:39 +08:00
Sam Hemelryk 14f40dcc9c Merge branch 'MDL-45561-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-19 13:37:19 +12:00
Sam Hemelryk 8758f4464f MDL-44974 admin: repositioned call to initialise renderer 2014-05-19 08:41:23 +12:00
Sam Hemelryk 9fb8de4cd1 MDL-44711 navigation: better handling of course expansion exception 2014-05-19 08:41:08 +12:00
Sam Hemelryk 0720ecb621 MDL-38923 dock: allowed for space before first time 2014-05-19 08:40:16 +12:00
Sam Hemelryk 6ae3b201cc MDL-38923 theme_bootstrapbase: tidied up dock implementation
Also:
* Changed to a CSS based compacting solution
* Converted dock colours to variables
* RTL fixes for the dock
2014-05-19 08:40:16 +12:00
Bas Brands 056b54ff63 MDL-38923 theme bootstrapbase: theme clean: enable docking 2014-05-19 08:40:13 +12:00
Eric Merrill 6a7348df5c MDL-45603 cache Fix the mappingsonly option to work as advertised. 2014-05-17 23:55:10 -04:00
Tim Hunt fc36e18fb1 MDL-44333 quiz reports: use consitent name for user pref
The Marks for each question setting was not being saved properly as a
user preference.
2014-05-17 15:10:55 +01:00
Marina Glancy 3febb9e672 MDL-34914 cohorts: more understandable filter of user list by cohort 2014-05-16 17:17:36 +08:00
Andrew Nicols ed065ceb93 MDL-41109 dndupload: Add missing error string 2014-05-16 13:50:19 +08:00
Dan Marsden 26143abeaf MDL-45583 badges: check parent contexts consistantly when checking required role. 2014-05-16 13:54:05 +12:00
Tim Hunt 9b3b40c1ab MDL-45455 quiz cron must rollback transaction on error. 2014-05-15 15:08:12 +01:00
Tim Hunt b7acb1f0e8 MDL-43833 quiz reports: persist states settings between pages. 2014-05-15 15:07:38 +01:00
Jetha Chan c7f36a87b3 MDL-45561 themes: horizontal scroll in RTL base 2014-05-15 15:49:28 +08:00
Damyon Wiese ba05f573ca weekly release 2.6.3+ 2014-05-15 15:34:13 +08:00
Damyon Wiese 967fe8ef0d Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-05-15 15:34:09 +08:00
Jason Fowler 4e37becc19 MDL-42953 Themes: Fixing CSS for headers of central blocks 2014-05-15 15:27:51 +08:00
Simey Lameze 60b664a624 MDL-45323 grade: Unit test for grade_get_grade_items_for_activity() 2014-05-15 15:05:40 +08:00
Simey Lameze b52ea3664e MDL-45323 grade: Fix query errors on grade_get_grade_for_activity method. 2014-05-15 15:05:40 +08:00
Damyon Wiese 9bbe953b68 MDL-41383 Filepicker: whitespace fix 2014-05-15 13:35:33 +08:00
Jetha Chan 5389652d3c MDL-41383: RTL fix for base when zoomed out 2014-05-15 13:29:32 +08:00
Dan Poltawski 247946725c MDL-44323 admin: use correct css class for warning
The notifyproblem notification is consistent with the rest of
the warnings we report.

Conflicts:
	theme/bootstrapbase/less/moodle/admin.less
	theme/bootstrapbase/style/moodle.css
2014-05-15 12:22:04 +08:00
Damien Bezborodov 649356958e MDL-44634 Regression: link to user profile in comments block fails due to double URI encoding 2014-05-15 11:47:03 +09:30
Damien Bezborodov 19602ce718 MDL-44634 Regression: link to user profile in comments block fails due to double URI encoding 2014-05-15 10:51:39 +09:30
sam marshall d355d1f796 MDL-45535 CSS chunking breaks media rules if CSS invalid (IE)
Invalid CSS with extra } symbols, which previously (by fluke)
worked, was broken by recent chunking improvements. This change
makes the chunking code robust against this (stupid) situation.
2014-05-14 12:19:10 +01:00
sam marshall 449693fc43 MDL-45477 Behat: List of steps takes too long to load, times out
Increase time limit to 300 seconds (5 minutes).
2014-05-14 10:59:49 +01:00
Marina Glancy 2538062907 Merge branch 'MDL-36670_26' of git://github.com/jleyva/moodle into MOODLE_26_STABLE 2014-05-14 16:35:59 +08:00
Frederic Massart ada3d03f67 MDL-45546 mod_forum: Login the user before getting its context 2014-05-14 16:17:09 +08:00
Frederic Massart e505b12188 MDL-45545 csslib: Chunking handles commas in media query definitions 2014-05-14 15:27:37 +08:00
Jetha Chan 9a6a761e1c MDL-41383 theme: filepicker zoom resiliency (base)
Fixed an issue that broke the file picker on base when initial zoom level is less than 100%.
2014-05-14 14:36:01 +08:00
Juan Leyva a9d792433f MDL-36670 logging: action parameter length restricted to 40 chars 2014-05-13 16:13:56 +02:00
David Monllao fa58e13891 MDL-45192 behat: Replacing specific-selector steps by a generic one
Having a I click on we can use all our selectors rather
than having multiple steps for the same purpose. This
step allow us to manage JS native dialogues without
having to fail a scenario.

Credit for Mohamed Alsharaf.
2014-05-13 20:37:39 +07:00
Mohamed Alsharaf 015f49d0d3 MDL-45192 assign: added behat script & new definitions to handle alert dialog
The behat script is to test the batch action to lock and unlock submissions.
The new definitions are to prevent the "unexpected alert open" error in Selenium.
2014-05-13 20:37:38 +07:00
Dan Poltawski 70dce3f450 MDL-44027 groups: remove some junk html 2014-05-13 16:19:53 +08:00
Damyon Wiese 3d5413d89a Merge branch 'MDL-41383-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-13 15:56:12 +08:00
Jetha Chan 2c638ccb24 MDL-45525 themes: minor forum improvements
Fixed an RTL style that wasn't kicking in properly.
2014-05-13 14:35:20 +08:00
Dan Poltawski 5016d9f4b7 MDL-37838 block_courseoverview: fix pluaralisation logic
Note that this kind of handling of plurals is extremely limited, see:

https://moodle.org/mod/forum/discuss.php?d=85897
http://search.cpan.org/~petdance/Locale-Maketext-1.12/lib/Locale/Maketext/TPJ13.pod

However, this is a simple fix to the existing logic
2014-05-13 14:18:38 +08:00
Jetha Chan 9814a667ba MDL-41383 theme: filepicker zoom resiliency
Fixed an issue that broke the file picker on bootstrapbase when zooming in and out.
2014-05-13 14:12:13 +08:00
Adrian Greeve 5be375c379 MDL-45512 comments: Added full date to comment details. 2014-05-13 10:43:46 +08:00
Daniel Neis Araujo c5d0fcbf1f MDL-32543 (backport) Make sure the action and url fields of log table have correct sizes 2014-05-12 12:21:49 -03:00
Daniel Neis Araujo 3414e35610 Merge remote-tracking branch 'moodle/MOODLE_26_STABLE' into MOODLE_26_STABLE 2014-05-12 12:18:51 -03:00
Dan Poltawski c16cb40555 MDL-45135 mod_glossary: fix RTL alignment of table
Tablelib has a specific 'hook' to allow alignment to be corrected for
RTL languages, but needs to be specified direction in lowercase.
2014-05-12 17:09:43 +08:00
Frederic Massart 33c4973c67 MDL-45380 theme_bootstrapbase: Restore config override highlight
Conflicts:

	theme/bootstrapbase/less/moodle/admin.less
	theme/bootstrapbase/style/moodle.css
2014-05-12 15:52:43 +08:00
Michael Aherne 72fcbcd444 MDL-45496 core Added space to logged in as line 2014-05-12 08:51:06 +01:00
Rajesh Taneja 167136718e MDL-45514 behat: Fixed should_not_exist timout param 2014-05-12 14:14:35 +08:00
Kevin Wiliarty 7d80ee4455 MDL-45483 mod_forum: corrects values for maxattachments in forum settings 2014-05-12 00:00:18 -04:00
AMOS bot 49b427eda0 Automatically generated installer lang files 2014-05-12 00:39:49 +00:00
AMOS bot 5fe214d9d8 Automatically generated installer lang files 2014-05-11 00:47:52 +00:00
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
sam marshall f6d6df37b6 MDL-45469 Conditional availability: Restrict by text area broken
It has never worked, because the data for text area fields is not
loaded into the $USER object.

Changing it so that the dropdown list does not include these types
of field. (This 2.6 version of change is similar to the 2.7 code
but in a different location and without unit test.)
2014-05-08 14:04:35 +01: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
Andrew Nicols c8097f88a5 MDL-45472 AJAX: Whitelist prototype values form JS Error in exception dialogue 2014-05-08 16:45:59 +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
Tony Butler cbeee0a46e MDL-45432 mod_assign Declare character encoding in onlinetext export
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-05-07 13:12:26 +01: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
Adam Olley 2be96ee2d1 MDL-23566 mod_lesson: Float answers so paragraphs line up correctly next to the inputs 2014-05-07 15:45:55 +09:30
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
Daniel Neis Araujo a661cc9113 MDL-45245 html_writer::select_time does not respect 5th parameter "attributes" 2014-04-23 14:56:40 -03: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
Mark Nielsen 9b9226fc98 MDL-44014 Navigation: Set the correct context when retrieved via AJAX 2014-02-10 11:45:44 +08: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
31268 changed files with 1030796 additions and 3534987 deletions
-249
View File
@@ -1,249 +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
}
}
]
}
-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"]
}
-6
View File
@@ -1,6 +0,0 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
**.js.map -diff
**-min.js -diff
**.min.js -diff
-2
View File
@@ -1,2 +0,0 @@
# Primary donations pages.
custom: ["https://moodle.com/donations/", "https://fund.moodle.org"]
-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.
-71
View File
@@ -1,71 +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 | E_STRICT); // 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_';
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")
# 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: 13
postgresql db: test
postgresql user: test
postgresql password: test
- name: Setting up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
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 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
-124
View File
@@ -1,124 +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.3
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
strategy:
fail-fast: false
matrix:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-24.04
php: 8.1
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-24.04
php: 8.3
db: pgsql
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: moodlehq/mysql-action@v1
with:
collation server: utf8mb4_bin
mysql version: 8.0
mysql database: test
mysql user: test
mysql password: test
use tmpfs: true
tmpfs size: '1024M'
extra conf: --skip-log-bin
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 13
postgresql db: test
postgresql user: test
postgresql password: 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: 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 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 }}
-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.1, 8.3]
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.3
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.3
# 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.1
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: 8.0
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-64 --version 3.0.503 --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 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 }}
+5 -30
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,25 +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
/lib/yuilib/*/build/*/*-coverage.js
# lib/yuilib/version/module/module-coverage.js
/lib/yuilib/*/*/*-coverage.js
atlassian-ide-plugin.xml
/node_modules/
/.vscode/
moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
/admin/tool/componentlibrary/docs
/admin/tool/componentlibrary/hugo/site/data/my-index.json
.hugo_build.lock
phpcs.xml
jsconfig.json
-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);
}
}
}
};
};
-394
View File
@@ -1,394 +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 = [];
// Fetch the component definiitions from the distributed JSON file.
const components = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/components.json`));
// Build the list of moodle subsystems.
componentData.subsystems.lib = 'core';
componentData.pathList.push(process.cwd() + path.sep + '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() + path.sep + thisPath);
}
}
// The list of components incldues the list of subsystems.
componentData.components = componentData.subsystems;
// 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)));
Object.entries(subpluginList.plugintypes).forEach(([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);
});
});
}
});
});
}
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');
return fetchComponentData().pathList
.map(componentPath => path.relative(relativeTo, componentPath) + '/thirdpartylibs.xml')
.map(componentPath => componentPath.replace(/\\/g, '/'))
.filter(path => fs.existsSync(path))
.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 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,
};
-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: "./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,
},
};
-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 => `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(),
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,
};
};
-64
View File
@@ -1,64 +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},
},
});
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;
};
-100
View File
@@ -1,100 +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");
};
/**
* 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();
// 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);
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
// Generate .stylelintignore.
const stylelintIgnores = [
'# Generated by "grunt ignorefiles"',
'**/yui/build/*',
'theme/boost/style/moodle.css',
'theme/classic/style/moodle.css',
'jsdoc/styles/*.css',
'admin/tool/componentlibrary/hugo/dist/css/docs.css',
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
phpcsIgnore(thirdPartyPaths);
};
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', handler);
return handler;
};
-215
View File
@@ -1,215 +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 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']);
// 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,
};
};
-53
View File
@@ -1,53 +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 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: [],
};
module.exports = (grunt) => {
const handler = () => {
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.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();
});
});
};
-40
View File
@@ -1,40 +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: {
"theme/boost/style/moodle.css": "theme/boost/scss/preset/default.scss",
"theme/classic/style/moodle.css": "theme/classic/scss/classicgrunt.scss"
}
},
options: {
implementation: require('sass'),
includePaths: ["theme/boost/scss/", "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;
};
-46
View File
@@ -1,46 +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');
} 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();
});
};
-272
View File
@@ -1,272 +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.
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: [task, filesOption]
},
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;
};
-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": {
}
}
]
}
-52
View File
@@ -1,52 +0,0 @@
# Contributing to Moodle
[Moodle][1] is made by people like you. We are members of a big worldwide community of developers, designers, teachers, testers, translators and many more. We work in universities, schools, companies and other places. You are very welcome to join us and contribute to the project.
There are many ways that you can contribute to Moodle, not just through development. See our [community contribution guide][2] for some of the many ways that you can help.
## Github
> [!NOTE]
> Please do not open pull requests via Github.
All issues should be reported via, and patched provided to the [Moodle Tracker][3].
The Moodle [Github][4] repository is a clone of the official Moodle repository, whcih can be found at https://git.moodle.org.
## Moodle core bug fixes and new features
Over the years, Moodle has developed a mature process for reporting, reviewing, and accepting patches. This is fully documented in our [documentation on development processes][6], but in summary:
- Every bug fix or new feature must have a tracker issue.
- You publish the branch implementing the fix or new feature in your public clone of the moodle.git repository (typically on Github).
- Your patch is peer-reviewed, discussed, integrated, tested and then released as a part of one of our weekly releases.
- New features are developed on the `main` branch. Bug fixes are also backported to currently supported maintenance (stable) branches.
> [!IMPORTANT]
> Please do not publish security issues, or patches releating to them publicly.
> See our [Responsible Disclosure Policy][5] for more information.
## Moodle plugins
Moodle has a framework for additional plugins to extend its functionality. We
have a Moodle plugins directory <https://moodle.org/plugins/> where you can
register and maintain your plugin. Plugins hosted in the plugins directory can
be easily installed and updated via the Moodle administration interface.
* You are expected to have a public source code repository with your plugin
code.
* After registering your plugin in the plugins directory it is reviewed before
being published.
* You are expected to continuously release updated versions of the plugin via
the plugins directory. We do not pull from your code repository; you must do
it explicitly.
For further details, see <https://moodledev.io/general/community/plugincontribution>.
[1]: https://moodle.org
[2]: https://moodledev.io/general/community/contribute
[3]: https://tracker.moodle.org
[4]: https://github.com/moodle/moodle
[5]: https://moodledev.io/general/development/process/security
[6]: https://moodledev.io/general/development/process
-267
View File
@@ -1,267 +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 */
/**
* Grunt configuration for Moodle.
*
* @copyright 2014 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Setup the Grunt Moodle environment.
*
* @param {Grunt} grunt
* @returns {Object}
*/
const setupMoodleEnvironment = grunt => {
const fs = require('fs');
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
const getAmdConfiguration = () => {
// If the cwd is the amd directory in the current component then it will be empty.
// If the cwd is a child of the component's AMD directory, the relative directory will not start with ..
let inAMD = !path.relative(`${componentDirectory}/amd`, cwd).startsWith('..');
// Globbing pattern for matching all AMD JS source files.
let amdSrc = [];
if (inComponent) {
amdSrc.push(
componentDirectory + "/amd/src/*.js",
componentDirectory + "/amd/src/**/*.js"
);
} else {
amdSrc = ComponentList.getAmdSrcGlobList();
}
return {
inAMD,
amdSrc,
};
};
const getYuiConfiguration = () => {
let yuiSrc = [];
if (inComponent) {
yuiSrc.push(componentDirectory + "/yui/src/**/*.js");
} else {
yuiSrc = ComponentList.getYuiSrcGlobList(gruntFilePath + '/');
}
return {
yuiSrc,
};
};
const getStyleConfiguration = () => {
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// Build the cssSrc and scssSrc.
// Valid paths are:
// [component]/styles.css; and either
// [theme/[themename]]/scss/**/*.scss; or
// [theme/[themename]]/style/*.css.
//
// If a theme has scss, then it is assumed that the style directory contains generated content.
let cssSrc = [];
let scssSrc = [];
const checkComponentDirectory = componentDirectory => {
const isTheme = componentDirectory.startsWith('theme/');
if (isTheme) {
const scssDirectory = `${componentDirectory}/scss`;
if (fs.existsSync(scssDirectory)) {
// This theme has an SCSS directory.
// Include all scss files within it recursively, but do not check for css files.
scssSrc.push(`${scssDirectory}/*.scss`);
scssSrc.push(`${scssDirectory}/**/*.scss`);
} else {
// This theme has no SCSS directory.
// Only hte CSS files in the top-level directory are checked.
cssSrc.push(`${componentDirectory}/style/*.css`);
}
} else {
// This is not a theme.
// All other plugin types are restricted to a single styles.css in their top level.
cssSrc.push(`${componentDirectory}/styles.css`);
}
};
if (inComponent) {
checkComponentDirectory(componentDirectory);
} else {
ComponentList.getComponentPaths(`${gruntFilePath}/`).forEach(componentPath => {
checkComponentDirectory(componentPath);
});
}
return {
cssSrc,
scssSrc,
};
};
/**
* Calculate the cwd, taking into consideration the `root` option (for Windows).
*
* @param {Object} grunt
* @returns {String} The current directory as best we can determine
*/
const getCwd = grunt => {
let cwd = fs.realpathSync(process.env.PWD || process.cwd());
// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
if (grunt.option('root')) {
const root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = fs.realpathSync(path.join(__dirname, root));
grunt.log.ok('Setting root to ' + cwd);
} else {
grunt.fail.fatal('Setting root to ' + root + ' failed - path does not exist');
}
}
return cwd;
};
// Detect directories:
// * gruntFilePath The real path on disk to this Gruntfile.js
// * cwd The current working directory, which can be overridden by the `root` option
// * relativeCwd The cwd, relative to the Gruntfile.js
// * componentDirectory The root directory of the component if the cwd is in a valid component
// * inComponent Whether the cwd is in a valid component
// * runDir The componentDirectory or cwd if not in a component, relative to Gruntfile.js
// * fullRunDir The full path to the runDir
const gruntFilePath = fs.realpathSync(process.cwd());
const cwd = getCwd(grunt);
const relativeCwd = path.relative(gruntFilePath, cwd);
const componentDirectory = ComponentList.getOwningComponentDirectory(relativeCwd);
const inComponent = !!componentDirectory;
const inTheme = !!componentDirectory && componentDirectory.startsWith('theme/');
const runDir = inComponent ? componentDirectory : relativeCwd;
const fullRunDir = fs.realpathSync(gruntFilePath + path.sep + runDir);
const {inAMD, amdSrc} = getAmdConfiguration();
const {yuiSrc} = getYuiConfiguration();
const {cssSrc, scssSrc} = getStyleConfiguration();
let files = null;
if (grunt.option('files')) {
// Accept a comma separated list of files to process.
files = grunt.option('files').split(',');
}
grunt.log.debug('============================================================================');
grunt.log.debug(`= Node version: ${process.versions.node}`);
grunt.log.debug(`= grunt version: ${grunt.package.version}`);
grunt.log.debug(`= process.cwd: '` + process.cwd() + `'`);
grunt.log.debug(`= process.env.PWD: '${process.env.PWD}'`);
grunt.log.debug(`= path.sep '${path.sep}'`);
grunt.log.debug('============================================================================');
grunt.log.debug(`= gruntFilePath: '${gruntFilePath}'`);
grunt.log.debug(`= relativeCwd: '${relativeCwd}'`);
grunt.log.debug(`= componentDirectory: '${componentDirectory}'`);
grunt.log.debug(`= inComponent: '${inComponent}'`);
grunt.log.debug(`= runDir: '${runDir}'`);
grunt.log.debug(`= fullRunDir: '${fullRunDir}'`);
grunt.log.debug('============================================================================');
if (inComponent) {
grunt.log.ok(`Running tasks for component directory ${componentDirectory}`);
}
return {
amdSrc,
componentDirectory,
cwd,
cssSrc,
files,
fullRunDir,
gruntFilePath,
inAMD,
inComponent,
inTheme,
relativeCwd,
runDir,
scssSrc,
yuiSrc,
};
};
/**
* Verify tha tthe current NodeJS version matches the required version in package.json.
*
* @param {Grunt} grunt
*/
const verifyNodeVersion = grunt => {
const semver = require('semver');
// Verify the node version is new enough.
var expected = semver.validRange(grunt.file.readJSON('package.json').engines.node);
var actual = semver.valid(process.version);
if (!semver.satisfies(actual, expected)) {
grunt.fail.fatal('Node version not satisfied. Require ' + expected + ', version installed: ' + actual);
}
};
/**
* Grunt configuration.
*
* @param {Grunt} grunt
*/
module.exports = function(grunt) {
// Verify that the Node version meets our requirements.
verifyNodeVersion(grunt);
// Setup the Moodle environemnt within the Grunt object.
grunt.moodleEnv = setupMoodleEnvironment(grunt);
/**
* Add the named task.
*
* @param {string} name
* @param {Grunt} grunt
*/
const addTask = (name, grunt) => {
const path = require('path');
const taskPath = path.resolve(`./.grunt/tasks/${name}.js`);
grunt.log.debug(`Including tasks for ${name} from ${taskPath}`);
require(path.resolve(`./.grunt/tasks/${name}.js`))(grunt);
};
// Startup tasks.
grunt.moodleEnv.startupTasks = [];
// Add Moodle task configuration.
addTask('gherkinlint', grunt);
addTask('ignorefiles', grunt);
addTask('javascript', grunt);
addTask('style', grunt);
addTask('componentlibrary', grunt);
addTask('watch', grunt);
addTask('startup', grunt);
addTask('upgradablelibs', grunt);
// Register the default task.
grunt.registerTask('default', ['startup']);
};
-20
View File
@@ -1,20 +0,0 @@
MOODLE INSTALLATION
===================
Here is a short summary of the installation process (which can take just a few
minutes):
1. Move the Moodle files into your web directory.
2. Create a single database for Moodle to store all its tables in (or choose an
existing database).
3. Visit your Moodle site with a browser. You should be taken to the
install.php script, which will lead you through creating a config.php file
and then setting up Moodle, creating an admin account etc.
4. Set up a cron task to call the file admin/cron.php every minute.
For more information, see <https://docs.moodle.org/en/Installing_Moodle>.
Good luck and have fun!
-48
View File
@@ -1,48 +0,0 @@
# Moodle
<p align="center"><a href="https://moodle.org" target="_blank" title="Moodle Website">
<img src="https://raw.githubusercontent.com/moodle/moodle/main/.github/moodlelogo.svg" alt="The Moodle Logo">
</a></p>
[Moodle][1] is the World's Open Source Learning Platform, widely used around the world by countless universities, schools, companies, and all manner of organisations and individuals.
Moodle is designed to allow educators, administrators and learners to create personalised learning environments with a single robust, secure and integrated system.
## Documentation
- Read our [User documentation][3]
- Discover our [developer documentation][5]
- Take a look at our [demo site][4]
## Community
[moodle.org][1] is the central hub for the Moodle Community, with spaces for educators, administrators and developers to meet and work together.
You may also be interested in:
- attending a [Moodle Moot][6]
- our regular series of [developer meetings][7]
- the [Moodle User Association][8]
## Installation and hosting
Moodle is Free, and Open Source software. You can easily [download Moodle][9] and run it on your own web server, however you may prefer to work with one of our experienced [Moodle Partners][10].
Moodle also offers hosting through both [MoodleCloud][11], and our [partner network][10].
## License
Moodle is provided freely as open source software, under version 3 of the GNU General Public License. For more information on our license see
[1]: https://moodle.org
[2]: https://moodle.com
[3]: https://docs.moodle.org/
[4]: https://sandbox.moodledemo.net/
[5]: https://moodledev.io
[6]: https://moodle.com/events/mootglobal/
[7]: https://moodledev.io/general/community/meetings
[8]: https://moodleassociation.org/
[9]: https://download.moodle.org
[10]: https://moodle.com/partners
[11]: https://moodle.com/cloud
[12]: https://moodledev.io/general/license
+29
View File
@@ -0,0 +1,29 @@
QUICK INSTALL
=============
For the impatient, here is a basic outline of the
installation process, which normally takes me only
a few minutes:
1) Move the Moodle files into your web directory.
2) Create a single database for Moodle to store all
its tables in (or choose an existing database).
3) Visit your Moodle site with a browser, you should
be taken to the install.php script, which will lead
you through creating a config.php file and then
setting up Moodle, creating an admin account etc.
4) Set up a cron task to call the file admin/cron.php
every five minutes or so.
For more information, see the INSTALL DOCUMENTATION:
http://docs.moodle.org/en/Installing_Moodle
Good luck and have fun!
Martin Dougiamas, Lead Developer
+28 -60
View File
@@ -1,66 +1,34 @@
MOODLE TRADEMARKS POLICY
========================
The Moodle Trademark
--------------------
The brand and word "Moodle" has trade mark protection in many countries around
the world. Various Moodle™ trade marks are owned by either Moodle Pty Ltd or
one of its associated entities. The law obligates trade mark owners to police
their trade marks and prevent the use of confusingly similar names by
third parties.
We have created a more concise and thorough set of Trademark Guidelines
(https://moodle.com/wp-content/uploads/2023/02/Moodle-Trademark-Guidelines-2023-4.pdf)
to help you understand how to comply with Moodle's trade mark requirements.
The Trademark Guidelines will also assist our Moodle Certified Partners and the
community to understand some of the principles that inform Moodle's stance
whenever potential infringement has been detected by us or our community.
We need to be clear about use of the word "Moodle" and how we restrict its use
when promoting commercial Moodle™ branded services. The proper use of
trade marks reliably assures consumers about the quality of the associated
products or services and where they have been derived from. Because the
Moodle LMS is made available under the open source GNU General Public License'
that permits you to modify the copyrighted software, the distribution of such
modified software in combination with Moodle trade marks can potentially
mislead others in the community. To be clear, the GNU GPL does not include an
implied right or licence to use Moodle's trade marks.
We do all this to protect the very business model that allows us to continue
developing various Moodle software solutions for you.
Allowed uses of "Moodle"
------------------------
Moodle Trademark License
------------------------
The following uses don't require any permission at all:
The name Moodle™ is a registered trademark of the Moodle Trust.
* Referring to the software or the Moodle project as the "Moodle™ software"
or the "Moodle™ project"
* Describing your own implementation of the Moodle™ software platform
(including within corporate settings).
* Describing a Moodle-based community hub.
* Describing certain software you've made that integrates with Moodle™
branded software (e.g. a Moodle™ integration feature on another system).
A key part of the business model that allows us to produce and
distribute Moodle as completely Free open source software is that
we restrict the commercial use of the Moodle trademark to those
who have contracted to support Moodle development (Moodle Partners).
Restricted uses of "Moodle"
---------------------------
If you are intending to use the name (and/or logo) to advertise
generic Moodle™ services (eg Moodle Hosting, Moodle Support,
Moodle Certification, Moodle Training, Moodle Consulting,
Moodle Customisation, Moodle Courseware Development, Moodle
Theme design, Moodle Integrations, Moodle Installations, etc)
or as the name of a software package, then you must seek
direct permission in writing from the Moodle Trust via the
moodle.com helpdesk, in accordance with normal trademark
restrictions.
The following uses are generally prohibited without explicit and direct
permission being granted to you by Moodle Pty Ltd. We do this to protect the
Moodle™ project from software and sites which could confuse people. If in
doubt, reach out for clarification at <trademarks@moodle.com>
There are no restrictions on how you use the name in other
contexts (for example, if you use Moodle just to provide
courses then you can use the name freely to refer to it.)
* You can't use the word "Moodle" or any Moodle logos for commercial purposes
without prior written permission from Moodle HQ.
* You can't use "Moodle" in the name of your software (including Mobile apps).
* You can't use "Moodle" in your company name.
* You can't use "Moodle" in your domain name.
* You can't use "Moodle" in advertising-related keywords (such as Adsense).
* You can't use "Moodle" to describe services around Moodle
(such as hosting, training, support, consulting, course creation services,
theme development, customisation, installation, integration, analytics
and certification) that cause consumers to be confused that you are
associated with Moodle HQ if you are not.
This applies even if you do not charge for the services.
Note that usually only Moodle Partners have this permission.
If you aren't sure of a particular case, please ask us via
http://moodle.com/helpdesk: we'll be happy to either provide
you with official permission in writing or help you fix
your wording.
Martin Dougiamas
Executive Director
Moodle Trust
http://moodle.com
-3
View File
@@ -1,3 +0,0 @@
define("core_admin/block_management_table",["exports","./plugin_management_table","core_table/dynamic","core/ajax","core/pending","core/notification"],(function(_exports,_plugin_management_table,_dynamic,_ajax,_pending,_notification){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_plugin_management_table=_interopRequireDefault(_plugin_management_table),_pending=_interopRequireDefault(_pending);class _default extends _plugin_management_table.default{constructor(){super(),this.addClickHandler(this.handleBlockProtectToggle)}setBlockProtectState(plugin,state){return(0,_ajax.call)([{methodname:"core_admin_set_block_protection",args:{plugin:plugin,state:state}}])[0]}async handleBlockProtectToggle(tableRoot,e){const stateToggle=e.target.closest('[data-action="toggleprotectstate"]');if(stateToggle){e.preventDefault();const pendingPromise=new _pending.default("core_table/dynamic:processAction");await this.setBlockProtectState(stateToggle.dataset.plugin,"1"===stateToggle.dataset.targetState?1:0);const[updatedRoot]=await Promise.all([(0,_dynamic.refreshTableContent)(tableRoot),(0,_notification.fetchNotifications)()]);updatedRoot.querySelector('[data-action="toggleprotectstate"][data-plugin="'.concat(stateToggle.dataset.plugin,'"]')).focus(),pendingPromise.resolve()}}}return _exports.default=_default,_exports.default}));
//# sourceMappingURL=block_management_table.min.js.map
@@ -1 +0,0 @@
{"version":3,"file":"block_management_table.min.js","sources":["../src/block_management_table.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\nimport PluginManagementTable from './plugin_management_table';\nimport {refreshTableContent} from 'core_table/dynamic';\nimport {call as fetchMany} from 'core/ajax';\nimport Pending from 'core/pending';\nimport {fetchNotifications} from 'core/notification';\n\nexport default class extends PluginManagementTable {\n constructor() {\n super();\n this.addClickHandler(this.handleBlockProtectToggle);\n }\n\n /**\n * Set the block protection state.\n *\n * @param {string} plugin\n * @param {number} state\n * @returns {Promise}\n */\n setBlockProtectState(plugin, state) {\n return fetchMany([{\n methodname: 'core_admin_set_block_protection',\n args: {\n plugin,\n state,\n },\n }])[0];\n }\n\n /**\n * Handle toggling of block protection.\n *\n * @param {HTMLElement} tableRoot\n * @param {Event} e\n */\n async handleBlockProtectToggle(tableRoot, e) {\n const stateToggle = e.target.closest('[data-action=\"toggleprotectstate\"]');\n if (stateToggle) {\n e.preventDefault();\n const pendingPromise = new Pending('core_table/dynamic:processAction');\n\n await this.setBlockProtectState(\n stateToggle.dataset.plugin,\n stateToggle.dataset.targetState === '1' ? 1 : 0\n );\n\n const [updatedRoot] = await Promise.all([\n refreshTableContent(tableRoot),\n fetchNotifications(),\n ]);\n\n // Refocus on the link that as pressed in the first place.\n updatedRoot.querySelector(`[data-action=\"toggleprotectstate\"][data-plugin=\"${stateToggle.dataset.plugin}\"]`).focus();\n pendingPromise.resolve();\n }\n }\n}\n"],"names":["PluginManagementTable","constructor","addClickHandler","this","handleBlockProtectToggle","setBlockProtectState","plugin","state","methodname","args","tableRoot","e","stateToggle","target","closest","preventDefault","pendingPromise","Pending","dataset","targetState","updatedRoot","Promise","all","querySelector","focus","resolve"],"mappings":"uhBAqB6BA,iCACzBC,2BAESC,gBAAgBC,KAAKC,0BAU9BC,qBAAqBC,OAAQC,cAClB,cAAU,CAAC,CACdC,WAAY,kCACZC,KAAM,CACFH,OAAAA,OACAC,MAAAA,UAEJ,kCASuBG,UAAWC,SAChCC,YAAcD,EAAEE,OAAOC,QAAQ,yCACjCF,YAAa,CACbD,EAAEI,uBACIC,eAAiB,IAAIC,iBAAQ,0CAE7Bd,KAAKE,qBACPO,YAAYM,QAAQZ,OACgB,MAApCM,YAAYM,QAAQC,YAAsB,EAAI,SAG3CC,mBAAqBC,QAAQC,IAAI,EACpC,gCAAoBZ,YACpB,wCAIJU,YAAYG,wEAAiEX,YAAYM,QAAQZ,cAAYkB,QAC7GR,eAAeS"}
-10
View File
@@ -1,10 +0,0 @@
define("core_admin/bulk_user_actions",["exports","core_reportbuilder/local/selectors","core_table/local/dynamic/events","core_form/changechecker","core/custom_interaction_events","jquery"],(function(_exports,reportSelectors,tableEvents,FormChangeChecker,CustomEvents,_jquery){var obj;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}
/**
* Add bulk actions to the users list report
*
* @module core_admin/bulk_user_actions
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,reportSelectors=_interopRequireWildcard(reportSelectors),tableEvents=_interopRequireWildcard(tableEvents),FormChangeChecker=_interopRequireWildcard(FormChangeChecker),CustomEvents=_interopRequireWildcard(CustomEvents),_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj};const Selectors_bulkActionsForm="form#user-bulk-action-form",Selectors_userReportWrapper='[data-region="report-user-list-wrapper"]',Selectors_checkbox='input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="slave"]',Selectors_masterCheckbox='input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="master"]',Selectors_checkedRows='[data-togglegroup="report-select-all"][data-toggle="slave"]:checked';_exports.init=()=>{var _userBulkForm$closest;const userBulkForm=document.querySelector(Selectors_bulkActionsForm),userReport=null==userBulkForm||null===(_userBulkForm$closest=userBulkForm.closest(Selectors_userReportWrapper))||void 0===_userBulkForm$closest?void 0:_userBulkForm$closest.querySelector(reportSelectors.regions.report);if(!userBulkForm||!userReport)return;const actionSelect=userBulkForm.querySelector("select");CustomEvents.define(actionSelect,[CustomEvents.events.accessibleChange]),(0,_jquery.default)(actionSelect).on(CustomEvents.events.accessibleChange,(event=>{if(event.target.value&&"0"!=="".concat(event.target.value)){const e=new Event("submit",{cancelable:!0});userBulkForm.dispatchEvent(e),e.defaultPrevented||(FormChangeChecker.markFormSubmitted(userBulkForm),userBulkForm.submit())}}));const updateUserIds=()=>{const selectedUsers=[...userReport.querySelectorAll(Selectors_checkedRows)],selectedUserIds=selectedUsers.map((check=>parseInt(check.value)));userBulkForm.querySelector('[name="userids"]').value=selectedUserIds.join(","),actionSelect.disabled=0===selectedUsers.length,actionSelect.disabled&&(actionSelect.value="0");const selectedUsersNames=selectedUsers.map((check=>document.querySelector('label[for="'.concat(check.id,'"]')).textContent));userBulkForm.data={userids:selectedUserIds,usernames:selectedUsersNames}};updateUserIds(),document.addEventListener("change",(event=>{(event.target.matches(Selectors_checkbox)||event.target.matches(Selectors_masterCheckbox))&&userReport.contains(event.target)&&updateUserIds()})),document.addEventListener(tableEvents.tableContentRefreshed,(event=>{userReport.contains(event.target)&&updateUserIds()}))}}));
//# sourceMappingURL=bulk_user_actions.min.js.map
File diff suppressed because one or more lines are too long
-3
View File
@@ -1,3 +0,0 @@
define("core_admin/plugin_management_table",["exports","core_table/dynamic","core_table/local/dynamic/selectors","core/ajax","core/pending","core/notification"],(function(_exports,_dynamic,Selectors,_ajax,_pending,_notification){var obj;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Selectors=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(Selectors),_pending=(obj=_pending)&&obj.__esModule?obj:{default:obj};let watching=!1;return _exports.default=class{constructor(){!function(obj,key,value){key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value}(this,"clickHandlers",[]),this.addClickHandler(this.handleStateToggle),this.addClickHandler(this.handleMoveUpDown),this.registerEventListeners()}static init(){watching||(watching=!0,new this)}addClickHandler(handler){this.clickHandlers.push(handler.bind(this))}registerEventListeners(){document.addEventListener("click",function(e){const tableRoot=this.getTableRoot(e);tableRoot&&this.clickHandlers.forEach((handler=>handler(tableRoot,e)))}.bind(this))}getTableRoot(e){const tableRoot=e.target.closest(Selectors.main.region);return tableRoot||!1}setPluginState(methodname,plugin,state){return(0,_ajax.call)([{methodname:methodname,args:{plugin:plugin,state:state}}])[0]}setPluginOrder(methodname,plugin,direction){return(0,_ajax.call)([{methodname:methodname,args:{plugin:plugin,direction:direction}}])[0]}async handleStateToggle(tableRoot,e){const stateToggle=e.target.closest('[data-action="togglestate"][data-toggle-method]');if(stateToggle){e.preventDefault();const pendingPromise=new _pending.default("core_table/dynamic:togglestate");await this.setPluginState(stateToggle.dataset.toggleMethod,stateToggle.dataset.plugin,"1"===stateToggle.dataset.state?0:1);const[updatedRoot]=await Promise.all([(0,_dynamic.refreshTableContent)(tableRoot),(0,_notification.fetchNotifications)()]);updatedRoot.querySelector('[data-action="togglestate"][data-plugin="'.concat(stateToggle.dataset.plugin,'"]')).focus(),pendingPromise.resolve()}}async handleMoveUpDown(tableRoot,e){const actionLink=e.target.closest('[data-action="move"][data-method][data-direction]');if(!actionLink)return;e.preventDefault();const pendingPromise=new _pending.default("core_table/dynamic:processAction");await this.setPluginOrder(actionLink.dataset.method,actionLink.dataset.plugin,"up"===actionLink.dataset.direction?-1:1);const[updatedRoot]=await Promise.all([(0,_dynamic.refreshTableContent)(tableRoot),(0,_notification.fetchNotifications)()]),exactMatch=updatedRoot.querySelector('[data-action="move"][data-plugin="'.concat(actionLink.dataset.plugin,'"][data-direction="').concat(actionLink.dataset.direction,'"]'));var _updatedRoot$querySel;exactMatch?exactMatch.focus():null===(_updatedRoot$querySel=updatedRoot.querySelector('[data-action="move"][data-plugin="'.concat(actionLink.dataset.plugin,'"]')))||void 0===_updatedRoot$querySel||_updatedRoot$querySel.focus();pendingPromise.resolve()}},_exports.default}));
//# sourceMappingURL=plugin_management_table.min.js.map
File diff suppressed because one or more lines are too long
-10
View File
@@ -1,10 +0,0 @@
define("core_admin/themeselector/preview_modal",["exports","core/modal_events","core/modal_cancel","core/modal_save_cancel","core/notification","core/templates","core/str"],(function(_exports,_modal_events,_modal_cancel,_modal_save_cancel,_notification,_templates,_str){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
/**
* Modal for theme previews.
*
* @module core_admin/themeselector/preview_modal
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_modal_events=_interopRequireDefault(_modal_events),_modal_cancel=_interopRequireDefault(_modal_cancel),_modal_save_cancel=_interopRequireDefault(_modal_save_cancel),_notification=_interopRequireDefault(_notification),_templates=_interopRequireDefault(_templates);const SELECTORS_THEMES_CONTAINER="themelist",SELECTORS_PREVIEW='[data-action="preview"]';_exports.init=()=>{registerListenerEvents()};const registerListenerEvents=()=>{document.addEventListener("click",(e=>{const preview=e.target.closest(SELECTORS_PREVIEW);preview&&buildModal(preview).catch(_notification.default.exception)}))},buildModal=async element=>{let description=await(0,_str.getString)("choosereadme","theme_"+element.getAttribute("data-choose"));const themesContainer=document.getElementById(SELECTORS_THEMES_CONTAINER),definedInConfig=parseInt(themesContainer.dataset.definedinconfig),data={name:element.getAttribute("data-name"),image:element.getAttribute("data-image"),description:description.replace(/<[^>]+>/g," "),current:element.getAttribute("data-current"),actionurl:element.getAttribute("data-actionurl"),choose:element.getAttribute("data-choose"),sesskey:element.getAttribute("data-sesskey"),definedinconfig:definedInConfig};let modalTemplate=_modal_save_cancel.default;(data.current||data.definedinconfig)&&(modalTemplate=_modal_cancel.default);const modal=await modalTemplate.create({title:data.name,body:_templates.default.render("core_admin/themeselector/theme_preview_modal",data),large:!0,buttons:{save:(0,_str.getString)("selecttheme","moodle"),cancel:(0,_str.getString)("closebuttontitle","moodle")},show:!0});modal.getRoot().on(_modal_events.default.save,(()=>{modal.getRoot().find("form").submit()}))}}));
//# sourceMappingURL=preview_modal.min.js.map
@@ -1 +0,0 @@
{"version":3,"file":"preview_modal.min.js","sources":["../../src/themeselector/preview_modal.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Modal for theme previews.\n *\n * @module core_admin/themeselector/preview_modal\n * @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport ModalEvents from 'core/modal_events';\nimport ModalCancel from 'core/modal_cancel';\nimport ModalSaveCancel from 'core/modal_save_cancel';\nimport Notification from 'core/notification';\nimport Templates from 'core/templates';\nimport {getString} from 'core/str';\n\nconst SELECTORS = {\n THEMES_CONTAINER: 'themelist',\n PREVIEW: '[data-action=\"preview\"]',\n};\n\n/**\n * Entrypoint of the js.\n *\n * @method init\n */\nexport const init = () => {\n registerListenerEvents();\n};\n\n/**\n * Register theme related event listeners.\n *\n * @method registerListenerEvents\n */\nconst registerListenerEvents = () => {\n document.addEventListener('click', (e) => {\n const preview = e.target.closest(SELECTORS.PREVIEW);\n if (preview) {\n buildModal(preview).catch(Notification.exception);\n }\n });\n};\n\n/**\n * Build the modal with the provided data.\n *\n * @method buildModal\n * @param {object} element\n */\nconst buildModal = async(element) => {\n\n // This string can be long. We will fetch it with JS as opposed to passing it as an attribute.\n let description = await getString('choosereadme', 'theme_' + element.getAttribute('data-choose'));\n\n const themesContainer = document.getElementById(SELECTORS.THEMES_CONTAINER);\n const definedInConfig = parseInt(themesContainer.dataset.definedinconfig);\n // Prepare data for modal.\n const data = {\n name: element.getAttribute('data-name'),\n image: element.getAttribute('data-image'),\n description: description.replace(/<[^>]+>/g, ' '), // Strip out HTML tags.\n current: element.getAttribute('data-current'),\n actionurl: element.getAttribute('data-actionurl'),\n choose: element.getAttribute('data-choose'),\n sesskey: element.getAttribute('data-sesskey'),\n definedinconfig: definedInConfig,\n };\n\n // Determine which modal template we should use.\n let modalTemplate = ModalSaveCancel;\n if (data.current || data.definedinconfig) {\n modalTemplate = ModalCancel;\n }\n\n const modal = await modalTemplate.create({\n title: data.name,\n body: Templates.render('core_admin/themeselector/theme_preview_modal', data),\n large: true,\n buttons: {\n 'save': getString('selecttheme', 'moodle'),\n 'cancel': getString('closebuttontitle', 'moodle'),\n },\n show: true,\n });\n\n modal.getRoot().on(ModalEvents.save, () => {\n modal.getRoot().find('form').submit();\n });\n};\n"],"names":["SELECTORS","registerListenerEvents","document","addEventListener","e","preview","target","closest","buildModal","catch","Notification","exception","async","description","element","getAttribute","themesContainer","getElementById","definedInConfig","parseInt","dataset","definedinconfig","data","name","image","replace","current","actionurl","choose","sesskey","modalTemplate","ModalSaveCancel","ModalCancel","modal","create","title","body","Templates","render","large","buttons","show","getRoot","on","ModalEvents","save","find","submit"],"mappings":";;;;;;;gWA8BMA,2BACgB,YADhBA,kBAEO,wCAQO,KAChBC,gCAQEA,uBAAyB,KAC3BC,SAASC,iBAAiB,SAAUC,UAC1BC,QAAUD,EAAEE,OAAOC,QAAQP,mBAC7BK,SACAG,WAAWH,SAASI,MAAMC,sBAAaC,eAW7CH,WAAaI,MAAAA,cAGXC,kBAAoB,kBAAU,eAAgB,SAAWC,QAAQC,aAAa,sBAE5EC,gBAAkBd,SAASe,eAAejB,4BAC1CkB,gBAAkBC,SAASH,gBAAgBI,QAAQC,iBAEnDC,KAAO,CACTC,KAAMT,QAAQC,aAAa,aAC3BS,MAAOV,QAAQC,aAAa,cAC5BF,YAAaA,YAAYY,QAAQ,WAAY,KAC7CC,QAASZ,QAAQC,aAAa,gBAC9BY,UAAWb,QAAQC,aAAa,kBAChCa,OAAQd,QAAQC,aAAa,eAC7Bc,QAASf,QAAQC,aAAa,gBAC9BM,gBAAiBH,qBAIjBY,cAAgBC,4BAChBT,KAAKI,SAAWJ,KAAKD,mBACrBS,cAAgBE,6BAGdC,YAAcH,cAAcI,OAAO,CACrCC,MAAOb,KAAKC,KACZa,KAAMC,mBAAUC,OAAO,+CAAgDhB,MACvEiB,OAAO,EACPC,QAAS,OACG,kBAAU,cAAe,kBACvB,kBAAU,mBAAoB,WAE5CC,MAAM,IAGVR,MAAMS,UAAUC,GAAGC,sBAAYC,MAAM,KACjCZ,MAAMS,UAAUI,KAAK,QAAQC"}
-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/>.
import PluginManagementTable from './plugin_management_table';
import {refreshTableContent} from 'core_table/dynamic';
import {call as fetchMany} from 'core/ajax';
import Pending from 'core/pending';
import {fetchNotifications} from 'core/notification';
export default class extends PluginManagementTable {
constructor() {
super();
this.addClickHandler(this.handleBlockProtectToggle);
}
/**
* Set the block protection state.
*
* @param {string} plugin
* @param {number} state
* @returns {Promise}
*/
setBlockProtectState(plugin, state) {
return fetchMany([{
methodname: 'core_admin_set_block_protection',
args: {
plugin,
state,
},
}])[0];
}
/**
* Handle toggling of block protection.
*
* @param {HTMLElement} tableRoot
* @param {Event} e
*/
async handleBlockProtectToggle(tableRoot, e) {
const stateToggle = e.target.closest('[data-action="toggleprotectstate"]');
if (stateToggle) {
e.preventDefault();
const pendingPromise = new Pending('core_table/dynamic:processAction');
await this.setBlockProtectState(
stateToggle.dataset.plugin,
stateToggle.dataset.targetState === '1' ? 1 : 0
);
const [updatedRoot] = await Promise.all([
refreshTableContent(tableRoot),
fetchNotifications(),
]);
// Refocus on the link that as pressed in the first place.
updatedRoot.querySelector(`[data-action="toggleprotectstate"][data-plugin="${stateToggle.dataset.plugin}"]`).focus();
pendingPromise.resolve();
}
}
}
-97
View File
@@ -1,97 +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/>.
/**
* Add bulk actions to the users list report
*
* @module core_admin/bulk_user_actions
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import * as reportSelectors from 'core_reportbuilder/local/selectors';
import * as tableEvents from 'core_table/local/dynamic/events';
import * as FormChangeChecker from 'core_form/changechecker';
import * as CustomEvents from 'core/custom_interaction_events';
import jQuery from 'jquery';
const Selectors = {
bulkActionsForm: 'form#user-bulk-action-form',
userReportWrapper: '[data-region="report-user-list-wrapper"]',
checkbox: 'input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="slave"]',
masterCheckbox: 'input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="master"]',
checkedRows: '[data-togglegroup="report-select-all"][data-toggle="slave"]:checked',
};
/**
* Initialise module
*/
export const init = () => {
const userBulkForm = document.querySelector(Selectors.bulkActionsForm);
const userReport = userBulkForm?.closest(Selectors.userReportWrapper)?.querySelector(reportSelectors.regions.report);
if (!userBulkForm || !userReport) {
return;
}
const actionSelect = userBulkForm.querySelector('select');
CustomEvents.define(actionSelect, [CustomEvents.events.accessibleChange]);
jQuery(actionSelect).on(CustomEvents.events.accessibleChange, event => {
if (event.target.value && `${event.target.value}` !== "0") {
const e = new Event('submit', {cancelable: true});
userBulkForm.dispatchEvent(e);
if (!e.defaultPrevented) {
FormChangeChecker.markFormSubmitted(userBulkForm);
userBulkForm.submit();
}
}
});
// Every time the checkboxes in the report are changed, update the list of users in the form values
// and enable/disable the action select.
const updateUserIds = () => {
const selectedUsers = [...userReport.querySelectorAll(Selectors.checkedRows)];
const selectedUserIds = selectedUsers.map(check => parseInt(check.value));
userBulkForm.querySelector('[name="userids"]').value = selectedUserIds.join(',');
// Disable the action selector if nothing selected, and reset the current selection.
actionSelect.disabled = selectedUsers.length === 0;
if (actionSelect.disabled) {
actionSelect.value = "0";
}
const selectedUsersNames = selectedUsers.map(check => document.querySelector(`label[for="${check.id}"]`).textContent);
// Add the user ids and names to the form data attributes so they can be available from the
// other JS modules that listen to the form submit event.
userBulkForm.data = {userids: selectedUserIds, usernames: selectedUsersNames};
};
updateUserIds();
document.addEventListener('change', event => {
// When checkboxes are checked next to individual users or the master toggle (Select all/none).
if ((event.target.matches(Selectors.checkbox) || event.target.matches(Selectors.masterCheckbox))
&& userReport.contains(event.target)) {
updateUserIds();
}
});
document.addEventListener(tableEvents.tableContentRefreshed, event => {
// When the report contents is updated (i.e. page is changed, filters applied, etc).
if (userReport.contains(event.target)) {
updateUserIds();
}
});
};
-179
View File
@@ -1,179 +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 {refreshTableContent} from 'core_table/dynamic';
import * as Selectors from 'core_table/local/dynamic/selectors';
import {call as fetchMany} from 'core/ajax';
import Pending from 'core/pending';
import {fetchNotifications} from 'core/notification';
let watching = false;
export default class {
/**
* @property {function[]} clickHandlers a list of handlers to call on click.
*/
clickHandlers = [];
constructor() {
this.addClickHandler(this.handleStateToggle);
this.addClickHandler(this.handleMoveUpDown);
this.registerEventListeners();
}
/**
* Initialise an instance of the class.
*
* This is just a way of making it easier to initialise an instance of the class from PHP.
*/
static init() {
if (watching) {
return;
}
watching = true;
new this();
}
/**
* Add a click handler to the list of handlers.
*
* @param {Function} handler A handler to call on a click event
*/
addClickHandler(handler) {
this.clickHandlers.push(handler.bind(this));
}
/**
* Register the event listeners for this instance.
*/
registerEventListeners() {
document.addEventListener('click', function(e) {
const tableRoot = this.getTableRoot(e);
if (!tableRoot) {
return;
}
this.clickHandlers.forEach((handler) => handler(tableRoot, e));
}.bind(this));
}
/**
* Get the table root from an event.
*
* @param {Event} e
* @returns {HTMLElement|bool}
*/
getTableRoot(e) {
const tableRoot = e.target.closest(Selectors.main.region);
if (!tableRoot) {
return false;
}
return tableRoot;
}
/**
* Set the plugin state (enabled or disabled)
*
* @param {string} methodname The web service to call
* @param {string} plugin The name of the plugin to set the state for
* @param {number} state The state to set
* @returns {Promise}
*/
setPluginState(methodname, plugin, state) {
return fetchMany([{
methodname,
args: {
plugin,
state,
},
}])[0];
}
setPluginOrder(methodname, plugin, direction) {
return fetchMany([{
methodname,
args: {
plugin,
direction,
},
}])[0];
}
/**
* Handle state toggling.
*
* @param {HTMLElement} tableRoot
* @param {Event} e
*/
async handleStateToggle(tableRoot, e) {
const stateToggle = e.target.closest('[data-action="togglestate"][data-toggle-method]');
if (stateToggle) {
e.preventDefault();
const pendingPromise = new Pending('core_table/dynamic:togglestate');
await this.setPluginState(
stateToggle.dataset.toggleMethod,
stateToggle.dataset.plugin,
stateToggle.dataset.state === '1' ? 0 : 1
);
const [updatedRoot] = await Promise.all([
refreshTableContent(tableRoot),
fetchNotifications(),
]);
// Refocus on the link that as pressed in the first place.
updatedRoot.querySelector(`[data-action="togglestate"][data-plugin="${stateToggle.dataset.plugin}"]`).focus();
pendingPromise.resolve();
}
}
async handleMoveUpDown(tableRoot, e) {
const actionLink = e.target.closest('[data-action="move"][data-method][data-direction]');
if (!actionLink) {
return;
}
e.preventDefault();
const pendingPromise = new Pending('core_table/dynamic:processAction');
await this.setPluginOrder(
actionLink.dataset.method,
actionLink.dataset.plugin,
actionLink.dataset.direction === 'up' ? -1 : 1,
);
const [updatedRoot] = await Promise.all([
refreshTableContent(tableRoot),
fetchNotifications(),
]);
// Refocus on the link that as pressed in the first place.
const exactMatch = updatedRoot.querySelector(
`[data-action="move"][data-plugin="${actionLink.dataset.plugin}"][data-direction="${actionLink.dataset.direction}"]`
);
if (exactMatch) {
exactMatch.focus();
} else {
// The move link is not present anymore, so we need to focus on the other one.
updatedRoot.querySelector(`[data-action="move"][data-plugin="${actionLink.dataset.plugin}"]`)?.focus();
}
pendingPromise.resolve();
}
}
@@ -1,104 +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/>.
/**
* Modal for theme previews.
*
* @module core_admin/themeselector/preview_modal
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import ModalEvents from 'core/modal_events';
import ModalCancel from 'core/modal_cancel';
import ModalSaveCancel from 'core/modal_save_cancel';
import Notification from 'core/notification';
import Templates from 'core/templates';
import {getString} from 'core/str';
const SELECTORS = {
THEMES_CONTAINER: 'themelist',
PREVIEW: '[data-action="preview"]',
};
/**
* Entrypoint of the js.
*
* @method init
*/
export const init = () => {
registerListenerEvents();
};
/**
* Register theme related event listeners.
*
* @method registerListenerEvents
*/
const registerListenerEvents = () => {
document.addEventListener('click', (e) => {
const preview = e.target.closest(SELECTORS.PREVIEW);
if (preview) {
buildModal(preview).catch(Notification.exception);
}
});
};
/**
* Build the modal with the provided data.
*
* @method buildModal
* @param {object} element
*/
const buildModal = async(element) => {
// This string can be long. We will fetch it with JS as opposed to passing it as an attribute.
let description = await getString('choosereadme', 'theme_' + element.getAttribute('data-choose'));
const themesContainer = document.getElementById(SELECTORS.THEMES_CONTAINER);
const definedInConfig = parseInt(themesContainer.dataset.definedinconfig);
// Prepare data for modal.
const data = {
name: element.getAttribute('data-name'),
image: element.getAttribute('data-image'),
description: description.replace(/<[^>]+>/g, ' '), // Strip out HTML tags.
current: element.getAttribute('data-current'),
actionurl: element.getAttribute('data-actionurl'),
choose: element.getAttribute('data-choose'),
sesskey: element.getAttribute('data-sesskey'),
definedinconfig: definedInConfig,
};
// Determine which modal template we should use.
let modalTemplate = ModalSaveCancel;
if (data.current || data.definedinconfig) {
modalTemplate = ModalCancel;
}
const modal = await modalTemplate.create({
title: data.name,
body: Templates.render('core_admin/themeselector/theme_preview_modal', data),
large: true,
buttons: {
'save': getString('selecttheme', 'moodle'),
'cancel': getString('closebuttontitle', 'moodle'),
},
show: true,
});
modal.getRoot().on(ModalEvents.save, () => {
modal.getRoot().find('form').submit();
});
};
-113
View File
@@ -1,113 +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/>.
/**
* Allows admin to configure antiviruses.
*
* @package core_antivirus
* @copyright 2015 Ruslan Kabalin, Lancaster University.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
$action = required_param('action', PARAM_ALPHANUMEXT);
$antivirus = required_param('antivirus', PARAM_PLUGIN);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$PAGE->set_url('/admin/antiviruses.php', array('action' => $action, 'antivirus' => $antivirus));
$PAGE->set_context(context_system::instance());
require_admin();
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageantiviruses";
// Get currently installed and enabled antivirus plugins.
$availableantiviruses = \core\antivirus\manager::get_available();
if (!empty($antivirus) and empty($availableantiviruses[$antivirus])) {
redirect ($returnurl);
}
$activeantiviruses = explode(',', $CFG->antiviruses);
foreach ($activeantiviruses as $key => $active) {
if (empty($availableantiviruses[$active])) {
unset($activeantiviruses[$key]);
}
}
if (!confirm_sesskey()) {
redirect($returnurl);
}
$needsupdate = false;
switch ($action) {
case 'disable':
// Remove from enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('antivirus');
$class::enable_plugin($antivirus, false);
break;
case 'enable':
// Add to enabled list.
if (!in_array($antivirus, $activeantiviruses)) {
$class = \core_plugin_manager::resolve_plugininfo_class('antivirus');
$class::enable_plugin($antivirus, true);
}
break;
case 'down':
$key = array_search($antivirus, $activeantiviruses);
// Check auth plugin is valid.
if ($key !== false) {
// Move down the list.
if ($key < (count($activeantiviruses) - 1)) {
$fsave = $activeantiviruses[$key];
$activeantiviruses[$key] = $activeantiviruses[$key + 1];
$activeantiviruses[$key + 1] = $fsave;
$needsupdate = true;
}
}
break;
case 'up':
$key = array_search($antivirus, $activeantiviruses);
// Check auth is valid.
if ($key !== false) {
// Move up the list.
if ($key >= 1) {
$fsave = $activeantiviruses[$key];
$activeantiviruses[$key] = $activeantiviruses[$key - 1];
$activeantiviruses[$key - 1] = $fsave;
$needsupdate = true;
}
}
break;
default:
break;
}
if ($needsupdate) {
$new = implode(',', $activeantiviruses);
add_to_config_log('antiviruses', $CFG->antiviruses, $new, 'core');
set_config('antiviruses', $new);
core_plugin_manager::reset_caches();
}
redirect ($returnurl);
+29 -16
View File
@@ -11,7 +11,8 @@ require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
require_admin();
require_login();
require_capability('moodle/site:config', context_system::instance());
$returnurl = new moodle_url('/admin/settings.php', array('section'=>'manageauths'));
@@ -28,7 +29,7 @@ if (empty($CFG->auth)) {
}
if (!empty($auth) and !exists_auth_plugin($auth)) {
throw new \moodle_exception('pluginnotinstalled', 'auth', $returnurl, $auth);
print_error('pluginnotinstalled', 'auth', $returnurl, $auth);
}
////////////////////////////////////////////////////////////////////////////////
@@ -40,31 +41,43 @@ if (!confirm_sesskey()) {
switch ($action) {
case 'disable':
// Remove from enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('auth');
$class::enable_plugin($auth, false);
// remove from enabled list
$key = array_search($auth, $authsenabled);
if ($key !== false) {
unset($authsenabled[$key]);
set_config('auth', implode(',', $authsenabled));
}
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
break;
case 'enable':
// Add to enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('auth');
$class::enable_plugin($auth, true);
// add to enabled list
if (!in_array($auth, $authsenabled)) {
$authsenabled[] = $auth;
$authsenabled = array_unique($authsenabled);
set_config('auth', implode(',', $authsenabled));
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
break;
case 'down':
$key = array_search($auth, $authsenabled);
// check auth plugin is valid
if ($key === false) {
throw new \moodle_exception('pluginnotenabled', 'auth', $returnurl, $auth);
print_error('pluginnotenabled', 'auth', $returnurl, $auth);
}
// move down the list
if ($key < (count($authsenabled) - 1)) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key + 1];
$authsenabled[$key + 1] = $fsave;
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
set_config('auth', implode(',', $authsenabled));
}
break;
@@ -72,16 +85,14 @@ switch ($action) {
$key = array_search($auth, $authsenabled);
// check auth is valid
if ($key === false) {
throw new \moodle_exception('pluginnotenabled', 'auth', $returnurl, $auth);
print_error('pluginnotenabled', 'auth', $returnurl, $auth);
}
// move up the list
if ($key >= 1) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key - 1];
$authsenabled[$key - 1] = $fsave;
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
set_config('auth', implode(',', $authsenabled));
}
break;
@@ -90,3 +101,5 @@ switch ($action) {
}
redirect($returnurl);
+189
View File
@@ -0,0 +1,189 @@
<?php
/**
* Edit configuration for an individual auth plugin
*/
require_once '../config.php';
require_once $CFG->libdir.'/adminlib.php';
$auth = required_param('auth', PARAM_PLUGIN);
$PAGE->set_pagetype('admin-auth-' . $auth);
admin_externalpage_setup('authsetting'.$auth);
$authplugin = get_auth_plugin($auth);
$err = array();
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageauths";
// save configuration changes
if ($frm = data_submitted() and confirm_sesskey()) {
$authplugin->validate_form($frm, $err);
if (count($err) == 0) {
// save plugin config
if ($authplugin->process_config($frm)) {
// save field lock configuration
foreach ($frm as $name => $value) {
if (preg_match('/^lockconfig_(.+?)$/', $name, $matches)) {
$plugin = "auth/$auth";
$name = $matches[1];
set_config($name, $value, $plugin);
}
}
redirect($returnurl);
exit;
}
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
} else {
$frmlegacystyle = get_config('auth/'.$auth);
$frmnewstyle = get_config('auth_'.$auth);
$frm = (object)array_merge((array)$frmlegacystyle, (array)$frmnewstyle);
}
$user_fields = $authplugin->userfields;
//$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "institution", "department", "address", "city", "country", "description", "idnumber", "lang");
/// Get the auth title (from core or own auth lang files)
$authtitle = $authplugin->get_title();
/// Get the auth descriptions (from core or own auth lang files)
$authdescription = $authplugin->get_description();
// output configuration form
echo $OUTPUT->header();
// choose an authentication method
echo "<form id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n";
echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
// auth plugin description
echo $OUTPUT->box_start();
echo $OUTPUT->heading($authtitle);
echo $OUTPUT->box_start('informationbox');
echo $authdescription;
echo $OUTPUT->box_end();
echo "<hr />\n";
$authplugin->config_form($frm, $err, $user_fields);
echo $OUTPUT->box_end();
echo '<p style="text-align: center"><input type="submit" value="' . get_string("savechanges") . "\" /></p>\n";
echo "</div>\n";
echo "</form>\n";
$PAGE->requires->string_for_js('unmaskpassword', 'core_form');
$PAGE->requires->yui_module('moodle-auth-passwordunmask', 'M.auth.passwordunmask');
echo $OUTPUT->footer();
exit;
/// Functions /////////////////////////////////////////////////////////////////
// Good enough for most auth plugins
// but some may want a custom one if they are offering
// other options
// Note: lockconfig_ fields have special handling.
function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts, $updateopts, $customfields = array()) {
global $DB, $OUTPUT;
echo '<tr><td colspan="3">';
if ($retrieveopts) {
echo $OUTPUT->heading(get_string('auth_data_mapping', 'auth'));
} else {
echo $OUTPUT->heading(get_string('auth_fieldlocks', 'auth'));
}
echo '</td></tr>';
$lockoptions = array ('unlocked' => get_string('unlocked', 'auth'),
'unlockedifempty' => get_string('unlockedifempty', 'auth'),
'locked' => get_string('locked', 'auth'));
$updatelocaloptions = array('oncreate' => get_string('update_oncreate', 'auth'),
'onlogin' => get_string('update_onlogin', 'auth'));
$updateextoptions = array('0' => get_string('update_never', 'auth'),
'1' => get_string('update_onupdate', 'auth'));
$pluginconfig = get_config("auth/$auth");
// Helptext is on a field with rowspan.
if (empty($helptext)) {
$helptext = '&nbsp;';
}
// If we have custom fields then merge them with user fields.
if (!empty($customfields)) {
$user_fields = array_merge($user_fields, $customfields);
}
if (!empty($customfields)) {
$customfieldname = $DB->get_records('user_info_field', null, '', 'shortname, name');
}
foreach ($user_fields as $field) {
// Define some vars we'll work with.
if (!isset($pluginconfig->{"field_map_$field"})) {
$pluginconfig->{"field_map_$field"} = '';
}
if (!isset($pluginconfig->{"field_updatelocal_$field"})) {
$pluginconfig->{"field_updatelocal_$field"} = '';
}
if (!isset($pluginconfig->{"field_updateremote_$field"})) {
$pluginconfig->{"field_updateremote_$field"} = '';
}
if (!isset($pluginconfig->{"field_lock_$field"})) {
$pluginconfig->{"field_lock_$field"} = '';
}
// Define the fieldname we display to the user.
$fieldname = $field;
if ($fieldname === 'lang') {
$fieldname = get_string('language');
} elseif (!empty($customfields) && in_array($field, $customfields)) {
// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
$fieldname = get_string($fieldname);
}
if ($retrieveopts) {
$varname = 'field_map_' . $field;
echo '<tr valign="top"><td align="right">';
echo '<label for="lockconfig_'.$varname.'">'.$fieldname.'</label>';
echo '</td><td>';
echo "<input id=\"lockconfig_{$varname}\" name=\"lockconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\" />";
echo '<div style="text-align: right">';
echo '<label for="menulockconfig_field_updatelocal_'.$field.'">'.get_string('auth_updatelocal', 'auth') . '</label>&nbsp;';
echo html_writer::select($updatelocaloptions, "lockconfig_field_updatelocal_{$field}", $pluginconfig->{"field_updatelocal_$field"}, false);
echo '<br />';
if ($updateopts) {
echo '<label for="menulockconfig_field_updateremote_'.$field.'">'.get_string('auth_updateremote', 'auth') . '</label>&nbsp;';
echo html_writer::select($updateextoptions, "lockconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, false);
echo '<br />';
}
echo '<label for="menulockconfig_field_lock_'.$field.'">'.get_string('auth_fieldlock', 'auth') . '</label>&nbsp;';
echo html_writer::select($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false);
echo '</div>';
} else {
echo '<tr valign="top"><td align="right">';
echo '<label for="menulockconfig_field_lock_'.$field.'">'.$fieldname.'</label>';
echo '</td><td>';
echo html_writer::select($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false);
}
echo '</td>';
if (!empty($helptext)) {
echo '<td rowspan="' . count($user_fields) . '">' . $helptext . '</td>';
$helptext = '';
}
echo '</tr>';
}
}
+234 -79
View File
@@ -1,94 +1,249 @@
<?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/>.
/**
* Allows the admin to configure blocks (hide/show, uninstall and configure)
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// Allows the admin to configure blocks (hide/show, uninstall and configure)
require_once('../config.php');
require_once("{$CFG->libdir}/adminlib.php");
require_once("{$CFG->libdir}/blocklib.php");
require_once("{$CFG->libdir}/tablelib.php");
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('manageblocks');
admin_externalpage_setup('manageblocks');
$plugin = optional_param('plugin', '', PARAM_PLUGIN);
$action = optional_param('action', '', PARAM_ALPHA);
$unprotect = optional_param('unprotect', 0, PARAM_PLUGIN);
$protect = optional_param('protect', 0, PARAM_PLUGIN);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$unprotect = optional_param('unprotect', 0, PARAM_INT);
$protect = optional_param('protect', 0, PARAM_INT);
$strmanageblocks = get_string('manageblocks');
/// Print headings
// If data submitted, then process and store.
if (!empty($plugin) && !empty($action) && confirm_sesskey()) {
$manager = \core_plugin_manager::resolve_plugininfo_class('block');
$pluginname = get_string('pluginname', "block_{$plugin}");
$strmanageblocks = get_string('manageblocks');
$struninstall = get_string('uninstallplugin', 'core_admin');
$strversion = get_string('version');
$strhide = get_string('hide');
$strshow = get_string('show');
$strsettings = get_string('settings');
$strcourses = get_string('blockinstances', 'admin');
$strname = get_string('name');
$strshowblockcourse = get_string('showblockcourse');
$strprotecthdr = get_string('blockprotect', 'admin'). $OUTPUT->help_icon('blockprotect','admin');
$strprotect = get_string('blockprotect', 'admin');
$strunprotect = get_string('blockunprotect', 'admin');
if ($action === 'disable' && $manager::enable_plugin($plugin, 0)) {
\core\notification::add(
get_string('plugin_disabled', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
// Settings not required - only pages.
admin_get_root(true, false);
} else if ($action === 'enable' && $manager::enable_plugin($plugin, 1)) {
\core\notification::add(
get_string('plugin_enabled', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
/// If data submitted, then process and store.
// Settings not required - only pages.
admin_get_root(true, false);
if (!empty($hide) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$hide))) {
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
// Redirect back to the page with out any params.
redirect(new moodle_url('/admin/blocks.php'));
}
if (!empty($show) && confirm_sesskey() ) {
if (!$block = $DB->get_record('block', array('id'=>$show))) {
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '1', array('id'=>$block->id)); // Show block
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($protect) && confirm_sesskey()) {
block_manager::protect_block($protect);
$pluginname = get_string('pluginname', "block_{$protect}");
\core\notification::add(
get_string('blockprotected', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
// Settings not required - only pages.
admin_get_root(true, false);
}
if (!isset($CFG->undeletableblocktypes) || (!is_array($CFG->undeletableblocktypes) && !is_string($CFG->undeletableblocktypes))) {
$undeletableblocktypes = array('navigation', 'settings');
} else if (is_string($CFG->undeletableblocktypes)) {
$undeletableblocktypes = explode(',', $CFG->undeletableblocktypes);
} else {
$undeletableblocktypes = $CFG->undeletableblocktypes;
}
if (!empty($unprotect) && confirm_sesskey()) {
block_manager::unprotect_block($unprotect);
$pluginname = get_string('pluginname', "block_{$unprotect}");
\core\notification::add(
get_string('blockunprotected', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
// Settings not required - only pages.
admin_get_root(true, false);
}
if (!empty($protect) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$protect))) {
print_error('blockdoesnotexist', 'error');
}
if (!in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes[] = $block->name;
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
}
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($unprotect) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$unprotect))) {
print_error('blockdoesnotexist', 'error');
}
if (in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes = array_diff($undeletableblocktypes, array($block->name));
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
}
admin_get_root(true, false); // settings not required - only pages
}
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
/// Main display starts here
/// Get and sort the existing blocks
if (!$blocks = $DB->get_records('block', array(), 'name ASC')) {
print_error('noblocks', 'error'); // Should never happen
}
$incompatible = array();
/// Print the table of all blocks
$table = new flexible_table('admin-blocks-compatible');
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'settings', 'uninstall'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strsettings, $struninstall));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'admintable blockstable generaltable');
$table->set_attribute('id', 'compatibleblockstable');
$table->setup();
$tablerows = array();
// Sort blocks using current locale.
$blocknames = array();
foreach ($blocks as $blockid=>$block) {
$blockname = $block->name;
if (file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
$blocknames[$blockid] = get_string('pluginname', 'block_'.$blockname);
} else {
$blocknames[$blockid] = $blockname;
}
}
core_collator::asort($blocknames);
foreach ($blocknames as $blockid=>$strblockname) {
$block = $blocks[$blockid];
$blockname = $block->name;
$dbversion = get_config('block_'.$block->name, 'version');
if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
$blockobject = false;
$strblockname = '<span class="notifyproblem">'.$strblockname.' ('.get_string('missingfromdisk').')</span>';
$plugin = new stdClass();
$plugin->version = $dbversion;
} else {
$plugin = new stdClass();
$plugin->version = '???';
if (file_exists("$CFG->dirroot/blocks/$blockname/version.php")) {
include("$CFG->dirroot/blocks/$blockname/version.php");
}
if (!$blockobject = block_instance($block->name)) {
$incompatible[] = $block;
continue;
}
}
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$blockname, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$settings = ''; // By default, no configuration
if ($blockobject and $blockobject->has_config()) {
$blocksettings = admin_get_root()->locate('blocksetting' . $block->name);
if ($blocksettings instanceof admin_externalpage) {
$settings = '<a href="' . $blocksettings->url . '">' . get_string('settings') . '</a>';
} else if ($blocksettings instanceof admin_settingpage) {
$settings = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=blocksetting'.$block->name.'">'.$strsettings.'</a>';
} else {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
}
}
// MDL-11167, blocks can be placed on mymoodle, or the blogs page
// and it should not show up on course search page
$totalcount = $DB->count_records('block_instances', array('blockname'=>$blockname));
$count = $DB->count_records('block_instances', array('blockname'=>$blockname, 'pagetypepattern'=>'course-view-*'));
if ($count>0) {
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey=".sesskey()."\" ";
$blocklist .= "title=\"$strshowblockcourse\" >$totalcount</a>";
}
else {
$blocklist = "$totalcount";
}
$class = ''; // Nothing fancy, by default
if (!$blockobject) {
// ignore
$visible = '';
} else if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strhide.'">'.
'<img src="'.$OUTPUT->pix_url('t/hide') . '" class="iconsmall" alt="'.$strhide.'" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strshow.'">'.
'<img src="'.$OUTPUT->pix_url('t/show') . '" class="iconsmall" alt="'.$strshow.'" /></a>';
$class = 'dimmed_text';
}
if ($dbversion == $plugin->version) {
$version = $dbversion;
} else {
$version = "$dbversion ($plugin->version)";
}
if (!$blockobject) {
// ignore
$undeletable = '';
} else if (in_array($blockname, $undeletableblocktypes)) {
$undeletable = '<a href="blocks.php?unprotect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strunprotect.'">'.
'<img src="'.$OUTPUT->pix_url('t/unlock') . '" class="iconsmall" alt="'.$strunprotect.'" /></a>';
} else {
$undeletable = '<a href="blocks.php?protect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strprotect.'">'.
'<img src="'.$OUTPUT->pix_url('t/lock') . '" class="iconsmall" alt="'.$strprotect.'" /></a>';
}
$row = array(
$strblockname,
$blocklist,
$version,
$visible,
$undeletable,
$settings,
$uninstall,
);
$table->add_data($row, $class);
}
$table->print_html();
if (!empty($incompatible)) {
echo $OUTPUT->heading(get_string('incompatibleblocks', 'blockstable', 'admin'));
$table = new flexible_table('admin-blocks-incompatible');
$table->define_columns(array('block', 'uninstall'));
$table->define_headers(array($strname, $struninstall));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'incompatibleblockstable generaltable');
$table->setup();
foreach ($incompatible as $block) {
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$block->name, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$table->add_data(array(
$block->name,
$uninstall,
));
}
$table->print_html();
}
echo $OUTPUT->footer();
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
echo $OUTPUT->notification(get_string('noteunneededblocks', 'admin'), 'info', false);
// Print the table of all blocks.
$table = new \core_admin\table\block_management_table();
$table->out();
echo $OUTPUT->footer();
+27 -31
View File
@@ -17,7 +17,7 @@
/**
* This file is used to display a categories sub categories, external pages, and settings.
*
* @since Moodle 2.3
* @since 2.3
* @package admin
* @copyright 2011 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -30,6 +30,7 @@ $category = required_param('category', PARAM_SAFEDIR);
$return = optional_param('return','', PARAM_ALPHA);
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
/// no guest autologin
require_login(0, false);
$PAGE->set_context(context_system::instance());
$PAGE->set_url('/admin/category.php', array('category' => $category));
@@ -41,47 +42,40 @@ $adminroot = admin_get_root(); // need all settings
$settingspage = $adminroot->locate($category, true);
if (empty($settingspage) or !($settingspage instanceof admin_category)) {
throw new \moodle_exception('categoryerror', 'error', "$CFG->wwwroot/$CFG->admin/");
print_error('categoryerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
}
if (!($settingspage->check_access())) {
throw new \moodle_exception('accessdenied', 'admin');
print_error('accessdenied', 'admin');
}
$hassiteconfig = has_capability('moodle/site:config', $PAGE->context);
if ($hassiteconfig) {
$PAGE->add_header_action($OUTPUT->render_from_template('core_admin/header_search_input', [
'action' => new moodle_url('/admin/search.php'),
]));
}
$statusmsg = '';
$errormsg = '';
if ($data = data_submitted() and confirm_sesskey()) {
$count = admin_write_settings($data);
if (admin_write_settings($data)) {
$statusmsg = get_string('changessaved');
}
if (empty($adminroot->errors)) {
// No errors. Did we change any setting? If so, then indicate success.
if ($count) {
$statusmsg = get_string('changessaved');
} else {
switch ($return) {
case 'site': redirect("$CFG->wwwroot/");
case 'admin': redirect("$CFG->wwwroot/$CFG->admin/");
}
switch ($return) {
case 'site': redirect("$CFG->wwwroot/");
case 'admin': redirect("$CFG->wwwroot/$CFG->admin/");
}
} else {
$errormsg = get_string('errorwithsettings', 'admin');
$firsterror = reset($adminroot->errors);
}
$adminroot = admin_get_root(true); //reload tree
$settingspage = $adminroot->locate($category, true);
}
if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
$buttons = null;
if ($PAGE->user_allowed_editing() && !$PAGE->theme->haseditswitch) {
if ($PAGE->user_allowed_editing()) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
$caption = get_string('blockseditoff');
@@ -96,7 +90,7 @@ if ($PAGE->user_allowed_editing() && !$PAGE->theme->haseditswitch) {
$savebutton = false;
$outputhtml = '';
foreach ($settingspage->children as $childpage) {
if ($childpage->is_hidden() || !$childpage->check_access()) {
if ($childpage->is_hidden()) {
continue;
}
if ($childpage instanceof admin_externalpage) {
@@ -127,15 +121,14 @@ foreach ($settingspage->children as $childpage) {
}
if ($savebutton) {
$outputhtml .= html_writer::start_tag('div', array('class' => 'form-buttons'));
$outputhtml .= html_writer::empty_tag('input', array('class' => 'btn btn-primary form-submit', 'type' => 'submit', 'value' => get_string('savechanges','admin')));
$outputhtml .= html_writer::empty_tag('input', array('class' => 'form-submit', 'type' => 'submit', 'value' => get_string('savechanges','admin')));
$outputhtml .= html_writer::end_tag('div');
}
$PAGE->set_title(implode(moodle_page::TITLE_SEPARATOR, $settingspage->visiblepath));
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_heading($SITE->fullname);
if ($buttons) {
$PAGE->set_button($buttons);
}
$PAGE->set_button($buttons);
echo $OUTPUT->header();
@@ -145,7 +138,13 @@ if ($errormsg !== '') {
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
}
echo $OUTPUT->heading(get_string('admincategory', 'admin', $settingspage->visiblename), 2);
$path = array_reverse($settingspage->visiblepath);
if (is_array($path)) {
$visiblename = join(' / ', $path);
} else {
$visiblename = $path;
}
echo $OUTPUT->heading(get_string('admincategory', 'admin', $visiblename), 2);
echo html_writer::start_tag('form', array('action' => '', 'method' => 'post', 'id' => 'adminsettings'));
echo html_writer::start_tag('div');
@@ -157,7 +156,4 @@ echo $outputhtml;
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
// Add the form change checker.
$PAGE->requires->js_call_amd('core_form/changechecker', 'watchFormById', ['adminsettings']);
echo $OUTPUT->footer();
echo $OUTPUT->footer();
@@ -1,127 +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/>.
namespace core_admin\admin;
use admin_setting;
use core_plugin_manager;
use core_text;
/**
* Admin setting plugin manager.
*
* @package core_admin
* @subpackage admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_setting_plugin_manager extends admin_setting {
/** @var core_plugin_manager The plugin manager instance */
protected core_plugin_manager $pluginmanager;
/** @var string The plugintype that this manager covers */
protected string $plugintype;
/** @var string The class of the management table to use */
protected string $tableclass;
public function __construct(
string $plugintype,
string $tableclass,
string $name,
string $visiblename,
string $description = '',
string $defaultsetting = '',
) {
$this->nosave = true;
$this->pluginmanager = core_plugin_manager::instance();
$this->plugintype = $plugintype;
$this->tableclass = $tableclass;
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
/**
* Always returns true, does nothing
*
* @return true
*/
public function get_setting(): bool {
return true;
}
/**
* Always returns true, does nothing
*
* @return true
*/
public function get_defaultsetting(): bool {
return true;
}
/**
* Always returns '', does not write anything
*
* @return string Always returns ''
*/
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
public function write_setting($data): string {
// Do not write any setting.
return '';
}
/**
* Checks if $query is one of the available editors
*
* @param string $query The string to search for
* @return bool Returns true if found, false if not
*/
public function is_related($query) {
if (parent::is_related($query)) {
return true;
}
$plugins = $this->pluginmanager->get_installed_plugins($this->plugintype);
foreach (array_keys($plugins) as $plugin) {
$plugin = "{$this->plugintype}_{$plugin}";
if (str_contains($plugin, $query)) {
return true;
}
$pluginname = get_string('pluginname', $plugin);
if (strpos(core_text::strtolower($pluginname), $query) !== false) {
return true;
}
}
return false;
}
/**
* Builds the XHTML to display the control
*
* @param string $data Unused
* @param string $query
* @return string
*/
public function output_html($data, $query = ''): string {
$table = new $this->tableclass();
if (!($table instanceof \core_admin\table\plugin_management_table)) {
throw new \coding_exception("{$this->tableclass} must be an instance of \\core_admin\\table\\plugin_management_table");
}
return highlight($query, $table->get_content());
}
}
-97
View File
@@ -1,97 +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/>.
namespace core_admin\external;
use block_manager;
use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_single_structure;
use core_external\external_value;
/**
* Web Service to control the state of a plugin.
*
* @package core_admin
* @category external
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_block_protection extends external_api {
/**
* Returns description of method parameters
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters([
'plugin' => new external_value(PARAM_PLUGIN, 'The name of the plugin', VALUE_REQUIRED),
'state' => new external_value(PARAM_INT, 'The target state', VALUE_REQUIRED),
]);
}
/**
* Set the block protection state.
*
* @param string $plugin The name of the plugin
* @param int $state The target state
* @return null
*/
public static function execute(
string $plugin,
int $state,
): array {
[
'plugin' => $plugin,
'state' => $state,
] = self::validate_parameters(self::execute_parameters(), [
'plugin' => $plugin,
'state' => $state,
]);
$context = \context_system::instance();
self::validate_context($context);
require_capability('moodle/site:config', $context);
[, $pluginname] = explode('_', \core_component::normalize_componentname($plugin), 2);
$displayname = get_string('pluginname', $plugin);
if ($state) {
block_manager::protect_block($pluginname);
\core\notification::add(
get_string('blockprotected', 'core_admin', $displayname),
\core\notification::SUCCESS
);
} else {
block_manager::unprotect_block($pluginname);
\core\notification::add(
get_string('blockunprotected', 'core_admin', $displayname),
\core\notification::SUCCESS
);
}
return [];
}
/**
* Describe the return structure of the external service.
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([]);
}
}
-84
View File
@@ -1,84 +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/>.
namespace core_admin\external;
use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_single_structure;
use core_external\external_value;
/**
* Web Service to control the order of a plugin.
*
* @package core_admin
* @category external
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_plugin_order extends external_api {
/**
* Returns description of method parameters
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters([
'plugin' => new external_value(PARAM_PLUGIN, 'The name of the plugin', VALUE_REQUIRED),
'direction' => new external_value(PARAM_INT, 'The direction to move', VALUE_REQUIRED),
]);
}
/**
* Set the plugin state.
*
* @param string $plugin The name of the plugin
* @param int $direction The direction to move the plugin
* @return array
*/
public static function execute(
string $plugin,
int $direction,
): array {
[
'plugin' => $plugin,
'direction' => $direction,
] = self::validate_parameters(self::execute_parameters(), [
'plugin' => $plugin,
'direction' => $direction,
]);
$context = \context_system::instance();
self::validate_context($context);
require_capability('moodle/site:config', $context);
[$plugintype, $pluginname] = explode('_', \core_component::normalize_componentname($plugin), 2);
$manager = \core_plugin_manager::resolve_plugininfo_class($plugintype);
$manager::change_plugin_order($pluginname, $direction);
return [];
}
/**
* Describe the return structure of the external service.
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([]);
}
}
-98
View File
@@ -1,98 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_admin\external;
use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_single_structure;
use core_external\external_value;
/**
* Web Service to control the state of a plugin.
*
* @package core_admin
* @category external
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_plugin_state extends external_api {
/**
* Returns description of method parameters
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters([
'plugin' => new external_value(PARAM_PLUGIN, 'The name of the plugin', VALUE_REQUIRED),
'state' => new external_value(PARAM_INT, 'The target state', VALUE_REQUIRED),
]);
}
/**
* Set the plugin state.
*
* @param string $plugin The name of the plugin
* @param int $state The target state
* @return null
*/
public static function execute(
string $plugin,
int $state,
): array {
[
'plugin' => $plugin,
'state' => $state,
] = self::validate_parameters(self::execute_parameters(), [
'plugin' => $plugin,
'state' => $state,
]);
$context = \context_system::instance();
self::validate_context($context);
require_capability('moodle/site:config', $context);
[$plugintype, $pluginname] = explode('_', \core_component::normalize_componentname($plugin), 2);
$manager = \core_plugin_manager::resolve_plugininfo_class($plugintype);
$displayname = get_string('pluginname', $plugin);
if ($manager::enable_plugin($pluginname, $state)) {
if (!empty($state)) {
\core\notification::add(
get_string('plugin_enabled', 'core_admin', $displayname),
\core\notification::SUCCESS
);
} else {
\core\notification::add(
get_string('plugin_disabled', 'core_admin', $displayname),
\core\notification::SUCCESS
);
}
}
return [];
}
/**
* Describe the return structure of the external service.
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([]);
}
}
-76
View File
@@ -1,76 +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/>.
/**
* Form for selective purging of caches.
*
* @package core
* @copyright 2018 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\form;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
/**
* Form for selecting which caches to purge on admin/purgecaches.php
*
* @package core
* @copyright 2018 The Open University
* @author Mark Johnson <mark.johnson@open.ac.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class purge_caches extends \moodleform {
/**
* Define a "Purge all caches" button, and a fieldset with checkboxes for selectively purging separate caches.
*/
public function definition() {
$mform = $this->_form;
$mform->addElement('hidden', 'returnurl', $this->_customdata['returnurl']);
$mform->setType('returnurl', PARAM_LOCALURL);
$mform->addElement('submit', 'all', get_string('purgecaches', 'admin'));
$mform->addElement('header', 'purgecacheheader', get_string('purgeselectedcaches', 'admin'));
$checkboxes = [
$mform->createElement('advcheckbox', 'theme', '', get_string('purgethemecache', 'admin')),
$mform->createElement('advcheckbox', 'lang', '', get_string('purgelangcache', 'admin')),
$mform->createElement('advcheckbox', 'js', '', get_string('purgejscache', 'admin')),
$mform->createElement('advcheckbox', 'template', '', get_string('purgetemplates', 'admin')),
$mform->createElement('advcheckbox', 'filter', '', get_string('purgefiltercache', 'admin')),
$mform->createElement('advcheckbox', 'muc', '', get_string('purgemuc', 'admin')),
$mform->createElement('advcheckbox', 'other', '', get_string('purgeothercaches', 'admin'))
];
$mform->addGroup($checkboxes, 'purgeselectedoptions');
$mform->addElement('submit', 'purgeselectedcaches', get_string('purgeselectedcaches', 'admin'));
}
/**
* If the "Purge selected caches" button was pressed, ensure at least one cache was selected.
*
* @param array $data
* @param array $files
* @return array Error messages
*/
public function validation($data, $files) {
$errors = [];
if (isset($data['purgeselectedcaches']) && empty(array_filter($data['purgeselectedoptions']))) {
$errors['purgeselectedoptions'] = get_string('purgecachesnoneselected', 'admin');
}
return $errors;
}
}
@@ -1,92 +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/>.
/**
* Testing outgoing mail configuration form
*
* @package core
* @copyright 2019 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\form;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
/**
* Test mail form
*
* @package core
* @copyright 2019 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testoutgoingmailconf_form extends \moodleform {
/**
* Add elements to form
*/
public function definition() {
$mform = $this->_form;
// Recipient.
$options = ['maxlength' => '100', 'size' => '25', 'autocomplete' => 'email'];
$mform->addElement('text', 'recipient', get_string('testoutgoingmailconf_toemail', 'admin'), $options);
$mform->setType('recipient', PARAM_EMAIL);
$mform->addRule('recipient', get_string('required'), 'required');
// From user.
$options = ['maxlength' => '100', 'size' => '25'];
$mform->addElement('text', 'from', get_string('testoutgoingmailconf_fromemail', 'admin'), $options);
$mform->setType('from', PARAM_TEXT);
$mform->addHelpButton('from', 'testoutgoingmailconf_fromemail', 'admin');
// Additional subject text.
$options = ['size' => '25'];
$mform->addElement('text', 'additionalsubject', get_string('testoutgoingmailconf_subjectadditional', 'admin'), $options);
$mform->setType('additionalsubject', PARAM_TEXT);
$buttonarray = array();
$buttonarray[] = $mform->createElement('submit', 'send', get_string('testoutgoingmailconf_sendtest', 'admin'));
$buttonarray[] = $mform->createElement('cancel');
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$mform->closeHeaderBefore('buttonar');
}
/**
* Validate Form field, should be a valid email format or a username that matches with a Moodle user.
*
* @param array $data
* @param array $files
* @return array
* @throws \dml_exception|\coding_exception
*/
public function validation($data, $files): array {
$errors = parent::validation($data, $files);
if (isset($data['from']) && $data['from']) {
$userfrom = \core_user::get_user_by_username($data['from']);
if (!$userfrom && !validate_email($data['from'])) {
$errors['from'] = get_string('testoutgoingmailconf_fromemail_invalid', 'admin');
}
}
return $errors;
}
}
@@ -1,71 +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/>.
/**
* External admin page class that allows a callback to be provided to determine whether page can be accessed
*
* @package core_admin
* @copyright 2019 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\externalpage;
use admin_externalpage;
defined('MOODLE_INTERNAL') || die();
require_once("{$CFG->libdir}/adminlib.php");
/**
* Admin externalpage class
*
* @package core_admin
* @copyright 2019 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class accesscallback extends admin_externalpage {
/** @var callable $accesscheckcallback */
protected $accesscheckcallback;
/**
* Class constructor
*
* @param string $name
* @param string $visiblename
* @param string $url
* @param callable $accesscheckcallback The callback method that will be executed to check whether user has access to
* this page. The setting instance ($this) is passed as an argument to the callback. Should return boolean value
* @param bool $hidden
*/
public function __construct(string $name, string $visiblename, string $url, callable $accesscheckcallback,
bool $hidden = false) {
$this->accesscheckcallback = $accesscheckcallback;
parent::__construct($name, $visiblename, $url, [], $hidden);
}
/**
* Determines if the current user has access to this external page based on access callback
*
* @return bool
*/
public function check_access() {
return ($this->accesscheckcallback)($this);
}
}
@@ -1,206 +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/>.
/**
* Auto complete admin setting.
*
* @package core_admin
* @copyright 2020 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/adminlib.php');
/**
* Auto complete setting class.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright 2020 The Open University
*/
class autocomplete extends \admin_setting_configmultiselect {
/** @var boolean Should we allow typing new entries to the field? */
protected $tags = false;
/** @var string Name of an AMD module to send/process ajax requests. */
protected $ajax = '';
/** @var string Placeholder text for an empty list. */
protected $placeholder = '';
/** @var bool Whether the search has to be case-sensitive. */
protected $casesensitive = false;
/** @var bool Show suggestions by default - but this can be turned off. */
protected $showsuggestions = true;
/** @var string String that is shown when there are no selections. */
protected $noselectionstring = '';
/** @var string Delimiter to store values in database. */
protected $delimiter = ',';
/** @var string Should be multiple choices? */
protected $multiple = true;
/** @var string The link to manage choices. */
protected $manageurl = true;
/** @var string The text to display in manage link. */
protected $managetext = true;
/**
* Constructor
*
* @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting'
* for ones in config_plugins.
* @param string $visiblename localised
* @param string $description long localised info
* @param array $defaultsetting array of selected items
* @param array $choices options for autocomplete field
* @param array $attributes settings for autocomplete field
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $choices, $attributes = null) {
if ($attributes === null) {
$attributes = [];
}
$this->placeholder = get_string('search');
$this->noselectionstring = get_string('noselection', 'form');
$defaultattributes = [
'tags',
'showsuggestions',
'placeholder',
'noselectionstring',
'ajax',
'casesensitive',
'delimiter',
'multiple',
'manageurl',
'managetext'
];
foreach ($defaultattributes as $attributename) {
if (isset($attributes[$attributename])) {
$this->$attributename = $attributes[$attributename];
}
}
parent::__construct($name, $visiblename, $description, $defaultsetting, $choices);
}
/**
* Returns the select setting(s)
*
* @return mixed null or array. Null if no settings else array of setting(s)
*/
public function get_setting() {
$result = $this->config_read($this->name);
if (is_null($result)) {
return null;
}
if ($result === '') {
return [];
}
return explode($this->delimiter, $result);
}
/**
* Saves setting(s) provided through $data
*
* @param array $data
*/
public function write_setting($data) {
if (!is_array($data)) {
return ''; // Ignore it.
}
if (!$this->load_choices() || empty($this->choices)) {
return '';
}
unset($data['xxxxx']);
$save = [];
foreach ($data as $value) {
if (!array_key_exists($value, $this->choices)) {
continue; // Ignore it.
}
$save[] = $value;
}
return ($this->config_write($this->name, implode($this->delimiter, $save)) ? '' : get_string('errorsetting', 'admin'));
}
/**
* Returns XHTML autocomplete field
*
* @param array $data Array of values to select by default
* @param string $query
* @return string XHTML autocomplete field
*/
public function output_html($data, $query = '') {
global $OUTPUT;
if (!$this->load_choices() or empty($this->choices)) {
return '';
}
$default = $this->get_defaultsetting();
if (empty($default)) {
$default = [];
}
if (is_null($data)) {
$data = [];
}
$context = [
'id' => $this->get_id(),
'name' => $this->get_full_name()
];
$defaults = [];
$options = [];
$template = 'core_admin/local/settings/autocomplete';
foreach ($this->choices as $value => $name) {
if (in_array($value, $default)) {
$defaults[] = $name;
}
$options[] = [
'value' => $value,
'text' => $name,
'selected' => in_array($value, $data),
'disabled' => false
];
}
$context['options'] = $options;
$context['tags'] = $this->tags;
$context['placeholder'] = $this->placeholder;
$context['casesensitive'] = $this->casesensitive;
$context['multiple'] = $this->multiple;
$context['showsuggestions'] = $this->showsuggestions;
$context['manageurl'] = $this->manageurl;
$context['managetext'] = $this->managetext;
if (is_null($default)) {
$defaultinfo = null;
} if (!empty($defaults)) {
$defaultinfo = implode(', ', $defaults);
} else {
$defaultinfo = get_string('none');
}
$element = $OUTPUT->render_from_template($template, $context);
return format_admin_setting($this, $this->visiblename, $element, $this->description, true, '', $defaultinfo, $query);
}
}
-197
View File
@@ -1,197 +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/>.
/**
* File size admin setting.
*
* @package core_admin
* @copyright 2019 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/adminlib.php');
/**
* An admin setting to support entering and displaying of file sizes in Bytes, KB, MB or GB.
*
* @copyright 2019 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class filesize extends \admin_setting {
/** @var int The byte unit. Number of bytes in a byte */
const UNIT_B = 1;
/** @var int The kilobyte unit (number of bytes in a kilobyte) */
const UNIT_KB = 1024;
/** @var int The megabyte unit (number of bytes in a megabyte) */
const UNIT_MB = 1048576;
/** @var int The gigabyte unit (number of bytes in a gigabyte) */
const UNIT_GB = 1073741824;
/** @var int default size unit */
protected $defaultunit;
/**
* Constructor
*
* @param string $name unique ascii name, either 'mysetting' for settings that in config,
* or 'myplugin/mysetting' for ones in config_plugins.
* @param string $visiblename localised name
* @param string $description localised long description
* @param int|null $defaultvalue Value of the settings in bytes
* @param int|null $defaultunit GB, MB, etc. (in bytes)
*/
public function __construct(string $name, string $visiblename, string $description,
int $defaultvalue = null, int $defaultunit = null) {
$defaultsetting = self::parse_bytes($defaultvalue);
if ($defaultunit && array_key_exists($defaultunit, self::get_units())) {
$this->defaultunit = $defaultunit;
} else {
$this->defaultunit = self::UNIT_MB;
}
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
/**
* Returns selectable units.
*
* @return array
*/
protected static function get_units(): array {
return [
self::UNIT_GB => get_string('sizegb'),
self::UNIT_MB => get_string('sizemb'),
self::UNIT_KB => get_string('sizekb'),
self::UNIT_B => get_string('sizeb'),
];
}
/**
* Converts bytes to some more user friendly string.
*
* @param int $bytes The number of bytes we want to convert from
* @return string
*/
protected static function get_size_text(int $bytes): string {
if (empty($bytes)) {
return get_string('none');
}
return display_size($bytes, 0);
}
/**
* Finds suitable units for given file size.
*
* @param int $bytes The number of bytes
* @return array Parsed file size in the format of ['v' => value, 'u' => unit]
*/
protected static function parse_bytes(int $bytes): array {
foreach (self::get_units() as $unit => $unused) {
if ($bytes % $unit === 0) {
return ['v' => (int)($bytes / $unit), 'u' => $unit];
}
}
return ['v' => (int)$bytes, 'u' => self::UNIT_B];
}
/**
* Get the selected file size as array.
*
* @return array|null An array containing 'v' => xx, 'u' => xx, or null if not set
*/
public function get_setting(): ?array {
$bytes = $this->config_read($this->name);
if (is_null($bytes)) {
return null;
}
$bytes = intval($bytes);
return self::parse_bytes($bytes);
}
/**
* Store the file size as bytes.
*
* @param array $data Must be form 'h' => xx, 'm' => xx
* @return string The error string if any
*/
public function write_setting($data): string {
if (!is_array($data)) {
return '';
}
if (!is_numeric($data['v']) || $data['v'] < 0) {
return get_string('errorsetting', 'admin');
}
// Calculate size in bytes, ensuring we don't overflow PHP_INT_MAX.
$bytes = $data['v'] * $data['u'];
$result = (is_int($bytes) && $this->config_write($this->name, $bytes));
return ($result ? '' : get_string('errorsetting', 'admin'));
}
/**
* Returns file size text+select fields.
*
* @param array $data The current setting value. Must be form 'v' => xx, 'u' => xx.
* @param string $query Admin search query to be highlighted.
* @return string File size text+select fields and wrapping div(s).
*/
public function output_html($data, $query = ''): string {
global $OUTPUT;
$default = $this->get_defaultsetting();
if (is_number($default)) {
$defaultinfo = self::get_size_text($default);
} else if (is_array($default)) {
$defaultinfo = self::get_size_text($default['v'] * $default['u']);
} else {
$defaultinfo = null;
}
$inputid = $this->get_id() . 'v';
$units = self::get_units();
$defaultunit = $this->defaultunit;
$context = (object) [
'id' => $this->get_id(),
'name' => $this->get_full_name(),
'value' => $data['v'],
'readonly' => $this->is_readonly(),
'options' => array_map(function($unit, $title) use ($data, $defaultunit) {
return [
'value' => $unit,
'name' => $title,
'selected' => ($data['v'] == 0 && $unit == $defaultunit) || $unit == $data['u']
];
}, array_keys($units), $units)
];
$element = $OUTPUT->render_from_template('core_admin/setting_configfilesize', $context);
return format_admin_setting($this, $this->visiblename, $element, $this->description, $inputid, '', $defaultinfo, $query);
}
}
@@ -1,37 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* A settings page which can be viewed with a link directly.
*
* @package core_admin
* @copyright 2021 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
use moodle_url;
interface linkable_settings_page {
/**
* Get the URL to view this settings page.
*
* @return moodle_url
*/
public function get_settings_page_url(): moodle_url;
}
@@ -1,74 +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/>.
/**
* Payment gateway admin setting.
*
* @package core_admin
* @copyright 2020 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
/**
* Generic class for managing plugins in a table that allows re-ordering and enable/disable of each plugin.
*/
class manage_payment_gateway_plugins extends \admin_setting_manage_plugins {
/**
* Get the admin settings section title (use get_string).
*
* @return string
*/
public function get_section_title() {
return get_string('type_paygw_plural', 'plugin');
}
/**
* Get the type of plugin to manage.
*
* @return string
*/
public function get_plugin_type() {
return 'paygw';
}
/**
* Get the name of the second column.
*
* @return string
*/
public function get_info_column_name() {
return get_string('supportedcurrencies', 'core_payment');
}
/**
* Get the type of plugin to manage.
*
* @param plugininfo The plugin info class.
* @return string
*/
public function get_info_column($plugininfo) {
$codes = $plugininfo->get_supported_currencies();
$currencies = [];
foreach ($codes as $c) {
$currencies[$c] = new \lang_string($c, 'core_currencies');
}
return implode(get_string('listsep', 'langconfig') . ' ', $currencies);
}
}
@@ -1,121 +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/>.
/**
* Admin setting to show current scheduled task's status.
*
* @package core
* @copyright 2021 Universitat Rovira i Virgili
* @author Jordi Pujol-Ahulló <jpahullo@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/moodlelib.php');
use admin_setting_description;
use core\task\manager;
use core\task\scheduled_task;
use html_writer;
use lang_string;
use moodle_url;
use stdClass;
/**
* This admin setting tells whether a given scheduled task is enabled, providing a link to its configuration page.
*
* The goal of this setting is to help contextualizing the configuration settings with related scheduled task status,
* providing the big picture of that part of the system.
*
* @package core
* @copyright 2021 Universitat Rovira i Virgili
* @author Jordi Pujol-Ahulló <jpahullo@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class setting_scheduled_task_status extends admin_setting_description {
/**
* @var string fully qualified class name of a scheduled task.
*/
private $classname;
/**
* @var string additional text to append to the description.
*/
private $extradescription;
/**
* setting_scheduled_task_status constructor.
* @param string $name unique setting name.
* @param string $scheduledtaskclassname full classpath class name of the scheduled task.
* @param string $extradescription extra detail to append to the scheduled task status to add context in the setting
* page.
*/
public function __construct(string $name, string $scheduledtaskclassname, string $extradescription = '') {
$visiblename = new lang_string('task_status', 'admin');
$this->classname = $scheduledtaskclassname;
$this->extradescription = $extradescription;
parent::__construct($name, $visiblename, '');
}
/**
* Calculates lazily the content of the description.
* @param mixed $data nothing expected in this case.
* @param string $query nothing expected in this case.
* @return string the HTML content to print for this setting.
*/
public function output_html($data, $query = ''): string {
if (empty($this->description)) {
$this->description = $this->get_task_description();
}
return parent::output_html($data, $query);
}
/**
* Returns the HTML to print as the description.
* @return string description to be printed.
*/
private function get_task_description(): string {
$task = manager::get_scheduled_task($this->classname);
if ($task->is_enabled()) {
$taskenabled = get_string('enabled', 'admin');
} else {
$taskenabled = get_string('disabled', 'admin');
}
$taskenabled = strtolower($taskenabled);
$gotourl = new moodle_url(
'/admin/tool/task/scheduledtasks.php',
[],
scheduled_task::get_html_id($this->classname)
);
if (!empty($this->extradescription)) {
$this->extradescription = '<br />' . $this->extradescription;
}
$taskdetail = new stdClass();
$taskdetail->class = $this->classname;
$taskdetail->name = $task->get_name();
$taskdetail->status = $taskenabled;
$taskdetail->gotourl = $gotourl->out(false);
$taskdetail->extradescription = $this->extradescription;
return html_writer::tag('p', get_string('task_status_desc', 'admin', $taskdetail));
}
}
-71
View File
@@ -1,71 +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/>.
namespace core_admin\output;
use moodle_url;
use renderable;
use renderer_base;
use stdClass;
use templatable;
/**
* Theme selector renderable.
*
* @package core_admin
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class theme_selector implements renderable, templatable {
/** @var array $themedata Theme data to pass to the template. */
private $themedata = null;
/** @var bool Whether $CFG->theme is defined in config.php. */
private $definedinconfig;
/**
* Constructor.
*
* @param array $themedata Theme data used for template.
* @param bool $definedinconfig Whether $CFG->theme is defined in config.php.
*/
public function __construct(array $themedata, bool $definedinconfig = false) {
$this->themedata = $themedata;
$this->definedinconfig = $definedinconfig;
}
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param renderer_base $output Renderer base.
* @return stdClass
*/
public function export_for_template(renderer_base $output): stdClass {
$data = new stdClass();
// Theme data used to populate cards and modal.
$data->themes = $this->themedata;
// Reset theme caches button.
$reseturl = new moodle_url('/admin/themeselector.php', ['sesskey' => sesskey(), 'reset' => 1]);
$resetbutton = new \single_button($reseturl, get_string('themeresetcaches', 'admin'), 'post',
\single_button::BUTTON_SECONDARY);
$data->resetbutton = $resetbutton->export_for_template($output);
$data->definedinconfig = $this->definedinconfig;
return $data;
}
}
-41
View File
@@ -1,41 +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/>.
/**
* Privacy Subsystem implementation for core_admin.
*
* @package core_admin
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for core_admin implementing null_provider.
*
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason(): string {
return 'privacy:metadata';
}
}
@@ -1,128 +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/>.
declare(strict_types=1);
namespace core_admin\reportbuilder\datasource;
use core_admin\reportbuilder\local\entities\task_log;
use core_reportbuilder\datasource;
use core_reportbuilder\local\entities\user;
use core_reportbuilder\local\filters\select;
/**
* Task logs datasource
*
* @package core_admin
* @copyright 2022 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_logs extends datasource {
/**
* Return user friendly name of the report source
*
* @return string
*/
public static function get_name(): string {
return get_string('tasklogs', 'core_admin');
}
/**
* Initialise report
*/
protected function initialise(): void {
$tasklogentity = new task_log();
$tasklogalias = $tasklogentity->get_table_alias('task_log');
$this->set_main_table('task_log', $tasklogalias);
$this->add_entity($tasklogentity);
// Join the user entity to represent the associated user.
$userentity = new user();
$useralias = $userentity->get_table_alias('user');
$this->add_entity($userentity->add_join("
LEFT JOIN {user} {$useralias}
ON {$useralias}.id = {$tasklogalias}.userid")
);
// Add report elements from each of the entities we added to the report.
$this->add_all_from_entities();
}
/**
* Return the columns that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_columns(): array {
return [
'task_log:name',
'task_log:starttime',
'task_log:duration',
'task_log:result',
];
}
/**
* Return the column sorting that will be added to the report upon creation
*
* @return int[]
*/
public function get_default_column_sorting(): array {
return [
'task_log:starttime' => SORT_DESC,
];
}
/**
* Return the filters that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_filters(): array {
return [
'task_log:timestart',
'task_log:result',
];
}
/**
* Return the conditions that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_conditions(): array {
return [
'task_log:type',
'task_log:timestart',
'task_log:result',
];
}
/**
* Return the condition values that will be set for the report upon creation
*
* @return array
*/
public function get_default_condition_values(): array {
return [
'task_log:type_operator' => select::EQUAL_TO,
'task_log:type_value' => \core\task\database_logger::TYPE_SCHEDULED,
];
}
}
@@ -1,429 +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/>.
namespace core_admin\reportbuilder\local\entities;
use core_reportbuilder\local\filters\date;
use core_reportbuilder\local\filters\duration;
use core_reportbuilder\local\filters\number;
use core_reportbuilder\local\filters\select;
use core_reportbuilder\local\filters\text;
use core_reportbuilder\local\filters\autocomplete;
use core_reportbuilder\local\helpers\format;
use lang_string;
use core_reportbuilder\local\entities\base;
use core_reportbuilder\local\report\column;
use core_reportbuilder\local\report\filter;
use stdClass;
use core_collator;
/**
* Task log entity class implementation
*
* @package core_admin
* @copyright 2021 David Matamoros <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_log extends base {
/** @var int Result success */
protected const SUCCESS = 0;
/** @var int Result failed */
protected const FAILED = 1;
/**
* Database tables that this entity uses
*
* @return string[]
*/
protected function get_default_tables(): array {
return [
'task_log',
];
}
/**
* The default title for this entity in the list of columns/conditions/filters in the report builder
*
* @return lang_string
*/
protected function get_default_entity_title(): lang_string {
return new lang_string('entitytasklog', 'admin');
}
/**
* Initialise the entity
*
* @return base
*/
public function initialise(): base {
$columns = $this->get_all_columns();
foreach ($columns as $column) {
$this->add_column($column);
}
// All the filters defined by the entity can also be used as conditions.
$filters = $this->get_all_filters();
foreach ($filters as $filter) {
$this
->add_filter($filter)
->add_condition($filter);
}
return $this;
}
/**
* Returns list of all available columns
*
* @return column[]
*/
protected function get_all_columns(): array {
global $DB;
$tablealias = $this->get_table_alias('task_log');
// Name column.
$columns[] = (new column(
'name',
new lang_string('name'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("$tablealias.classname")
->set_is_sortable(true)
->add_callback(static function(string $classname): string {
$output = '';
if (class_exists($classname)) {
$task = new $classname;
if ($task instanceof \core\task\task_base) {
$output = $task->get_name();
}
}
$output .= \html_writer::tag('div', "\\{$classname}", [
'class' => 'small text-muted',
]);
return $output;
});
// Component column.
$columns[] = (new column(
'component',
new lang_string('plugin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("{$tablealias}.component")
->set_is_sortable(true);
// Type column.
$columns[] = (new column(
'type',
new lang_string('tasktype', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("{$tablealias}.type")
->set_is_sortable(true)
->add_callback(static function($value): string {
if (\core\task\database_logger::TYPE_SCHEDULED === (int) $value) {
return get_string('task_type:scheduled', 'admin');
}
return get_string('task_type:adhoc', 'admin');
});
// Start time column.
$columns[] = (new column(
'starttime',
new lang_string('task_starttime', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TIMESTAMP)
->add_field("{$tablealias}.timestart")
->set_is_sortable(true)
->add_callback([format::class, 'userdate'], get_string('strftimedatetimeshortaccurate', 'core_langconfig'));
// End time column.
$columns[] = (new column(
'endtime',
new lang_string('task_endtime', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TIMESTAMP)
->add_field("{$tablealias}.timeend")
->set_is_sortable(true)
->add_callback([format::class, 'userdate'], get_string('strftimedatetimeshortaccurate', 'core_langconfig'));
// Duration column.
$columns[] = (new column(
'duration',
new lang_string('task_duration', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_FLOAT)
->add_field("{$tablealias}.timeend - {$tablealias}.timestart", 'duration')
->set_is_sortable(true)
->add_callback(static function(float $value): string {
$duration = round($value, 2);
if (empty($duration)) {
// The format_time function returns 'now' when the difference is exactly 0.
// Note: format_time performs concatenation in exactly this fashion so we should do this for consistency.
return '0 ' . get_string('secs', 'moodle');
}
return format_time($duration);
});
// Hostname column.
$columns[] = (new column(
'hostname',
new lang_string('hostname', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("$tablealias.hostname")
->set_is_sortable(true);
// PID column.
$columns[] = (new column(
'pid',
new lang_string('pid', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_field("{$tablealias}.pid")
->set_is_sortable(true)
// Although this is an integer column, it doesn't make sense to perform numeric aggregation on it.
->set_disabled_aggregation(['avg', 'count', 'countdistinct', 'max', 'min', 'sum']);
// Database column.
$columns[] = (new column(
'database',
new lang_string('task_dbstats', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_fields("{$tablealias}.dbreads, {$tablealias}.dbwrites")
->set_is_sortable(true, ["{$tablealias}.dbreads", "{$tablealias}.dbwrites"])
->add_callback(static function(int $value, stdClass $row): string {
$output = '';
$output .= \html_writer::div(get_string('task_stats:dbreads', 'admin', $row->dbreads));
$output .= \html_writer::div(get_string('task_stats:dbwrites', 'admin', $row->dbwrites));
return $output;
})
// Although this is an integer column, it doesn't make sense to perform numeric aggregation on it.
->set_disabled_aggregation(['avg', 'count', 'countdistinct', 'max', 'min', 'sum']);
// Database reads column.
$columns[] = (new column(
'dbreads',
new lang_string('task_dbreads', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_fields("{$tablealias}.dbreads")
->set_is_sortable(true);
// Database writes column.
$columns[] = (new column(
'dbwrites',
new lang_string('task_dbwrites', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_fields("{$tablealias}.dbwrites")
->set_is_sortable(true);
// Result column.
$columns[] = (new column(
'result',
new lang_string('task_result', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_BOOLEAN)
// For accurate aggregation, we need to return boolean success = true by xor'ing the field value.
->add_field($DB->sql_bitxor("{$tablealias}.result", 1), 'success')
->set_is_sortable(true)
->add_callback(static function(bool $success): string {
if (!$success) {
return get_string('task_result:failed', 'admin');
}
return get_string('success');
});
return $columns;
}
/**
* Return list of all available filters
*
* @return filter[]
*/
protected function get_all_filters(): array {
global $DB;
$tablealias = $this->get_table_alias('task_log');
// Name filter (Filter by classname).
$filters[] = (new filter(
autocomplete::class,
'name',
new lang_string('classname', 'tool_task'),
$this->get_entity_name(),
"{$tablealias}.classname"
))
->add_joins($this->get_joins())
->set_options_callback(static function(): array {
global $DB;
$classnames = $DB->get_fieldset_sql('SELECT DISTINCT classname FROM {task_log} ORDER BY classname ASC');
$options = [];
foreach ($classnames as $classname) {
if (class_exists($classname)) {
$task = new $classname;
$options[$classname] = $task->get_name();
}
}
core_collator::asort($options);
return $options;
});
// Component filter.
$filters[] = (new filter(
text::class,
'component',
new lang_string('plugin'),
$this->get_entity_name(),
"{$tablealias}.component"
))
->add_joins($this->get_joins());
// Type filter.
$filters[] = (new filter(
select::class,
'type',
new lang_string('tasktype', 'admin'),
$this->get_entity_name(),
"{$tablealias}.type"
))
->add_joins($this->get_joins())
->set_options([
\core\task\database_logger::TYPE_ADHOC => new lang_string('task_type:adhoc', 'admin'),
\core\task\database_logger::TYPE_SCHEDULED => new lang_string('task_type:scheduled', 'admin'),
]);
// Output filter (Filter by task output).
$filters[] = (new filter(
text::class,
'output',
new lang_string('task_logoutput', 'admin'),
$this->get_entity_name(),
$DB->sql_cast_to_char("{$tablealias}.output")
))
->add_joins($this->get_joins());
// Start time filter.
$filters[] = (new filter(
date::class,
'timestart',
new lang_string('task_starttime', 'admin'),
$this->get_entity_name(),
"{$tablealias}.timestart"
))
->add_joins($this->get_joins())
->set_limited_operators([
date::DATE_ANY,
date::DATE_RANGE,
date::DATE_PREVIOUS,
date::DATE_CURRENT,
]);
// End time.
$filters[] = (new filter(
date::class,
'timeend',
new lang_string('task_endtime', 'admin'),
$this->get_entity_name(),
"{$tablealias}.timeend"
))
->add_joins($this->get_joins())
->set_limited_operators([
date::DATE_ANY,
date::DATE_RANGE,
date::DATE_PREVIOUS,
date::DATE_CURRENT,
]);
// Duration filter.
$filters[] = (new filter(
duration::class,
'duration',
new lang_string('task_duration', 'admin'),
$this->get_entity_name(),
"{$tablealias}.timeend - {$tablealias}.timestart"
))
->add_joins($this->get_joins());
// Database reads.
$filters[] = (new filter(
number::class,
'dbreads',
new lang_string('task_dbreads', 'admin'),
$this->get_entity_name(),
"{$tablealias}.dbreads"
))
->add_joins($this->get_joins());
// Database writes.
$filters[] = (new filter(
number::class,
'dbwrites',
new lang_string('task_dbwrites', 'admin'),
$this->get_entity_name(),
"{$tablealias}.dbwrites"
))
->add_joins($this->get_joins());
// Result filter.
$filters[] = (new filter(
select::class,
'result',
new lang_string('task_result', 'admin'),
$this->get_entity_name(),
"{$tablealias}.result"
))
->add_joins($this->get_joins())
->set_options([
self::SUCCESS => get_string('success'),
self::FAILED => get_string('task_result:failed', 'admin'),
]);
return $filters;
}
}
@@ -1,108 +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/>.
declare(strict_types=1);
namespace core_admin\reportbuilder\local\filters;
use core\context\system;
use core_course_category;
use MoodleQuickForm;
use core_reportbuilder\local\filters\base;
use core_reportbuilder\local\helpers\database;
/**
* Course role report filter (by role, category, course)
*
* The provided filter field SQL must refer/return an expression for the user ID (e.g. "{$user}.id")
*
* @package core_admin
* @copyright 2023 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class courserole extends base {
/**
* Setup form
*
* @param MoodleQuickForm $mform
*/
public function setup_form(MoodleQuickForm $mform): void {
$elements = [];
// Role.
$elements['role'] = $mform->createElement('select', "{$this->name}_role", get_string('rolefullname', 'core_role'),
[0 => get_string('anyrole', 'core_filters')] + get_default_enrol_roles(system::instance()));
// Category.
$elements['category'] = $mform->createElement('select', "{$this->name}_category", get_string('category'),
[0 => get_string('anycategory', 'core_filters')] + core_course_category::make_categories_list());
// Course.
$elements['course'] = $mform->createElement('text', "{$this->name}_course", get_string('shortnamecourse'));
$mform->setType("{$this->name}_course", PARAM_RAW_TRIMMED);
$mform->addGroup($elements, "{$this->name}_group", $this->get_header(), '', false)
->setHiddenLabel(true);
}
/**
* Return filter SQL
*
* @param array $values
* @return array
*/
public function get_sql_filter(array $values): array {
[$fieldsql, $params] = $this->filter->get_field_sql_and_params();
[$contextalias, $rolealias, $coursealias] = database::generate_aliases(3);
[$roleparam, $categoryparam, $courseparam] = database::generate_param_names(3);
// Role.
$role = (int) ($values["{$this->name}_role"] ?? 0);
if ($role > 0) {
$selects[] = "{$rolealias}.roleid = :{$roleparam}";
$params[$roleparam] = $role;
}
// Category.
$category = (int) ($values["{$this->name}_category"] ?? 0);
if ($category > 0) {
$selects[] = "{$coursealias}.category = :{$categoryparam}";
$params[$categoryparam] = $category;
}
// Course.
$course = trim($values["{$this->name}_course"] ?? '');
if ($course !== '') {
$selects[] = "{$coursealias}.shortname = :{$courseparam}";
$params[$courseparam] = $course;
}
// Filter values are not set.
if (empty($selects)) {
return ['', []];
}
return ["{$fieldsql} IN (
SELECT {$rolealias}.userid
FROM {role_assignments} {$rolealias}
JOIN {context} {$contextalias} ON {$contextalias}.id = {$rolealias}.contextid AND {$contextalias}.contextlevel = 50
JOIN {course} {$coursealias} ON {$coursealias}.id = {$contextalias}.instanceid
WHERE " . implode(' AND ', $selects) . "
)", $params];
}
}
@@ -1,159 +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/>.
namespace core_admin\reportbuilder\local\systemreports;
use context_system;
use core_admin\reportbuilder\local\entities\task_log;
use core_reportbuilder\local\entities\user;
use core_reportbuilder\local\report\action;
use lang_string;
use moodle_url;
use pix_icon;
use core_reportbuilder\system_report;
/**
* Task logs system report class implementation
*
* @package core_admin
* @copyright 2021 David Matamoros <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_logs extends system_report {
/**
* Initialise report, we need to set the main table, load our entities and set columns/filters
*/
protected function initialise(): void {
// Our main entity, it contains all of the column definitions that we need.
$entitymain = new task_log();
$entitymainalias = $entitymain->get_table_alias('task_log');
$this->set_main_table('task_log', $entitymainalias);
$this->add_entity($entitymain);
// Any columns required by actions should be defined here to ensure they're always available.
$this->add_base_fields("{$entitymainalias}.id");
// We can join the "user" entity to our "main" entity and use the fullname column from the user entity.
$entityuser = new user();
$entituseralias = $entityuser->get_table_alias('user');
$this->add_entity($entityuser->add_join(
"LEFT JOIN {user} {$entituseralias} ON {$entituseralias}.id = {$entitymainalias}.userid"
));
// Now we can call our helper methods to add the content we want to include in the report.
$this->add_columns();
$this->add_filters();
$this->add_actions();
// Set if report can be downloaded.
$this->set_downloadable(true, get_string('tasklogs', 'admin'));
}
/**
* Validates access to view this report
*
* @return bool
*/
protected function can_view(): bool {
return has_capability('moodle/site:config', context_system::instance());
}
/**
* Get the visible name of the report
*
* @return string
*/
public static function get_name(): string {
return get_string('entitytasklog', 'admin');
}
/**
* Adds the columns we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
public function add_columns(): void {
$columns = [
'task_log:name',
'task_log:type',
'user:fullname',
'task_log:starttime',
'task_log:duration',
'task_log:hostname',
'task_log:pid',
'task_log:database',
'task_log:result',
];
$this->add_columns_from_entities($columns);
// It's possible to override the display name of a column, if you don't want to use the value provided by the entity.
if ($column = $this->get_column('user:fullname')) {
$column->set_title(new lang_string('user', 'admin'));
}
// It's possible to set a default initial sort direction for one column.
$this->set_initial_sort_column('task_log:starttime', SORT_DESC);
}
/**
* Adds the filters we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
protected function add_filters(): void {
$filters = [
'task_log:name',
'task_log:type',
'task_log:output',
'task_log:result',
'task_log:timestart',
'task_log:duration',
];
$this->add_filters_from_entities($filters);
}
/**
* Add the system report actions. An extra column will be appended to each row, containing all actions added here
*
* Note the use of ":id" placeholder which will be substituted according to actual values in the row
*/
protected function add_actions(): void {
// Action to view individual task log on a popup window.
$this->add_action((new action(
new moodle_url('/admin/tasklogs.php', ['logid' => ':id']),
new pix_icon('e/search', ''),
[],
true,
new lang_string('view'),
)));
// Action to download individual task log.
$this->add_action((new action(
new moodle_url('/admin/tasklogs.php', ['logid' => ':id', 'download' => true]),
new pix_icon('t/download', ''),
[],
false,
new lang_string('download'),
)));
}
}
@@ -1,417 +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/>.
namespace core_admin\reportbuilder\local\systemreports;
use core_admin\reportbuilder\local\filters\courserole;
use core\context\system;
use core_cohort\reportbuilder\local\entities\cohort;
use core_cohort\reportbuilder\local\entities\cohort_member;
use core_reportbuilder\local\entities\user;
use core_reportbuilder\local\filters\boolean_select;
use core_reportbuilder\local\helpers\database;
use core_reportbuilder\local\helpers\user_profile_fields;
use core_reportbuilder\local\report\action;
use core_reportbuilder\local\report\filter;
use core_reportbuilder\system_report;
use core_role\reportbuilder\local\entities\role;
use core_user\fields;
use lang_string;
use moodle_url;
use pix_icon;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/authlib.php');
require_once($CFG->libdir.'/enrollib.php');
require_once($CFG->dirroot.'/user/lib.php');
/**
* Browse users system report class implementation
*
* @package core_admin
* @copyright 2023 David Carrillo <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class users extends system_report {
/**
* Initialise report, we need to set the main table, load our entities and set columns/filters
*/
protected function initialise(): void {
global $CFG;
// Our main entity, it contains all of the column definitions that we need.
$entityuser = new user();
$entityuseralias = $entityuser->get_table_alias('user');
$this->set_main_table('user', $entityuseralias);
$this->add_entity($entityuser);
// Any columns required by actions should be defined here to ensure they're always available.
$fullnamefields = array_map(fn($field) => "{$entityuseralias}.{$field}", fields::get_name_fields());
$this->add_base_fields("{$entityuseralias}.id, {$entityuseralias}.confirmed, {$entityuseralias}.mnethostid,
{$entityuseralias}.suspended, {$entityuseralias}.username, " . implode(', ', $fullnamefields));
if ($this->get_parameter('withcheckboxes', false, PARAM_BOOL)) {
$canviewfullnames = has_capability('moodle/site:viewfullnames', \context_system::instance());
$this->set_checkbox_toggleall(static function(\stdClass $row) use ($canviewfullnames): array {
return [$row->id, fullname($row, $canviewfullnames)];
});
}
$paramguest = database::generate_param_name();
$this->add_base_condition_sql("{$entityuseralias}.deleted <> 1 AND {$entityuseralias}.id <> :{$paramguest}",
[$paramguest => $CFG->siteguest]);
$entitycohortmember = new cohort_member();
$entitycohortmemberalias = $entitycohortmember->get_table_alias('cohort_members');
$this->add_entity($entitycohortmember
->add_joins($entitycohortmember->get_joins())
->add_join("LEFT JOIN {cohort_members} {$entitycohortmemberalias}
ON {$entityuseralias}.id = {$entitycohortmemberalias}.userid")
);
$entitycohort = new cohort();
$entitycohortalias = $entitycohort->get_table_alias('cohort');
$this->add_entity($entitycohort
->add_joins($entitycohort->get_joins())
->add_joins($entitycohortmember->get_joins())
->add_join("LEFT JOIN {cohort} {$entitycohortalias}
ON {$entitycohortalias}.id = {$entitycohortmemberalias}.cohortid")
);
// Join the role entity (Needed for the system role filter).
$roleentity = new role();
$role = $roleentity->get_table_alias('role');
$this->add_entity($roleentity
->add_join("LEFT JOIN (
SELECT DISTINCT r0.id, ras.userid
FROM {role} r0
JOIN {role_assignments} ras ON ras.roleid = r0.id
WHERE ras.contextid = ".SYSCONTEXTID."
) {$role} ON {$role}.userid = {$entityuseralias}.id")
);
// Now we can call our helper methods to add the content we want to include in the report.
$this->add_columns();
$this->add_filters();
$this->add_actions();
// Set if report can be downloaded.
$this->set_downloadable(true);
}
/**
* Validates access to view this report
*
* @return bool
*/
protected function can_view(): bool {
return has_any_capability(['moodle/user:update', 'moodle/user:delete'], system::instance());
}
/**
* Adds the columns we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
public function add_columns(): void {
$entityuser = $this->get_entity('user');
$entityuseralias = $entityuser->get_table_alias('user');
$this->add_column($entityuser->get_column('fullnamewithpicturelink'));
// Include identity field columns.
$identitycolumns = $entityuser->get_identity_columns($this->get_context());
foreach ($identitycolumns as $identitycolumn) {
$this->add_column($identitycolumn);
}
// Add "Last access" column.
$this->add_column(($entityuser->get_column('lastaccess'))
->set_callback(static function ($value, \stdClass $row): string {
if ($row->lastaccess) {
return format_time(time() - $row->lastaccess);
}
return get_string('never');
})
);
if ($column = $this->get_column('user:fullnamewithpicturelink')) {
$column
->add_fields("{$entityuseralias}.suspended, {$entityuseralias}.confirmed")
->add_callback(static function(string $fullname, \stdClass $row): string {
if ($row->suspended) {
$fullname .= ' ' . \html_writer::tag('span', get_string('suspended', 'moodle'),
['class' => 'badge badge-secondary ml-1']);
}
if (!$row->confirmed) {
$fullname .= ' ' . \html_writer::tag('span', get_string('confirmationpending', 'admin'),
['class' => 'badge badge-danger ml-1']);
}
return $fullname;
});
}
$this->set_initial_sort_column('user:fullnamewithpicturelink', SORT_ASC);
$this->set_default_no_results_notice(new lang_string('nousersfound', 'moodle'));
}
/**
* Adds the filters we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
protected function add_filters(): void {
$entityuser = $this->get_entity('user');
$entityuseralias = $entityuser->get_table_alias('user');
$filters = [
'user:fullname',
'user:firstname',
'user:lastname',
'user:username',
'user:idnumber',
'user:email',
'user:department',
'user:institution',
'user:city',
'user:country',
'user:confirmed',
'user:suspended',
'user:timecreated',
'user:lastaccess',
'user:timemodified',
'user:auth',
'user:lastip',
'cohort:idnumber',
'role:name',
];
$this->add_filters_from_entities($filters);
// Enrolled in any course filter.
$ue = database::generate_alias();
[$now1, $now2] = database::generate_param_names(2);
$now = time();
$sql = "CASE WHEN ({$entityuseralias}.id IN (
SELECT userid FROM {user_enrolments} {$ue}
WHERE {$ue}.status = " . ENROL_USER_ACTIVE . "
AND ({$ue}.timestart = 0 OR {$ue}.timestart < :{$now1})
AND ({$ue}.timeend = 0 OR {$ue}.timeend > :{$now2})
)) THEN 1 ELSE 0 END";
$this->add_filter((new filter(
boolean_select::class,
'enrolledinanycourse',
new lang_string('anycourses', 'filters'),
$this->get_entity('user')->get_entity_name(),
))
->set_field_sql($sql, [
$now1 => $now,
$now2 => $now,
])
);
// Course role filter.
$this->add_filter((new filter(
courserole::class,
'courserole',
new lang_string('courserole', 'filters'),
$this->get_entity('user')->get_entity_name(),
))
->set_field_sql("{$entityuseralias}.id")
);
// Add user profile fields filters.
$userprofilefields = new user_profile_fields($entityuseralias . '.id', $entityuser->get_entity_name());
foreach ($userprofilefields->get_filters() as $filter) {
$this->add_filter($filter);
}
// Set options for system role filter.
if ($filter = $this->get_filter('role:name')) {
$filter
->set_header(new lang_string('globalrole', 'role'))
->set_options(get_assignable_roles(system::instance()));
}
}
/**
* Add the system report actions. An extra column will be appended to each row, containing all actions added here
*
* Note the use of ":id" placeholder which will be substituted according to actual values in the row
*/
protected function add_actions(): void {
global $DB, $USER;
$contextsystem = system::instance();
// Action to edit users.
$this->add_action((new action(
new moodle_url('/user/editadvanced.php', ['id' => ':id', 'course' => get_site()->id]),
new pix_icon('t/edit', ''),
[],
false,
new lang_string('edit', 'moodle'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && (is_siteadmin($USER) || !is_siteadmin($row));
}));
// Action to suspend users (non mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['suspend' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/show', ''),
[],
false,
new lang_string('suspenduser', 'admin'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended && !is_mnet_remote_user($row) &&
!($row->id == $USER->id || is_siteadmin($row));
}));
// Action to unsuspend users (non mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['unsuspend' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/hide', ''),
[],
false,
new lang_string('unsuspenduser', 'admin'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && $row->suspended && !is_mnet_remote_user($row) &&
!($row->id == $USER->id || is_siteadmin($row));
}));
// Action to unlock users (non mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['unlock' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/unlock', ''),
[],
false,
new lang_string('unlockaccount', 'admin'),
))->add_callback(static function(\stdclass $row) use ($contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && !is_mnet_remote_user($row) &&
login_is_lockedout($row);
}));
// Action to suspend users (mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['acl' => ':id', 'sesskey' => sesskey(), 'accessctrl' => 'deny']),
new pix_icon('t/show', ''),
[],
false,
new lang_string('denyaccess', 'mnet'),
))->add_callback(static function(\stdclass $row) use ($DB, $contextsystem): bool {
if (!$accessctrl = $DB->get_field(table: 'mnet_sso_access_control', return: 'accessctrl',
conditions: ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]
)) {
$accessctrl = 'allow';
}
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended &&
is_mnet_remote_user($row) && $accessctrl == 'allow';
}));
// Action to unsuspend users (mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['acl' => ':id', 'sesskey' => sesskey(), 'accessctrl' => 'allow']),
new pix_icon('t/hide', ''),
[],
false,
new lang_string('allowaccess', 'mnet'),
))->add_callback(static function(\stdclass $row) use ($DB, $contextsystem): bool {
if (!$accessctrl = $DB->get_field(table: 'mnet_sso_access_control', return: 'accessctrl',
conditions: ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]
)) {
$accessctrl = 'allow';
}
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended &&
is_mnet_remote_user($row) && $accessctrl == 'deny';
}));
// Action to delete users.
$this->add_action((new action(
new moodle_url('/admin/user.php', ['delete' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/delete', ''),
[
'class' => 'text-danger',
'data-modal' => 'confirmation',
'data-modal-title-str' => json_encode(['deleteuser', 'admin']),
'data-modal-content-str' => ':deletestr',
'data-modal-yes-button-str' => json_encode(['delete', 'core']),
'data-modal-destination' => ':deleteurl',
],
false,
new lang_string('delete', 'moodle'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
// Populate deletion modal attributes.
$row->deletestr = json_encode([
'deletecheckfull',
'moodle',
fullname($row, true),
]);
$row->deleteurl = (new moodle_url('/admin/user.php', [
'delete' => $row->id,
'confirm' => md5($row->id),
'sesskey' => sesskey(),
]))->out(false);
return has_capability('moodle/user:delete', $contextsystem) &&
!is_mnet_remote_user($row) && $row->id != $USER->id && !is_siteadmin($row);
}));
$this->add_action_divider();
// Action to confirm users.
$this->add_action((new action(
new moodle_url('/admin/user.php', ['confirmuser' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/check', ''),
[],
false,
new lang_string('confirmaccount', 'moodle'),
))->add_callback(static function(\stdclass $row) use ($contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && !$row->confirmed;
}));
// Action to resend email.
$this->add_action((new action(
new moodle_url('/admin/user.php', ['resendemail' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/email', ''),
[],
false,
new lang_string('resendemail', 'moodle'),
))->add_callback(static function(\stdclass $row): bool {
return !$row->confirmed && !is_mnet_remote_user($row);
}));
}
/**
* Row class
*
* @param \stdClass $row
* @return string
*/
public function get_row_class(\stdClass $row): string {
return $row->suspended ? 'text-muted' : '';
}
}
@@ -1,118 +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/>.
namespace core_admin\table;
use core_plugin_manager;
use dml_exception;
use html_writer;
use moodle_url;
use stdClass;
/**
* Activity Module admin settings.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity_management_table extends plugin_management_table {
public function setup() {
$this->set_attribute('id', 'modules');
$this->set_attribute('class', 'admintable generaltable');
parent::setup();
}
protected function get_table_id(): string {
return 'module-administration-table';
}
protected function get_plugintype(): string {
return 'mod';
}
public function guess_base_url(): void {
$this->define_baseurl(
new moodle_url('/admin/modules.php')
);
}
protected function get_action_url(array $params = []): moodle_url {
return new moodle_url('/admin/modules.php', $params);
}
protected function get_column_list(): array {
$columns = parent::get_column_list();
return array_merge(
array_slice($columns, 0, 1, true),
['activities' => get_string('activities')],
array_slice($columns, 1, null, true),
);
}
protected function col_name(stdClass $row): string {
global $OUTPUT;
$status = $row->plugininfo->get_status();
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
return html_writer::span(
get_string('pluginmissingfromdisk', 'core', $row->plugininfo),
'notifyproblem'
);
}
return html_writer::span(
html_writer::img(
$OUTPUT->image_url('monologo', $row->plugininfo->name),
'',
[
'class' => 'icon',
],
) . get_string('modulename', $row->plugininfo->name)
);
}
/**
* Show the number of activities present, with a link to courses containing activity if relevant.
*
* @param mixed $row
* @return string
*/
protected function col_activities(stdClass $row): string {
global $DB, $OUTPUT;
try {
$count = $DB->count_records_select($row->plugininfo->name, "course <> 0");
} catch (dml_exception $e) {
$count = -1;
}
if ($count > 0) {
return $OUTPUT->action_link(
new moodle_url('/course/search.php', [
'modulelist' => $row->plugininfo->name,
]),
$count,
null,
['title' => get_string('showmodulecourse')]
);
} else if ($count < 0) {
return get_string('error');
} else {
return $count;
}
}
}
@@ -1,153 +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/>.
namespace core_admin\table;
use html_writer;
use moodle_url;
use stdClass;
/**
* Tiny admin settings.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class block_management_table extends \core_admin\table\plugin_management_table {
/** @var plugininfo[] A list of blocks which cannot be deleted */
protected array $undeletableblocktypes;
/** @var stdClass[] A list of basic block data */
protected array $blockdata;
/** @var array<string,int> A list of course counts */
protected array $courseblocks;
public function __construct() {
global $DB;
parent::__construct();
$this->undeletableblocktypes = \block_manager::get_undeletable_block_types();
$sql = 'SELECT b.name,
b.id,
COUNT(DISTINCT binst.id) as totalcount
FROM {block} b
LEFT JOIN {block_instances} binst ON binst.blockname = b.name
GROUP BY b.id,
b.name
ORDER BY b.name ASC';
$this->blockdata = $DB->get_records_sql($sql);
$sql = "SELECT blockname
FROM {block_instances}
WHERE pagetypepattern = 'course-view-*'
GROUP BY blockname";
$this->courseblocks = $DB->get_records_sql($sql);
}
protected function get_plugintype(): string {
return 'block';
}
public function guess_base_url(): void {
$this->define_baseurl(
new moodle_url('/admin/blocks.php')
);
}
protected function get_action_url(array $params = []): moodle_url {
return new moodle_url('/admin/blocks.php', $params);
}
protected function get_table_js_module(): string {
return 'core_admin/block_management_table';
}
protected function get_column_list(): array {
$columns = parent::get_column_list();
return array_merge(
array_slice($columns, 0, 1, true),
['instances' => get_string('blockinstances', 'admin')],
array_slice($columns, 1, 2, true),
['protect' => get_string('blockprotect', 'admin')],
array_slice($columns, 3, null, true),
);
}
protected function get_columns_with_help(): array {
return [
'protect' => new \help_icon('blockprotect', 'admin'),
];
}
/**
* Render the instances column
* @param stdClass $row
* @return string
*/
protected function col_instances(stdClass $row): string {
$blockdata = $this->blockdata[$row->plugininfo->name];
if (array_key_exists($blockdata->name, $this->courseblocks)) {
return html_writer::link(
new moodle_url('/course/search.php', [
'blocklist' => $blockdata->id,
]),
$blockdata->totalcount,
);
}
return $blockdata->totalcount;
}
/**
* Render the protect column.
*
* @param stdClass $row
* @return string
*/
protected function col_protect(stdClass $row): string {
global $OUTPUT;
$params = [
'sesskey' => sesskey(),
];
$protected = in_array($row->plugininfo->name, $this->undeletableblocktypes);
$pluginname = $row->plugininfo->displayname;
if ($protected) {
$params['unprotect'] = $row->plugininfo->name;
$icon = $OUTPUT->pix_icon('t/unlock', get_string('blockunprotectblock', 'admin', $pluginname));
} else {
$params['protect'] = $row->plugininfo->name;
$icon = $OUTPUT->pix_icon('t/lock', get_string('blockprotectblock', 'admin', $pluginname));
}
return html_writer::link(
$this->get_action_url($params),
$icon,
[
'data-action' => 'toggleprotectstate',
'data-plugin' => $row->plugin,
'data-target-state' => $protected ? 0 : 1,
],
);
return '';
}
}
@@ -1,63 +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/>.
namespace core_admin\table;
use moodle_url;
/**
* Tiny admin settings.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class editor_management_table extends \core_admin\table\plugin_management_table {
protected function get_plugintype(): string {
return 'editor';
}
public function guess_base_url(): void {
$this->define_baseurl(
new moodle_url('/admin/settings.php', ['section' => 'manageeditors'])
);
}
protected function get_action_url(array $params = []): moodle_url {
return new moodle_url('/admin/editors.php', $params);
}
protected function order_plugins(array $plugins): array {
global $CFG;
// The Editor list is stored in an ordered string.
$activeeditors = explode(',', $CFG->texteditors);
$sortedplugins = [];
foreach ($activeeditors as $editor) {
if (isset($plugins[$editor])) {
$sortedplugins[$editor] = $plugins[$editor];
unset($plugins[$editor]);
}
}
$otherplugins = parent::order_plugins($plugins);
return array_merge(
$sortedplugins,
$otherplugins
);
}
}
-281
View File
@@ -1,281 +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/>.
namespace core_admin\table;
use core_plugin_manager;
use flexible_table;
use html_writer;
use stdClass;
defined('MOODLE_INTERNAL') || die();
require_once("{$CFG->libdir}/tablelib.php");
/**
* Plugin Management table.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class hook_list_table extends flexible_table {
/** @var \core\plugininfo\base[] The plugin list */
protected array $plugins = [];
/** @var int The number of enabled plugins of this type */
protected int $enabledplugincount = 0;
/** @var core_plugin_manager */
protected core_plugin_manager $pluginmanager;
/** @var string The plugininfo class for this plugintype */
protected string $plugininfoclass;
/** @var stdClass[] The list of emitted hooks with metadata */
protected array $emitters;
public function __construct() {
global $CFG;
$this->define_baseurl('/admin/hooks.php');
parent::__construct('core_admin-hook_list_table');
// Add emitted hooks.
$this->emitters = \core\hook\manager::discover_known_hooks();
$this->setup_column_configuration();
$this->setup();
}
/**
* Set up the column configuration for this table.
*/
protected function setup_column_configuration(): void {
$columnlist = [
'details' => get_string('hookname', 'core_admin'),
'callbacks' => get_string('hookcallbacks', 'core_admin'),
'deprecates' => get_string('hookdeprecates', 'core_admin'),
];
$this->define_columns(array_keys($columnlist));
$this->define_headers(array_values($columnlist));
$columnswithhelp = [
'callbacks' => new \help_icon('hookcallbacks', 'admin'),
];
$columnhelp = array_map(function (string $column) use ($columnswithhelp): ?\renderable {
if (array_key_exists($column, $columnswithhelp)) {
return $columnswithhelp[$column];
}
return null;
}, array_keys($columnlist));
$this->define_help_for_headers($columnhelp);
}
/**
* Print the table.
*/
public function out(): void {
// All hook consumers referenced from the db/hooks.php files.
$hookmanager = \core\di::get(\core\hook\manager::class);
$allhooks = (array)$hookmanager->get_all_callbacks();
// Add any unused hooks.
foreach (array_keys($this->emitters) as $classname) {
if (isset($allhooks[$classname])) {
continue;
}
$allhooks[$classname] = [];
}
// Order rows by hook name, putting core first.
\core_collator::ksort($allhooks);
$corehooks = [];
foreach ($allhooks as $classname => $consumers) {
if (str_starts_with($classname, 'core\\')) {
$corehooks[$classname] = $consumers;
unset($allhooks[$classname]);
}
}
$allhooks = array_merge($corehooks, $allhooks);
foreach ($allhooks as $classname => $consumers) {
$this->add_data_keyed(
$this->format_row((object) [
'classname' => $classname,
'callbacks' => $consumers,
]),
$this->get_row_class($classname),
);
}
$this->finish_output(false);
}
protected function col_details(stdClass $row): string {
return $row->classname .
$this->get_description($row) .
html_writer::div($this->get_tags_for_row($row));
}
/**
* Show the name column content.
*
* @param stdClass $row
* @return string
*/
protected function get_description(stdClass $row): string {
if (!array_key_exists($row->classname, $this->emitters)) {
return '';
}
return html_writer::tag(
'small',
clean_text(markdown_to_html($this->emitters[$row->classname]['description']), FORMAT_HTML),
);
}
protected function col_deprecates(stdClass $row): string {
if (!class_exists($row->classname)) {
return '';
}
$deprecates = \core\hook\manager::get_replaced_callbacks($row->classname);
if (count($deprecates) === 0) {
return '';
}
$content = html_writer::start_tag('ul');
foreach ($deprecates as $deprecatedmethod) {
$content .= html_writer::tag('li', $deprecatedmethod);
}
$content .= html_writer::end_tag('ul');
return $content;
}
protected function col_callbacks(stdClass $row): string {
global $CFG;
$hookclass = $row->classname;
$cbinfo = [];
foreach ($row->callbacks as $definition) {
$iscallable = is_callable($definition['callback'], false, $callbackname);
$isoverridden = isset($CFG->hooks_callback_overrides[$hookclass][$definition['callback']]);
$info = "{$callbackname}&nbsp;({$definition['priority']})";
if (!$iscallable) {
$info .= '&nbsp;';
$info .= $this->get_tag(
get_string('error'),
'danger',
get_string('hookcallbacknotcallable', 'core_admin', $callbackname),
);
}
if ($isoverridden) {
// The lang string meaning should be close enough here.
$info .= $this->get_tag(
get_string('hookconfigoverride', 'core_admin'),
'warning',
get_string('hookconfigoverride_help', 'core_admin'),
);
}
$cbinfo[] = $info;
}
if ($cbinfo) {
$output = html_writer::start_tag('ol');
foreach ($cbinfo as $callback) {
$class = '';
if ($definition['disabled']) {
$class = 'dimmed_text';
}
$output .= html_writer::tag('li', $callback, ['class' => $class]);
}
$output .= html_writer::end_tag('ol');
return $output;
} else {
return '';
}
}
/**
* Get the HTML to display the badge with tooltip.
*
* @param string $tag The main text to display
* @param null|string $type The pill type
* @param null|string $tooltip The content of the tooltip
* @return string
*/
protected function get_tag(
string $tag,
?string $type = null,
?string $tooltip = null,
): string {
$attributes = [];
if ($type === null) {
$type = 'info';
}
if ($tooltip) {
$attributes['data-toggle'] = 'tooltip';
$attributes['title'] = $tooltip;
}
return html_writer::span($tag, "badge badge-{$type}", $attributes);
}
/**
* Get the code to display a set of tags for this table row.
*
* @param stdClass $row
* @return string
*/
protected function get_tags_for_row(stdClass $row): string {
if (!array_key_exists($row->classname, $this->emitters)) {
// This hook has been defined in the db/hooks.php file
// but does not refer to a hook in this version of Moodle.
return $this->get_tag(
get_string('hookunknown', 'core_admin'),
'warning',
get_string('hookunknown_desc', 'core_admin'),
);
}
if (!class_exists($row->classname)) {
// This hook has been defined in a hook discovery agent, but the class it refers to could not be found.
return $this->get_tag(
get_string('hookclassmissing', 'core_admin'),
'warning',
get_string('hookclassmissing_desc', 'core_admin'),
);
}
$tags = $this->emitters[$row->classname]['tags'] ?? [];
$taglist = array_map(function($tag): string {
if (is_array($tag)) {
return $this->get_tag(...$tag);
}
return $this->get_tag($tag, 'badge bg-info text-white');
}, $tags);
return implode("\n", $taglist);
}
protected function get_row_class(string $classname): string {
return '';
}
}
@@ -1,71 +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/>.
namespace core_admin\table;
use moodle_url;
use stdClass;
/**
* Media plugin admin settings.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class media_management_table extends \core_admin\table\plugin_management_table {
/** @var array The list of used extensions */
protected array $usedextensions = [];
protected function get_plugintype(): string {
return 'media';
}
protected function get_action_url(array $params = []): moodle_url {
return new moodle_url('/admin/media.php', $params);
}
protected function get_column_list(): array {
$columns = parent::get_column_list();
return array_merge(
array_slice($columns, 0, 1, true),
['supports' => get_string('supports', 'core_media')],
array_slice($columns, 1, null, true),
);
}
protected function col_name(stdClass $row): string {
global $OUTPUT, $PAGE;
$name = $row->plugininfo->name;
if ($PAGE->theme->resolve_image_location('icon', 'media_' . $name, false)) {
$icon = $OUTPUT->pix_icon('icon', '', "media_{$name}", ['class' => 'icon pluginicon']);
} else {
$icon = $OUTPUT->pix_icon('spacer', '', 'moodle', ['class' => 'icon pluginicon noicon']);
}
$help = '';
if (get_string_manager()->string_exists('pluginname_help', 'media_' . $name)) {
$help = '&nbsp;' . $OUTPUT->help_icon('pluginname', 'media_' . $name);
}
return $icon . $row->plugininfo->displayname . $help;
}
protected function col_supports(stdClass $row): string {
return $row->plugininfo->supports($this->usedextensions);
}
}
@@ -1,514 +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/>.
namespace core_admin\table;
use context_system;
use core_plugin_manager;
use core_table\dynamic as dynamic_table;
use flexible_table;
use html_writer;
use moodle_url;
use stdClass;
defined('MOODLE_INTERNAL') || die();
require_once("{$CFG->libdir}/tablelib.php");
/**
* Plugin Management table.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class plugin_management_table extends flexible_table implements dynamic_table {
/** @var \core\plugininfo\base[] The plugin list */
protected array $plugins = [];
/** @var int The number of enabled plugins of this type */
protected int $enabledplugincount = 0;
/** @var core_plugin_manager */
protected core_plugin_manager $pluginmanager;
/** @var string The plugininfo class for this plugintype */
protected string $plugininfoclass;
public function __construct() {
global $CFG;
parent::__construct($this->get_table_id());
require_once($CFG->libdir . '/adminlib.php');
// Fetch the plugininfo class.
$this->pluginmanager = core_plugin_manager::instance();
$this->plugininfoclass = $this->pluginmanager::resolve_plugininfo_class($this->get_plugintype());
$this->guess_base_url();
$this->plugins = $this->get_sorted_plugins();
$this->enabledplugincount = count(array_filter($this->plugins, function ($plugin) {
return $plugin->is_enabled();
}));
$this->setup_column_configuration();
$this->set_filterset(new plugin_management_table_filterset());
$this->setup();
}
/**
* Get the list of sorted plugins.
*
* @return \core\plugininfo\base[]
*/
protected function get_sorted_plugins(): array {
if ($this->plugininfoclass::plugintype_supports_ordering()) {
return $this->plugininfoclass::get_sorted_plugins();
} else {
$plugins = $this->pluginmanager->get_plugins_of_type($this->get_plugintype());
return self::sort_plugins($plugins);
}
}
/**
* Sort the plugins list.
*
* Note: This only applies to plugins which do not support ordering.
*
* @param \core\plugininfo\base[] $plugins
* @return \core\plugininfo\base[]
*/
protected function sort_plugins(array $plugins): array {
// The asort functions work by reference.
\core_collator::asort_objects_by_property($plugins, 'displayname');
return $plugins;
}
/**
* Set up the column configuration for this table.
*/
protected function setup_column_configuration(): void {
$columnlist = $this->get_column_list();
$this->define_columns(array_keys($columnlist));
$this->define_headers(array_values($columnlist));
$columnswithhelp = $this->get_columns_with_help();
$columnhelp = array_map(function (string $column) use ($columnswithhelp): ?\renderable {
if (array_key_exists($column, $columnswithhelp)) {
return $columnswithhelp[$column];
}
return null;
}, array_keys($columnlist));
$this->define_help_for_headers($columnhelp);
}
/**
* Set the standard order of the plugins.
*
* @param array $plugins
* @return array
*/
protected function order_plugins(array $plugins): array {
uasort($plugins, function ($a, $b) {
if ($a->is_enabled() && !$b->is_enabled()) {
return -1;
} else if (!$a->is_enabled() && $b->is_enabled()) {
return 1;
}
return strnatcasecmp($a->name, $b->name);
});
return $plugins;
}
/**
* Get the plugintype for this table.
*
* @return string
*/
abstract protected function get_plugintype(): string;
/**
* Get the action URL for this table.
*
* The action URL is used to perform all actions when JS is not available.
*
* @param array $params
* @return moodle_url
*/
abstract protected function get_action_url(array $params = []): moodle_url;
/**
* Provide a default implementation for guessing the base URL from the action URL.
*/
public function guess_base_url(): void {
$this->define_baseurl($this->get_action_url());
}
/**
* Get the web service method used to toggle state.
*
* @return null|string
*/
protected function get_toggle_service(): ?string {
return 'core_admin_set_plugin_state';
}
/**
* Get the web service method used to order plugins.
*
* @return null|string
*/
protected function get_sortorder_service(): ?string {
return 'core_admin_set_plugin_order';
}
/**
* Get the ID of the table.
*
* @return string
*/
protected function get_table_id(): string {
return 'plugin_management_table-' . $this->get_plugintype();
}
/**
* Get a list of the column titles
* @return string[]
*/
protected function get_column_list(): array {
$columns = [
'name' => get_string('name', 'core'),
'version' => get_string('version', 'core'),
];
if ($this->supports_disabling()) {
$columns['enabled'] = get_string('pluginenabled', 'core_plugin');
}
if ($this->supports_ordering()) {
$columns['order'] = get_string('order', 'core');
}
$columns['settings'] = get_string('settings', 'core');
$columns['uninstall'] = get_string('uninstallplugin', 'core_admin');
return $columns;
}
protected function get_columns_with_help(): array {
return [];
}
/**
* Get the context for this table.
*
* @return context_system
*/
public function get_context(): context_system {
return context_system::instance();
}
/**
* Get the table content.
*/
public function get_content(): string {
ob_start();
$this->out();
$content = ob_get_contents();
ob_end_clean();
return $content;
}
/**
* Print the table.
*/
public function out(): void {
$plugintype = $this->get_plugintype();
foreach ($this->plugins as $plugininfo) {
$plugin = "{$plugintype}_{$plugininfo->name}";
$rowdata = (object) [
'plugin' => $plugin,
'plugininfo' => $plugininfo,
'name' => $plugininfo->displayname,
'version' => $plugininfo->versiondb,
];
$this->add_data_keyed(
$this->format_row($rowdata),
$this->get_row_class($rowdata)
);
}
$this->finish_output(false);
}
/**
* This table is not downloadable.
* @param bool $downloadable
* @return bool
*/
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
public function is_downloadable($downloadable = null): bool {
return false;
}
/**
* Show the name column content.
*
* @param stdClass $row
* @return string
*/
protected function col_name(stdClass $row): string {
$status = $row->plugininfo->get_status();
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
return html_writer::span(
get_string('pluginmissingfromdisk', 'core', $row->plugininfo),
'notifyproblem'
);
}
if ($row->plugininfo->is_installed_and_upgraded()) {
return $row->plugininfo->displayname;
}
return html_writer::span(
$row->plugininfo->displayname,
'notifyproblem'
);
}
/**
* Show the enable/disable column content.
*
* @param stdClass $row
* @return string
*/
protected function col_enabled(stdClass $row): string {
global $OUTPUT;
$enabled = $row->plugininfo->is_enabled();
$params = [
'sesskey' => sesskey(),
'plugin' => $row->plugininfo->name,
'action' => $enabled ? 'disable' : 'enable',
];
if ($enabled) {
$icon = $OUTPUT->pix_icon('t/hide', get_string('disableplugin', 'core_admin', $row->plugininfo->displayname));
} else {
$icon = $OUTPUT->pix_icon('t/show', get_string('enableplugin', 'core_admin', $row->plugininfo->displayname));
}
return html_writer::link(
$this->get_action_url($params),
$icon,
[
'data-toggle-method' => $this->get_toggle_service(),
'data-action' => 'togglestate',
'data-plugin' => $row->plugin,
'data-state' => $enabled ? 1 : 0,
],
);
}
protected function col_order(stdClass $row): string {
global $OUTPUT;
if (!$this->supports_ordering()) {
return '';
}
if (!$row->plugininfo->is_enabled()) {
return '';
}
if ($this->enabledplugincount <= 1) {
// There is only one row.
return '';
}
$hasup = true;
$hasdown = true;
if (empty($this->currentrow)) {
// This is the top row.
$hasup = false;
}
if ($this->currentrow === ($this->enabledplugincount - 1)) {
// This is the last row.
$hasdown = false;
}
if ($this->supports_ordering()) {
$dataattributes = [
'data-method' => $this->get_sortorder_service(),
'data-action' => 'move',
'data-plugin' => $row->plugin,
];
} else {
$dataattributes = [];
}
if ($hasup) {
$upicon = html_writer::link(
$this->get_action_url([
'sesskey' => sesskey(),
'action' => 'up',
'plugin' => $row->plugininfo->name,
]),
$OUTPUT->pix_icon('t/up', get_string('moveup')),
array_merge($dataattributes, ['data-direction' => 'up']),
);
} else {
$upicon = $OUTPUT->spacer();
}
if ($hasdown) {
$downicon = html_writer::link(
$this->get_action_url([
'sesskey' => sesskey(),
'action' => 'down',
'plugin' => $row->plugininfo->name,
]),
$OUTPUT->pix_icon('t/down', get_string('movedown')),
array_merge($dataattributes, ['data-direction' => 'down']),
);
} else {
$downicon = $OUTPUT->spacer();
}
// For now just add the up/down icons.
return html_writer::span($upicon . $downicon);
}
/**
* Show the settings column content.
*
* @param stdClass $row
* @return string
*/
protected function col_settings(stdClass $row): string {
if ($settingsurl = $row->plugininfo->get_settings_url()) {
return html_writer::link($settingsurl, get_string('settings'));
}
return '';
}
/**
* Show the Uninstall column content.
*
* @param stdClass $row
* @return string
*/
protected function col_uninstall(stdClass $row): string {
$status = $row->plugininfo->get_status();
if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
return get_string('status_new', 'core_plugin');
}
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$uninstall = get_string('status_missing', 'core_plugin') . '<br/>';
} else {
$uninstall = '';
}
if ($uninstallurl = $this->pluginmanager->get_uninstall_url($row->plugin)) {
$uninstall .= html_writer::link($uninstallurl, get_string('uninstallplugin', 'core_admin'));
}
return $uninstall;
}
/**
* Get the JS module used to manage this table.
*
* This should be a class which extends 'core_admin/plugin_management_table'.
*
* @return string
*/
protected function get_table_js_module(): string {
return 'core_admin/plugin_management_table';
}
/**
* Add JS specific to this implementation.
*
* @return string
*/
protected function get_dynamic_table_html_end(): string {
global $PAGE;
$PAGE->requires->js_call_amd($this->get_table_js_module(), 'init');
return parent::get_dynamic_table_html_end();
}
/**
* Get any class to add to the row.
*
* @param mixed $row
* @return string
*/
protected function get_row_class($row): string {
$plugininfo = $row->plugininfo;
if ($plugininfo->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
return '';
}
if (!$plugininfo->is_enabled()) {
return 'dimmed_text';
}
return '';
}
public static function get_filterset_class(): string {
return self::class . '_filterset';
}
/**
* Whether this plugin type supports the disabling of plugins.
*
* @return bool
*/
protected function supports_disabling(): bool {
return $this->plugininfoclass::plugintype_supports_disabling();
}
/**
* Whether this table should show ordering fields.
*
* @return bool
*/
protected function supports_ordering(): bool {
return $this->plugininfoclass::plugintype_supports_ordering();
}
/**
* Check if the user has the capability to access this table.
*
* Default implementation for plugin management tables is to require 'moodle/site:config' capability
*
* @return bool Return true if capability check passed.
*/
public function has_capability(): bool {
return has_capability('moodle/site:config', $this->get_context());
}
}
@@ -1,27 +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/>.
namespace core_admin\table;
/**
* This file contains the dynamic interface.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class plugin_management_table_filterset extends \core_table\local\filter\filterset {
}
@@ -1,44 +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/>.
namespace core_admin\table;
use moodle_url;
/**
* Admin tool settings.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_plugin_management_table extends \core_admin\table\plugin_management_table {
protected function get_plugintype(): string {
return 'tool';
}
protected function get_column_list(): array {
$columns = parent::get_column_list();
unset($columns['settings']);
return $columns;
}
protected function get_action_url(array $params = []): moodle_url {
return new moodle_url('/admin/settings.php', array_merge(['section' => 'toolsmanagement'], $params));
}
}
-174
View File
@@ -1,174 +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/>.
/**
* Task executor for adhoc tasks.
*
* @package core
* @subpackage cli
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once("{$CFG->libdir}/clilib.php");
list($options, $unrecognized) = cli_get_params(
[
'help' => false,
'showsql' => false,
'showdebugging' => false,
'execute' => false,
'keep-alive' => 0,
'ignorelimits' => false,
'force' => false,
'id' => null,
'classname' => null,
'taskslimit' => null,
'failed' => false,
], [
'h' => 'help',
'e' => 'execute',
'k' => 'keep-alive',
'i' => 'ignorelimits',
'f' => 'force',
'c' => 'classname',
'l' => 'taskslimit',
]
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$help = <<<EOT
Ad hoc cron tasks.
Options:
-h, --help Print out this help
--showsql Show sql queries before they are executed
--showdebugging Show developer level debugging information
-e, --execute Run all queued adhoc tasks
-k, --keep-alive=N Keep this script alive for N seconds and poll for new adhoc tasks
-i --ignorelimits Ignore task_adhoc_concurrency_limit and task_adhoc_max_runtime limits
-f, --force Run even if cron is disabled
--id Run (failed) task with id
-c, --classname Run tasks with a certain classname (FQN)
-l, --taskslimit=N Run at most N tasks
--failed Run only tasks that failed, ie those with a fail delay
Run all queued tasks:
\$sudo -u www-data /usr/bin/php admin/cli/adhoc_task.php --execute
Run all queued tasks of specific class:
\$sudo -u www-data /usr/bin/php admin/cli/adhoc_task.php --classname=\\\\core_course\\\\task\\\\course_delete_modules
Double backslash for the shell escape reasons.
Run a specific task:
\$sudo -u www-data /usr/bin/php admin/cli/adhoc_task.php --id=123456
Run a specific task with debugging:
\$sudo -u www-data /usr/bin/php admin/cli/adhoc_task.php --id=123456 --showsql --showdebugging
To profile a long running task:
\$sudo -u www-data /usr/bin/php admin/cli/adhoc_task.php --taskslimit=1 --classname='\\some\\class\\name' --ignorelimits
EOT;
if ($options['help']) {
echo $help;
exit(0);
}
if (CLI_MAINTENANCE) {
echo "CLI maintenance mode active, cron execution suspended.\n";
exit(1);
}
if (moodle_needs_upgrading()) {
echo "Moodle upgrade pending, cron execution suspended.\n";
exit(1);
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
// Common debugging options.
if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}
if ($options['showsql']) {
$DB->set_debug(true);
}
if (!empty($CFG->showcronsql)) {
$DB->set_debug(true);
}
if (!empty($CFG->showcrondebugging)) {
set_debugging(DEBUG_DEVELOPER, true);
}
// Process params.
core_php_time_limit::raise();
// Increase memory limit.
raise_memory_limit(MEMORY_EXTRA);
// Emulate normal session - we use admin account by default.
\core\cron::setup_user();
\core\local\cli\shutdown::script_supports_graceful_exit();
$humantimenow = date('r', time());
mtrace("Server Time: {$humantimenow}\n");
$classname = $options['classname'];
// Run a single adhoc task only, if requested.
if (!empty($options['id'])) {
$taskid = (int) $options['id'];
\core\cron::run_adhoc_task($taskid);
exit(0);
}
// Run all failed tasks.
if (!empty($options['failed'])) {
\core\cron::run_failed_adhoc_tasks($classname);
exit(0);
}
// Examine params and determine if we should run.
$execute = (bool) $options['execute'];
$keepalive = empty($options['keep-alive']) ? 0 : (int) $options['keep-alive'];
$taskslimit = empty($options['taskslimit']) ? null : (int) $options['taskslimit'];
$checklimits = empty($options['ignorelimits']);
if ($classname || $keepalive || $taskslimit) {
$execute = true;
}
// Output the help text if no criteria for running the adhoc tasks are given.
if (!$execute) {
echo $help;
exit(0);
}
\core\cron::run_adhoc_tasks(time(), $keepalive, $checklimits, null, $taskslimit, $classname);
+6 -5
View File
@@ -28,8 +28,9 @@
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require(dirname(dirname(dirname(__FILE__))).'/config.php');
require_once($CFG->libdir.'/clilib.php'); // cli only functions
require_once($CFG->libdir.'/cronlib.php');
// now get cli options
list($options, $unrecognized) = cli_get_params(array('help'=>false),
@@ -79,10 +80,10 @@ if (!empty($CFG->showcrondebugging)) {
$starttime = microtime();
// Emulate normal session.
\core\cron::setup_user();
/// emulate normal session
cron_setup_user();
// Start output log.
/// Start output log
$timenow = time();
mtrace("Server Time: ".date('r',$timenow)."\n\n");
@@ -95,4 +96,4 @@ backup_cron_automated_helper::run_automated_backup(backup_cron_automated_helper:
mtrace("Automated cron backups completed correctly");
$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
mtrace("Execution took ".$difftime." seconds");
-135
View File
@@ -1,135 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script allows to do backup.
*
* @package core
* @subpackage cli
* @copyright 2013 Lancaster University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', 1);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
// Now get cli options.
list($options, $unrecognized) = cli_get_params(array(
'courseid' => false,
'courseshortname' => '',
'cmid' => false,
'destination' => '',
'help' => false,
), array('h' => 'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] || !($options['courseid'] || $options['courseshortname'] || $options['cmid'])) {
$help = <<<EOL
Perform backup of the given course or course module.
Options:
--courseid=INTEGER Course ID for backup.
--courseshortname=STRING Course shortname for backup. This option is ignored if courseid is set.
--cmid=INTEGER Course module ID for backup. This option is ignored if courseid or courseshortname is set.
--destination=STRING Path where to store backup file. If not set the backup
will be stored within the course backup file area.
-h, --help Print out this help.
Example:
\$sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 --destination=/moodle/backup/\n
EOL;
echo $help;
die;
}
$admin = get_admin();
if (!$admin) {
mtrace("Error: No admin account was found");
die;
}
// Do we need to store backup somewhere else?
$dir = rtrim($options['destination'], '/');
if (!empty($dir)) {
if (!file_exists($dir) || !is_dir($dir) || !is_writable($dir)) {
mtrace("Destination directory does not exists or not writable.");
die;
}
}
// Check that the course or course module exists.
if ($options['courseid']) {
$course = $DB->get_record('course', array('id' => $options['courseid']), '*', MUST_EXIST);
} else if ($options['courseshortname']) {
$course = $DB->get_record('course', array('shortname' => $options['courseshortname']), '*', MUST_EXIST);
} else if ($options['cmid']) {
$cm = $DB->get_record('course_modules', ['id' => $options['cmid']], '*', MUST_EXIST);
}
cli_heading('Performing backup...');
if (!empty($course)) {
$bc = new backup_controller(backup::TYPE_1COURSE, $course->id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_YES, backup::MODE_GENERAL, $admin->id);
} else if (!empty($cm)) {
$bc = new backup_controller(backup::TYPE_1ACTIVITY, $cm->id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_YES, backup::MODE_GENERAL, $admin->id);
} else {
throw new \moodle_exception('invalidoption');
}
// Set the default filename.
$format = $bc->get_format();
$type = $bc->get_type();
$id = $bc->get_id();
$users = $bc->get_plan()->get_setting('users')->get_value();
$anonymised = $bc->get_plan()->get_setting('anonymize')->get_value();
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $id, $users, $anonymised);
$bc->get_plan()->get_setting('filename')->set_value($filename);
// Execution.
$bc->finish_ui();
$bc->execute_plan();
$results = $bc->get_results();
$file = $results['backup_destination']; // May be empty if file already moved to target location.
// Do we need to store backup somewhere else?
if (!empty($dir)) {
if ($file) {
mtrace("Writing " . $dir.'/'.$filename);
if ($file->copy_content_to($dir.'/'.$filename)) {
$file->delete();
mtrace("Backup completed.");
} else {
mtrace("Destination directory does not exist or is not writable. Leaving the backup in the course backup file area.");
}
}
} else {
if (!empty($course)) {
mtrace("Backup completed, the new file is listed in the backup area of the given course");
} else {
mtrace("Backup completed, the new file is listed in the backup area of the given module");
}
}
$bc->destroy();
exit(0);
-119
View File
@@ -1,119 +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/>.
/**
* Build and store theme CSS.
*
* @package core
* @subpackage cli
* @copyright 2017 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once("$CFG->libdir/clilib.php");
require_once("$CFG->libdir/csslib.php");
require_once("$CFG->libdir/outputlib.php");
$longparams = [
'themes' => null,
'direction' => null,
'help' => false,
'verbose' => false
];
$shortmappings = [
't' => 'themes',
'd' => 'direction',
'h' => 'help',
'v' => 'verbose'
];
// Get CLI params.
list($options, $unrecognized) = cli_get_params($longparams, $shortmappings);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
echo
"Compile the CSS for one or more installed themes.
Existing CSS caches will replaced.
By default all themes will be recompiled unless otherwise specified.
Options:
-t, --themes A comma separated list of themes to be compiled
-d, --direction Only compile a single direction (either ltr or rtl)
-v, --verbose Print info comments to stdout
-h, --help Print out this help
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/build_theme_css.php --themes=boost --direction=ltr
";
die;
}
if (empty($options['verbose'])) {
$trace = new null_progress_trace();
} else {
$trace = new text_progress_trace();
}
cli_heading('Build theme css');
// Determine which themes we need to build.
$themenames = [];
if (is_null($options['themes'])) {
$trace->output('No themes specified. Finding all installed themes.');
$themenames = array_keys(core_component::get_plugin_list('theme'));
} else {
if (is_string($options['themes'])) {
$themenames = explode(',', $options['themes']);
} else {
cli_error('--themes must be a comma separated list of theme names');
}
}
$trace->output('Checking that each theme is correctly installed...');
$themeconfigs = [];
foreach ($themenames as $themename) {
if (is_null(theme_get_config_file_path($themename))) {
cli_error("Unable to find theme config for {$themename}");
}
// Load the config for the theme.
$themeconfigs[] = theme_config::load($themename);
}
$directions = ['ltr', 'rtl'];
if (!is_null($options['direction'])) {
if (!in_array($options['direction'], $directions)) {
cli_error("--direction must be either ltr or rtl");
}
$directions = [$options['direction']];
}
$trace->output('Building CSS for themes: ' . implode(', ', $themenames));
theme_build_css_for_themes($themeconfigs, $directions);
exit(0);
-185
View File
@@ -1,185 +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/>.
/**
* CLI script allowing to get and set config values.
*
* This is technically just a thin wrapper for {@link get_config()} and
* {@link set_config()} functions.
*
* @package core
* @subpackage cli
* @copyright 2017 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
$usage = "Displays the current value of the given site setting. Allows to set it to the given value, too.
Usage:
# php cfg.php [--component=<componentname>] [--json] [--shell-arg]
# php cfg.php --name=<configname> [--component=<componentname>] [--shell-arg] [--no-eol]
# php cfg.php --name=<configname> [--component=<componentname>] --set=<value>
# php cfg.php --name=<configname> [--component=<componentname>] --unset
# php cfg.php [--help|-h]
Options:
-h --help Print this help.
--component=<frankenstyle> Name of the component the variable is part of. Defaults to core.
--name=<configname> Name of the configuration variable to get/set. If missing, print all
configuration variables of the given component.
--set=<value> Set the given variable to this value.
--unset Unset the given variable.
--shell-arg Escape output values so that they can be directly used as shell script arguments.
--json Encode output list of values using JSON notation.
--no-eol Do not include the trailing new line character when printing the value.
The list of all variables of the given component can be printed as
tab-separated list (default) or JSON object (--json). Particular values are
printed as raw text values, optionally escaped so that they can be directly
used as shell script arguments (--shell-arg). Single values are displayed with
trailing new line by default, unless explicitly disabled (--no-eol).
In the read mode, the script exits with success status 0 if the requested value
is found. If the requested variable is not set, the script exits with status 3.
When listing all variables of the component, the exit status is always 0 even
if no variables for the given component are found. When setting/unsetting a
value, the exit status is 0. When attempting to set/unset a value that has
already been hard-set in config.php, the script exits with error status 4. In
case of unexpected error, the script exits with error status 1.
Examples:
# php cfg.php
Prints tab-separated list of all core configuration variables and their values.
# php cfg.php --json
Prints list of all core configuration variables and their values as a JSON object.
# php cfg.php --name=release
Prints the given configuration variable - e.g. \$CFG->release in this case.
# php cfg.php --component=tool_recyclebin
# Prints tab-separated list of the plugin's configuration variables.
# export DATAROOT=\$(php cfg.php --name=dataroot --shell-arg --no-eol)
Stores the given configuration variable in the shell variable, escaped
so that it can be safely used as a shell argument.
# php cfg.php --name=theme --set=classic
Sets the given configuration variable to the given value.
# php cfg.php --name=noemailever --unset
Unsets the previously configured variable.
";
list($options, $unrecognised) = cli_get_params([
'help' => false,
'component' => null,
'name' => null,
'set' => null,
'unset' => false,
'shell-arg' => false,
'json' => false,
'no-eol' => false,
], [
'h' => 'help'
]);
if ($unrecognised) {
$unrecognised = implode(PHP_EOL.' ', $unrecognised);
cli_error(get_string('cliunknowoption', 'core_admin', $unrecognised));
}
if ($options['help']) {
cli_writeln($usage);
exit(2);
}
if ($options['unset'] || $options['set'] !== null) {
// Unset the variable or set it to the given value.
if (empty($options['name'])) {
cli_error('Missing configuration variable name', 2);
}
// Check that the variable is not hard-set in the main config.php already.
$component = $options['component'];
if (!empty($component)) {
$componentsettings = $CFG->forced_plugin_settings[$component] ?? [];
$settinginconfig = array_key_exists($options['name'], $componentsettings);
} else {
$settinginconfig = array_key_exists($options['name'], $CFG->config_php_settings);
}
if ($settinginconfig) {
cli_error('The configuration variable is hard-set in the config.php, unable to change.', 4);
}
$new = $options['set'];
$old = get_config($options['component'], $options['name']);
if ($new !== $old) {
set_config($options['name'], $options['set'], $options['component']);
add_to_config_log($options['name'], $old, $new, $options['component']);
}
exit(0);
}
if ($options['name'] === null) {
// List all variables provided by the component (defaults to core).
$got = get_config($options['component']);
if ($options['json']) {
cli_writeln(json_encode($got));
} else {
foreach ($got as $name => $value) {
if ($options['shell-arg']) {
$value = escapeshellarg($value);
}
cli_writeln($name."\t".$value);
}
}
exit(0);
} else {
// Display the value of a single variable.
$got = get_config($options['component'], $options['name']);
if ($got === false) {
cli_error('No such configuration variable found.', 3);
}
if ($options['shell-arg']) {
$got = escapeshellarg($got);
}
if ($options['json']) {
$got = json_encode($got);
}
if ($options['no-eol']) {
cli_write($got);
} else {
cli_writeln($got);
}
exit(0);
}
-76
View File
@@ -1,76 +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/>.
/**
* Validate that the current db structure matches the install.xml files.
*
* @package core
* @copyright 2014 Totara Learning Solutions Ltd {@link http://www.totaralms.com/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Petr Skoda <petr.skoda@totaralms.com>
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir.'/clilib.php');
$help = "Validate database structure
Options:
-h, --help Print out this help.
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/check_database_schema.php
";
list($options, $unrecognized) = cli_get_params(
array(
'help' => false,
),
array(
'h' => 'help',
)
);
if ($options['help']) {
echo $help;
exit(0);
}
if (empty($CFG->version)) {
echo "Database is not yet installed.\n";
exit(2);
}
$dbmanager = $DB->get_manager();
$schema = $dbmanager->get_install_xml_schema();
if (!$errors = $dbmanager->check_database_schema($schema)) {
echo "Database structure is ok.\n";
exit(0);
}
foreach ($errors as $table => $items) {
cli_separator();
echo "$table\n";
foreach ($items as $item) {
echo " * $item\n";
}
}
cli_separator();
exit(1);
-171
View File
@@ -1,171 +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/>.
/**
* CLI tool for system checks
*
* @package core
* @category check
* @copyright 2020 Brendan Heywood (brendan@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir.'/clilib.php');
use core\check\result;
list($options, $unrecognized) = cli_get_params([
'help' => false,
'filter' => '',
'type' => 'status',
'verbose' => false,
], [
'h' => 'help',
'f' => 'filter',
'v' => 'verbose',
't' => 'type',
]);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$checks = \core\check\manager::get_checks($options['type']);
$types = join(', ', \core\check\manager::TYPES);
$help = "Run Moodle system checks
Options:
-h, --help Print out this help
-f, --filter Filter to a subset of checks
-t, --type Which set of checks? Defaults to 'status'
One of $types
-v, --verbose Show details of all checks, not just failed checks
Example:
sudo -u www-data php admin/cli/checks.php
sudo -u www-data php admin/cli/checks.php -v
sudo -u www-data php admin/cli/checks.php -v --filter=environment
";
if ($options['help']) {
echo $help;
die();
}
$filter = $options['filter'];
if ($filter) {
$checks = array_filter($checks, function($check, $key) use ($filter) {
$ref = $check->get_ref();
return (strpos($ref, $filter) !== false);
}, 1);
}
// These shell exit codes and labels align with the NRPE standard.
$exitcodes = [
result::NA => 0,
result::OK => 0,
result::INFO => 0,
result::UNKNOWN => 3,
result::WARNING => 1,
result::ERROR => 2,
result::CRITICAL => 2,
];
$exitlabel = [
result::NA => 'OK',
result::OK => 'OK',
result::INFO => 'OK',
result::UNKNOWN => 'UNKNOWN',
result::WARNING => 'WARNING',
result::ERROR => 'CRITICAL',
result::CRITICAL => 'CRITICAL',
];
$format = "% 10s| % -60s\n";
$spacer = "----------+--------------------------------------------------------------------\n";
$prefix = ' |';
$output = '';
$header = $exitlabel[result::OK] . ': ' . get_string('checksok', '', $options['type']) . "\n";
$exitcode = $exitcodes[result::OK];
foreach ($checks as $check) {
$ref = $check->get_ref();
$result = $check->get_result();
$status = $result->get_status();
$checkexitcode = $exitcodes[$status];
// Summary is treated as html.
$summary = $result->get_summary();
$summary = html_to_text($summary, 60, false);
if ($checkexitcode > $exitcode) {
$exitcode = $checkexitcode;
$header = $exitlabel[$status] . ': ' . $check->get_name() . " (" . $check->get_ref() . ")\n";
}
if (empty($messages[$status])) {
$messages[$status] = $result;
}
$len = strlen(get_string('status' . $status));
if ($options['verbose'] ||
$status == result::WARNING ||
$status == result::CRITICAL ||
$status == result::ERROR) {
$output .= sprintf(
$format,
$OUTPUT->check_result($result),
sprintf('%s (%s)', $check->get_name(), $ref)
);
$summary = str_replace("\n", "\n" . $prefix . ' ', $summary);
$output .= sprintf( $format, '', ' ' . $summary);
if ($options['verbose']) {
$actionlink = $check->get_action_link();
if ($actionlink) {
$output .= sprintf( $format, '', ' ' . $actionlink->url);
}
$output .= sprintf( $format, '', '');
}
}
}
// Print NRPE header.
print $header;
// Only show the table header if there is anything to show.
if ($output) {
print sprintf($format,
get_string('status'). ' ',
get_string('check')
) . $spacer;
print $output;
}
// NRPE shell exit code.
exit($exitcode);
+10 -135
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -29,32 +30,13 @@
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/clilib.php');
require(dirname(dirname(dirname(__FILE__))).'/config.php');
require_once($CFG->libdir.'/clilib.php'); // cli only functions
require_once($CFG->libdir.'/cronlib.php');
// Now get cli option.
[$options, $unrecognized] = cli_get_params(
[
'help' => false,
'stop' => false,
'list' => false,
'force' => false,
'enable' => false,
'disable' => false,
'disable-wait' => false,
'keep-alive' => null,
],
[
'h' => 'help',
's' => 'stop',
'l' => 'list',
'f' => 'force',
'e' => 'enable',
'd' => 'disable',
'w' => 'disable-wait',
'k' => 'keep-alive',
]
);
// now get cli options
list($options, $unrecognized) = cli_get_params(array('help'=>false),
array('h'=>'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
@@ -63,19 +45,10 @@ if ($unrecognized) {
if ($options['help']) {
$help =
"Execute periodic cron actions.
"Execute periodic cron actions.
Options:
-h, --help Print out this help
-s, --stop Notify all other running cron processes to stop after the current task
-l, --list Show the list of currently running tasks and how long they have been running
-f, --force Execute task even if cron is disabled
-e, --enable Enable cron
-d, --disable Disable cron
-w, --disable-wait=600 Disable cron and wait until all tasks finished or fail after N seconds (optional param)
-k, --keep-alive=N Keep this script alive for N seconds and poll for new tasks
The default value can be set by administrators in:
Site administration > Server > Tasks > Task processing > Keep alive time
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/cli/cron.php
@@ -85,102 +58,4 @@ Example:
die;
}
if ($options['stop']) {
// By clearing the caches this signals to other running processes
// to exit after finishing the current task.
\core\task\manager::clear_static_caches();
die;
}
if ($options['enable']) {
set_config('cron_enabled', 1);
mtrace('Cron has been enabled for the site.');
exit(0);
}
if ($options['disable']) {
set_config('cron_enabled', 0);
\core\task\manager::clear_static_caches();
mtrace('Cron has been disabled for the site.');
exit(0);
}
if ($options['list']) {
$tasks = \core\task\manager::get_running_tasks();
mtrace('The list of currently running tasks:');
$format = "%7s %-12s %-9s %-20s %-52s\n";
printf(
$format,
'PID',
'HOST',
'TYPE',
'TIME',
'CLASSNAME'
);
foreach ($tasks as $task) {
printf(
$format,
$task->pid,
substr($task->hostname, 0, 12),
$task->type,
format_time(time() - $task->timestarted),
substr($task->classname, 0, 52)
);
}
exit(0);
}
if ($wait = $options['disable-wait']) {
$started = time();
if (true === $wait) {
// Default waiting time.
$waitsec = 600;
} else {
$waitsec = $wait;
$wait = true;
}
set_config('cron_enabled', 0);
\core\task\manager::clear_static_caches();
mtrace('Cron has been disabled for the site.');
mtrace('Allocating ' . format_time($waitsec) . ' for the tasks to finish.');
$lastcount = 0;
while ($wait) {
$tasks = \core\task\manager::get_running_tasks();
if (count($tasks) == 0) {
mtrace('');
mtrace('All scheduled and adhoc tasks finished.');
exit(0);
}
if (time() - $started >= $waitsec) {
mtrace('');
mtrace('Wait time (' . format_time($waitsec) . ') elapsed, but ' . count($tasks) . ' task(s) still running.');
mtrace('Exiting with code 1.');
exit(1);
}
if (count($tasks) !== $lastcount) {
mtrace('');
mtrace(count($tasks) . " tasks currently running.", '');
$lastcount = count($tasks);
} else {
mtrace('.', '');
}
sleep(1);
}
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
\core\local\cli\shutdown::script_supports_graceful_exit();
$keepalive = $options['keep-alive'];
\core\cron::run_main_process($keepalive);
cron_run();
-65
View File
@@ -1,65 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* CLI script to reset dashboards.
*
* @package core
* @subpackage cli
* @copyright 2021 Brendan Heywood (brendan@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->dirroot.'/my/lib.php');
list($options, $unrecognized) = cli_get_params([
'help' => false,
'execute' => false,
], [
'h' => 'help',
'e' => 'execute',
]);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized), 2);
}
if (!$options['execute']) {
$help = <<<EOF
Resets Moodle dashboards for all users
Options:
-h, --help Print out this help
-e, --execute Actually run the reset
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/dashboard_reset.php -e
EOF;
echo $help;
exit(0);
}
$progressbar = new progress_bar();
$progressbar->create();
my_reset_page_for_all_users(MY_PAGE_PRIVATE, 'my-index', $progressbar);
-123
View File
@@ -1,123 +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/>.
/**
* CLI script to delete a course.
*
* @package core
* @subpackage cli
* @author Mikhail Golenkov <mikhailgolenkov@catalyst-au.net>
* @copyright 2022 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/clilib.php');
list($options, $unrecognized) = cli_get_params(
[
'courseid' => false,
'help' => false,
'showsql' => false,
'showdebugging' => false,
'disablerecyclebin' => false,
'non-interactive' => false,
], [
'c' => 'courseid',
'h' => 'help',
]
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] || empty($options['courseid'])) {
$help = <<<EOT
CLI script to delete a course.
Options:
-h, --help Print out this help
--showsql Show sql queries before they are executed
--showdebugging Show developer level debugging information
--disablerecyclebin Skip backing up the course
--non-interactive No interactive questions or confirmations
-c, --courseid Course id to be deleted
Example:
\$sudo -u www-data /usr/bin/php admin/cli/delete_course.php --courseid=123456
\$sudo -u www-data /usr/bin/php admin/cli/delete_course.php --courseid=123456 --showdebugging
\$sudo -u www-data /usr/bin/php admin/cli/delete_course.php --courseid=123456 --disablerecyclebin
EOT;
echo $help;
die;
}
$interactive = empty($options['non-interactive']);
if ($options['showdebugging']) {
mtrace('Enabling debugging...');
set_debugging(DEBUG_DEVELOPER, true);
}
if ($options['showsql']) {
mtrace('Enabling SQL debugging...');
$DB->set_debug(true);
}
if (CLI_MAINTENANCE) {
cli_error('CLI maintenance mode active, CLI execution suspended');
}
if (moodle_needs_upgrading()) {
cli_error('Moodle upgrade pending, CLI execution suspended');
}
$course = $DB->get_record('course', array('id' => $options['courseid']));
if (empty($course)) {
cli_error('Course not found');
}
mtrace('Deleting course id ' . $course->id);
mtrace('Course name: ' . $course->fullname);
mtrace('Short name: ' . $course->shortname);
if ($interactive) {
mtrace('');
$input = cli_input('Are you sure you wish to delete this course? (y/N)', 'N', ['y', 'Y', 'n', 'N']);
if (strtolower($input) != 'y') {
exit(0);
}
}
if ($options['disablerecyclebin']) {
mtrace('Disabling recycle bin...');
$overrideconfig = ['tool_recyclebin' => ['coursebinenable' => false, 'categorybinenable' => false]];
$CFG->forced_plugin_settings = array_merge($CFG->forced_plugin_settings, $overrideconfig);
}
core_php_time_limit::raise();
delete_course($course);
mtrace('Updating course count in categories...');
fix_course_sortorder();
mtrace('Done!');
-209
View File
@@ -1,209 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script allows you to view and change the emailstop flag of any user.
*
* @package core
* @subpackage cli
* @copyright 2023 Stephan Robotta (stephan.robotta@bfh.ch)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
// Define the input options.
$longparams = [
'email' => '',
'help' => false,
'id' => '',
'quiet' => false,
'stop' => '',
'username' => '',
];
$shortparams = [
'e' => 'email',
'h' => 'help',
'i' => 'id',
'q' => 'quiet',
's' => 'stop',
'u' => 'username',
];
// Define exit codes.
$exitsuccess = 0;
$exitunknownoption = 1;
$exitmissinguserarg = 2;
$exittoomanyuserarg = 3;
$exitnosearchargs = 4;
$exitnousersfound = 5;
$exitinvalidstopflag = 6;
$exiterrordb = 7;
// Now get cli options that are set by the caller.
list($options, $unrecognized) = cli_get_params($longparams, $shortparams);
$verbose = empty($options['quiet']);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
if ($verbose) {
cli_error(get_string('cliunknowoption', 'admin', $unrecognized), $exitunknownoption);
}
exit($exitunknownoption);
}
if ($options['help']) {
$help =
"Set/unset or show status of emailstop flag for a user, identified by username or email.
There are no security checks here because anybody who is able to
execute this file may execute any PHP too.
Options:
-h, --help Print out this help
-e, --email=email Specify user by email, separate many users by comma
-i, --id=id Specify user by id, separate many users by comma
-q, --quiet No output to stdout
-s, --stop=0|1|off|on Set new value for emailstop flag
-u, --username=username Specify user by username, separate many users by comma
Example:
\$sudo -u www-data /usr/bin/php admin/cli/emailstop.php --email=student1@example.com --stop=1
\$sudo -u www-data /usr/bin/php admin/cli/emailstop.php --email=student1@example.com,student2@example.com
\$sudo -u www-data /usr/bin/php admin/cli/emailstop.php --u=student1,student2 -s=on
";
echo $help;
exit($exitsuccess);
}
$cntempty = 0;
$cntfilled = 0;
$searchargs = [];
// Try to find out which option is used to fetch the users from. Also do sanitize etc.
foreach (['email', 'username', 'id'] as $option) {
if (empty($options[$option])) {
$cntempty++;
} else {
$cntfilled++;
$argname = $option;
// The search args must be: split by the comma, trimmed, and empty elements filtered out.
$searchargs = array_flip(array_filter(
array_map(
function ($item) {
return trim($item);
},
explode(',', $options[$option])
),
function ($item) {
return $item !== '';
}
));
}
}
if ($cntempty === 3) {
if ($verbose) {
cli_error('One of username, email, or id must be set.', $exitmissinguserarg);
}
exit($exitmissinguserarg);
}
if ($cntfilled > 1) {
if ($verbose) {
cli_error('Only one of email, username, or id can be set to identify a user.', $exittoomanyuserarg);
}
exit($exittoomanyuserarg);
}
if (empty($searchargs)) {
if ($verbose) {
cli_error('No values are provided for users.', $exitnosearchargs);
}
exit($exitnosearchargs);
}
try {
$users = $DB->get_records_list('user', $argname, array_keys($searchargs));
} catch (Exception $e) {
if ($verbose) {
cli_error("Could not fetch data from db by {$argname}: '{$options[$argname]}'.", $exiterrordb);
}
exit($exiterrordb);
}
if (empty($users)) {
if ($verbose) {
cli_error("Can not find any user by {$argname}: '{$options[$argname]}'.", $exitnousersfound);
}
exit($exitnousersfound);
}
// No stop flag set, then just print the user and the current emailstop flag state.
if ($options['stop'] === '') {
foreach ($users as $user) {
if ($verbose) {
echo 'user=' . $user->{$argname} . ' - emailstop=' . (int)$user->emailstop . PHP_EOL;
unset($searchargs[$user->{$argname}]);
}
}
if ($verbose) {
foreach (array_keys($searchargs) as $arg) {
echo 'user=' . $arg . ' - not found' . PHP_EOL;
}
}
exit($exitsuccess);
}
// Allowed values for the stop flag enabled are 1 and on, for disabled are 0 and off.
$validvalues = ['0', '1', 'off', 'on'];
$stopflag = strtolower($options['stop']);
if (!in_array($stopflag, $validvalues)) {
if ($verbose) {
cli_error('Value for the emailstop flag must be one of: ' . implode(', ', $validvalues) . '.', $exitinvalidstopflag);
}
exit($exitinvalidstopflag);
}
foreach ($validvalues as $value) {
if ($value === $stopflag) {
$stopflag = ($value === '1' || $value === 'on') ? 1 : 0;
break;
}
}
// Update each user with the stop flag to be set if it is necessary.
foreach ($users as $user) {
$line = 'Update user ' . $user->{$argname} . ($argname !== 'id' ? ' (' . $user->id . ')' : '') . ' - ';
if ((int)$user->emailstop !== $stopflag) {
$DB->set_field('user', 'emailstop', $stopflag, ['id' => $user->id]);
$line .= 'ok';
} else {
$line .= 'already done';
}
if ($verbose) {
echo $line . PHP_EOL;
unset($searchargs[$user->{$argname}]);
}
}
if ($verbose) {
foreach (array_keys($searchargs) as $arg) {
echo 'user=' . $arg . ' - not found' . PHP_EOL;
}
}
exit($exitsuccess);
-1
View File
@@ -73,7 +73,6 @@ foreach ($rs as $user) {
echo "Redeleting user $user->id: $user->username ($user->email)\n";
delete_user($user);
}
$rs->close();
cli_heading('Deleting all leftovers');
-138
View File
@@ -1,138 +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/>.
/**
* Fix orphaned calendar events that were broken by MDL-67494.
*
* This script will look for all the calendar events which userids
* where broken by a wrong upgrade step, affecting to Moodle 3.9.5
* and up.
*
* It performs checks to both:
* a) Detect if the site was affected (ran the wrong upgrade step).
* b) Look for orphaned calendar events, categorising them as:
* - standard: site / category / course / group / user events
* - subscription: events created via subscriptions.
* - action: normal action events, created to show common important dates.
* - override: user and group override events, particular, that some activities support.
* - custom: other events, not being any of the above, common or particular.
* By specifying it (--fix) try to recover as many broken events (missing userid) as
* possible. Standard, subscription, action, override events in core are fully supported but
* override or custom events should be fixed by each plugin as far as there isn't any standard
* API (plugin-wise) to launch a rebuild of the calendar events.
*
* @package core
* @copyright 2021 onwards Simey Lameze <simey@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir . "/clilib.php");
require_once($CFG->libdir . '/db/upgradelib.php');
// Supported options.
$long = ['fix' => false, 'help' => false];
$short = ['f' => 'fix', 'h' => 'help'];
// CLI options.
[$options, $unrecognized] = cli_get_params($long, $short);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help = <<<EOT
Fix orphaned calendar events.
This script detects calendar events that have had their
userid lost. By default it will perform various checks
and report them, showing the site status in an easy way.
Also, optionally (--fix), it wil try to recover as many
lost userids as possible from different sources. Note that
this script aims to process well-know events in core,
leaving custom events in 3rd part plugins mostly unmodified
because there isn't any consistent way to regenerate them.
For more details: https://tracker.moodle.org/browse/MDL-71156
Options:
-h, --help Print out this help.
-f, --fix Fix the orphaned calendar events in the DB.
If not specified only check and report problems to STDERR.
Usage:
- Only report: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php
- Report and fix: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php -f
EOT;
cli_writeln($help);
die;
}
// Check various usual pre-requisites.
if (empty($CFG->version)) {
cli_error('Database is not yet installed.');
}
$admin = get_admin();
if (!$admin) {
cli_error('Error: No admin account was found.');
}
if (moodle_needs_upgrading()) {
cli_error('Moodle upgrade pending, script execution suspended.');
}
// Do everything as admin by default.
\core\session\manager::set_user($admin);
// Report current site status.
cli_heading('Checking the site status');
$needsfix = upgrade_calendar_site_status();
// Report current calendar events status.
cli_heading('Checking the calendar events status');
$info = upgrade_calendar_events_status();
$hasbadevents = $info['total']->bad > 0 || $info['total']->bad != $info['other']->bad;
$needsfix = $needsfix || $hasbadevents;
// If, selected, fix as many calendar events as possible.
if ($options['fix']) {
// If the report has told us that the fix was not needed... ask for confirmation!
if (!$needsfix) {
cli_writeln("This site DOES NOT NEED to run the calendar events fix.");
$input = cli_input('Are you completely sure that you want to run the fix? (y/N)', 'N', ['y', 'Y', 'n', 'N']);
if (strtolower($input) != 'y') {
exit(0);
}
cli_writeln("");
}
cli_heading('Fixing as many as possible calendar events');
upgrade_calendar_events_fix_remaining($info);
// Report current (after fix) calendar events status.
cli_heading('Checking the calendar events status (after fix)');
upgrade_calendar_events_status();
} else if ($needsfix) {
// Fix option was not provided but problem events have been found. Notify the user and provide info how to fix these events.
cli_writeln("This site NEEDS to run the calendar events fix!");
cli_writeln("To fix the calendar events, re-run this script with the --fix option.");
}

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