Compare commits

...

1677 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 76b9a9407f Moodle release 2.4.8 2014-01-11 15:57:17 +01:00
Damyon Wiese 532df04583 weekly release 2.4.7+ 2014-01-10 14:19:59 +08:00
Damyon Wiese f8d0e9ad5b Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2014-01-10 14:19:55 +08:00
Eloy Lafuente (stronk7) a4a01b4b96 MDL-36721 make upgrade queries cross-db 2014-01-10 11:24:52 +08:00
AMOS bot 93d224f333 Automatically generated installer lang files 2014-01-09 00:42:16 +00:00
Eloy Lafuente (stronk7) 09aa9e90b9 Merge branch 'wip-MDL-42310-24' of git://github.com/abgreeve/moodle into MOODLE_24_STABLE 2014-01-08 01:52:58 +01:00
Eloy Lafuente (stronk7) 143dc29e0d Merge branch 'm24_MDL-43508_Invalid_String_Identifier' of https://github.com/scara/moodle into MOODLE_24_STABLE 2014-01-08 00:46:31 +01:00
Dan Poltawski cf51a722c7 Merge branch 'm24_MDL-43482_Lot_Of_Passed_By_Reference_Messages' of https://github.com/scara/moodle into MOODLE_24_STABLE 2014-01-07 17:20:57 +08:00
Andrew Nicols 076792a3f1 MDL-43411 JavaScript: Correct checks for section support to use helper function 2014-01-07 12:51:01 +08:00
Dan Poltawski 32d89e0c0d Merge branch 'm24_MDL-40379_Prevent_Some_Mobile_Network_Providers_From_Modifying_Content' of https://github.com/scara/moodle into MOODLE_24_STABLE 2014-01-07 12:43:34 +08:00
Rajesh Taneja 8b2dca7427 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:45 +08:00
Tony Butler a4720e016e MDL-43373 core_enrol: Display enrolments dimmed if outside of start or end times 2014-01-07 10:44:39 +08:00
Damyon Wiese f8acb4a7de Merge branch 'MDL-43448_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2014-01-07 09:15:08 +08:00
Tim Hunt 31a70002d3 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).
2014-01-06 12:31:28 +00:00
Damyon Wiese 506bae6791 Merge branch 'w01_MDL-36721_m24_passlog' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2014-01-06 14:49:39 +08:00
Dan Poltawski e9576ab6b4 Merge branch '43349-24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2014-01-06 14:21:50 +08:00
Rajesh Taneja a902db80d6 MDL-42883 Administration: Check sessionkey before taking action on user profile fields 2014-01-06 13:59:12 +08:00
Sam Hemelryk b8ac884f9d Merge branch 'MDL-37962_beep_24' of https://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2014-01-06 11:17:47 +13:00
Sam Hemelryk 6e2745d238 Merge branch 'MDL-42212-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2014-01-06 10:29:55 +13:00
Michael Milette b9bdec3f35 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:35:41 +08:00
Sam Hemelryk 87f62d8e09 MDL-43349 cache: init now checks store requirements are met 2014-01-02 09:22:28 +13:00
AMOS bot 76f354d196 Automatically generated installer lang files 2013-12-30 00:43:27 +00:00
AMOS bot fb327938c9 Automatically generated installer lang files 2013-12-29 00:43:28 +00:00
Matteo Scaramuccia 6cafb62b1e MDL-40379 Files Prevent mobile network providers from modifying content. 2013-12-28 14:07:28 +01:00
Matteo Scaramuccia 73c8dc3692 MDL-43508 Quiz Invalid get_string() identifier. 2013-12-28 11:32:55 +01:00
Petr Škoda 6537f3525e MDL-36721 do not store passwords in config logs 2013-12-27 11:39:07 +08:00
AMOS bot 199ca97486 Automatically generated installer lang files 2013-12-25 00:42:53 +00:00
Matteo Scaramuccia adf8e5ce6e MDL-43482 Chat Lot of "Only variables should be passed by reference". 2013-12-24 11:12:17 +01:00
Sam Hemelryk 14d1f4e42e weekly release 2.4.7+ 2013-12-24 17:17:36 +13:00
Sam Hemelryk 52c4f06af3 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-12-24 17:17:34 +13:00
Sam Hemelryk 27b1ba527a Merge branch 'MDL-41246-moodle24' of git://github.com/StudiUM/moodle into MOODLE_24_STABLE 2013-12-24 11:41:15 +13:00
Sam Hemelryk 085c2fd228 Merge branch 'MDL-43438-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-12-24 11:22:37 +13:00
Sam Hemelryk 235b5a0c1d Merge branch 'MDL-43250-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-12-24 11:03:51 +13:00
AMOS bot 04d6be9bb2 Automatically generated installer lang files 2013-12-23 12:40:16 +00:00
AMOS bot f66f661ce0 Automatically generated installer lang files 2013-12-23 12:26:30 +00:00
Sam Hemelryk 7f4fa839fe Merge branch 'MDL-35032-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-12-23 15:57:25 +13:00
Sam Hemelryk faf4e51da9 Merge branch 'MDL-30195-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-12-23 14:35:24 +13:00
Sam Hemelryk a7dae3ef8e Merge branch 'w52_MDL-43367_m24_contextpath' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-12-23 14:31:18 +13:00
Sam Hemelryk a35428cf86 Merge branch 'MDL-34182-24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-12-23 08:15:48 +13:00
Petr Škoda f06d89b2b5 MDL-43367 stop returning of bogus context children when path unknown
This also prevents deletion of system context.
2013-12-22 16:01:25 +08:00
Damyon Wiese 346ef562dc weekly release 2.4.7+ 2013-12-20 11:57:15 +08:00
Damyon Wiese 2718718464 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-12-20 11:57:12 +08:00
Andrew Nicols 05c42f7539 MDL-34182 Repositories: Check for and warn on invalid output in the file picker 2013-12-19 10:29:56 +08:00
Andrew Nicols 05ca6dadf8 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-19 10:29:56 +08:00
Eloy Lafuente (stronk7) 4226a54d53 Revert "MDL-43306 restore: fix grade item sortorder restoration"
This reverts commit bea3c273a3.
2013-12-19 02:15:51 +01:00
AMOS bot 02d052026c Automatically generated installer lang files 2013-12-19 00:44:18 +00:00
Jean-Philippe Gaudreau 19ef016778 MDL-41246 cache: Fix PHP notice of non well formed numeric values for the memcache store 2013-12-18 08:53:41 -05:00
Frederic Massart 5e64cff4f1 MDL-43438 mod_assignment: Prevent double inclusion of plugin files 2013-12-18 09:17:00 +01:00
Dan Poltawski e575b2f6d1 Merge branch 'MDL-41198-24' of https://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-12-18 15:00:11 +08:00
Russell Smith 3cc1d4b9fe MDL-41198 lib: Add comment about the changes to srand on adodb 2013-12-18 17:05:48 +11:00
Russell Smith a7b9ce4caf 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.

Conflicts:

	lib/tests/accesslib_test.php
2013-12-18 17:05:09 +11:00
Russell Smith 17d617dc66 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 17:04:11 +11:00
Sam Hemelryk ceb23943ee Revert "MDL-42104: trap tab focus within dialog modal,"
This reverts commit 172321d7d8.
2013-12-18 15:54:21 +13:00
Russell Smith 44eaae9610 MDL-41292 cache: only update identifiers if they change 2013-12-18 02:23:55 +01:00
Sam Hemelryk 47358bdaa5 Merge branch 'MDL-42104_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-12-18 11:59:28 +13:00
Sam Hemelryk a39ff69d58 Merge branch 'MDL-38698-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-12-18 09:21:10 +13:00
Eloy Lafuente (stronk7) c70955dfa9 Merge branch 'MDL-43306-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-12-17 10:29:51 +01:00
Frederic Massart 8187097dc0 MDL-38698 filter_urltolink: Remove performance test in Unit Test 2013-12-17 07:04:56 +01:00
Frederic Massart 3d947610a0 MDL-38698 filter_urltolink: Do not link the URL property of CSS 2013-12-17 07:04:56 +01:00
Marina Glancy 003638cb8d Merge branch 'MDL-37679-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-12-17 16:44:36 +11:00
Mark Nielsen c30533cfed MDL-37679 Course: Adding section to page title on section only pages 2013-12-17 11:43:14 +08:00
Marina Glancy 6af74e102c Merge branch 'MDL-41075-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-12-17 11:24:46 +11:00
Russell Smith 18559a0df6 MDL-39725 database: Add statistics collection functions
Conflicts:
	lib/dml/moodle_database.php
2013-12-17 10:29:32 +13:00
Russell Smith eb17e8ecd5 MDL-39725 database: Include stats collections in unit tests
Conflicts:
	lib/ddl/tests/ddl_test.php
2013-12-17 10:29:29 +13:00
Russell Smith 96e60a978e MDL-39725 database: Apply database statistics update to daily stats 2013-12-17 10:29:25 +13:00
Sam Hemelryk 1b5fea23bd Merge branch 'MDL-25473-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-12-17 08:53:38 +13:00
Sam Hemelryk 00621ce929 Merge branch 'MDL-34321-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-12-17 08:47:26 +13:00
Frederic Massart 1ed22de511 MDL-30195 portfolio_googledocs: Allow export of rich HTML 2013-12-16 11:05:46 +01:00
Frederic Massart 48ffd4c677 MDL-42212 mod_lesson: Localise area names 2013-12-16 06:50:02 +01:00
Frederic Massart 4a59b3b555 MDL-42212 mod_lesson: Fix callbacks retrieving activity files 2013-12-16 06:50:01 +01:00
Jerome Mouneyrac 00f2669025 MDL-41075 Remove "Choose..." option from participants page. 2013-12-16 12:09:01 +08:00
Sam Hemelryk 4d3ee68536 Merge branch 'wip-mdl-21180-m24' of https://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-12-16 15:43:12 +13:00
Rajesh Taneja 0034080028 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:59:46 +08:00
Andrew Davis c8d061208d MDL-43188 core_message:reimplemented the beep on new message functionality from 1.9 2013-12-16 09:41:20 +08:00
Marina Glancy 5df656cadd Merge branch 'MDL-37972-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-12-16 12:29:19 +11:00
Sam Hemelryk 6a68b92cff Merge branch 'MDL-40096-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-12-16 13:50:44 +13:00
Sam Hemelryk 1ce52ce8db Merge branch 'MDL-40436-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-12-16 11:30:14 +13:00
Sam Hemelryk 7d07632f7a Merge branch 'w51_MDL-42931_m24_env27' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-12-16 11:17:19 +13:00
Sam Hemelryk 34965b0d31 Merge branch 'MDL-42085-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-12-16 11:11:05 +13:00
AMOS bot 7105ca55cb Automatically generated installer lang files 2013-12-14 00:45:09 +00:00
Frederic Massart 0d3e293c5c MDL-35032 mod_book: 1.9 backup restore convertis files to book area 2013-12-13 10:26:26 +01:00
Petr Škoda f4776ae40a MDL-42931 set new requirements for 2.7 2013-12-13 14:08:21 +08:00
Sam Hemelryk c9a3d370c4 weekly release 2.4.7+ 2013-12-13 16:59:18 +13:00
Sam Hemelryk ebe7179a88 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-12-13 16:59:16 +13:00
AMOS bot aec655131b Automatically generated installer lang files 2013-12-13 00:42:16 +00:00
Frederic Massart 0291a8b492 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:09:29 +01:00
Jerome Mouneyrac fca50b95ef 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:08:06 +08:00
Damyon Wiese 5506f0482c 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.

Conflicts:

	mod/assign/locallib.php
	mod/assign/tests/locallib_test.php
2013-12-12 13:33:10 +08:00
Jason Fowler 410fff85d0 MDL-34321 Assignment2.2 - Fixing submission count 2013-12-12 10:36:07 +08:00
Eloy Lafuente (stronk7) 9a5af14929 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:03:41 +01:00
Eloy Lafuente (stronk7) a847569195 Merge branch 'w50_MDL-31410_m24_paypalipn' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-12-12 01:17:53 +01:00
Marina Glancy 7cbba9b175 MDL-43218 blog: prepare the blog navigation only when needed 2013-12-11 15:38:07 +13:00
Simon Coggins c21708e5e4 MDL-43218 navigation: Remove link to blogs when they are disabled 2013-12-11 15:38:01 +13:00
Sam Hemelryk 133870d759 Merge branch 'wip-MDL-43279-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-12-11 10:57:46 +13:00
Eloy Lafuente (stronk7) 690c28e94a Merge branch '24STABLE-wip-MDL-43135' of https://github.com/jennymgray/moodle into MOODLE_24_STABLE 2013-12-10 19:47:21 +01:00
Jenny Gray 82882a9034 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:13:52 +00:00
rwijaya 172321d7d8 MDL-42104: trap tab focus within dialog modal,
for filepicker and filemanager
2013-12-10 15:48:48 +08:00
Sam Chaffee bf139ab2c2 MDL-37972 Assignment: fixing settings link for upload single submissions 2013-12-10 14:09:15 +08:00
Dan Poltawski bea3c273a3 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:33:52 +08:00
Marina Glancy 143c8e7489 Merge branch 'm24_MDL-43082_IE9_Compat_View_SVG_Say_No' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-12-10 14:48:25 +11:00
Marina Glancy 10f476e3a5 Merge branch 'MDL-43131_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-12-10 14:13:30 +11:00
Jason Fowler de1982ca05 MDL-25473 mediaplayer - prevent embedded videos from looping 2013-12-10 10:42:41 +08:00
Marina Glancy 79205746bc MDL-43279 block_blog_recent: fixed undefined property notice 2013-12-10 09:30:41 +11:00
Sam Hemelryk 71e7d2552b Merge branch 'm24_MDL-43019' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-12-10 08:28:35 +13:00
Eloy Lafuente (stronk7) 2c4120360a Merge branch 'MDL-40003-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-12-09 16:24:53 +01:00
Sam Chaffee 780a21f62a MDL-40003 mod_assign: Fixed submission comments not being restored 2013-12-09 11:04:02 +01:00
Damyon Wiese 9b378f3dc5 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:27:34 +08:00
Marina Glancy ada23f968a Merge branch 'MDL-39618-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-12-09 11:03:30 +11:00
Petr Škoda 1da6855d1c MDL-31410 always send 200 in PayPal IPN response and hide all errors 2013-12-06 10:06:20 +08:00
Matteo Scaramuccia 3f007ca625 MDL-43082 Themes IE 9 Compatibility View doesn't support SVG. 2013-12-05 16:03:19 +01:00
Tim Hunt 71660782eb 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:13:50 +00:00
Sam Hemelryk 8c5ca6531b MDL-39575 install: better handling of database creation error.
Implemented better handling of DML exceptions.
Added translation for cannotcreatedb exception.
2013-12-05 16:20:00 +08:00
Dan Poltawski 98f4a31ce0 weekly release 2.4.7+ 2013-12-05 15:09:59 +08:00
Dan Poltawski 9aeef50434 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-12-05 15:09:56 +08:00
Dan Poltawski a6a85dc49b Merge branch 'MDL-43068_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-12-05 09:34:04 +08:00
Dan Marsden f2858a669a MDL-43019 SCORM: always use iframe instead of object - backported from 2.6 - fixes issue with IE 11 SCORM packages not loading 2013-12-05 13:15:04 +13:00
Tim Hunt 2c7a4204e7 MDL-43068 course&gradebook: fix use of new API in old branches. 2013-12-04 15:40:00 +00:00
AMOS bot 8ecbc00c77 Automatically generated installer lang files 2013-12-04 00:43:17 +00:00
Eloy Lafuente (stronk7) 45c03504ad Merge branch 'MDL-41446-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-12-03 23:56:02 +01:00
Mark Nelson e7698992b7 MDL-43142 mnet: fixed typo in variable passed to get_string 2013-12-03 23:42:04 +01:00
Mark Nelson 309481dde0 MDL-43140 mnet: display header after redirects to avoid warning 2013-12-03 23:26:11 +01:00
Eloy Lafuente (stronk7) 532a6ba83c Merge branch 'moodle24-mdl33971' of https://github.com/tlock/moodle into MOODLE_24_STABLE 2013-12-03 17:37:15 +01:00
James Pratt 5267a05191 MDL-43079 quiz statistics : fix stats graph when all grades zero 2013-12-03 17:07:22 +01:00
Damyon Wiese 7183b0f995 Merge branch 'wip-mdl-43048-m24' of https://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-12-03 11:44:28 +08:00
Damyon Wiese 16d88af2ab MDL-42904: Self enrol. Fix sloppy version numbers 2013-12-03 11:21:40 +08:00
Damyon Wiese cf569389ab Merge branch 'wip-mdl-42904-m24' of https://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-12-03 11:20:47 +08:00
Sam Hemelryk dc76ce70b2 Merge branch 'w48_MDL-41819_m24_maxinputvars' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-12-03 09:57:03 +13:00
Damyon Wiese 4818244d27 Merge branch 'm24_MDL-43039_SessionDiskFull_False_Positive' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-12-02 14:35:53 +08:00
Dan Poltawski 838a2120fb Merge branch 'wip-MDL-40191-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-12-02 11:19:49 +08:00
Dan Poltawski d8d43cdc18 Merge branch 'MDL-43068_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-12-02 11:11:12 +08:00
AMOS bot e623b9afcc Automatically generated installer lang files 2013-12-02 00:42:58 +00:00
Petr Škoda db217f006c MDL-41819 try to work around max_input_vars restriction 2013-12-02 08:30:47 +08:00
Marina Glancy 60aae880a4 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:50:20 +11:00
David Mudrák 22bf788f6b MDL-40191 MDLSITE-2455 Do not throw coding exception when the activity is not found
Under certain conditions, coding exception is thrown when fetching items from
the navigation bar. The patch prevents them. See more details in the tracker.
2013-12-02 10:50:20 +11:00
Sam Hemelryk 7842d36f71 MDL-43033 cache: added stats logging to set_many methods 2013-12-02 09:29:32 +13:00
Sam Hemelryk fc9a82669f MDL-43033 pix: backport warning icon 2013-12-02 09:29:32 +13:00
Sam Hemelryk e88938d9cc MDL-43033 cache: fixed display of definition stores in admin interface 2013-12-02 09:29:31 +13:00
Sam Hemelryk d7b0846147 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:31 +13:00
Sam Hemelryk 95b732848e MDL-43033 cache: fixed mode map event invalidation scenario 2013-12-02 09:29:31 +13:00
Sam Hemelryk afab006332 MDL-43033 cache: added stats logging to get_many methods 2013-12-02 09:29:31 +13:00
Matteo Scaramuccia 71d414b090 MDL-43039 Libraries "The session partition is full." false positive. 2013-11-30 14:32:24 +01:00
Dan Poltawski 828aff67d9 weekly release 2.4.7+ 2013-11-29 12:52:44 +08:00
Dan Poltawski 83f506da1e Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-11-29 12:52:42 +08:00
Tim Hunt 553672355c 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-11-28 10:03:56 +00:00
AMOS bot eaccc920db Automatically generated installer lang files 2013-11-28 09:12:45 +00:00
Tim Lock 416d7a94be MDL-33971: When viewing course log entries for Quiz View Summary a number is displayed not the quiz name 2013-11-28 07:50:42 +10:30
Rajesh Taneja 70f62d8944 MDL-43048 block_tags: Initalised content->text for tags block 2013-11-27 14:38:07 +08:00
Dan Poltawski c96069566a Merge branch 'wip-mdl-41635-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-11-27 11:14:52 +08:00
Rajesh Taneja da568835a5 MDL-41635 Report: Added string to action link for display 2013-11-27 09:56:34 +08:00
Tim Lock 9bd1ba9ee6 MDL-42998: Fix user selection search options autoselectunique. 2013-11-27 09:09:52 +08:00
AMOS bot f0cfc08699 Automatically generated installer lang files 2013-11-27 00:48:27 +00:00
Eloy Lafuente (stronk7) 62daeecc11 Merge branch 'm24_MDL-43045' of git://github.com/totara/moodle into MOODLE_24_STABLE 2013-11-26 21:30:46 +01:00
Dan Poltawski 7d784e4ade Merge branch 'MDL-43000_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-26 15:06:41 +08:00
Dan Poltawski e5ca507c6e Merge branch 'wip-mdl-41635-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-11-26 10:25:05 +08:00
Sam Hemelryk 10123d02f6 Merge branch 'MDL-43005-24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-11-26 08:41:48 +13:00
Simon Coggins 3476a15b0f MDL-43045 report: Fix missing role name in security overview report 2013-11-26 08:24:09 +13:00
Damyon Wiese 689c45e54e Merge branch 'wip-MDL-41257-24' of git://github.com/abgreeve/moodle into MOODLE_24_STABLE 2013-11-25 13:47:10 +08:00
Dan Poltawski 117c147757 Merge branch 'w48_MDL-37016_m24_sloppymysql' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-11-25 13:41:00 +08:00
Damyon Wiese 45d9d6d710 Merge branch 'wip-mdl-42924-m24' of https://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-11-25 13:17:13 +08:00
Dan Poltawski 717612c7aa Merge branch 'MDL-42547_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-11-25 10:37:40 +08:00
Rajesh Taneja ccdfa44df0 MDL-42904 self_enrol: Set customint1 if it's null 2013-11-25 10:10:48 +08:00
Eloy Lafuente (stronk7) 0ecaebd487 Merge branch 'wip-MDL-29071-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-11-24 16:51:37 +01:00
Petr Škoda 709752225c MDL-37016 fix sloppy mysql nulls in event.uuid 2013-11-24 15:13:27 +08:00
Tim Hunt 70127f1f3c 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-22 11:34:38 +00:00
Eloy Lafuente (stronk7) a61d4eff50 weekly release 2.4.7+ 2013-11-21 19:33:30 +01:00
Eloy Lafuente (stronk7) 9c3bfbfa3f Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-11-21 19:33:25 +01:00
Ankit Agarwal 9e46c17505 MDL-43005 blogs: Fix issues with blog tags 2013-11-21 13:39:43 +08:00
Marina Glancy 6cf0f60c7d MDL-29071 ddl: unittest for objects name length 2013-11-21 12:41:03 +11:00
Marina Glancy f0a9fb36a3 MDL-29071 ddl: make sure object name never exceeds max length
Many thanks to Ray Bon for finding the problem
2013-11-21 12:40:58 +11:00
Mark Nelson 8fb24d2b43 MDL-42547 tool_uploaduser: trim values before uploading users 2013-11-20 00:38:14 -08:00
FilipBenco 7da998aee8 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:29:23 +08:00
Marina Glancy c577657600 Merge branch 'MDL-42767-24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-11-20 13:24:29 +11:00
Michael Milette 4dba407997 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 10:18:20 +08:00
Rajesh Taneja 183c7cb3f5 MDL-42924 Administration: use normalize_component to extract plugin name and type 2013-11-19 12:02:16 +08:00
Sam Hemelryk 5ba78ea1ff MDL-42060 block_course_list: fixed sorting of mycourses 2013-11-19 10:42:20 +08:00
Dan Poltawski b6ebf8d770 Merge branch 'MDL-42181_24' of git://github.com/mkassaei/moodle into MOODLE_24_STABLE 2013-11-19 10:07:09 +08:00
Damyon Wiese 199e6445f8 Merge branch 'm24_MDL-40223' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-11-19 09:51:53 +08:00
AMOS bot 3cf10869b6 Automatically generated installer lang files 2013-11-19 00:40:30 +00:00
Dan Marsden 2e0a4ca447 MDL-40223 SCORM: pass limit into function instead of hardcoding to allow cross-db 2013-11-19 13:31:33 +13:00
Sam Hemelryk 12bba6cc09 Merge branch 'MDL-41316-24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-11-19 12:27:45 +13:00
Sam Hemelryk c53ee31d46 Merge branch 'MDL-42863_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-19 12:03:14 +13:00
Sam Hemelryk 7bfd342445 Merge branch 'MDL-42865_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-19 11:50:23 +13:00
Sam Hemelryk 7d181fd82d Merge branch 'MDL-42853-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-11-19 10:07:49 +13:00
Ankit Agarwal 34f1a739f1 MDL-42767 notes: Delete notes on a course delete 2013-11-18 16:09:16 +08:00
Dan Poltawski f7a061c2c1 Merge branch 'MDL-42880b_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-18 15:38:50 +08:00
Damyon Wiese 67c0ced049 Merge branch 'm24_MDL-41695' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-11-18 15:21:37 +08:00
Dan Marsden 0b0e98d794 MDL-41695 SCORM: allow unlimited decimal places in CMIDecimal 2013-11-18 10:30:15 +13:00
Dan Marsden e0a4008f4e MDL-40223 SCORM: update scorm->launch param after restore - also check that scorm->launch is valid. 2013-11-18 09:54:39 +13:00
Tim Hunt cade07b451 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-15 19:20:20 +00:00
M Kassaei 00d737bbe8 MDL-42181 quiz nav: highight all buttons when all Qs on one page 2013-11-15 16:33:45 +00:00
Tim Hunt 24e3e96a78 MDL-42865 Make XMLDB foreign key check more robust.
Otherwise, installing one bad add-on can completely break this report.
2013-11-15 14:57:30 +00:00
Tim Hunt 6c6ae7361c MDL-42863 make capabilities overview more fault-tolerant. 2013-11-15 14:57:18 +00:00
Eloy Lafuente (stronk7) 9f887be6a6 weekly release 2.4.7+ 2013-11-15 11:14:49 +01:00
Eloy Lafuente (stronk7) c250a0d330 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-11-15 11:14:44 +01:00
Frederic Massart 546a27cb50 MDL-42912 mod_glossary: Fix typo and call to core_text 2013-11-15 09:43:44 +01:00
Eloy Lafuente (stronk7) edab808254 Merge branch 'wip-MDL-42912-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-11-15 02:07:01 +01:00
Marina Glancy 3d4c212f85 MDL-42912 glossary: oracle-compatibility of SQL queries 2013-11-15 11:54:44 +11:00
Frederic Massart 48488ae1d7 MDL-42853 theme: Fix incorrect CSS select and place right rules 2013-11-14 09:46:53 +08:00
AMOS bot dd031e7462 Automatically generated installer lang files 2013-11-14 00:45:23 +00:00
Damyon Wiese 28177a0a07 Merge branch 'MDL-42598_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-13 14:35:20 +08:00
Damyon Wiese 2847f9c8fc Merge branch 'MDL-33536-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-11-13 13:12:19 +08:00
Ankit Agarwal a761cef6df MDL-41316 tool_spamcleaner: AS keyword is not allowed in sql qeries for table alias as Oracle doesn't support it 2013-11-13 11:32:18 +08:00
Damyon Wiese 3699331396 MDL-33536 Navigation: Add missing require_once for safety. 2013-11-13 10:05:37 +08:00
AMOS bot 1ef6b2298e Automatically generated installer lang files 2013-11-13 00:47:35 +00:00
Eloy Lafuente (stronk7) f77c1d2098 Merge branch 'MDL-42839-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-11-13 01:10:39 +01:00
Marina Glancy 61a9dd5cd9 Merge branch 'MDL-38574_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-13 11:06:38 +11:00
Eloy Lafuente (stronk7) e39e0243b2 Merge branch 'wip_24_mdl-42723' of https://github.com/iarenaza/moodle into MOODLE_24_STABLE 2013-11-13 00:53:23 +01:00
Eloy Lafuente (stronk7) ef2a27eac1 Merge branch 'wip-MDL-42672-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-11-12 20:07:22 +01:00
sam marshall 903c5bf341 MDL-42839 MUC: Memcache server configuration too sensitive to whitespace 2013-11-12 12:40:09 +00:00
Marina Glancy 32ef8734a9 Merge branch 'MDL-42540_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-12 14:50:08 +11:00
Damyon Wiese e87d98d541 Merge branch '42806-24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-11-12 10:05:18 +08:00
AMOS bot eba496e2ae Automatically generated installer lang files 2013-11-12 00:53:15 +00:00
Eloy Lafuente (stronk7) 715cd44d3a Merge branch 'MDL-40481_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-12 00:41:46 +01:00
Tim Hunt 50a946f5bb MDL-42598 quiz variant randomisation not random enough.
A student would get the same question variants (for example for a
calculated question) on their first attempt at both copies of a
duplicated quiz.
2013-11-11 14:15:36 +00:00
Tim Hunt 50e9f0e048 MDL-42540 quiz manual grading should have setType 2013-11-11 14:15:25 +00:00
Tim Hunt bf2324ef15 MDL-40481 quiz responses report needs cols need text_sorting 2013-11-11 14:15:14 +00:00
Tim Hunt 53d3cd568c MDL-38574 qtype chooser: quick fix to make it fit on-screen.
MDL-32729 will provide a better fix for this, but we may as well apply
this quick fix on stable branches.
2013-11-11 14:15:02 +00:00
Marina Glancy 49202ec3e6 NOBUG: convert tabs to whitespaces 2013-11-11 21:27:08 +11:00
Marina Glancy 42d72f3297 Merge branch 'MDL-42043-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-11-11 21:11:29 +11:00
Sam Hemelryk be56d390b7 MDL-42806 block_mentees: can only be docked if it has a valid title set. 2013-11-11 17:23:51 +08:00
Frederic Massart 2f5768b983 MDL-42043 theme: Use $theme instead of $OUTPUT for pix_url()
Conflicts:

	theme/afterburner/lib.php
2013-11-11 13:20:19 +08:00
Renaat Debleu 65930a0593 MDL-42795 course: fixed param course in sql
course_sections has course field and not courseid, hence replaced it with course.
2013-11-11 10:49:39 +08:00
Eloy Lafuente (stronk7) 560c1c8ea3 Moodle release 2.4.7 2013-11-10 01:58:40 +01:00
Damyon Wiese 7922f118db weekly release 2.4.6+ 2013-11-08 12:51:03 +08:00
Damyon Wiese f8872ff3e8 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-11-08 12:50:59 +08:00
AMOS bot d4edd6c99f Automatically generated installer lang files 2013-11-08 00:43:09 +00:00
Damyon Wiese 301e79acae Merge branch 'MDL-42668-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-11-07 16:11:30 +08:00
Frederic Massart baad460c91 MDL-42668 portfolio_boxnet: Disable the portfolio when non-HTTPS 2013-11-07 14:40:22 +08:00
Frederic Massart c3cf690cee MDL-42668 portfolio_boxnet: Disable the portfolio during upgrade 2013-11-07 14:40:22 +08:00
Frederic Massart 6cc4b72fb9 MDL-42668 portfolio_boxnet: Notify the admins about the upgrade process
Conflicts:

	portfolio/boxnet/version.php
2013-11-07 14:40:19 +08:00
Frederic Massart d311f9cc75 MDL-42668 portfolio_boxnet: Migration to APIv2
Conflicts:

	lib/boxlib.php
	portfolio/boxnet/lib.php
2013-11-07 14:39:44 +08:00
Marina Glancy bc6f61fe9f Merge branch 'MDL-42697-24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-11-07 16:31:39 +11:00
Dan Poltawski b1455d0d74 Merge branch 'MDL-42666-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-11-07 11:44:53 +08:00
Frederic Massart 01a2722f32 MDL-42666 repository_boxnet: New lang strings rather than replace 2013-11-07 11:13:22 +08:00
Damyon Wiese 711f77e4ca Merge branch 'MDL-42605-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-11-07 11:05:32 +08:00
Frederic Massart 615e2caf67 MDL-42666 repository_boxnet: Improved output during migration 2013-11-07 11:01:01 +08:00
Dan Poltawski cad44b4778 Merge branch 'MDL-42728-en_fix_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-11-07 09:37:14 +08:00
Frederic Massart c3cefce21c MDL-42666 repository_boxnet: Avoid re-download of sync'd references 2013-11-06 15:03:07 +08:00
Frederic Massart 393133707a MDL-42666 repository_boxnet: Downloading a file follows locations 2013-11-06 14:05:00 +08:00
Frederic Massart 0fb12db343 MDL-42666 repository_boxnet: Fix undefined variable usage 2013-11-06 14:05:00 +08:00
Frederic Massart b1e4d7afc8 MDL-42666 repository_boxnet: Using the right reference 2013-11-06 14:04:59 +08:00
Frederic Massart eca84ae277 MDL-42666 repository_boxnet: Convert all the references asap
This has been done in case the script fails during the processing
and needs to be re-run. Now all the references are converted as soon
as we can, where as before they could have ended up being re-downloaded.
2013-11-06 14:04:59 +08:00
Frederic Massart c578a134fa MDL-42666 repository_boxnet: Warn on HTTPS requirement when non HTTPS 2013-11-06 14:04:59 +08:00
Frederic Massart 53661a6767 MDL-42666 repository_boxnet: Alert the admins of the migration process
Conflicts:

	repository/boxnet/version.php

Conflicts:

	repository/boxnet/version.php
2013-11-06 14:04:55 +08:00
Frederic Massart 3d115053d2 MDL-42666 repository_boxnet: Revoke access token when logging out 2013-11-06 14:03:43 +08:00
Frederic Massart 27db0b4376 MDL-42666 oauthlib: Getter methods for accesstoken, client id and secret 2013-11-06 14:03:43 +08:00
Frederic Massart 45c79022ac MDL-42666 repository_boxnet: Remove hardcoded date for APIv1 end of life 2013-11-06 14:03:42 +08:00
Frederic Massart e15c728434 MDL-42666 repository_boxnet: Disabling file references 2013-11-06 14:03:42 +08:00
Frederic Massart 2c1fc0e086 MDL-42666 repository_boxnet: Advise the user to run the migration tool 2013-11-06 14:03:41 +08:00
Frederic Massart 35662296e5 MDL-42666 repository_boxnet: Tool to launch the migration 2013-11-06 14:03:41 +08:00
Frederic Massart f5c99c5144 MDL-42666 repository_boxnet: Function to convert APIv1 references to true copies 2013-11-06 14:03:41 +08:00
Frederic Massart 82efa6c9f2 MDL-42666 repository_boxnet: Convert repository to APIv2
The support for downloading images when they are references
from Box.net have been dropped in this script as the new
API does not support references. Unfortunately the old
references thumbnails will not be updated any more.

Conflicts:

	lib/upgrade.txt
	repository/boxnet/lib.php

Conflicts:

	lib/upgrade.txt
	repository/boxnet/lib.php
2013-11-06 14:03:24 +08:00
Petr Škoda e02256507c MDL-38743 add private cache headers 2013-11-06 13:58:15 +08:00
Marina Glancy 794f42d81d Merge branch 'MDL-42640-24' of https://github.com/colin-umn/moodle into MOODLE_24_STABLE 2013-11-06 16:32:39 +11:00
Andrew Nicols add479a88e MDL-42697 Theme: Fix overflow on docked blocks 2013-11-06 12:02:41 +08:00
Damyon Wiese 429d0d711b MDL-39800 tags: Fix tags/upgrade.txt version number in backport 2013-11-06 10:45:22 +08:00
Jenny Gray 47b2416012 MDL-39800 tags: moved cloud sorting to print function 2013-11-06 10:43:27 +08:00
Jenny Gray a01bd41865 MDL-39800 tags: Applied weight and ordering fix on all more page options
Also:
Fixed weight and ordering on more page show=all
Fixed weight and ordering on more page show=my
rationalised tag_print_cloud lines now identical
2013-11-06 10:43:27 +08:00
Jenny Gray 555ad195a0 MDL-39800 tags: resolved weighting in block content 2013-11-06 10:43:27 +08:00
Marina Glancy 62b41d8dda MDL-42672 blocks: warnings on /mod/xxx/index.php for frontpage course 2013-11-06 12:32:17 +11:00
Mary Evans 1ba20f5594 MDL-40244 forms: added setType() for groupinfo in forum and wiki 2013-11-06 12:25:46 +11:00
Helen Foster d0890a7791 MDL-42728 Merge English strings from the en_fix language pack 2013-11-05 23:54:37 +01:00
Iñaki Arenaza bcad5fa2de MDL-42723: Hide and handle LDAP error when user not in context being checked
MDL-41304 only fixed the case when 'Search subcontext' is enabled. We need to
fix the case when it's not enabled too.

While silencing errors with an @ should be avoided if possible, there's no
other way to prevent the warnings in this case.
2013-11-05 17:13:16 +01:00
Damyon Wiese b7a1f71911 Merge branch 'wip-MDL-38228-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-11-05 21:49:12 +08:00
Dan Poltawski 7fd34aa0e6 Merge branch 'MDL-42613_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-11-05 16:46:36 +08:00
Marina Glancy a78bb0cc83 Merge branch 'MDL-40267-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-11-05 17:45:38 +11:00
Aaron Barnes 2acdf0af6b MDL-42476 report_progress: don't browser sniff for SVG support
Use feature detection, its more robust and better practice.
2013-11-05 11:24:38 +08:00
Marina Glancy ba5ecbc72a MDL-38228 upgrade: Rewrite script that fixes corrupt course modules to sequence relation 2013-11-05 14:15:17 +11:00
Colin Campbell 4bb2eaa7d0 MDL-42640 quiz: Fix restore of backup without overduehandling setting
Use default quiz overduehandling setting when restoring a
backup from older Moodle version that does not have a quiz
overduehandling setting.
2013-11-04 20:56:32 -06:00
Ray Morris 55e3c2cd82 MDL-42265 make Browse Users list scrollable for smaller screens 2013-11-05 10:51:27 +08:00
Dan Poltawski d320d0b285 MDL-40267 forms: fix utf8 string length rules 2013-11-05 10:19:22 +08:00
Eloy Lafuente (stronk7) 9424bcb66e MDL-40267 forms: added some tests for the range rule 2013-11-05 10:10:51 +08:00
Dan Poltawski 08a8eb917e Merge branch 'wip-MDL-42270_M24_2' of git://github.com/gjb2048/moodle into MOODLE_24_STABLE 2013-11-04 22:54:20 +08:00
Dan Poltawski df78a7902b Merge branch 'MDL-42548_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-11-04 22:35:09 +08:00
Dan Poltawski 43fa28331e Merge branch 'MDL-42453_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-11-04 22:17:22 +08:00
Dan Poltawski c512b7cc65 MDL-42533 conditionlib: Add clarifying comments 2013-11-04 22:04:30 +08:00
Dan Poltawski 8a7078b28b Merge branch 'MDL-42533-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-11-04 21:55:40 +08:00
Dan Poltawski dcb6e4169b Merge branch '42350-24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-11-04 17:21:32 +08:00
Dan Poltawski 8cd148efe0 Merge branch 'MDL-42551_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-11-04 16:22:50 +08:00
Marina Glancy e2fb6ffa24 Merge branch 'MDL-42604-24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-11-04 19:17:08 +11:00
Sam Hemelryk 71a5c487ce MDL-42350 mod_assign: fixed display of submission button 2013-11-04 15:59:24 +08:00
Dan Poltawski 23ea3287ea Merge branch 'MDL-42111_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-11-04 15:31:37 +08:00
Damyon Wiese a3e6f40dbe Merge branch 'MDL-34654-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-11-04 15:23:11 +08:00
Dan Poltawski 42cc95c245 Merge branch 'MDL-42494-workshop-exception_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-11-04 14:52:24 +08:00
Marina Glancy 9ea075bb32 Merge branch 'MDL-42429_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-11-04 17:28:34 +11:00
Marina Glancy 08839bbcb8 Merge branch 'MDL-42566_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-11-04 17:23:31 +11:00
Marina Glancy abfdce235b Merge branch 'MDL-42465_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-11-04 16:58:26 +11:00
Frederic Massart 70427c648e MDL-41807 repository_filesystem: Prevent access to parent directories 2013-11-04 13:30:58 +08:00
Damyon Wiese 5287178537 Merge branch 'MDL-42489-24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-11-04 13:16:23 +08:00
Marina Glancy abaaa8cdae Merge branch 'MDL-42617_24' of git://github.com/jleyva/moodle into MOODLE_24_STABLE 2013-11-04 16:15:13 +11:00
Marina Glancy 9312fbe16e Merge branch 'MDL-38664_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-11-04 15:19:00 +11:00
Dan Poltawski d120a7baf2 Merge branch 'MDL-40515_24' of git://github.com/aolley/moodle into MOODLE_24_STABLE 2013-11-04 12:10:58 +08:00
Damyon Wiese fb494ae9c8 Merge branch 'MDL-35146_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-11-04 12:05:22 +08:00
Petr Škoda 09f2963373 MDL-41941 clean message text 2013-11-04 11:38:14 +08:00
Tim Hunt 6917b452bf MDL-41820 XSS in the quiz responses report.
Thanks to Michael Hess for finding this bug and reporting it to us.
2013-11-04 11:10:30 +08:00
Damyon Wiese 919efdf632 Merge branch 'MDL-42663_24' of git://github.com/dmonllao/moodle into MOODLE_24_STABLE 2013-11-04 10:50:09 +08:00
Marina Glancy b3e58b7d0b Merge branch 'MDL-42664-performance_measuring_filter_manager_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-11-04 13:18:39 +11:00
Damyon Wiese 4844fc124c Merge branch 'MDL-38850_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-11-04 09:41:10 +08:00
Damyon Wiese d98f1751e8 Merge branch 'wip-MDL-28463-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-11-01 22:53:01 +08:00
David Monllao 9ab44b3f99 MDL-42663 mod_lesson: Move definitions to show_clock()
Seems that the required data is not always set
before timer.js is included.
2013-11-01 16:39:36 +08:00
Mark Nelson 6c32a2f003 MDL-42429 mod_lesson: removed unnecessary conditional check 2013-11-01 16:32:25 +08:00
David Mudrák f23a63b545 MDL-42664 Fix the filter_manager instantiation
For legacy reasons, the $CFG->perfdebug uses values 7 for disabled and 15 for
enabled. Because of this typo, Moodle has always created instance of the slower
performance_measuring_filter_manager instead of the standard filter_manager,
regardless the perfdebug setting.
2013-11-01 09:24:10 +01:00
Dan Poltawski 6758c0fa99 weekly release 2.4.6+ 2013-11-01 15:47:45 +08:00
Dan Poltawski eef875e0c1 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-11-01 15:47:42 +08:00
Sam Hemelryk 150735fbdb MDL-42619 block_community: delete course redirect bug fix 2013-11-01 10:16:02 +08:00
Marina Glancy accfa102fe Merge branch 'MDL-41624_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-10-31 22:20:20 +11:00
Juan Leyva e5663dfd70 MDL-42617 Add support for frozen fields in searchableselector form elements 2013-10-31 11:49:14 +01:00
Marina Glancy 91d309074f Merge branch 'MDL-40971_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-10-31 21:17:28 +11:00
Sam Hemelryk 5b09d5e8cf MDL-33536 navigation: hide hidden categories from the navbar
Conflicts:
	lib/navigationlib.php
2013-10-31 17:13:44 +08:00
Mark Nelson 9a3f511056 MDL-42566 mod_data: introduced check to ensure the picture supplied is valid 2013-10-31 17:10:46 +08:00
Michael Aherne de4d45ce8e MDL-42517 testing Changed events test to use assertDebuggingCalled() 2013-10-31 13:25:36 +08:00
Frederic Massart 2d22a9d474 MDL-42605 portfolio_flickr: Do not auto select a set to export to 2013-10-31 10:32:23 +08:00
Frederic Massart c64eea0a51 MDL-42605 portfolio_flickr: Photos can be added to a set on export 2013-10-31 10:32:22 +08:00
Jean-Michel Vedrine 0e099cc444 MDL-41624 DragMath crashes Firefox 2013-10-30 18:25:02 +01:00
Mark Nelson fda6ef7a1f MDL-42613 core_group: removed unnecessary table row when there is no group description or picture 2013-10-30 17:59:36 +08:00
Damyon Wiese 7b8dba0b52 Merge branch 'MDL-38734-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-10-30 17:21:30 +08:00
Sam Hemelryk c3673c5531 Merge branch 'MDL-42574-24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-10-30 13:44:39 +08:00
Ankit Agarwal 1efa930202 MDL-42604 scorm: Fix division by zero warnings in error logs 2013-10-30 11:01:04 +08:00
Damyon Wiese 87c3a9fd9f Merge branch 'wip-MDL-41337-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-10-30 10:54:13 +08:00
Sam Hemelryk 1f26c7053a Merge branch 'MDL-42542-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-10-30 08:38:47 +08:00
Mary Evans fff86d45c1 MDL-40971 grade: Fixes missing setType() and $PAGE->layout for Outcomes/import which results in errors in 2.5 Clean theme 2013-10-30 00:15:59 +00:00
Marina Glancy 54a0a16b53 MDL-41337 files: Fixed bug with accidental delete of the root directory 2013-10-29 20:30:26 +11:00
John Beedell 8cb63784e5 MDL-41473 book: Book html zip import, incorrect url produced for internal linking to other chapters 2013-10-29 14:27:38 +08:00
Damyon Wiese 9ac938636f Merge branch 'MDL-40470-24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-10-29 13:55:28 +08:00
Andrew Nicols 3bdbe1b08b MDL-40470 JavaScript: Correct issue when checking select change in Firefox 2013-10-29 10:43:06 +08:00
Marina Glancy eaccd0d486 MDL-28463 conditionlib: 10 minutes lifetime of cached grades 2013-10-29 13:21:12 +11:00
Dan Poltawski 0bc9604212 Merge branch 'MDL-22669-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-10-28 16:31:38 +08:00
Ankit Agarwal 17a0f7350f MDL-42574 blocks: Fix strict standards warning in community block 2013-10-28 15:43:09 +08:00
Mark Nielsen 0ed5fa3b88 MDL-38419: External tool - when force SSL checked, URLs get corrupted 2013-10-28 12:35:19 +08:00
Mark Nelson 34b3aa4d49 MDL-35146 mod_wiki: fixed variable typo and altered code to conform to Moodle guidelines 2013-10-28 12:34:37 +08:00
Anton Fletcher 5f22097114 MDL-35146 mod_wiki: fixed issue where pages for deleted groups caused an error on restore 2013-10-28 12:34:37 +08:00
Damyon Wiese 43fed596e5 Merge branch 'wip-mdl-30812-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-10-28 12:10:09 +08:00
Dan Poltawski acb1bf6fac Merge branch 'wip-mdl-42491-m24' of git://github.com/deraadt/moodle into MOODLE_24_STABLE 2013-10-28 11:33:36 +08:00
Prateek Sachan 6a748d5e8b MDL-38850: Fixed Horizontal bar issue in lesson 2013-10-28 11:09:42 +08:00
Damyon Wiese d0a9524463 Merge branch 'MDL-36818-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-10-28 10:59:16 +08:00
AMOS bot 42e7fb5e49 Automatically generated installer lang files 2013-10-28 00:46:46 +00:00
Eloy Lafuente (stronk7) 5c550aaafc MDL-42551 timezone info: updated to 2013h 2013-10-26 17:15:21 +02:00
Tim Hunt ea6e1851e9 MDL-42548 quiz review: don't show grade for non-finished attempts.
Now we show the attempt state separately, so there is no need to show
Grade: Attempt still in progress - especially since we were showing that
for abandoned and overdue attempts which is just wrong.
2013-10-25 20:11:26 +01:00
Gareth J Barnard bd0d739550 MDL-42270 course: Section name too big message. 2013-10-25 16:40:31 +01:00
Eloy Lafuente (stronk7) 75d8d06ffb weekly release 2.4.6+ 2013-10-25 13:03:31 +02:00
Eloy Lafuente (stronk7) 8c92e24434 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-10-25 13:03:27 +02:00
Frederic Massart cbd0157d66 MDL-42542 portfolio: Fix handlerfile in portfolio event handler 2013-10-25 16:02:21 +08:00
Frederic Massart c9bcb47d54 MDL-42533 conditionlib: Field name is translated for students 2013-10-25 09:52:02 +08:00
Michael de Raadt c58f3ed7ff MDL-42491 libraries: add exception for IE11 (and hopefully later versions) 2013-10-25 09:00:19 +08:00
Eloy Lafuente (stronk7) 3b34d79d36 Merge branch 'MDL-42377_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-10-25 01:13:08 +02:00
Dan Poltawski 8f19a957e2 Merge branch 'MDL-42338_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-10-24 16:29:19 +08:00
Marina Glancy 94cc2c769c Merge branch 'MDL-35402_editor_rules_24' of git://github.com/davosmith/moodle into MOODLE_24_STABLE 2013-10-24 15:31:12 +11:00
rwijaya 4f718dc60c MDL-42338 lti_mod: convert hardcoded string. 2013-10-24 10:34:20 +08:00
sam marshall d1b0786a51 MDL-34654 Glossary: ampersand breaks auto-linking 2013-10-23 16:22:25 +01:00
David Mudrák 1cdd43b12b MDL-42494 Fix workshop coding exception if all assessments have zero weight
If all assessments for the given submission have zero weight, the grading
evaluation plugin "Comparison with the best assessment" is unable to decide on
the average assessment as it ignores those with zero weight. In such rare case,
it makes sense to set the grading grade to null and prevent the coding
exception.
2013-10-23 11:51:37 +02:00
Damyon Wiese b807cc6334 Merge branch 'MDL-42210_24' of git://github.com/grabs/moodle into MOODLE_24_STABLE 2013-10-23 14:19:42 +08:00
Ankit Agarwal 8cbfc9614a MDL-42489 backup: use correct exception class in automated backups 2013-10-23 13:56:08 +08:00
Damyon Wiese 9de894db2d Merge branch 'w43_MDL-42208_m24_authunmask' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-10-23 13:42:26 +08:00
Dan Poltawski 7a2db63954 Merge branch 'MDL-40531_24' of https://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-10-23 12:36:38 +08:00
Ankit Agarwal 8a3894de89 MDL-42427 backup: Fix undefined errors during automated backups 2013-10-23 12:10:14 +08:00
Damyon Wiese 60ca7d5b07 MDL-41339 Tags - use uppercase for SQL keywords (AS) 2013-10-23 11:58:48 +08:00
Damyon Wiese 697ecc6db1 Merge branch '24STABLE-wip-mdl-41339' of https://github.com/jennymgray/moodle into MOODLE_24_STABLE 2013-10-23 11:55:33 +08:00
Marina Glancy e2536570a3 Merge branch 'w43_MDL-37813_m24_filterall' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-10-23 10:18:47 +11:00
Dan Poltawski af90211efd Merge branch 'MDL-42112-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-10-22 16:45:17 +08:00
Mark Nelson 78855a6c7b MDL-42465 mod_chat: instantiated message object before declaring properties 2013-10-22 16:12:20 +08:00
Dan Poltawski 1640389bcf Merge branch 'MDL-29441-24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-10-22 13:21:27 +08:00
Marina Glancy a70c9434d7 Merge branch 'MDL-26170_rss_24' of https://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-10-22 15:04:25 +11:00
Andrew Davis 441b8d6e69 MDL-26170 RSS: fixed RSS cache clearing when items are deleted 2013-10-22 10:59:03 +07:00
Rajesh Taneja de61d99ad1 MDL-31405 Assignment: removed type in time shift reset status
Assignment reset shifts time for all assignments and not specific to
assignment type, hence removed type string from reset status
2013-10-22 11:54:23 +08:00
Marina Glancy f311ba2714 Merge branch 'MDL-24380-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-10-22 14:35:09 +11:00
Marina Glancy 06032cd928 Merge branch 'MDL-42239-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-10-22 14:09:05 +11:00
Ankit Agarwal d05a5b126c MDL-42239 calendar: Fix missing ids issue with mouseover panels 2013-10-22 10:46:02 +08:00
Jerome Mouneyrac 45e4351ade MDL-24380 Chat: autoscroll help popup incorrect and doesn't display fully (it only concerns the alternative chat methods) 2013-10-22 10:45:27 +08:00
Dan Poltawski 2811b3d262 Merge branch 'MDL-42201_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-10-22 10:30:43 +08:00
Rajesh Taneja 0cb2846998 MDL-34612 Restore: Gracefully handle empty file contenthash while restoring 2013-10-22 09:49:01 +08:00
Rajesh Taneja 4db1863687 MDL-34612 Restore: Gracefully handle empty section title while restoring 2013-10-22 09:49:01 +08:00
AMOS bot 4a256d6e8e Automatically generated installer lang files 2013-10-22 00:45:44 +00:00
Mary Evans 44666a2d31 MDL-42453 theme_base: Fixed Error in base/style/admin.css that breaks CSS validator. 2013-10-21 15:39:28 +01:00
Dan Poltawski a122d95343 Merge branch 'MDL-34209-24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-10-21 13:58:40 +08:00
rwijaya af11bd26b6 MDL-38664 Lesson mod: code improvement for lesson re-attempt page 2013-10-21 13:54:28 +08:00
Joseph Rézeau b8aa36a063 MDL-38664 Lesson mod: fixed re-attempt unseen page 2013-10-21 13:54:16 +08:00
Jody Steele a10d621fc5 MDL-38628 mod_assign: Allow a user to specify "No Grade" when grading an assignment submission 2013-10-21 16:51:33 +11:00
Marina Glancy a322a0ab53 Merge branch 'w43_MDL-42386_m24_etag' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-10-21 16:00:53 +11:00
Mark Nelson 969d8f0e3f MDL-42377 backup: fixed incorrect debugging message 2013-10-21 11:55:30 +08:00
Mark Nelson 36cfbfe841 MDL-42201 backup: introduced new automatic backup state 2013-10-21 11:49:07 +08:00
Andrew Nicols 314cc22a28 MDL-34209 JavaScript: Simplify section drag/drop to fix reordering issues 2013-10-21 11:42:43 +08:00
Dan Poltawski bd1fae5fc0 Merge branch 'MDL-26244_url_24' of https://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-10-21 11:25:27 +08:00
rwijaya ac23be5d24 MDL-42111 TinyMCE media preview: fix video preview display for TinyMCE media.
Effected themes: boxxie, clean, brick, formal_white and splash.
2013-10-21 11:12:45 +08:00
Dan Poltawski 6e72e0a6aa MDL-31405 assign: avoid uncessary get_string call 2013-10-21 11:02:45 +08:00
Dan Poltawski 57bafe6ebc Merge branch 'wip-mdl-31405-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-10-21 10:59:00 +08:00
Andreas Grabs 4ae00d74bc MDL-42210 mod_feedback - convert tabs to space 2013-10-20 10:04:10 +02:00
Michael Milette 60293b276a MDL-42210-Feedback-Input-Labels
Adds labels to the input fields in the Feedback module including: multichoice, multichoicerated, numeric, textarea and textfield.
2013-10-20 10:04:08 +02:00
Charles Severance 4673a6a8fc MDL-40531 mod_lti: Various 1.1/1.1.1 fixes.
Conflicts:
	mod/lti/service.php
2013-10-19 03:04:59 +02:00
Sam Chaffee ce5a85c354 MDL-40531 mod_lti: Changed namespace in XML to IMS LTI compliant 2013-10-19 03:04:47 +02:00
AMOS bot ff952aa064 Automatically generated installer lang files 2013-10-19 00:47:36 +00:00
Petr Škoda 675fa4b813 MDL-37813 remove missing filters when configuring string filters and fix filter uninstall 2013-10-18 15:59:22 +02:00
Petr Škoda 73b0524202 MDL-42208 prevent autocompletion in auth configs 2013-10-18 15:09:17 +02:00
Petr Škoda 58c57f94d6 MDL-42386 fix invalid etag comparison
Credit goes to Eloy Lafuente, thanks!
2013-10-18 14:49:49 +02:00
Dan Poltawski b6ced2f7e4 weekly release 2.4.6+ 2013-10-18 16:16:43 +08:00
Dan Poltawski 6123c76bc7 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-10-18 16:16:34 +08:00
Tony Levi 8beb495df4 MDL-38734: Automated backup failure causing all course to fail 2013-10-18 15:05:00 +08:00
Damyon Wiese 90b46f39a4 Merge branch 'MDL-41554-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-10-18 13:27:19 +08:00
Dan Poltawski 1f3a85aa54 MDL-41554 rss: Move to more robust test url
tinyurl was sometimes failing (was bad to use them anyway)
2013-10-18 12:47:44 +08:00
Dan Poltawski 98e4f24ff6 Merge branch 'MDL-42421_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-10-18 12:15:43 +08:00
Damyon Wiese 48763c4d21 MDL-42112 tablelib: Generate the correct number of cols for empty rows
(And a test for it).
2013-10-18 11:56:06 +08:00
Damyon Wiese d91225aae4 MDL-42112 Tablelib: Add unit tests (some) 2013-10-18 11:56:03 +08:00
Mark Nelson a5436ae8ce MDL-42421 auth: removed incorrect statement in upgrade.txt 2013-10-18 11:38:56 +08:00
Jenny Gray 7a9000b1ff MDL-41339 Tags: Added unique tag instance id to tag_get_tags functions
Avoids php warnings on creating new tags
2013-10-17 14:03:30 +01:00
Damyon Wiese 85d47590cc Merge branch 'MDL-42065_24' of https://github.com/sam-moodle/moodle into MOODLE_24_STABLE 2013-10-16 15:48:19 +08:00
Damyon Wiese 8789750cc5 Merge branch 'MDL-37528-24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-10-16 11:16:45 +08:00
Andrew Davis b15478526a MDL-26244 mod_date:added some logic show or hide the file picker button based on repository availability 2013-10-16 08:33:39 +07:00
Eloy Lafuente (stronk7) 8786deb033 MDL-37877 backup: fix incorrect backported code. 2013-10-16 00:32:00 +02:00
Davo Smith 59e8879130 MDL-35402 forms - prevent crash when multiple rules defined on an editor element 2013-10-15 14:34:40 +01:00
Damyon Wiese e81aa9e8e6 Merge branch 'MDL-37877-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-10-15 16:58:39 +08:00
Dan Poltawski 8a2e491ee7 Merge branch 'MDL-42209_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-10-15 14:43:21 +08:00
Ankit Agarwal 3a6857090e MDL-37877 backup: Fix issues with zipping of large files
Files bigger than 4GB is not supported at this point. Zip archiver doesn't know about it and always returns true. We need to verify if it is a valid file or not and delete if not
Also delete the backup file immediately if anything goes wrong anywhere in backup. We don't want to use up space
2013-10-15 13:18:46 +08:00
Marina Glancy d2ff78d173 Merge branch 'wip-MDL-42234-24' of git://github.com/abgreeve/moodle into MOODLE_24_STABLE 2013-10-15 14:11:58 +11:00
Tim Hunt ef37c13e29 MDL-42309 typo: fix reponse -> response throughout Moodle. 2013-10-15 13:50:05 +11:00
Adrian Greeve a8d816982a MDL-42234 - Repositories: Fix undefined variable notice when no repositories are enabled. 2013-10-15 10:47:22 +08:00
Dan Poltawski ac7f6f4b96 Merge branch 'w42_MDL-42082_m24_authdbpass' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-10-14 14:36:29 +08:00
FilipBenco 6da08c0e2c MDL-42209 backup: fixed wrong icon being displayed when restoring course 2013-10-14 14:33:19 +08:00
Damyon Wiese f72e3fbbf2 MDL-34586 assignment - fix whitespace 2013-10-14 14:29:22 +08:00
Damyon Wiese 8afe4de645 Merge branch 'MDL-34586-24' of https://github.com/mackensen/moodle into MOODLE_24_STABLE 2013-10-14 14:29:14 +08:00
Dan Poltawski 1fc88334a6 Merge branch 'MDL-42232_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-10-14 14:24:17 +08:00
Damyon Wiese 7643bd4ca9 Merge branch 'MDL-34612-24' of https://github.com/mackensen/moodle into MOODLE_24_STABLE 2013-10-14 14:12:23 +08:00
Damyon Wiese 1b9f0beaf3 Merge branch 'MDL-41170-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-10-14 14:04:18 +08:00
Ankit Agarwal 993612b00e MDL-41170 events: Update upgrade.txt to reflect changes made in MDL-41170 2013-10-14 13:24:05 +08:00
Akinsaya Delamarre 4eb084f1a2 MDL-41170: Added user updated event triggers to password updating functions. 2013-10-14 13:22:15 +08:00
Dan Poltawski 34b3d144fe Merge branch 'MDL-41672-text-mail-links_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-10-14 12:12:17 +08:00
Thijs Kinkhorst c61decc816 MDL-36818 cas: improve SSL validation 2013-10-14 10:12:53 +08:00
Eloy Lafuente (stronk7) 5864eb6017 Merge branch 'wip-mdl-41843-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-10-14 00:15:29 +02:00
Eloy Lafuente (stronk7) d9131593c7 Merge branch 'MDL-37181_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-10-13 23:32:55 +02:00
Andrew Nicols 16e566b99f MDL-29441 Chat: Use a valid name for chat popup actions 2013-10-13 20:08:04 +08:00
Petr Škoda bd010f8854 MDL-42110 do not show auth_db password in plaintext 2013-10-12 13:49:54 +02:00
AMOS bot a364f61121 Automatically generated installer lang files 2013-10-12 00:43:51 +00:00
Tim Hunt cf2fb7579b MDL-42232 Multiple choice question choice alignment issue
The problem was with the alignment of:
* tables inside the choices.
* Lists inside the choices.
* The specific feedback, when it spanned mulitple lines.

The problem was introduced by MDL-39420.
2013-10-11 14:26:34 +01:00
Eloy Lafuente (stronk7) 945aa97617 weekly release 2.4.6+ 2013-10-11 13:20:55 +02:00
Rajesh Taneja ca4349c1ce MDL-31405 Assignment: Fixed date in reset to be called once
Conflicts:

	mod/assign/locallib.php
2013-10-11 08:59:02 +08:00
Jayesh Anandani 267b45e0a1 MDL-31405 Assignment reset issue solved 2013-10-11 08:58:29 +08:00
Andrew Nicols 4c53ec3355 MDL-37528 Libraries: Fix gesture + mouse issues with YUI
This addresses issues with devices which support both mouse and gesture
input devices whereby the presence of gesture support on the device causes
mouse interactions to be ignored.

This has the potential to cause issues with multiple events being triggered
for the same action, but we do not have this issue in core, and few
third-party plugins support drag and drop in such a way that this may be an
issue.

This is fixed in the latest version of YUI in a similar way, and the
addition of a new system to only trigger the event from the first action to
be triggered.
2013-10-10 17:14:02 +08:00
Marina Glancy 7bd19d562d Merge branch 'MDL-37153_24' of https://github.com/pauln/moodle into MOODLE_24_STABLE 2013-10-10 12:53:27 +11:00
Sam Hemelryk 49e3cda704 Merge branch 'wip-mdl-41744-m24' of https://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-10-10 14:39:24 +13:00
Sam Chaffee e8ec840f3c MDL-42065 core_grade: Modified some grade_item queries for improved performance
* Modified 2 queries in grade_item::depends_on to improve performance
* Added additional unit tests to cover those queries better
2013-10-09 12:34:29 -06:00
Alain Corbière 0c018318c6 MDL-41672 Fix html2text processing of multiple occurrences of the same URL 2013-10-09 15:49:21 +02:00
David Mudrák 3bd02768df MDL-41672 Add html2text unit test for multiple occurrences of the same URL 2013-10-09 15:49:12 +02:00
Dan Poltawski 39adfbde72 Merge branch 'w41_MDL-42054_m24_phpmailertesting_i' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-10-09 18:20:13 +08:00
Petr Škoda a42e313460 MDL-42054 fix incorrect email redirection in unit tests 2013-10-09 11:57:04 +02:00
Dan Poltawski d6b99cf123 Merge branch 'MDL-39776-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-10-09 16:54:30 +08:00
Dan Poltawski 77eb24f886 Merge branch 'm24_MDL-40226_Add_JNLP_MIME_Type_Support' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-10-09 16:48:44 +08:00
Damyon Wiese d4609de200 Merge branch 'w41_MDL-42047_m24_cohortdel' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-10-09 14:44:25 +08:00
Mark Nelson 6c2d9137b3 MDL-37181 backup: stopped setting the status of unscheduled backups to skipped 2013-10-09 14:16:03 +08:00
Damyon Wiese 5dc182dd6e Merge branch 'wip-MDL-41967-24' of git://github.com/abgreeve/moodle into MOODLE_24_STABLE 2013-10-09 13:12:41 +08:00
Jason Fowler 88e2d12038 MDL-39776 Javascript - enable formautosubmit from a select box on android 2013-10-09 11:39:11 +08:00
Charles Fulton b6a84b6fdd MDL-34612 forum: convert default format value during restore 2013-10-08 20:05:35 -07:00
Paul Nicholls 3e2821e6f5 MDL-37153 - assign: Obey grade display settings in submission status
The assignment submission status screen was ignoring the grade item's
display setting, showing scores even if it's set to display letters only.
2013-10-09 16:03:50 +13:00
Tim Lock d93610d4b0 MDL-41908 QuickForm: Fix PEAR Non-static method error 2013-10-09 10:27:30 +08:00
James Henestofel 34d55059cb MDL-42068 Filepicker course listing use setting courselistshortname to show shortname and fullname 2013-10-09 01:27:33 +02:00
Eloy Lafuente (stronk7) 6257097a3f Merge branch 'MDL-42069_24' of https://github.com/appalachianstate/moodle into MOODLE_24_STABLE 2013-10-08 21:27:27 +02:00
Charles Fulton cd35f43eac MDL-34586 assignment: convert default format value during restore 2013-10-08 09:48:56 -07:00
Rajesh Taneja 788105dd3d MDL-41843 IMS-LTI: Fixed exception namespace 2013-10-08 15:56:52 +08:00
Dongsheng Cai 80cee53996 MDL-41843 Uses OAuthException in moodle\mod\lti namespace 2013-10-08 15:56:52 +08:00
Damyon Wiese dd94734d9a Merge branch 'MDL-41520-MOODLE_24_STABLE-mod_lti-completion-view' of github.com:Trii/moodle into MOODLE_24_STABLE 2013-10-08 14:34:49 +08:00
Damyon Wiese 786538f74f Merge branch 'MDL-32570-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-10-08 13:46:42 +08:00
Dan Poltawski 925ec67b22 Merge branch 'MDL-38655_24' of git://github.com/aolley/moodle into MOODLE_24_STABLE 2013-10-08 13:21:44 +08:00
Marina Glancy b159b57207 Merge branch 'MDL-25176_m24' of https://github.com/merrill-oakland/moodle into MOODLE_24_STABLE 2013-10-08 12:04:12 +11:00
Petr Škoda c01c608fdc MDL-41197 normalize ascii text conversion 2013-10-08 00:04:46 +02:00
Frederic Massart ca887bc9bc MDL-22669 course: Display section number for orphaned activities 2013-10-07 16:52:29 +08:00
Sam Hemelryk 2ff9ac5608 MDL-41197 fix unit tests 2013-10-07 14:16:25 +13:00
Matteo Scaramuccia f63fc5c41a MDL-40226 Files: Added the correct MIME Type for JNLP files.
JNLP stands for Java Network Launch Protocol, used to launch
Java Web Start applications. More details in:
http://docs.oracle.com/javase/tutorial/deployment/webstart/deploying.html
2013-10-06 16:45:16 +02:00
Joshua Johnston d276541169 MDL-41520 LTI: Does not track page views for completion 2013-10-04 09:47:14 -04:00
Fred Woolard 72b266d54e MDL-42069 mod_quiz add lastname sort for manual grading 2013-10-04 09:09:00 -04:00
Petr Škoda 8f3702ee1a MDL-42047 fix cohort method name error after deleting cohort 2013-10-04 11:33:23 +02:00
Petr Škoda 54b951fb5f MDL-41197 ignore all problems when converting texts 2013-10-04 11:13:00 +02:00
Sam Hemelryk 9844660858 weekly release 2.4.6+ 2013-10-04 15:43:43 +13:00
Sam Hemelryk d0012b72ad Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-10-04 15:43:38 +13:00
Rajesh Taneja 623b678c3e MDL-41744 Users: Convert key to value in bulk upload
Menu profile field expects value, during bulk upload if value is passed by form
then options key is passed. So converting key to value if passed though form
2013-10-03 10:18:55 +08:00
Sam Hemelryk 75f6d03855 Revert "MDL-33569 themes: Labels create extra margin below content."
This reverts commit 05c3b5dd2f.
2013-10-03 14:43:51 +13:00
Eric Merrill 236a2fca9b MDL-25176 forum Redirects for new discussions shouldn't use SESSION
Unset the session->fromdiscussion var, because we know that the correct
path will be computed later.
2013-10-01 21:19:17 -04:00
Tim Lock a7c5e2d24d MDL-41996: Don't show the Review Attempt link if no attempts exist. 2013-10-01 20:05:12 +02:00
Eloy Lafuente (stronk7) 4ae75c1847 Merge branch 'w40_MDL-41999_m24_userpw' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-10-01 15:59:24 +02:00
Marina Glancy d7788d69f6 Merge branch 'MDL-32592-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-10-01 20:49:41 +10:00
Marina Glancy a033a6b4c1 Merge branch 'MDL-39653-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-10-01 20:44:07 +10:00
Adrian Greeve 0626a71686 MDL-41967 - Gradebook: Fixed an sql syntax error for gradebook custom profile fields. 2013-10-01 18:00:41 +08:00
Dan Poltawski 756fbd91fd MDL-32570 enrol_imsenterprise: don't hardcode default category id 2013-10-01 11:52:46 +08:00
Sam Hemelryk 3b5c7727f2 MDL-41828 mod: fixed navbar when adding modules to a course 2013-10-01 13:34:01 +10:00
Sam Hemelryk e5b13b7fc0 MDL-41900 events: avoid new debug call within unit tests 2013-10-01 16:21:19 +13:00
Sam Hemelryk 49c29a3f46 Merge branch 'MDL-41995_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-10-01 14:49:55 +13:00
Sam Hemelryk 92fdea041d Merge branch 'MDL-41900-m24' of git://github.com/micaherne/moodle into MOODLE_24_STABLE 2013-10-01 14:35:27 +13:00
Sam Hemelryk a7fd949571 Merge branch 'MDL-41894-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-10-01 13:44:44 +13:00
AMOS bot 32d77062b4 Automatically generated installer lang files 2013-10-01 00:41:49 +00:00
Sam Hemelryk 92416730d1 Merge branch 'MDL-37973_m24' of https://github.com/merrill-oakland/moodle into MOODLE_24_STABLE 2013-10-01 09:53:19 +13:00
Eloy Lafuente (stronk7) 4b95721a26 Merge branch 'MDL-26408-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-09-30 16:01:55 +02:00
Marina Glancy 29d526b495 Merge branch 'MDL-41954-workshop-zero-variance_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-09-30 16:11:44 +10:00
Adam Olley 227d3fcbd3 MDL-40515: report_log: List activities in optgroups 2013-09-30 11:20:44 +09:30
Mary Evans 05c3b5dd2f MDL-33569 themes: Labels create extra margin below content.
Conflicts:

	theme/bootstrapbase/less/moodle/course.less
2013-09-28 16:15:12 +01:00
Petr Škoda cf55843d07 MDL-41999 do not use $USER->password directly 2013-09-27 10:55:12 +02:00
Marina Glancy c7c613b45b weekly release 2.4.6+ 2013-09-27 14:50:19 +10:00
Marina Glancy 06450ed398 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-09-27 14:49:38 +10:00
Dan Poltawski 3d986cf8cd MDL-39653 enrol_imsenterprise: only mail admins on change
The existing beavhiour was sending useless emails to admins and
generating warnings.

Thanks to Matthew Orlando for the suggested fix.
2013-09-27 12:23:37 +08:00
Adam Olley 6e3013be7c MDL-38655: mod_assign: Use correct ordering on cap checks for submission downloads 2013-09-27 12:45:47 +09:30
Mark Nelson 63b66cf276 MDL-41995 calendar: moved the location the page layout was set for the export page
This was done so that the blocks are shown when logged in and viewing this page.
2013-09-26 17:04:30 +08:00
Dan Poltawski aaf95d0161 MDL-32592 enrol_imsenterprise: fix error when category not defined
thanks to Henrik Thorn for the fix
2013-09-26 14:59:08 +08:00
Dan Poltawski 473aab4ffb MDL-26408 enrol_imsenterprise: fix invalid component 2013-09-26 12:21:42 +08:00
Petr Škoda 2504a9d2ec MDL-41223 do not store any form of login URL in $SESSION->wantsurl
Credit goes to Michael Milette, thanks.
2013-09-25 10:58:39 +10:00
Matt Petro a24c22cd12 MDL-41660 backup ims-cc: Use correct temp directory 2013-09-25 02:16:05 +02:00
David Mudrák 2ccad8f967 MDL-41954 Fix the grade for assessment calculation in the Workshop module
In a pretty rare case of zero variance of received assessments, the "distance"
of the evaluated assessment from the referential ("best") one was not increased
regardless it's actual value. This led to higher grades for assessments in
certain situations (see the tracker for a particular example).
2013-09-25 02:03:02 +02:00
Eloy Lafuente (stronk7) b152769f44 Merge branch '40903-24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-09-25 02:00:47 +02:00
Sam Hemelryk 77b4970559 Merge branch 'MDL-41907_m24' of https://github.com/merrill-oakland/moodle into MOODLE_24_STABLE 2013-09-25 10:17:55 +12:00
Marina Glancy 8492c192af Merge branch 'MDL-41929_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-09-24 21:33:12 +10:00
Sam Hemelryk f621e8e3d8 MDL-40903 cached: fixed up versions 2013-09-24 21:13:22 +12:00
Sam Hemelryk 5a804c0f54 MDL-40903 cache: renamed persistcache to staticacceleration 2013-09-24 21:13:22 +12:00
Sam Hemelryk bfff058cc8 MDL-40903 cache: fixed up event invalidation 2013-09-24 21:13:22 +12:00
Marina Glancy 9e72a16e14 MDL-40903 cache: Unittests and small fixes for persistent application cache 2013-09-24 21:13:22 +12:00
Sam Hemelryk 90317c258b MDL-40903 cache: coding style tidyup pre-integration 2013-09-24 21:13:22 +12:00
Sam Hemelryk fcb5548c38 MDL-40903 cache: converted persistent into persistentdata
At the same time all cache instances were made persistent
2013-09-24 21:13:21 +12:00
Ankit Agarwal 654f0c0cf7 MDL-41894 feedback: Remove unused code, which is generating warnings 2013-09-24 15:08:33 +08:00
AMOS bot 402469ce8b Automatically generated installer lang files 2013-09-24 00:42:02 +00:00
Sam Hemelryk fb092979bf Merge branch 'MDL-36465-24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-09-24 08:32:46 +12:00
Tim Hunt 768779972e MDL-41929 quiz statistics, overall stats not displayed. 2013-09-23 18:07:25 +01:00
Marina Glancy b0124c9703 Merge branch 'MDL-41833-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-09-23 19:18:05 +10:00
Andrew Nicols d2674929ba MDL-36465 Course JavaScript: Ensure that the zero section is not draggable 2013-09-23 09:19:11 +01:00
Marina Glancy 47ba8d481e Merge branch 'wip-MDL-41772-24' of git://github.com/abgreeve/moodle into MOODLE_24_STABLE 2013-09-23 14:41:22 +10:00
AMOS bot 814054616f Automatically generated installer lang files 2013-09-21 00:42:40 +00:00
Sam Hemelryk 7bc37de925 weekly release 2.4.6+ 2013-09-20 14:42:53 +12:00
Sam Hemelryk 0f00c5c594 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-09-20 14:34:56 +12:00
Eric Merrill 4b8ed14f54 MDL-41907 Repositories: Maintain the sortorder of a file when overwriting it. 2013-09-19 18:47:42 -04:00
Eric Merrill 9840da227e MDL-37973 gradebook Return a maxgrade of '-' if grade type is TEXT
Including tests for correct return from
grade_edit_tree_column_range->get_item_cell()

This commit includes some special code just for 2.4 in the test
related to a bug in assign.
2013-09-19 11:28:40 -04:00
Michael Aherne 4948ac2e0c MDL-41900 events Log handler failures 2013-09-19 15:58:06 +01:00
AMOS bot 954b1b5504 Automatically generated installer lang files 2013-09-19 00:44:12 +00:00
AMOS bot 9e81532432 Automatically generated installer lang files 2013-09-18 00:45:34 +00:00
Eloy Lafuente (stronk7) 6726f0073e Merge branch 'MDL-41728-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-09-17 21:18:48 +02:00
Ankit Agarwal 5011fb91ff MDL-41833 feedback: Fix setType() warning when deleting a response in feedback 2013-09-17 15:30:07 +08:00
Eloy Lafuente (stronk7) 657beb8924 Merge branch 'MDL-41595_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-09-17 02:15:42 +02:00
Sam Hemelryk 1d5c188798 Merge branch 'MDL-38317-moodle24' of git://github.com/StudiUM/moodle into MOODLE_24_STABLE 2013-09-17 08:38:51 +12:00
Sam Hemelryk ac7cbc012e Merge branch 'MDL-38194-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-09-16 13:54:52 +12:00
AMOS bot 05f1cccc37 Automatically generated installer lang files 2013-09-16 00:40:28 +00:00
Sam Hemelryk 1081b8ec84 Merge branch 'm24_MDL-37524' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-09-16 10:38:25 +12:00
Sam Hemelryk af0a06b521 Merge branch 'wip-MDL-27684-MOODLE_24_STABLE' of git://github.com/satrun77/moodle into MOODLE_24_STABLE 2013-09-16 10:26:50 +12:00
Dan Marsden 9963b0b6a6 MDL-37524 SCORM: mode not calculated correctly. 2013-09-16 10:13:47 +12:00
Sam Hemelryk d7b20f1650 Merge branch 'MDL-29987_24' of https://github.com/bostelm/moodle into MOODLE_24_STABLE 2013-09-16 10:12:51 +12:00
Sam Hemelryk 694cb9b053 Merge branch 'MDL-41534-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-09-16 09:40:00 +12:00
AMOS bot 14dcbdb0f4 Automatically generated installer lang files 2013-09-15 00:39:09 +00:00
AMOS bot 38753adc60 Merge branch 'MOODLE_24_STABLE' into install_24_STABLE 2013-09-14 00:41:38 +00:00
sam marshall da7c844c30 MDL-38194 Files: Allow download of large backup files
The PHP readfile function does not work for files more than 2GB.
This commit provides a wrapper that can be used so that files less
than 2GB are sent with readfile, and files larger than 2GB are
sent manually.

The change applies to all uses of pluginfile.php, although in
reality, backup files are probably the only ones likely to be more
than two gigabytes.
2013-09-13 16:01:58 +01:00
Jean-Philippe Gaudreau 0f6d896e43 MDL-38317 grade import: Translation support for import mappings form. 2013-09-13 08:51:35 -04:00
Henning Bostelmann 0137a13d55 MDL-29987 File resource: fix problem with PDF display on mobile devices
Setting the default display option for PDF files from DISPLAY_EMBED to DISPLAY_OPEN
2013-09-13 10:28:41 +01:00
Adrian Greeve 254bf485f1 MDL-41772 - mod_data: Fixed database_module comments not being restored. 2013-09-13 15:35:32 +08:00
Damyon Wiese e81fce929a weekly release 2.4.6+ 2013-09-13 14:07:27 +08:00
Mohamed Alsharaf c1536ff1ef MDL-27684 repository: make require_login() throws exception instead of redirect 2013-09-13 16:06:51 +12:00
Damyon Wiese 43e1ed2cf3 MDL-37804 assign: Return proper notice when submissions closed.
MDL-38267 was returning the html page when it should have been adding to the list
of notices and returing false.

Conflicts:

	mod/assign/locallib.php
2013-09-12 10:38:45 +08:00
Damyon Wiese 46f15f03d2 MDL-41534 theme: Missed backporting a style to hide empty table rows 2013-09-12 09:27:02 +08:00
sam marshall 0cddce2c56 MDL-41728 Backup: Unnecessary use of in_array in base_plan
Remove unnecessary use of in_array which causes performance problems
when loading the plan for very large courses.
2013-09-11 14:38:37 +01:00
Dan Poltawski 18cbf0db95 Merge branch 'MDL-38267-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-09-11 12:00:15 +08:00
Sam Hemelryk 3b2c61fdb8 Merge branch 'MDL-41658_M24' of git://github.com/kordan/moodle into MOODLE_24_STABLE 2013-09-11 09:42:14 +12:00
Matthew Noorenberghe d64a0e9173 MDL-41634 - URL Download Repository doesn't warn when asked to download non-image files 2013-09-11 09:37:40 +12:00
Sam Hemelryk c88b113c1f Merge branch 'MDL-41528_MOODLE_24_STABLE' of https://github.com/nitzo/moodle into MOODLE_24_STABLE 2013-09-11 09:26:02 +12:00
Sam Hemelryk aa6699f4db Merge branch 'MDL-41630-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-09-11 09:20:27 +12:00
Rajesh Taneja 1e557db89d MDL-41590 Enrolments: If course is deleted, then use courseid for reference 2013-09-11 08:47:04 +12:00
Dan Poltawski 5e99c1f9a1 Merge branch 'MDL-40631-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-09-10 14:32:00 +08:00
Dan Poltawski 84197f41ca Merge branch '41189-24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-09-10 14:12:30 +08:00
Damyon Wiese b604cb81e4 Merge branch 'wip-mdl-23335-m24' of https://github.com/deraadt/moodle into MOODLE_24_STABLE 2013-09-10 12:56:53 +08:00
Damyon Wiese 05f853e2db MDL-41497 auth_db: Fix typo in lang string. 2013-09-10 12:24:55 +08:00
Damyon Wiese a77864208e Merge branch 'MDL-41497-24' of https://github.com/willylee/moodle into MOODLE_24_STABLE 2013-09-10 12:23:17 +08:00
Dan Poltawski 4b3521ec69 Merge branch 'MDL-28561_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-09-10 12:05:10 +08:00
Damyon Wiese 294673628e Merge branch 'MDL-41451_24' of https://github.com/pauln/moodle into MOODLE_24_STABLE 2013-09-10 11:58:41 +08:00
Damyon Wiese 081e303415 Merge branch 'MDL-41626-moodle24' of github.com:StudiUM/moodle into MOODLE_24_STABLE 2013-09-10 09:30:14 +08:00
Sam Hemelryk b14d0e4713 Merge branch 'MDL-41600_24' of git://github.com/aolley/moodle into MOODLE_24_STABLE 2013-09-10 13:11:21 +12:00
AMOS bot d2dc75fb4e Automatically generated installer lang files 2013-09-10 00:41:04 +00:00
Adam Olley 7c95cf02af MDL-41600: qformat_blackboard_six Fix test_import_match fail w/ddmatch
With qtype_ddmatch installed, the unit tests for qformat_blackboard_six
fail as they generate ddmatch questions instead of match ones. This
patch checks for ddmatch and changes the test to expect that instead if
its installed.
2013-09-10 09:16:29 +09:30
Sam Hemelryk a7f3f08722 MDL-32862 backup: fixed missing global 2013-09-10 10:40:11 +12:00
Sam Hemelryk 5db72d63c5 Merge branch 'wip-MDL-32862-24' of git://github.com/abgreeve/moodle into MOODLE_24_STABLE 2013-09-10 09:38:23 +12:00
Sam Hemelryk d58d0239db Merge branch 'MDL-29378-survey-24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-09-10 09:35:50 +12:00
Dan Poltawski e9ea8e9b63 Merge branch 'MDL-41254-m24' of git://github.com/micaherne/moodle into MOODLE_24_STABLE 2013-09-09 18:04:48 +08:00
David Mudrák e523503fb8 MDL-29378 Fix the recent string modification
But accident, I have modified the string 'collesaintro' in the previous patch.
The correct string to be amended is 'collesapintro'.
2013-09-09 11:22:14 +02:00
Dan Poltawski 4da2fefa4d Merge branch 'MDL-37804_24' of github.com:recreate/moodle into MOODLE_24_STABLE 2013-09-09 17:13:49 +08:00
Mary Evans 0f85e6ba0b MDL-41595 mod_book: Book mod does not add TOC to default region 2013-09-09 09:52:43 +01:00
Dan Poltawski 8baa0cab98 Merge branch 'MDL-41163-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-09-09 15:39:58 +08:00
Damyon Wiese 5a730d0a80 Merge branch 'wip-MDL-41517-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-09-09 12:11:10 +08:00
Damyon Wiese 5a36d6292d Merge branch 'm24_MDL-31232' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-09-09 11:13:27 +08:00
Sam Hemelryk b7a4701d1f MDL-41417 course: fixed idnumbertaken string 2013-09-09 12:15:59 +12:00
Paul Nicholls 6cb665f18c MDL-41451 - formslib: use create_function instead of inline function
As per MDL-39432, closure-style inline functions can result in fatal
errors when using eAccelerator and thus should be avoided.
2013-09-09 11:41:17 +12:00
Sam Hemelryk eae5890112 Merge branch 'MDL-38794_24' of https://github.com/prateeksachan/moodle into MOODLE_24_STABLE 2013-09-09 11:12:11 +12:00
Sam Hemelryk fd9ecb595f Merge branch 'MDL-41417_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-09-09 10:50:56 +12:00
Sam Hemelryk 1fdc20cbdb Merge branch 'MDL-29378-survey-24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-09-09 10:48:49 +12:00
Sam Hemelryk 1830fc428c MDL-41189 fixed overflow issue with filepicker thumbnail 2013-09-09 08:24:40 +12:00
kordan c53069c60a MDL-41658 theme_formal_white: text in input select is now never centered (fixed at central level) 2013-09-08 21:08:09 +02:00
AMOS bot 97a0c05d46 Automatically generated installer lang files 2013-09-08 00:43:12 +00:00
AMOS bot 700e92b8d4 Merge branch 'MOODLE_24_STABLE' into install_24_STABLE 2013-09-08 00:43:12 +00:00
Eloy Lafuente (stronk7) 28980dbee6 Moodle release 2.4.6 2013-09-07 14:25:39 +02:00
Dan Poltawski 39616d39c4 MDL-41623 rss: clean output rss content 2013-09-07 10:42:02 +08:00
Eloy Lafuente (stronk7) 178af4770e MDL-41623 ensure all links are valid urls
For 23 and 24 we are modifying the default Sanitizer. Note that
for 24 and upwards we are doing the same with our extended
Sanitizer. So this is just an interim hack for those old versions.
2013-09-07 04:06:08 +02:00
sam marshall 2d124e8f4e MDL-41446 Completion: Incorrectly marks complete when grade data present with no actual grade 2013-09-06 13:03:28 +01:00
Mark Nelson eb57e9e60b MDL-41417 course: allow the use of duplicated idnumbers if they existed before fix 2013-09-06 15:24:43 +08:00
Francis Devine 5f8e23c1a9 MDL-41417 course: prevent duplicate idnumbers being used when updating a course 2013-09-06 15:24:19 +08:00
Adrian Greeve 7ed78289b5 MDL-32862 - Backup: Rewriting resource_old links on backup. 2013-09-06 14:49:08 +08:00
Frederic Massart 77458d700b MDL-41630 oauth: Throw exception instead of dying on error 2013-09-06 14:18:29 +08:00
Paul Nicholls 52b617673c MDL-41451 - Large forms are truncated by max_input_vars
By parsing php://input in chunks, we can bypass max_input_vars for
forms which do not use the "multipart/form-data" enctype.  This can
be (and is) safely skipped if there are fewer than max_input_vars
fields submitted as part of $_POST.
2013-09-06 14:57:03 +12:00
AMOS bot efcbed9b73 Merge branch 'MOODLE_24_STABLE' into install_24_STABLE 2013-09-06 00:47:50 +00:00
Nitzan Bar 2dd8a44c20 MDL-41528 enrol/ldap course default settings when no course template is selected 2013-09-06 02:14:20 +03:00
Jean-Philippe Gaudreau 3b8005fae7 MDL-41626 cas auth: Setting the right url for the multi-authentication page 2013-09-05 16:48:14 -04:00
sam marshall 097abcc59c MDL-41163 Restore: Large course restore timeout on schema page 2013-09-05 17:17:42 +01:00
Dan Poltawski fe38aff3a7 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-09-05 14:43:39 +08:00
Dan Poltawski e78a2d0e44 weekly release 2.4.5+ 2013-09-05 13:35:45 +08:00
David Mudrák f257805573 MDL-29378 Code cleanup in the Survey module
While working on the issue, I spotted these two places that were worth of
fixing. The first one is a trivial reminiscence of a previous refactoring,
after which both branches of the if() statement became equal.

The second one is actually a typo as in theory it could generate unexpected
input fields with the name like qPP1. Luckily this never happened due to the
way how survey questions are hardcoded (there are no questions with the type 2
that would require two answers to their subquestions).
2013-09-05 00:09:59 +02:00
David Mudrák 2e5d19ddfc MDL-29378 Fix the form display in the Survey/COLLES P+A module
In MDL-7501, we stopped using rowspanning cells in the form table due to
accessibility. That had introduced a regression so in the COLLES P+A survey,
all the rows were displayed with the same background colour. This patch returns
the previous behaviour that each couple of items can be distinguished by the
background colour.

Also, there is no need to display "I prefer that" and "I found that" as a small
text any more. It had made sense in rowspanning layout but not after MDL-7501
was fixed.

And finally, as all items are enumerated now sequentially, there are actually
48 lines, each couple covering one question in two variants. I think it's
correct to reflect this in the description of the form so the text was slightly
amended.
2013-09-05 00:09:59 +02:00
David Mudrák 708a1cec00 MDL-29378 Fix regression in the Survey/COLLES P+A module
This basically reverts the commit 5196df589b that
I believe was a result of misunderstanding of how question type field is
(ab)used in the Survey module. As it took significant time to get familiar with
the overall logic of questions and their processing in the module, I left my
findings in added inline comments. The point is that it is $question->type that
matters. Types of questions listed as subquestions in the multi field is
irrelevant in that case (and all have it set to 1 IIRC).

This patch re-enables the "COLLES (Preferred and Actual)" survey type that did
not work at all due to regression.
2013-09-05 00:09:59 +02:00
Damyon Wiese 3caeaa448e MDL-41259 ldap: Move on to the next course when create_course fails 2013-09-04 16:16:15 +08:00
Damyon Wiese 3e230a757c MDL-41259 enrol_ldap: Fix for backport branch
Use error_log instead of the newer progress trace.
2013-09-04 12:48:42 +08:00
Damyon Wiese c8b1ecedc7 Merge branch 'MDL-41485-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-09-04 12:26:39 +08:00
Damyon Wiese 4520f30def MDL-41179 assign: Ensure a submission record exists for lock/unlock
Can't change the function params because it is changed in master already.
This will create a draft submission when a student is prevented from submitting
but that is a minor sideeffect and doesn't happen in master.
2013-09-04 11:03:36 +08:00
Dan Poltawski d1af85a398 Merge branch 'wip-mdl-41418-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-09-04 10:38:34 +08:00
Eloy Lafuente (stronk7) 75cf024576 Merge branch 'MDL-41568-en_fix-24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-09-03 15:11:22 +02:00
Helen Foster b5f9a3b0e3 MDL-41568 Merge English strings from the en_fix language pack 2013-09-03 12:56:04 +02:00
Mary Evans 53165cbc05 MDL-28561 blocks_rss_client: Fixes lines between RSS feed items are not showing in all themes. 2013-09-03 10:23:55 +01:00
Damyon Wiese 13ad8def1b Merge branch 'MDL-41348_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-09-03 16:10:13 +08:00
Tim Lock f246359c29 MDL-41304: Hide and handle LDAP error when user not in context being checked 2013-09-03 16:05:58 +08:00
Aparup Banerjee 3bc786adb1 MDL-37564 linked dependant plugin component text to plugins DB 2013-09-03 14:57:41 +08:00
Damyon Wiese e75bd18064 Merge branch 'MDL-33472-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-09-03 14:38:52 +08:00
Damyon Wiese 7a35f9f9fc Merge branch 'm24_MDL-29218_plugin_init_not_blocking_when_false' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-09-03 14:29:37 +08:00
Damyon Wiese 6026b9157d Merge branch 'MDL-32690_restoreMissingAssignment_24' of https://github.com/moodlerooms/moodle into MOODLE_24_STABLE 2013-09-03 14:16:38 +08:00
Michael de Raadt 557b8de4cf MDL-23335 mod_forum: allow multi-lang filtering of shortened messages
MDL-23335 mod_forum: Correct ordering of filtering and shortening
2013-09-03 13:36:04 +08:00
Dan Poltawski da337c3f39 Merge branch 'w36_MDL-41255_m24_changepw' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-09-03 12:59:04 +08:00
Dan Poltawski ef103c84bb Merge branch 'MDL-41428-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-09-03 12:31:12 +08:00
Marina Glancy f68ebb8282 MDL-41517 Do not call fix_course_sortorder unnecessarily
Thanks to Thomas Worthington
2013-09-03 13:55:04 +10:00
Dan Poltawski d65c2e5d44 Merge branch 'wip-MDL-41179-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-09-03 11:49:07 +08:00
Dan Poltawski 03b992e43b Merge branch 'wip-MDL-41317-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-09-03 10:40:41 +08:00
Dan Poltawski e8bc65a85e Merge branch 'MDL-40214_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-09-03 10:07:08 +08:00
Matteo Scaramuccia c7aac02925 MDL-29218 Repository: fixed a typo in the PHPDoc 2013-09-02 23:26:51 +02:00
Matteo Scaramuccia 832a19829b MDL-29218 Repository: $pname, get rid of all the useless code
More details in the Tracker.
2013-09-02 23:26:49 +02:00
Matteo Scaramuccia d0ddf08dc0 MDL-29218 Repository: Hide the repo if repository::plugin_init returns false 2013-09-02 23:26:48 +02:00
prateeksachan 30d3f1d220 MDL-38267 assign: No Submit button after cut-off date
Conflicts:

	mod/assign/locallib.php
	mod/assign/tests/locallib_test.php
2013-09-02 22:49:42 +08:00
Damyon Wiese a7f94caa2e MDL-40631: Prevent students from submitting empty assignments.
Conflicts:

	mod/assign/locallib.php
	mod/assign/tests/locallib_test.php
2013-09-02 22:02:50 +08:00
Michael Aherne aadac9873b MDL-41254 backup Raise time and memory limit in precheck. 2013-09-02 14:06:44 +01:00
Dan Poltawski ed016dd8fc Merge branch 'MDL-41149-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-09-02 17:25:46 +08:00
Dan Poltawski afe1dde0c8 Merge branch 'MDL-35925-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-09-02 15:24:33 +08:00
Nitzan Bar 1fdb431dfe MDL-41259 when duplicate course shortname exists an exception is thrown and sync is aborted 2013-09-02 15:09:06 +08:00
Dan Poltawski 5a407be1d4 Merge branch 'MDL-36093-moodle24' of github.com:StudiUM/moodle into MOODLE_24_STABLE 2013-09-02 14:11:05 +08:00
Dan Poltawski 8793ba310d MDL-40676 tests: fix null byte test. 2013-09-02 13:59:26 +08:00
Petr Škoda 74d458916b MDL-40676 ignore null bytes 2013-09-02 12:28:15 +08:00
Dan Poltawski 370f95edf0 Merge branch 'MDL-41175_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-09-02 11:53:00 +08:00
Dan Poltawski 79dc70d99c Merge branch 'MDL-41328-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-09-02 11:45:08 +08:00
Andrew Nicols 4b23a6fa05 MDL-41328 Editor: Work around another iOS issue with TinyMCE
We apply this only on touchend and not touchstart or touchmove. The
location is not guaranteed until the end of the gesture, and there's no
need to keep applying focus on every move.
2013-09-02 09:41:55 +08:00
Petr Škoda 7a3b3ac4d2 MDL-41255 fix incorrect redirection logic when changing password
Credit goes to Michael Milette.
2013-08-31 11:43:27 +02:00
AMOS bot 85ed2ec89b Merge branch 'MOODLE_24_STABLE' into install_24_STABLE 2013-08-31 00:43:57 +00:00
Willy Lee 4a3728ee50 MDL-41497 auth_db: Added help text for using odbc dsn names instead 2013-08-30 10:25:48 -05:00
Willy Lee c959f27415 MDL-41497 enrol_database: Added help text for using odbc dsn names instead 2013-08-30 09:03:41 -05:00
Ankit Agarwal 2bcfd98eab MDL-41485 calendar: Replace value of action buttons on managesubscription page with int 2013-08-30 17:24:34 +08:00
Dan Marsden e727d2aa2a MDL-31232 SCORM: Wrap suspend_data even when no spaces in value. 2013-08-30 20:37:09 +12:00
Damyon Wiese 6cef890fbc weekly release 2.4.5+ 2013-08-30 09:39:54 +08:00
AMOS bot afd76d0c5d Automatically generated installer lang files 2013-08-30 00:41:50 +00:00
Mark Nielsen 0fc55f1d0a MDL-32690: Restore 1.9 backup into 2.X fails on missing assignment type
Solution is as follows:
* Allow unsupported subplugins to convert from Moodle1 to Moodle2
* On Moodle2 restore hide unsupported subplugins
* Graceful error message in assignment of unsupported subplugins
2013-08-29 08:48:39 -07:00
Jean-Philippe Gaudreau 83f27b6cca MDL-36093 grade export: Fix HTML special characters printed litteraly. 2013-08-28 09:16:34 -04:00
Tim Hunt 530e43776b MDL-41348 question code depends on filelib.
I think this used to work because mod/forum/lib.php used to be included
everywhere, and in turn included lib/formslib.php. We should declare the
dependencey explicitly.
2013-08-28 11:18:25 +01:00
Damyon Wiese 8e4c96c519 MDL-41249 assign: Fix incorrect gradingform restore step
The mapping in the previous patch was wrong - mod assign uses
the area "submissions" but the itemid is the grade->id not the submission->id.
2013-08-28 16:33:32 +08:00
Colin Campbell 7e8638914f MDL-40214 mod_assign: Fixed issue with custom scale being lost during restore. 2013-08-28 10:49:29 +08:00
Marina Glancy 36d31f8081 MDL-41317 Set correct context to send bulk message page 2013-08-28 11:07:37 +10:00
Eloy Lafuente (stronk7) d8669d5bef Merge branch 'MDL-41387_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-08-27 21:00:52 +02:00
Eloy Lafuente (stronk7) ee3433a44b Merge branch 'm24_MDL-41410_Move_Comment_To_Appropriate_Place' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-08-27 19:46:32 +02:00
Dan Poltawski 7d64b40db1 Merge branch 'MDL-41366_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-27 18:09:54 +08:00
Damyon Wiese 08d19eaeb9 Merge branch 'MDL-41401-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-08-27 15:08:43 +08:00
Dan Poltawski e3559db951 MDL-38765 quiz: fix incorrect comment 2013-08-27 13:59:24 +08:00
Dan Poltawski 4c37aadb32 Merge branch 'MDL-38765_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-27 13:53:09 +08:00
Damyon Wiese e4e6173568 Merge branch 'MDL-40877-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-08-27 12:50:04 +08:00
Damyon Wiese 58605be7f2 Merge branch 'MDL-40447_M24' of https://github.com/nadavkav/moodle into MOODLE_24_STABLE 2013-08-27 12:29:59 +08:00
Nadav Kavalerchik 9684aab5a2 MDL-37211 Backup: Migrate hard-coded strings to language string for the table header labels on the restore page 2013-08-27 11:58:04 +08:00
Dan Poltawski 4acc7c0106 Merge branch 'wip-MDL-41222-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE
Conflicts:
	lib/modinfolib.php
2013-08-27 11:08:14 +08:00
Frederic Massart 279f7582a4 MDL-41428 repository_coursefiles: Missing white space in name 2013-08-27 10:31:18 +08:00
Marina Glancy f8758dc3d3 MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current 2013-08-27 09:50:46 +10:00
Dan Poltawski 0f567efc8f Merge branch 'MDL-41291-24' of git://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-08-26 18:07:11 +08:00
Damyon Wiese 727c220c7a MDL-41213 filepicker: Version bump for css changes 2013-08-26 16:22:08 +08:00
Damyon Wiese 33fec82b0a Merge branch '41213-24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-08-26 16:20:47 +08:00
Rajesh Taneja ba55a0f6c9 MDL-41418 Administration: Page context should be set before setting page title 2013-08-26 15:27:14 +08:00
Dan Poltawski ea6deb7e09 Merge branch 'MDL-35930_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-08-26 14:56:45 +08:00
Dan Poltawski 433bba6b2f Merge branch 'MDL-36126_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-08-26 14:25:42 +08:00
Mark Nelson 0534f2dd9b MDL-36126 backup: ensure the backup_logs message does not exceed the maximum allowed length in the DB 2013-08-26 20:40:46 +08:00
Damyon Wiese 1e27536646 Merge branch 'mdl24_MDL-29004_wiki-fix-images-in-printer-friendly-view' of https://github.com/brki/moodle into MOODLE_24_STABLE 2013-08-26 13:51:21 +08:00
Dan Poltawski cd118a23e7 Merge branch 'MDL-41249-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-08-26 13:11:19 +08:00
Damyon Wiese 4e66dc96b3 Merge branch 'wip-MDL-41106-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-08-26 09:44:17 +08:00
Damyon Wiese 81ff8adcc5 MDL-36803 tinymce: Version bump for js changes 2013-08-26 09:34:15 +08:00
Damyon Wiese 527b36b905 Merge branch 'MDL-36803-m24' of https://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-08-26 09:33:41 +08:00
Russell Smith ab2d7d4f3d MDL-41291 cache: Use fread to avoid race conditions 2013-08-26 10:51:23 +10:00
Sam Hemelryk 426e9c79ac MDL-41106 cache: several fixes for the session cache.
This issue makes several fixes for the session loader and the session store.
 * maxsize argument now works for session caches.
 * fixed performance hole when interation occurs frequently.
 * fixed cache purge bug occuring when multiple caches are defined before being used.
 * improved lastaccess handling.

Big thanks to Marina who contributed the following commits:
 * Always make sure the elements in cache are sorted so we need to remove only elements in the beginning of array
 * Remove expired elements from session store to free memory
 * Minor bug fixes
2013-08-26 09:49:57 +12:00
Sam Hemelryk 2254ea48a9 MDL-41213 filepicker: corrected outline of selected file dialogue 2013-08-26 08:37:12 +12:00
Mary Evans 1be71b3131 MDL-41175 themes: Add/remove group members page broken on small screens. 2013-08-25 17:26:14 +01:00
Damyon Wiese 7064882041 MDL-41149 assign: Group submission updates emailed to wrong person
grade_item_update was altering the userid in the submission record
instead of cloning it. This meant only the last member of a group
recieved all notifications meant for other students in the group.
2013-08-25 22:18:36 +08:00
Damyon Wiese 56f24fadd4 MDL-41249 assign: Restore step missing gradingform mapping
Thanks to Matthieu Raggett for the report and the solution.
2013-08-25 21:25:49 +08:00
Matteo Scaramuccia 91b9fb3749 MDL-41410 Caching: move comment to the appropriate place.
MDL-38162 fixes the issue about testing the connection to the memcached
daemon, which means testing once the connection to the pool of servers
and not to each of the servers while being added to the pool.
It misses to move the comment to that code too.
2013-08-25 14:17:53 +02:00
AMOS bot a8416f35c5 Merge branch 'MOODLE_24_STABLE' into install_24_STABLE 2013-08-24 00:59:07 +00:00
Dan Poltawski 95899cab2f MDL-41401 backup: fix misnamed test method 2013-08-23 15:10:45 +08:00
Dan Poltawski 0d435a3d7c MDL-33472 google plugins: move helper functions to upgradelib.php
upgrade.php is reserved for the upgrade steps only. See also
MDL-34103
2013-08-23 11:34:18 +08:00
Damyon Wiese abb767192f weekly release 2.4.5+ 2013-08-23 10:33:40 +08:00
Mark Nelson f0a60c5f2f MDL-41387 tags: changed character case in string used when deleting a course 2013-08-22 17:40:12 +08:00
Dan Poltawski ee262fa7f5 Revert "MDL-36044 - Delete Icon ("X") blocks Score numbers, when in RTL mode (mod/assign , Rubrics editor)"
This reverts commit 42fabe1e87.
2013-08-22 17:36:39 +08:00
Damyon Wiese c951ff9d39 Merge branch 'wip-MDL-41196-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-08-22 11:23:17 +08:00
Dan Poltawski 17f8a9f75f Merge branch 'MDL-30839-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-08-22 11:18:10 +08:00
Jason Fowler 1b883b8c20 MDL-30839 Accessibility - Focusing on error on submit 2013-08-22 10:53:18 +08:00
Sam Hemelryk fc4f36be11 MDL-41196 phpmailer: fixed unit test detection 2013-08-22 14:46:42 +12:00
Dan Poltawski 5689cb3a27 Merge branch 'MDL-30839-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-08-22 10:15:59 +08:00
Jason Fowler 6050809347 MDL-30839 Fixing extra line breaks in error msg 2013-08-22 09:10:19 +08:00
Tim Hunt f08bce9a54 MDL-40996 & MDL-41162 quiz: fix html_writer::div use in 2.4. 2013-08-22 08:26:01 +12:00
Tim Hunt 67051eb403 MDL-41366 qbehaviour_informationitem fix name capitalisation. 2013-08-21 12:30:06 +01:00
Tim Hunt 6dc4e89073 MDL-38765 quiz view: fix duplicate message.
The "No more attempts are allowed" message was being shown twice. I
checked back, and it has been like that since before the quiz was
converted to use a renderer. Still, it looks horrible, so changing it.
2013-08-21 10:24:32 +01:00
Dan Poltawski 5f6877ddee MDL-41191 mod_forum: avoid DISTINCT on TEXT columns
It is not supported by all db engines
2013-08-21 15:48:09 +08:00
Dan Poltawski 381f53e27e Merge branch 'MDL-30839-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-08-21 15:18:03 +08:00
Jason Fowler 466fb01621 MDL-30839 Fixing extra line breaks in error msg 2013-08-21 15:01:59 +08:00
Frederic Massart a8f5f4b6e2 MDL-40877 repository_url: Use textlib functions instead of mb_strlen() 2013-08-21 14:00:40 +08:00
Dan Poltawski af5e39e1b6 Merge branch 'wip-MDL-36690-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-08-21 11:36:40 +08:00
Marina Glancy 661d4816df MDL-36690 Do not cache objects inside course.modinfo as they may fail to serialize
convert moodle_url (all other fields are numbers or strings) to string before caching and then back to moodle_url when restoring.
Otherwise serialized modinfo can contain \0 byte which cause problems in Postgres DB
2013-08-21 13:13:35 +10:00
Dan Poltawski 184309fa55 Merge branch 'wip-MDL-32191-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-08-21 10:45:07 +08:00
AMOS bot 26af11ece6 Automatically generated installer lang files 2013-08-21 00:43:41 +00:00
Sam Hemelryk 4bc9eec96f Merge branch 'MDL-41162_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-21 12:12:43 +12:00
Sam Hemelryk 1eb3364a9e MDL-41157 calendar: added unit test def to phpunit.xml.dist 2013-08-21 11:20:23 +12:00
Sam Hemelryk fef821d726 Merge branch 'm24_MDL-41144' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-08-21 10:59:34 +12:00
Andrew Nicols 334827b61e MDL-36803 TinyMCE: Fix TinyMCE following touch events on iOS browsers 2013-08-20 23:56:01 +01:00
Sam Hemelryk 69127087c9 Merge branch 'MDL-41157-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-08-21 10:33:30 +12:00
Sam Hemelryk b43863f6a9 Merge branch 'MDL-41196-m24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-08-21 09:29:31 +12:00
Damyon Wiese 86cef7fbca Merge branch 'MDL-41191-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-08-20 16:18:36 +08:00
Damyon Wiese b1cd2f8248 Merge branch 'w33_MDL-41112_m24_cachedist' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-08-20 15:21:43 +08:00
Jason Fowler 80e86364f4 MDL-35925 - File picker - Adding aria attributes to assist in accessibility 2013-08-20 14:23:23 +08:00
Damyon Wiese 59c487a7f3 Merge branch 'MDL-27595-2_24' of https://github.com/bostelm/moodle into MOODLE_24_STABLE 2013-08-20 13:53:52 +08:00
Damyon Wiese 18c49b1420 Merge branch 'MDL-41036_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-20 13:02:26 +08:00
Damyon Wiese d161d6bbe9 Merge branch 'MDL-41122_2.4' of git://github.com/kastashov/moodle into MOODLE_24_STABLE 2013-08-20 12:30:43 +08:00
Dan Poltawski 981ca84aef Merge branch 'MDL-38203_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-20 11:36:00 +08:00
Nadav Kavalerchik e8efd1fbe2 MDL-36044 - Delete Icon ("X") blocks Score numbers, when in RTL mode (mod/assign , Rubrics editor) 2013-08-20 11:08:25 +08:00
AMOS bot 796819b631 Automatically generated installer lang files 2013-08-20 00:42:28 +00:00
Marina Glancy a62d50ffb8 MDL-41222 Remove unnecessary course cache rebuild 2013-08-20 10:21:12 +10:00
Dan Poltawski 4b350436cd Merge branch 'MDL-30839-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-08-19 17:51:28 +08:00
Damyon Wiese 7452709d69 Merge branch 'm24_MDL-39572' of https://github.com/totara/moodle into MOODLE_24_STABLE 2013-08-19 15:44:17 +08:00
Damyon Wiese 07173cac05 Revert "MDL-41106 cache: several fixes for the session cache."
This reverts commit 4973a0cb41.
This reverts commit e3d9d02381.
This reverts commit b4aba7cac2.
2013-08-19 15:34:00 +08:00
Dan Poltawski ab97bc0a1e Merge branch 'MDL-40893-24' of https://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-08-19 14:50:18 +08:00
Damyon Wiese 79b958a4a7 Merge branch 'wip-MDL-41106-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-08-19 13:51:42 +08:00
Damyon Wiese c93707771f Merge branch 'wip-MDL-36789-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-08-19 13:16:39 +08:00
Jason Fowler 790b3da848 MDL-30839 Accessibility, Forms - Improve accessibility or error messages 2013-08-19 09:56:16 +08:00
AMOS bot da51402724 Automatically generated installer lang files 2013-08-19 00:42:38 +00:00
Sam Hemelryk 4973a0cb41 MDL-41106 cache: tidied up several elements 2013-08-19 11:31:37 +12:00
Marina Glancy e3d9d02381 MDL-41106 Cleaning up expired elements in session cache store
- Always make sure the elements in cache are sorted so we need to remove only elements in the beginning of array
- Remove expired elements from session store to free memory
- Minor bug fixes

Conflicts:
	cache/stores/session/lib.php
	cache/stores/session/tests/session_test.php
2013-08-19 11:31:11 +12:00
Andrew Nicols 3822616ba6 MDL-41196 Unit Tests: Add a phpmailer message sink 2013-08-18 16:17:35 +01:00
Nadav Kavalerchik db7d0186ee MDL-40447 Administration: Fix translation: "Profile" should be "Profile Fields" on advanced (more...) user filter form 2013-08-17 23:42:35 +03:00
Frederic Massart d0720e784e MDL-40877 core_text: Added UTF-8 safe strrchr method 2013-08-16 14:20:31 +08:00
Rossiani Wijaya c68f17dfc5 MDL-35930 filepicker filemanaer: make announcement on page change when selecting view files options 2013-08-16 12:14:22 +08:00
AMOS bot 202d7e6ad3 Automatically generated installer lang files 2013-08-16 00:42:58 +00:00
Russell Smith 5821a7c5f1 MDL-40893 backup: cache question answers for performance
To constrain memory we only cache a single question's answers.
A quiz must display this many answers, so it will not result
in undue memory pressure.

We now match on the full answer text rather than the first 255
characters.  This removes the risk of matching questions with the
same start.
2013-08-16 10:06:59 +10:00
Sam Hemelryk b4aba7cac2 MDL-41106 cache: several fixes for the session cache.
This issue makes several fixes for the session loader and the session store.
* maxsize argument now works for session caches.
* fixed performance hole when interation occurs frequently.
* fixed cache purge bug occuring when multiple caches are defined before being used.
* improved lastaccess handling.
2013-08-16 11:59:31 +12:00
Simon Coggins a6bc89e4d2 MDL-39572: Fix sql_order_by_text() to use length argument correctly 2013-08-16 11:28:47 +12:00
Simon Coggins f6868f9c9d MDL-39572: Fix existing tests and add more to demonstrate issue with sql_order_by_text() 2013-08-16 11:28:46 +12:00
Dan Marsden 1fc4e2b414 MDL-41144 enrol_flatfile: ignore deleted users 2013-08-16 09:33:12 +12:00
Dan Marsden 2f64dd6dc8 MDL-37393 SCORM: Fix existing AICC scoes to use correct parent/child relationships 2013-08-16 09:29:58 +12:00
Matteo Scaramuccia 9372820a6e MDL-37393 SCORM: Fixed PHP Strict Standards errors with AICC packages 2013-08-16 09:29:58 +12:00
Jonathon Fowler f2237bd7dc MDL-32191 navigation: Add keys to module and block settings nav nodes 2013-08-16 09:18:50 +12:00
Tim Hunt b014bb8b4c MDL-38203 multianswer qtype: feedback pop-up should be constrained.
So that, when there is a lot of feedback, it is all visible.
2013-08-15 14:16:32 +01:00
Marina Glancy b9f0a2b869 MDL-36789 Quick course cache integrity check for deleted modules 2013-08-15 21:47:50 +10:00
Tim Hunt 8fbb62c9bc MDL-41162 quiz view page: invalid HTML.
We were sometimes outputting nested p tags. Change the outer one to a
div.
2013-08-15 12:41:31 +01:00
Tim Hunt e859dfdfb8 MDL-41036 Question category info should use HTML editor
This is a minimal fix. All this code could do with a clean-up, but at
the moment, it works, so I am not going to touch it.
2013-08-15 11:58:05 +01:00
Henning Bostelmann 0efd7e9d2e MDL-27595 backup: allow course import with warnings
Proceed with import if warnings are found, but display the warnings afterwards
2013-08-15 11:22:19 +01:00
Dan Poltawski 14e8af6687 weekly release 2.4.5+ 2013-08-15 16:43:23 +08:00
Dan Poltawski 0bfeff4c5e Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-08-15 16:40:29 +08:00
Rossiani Wijaya a60b7797cd MDL-41200 Filepicker: Reduce the string length to fit the dialog size nicely. 2013-08-15 10:50:57 +08:00
Rossiani Wijaya 72e810ca24 MDL-41200 filepicker: change header string to select.
Add length limitation for header, so it fits nicely in mobile devices
2013-08-15 10:48:46 +08:00
AMOS bot c7b085daa0 Automatically generated installer lang files 2013-08-15 00:54:44 +00:00
Dan Poltawski 5fa41023da Merge branch 'MDL-39507_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-14 21:58:14 +08:00
Dan Poltawski 376ba9f726 MDL-41191 enrol: unit tests for enrol_get_shared_courses 2013-08-14 21:40:36 +08:00
Tim Hunt 12cc56072a MDL-39507 Question HTML export: fix image handling.
Some code got committed to stable branches that relied on a new API that
was in master only. This fixes it to use the old API.
2013-08-14 11:04:10 +01:00
Dan Poltawski 9ec19c21d2 MDL-41157 calendar: add unit tests for calendar_get_course_cached 2013-08-14 11:06:20 +08:00
Brian King 07b248886d MDL-29004 Wiki: display images in printer-friendly view 2013-08-13 10:10:06 +02:00
Dan Poltawski d835ad6935 MDL-39507 qtype_essay: hacky fix for unit tests
This is just to get the tests passing for integration purposes. Tim
may want to do a robust fix and revert this.
2013-08-13 10:47:46 +08:00
Dan Poltawski 2e91dfc66c Merge branch 'MDL-39507_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-13 09:53:31 +08:00
Sam Hemelryk c7f4deecbd Merge branch 'MDL-41045-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-08-13 10:19:05 +12:00
Sam Hemelryk 0047905f91 Merge branch 'MDL-39691_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-08-13 09:40:59 +12:00
Sam Hemelryk 452ff25284 Merge branch 'MDL-41091_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-13 09:38:20 +12:00
sam marshall 1a9dc90313 MDL-41050 Progress bar: Width parameter does not work 2013-08-13 09:29:26 +12:00
Sam Hemelryk 3155dcf541 Merge branch 'MDL-41033_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-08-13 09:21:40 +12:00
Sam Hemelryk 06737a22ea Merge branch 'MDL-40996_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-13 09:07:49 +12:00
Sam Hemelryk c5dd64f1e9 Merge branch 'MDL-30895-24' of https://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-08-13 08:45:13 +12:00
Sam Hemelryk abafd9a81b NOBUG: fixed whitespace 2013-08-13 08:41:41 +12:00
Sam Hemelryk c41a6dfcd3 Merge branch 'MDL-35931-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-08-13 08:37:59 +12:00
Sam Hemelryk 869a5896d0 Merge branch 'MDL-35919-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-08-13 08:35:23 +12:00
Sam Hemelryk f568a40ac7 Merge branch 'MDL-35934_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-08-13 08:31:59 +12:00
Tim Hunt 06a42cff90 MDL-39507 questions: fix pluginfile URLs before format_text.
This commit build's on Jean-Michel's work, tidying up a few lose ends.
2013-08-12 13:13:54 +01:00
Jean-Michel Vedrine cda91161df MDL-39507 questions: fix pluginfile URLs before format_text. 2013-08-12 10:36:40 +01:00
Dan Poltawski aa39783515 Merge branch 'MDL-27655_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-08-12 16:42:07 +08:00
Dan Poltawski f26c65003d Merge branch 'MDL-30001_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-08-12 16:13:29 +08:00
Dan Poltawski 2b4dbc30ee Merge branch 'wip-mdl-38344-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-08-12 13:52:49 +08:00
Jason Fowler cdc4b4647d MDL-35919 - Activity Chooser - Adding Aria attributes to improve accessibility 2013-08-12 13:28:03 +08:00
Rossiani Wijaya c6a86e6686 MDL-35934 Filemanager: change the set attribute to use setAttribute() instead of YUI set(). 2013-08-12 12:49:52 +08:00
Kirill Astashov 6796b5630c MDL-41122: Trim on RSS body to prevent Remote RSS block from failing on valid feeds 2013-08-12 12:37:22 +09:30
Jean-Michel Vedrine bfa8f562f7 MDL-39691 Lesson - Email graded essays not working 2013-08-11 08:09:09 +02:00
Jean-Michel Vedrine 390cb87e76 MDL-30001 WEBCT Import does not work for 2.0 2013-08-11 08:06:13 +02:00
Petr Škoda 22ecd9658c MDL-41112 fix theme and js caching info in config-dist.php 2013-08-10 23:49:30 +02:00
Rajesh Taneja ad7577e144 MDL-38344 Calendar: converted name field in event table to text
There is no limitation on length of event name in RFC-2445, so changing type
for name from char to text.
2013-08-09 13:20:41 +08:00
Rossiani Wijaya 498cc62c33 MDL-41033 Filepicker: add ARIA attributes for selecting file in a modal 2013-08-09 10:55:06 +08:00
Rossiani Wijaya ce09c74ab1 MDL-35934 filemanager: Add new string for edit 2013-08-09 10:02:39 +08:00
Rossiani Wijaya 9aa1fe0f77 MDL-35934 Filemanager: update set focus attribute.
Also limit the display string for the dialog header to fit nicely on mobile devices
2013-08-09 10:02:39 +08:00
Rossiani Wijaya 51c14ac9d3 MDL-35934 Filemanager: add aria attributes for editing file/folder.
Add unique reference ids

Conflicts:

	files/renderer.php
	mod/data/field/file/field.class.php
	mod/data/field/picture/field.class.php
2013-08-09 10:02:38 +08:00
Tim Hunt 053617fcb6 MDL-41091 questions: fix get_all_submitted_qt_vars for unit testing. 2013-08-08 14:43:28 +01:00
Jerome Mouneyrac 74f48cfa05 MDL-30895 switch from dl tag to table in the accessible chat 2013-08-08 17:50:58 +08:00
Tim Hunt 1d2247bed6 MDL-40996 quiz show user pic should also show name.
This was a regression introduced by MDL-20636 two years ago!
2013-08-08 09:57:57 +01:00
Tim Hunt 5039961852 MDL-31487 fix FEATURE_CONTROLS_GRADE_VISIBILITY for quiz.
This is a followup to MDL-18301. That fix missed the following points:

1. On the edit categories and items screens, all items had an eye-con to
control the visibility, even if the visibility was controlled by the
module.

2. Changing the visibility of a grade category change the visibility of
all items within it, even if the visibility was controlled by the
module.

3. The quiz ingored $cm->visible when controlling whether its grade item
was visible.
2013-08-08 09:56:53 +01:00
Tim Hunt be09a8982b MDL-27655 improve purge all caches.
If you click the link in the page footer, then it will reliably
redirect you back to the page you were on after purging the caches.

If you go to the purge all caches page in the admin menu, it shows you a
purge button, with no cancel button. Clicking the button purges the
caches and takes you back to the page with the button.
2013-08-08 09:56:32 +01:00
Sam Hemelryk ea3f5b5d95 weekly release 2.4.5+ 2013-08-08 16:25:49 +12:00
Sam Hemelryk a6e4a83d99 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-08-08 16:19:42 +12:00
Jason Fowler ae14fe3bb6 MDL-35931 Accessibility - adding focus change when repository is selected 2013-08-08 11:30:39 +08:00
sam marshall 1a60cd4e5c MDL-41045 course_add_cm_to_section should not test for sections unless necessary 2013-08-07 17:20:59 +01:00
Mark Nelson 9e532d0ca3 MDL-40662 block_course_overview: added addinstance capability string 2013-08-07 15:20:07 +12:00
AMOS bot 00410c03d7 Automatically generated installer lang files 2013-08-07 00:43:02 +00:00
Sam Hemelryk b6a2a20236 Merge branch 'MDL-40086-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-08-07 10:36:55 +12:00
Frederic Massart 2980ec2eea MDL-40086 file: Correct ordering of subdirectories
Thanks to Mohamed Alsharaf for the proposed solution.
2013-08-06 13:55:08 +08:00
Sam Hemelryk b19a900a9b Merge branch 'MDL-34989-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-08-06 17:51:06 +12:00
Ruslan Kabalin 5878abf8c6 MDL-40947: Fix segmentation fault issue in get_fast_modinfo. 2013-08-06 17:42:19 +12:00
Marina Glancy b4b50810d4 Merge branch 'MDL-31226-MOODLE_24_STABLE' of https://github.com/lucisgit/moodle into MOODLE_24_STABLE 2013-08-06 14:40:45 +10:00
Mark Nelson eea2c47d6f MDL-27953 auth: documented the newly introduced function can_be_manually_set() in upgrade.txt 2013-08-06 15:48:19 +12:00
Mark Nielsen 164cc5f0e9 MDL-40870: Icon alt text in External Tool admin settings all read Accept 2013-08-06 14:48:47 +12:00
Sam Hemelryk 504dc60048 Merge branch 'MDL-40662_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-08-06 14:39:15 +12:00
Mark Nielsen 052f235f24 MDL-39090: Duplicate parameters in LTI launches
Removed endpoint query string params from body
to prevent param duplication.
2013-08-06 10:24:48 +12:00
Sam Hemelryk ecd106d68d Merge branch 'MDL-27953_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-08-06 10:08:39 +12:00
Sam Hemelryk 1498e85483 Merge branch 'w32_MDL-40889_m24_jsminify' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-08-06 09:54:48 +12:00
Marina Glancy ebb5c53b51 Merge branch 'MDL-36011-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-08-05 17:17:33 +10:00
Marina Glancy 93334057de Merge branch 'MDL-30852-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-08-05 13:53:35 +10:00
Shane Elliott 685ed22b13 MDL-40684 Fix conditional field name for custom user fields 2013-08-05 15:51:30 +12:00
Sam Hemelryk 86ebf30fcf Merge branch 'MDL-35922-24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-08-05 15:31:59 +12:00
Damyon Wiese 2c6fe0c698 MDL-30852 grade report: More coding guideline cleanups. 2013-08-05 11:24:06 +08:00
Damyon Wiese da6fc6fe17 MDL-30852 grade: Coding style fix for user report. 2013-08-05 11:24:06 +08:00
Steve Bader 8460efc65b MDL-30852 grade report: Add aria attributes
Converted to git branch by Damyon
2013-08-05 11:24:05 +08:00
Damyon Wiese 7d6f0b8224 Merge branch 'MDL-34989-24' of git://github.com/damyon/moodle into MDL-34989-24 2013-08-05 10:44:06 +08:00
Sam Hemelryk 9d146cf08a Merge branch 'MDL-35927_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-08-05 14:38:31 +12:00
Marina Glancy ac23d64400 Merge branch 'MDL-35981-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-08-05 12:21:56 +10:00
Damyon Wiese 1c4b87211d MDL-35981 comments: Fix for keyboard control of "add a comment" 2013-08-05 09:51:52 +08:00
Damyon Wiese 461bac938a MDL-35981 comments: Add comment about keycodes for space and enter. 2013-08-05 09:50:59 +08:00
Damyon Wiese be58294484 MDL-35981 comments: Make delete comment keyboard accessible. 2013-08-05 09:50:58 +08:00
Marina Glancy a01c00333c MDL-34785 performance improvement with big list of courses 2013-08-05 10:16:18 +10:00
Ruslan Kabalin 05342e935c MDL-31226: quiz: Fix message for attempts built on previous.
At the moment, when attempt is built on the last one, "not yet answered"
message is shown, which confuses many people. This patch modifies the state to
"complete" for attempt based on previous and modifies the output string.

Many thanks to Tim Hunt for guiding me through quiz infrastructure and some code
suggestions.
2013-08-02 17:01:50 +01:00
Petr Škoda 093aeffbea MDL-40889 prevent 304 when minimising JS 2013-08-02 16:30:05 +02:00
Damyon Wiese 822f3e1178 MDL-36011 tablelib: Make column headers expand/collapse links accessible.
Conflicts:

	theme/base/style/core.css
	theme/bootstrapbase/less/moodle/core.less
	theme/bootstrapbase/style/moodle.css
2013-08-02 11:31:24 +08:00
AMOS bot d6a0927ba1 Automatically generated installer lang files 2013-08-02 00:38:33 +00:00
Sam Hemelryk a3d12f993a weekly release 2.4.5+ 2013-08-02 08:23:56 +12:00
Sam Hemelryk 0460f175d2 Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2013-08-02 08:12:13 +12:00
Rossiani Wijaya 5d2b57a822 MDL-35927 filepicker: add aria attribute to display modal error 2013-08-01 15:41:47 +08:00
Mark Nelson 95ddab5f31 MDL-40662 block_course_overview: added addinstance capability to remove debugging message due to system context being used on the 'Default My home page' 2013-08-01 12:51:18 +08:00
Jason Fowler 057def4fa5 MDL-35922 - Adding aria attributes to create-folder modal 2013-07-31 16:41:52 +08:00
Frederic Massart d2a0dce409 MDL-40615 Repository: Updated Amazon S3 library
Fixed insecure use of CURLOPT_SSL_VERIFYHOST
2013-07-30 09:05:09 +12:00
Mark Nelson 574abfafc6 MDL-27953 auth: allowed the LDAP plugin to be manually assigned to uploaded users 2013-07-29 17:08:53 +08:00
Dan Poltawski 65f2bb0984 Merge branch 'MDL-40867_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-29 15:25:08 +08:00
Charles Fulton b7ee8b96a9 MDL-40323 report_log: fix strict standards error 2013-07-29 14:00:45 +08:00
Dan Poltawski 49ca7310a3 Merge branch 'MDL-40857_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-29 13:56:57 +08:00
Dan Poltawski 29c8710bf5 Merge branch 'MDL-40775_24' of git://github.com/grabs/moodle into MOODLE_24_STABLE 2013-07-29 13:35:23 +08:00
Dan Poltawski 397b5c063e Merge branch 'wip-MDL-29731-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-07-29 13:21:20 +08:00
Dan Poltawski 9a17f7d3cc Merge branch 'MDL-36399_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-29 12:40:29 +08:00
Dan Poltawski 929088ec57 Merge branch 'MDL-40863_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-29 10:10:09 +08:00
Damyon Wiese 336f2df35d MDL-34989 assign: Do not add a param to grading_disabled - cannot be backported.
Conflicts:

	mod/assign/locallib.php
2013-07-29 10:00:10 +08:00
Ashley Holman 214dd19aa2 MDL-34989 assign: Allow students to submit when grade is overriden
Also inform teachers when grading is disabled due to gradebook lock/override.

Conflicts:

	mod/assign/locallib.php
2013-07-29 09:59:43 +08:00
Sam Hemelryk 683fbbb8d7 Merge branch 'MDL-40878_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-29 12:54:07 +12:00
Sam Hemelryk 682f6d57cd Merge branch 'w31_MDL-40891_m24_mkdirrace' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-29 11:52:14 +12:00
Sam Hemelryk dacf5b62e8 Merge branch 'MDL-40727-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-07-29 11:48:15 +12:00
Sam Hemelryk aa713f26bd Merge branch 'MDL-40854_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-29 11:01:33 +12:00
Mark Nielsen 9da794f8aa MDL-40005: LTI module uses Apache specific function for retrieving request headers 2013-07-29 10:54:15 +12:00
AMOS bot b7c61a8b99 Automatically generated installer lang files 2013-07-28 00:42:31 +00:00
AMOS bot 0c3fe2f5f0 Merge branch 'MOODLE_24_STABLE' into install_24_STABLE 2013-07-27 00:43:13 +00:00
Petr Škoda bde942541e MDL-40891 prevent exceptions when creating directories in file store
Even if cache creation fails moodle should continue working.
2013-07-26 20:32:21 +02:00
Petr Škoda 1fed67296c MDL-40891 work around make_writable_directory() race condition
You will still get a "PHP Warning:  mkdir(): File exists" but that should not cause any problems on production sites.
2013-07-26 20:31:52 +02:00
Andreas Grabs 60c61daebe MDL-40775 mod_feedback - Undefined variable in feedback activity 2013-07-26 19:40:14 +02:00
Tim Hunt f30c9280d4 MDL-40854 fix mod/...:view capabilities
Prior to the fix, if you did not have a capability like mod/page:view,
then you woulds still see the link to the Page activity in the course
section, but when you clicked on it, you would run into a
require_capability error.

It is a principle that we never show users a link to a page they are not
allowed to access, therefore, when users do not have mod/...:view, they
should not see the link on the course page.

This patch implements this in the cm_info class, in a similar way to how
access restrictions by groups works.

It does not assume that the mod/...:view capability exists. If the
capability does not exist, then users are not prevented from seeing the
link.
2013-07-26 11:51:31 +01:00
Tim Hunt 82c3032d98 MDL-40857 External tool: fix incorrect moodle_url usage. 2013-07-26 11:41:39 +01:00
Tim Hunt 0d4706dd22 MDL-40857 External tool (LTI) capabilitiy names confusing.
I have improved the names in the language file so that they actually say
what they do (based on my reading of the code). I have also added
comments to access.php explaining each capability.

I have corrected a few of the RISK in access.php which were wrong.

I have changed a couple of the archetypes so that guests cannot launch
LTI activities, and editing teachers cannot do editing things.
2013-07-26 11:41:37 +01:00
Tim Hunt 205a3cd8a0 MDL-40867 fix misleading PHPdocs for _get_coursemodule_info 2013-07-26 10:13:29 +01:00
Tim Hunt da18133994 MDL-40867 External tools should launch pop-ups from the course page
Without this fix, if an LTI tool is set to open in a pop-up, then
clicking the link on the course page opens another almost blank page,
which then tries to open the pop-up, which is almost invariably caught
by your pop-up blocker.

With this fix, clicking the link on the course page opens the pop-up
directly, like for pop-up resources.
2013-07-26 10:13:11 +01:00
Tim Hunt 01a3633cc7 MDL-40863 feedback and LTI mods need get_extra_capabilities fn
Since moodle/site:accessallgroups is relevant to how them.
2013-07-26 10:12:53 +01:00
Tim Hunt 9bec0c088f MDL-36399 LTI editing tool config breaks on Oracle.
Note that this fix will fail if the tool URL is longer than 1333
characters.
2013-07-26 10:11:58 +01:00
Damyon Wiese cd08b5c878 weekly release 2.4.5+ 2013-07-26 11:29:20 +08:00
Marina Glancy 1cdbc04d86 MDL-29731 Bugs in recent activity when using separate groups 2013-07-24 21:52:09 +10:00
Damyon Wiese c8cada1552 MDL-40727 Cache: Fix file cache store on windows. 2013-07-24 17:11:30 +08:00
Nadav Kavalerchik ff77405577 MDL-39704 - Properly align and widen the chat bubbles in mod/chat, when in RTL mode 2013-07-23 23:23:48 +02:00
Eloy Lafuente (stronk7) 8b8bd17aac Merge branch 'w30_MDL-40679_m24_zlib' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-23 18:21:19 +02:00
Eloy Lafuente (stronk7) 9655e2e335 Merge branch 'MDL-40785_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-23 18:01:28 +02:00
Eloy Lafuente (stronk7) 4e60c378cf Merge branch 'wip-MDL-40700-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-07-23 13:58:46 +02:00
Dan Poltawski ff1fb4619b Merge branch 'MDL-20609_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-23 16:45:58 +08:00
Dan Poltawski 4523e6af16 Merge branch 'MDL-40480_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-23 16:38:48 +08:00
Jason Fowler 4f6f2013bf MDL-39748 - Grading Methods - Fixing input field widths for Rubrics 2013-07-23 14:25:06 +08:00
Dan Poltawski 9ed79d1801 MDL-40585 fix trailing whitespace 2013-07-23 13:35:16 +08:00
Dan Poltawski 066c7987b2 Merge branch 'MDL-40585_24' of git://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-07-23 13:35:07 +08:00
Dan Poltawski bb925bb8ba Merge branch 'MDL-40584_24' of https://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-07-23 12:38:39 +08:00
Sam Hemelryk 1f3be76708 Merge branch 'MDL-40680-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-07-23 14:12:35 +12:00
AMOS bot 5e0e88e5a3 Automatically generated installer lang files 2013-07-23 00:39:25 +00:00
Eloy Lafuente (stronk7) 9260f1bdd2 Merge branch 'MDL-40626-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-07-22 17:41:07 +02:00
Dan Poltawski 9dae491a94 Merge branch 'w30_MDL-38867_m24_gspell' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-22 17:01:58 +08:00
Damyon Wiese 8e3c3ac499 MDL-40260 Course overview: code tidy for previous commit
Moving this check inside the following if makes it clear which code
branch it applies to.
2013-07-22 16:16:41 +08:00
Damyon Wiese 4cf35a316e Merge branch 'm24_MDL-40260' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-07-22 16:16:27 +08:00
Damyon Wiese a04662aad4 Merge branch 'wip-MDL-40174-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-07-22 16:04:40 +08:00
Dan Poltawski c60752f45c Merge branch 'wip-MDL-37333_M24' of git://github.com/gjb2048/moodle into MOODLE_24_STABLE 2013-07-22 10:31:56 +08:00
Sam Hemelryk a62e342c3d MDL-40174 navigation: don't remove active root nodes without children 2013-07-22 10:49:13 +12:00
Sam Hemelryk ad739cd700 MDL-40700 cache: memcache and memcached stores now allow alphanumext prefixes 2013-07-22 10:41:51 +12:00
Chris Wharton 5886e039ec MDL-40700 cache: Validate memcache key prefix field 2013-07-22 10:41:50 +12:00
Petr Škoda bc6bf8d1e6 MDL-40679 mark zlib extension as recommended 2013-07-20 21:20:40 +02:00
Tim Hunt 0d62d8196e MDL-40785 question instances report: ignore subquestions
We should not count subquestions of cloze questions (parent != 0) but we
do want to count random questions (parent = id).
2013-07-19 15:17:00 +01:00
Tim Hunt 7544d10492 MDL-40480 tablelib: specify charset in XHMTL downloads.
Thanks to Jürgen Zimmer for the suggestion.
2013-07-19 11:46:05 +01:00
Tim Hunt 50a4b42ed7 MDL-20609 quiz tables: improve layout for long cell contents.
By allowing more wrapping.
2013-07-19 11:45:27 +01:00
Petr Škoda 7831560995 MDL-38867 remove Google spell checking option 2013-07-19 09:32:35 +02:00
Tim Lock 58940c96c4 MDL-40626 gradebook: Prevent incorrect override with multiline feedback
The quick grading option doesn't allow mutliline editing.
2013-07-19 12:01:55 +08:00
Damyon Wiese 1a449aa5e7 weekly release 2.4.5+ 2013-07-19 09:50:19 +08:00
Damyon Wiese 855b35604d Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-07-19 09:24:02 +08:00
Damyon Wiese 20ea7f2f79 MDL-35851 lesson: Handle importing questions into an empty lesson.
Also - make sure the page we are updating belongs to the lesson.
2013-07-18 16:52:46 +08:00
Gareth J Barnard 2d2b3c39b3 MDL-37333 theme: Fix 'Clear theme caches' redirect. 2013-07-17 17:35:22 +01:00
Damyon Wiese 9f837ac934 MDL-35851 Lesson: Check/fix the page order every time the pages are loaded 2013-07-17 13:04:54 +08:00
Marina Glancy 89478f00cd Merge branch 'MDL-40701-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-07-17 12:47:43 +10:00
Dan Poltawski e66647085e MDL-40701 mod_assignment: fix refresh events
It was getting the cm event with the wrong id and calling
deprecated functions
2013-07-17 10:31:39 +08:00
Eloy Lafuente (stronk7) d76bba6e24 Merge branch 'w29_MDL-40611_m24_accesslibtest' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-17 00:32:44 +02:00
Eloy Lafuente (stronk7) d8bbfdfbe0 Merge branch 'MDL-40536-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-07-17 00:26:57 +02:00
Petr Škoda 405d2962d2 MDL-40423 fix creation of new install.xml in subplugins 2013-07-16 21:56:40 +02:00
Damyon Wiese 4474895d37 Merge branch 'wip-MDL-40621-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-07-16 21:31:52 +08:00
Eloy Lafuente (stronk7) d9debeb038 Merge branch 'MDL-40555-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE
Conflicts:
	cache/stores/static/lib.php
2013-07-16 09:55:34 +02:00
Marina Glancy 18cf2255f0 Merge branch 'MDL-35851-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-07-16 16:12:40 +10:00
Damyon Wiese ccf721640c MDL-35851 lesson: removed expensive upgrade step.
Just deal with the bad data when displaying the lesson instead.

Conflicts:

	mod/lesson/db/upgrade.php

Conflicts:

	mod/lesson/db/upgrade.php
	mod/lesson/version.php
2013-07-16 14:08:08 +08:00
Damyon Wiese a2de489c3e Merge branch 'MDL-40195_24' of git://github.com/aolley/moodle into MOODLE_24_STABLE 2013-07-16 13:29:19 +08:00
Damyon Wiese 994d7ebdc3 Merge branch 'w29_MDL-40558_m24_guestdelete' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-16 11:29:28 +08:00
Matt Debus bc583cacfd MDL-40524: mod_wiki: Display comments in order 2013-07-16 11:26:42 +08:00
Damyon Wiese a7228f586b Merge branch 'MDL-40538_24' of https://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-07-16 10:26:56 +08:00
Rossiani Wijaya 9f124aa5ad MDL-35851 Lesson module: fix page order id for import questions. Add upgrade script to fix lesson pages corrupted links
Conflicts:

	mod/lesson/db/upgrade.php
	mod/lesson/version.php
2013-07-16 10:07:46 +08:00
Dan Poltawski f620ae6c11 MDL-40680 store_memcached: fix serialiser options
* Use correct lang string for SERIALIZER_IGBINARY
* Use PARAM_INT for the parameter
2013-07-16 09:39:16 +08:00
Sam Hemelryk 5cae1b013f MDL-40555 cache: implemented unit tests for default search functionality 2013-07-16 08:36:19 +08:00
Frederic Massart 76edea3d61 MDL-40555 cache: Static store is searchable 2013-07-16 08:35:08 +08:00
Russell Smith 558f2de1b9 MDL-40584 backup: Query db once per category in precheck
The cache is function local and testing against a large database
indicates 10k questions is a large category.  Restore already
uses MEMORY_EXTRA and that will have enough space for the couple
of megabtyes a local sql hash will introduce.
2013-07-16 08:04:16 +10:00
Eloy Lafuente (stronk7) 174405bd5d Merge branch 'wip-MDL-38747-MOODLE_24_STABLE' of https://github.com/satrun77/moodle into MOODLE_24_STABLE 2013-07-15 17:07:05 +02:00
Russell Smith 1bdb3dcd2b MDL-40585 backup: cache XML parent paths
For $this->groupedpaths, using a key is faster as there is
no need to do in_array searches.

Parent cache allows dirname calls to be substantially reduced.
2048 was chosen as a cache size as this class operates on chunks
of the restore at a time, 8k questions produces a parent cache of
about 500 paths and uses 300K of memory.  Scaling up to 2048 will
use about 1.2M of RAM for really large restores.  This is acceptable
for the 48% function call reduction and the 10% runtime improvement
seen.
2013-07-15 19:23:13 +10:00
Damyon Wiese 643786623e MDL-39563: Change to use $CFG consistently 2013-07-15 15:06:30 +08:00
Damyon Wiese ae5e95af2d Merge branch 'MDL-39563-24' of git://github.com/jleyva/moodle into MOODLE_24_STABLE 2013-07-15 15:06:08 +08:00
Marina Glancy 35dc874292 Merge branch 'MDL-40633_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-15 14:45:22 +10:00
Marina Glancy c291dd69ea Merge branch 'wip-MDL-39062-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-07-15 12:53:02 +10:00
Daniel Myers 4fae47dedc MDL-40260 block_course_overview: prevent MNET courses from being dimmed 2013-07-15 13:55:57 +12:00
AMOS bot 688c3bffbd Automatically generated installer lang files 2013-07-15 00:44:27 +00:00
Sam Hemelryk 6026121e10 MDL-39062 cache: version bump to update definitions 2013-07-15 12:02:23 +12:00
Sam Hemelryk 762789f5d7 MDL-39062 cache: persist keys now set properly 2013-07-15 12:02:01 +12:00
Petr Škoda f25af6571f MDL-40611 fix context cache size expectation 2013-07-13 15:40:26 +02:00
Tim Hunt e4f1467a75 MDL-40633 filter_urltolink breaking some image links.
This was a regression caused by MDL-22390. HTML like
<img src="http://www.example.com/logo.gif" />
was being broken.
2013-07-12 11:43:47 +01:00
Petr Škoda ddc6c118c6 MDL-40558 skip admins and guest when deleting incomplete users 2013-07-12 12:38:26 +02:00
Petr Škoda 12de66b2bf MDL-40569 fix empty CSS files after cache purging 2013-07-12 12:35:19 +02:00
Dan Poltawski 514132f8a8 MDL-40536 course/externallib fix incorrect variable
Fixes test_import_course_invalid_deletecontent_option() from the
previous commit.
2013-07-12 16:40:59 +08:00
Dan Poltawski c181c6137d MDL-40536 course: unit tests for course_external::import_course
Basic import operations and a specific test case which identifies
a bug.
2013-07-12 16:40:59 +08:00
Mohamed Alsharaf 3bf3451872 MDL-38747 blocks: course format options numsections is required to display the block 2013-07-12 20:27:24 +12:00
Damyon Wiese 2c66b71ab4 weekly release 2.4.5+ 2013-07-12 09:51:49 +08:00
Damyon Wiese 95455fc76a Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-07-12 09:42:53 +08:00
AMOS bot 658c7b8a7a Automatically generated installer lang files 2013-07-12 00:46:02 +00:00
Juan Leyva ee2316f022 MDL-39563 Fixing mobilecssurl is not being returned in WebService phpunit tests 2013-07-11 16:28:42 +02:00
Marina Glancy dd0f944141 MDL-40621 fixed small bug in function editor_tinymce_plugin::fix_row() 2013-07-11 16:45:48 +10:00
Marina Glancy 537d8f8a58 Merge branch 'MDL-38366-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-07-10 16:26:59 +10:00
Frederic Massart 2a2d53bd97 MDL-38366 repository_filesystem: Prevent use of empty subdir 2013-07-10 13:49:38 +08:00
Marina Glancy 114c924d94 Merge branch 'm24_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile_2ndRound' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-07-10 12:03:57 +10:00
Raymond Wijaya 622425d2fb MDL-40093 mod/assign: Remove count of drafts in offline assignment's grading summary screen 2013-07-10 11:36:53 +10:00
Russell Smith 2215cc347a MDL-40538 caching: Use isset for performance
isset is much faster than array_key_exists. For caches we need to
ensure as much performance as possible. To all null to continue to
be stored and provide correct results, non ttl also now saves in
$this->store[$key][0].  As isset($this->store[$key]) will return
true in all cases.

time() as found in cache::now() can be slow on some platforms and
we shouldn't bother checking it unless needed. It also stops non-ttl
caches paying the ttl price.

Unit tests were adjusted to ensure null is still handled correctly
when we are only using isset.
2013-07-10 10:42:51 +10:00
Marina Glancy ed79029f0e Merge branch 'MDL-40441_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-10 10:03:44 +10:00
Sam Hemelryk 286232d695 Merge branch 'w28_MDL-40450_m24_tinymcebuttons' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-10 11:01:48 +12:00
Sam Hemelryk 97d98e9920 Merge branch 'MDL-40527_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-10 10:30:29 +12:00
Sam Hemelryk 3b0c725de1 Merge branch 'm24_MDL-40512' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-07-10 10:09:49 +12:00
Damyon Wiese 4dcd073864 Merge branch 'MDL-39420_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-09 22:44:21 +08:00
Damyon Wiese 800c5757c3 Merge branch 'MDL-36479_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-09 22:27:59 +08:00
Tim Hunt 4cc817aa33 MDL-39420 multichoice: fix layout of multi-line choices. 2013-07-09 11:57:07 +01:00
Tim Hunt 41ffd24e82 MDL-40441 fix obscure notice in the quiz.
This can only happen if you have both a user with both a real attempt
and a preview, and then edit the quiz settings.

Also clean up this code a bit.
2013-07-09 10:45:33 +01:00
Damyon Wiese 1f304be72c Merge branch 'MDL-40443_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-09 15:16:32 +08:00
Jamie Pratt 304343830b MDL-40176 mock_submit method for testing
Conflicts:

	lib/formslib.php
2013-07-09 15:09:56 +08:00
Damyon Wiese d3dc9a334c Merge branch 'MDL-40499_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-07-09 13:27:05 +08:00
prateeksachan bb6cacb913 MDL-40386: Fix for updating timemodified field in book_chapters 2013-07-09 12:35:18 +08:00
Jamie Pratt 4eff6ed9fe MDL-40388 Reset globals after each unit test 2013-07-09 11:56:53 +08:00
Tony Levi 954ba4bce4 MDL-40035: Avoid rebuild_course_cache always for empty course 2013-07-09 13:55:46 +10:00
Damyon Wiese b7aac8b6d1 Merge branch 'MDL-40318_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-09 11:13:23 +08:00
Marina Glancy be9cd2ff26 Merge branch 'MDL-40434_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-07-09 11:33:20 +10:00
Tim Lock b719bf20b4 MDL-40436: auth_ldap: Fixed warning when adding new LDAP users 2013-07-08 23:02:22 +08:00
Adam Olley d79c15550f MDL-40195: mod_assign: Display grades when quickgrading to 2 decimal places 2013-07-08 20:07:12 +09:30
Damyon Wiese 92cfad95c8 Merge branch 'MDL-38314-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-07-08 16:40:39 +08:00
Frederic Massart f4f853f8cd MDL-38314 repository: Removed >= 2.5 code logic 2013-07-08 16:40:21 +08:00
Damyon Wiese 51cefce972 Merge branch 'MDL-38314-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE
Conflicts:
	version.php
2013-07-08 15:16:42 +08:00
Petr Škoda f0be68a15e MDL-40450 update links to TinyMCE 3.x docs 2013-07-07 16:12:29 +02:00
Matteo Scaramuccia c8d8b400f9 MDL-39832 Files: Fixed ETag format according with RFC2616.
ETag must be double quoted,
http://tools.ietf.org/html/rfc2616#section-3.11:

      entity-tag = [ weak ] opaque-tag
      weak       = "W/"
      opaque-tag = quoted-string
2013-07-07 09:19:15 +02:00
Matteo Scaramuccia 6ef0160a64 MDL-39832 Files: Revert MDL-39688 commit, 7c742620d2
MDL-39688 has been successful in providing a solution for the issue but further
investigations done in MDL-39832 have got the evidence that the given solution
is more likely a workaround.
2013-07-07 09:19:14 +02:00
Eloy Lafuente (stronk7) 919251f295 Moodle release 2.4.5 2013-07-06 17:56:11 +02:00
Tim Hunt 712bcc3e09 MDL-40527 enrol meta: respect $CFG->courselistshortnames
Thanks to James Henestofel for working this out in MDL-37558. That issue
got complex, so I am just submitting this simple part of it for
integration.
2013-07-05 15:37:09 +01:00
Dan Marsden ed928e942c MDL-40512 SCORM: prevent undefined warning 2013-07-05 12:09:59 +12:00
Jean-Michel Vedrine a16ec93666 MDL-40499 Edit question from 1.9 backup breaks if images in subdirs 2013-07-04 15:07:46 +02:00
Tim Hunt 28c8189c7f MDL-40443 setType notice in quiz reports. 2013-07-04 12:34:55 +01:00
Tim Hunt c004ced96b MDL-40318 quiz intro comprising just an impage was not shown
Also, ensure that we don't output an empty box if there are no access
messages.
2013-07-04 12:34:21 +01:00
Tim Hunt ef84ab84bf MDL-36479 quiz regrade: use progress bar to prevent time-outs 2013-07-04 12:33:25 +01:00
Damyon Wiese b5906ea400 weekly release 2.4.4+ 2013-07-04 15:33:31 +08:00
Damyon Wiese 76e6fbd776 MDL-40308: Fix javascript for lti mod_form
It was toggling the state of the hidden input - not the checkbox.
2013-07-04 13:47:36 +08:00
Frederic Massart 7e51747ede MDL-38314 repository: Improving performance of upgrade script 2013-07-03 16:28:28 +08:00
Frederic Massart 22785530b9 MDL-38314 repository: Remove orphan repository instances 2013-07-03 16:28:25 +08:00
Frederic Massart d8732ee8b7 MDL-38314 repository: Delete repository instances on context deletion 2013-07-03 16:27:08 +08:00
Frederic Massart c11ea21997 MDL-38314 repository: Unit Tests for delete_all_for_context() 2013-07-03 16:27:08 +08:00
Michael Aherne 1619a06942 MDL-40275 core Improve documentation for block_base::has_config() 2013-07-02 21:53:17 +02:00
Eloy Lafuente (stronk7) bc6835b1d1 MDL-37516 Translate fieldnames on output only.
This reverts a change performed by the previous commit where user
fieldnames were being translated (and cached) when fetched,
causing the information to remain static later, not responding
to language switches (and perhaps leading to other problems if those
structures are used lated for DB / $USER comparisons.

With the commit, the translation happens on output, so no
potential interferences will happen and, also, the information
changes dynamically on lang switching.
2013-07-02 21:03:10 +02:00
sam marshall 122d59390f MDL-37516 Conditional activities: user field condition display fixes 2013-07-02 21:03:04 +02:00
Eloy Lafuente (stronk7) cb4beb2d2c Merge branch 'MDL-40439-en_fix_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-07-02 13:48:02 +02:00
Helen Foster c3f4867a41 MDL-40439 Merge English strings from the en_fix language pack 2013-07-02 11:51:45 +02:00
Tim Hunt ca6904b6c9 MDL-40434 calculatedmulti multiple-response questions not randomised 2013-07-02 08:24:01 +01:00
Damyon Wiese 955172a5a0 Merge branch 'wip-MDL-40353-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-07-02 14:29:28 +08:00
Dan Poltawski d1e2ee9eec Merge branch 'MDL-40297_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-07-02 13:43:57 +08:00
Andreas Grabs 5832a8f737 MDL-39570 mod_feedback - Missing privilege check 2013-07-02 13:35:49 +08:00
Dan Poltawski 1edad3fd90 Merge branch 'w27_MDL-40399_m24_msarrayshift' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-02 13:33:49 +08:00
Dan Marsden 01d2c82e1b MDL-39628 Chat: check mod/chat:chat capability when using daemon.
Thanks to Francois Gauthier for report/fix.
2013-07-02 12:20:25 +08:00
Jason Fowler 4b450df00d MDL-37818 - RSS - Prevent access to blocks while RSS context errors are displayed 2013-07-02 10:04:21 +08:00
Dan Poltawski e09fc9f3c1 Merge branch 'w27_MDL-40266_m24_arrayshift' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-02 09:55:33 +08:00
Eloy Lafuente (stronk7) ea0b123d07 Merge branch 'get_users_by_capability_fix_m24' of http://github.com/timgus/moodle into MOODLE_24_STABLE 2013-07-02 00:46:51 +02:00
Rossiani Wijaya 301d9518ed MDL-39546 Lesson module: removed duplicate to decode special characters 2013-07-02 09:36:06 +12:00
Rossiani Wijaya 3c108a95df MDL-39546 Lesson module: fixed matching question issues. 2013-07-02 09:35:52 +12:00
Eloy Lafuente (stronk7) 8ae15861de Merge branch 'w27_MDL-39754_m24_evn26' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-01 23:14:16 +02:00
Petr Škoda ec99b59381 MDL-39754 copy 2.5 requirements to Moodle 2.6
Optional features and warnings may be added later,
but we need at least required environment for 2.5.1

This includes database family cleanup and more realistic memory requirement.
2013-07-01 10:03:51 +02:00
Petr Škoda 1596dca3d0 MDL-40266 improve emulate_bound_params() for mssql driver
Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.

Credit goes to Martin Langhoff for original mysqli fix.
2013-07-01 08:53:28 +02:00
Petr Škoda ba8a53a4f9 MDL-40266 improve emulate_bound_params() for sqlsrv driver
Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.

Credit goes to Martin Langhoff for original mysqli fix.
2013-07-01 08:53:27 +02:00
Mark Nielsen 86e56e40bd MDL-40308: Privacy settings do not change
Update LTI mod form so checkboxes always submit their value.
2013-07-01 11:27:32 +08:00
Dan Poltawski 3db9731fb6 Merge branch 'wip-MDL-40344-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-07-01 11:22:20 +08:00
Sam Hemelryk 3d6b490b81 NOBUG: fixed whitespace 2013-07-01 13:24:50 +12:00
Martin Langhoff 2122af37b6 MDL-40266 improve emulate_bound_params() for mysqli
Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.
2013-06-30 18:40:18 +02:00
Eloy Lafuente (stronk7) c45ca47759 MDL-40297 whitespace, comments & var names cleanup 2013-06-30 16:49:13 +02:00
Dmytro Vorona d121290607 MDL-40297 Hide empty categories in my courses
This is a followup of MDL-38631 were was detected that
whith categories being displayed in my courses, some of
them, not having courses for the user, were still shown.

With this patch, any category in the tree, not having courses
is automatically hidden, any depth.
2013-06-30 16:49:08 +02:00
David Mudrák bdd014e2c2 MDL-35206 Fix the links list enumeration in the html2text library 2013-06-28 13:14:48 +02:00
Sam Hemelryk 7bcdac4882 MDL-40344 navigation: expandable branch id is now properly unique 2013-06-28 09:58:59 +12:00
Eloy Lafuente (stronk7) c982630a94 weekly release 2.4.4+ 2013-06-27 20:11:52 +02:00
Eloy Lafuente (stronk7) dc56547079 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-06-27 20:05:24 +02:00
Marina Glancy fe4bb9a3f6 MDL-40353 fixed wrong redirection on course group page 2013-06-27 13:50:43 +10:00
AMOS bot 96cf04159c Automatically generated installer lang files 2013-06-27 00:40:26 +00:00
Eloy Lafuente (stronk7) 1de08a0e60 Merge branch 'MDL-40264-m24-essay-zero' of git://github.com/ktemkin/moodle into MOODLE_24_STABLE 2013-06-24 21:23:34 +02:00
Eloy Lafuente (stronk7) 4207e4771a Merge branch 'MDL-34610_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-06-24 20:21:47 +02:00
Eloy Lafuente (stronk7) 81c7328717 Merge branch 'MDL-40255_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-06-24 19:26:32 +02:00
Matteo Scaramuccia da660f362b MDL-40200 Administration: Return the invalid user message and stop there
To avoid adding duplicate code, 'invalid user' and 'user deleted' checks
have been merged together.
2013-06-24 19:01:08 +02:00
Sam Chaffee 4417a705cf MDL-40258: Fixed invalid json string error in file-picker 2013-06-24 18:57:08 +02:00
Ankit Agarwal cc6641f040 MDL-40250 phpunit: Add unit tests for core_files_external::upload() 2013-06-24 18:10:04 +02:00
Jason Fowler 6e4059838c MDL-39044 - Course Completion - Replaceing strtolower with multibyte safe textlib::strtolower
Conflicts:
	blocks/completionstatus/details.php
2013-06-24 15:46:34 +12:00
Sam Hemelryk 211c473452 Merge branch 'MDL-39760-MOODLE_24_STABLE' of https://github.com/lucisgit/moodle into MOODLE_24_STABLE
Conflicts:
	mod/assign/locallib.php
2013-06-24 14:29:21 +12:00
Sam Hemelryk 9505fcffe4 Merge branch 'MDL-39280-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-06-24 14:08:47 +12:00
Sam Hemelryk 7759839612 MDL-38347 fixed whitespace 2013-06-24 11:29:34 +12:00
Sam Hemelryk 9cf6081027 Merge branch 'wip-MDL-38347-stable24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-06-24 11:21:54 +12:00
Sam Hemelryk 6d4fe99033 Merge branch 'MDL-28124_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-06-24 10:29:06 +12:00
Amanda Doughty bf296d3cf3 MDL-38376 mod_assign: Feedback displayed when Grade set to hidden 2013-06-24 10:19:53 +12:00
Mary Evans 98159ddec2 MDL-40255 theme_boxxie/theme_formfactor: Added block-region class to layout files to enable dnd file uploader to work. 2013-06-22 21:26:20 +01:00
Marina Glancy 2c8e21ac35 MDL-38631 link categories in My courses only when needed 2013-06-22 16:21:30 +10:00
Dmytro Vorona 073a972375 MDL-38631 Fixed faulty add_category call, introduced in 758103 2013-06-22 16:21:29 +10:00
Tim Hunt 40818b7d48 MDL-34610 remove legacy IE CSS. It breaks form layout 2013-06-21 21:57:45 +01:00
Kyle Temkin b64526c715 MDL-40264 fix essay handling of zero-string response
Fixes an inappropriate behavior of the is_complete_response() function
for the Essay question type, which caused the string "0" to be
inappropriately marked as an incomplete response.

Also adds a set of unit tests for the Essay question type's
is_complete_response.
2013-06-21 03:28:59 -04:00
Dan Poltawski 8be321e3d9 weekly release 2.4.4+ 2013-06-21 13:29:18 +08:00
Tim Gus 134a6ddcf0 MDL-40259 - For SCORM reports limit fields returned from
get_users_by_capability to user ID to decrease memory utilization
2013-06-20 15:56:47 -04:00
Ruslan Kabalin 478cac84e1 MDL-39760: mod_assign: Add few more callback methods.
Adds lock, unlock and release_to_draft. All of them accept single parameter -
an assign_submission record.
2013-06-19 15:35:17 +01:00
Ruslan Kabalin c07c4324c7 MDL-39760: mod_assign: Make submit_for_grading accept submission as parameter. 2013-06-19 15:35:16 +01:00
Marina Glancy bebd6a6cef Merge branch 'MDL-40207-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-06-18 15:39:55 +10:00
Marina Glancy 272105604a Merge branch 'MDL-39650-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-06-18 14:13:10 +10:00
Ruslan Kabalin 8401eb9425 MDL-33546: course: Fix current week hightlighting after dragging the section 2013-06-18 13:04:43 +10:00
Marina Glancy 2e6cc99352 Merge branch 'MDL-40165-m24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-06-18 12:56:20 +10:00
Sam Hemelryk 23f186b5c8 Merge branch 'MDL-40036-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-06-18 13:58:48 +12:00
Marina Glancy af06f5def5 Merge branch 'MDL-38079_24' of git://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-06-18 11:14:52 +10:00
Sam Hemelryk 46c30b7e1b Merge branch 'wip-mdl-39863-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-06-18 11:19:22 +12:00
Sam Hemelryk c8802b6e6c Merge branch 'MDL-40109_24' of git://github.com/dmonllao/moodle into MOODLE_24_STABLE 2013-06-18 11:07:48 +12:00
Eloy Lafuente (stronk7) 392aa3ff35 Merge branch 'MDL-33562-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE
Conflicts:
	version.php
2013-06-18 00:46:59 +02:00
Sam Hemelryk 5008f4fffd Merge branch 'MDL-30132_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-06-18 10:26:27 +12:00
Sam Hemelryk 7b8783b751 Merge branch 'wip-MDL-40159-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-06-18 09:04:27 +12:00
Russell Smith 8fb30e9d1f MDL-38079 mod_feedback - Hide "add question to activity" button 2013-06-17 20:00:05 +10:00
Marina Glancy dfdea57b26 MDL-40159 Fixing bug with empty variable, regression from MDL-21097 2013-06-17 14:26:10 +10:00
Sam Hemelryk c4eab12234 Merge branch 'm24_MDL-40095_Completion_locked_Error_on_save' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-06-17 16:09:52 +12:00
Sam Hemelryk 57efe7bdba Merge branch 'MDL-21933_24' of https://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-06-17 15:45:16 +12:00
Sam Hemelryk 11270c4b2d Merge branch 'wip-MDL-40091-MOODLE_24_STABLE' of git://github.com/satrun77/moodle into MOODLE_24_STABLE 2013-06-17 15:43:07 +12:00
Dan Poltawski f7c0e172c6 MDL-40207 simplepie: reduce false failures in unit tests
The simplepie tests time out too quickly due to a low connect timeout,
to fix this, I converted the unit tests to use a high timeout value.
2013-06-17 10:59:41 +08:00
Sam Hemelryk 79cb5006f9 Merge branch 'MDL-39761-MOODLE_24_STABLE' of https://github.com/lucisgit/moodle into MOODLE_24_STABLE 2013-06-17 14:26:13 +12:00
Sam Hemelryk bea68c50d6 MDL-40142 navigation: fixed chainable issue with navigation JS 2013-06-17 09:15:20 +12:00
Mary Evans 288ab0b16c MDL-28124 admin/tool/customlang: Changed page layout from 'standard' to 'report'. 2013-06-15 00:12:01 +01:00
Mohamed Alsharaf 4978c2ae05 MDL-40091 book: revision must be incremented after editing a chapter 2013-06-14 21:27:09 +12:00
Marina Glancy f5dd4b478c weekly release 2.4.4+ 2013-06-14 13:49:30 +10:00
Andrew Nicols bcdda24942 MDL-40165 Backup: Split out test classes into multiple files 2013-06-13 08:58:02 +01:00
Dan Poltawski 8c12e634ea Revert "MDL-39832 Files: Revert MDL-39688 commit, 7c742620d26bdba53e136fda293d33b5271ce241"
This reverts commit 6c227b64e2.
2013-06-13 13:57:32 +08:00
Dan Poltawski 433222d6c0 Revert "MDL-39832 Files: Fixed ETag format according with RFC2616."
This reverts commit 20043f4392.
2013-06-13 13:57:30 +08:00
Russell Smith d39e66a6cd MDL-21933 course: Allow users to search participants course permission
Capability checks are performed at the top of the page and do not need
to be completed again.

Search is an expected feature for users and it was confusion to only
appear after 3 pages.  This has been changed to enable search when
there are more records than are visible on the screen.  If users
are unable to use browser search, they will be able to use Moodle's
search.
2013-06-13 12:44:17 +10:00
Mary Evans bce7ef0bd5 MDL-30312 User: Changed page layout from mydashboard to mypublic in user/profile.php 2013-06-12 21:27:17 +01:00
Dan Poltawski 6e74e428af Merge branch 'MDL-39472-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-06-12 14:16:43 +08:00
Sam Hemelryk 0ad16081a2 Merge branch 'MDL-39964-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-06-12 09:02:27 +12:00
Sam Hemelryk 8fd47854a6 Merge branch 'MDL-25901-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-06-12 09:00:01 +12:00
Dan Poltawski e7d8c56098 Merge branch 'wip-MDL-40100-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-06-11 15:36:37 +08:00
Sam Hemelryk ffb486a996 Merge branch 'MDL-26925-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-06-11 17:31:24 +12:00
Sam Hemelryk 2a31efea1b Merge branch 'MDL-39505-migrate-file-backport_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-06-11 17:16:15 +12:00
Sam Hemelryk c1dfb624bf Merge branch 'MDL-22390_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-06-11 17:07:33 +12:00
Dan Poltawski 1ebac4eab3 Merge branch 'm24_MDL-40002_ETag_value_must_be_a_quoted-string' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-06-11 12:54:48 +08:00
Rajesh Taneja c5250462f6 MDL-39863 Administration: Show confirmation/notice and don't redirect automatically 2013-06-11 10:24:53 +08:00
Marina Glancy 351f4729e2 Merge branch 'MDL-39412_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-06-11 12:02:01 +10:00
Sam Hemelryk b26a15ff67 Merge branch 'MDL-39454-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-06-11 12:26:42 +12:00
Matteo Scaramuccia f41aaa2551 MDL-40095 SCORM: Trivial comments tidy up 2013-06-10 21:05:05 +02:00
Matteo Scaramuccia dc44a83f83 MDL-40095 SCORM: Fixed DML error when saving with completion options locked
Regression caused by MDL-38315.
2013-06-10 21:04:54 +02:00
Dan Poltawski a3ad98f25d Merge branch 'MDL-39947_24' of https://github.com/aolley/moodle into MOODLE_24_STABLE 2013-06-10 16:20:45 +08:00
Dan Poltawski 9ab6e7d851 Merge branch 'm24_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-06-10 15:43:15 +08:00
Dan Poltawski 24e89189a7 Merge branch 'MDL-40018_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-06-10 15:00:32 +08:00
David Mudrák 48919dba12 MDL-40080 Remove unused strings from the core_hub subsystem 2013-06-10 14:42:10 +08:00
David Monllao 3f7511f022 MDL-40109 format_weeks: Removing extra space 2013-06-10 13:31:54 +08:00
Dan Poltawski e4737333eb Merge branch 'MDL-39667-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-06-10 12:51:44 +08:00
Dan Poltawski e9ec512875 Merge branch 'w24_MDL-28394_m24_enrolrestore' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-06-10 12:17:14 +08:00
Dan Poltawski 60a6533433 Merge branch 'm24_MDL-37968' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-06-10 12:10:15 +08:00
Sam Hemelryk 4fe8c2c799 Merge branch 'MDL-40009_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-06-10 15:54:52 +12:00
Sam Hemelryk 5dbb8b3909 Merge branch 'w24_MDL-39549_m24_cohortsearch' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-06-10 15:47:49 +12:00
Sam Hemelryk e7b6fc35bf Merge branch 'MDL-39971_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-06-10 15:09:28 +12:00
Sam Hemelryk 1db4d513a7 Merge branch 'w24_MDL-32480_m24_imscp' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-06-10 14:40:53 +12:00
Sam Hemelryk 4964633e3a Merge branch 'MDL-36090_log2_24' of git://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-06-10 12:30:46 +12:00
Sam Hemelryk 5dc899f004 MDL-40100 cache: removed unneeded includes from add instance forms 2013-06-10 10:26:35 +12:00
Matteo Scaramuccia 8348ec06ea MDL-40002 Files: ETag value must be a quoted-string.
ETag value must be double quoted, http://tools.ietf.org/html/rfc2616#section-3.11.
More details about potential impacts in MDL-39832: shortly, at least when using
HTTP Partial GET Requests (HTTP Status: 206) plus X-Sendfile HTTP Header.
In this commit, the impact is to be RFC2616 compliant when using the ETag Header.
2013-06-09 10:19:03 +02:00
Tim Hunt d80b2c736e MDL-22390 autolink filter: handle URLs in brackets better.
This breaks some legitimate URLs like
http://en.wikipedia.org/wiki/Slash_(punctuation).
This is a necessary trade-off. Many other web systems do not handle that
case correctly either. The work-around it so escape the ) as %29.

This commit also improves the way the unit tests for this work.

It also fixes a couple of other tricky cases that were spotted in
the forums while this was being discussed. See the new test cases.
2013-06-08 16:55:00 +01:00
Petr Škoda 69d963254e MDL-39549 fix cohort search in course categories 2013-06-07 22:08:50 +02:00
Petr Škoda 24c954c181 MDL-28394 fix enrolment method restore logic
This patch fixes:
* missing enrolment methods after 1.9 backup restore - defaults are added
* enrolment methods are restored only when users option is enabled
* manual enrolment override option is disabled if users not available
2013-06-07 10:04:06 +02:00
Petr Škoda 1cf70434e2 MDL-32480 allow external https links in IMSCP too 2013-06-07 09:59:50 +02:00
Nicolas Dunand 0454409240 MDL-32480 fix display of IMS content packages with external links 2013-06-07 09:59:49 +02:00
Dan Marsden 13cea3d030 MDL-37968 course_overview: add dim class to hidden courses for teachers. 2013-06-07 14:40:01 +12:00
Matteo Scaramuccia 20043f4392 MDL-39832 Files: Fixed ETag format according with RFC2616.
ETag must be double quoted,
http://tools.ietf.org/html/rfc2616#section-3.11:

      entity-tag = [ weak ] opaque-tag
      weak       = "W/"
      opaque-tag = quoted-string
2013-06-06 23:09:46 +02:00
Matteo Scaramuccia 6c227b64e2 MDL-39832 Files: Revert MDL-39688 commit, 7c742620d2
MDL-39688 has been successful in providing a solution for the issue but further
investigations done in MDL-39832 have got the evidence that the given solution
is more likely a workaround.
2013-06-06 23:09:45 +02:00
Petr Škoda d4eb62d66b MDL-37780 fix 1.9 restore on windows 2013-06-06 12:26:29 +02:00
Dan Poltawski 031e2352da MDL-26925 User selector: Set label when no results
Thanks to Jonathon Fowler for the fix!
2013-06-06 14:09:59 +08:00
Frederic Massart 29c2cafaee MDL-40036 user: Respect capability to ignore user quota 2013-06-06 12:43:10 +08:00
Dan Poltawski 6c413970b7 weekly release 2.4.4+ 2013-06-06 12:00:38 +08:00
Dan Poltawski 60fcc78c1f Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-06-06 11:55:29 +08:00
Dan Poltawski 91f07e7e8b MDL-25901 rss: do not copyright html tag
They copyright field does not permit html, it should be plain text
2013-06-06 11:30:50 +08:00
Eloy Lafuente (stronk7) 520f292699 Merge branch 'wip-MDL-21097-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-06-05 10:36:31 +02:00
Marina Glancy 82f43805fe MDL-21097 Correctly check capabilities for frontpage editing mode 2013-06-05 18:07:43 +10:00
Dan Poltawski cbb612d2bf MDL-39964 report_progress: don't browser sniff for SVG support
Use feature detection, its more robust and better practice.
2013-06-05 15:40:55 +08:00
Dan Poltawski 64a21db766 Merge branch 'wip-MDL-21097-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-06-05 13:10:46 +08:00
Marina Glancy 84031db72b MDL-21097 corrected course editing roles 2013-06-05 14:25:13 +10:00
Andrew Davis 4dd5ce20ff MDL-36090 core_grade: added logging of overriding of student grades 2013-06-05 08:58:16 +08:00
Eloy Lafuente (stronk7) 960a321544 Merge branch 'mdl24-MDL-39409-auth-cas-use-moodle-web-proxy' of https://github.com/brki/moodle into MOODLE_24_STABLE 2013-06-05 02:46:40 +02:00
Eloy Lafuente (stronk7) 13c6a81607 Merge branch 'w23_MDL-39416_m24_pagelog' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-06-05 02:43:59 +02:00
Eloy Lafuente (stronk7) f078a515c7 Merge branch 'MDL-38731-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-06-05 02:31:04 +02:00
Eloy Lafuente (stronk7) 58d9daa435 Merge branch 'MDL-37332-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-06-05 02:27:41 +02:00
Eloy Lafuente (stronk7) 416b9b3803 Merge branch 'm24_MDL-38545_PHP_Strict_error' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-06-05 02:23:21 +02:00
Eloy Lafuente (stronk7) b0237a093f Merge branch 'wip-MDL-21097-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-06-05 01:43:25 +02:00
Mary Evans b9cdd1150e MDL-40018 theme_sky_high: Fixed footer in admin pages. 2013-06-05 00:20:56 +01:00
Mark Nelson 118242be26 MDL-40009 notes: corrected the form element names passed to setType 2013-06-04 18:08:50 +08:00
Dan Poltawski 7165b1586f Merge branch 'MDL-39945_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-06-04 15:54:12 +08:00
Dan Poltawski 09b91f0fff Merge branch 'MDL-39835_M24' of github.com:lazydaisy/moodle into MOODLE_24_STABLE 2013-06-04 14:45:09 +08:00
Dan Poltawski d000c1a380 Merge branch 'MDL-39536-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-06-04 13:20:56 +08:00
Frederic Massart e4ddfbe0f8 MDL-39536 completion: Unit tests for get_activities and has_activities 2013-06-04 12:57:53 +08:00
Frederic Massart 25f9cba3d2 MDL-39536 completion: Prevent DB call when fetching activities 2013-06-04 12:57:53 +08:00
David Mudrák b9e16a5137 MDL-39939 Fix the basic SCORM report plugin name 2013-06-04 12:27:51 +08:00
Dan Poltawski 4802b1ed8e Merge branch 'MDL-39317-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-06-04 11:26:45 +08:00
Dan Poltawski 0dc499ec7f Merge branch 'MDL-39743-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-06-04 11:03:55 +08:00
Dan Poltawski 4c8664099e Merge branch 'wip_24_mdl-34085' of https://github.com/iarenaza/moodle into MOODLE_24_STABLE 2013-06-04 10:43:18 +08:00
AMOS bot d86662e14e Automatically generated installer lang files 2013-06-04 00:46:36 +00:00
Marina Glancy fc97a877fd MDL-39801 navigation_node::remove does not allow to insert nodes afterwards 2013-06-04 02:03:31 +02:00
Marina Glancy d60d1d0db8 MDL-39801 navigation_node::remove fails if first child does not have a key 2013-06-04 02:03:24 +02:00
Eloy Lafuente (stronk7) 4746dc557a MDL-39764 style: phpdoc changed to inline comments 2013-06-04 01:44:20 +02:00
Eloy Lafuente (stronk7) b4a8c66cca Merge branch 'wip-MDL-39764_M24_3' of git://github.com/gjb2048/moodle into MOODLE_24_STABLE 2013-06-04 01:44:11 +02:00
Gareth J Barnard b0997b27fc MDL-39764 course_format: Allow courses to have numsections > maxsections. 2013-06-03 23:57:52 +01:00
Eloy Lafuente (stronk7) d4ef1bbbcf MDL-39465 Show env. info instead of part twice. 2013-06-04 00:51:04 +02:00
Eloy Lafuente (stronk7) 771b35c6fe Merge branch 'w23_MDL-39465_m24_environment' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-06-04 00:01:16 +02:00
Eloy Lafuente (stronk7) 613b32bbb8 Merge branch 'MDL-39166-m24' of https://github.com/jfilip/moodle into MOODLE_24_STABLE 2013-06-03 23:55:41 +02:00
Eloy Lafuente (stronk7) 813db77aa2 Merge branch 'wip-MDL-39710-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-06-03 23:22:44 +02:00
Eloy Lafuente (stronk7) e4c30d9639 Merge branch 'MDL-39932_24' of git://github.com/grabs/moodle into MOODLE_24_STABLE 2013-06-03 19:10:55 +02:00
Eloy Lafuente (stronk7) 954e384783 Merge branch 'MDL-39487_24' of https://github.com/IOC/moodle into MOODLE_24_STABLE 2013-06-03 19:03:38 +02:00
Petr Škoda d1bb51aaad MDL-39416 do not try to get detailed perflog info before PAGE int 2013-06-02 13:30:02 +02:00
Mary Evans 4db0ad5756 MDL-39835 theme_sky_high: Fix for footer to display correctly in higher resolutions. 2013-06-01 22:02:37 +01:00
Petr Škoda 29b18e6c68 MDL-39465 detect environment problems in tests
This should help explain why something else fails.
2013-05-31 22:04:02 +02:00
Tim Hunt 93cf55eb72 MDL-39971 each attempt builds on last broken for previews. 2013-05-31 20:33:38 +01:00
Marina Glancy 8069eac74b MDL-39710 Don't display rubric and guide preview unless option checked 2013-05-31 16:09:21 +10:00
Russell Boyatt 74d4a8e314 Fixing MDL-39710: setting to limit student access to rubric now checked. 2013-05-31 16:06:42 +10:00
Dan Poltawski 8228d7a653 MDL-38731 course: split course group settings header
Allow translators to translate the heading differently.

AMOS BEGIN
  CPY [groups,group],[groupsettingsheader,group]
AMOS END

Conflicts:
	course/edit_form.php
2013-05-31 12:14:19 +08:00
Dan Poltawski 9e5d7687e3 MDL-37332 portfolio: don't add double slashes
get_filepath() always returns trailing slash.

This breaks windows export - thanks to Jason Platts
2013-05-31 11:52:57 +08:00
Marina Glancy db13f65136 MDL-21097 Correctly check capabilities for course settings items
- Make sure that items in course settings (and frontpage settings) are shown depending on user capabilities
- Make sure user is able to turn editing on on the page even if he has only limited number of seciton/modules capabilities
2013-05-31 13:21:03 +10:00
Frederic Massart 734581a35e MDL-39650 form: Type can be set on repeated elements in a group 2013-05-31 11:05:08 +08:00
Dan Poltawski 20431aacf8 MDL-33562 lib: remove deleted user tokens 2013-05-31 10:28:29 +08:00
Dan Poltawski 27bab164f2 MDL-33562 lib: remove private keys when user deleted 2013-05-31 10:27:01 +08:00
AMOS bot 48dedbe914 Automatically generated installer lang files 2013-05-31 00:43:09 +00:00
Adam Olley 752fb7113d MDL-39947 mod_forum: Add safety check to variable assignment when counting unread posts 2013-05-31 09:50:35 +09:30
Andreas Grabs a33fc4907e MDL-39932 mod_feedback - Mapping Feedback when Course is Deleted - thx to David N. Johnson 2013-05-30 23:12:54 +02:00
Tim Hunt c0f5255cb9 MDL-39945 qtype multichoice was not comparing blank responses correctly. 2013-05-30 19:47:58 +01:00
Iñaki Arenaza aefa1b0e3e MDL-34085 Fix the backup options names in core_course_duplicate_course
Fix the option names to match those used by the backup subsystem.
2013-05-30 17:49:07 +02:00
Damyon Wiese ae61eea349 weekly release 2.4.4+ 2013-05-30 12:09:01 +08:00
Damyon Wiese b78cd7b0c9 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-05-30 11:27:20 +08:00
AMOS bot 8574fb6f41 Automatically generated installer lang files 2013-05-30 00:38:23 +00:00
William Tam 5f11ce035d MDL-37804 mod/assign: Students no longer able to submit files after due date with Prevent late submissions turned on. 2013-05-29 13:30:41 -07:00
Damyon Wiese 7bf288a640 MDL-39317 assign: Fix for submitted filter on grading table.
Some old upgraded assignments have no timecreated column so use
a different one to check for a valid submission.
2013-05-29 14:50:48 +08:00
Ashley Holman 24a3f392ba MDL-39743 assign: Fix missing capability check for "grant extension"
Conflicts:

	mod/assign/locallib.php
2013-05-29 12:08:40 +08:00
AMOS bot 7500249a74 Automatically generated installer lang files 2013-05-29 00:39:23 +00:00
Eloy Lafuente (stronk7) 847f1dd489 Merge branch 'w22_MDL-39676_m24_whereparam' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-05-28 15:34:13 +02:00
Jason Fowler fce7fd554c MDL-38347 - Calendar - Fixing arrow output on Android devices 2013-05-28 15:26:36 +08:00
Petr Škoda d04e51bd18 MDL-39802 ignore deleted users in meta enrolments 2013-05-28 10:05:15 +08:00
Petr Škoda 6134a1f844 MDL-39802 ignore deleted users in cohort enrolments 2013-05-28 10:05:11 +08:00
Petr Škoda 5ffd03ea74 MDL-39802 ignore deleted users in category enrolments 2013-05-28 10:05:08 +08:00
Damyon Wiese 4fffc06f65 Merge branch 'w22_MDL-39802_m24_deletedusers' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-05-28 09:55:50 +08:00
AMOS bot 48f747b8da Automatically generated installer lang files 2013-05-28 00:38:16 +00:00
Eloy Lafuente (stronk7) c8b05c3e83 Merge branch 'wip-MDL-39456-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-05-28 01:02:49 +02:00
Damyon Wiese 1deb9c4d18 Merge branch 'MDL-39640-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-05-27 16:16:45 +08:00
Dan Poltawski b3ae0c52bf Merge branch 'MDL-38239-moodle24' of git://github.com/StudiUM/moodle into MOODLE_24_STABLE 2013-05-27 14:13:52 +08:00
Dan Poltawski a67482cb0e Merge branch 'w22_MDL-39688_m24_etag' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-05-27 13:43:45 +08:00
Petr Škoda cd9dab04b9 MDL-38408 validate PayPal dates and costs always 2013-05-25 22:16:45 +02:00
Petr Škoda 829b842997 MDL-39676 improve get_role_users() unit tests 2013-05-25 10:13:26 +02:00
Petr Škoda 02338685a8 MDL-39676 fix get_role_users() parameter typo 2013-05-25 09:31:29 +02:00
Petr Škoda 7c742620d2 MDL-39688 do not set Etag when sending http ranges 2013-05-25 09:12:51 +02:00
Petr Škoda 7934b786a9 MDL-39802 fix sloppy user deleting and creating in imsenterprise plugin 2013-05-24 21:18:23 +02:00
Petr Škoda 43b13e92b8 MDL-39802 add cli script for fixing of all deleted users
Use this script if something just set the user.deleted flag instead of calling the delete_user() method.
2013-05-24 21:18:22 +02:00
Damyon Wiese bf2bee168a weekly release 2.4.4+ 2013-05-24 13:25:45 +08:00
Damyon Wiese 5c9ce5a281 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-05-24 13:11:49 +08:00
Sam Hemelryk 89ad278957 MDL-39456 cachestore_file: added reference to global $CFG
By holding onto a reference of the global $CFG object we
can be sure that it isn't destroyed before we are done
with it.
This allows for caches to be used within destructors for
purposes such as delayed writes.
2013-05-24 09:51:06 +12:00
Eloy Lafuente (stronk7) a3106cf3eb Merge branch 'wip-MDL-39177-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-05-23 16:00:16 +02:00
Marina Glancy 58c28d44e0 MDL-39177 make sure we don't remove existing directories when cleaning up unzip 2013-05-23 19:19:05 +10:00
Sam Hemelryk 1fdba7b992 MDL-39673 css: removed unused chunk array search
Cherry-picked from MDL-39326
2013-05-23 13:20:28 +08:00
Sam Hemelryk f8e60e04b9 MDL-39673 css: no passed the no svg key to chunking when required
Cherry-picked from MDL-39326
2013-05-23 13:20:28 +08:00
Sam Hemelryk 713b818c40 MDL-39673 css: implemented chunking of large sheets
Cherry-picked from MDL-38441
2013-05-23 13:20:06 +08:00
AMOS bot 038fd6e78f Automatically generated installer lang files 2013-05-22 08:26:05 +00:00
Eloy Lafuente (stronk7) 4453f3255f MDL-36482 Fix slipped error, thanks Petr! 2013-05-22 04:13:53 +02:00
Eloy Lafuente (stronk7) be06282e1b Merge branch 'wip-MDL-39177-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-05-22 02:19:40 +02:00
Gilles-Philippe Leblanc e60224a32a MDL-38239 gradebook: Importing grades from a .txt file with commas for decimals causes an error 2013-05-21 14:13:16 -04:00
Marina Glancy 0733e9883a MDL-39177 Updating userid when file is overwritten 2013-05-21 10:50:52 +10:00
Eloy Lafuente (stronk7) ec01b3201d Merge branch 'MDL-36482_24' of https://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-05-21 02:28:20 +02:00
Eloy Lafuente (stronk7) 5efc195a32 Merge branch 'MDL-26120_24' of https://github.com/jacks92/moodle into MOODLE_24_STABLE 2013-05-21 00:55:27 +02:00
Eloy Lafuente (stronk7) f0697b7088 Merge branch 'MDL-31209-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-05-20 19:05:31 +02:00
Ruslan Kabalin 8a06e21c2a MDL-39761: mod_assign: Always check submission plugin status and visibility. 2013-05-20 16:45:43 +01:00
Damyon Wiese 17bca7a2b9 MDL-39412 Prevent developer warnings on upgrade from 24 to master 2013-05-20 12:42:55 +01:00
Tim Hunt c22a0ad980 MDL-39412 disabling manual graded behaviour refinements
1. Change behaviour admin settings so you can only select enabled
behaviours.
2. During the upgrade, change admin settings that might be currently set
to manual graded, so that instead they are set to deferredfeedback (if
that is available. If not, we just take the first alphabetically.)
2013-05-20 12:42:15 +01:00
Tim Hunt 617947c0b7 MDL-39412 question behaviours: hide manual graded option
The ability to set all your quiz questions to require manual grading is
an interesting possibility, but practically almost useless.

If you set that accidentally, then you are badly stuck. There is no way
to fix it after the students have answered the quiz.

Therefore, we should set the config option to hide that option from the
UI. We do this for all Moodle sites as part of the upgrade, not just for
new installs.

If any admin wants to re-enable this, they can later.
2013-05-20 12:26:06 +01:00
Dan Poltawski fad64c0d6b Merge branch 'w18_MDL-39374_m24_folderlog' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-05-20 17:58:41 +08:00
Dan Poltawski 8fedda2fc4 Merge branch 'MDL-35859_idnumber_24' of https://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-05-20 16:39:04 +08:00
Damyon Wiese b27636c4db Merge branch 'MDL-38498-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-05-20 16:13:15 +08:00
Frederic Massart 0db0bcd60b MDL-38498 repository: Unit tests for repository::check_capability()
Conflicts:

	repository/tests/repository_test.php
2013-05-20 16:03:11 +08:00
Dan Poltawski 133defa353 Merge branch 'MDL-27748_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-05-20 15:47:34 +08:00
Dan Poltawski de78a8b251 Merge branch 'MDL-39728_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-05-20 15:29:13 +08:00
Troy Lee 6b3ca4dd2c MDL-36020 overview/report: fix quiz regrade session lock 2013-05-20 12:42:47 +08:00
Damyon Wiese 512f5d9086 Merge branch 'MDL-39363-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-05-20 12:14:35 +08:00
Dan Poltawski dfd948b0f0 Merge branch 'MDL-39198_M24' of git://github.com/kordan/moodle into MOODLE_24_STABLE 2013-05-20 11:48:33 +08:00
Dan Poltawski 6336c04705 Merge branch 'MDL-38369-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-05-20 10:25:52 +08:00
Tim Hunt 0377e4fbc9 MDL-27748 question: grade options should be localised.
question_bank::fraction_options should use format_float to display
decimal pionts correctly.
2013-05-19 23:45:48 +01:00
Tim Hunt 18d5870e8b MDL-39728 List all the classes in question/type/questionbase.php
This should make it easier for people to understand the type hierarchy.
2013-05-18 09:25:17 +01:00
AMOS bot d55eadbc92 Automatically generated installer lang files 2013-05-18 00:41:35 +00:00
Damyon Wiese a1972f5717 Merge branch 'MDL-28250-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-05-17 11:49:08 +08:00
Petr Škoda 0571a6856d MDL-39678 fix YUI 20130515 vulnerability 2013-05-15 22:00:10 +02:00
Petr Škoda 3c61d125c4 MDL-39374 log only real folder edits
Credit goes to Florian Zillner, thanks.
2013-05-15 21:37:25 +02:00
Dan Poltawski 8fec03bc81 MDL-28250 license: upgrade old versions of cc-nc
The url was incorectly defined in previous versions
2013-05-15 11:24:53 +01:00
Wojciech Galiszek ef5ec161ee MDL-28250 license: Correct cc-nc url 2013-05-15 11:22:56 +01:00
AMOS bot 167c498cc8 Automatically generated installer lang files 2013-05-15 00:39:22 +00:00
Frederic Massart 235aa1b1d1 MDL-39667 repository: Correct check for uniqueness of the name 2013-05-14 16:29:20 +08:00
Jerome Mouneyrac 4205983fad MDL-31209 web service error message: Indication about the service not containg the web service function is confusing 2013-05-14 15:44:32 +08:00
Marina Glancy 0408edbb13 MDL-39177 More comments about confusing files.source field 2013-05-14 17:05:40 +10:00
Marina Glancy fb69297c66 MDL-39177 Ensure files are overwritten correctly on unzip 2013-05-14 17:05:40 +10:00
Marina Glancy 3557f63112 MDL-39177 Perform all checks on draftfile area before saving the files 2013-05-14 17:05:40 +10:00
Marina Glancy bb597bbc1a MDL-39177 Remove code duplication 2013-05-14 17:05:39 +10:00
Marina Glancy 73e7cca3c2 MDL-39177 Update file in filearea only if original is present
Now when file was deleted in filemanager and new file with the same file was uploaded the references will be converted to copies exactly like UI warns in filemanager.
Also do not delete original information from draftfiles.
2013-05-14 17:05:39 +10:00
Marina Glancy 949a68d987 MDL-39177 Discard file origin when moving/renaming a file in filemanager
Created one function that handles file update to be used from both JS and nonJS filepicker
2013-05-14 17:05:39 +10:00
Marina Glancy 7a73b806c3 MDL-39177 Original info is not preserved when overwriting a file in filemanager
original file location is used by filemanager to indicate that file is a source of reference and file the list of referencing files
2013-05-14 17:05:39 +10:00
Marina Glancy eb30de6812 MDL-39177 File reference is not updated when overwriting the file 2013-05-14 17:05:38 +10:00
Marina Glancy 313b6da1b2 MDL-33719 When overwriting a file the filemanager is not refreshed 2013-05-14 17:04:34 +10:00
AMOS bot bcd8c30b45 Automatically generated installer lang files 2013-05-14 00:37:45 +00:00
Eloy Lafuente (stronk7) e038687c55 Moodle release 2.4.4 2013-05-13 12:38:41 +02:00
Eloy Lafuente (stronk7) fd6e84c5be Merge branch 'MDL-39642-en_fix-24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-05-13 11:54:01 +02:00
Frederic Massart fbe50c0945 MDL-39640 repository: Prevent notice when editing an instance 2013-05-13 17:31:29 +08:00
Helen Foster 98f8613822 MDL-39642 Merge English strings from the en_fix language pack 2013-05-13 10:06:39 +02:00
Ankit Agarwal a87523d86e MDL-39363 scorm: Accept 0 as a valid score 2013-05-13 11:49:12 +08:00
Andrew Davis f34634eaf3 MDL-35859 core_grade:fixed an optional parameter call to use the array version 2013-05-13 09:53:24 +08:00
Eloy Lafuente (stronk7) 573534c441 weekly release 2.4.3+ 2013-05-10 17:34:22 +02:00
Eloy Lafuente (stronk7) 82a69ceaa0 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-05-10 17:17:57 +02:00
Eloy Lafuente (stronk7) d6d685fd71 Merge branch 'MDL-39518-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-05-10 13:17:44 +02:00
Damyon Wiese ec2d67fd80 MDL-39518: Change hardcoded string MOOCH to Moodle.net 2013-05-10 14:28:02 +08:00
Sam Hemelryk e09afa5184 Merge branch 'MDL-39602-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-05-10 16:40:59 +12:00
Sam Hemelryk a32772051f Merge branch 'MDL-39488_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-05-10 16:30:52 +12:00
Damyon Wiese aa6d532b45 MDL-39602 cache: Move the includes for default stores
Putting them inside the function get_default_stores ensures
that they will be included from anywhere that calls get_default_stores.

Conflicts:

	cache/locallib.php
2013-05-10 11:55:35 +08:00
Rossiani Wijaya 5c635f6c62 MDL-39488: Lesson Module: Fixed the potential variable overwritting for answers 2013-05-10 11:16:34 +08:00
Damyon Wiese b97e174acf Merge branch 'MDL-39535_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-05-10 10:32:19 +08:00
Frederic Massart 84d356f73c MDL-39280 form: Multiple select support disabledIf with multiple values 2013-05-10 09:36:45 +08:00
Eloy Lafuente (stronk7) eb2080240a Merge branch 'MDL-38885-24-int' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-05-10 03:17:19 +02:00
Eloy Lafuente (stronk7) d5420db934 Merge branch 'MDL-29758_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-05-10 02:54:06 +02:00
Frederic Massart d39925c792 MDL-38885 form: Fix comments and stricter unit test 2013-05-10 08:36:19 +08:00
Eloy Lafuente (stronk7) 7f92387c85 Merge branch 'MDL-39488_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-05-09 15:49:24 +02:00
Kordan 6642c7d756 MDL-39198 theme_formal_white: resized and relocated the "Add..." drop down menu of the "Add a block" pseudo block 2013-05-09 14:02:54 +02:00
Jean-Michel Vedrine da4bd770f2 MDL-29758 make Cloze question feedback display more informative
as it was in Moodle 1.9
2013-05-09 08:56:33 +02:00
Frederic Massart 9d02febe9b MDL-38885 form: Unit tests for data cleaning 2013-05-09 14:08:08 +08:00
Frederic Massart feeb14b941 MDL-38885 form: Recursively clean parameters based on right type 2013-05-09 14:06:14 +08:00
Damyon Wiese 8d7f911c96 Merge branch 'wip-MDL-39436-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-05-09 11:32:47 +08:00
Marina Glancy 17a5b5a094 MDL-39436 fixing RTL in filemanager - contextmenu icon 2013-05-09 12:46:08 +10:00
Damyon Wiese 93c5c3b02c MDL-38289: Custom profile fields - added unit test
Added a unit test to cover the case when you are fetching a custom
profile field but you are not logged in.
2013-05-09 10:29:21 +08:00
Damyon Wiese 3f999f8120 Merge branch 'MDL-38289-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-05-09 10:26:07 +08:00
AMOS bot 5f5ff2b680 Automatically generated installer lang files 2013-05-09 00:37:29 +00:00
Jerome Mouneyrac 1d79b726d7 MDL-37822 fix checkboxes that were always set to on by default 2013-05-09 02:08:11 +02:00
Jerome Mouneyrac fd469033fa MDL-37822 move the default code above the set_config to not make the code less confusing 2013-05-09 02:08:11 +02:00
Jerome Mouneyrac 54a3ce69e9 MDL-37822 Moodle send site information to a hub even though it's unchecked 2013-05-09 02:08:11 +02:00
Russell Smith cd8f8a8cb5 MDL-36482 activities block: Allow mod display without intro's 2013-05-09 09:59:41 +10:00
Eloy Lafuente (stronk7) ec00601863 Merge branch 'MDL-38487_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-05-09 00:54:54 +02:00
Jayesh Anandani c2fd66ab6e MDL-26120_24 mod_forum: use correct object 2013-05-08 23:50:58 +05:30
Juan Leyva 3cba96e344 MDL-39563 Fixing mobilecssurl is not being returned in WebService get_siteinfo 2013-05-08 12:08:06 +02:00
sam marshall e5bc3e3dde MDL-39472 MUC: Optimise cache::get_from_persist_cache 2013-05-08 10:17:58 +01:00
Damyon Wiese 781383a946 Merge branch 'MDL-31193-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-05-08 15:23:24 +08:00
Rossiani Wijaya ce4af8c4fe MDL-39488 Lesson Module: Improve code performance 2013-05-08 13:52:13 +08:00
Rossiani Wijaya a6b0fc1c93 MDL-39488 Lesson Module: Fixed PHP error matching question,
if one or more options have not been selected.
2013-05-08 13:52:13 +08:00
Joseph Rézeau eff38644cf MDL-39488 Lesson Module: Fix for "Match question throws PHP error if one or more options have not been selected "
Signed-off-by: Joseph Rézeau <moodle@rezeau.org>
2013-05-08 13:52:04 +08:00
Damyon Wiese cf0d08f661 Merge branch 'MDL-37552-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-05-08 12:43:52 +08:00
Andrew Davis 4b280ca679 MDL-37475 core_grade:fixed the handling of show totals 2013-05-08 10:35:17 +12:00
Eloy Lafuente (stronk7) b5e41dac94 Merge branch 'MDL-39452-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-05-07 22:06:27 +02:00
Mark Nielsen 0572012ef3 MDL-32301: Allow instructor custom parameters for LTI tools 2013-05-07 21:59:25 +02:00
Eloy Lafuente (stronk7) 1a77c6c263 Merge branch 'MDL-34275-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-05-07 19:14:58 +02:00
Dan Poltawski 54061d7cbf Merge branch 'MDL-36223-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-05-07 15:28:33 +01:00
Dan Poltawski 217eeccb26 Merge branch 'wip-MDL-39436-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-05-07 15:13:18 +01:00
Rajesh Taneja b6f8473cdb MDL-37245 Blog: Fixed comments. 2013-05-07 14:58:06 +01:00
Rajesh Taneja 5fde58a593 MDL-37245 Blog: Added permission check for blog comments 2013-05-07 14:58:06 +01:00
Dan Poltawski b15eea6009 Merge branch 'MDL-38500-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-05-07 11:54:24 +01:00
sam marshall 1df3b0ae24 MDL-39448 MUC: Memcache configurable key names 2013-05-07 11:44:11 +01:00
Jerome Mouneyrac 20c171f284 MDL-37552 external_format_text: missing require_once filelib.php (shared credits to Adam Fredericks for report and patch proposal) 2013-05-07 17:57:19 +08:00
Rex Lorenzo 5899b85fd6 MDL-34275 - Use default copyright license when restoring files 2013-05-07 09:10:30 +01:00
Damyon Wiese 06340a114f Merge branch 'MDL-31713_override_24' of git://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-05-07 15:31:03 +08:00
Mark Nelson 7b178abfbb MDL-39535 grade: only display grade errors once 2013-05-07 15:15:07 +08:00
Andrew Davis 501afed36a MDL-31713 core_grade: added updating of grade min and max to update_final_grade() 2013-05-07 12:25:08 +08:00
Frederic Massart ac9d18dfa4 MDL-38289 condition: Do not fetch profile fields when not logged in 2013-05-07 10:19:27 +08:00
Maria Torres 242ef4590f MDL-39169: Now the question's tags are added in backup/restore options 2013-05-06 15:42:21 +01:00
Damyon Wiese 31dda933e6 Merge branch 'MDL-38315-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-05-06 22:19:55 +08:00
Damyon Wiese 9479d76a14 Merge branch 'MDL-38480_m24' of git://github.com/andreabix/moodle into MOODLE_24_STABLE 2013-05-06 21:56:05 +08:00
Dan Poltawski 8d0835e64b Merge branch 'MDL-39446_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-05-06 14:48:15 +01:00
Dan Poltawski fc7f2b1a2f Merge branch 'MDL-39473-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-05-06 14:33:02 +01:00
Dan Poltawski b73f62ef9b Merge branch 'MDL-39491-workshop-media_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-05-06 13:11:58 +01:00
Dan Poltawski 0ddf951c15 MDL-39470 cache: added missing component to get_string call 2013-05-06 12:41:44 +01:00
Damyon Wiese f23877abfb MDL-38443 Assignment: Missing permissions check on downloadall submissions 2013-05-06 10:20:49 +01:00
Damyon Wiese a20eeda845 Merge branch 'MDL-39445_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-05-06 15:17:13 +08:00
AMOS bot 0426c0dfac Automatically generated installer lang files 2013-05-06 00:40:36 +00:00
Dan Poltawski 56463941a8 Merge branch 'brokencalc_24' of git://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-05-05 11:30:31 +01:00
David Mudrák fb1cb65868 MDL-39491 Fix order of Workshop submission text processing
The order of format_text() and file_rewrite_pluginfile_urls() is
important to make filters work correctly.
2013-05-03 11:51:43 +02:00
Albert Gasset 2fc7799975 MDL-39487 mod/assign: fixed ID number of grade item changing 2013-05-03 11:08:19 +02:00
Jerome Mouneyrac ef2a243345 MDL-31193 display the correct and translated token valid until date 2013-05-03 14:14:38 +08:00
Marina Glancy d927075f0c MDL-39436 fixing RTL in filemanager 2013-05-03 11:32:44 +10:00
sam marshall 0f491109ca MDL-39472 MUC: Improve parse_key performance 2013-05-02 16:00:09 +01:00
Tim Hunt 319fc5cb74 MDL-39450 course formats: add static cache to get_format_or_default
This function gets called hundreds of times on every page, often with
exactly the same input, so I added a static cache.
2013-05-02 15:48:21 +01:00
Tim Hunt d8da3c0f5b MDL-39446 calculated qtype: make answer formula input bigger
This makes it easier for teachers editing questions.
2013-05-02 15:47:54 +01:00
Tim Hunt 2ec2d00dc8 MDL-39445 get_plugin_list clean_param use is slow
get_plugin_list was calling clean_param($pluginname, PARAM_PLUGIN) a
lot (600+ times per page), and that is much slower than you would guess.
A specific function for this case, (which we then also use from
clean_param) is a performance win.
2013-05-02 15:47:28 +01:00
Tim Hunt c1288cd726 MDL-38487 qtype match restore: problem with blank ids.
As it happens, this field is useless, and has been removed from the DB
in 2.5. Therefore, we only need a work-around for stable branches.
2013-05-02 15:46:58 +01:00
Dan Poltawski 43ded6701d weekly release 2.4.3+ 2013-05-02 14:37:50 +01:00
Dan Poltawski bffe667ae0 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-05-02 14:32:19 +01:00
sam marshall 02d61e0481 MDL-39454 Accesslib: is_siteadmin is a bit slow 2013-05-02 10:47:21 +01:00
Damyon Wiese ccd8763ce2 Merge branch 'MDL-30775-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE
Conflicts:
	course/externallib.php
2013-05-02 16:21:55 +08:00
Damyon Wiese 4d69adc760 MDL-36223 Assign: User outline report grade display
Use str_long_grade for user outline report because it handles scales and
no grade.

Thanks to Jean-Daniel Descoteaux for suggesting this fix.
2013-05-02 15:46:27 +08:00
Frederic Massart a67e827913 MDL-38369 repository: Remove output before redirect 2013-05-02 12:03:56 +08:00
Andrew Davis 0f60e9fe53 MDL-32913 core_grade:made it more obvious when the gradebook is broken due to a broken calculation 2013-05-02 09:23:43 +08:00
AMOS bot f1c2a058ad Automatically generated installer lang files 2013-05-02 00:38:14 +00:00
sam marshall 442406d3ec MDL-39452 Library: html_writer::attribute unnecessary is_array check 2013-05-01 17:01:32 +01:00
Eloy Lafuente (stronk7) eb244d3b87 Merge branch 'MDL-39444_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-05-01 16:55:25 +02:00
Tim Hunt 0dc15de222 MDL-39444 get_string: remove unnecessary clean_param
This clean_param was added as part of MDL-22015. It is a good idea when
developer debug is turned on, but it showed up as a surprisingly
expensive cost in our profiling.

This change:

1. Removes the check during string_extist. This will not change
behaviour, the method returns false if the string does not exist.

2. In get_string, it only does the check if debugging is set to
DEVELOPER level.
2013-05-01 10:17:34 +01:00
Frederic Massart 7b6ed67e0a MDL-38500 repository: Instance names must be unique 2013-05-01 16:14:39 +08:00
AMOS bot 35b10e19af Automatically generated installer lang files 2013-05-01 00:39:24 +00:00
Eloy Lafuente (stronk7) d8d636dfe4 Merge branch 'wip-MDL-39432-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-05-01 01:35:10 +02:00
Sam Hemelryk be9d851c07 Merge branch 'MDL-39422-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-05-01 11:14:28 +12:00
Sam Hemelryk eecd7b4412 Merge branch 'wip-MDL-39099_M24' of git://github.com/gjb2048/moodle into MOODLE_24_STABLE 2013-05-01 11:04:50 +12:00
Sam Hemelryk 609d262c17 Merge branch 'MDL-39414-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-05-01 11:02:05 +12:00
Sam Hemelryk 5a682ca6f9 MDL-39432 course: converted closures to lambda functions 2013-05-01 10:41:42 +12:00
Sam Hemelryk 858131c09c Merge branch 'MDL-36060-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-05-01 10:14:09 +12:00
Mark Nielsen 75156589fd MDL-36060: Remove anonymous functions in mod/lti
This was breaking eaccelerator because it doesn't
support anonymous functions.
2013-04-30 17:50:29 +01:00
Dan Poltawski 41b2eb8400 MDL-39422 mod_forms: prevent long coruse module names
To prevent ugly DB errors.
2013-04-30 17:42:03 +01:00
Dan Poltawski da7b1ecb12 MDL-39422 course: prevent module names longer 255 chars
To prevent ugly DB errors.
2013-04-30 17:42:02 +01:00
Gareth J Barnard 34877d21af MDL-39099 course_format: Allow section_summary() to be overridden. 2013-04-30 17:02:44 +01:00
Dan Poltawski fb0698f344 Merge branch 'MDL-35385_chat_24' of git://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-04-30 14:08:06 +01:00
Dan Poltawski dd9b396af4 MDL-39414 portfolio: don't queue google portfolio exports
This is a bit of an ugly way of saying 'I dont support queued exports'.

The google plugins need a valid user session in order to export to the
google services, thereforce we are forcing the export to be interactive
and not queued through cron, as this wont work in the current
implmenetation.

It's possible we could add offline access to the plugins, but I don't
believe it is worth the benefit for the additional complexity.
2013-04-30 10:37:47 +01:00
Damyon Wiese a1ffe7e235 Merge branch 'MDL-39354_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-30 16:25:08 +08:00
Jerome Mouneyrac e2bceb5018 MDL-30775 get_course_contents: remove warnings when the section is empty 2013-04-30 14:12:25 +08:00
Damyon Wiese 6476ff5a7c Merge branch 'MDL-37966_24' of git://github.com/jonof/moodle into MOODLE_24_STABLE 2013-04-30 12:51:27 +08:00
Damyon Wiese 00f0d5c97f Merge branch 'MDL-39246_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-30 12:16:02 +08:00
Andrew Davis e4f7ad5d55 MDL-31713 core_grade:added a unit test to replicate a raw grade max bug 2013-04-30 09:37:23 +08:00
Andrew Davis 9ffffa5ec7 MDL-35385 mod_chat: made sure no message popups display within the chat window 2013-04-30 09:10:18 +08:00
Sam Hemelryk 7de740be35 Merge branch 'MDL-39303_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-04-30 10:00:09 +12:00
Sam Hemelryk 7e1c6bf8b4 Merge branch 'MDL-39365-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-04-30 09:36:36 +12:00
Sam Hemelryk 38fdbcf001 Merge branch 'MDL-39398-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-04-30 09:31:42 +12:00
Tim Hunt b3c1e4b131 MDL-39354 put back a bit of margin on checkboxes. 2013-04-29 19:14:56 +01:00
Dan Poltawski c0f02f7c89 Merge branch 'MDL-39378_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-29 17:01:03 +01:00
Brian King a7fce60867 MDL-39409 auth/cas pass web proxy settings along to phpCAS 2013-04-29 17:51:43 +02:00
Tim Hunt 70351389f7 MDL-39378 Improve s() performance.
These changes give about a 10% speed-up in this function. The significant changes are:
1. Simplify the if logic to remove unnecssary cases.
2. Dont pass default argument values to htmlspecialchars, just using the
   defaults is faster.
3. I can confirm that /i regex is faster than the equivalent regex without the i.

I also added more unit tests to test the edge cases.
2013-04-29 12:32:24 +01:00
Tim Hunt 7017ce1a30 MDL-39378 s(): fix bad hex regex 2013-04-29 12:32:20 +01:00
Frederic Massart 923f470056 MDL-39398 message: Prevent notice when sending Jabber messages
Not tracking the presence prevents a notice to be displayed during disconnect(),
where the the jabber server attempts to subscribe to $CFG->jabberusername presence.
As the server name does not include a resource identifier (stillwit@jabber.org/resource),
an explode('/') fails.
2013-04-29 19:17:58 +08:00
Dan Poltawski 3fb4ce7d58 Merge branch 'MDL-27071_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-04-29 10:27:41 +01:00
Damyon Wiese 49b18efa4e Merge branch 'MDL-39342_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-29 15:36:09 +08:00
Damyon Wiese 6f9d4498d2 Merge branch 'MDL-30940-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-04-29 14:06:11 +08:00
Ankit Agarwal d9ea44e5a3 MDL-39365 scorm reports: Return correct track count 2013-04-29 13:23:15 +08:00
Damyon Wiese 8927b51d23 Merge branch 'MDL-37845_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-29 11:46:33 +08:00
Damyon Wiese 58498bde56 Merge branch 'MDL-38440-24' of git://github.com/mouneyrac/moodle into MOODLE_24_STABLE 2013-04-29 11:10:35 +08:00
Eloy Lafuente (stronk7) f530a1f868 MDL-27071 Add big IN() unit tests
Let's verify how all databases perform with a big
number of parameters (10000) using IN() SQL clauses.
Both using QM and NAMED parameters.

Ideally only Oracle fails, and only it will need fixing.
2013-04-29 01:53:41 +02:00
Eloy Lafuente (stronk7) 0f987021a3 MDL-27071 Allow Oracle IN() to use > 1000 items
By using a pivoting strategy, we modify the list
of params (QM and NAMED supported) into a
subquery, so the 1000 limit in Oracle (ORA-01795)
is not thrown anymore.

Conflicts:
	lib/dml/oci_native_moodle_database.php
2013-04-29 01:53:01 +02:00
Sam Hemelryk 3e7b95b431 Merge branch 'MDL-39192_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-04-29 10:53:49 +12:00
AMOS bot 77474a85a1 Automatically generated installer lang files 2013-04-27 00:37:28 +00:00
Tim Hunt 2d57c26b8b MDL-39246 quiz timer: compute a more accurate stop time. 2013-04-26 12:29:15 +01:00
Tim Hunt 6b32bf8520 MDL-39246 JavaScript: store the time the page starts loading.
This helps synchronise time on the client side with time on the server.
If you wait until a js_init_call runs, you might have had to wait an
unknown number of seconds while all the JS loads. Therefore, we capture
the current time as soon as possible in <head>.

This is a bit like adding .jsenabled to <body> as soon as possible, to
reduce visual flicker.
2013-04-26 12:29:11 +01:00
Jerome Mouneyrac 5831c40c5c MDL-38440 WebService get_contents doesn't return the full text of labels 2013-04-26 15:59:14 +08:00
Tim Hunt 9a3d0206da MDL-37845 multichoice qtype: Fix some display issues.
1. Better handling of multi-line choices in the correct answer display.
2. Remove dangerous CSS that is no longer needed.
2013-04-25 17:21:11 +01:00
Dan Poltawski 0b8cda3b9e Merge branch 'MDL-34403-MOODLE_24_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_24_STABLE 2013-04-25 12:54:17 +01:00
Jason Platts 261aae298b MDL-39342 stop users entering too long matching answers.
Since they lead to an ugly DB error.
2013-04-25 12:00:09 +01:00
Dan Poltawski 3aba4326d4 Merge branch 'MDL-29258_24' of git://github.com/dmonllao/moodle into MOODLE_24_STABLE 2013-04-25 10:29:55 +01:00
Frederic Massart 442e59e785 MDL-39329 course: Strict standard warning during unpublishing 2013-04-25 10:11:42 +01:00
AMOS bot f368e4a731 Automatically generated installer lang files 2013-04-25 00:38:08 +00:00
Eloy Lafuente (stronk7) c6be1389b7 weekly release 2.4.3+ 2013-04-25 01:10:08 +02:00
Eloy Lafuente (stronk7) ff1e26aba4 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-04-25 01:03:38 +02:00
Eloy Lafuente (stronk7) 9c65b19cb5 Merge branch 'MDL-35364_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-24 23:36:55 +02:00
Justin Filip 61c9217b2a MDL-39166 auth_ldap Add triggers for user created/updated events. 2013-04-24 16:16:39 -04:00
Matt Petro 7dc22c4ef1 MDL-34403 mod quiz: fix error during enrolment 2013-04-24 14:52:33 -04:00
Dan Poltawski ce024436be Merge branch 'MDL-39283_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-04-24 14:35:09 +01:00
Dan Poltawski fdeb0d80ed Merge branch 'MDL-39219_scorm_ie7_24' of git://github.com/davosmith/moodle into MOODLE_24_STABLE 2013-04-24 09:08:49 +01:00
Ruslan Kabalin 414095a014 MDL-34939: Fix clamdscan permissions-related issues
Use --fdpass parameter that passes the file descriptor permissions to clamd,
which allows to scan given file irrespective of directory and file
permissions. Changing file permissions is not required.
2013-04-24 14:59:19 +08:00
Mark Nelson ee02d17466 MDL-39303 mod_forum: prevent user from submitting when post threshold reached 2013-04-24 14:02:52 +08:00
Ankit Agarwal ca61ed1bbe MDL-39296 scorm reports: Fixing incorrect variable name 2013-04-24 13:43:35 +08:00
Mark Nelson 709c441e89 MDL-39192 mod_forum: do not need to check the posting threshold when editing a post 2013-04-24 12:32:39 +08:00
Davo Smith 7b443f87dd MDL-39219 mod_scorm - make sure YUI JSON module is loaded 2013-04-23 18:58:49 +01:00
Dan Poltawski 2a4eeac067 Merge branch 'MDL-37784_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-04-23 13:00:39 +01:00
Dan Poltawski 5559857f9e Merge branch 'MDL-39296-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-04-23 12:50:51 +01:00
Jean-Michel Vedrine c8fbd8b0c3 MDL-39283 GIFT and XML question export broken for unsupported qtypes
Do no write any data to the export for unsupported qtypes
2013-04-23 09:52:47 +02:00
Jean-Michel Vedrine 37eadb417b MDL-37784 Adaptive no penalty display wrong penalty info
Adaptive Mode tells students they have been penalized even when set to no penalties
2013-04-23 08:39:48 +02:00
Damyon Wiese 9723842bc0 Merge branch 'MDL-34933_24_STABLE' of https://github.com/mchurchward/moodle into MOODLE_24_STABLE
Conflicts:
	lib/db/upgrade.php
	version.php
2013-04-23 12:02:47 +08:00
Ankit Agarwal 2c2544877d MDL-39296 scorm reports: Fix undefined variables in graphs report 2013-04-23 11:55:41 +08:00
David Monllao d902ffe847 MDL-29258 core_portfolio: Fixing broken default breadcrumb 2013-04-23 11:16:38 +08:00
AMOS bot d4aca421df Automatically generated installer lang files 2013-04-23 00:37:55 +00:00
Tim Hunt 79ed1fe6c6 MDL-35364 shorten text: don't return invalid HTML.
I also broke the unit tests into more, smaller, named tests, so that
when things start failing, more tests are run, and it is clearer what
the problem is.

In a couple of cases, I adjusted the $ideal lenght in the test. A
careful counting of the characters in the test input (added as comments)
suggests that the new values make for better tests.
2013-04-22 19:24:50 +01:00
Alex Leontiev 22687af45a MDL-37514 module.js: fix .js for auto quiz submission in preview mode
The issue: when we attempt the quiz as teacher/admin and timer is up,
quiz is not submitted, even though "Open attempts are submitted
automatically" is set. I've changed the javascript for a timer,
responsible for submission, removing the special behaviour in case of
preview mode. Note, that when the admin/teacher is taking a quiz, the
"preview" mode is automatically switched on.

It is a bit strange, since in the javascript there was clearly no
expressed intention to really submit quiz in preview, even when timer
hits. It does not really seem like a accidental bug, rather it looks
like some misunderstanding. Worse still, it may happen that I did not
understand the intentions of previous editor and ruined some
functionality. Because of this, and the fact that this is my first bug,
I would like to ask about the peer review! Please, see my comments in
bug discussion for the testing steps.
2013-04-22 14:10:06 +01:00
Mike Churchward d75a987e36 MDL-34933 core_message: Adding index to improve database access on message_working table. 2013-04-22 08:38:03 -04:00
Jason Platts e1267ba041 MDL-37942 Images with non-alphanumeric chars in file name won't export 2013-04-22 12:43:39 +01:00
Dan Poltawski 3fd370acde Merge branch 'w16_MDL-39141_m24_toolbar' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-04-22 12:40:44 +01:00
Damyon Wiese 499c16040d Merge branch 'MDL-39050_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-22 10:29:20 +08:00
AMOS bot fb1b6c4fbc Automatically generated installer lang files 2013-04-22 00:38:29 +00:00
Sam Hemelryk b920c4096c Merge branch 'MDL-39172_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-04-22 11:02:14 +12:00
Dan Poltawski 6f69ef749e Merge branch 'MDL-39219_scorm_ie7_24' of git://github.com/davosmith/moodle into MOODLE_24_STABLE
Conflicts:
	mod/scorm/module.js
2013-04-19 15:20:36 +01:00
Dan Poltawski d9a277684f Merge branch 'MDL-38361_24' of https://github.com/prateeksachan/moodle into MOODLE_24_STABLE 2013-04-19 15:11:48 +01:00
Dan Poltawski 0c60dae522 Merge branch 'wip-MDL-38565-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-04-19 13:47:44 +01:00
Tim Hunt 98ccd4fa20 MDL-39050 quiz access rules: settings.php files should work. 2013-04-19 11:52:55 +01:00
Damyon Wiese 501dd08c6b Merge branch 'MDL-39084-moodle24' of github.com:StudiUM/moodle into MOODLE_24_STABLE 2013-04-19 14:07:15 +08:00
Damyon Wiese 3054e59f40 Merge branch 'MDL-39167_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-19 13:30:54 +08:00
Frederic Massart 8154dd8350 MDL-30940 form: Mutiple select work correctly without any selection 2013-04-19 11:06:29 +08:00
Sam Hemelryk d7b2888810 Merge branch 'MDL-39185_m24' of https://github.com/markn86/moodle into MOODLE_24_STABLE 2013-04-19 13:53:36 +12:00
Sam Hemelryk aec4f1e956 Merge branch 'MDL-39135-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE 2013-04-19 13:48:07 +12:00
Sam Hemelryk 6318a38885 MDL-38565 cache: tidy up pre-integration
Conflicts:
	lib/db/upgrade.php
2013-04-19 10:11:38 +12:00
Sam Hemelryk 1a038ed7d9 MDL-38565 cache: improve stats gathering 2013-04-19 10:11:37 +12:00
Sam Hemelryk 312ad653e9 MDL-38565 cache: upgrade code to amend default stores
Conflicts:
	version.php
2013-04-19 10:11:37 +12:00
Sam Hemelryk 73433c0995 MDL-38565 cache: cron routine to clean up old session data 2013-04-19 10:09:55 +12:00
Sam Hemelryk 2e0b7de1b1 MDL-38565 cache: session caches now function as expected
This change is a large change to the way sessions are handled
within MUC after it was discovered that session did not function
as expected when any store other than the default session store
was being used.
As part of this change the session loader has been largely
customised in order to consolidate session data for the loader.
The unit tests have also being greatly increased to provide
better coverage for sessions.

Conflicts:
	cache/README.md
	cache/tests/cache_test.php
2013-04-19 10:09:55 +12:00
Petr Škoda 7fcffb98bb MDL-39141 fix customtoolbar notices during upgrade 2013-04-18 20:22:52 +02:00
Jean-Michel Vedrine 3b44cab37b MDL-39172 Import of .dat files is broken in blackboard_six import format 2013-04-18 17:48:08 +02:00
Dan Poltawski d298661993 weekly release 2.4.3+ 2013-04-18 12:49:40 +01:00
Davo Smith 76bb36da6f MDL-39219 mod_scorm - replace JSON with Y.JSON for IE7 compatibility 2013-04-18 12:47:54 +01:00
Dan Poltawski 0d80c1cc7a Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-04-18 12:44:04 +01:00
Dan Poltawski 8803e9c7e1 Merge branch 'MDL-39203-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-04-18 08:44:10 +01:00
Frederic Massart c32c6c1c24 MDL-39203 repository: Fixed authentication errors with Dropbox 2013-04-18 14:54:19 +08:00
prateeksachan 004f868825 MDL-38794 passed overflowdiv parameter 2013-04-17 20:36:28 +05:30
Dan Poltawski f8e976e56a Merge branch 'MDL-38824-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-04-17 14:38:06 +01:00
Tim Hunt ccbe8ca79e MDL-39167 quiz access rules: need to validate their settings.
We were missing the hook in the form validation method. We had them
everywhere else they were needed.
2013-04-17 14:26:08 +01:00
Dan Poltawski ea4841fbef Merge branch 'wip-mdl-39110-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-04-17 13:02:47 +01:00
Mark Nelson bb244cb482 MDL-39185 mod_forum: declare new object before creating member variables to prevent Strict Standards warning 2013-04-17 15:21:44 +08:00
Dan Poltawski ea99087d08 MDL-39135 assign_feedback: fix missing renderer argument
assign_user_summary expects extra profile fields

Conflicts:

	mod/assign/feedback/file/locallib.php
2013-04-17 14:05:31 +08:00
Jean-Philippe Gaudreau efc0be399e MDL-39084 grade: Capability checks are incoherent for the Course grade settings section 2013-04-16 09:28:25 -04:00
Dan Poltawski 464ab7894b Merge branch 'MDL-39080_M24' of git://github.com/kordan/moodle into MOODLE_24_STABLE 2013-04-16 12:45:01 +01:00
Daniel Neis Araujo 461ccadab0 MDL-38136: fix user_get_user_details doesn't return idnumber (thanks to Antonio Carlos Mariani) 2013-04-16 15:47:16 +08:00
Damyon Wiese 20d52c6b9c Merge branch 'wip-MDL-38055-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-04-16 14:42:20 +08:00
Sam Hemelryk d203a50c02 MDL-39127 navigation: fixed loading of categories for navbar
Conflicts:

	lib/navigationlib.php
2013-04-16 10:04:55 +08:00
Eloy Lafuente (stronk7) 1e803a3e45 Merge branch 'm24_MDL-37844' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE 2013-04-16 01:15:06 +02:00
Dan Poltawski dd79ab10b3 Merge branch 'MDL-38880_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-04-15 16:25:15 +01:00
Dan Poltawski ef9c4b6ef5 Merge branch 'MDL-39000-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-04-15 08:30:16 +01:00
Dan Poltawski 7af74e7f19 Merge branch 'MDL-38011-24' of git://github.com/srynot4sale/moodle into MOODLE_24_STABLE 2013-04-15 07:59:10 +01:00
Rajesh Taneja 1f02e1548f MDL-39110 Administration: Get role from get_roles function to display as filter label 2013-04-15 14:29:49 +08:00
Damyon Wiese 5ac9166740 Merge branch 'MDL-39068_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-04-15 14:24:02 +08:00
Damyon Wiese 25105b650a MDL-37762 navbar - fold some long lines in previous patch 2013-04-15 13:26:36 +08:00
Damyon Wiese 6bf520165b Merge branch 'wip-MDL-37762-m24' of https://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-04-15 12:37:54 +08:00
Eloy Lafuente (stronk7) 6e0b5a725d Merge branch 'MDL-39089_24' of git://github.com/dmonllao/moodle into MOODLE_24_STABLE 2013-04-15 01:57:35 +02:00
Sam Hemelryk ce520e0470 MDL-37762 navbar: shows categories for current course again 2013-04-15 11:35:23 +12:00
Paul Nicholls 7a5f3762d0 MDL-37762: Breadcrumb not showing categories on course page 2013-04-15 11:30:23 +12:00
Eloy Lafuente (stronk7) a68e6026ca MDL-39068 use cross-db text column ORDER BY
Credit goes to Valerii Kuznetsov, thanks!
2013-04-14 16:09:54 +02:00
AMOS bot 6c5a661606 Automatically generated installer lang files 2013-04-13 00:37:25 +00:00
David Monllao 42cff3b54a MDL-38089 mod_wiki: Fix incorrect links 2013-04-12 13:17:13 +08:00
Damyon Wiese aa17028b35 MDL-29877 Grades - Remove hardcoded prefix from upgrade step 2013-04-12 11:53:20 +08:00
Damyon Wiese 870f78b0fd MDL-29877 Grades - version bump for upgrade step.
And whitespace...
2013-04-12 11:41:54 +08:00
Damyon Wiese d4a997b7d7 Merge branch 'MDL-29877_bad_grade_item_24' of git://github.com/andyjdavis/moodle into MOODLE_24_STABLE
Conflicts:
	version.php
2013-04-12 11:36:17 +08:00
Jayesh Anandani 7ec3994f78 MDL-39054 quiz statistics: move hard-coded text to lang file 2013-04-12 11:09:24 +08:00
Dan Poltawski 5c58c88545 Merge branch 'MDL-37537-24' of git://github.com/srynot4sale/moodle into MOODLE_24_STABLE 2013-04-12 10:26:45 +08:00
Jean-Philippe Gaudreau 4d06b6a841 MDL-38637 CAS Authentication: Undefined index: QUERY_STRING when executing cron 2013-04-11 10:55:02 -04:00
Jean-Michel Vedrine 50a9a7d498 MDL-38880 Imported Cloze questions lose embedded images or other media 2013-04-11 16:29:34 +02:00
Aaron Barnes d20826dc4c MDL-37537 completion: Fix incorrect lang string reference in block 2013-04-12 01:49:35 +12:00
Aaron Barnes 3220058b14 MDL-38011 completion: Use new localised role names 2013-04-12 01:39:52 +12:00
Eloy Lafuente (stronk7) 931eff3b84 weekly release 2.4.3+ 2013-04-11 12:42:07 +02:00
Eloy Lafuente (stronk7) 112c8e8812 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-04-11 12:32:51 +02:00
Kordan 871a4102dc MDL-39080 theme_formal_white: modified "Main menu" block look to resemble the "Navigation" one 2013-04-11 11:01:20 +02:00
Dan Poltawski caf6774576 Revert "MDL-38254 Assignment Module: add avaialble message to all assignment types"
This reverts commit 079a76bb37.
2013-04-11 16:53:02 +08:00
Damyon Wiese 1b68e51133 MDL-35144 Categories - Allow editing by custom roles
Users with category:manage or course:create should be able to edit
the course/category.php page.
2013-04-11 14:07:46 +08:00
Eloy Lafuente (stronk7) 0d9a2ce8e0 Merge branch 'MDL-38525-24' of https://github.com/damyon/moodle into MOODLE_24_STABLE 2013-04-11 00:57:07 +02:00
Damyon Wiese 3133c8e4ac MDL-38525: Assignment upgrade - Error with comments for unenrolled students.
Students with comments on 'upload' assignments cause errors for the upgrade
tool if they are no longer enrolled. The solution is to allow siteadmin to
see student submissions even if the student is not currently enrolled (you
must be siteadmin to run the upgrade tool).
2013-04-10 16:17:43 +08:00
Ryan Panning 1fbe4f46ba MDL-38525: Assignment - print exception message when assignment upgrade fails.
Change to use getMessage() from the Exception class will prevent "{$a}" when
$e->error is null.
2013-04-10 16:17:33 +08:00
Dan Poltawski 4e7aef7651 Merge branch 'MDL-19072_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-04-10 14:10:51 +08:00
Dan Poltawski 5bad124045 Merge branch 'MOODLE_24_MDL35144' of git://github.com/thepurpleblob/gumoodle into MOODLE_24_STABLE 2013-04-10 12:23:53 +08:00
Dan Poltawski eda9f7bd43 Merge branch 'wip-mdl-35883-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-04-10 12:16:40 +08:00
Dan Poltawski 3a44f70e62 Merge branch 'MDL-38254_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-04-10 12:13:28 +08:00
Dan Poltawski a1ec118378 Merge branch 'MDL-38999_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-04-10 10:35:52 +08:00
Andrew Davis 166102e9b3 MDL-29877 core_grade:add some upgrade code to fix broken grade items introduced by bad restores 2013-04-10 08:28:05 +08:00
Petr Škoda 1802cb2536 MDL-38912 fix incorrect timeout reset 2013-04-10 00:07:26 +02:00
sam marshall 58404f0ab4 MDL-39000 Conditional activities: Section condition restore errors 2013-04-09 17:35:39 +01:00
Jean-Michel Vedrine 720b0f5eb0 MDL-19072 XHTML export for match questions fix for distractors 2013-04-09 11:02:27 +02:00
Dan Poltawski 892c4e1bc6 Merge branch 'wip-MDL-38442-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-04-09 15:40:19 +08:00
Aparup Banerjee 883050603c Merge branch 'w14_MDL-38798_m24_php55' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-04-09 14:31:10 +08:00
Aparup Banerjee 6b9fc96f8e Merge branch 'wip-MDL-38887-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-04-09 14:21:32 +08:00
Dan Poltawski dec2c2086f Merge branch 'MDL-38766/MOODLE_24_STABLE' of github.com:kemitix/moodle into MOODLE_24_STABLE 2013-04-09 10:38:09 +08:00
Dan Poltawski 927416c2f3 Merge branch 'wip-MDL-38541-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-04-09 09:48:05 +08:00
Marina Glancy 69778612db MDL-38541 Restrict calling rebuild_course_cache() from upgrade process
only plugins upgrade scripts can call rebuild_course_cache() and for clearing cache only.
2013-04-09 11:13:50 +10:00
AMOS bot dea31c3040 Automatically generated installer lang files 2013-04-09 00:37:50 +00:00
Eloy Lafuente (stronk7) 989a8abc44 Merge branch 'w14_MDL-38753_m24_ocicount' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-04-09 02:25:31 +02:00
Petr Škoda cfbdf4d2a0 MDL-39028 fix sqlsrv concat type conversion 2013-04-09 02:18:34 +02:00
Sam Hemelryk a95fb6895d MDL-38442 navigation: set_expansion_limit now only hides structural nodes 2013-04-09 12:06:26 +12:00
Petr Škoda 239fb7ac41 MDL-39024 fix MSSQL seek past the end of recordset 2013-04-09 01:59:43 +02:00
Petr Škoda 0816f853fa MDL-39022 fix MSSQL concat type conversion 2013-04-09 01:56:48 +02:00
Eloy Lafuente (stronk7) f6a2e02702 Merge branch 'MDL-38912_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-09 01:39:49 +02:00
Damyon Wiese d11c78a127 MDL-38907 Course: Remove unused CSS causing jump menu to be center aligned. 2013-04-09 01:09:50 +02:00
Eloy Lafuente (stronk7) a387569134 Merge branch 'MDL-39023-parentlang_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-04-08 16:57:47 +02:00
Howard Miller de6e4874ef MDL-35144 adding editing capabiltities to page 2013-04-08 15:47:03 +01:00
Eloy Lafuente (stronk7) eecfff557d MDL-38999 timezones: add some TZ/stamps know to be problematic to tests. 2013-04-08 16:32:28 +02:00
Eloy Lafuente (stronk7) 8874028e9e MDL-38999 timezones: fixed timezone information. 2013-04-08 16:32:19 +02:00
sam marshall cfd41befd5 MDL-38824 Activity completion: Automatic completion quotes not escaped 2013-04-08 14:53:38 +01:00
David Mudrák 5c0877079c MDL-39023 Make get_language_dependencies() aware of circular dependency risk
The patch reimplements the core_string_manager::get_language_dependencies()
so that potentially mis-configured language packs with circular
dependencies or self dependency do not make the site unavailable.
Unit tests for the expected behaviour are added.
2013-04-08 14:26:23 +02:00
Petr Škoda b795853f5b MDL-38753 tweak count SQL to make stupid Oracle happy 2013-04-08 12:34:46 +02:00
Damyon Wiese 0ab296bd10 Merge branch 'MDL-38452-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-04-08 14:08:24 +08:00
Dan Poltawski 99a66861b7 Merge branch 'MDL-37676_24_STABLE' of git://github.com/appalachianstate/moodle into MOODLE_24_STABLE 2013-04-08 14:07:04 +08:00
Tim Lock 0852e56af6 MDL-35868: quiz: Use correct attemptnumber when a last attempt exists. 2013-04-08 11:09:42 +08:00
Dan Poltawski 3a509e1a6a Merge branch 'wip-MDL-38701-m24' of git://github.com/marinaglancy/moodle into MOODLE_24_STABLE 2013-04-08 10:23:21 +08:00
Marina Glancy 4ea004cf9e MDL-38701 Added missing require_once() before calling course_get_format 2013-04-08 11:37:33 +10:00
Marina Glancy 11799954dc MDL-38887 dim hidden branches in navigation expanded via AJAX requests 2013-04-08 11:36:15 +10:00
AMOS bot ddc9ca757d Automatically generated installer lang files 2013-04-08 00:36:05 +00:00
Matteo Scaramuccia 18c3001eb4 MDL-35840 SCORM TOC: fixed a typo, improvements on getting the focus 2013-04-08 09:45:07 +12:00
Dan Marsden 9e8c6c7bff MDL-37844 SCORM: fix js error and highlight selected node in TOC. 2013-04-08 09:45:00 +12:00
Petr Škoda 5364ee6b09 MDL-38798 remove unused property which was giving notices in PHP 5.5beta 2013-04-07 11:53:50 +02:00
AMOS bot 7ecf4f1360 Automatically generated installer lang files 2013-04-07 00:37:25 +00:00
Tim Hunt 1e659c865a MDL-38912 prevent time-outs during unit tests. 2013-04-05 18:39:20 +01:00
Andrea Bicciolo 704e2ecaaa MDL-38480_m24 Fix for messy usage of language strings in block course overview 2013-04-05 12:25:04 +02:00
Dan Poltawski bd11908373 weekly release 2.4.3+ 2013-04-05 18:01:38 +08:00
Dan Poltawski 76593ae5e6 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-04-05 17:52:35 +08:00
Paul Campbell 3519df7631 MDL-38766 wiki2.0: fix redirects
Signed-off-by: Paul Campbell <pcampbell@carnegiecollege.ac.uk>
2013-04-05 09:38:30 +01:00
Rossiani Wijaya 079a76bb37 MDL-38254 Assignment Module: add avaialble message to all assignment types 2013-04-04 11:08:57 +08:00
AMOS bot 362add0f4f Automatically generated installer lang files 2013-04-04 00:36:09 +00:00
Eloy Lafuente (stronk7) 3a5cb521c9 Merge branch 'MDL-38112-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-04-04 00:57:59 +02:00
Dan Poltawski b7f0af199d Merge branch 'MDL-38657_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-04-03 16:51:13 +08:00
Aparup Banerjee 20a98af525 Merge branch 'MDL-38809_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-04-03 16:33:00 +08:00
AMOS bot 5ac884c9a3 Automatically generated installer lang files 2013-04-03 00:35:46 +00:00
Matteo Scaramuccia 5c2a800bfa MDL-38545 Reports: PHP Strict Standards error in graph.php 2013-04-02 22:12:47 +02:00
Damyon Wiese 70a9bf863b MDL-38840 Statslib - Fix failing unit tests on ci server (DST change) 2013-04-02 16:49:21 +02:00
Rajesh Taneja 819ad10fa3 MDL-35883 Accessibility: Added title for login as user link in header and footer for accessibility 2013-04-02 16:00:29 +08:00
Rajesh Taneja 9c14f808ed MDL-35883 Accessibility: Added title for user link in header and footer for accessibility 2013-04-02 16:00:29 +08:00
Dan Poltawski b2c04be9c5 MDL-35603 backup: fix coding style issues
Conflicts:
	backup/util/ui/restore_ui_components.php
2013-04-02 14:34:29 +08:00
Dan Poltawski ecfa79b801 Merge branch 'MDL-35603_24' of git://github.com/rlorenzo/moodle into MOODLE_24_STABLE 2013-04-02 14:26:47 +08:00
Damyon Wiese 0c61dbecf7 Merge branch 'MDL-38713-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-04-02 13:19:51 +08:00
Damyon Wiese f034c23b0a Merge branch 'MDL-38700-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-04-02 13:11:13 +08:00
Dan Poltawski 536780c5de Merge branch 'MDL-38702_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-04-02 10:04:47 +08:00
Mary Evans f246415143 MDL-38657 theme_base: Fixes misalignment issue in User Report page. 2013-03-31 02:30:57 +01:00
prateeksachan e8803d5293 MDL-38361: Fixed typos in mod/assign/locallib.php 2013-03-30 23:42:25 +05:30
Tim Hunt 56054396c4 MDL-38809 quiz manual grading: delete expensive unnecssary code. 2013-03-30 17:27:16 +00:00
Rex Lorenzo 1936dbe341 MDL-35603 - Backup - Course import/restore max results
* Unified UI for import and restore course search
2013-03-28 15:24:33 -07:00
Damyon Wiese fe33d24cab weekly release 2.4.3+ 2013-03-28 14:48:58 +08:00
Damyon Wiese 994bc95e2a Merge branch 'MDL-25631_m24' of git://github.com/merrill-oakland/moodle into MOODLE_24_STABLE 2013-03-28 10:41:20 +08:00
Jonathon Fowler bbf86cd4f3 MDL-37966 Assignment: put upgraded modules where the originals were 2013-03-27 12:52:36 +10:00
Aparup Banerjee 843093789d Merge branch 'MDL-38659_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-03-27 10:38:48 +08:00
Eloy Lafuente (stronk7) 821c60617e Merge branch 'MDL-38557_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-26 23:41:31 +01:00
Eloy Lafuente (stronk7) 673ff9d82e Merge branch 'MDL-38647_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-26 23:22:53 +01:00
Eric Merrill 59c5f4cd35 MDL-25631 backup Decoupling legacy files from course config settigs. If they are present, they will be restored. 2013-03-26 17:02:51 -04:00
Petr Škoda 0fe975bbf2 MDL-37782 reset DB after each failed database test 2013-03-26 16:11:08 +01:00
Eloy Lafuente (stronk7) 25ce2cfbeb MDL-38659 environment: fix incorrect feedback messages 2013-03-26 15:36:37 +01:00
Dan Poltawski 85c361d3ea MDL-38713 course: correctly set visibleold on mod creation
Remove uncessary set of visibleold in the form
2013-03-26 16:21:16 +08:00
Damyon Wiese 48bf094142 Merge branch 'm24_MDL-38336_SCORM_TOC_links_when_Display_course_structure_is_on' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-03-26 16:02:28 +08:00
Damyon Wiese cacbbb46ce MDL-38468 Filelib: Fix ordering of new mimetypes 2013-03-26 15:25:56 +08:00
Damyon Wiese 11ba99ea72 Merge branch 'm24_MDL-38468_Fix_MHTML_files_delivery' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-03-26 15:23:57 +08:00
Charles Fulton 914624d51d MDL-38700 course: only change visibility if a module moves to a different section 2013-03-26 15:00:26 +08:00
Dan Poltawski ba97fbe855 MDL-38700 course: add tests for moveto_module()
* Test visibility when moving around hidden sections
* Test for visiblity changes when moving around in the same sections.
2013-03-26 15:00:26 +08:00
Damyon Wiese fe33e80077 Merge branch 'wip-MDL-35875-stable24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-03-26 14:48:40 +08:00
Damyon Wiese 06b3c7e961 Merge branch 'MDL-30438_b_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-03-26 14:36:28 +08:00
Damyon Wiese a9cb8b73c8 Merge branch 'MDL-38380_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-03-26 13:24:47 +08:00
Dan Poltawski d0732e589f MDL-38112 - update to the ISO list of countries
According to ISO 3166-1
2013-03-26 10:46:19 +08:00
Damyon Wiese 0e91ef2d66 Merge branch 'wip-mdl-36882-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-03-26 10:42:18 +08:00
Rajesh Taneja 6299d9a1a7 MDL-36882 course: Added aria-live for manual completion
This is required so that assistive technologies can notify user about change on completion status
2013-03-26 10:26:28 +08:00
Damyon Wiese a5a3618c66 Merge branch 'wip-mdl-36125-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-03-26 10:13:38 +08:00
Mary Evans db5cbad673 MDL-38702 theme_mymobile: Replaced missing theme setting to disable CSS Optimiser.
The missing setting was a regression casued by MDL-33357.
2013-03-26 00:50:29 +00:00
Damyon Wiese 33c1b04c2a Merge branch 'MDL-38668_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-03-25 15:51:29 +08:00
Jason Fowler b055a241b8 MDL-35875 - Accessibility - Remove empty summary attribute for user information table in view user's profile 2013-03-25 10:30:31 +08:00
Damyon Wiese eb6f546b1b MDL-37033 Environment - Fix indenting in XML 2013-03-25 09:26:11 +08:00
Damyon Wiese 9fcdee8692 Merge branch 'MDL-37033_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-03-25 09:22:19 +08:00
Eloy Lafuente (stronk7) 864a5cfd2f Merge branch 'MDL-38658-m24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-03-24 23:40:55 +01:00
Eloy Lafuente (stronk7) d2db86448e Merge branch 'MDL-36927-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-03-24 23:39:22 +01:00
Matteo Scaramuccia 417d004cad MDL-38336 SCORM: incorrect TOC bulding when 'Display course structure' is on 2013-03-24 11:06:54 +01:00
Eloy Lafuente (stronk7) 3adedb6f00 MDL-38668 timezones: update to tzdata 2013b 2013-03-24 10:45:49 +01:00
Andrew Robert Nicols 65f302ac4d MDL-38658 JavaScript: Correct fullpath for dndupload definition 2013-03-23 22:07:35 +00:00
Matteo Scaramuccia 9992ee729e MDL-38468 Files API: fixed the support for MTHML (MIME HTML: web page archive) files 2013-03-23 12:26:03 +01:00
Eloy Lafuente (stronk7) d9e93de2eb MDL-37033 environment: add 2.5 brach details 2013-03-22 18:41:23 +01:00
Fred Woolard 7a257bb0f7 MDL-37676 Use course grade category if mapping fails for manual grade items 2013-03-22 08:27:21 -04:00
Tim Hunt 37b6904b8c MDL-38647 quiz review question issues
1. Page URL should contain 'step=0' if necessary, but not 'step='.
2. Review specific step was not using the right display options.
2013-03-22 11:17:48 +00:00
Tim Hunt 519c20adb8 MDL-38557 quiz manual grading should check mod/quiz:grade 2013-03-22 10:19:47 +00:00
Damyon Wiese b9ef2c9607 weekly release 2.4.3+ 2013-03-22 13:52:56 +08:00
Damyon Wiese 4b5c4e2637 Merge branch 'install_24_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_24_STABLE 2013-03-22 13:35:55 +08:00
Rajesh Taneja 6d1e592c2a MDL-36125 course: Added aria-describedby for editing activity title 2013-03-22 12:42:04 +08:00
AMOS bot 526bcd44cd Automatically generated installer lang files 2013-03-21 00:37:30 +00:00
Eloy Lafuente (stronk7) 6ef445a515 Merge branch 'MDL-38035-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-03-20 17:09:22 +01:00
sam marshall 50701d1e89 MDL-38035 Conditional availability: Support multilang custom user fields 2013-03-20 15:58:59 +00:00
David Monllao 3bb4d9b400 MDL-38364 phpunit: PHPUnit autoload uses capital A 2013-03-20 16:06:10 +08:00
Ankit Agarwal 9df92fcacb MDL-36927 Reports: Page layout is not defined in course/recent.php 2013-03-20 14:13:26 +08:00
Damyon Wiese 3ab41b9779 Merge branch 'wip-MDL-38387-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-03-20 13:46:59 +08:00
Frederic Massart 6c402aa73d MDL-38452 repositories: User logged in as have access to non-private repositories 2013-03-20 13:32:43 +08:00
Damyon Wiese 6e2f8aa9f1 MDL-38373 Auth - Additional strict warning fix for radius authentication 2013-03-20 12:37:39 +08:00
Damyon Wiese 81c8a28c72 Merge branch 'MDL-38373_24' of git://github.com/stronk7/moodle into MOODLE_24_STABLE 2013-03-20 12:34:26 +08:00
Sam Hemelryk fb3ff98014 MDL-38055 course: fixed double encoding of title properties
Conflicts:
	lib/navigationlib.php
2013-03-20 17:28:43 +13:00
Sam Hemelryk bf07f4e212 MDL-38387 cache: removed call to plugins API from cache API 2013-03-20 16:07:53 +13:00
Sam Hemelryk 7588627b8b MDL-38350 cache: fixed issue with siteidentifier === false 2013-03-20 16:07:53 +13:00
AMOS bot 9427beaf77 Automatically generated installer lang files 2013-03-20 00:36:55 +00:00
Eloy Lafuente (stronk7) 6407ca6927 Revert "MDL-38515 JavaScript: Correct module dependencies for core_filepicker"
This reverts commit 573571d727.
2013-03-20 00:56:41 +01:00
Eloy Lafuente (stronk7) 8bcca79594 Merge branch 'MDL-38490_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-20 00:43:43 +01:00
Eloy Lafuente (stronk7) e285f93242 Merge branch 'MDL-38370-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-03-20 00:32:02 +01:00
Eloy Lafuente (stronk7) d4aac84fbe Merge branch 'w12_MDL-38364_m24_phpunitloading' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-03-20 00:19:57 +01:00
Eloy Lafuente (stronk7) 7765766512 MDL-38035 api: doc get_condition_user_fields() new param. 2013-03-20 00:06:28 +01:00
Eloy Lafuente (stronk7) 87342f4cfb Merge branch 'MDL-38035-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-03-19 23:57:51 +01:00
Eloy Lafuente (stronk7) e4095955ed Merge branch 'MDL-37664-MOODLE_24_STABLE' of https://github.com/lucisgit/moodle into MOODLE_24_STABLE 2013-03-19 23:37:31 +01:00
Eloy Lafuente (stronk7) 5efd762f7a Merge branch 'MDL-38424_m24' of git://github.com/kordan/moodle into MOODLE_24_STABLE 2013-03-19 23:18:51 +01:00
Eloy Lafuente (stronk7) 581e9db8e0 Merge branch 'MDL-38395_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-19 23:07:24 +01:00
Eloy Lafuente (stronk7) 745a0dc660 Merge branch 'MDL-38460_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-03-19 21:14:55 +01:00
Eloy Lafuente (stronk7) dc122b32b3 Merge branch 'wip-MDL-38422_M24' of git://github.com/gjb2048/moodle into MOODLE_24_STABLE 2013-03-19 21:12:53 +01:00
Eloy Lafuente (stronk7) 82f27d5bbd Merge branch 'MDL-38363_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-19 21:07:08 +01:00
Eloy Lafuente (stronk7) bc353318b2 Merge branch 'MDL-38355_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-19 21:01:10 +01:00
Eloy Lafuente (stronk7) 4b6963eb6d Merge branch 'MDL-38388_24' of git://github.com/jonof/moodle into MOODLE_24_STABLE 2013-03-19 19:03:21 +01:00
Eloy Lafuente (stronk7) 60d7878a3a Merge branch 'MDL-38412_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-19 18:22:53 +01:00
Eloy Lafuente (stronk7) f0f28e3c3b Merge branch 'w12_MDL-38329_m24_webkit' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-03-19 18:17:35 +01:00
Petr Škoda 8cdc6bfc4f MDL-38180 do not add links for enrol and other users candidates 2013-03-19 18:03:13 +01:00
Petr Škoda 15d001fc28 MDL-38202 fix loginas logout redirection 2013-03-19 16:53:57 +01:00
Eloy Lafuente (stronk7) 59faf92e1f Merge branch 'MDL-38542_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-19 16:49:23 +01:00
Eloy Lafuente (stronk7) 332e3c0153 Merge branch 'MDL-38444_24' of https://github.com/ppichet/moodle into MOODLE_24_STABLE 2013-03-19 16:35:30 +01:00
Tim Hunt 708c1b7fc8 MDL-38542 shortanswer qtype: was broken for responses of '0'.
This was a regression caused by MDL-37157 & MDL-37746.
2013-03-19 13:55:41 +00:00
Eloy Lafuente (stronk7) 38b7d50139 Merge branch 'MDL-38515-m24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-03-19 12:58:07 +01:00
Eloy Lafuente (stronk7) f6a52da112 Merge branch 'MDL-38397_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-19 12:28:52 +01:00
Eloy Lafuente (stronk7) d4ce77f624 Merge branch 'wip-mdl-38431-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-03-19 10:24:39 +01:00
Eloy Lafuente (stronk7) 834a0c1a55 Merge branch 'MDL-36872-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-03-19 09:37:24 +01:00
Damyon Wiese f402d3225f Merge branch 'w12_MDL-38320_m24_logininfo' of git://github.com/skodak/moodle into MOODLE_24_STABLE 2013-03-19 15:02:23 +08:00
Damyon Wiese 0cb081f51f Merge branch 'MDL-38456-mdeploy-paths_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-03-19 14:12:23 +08:00
AMOS bot 00e2eb15a6 Automatically generated installer lang files 2013-03-19 00:36:22 +00:00
Damyon Wiese 147400d846 Merge branch 'MDL-38215-workshop-oracle_24' of git://github.com/mudrd8mz/moodle into MOODLE_24_STABLE 2013-03-18 11:45:53 +08:00
Petr Škoda 54aabc8200 MDL-38320 fix role name display when roles switched 2013-03-17 21:16:33 +01:00
Petr Škoda 92ce0a63cb MDL-38329 use proper plugin name for the webkit lists workaround
Credit goes to Mauno Korpelainen, thanks.
2013-03-17 21:03:22 +01:00
Petr Škoda 6bc755274a MDL-38364 rework PHPUnit autoloading
This is related to BC incompatibility introduced in https://github.com/sebastianbergmann/phpunit/issues/848
2013-03-17 19:56:15 +01:00
Andrew Robert Nicols 573571d727 MDL-38515 JavaScript: Correct module dependencies for core_filepicker 2013-03-17 16:51:16 +00:00
ppichet 1e9f48c9bc MDL-38444 Saving datasets from edit_calculatedsimple_form.php
Bypassing the 3 steps savequestion() of calculated.
2013-03-17 00:45:00 -04:00
Eloy Lafuente (stronk7) 0713cc584d MDL-25655 glossary: non full searches now working.
In the process of updting the module from 1.9 to
2.0 the (non) full search feature was lost without notice.

This restitutes it with the same behavior present in 1.9:

- fullsearch disabled: look into concepts and aliases.
- fullsearch enabled (default): look also into definitions.
2013-03-16 18:08:51 +01:00
Eloy Lafuente (stronk7) ee40219d6a MDL-38373 Use correct PEAR->loadExtension()
Current use is wrong (static) and leads to strict standards notice.
2013-03-16 11:43:41 +01:00
Mary Evans 2ff2d96916 MDL-38380 theme_magazine: Fixed typo in style/core.css. 2013-03-16 01:42:16 +00:00
Tim Hunt d1fa204c0f MDL-38412 fix quiz reports group mode weirdness.
Moodle currently selected group uses the session. This can cause weird
effects when you have two tabs open. This is particularly weird in the
quiz reports, where some actions like delete attempt are checked against
the currently selected group.

The solution is to put the currently selected group into the URL for all
actions like delete/regrade attempt, regrade all attempts, download and
sort table.
2013-03-15 12:02:11 +00:00
Tim Hunt 7b62eec877 MDL-38363 qtype_calculated. Fix warnings. 2013-03-15 11:23:33 +00:00
Eloy Lafuente (stronk7) 29f8c0937a Moodle release 2.4.3 2013-03-15 12:03:30 +01:00
Eloy Lafuente (stronk7) 01d6191b81 weekly release 2.4.2+ 2013-03-15 09:50:08 +01:00
Tim Hunt ddd11cbf0b MDL-38395 question categories: wrong URLs after editing.
The problem was that array1 + array2 takes the values from
array1 when a key appears in both places.

While working on this area, I updated it to use html_writer.
2013-03-15 08:15:13 +00:00
Damyon Wiese cd824e74d8 Merge branch 'MDL-38474-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-03-15 13:06:04 +08:00
Frederic Massart abf0c9fc9e MDL-38474 repository: Undefined variable 2013-03-15 13:00:35 +08:00
Damyon Wiese 54c0c9e58e Merge branch 'MDL-38474-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE 2013-03-15 10:50:47 +08:00
Frederic Massart 7c78db604b MDL-38474 repository: Correct context when checking permissions to access a repository 2013-03-15 10:04:50 +08:00
Jonathon Fowler ffbc0d6f2f MDL-38388 qformat_blackboard_six: fix question image import
This works on the expectation that the returned array from readdata()
is opaque and will be fed directly into readquestions() since
filebase is different per file and needs to be set up appropriately
before each parse.
2013-03-15 09:09:54 +10:00
Tim Hunt 16442e5cfd MDL-38355 qtype_multianswer: input boxes too big in Russian.
... and any other language where the characters take multiple
bytes in UTF-8.

This fix was worked out by Dušan Ristić. I am just committing it.
2013-03-14 22:26:40 +00:00
Tim Hunt 3d8c5cb044 MDL-38397 question editing: only validate default mark if present.
Most qtypes have that field, but not all. multianswer is an example in core.
Also some contrib qtypes.
2013-03-14 22:13:44 +00:00
Tim Hunt fe9f42de4d MDL-38490 question preview, variant is attempt (not display) option 2013-03-14 17:22:32 +00:00
Eloy Lafuente (stronk7) a812924762 weekly release 2.4.2+ 2013-03-14 15:48:11 +01:00
Damyon Wiese ea8393591f Merge branch 'wip-MDL-38303-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-03-14 15:32:34 +08:00
Ankit Agarwal 5c18a83649 MDL-36872 reports: Fixing incorrect sorting of recent activites by timestamp 2013-03-14 14:45:24 +08:00
Aparup Banerjee ecbf8aee6e Merge branch 'MDL-38356-m24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-03-14 11:03:54 +08:00
Aparup Banerjee 8513176415 Revert "Merge branch 'MDL-38356-m24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE"
This reverts commit aebfad51a0, reversing
changes made to 484dcc9b90.
2013-03-14 11:02:27 +08:00
Mary Evans b7295e8e5d MDL-38460 theme_mymobile: Fixes resources folders to show properly on first access. 2013-03-14 01:20:18 +00:00
Eloy Lafuente (stronk7) 6b2510f4c7 Revert "Merge branch 'MDL-34818_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE"
This reverts commit 6a34b93223, reversing
changes made to c9b9abc090.
2013-03-14 00:24:07 +01:00
Andrew Robert Nicols 4969eb20ac MDL-38356 JavaScript: Correct check for currentform 2013-03-13 18:22:00 +00:00
Brent Boghosian db23afadac MDL-38356 Forms: Check that the form exists before applying changechecker
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
2013-03-13 18:08:33 +00:00
David Mudrák e8c660394d MDL-38215 Fix cross-db support in workshop SQL queries
The $sql used in these methods may contain multiple parts glued
together by the UNION operator. Simply appending the ORDER BY statement
to the end of the query does not work in all DBs (failure reported at
Oracle). Following the pattern already applied in MDL-30051, we wrap the
SQL into yet another SELECT statement and perform ordering there.

Credit goes to Sara Cenni for suggesting the fix.
2013-03-13 15:04:37 +01:00
David Mudrák a1ba9e89d9 MDL-38456 Allow colons in paths passed to mdeploy.php utility
The input_manager now accepts colons (:) in TYPE_PATH options, but only
in cases where the colon is used as a part of Windows drive labels, as
in C:\apache.
2013-03-13 12:14:19 +01:00
Ankit Agarwal fc427a8cbc MDL-38370 scorm: Fixing strict standard errors in outline report 2013-03-13 16:02:38 +08:00
Eloy Lafuente (stronk7) eeb0efd7d8 Merge branch 'MDL-38268-m24' of https://github.com/jfilip/moodle into MOODLE_24_STABLE 2013-03-13 01:14:38 +01:00
Eloy Lafuente (stronk7) ddaf467f31 Merge branch 'MDL-30166-m24' of git://github.com/ankitagarwal/moodle into MOODLE_24_STABLE 2013-03-13 01:09:31 +01:00
Eloy Lafuente (stronk7) b3a5ae03d0 Merge branch 'wip-mdl-38332-m24' of git://github.com/rajeshtaneja/moodle into MOODLE_24_STABLE 2013-03-12 22:53:16 +01:00
Shamim Rezaie d4677b4059 MDL-37664 course: Fix drag & drop RTL mode issue 2013-03-12 15:47:23 +00:00
sam marshall 0e79c3ee74 MDL-38035 Activity settings: Support multilang names for custom user fields 2013-03-12 15:39:38 +00:00
Kordan f1820fdd6a MDL-38424 theme_formal_white: added suggestions to css custom styles description 2013-03-12 13:49:07 +01:00
Damyon Wiese 2b2d3244cd Merge branch 'MDL-34011_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-03-12 16:04:54 +08:00
Aparup Banerjee 86070a3ed9 Merge branch 'MDL-35615_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-03-12 15:50:39 +08:00
Rossiani Wijaya 7a28bba4d3 MDL-34011 Lesson module - short answer question: fixed student attempt statistics 2013-03-12 15:02:37 +08:00
Damyon Wiese a8a71bbad3 MDL-34011 Lesson module: fixed incorrect display of student attempt for short answer question 2013-03-12 15:02:26 +08:00
Aparup Banerjee aebfad51a0 Merge branch 'MDL-38356-m24' of git://github.com/andrewnicols/moodle into MOODLE_24_STABLE 2013-03-12 13:37:45 +08:00
Aparup Banerjee 484dcc9b90 Merge branch 'MDL-35582_message_labels_24' of git://github.com/andyjdavis/moodle into MOODLE_24_STABLE 2013-03-12 13:27:19 +08:00
Rajesh Taneja 967bfb4334 MDL-38431 comment: Pass formated comment created time to JS and print_comment 2013-03-12 12:38:46 +08:00
Aparup Banerjee 46640b7e53 Merge branch 'MDL-38386-24' of git://github.com/damyon/moodle into MOODLE_24_STABLE
Conflicts:
	version.php - 2012120302.01 in db/upgrade.php too
2013-03-12 11:35:03 +08:00
Damyon Wiese a22f7cb864 Merge branch 'MDL-37771-M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-03-12 11:22:16 +08:00
Ankit Agarwal 13bb9cee30 MDL-30166 Remove deprecated %fullname% from core
Thanks to Matheus Kautzmann for the initial patch.
2013-03-12 11:16:11 +08:00
Eloy Lafuente (stronk7) 2f286d7658 Merge branch 'MDL-34774_m24' of git://github.com/rwijaya/moodle into MOODLE_24_STABLE 2013-03-12 00:55:05 +01:00
Eloy Lafuente (stronk7) 7b8110d4b0 Merge branch 'MDL-38337_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2013-03-12 00:25:13 +01:00
Eloy Lafuente (stronk7) 6a34b93223 Merge branch 'MDL-34818_M24' of git://github.com/lazydaisy/moodle into MOODLE_24_STABLE 2013-03-12 00:22:27 +01:00
Eloy Lafuente (stronk7) c9b9abc090 Merge branch 'wip_24_mdl-38262' of git://github.com/iarenaza/moodle into MOODLE_24_STABLE 2013-03-12 00:05:02 +01:00
Gareth J Barnard bc8e5bce36 MDL-38422 theme_mymobile: TinyMCE editor difficulties. 2013-03-11 18:07:56 +00:00
Rossiani Wijaya 4ee9853a78 MDL-30438 Lesson Module: fixed input text editable capability after checking/unchecking unmask option for all browsers except IE8 or lower 2013-03-11 15:43:35 +08:00
Damyon Wiese ff28c81cb6 Merge branch 'wip-MDL-34713-stable24' of git://github.com/phalacee/moodle into MOODLE_24_STABLE 2013-03-11 13:47:22 +08:00
Rossiani Wijaya b3af55b363 MDL-30438 Lesson Module: improve password field to disabled when password protect is set to no. 2013-03-11 13:18:56 +08:00
Damyon Wiese 494c554bf3 Merge branch 'MDL-33424_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE 2013-03-11 13:18:04 +08:00
Rajesh Taneja 58c8b68c3c MDL-38332 Users: Browse list of users should not contain guest user record 2013-03-11 10:18:03 +08:00
Mary Evans 5d61ac8012 MDL-34818 theme_mymobile: Fixes resources folders to show properly on first access. 2013-03-11 00:18:44 +00:00
Mary Evans 89bcfc4aac MDL-37771 themes: Fixed table header color in Question Bank window block.
modified: theme/anomaly/style/general.css
modified: theme/base/style/question.css
modified: theme/magazine/style/core.css
modified: theme/serenity/style/core.css
modified: theme/splash/style/blue.css
modified: theme/splash/style/green.css
modified: theme/splash/style/orange.css
modified: theme/splash/style/pagelayout.css
modified: theme/splash/style/red.css
2013-03-10 19:04:43 +00:00
Sam Hemelryk 95d3b8e1f2 MDL-38387 cache: fixed inifinite initialisation loop with site id 2013-03-10 11:31:58 +13:00
Sam Hemelryk d55276ee51 MDL-38303 cache: fixed purging of session cache when switching users 2013-03-10 11:31:38 +13:00
Jean-Michel Vedrine c16e466de2 MDL-33424 Images missing when restoring a 1.9 backup 2013-03-09 13:41:03 +01:00
Tim Hunt 0e4511877e MDL-38337 quiz: respect maximum grade config for new quizzes. 2013-03-08 21:33:03 +00:00
Jason Fowler 586fff6894 MDL-34713 - Blog - Fixing undefined index for blog menu block 2013-03-08 14:13:07 +08:00
Lalit Khattar 9dc58f9b26 MDL-34724 Accessibility: At the bottom of Messaging settings page put the label of the checkboxes in <label> 2013-03-08 10:01:45 +08:00
Damyon Wiese 0d9c836ab2 MDL-38386 Courselib: Make sure the upgrade step for MDL-38173 always runs 2013-03-08 09:19:31 +08:00
Brent Boghosian 057f509fad MDL-38356 Forms: Check that the form exists before applying changechecker
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
2013-03-06 21:47:15 +00:00
sam marshall cc59085352 MDL-38315 Completion: Bugs with 'locked' status in activity form 2013-03-05 16:34:38 +00:00
Justin Filip 3000c6bde7 MDL-38268 files: Must be explicit about switching cURL request method from HEAD to GET. 2013-03-05 11:30:16 -05:00
Daniele Cordella 9593527b54 MDL-35615 Course section: fixed alignment for userdefaultname checkbox to be inline with section name text input 2013-03-05 16:05:28 +08:00
Iñaki Arenaza 04c258ee19 MDL-38262 auth/{ldap,cas}: Fix undefined property notification on first config
Just move the test after we've set the default configuration values if
they are not defined.

Signed-off-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2013-03-03 21:19:21 +01:00
Rossiani Wijaya 5fe2acd17b MDL-34774 Lesson module: fixed report stats for 'high score' and 'low score' values where there is only one attempt with 0 score 2013-02-28 16:01:40 +08:00
900 changed files with 21874 additions and 7186 deletions
+91
View File
@@ -0,0 +1,91 @@
<?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 fixed incorrectly deleted users.
*
* @package core
* @subpackage cli
* @copyright 2013 Petr Skoda (http://skodak.org)
* @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');
// Now get cli options.
list($options, $unrecognized) = cli_get_params(array('help'=>false),
array('h'=>'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help =
"Fix incorrectly deleted users.
This scripts detects users that are marked as deleted instead
of calling delete_user().
Deleted users do not have original username, idnumber or email,
we must also delete all roles, enrolments, group memberships, etc.
Please note this script does not delete any public information
such as forum posts.
Options:
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/cli/fix_deleted_users.php
";
echo $help;
die;
}
cli_heading('Looking for sloppy user deletes');
// Look for sloppy deleted users where somebody only flipped the deleted flag.
$sql = "SELECT *
FROM {user}
WHERE deleted = 1 AND email LIKE '%@%' AND username NOT LIKE '%@%'";
$rs = $DB->get_recordset_sql($sql);
foreach ($rs as $user) {
echo "Redeleting user $user->id: $user->username ($user->email)\n";
delete_user($user);
}
cli_heading('Deleting all leftovers');
$DB->set_field('user', 'idnumber', '', array('deleted'=>1));
$DB->delete_records_select('role_assignments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('cohort_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('groups_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_enrolments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_preferences', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_info_data', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_lastaccess', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('external_tokens', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('external_services_users', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
exit(0);
+367 -20
View File
@@ -227,7 +227,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -237,7 +237,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -277,12 +277,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -344,7 +344,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -354,7 +354,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -394,12 +394,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -454,7 +454,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -464,7 +464,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -504,12 +504,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -569,7 +569,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -579,7 +579,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -619,12 +619,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -685,7 +685,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -695,7 +695,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -735,12 +735,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -776,4 +776,351 @@
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
<MOODLE version="2.5" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.1.33" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="10.2" />
<VENDOR name="sqlite" version="2.0" />
</DATABASE>
<PHP version="5.3.3" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="40M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="safe_mode" value="0" level="optional">
<FEEDBACK>
<ON_CHECK message="settingsafemode" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
<MOODLE version="2.6" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.1.33" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.3.3" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="optional">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="64M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="safe_mode" value="0" level="optional">
<FEEDBACK>
<ON_CHECK message="settingsafemode" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
<MOODLE version="2.7" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+7 -5
View File
@@ -16,8 +16,6 @@ require_login();
admin_externalpage_setup('ssoaccesscontrol');
echo $OUTPUT->header();
if (!extension_loaded('openssl')) {
print_error('requiresopenssl', 'mnet');
}
@@ -65,9 +63,11 @@ if (!empty($action) and confirm_sesskey()) {
if (mnet_update_sso_access_control($idrec->username, $idrec->mnet_host_id, $accessctrl)) {
if ($accessctrl == 'allow') {
redirect('access_control.php', get_string('ssl_acl_allow','mnet', array('uset'=>$idrec->username, 'host'=>$mnethosts[$idrec->mnet_host_id])));
} elseif ($accessctrl == 'deny') {
redirect('access_control.php', get_string('ssl_acl_deny','mnet', array('user'=>$idrec->username, 'host'=>$mnethosts[$idrec->mnet_host_id])));
redirect('access_control.php', get_string('ssl_acl_allow','mnet', array('user' => $idrec->username,
'host' => $mnethosts[$idrec->mnet_host_id])));
} else if ($accessctrl == 'deny') {
redirect('access_control.php', get_string('ssl_acl_deny','mnet', array('user' => $idrec->username,
'host' => $mnethosts[$idrec->mnet_host_id])));
}
}
break;
@@ -118,6 +118,8 @@ if ($form = data_submitted() and confirm_sesskey()) {
exit;
}
echo $OUTPUT->header();
// Explain
echo $OUTPUT->box(get_string('ssoacldescr','mnet'));
// Are the needed bits enabled?
+30 -30
View File
@@ -27,37 +27,37 @@ require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
// If we have got here as a confirmed aciton, do it.
if ($confirm && isloggedin() && confirm_sesskey()) {
require_capability('moodle/site:config', context_system::instance());
// Valid request. Purge, and redirect the user back to where they came from.
purge_all_caches();
if ($returnurl) {
$returnurl = $CFG->wwwroot . $returnurl;
} else {
$returnurl = new moodle_url('/admin/purgecaches.php');
}
redirect($returnurl, get_string('purgecachesfinished', 'admin'));
}
// Otherwise, show a button to actually purge the caches.
admin_externalpage_setup('purgecaches');
require_login();
require_capability('moodle/site:config', context_system::instance());
if ($confirm) {
require_sesskey();
// Valid request. Purge, and redisplay the form so it is easy to purge again
// in the near future.
purge_all_caches();
redirect(new moodle_url('/admin/purgecaches.php'), get_string('purgecachesfinished', 'admin'));
} else {
// Show a confirm form.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('purgecaches', 'admin'));
$url = new moodle_url('/admin/purgecaches.php', array('sesskey'=>sesskey(), 'confirm'=>1));
$button = new single_button($url, get_string('purgecaches','admin'), 'post');
// Cancel button takes them back to the page the were on, if possible,
// otherwise to the site home page.
$return = new moodle_url('/');
if (isset($_SERVER['HTTP_REFERER']) and !empty($_SERVER['HTTP_REFERER'])) {
if ($_SERVER['HTTP_REFERER'] !== "$CFG->wwwroot/$CFG->admin/purgecaches.php") {
$return = $_SERVER['HTTP_REFERER'];
}
}
echo $OUTPUT->confirm(get_string('purgecachesconfirm', 'admin'), $button, $return);
echo $OUTPUT->footer();
$actionurl = new moodle_url('/admin/purgecaches.php', array('sesskey'=>sesskey(), 'confirm'=>1));
if ($returnurl) {
$actionurl->param('returnurl', $returnurl);
}
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('purgecaches', 'admin'));
echo $OUTPUT->box_start('generalbox', 'notice');
echo html_writer::tag('p', get_string('purgecachesconfirm', 'admin'));
echo $OUTPUT->single_button($actionurl, get_string('purgecaches', 'admin'), 'post');
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+10 -8
View File
@@ -244,6 +244,8 @@ class site_registration_form extends moodleform {
$questionsnumber = get_config('hub', 'site_questionsnumber_' . $cleanhuburl);
$resourcesnumber = get_config('hub', 'site_resourcesnumber_' . $cleanhuburl);
$mediancoursesize = get_config('hub', 'site_mediancoursesize_' . $cleanhuburl);
$participantnumberaveragecfg = get_config('hub', 'site_participantnumberaverage_' . $cleanhuburl);
$modulenumberaveragecfg = get_config('hub', 'site_modulenumberaverage_' . $cleanhuburl);
//hidden parameters
$mform->addElement('hidden', 'huburl', $huburl);
@@ -376,36 +378,36 @@ class site_registration_form extends moodleform {
if (HUB_MOODLEORGHUBURL != $huburl) {
$mform->addElement('checkbox', 'courses', get_string('sendfollowinginfo', 'hub'),
" " . get_string('coursesnumber', 'hub', $coursecount));
$mform->setDefault('courses', true);
$mform->setDefault('courses', $coursesnumber != -1);
$mform->addHelpButton('courses', 'sendfollowinginfo', 'hub');
$mform->addElement('checkbox', 'users', '',
" " . get_string('usersnumber', 'hub', $usercount));
$mform->setDefault('users', true);
$mform->setDefault('users', $usersnumber != -1);
$mform->addElement('checkbox', 'roleassignments', '',
" " . get_string('roleassignmentsnumber', 'hub', $roleassigncount));
$mform->setDefault('roleassignments', true);
$mform->setDefault('roleassignments', $roleassignmentsnumber != -1);
$mform->addElement('checkbox', 'posts', '',
" " . get_string('postsnumber', 'hub', $postcount));
$mform->setDefault('posts', true);
$mform->setDefault('posts', $postsnumber != -1);
$mform->addElement('checkbox', 'questions', '',
" " . get_string('questionsnumber', 'hub', $questioncount));
$mform->setDefault('questions', true);
$mform->setDefault('questions', $questionsnumber != -1);
$mform->addElement('checkbox', 'resources', '',
" " . get_string('resourcesnumber', 'hub', $resourcecount));
$mform->setDefault('resources', true);
$mform->setDefault('resources', $resourcesnumber != -1);
$mform->addElement('checkbox', 'participantnumberaverage', '',
" " . get_string('participantnumberaverage', 'hub', $participantnumberaverage));
$mform->setDefault('participantnumberaverage', true);
$mform->setDefault('participantnumberaverage', $participantnumberaveragecfg != -1);
$mform->addElement('checkbox', 'modulenumberaverage', '',
" " . get_string('modulenumberaverage', 'hub', $modulenumberaverage));
$mform->setDefault('modulenumberaverage', true);
$mform->setDefault('modulenumberaverage', $modulenumberaveragecfg != -1);
} else {
$mform->addElement('static', 'courseslabel', get_string('sendfollowinginfo', 'hub'),
" " . get_string('coursesnumber', 'hub', $coursecount));
+25 -1
View File
@@ -62,7 +62,18 @@ $siteregistrationform = new site_registration_form('',
$fromform = $siteregistrationform->get_data();
if (!empty($fromform) and confirm_sesskey()) {
//save the settings
// Set to -1 all optional data marked as "don't send" by the admin.
// The function get_site_info() will not calculate the optional data if config is set to -1.
$inputnames = array('courses', 'users', 'roleassignments', 'posts', 'questions', 'resources',
'modulenumberaverage', 'participantnumberaverage');
foreach ($inputnames as $inputname) {
if (empty($fromform->{$inputname})) {
$fromform->{$inputname} = -1;
}
}
// Save the settings.
$cleanhuburl = clean_param($huburl, PARAM_ALPHANUMEXT);
set_config('site_name_' . $cleanhuburl, $fromform->name, 'hub');
set_config('site_description_' . $cleanhuburl, $fromform->description, 'hub');
@@ -113,6 +124,19 @@ if ($update and confirm_sesskey()) {
if (!empty($fromform) and empty($update) and confirm_sesskey()) {
if (!empty($fromform) and confirm_sesskey()) { // if the register button has been clicked
// Retrieve the optional info (specially course number, user number, module number average...).
$siteinfo = $registrationmanager->get_site_info($huburl);
$fromform->courses = $siteinfo['courses'];
$fromform->users = $siteinfo['users'];
$fromform->enrolments = $siteinfo['enrolments'];
$fromform->posts = $siteinfo['posts'];
$fromform->questions = $siteinfo['questions'];
$fromform->resources = $siteinfo['resources'];
$fromform->modulenumberaverage = $siteinfo['modulenumberaverage'];
$fromform->participantnumberaverage = $siteinfo['participantnumberaverage'];
$fromform->street = $siteinfo['street'];
$params = (array) $fromform; //we are using the form input as the redirection parameters (token, url and name)
$unconfirmedhub = $registrationmanager->get_unconfirmedhub($huburl);
+2 -2
View File
@@ -38,7 +38,7 @@ class core_register_renderer extends plugin_renderer_base {
public function moodleorg_registration_message() {
$moodleorgurl = html_writer::link('http://moodle.org', 'Moodle.org');
$moodleorgstatsurl = html_writer::link('http://moodle.org/stats', get_string('statsmoodleorg', 'admin'));
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'MOOCH');
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'Moodle.net');
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $moodleorgurl);
$items = array(get_string('registermoodleorgli1', 'admin'),
get_string('registermoodleorgli2', 'admin', $moodleorgstatsurl),
@@ -92,4 +92,4 @@ class core_register_renderer extends plugin_renderer_base {
return html_writer::table($table);
}
}
}
+3 -1
View File
@@ -918,9 +918,11 @@ class core_admin_renderer extends plugin_renderer_base {
} else {
$str = 'otherplugin';
}
$componenturl = new moodle_url('https://moodle.org/plugins/view.php?plugin='.$component);
$componenturl = html_writer::tag('a', $component, array('href' => $componenturl->out()));
$requires[] = html_writer::tag('li',
get_string($str, 'core_plugin',
array('component' => $component, 'version' => $requiredversion)),
array('component' => $componenturl, 'version' => $requiredversion)),
array('class' => $class));
}
+5 -3
View File
@@ -140,8 +140,10 @@ if (($action == 'edit') || ($action == 'new')) {
$success = $repositorytype->update_options($settings);
} else {
$type = new repository_type($plugin, (array)$fromform, $visible);
$type->create();
$success = true;
if (!$repoid = $type->create()) {
$success = false;
}
$data = data_submitted();
}
if ($success) {
@@ -286,9 +288,9 @@ if (($action == 'edit') || ($action == 'new')) {
// Get list of used plug-ins
$instances = repository::get_types();
// Array to store plugins being used
$alreadyplugins = array();
if (!empty($instances)) {
// Array to store plugins being used
$alreadyplugins = array();
$totalinstances = count($instances);
$updowncount = 1;
foreach ($instances as $i) {
+9 -3
View File
@@ -139,9 +139,15 @@ if ($capability) {
// Put the contexts into a tree structure.
foreach ($contexts as $conid => $con) {
$context = context::instance_by_id($conid);
$parentcontextid = get_parent_contextid($context);
if ($parentcontextid) {
$contexts[$parentcontextid]->children[] = $conid;
try {
$parentcontext = $context->get_parent_context();
if ($parentcontext) { // Will be false if $context is the system context.
$contexts[$parentcontext->id]->children[] = $conid;
}
} catch (dml_missing_record_exception $e) {
// Ignore corrupt context tree structure here. Don't let it break
// showing the rest of the report.
continue;
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ $lng = required_param('lng', PARAM_LANG);
$currentpage = optional_param('p', 0, PARAM_INT);
$translatorsubmitted = optional_param('translatorsubmitted', 0, PARAM_BOOL);
$PAGE->set_pagelayout('standard');
$PAGE->set_pagelayout('report'); // Allows for wide page contents.
$PAGE->set_url('/admin/tool/customlang/edit.php', array('lng' => $lng));
navigation_node::override_active_url(new moodle_url('/admin/tool/customlang/index.php'));
$PAGE->set_title(get_string('pluginname', 'tool_customlang'));
@@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['install'] = 'Install selected language pack';
$string['install'] = 'Install selected language pack(s)';
$string['installedlangs'] = 'Installed language packs';
$string['langimport'] = 'Language import utility';
$string['langimportdisabled'] = 'Language import feature has been disabled. You have to update your language packs manually at the file-system level. Do not forget to purge string caches after you do so.';
@@ -37,7 +37,7 @@ $string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of
$string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
$string['pluginname'] = 'Language packs';
$string['purgestringcaches'] = 'Purge string caches';
$string['remotelangnotavailable'] = 'Because Moodle can not connect to download.moodle.org, we are unable to do language pack installation automatically. Please download the appropriate zip file(s) from http://download.moodle.org, copy them to your {$a} directory and unzip them manually.';
$string['remotelangnotavailable'] = 'Because Moodle cannot connect to download.moodle.org, it is not possible for language packs to be installed automatically. Please download the appropriate ZIP file(s) from <a href="http://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['uninstall'] = 'Uninstall selected language pack';
$string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
$string['updatelangs'] = 'Update all installed language packs';
+7 -5
View File
@@ -47,14 +47,16 @@ list($options, $unrecognized) = cli_get_params(
)
);
if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php')) {
// Composer packages present.
require_once(__DIR__.'/../../../../vendor/autoload.php');
}
require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php');
// Verify PHPUnit libs can be loaded.
if (!include_once('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
} else {
// Verify PHPUnit PEAR libs can be loaded.
if (!include('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
}
}
if ($options['run']) {
@@ -46,7 +46,7 @@ class tool_qeupgradehelper_extract_options_form extends moodleform {
$qtypes = get_plugin_list('qtype');
foreach ($qtypes as $qtype => $notused) {
$qtypes[$qtype] = get_string($qtype, 'qtype_' . $qtype);
$qtypes[$qtype] = get_string('pluginname', 'qtype_' . $qtype);
}
$mform->addElement('header', 'h1', 'Either extract a specific question_session');
+6 -6
View File
@@ -179,12 +179,12 @@ function search_spammers($keywords) {
$conditions7 = '( '.implode(' OR ', $keywordfull7).' )';
$sql = "SELECT * FROM {user} WHERE deleted = 0 AND id <> :userid AND $conditions"; // Exclude oneself
$sql2 = "SELECT u.*, p.summary FROM {user} AS u, {post} AS p WHERE $conditions2 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql3 = "SELECT u.*, p.subject as postsubject FROM {user} AS u, {post} AS p WHERE $conditions3 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql4 = "SELECT u.*, c.content FROM {user} AS u, {comments} AS c WHERE $conditions4 AND u.deleted = 0 AND u.id=c.userid AND u.id <> :userid";
$sql5 = "SELECT u.*, m.fullmessage FROM {user} AS u, {message} AS m WHERE $conditions5 AND u.deleted = 0 AND u.id=m.useridfrom AND u.id <> :userid";
$sql6 = "SELECT u.*, fp.message FROM {user} AS u, {forum_posts} AS fp WHERE $conditions6 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$sql7 = "SELECT u.*, fp.subject FROM {user} AS u, {forum_posts} AS fp WHERE $conditions7 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$sql2 = "SELECT u.*, p.summary FROM {user} u, {post} p WHERE $conditions2 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql3 = "SELECT u.*, p.subject as postsubject FROM {user} u, {post} p WHERE $conditions3 AND u.deleted = 0 AND u.id=p.userid AND u.id <> :userid";
$sql4 = "SELECT u.*, c.content FROM {user} u, {comments} c WHERE $conditions4 AND u.deleted = 0 AND u.id=c.userid AND u.id <> :userid";
$sql5 = "SELECT u.*, m.fullmessage FROM {user} u, {message} m WHERE $conditions5 AND u.deleted = 0 AND u.id=m.useridfrom AND u.id <> :userid";
$sql6 = "SELECT u.*, fp.message FROM {user} u, {forum_posts} fp WHERE $conditions6 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$sql7 = "SELECT u.*, fp.subject FROM {user} u, {forum_posts} fp WHERE $conditions7 AND u.deleted = 0 AND u.id=fp.userid AND u.id <> :userid";
$spamusers_desc = $DB->get_recordset_sql($sql, $params);
$spamusers_blog = $DB->get_recordset_sql($sql2, $params);
+23 -8
View File
@@ -98,12 +98,16 @@ $STD_FIELDS = array('id', 'firstname', 'lastname', 'username', 'email',
$PRF_FIELDS = array();
if ($prof_fields = $DB->get_records('user_info_field')) {
foreach ($prof_fields as $prof_field) {
$PRF_FIELDS[] = 'profile_field_'.$prof_field->shortname;
if ($proffields = $DB->get_records('user_info_field')) {
foreach ($proffields as $key => $proffield) {
$profilefieldname = 'profile_field_'.$proffield->shortname;
$PRF_FIELDS[] = $profilefieldname;
// Re-index $proffields with key as shortname. This will be
// used while checking if profile data is key and needs to be converted (eg. menu profile field)
$proffields[$profilefieldname] = $proffield;
unset($proffields[$key]);
}
}
unset($prof_fields);
if (empty($iid)) {
$mform1 = new admin_uploaduser_form1();
@@ -227,10 +231,10 @@ if ($formdata = $mform2->is_cancelled()) {
$user->$key['text'] = $value;
$user->$key['format'] = FORMAT_MOODLE;
} else {
$user->$key = $value;
$user->$key = trim($value);
}
} else {
$user->$key = $value;
$user->$key = trim($value);
}
if (in_array($key, $upt->columns)) {
@@ -331,6 +335,16 @@ if ($formdata = $mform2->is_cancelled()) {
if (isset($formdata->$field)) {
// process templates
$user->$field = uu_process_template($formdata->$field, $user);
// Form contains key and later code expects value.
// Convert key to value for required profile fields.
require_once($CFG->dirroot.'/user/profile/field/'.$proffields[$field]->datatype.'/field.class.php');
$profilefieldclass = 'profile_field_'.$proffields[$field]->datatype;
$profilefield = new $profilefieldclass($proffields[$field]->id);
if (method_exists($profilefield, 'convert_external_data')) {
$user->$field = $profilefield->edit_save_data_preprocess($user->$field, null);
}
$formdefaults[$field] = true;
}
}
@@ -856,6 +870,7 @@ if ($formdata = $mform2->is_cancelled()) {
if ($rid) {
// find duration
$timeend = 0;
if (!empty($user->{'enrolperiod'.$i})) {
$duration = (int)$user->{'enrolperiod'.$i} * 60*60*24; // convert days to seconds
if ($duration > 0) { // sanity check
@@ -987,7 +1002,7 @@ while ($linenum <= $previewrows and $fields = $cir->next()) {
$rowcols = array();
$rowcols['line'] = $linenum;
foreach($fields as $key => $field) {
$rowcols[$filecolumns[$key]] = s($field);
$rowcols[$filecolumns[$key]] = s(trim($field));
}
$rowcols['status'] = array();
@@ -1013,7 +1028,7 @@ while ($linenum <= $previewrows and $fields = $cir->next()) {
}
if (isset($rowcols['city'])) {
$rowcols['city'] = trim($rowcols['city']);
$rowcols['city'] = $rowcols['city'];
if (empty($rowcols['city'])) {
$rowcols['status'][] = get_string('fieldrequired', 'error', 'city');
}
+2 -2
View File
@@ -321,8 +321,8 @@ function uu_process_template_callback($username, $firstname, $lastname, $block)
* @return array type=>name
*/
function uu_supported_auths() {
// only following plugins are guaranteed to work properly
$whitelist = array('manual', 'nologin', 'none', 'email');
// Only the following plugins are guaranteed to work properly.
$whitelist = array('email', 'ldap', 'manual', 'nologin', 'none');
$plugins = get_enabled_auth_plugins();
$choices = array();
foreach ($plugins as $plugin) {
@@ -53,6 +53,8 @@ class check_foreign_keys extends XMLDBCheckAction {
'noviolatedforeignkeysfound' => 'tool_xmldb',
'violatedforeignkeysfound' => 'tool_xmldb',
'violations' => 'tool_xmldb',
'unknowntable' => 'tool_xmldb',
'unknownfield' => 'tool_xmldb',
));
}
@@ -75,6 +77,19 @@ class check_foreign_keys extends XMLDBCheckAction {
}
$o.=' <li>' . $this->str['key'] . ': ' . $xmldb_key->readableInfo() . ' ';
$reftable = $xmldb_key->getRefTable();
if (!$dbman->table_exists($reftable)) {
$o.='<font color="red">' . $this->str['unknowntable'] . '</font>';
// Add the missing index to the list
$violation = new stdClass();
$violation->string = 'fkunknowntable';
$violation->table = $xmldb_table;
$violation->key = $xmldb_key;
$violation->reftable = $reftable;
$violatedkeys[] = $violation;
continue;
}
// Work out the SQL to find key violations.
$keyfields = $xmldb_key->getFields();
$reffields = $xmldb_key->getRefFields();
@@ -82,6 +97,19 @@ class check_foreign_keys extends XMLDBCheckAction {
$nullnessconditions = array();
$params = array();
foreach ($keyfields as $i => $field) {
if (!$dbman->field_exists($reftable, $reffields[$i])) {
$o.='<font color="red">' . $this->str['unknownfield'] . '</font>';
// Add the missing index to the list
$violation = new stdClass();
$violation->string = 'fkunknownfield';
$violation->table = $xmldb_table;
$violation->key = $xmldb_key;
$violation->reftable = $reftable;
$violation->reffield = $reffields[$i];
$violatedkeys[] = $violation;
continue 2;
}
$joinconditions[] = 't1.' . $field . ' = t2.' . $reffields[$i];
$xmldb_field = $xmldb_table->getField($field);
$default = $xmldb_field->getDefault();
@@ -97,7 +125,7 @@ class check_foreign_keys extends XMLDBCheckAction {
}
$nullnessconditions[] = 't2.id IS NULL';
$sql = 'SELECT count(1) FROM {' . $xmldb_table->getName() .
'} t1 LEFT JOIN {' . $xmldb_key->getRefTable() . '} t2 ON ' .
'} t1 LEFT JOIN {' . $reftable . '} t2 ON ' .
implode(' AND ', $joinconditions) . ' WHERE ' .
implode(' AND ', $nullnessconditions);
@@ -109,6 +137,7 @@ class check_foreign_keys extends XMLDBCheckAction {
$o.='<font color="red">' . $this->str['violations'] . '</font>';
// Add the missing index to the list
$violation = new stdClass;
$violation->string = 'fkviolationdetails';
$violation->table = $xmldb_table;
$violation->key = $xmldb_key;
$violation->numviolations = $violations;
@@ -145,8 +174,11 @@ class check_foreign_keys extends XMLDBCheckAction {
$violation->tablename = $violation->table->getName();
$violation->keyname = $violation->key->getName();
$r.= ' <li>' .get_string('fkviolationdetails', 'tool_xmldb', $violation) .
'<pre>' . s($violation->sql) . '; ' . s($violation->sqlparams) . '</pre></li>';
$r.= ' <li>' .get_string($violation->string, 'tool_xmldb', $violation);
if (!empty($violation->sql)) {
$r.= '<pre>' . s($violation->sql) . '; ' . s($violation->sqlparams) . '</pre>';
}
$r.= '</li>';
}
$r.= ' </ul>';
} else {
@@ -118,7 +118,8 @@ class create_xml_file extends XMLDBAction {
function get_plugin_type($dirpath) {
global $CFG;
$dirpath = $CFG->dirroot.$dirpath;
$plugintypes = get_plugin_types();
// Reverse order so that we get subplugin matches.
$plugintypes = array_reverse(get_plugin_types());
foreach ($plugintypes as $plugintype => $pluginbasedir) {
if (substr($dirpath, 0, strlen($pluginbasedir)) == $pluginbasedir) {
return $plugintype;
+32 -14
View File
@@ -33,24 +33,38 @@ $string['confirmdeleteindex'] = 'Are you absolutely sure that you want to delete
$string['confirmdeletekey'] = 'Are you absolutely sure that you want to delete the key:';
$string['confirmdeletetable'] = 'Are you absolutely sure that you want to delete the table:';
$string['confirmdeletexmlfile'] = 'Are you absolutely sure that you want to delete the file:';
$string['confirmcheckbigints'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of wrong integers.<br /><br />
$string['confirmcheckbigints'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of wrong integers.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckdefaults'] = 'This functionality will search for inconsistent default values in your Moodle server, generating (but not executing!) the needed SQL statements to have all the default values properly defined.<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of inconsistent default values.<br /><br />
$string['confirmcheckdefaults'] = 'This functionality will search for inconsistent default values in your Moodle server, generating (but not executing!) the needed SQL statements to have all the default values properly defined.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of inconsistent default values.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckforeignkeys'] = 'This functionality will search for potential violations of the foreign keys defined in the install.xml definitions. (Moodle does not currently generate actual foreign key constraints in the database, which is why invalid data may be present.)<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of missing indexes.<br /><br />
$string['confirmcheckforeignkeys'] = 'This functionality will search for potential violations of the foreign keys defined in the install.xml definitions. (Moodle does not currently generate actual foreign key constraints in the database, which is why invalid data may be present.)
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of missing indexes.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckindexes'] = 'This functionality will search for potential missing indexes in your Moodle server, generating (but not executing!) automatically the needed SQL statements to keep everything updated.<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of missing indexes.<br /><br />
$string['confirmcheckindexes'] = 'This functionality will search for potential missing indexes in your Moodle server, generating (but not executing!) automatically the needed SQL statements to keep everything updated.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of missing indexes.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (2.2, 2.3, 2.x ...) before executing the search of BYTE semantics.<br /><br />
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of BYTE semantics.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmrevertchanges'] = 'Are you absolutely sure that you want to revert changes performed over:';
$string['create'] = 'Create';
@@ -92,6 +106,8 @@ $string['fieldsusedinindex'] = 'This field is used as index';
$string['fieldsusedinkey'] = 'This field is used as key.';
$string['filemodifiedoutfromeditor'] = 'Warning: File locally modified while using the XMLDB Editor. Saving will overwrite local changes.';
$string['filenotwriteable'] = 'File not writeable';
$string['fkunknownfield'] = 'Foreign key {$a->keyname} on table {$a->tablename} points to a non-existent field {$a->reffield} in referenced table {$a->reftable}.';
$string['fkunknowntable'] = 'Foreign key {$a->keyname} on table {$a->tablename} points to a non-existent table {$a->reftable}.';
$string['fkviolationdetails'] = 'Foreign key {$a->keyname} on table {$a->tablename} is violated by {$a->numviolations} out of {$a->numrows} rows.';
$string['floatincorrectdecimals'] = 'Incorrect number of decimals for float field';
$string['floatincorrectlength'] = 'Incorrect length for float field';
@@ -169,6 +185,8 @@ $string['selecttable'] = 'Select table:';
$string['table'] = 'Table';
$string['tablenameempty'] = 'The table name cannot be empty';
$string['tables'] = 'Tables';
$string['unknownfield'] = 'Refers to an unknown field';
$string['unknowntable'] = 'Refers to an unknown table';
$string['unload'] = 'Unload';
$string['up'] = 'Up';
$string['view'] = 'View';
+13 -2
View File
@@ -196,11 +196,20 @@
}
list($extrasql, $params) = $ufiltering->get_sql_filter();
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, '', '', '',
$extrasql, $params, $context);
$usercount = get_users(false);
$usersearchcount = get_users(false, '', false, null, "", '', '', '', '', '*', $extrasql, $params);
// Exclude guest user from list.
$noguestsql = '';
if (!empty($extrasql)) {
$noguestsql .= ' AND';
}
$noguestsql .= " id <> :guestid";
$params['guestid'] = $CFG->siteguest;
$users = get_users_listing($sort, $dir, $page*$perpage, $perpage, '', '', '',
$extrasql.$noguestsql, $params, $context);
if ($extrasql !== '') {
echo $OUTPUT->heading("$usersearchcount / $usercount ".get_string('users'));
$usercount = $usersearchcount;
@@ -367,7 +376,9 @@
echo $OUTPUT->heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
if (!empty($table)) {
echo html_writer::start_tag('div', array('class'=>'no-overflow'));
echo html_writer::table($table);
echo html_writer::end_tag('div');
echo $OUTPUT->paging_bar($usercount, $page, $perpage, $baseurl);
if (has_capability('moodle/user:create', $sitecontext)) {
echo $OUTPUT->heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
+11 -3
View File
@@ -23,6 +23,7 @@ echo $OUTPUT->header();
//TODO: add support for large number of users
if ($confirm and confirm_sesskey()) {
$notifications = '';
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$rs = $DB->get_recordset_select('user', "id $in", $params, '', 'id, username, secret, confirmed, auth, firstname, lastname');
foreach ($rs as $user) {
@@ -32,12 +33,19 @@ if ($confirm and confirm_sesskey()) {
$auth = get_auth_plugin($user->auth);
$result = $auth->user_confirm($user->username, $user->secret);
if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
echo $OUTPUT->notification(get_string('usernotconfirmed', '', fullname($user, true)));
$notifications .= $OUTPUT->notification(get_string('usernotconfirmed', '', fullname($user, true)));
}
}
$rs->close();
redirect($return, get_string('changessaved'));
echo $OUTPUT->box_start('generalbox', 'notice');
if (!empty($notifications)) {
echo $notifications;
} else {
echo $OUTPUT->notification(get_string('changessaved'), 'notifysuccess');
}
$continue = new single_button(new moodle_url($return), get_string('continue'), 'post');
echo $OUTPUT->render($continue);
echo $OUTPUT->box_end();
} else {
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
+11 -4
View File
@@ -23,20 +23,27 @@ echo $OUTPUT->header();
//TODO: add support for large number of users
if ($confirm and confirm_sesskey()) {
$notifications = '';
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$rs = $DB->get_recordset_select('user', "id $in", $params);
foreach ($rs as $user) {
if (!is_siteadmin($user) and $USER->id != $user->id and delete_user($user)) {
unset($SESSION->bulk_users[$user->id]);
} else {
echo $OUTPUT->notification(get_string('deletednot', '', fullname($user, true)));
$notifications .= $OUTPUT->notification(get_string('deletednot', '', fullname($user, true)));
}
}
$rs->close();
session_gc(); // remove stale sessions
redirect($return, get_string('changessaved'));
echo $OUTPUT->box_start('generalbox', 'notice');
if (!empty($notifications)) {
echo $notifications;
} else {
echo $OUTPUT->notification(get_string('changessaved'), 'notifysuccess');
}
$continue = new single_button(new moodle_url($return), get_string('continue'), 'post');
echo $OUTPUT->render($continue);
echo $OUTPUT->box_end();
} else {
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
+3 -2
View File
@@ -32,8 +32,9 @@
//
// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS
//
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
if (isset($_SERVER['QUERY_STRING'])) {
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
//
+4 -4
View File
@@ -1370,7 +1370,7 @@ class CASClient
/**
* This method is used to validate a ST; halt on failure, and sets $validate_url,
* $text_reponse and $tree_response on success. These parameters are used later
* $text_response and $tree_response on success. These parameters are used later
* by CASClient::validatePGT() for CAS proxies.
* Used for all CAS 1.0 validations
* @param $validate_url the URL of the request to the CAS server.
@@ -1500,7 +1500,7 @@ class CASClient
/**
* This method is used to validate a SAML TICKET; halt on failure, and sets $validate_url,
* $text_reponse and $tree_response on success. These parameters are used later
* $text_response and $tree_response on success. These parameters are used later
* by CASClient::validatePGT() for CAS proxies.
*
* @param $validate_url the URL of the request to the CAS server.
@@ -2160,7 +2160,7 @@ class CASClient
if ($this->_cas_server_cert != '' && $this->_cas_server_ca_cert != '') {
// This branch added by IDMS. Seems phpCAS implementor got a bit confused about the curl options CURLOPT_SSLCERT and CURLOPT_CAINFO
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSLCERT, $this->_cas_server_cert);
curl_setopt($ch, CURLOPT_CAINFO, $this->_cas_server_ca_cert);
curl_setopt($ch, CURLOPT_VERBOSE, '1');
@@ -2172,7 +2172,7 @@ class CASClient
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_CAINFO, $this->_cas_server_ca_cert);
} else {
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
}
+23 -6
View File
@@ -125,7 +125,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
// test pgtIou parameter for proxy mode (https connection
// in background from CAS server to the php server)
if ($authCAS != 'CAS' && !isset($_GET['pgtIou'])) {
$PAGE->set_url('/auth/cas/auth.php');
$PAGE->set_url('/login/index.php');
$PAGE->navbar->add($CASform);
$PAGE->set_title("$site->fullname: $CASform");
$PAGE->set_heading($site->fullname);
@@ -162,7 +162,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
*
*/
function connectCAS() {
global $PHPCAS_CLIENT;
global $CFG, $PHPCAS_CLIENT;
if (!is_object($PHPCAS_CLIENT)) {
// Make sure phpCAS doesn't try to start a new PHP session when connecting to the CAS server.
@@ -173,6 +173,27 @@ class auth_plugin_cas extends auth_plugin_ldap {
}
}
// If Moodle is configured to use a proxy, phpCAS needs some curl options set.
if (!empty($CFG->proxyhost) && !is_proxybypass($this->config->hostname)) {
phpCAS::setExtraCurlOption(CURLOPT_PROXY, $CFG->proxyhost);
if (!empty($CFG->proxyport)) {
phpCAS::setExtraCurlOption(CURLOPT_PROXYPORT, $CFG->proxyport);
}
if (!empty($CFG->proxytype)) {
// Only set CURLOPT_PROXYTYPE if it's something other than the curl-default http
if ($CFG->proxytype == 'SOCKS5') {
phpCAS::setExtraCurlOption(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
}
}
if (!empty($CFG->proxyuser) and !empty($CFG->proxypassword)) {
phpCAS::setExtraCurlOption(CURLOPT_PROXYUSERPWD, $CFG->proxyuser.':'.$CFG->proxypassword);
if (defined('CURLOPT_PROXYAUTH')) {
// any proxy authentication if PHP 5.1
phpCAS::setExtraCurlOption(CURLOPT_PROXYAUTH, CURLAUTH_BASIC | CURLAUTH_NTLM);
}
}
}
if($this->config->certificate_check && $this->config->certificate_path){
phpCAS::setCasServerCACert($this->config->certificate_path);
}else{
@@ -206,10 +227,6 @@ class auth_plugin_cas extends auth_plugin_ldap {
}
}
if (!ldap_paged_results_supported($this->config->ldap_version)) {
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
}
include($CFG->dirroot.'/auth/cas/config.html');
}
+7 -2
View File
@@ -92,6 +92,12 @@ if (!isset($config->removeuser)) {
$yesno = array( get_string('no'), get_string('yes') );
$disabled = '';
if (!ldap_paged_results_supported($config->ldap_version)) {
$disabled = ' disabled="disabled"';
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
}
?>
<table cellspacing="0" cellpadding="5" border="0">
<tr>
@@ -266,7 +272,6 @@ $yesno = array( get_string('no'), get_string('yes') );
<label for="pagesize"><?php print_string('pagesize_key', 'auth_ldap') ?></label>
</td>
<td>
<?php $disabled = (!ldap_paged_results_supported($config->ldap_version)) ? ' disabled="disabled"' : '' ; ?>
<input id="pagesize" name="pagesize" type="text" value="<?php echo $config->pagesize ?>" <?php echo $disabled ?>/>
<?php
if (isset($err['pagesize'])) { echo $OUTPUT->error_text($err['pagesize']); }
@@ -302,7 +307,7 @@ $yesno = array( get_string('no'), get_string('yes') );
<label for="bind_pw"><?php print_string('auth_ldap_bind_pw_key', 'auth_ldap') ?></label>
</td>
<td>
<input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" />
<input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" autocomplete="off"/>
<?php if (isset($err['bind_pw'])) { echo $OUTPUT->error_text($err['bind_pw']); } ?>
</td>
<td>
+1 -1
View File
@@ -124,7 +124,7 @@
<tr valign="top" class="required">
<td align="right"><label for="pass"><?php print_string("auth_dbpass_key", "auth_db") ?></label></td>
<td>
<input id="pass" name="pass" type="text" size="30" value="<?php echo $config->pass?>" />
<input id="pass" name="pass" type="password" size="30" value="<?php p($config->pass)?>" autocomplete="off"/>
<?php
if (isset($err["pass"])) {
+2 -2
View File
@@ -36,13 +36,13 @@ $string['auth_dbfieldpass'] = 'Name of the field containing passwords';
$string['auth_dbfieldpass_key'] = 'Password field';
$string['auth_dbfielduser'] = 'Name of the field containing usernames';
$string['auth_dbfielduser_key'] = 'Username field';
$string['auth_dbhost'] = 'The computer hosting the database server.';
$string['auth_dbhost'] = 'The computer hosting the database server. Use a system DSN entry if using ODBC.';
$string['auth_dbhost_key'] = 'Host';
$string['auth_dbchangepasswordurl_key'] = 'Password-change URL';
$string['auth_dbinsertuser'] = 'Inserted user {$a->name} id {$a->id}';
$string['auth_dbinsertuserduplicate'] = 'Error inserting user {$a->username} - user with this username was already created through \'{$a->auth}\' plugin.';
$string['auth_dbinsertusererror'] = 'Error inserting user {$a}';
$string['auth_dbname'] = 'Name of the database itself';
$string['auth_dbname'] = 'Name of the database itself. Leave empty if using an ODBC DSN.';
$string['auth_dbname_key'] = 'DB name';
$string['auth_dbpass'] = 'Password matching the above username';
$string['auth_dbpass_key'] = 'Password';
+1 -1
View File
@@ -61,7 +61,7 @@
<tr valign="top" class="required">
<td align="right"><label for="passwd"><?php print_string("auth_fcpasswd_key", "auth_fc") ?>:</label></td>
<td>
<input name="passwd" id="passwd" type="password" size="30" maxlength="12" value="<?php echo $config->passwd?>" />
<input name="passwd" id="passwd" type="password" size="30" maxlength="12" value="<?php echo $config->passwd?>" autocomplete="off"/>
<?php if (isset($err["passwd"])) echo $OUTPUT->error_text($err["passwd"]); ?>
</td>
<td>
+12 -4
View File
@@ -564,6 +564,8 @@ class auth_plugin_ldap extends auth_plugin_base {
if ($user->firstaccess == 0) {
$DB->set_field('user', 'firstaccess', time(), array('id'=>$user->id));
}
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
return AUTH_CONFIRM_OK;
}
} else {
@@ -736,6 +738,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$updateuser->auth = 'nologin';
$DB->update_record('user', $updateuser);
echo "\t"; print_string('auth_dbsuspenduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
}
}
} else {
@@ -761,6 +765,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$updateuser->auth = $this->authtype;
$DB->update_record('user', $updateuser);
echo "\t"; print_string('auth_dbreviveduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
}
} else {
print_string('nouserentriestorevive', 'auth_ldap');
@@ -874,6 +880,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$id = $DB->insert_record('user', $user);
echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $id));
events_trigger('user_created', $euser);
if (!empty($this->config->forcechangepassword)) {
set_user_preference('auth_forcepasswordchange', 1, $id);
}
@@ -944,6 +952,10 @@ class auth_plugin_ldap extends auth_plugin_base {
}
}
}
if (!empty($updatekeys)) {
$euser = $DB->get_record('user', array('id' => $userid));
events_trigger('user_updated', $euser);
}
} else {
return false;
}
@@ -1711,10 +1723,6 @@ class auth_plugin_ldap extends auth_plugin_base {
return;
}
if (!ldap_paged_results_supported($this->config->ldap_version)) {
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
}
include($CFG->dirroot.'/auth/ldap/config.html');
}
+7 -2
View File
@@ -103,6 +103,12 @@ if (!isset($config->ntlmsso_remoteuserformat)) {
$yesno = array(get_string('no'), get_string('yes'));
$disabled = '';
if (!ldap_paged_results_supported($config->ldap_version)) {
$disabled = ' disabled="disabled"';
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
}
?>
<table cellspacing="0" cellpadding="5" border="0">
<tr>
@@ -156,7 +162,6 @@ $yesno = array(get_string('no'), get_string('yes'));
<label for="pagesize"><?php print_string('pagesize_key', 'auth_ldap') ?></label>
</td>
<td>
<?php $disabled = (!ldap_paged_results_supported($config->ldap_version)) ? ' disabled="disabled"' : '' ; ?>
<input id="pagesize" name="pagesize" type="text" value="<?php echo $config->pagesize ?>" <?php echo $disabled ?>/>
<?php
if (isset($err['pagesize'])) { echo $OUTPUT->error_text($err['pagesize']); }
@@ -204,7 +209,7 @@ $yesno = array(get_string('no'), get_string('yes'));
<label for="bind_pw"><?php print_string('auth_ldap_bind_pw_key', 'auth_ldap') ?></label>
</td>
<td>
<input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" />
<input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" autocomplete="off"/>
<?php if (isset($err['bind_pw'])) { echo $OUTPUT->error_text($err['bind_pw']); } ?>
</td>
<td>
-1
View File
@@ -941,7 +941,6 @@ class auth_plugin_mnet extends auth_plugin_base {
// run the keepalive client
$this->keepalive_client();
// admin/cron.php should have run srand for us
$random100 = rand(0,100);
if ($random100 < 10) { // Approximately 10% of the time.
// nuke olden sessions
+1 -1
View File
@@ -105,7 +105,7 @@ class auth_plugin_radius extends auth_plugin_base {
}
$result = $rauth->send();
if (PEAR::isError($result)) {
if ($rauth->isError($result)) {
printf("Radius send failed: %s<br/>\n", $result->getMessage());
exit;
} else if ($result === true) {
-1
View File
@@ -1,7 +1,6 @@
This files describes API changes in /auth/* - plugins,
information provided here is intended especially for developers.
=== 2.4 ===
required changes in code:
-1
View File
@@ -309,7 +309,6 @@ class entities {
$source = str_split($source, 1);
for ($i = 1; $i <= $length; $i++) {
mt_srand((double) microtime() * 1000000);
$num = mt_rand(1, count($source));
$response .= $source[$num - 1];
}
@@ -335,6 +335,9 @@ class restore_controller extends backup implements loggable {
if ($this->status != backup::STATUS_NEED_PRECHECK) {
throw new restore_controller_exception('cannot_precheck_wrong_status', $this->status);
}
// Basic/initial prevention against time/memory limits
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
raise_memory_limit(MEMORY_EXTRA);
$this->precheck = restore_prechecks_helper::execute_prechecks($this, $droptemptablesafter);
if (!array_key_exists('errors', $this->precheck)) { // No errors, can be executed
$this->set_status(backup::STATUS_AWAITING);
+1 -1
View File
@@ -139,7 +139,7 @@ class imscc11_backup_convert extends backup_execution_step {
require_once($CFG->dirroot . '/backup/cc/cc_includes.php');
$tempdir = $CFG->dataroot . '/temp/backup/' . uniqid('', true);
$tempdir = $CFG->tempdir . '/backup/' . uniqid('', true);
if (mkdir($tempdir, 0777, true)) {
+60 -1
View File
@@ -1040,6 +1040,24 @@ class moodle1_question_bank_handler extends moodle1_xml_handler {
/** @var array holds the instances of qtype specific conversion handlers */
private $qtypehandlers = null;
/**
* Return the file manager instance used.
*
* @return moodle1_file_manager
*/
public function get_file_manager() {
return $this->fileman;
}
/**
* Returns the information about the question category context being currently parsed
*
* @return array with keys contextid, contextlevel and contextinstanceid
*/
public function get_current_category_context() {
return $this->currentcategory;
}
/**
* Registers path that are not qtype-specific
*/
@@ -1191,6 +1209,17 @@ class moodle1_question_bank_handler extends moodle1_xml_handler {
$data['generalfeedbackformat'] = FORMAT_HTML;
}
// Migrate files in questiontext.
$this->fileman->contextid = $this->currentcategory['contextid'];
$this->fileman->component = 'question';
$this->fileman->filearea = 'questiontext';
$this->fileman->itemid = $data['id'];
$data['questiontext'] = moodle1_converter::migrate_referenced_files($data['questiontext'], $this->fileman);
// Migrate files in generalfeedback.
$this->fileman->filearea = 'generalfeedback';
$data['generalfeedback'] = moodle1_converter::migrate_referenced_files($data['generalfeedback'], $this->fileman);
// replay the upgrade step 2010080901 - updating question image
if (!empty($data['image'])) {
if (textlib::substr(textlib::strtolower($data['image']), 0, 7) == 'http://') {
@@ -1736,12 +1765,41 @@ abstract class moodle1_qtype_handler extends moodle1_plugin_handler {
foreach ($answers as $elementname => $elements) {
foreach ($elements as $element) {
$answer = $this->convert_answer($element, $qtype);
// Migrate images in answertext.
if ($answer['answerformat'] == FORMAT_HTML) {
$answer['answertext'] = $this->migrate_files($answer['answertext'], 'question', 'answer', $answer['id']);
}
// Migrate images in feedback.
if ($answer['feedbackformat'] == FORMAT_HTML) {
$answer['feedback'] = $this->migrate_files($answer['feedback'], 'question', 'answerfeedback', $answer['id']);
}
$this->write_xml('answer', $answer, array('/answer/id'));
}
}
$this->xmlwriter->end_tag('answers');
}
/**
* Migrate files belonging to one qtype plugin text field.
*
* @param array $text the html fragment containing references to files
* @param string $component the component for restored files
* @param string $filearea the file area for restored files
* @param int $itemid the itemid for restored files
*
* @return string the text for this field, after files references have been processed
*/
protected function migrate_files($text, $component, $filearea, $itemid) {
$context = $this->qbankhandler->get_current_category_context();
$fileman = $this->qbankhandler->get_file_manager();
$fileman->contextid = $context['contextid'];
$fileman->component = $component;
$fileman->filearea = $filearea;
$fileman->itemid = $itemid;
$text = moodle1_converter::migrate_referenced_files($text, $fileman);
return $text;
}
/**
* Writes the grouped numerical_units structure
*
@@ -1900,7 +1958,8 @@ abstract class moodle1_qtype_handler extends moodle1_plugin_handler {
if ($qtype !== 'multichoice') {
$new['answerformat'] = FORMAT_PLAIN;
} else {
$new['answerformat'] = FORMAT_MOODLE;
$new['answertext'] = text_to_html($new['answertext'], false, false, true);
$new['answerformat'] = FORMAT_HTML;
}
if ($CFG->texteditors !== 'textarea') {
+7 -3
View File
@@ -1210,12 +1210,16 @@ class moodle1_file_manager implements loggable {
*/
public function migrate_file($sourcepath, $filepath = '/', $filename = null, $sortorder = 0, $timecreated = null, $timemodified = null) {
$sourcefullpath = $this->basepath.'/'.$sourcepath;
// Normalise Windows paths a bit.
$sourcepath = str_replace('\\', '/', $sourcepath);
if ($sourcefullpath !== clean_param($sourcefullpath, PARAM_PATH)) {
throw new moodle1_convert_exception('file_invalid_path', $sourcefullpath);
// PARAM_PATH must not be used on full OS path!
if ($sourcepath !== clean_param($sourcepath, PARAM_PATH)) {
throw new moodle1_convert_exception('file_invalid_path', $sourcepath);
}
$sourcefullpath = $this->basepath.'/'.$sourcepath;
if (!is_readable($sourcefullpath)) {
throw new moodle1_convert_exception('file_not_readable', $sourcefullpath);
}
+29 -14
View File
@@ -113,31 +113,46 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
// Mark the UI finished.
$rc->finish_ui();
// Execute prechecks
$warnings = false;
if (!$rc->execute_precheck()) {
$precheckresults = $rc->get_precheck_results();
if (is_array($precheckresults) && !empty($precheckresults['errors'])) {
fulldelete($tempdestination);
if (is_array($precheckresults)) {
if (!empty($precheckresults['errors'])) { // If errors are found, terminate the import.
fulldelete($tempdestination);
echo $OUTPUT->header();
echo $renderer->precheck_notices($precheckresults);
echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id'=>$course->id)));
echo $OUTPUT->footer();
die();
echo $OUTPUT->header();
echo $renderer->precheck_notices($precheckresults);
echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id'=>$course->id)));
echo $OUTPUT->footer();
die();
}
if (!empty($precheckresults['warnings'])) { // If warnings are found, go ahead but display warnings later.
$warnings = $precheckresults['warnings'];
}
}
} else {
if ($restoretarget == backup::TARGET_CURRENT_DELETING || $restoretarget == backup::TARGET_EXISTING_DELETING) {
restore_dbops::delete_course_content($course->id);
}
// Execute the restore
$rc->execute_plan();
}
if ($restoretarget == backup::TARGET_CURRENT_DELETING || $restoretarget == backup::TARGET_EXISTING_DELETING) {
restore_dbops::delete_course_content($course->id);
}
// Execute the restore.
$rc->execute_plan();
// Delete the temp directory now
fulldelete($tempdestination);
// Display a notification and a continue button
echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('importsuccess', 'backup'),'notifysuccess');
if ($warnings) {
echo $OUTPUT->box_start();
echo $OUTPUT->notification(get_string('warning'), 'notifywarning');
echo html_writer::start_tag('ul', array('class'=>'list'));
foreach ($warnings as $warning) {
echo html_writer::tag('li', $warning);
}
echo html_writer::end_tag('ul');
echo $OUTPUT->box_end();
}
echo $OUTPUT->notification(get_string('importsuccess', 'backup'), 'notifysuccess');
echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id'=>$course->id)));
echo $OUTPUT->footer();
+23 -6
View File
@@ -129,20 +129,37 @@ class backup_course_task extends backup_task {
/**
* Code the transformations to perform in the course in
* order to get transportable (encoded) links
* @param string $content content in which to encode links.
* @return string content with links encoded.
*/
static public function encode_content_links($content) {
global $CFG;
$base = preg_quote($CFG->wwwroot, '/');
// Link to the course main page (it also covers "&topic=xx" and "&week=xx"
// because they don't become transformed (section number) in backup/restore
$search = '/(' . $base . '\/course\/view.php\?id\=)([0-9]+)/';
$content= preg_replace($search, '$@COURSEVIEWBYID*$2@$', $content);
// because they don't become transformed (section number) in backup/restore.
$content = self::encode_links_helper($content, 'COURSEVIEWBYID', '/course/view.php?id=');
// A few other key course links.
$content = self::encode_links_helper($content, 'GRADEINDEXBYID', '/grade/index.php?id=');
$content = self::encode_links_helper($content, 'GRADEREPORTINDEXBYID', '/grade/report/index.php?id=');
$content = self::encode_links_helper($content, 'USERINDEXVIEWBYID', '/user/index.php?id=');
return $content;
}
/**
* Helper method, used by encode_content_links.
* @param string $content content in which to encode links.
* @param unknown_type $name the name of this type of encoded link.
* @param unknown_type $path the path that identifies this type of link, up
* to the ?paramname= bit.
* @return string content with one type of link encoded.
*/
static private function encode_links_helper($content, $name, $path) {
global $CFG;
$base = preg_quote($CFG->wwwroot . $path, '/');
return preg_replace('/(' . $base . ')([0-9]+)/', '$@' . $name . '*$2@$', $content);
}
// Protected API starts here
/**
+28 -1
View File
@@ -37,6 +37,7 @@ class create_and_clean_temp_stuff extends backup_execution_step {
backup_helper::check_and_create_backup_dir($this->get_backupid());// Create backup temp dir
backup_helper::clear_backup_dir($this->get_backupid()); // Empty temp dir, just in case
backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60)); // Delete > 4 hours temp dirs
backup_controller_dbops::drop_backup_ids_temp_table($this->get_backupid()); // Drop ids temp table
backup_controller_dbops::create_backup_ids_temp_table($this->get_backupid()); // Create ids temp table
}
}
@@ -1626,7 +1627,20 @@ class backup_zip_contents extends backup_execution_step {
$zippacker = get_file_packer('application/zip');
// Zip files
$zippacker->archive_to_pathname($files, $zipfile);
$result = $zippacker->archive_to_pathname($files, $zipfile, true, $this);
// Something went wrong.
if ($result === false) {
@unlink($zipfile);
throw new backup_step_exception('error_zip_packing', '', 'An error was encountered while trying to generate backup zip');
}
// Read to make sure it is a valid backup. Refer MDL-37877 . Delete it, if found not to be valid.
try {
backup_general_helper::get_backup_information_from_mbz($zipfile);
} catch (backup_helper_exception $e) {
@unlink($zipfile);
throw new backup_step_exception('error_zip_packing', '', $e->debuginfo);
}
}
}
@@ -1820,6 +1834,10 @@ class backup_questions_structure_step extends backup_structure_step {
$qhint = new backup_nested_element('question_hint', array('id'), array(
'hint', 'hintformat', 'shownumcorrect', 'clearwrong', 'options'));
$tags = new backup_nested_element('tags');
$tag = new backup_nested_element('tag', array('id'), array('name', 'rawname'));
// Build the tree
$qcategories->add_child($qcategory);
@@ -1828,6 +1846,9 @@ class backup_questions_structure_step extends backup_structure_step {
$question->add_child($qhints);
$qhints->add_child($qhint);
$question->add_child($tags);
$tags->add_child($tag);
// Define the sources
$qcategory->set_source_sql("
@@ -1847,6 +1868,12 @@ class backup_questions_structure_step extends backup_structure_step {
ORDER BY id',
array('questionid' => backup::VAR_PARENTID));
$tag->set_source_sql("SELECT t.id, t.name, t.rawname
FROM {tag} t
JOIN {tag_instance} ti ON ti.tagid = t.id
WHERE ti.itemid = ?
AND ti.itemtype = 'question'", array(backup::VAR_PARENTID));
// don't need to annotate ids nor files
// (already done by {@link backup_annotate_all_question_files}
@@ -35,7 +35,7 @@ global $LINKS_ENCODERS_CACHE;
$LINKS_ENCODERS_CACHE = array();
/**
* Class implementing the @xml_contenttrasnformed logic to be applied in moodle2 backups
* Class implementing the @xml_contenttransformed logic to be applied in moodle2 backups
*
* TODO: Finish phpdocs
*/
@@ -61,13 +61,13 @@ class backup_xml_transformer extends xml_contenttransformer {
// Array or object, debug and try our best recursively, shouldn't happen but...
if (is_array($content)) {
debugging('Backup XML transformer should process arrays but plain content always', DEBUG_DEVELOPER);
debugging('Backup XML transformer should not process arrays but plain content only', DEBUG_DEVELOPER);
foreach($content as $key => $plaincontent) {
$content[$key] = $this->process($plaincontent);
}
return $content;
} else if (is_object($content)) {
debugging('Backup XML transformer should not process objects but plain content always', DEBUG_DEVELOPER);
debugging('Backup XML transformer should not process objects but plain content only', DEBUG_DEVELOPER);
foreach((array)$content as $key => $plaincontent) {
$content[$key] = $this->process($plaincontent);
}
+24 -4
View File
@@ -71,8 +71,22 @@ class restore_course_task extends restore_task {
$this->add_step(new restore_course_structure_step('course_info', 'course.xml'));
}
// Restore course enrolments (plugins and membership). Conditionally prevented for any IMPORT/HUB operation
if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
$this->add_step(new restore_course_legacy_files_step('legacy_files'));
// Deal with enrolment methods and user enrolments.
if ($this->plan->get_mode() == backup::MODE_IMPORT) {
// No need to do anything with enrolments.
} else if (!$this->get_setting_value('users') or $this->plan->get_mode() == backup::MODE_HUB) {
if ($this->get_target() == backup::TARGET_CURRENT_ADDING or $this->get_target() == backup::TARGET_EXISTING_ADDING) {
// Keep current enrolments unchanged.
} else {
// If no instances yet add default enrol methods the same way as when creating new course in UI.
$this->add_step(new restore_default_enrolments_step('default_enrolments'));
}
} else {
// Restore course enrolment data.
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
}
@@ -121,10 +135,16 @@ class restore_course_task extends restore_task {
static public function define_decode_rules() {
$rules = array();
$rules[] = new restore_decode_rule('COURSEVIEWBYID', '/course/view.php?id=$1', 'course');
// Link to the course main page (it also covers "&topic=xx" and "&week=xx"
// because they don't become transformed (section number) in backup/restore.
$rules[] = new restore_decode_rule('COURSEVIEWBYID', '/course/view.php?id=$1', 'course');
// A few other key course links.
$rules[] = new restore_decode_rule('GRADEINDEXBYID', '/grade/index.php?id=$1', 'course');
$rules[] = new restore_decode_rule('GRADEREPORTINDEXBYID', '/grade/report/index.php?id=$1', 'course');
$rules[] = new restore_decode_rule('USERINDEXVIEWBYID', '/user/index.php?id=$1', 'course');
return $rules;
}
// Protected API starts here
@@ -143,6 +143,9 @@ class restore_final_task extends restore_task {
$rules[] = new restore_log_rule('course', 'report stats', 'report/stats/index.php?id={course}', '{course}');
$rules[] = new restore_log_rule('course', 'view section', 'view.php?id={course}&sectionid={course_section}', '{course_section}');
// module 'grade' rules
$rules[] = new restore_log_rule('grade', 'update', 'report/grader/index.php?id={course}', null);
// module 'user' rules
$rules[] = new restore_log_rule('user', 'view', 'view.php?id={user}&course={course}', '{user}');
$rules[] = new restore_log_rule('user', 'change password', 'view.php?id={user}&course={course}', '{user}');
+24 -18
View File
@@ -35,6 +35,18 @@ defined('MOODLE_INTERNAL') || die();
*/
abstract class restore_qtype_plugin extends restore_plugin {
/*
* A simple answer to id cache for a single questions answers.
* @var array
*/
private $questionanswercache = array();
/*
* The id of the current question in the questionanswercache.
* @var int
*/
private $questionanswercacheid = null;
/**
* Add to $paths the restore_path_elements needed
* to handle question_answers for a given question
@@ -147,38 +159,32 @@ abstract class restore_qtype_plugin extends restore_plugin {
// The question existed, we need to map the existing question_answers
} else {
// Look in question_answers by answertext matching
$sql = 'SELECT id
FROM {question_answers}
WHERE question = ?
AND ' . $DB->sql_compare_text('answer', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$params = array($newquestionid, $data->answertext);
$newitemid = $DB->get_field_sql($sql, $params);
// Not able to find the answer, let's try cleaning the answertext
// of all the question answers in DB as slower fallback. MDL-30018.
if (!$newitemid) {
// Have we cached the current question?
if ($this->questionanswercacheid !== $newquestionid) {
// The question changed, purge and start again!
$this->questionanswercache = array();
$params = array('question' => $newquestionid);
$answers = $DB->get_records('question_answers', $params, '', 'id, answer');
$this->questionanswercacheid = $newquestionid;
// Cache all cleaned answers for a simple text match.
foreach ($answers as $answer) {
// Clean in the same way than {@link xml_writer::xml_safe_utf8()}.
// MDL-30018: Clean in the same way as {@link xml_writer::xml_safe_utf8()}.
$clean = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is','', $answer->answer); // Clean CTRL chars.
$clean = preg_replace("/\r\n|\r/", "\n", $clean); // Normalize line ending.
if ($clean === $data->answertext) {
$newitemid = $data->id;
}
$this->questionanswercache[$clean] = $answer->id;
}
}
// If we haven't found the newitemid, something has gone really wrong, question in DB
// is missing answers, exception
if (!$newitemid) {
if (!isset($this->questionanswercache[$data->answertext])) {
// If we haven't found the matching answer, something has gone really wrong, the question in the DB
// is missing answers, throw an exception.
$info = new stdClass();
$info->filequestionid = $oldquestionid;
$info->dbquestionid = $newquestionid;
$info->answer = $data->answertext;
throw new restore_step_exception('error_question_answers_missing_in_db', $info);
}
$newitemid = $this->questionanswercache[$data->answertext];
}
// Create mapping (we'll use this intensively when restoring question_states. And also answerfeedback files)
$this->set_mapping('question_answer', $oldid, $newitemid);
@@ -115,6 +115,7 @@ class restore_root_task extends restore_task {
$rootenrolmanual = new restore_users_setting('enrol_migratetomanual', base_setting::IS_BOOLEAN, false);
$rootenrolmanual->set_ui(new backup_setting_ui_checkbox($rootenrolmanual, get_string('rootenrolmanual', 'backup')));
$rootenrolmanual->get_ui()->set_changeable(enrol_is_enabled('manual'));
$rootenrolmanual->get_ui()->set_changeable($changeable);
$this->add_setting($rootenrolmanual);
$users->add_dependency($rootenrolmanual);
@@ -161,6 +161,9 @@ class restore_section_task extends restore_task {
$section_included = new restore_section_included_setting($settingname, base_setting::IS_BOOLEAN, true);
if (is_number($this->info->title)) {
$label = get_string('includesection', 'backup', $this->info->title);
} elseif (empty($this->info->title)) { // Don't throw error if title is empty, gracefully continue restore.
$this->log('Section title missing in backup for section id '.$this->info->sectionid, backup::LOG_WARNING, $this->name);
$label = get_string('unnamedsection', 'backup');
} else {
$label = $this->info->title;
}
+84 -4
View File
@@ -150,6 +150,11 @@ class restore_gradebook_structure_step extends restore_structure_step {
if ($data->itemtype=='manual') {
// manual grade items store category id in categoryid
$data->categoryid = $this->get_mappingid('grade_category', $data->categoryid, NULL);
// if mapping failed put in course's grade category
if (NULL == $data->categoryid) {
$coursecat = grade_category::fetch_course_category($this->get_courseid());
$data->categoryid = $coursecat->id;
}
} else if ($data->itemtype=='course') {
// course grade item stores their category id in iteminstance
$coursecat = grade_category::fetch_course_category($this->get_courseid());
@@ -1274,7 +1279,7 @@ class restore_section_structure_step extends restore_structure_step {
// Otherwise, when you restore to an existing course, it will mess up
// existing section availability entries.
if (!$this->get_mappingid('course_sections_availability', $data->id, false)) {
return;
continue;
}
// Update source cmid / grade id to new value.
@@ -1287,7 +1292,12 @@ class restore_section_structure_step extends restore_structure_step {
$data->gradeitemid = null;
}
$DB->update_record('course_sections_availability', $data);
// Delete the record if the condition wasn't found, otherwise update it.
if ($data->sourcecmid === null && $data->gradeitemid === null) {
$DB->delete_records('course_sections_availability', array('id' => $data->id));
} else {
$DB->update_record('course_sections_availability', $data);
}
}
}
}
@@ -1453,7 +1463,6 @@ class restore_course_structure_step extends restore_structure_step {
// Add course related files, without itemid to match
$this->add_related_files('course', 'summary', null);
$this->add_related_files('course', 'legacy', null);
// Deal with legacy allowed modules.
if ($this->legacyrestrictmodules) {
@@ -1480,6 +1489,29 @@ class restore_course_structure_step extends restore_structure_step {
}
}
/**
* Execution step that will migrate legacy files if present.
*/
class restore_course_legacy_files_step extends restore_execution_step {
public function define_execution() {
global $DB;
// Do a check for legacy files and skip if there are none.
$sql = 'SELECT count(*)
FROM {backup_files_temp}
WHERE backupid = ?
AND contextid = ?
AND component = ?
AND filearea = ?';
$params = array($this->get_restoreid(), $this->task->get_old_contextid(), 'course', 'legacy');
if ($DB->count_records_sql($sql, $params)) {
$DB->set_field('course', 'legacyfiles', 2, array('id' => $this->get_courseid()));
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'course',
'legacy', $this->task->get_old_contextid(), $this->task->get_userid());
}
}
}
/*
* Structure step that will read the roles.xml file (at course/activity/block levels)
@@ -1584,6 +1616,29 @@ class restore_ras_and_caps_structure_step extends restore_structure_step {
}
}
/**
* If no instances yet add default enrol methods the same way as when creating new course in UI.
*/
class restore_default_enrolments_step extends restore_execution_step {
public function define_execution() {
global $DB;
$course = $DB->get_record('course', array('id'=>$this->get_courseid()), '*', MUST_EXIST);
if ($DB->record_exists('enrol', array('courseid'=>$this->get_courseid(), 'enrol'=>'manual'))) {
// Something already added instances, do not add default instances.
$plugins = enrol_get_plugins(true);
foreach ($plugins as $plugin) {
$plugin->restore_sync_course($course);
}
} else {
// Looks like a newly created course.
enrol_course_updated(true, $course, null);
}
}
}
/**
* This structure steps restores the enrol plugins and their underlying
* enrolments, performing all the mappings and/or movements required
@@ -3008,13 +3063,15 @@ class restore_create_categories_and_questions extends restore_structure_step {
$hint = new restore_path_element('question_hint',
'/question_categories/question_category/questions/question/question_hints/question_hint');
$tag = new restore_path_element('tag','/question_categories/question_category/questions/question/tags/tag');
// Apply for 'qtype' plugins optional paths at question level
$this->add_plugin_structure('qtype', $question);
// Apply for 'local' plugins optional paths at question level
$this->add_plugin_structure('local', $question);
return array($category, $question, $hint);
return array($category, $question, $hint, $tag);
}
protected function process_question_category($data) {
@@ -3161,6 +3218,29 @@ class restore_create_categories_and_questions extends restore_structure_step {
$this->set_mapping('question_hint', $oldid, $newitemid);
}
protected function process_tag($data) {
global $CFG, $DB;
$data = (object)$data;
$newquestion = $this->get_new_parentid('question');
if (!empty($CFG->usetags)) { // if enabled in server
// TODO: This is highly inneficient. Each time we add one tag
// we fetch all the existing because tag_set() deletes them
// so everything must be reinserted on each call
$tags = array();
$existingtags = tag_get_tags('question', $newquestion);
// Re-add all the existitng tags
foreach ($existingtags as $existingtag) {
$tags[] = $existingtag->rawname;
}
// Add the one being restored
$tags[] = $data->rawname;
// Send all the tags back to the question
tag_set('question', $newquestion, $tags);
}
}
protected function after_execute() {
global $DB;
@@ -164,8 +164,10 @@ abstract class backup_controller_dbops extends backup_dbops {
$dbman = $DB->get_manager(); // We are going to use database_manager services
$targettablename = 'backup_ids_temp';
$table = new xmldb_table($targettablename);
$dbman->drop_table($table); // And drop it
if ($dbman->table_exists($targettablename)) {
$table = new xmldb_table($targettablename);
$dbman->drop_table($table); // And drop it
}
}
/**
+29 -7
View File
@@ -614,13 +614,20 @@ abstract class restore_dbops {
} else {
self::set_backup_ids_record($restoreid, 'question_category', $category->id, $matchcat->id, $targetcontext->id);
$questions = self::restore_get_questions($restoreid, $category->id);
// Collect all the questions for this category into memory so we only talk to the DB once.
$questioncache = $DB->get_records_sql_menu("SELECT ".$DB->sql_concat('stamp', "' '", 'version').", id
FROM {question}
WHERE category = ?", array($matchcat->id));
foreach ($questions as $question) {
$matchq = $DB->get_record('question', array(
'category' => $matchcat->id,
'stamp' => $question->stamp,
'version' => $question->version));
if (isset($questioncache[$question->stamp." ".$question->version])) {
$matchqid = $questioncache[$question->stamp." ".$question->version];
} else {
$matchqid = false;
}
// 5a) No match, check if user can add q
if (!$matchq) {
if (!$matchqid) {
// 6a) User can, mark the q to be created
if ($canadd) {
// Nothing to mark, newitemid means create
@@ -645,7 +652,7 @@ abstract class restore_dbops {
// 5b) Match, mark q to be mapped
} else {
self::set_backup_ids_record($restoreid, 'question', $question->id, $matchq->id);
self::set_backup_ids_record($restoreid, 'question', $question->id, $matchqid);
}
}
}
@@ -821,7 +828,7 @@ abstract class restore_dbops {
* @return array of result object
*/
public static function send_files_to_pool($basepath, $restoreid, $component, $filearea, $oldcontextid, $dfltuserid, $itemname = null, $olditemid = null, $forcenewcontextid = null, $skipparentitemidctxmatch = false) {
global $DB;
global $DB, $CFG;
$results = array();
@@ -901,6 +908,15 @@ abstract class restore_dbops {
}
if (empty($file->repositoryid)) {
// If contenthash is empty then gracefully skip adding file.
if (empty($file->contenthash)) {
$result = new stdClass();
$result->code = 'file_missing_in_backup';
$result->message = sprintf('missing file (%s) contenthash in backup for component %s', $file->filename, $component);
$result->level = backup::LOG_WARNING;
$results[] = $result;
continue;
}
// this is a regular file, it must be present in the backup pool
$backuppath = $basepath . backup_file_manager::get_backup_content_file_location($file->contenthash);
@@ -916,6 +932,12 @@ abstract class restore_dbops {
// create the file in the filepool if it does not exist yet
if (!$fs->file_exists($newcontextid, $component, $filearea, $rec->newitemid, $file->filepath, $file->filename)) {
// If no license found, use default.
if ($file->license == null){
$file->license = $CFG->sitedefaultlicense;
}
$file_record = array(
'contextid' => $newcontextid,
'component' => $component,
@@ -26,101 +26,6 @@ defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
/**
* Restore dbops tests (all).
*/
class restore_dbops_testcase extends advanced_testcase {
/**
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
*
* Note that those private implementations are tested here by using the public
* backup_ids API and later performing low-level tests.
*/
public function test_backup_ids_cached() {
global $DB;
$dbman = $DB->get_manager(); // We are going to use database_manager services.
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
// Some variables and objects for testing.
$restoreid = 'testrestoreid';
$mapping = new stdClass();
$mapping->itemname = 'user';
$mapping->itemid = 1;
$mapping->newitemid = 2;
$mapping->parentitemid = 3;
$mapping->info = 'info';
// Create the backup_ids temp tables used by restore.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with defaults.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
$dbman->drop_table(new xmldb_table('backup_files_temp'));
// Verify the mapping continues returning the same info,
// now from cache (the table does not exist).
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Recreate the temp table, just to drop it using the restore API in
// order to check that, then, the cache becomes invalid for the same request.
restore_controller_dbops::create_restore_temp_tables($restoreid);
restore_controller_dbops::drop_restore_temp_tables($restoreid);
// No cached info anymore, so the mapping request will arrive to
// DB leading to error (temp table does not exist).
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
// Create the backup_ids temp tables once more.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with complete values.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame($mapping->newitemid, $result->newitemid);
$this->assertSame($mapping->parentitemid, $result->parentitemid);
$this->assertSame($mapping->info, $result->info);
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
restore_controller_dbops::drop_restore_temp_tables($restoreid);
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
}
}
/**
* Backup dbops tests (all).
@@ -0,0 +1,122 @@
<?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/>.
/**
* @package core_backup
* @category phpunit
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
/**
* Restore dbops tests (all).
*/
class restore_dbops_testcase extends advanced_testcase {
/**
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
*
* Note that those private implementations are tested here by using the public
* backup_ids API and later performing low-level tests.
*/
public function test_backup_ids_cached() {
global $DB;
$dbman = $DB->get_manager(); // We are going to use database_manager services.
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
// Some variables and objects for testing.
$restoreid = 'testrestoreid';
$mapping = new stdClass();
$mapping->itemname = 'user';
$mapping->itemid = 1;
$mapping->newitemid = 2;
$mapping->parentitemid = 3;
$mapping->info = 'info';
// Create the backup_ids temp tables used by restore.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with defaults.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
$dbman->drop_table(new xmldb_table('backup_files_temp'));
// Verify the mapping continues returning the same info,
// now from cache (the table does not exist).
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Recreate the temp table, just to drop it using the restore API in
// order to check that, then, the cache becomes invalid for the same request.
restore_controller_dbops::create_restore_temp_tables($restoreid);
restore_controller_dbops::drop_restore_temp_tables($restoreid);
// No cached info anymore, so the mapping request will arrive to
// DB leading to error (temp table does not exist).
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
// Create the backup_ids temp tables once more.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with complete values.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame($mapping->newitemid, $result->newitemid);
$this->assertSame($mapping->parentitemid, $result->parentitemid);
$this->assertSame($mapping->info, $result->info);
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
restore_controller_dbops::drop_restore_temp_tables($restoreid);
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
}
}
+68 -38
View File
@@ -32,11 +32,11 @@ defined('MOODLE_INTERNAL') || die();
*/
abstract class backup_cron_automated_helper {
/** automated backups are active and ready to run */
/** Automated backups are active and ready to run */
const STATE_OK = 0;
/** automated backups are disabled and will not be run */
/** Automated backups are disabled and will not be run */
const STATE_DISABLED = 1;
/** automated backups are all ready running! */
/** Automated backups are all ready running! */
const STATE_RUNNING = 2;
/** Course automated backup completed successfully */
@@ -49,6 +49,8 @@ abstract class backup_cron_automated_helper {
const BACKUP_STATUS_SKIPPED = 3;
/** Course automated backup had warnings */
const BACKUP_STATUS_WARNING = 4;
/** Course automated backup has yet to be run */
const BACKUP_STATUS_NOTYETRUN = 5;
/** Run if required by the schedule set in config. Default. **/
const RUN_ON_SCHEDULE = 0;
@@ -119,12 +121,13 @@ abstract class backup_cron_automated_helper {
$rs = $DB->get_recordset('course');
foreach ($rs as $course) {
$backupcourse = $DB->get_record('backup_courses', array('courseid'=>$course->id));
$backupcourse = $DB->get_record('backup_courses', array('courseid' => $course->id));
if (!$backupcourse) {
$backupcourse = new stdClass;
$backupcourse->courseid = $course->id;
$DB->insert_record('backup_courses',$backupcourse);
$backupcourse = $DB->get_record('backup_courses', array('courseid'=>$course->id));
$backupcourse->laststatus = self::BACKUP_STATUS_NOTYETRUN;
$DB->insert_record('backup_courses', $backupcourse);
$backupcourse = $DB->get_record('backup_courses', array('courseid' => $course->id));
}
// The last backup is considered as successful when OK or SKIPPED.
@@ -132,19 +135,23 @@ abstract class backup_cron_automated_helper {
$backupcourse->laststatus == self::BACKUP_STATUS_OK) && (
$backupcourse->laststarttime > 0 && $backupcourse->lastendtime > 0);
// Skip courses that do not yet need backup.
$skipped = !(($backupcourse->nextstarttime > 0 && $backupcourse->nextstarttime < $now) || $rundirective == self::RUN_IMMEDIATELY);
$skippedmessage = 'Does not require backup';
// Assume that we are not skipping anything.
$skipped = false;
$skippedmessage = '';
// Check if we are going to be running the backup now.
$shouldrunnow = (($backupcourse->nextstarttime > 0 && $backupcourse->nextstarttime < $now)
|| $rundirective == self::RUN_IMMEDIATELY);
// If config backup_auto_skip_hidden is set to true, skip courses that are not visible.
if (!$skipped && $config->backup_auto_skip_hidden) {
if ($shouldrunnow && $config->backup_auto_skip_hidden) {
$skipped = ($config->backup_auto_skip_hidden && !$course->visible);
$skippedmessage = 'Not visible';
}
// If config backup_auto_skip_modif_days is set to true, skip courses
// that have not been modified since the number of days defined.
if (!$skipped && $lastbackupwassuccessful && $config->backup_auto_skip_modif_days) {
if ($shouldrunnow && !$skipped && $lastbackupwassuccessful && $config->backup_auto_skip_modif_days) {
$sqlwhere = "course=:courseid AND time>:time AND ".$DB->sql_like('action', ':action', false, true, true);
$timenotmodifsincedays = $now - ($config->backup_auto_skip_modif_days * DAYSECS);
// Check log if there were any modifications to the course content.
@@ -159,8 +166,9 @@ abstract class backup_cron_automated_helper {
// If config backup_auto_skip_modif_prev is set to true, skip courses
// that have not been modified since previous backup.
if (!$skipped && $lastbackupwassuccessful && $config->backup_auto_skip_modif_prev) {
if ($shouldrunnow && !$skipped && $lastbackupwassuccessful && $config->backup_auto_skip_modif_prev) {
// Check log if there were any modifications to the course content.
$sqlwhere = "course=:courseid AND time>:time AND ".$DB->sql_like('action', ':action', false, true, true);
$params = array('courseid' => $course->id,
'time' => $backupcourse->laststarttime,
'action' => '%view%');
@@ -170,16 +178,17 @@ abstract class backup_cron_automated_helper {
$skippedmessage = 'Not modified since previous backup';
}
// Skip courses not needed for backup.
if ($skipped) {
// Output the next execution time when it has been updated.
if ($backupcourse->nextstarttime != $nextstarttime) {
mtrace('Backup of \'' . $course->fullname . '\' is scheduled on ' . $showtime);
}
// Check if the course is not scheduled to run right now.
if (!$shouldrunnow) {
$backupcourse->nextstarttime = $nextstarttime;
$DB->update_record('backup_courses', $backupcourse);
mtrace('Skipping ' . $course->fullname . ' (Not scheduled for backup until ' . $showtime . ')');
} else if ($skipped) { // Must have been skipped for a reason.
$backupcourse->laststatus = self::BACKUP_STATUS_SKIPPED;
$backupcourse->nextstarttime = $nextstarttime;
$DB->update_record('backup_courses', $backupcourse);
mtrace('Skipping '.$course->fullname.' ('.$skippedmessage.')');
mtrace('Skipping ' . $course->fullname . ' (' . $skippedmessage . ')');
mtrace('Backup of \'' . $course->fullname . '\' is scheduled on ' . $showtime);
} else {
// Backup every non-skipped courses.
mtrace('Backing up '.$course->fullname.'...');
@@ -223,16 +232,17 @@ abstract class backup_cron_automated_helper {
$count = backup_cron_automated_helper::get_backup_status_array();
$haserrors = ($count[self::BACKUP_STATUS_ERROR] != 0 || $count[self::BACKUP_STATUS_UNFINISHED] != 0);
//Build the message text
//Summary
$message .= get_string('summary')."\n";
// Build the message text.
// Summary.
$message .= get_string('summary') . "\n";
$message .= "==================================================\n";
$message .= " ".get_string('courses').": ".array_sum($count)."\n";
$message .= " ".get_string('ok').": ".$count[self::BACKUP_STATUS_OK]."\n";
$message .= " ".get_string('skipped').": ".$count[self::BACKUP_STATUS_SKIPPED]."\n";
$message .= " ".get_string('error').": ".$count[self::BACKUP_STATUS_ERROR]."\n";
$message .= " ".get_string('unfinished').": ".$count[self::BACKUP_STATUS_UNFINISHED]."\n";
$message .= " ".get_string('warning').": ".$count[self::BACKUP_STATUS_WARNING]."\n\n";
$message .= ' ' . get_string('courses') . '; ' . array_sum($count) . "\n";
$message .= ' ' . get_string('ok') . '; ' . $count[self::BACKUP_STATUS_OK] . "\n";
$message .= ' ' . get_string('skipped') . '; ' . $count[self::BACKUP_STATUS_SKIPPED] . "\n";
$message .= ' ' . get_string('error') . '; ' . $count[self::BACKUP_STATUS_ERROR] . "\n";
$message .= ' ' . get_string('unfinished') . '; ' . $count[self::BACKUP_STATUS_UNFINISHED] . "\n";
$message .= ' ' . get_string('warning') . '; ' . $count[self::BACKUP_STATUS_WARNING] . "\n";
$message .= ' ' . get_string('backupnotyetrun') . '; ' . $count[self::BACKUP_STATUS_NOTYETRUN]."\n\n";
//Reference
if ($haserrors) {
@@ -295,7 +305,8 @@ abstract class backup_cron_automated_helper {
self::BACKUP_STATUS_OK => 0,
self::BACKUP_STATUS_UNFINISHED => 0,
self::BACKUP_STATUS_SKIPPED => 0,
self::BACKUP_STATUS_WARNING => 0
self::BACKUP_STATUS_WARNING => 0,
self::BACKUP_STATUS_NOTYETRUN => 0
);
$statuses = $DB->get_records_sql('SELECT DISTINCT bc.laststatus, COUNT(bc.courseid) AS statuscount FROM {backup_courses} bc GROUP BY bc.laststatus');
@@ -371,7 +382,11 @@ abstract class backup_cron_automated_helper {
$outcome = self::BACKUP_STATUS_OK;
$config = get_config('backup');
$bc = new backup_controller(backup::TYPE_1COURSE, $course->id, backup::FORMAT_MOODLE, backup::INTERACTIVE_NO, backup::MODE_AUTOMATED, $userid);
$dir = $config->backup_auto_destination;
$storage = (int)$config->backup_auto_storage;
$bc = new backup_controller(backup::TYPE_1COURSE, $course->id, backup::FORMAT_MOODLE, backup::INTERACTIVE_NO,
backup::MODE_AUTOMATED, $userid);
try {
@@ -392,27 +407,28 @@ abstract class backup_cron_automated_helper {
}
}
// Set the default filename
// 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();
$bc->get_plan()->get_setting('filename')->set_value(backup_plan_dbops::get_default_backup_filename($format, $type, $id, $users, $anonymised));
$bc->get_plan()->get_setting('filename')->set_value(backup_plan_dbops::get_default_backup_filename($format, $type,
$id, $users, $anonymised));
$bc->set_status(backup::STATUS_AWAITING);
$bc->execute_plan();
$results = $bc->get_results();
$outcome = self::outcome_from_results($results);
$file = $results['backup_destination']; // may be empty if file already moved to target location
$dir = $config->backup_auto_destination;
$storage = (int)$config->backup_auto_storage;
$file = $results['backup_destination']; // May be empty if file already moved to target location.
if (!file_exists($dir) || !is_dir($dir) || !is_writable($dir)) {
$dir = null;
}
if ($file && !empty($dir) && $storage !== 0) {
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised, !$config->backup_shortname);
// Copy file only if there was no error.
if ($file && !empty($dir) && $storage !== 0 && $outcome != self::BACKUP_STATUS_ERROR) {
$filename = backup_plan_dbops::get_default_backup_filename($format, $type, $course->id, $users, $anonymised,
!$config->backup_shortname);
if (!$file->copy_content_to($dir.'/'.$filename)) {
$outcome = self::BACKUP_STATUS_ERROR;
}
@@ -428,6 +444,20 @@ abstract class backup_cron_automated_helper {
$outcome = self::BACKUP_STATUS_ERROR;
}
// Delete the backup file immediately if something went wrong.
if ($outcome === self::BACKUP_STATUS_ERROR) {
// Delete the file from file area if exists.
if (!empty($file)) {
$file->delete();
}
// Delete file from external storage if exists.
if ($storage !== 0 && !empty($filename) && file_exists($dir.'/'.$filename)) {
@unlink($dir.'/'.$filename);
}
}
$bc->destroy();
unset($bc);
@@ -524,7 +554,7 @@ abstract class backup_cron_automated_helper {
public static function set_state_running($running = true) {
if ($running === true) {
if (self::get_automated_backup_state() === self::STATE_RUNNING) {
throw new backup_exception('backup_automated_already_running');
throw new backup_helper_exception('backup_automated_already_running');
}
set_config('backup_auto_running', '1', 'backup');
} else {
@@ -0,0 +1,55 @@
<?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/>.
/**
* @package core_backup
* @category phpunit
* @copyright 2013 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_course_task.class.php');
/**
* Tests for encoding content links in backup_course_task.
*
* The code that this tests is acutally in backup/moodle2/backup_course_task.class.php,
* but there is no place for unit tests near there, and perhaps one day it will
* be refactored so it becomes more generic.
*/
class backup_course_task_testcase extends basic_testcase {
/**
* Test the encode_content_links method for course.
*/
public function test_course_encode_content_links() {
global $CFG;
$encoded = backup_course_task::encode_content_links(
$CFG->wwwroot . '/course/view.php?id=123, ' .
$CFG->wwwroot . '/grade/index.php?id=123, ' .
$CFG->wwwroot . '/grade/report/index.php?id=123 and ' .
$CFG->wwwroot . '/user/index.php?id=123.');
$this->assertEquals('$@COURSEVIEWBYID*123@$, $@GRADEINDEXBYID*123@$, ' .
'$@GRADEREPORTINDEXBYID*123@$ and $@USERINDEXVIEWBYID*123@$.', $encoded);
}
}
@@ -59,7 +59,13 @@ class database_logger extends base_logger {
if ($this->levelcol) {
$columns[$this->levelcol] = $level;
}
$columns[$this->messagecol] = $message; //TODO: should this be cleaned?
$message = clean_param($message, PARAM_NOTAGS);
// Check if the message exceeds the 255 character limit in the database,
// if it does, shorten it so that it can be inserted successfully.
if (textlib::strlen($message) > 255) {
$message = textlib::substr($message, 0, 252) . '...';
}
$columns[$this->messagecol] = $message;
return $this->insert_log_record($this->logtable, $columns);
}
@@ -69,6 +75,6 @@ class database_logger extends base_logger {
// to preserve DB logs if the whole backup/restore transaction is
// rollback
global $DB;
return $DB->insert_record($this->logtable, $columns, false); // Don't return inserted id
return $DB->insert_record($table, $columns, false); // Don't return inserted id
}
}
+11 -7
View File
@@ -60,13 +60,17 @@ abstract class base_plan implements checksumable, executable {
$task->set_plan($this);
// Append task settings to plan array, if not present, for comodity
foreach ($task->get_settings() as $key => $setting) {
if (!in_array($setting, $this->settings)) {
$name = $setting->get_name();
if (!isset($this->settings[$name])) {
$this->settings[$name] = $setting;
} else {
throw new base_plan_exception('multiple_settings_by_name_found', $name);
}
// Check if there is already a setting for this name.
$name = $setting->get_name();
if (!isset($this->settings[$name])) {
// There is no setting, so add it.
$this->settings[$name] = $setting;
} else if ($this->settings[$name] != $setting) {
// If the setting already exists AND it is not the same setting,
// then throw an error. (I.e. you're allowed to add the same
// setting twice, but cannot add two different ones with same
// name.)
throw new base_plan_exception('multiple_settings_by_name_found', $name);
}
}
}
@@ -69,7 +69,7 @@ class backup_base_optigroup_testcase extends basic_testcase {
/**
* Incorrect creation tests (attributes and final elements)
*/
function itest_wrong_creation() {
function test_wrong_creation() {
// Create instance with invalid name
try {
+5
View File
@@ -73,6 +73,11 @@ abstract class base_moodleform extends moodleform {
*/
function __construct(base_ui_stage $uistage, $action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true) {
$this->uistage = $uistage;
$attributes = (array)$attributes;
if (!isset($attributes['enctype'])) {
$attributes['enctype'] = 'application/x-www-form-urlencoded'; // Enforce compatibility with our max_input_vars hack.
}
parent::__construct($action, $customdata, $method, $target, $attributes, $editable);
}
/**
+26 -3
View File
@@ -73,7 +73,7 @@ class core_backup_renderer extends plugin_renderer_base {
*/
public function backup_details($details, $nextstageurl) {
$yestick = $this->output->pix_icon('i/valid', get_string('yes'));
$notick = $this->output->pix_icon('i/valid', get_string('no'));
$notick = $this->output->pix_icon('i/invalid', get_string('no'));
$html = html_writer::start_tag('div', array('class'=>'backup-restore'));
@@ -140,7 +140,7 @@ class core_backup_renderer extends plugin_renderer_base {
}
if (empty($table)) {
$table = new html_table();
$table->head = array('Module', 'Title', 'Userinfo');
$table->head = array(get_string('module','backup'), get_string('title','backup'), get_string('userinfo','backup'));
$table->colclasses = array('modulename', 'moduletitle', 'userinfoincluded');
$table->align = array('left','left', 'center');
$table->attributes = array('class'=>'activitytable generaltable');
@@ -521,6 +521,15 @@ class core_backup_renderer extends plugin_renderer_base {
$url = $component->get_url();
$output = html_writer::start_tag('div', array('class' => 'restore-course-search'));
$countstr = '';
if ($component->has_more_results()) {
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
} else {
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
}
$output .= html_writer::tag('div', $countstr, array('class'=>'rcs-totalresults'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results'));
$table = new html_table();
@@ -590,8 +599,14 @@ class core_backup_renderer extends plugin_renderer_base {
return $output;
}
$output .= html_writer::tag('div', get_string('totalcoursesearchresults', 'backup', $component->get_count()), array('class'=>'ics-totalresults'));
$countstr = '';
if ($component->has_more_results()) {
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
} else {
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
}
$output .= html_writer::tag('div', $countstr, array('class'=>'ics-totalresults'));
$output .= html_writer::start_tag('div', array('class' => 'ics-results'));
$table = new html_table();
@@ -610,6 +625,14 @@ class core_backup_renderer extends plugin_renderer_base {
);
$table->data[] = $row;
}
if ($component->has_more_results()) {
$cell = new html_table_cell(get_string('moreresults', 'backup'));
$cell->colspan = 3;
$cell->attributes['class'] = 'notifyproblem';
$row = new html_table_row(array($cell));
$row->attributes['class'] = 'rcs-course';
$table->data[] = $row;
}
$output .= html_writer::table($table);
$output .= html_writer::end_tag('div');
+16 -5
View File
@@ -65,6 +65,11 @@ abstract class restore_search_base implements renderable {
* @var array
*/
private $requiredcapabilities = array();
/**
* Indicates if we have more than maxresults found.
* @var boolean
*/
private $hasmoreresults = false;
/**
* Constructor
@@ -177,7 +182,7 @@ abstract class restore_search_base implements renderable {
foreach ($this->requiredcapabilities as $cap) {
$requiredcaps[] = $cap['capability'];
}
// Iterate while we have records and haven't reached MAXRESULTS
// Iterate while we have records and haven't reached $this->maxresults.
while ($totalcourses > $offs and $this->totalcount < self::$MAXRESULTS) {
$resultset = $DB->get_records_sql($sql, $params, $offs, $blocksz);
foreach ($resultset as $result) {
@@ -189,11 +194,14 @@ abstract class restore_search_base implements renderable {
continue;
}
}
$this->results[$result->id] = $result;
$this->totalcount++;
if ($this->totalcount >= self::$MAXRESULTS) {
// Check if we are over the limit.
if ($this->totalcount+1 > self::$MAXRESULTS) {
$this->hasmoreresults = true;
break;
}
// If not, then continue.
$this->totalcount++;
$this->results[$result->id] = $result;
}
$offs += $blocksz;
}
@@ -202,7 +210,10 @@ abstract class restore_search_base implements renderable {
}
final public function has_more_results() {
return $this->get_count() >= self::$MAXRESULTS;
if ($this->results === null) {
$this->search();
}
return $this->hasmoreresults;
}
/**
+16 -7
View File
@@ -475,8 +475,9 @@ class restore_ui_stage_schema extends restore_ui_stage {
if ($this->stageform === null) {
$form = new restore_schema_form($this, $PAGE->url);
$tasks = $this->ui->get_tasks();
$content = '';
$courseheading = false;
$allsettings = array();
foreach ($tasks as $task) {
if (!($task instanceof restore_root_task)) {
if (!$courseheading) {
@@ -484,13 +485,11 @@ class restore_ui_stage_schema extends restore_ui_stage {
$form->add_heading('coursesettings', get_string('coursesettings', 'backup'));
$courseheading = true;
}
// First add each setting
// Put each setting into an array of settings to add. Adding
// a setting individually is a very slow operation, so we add
// them all in a batch later on.
foreach ($task->get_settings() as $setting) {
$form->add_setting($setting, $task);
}
// The add all the dependencies
foreach ($task->get_settings() as $setting) {
$form->add_dependencies($setting);
$allsettings[] = array($setting, $task);
}
} else if ($this->ui->enforce_changed_dependencies()) {
// Only show these settings if dependencies changed them.
@@ -505,6 +504,15 @@ class restore_ui_stage_schema extends restore_ui_stage {
}
}
}
// Actually add all the settings that we put in the array.
$form->add_settings($allsettings);
// Add the dependencies for all the settings.
foreach ($allsettings as $settingtask) {
$form->add_dependencies($settingtask[0]);
}
$this->stageform = $form;
}
return $this->stageform;
@@ -689,6 +697,7 @@ class restore_ui_stage_process extends restore_ui_stage {
$html .= html_writer::start_tag('form', array(
'action' => $url->out_omit_querystring(),
'class' => 'backup-restore',
'enctype' => 'application/x-www-form-urlencoded', // Enforce compatibility with our max_input_vars hack.
'method' => 'post'));
foreach ($url->params() as $name => $value) {
$html .= html_writer::empty_tag('input', array(
@@ -43,6 +43,18 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
protected $groupedpaths; // Paths we are requesting grouped
protected $currentdata; // Where we'll be acummulating data
/**
* Keep cache of parent directory paths for XML parsing.
* @var array
*/
protected $parentcache = array();
/**
* Remaining space for parent directory paths.
* @var integer
*/
protected $parentcacheavailablesize = 2048;
public function __construct(array $paths = array()) {
$this->groupedpaths = array();
$this->currentdata = null;
@@ -65,7 +77,7 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
$a->child = $found;
throw new progressive_parser_exception('xml_grouped_child_found', $a);
}
$this->groupedpaths[] = $path;
$this->groupedpaths[$path] = true;
}
parent::add_path($path);
}
@@ -141,7 +153,7 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
}
protected function path_is_grouped($path) {
return in_array($path, $this->groupedpaths);
return isset($this->groupedpaths[$path]);
}
/**
@@ -150,16 +162,41 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
* false if not
*/
protected function grouped_parent_exists($path) {
$parentpath = progressive_parser::dirname($path);
$parentpath = $this->get_parent_path($path);
while ($parentpath != '/') {
if ($this->path_is_grouped($parentpath)) {
return $parentpath;
}
$parentpath = progressive_parser::dirname($parentpath);
$parentpath = $this->get_parent_path($parentpath);
}
return false;
}
/**
* Get the parent path using a local cache for performance.
*
* @param $path string The pathname you wish to obtain the parent name for.
* @return string The parent pathname.
*/
protected function get_parent_path($path) {
if (!isset($this->parentcache[$path])) {
$this->parentcache[$path] = progressive_parser::dirname($path);
$this->parentcacheavailablesize--;
if ($this->parentcacheavailablesize < 0) {
// Older first is cheaper than LRU. We use 10% as items are grouped together and the large quiz
// restore from MDL-40585 used only 600 parent paths. This is an XML heirarchy, so common paths
// are grouped near each other. eg; /question_bank/question_category/question/element. After keeping
// question_bank paths in the cache when we move to another area and the question_bank cache is not
// useful any longer.
$this->parentcache = array_slice($this->parentcache, 200, null, true);
$this->parentcacheavailablesize += 200;
}
}
return $this->parentcache[$path];
}
/**
* Function that will look for any grouped
* child for the given path, returning it if found,
@@ -167,7 +204,7 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
*/
protected function grouped_child_exists($path) {
$childpath = $path . '/';
foreach ($this->groupedpaths as $groupedpath) {
foreach ($this->groupedpaths as $groupedpath => $set) {
if (strpos($groupedpath, $childpath) === 0) {
return $groupedpath;
}
+1
View File
@@ -83,6 +83,7 @@ class block_blog_recent extends block_base {
$this->content = new stdClass();
$this->content->footer = '';
$this->content->text = '';
$context = $this->page->context;
+1 -1
View File
@@ -130,7 +130,7 @@ $communityid = optional_param('communityid', '', PARAM_INT);
if ($remove != -1 and !empty($communityid) and confirm_sesskey()) {
$communitymanager->block_community_remove_course($communityid, $USER->id);
echo $OUTPUT->header();
echo $renderer->remove_success(new moodle_url(get_referer(false)));
echo $renderer->remove_success(new moodle_url('/course/view.php', array('id' => $courseid)));
echo $OUTPUT->footer();
die();
}
+1
View File
@@ -38,6 +38,7 @@ class block_community_manager {
$community = $this->block_community_get_course($course->url, $userid);
if (empty($community)) {
$community = new stdClass();
$community->userid = $userid;
$community->coursename = $course->name;
$community->coursedescription = $course->description;
+3 -3
View File
@@ -216,12 +216,12 @@ if (empty($completions)) {
echo '(<i>';
if ($agg == COMPLETION_AGGREGATION_ALL) {
echo strtolower(get_string('aggregateall', 'completion'));
echo textlib::strtolower(get_string('all', 'completion'));
} else {
echo strtolower(get_string('aggregateany', 'completion'));
echo textlib::strtolower(get_string('any', 'completion'));
}
echo '</i> '.strtolower(get_string('required')).')';
echo '</i> '.textlib::strtolower(get_string('required')).')';
$agg_type = false;
}
}
+9 -3
View File
@@ -34,7 +34,14 @@ class block_course_list extends block_list {
if (empty($CFG->disablemycourses) and isloggedin() and !isguestuser() and
!(has_capability('moodle/course:update', context_system::instance()) and $adminseesall)) { // Just print My Courses
if ($courses = enrol_get_my_courses(NULL, 'visible DESC, fullname ASC')) {
// As this is producing navigation sort order should default to $CFG->navsortmycoursessort instead
// of using the default.
if (!empty($CFG->navsortmycoursessort)) {
$sortorder = 'visible DESC, ' . $CFG->navsortmycoursessort . ' ASC';
} else {
$sortorder = 'visible DESC, sortorder ASC';
}
if ($courses = enrol_get_my_courses(NULL, $sortorder)) {
foreach ($courses as $course) {
$coursecontext = context_course::instance($course->id);
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
@@ -120,8 +127,7 @@ class block_course_list extends block_list {
$this->content->items[] = get_string('remotecourses','mnet');
$this->content->icons[] = '';
foreach ($courses as $course) {
$coursecontext = context_course::instance($course->id);
$this->content->items[]="<a title=\"" . format_string($course->shortname, true, array('context' => $coursecontext)) . "\" ".
$this->content->items[]="<a title=\"" . format_string($course->shortname, true) . "\" ".
"href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&amp;wantsurl=/course/view.php?id={$course->remoteid}\">"
.$icon. format_string($course->fullname) . "</a>";
}
@@ -26,9 +26,9 @@
$string['adminview'] = 'Admin view';
$string['allcourses'] = 'Admin user sees all courses';
$string['configadminview'] = 'What should the admin see in the course list block?';
$string['confighideallcourseslink'] = 'Hide "All courses" link at the bottom of the block. Link hiding does not affects Admin\'s view';
$string['confighideallcourseslink'] = 'Remove the \'All courses\' link under the list of courses. (This setting does not affect the admin view.)';
$string['course_list:addinstance'] = 'Add a new courses block';
$string['course_list:myaddinstance'] = 'Add a new courses block to My home';
$string['hideallcourseslink'] = 'Hide All courses link';
$string['hideallcourseslink'] = 'Hide \'All courses\' link';
$string['owncourses'] = 'Admin user sees own courses';
$string['pluginname'] = 'Courses';
+12
View File
@@ -34,5 +34,17 @@ $capabilities = array(
),
'clonepermissionsfrom' => 'moodle/my:manageblocks'
),
'block/course_overview:addinstance' => array(
'riskbitmask' => RISK_SPAM | RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_BLOCK,
'archetypes' => array(
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/site:manageblocks'
)
);
@@ -27,6 +27,7 @@ $string['alwaysshowall'] = 'Always Show All';
$string['collapseall'] = 'Collapse All Course Lists';
$string['configotherexpanded'] = 'If enabled, Other Courses will be expanded by default unless overriden by user preferences.';
$string['configpreservestates'] = 'If enabled, the collapsed/expanded states set by the user are stored and used on each load.';
$string['course_overview:addinstance'] = 'Add a new course overview block';
$string['course_overview:myaddinstance'] = 'Add a new course overview block to My home';
$string['defaultmaxcourses'] = 'Default maximum courses';
$string['defaultmaxcoursesdesc'] = 'Maximum courses which should be displayed on course overview block, 0 will show all courses';
+11 -2
View File
@@ -31,8 +31,17 @@
function block_course_overview_get_overviews($courses) {
$htmlarray = array();
if ($modules = get_plugin_list_with_function('mod', 'print_overview')) {
foreach ($modules as $fname) {
$fname($courses,$htmlarray);
// Split courses list into batches with no more than MAX_MODINFO_CACHE_SIZE courses in one batch.
// Otherwise we exceed the cache limit in get_fast_modinfo() and rebuild it too often.
if (defined('MAX_MODINFO_CACHE_SIZE') && MAX_MODINFO_CACHE_SIZE > 0 && count($courses) > MAX_MODINFO_CACHE_SIZE) {
$batches = array_chunk($courses, MAX_MODINFO_CACHE_SIZE, true);
} else {
$batches = array($courses);
}
foreach ($batches as $courses) {
foreach ($modules as $fname) {
$fname($courses, $htmlarray);
}
}
}
return $htmlarray;
+5 -1
View File
@@ -104,8 +104,12 @@ class block_course_overview_renderer extends plugin_renderer_base {
$html .= html_writer::end_tag('div');
}
$attributes = array('title' => s($course->fullname));
// No need to pass title through s() here as it will be done automatically by html_writer.
$attributes = array('title' => $course->fullname);
if ($course->id > 0) {
if (empty($course->visible)) {
$attributes['class'] = 'dimmed';
}
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
$coursefullname = format_string($course->fullname, true, $course->id);
$link = html_writer::link($courseurl, $coursefullname, $attributes);
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2012121000; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2012121001; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_course_overview'; // Full name of the plugin (used for diagnostics)
@@ -28,7 +28,7 @@ $string['askaddentry'] = 'When users can add entries to the glossary, show a lin
$string['askinvisible'] = 'When users cannot edit or view the glossary, show this text (without link)';
$string['askviewglossary'] = 'When users can view the glossary but not add entries, show a link with this text';
$string['glossary_random:addinstance'] = 'Add a new random glossary entry block';
$string['glossary_random:myaddinstance'] = 'Add a new random glossary entry block to the My Moodle page';
$string['glossary_random:myaddinstance'] = 'Add a new random glossary entry block to My home';
$string['intro'] = 'Make sure you have at least one glossary with at least one entry added to this course. Then you can adjust the following settings';
$string['invisible'] = '(to be continued)';
$string['lastmodified'] = 'Last modified entry';
+9
View File
@@ -46,5 +46,14 @@ class block_mentees extends block_base {
return $this->content;
}
/**
* Returns true if the block can be docked.
* The mentees block can only be docked if it has a non-empty title.
* @return bool
*/
public function instance_can_be_docked() {
return parent::instance_can_be_docked() && isset($this->config->title) && !empty($this->config->title);
}
}
+1 -1
View File
@@ -27,6 +27,6 @@ $string['configtitle'] = 'Block title';
$string['configtitleblankhides'] = 'Block title (no title if blank)';
$string['leaveblanktohide'] = 'leave blank to hide the title';
$string['mentees:addinstance'] = 'Add a new mentees block';
$string['mentees:myaddinstance'] = 'Add a new mentees block to the My Moodle page';
$string['mentees:myaddinstance'] = 'Add a new mentees block to My home';
$string['newmenteesblock'] = '(new Mentees block)';
$string['pluginname'] = 'Mentees';
+1 -1
View File
@@ -332,7 +332,7 @@ class block_base {
/**
* Subclasses should override this and return true if the
* subclass block has a config_global.html file.
* subclass block has a settings.php file.
*
* @return boolean
*/
+3 -1
View File
@@ -105,7 +105,9 @@ class block_navigation_renderer extends plugin_renderer_base {
if ($item->hidden) {
$attributes['class'] = 'dimmed_text';
}
if (is_string($item->action) || empty($item->action) || ($item->type === navigation_node::TYPE_CATEGORY && empty($options['linkcategories']))) {
if (is_string($item->action) || empty($item->action) ||
(($item->type === navigation_node::TYPE_CATEGORY || $item->type === navigation_node::TYPE_MY_CATEGORY) &&
empty($options['linkcategories']))) {
$attributes['tabindex'] = '0'; //add tab support to span but still maintain character stream sequence.
$content = html_writer::tag('span', $content, $attributes);
} else if ($item->action instanceof action_link) {
+12 -3
View File
@@ -348,10 +348,15 @@ BRANCH.prototype = {
}
if (!link) {
var branchspan = Y.Node.create('<span></span>');
if (branchicon) {
branchp.appendChild(branchicon);
branchspan.appendChild(branchicon);
}
branchp.append(this.get('name'));
branchspan.append(this.get('name'));
if (this.get('hidden')) {
branchspan.addClass('dimmed_text');
}
branchp.appendChild(branchspan);
} else {
var branchlink = Y.Node.create('<a title="'+this.get('title')+'" href="'+link+'"></a>');
if (branchicon) {
@@ -371,11 +376,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
*
* @chainable
* @method wire
* @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
return false;
return this;
}
if (this.get('expandable')) {
this.event_ajaxload = this.node.on('ajaxload|click', this.ajaxLoad, this);
@@ -24,5 +24,5 @@
*/
$string['news_items:addinstance'] = 'Add a new latest news block';
$string['news_items:myaddinstance'] = 'Add a new latest news block to the My Moodle page';
$string['news_items:myaddinstance'] = 'Add a new latest news block to My home';
$string['pluginname'] = 'Latest news';
@@ -25,7 +25,7 @@
$string['configtimetosee'] = 'Number of minutes determining the period of inactivity after which a user is no longer considered to be online.';
$string['online_users:addinstance'] = 'Add a new online users block';
$string['online_users:myaddinstance'] = 'Add a new online users block to the My Moodle page';
$string['online_users:myaddinstance'] = 'Add a new online users block to My home';
$string['online_users:viewlist'] = 'View list of online users';
$string['periodnminutes'] = 'last {$a} minutes';
$string['pluginname'] = 'Online users';
+9
View File
@@ -0,0 +1,9 @@
/* RSS Feeds
-------------------------*/
.block_rss_client .list li:first-child {
border-top-width: 0;
}
.block_rss_client .list li {
border-top: 1px solid;
padding: 5px;
}
+4 -3
View File
@@ -84,15 +84,16 @@ if (!empty($rssrecord->preferredtitle)) {
$feedtitle = $rss->get_title();
}
echo '<table align="center" width="50%" cellspacing="1">'."\n";
echo '<tr><td colspan="2"><strong>'. $feedtitle .'</strong></td></tr>'."\n";
echo '<tr><td colspan="2"><strong>'. s($feedtitle) .'</strong></td></tr>'."\n";
foreach ($rss->get_items() as $item) {
echo '<tr><td valign="middle">'."\n";
echo '<a href="'. $item->get_link() .'" target="_blank"><strong>'. $item->get_title();
echo '<a href="'.$item->get_link().'" target="_blank"><strong>';
echo s($item->get_title());
echo '</strong></a>'."\n";
echo '</td>'."\n";
echo '</tr>'."\n";
echo '<tr><td colspan="2"><small>';
echo $item->get_description() .'</small></td></tr>'."\n";
echo format_text($item->get_description(), FORMAT_HTML) .'</small></td></tr>'."\n";
}
echo '</table>'."\n";
@@ -75,6 +75,11 @@ class block_section_links extends block_base {
$courseformatoptions = course_get_format($course)->get_format_options();
$context = context_course::instance($course->id);
// Course format options 'numsections' is required to display the block.
if (empty($courseformatoptions['numsections'])) {
return $this->content;
}
if ($course->format == 'weeks' or $course->format == 'weekscss') {
$highlight = ceil((time()-$course->startdate)/604800);
$linktext = get_string('jumptocurrentweek', 'block_section_links');
+4 -3
View File
@@ -81,6 +81,7 @@ class block_tags extends block_base {
}
$this->content = new stdClass;
$this->content->text = '';
$this->content->footer = '';
// Get a list of tags.
@@ -110,12 +111,12 @@ class block_tags extends block_base {
$content = '';
$moretags = new moodle_url('/tag/coursetags_more.php', array('show'=>$tagtype));
if ($tagtype == 'all') {
$tags = coursetag_get_tags(0, 0, $this->config->tagtype, $this->config->numberoftags, 'name');
$tags = coursetag_get_tags(0, 0, $this->config->tagtype, $this->config->numberoftags);
} else if ($tagtype == 'course') {
$tags = coursetag_get_tags($this->page->course->id, 0, $this->config->tagtype, $this->config->numberoftags, 'name');
$tags = coursetag_get_tags($this->page->course->id, 0, $this->config->tagtype, $this->config->numberoftags);
$moretags->param('courseid', $this->page->course->id);
} else if ($tagtype == 'my') {
$tags = coursetag_get_tags(0, $USER->id, $this->config->tagtype, $this->config->numberoftags, 'name');
$tags = coursetag_get_tags(0, $USER->id, $this->config->tagtype, $this->config->numberoftags);
}
$tagcloud = tag_print_cloud($tags, 150, true);
if (!$tagcloud) {
+1
View File
@@ -120,6 +120,7 @@ if ($action === 'delete'){
print_error('nopermissionstodeleteentry', 'blog');
} else {
$entry->delete();
blog_rss_delete_file($userid);
redirect($returnurl);
}
} else if (blog_user_can_edit_entry($entry)) {
+2 -8
View File
@@ -40,7 +40,7 @@ if (empty($CFG->enableblogs)) {
//correct tagid if a text tag is provided as a param
if (!empty($tag)) {
if ($tagrec = $DB->get_record_sql("SELECT * FROM {tag} WHERE ". $DB->sql_like('name', '?', false), array("%$tag%"))) {
if ($tagrec = $DB->get_record('tag', array('name' => $tag))) {
$tagid = $tagrec->id;
} else {
unset($tagid);
@@ -183,13 +183,7 @@ if (!empty($userid)) {
print_error('donothaveblog', 'blog');
}
} else {
$personalcontext = context_user::instance($userid);
if (!has_capability('moodle/blog:view', $sitecontext) && !has_capability('moodle/user:readuserblogs', $personalcontext)) {
print_error('cannotviewuserblog', 'blog');
}
if (!blog_user_can_view_user_entry($userid)) {
if (!has_capability('moodle/blog:view', $sitecontext) || !blog_user_can_view_user_entry($userid)) {
print_error('cannotviewcourseblog', 'blog');
}
+45 -18
View File
@@ -65,35 +65,36 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
global $CFG, $USER, $DB;
if (empty($CFG->enableblogs)) {
return false; // blog system disabled
return false; // Blog system disabled.
}
if (isloggedin() && $USER->id == $targetuserid) {
return true; // can view own entries in any case
return true; // Can view own entries in any case.
}
$sitecontext = context_system::instance();
if (has_capability('moodle/blog:manageentries', $sitecontext)) {
return true; // can manage all entries
return true; // Can manage all entries.
}
// coming for 1 entry, make sure it's not a draft
// If blog is in draft state, then make sure user have proper capability.
if ($blogentry && $blogentry->publishstate == 'draft' && !has_capability('moodle/blog:viewdrafts', $sitecontext)) {
return false; // can not view draft of others
return false; // Can not view draft of others.
}
// coming for 0 entry, make sure user is logged in, if not a public blog
// If blog entry is not public, make sure user is logged in.
if ($blogentry && $blogentry->publishstate != 'public' && !isloggedin()) {
return false;
}
// If blogentry is not passed or all above checks pass, then check capability based on system config.
switch ($CFG->bloglevel) {
case BLOG_GLOBAL_LEVEL:
return true;
break;
case BLOG_SITE_LEVEL:
if (isloggedin()) { // not logged in viewers forbidden
if (isloggedin()) { // Not logged in viewers forbidden.
return true;
}
return false;
@@ -101,6 +102,7 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
case BLOG_USER_LEVEL:
default:
// If user is viewing other user blog, then user should have user:readuserblogs capability.
$personalcontext = context_user::instance($targetuserid);
return has_capability('moodle/user:readuserblogs', $personalcontext);
break;
@@ -601,7 +603,7 @@ function blog_get_options_for_module($module, $user=null) {
}
if (array_key_exists($key, $moduleoptions)) {
// Serve from the cache so we don't have to regenerate
return $moduleoptions[$module->id];
return $moduleoptions[$key];
}
$canparticipate = (is_enrolled($modcontext) or is_viewing($modcontext));
@@ -955,8 +957,12 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
$tagrec = $DB->get_record('tag', array('id'=>$tagid));
$PAGE->navbar->add($tagrec->name, $blogurl);
} elseif (!empty($tag)) {
$blogurl->param('tag', $tag);
$PAGE->navbar->add(get_string('tagparam', 'blog', $tag), $blogurl);
if ($tagrec = $DB->get_record('tag', array('name' => $tag))) {
$tagid = $tagrec->id;
$headers['filters']['tag'] = $tagid;
$blogurl->param('tag', $tag);
$PAGE->navbar->add(get_string('tagparam', 'blog', $tag), $blogurl);
}
}
// Append Search info
@@ -1000,6 +1006,8 @@ function blog_get_associated_count($courseid, $cmid=null) {
* may have switch to turn on/off comments option, this callback will
* affect UI display, not like pluginname_comment_validate only throw
* exceptions.
* blog_comment_validate will be called before viewing/adding/deleting
* comment, so don't repeat checks.
* Capability check has been done in comment->check_permissions(), we
* don't need to do it again here.
*
@@ -1016,7 +1024,17 @@ function blog_get_associated_count($courseid, $cmid=null) {
* @return array
*/
function blog_comment_permissions($comment_param) {
return array('post'=>true, 'view'=>true);
global $DB;
// If blog is public and current user is guest, then don't let him post comments.
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), 'publishstate', MUST_EXIST);
if ($blogentry->publishstate != 'public') {
if (!isloggedin() || isguestuser()) {
return array('post' => false, 'view' => true);
}
}
return array('post' => true, 'view' => true);
}
/**
@@ -1035,16 +1053,21 @@ function blog_comment_permissions($comment_param) {
* @return boolean
*/
function blog_comment_validate($comment_param) {
global $DB;
// validate comment itemid
if (!$entry = $DB->get_record('post', array('id'=>$comment_param->itemid))) {
throw new comment_exception('invalidcommentitemid');
global $CFG, $DB, $USER;
// Check if blogs are enabled user can comment.
if (empty($CFG->enableblogs) || empty($CFG->blogusecomments)) {
throw new comment_exception('nopermissiontocomment');
}
// validate comment area
// Validate comment area.
if ($comment_param->commentarea != 'format_blog') {
throw new comment_exception('invalidcommentarea');
}
// validation for comment deletion
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), '*', MUST_EXIST);
// Validation for comment deletion.
if (!empty($comment_param->commentid)) {
if ($record = $DB->get_record('comments', array('id'=>$comment_param->commentid))) {
if ($record->commentarea != 'format_blog') {
@@ -1060,7 +1083,11 @@ function blog_comment_validate($comment_param) {
throw new comment_exception('invalidcommentid');
}
}
return true;
// Validate if user has blog view permission.
$sitecontext = context_system::instance();
return has_capability('moodle/blog:view', $sitecontext) &&
blog_user_can_view_user_entry($blogentry->userid, $blogentry);
}
/**
+7 -4
View File
@@ -119,11 +119,14 @@ class core_blog_renderer extends plugin_renderer_base {
// Body.
$o .= format_text($entry->summary, $entry->summaryformat, array('overflowdiv' => true));
// Uniquehash is used as a link to an external blog.
if (!empty($entry->uniquehash)) {
$o .= $this->output->container_start('externalblog');
$o .= html_writer::link($entry->uniquehash, get_string('linktooriginalentry', 'blog'));
$o .= $this->output->container_end();
// Uniquehash is used as a link to an external blog.
$url = clean_param($entry->uniquehash, PARAM_URL);
if (!empty($url)) {
$o .= $this->output->container_start('externalblog');
$o .= html_writer::link($url, get_string('linktooriginalentry', 'blog'));
$o .= $this->output->container_end();
}
}
// Links to tags.
+14
View File
@@ -330,3 +330,17 @@ function blog_rss_save_file($type, $id, $tagid=0, $contents='') {
return $status;
}
/**
* Delete the supplied user's cached blog post RSS feed.
* Only user blogs are available by RSS.
* This doesn't call rss_delete_file() as blog RSS caching uses it's own file structure.
*
* @param int $userid
*/
function blog_rss_delete_file($userid) {
$filename = blog_rss_file_name('user', $userid);
if (file_exists($filename)) {
unlink($filename);
}
}
+8 -7
View File
@@ -18,13 +18,14 @@ A definition:
'requiremultipleidentifiers' => false, // Optional
'requirelockingread' => false, // Optional
'requirelockingwrite' => false, // Optional
'requiresearchable' => false, // Optional
'maxsize' => null, // Optional
'overrideclass' => null, // Optional
'overrideclassfile' => null, // Optional
'datasource' => null, // Optional
'datasourcefile' => null, // Optional
'persistent' => false, // Optional
'persistentmaxsize' => false, // Optional
'staticacceleration' => false, // Optional
'staticaccelerationsize' => false, // Optional
'ttl' => 0, // Optional
'mappingsonly' => false // Optional
'invalidationevents' => array( // Optional
@@ -135,24 +136,24 @@ The following optional settings can also be defined:
* requiremultipleidentifiers - If set to true then only stores that support multiple identifiers will be used.
* requirelockingread - If set to true a lock will be acquired for reading. Don't use this setting unless you have a REALLY good reason to.
* requirelockingwrite - If set to true a lock will be acquired before writing to the cache. Avoid this unless necessary.
* requiresearchable - If set to true only stores that support key searching will be used for this definition. Its not recommended to use this unless absolutely unavoidable.
* maxsize - This gives a cache an indication about the maximum items it should store. Cache stores don't have to use this, it is up to them to decide if its required.
* overrideclass - If provided this class will be used for the loader. It must extend one of the core loader classes (based upon mode).
* overrideclassfile - Included if required when using the overrideclass param.
* datasource - If provided this class will be used as a data source for the definition. It must implement the cache_data_source interface.
* datasourcefile - Included if required when using the datasource param.
* persistent - If set to true the loader will be stored when first created and provided to subsequent requests. More on this later.
* persistentmaxsize - If set to an int this will be the maximum number of items stored in the persistent cache.
* staticacceleration - Any data passing through the cache will be held onto to make subsequent requests for it faster.
* staticaccelerationsize - If set to an int this will be the maximum number of items stored in the static acceleration array.
* ttl - Can be used to set a ttl value for data being set for this cache.
* mappingsonly - This definition can only be used if there is a store mapping for it. More on this later.
* invalidationevents - An array of events that should trigger this cache to invalidate.
It's important to note that internally the definition is also aware of the component. This is picked up when the definition is read, based upon the location of the caches.php file.
The persist option.
As noted the persist option causes the loader generated for this definition to be stored when first created. Subsequent requests for this definition will be given the original loader instance.
The staticacceleration option.
Data passed to or retrieved from the loader and its chained loaders gets cached by the instance.
This option should be used when you know you will require the loader several times and perhaps in different areas of code.
Because it caches key=>value data it avoids the need to re-fetch things from stores after the first request. Its good for performance, bad for memory.
Memory use can be controlled by setting the staticaccelerationsize option.
It should be used sparingly.
The mappingsonly option.
+2 -1
View File
@@ -100,7 +100,7 @@ if (!empty($action) && confirm_sesskey()) {
if (!array_key_exists($store, $stores)) {
$notifysuccess = false;
$notification = get_string('invalidstore');
$notification = get_string('invalidstore', 'cache');
} else if ($stores[$store]['mappings'] > 0) {
$notifysuccess = false;
$notification = get_string('deletestorehasmappings', 'cache');
@@ -177,6 +177,7 @@ if (!empty($action) && confirm_sesskey()) {
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
/* @var core_cache_renderer $renderer */
$renderer = $PAGE->get_renderer('core_cache');
echo $renderer->header();
+142 -30
View File
@@ -75,19 +75,14 @@ defined('MOODLE_INTERNAL') || die();
* [string] A class to use as the data loader for this definition.
* Any class used here must inherit the cache_data_loader interface.
* + datasourcefile
* [string] Suplements the above setting indicated the file containing the class to be used. This file is included when
* [string] Supplements the above setting indicating the file containing the class to be used. This file is included when
* required.
* + persistent
* [bool] This setting does two important things. First it tells the cache API to only instantiate the cache structure for
* this definition once, further requests will be given the original instance.
* Second the cache loader will keep an array of the items set and retrieved to the cache during the request.
* This has several advantages including better performance without needing to start passing the cache instance between
* function calls, the downside is that the cache instance + the items used stay within memory.
* Consider using this setting when you know that there are going to be many calls to the cache for the same information
* or when you are converting existing code to the cache and need to access the cache within functions but don't want
* to add it as an argument to the function.
* + persistentmaxsize
* [int] This supplements the above setting by limiting the number of items in the caches persistent array of items.
* + staticacceleration
* The cache loader will keep an array of the items set and retrieved to the cache during the request.
* Consider using this setting when you know that there are going to be many calls to the cache for the same information.
* Requests for data in this array will be ultra fast, but it will cost memory.
* + staticaccelerationsize
* [int] This supplements the above setting by limiting the number of items in the static acceleration array.
* Tweaking this setting lower will allow you to minimise the memory implications above while hopefully still managing to
* offset calls to the cache store.
* + ttl
@@ -183,6 +178,13 @@ class cache_definition {
*/
protected $requirelockingwrite = false;
/**
* Gets set to true if this definition requires searchable stores.
* @since 2.4.4
* @var bool
*/
protected $requiresearchable = false;
/**
* Sets the maximum number of items that can exist in the cache.
* Please note this isn't a hard limit, and doesn't need to be enforced by the caches. They can choose to do so optionally.
@@ -221,16 +223,16 @@ class cache_definition {
protected $datasourceaggregate = null;
/**
* Set to true if the definitions cache should be persistent
* Set to true if the cache should hold onto items passing through it to speed up subsequent requests.
* @var bool
*/
protected $persistent = false;
protected $staticacceleration = false;
/**
* The persistent item array max size.
* The maximum number of items that static acceleration cache should hold onto.
* @var int
*/
protected $persistentmaxsize = false;
protected $staticaccelerationsize = false;
/**
* The TTL for data in this cache. Please don't use this, instead use event driven invalidation.
@@ -254,7 +256,7 @@ class cache_definition {
* An array of identifiers provided to this cache when it was initialised.
* @var array
*/
protected $identifiers = array();
protected $identifiers = null;
/**
* Key prefix for use with single key cache stores
@@ -307,13 +309,14 @@ class cache_definition {
$requiremultipleidentifiers = false;
$requirelockingread = false;
$requirelockingwrite = false;
$requiresearchable = ($mode === cache_store::MODE_SESSION) ? true : false;
$maxsize = null;
$overrideclass = null;
$overrideclassfile = null;
$datasource = null;
$datasourcefile = null;
$persistent = false;
$persistentmaxsize = false;
$staticacceleration = false;
$staticaccelerationsize = false;
$ttl = 0;
$mappingsonly = false;
$invalidationevents = array();
@@ -342,6 +345,10 @@ class cache_definition {
}
$requirelocking = $requirelockingwrite || $requirelockingread;
if (array_key_exists('requiresearchable', $definition)) {
$requiresearchable = (bool)$definition['requiresearchable'];
}
if (array_key_exists('maxsize', $definition)) {
$maxsize = (int)$definition['maxsize'];
}
@@ -361,10 +368,18 @@ class cache_definition {
}
if (array_key_exists('persistent', $definition)) {
$persistent = (bool)$definition['persistent'];
// Ahhh this is the legacy persistent option.
$staticacceleration = (bool)$definition['persistent'];
}
if (array_key_exists('staticacceleration', $definition)) {
$staticacceleration = (bool)$definition['staticacceleration'];
}
if (array_key_exists('persistentmaxsize', $definition)) {
$persistentmaxsize = (int)$definition['persistentmaxsize'];
// Ahhh this is the legacy persistentmaxsize option.
$staticaccelerationsize = (int)$definition['persistentmaxsize'];
}
if (array_key_exists('staticaccelerationsize', $definition)) {
$staticaccelerationsize = (int)$definition['staticaccelerationsize'];
}
if (array_key_exists('ttl', $definition)) {
$ttl = (int)$definition['ttl'];
@@ -433,14 +448,15 @@ class cache_definition {
$cachedefinition->requirelocking = $requirelocking;
$cachedefinition->requirelockingread = $requirelockingread;
$cachedefinition->requirelockingwrite = $requirelockingwrite;
$cachedefinition->requiresearchable = $requiresearchable;
$cachedefinition->maxsize = $maxsize;
$cachedefinition->overrideclass = $overrideclass;
$cachedefinition->overrideclassfile = $overrideclassfile;
$cachedefinition->datasource = $datasource;
$cachedefinition->datasourcefile = $datasourcefile;
$cachedefinition->datasourceaggregate = $datasourceaggregate;
$cachedefinition->persistent = $persistent;
$cachedefinition->persistentmaxsize = $persistentmaxsize;
$cachedefinition->staticacceleration = $staticacceleration;
$cachedefinition->staticaccelerationsize = $staticaccelerationsize;
$cachedefinition->ttl = $ttl;
$cachedefinition->mappingsonly = $mappingsonly;
$cachedefinition->invalidationevents = $invalidationevents;
@@ -461,7 +477,8 @@ class cache_definition {
* - simplekeys : Set to true if the keys you will use are a-zA-Z0-9_
* - simpledata : Set to true if the type of the data you are going to store is scalar, or an array of scalar vars
* - overrideclass : The class to use as the loader.
* - persistent : If set to true the cache will persist construction requests.
* - staticacceleration : If set to true the cache will hold onto data passing through it.
* - staticaccelerationsize : Set it to an int to limit the size of the staticacceleration cache.
* @return cache_application|cache_session|cache_request
*/
public static function load_adhoc($mode, $component, $area, array $options = array()) {
@@ -478,7 +495,14 @@ class cache_definition {
$definition['simpledata'] = $options['simpledata'];
}
if (!empty($options['persistent'])) {
$definition['persistent'] = $options['persistent'];
// Ahhh this is the legacy persistent option.
$definition['staticacceleration'] = (bool)$options['persistent'];
}
if (!empty($options['staticacceleration'])) {
$definition['staticacceleration'] = (bool)$options['staticacceleration'];
}
if (!empty($options['staticaccelerationsize'])) {
$definition['staticaccelerationsize'] = (int)$options['staticaccelerationsize'];
}
if (!empty($options['overrideclass'])) {
$definition['overrideclass'] = $options['overrideclass'];
@@ -558,6 +582,9 @@ class cache_definition {
* @return array
*/
public function get_identifiers() {
if (!isset($this->identifiers)) {
return array();
}
return $this->identifiers;
}
@@ -633,6 +660,15 @@ class cache_definition {
return $this->requirelockingwrite;
}
/**
* Returns true if this definition requires a searchable cache.
* @since 2.4.4
* @return bool
*/
public function require_searchable() {
return $this->requiresearchable;
}
/**
* Returns true if this definition has an associated data source.
* @return bool
@@ -661,11 +697,22 @@ class cache_definition {
* @throws coding_exception
*/
public function set_identifiers(array $identifiers = array()) {
// If we are setting the exact same identifiers then just return as nothing really changed.
// We don't care about order as cache::make will use the same definition order all the time.
if ($identifiers === $this->identifiers) {
return;
}
foreach ($this->requireidentifiers as $identifier) {
if (!array_key_exists($identifier, $identifiers)) {
throw new coding_exception('Identifier required for cache has not been provided: '.$identifier);
}
}
if ($this->identifiers === null) {
// Initialize identifiers if they have not been.
$this->identifiers = array();
}
foreach ($identifiers as $name => $value) {
$this->identifiers[$name] = (string)$value;
}
@@ -686,23 +733,61 @@ class cache_definition {
if ($this->require_multiple_identifiers()) {
$requires += cache_store::SUPPORTS_MULTIPLE_IDENTIFIERS;
}
if ($this->require_searchable()) {
$requires += cache_store::IS_SEARCHABLE;
}
return $requires;
}
/**
* Returns true if this definitions cache should be made persistent.
*
* Please call {@link cache_definition::use_static_acceleration()} instead.
*
* @deprecated since 2.4.7
* @return bool
*/
public function should_be_persistent() {
return $this->persistent;
debugging('Please upgrade your code to use cache_definition::use_static_acceleration', DEBUG_DEVELOPER);
return $this->use_static_acceleration();
}
/**
* Returns the max size for the persistent item array in the cache.
* Returns true if we should hold onto the data flowing through the cache.
*
* If set to true data flowing through the cache will be stored in a static variable
* to make subsequent requests for the data much faster.
*
* @return bool
*/
public function use_static_acceleration() {
if ($this->mode === cache_store::MODE_REQUEST) {
// Request caches should never use static acceleration - it just doesn't make sense.
return false;
}
return $this->staticacceleration || $this->mode === cache_store::MODE_SESSION;
}
/**
* Returns the max size for the static acceleration array.
*
* Please call {@link cache_definition::get_static_acceleration_size()} instead.
*
* @see cache_definition::get_static_acceleration_size()
* @deprecated since 2.4.7
* @return int
*/
public function get_persistent_max_size() {
return $this->persistentmaxsize;
debugging('Please upgrade your code to call cache_definition::get_static_acceleration_size', DEBUG_DEVELOPER);
return $this->get_static_acceleration_size();
}
/**
* Returns the max size for the static acceleration array.
* @return int
*/
public function get_static_acceleration_size() {
return $this->staticaccelerationsize;
}
/**
@@ -749,7 +834,7 @@ class cache_definition {
'area' => $this->area,
'siteidentifier' => $this->get_cache_identifier()
);
if (!empty($this->identifiers)) {
if (isset($this->identifiers) && !empty($this->identifiers)) {
$identifiers = array();
foreach ($this->identifiers as $key => $value) {
$identifiers[] = htmlentities($key, ENT_QUOTES, 'UTF-8').'='.htmlentities($value, ENT_QUOTES, 'UTF-8');
@@ -796,4 +881,31 @@ class cache_definition {
protected function get_cache_identifier() {
return cache_helper::get_site_identifier();
}
}
/**
* Returns the possible sharing options that can be used with this defintion.
*
* @return int
*/
public function get_sharing_options() {
return $this->sharingoptions;
}
/**
* Returns the user entered sharing key for this definition.
*
* @return string
*/
public function get_user_input_sharing_key() {
return $this->userinputsharingkey;
}
/**
* Returns the user selected sharing option for this definition.
*
* @return int
*/
public function get_selected_sharing_option() {
return $this->selectedsharingoption;
}
}
+9 -8
View File
@@ -46,14 +46,15 @@ class cachestore_dummy extends cache_store {
protected $name;
/**
* Gets set to true if this store is going to persist data.
* This happens when the definition doesn't require it as the loader will not be persisting information and something has to.
* Gets set to true if this store is going to store data.
* This happens when the definition doesn't require static acceleration as the loader will not be storing information and
* something has to.
* @var bool
*/
protected $persist = false;
/**
* The persistent store array
* The stored data array
* @var array
*/
protected $store = array();
@@ -106,13 +107,13 @@ class cachestore_dummy extends cache_store {
* @param cache_definition $definition
*/
public function initialise(cache_definition $definition) {
// If the definition isn't persistent then we need to be persistent here.
// If the definition isn't using static acceleration then we need to be store data here.
// The reasoning behind this is that:
// - If the definition is persistent then the cache loader is going to
// store things in its persistent cache.
// - If the definition is not persistent then the cache loader won't try to store anything
// - If the definition is using static acceleration then the cache loader is going to
// store things in its static array.
// - If the definition is not using static acceleration then the cache loader won't try to store anything
// and we will need to store it here in order to make sure it is accessible.
$this->persist = !$definition->should_be_persistent();
$this->persist = !$definition->use_static_acceleration();
}
/**
+52 -25
View File
@@ -103,7 +103,7 @@ class cache_factory {
* An array of lock plugins.
* @var array
*/
protected $lockplugins = null;
protected $lockplugins = array();
/**
* The current state of the cache API.
@@ -150,16 +150,26 @@ class cache_factory {
*/
public static function reset() {
$factory = self::instance();
$factory->cachesfromdefinitions = array();
$factory->cachesfromparams = array();
$factory->stores = array();
$factory->reset_cache_instances();
$factory->configs = array();
$factory->definitions = array();
$factory->lockplugins = null; // MUST be null in order to force its regeneration.
$factory->lockplugins = array(); // MUST be null in order to force its regeneration.
// Reset the state to uninitialised.
$factory->state = self::STATE_UNINITIALISED;
}
/**
* Resets the stores, clearing the array of created stores.
*
* Cache objects still held onto by the code that initialised them will remain as is
* however all future requests for a cache/store will lead to a new instance being re-initialised.
*/
public function reset_cache_instances() {
$this->cachesfromdefinitions = array();
$this->cachesfromparams = array();
$this->stores = array();
}
/**
* Creates a cache object given the parameters for a definition.
*
@@ -181,9 +191,8 @@ class cache_factory {
$definition = $this->create_definition($component, $area, $aggregate);
$definition->set_identifiers($identifiers);
$cache = $this->create_cache($definition, $identifiers);
if ($definition->should_be_persistent()) {
$this->cachesfromdefinitions[$definitionname] = $cache;
}
// Loaders are always held onto to speed up subsequent requests.
$this->cachesfromdefinitions[$definitionname] = $cache;
return $cache;
}
@@ -199,7 +208,8 @@ class cache_factory {
* @param array $options An array of options, available options are:
* - simplekeys : Set to true if the keys you will use are a-zA-Z0-9_
* - simpledata : Set to true if the type of the data you are going to store is scalar, or an array of scalar vars
* - persistent : If set to true the cache will persist construction requests.
* - staticacceleration : If set to true the cache will hold onto data passing through it.
* - staticaccelerationsize : The maximum number of items to hold onto for acceleration purposes.
* @return cache_application|cache_session|cache_request
*/
public function create_cache_from_params($mode, $component, $area, array $identifiers = array(), array $options = array()) {
@@ -207,14 +217,10 @@ class cache_factory {
if (array_key_exists($key, $this->cachesfromparams)) {
return $this->cachesfromparams[$key];
}
// Get the class. Note this is a late static binding so we need to use get_called_class.
$definition = cache_definition::load_adhoc($mode, $component, $area, $options);
$config = $this->create_config_instance();
$definition->set_identifiers($identifiers);
$cache = $this->create_cache($definition, $identifiers);
if ($definition->should_be_persistent()) {
$this->cachesfromparams[$key] = $cache;
}
$this->cachesfromparams[$key] = $cache;
return $cache;
}
@@ -229,14 +235,14 @@ class cache_factory {
*/
public function create_cache(cache_definition $definition) {
$class = $definition->get_cache_class();
if ($this->is_initialising()) {
// Do nothing we just want the dummy store.
$stores = array();
} else {
$stores = cache_helper::get_cache_stores($definition);
$stores = cache_helper::get_stores_suitable_for_definition($definition);
foreach ($stores as $key => $store) {
if (!$store::are_requirements_met()) {
unset($stores[$key]);
}
}
if (count($stores) === 0) {
// Hmm no stores, better provide a dummy store to mimick functionality. The dev will be none the wiser.
// Hmm still no stores, better provide a dummy store to mimic functionality. The dev will be none the wiser.
$stores[] = $this->create_dummy_store($definition);
}
$loader = null;
@@ -252,7 +258,7 @@ class cache_factory {
/**
* Creates a store instance given its name and configuration.
*
* If the store has already been instantiated then the original objetc will be returned. (reused)
* If the store has already been instantiated then the original object will be returned. (reused)
*
* @param string $name The name of the store (must be unique remember)
* @param array $details
@@ -266,8 +272,9 @@ class cache_factory {
$store = new $class($details['name'], $details['configuration']);
$this->stores[$name] = $store;
}
/* @var cache_store $store */
$store = $this->stores[$name];
if (!$store->is_ready() || !$store->is_supported_mode($definition->get_mode())) {
if (!$store::are_requirements_met() || !$store->is_ready() || !$store->is_supported_mode($definition->get_mode())) {
return false;
}
// We always create a clone of the original store.
@@ -299,6 +306,15 @@ class cache_factory {
return $this->definitionstores[$id];
}
/**
* Returns the cache instances that have been used within this request.
* @since 2.4.7
* @return array
*/
public function get_caches_in_use() {
return $this->cachesfromdefinitions;
}
/**
* Creates a cache config instance with the ability to write if required.
*
@@ -406,7 +422,7 @@ class cache_factory {
$definition = $instance->get_definition_by_id($id);
if (!$definition) {
throw new coding_exception('The requested cache definition does not exist.'. $id, $id);
} else {
} else if (!$this->is_disabled()) {
debugging('Cache definitions reparsed causing cache reset in order to locate definition.
You should bump the version number to ensure definitions are reprocessed.', DEBUG_DEVELOPER);
}
@@ -442,6 +458,7 @@ class cache_factory {
* @return cache_lock_interface
*/
public function create_lock_instance(array $config) {
global $CFG;
if (!array_key_exists('name', $config) || !array_key_exists('type', $config)) {
throw new coding_exception('Invalid cache lock instance provided');
}
@@ -450,8 +467,16 @@ class cache_factory {
unset($config['name']);
unset($config['type']);
if ($this->lockplugins === null) {
$this->lockplugins = get_plugin_list_with_class('cachelock', '', 'lib.php');
if (!isset($this->lockplugins[$type])) {
$pluginname = substr($type, 10);
$file = $CFG->dirroot."/cache/locks/{$pluginname}/lib.php";
if (file_exists($file) && is_readable($file)) {
require_once($file);
}
if (!class_exists($type)) {
throw new coding_exception('Invalid lock plugin requested.');
}
$this->lockplugins[$type] = $type;
}
if (!array_key_exists($type, $this->lockplugins)) {
throw new coding_exception('Invalid cache lock type.');
@@ -578,7 +603,9 @@ class cache_factory {
* </code>
*/
public static function disable_stores() {
// First reset to clear any static acceleration array.
$factory = self::instance();
$factory->reset_cache_instances();
$factory->set_state(self::STATE_STORES_DISABLED);
}
}
+187 -34
View File
@@ -143,7 +143,7 @@ class cache_helper {
*
* @param array $stores
* @param cache_definition $definition
* @return array
* @return cache_store[]
*/
protected static function initialise_cachestore_instances(array $stores, cache_definition $definition) {
$return = array();
@@ -192,8 +192,7 @@ class cache_helper {
if (in_array($pluginname, $ignored)) {
continue;
}
$pluginname = clean_param($pluginname, PARAM_PLUGIN);
if (empty($pluginname)) {
if (!is_valid_plugin_name($pluginname)) {
// Better ignore plugins with problematic names here.
continue;
}
@@ -239,20 +238,24 @@ class cache_helper {
$instance = cache_config::instance();
$invalidationeventset = false;
$factory = cache_factory::instance();
$inuse = $factory->get_caches_in_use();
foreach ($instance->get_definitions() as $name => $definitionarr) {
$definition = cache_definition::load($name, $definitionarr);
if ($definition->invalidates_on_event($event)) {
// OK at this point we know that the definition has information to invalidate on the event.
// There are two routes, either its an application cache in which case we can invalidate it now.
// or it is a session cache in which case we need to set something to the "Event invalidation" definition.
// No need to deal with request caches, we don't want to change data half way through a request.
if ($definition->get_mode() === cache_store::MODE_APPLICATION) {
$cache = $factory->create_cache($definition);
$cache->delete_many($keys);
// First up check if there is a cache loader for this definition already.
// If there is we need to invalidate the keys from there.
$definitionkey = $definition->get_component().'/'.$definition->get_area();
if (isset($inuse[$definitionkey])) {
$inuse[$definitionkey]->delete_many($keys);
}
// We need to flag the event in the "Event invalidation" cache if it hasn't already happened.
if ($invalidationeventset === false) {
// We should only log events for application and session caches.
// Request caches shouldn't have events as all data is lost at the end of the request.
// Events should only be logged once of course and likely several definitions are watching so we
// track its logging with $invalidationeventset.
$logevent = ($invalidationeventset === false && $definition->get_mode() !== cache_store::MODE_REQUEST);
if ($logevent) {
// Get the event invalidation cache.
$cache = cache::make('core', 'eventinvalidation');
// Get any existing invalidated keys for this cache.
@@ -309,23 +312,25 @@ class cache_helper {
$instance = cache_config::instance();
$invalidationeventset = false;
$factory = cache_factory::instance();
$inuse = $factory->get_caches_in_use();
foreach ($instance->get_definitions() as $name => $definitionarr) {
$definition = cache_definition::load($name, $definitionarr);
if ($definition->invalidates_on_event($event)) {
// Check if this definition would result in a persistent loader being in use.
if ($definition->should_be_persistent()) {
// There may be a persistent cache loader. Lets purge that first so that any persistent data is removed.
$cache = $factory->create_cache_from_definition($definition->get_component(), $definition->get_area());
$cache->purge();
}
// Get all of the store instances that are in use for this store.
$stores = $factory->get_store_instances_in_use($definition);
foreach ($stores as $store) {
// Purge each store individually.
$store->purge();
// First up check if there is a cache loader for this definition already.
// If there is we need to invalidate the keys from there.
$definitionkey = $definition->get_component().'/'.$definition->get_area();
if (isset($inuse[$definitionkey])) {
$inuse[$definitionkey]->purge();
}
// We should only log events for application and session caches.
// Request caches shouldn't have events as all data is lost at the end of the request.
// Events should only be logged once of course and likely several definitions are watching so we
// track its logging with $invalidationeventset.
$logevent = ($invalidationeventset === false && $definition->get_mode() !== cache_store::MODE_REQUEST);
// We need to flag the event in the "Event invalidation" cache if it hasn't already happened.
if ($invalidationeventset === false) {
if ($logevent && $invalidationeventset === false) {
// Get the event invalidation cache.
$cache = cache::make('core', 'eventinvalidation');
// Create a key to invalidate all.
@@ -347,6 +352,11 @@ class cache_helper {
* @param string $definition
*/
protected static function ensure_ready_for_stats($store, $definition) {
// This function is performance-sensitive, so exit as quickly as possible
// if we do not need to do anything.
if (isset(self::$stats[$definition][$store])) {
return;
}
if (!array_key_exists($definition, self::$stats)) {
self::$stats[$definition] = array(
$store => array(
@@ -367,34 +377,40 @@ class cache_helper {
/**
* Record a cache hit in the stats for the given store and definition.
*
* @internal
* @param string $store
* @param string $definition
* @param int $hits The number of hits to record (by default 1)
*/
public static function record_cache_hit($store, $definition) {
public static function record_cache_hit($store, $definition, $hits = 1) {
self::ensure_ready_for_stats($store, $definition);
self::$stats[$definition][$store]['hits']++;
self::$stats[$definition][$store]['hits'] += $hits;
}
/**
* Record a cache miss in the stats for the given store and definition.
*
* @internal
* @param string $store
* @param string $definition
* @param int $misses The number of misses to record (by default 1)
*/
public static function record_cache_miss($store, $definition) {
public static function record_cache_miss($store, $definition, $misses = 1) {
self::ensure_ready_for_stats($store, $definition);
self::$stats[$definition][$store]['misses']++;
self::$stats[$definition][$store]['misses'] += $misses;
}
/**
* Record a cache set in the stats for the given store and definition.
*
* @internal
* @param string $store
* @param string $definition
* @param int $sets The number of sets to record (by default 1)
*/
public static function record_cache_set($store, $definition) {
public static function record_cache_set($store, $definition, $sets = 1) {
self::ensure_ready_for_stats($store, $definition);
self::$stats[$definition][$store]['sets']++;
self::$stats[$definition][$store]['sets'] += $sets;
}
/**
@@ -439,8 +455,9 @@ class cache_helper {
$class = $store['class'];
// Found the store: is it ready?
/* @var cache_store $instance */
$instance = new $class($store['name'], $store['configuration']);
if (!$instance->is_ready()) {
if (!$instance::are_requirements_met() || !$instance->is_ready()) {
unset($instance);
return false;
}
@@ -511,6 +528,7 @@ class cache_helper {
* Update the site identifier stored by the cache API.
*
* @param string $siteidentifier
* @return string The new site identifier.
*/
public static function update_site_identifier($siteidentifier) {
global $CFG;
@@ -519,9 +537,10 @@ class cache_helper {
$factory = cache_factory::instance();
$factory->updating_started();
$config = $factory->create_config_instance(true);
$config->update_site_identifier($siteidentifier);
$siteidentifier = $config->update_site_identifier($siteidentifier);
$factory->updating_finished();
cache_factory::reset();
return $siteidentifier;
}
/**
@@ -530,11 +549,30 @@ class cache_helper {
* @return string
*/
public static function get_site_identifier() {
if (is_null(self::$siteidentifier)) {
$factory = cache_factory::instance();
global $CFG;
if (!is_null(self::$siteidentifier)) {
return self::$siteidentifier;
}
// If site identifier hasn't been collected yet attempt to get it from the cache config.
$factory = cache_factory::instance();
// If the factory is initialising then we don't want to try to get it from the config or we risk
// causing the cache to enter an infinite initialisation loop.
if (!$factory->is_initialising()) {
$config = $factory->create_config_instance();
self::$siteidentifier = $config->get_site_identifier();
}
if (is_null(self::$siteidentifier)) {
// If the site identifier is still null then config isn't aware of it yet.
// We'll see if the CFG is loaded, and if not we will just use unknown.
// It's very important here that we don't use get_config. We don't want an endless cache loop!
if (!empty($CFG->siteidentifier)) {
self::$siteidentifier = self::update_site_identifier($CFG->siteidentifier);
} else {
// It's not being recorded in MUC's config and the config data hasn't been loaded yet.
// Likely we are initialising.
return 'unknown';
}
}
return self::$siteidentifier;
}
@@ -547,4 +585,119 @@ class cache_helper {
global $CFG;
return (string)$CFG->version;
}
/**
* Runs cron routines for MUC.
*/
public static function cron() {
self::clean_old_session_data(true);
}
/**
* Cleans old session data from cache stores used for session based definitions.
*
* @param bool $output If set to true output will be given.
*/
public static function clean_old_session_data($output = false) {
global $CFG;
if ($output) {
mtrace('Cleaning up stale session data from cache stores.');
}
$factory = cache_factory::instance();
$config = $factory->create_config_instance();
$definitions = $config->get_definitions();
$purgetime = time() - $CFG->sessiontimeout;
foreach ($definitions as $definitionarray) {
// We are only interested in session caches.
if (!($definitionarray['mode'] & cache_store::MODE_SESSION)) {
continue;
}
$definition = $factory->create_definition($definitionarray['component'], $definitionarray['area']);
$stores = $config->get_stores_for_definition($definition);
// Turn them into store instances.
$stores = self::initialise_cachestore_instances($stores, $definition);
// Initialise all of the stores used for that definition.
foreach ($stores as $store) {
// If the store doesn't support searching we can skip it.
if (!($store instanceof cache_is_searchable)) {
debugging('Cache stores used for session definitions should ideally be searchable.', DEBUG_DEVELOPER);
continue;
}
// Get all of the keys.
$keys = $store->find_by_prefix(cache_session::KEY_PREFIX);
$todelete = array();
foreach ($store->get_many($keys) as $key => $value) {
if (strpos($key, cache_session::KEY_PREFIX) !== 0 || !is_array($value) || !isset($value['lastaccess'])) {
continue;
}
if ((int)$value['lastaccess'] < $purgetime || true) {
$todelete[] = $key;
}
}
if (count($todelete)) {
$outcome = (int)$store->delete_many($todelete);
if ($output) {
$strdef = s($definition->get_id());
$strstore = s($store->my_name());
mtrace("- Removed {$outcome} old {$strdef} sessions from the '{$strstore}' cache store.");
}
}
}
}
}
/**
* Returns an array of stores that would meet the requirements for every definition.
*
* These stores would be 100% suitable to map as defaults for cache modes.
*
* @return array[] An array of stores, keys are the store names.
*/
public static function get_stores_suitable_for_mode_default() {
$factory = cache_factory::instance();
$config = $factory->create_config_instance();
$requirements = 0;
foreach ($config->get_definitions() as $definition) {
$definition = cache_definition::load($definition['component'].'/'.$definition['area'], $definition);
$requirements = $requirements | $definition->get_requirements_bin();
}
$stores = array();
foreach ($config->get_all_stores() as $name => $store) {
if (!empty($store['features']) && ($store['features'] & $requirements)) {
$stores[$name] = $store;
}
}
return $stores;
}
/**
* Returns stores suitable for use with a given definition.
*
* @param cache_definition $definition
* @return cache_store[]
*/
public static function get_stores_suitable_for_definition(cache_definition $definition) {
$factory = cache_factory::instance();
$stores = array();
if ($factory->is_initialising() || $factory->stores_disabled()) {
// No suitable stores here.
return $stores;
} else {
$stores = self::get_cache_stores($definition);
if (count($stores) === 0) {
// No suitable stores we found for the definition. We need to come up with a sensible default.
// If this has happened we can be sure that the user has mapped custom stores to either the
// mode of the definition. The first alternative to try is the system default for the mode.
// e.g. the default file store instance for application definitions.
$config = $factory->create_config_instance();
foreach ($config->get_stores($definition->get_mode()) as $name => $details) {
if (!empty($details['default'])) {
$stores[] = $factory->create_store_from_config($name, $details, $definition);
break;
}
}
}
}
return $stores;
}
}
+24
View File
@@ -338,6 +338,30 @@ interface cache_is_key_aware {
public function has_all(array $keys);
}
/**
* Cache store feature: keys are searchable.
*
* Cache stores can choose to implement this interface.
* In order for a store to be usable as a session cache it must implement this interface.
*
* @since 2.4.4
*/
interface cache_is_searchable {
/**
* Finds all of the keys being used by the cache store.
*
* @return array.
*/
public function find_all();
/**
* Finds all of the keys whose keys start with the given prefix.
*
* @param string $prefix
*/
public function find_by_prefix($prefix);
}
/**
* Cache store feature: configurable.
*
+716 -76
View File
File diff suppressed because it is too large Load Diff

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