Compare commits

...

4360 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 0e088aec08 Moodle release 2.6.1 2014-01-11 15:57:34 +01:00
Eloy Lafuente (stronk7) 378240d57d MDL-43646 "disapprove" changed to "undo approval" 2014-01-10 19:55:23 +01:00
Eloy Lafuente (stronk7) d339d41274 MDL-43590 move unapprove to undo approval 2014-01-10 18:55:17 +01:00
Eloy Lafuente (stronk7) 02b5deb65a Merge branch 'MDL-43590-en_fix_26' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-01-10 10:10:27 +01:00
Damyon Wiese 704ecfea00 weekly release 2.6+ 2014-01-10 14:20:58 +08:00
Damyon Wiese 8aaad0d2b6 Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-01-10 14:20:52 +08:00
Eloy Lafuente (stronk7) 8d5b7ed598 MDL-36721 make upgrade queries cross-db 2014-01-10 11:20:52 +08:00
Eloy Lafuente (stronk7) d9aa7cbb6f Merge branch 'wip-MDL-43283-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-09 23:07:52 +01:00
Marina Glancy 61d35d7b9d MDL-43283 mod_chat: corrected SQL query to follow strict groupping rules 2014-01-09 15:38:29 +08:00
AMOS bot 963e29f6b2 Automatically generated installer lang files 2014-01-09 00:42:12 +00:00
Helen Foster 8772689453 MDL-43590 Merge English strings from the en_fix language pack 2014-01-09 01:11:59 +01:00
Andrew Nicols 5cf42ac843 MDL-40119 Forms: Remove cursor style override for calendar button 2014-01-08 11:14:37 +01:00
David Monllao 5bb7f7e0dc MDL-43423 behat: Increasing the timeout to 6 seconds 2014-01-08 09:56:10 +01:00
Dan Poltawski 135634fbd3 Merge branch 'wip-MDL-43606-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-01-08 14:33:11 +08:00
Marina Glancy 6f70004a0d MDL-43606 tinymce_managefiles: bump version
to allow smooth upgrade from contributed plugin in 2.5
2014-01-08 13:57:54 +08:00
Dan Poltawski d99f765ee6 Merge branch 'MDL-43595-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-01-08 11:34:48 +08:00
Damyon Wiese 87f4750d75 MDL-43595: The dropdowns for editpdf stopped working due to a recent change. 2014-01-08 09:20:04 +08:00
Eloy Lafuente (stronk7) a3fa0ca96f Merge branch 'MDL-40119-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-08 02:17:42 +01:00
Eloy Lafuente (stronk7) 895e16ff28 Merge branch 'w01_MDL-42797_m26_admin' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-08 02:10:36 +01:00
Eloy Lafuente (stronk7) 93073173ce Merge branch 'MDL-43423_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-08 02:02:56 +01:00
Eloy Lafuente (stronk7) 5c283bb713 Merge branch 'wip-MDL-42310-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-01-08 01:52:12 +01:00
Dan Poltawski e86b3c7335 Merge branch 'MDL-43173_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-01-08 08:21:09 +08:00
Eloy Lafuente (stronk7) 52d8541b5b Merge branch 'm26_MDL-43508_Invalid_String_Identifier' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-08 00:46:13 +01:00
Eloy Lafuente (stronk7) 99a57908f5 Merge branch 'MDL-42607_rss_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-08 00:42:45 +01:00
Eloy Lafuente (stronk7) ebe415f889 Merge branch 'MDL-42392-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-08 00:33:48 +01:00
Eloy Lafuente (stronk7) f0d61c012d Merge branch 'MDL-43451-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-07 23:38:28 +01:00
Dan Poltawski d829440fed Merge branch 'w01_MDL-43510_m26_test404' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-07 17:26:01 +08:00
Dan Poltawski e57bc1637c Merge branch 'm26_MDL-43482_Lot_Of_Passed_By_Reference_Messages' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-07 17:20:49 +08:00
Damyon Wiese 708e0804b8 Merge branch 'w01_MDL-43585_m26_userlib' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-07 13:33:53 +08:00
Damyon Wiese 3a8e16ecab Merge branch 'MDL-43411-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-07 12:52:49 +08:00
Dan Poltawski 9fe6a6f42b Merge branch 'm26_MDL-40379_Prevent_Some_Mobile_Network_Providers_From_Modifying_Content' of https://github.com/scara/moodle into MOODLE_26_STABLE 2014-01-07 12:43:29 +08:00
Petr Škoda 7f5a384c99 MDL-43585 remove incorrect user/lib.php include 2014-01-07 12:16:34 +08:00
Dan Poltawski 836399115b Merge branch 'MDL-42995-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-07 11:51:18 +08:00
Dan Poltawski adb28ab708 Merge branch 'wip-mdl-43521-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-01-07 11:08:28 +08:00
Rajesh Taneja c783a874f0 MDL-42643 course: Member in same group should only loginas
If course groupmode is set to SEPARATEGROUPS, and user doesn't have
site:accessallgroups capability than only allow user to loginas if
current user is in same group as loginas user
2014-01-07 11:05:27 +08:00
Dan Poltawski 883ea035af Merge branch 'MDL-43394a-26' of https://github.com/srynot4sale/moodle into MOODLE_26_STABLE 2014-01-07 11:00:12 +08:00
Tony Butler c56a930df8 MDL-43373 core_enrol: Display enrolments dimmed if outside of start or end times 2014-01-07 10:44:29 +08:00
Damyon Wiese 28abbabae5 Merge branch 'MDL-43448_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-01-07 09:22:15 +08:00
AMOS bot 2010db2cd4 Automatically generated installer lang files 2014-01-07 00:41:52 +00:00
Frederic Massart 396b5cc75b MDL-42995 mod_assign: Extended tests for update_calendar method 2014-01-06 10:32:06 +01:00
Frederic Massart 49a9cc9bd1 MDL-42995 mod_assign: Remove files from calendar event description 2014-01-06 10:32:00 +01:00
Frederic Massart 5bf8b2e969 MDL-42995 libraries: Global function to strip pluginfile content 2014-01-06 10:31:48 +01:00
Damyon Wiese 9ce83d0908 Merge branch 'MDL-43399-26' of git://github.com/mouneyrac/moodle into MOODLE_26_STABLE 2014-01-06 16:14:02 +08:00
Damyon Wiese 0f399f7f74 Merge branch 'MDL-43454-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-06 15:52:17 +08:00
Damyon Wiese 5726fe6263 Merge branch 'w01_MDL-36721_m26_passlog' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-01-06 14:51:16 +08:00
Dan Poltawski e3e938b861 Merge branch '43349-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-01-06 14:21:45 +08:00
Rajesh Taneja 3dd7b4f805 MDL-42883 Administration: Check sessionkey before taking action on user profile fields 2014-01-06 13:58:59 +08:00
Tony Butler cf3f46344e MDL-43408 gradereport_grader: Display users with expired enrolments as inactive in grader report 2014-01-06 10:38:13 +08:00
Sam Hemelryk 0cb1903bfd Merge branch 'MDL-35973_redirect_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-01-06 11:28:25 +13:00
Sam Hemelryk 8571b889f3 Merge branch 'MDL-43281-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-06 11:22:09 +13:00
Sam Hemelryk ec9f2a7d3f Merge branch 'MDL-42212-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-01-06 10:30:13 +13:00
Sam Hemelryk 97e9098927 Merge branch 'MDL-42801-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-01-06 10:20:39 +13:00
Andrew Davis 44b74479cb MDL-35973 lib: added a page title to redirect() and added 2 seconds to the page redirection when posting in a forum 2014-01-05 20:08:05 +08:00
AMOS bot 6a4e20e239 Automatically generated installer lang files 2014-01-04 00:51:51 +00:00
David Monllao adf125a30b MDL-43173 behat: Thowing an exception if the JS is not ready 2014-01-03 11:29:56 +08:00
Rajesh Taneja 3db84ae082 MDL-43521 block_admin_bookmarks: Site admin node is of type TYPE_SITE_ADMIN
Since 2.6 Site admin node is of type TYPE_SITE_ADMIN, previously it was TYPE_SETTING
2014-01-03 10:47:39 +08:00
Michael Milette 025000a221 MDL-42310 feedback mod - Enable filtering of multichoice and multichoice rated controls
Conflicts:
	mod/feedback/item/multichoice/lib.php
	mod/feedback/item/multichoicerated/lib.php

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thanks to Sam Marshall for suggesting this fix.
2013-11-18 15:37:15 +08:00
Damyon Wiese 02e45bf269 Merge branch 'MDL-42808-master' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2013-11-18 15:27:22 +08:00
Damyon Wiese 28fccc09ce Merge branch 'm26_MDL-41695' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2013-11-18 15:21:01 +08:00
sam marshall 7ed24ca351 MDL-42582 Availability: Restriction display incorrect for multi-para Labels
When a label has multiple paragraphs, its name (converted to plain text)
contains a line feed. Due to an error in regular expressions that don't
accept the line feed, this caused incorrect display on the course page
when that label is shown as a requirement for accessing another activity.
2013-11-18 14:54:55 +08:00
Mark Nelson e98f145ccc MDL-42884 core_user: fixed issue when deleting users with invalid emails throws invalidusername exception 2013-11-18 14:48:36 +08:00
Dan Poltawski 904f5815c7 Merge branch 'MDL-42930-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE
Conflicts:
	mod/scorm/db/upgrade.php
2013-11-18 14:30:50 +08:00
Damyon Wiese d29a7827c4 Merge branch 'm26_MDL-40223' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2013-11-18 14:04:23 +08:00
Petr Škoda 5cd5271673 MDL-42612 add support for Russian Ruble in PayPal 2013-11-18 11:47:18 +08:00
Damyon Wiese 005e784e22 MDL-42930 Add 2.6.0 upgrade line 2013-11-18 11:41:59 +08:00
Sam Hemelryk c20f615105 MDL-42060 block_course_list: fixed sorting of mycourses 2013-11-18 11:15:35 +13:00
Dan Marsden 685badbb2b MDL-41695 SCORM: allow unlimited decimal places in CMIDecimal 2013-11-18 10:27:59 +13:00
Dan Marsden eef55a6333 MDL-40223 SCORM: update scorm->launch param after restore - also check that scorm->launch is valid. 2013-11-18 09:48:02 +13:00
Eloy Lafuente (stronk7) fa28975f25 MDL-42929 backup: keep own version & release updated. 2013-11-17 02:34:50 +01:00
Eloy Lafuente (stronk7) 2b10fa0433 Moodle release 2.6 2013-11-16 17:28:07 +01:00
Eloy Lafuente (stronk7) ad9e81eb98 Merge branch 'MDL-42926-master' of git://github.com/damyon/moodle 2013-11-15 16:06:22 +01:00
Damyon Wiese ab9300dffe MDL-42926 Bootstrap base: Remove 6px spacing between form elements
This was accidentally copied from the css for base. It is only visible when
the form fields are displayed with the label above the field. (less than 1200px).
2013-11-15 22:58:10 +08:00
Eloy Lafuente (stronk7) 5e6da548d7 Moodle release 2.6rc1 2013-11-15 13:21:41 +01:00
Eloy Lafuente (stronk7) 9524fc754d on-demand release 2.6beta+ 2013-11-15 11:18:00 +01:00
Eloy Lafuente (stronk7) a3d0f7c792 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-11-15 11:17:55 +01:00
Damyon Wiese f059744968 MDL-42887 Form collapsing CSS fixes.
.fcontainer is not guaranteed to be in the form - we still need something else
for this selector to make it specific enough - so have replaced with #region-main (required).

Also - redid the question edit styles to be specific enough.
2013-11-15 17:40:58 +08:00
Marina Glancy 2b6344c1d0 Merge branch 'MDL-42887-master' of git://github.com/damyon/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-15 17:27:50 +11:00
Damyon Wiese d8383b247e MDL-42887 Forms: Collapse all field elements below their labels on screens less than 1180px
Includes css fixes to make the question type edit screens look OK with this change.
2013-11-15 13:40:27 +08:00
Eloy Lafuente (stronk7) 9a36c7d95c Merge branch 'MDL-42447_master' of git://github.com/dmonllao/moodle 2013-11-15 02:11:27 +01:00
David Monllao 58a3a34e38 MDL-42447 performance: New var to add perf. info to redirections 2013-11-15 09:10:22 +08:00
Eloy Lafuente (stronk7) 234159ee9d Merge branch 'wip-MDL-42912-master' of git://github.com/marinaglancy/moodle 2013-11-15 02:04:45 +01:00
Marina Glancy ceeb8102cd MDL-42912 glossary: oracle-compatibility of SQL queries 2013-11-15 11:36:11 +11:00
Eloy Lafuente (stronk7) a269acfef7 Merge branch 'MDL-42859-master' of git://github.com/mouneyrac/moodle 2013-11-14 23:24:20 +01:00
Eloy Lafuente (stronk7) 30d0332f00 Merge branch 'w47_MDL-42860_m26_dbsess' of https://github.com/skodak/moodle 2013-11-14 23:22:26 +01:00
Damyon Wiese f2f23af955 Merge branch 'MDL-42711-master' of git://github.com/nebgor/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-14 17:18:44 +08:00
Aparup Banerjee fa41a73fe7 MDL-42711 theme - css recompiled after RTL fixes. 2013-11-14 17:04:09 +08:00
Barbara Ramiro a28601c4ee MDL-42711 RTL fixed to chat.less 2013-11-14 17:01:03 +08:00
Aparup Banerjee 96c124fca0 MDL-42711 added RTL styles to chat.less . 2013-11-14 16:57:48 +08:00
Jerome Mouneyrac 7f1427e918 MDL-42859 filepicker: fix dropbox logout warning layout 2013-11-14 15:16:33 +08:00
Frederic Massart 7d31a2999b MDL-42853 course: Fix edit title icon margin on RTL 2013-11-14 10:59:35 +08:00
Frederic Massart e161a5a319 MDL-42853 frontpage: RTL alignment to match LTR 2013-11-14 10:59:23 +08:00
AMOS bot a3c5288ddd Automatically generated installer lang files 2013-11-14 00:45:19 +00:00
Eloy Lafuente (stronk7) 529d3bad0e Merge branch 'MDL-42768-master' of git://github.com/FMCorz/moodle 2013-11-13 23:15:23 +01:00
Eloy Lafuente (stronk7) 474719d327 Merge branch 'MDL-42866-master' of git://github.com/damyon/moodle 2013-11-13 23:09:09 +01:00
Damyon Wiese 60f0cd6bcd MDL-42866 EditPDF: Fix bad foreign key in install.xml
Thanks Tim for reporting this!
2013-11-13 21:46:44 +08:00
Petr Škoda ea7aa014f9 MDL-42860 improve db session help string 2013-11-13 10:54:15 +01:00
Aparup Banerjee b549e66e5e MDL-42711 added RTL styles to improvements. 2013-11-13 17:02:54 +08:00
Damyon Wiese e4af9616c3 Merge branch 'MDL-40728-master-2' of git://github.com/mouneyrac/moodle 2013-11-13 16:57:34 +08:00
Jerome Mouneyrac c8a661098e MDL-40728 courseupload: add missing help icons 2013-11-13 16:34:43 +08:00
Aparup Banerjee 6f8624f77a MDL-42711 made all theme menu strings in chat popup translatable 2013-11-13 16:22:34 +08:00
Mark Nelson 8eb2ea83d2 MDL-42100 tool_capability: fixed incorrect links 2013-11-13 00:20:28 -08:00
Damyon Wiese 6bce5b846a Merge branch 'wip-MDL-42833-master' of git://github.com/marinaglancy/moodle 2013-11-13 15:57:07 +08:00
Marina Glancy 4c35937514 Merge branch 'MDL-42849-master' of git://github.com/andrewnicols/moodle 2013-11-13 18:24:06 +11:00
Frederic Massart c7b3c10e3b MDL-42768 restore: Use sql_compare_text instead for text comparison 2013-11-13 14:46:30 +08:00
Damyon Wiese b22292ed50 Merge branch 'MDL-42705-master-nomerge' of git://github.com/mouneyrac/moodle 2013-11-13 14:42:32 +08:00
Aparup Banerjee 9c53c70c3c MDL-42711 consolidated responsive styles into responsive.less 2013-11-13 13:58:51 +08:00
Damyon Wiese 34b67813ec Merge branch 'MDL-42598' of git://github.com/timhunt/moodle 2013-11-13 13:43:52 +08:00
Barbara Ramiro c3349e7576 MDL-42711 theme bootstrapbase chat.less :Override max-width for chat user picture on chrome and safari 2013-11-13 13:33:26 +08:00
Andrew Nicols 83f91454f9 MDL-42849 ActionMenu: Tweak selector for filler and padding for edit menu 2013-11-13 13:32:36 +08:00
Damyon Wiese df6be935e1 MDL-42684 TinyMCE: Fix bootstrap CSS for putting text editors below labels. 2013-11-13 13:26:36 +08:00
Damyon Wiese 2034716c16 Merge branch 'MDL-33536-master' of git://github.com/damyon/moodle 2013-11-13 13:10:42 +08:00
Damyon Wiese db7092b076 MDL-42684 Forms: Display text editors and file pickers with the label above the field.
This includes the front page description admin field.
2013-11-13 12:52:00 +08:00
Marina Glancy 1d2a7ef54f Merge branch 'wip-mdl-42799' of https://github.com/rajeshtaneja/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-13 15:43:44 +11:00
Damyon Wiese f51d0384f7 Merge branch 'MDL-41797' of git://github.com/rwijaya/moodle 2013-11-13 11:50:36 +08:00
Aparup Banerjee 462f3dc768 MDL-42711 theme : final css compiled. 2013-11-13 11:25:12 +08:00
Aparup Banerjee 2a8ab91c70 MDL-42711 theme port from LM: fixed up mod_feedback analysis bar heights from auto to 5px 2013-11-13 11:20:14 +08:00
Aparup Banerjee cd578aa0e4 MDL-42711 theme port from LM: Info, Date and Author on the latest News block reordered
This also adds some simple clean style padding fixes for a better look.
2013-11-13 11:07:03 +08:00
Marina Glancy 5268dbffef Merge branch 'MDL-42827-master' of git://github.com/andrewnicols/moodle 2013-11-13 13:28:46 +11:00
Barbara Ramiro b8037f4fa2 MDL-42711 theme port from LM: Chat for Clean theme - minimal styling
(this converts colours to suit clean theme more)
2013-11-13 10:22:41 +08:00
Aparup Banerjee ef7810de36 MDL-42711 theme port from LM: padded date and footer in upcoming events block (part of commit for MDLSITE-2427) 2013-11-13 10:13:11 +08:00
Damyon Wiese 2b997ab5dd MDL-33536 Navigation: Add missing require_once for safety. 2013-11-13 09:59:44 +08:00
rwijaya 80fd00729b MDL-41797 external tools module: fix heading levels.
AMOS BEGIN
CPY [submissions, core_grades], [submissions, mod_lti]
AMOS END
2013-11-13 09:52:32 +08:00
Aparup Banerjee ed289a2cdd Merge branch 'MDL-42711-master' of github.com:nebgor/moodle into MDL-42711-master 2013-11-13 09:51:09 +08:00
Aparup Banerjee 95b2934b23 Merge pull request #3 from mudrd8mz/MDL-42711-lmnet-clean-theme-backport
MDL-42711 LMNET clean theme backport
2013-11-12 17:48:46 -08:00
David Mudrák ead1f5bda0 MDL-42711 theme port from LM: vertical alignment of the course icon
When the course name spans over multiple lines, vertically centered icon does
not look nice (or at least our beloved Benevolent Dictator for Life does not
like it ;-). This hack alignes the icon vertically with the first line of the
course name all the time (or at least it tries to).
2013-11-13 02:32:05 +01:00
David Mudrák 3bae4448cf MDL-42711 theme port from LM: let the course name use the full line width 2013-11-13 02:12:45 +01:00
Marina Glancy 9fcd029012 MDL-42833 course: correction to navigation path in management interface 2013-11-13 12:03:46 +11:00
David Mudrák 24b65a44c9 MDL-42711 theme port from LM: improve RSS client block styling
This significantly increases the readability of items in the block.
2013-11-13 02:03:02 +01:00
Eloy Lafuente (stronk7) 662c5263b0 Merge branch '42832-26' of git://github.com/samhemelryk/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-13 01:55:52 +01:00
David Mudrák 8bf57320e6 MDL-42711 theme port from LM: forum layout on small screen devices
This is a backport of MDLSITE-2445.  Wrapping the 'Started by' and 'Last post'
texts helps. On smaller device, these two get smaller font too. This is far
from optimal but better than the current (default) behaviour.
2013-11-13 01:48:05 +01:00
AMOS bot 7fc75f76ca Automatically generated installer lang files 2013-11-13 00:47:29 +00:00
David Mudrák 1765866fff MDL-42711 theme port from LM: survey module styling
Backport some Survey module styling from the standard theme to improve the
usability of the interface. The style is originally defined in
theme/standard/styles/modules.css
2013-11-13 01:26:21 +01:00
David Mudrák a5b83691ff MDL-42711 theme port from LM: improve the initial bar display 2013-11-13 01:17:13 +01:00
Eloy Lafuente (stronk7) 5658129967 Merge branch 'MDL-42790' of git://github.com/timhunt/moodle 2013-11-13 01:12:27 +01:00
Eloy Lafuente (stronk7) 64dcfd6ea3 Merge branch 'MDL-42839-master' of git://github.com/sammarshallou/moodle 2013-11-13 01:09:49 +01:00
Marina Glancy 930fbd0505 Merge branch 'MDL-38574' of git://github.com/timhunt/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-13 11:05:25 +11:00
Eloy Lafuente (stronk7) 183f84b5c3 Merge branch 'wip_master_mdl-42723' of https://github.com/iarenaza/moodle 2013-11-13 01:03:09 +01:00
Eloy Lafuente (stronk7) aa7bc816d9 Merge branch 'wip-MDL-42672-master' of git://github.com/marinaglancy/moodle 2013-11-12 20:07:05 +01:00
sam marshall 5c138b258d MDL-42839 MUC: Memcache server configuration too sensitive to whitespace 2013-11-12 12:33:36 +00:00
Tim Hunt c1db10b6d5 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-12 11:35:42 +00:00
Sam Hemelryk c31fc5a099 Merge branch 'MDL-42812-r1' of git://github.com/abgreeve/moodle 2013-11-12 16:30:39 +08:00
Rajesh Taneja baf881b803 MDL-42799 Assignment: Min. width/height for widget is set to 1
It was possible for user to add widgets with width/height = 0
which were not displayed to user and doesn't have much meaning to it
This patch will set min. width/height to 1
2013-11-12 16:17:40 +08:00
Aparup Banerjee 8353186f4e MDL-42711 theme port from LM: reimplemented fixes from MDLSITE-2451 to align group icons in forumpost css class (forum/blog). 2013-11-12 15:58:31 +08:00
Aparup Banerjee 73c4e333c3 MDL-42711 theme port from LM: reimplemented fixes from MDLSITE-2451 to align group icons if forumpost 2013-11-12 15:56:40 +08:00
Adrian Greeve f3fbb6137b MDL-42812 mod_quiz: Fixed up a syntax error for additional name fields. 2013-11-12 15:46:45 +08:00
Sam Hemelryk aa861f6297 MDL-42832 course: management viewmode string improvements 2013-11-12 15:32:59 +08:00
Damyon Wiese 3ebaeb11b0 Merge branch '41392-26-r1' of git://github.com/samhemelryk/moodle 2013-11-12 15:11:25 +08:00
Jerome Mouneyrac bb2f7c3ce9 MDL-42705 EditPDF: Progress bar styles in editpdf need to be moved to base theme. 2013-11-12 15:09:19 +08:00
Sam Hemelryk a14515990c MDL-41392 course: management fixed skiplinks breaking clean columns 2013-11-12 14:26:39 +08:00
Damyon Wiese a6b35417c0 Merge branch 'w46_MDL-42503_m26_stringfilters' of https://github.com/skodak/moodle 2013-11-12 14:22:28 +08:00
Jason Fowler 0b11609944 MDL-42684 TinyMCE: Correct widths on screens with narrow fieldsets 2013-11-12 14:10:01 +08:00
Sam Hemelryk b8a598ad65 Merge branch 'wip-MDL-42762-master' of git://github.com/abgreeve/moodle 2013-11-12 13:53:08 +08:00
Aparup Banerjee ff7d91053c MDL-42711 added chat.less file 2013-11-12 13:45:58 +08:00
Sam Hemelryk 0ac5863d86 Merge branch 'wip-MDL-41158-master-two' of git://github.com/abgreeve/moodle 2013-11-12 13:20:12 +08:00
Marina Glancy b6168f132b Merge branch 'MDL-42276_master' of https://github.com/markn86/moodle 2013-11-12 15:11:19 +11:00
Damyon Wiese 93e55a8bf9 MDL-42804 Database - SQL keywords should be uppercase. 2013-11-12 12:05:08 +08:00
rwijaya 94738ee7d6 MDL-42804 data_mod: fix alternate name warning for deleting an entry 2013-11-12 12:05:08 +08:00
Marina Glancy b544b09636 Merge branch 'MDL-42824-master-int' of git://github.com/FMCorz/moodle 2013-11-12 15:00:57 +11:00
Marina Glancy c7ef597040 Merge branch 'MDL-42540' of git://github.com/timhunt/moodle 2013-11-12 14:47:54 +11:00
Sam Hemelryk 6f4a169d8e Merge branch 'MDL-42215_lang' of https://github.com/andyjdavis/moodle 2013-11-12 11:34:39 +08:00
Adrian Greeve e351bed5c1 MDL-42812 libraries: Update username_load_fields_from_object to add the prefix to everything. 2013-11-12 11:30:16 +08:00
Andrew Nicols 734b5b500e MDL-42810 ActionMenu: Hide the ActionMenu when clicking on primary links 2013-11-12 11:18:33 +08:00
Aparup Banerjee 7e7e8fd316 MDL-42711 theme port from LM: MDLSITE-2463 wrap tinymce instances responsively on mod/data pages (editing) for smaller screen widths 2013-11-12 11:01:22 +08:00
Aparup Banerjee 759e970f49 MDL-42711 theme port from LM: MDLSITE-2480 fixed up course view - icon now positioned correctly when long course titles wrap on small screens 2013-11-12 10:55:07 +08:00
Adrian Greeve 3263a3562d MDL-41158 mod_workshop: Workshop submission alternate name field fix. 2013-11-12 10:40:23 +08:00
Marina Glancy 57c9bdb250 Merge branch 'MDL-42809-master' of git://github.com/andrewnicols/moodle 2013-11-12 13:34:01 +11:00
Eloy Lafuente (stronk7) 201877b5d0 Merge branch 'MDL-42573-master' of git://github.com/danpoltawski/moodle 2013-11-12 03:27:22 +01:00
Andrew Nicols 1e98b1641a MDL-42827 JavaScript: Use a more specific selector for activity links 2013-11-12 10:25:52 +08:00
Adrian Greeve 29fa62cfd9 MDL-42812 libraries: Update username_load_fields_from_object to add the prefix to everything. 2013-11-12 10:17:59 +08:00
Mark Nelson a2d3e3b6ca MDL-42276 core_group: added behat tests to automate group actions
1. Added new step definitions to check if an element exists or does not exist in another.
2. Added new step definitions to check if an element is readonly or is not readonly.
3. Automated testing for MDLQA-1812 and MDLQA-1813.

Added behat test for deleting groups/groupings with and without the
'moodle/course:changeidnumber' capability.

4. Automated MDLQA-2105.

Added behat test for creating groups/groupings without the
'moodle/course:changeidnumber' capability.

5. Automated MDLQA-2238 and MDLQA-2335.

Added behat test for updating groups/groupings with and without the
'moodle/course:changeidnumber' capability.
2013-11-11 18:06:50 -08:00
Damyon Wiese fae2e1ffcc Merge branch '42806-26' of git://github.com/samhemelryk/moodle 2013-11-12 10:02:09 +08:00
AMOS bot e2f0be0e6d Automatically generated installer lang files 2013-11-12 00:53:11 +00:00
Frederic Massart eb59e0ed3b MDL-42824 backup: Typo in description of setting backup_general_questionbank 2013-11-12 08:51:44 +08:00
Marina Glancy 82b211b6d0 Merge branch 'MDL-41775_master' of git://github.com/grabs/moodle 2013-11-12 11:23:51 +11:00
Eloy Lafuente (stronk7) 5d875d18e0 Merge branch 'MDL-40481' of git://github.com/timhunt/moodle 2013-11-12 00:38:35 +01:00
Petr Škoda b2ea179338 MDL-42503 treat $CFG->filterall as a real cache flag - verify during cache resets 2013-11-11 21:49:15 +01:00
Marina Glancy c4ce365aa1 Merge branch '42805-26' of git://github.com/samhemelryk/moodle 2013-11-11 21:48:39 +11:00
Marina Glancy 3ea8c639c1 NOBUG: convert tabs to whitespaces 2013-11-11 21:34:48 +11:00
Marina Glancy 459dd27d3e Merge branch 'MDL-42043-master' of git://github.com/FMCorz/moodle 2013-11-11 21:10:47 +11:00
Andrew Nicols 4c0664b950 MDL-42783 Course: Improve accessiblity of various course actions 2013-11-11 21:03:41 +11:00
Marina Glancy 40dd8899ab Merge branch 'MDL-42081-phpunitfix' of git://github.com/mouneyrac/moodle 2013-11-11 20:55:19 +11:00
Damyon Wiese 2d764047ca Merge branch 'wip-mdl-42754' of https://github.com/rajeshtaneja/moodle 2013-11-11 17:25:30 +08:00
Rajesh Taneja be98b1863a MDL-42754 Messages: Fixed typo 2013-11-11 17:20:26 +08:00
Sam Hemelryk 9bbcadb228 MDL-42806 block_mentees: can only be docked if it has a valid title set. 2013-11-11 17:18:23 +08:00
Damyon Wiese 16fafb9aed Merge branch 'MDL-42803-master' of git://github.com/ankitagarwal/moodle 2013-11-11 17:16:51 +08:00
Sam Hemelryk cd96b7d3e4 MDL-41392 course: management checkbox accessibility improvement 2013-11-11 17:10:14 +08:00
Sam Hemelryk d0647301a0 MDL-41392 course: management accessibility tweaking 2013-11-11 17:09:44 +08:00
Sam Hemelryk 9b22eeff5d MDL-42806 dock: check title exists before using it 2013-11-11 16:51:06 +08:00
Sam Hemelryk 4b6d9ea248 MDL-42805 dock: fixed {} appearing in undock icon title 2013-11-11 16:26:12 +08:00
Jerome Mouneyrac 316283c72b MDL-42081 fix file_storage phpunit tests following adding new stamp files on fresh install 2013-11-11 16:01:32 +08:00
Aparup Banerjee 9184a2f7e0 MDL-42711 theme port from LM: fixed up choice results table overflowing to the right. (MDLSITE-2497) 2013-11-11 16:00:30 +08:00
Aparup Banerjee fa5a136591 MDL-42711 theme port from LM - this makes the li's link inherit similar size from higher up in cascade. 2013-11-11 15:58:19 +08:00
Andrew Nicols 04653aa010 MDL-42809 ActionMenu: Increase specifity of hide on select selector 2013-11-11 15:33:30 +08:00
Frederic Massart 7c9753a713 MDL-42808 library: Google API was resetting the timezone 2013-11-11 15:25:00 +08:00
Sam Hemelryk 68bcc3faaf Merge branch 'wip-mdl-42795' of https://github.com/rajeshtaneja/moodle 2013-11-11 14:10:21 +08:00
Ankit Agarwal ddea17fc22 MDL-42803 behat: Fix random behat errors in CI 2013-11-11 14:03:26 +08:00
Sam Hemelryk 0fd6069ecd Merge branch 'wip-MDL-40612-master-one' of git://github.com/abgreeve/moodle 2013-11-11 13:10:44 +08:00
Damyon Wiese 138e71a42e MDL-42699 Bootstrap tinymce css. Whitespace fix. 2013-11-11 12:40:21 +08:00
Jason Fowler 8bb68e0d23 MDL-42699 TinyMCE: adding padding to editor content in clean 2013-11-11 12:18:14 +08:00
Marina Glancy b180048946 Merge branch 'MDL-42683-master-2' of git://github.com/mouneyrac/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-11 15:02:48 +11:00
Marina Glancy f1be232f68 Merge branch 'MDL-42081-master-nomerge2' of git://github.com/mouneyrac/moodle 2013-11-11 15:02:01 +11:00
Jerome Mouneyrac 7444cf322e MDL-42081 EditPDF: Add default stamp images 2013-11-11 11:39:27 +08:00
Adrian Greeve 5b1944bbba MDL-40612 libraries: Tidy up and improvement of the code for additional name fields.
Includes an update to get_all_user_name_fields() and the inclusion of set_user_name_object()
2013-11-11 11:01:14 +08:00
Adrian Greeve f490f988b7 MDL-40612 libraries: Unit test expansion for get_all_user_name_fields()
and the inclusion of tests for set_user_name_object()
2013-11-11 10:52:24 +08:00
Damyon Wiese bbdb369868 Merge branch 'wip-mdl-42754' of https://github.com/rajeshtaneja/moodle 2013-11-11 10:41:40 +08:00
Renaat Debleu 6382c482c8 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:24:09 +08:00
Damyon Wiese d5c0f0453c Merge branch 'MDL-39923_master' of https://github.com/totara/openbadges
Conflicts:
	version.php
2013-11-11 10:17:07 +08:00
Damyon Wiese f845946821 MDL-36224 LTI: Whitespace fix 2013-11-11 10:04:10 +08:00
Damyon Wiese 75a4dd38ad Merge branch 'MDL-36224-master' of git://github.com/damyon/moodle 2013-11-11 09:57:36 +08:00
Tim Hunt 3fc9410f84 MDL-42790 essay attempt on last: fix plain reponse mode
Plain responses, without files, were getting messed up by the
fix for MDL-39980. Something that looked like an HTML comment was being
appended.

This fix works by avoiding appending anything if there are no files. The
new unit test (which was failing before I fixed the code) confirms that
this works. The other tests should be enough to verify that there are no
regressions.
2013-11-08 15:13:04 +00:00
Andreas Grabs 6d645211be MDL-41775 mod_feedback - Input fields are shown with a fixed width on bootstrap based themes 2013-11-08 10:42:49 +01:00
Aparup Banerjee cbb6e0d029 MDLSITE-2493 glossary filter alert dialog button string now translatable
Conflicts:
	filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js
	filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js
	filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js
	filter/glossary/yui/src/autolinker/js/autolinker.js -- M.core.alert api was changed.
2013-11-08 16:33:10 +08:00
Damyon Wiese e3552170da Merge branch 'MDL-42772-master' of git://github.com/FMCorz/moodle 2013-11-08 16:15:17 +08:00
David Mudrák 069c29b987 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-11-08 16:08:39 +08:00
Dan Poltawski 46af039925 Merge branch 'MDL-42743' of git://github.com/timhunt/moodle 2013-11-08 16:08:20 +08:00
Dan Poltawski dbb68d7779 Merge branch 'wip-mdl-42777' of https://github.com/rajeshtaneja/moodle 2013-11-08 16:05:06 +08:00
David Mudrák 1d93c9ae07 MDL-42711 import learnmoodle fixes: Fix the broken links in RSS feed block
If the <description> of the feed contains URLs longer than 30 characters, the
URL is split because of the break_up_long_words(). When combined with the
filter that converts URLs to links, this produces broken links.

The proper solution would be to improve break_up_long_words() so that it does
not modifies URLs at all. As a temporary solution for our purpose now is to
call format_text() prior to break_up_long_words() as it will not modify the
inner content of the <a> tag.

This should be fixed upstream. See also discussion at
https://moodle.org/mod/forum/discuss.php?d=34947
2013-11-08 15:35:54 +08:00
Dan Poltawski d06d812c51 Merge branch 'wip-MDL-40883-master' of git://github.com/marinaglancy/moodle 2013-11-08 15:32:11 +08:00
Rajesh Taneja be3d6de5aa MDL-42777 courses: Added behat to test ajax on course view page 2013-11-08 14:44:04 +08:00
Damyon Wiese 2bdd5ff4aa MDL-36224 LTI: Fix up docs, add plugininfo class and create subplugin folder. 2013-11-08 14:35:32 +08:00
Mark Nielsen 8cf7670e58 MDL-36224: Improving lti_get_types
If there are no LTI source plugins that
need to be added to the activity chooser
menu, then fallback to the default
activity chooser display.
2013-11-08 14:35:31 +08:00
Mark Nielsen 4d7a2c9e1c MDL-36224: Minor updates to LTI
* No debug display on service.php
* Send a 400 header on error
2013-11-08 14:35:31 +08:00
Chris Scribner fdbf2f229c MDL-36224: Adding subplugins.php 2013-11-08 14:35:31 +08:00
Chris Scribner 976b5bca31 MDL-36224: Add support for pluggable extensions to add new LTI services 2013-11-08 14:35:31 +08:00
Rajesh Taneja 428a1bbdb1 MDL-42777 courses: removed unneeded category check
On course view manage page, JS was not getting initalised as category-listing
is not visible, initialiseCourses is doing unnessary check for category as
it takes care of empty category so it should not return on empty category
2013-11-08 14:08:46 +08:00
Frederic Massart 4bceea11be MDL-42772 upgrade: Force alternate fields in session user 2013-11-08 14:01:39 +08:00
Marina Glancy 2e84b4b323 Merge branch 'MDL-42775-master' of git://github.com/danpoltawski/moodle 2013-11-08 16:37:55 +11:00
Frederic Massart 13d888771d MDL-42043 theme: Use $theme instead of $OUTPUT for pix_url() 2013-11-08 13:15:31 +08:00
Aparup Banerjee b661e76c3f MDL-42711 hide course theme option for non bootstrapbase based themes. some other minor fixes too. 2013-11-08 13:10:40 +08:00
Jason Fowler d37ec4b6a7 MDL-42684 TinyMCE: Including details of patch in moodle-readme.txt 2013-11-08 12:57:46 +08:00
Jason Fowler 762a29690e MDL-42684 TinyMCE: make tinymce start at full width 2013-11-08 12:57:46 +08:00
Dan Poltawski 356d33a866 MDL-42775 dml: remove invalid unit test assertion 2013-11-08 12:25:49 +08:00
Adrian Greeve b63f542d21 MDL-42762 administration: Fixed additional names section from being missing.
When an additional name field is not enabled in the admin settings the
text box should still be available to fill out in a section further down
the page (Additional names).
2013-11-08 12:05:53 +08:00
Damyon Wiese c8868cefe2 MDL-42679 Scorm: Remove stale yui shifted css files. 2013-11-08 11:54:48 +08:00
Damyon Wiese 16fd6fb6d7 Merge branch 'w46_MDL-42769_m26_admineditor' of https://github.com/skodak/moodle 2013-11-08 11:43:10 +08:00
Damyon Wiese 13f04e7c91 Merge branch 'MDL-42679-master' of git://github.com/andrewnicols/moodle 2013-11-08 11:23:00 +08:00
Marina Glancy 61d1e9c44d Merge branch 'MDL-41586-master' of git://github.com/ankitagarwal/moodle 2013-11-08 14:13:24 +11:00
Dan Poltawski f9dc4bd78b MDL-42704 quiz statistics: make test more tolerant 2013-11-08 11:11:31 +08:00
Dan Poltawski 379cbb459a Merge branch 'MDL-42704-master' of git://github.com/jamiepratt/moodle 2013-11-08 11:11:28 +08:00
Marina Glancy 9fec5cb333 Merge branch 'MDL-42760-master' of git://github.com/mouneyrac/moodle 2013-11-08 14:10:41 +11:00
Dan Poltawski 7925c3b45c MDL-42666 repository_boxnet: fix broken version
The last commit here looked like Fred had broken the version,
but it was my mistake. I owe Fred a beer at the next available
opportunity.
2013-11-08 11:02:35 +08:00
Ankit Agarwal 6cff6350df MDL-41586 libaries: Fix issues with scale in sqlsrv libraries
0 is a valid value
null is the default scale we set in other DBs
2013-11-08 10:49:35 +08:00
Marina Glancy a9d11e3cd0 MDL-40883 ddl: unittest for objects name length 2013-11-08 13:17:47 +11:00
Jason Fowler 46f763ed4a MDL-42660 TinyMCE: Ensure upgrade is only performed when possible
Conflicts:

	lib/editor/tinymce/db/upgrade.php
2013-11-08 09:49:02 +08:00
Marina Glancy dcde391b44 MDL-40883 ddl: make sure object name never exceeds max length
Many thanks to Ray Bon for finding the problem
2013-11-08 11:58:35 +11:00
Damyon Wiese d25e988d08 Merge branch 'MDL-40975-editinstructions' of git://github.com/andrewnicols/moodle 2013-11-08 08:45:11 +08:00
AMOS bot c09786a9b9 Automatically generated installer lang files 2013-11-08 00:43:04 +00:00
Petr Škoda 8213007c7f MDL-42769 use only text area editor before install completed 2013-11-07 23:51:59 +01:00
Jamie Pratt ec477ba1bb MDL-42704 quiz statistics : SQL Errors under MSSQL 2013-11-07 18:05:10 +07:00
Tim Hunt a568785223 MDL-42743 improve wording of the CBM summary on quiz review 2013-11-07 10:30:06 +00:00
Dan Poltawski 5b5447fa83 MDL-41615 question: fix unit tests
Heading levels have been changed.
2013-11-07 18:10:55 +08:00
Tim Hunt a289a2b51c MDL-42540 quiz manual grading should have setType 2013-11-07 09:44:24 +00:00
Dan Poltawski 0967c74a3d Merge branch 'MDL-42737-master' of git://github.com/andrewnicols/moodle 2013-11-07 17:21:54 +08:00
Dan Poltawski 48fe93fa26 Merge branch 'MDL-41615_c' of git://github.com/rwijaya/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-07 17:17:32 +08:00
Yuliya be2b37cf4b MDL-39923 badges: Fix unit tests 2013-11-07 21:48:01 +13:00
Andrew Nicols 5bf8e9ae5e MDL-40975 Course: Ensure that editinstructions line up with activity rename again 2013-11-07 16:46:34 +08:00
Marina Glancy d1cfb36b59 Merge branch 'MDL-42748-master' of git://github.com/andrewnicols/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-07 19:31:52 +11:00
Damyon Wiese a79cea102d Merge branch 'MDL-42668-master' of git://github.com/FMCorz/moodle 2013-11-07 16:20:53 +08:00
Jerome Mouneyrac eb11ae0d5c MDL-42760 EditPDF: sometimes the dropdown or search comment appear below the editpdf 2013-11-07 16:11:51 +08:00
Andrew Nicols 1ef33d5914 MDL-42679 mod_scorm: Include gallery-sm-treeview for https support 2013-11-07 15:58:22 +08:00
Frederic Massart ab1658fb17 MDL-42666 repository_boxnet: Do not run the upgrade multiple times 2013-11-07 15:53:59 +08:00
Frederic Massart def961fd0d MDL-42668 portfolio_boxnet: Do not run upgrade multiple times 2013-11-07 15:35:24 +08:00
Frederic Massart a5a84cc894 MDL-42668 portfolio_boxnet: Disable the portfolio when non-HTTPS 2013-11-07 15:28:34 +08:00
Frederic Massart 337107fe4b MDL-42668 portfolio_boxnet: Disable the portfolio during upgrade 2013-11-07 15:28:34 +08:00
Frederic Massart 7c6ad254f3 MDL-42668 portfolio_boxnet: Notify the admins about the upgrade process 2013-11-07 15:28:34 +08:00
Frederic Massart d130777df5 MDL-42668 portfolio_boxnet: Migration to APIv2 2013-11-07 15:28:34 +08:00
Dan Poltawski b74c8389b1 Merge branch 'MDL-42666-master-fixup' of git://github.com/FMCorz/moodle 2013-11-07 14:19:14 +08:00
Marina Glancy cc58ba267d Merge branch 'w46_MDL-42708_m26_mymobile' of https://github.com/skodak/moodle 2013-11-07 17:17:42 +11:00
Marina Glancy 4c0e155433 Merge branch '42375-26' of git://github.com/samhemelryk/moodle 2013-11-07 17:08:03 +11:00
Sam Hemelryk 10a2bf4613 MDL-42375 course: management interface icon tweaks
* Drag and drop icon switched to a 12x12px icon.
* Drag and drop icon now uses cursor:pointer
* Improved alignment of the caret for course listing actions.
2013-11-07 14:01:17 +08:00
Frederic Massart 7cb353ff69 MDL-42666 tests: Setting new Box.net mandatory arguments 2013-11-07 13:54:47 +08:00
Andrew Nicols 9d6d88e1bd MDL-42748 Theme: Add back missing overflow on help tooltips 2013-11-07 13:53:43 +08:00
Marina Glancy afd765337a Merge branch 'MDL-42697-master' of git://github.com/andrewnicols/moodle 2013-11-07 16:31:01 +11:00
Rajesh Taneja 9a90e7c57a MDL-42754 Messages: Show noreply user notifications
With fake noreply and support users, the notifications were not accessible by user
Support for viewing messages from noreply user has been added.

Signed-off-by: Rajesh Taneja <rajesh@moodle.com>
2013-11-07 13:08:30 +08:00
Damyon Wiese 81b07e655c Merge branch 'MDL-40975-overflow' of git://github.com/andrewnicols/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-07 12:23:25 +08:00
Jason Fowler 2106d4b351 MDL-42660 TinyMCE: Shuffle icons in default toolbar layout 2013-11-07 12:15:11 +08:00
Jason Fowler f2b8eb222a MDL-42600 EditPDF: Fix padding etc on toolbars 2013-11-07 12:15:11 +08:00
Jason Fowler 525d094a47 MDL-42660 Filepicker: Fix padding etc on filepicker/manager toolbars
Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-11-07 12:15:11 +08:00
Jason Fowler f897dbcb24 MDL-42660 TinyMCE: Fix padding etc to make TinyMCE work better on small screens 2013-11-07 12:15:11 +08:00
Marina Glancy 1dd53c7a5a Merge branch 'MDL-41586-master' of git://github.com/ankitagarwal/moodle 2013-11-07 15:06:38 +11:00
rwijaya c544ee92f5 MDL-41615 quiz_mod: fix heading levels for usability and accessibility 2013-11-07 12:04:00 +08:00
Dan Poltawski d4308dff59 Merge branch 'MDL-42628_b' of https://github.com/rwijaya/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-07 11:58:46 +08:00
Dan Poltawski f6a2a36bcd Merge branch 'MDL-42666-master' of git://github.com/FMCorz/moodle 2013-11-07 11:44:01 +08:00
Andrew Nicols b100c4e3a1 MDL-40975 Behat: Fix test failure with block menus 2013-11-07 11:42:27 +08:00
Andrew Nicols 27e6dce63b MDL-40975 Theme: Stop treating label commands differently 2013-11-07 11:42:26 +08:00
rwijaya 9cb48f50c4 MDL-42628 course management: improve RTL display 2013-11-07 11:38:46 +08:00
Sam Hemelryk 16a14e4a5f Merge branch 'wip-MDL-42739_M26' of git://github.com/lazydaisy/moodle 2013-11-07 11:29:57 +08:00
Dan Poltawski 57d14266a8 Merge branch 'wip-mdl-42692' of https://github.com/rajeshtaneja/moodle 2013-11-07 11:23:11 +08:00
Dan Poltawski 0b353ee03e Merge branch 'MDL-42742-master' of git://github.com/damyon/moodle 2013-11-07 11:19:15 +08:00
Marina Glancy ef14a8ffb4 Merge branch '42375-26' of git://github.com/samhemelryk/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-07 14:18:00 +11:00
Frederic Massart e50117d952 MDL-42605 portfolio_flickr: Do not auto select a set to export to 2013-11-07 11:14:47 +08:00
Frederic Massart 16dc4c13ae MDL-42605 portfolio_flickr: Photos can be added to a set on export 2013-11-07 11:14:47 +08:00
Aparup Banerjee fcb2b77ffa MDL-42711 ported less style for chat from learnmoodle. added ability to choose course theme's css - this will use ONLY the css available from the theme to style this chat box. 2013-11-07 11:14:14 +08:00
Frederic Massart f591c247ca MDL-42666 repository_boxnet: Improved output during migration 2013-11-07 10:58:40 +08:00
Frederic Massart 51ada519a6 MDL-42666 repository_boxnet: Downloading a file follows locations 2013-11-07 10:54:48 +08:00
Frederic Massart 102a241998 MDL-42666 repository_boxnet: Fix undefined variable usage 2013-11-07 10:54:48 +08:00
Frederic Massart d7274bfead 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-07 10:54:47 +08:00
Frederic Massart ab227cc6a9 MDL-42666 repository_boxnet: Warn on HTTPS requirement when non HTTPS 2013-11-07 10:54:47 +08:00
Frederic Massart 090976b966 MDL-42666 repository_boxnet: Alert the admins of the migration process 2013-11-07 10:54:38 +08:00
Marina Glancy 27199cfce8 Merge branch 'MDL-42696-collator' of git://github.com/mudrd8mz/moodle 2013-11-07 12:59:36 +11:00
Yuliya Bozhko f5d17c14ea MDL-39923 badges: Send badge messages through internal messaging system 2013-11-07 14:49:27 +13:00
Dan Poltawski 02c6bd358f Merge branch 'MDL-42728-en_fix' of git://github.com/mudrd8mz/moodle
Conflicts:
	lang/en/moodle.php
2013-11-07 09:34:31 +08:00
Mary Evans 4731319e24 MDL-42739 theme_anomaly: Updated renderers.php to fix dock not working in Anomaly theme. 2013-11-06 22:38:37 +00:00
Eloy Lafuente (stronk7) e916eb407c Merge branch 'MDL-42714-master' of git://github.com/sammarshallou/moodle 2013-11-06 23:35:37 +01:00
Petr Škoda e0caccb410 MDL-42708 force mymobile uninstallation during upgrade 2013-11-06 20:04:58 +01:00
Andrew Nicols 4c9e8ea7a3 MDL-40975 Course: Fix issues with overflowing content in narrow windows 2013-11-07 01:16:34 +08:00
Iñaki Arenaza 3f9562cc5d 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-06 17:31:55 +01:00
David Mudrák 39fb6afa47 MDL-42696 Improve the collator class debugging
To fully describe why the debugging warning was displayed, it is important to
display all three values - required locale, actual locale and the valid locale.
2013-11-06 14:59:08 +01:00
sam marshall 3749c94627 MDL-42714 Backup: For tgz packer, handle missing zlib extension 2013-11-06 12:34:46 +00:00
Dan Poltawski d214057cad on-demand release 2.6beta+ 2013-11-06 20:26:48 +08:00
Dan Poltawski 9306ed2cf5 NOBUG: Fixed SVG browser compatibility 2013-11-06 20:26:46 +08:00
Damyon Wiese 3583b22717 MDL-42742 Dragdrop: Center the keyboard drag drop dialogue 2013-11-06 17:22:31 +08:00
Andrew Nicols 11f8ef10c0 MDL-42737 ActionMenu: Close the menu after selecting actions 2013-11-06 17:16:49 +08:00
Damyon Wiese dcd02d8b0e Merge branch 'MDL-40975-master-fixes' of git://github.com/andrewnicols/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-06 16:42:11 +08:00
Sam Hemelryk 52c93a26ca MDL-42375 course: management interface icon spacing improved
Fixed the display of icons and their spacing when JS is disabled.
2013-11-06 16:38:32 +08:00
Andrew Nicols 13a73a16f2 MDL-40975 Theme: Remove activity padding properly when editor displayed for RTL 2013-11-06 16:20:00 +08:00
Andrew Nicols 5609c6321d MDL-40975 Course: Make the edit title instructinos position with mod-indent 2013-11-06 16:20:00 +08:00
Ankit Agarwal e3359b87df MDL-41586 libraries: Fix scale issues
The default value of scale should be null not false in mssql, that is the
standard with other DBs
0 is a valid value for scale, don't change it in oracle
2013-11-06 16:12:15 +08:00
Rajesh Taneja 0507c33cad MDL-42692 Quiz: Fixed z-index for tab and marks
On edit quiz page marks/reorder text box has zindex set, which should be considered by modal
window. Also, tab set is also using zindex for active node.
2013-11-06 16:09:18 +08:00
Damyon Wiese 30e736cfba Merge branch '42740-26' of git://github.com/samhemelryk/moodle 2013-11-06 16:07:44 +08:00
Andrew Nicols 685addbd1f MDL-40975 Theme: Increase section settings cog back to 16px 2013-11-06 16:06:59 +08:00
Andrew Nicols 868575ec2c MDL-40975 Course: Make spinner consistent across themes 2013-11-06 16:06:48 +08:00
Damyon Wiese 2c366f45ca Merge branch 'MDL-42624-master' of git://github.com/mouneyrac/moodle 2013-11-06 16:00:33 +08:00
Sam Hemelryk 02ee8997b5 MDL-42740 theme_anomaly: fixed block editing actions. 2013-11-06 15:50:16 +08:00
Damyon Wiese 496422e34c Merge branch '40975-26-r1' of git://github.com/samhemelryk/moodle 2013-11-06 15:37:29 +08:00
Sam Hemelryk 61ac7f01b2 MDL-40975 theme_afterburner: fixed up actionmenu CSS 2013-11-06 15:30:38 +08:00
Dan Poltawski dc08bfe558 Merge branch '42628-26' of git://github.com/samhemelryk/moodle 2013-11-06 15:04:20 +08:00
Andrew Nicols 052dd0490f MDL-40975 Theme: Fix white line over links in Bootstrap with FF 2013-11-06 14:45:08 +08:00
Andrew Nicols 29afe143c1 MDL-40975 Theme: Set the colour for actionmenu carets appropriately 2013-11-06 14:37:05 +08:00
Marina Glancy bdb7c88635 Merge branch 'MDL-42031-master' of git://github.com/mouneyrac/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-06 17:18:38 +11:00
Jerome Mouneyrac d40ce26f05 MDL-42031 assginfeedback_editpdf: fix next/previous/select page 2013-11-06 14:13:19 +08:00
rwijaya b890be680d MDL-42628: fix RTL for course management 2013-11-06 14:12:24 +08:00
Colin Campbell 6d2baaaea4 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-06 16:32:15 +11:00
Damyon Wiese 951b414b65 Merge branch 'MDL-40975-master' of git://github.com/andrewnicols/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-06 13:06:01 +08:00
Marina Glancy c32ba4e2fb Merge branch '42690-26' of git://github.com/samhemelryk/moodle 2013-11-06 15:52:03 +11:00
Damyon Wiese ee8e077a2e Merge branch '42710-26' of git://github.com/samhemelryk/moodle 2013-11-06 12:07:47 +08:00
Damyon Wiese ac3831b422 Merge branch 'MDL-41232-master' of git://github.com/mouneyrac/moodle 2013-11-06 11:59:41 +08:00
Andrew Nicols 383d22d967 MDL-42697 Theme: Fix overflow on docked blocks 2013-11-06 11:58:05 +08:00
Andrew Nicols 1e5620a62b MDL-40975 Theme: Rebuild of bootstrap css 2013-11-06 11:41:01 +08:00
Andrew Nicols f5b33487fc MDL-40975 ActionMenu: Adjust how actionmenu is displayed for course management 2013-11-06 11:41:00 +08:00
David Monllao 047a8800f4 MDL-40975 course: Adapt behat tests to the new course editing interface 2013-11-06 11:41:00 +08:00
Andrew Nicols 79864ef25f MDL-40975 ActionMenu: Ensure we maintain consistent tab order
When the actionmenu is open, we should focus on it's first element, and
then naturally tab through it. Tabbing from the end should take us to the
first element after the menu button. This may not be the same as the first
element after the menu itself because of the nature of primary and
secondary action links. We also need to shift-tab back in the same manner.
2013-11-06 11:40:59 +08:00
Andrew Nicols 7f4f7081f0 MDL-40975 Theme: Change the actionmenu icons back to 12px 2013-11-06 11:40:59 +08:00
Andrew Nicols 21231f4d76 MDL-40975 ActionMenu: Convert text-based icon to the caret style 2013-11-06 11:40:59 +08:00
Barbara Ramiro 6272fce649 MDL-42564 Course: Replace group mode icons with larger versions 2013-11-06 11:40:58 +08:00
Barbara Ramiro 13273e51a8 MDL-42564 ActionMenu: Replace actionmenu icon with new style 2013-11-06 11:40:58 +08:00
Andrew Nicols 6982618e89 MDL-40956 Course: AJAX course duplication 2013-11-06 11:40:57 +08:00
Andrew Nicols d28aeeddc0 MDL-40975 Theme: Dim the modicon when an activity is disabled 2013-11-06 11:40:57 +08:00
Andrew Nicols 8d90aec2aa MDL-40975 Course: Make the completion tracking look the same as other icons when editing 2013-11-06 11:40:57 +08:00
Andrew Nicols 26dd99d292 MDL-40975 Course: Move all editing icons to the end of the line 2013-11-06 11:40:56 +08:00
Andrew Nicols 9ac099a1c1 MDL-40975 ActionMenu: Add support for fillers in primary menus
This is required to maintain horizontal alignment of primary menus in rows.
2013-11-06 11:40:56 +08:00
Andrew Nicols 405266165a MDL-40975 Course: Tidy up icon spacings 2013-11-06 11:40:55 +08:00
Andrew Nicols fe3593b4c2 MDL-40975 ActionMenu: Tidy up title + alt combinations 2013-11-06 11:40:55 +08:00
Andrew Nicols 4bbb890f91 MDL-40975 Course: Adjust how we handle toolbox processing to improve performance 2013-11-06 11:40:55 +08:00
Damyon Wiese 9577caaed8 MDL-40975 ActionMenu: Change default alignment when opening the menu
Committer: Andrew Nicols <andrew@nicols.co.uk>
2013-11-06 11:40:54 +08:00
Andrew Nicols fc4e9e13bc MDL-40975 ActionMenu: Adjust icon placement for text menus 2013-11-06 11:40:54 +08:00
Andrew Nicols 8ecabb95cd MDL-40975 Course: Adjust vertical alignment for text menu 2013-11-06 11:40:53 +08:00
Andrew Nicols d881e0bb84 MDL-40975 Course: Remove groupmode when forced at course level 2013-11-06 11:40:53 +08:00
Andrew Nicols 82ef49ea65 MDL-40975 Course: Set the show/hide activity toggle 2013-11-06 11:40:53 +08:00
Andrew Nicols ce30e14c65 MDL-40975 Course: Add aria label for dragdrop 2013-11-06 11:40:52 +08:00
Andrew Nicols bc80ea017c MDL-40975 Course: Add back JavaScript drag/drop for bootstrap on mobile 2013-11-06 11:40:52 +08:00
Andrew Nicols a4400cefdb MDL-40975 JavaScript: Make drag/drop respond to a single click as well as a drag 2013-11-06 11:40:51 +08:00
Andrew Nicols 81dc079654 MDL-40975 Course: Hide commands when editing titles 2013-11-06 11:40:51 +08:00
Andrew Nicols 3072040cff MDL-40975 JavaScript: Standardise the location of the activity spinner 2013-11-06 11:40:51 +08:00
Andrew Nicols 9797becd71 MDL-40975 ActionMenu: Remove background color when menu is active 2013-11-06 11:40:50 +08:00
Andrew Nicols 4657ba81d2 MDL-40975 Course: Move drag/drop to start of the line 2013-11-06 11:40:50 +08:00
Andrew Nicols a83d83e42b MDL-40975 Course: Change which actions are in the menu and which are outside it 2013-11-06 11:40:49 +08:00
Marina Glancy 09af1e2864 MDL-42672 blocks: warnings on /mod/xxx/index.php for frontpage course 2013-11-06 14:21:24 +11:00
Andrew Nicols f549dd64a4 MDL-40975 Course: Change the activity drag icon to prevent icon flash 2013-11-06 10:59:26 +08:00
Barbara Ramiro e3d0acf6ac MDL-42564 Theme: Add new dropdown icons 2013-11-06 10:59:26 +08:00
Andrew Nicols 8ef1aa40d1 MDL-40975 Theme: Standardise size of icons in headings 2013-11-06 10:59:26 +08:00
Andrew Nicols 69a3457fe9 MDL-40975 Theme: Tidy up block icons to line up in columns 2013-11-06 10:59:26 +08:00
Andrew Nicols 803912ae69 MDL-40975 Blocks: Move most block actions into the block menu 2013-11-06 10:59:25 +08:00
Frederic Massart e27ed28785 MDL-42666 repository_boxnet: Revoke access token when logging out 2013-11-06 10:46:29 +08:00
Frederic Massart 79d89136f0 MDL-42666 oauthlib: Getter methods for accesstoken, client id and secret 2013-11-06 10:46:29 +08:00
Frederic Massart b2f9028559 MDL-42666 repository_boxnet: Remove hardcoded date for APIv1 end of life 2013-11-06 10:46:29 +08:00
Frederic Massart 091ac5969e MDL-42666 repository_boxnet: Disabling file references 2013-11-06 10:46:29 +08:00
Frederic Massart 05eaf64397 MDL-42666 repository_boxnet: Advise the user to run the migration tool 2013-11-06 10:46:29 +08:00
Frederic Massart cc4de9ea58 MDL-42666 repository_boxnet: Tool to launch the migration 2013-11-06 10:46:29 +08:00
Frederic Massart 4cdb94cce7 MDL-42666 repository_boxnet: Function to convert APIv1 references to true copies 2013-11-06 10:46:29 +08:00
Frederic Massart 2d5c7d5057 MDL-42666 repository_boxnet: Convert repository to APIv2 2013-11-06 10:45:52 +08:00
Damyon Wiese 7fd16ca1fd Merge branch 'w45_MDL-42602_m26_userloginevent' of https://github.com/skodak/moodle 2013-11-06 10:21:35 +08:00
Mary Evans fe4848110a MDL-40244 forms: added setType() for groupinfo in forum and wiki 2013-11-06 12:23:18 +11:00
Marina Glancy 0f57d555a0 Merge branch '42629-26-r2' of git://github.com/samhemelryk/moodle 2013-11-06 11:56:20 +11:00
Marina Glancy a43db075ff Merge branch 'MDL-42402-master-fix3' of git://github.com/damyon/moodle 2013-11-06 11:52:15 +11:00
Sam Hemelryk c820e700d8 ML-42629 course: management added can_resort checks 2013-11-06 08:49:36 +08:00
Helen Foster 5a25566060 MDL-42728 Merge English strings from the en_fix language pack 2013-11-05 23:41:44 +01:00
Damyon Wiese cb35482abf MDL-42402 EditPDF: CSS fix for hover on drop down menus
Also required a fix for the comment search window because it was picking up the same styles.
2013-11-06 00:41:04 +08:00
Eloy Lafuente (stronk7) 233db99d65 Merge branch 'MDL-42671-master' of git://github.com/damyon/moodle 2013-11-05 17:27:04 +01:00
Damyon Wiese 237f484188 MDL-42671 EditPDF: Disable EditPDF is zlib is not available
Also put a warning on the admin page if this is the case.
2013-11-06 00:26:05 +08:00
Damyon Wiese c5ae81ca38 Merge branch 'wip-MDL-38228-master' of git://github.com/marinaglancy/moodle
Conflicts:
	version.php
2013-11-05 22:44:53 +08:00
Tim Hunt 94ffbef19a MDL-40481 quiz responses report needs cols need text_sorting 2013-11-05 14:13:53 +00:00
Sam Hemelryk 05bce411cb MDL-42719 course: management view mode wrap fixed 2013-11-05 21:52:45 +08:00
Sam Hemelryk e69a0251dc MDL-42710 course: management cat sorting perfecting taking place 2013-11-05 21:52:45 +08:00
Dan Poltawski 61bac37cf1 Merge branch 'MDL-42332-fix-modal-window' of git://github.com/dmonllao/moodle 2013-11-05 17:25:53 +08:00
David Monllao a57263d19d MDL-42332 behat: Adding a wait to let AJAX finish the request
The Mark as completed performs an AJAX request,
we need to give time to let it finish.
2013-11-05 17:13:20 +08:00
Dan Poltawski bd706fb590 Merge branch 'MDL-42613_master' of https://github.com/markn86/moodle 2013-11-05 16:39:27 +08:00
Damyon Wiese 48bde0eed4 MDL-42629: Fixing dodgy merge conflict (oops) 2013-11-05 16:36:31 +08:00
Dan Poltawski 8d81bd5d1e Merge branch 'MDL-42363-fix-redirect-issue' of git://github.com/dmonllao/moodle 2013-11-05 15:52:48 +08:00
David Monllao 622442765e MDL-42363 behat: Avoid random failure because of timing differences 2013-11-05 15:27:13 +08:00
Dan Poltawski e957dfa549 Merge branch 'MDL-42402-master-fix2' of git://github.com/damyon/moodle 2013-11-05 15:06:36 +08:00
Damyon Wiese 1d38083c9d MDL-42402 EditPDF: Make the colours match the mockup in MDL-41633 2013-11-05 14:49:06 +08:00
Marina Glancy 792eeb0053 Merge branch 'MDL-40267-master' of git://github.com/danpoltawski/moodle 2013-11-05 17:44:53 +11:00
Marina Glancy edf21f0c56 Merge branch 'MDL-42706-master-int' of git://github.com/FMCorz/moodle 2013-11-05 17:13:38 +11:00
Damyon Wiese 9e16402727 Merge branch '42629-26' of git://github.com/samhemelryk/moodle
Conflicts:
	course/classes/management_renderer.php
2013-11-05 14:04:08 +08:00
Sam Hemelryk 38a15200b9 MDL-42629 course: management peer-review alterations
* Added confirmation when bulk moving courses.
* Increased min-width of category course count to allow for 3 digits.
* Fixed sub-category => subcategory
* Renamed console JS vars to managementconsole
* Added typeof operator
* Renamed oldcatcourses and newcatcourses as suggested
* Added a span around course count and interacted with that.
* Fixed icon sizing
* Fixed management behat tests
* Fixed wrapping of strings in menus
2013-11-05 13:57:01 +08:00
Frederic Massart 3ec7ea98a1 MDL-42706 mod_book: Undefined CFG in pluginfile function 2013-11-05 13:19:42 +08:00
Damyon Wiese 057a79922e Merge branch 'MDL-42701' of git://github.com/stronk7/moodle 2013-11-05 13:10:52 +08:00
Dan Poltawski 6ce30a3e2c Merge branch 'MDL-42385_master' of git://github.com/dmonllao/moodle 2013-11-05 12:34:35 +08:00
Damyon Wiese 97c7b8a548 Merge branch 'wip-mdl-42703-master' of https://github.com/deraadt/moodle 2013-11-05 12:24:41 +08:00
rwijaya a80af8a652 MDL-42280 Behat: add behat test for block settings.
Test includes: modifying setting to hide and move block appearance
2013-11-05 11:37:28 +08:00
Dan Poltawski 0fe02089a4 Merge branch 'MDL-42476' of https://github.com/srynot4sale/moodle 2013-11-05 11:24:02 +08:00
Marina Glancy 47644f7d6a MDL-38228 upgrade: Rewrite and re-apply script that fixes corrupt course modules to sequence relation 2013-11-05 14:20:50 +11:00
Damyon Wiese 1ddbe7815d Merge branch 'wip-MDL-42318-master' of https://github.com/marinaglancy/moodle 2013-11-05 11:06:23 +08:00
Michael de Raadt 2bec969e2a MDL-42703 Course: Remove alias from queries to satisfy MSSQL 2013-11-05 10:52:24 +08:00
Ray Morris 82d305fafa MDL-42265 make Browse Users list scrollable for smaller screens 2013-11-05 10:49:20 +08:00
Damyon Wiese 6655b6102a MDL-42402 EditPDF: Fix the styles again
More fixes for the vertical alignment of the images in the toolbar buttons and the dropdowns.
2013-11-05 10:30:11 +08:00
Dan Poltawski 528ed758e6 MDL-40267 forms: fix utf8 string length rules 2013-11-05 10:20:22 +08:00
Eloy Lafuente (stronk7) 61dc1d26cd MDL-40267 forms: added some tests for the range rule 2013-11-05 09:57:46 +08:00
Andrew Nicols 4816e19a6f MDL-42464 mod_chat: Correct use of amp; in session link 2013-11-05 09:50:33 +08:00
Sam Hemelryk c7a2291f8b MDL-42629 course: management resorting improvements 2013-11-05 09:49:20 +08:00
Sam Hemelryk 62846237ee MDL-42629 course: set a better management page title 2013-11-05 09:49:14 +08:00
Sam Hemelryk d3670843eb MDL-42629 course: changed new course to create new course 2013-11-05 09:49:14 +08:00
Sam Hemelryk bd7ee7ada4 MDL-42629 course: moving a course now updates counts and pagination totals 2013-11-05 09:49:14 +08:00
Sam Hemelryk 83886a49a0 MDL-42629 course: changed sub category to subcategory 2013-11-05 09:49:13 +08:00
Sam Hemelryk cfd1e08a50 MDL-42629 actionmenu: alt and title on icon removed if the same as text being displayed 2013-11-05 09:49:13 +08:00
Sam Hemelryk 017518d4f8 MDL-42629 course: fixed up create category management actions 2013-11-05 09:49:13 +08:00
Sam Hemelryk 115e5f052f MDL-42629 course: renamed re-sort to sort 2013-11-05 09:49:13 +08:00
Sam Hemelryk f8ddf782dd MDL-42629 course: tweaks CSS for management interface
* Removed grey background from checkboxes and bulk actions.
* Removed blue colouring on subheadings.
* Changed greys to the clean theme greys
2013-11-05 09:49:13 +08:00
Sam Hemelryk 21a57b04de MDL-42629 course: improved wording on move course dialogue 2013-11-05 09:48:38 +08:00
Sam Hemelryk 09ae02b7aa MDL-42300 course: improved category re-sort controls.
* The top action now works on top level categories and has
  a better title.
* Each category has its own resort actions now.
2013-11-05 09:48:38 +08:00
Eloy Lafuente (stronk7) 6644b04666 MDL-42701 Bump main version to observe all deps 2013-11-05 02:37:19 +01:00
Eloy Lafuente (stronk7) f39c82ebed MDL-42701 Bump all versions near 2.6 release 2013-11-05 02:36:00 +01:00
Damyon Wiese 9995aa3852 Merge branch 'w45_MDL-42512_m26_filtermess' of https://github.com/skodak/moodle 2013-11-05 09:31:41 +08:00
Dan Poltawski 24a922e953 Merge branch 'MDL-42273-master' of git://github.com/ankitagarwal/moodle 2013-11-04 23:40:33 +08:00
Dan Poltawski dcc08e55b5 Merge branch 'MDL-42363_master' of git://github.com/dmonllao/moodle 2013-11-04 23:34:18 +08:00
Dan Poltawski a28c6b440e Merge branch 'wip-MDL-42270_master_2' of git://github.com/gjb2048/moodle 2013-11-04 22:54:09 +08:00
Dan Poltawski 5e70fc1f9c Merge branch 'MDL-42548' of git://github.com/timhunt/moodle 2013-11-04 22:34:27 +08:00
Dan Poltawski efe938fca5 Merge branch 'MDL-42464-master' of git://github.com/andrewnicols/moodle 2013-11-04 22:31:55 +08:00
Dan Poltawski 4a17894ac5 Merge branch 'MDL-42592_master' of https://github.com/markn86/moodle 2013-11-04 22:27:49 +08:00
Dan Poltawski 2c7b23a239 Merge branch 'MDL-42453_master' of git://github.com/lazydaisy/moodle 2013-11-04 22:17:19 +08:00
Dan Poltawski c6cb4f8ec8 MDL-42533 conditionlib: Add clarifying comments 2013-11-04 22:04:01 +08:00
Dan Poltawski 07ba528bd4 Merge branch 'MDL-42533-master' of git://github.com/FMCorz/moodle 2013-11-04 21:51:57 +08:00
Dan Poltawski 6db9f41419 Merge branch 'MDL-42355_editpdf_deselect_comment' of git://github.com/davosmith/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-04 20:10:24 +08:00
Dan Poltawski 22379484fd Merge branch 'wip-mdl-41849' of https://github.com/rajeshtaneja/moodle 2013-11-04 19:35:01 +08:00
Dan Poltawski 81da82f5f3 Merge branch '42350-26' of git://github.com/samhemelryk/moodle 2013-11-04 17:21:29 +08:00
Jerome Mouneyrac 066ef320af MDL-42332 Automate MDLQA-5260 and MDLQA-5261 - A badge can be awarded based on activity and course completion + add i_trigger_cron behat step 2013-11-04 17:17:58 +08:00
Jerome Mouneyrac 68c13c6804 MDL-42331 Automate MDLQA-5258 - A teacher can add and allocate a course badge 2013-11-04 17:15:44 +08:00
Damyon Wiese b50bd4bcad Merge branch 'w45_MDL-42525_m26_plugininfoperf' of https://github.com/skodak/moodle 2013-11-04 16:44:54 +08:00
Dan Poltawski 28cc8d4b43 Merge branch 'wip-mdl-42537' of https://github.com/rajeshtaneja/moodle
Conflicts:
	lib/upgrade.txt
2013-11-04 16:39:39 +08:00
Jason Fowler 73b80792e9 MDL-42631 Filepicker: swap the alt attribute to a title attribute to help usability 2013-11-04 16:34:02 +08:00
Rajesh Taneja 5540b2caf3 MDL-41849 Quiz: Quiz send mail from noreply user
Mails should be send by noreply user and not admin user
2013-11-04 16:29:55 +08:00
Dan Poltawski 71fbce4410 Merge branch 'MDL-42551' of git://github.com/stronk7/moodle 2013-11-04 16:21:25 +08:00
Jerome Mouneyrac 844d74d788 MDL-42330 Automate MDLQA-5257 - An admin can award a site badge 2013-11-04 16:18:32 +08:00
Marina Glancy 8be0ca758c Merge branch 'MDL-42604-master' of git://github.com/ankitagarwal/moodle 2013-11-04 19:16:23 +11:00
Dan Poltawski db6767ae47 Merge branch 'w45_MDL-42044_m26_zipaddon' of https://github.com/skodak/moodle 2013-11-04 16:14:04 +08:00
rwijaya 4bbacb8607 MDL-42147 filepicker: fixed dialog box css issue on IE9.
This patch fix the following issue repository icon size, dialog title bar background color and rounded corner for dialog box.

Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-11-04 16:06:21 +08:00
Sam Hemelryk 19195b602c MDL-42690 mod_assign: remove submit button from single grading interface 2013-11-04 16:02:43 +08:00
Rajesh Taneja d61d3e82d0 MDL-42537 calendar: locale charset on windows will come from calendartype
date_format_string() will now convert date on windows based on calendar type used
2013-11-04 15:54:19 +08:00
Ankit Agarwal e5eff0b626 MDL-42287 behat: Use string from scorm content, instead of scorm structure 2013-11-04 15:52:42 +08:00
Damyon Wiese 2bd27878db MDL-42350 assign: Test group submission + drafts 2013-11-04 15:50:26 +08:00
Sam Hemelryk 7a47babb9e MDL-42350 mod_assign: fixed display of submission button 2013-11-04 15:50:25 +08:00
Jerome Mouneyrac 6e2bf857c6 MDL-42624 Clean theme: dialog should be displayed above the header for user experience purpose 2013-11-04 15:49:48 +08:00
Dan Poltawski 32bf2cfc64 MDL-42111 fix trailing whitespace 2013-11-04 15:35:19 +08:00
Dan Poltawski 466fa368b5 Merge branch 'MDL-42111' of git://github.com/rwijaya/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-04 15:32:34 +08:00
Petr Škoda 372154ff15 MDL-42512 finally fix the indentation of filter management page 2013-11-04 08:28:51 +01:00
Petr Škoda 137f573cfd MDL-42512 fix and cleanup filter management page 2013-11-04 08:24:28 +01:00
Damyon Wiese f6015bbf02 Merge branch 'MDL-34654-master' of git://github.com/sammarshallou/moodle 2013-11-04 15:22:43 +08:00
Dan Poltawski b763a03ddb Merge branch 'MDL-42494-workshop-exception' of git://github.com/mudrd8mz/moodle 2013-11-04 14:51:16 +08:00
Marina Glancy 23f13c5304 Merge branch 'MDL-42429_master' of https://github.com/markn86/moodle 2013-11-04 17:27:57 +11:00
Sam Hemelryk 8e23283cbb Merge branch 'wip-MDL-42577-master' of git://github.com/marinaglancy/moodle 2013-11-04 14:24:46 +08:00
Marina Glancy 197ab6efef Merge branch 'MDL-42566_master' of https://github.com/markn86/moodle 2013-11-04 17:22:45 +11:00
Dan Poltawski afc33a9ad1 MDL-42286 fix trailing whitespace 2013-11-04 14:14:30 +08:00
Dan Poltawski fa5b21216f Merge branch 'MDL-42286_behat' of https://github.com/andyjdavis/moodle 2013-11-04 14:13:27 +08:00
Sam Hemelryk acdb2159fb Merge branch 'MDL-42648_M26' of git://github.com/lazydaisy/moodle 2013-11-04 14:00:30 +08:00
Frederic Massart 37b6c65dfe MDL-41807 repository_filesystem: Coding style clean up 2013-11-04 13:35:04 +08:00
Frederic Massart 5df695d221 MDL-41807 repository_filesystem: Prevent access to parent directories 2013-11-04 13:34:59 +08:00
Damyon Wiese e45910aff3 Merge branch 'MDL-42489-master' of git://github.com/ankitagarwal/moodle 2013-11-04 13:17:15 +08:00
Marina Glancy 753ce05b8c Merge branch 'MDL-42617' of git://github.com/jleyva/moodle 2013-11-04 16:14:35 +11:00
Damyon Wiese d04bea30da Merge branch 'wip-MDL-42400-master' of git://github.com/marinaglancy/moodle 2013-11-04 13:11:42 +08:00
Marina Glancy ad5a1a5d48 Merge branch 'MDL-42633-master' of git://github.com/ankitagarwal/moodle 2013-11-04 15:59:27 +11:00
Marina Glancy 78d877d40b Merge branch 'MDL-42402-master' of git://github.com/damyon/moodle 2013-11-04 15:53:22 +11:00
Jerome Mouneyrac 7abb7c72ec MDL-42683 EditPDF: stamp picker button size is wrong 2013-11-04 12:35:30 +08:00
Dan Poltawski 9261a3b0d1 Merge branch 'MDL-39489_master' of git://github.com/dmonllao/moodle 2013-11-04 12:30:12 +08:00
Marina Glancy feb09881fb Merge branch 'MDL-38664' of git://github.com/rwijaya/moodle 2013-11-04 15:13:42 +11:00
Dan Poltawski 92dc72a6b5 Merge branch 'MDL-40515' of git://github.com/aolley/moodle 2013-11-04 12:10:39 +08:00
Damyon Wiese 42fb49ae0b Merge branch 'MDL-35146_master' of https://github.com/markn86/moodle 2013-11-04 11:53:40 +08:00
Petr Škoda 1555e10cdf MDL-41941 clean message text 2013-11-04 11:40:13 +08:00
Damyon Wiese 6178bb2091 Merge branch 'MDL-40722-master' of git://github.com/andrewnicols/moodle 2013-11-04 11:33:04 +08:00
Jerome Mouneyrac 7c2efc115c MDL-40874 Retire MyMobile as a standard theme 2013-11-04 14:18:41 +11:00
Tim Hunt 78a492330d 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:12:42 +08:00
Damyon Wiese f859f6b4e6 Merge branch 'MDL-42521_master' of git://github.com/grabs/moodle 2013-11-04 10:56:12 +08:00
Damyon Wiese 0d0b93ce2f Merge branch 'MDL-42663_master' of git://github.com/dmonllao/moodle 2013-11-04 10:49:06 +08:00
Damyon Wiese b804196502 Merge branch '42452-26' of git://github.com/samhemelryk/moodle 2013-11-04 10:37:59 +08:00
Sam Hemelryk ed7e6593db MDL-42452 actionmenu: improved constraint code 2013-11-04 10:25:25 +08:00
Marina Glancy f19aab1565 Merge branch 'MDL-42664-performance_measuring_filter_manager' of git://github.com/mudrd8mz/moodle 2013-11-04 13:17:58 +11:00
Marina Glancy d0a91156ab Merge branch 'MDL-42583-master' of git://github.com/ankitagarwal/moodle 2013-11-04 12:52:15 +11:00
Damyon Wiese 23cd687d72 Merge branch 'MDL-38850' of git://github.com/rwijaya/moodle 2013-11-04 09:38:38 +08:00
Andrew Nicols d248b44c33 MDL-42452 ActionMenu: Change constrains mechanism to show the entire menu 2013-11-04 09:38:00 +08:00
Andreas Grabs 73bbdce8c6 MDL-42521 mod_feedback - Feedback does not show line graphs in Clean theme 2013-11-03 19:11:27 +01:00
Sam Hemelryk ae3fd8eb76 MDL-42452 block: action menu is now constrained to the block container 2013-11-03 16:42:40 +08:00
Andrew Davis 5a47ef3827 MDL-42215 lang: improved the help string for fullnamedisplay 2013-11-03 09:12:36 +08:00
Damyon Wiese f21531eb77 Merge branch 'MDL-42546-master' of git://github.com/danpoltawski/moodle 2013-11-02 22:39:37 +08:00
Damyon Wiese 6ff3923ba8 Merge branch 'w45_MDL-42497_m26_orphanedplugins' of https://github.com/skodak/moodle 2013-11-02 22:34:16 +08:00
Damyon Wiese e0c14e5018 Merge branch 'w45_MDL-42387_m26_filelifetime' of https://github.com/skodak/moodle 2013-11-02 22:24:19 +08:00
Mary Evans 0664129b46 MDL-42648 lib: Clean theme throws exception if set_pagelayout is called too late. 2013-11-02 00:43:48 +00:00
Damyon Wiese e9a20b4703 Merge branch 'wip-MDL-28463-master' of git://github.com/marinaglancy/moodle
Conflicts:
	version.php
2013-11-01 21:31:57 +08:00
Petr Škoda 4cf944c6bc MDL-42044 minor add-on installer unit tests cleanup 2013-11-01 10:43:14 +01:00
Petr Škoda 99456a5559 MDL-42044 standardise list of unzipped files in add-on installer 2013-11-01 10:43:13 +01:00
Petr Škoda 0c431257e9 MDL-42387 standardise file lifetime handling 2013-11-01 10:42:18 +01:00
Petr Škoda a35fce24ca MDL-42497 add listing of orphaned subplugin types 2013-11-01 10:39:07 +01:00
Petr Škoda 2384d33136 MDL-42525 improve performance of plugin listing 2013-11-01 10:36:04 +01:00
Petr Škoda 93b3aaf466 MDL-42602 remove incorrect snapshot from \core\event\user_loggedin
* all snapshots in events should match the DB data
* the snapshot from user table will not be necessary most probably
2013-11-01 10:34:07 +01:00
Dan Poltawski 54173d4180 Merge branch 'MDL-42287-master' of git://github.com/ankitagarwal/moodle 2013-11-01 17:31:17 +08:00
David Monllao 92bfad6b1b 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:37:45 +08:00
Mark Nelson 66dbecef8a MDL-42429 mod_lesson: removed unnecessary conditional check causing a PHP notice 2013-11-01 16:22:49 +08:00
David Mudrák c928c60718 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:18:10 +01:00
Dan Poltawski 5386f0bbfe on-demand release 2.6beta+ 2013-11-01 15:49:16 +08:00
Dan Poltawski 4c3b5e6e1f Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-11-01 15:47:31 +08:00
Marina Glancy b4dba228a7 MDL-28463 conditionlib: use MUC for caching grades, reset when grades are changed 2013-11-01 16:48:50 +11:00
Rajesh Taneja 3b732cd6cc MDL-42492 course: Show option to move category to top level
added behat to test move category
2013-11-01 15:53:38 +11:00
Dan Poltawski 472c06f816 MDL-42546 question: fix some bad phpdocs 2013-11-01 12:06:43 +08:00
Andrew Davis b54f5086f6 MDL-42286 questionbank: add behat tests for putting questions in categories MDLQA-95 2013-11-01 10:28:28 +08:00
Marina Glancy df27570b93 Merge branch '42619-26' of git://github.com/samhemelryk/moodle 2013-11-01 13:23:30 +11:00
Sam Hemelryk 12ceaa5514 MDL-42619 block_community: delete course redirect bug fix 2013-11-01 10:17:15 +08:00
Damyon Wiese a123eb58b1 MDL-42102 TinyMCE: Toolbar wrapping < 480px.
Prevent wrap plugin from wrapping toolbars shorter than 5 buttons.
2013-11-01 10:08:52 +08:00
Marina Glancy 1637827d75 Merge branch 'wip-mdl-42584' of https://github.com/rajeshtaneja/moodle
Conflicts:
	lib/classes/event/user_deleted.php
2013-11-01 13:04:29 +11:00
Marina Glancy 35e903971b Merge branch 'MDL-42565-master' of git://github.com/ankitagarwal/moodle 2013-11-01 12:42:17 +11:00
Marina Glancy 003a81ee11 Merge branch 'MDL-42356-master' of git://github.com/mouneyrac/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-01 12:16:20 +11:00
Marina Glancy d2941e8808 Merge branch 'MDL-42471-master' of git://github.com/andrewnicols/moodle 2013-11-01 09:00:05 +08:00
Marina Glancy f5b2c9f4af Merge branch 'MDL-42351-master' of git://github.com/damyon/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-01 09:00:03 +08:00
Marina Glancy bbb430bf5e Merge branch 'MDL-41624' of git://github.com/jmvedrine/moodle 2013-11-01 08:59:31 +08:00
Dan Poltawski b674a3f6f2 MDL-42102 ie9 SVG fixes 2013-11-01 08:59:31 +08:00
Dan Poltawski e394484179 Merge branch 'MDL-42102-master' of git://github.com/andrewnicols/moodle
Conflicts:
	lib/editor/tinymce/tiny_mce/3.5.8/themes/advanced/skins/moodle/ui.css
2013-11-01 08:59:27 +08:00
Barbara Ramiro ca4e42cfa3 MDL-42102 TinyMCE: Update icons 2013-11-01 08:57:41 +08:00
Marina Glancy 595d9876bb Merge branch 'MDL-40971_M26' of git://github.com/lazydaisy/moodle 2013-11-01 08:57:40 +08:00
Andrew Nicols 6492c72ac4 MDL-42012 TinyMCE: Remove black background on foreground color picker 2013-11-01 08:57:40 +08:00
Jason Fowler 4c86dd513a MDL-42102 TinyMCE: Fixing dropdown positioning 2013-11-01 08:57:39 +08:00
Sam Hemelryk cda49969c3 MDL-42300 course: improved category re-sort controls.
* The top action now works on top level categories and has
  a better title.
* Each category has its own resort actions now.
2013-11-01 08:57:39 +08:00
Marina Glancy 0219e54100 Merge branch 'MDL-42587' of git://github.com/aolley/moodle 2013-11-01 08:57:38 +08:00
Marina Glancy b53c155276 Merge branch 'wip-MDL-42599-master' of git://github.com/abgreeve/moodle 2013-11-01 08:57:38 +08:00
Dan Poltawski 3dc774b8ef Merge branch 'MDL-42517-m' of git://github.com/micaherne/moodle 2013-11-01 08:57:37 +08:00
Dan Poltawski d61d4c1bf6 Merge branch 'MDL-42482_editpdf_blank_comments' of git://github.com/davosmith/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-01 08:57:33 +08:00
Dan Poltawski fcdc588976 Merge branch 'wip-mdl-42594' of https://github.com/rajeshtaneja/moodle 2013-11-01 08:56:58 +08:00
Dan Poltawski 9b0cc9ddf2 Merge branch 'MDL-41041-master' of git://github.com/FMCorz/moodle 2013-11-01 08:56:58 +08:00
Dan Poltawski fc74cc8238 Merge branch 'MDL-42352_editpdf_scrolling' of git://github.com/davosmith/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-01 08:56:53 +08:00
Dan Poltawski e9b7148ba7 Merge branch 'MDL-42589-master' of git://github.com/damyon/moodle 2013-11-01 08:55:32 +08:00
Damyon Wiese 4562fdc240 MDL-42589: Fix file picker display in ie9/ie10
CSS change to fix blank file picker bug in IE.
2013-11-01 08:55:32 +08:00
Dan Poltawski 51bd152e34 Merge branch 'MDL-41664_master' of https://github.com/markn86/moodle 2013-11-01 08:55:31 +08:00
Barbara Ramiro 6ce5fd3556 MDL-42102 TinyMCE: Correct additional icons 2013-11-01 08:55:30 +08:00
Dan Poltawski d7052f748b Merge branch 'MDL-42102-master' of git://github.com/andrewnicols/moodle 2013-11-01 08:55:30 +08:00
Barbara Ramiro dee6073da2 MDL-42102 tinymce: improved icons 2013-11-01 08:55:29 +08:00
Damyon Wiese 3b4e5a83f4 Merge branch 'MDL-38734-master' of git://github.com/danpoltawski/moodle 2013-11-01 08:55:29 +08:00
Damyon Wiese 575d38d099 ie9 svg compatibility fixes 2013-11-01 08:55:29 +08:00
Damyon Wiese bb1a600046 Merge branch 'MDL-41092-master' of git://github.com/ankitagarwal/moodle 2013-11-01 08:55:28 +08:00
Damyon Wiese 4d2bd6735f MDL-41092 Assign: Expose SQL error in cron unit test 2013-11-01 08:55:28 +08:00
David Monllao 63950e4d0b MDL-42236 behat: New steps to look for elements visibility 2013-11-01 08:55:27 +08:00
Jason Fowler 98719c48fa MDL-42236 Filepicker: fixing search box for repositories
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-01 08:55:27 +08:00
Sam Hemelryk 9620bcebee Merge branch 'wip-MDL-42379-master' of git://github.com/abgreeve/moodle 2013-11-01 08:55:26 +08:00
Damyon Wiese 574c1699a7 Merge branch 'MDL-42558-master' of git://github.com/ankitagarwal/moodle 2013-11-01 08:55:25 +08:00
Sam Hemelryk ab4fdbdf42 Merge branch 'MDL-42284_behat' of https://github.com/andyjdavis/moodle 2013-11-01 08:55:25 +08:00
Sam Hemelryk 2e29034313 Merge branch 'MDL-42574-master' of git://github.com/ankitagarwal/moodle 2013-11-01 08:55:24 +08:00
Damyon Wiese 3b4ace3ec8 Merge branch 'MDL-41251_c' of git://github.com/rwijaya/moodle 2013-11-01 08:55:24 +08:00
Damyon Wiese 6df3cf52c5 Merge branch 'MDL-42579_m26_2' of git://github.com/sbourget/moodle 2013-11-01 08:55:23 +08:00
Damyon Wiese da13302f91 Merge branch 'wip-MDL-41337-master' of git://github.com/marinaglancy/moodle 2013-11-01 08:55:23 +08:00
Sam Hemelryk df2d3777cc Merge branch 'MDL-42542-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-11-01 08:55:21 +08:00
David Scotson 338021b90c MDL-40722 Theme: Add back a more-specific selector for some blocks
This addresses an issue on narrow devices whereby block width is
incorrectly overridden with a more-specific selector.
2013-11-01 07:53:32 +08:00
Juan Leyva 00461045a9 MDL-42617 Add support for frozen fields in searchableselector form elements 2013-10-31 11:18:24 +01:00
Ankit Agarwal 7887cc65f1 MDL-42633 messages: Fix alternate name warnings when a message popup is shown 2013-10-31 16:09:43 +08:00
Mark Nelson af9fc21cfd MDL-42566 mod_data: introduced check to ensure the picture supplied is valid 2013-10-31 16:06:42 +08:00
Ankit Agarwal fa3f7b972c MDL-42604 scorm: Minor coding style fixes 2013-10-31 14:29:15 +08:00
Ankit Agarwal 9bb0353c89 MDL-42583 events: Fix snapshot issues with note events 2013-10-31 13:43:37 +08:00
Marina Glancy d3bd747db4 MDL-42318 coursecat: in unittests re-request category from DB after generating courses 2013-10-31 13:58:41 +11:00
Ankit Agarwal 4b3bf7f82b MDL-42273 behat: Automate groups and groupings import QAs
MDLQA-2420 Importing groups with an ID number with permissions
MDLQA-2421 Importing groups with an ID number without permissions
MDLQA-5266 A teacher can import groupings as well as groups into a course
2013-10-31 10:37:33 +08:00
Mary Evans de957f5848 MDL-40971 grade: Importing Outcomes breaks Clean theme. 2013-10-30 23:46:47 +00:00
Jean-Michel Vedrine 6713708261 MDL-41624 DragMath crashes Firefox 2013-10-30 17:55:34 +01:00
David Monllao 32fcea7415 MDL-42385 behat: New test to cover MDL-38661
Also refactoring set site settings step
as it has problems to deal with multiple-field
settings.
2013-10-30 18:32:12 +08:00
David Monllao 905729bf33 MDL-42363 behat: Covering MDL-41817 testing
Covering backup/restore without blocks
and with a single course section.
2013-10-30 18:28:14 +08:00
Mark Nelson 1b377fa26f MDL-42613 core_group: removed unnecessary table row when there is no group description or picture 2013-10-30 17:59:15 +08:00
Ankit Agarwal e24c2c1a73 MDL-42565 assign: Status of grading is not displayed anymore 2013-10-30 14:28:21 +08:00
Sam Hemelryk c037f9edf8 MDL-33536 navigation: hide hidden categories from the navbar 2013-10-30 13:34:07 +08:00
Mark Nelson 1d43da0220 MDL-41664 core_calendar: replaced class variables that stored minimum and maximum years with functions
Also made slight changes to the existing functions.
2013-10-30 12:42:12 +08:00
Adrian Greeve 73412d9680 MDL-41664 - Calendar: Add method for formating years in the new calendar plugin. 2013-10-30 11:53:16 +08:00
Adrian Greeve 5450ed4347 MDL-42599 forum rss: Update the sql statements to return all user name fields. 2013-10-30 11:25:59 +08:00
Stephen Bourget bd56062327 MDL-42579 Glossary: Fix debug notice from missing name fields. 2013-10-29 22:56:53 -04:00
Ankit Agarwal a0c779c198 MDL-42604 scorm: Fix division by zero warnings in error logs 2013-10-30 10:47:53 +08:00
Tim Hunt d7db097db1 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-10-29 16:19:24 +00:00
Damyon Wiese d79d1bd8fa MDL-42351 EditPDF: Fix jiggling of relatively positioned elements
When calling setX/setY with YUI - YUI takes into account the position style
of the element. If none is set it assumes position relative. Position relative
is bad because relatively positioned elements still take up space in the page,
and all the elements after that node are positioned, taking into account the size
of that node. So when a node is resized or deleted, all nodes after that one in
the list of drawables are affected.

The magic fix - is just to set position: absolute on the drawables before calling setX/setY.
2013-10-29 22:18:19 +08:00
Petr Škoda c3f0f2fd79 MDL-40683 fix user upload form validation problem 2013-10-29 12:05:29 +01:00
Marina Glancy d90c811585 MDL-41337 files: Fixed bug with accidental delete of the root directory 2013-10-29 20:29:35 +11:00
Dan Poltawski d147e833c0 Merge branch 'wip-MDL-42441-master' of git://github.com/marinaglancy/moodle 2013-10-29 17:28:25 +08:00
Rajesh Taneja 3d49e6ba22 MDL-42594 Navigation: Site admin navigation will show loading icon
While loading site admin navigation loading icon will be displayed
2013-10-29 17:27:53 +08:00
Marina Glancy 0ae13c0f63 MDL-42441 modules: Remove unnecessary code when creating the module in D&D
property groupmodelink is not used at all and groupmode is already processed
properly in core functions (respecting groupmodeforce property in course).
This looks like old code that has not been updated. It's a shame we
duplicate module creation login in draganddrop library
2013-10-29 20:12:51 +11:00
Petr Škoda fc4365d0fe MDL-42555 fix moodle_url typo in namespaces 2013-10-29 17:03:58 +08:00
Jason Fowler 90792eff8b MDL-42102 TinyMCE - Matching toolbar UI from other areas of Moodle 2013-10-29 16:54:13 +08:00
Barbara Ramiro 5bfa35589e MDL-42102 tinymce: new icons 2013-10-29 16:54:05 +08:00
Damyon Wiese e17bac441d Merge branch 'wip-MDL-40683-master' of git://github.com/abgreeve/moodle 2013-10-29 16:42:48 +08:00
Mark Nelson 2072af6c1d MDL-42592 mod_chat: passed additional name fields to be used by the fullname function 2013-10-29 16:41:46 +08:00
Rajesh Taneja aa13929988 MDL-42584 Events: modified get_description in events
blog_entry_created - Removed summary field
blog_entry_deleted - Removed summary field and unwanted entry record
blog_entry_updated - Fixed single quotes and removed summary field
course_module_created - Removed subject
course_module_updated - Removed subject
user_deleted - Removed user firstname and last name
course_module_viewed - Fixed description
2013-10-29 15:24:23 +08:00
Dan Poltawski 2dd8e9357f MDL-42407 upgrade.txt clarify description 2013-10-29 15:15:19 +08:00
Dan Poltawski 576abe8f39 Merge branch 'MDL-42407-master' of git://github.com/phalacee/moodle 2013-10-29 15:08:13 +08:00
Dan Poltawski c966d2e8c8 Merge branch 'MDL-42528' of https://github.com/merrill-oakland/moodle 2013-10-29 15:03:52 +08:00
Jason Fowler 1389bcd7e6 MDL-42407 Filepicker: generate a smarter zIndex for the filepicker 2013-10-29 14:55:46 +08:00
Dan Poltawski 6cd49ef747 Merge branch 'wip-MDL-42463-master' of git://github.com/marinaglancy/moodle 2013-10-29 14:54:44 +08:00
Dan Poltawski 76aa53f2d8 Merge branch 'MDL-42507-master' of git://github.com/andrewnicols/moodle 2013-10-29 14:48:27 +08:00
Jerome Mouneyrac 07d1a2f349 MDL-41232 revert IE8 fix for solving unspoken filemanager details on View List selection 2013-10-29 14:44:02 +08:00
Dan Poltawski c426631850 Merge branch 'MDL-42401-master' of git://github.com/damyon/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-10-29 14:43:02 +08:00
Dan Poltawski 02b87ac151 MDL-42236 fix trailing whitespace 2013-10-29 14:41:16 +08:00
Michael de Raadt 9f3da4079a MDL-41092 assign: Fix duplicate key error in assign cron 2013-10-29 14:38:48 +08:00
John Beedell 614bf85a9e MDL-41473 book: Book html zip import, incorrect url produced for internal linking to other chapters 2013-10-29 14:31:01 +08:00
Jason Fowler e89c21b2f6 MDL-42236 File Manager - Fixing files and whitespace for UI consistency project 2013-10-29 14:24:37 +08:00
Barbara Ramiro c38ecee56f MDL-42149 Usability - Adding new icons for file manager/picker 2013-10-29 14:24:26 +08:00
Jason Fowler f57697d428 MDL-42236 File Manger/Picker - Matching UI with standard UI 2013-10-29 14:24:04 +08:00
Damyon Wiese 5fb9161b5e Merge branch 'MDL-40470-master' of git://github.com/andrewnicols/moodle
Conflicts:
	lib/yui/build/moodle-core-formautosubmit/moodle-core-formautosubmit-min.js
2013-10-29 13:57:51 +08:00
Damyon Wiese afb5f285cd Merge branch 'm26_MDL-39810_IE_Compatibility_View_Does_Not_Recognize_JSON_RFC4627_MIME_Type' of https://github.com/scara/moodle 2013-10-29 13:44:34 +08:00
Dan Poltawski d3428bc93a Merge branch 'w44_MDL-42485_m26_memcachedlocktimeout' of https://github.com/skodak/moodle 2013-10-29 13:42:56 +08:00
Dan Poltawski 7d3cdcc90d Merge branch 'wip-mdl-42557' of https://github.com/rajeshtaneja/moodle 2013-10-29 13:16:44 +08:00
Dan Poltawski b6df9f8f55 Merge branch 'wip-mdl-42560' of git://github.com/rajeshtaneja/moodle 2013-10-29 13:09:23 +08:00
Marina Glancy e58a30f9e8 MDL-42577 mod_url: add redirection delay with edit link
only for teachers and in the course format that does not have course view page (Single activity)
2013-10-29 16:08:01 +11:00
Dan Poltawski e29dcc5a5b Merge branch 'wip-mdl-42556' of https://github.com/rajeshtaneja/moodle 2013-10-29 12:10:44 +08:00
Adam Olley eed17976dc MDL-42587: calendar: Fix regression that stops dates autocorrecting 2013-10-29 14:19:08 +10:30
Jerome Mouneyrac b9e946f827 MDL-42356 Edit PDF: When no stamps uploaded toolbar looks strange 2013-10-29 11:41:43 +08:00
Dan Poltawski b0d92c0cec Merge branch 'wip-mdl-42282' of git://github.com/rajeshtaneja/moodle 2013-10-29 11:31:32 +08:00
Dan Poltawski 0e9b076973 Merge branch 'wip-mdl-42281' of git://github.com/rajeshtaneja/moodle 2013-10-29 11:08:45 +08:00
Andrew Nicols dd8e6cd932 MDL-40470 JavaScript: Correct issue when checking select change in Firefox 2013-10-29 10:43:47 +08:00
Ankit Agarwal fb6ce191a6 MDL-42287 behat: Add an autoamted test to test MDLQA-82 2013-10-29 10:38:35 +08:00
Marina Glancy 9b5e2461d5 MDL-28463 grades: use get_course() method 2013-10-29 11:33:55 +11:00
Marina Glancy b85b9b7c29 MDL-28463 grades: inform conditionlib that grades changed 2013-10-29 11:33:21 +11:00
Marina Glancy 55607effe1 MDL-42463 chat: do not set property of cm_info class
MDL-41192 made all properties of class cm_info read-only
2013-10-29 10:27:39 +11:00
Marina Glancy d61d3163af MDL-42318 coursecat: show correct courses count
courses count should exclude courses that are not visible to the current user
2013-10-29 10:26:56 +11:00
Marina Glancy 9d88b492b1 MDL-42318 coursecat: do not allow to sort if there are invisible children 2013-10-29 10:26:56 +11:00
Matteo Scaramuccia bc242bbda5 MDL-39810 Files: IE doesn't recognize JSON MIME Type (RFC4627).
Affected versions:
- IE 8+, under Compatibility View.
2013-10-28 23:34:35 +01:00
Rajesh Taneja e21ae3ebdc MDL-42281 Behat: Automated test for MDLQA-510
MDLQA-510: A teacher can set grade conditions to restrict availability
of an activity
2013-10-28 16:48:19 +08:00
Rajesh Taneja abedc1a84c MDL-42556 Events: passing modified user info to user_deleted event
Deleting user modifies few fields and leave rest as un-modified
So passing modified data to event, to keep it small
2013-10-28 16:37:56 +08:00
Dan Poltawski 4daa024fd4 Merge branch 'MDL-22669-master' of git://github.com/FMCorz/moodle 2013-10-28 16:31:17 +08:00
Dan Poltawski c4a8d8e4ca MDL-42573 skydrive: support non-js login scheme
This is actually not especially useful because Microsoft don't currently
support non-JS login. But its possible they could make it work in
future. And at least the user gets an error from MS rather than blank
screen.
2013-10-28 16:23:42 +08:00
Rajesh Taneja 0d22c24829 MDL-42557 Events: added idnumber to course_deleted event data 2013-10-28 16:16:25 +08:00
Ankit Agarwal a48dcbf604 MDL-42574 blocks: Fix strict standards warning in community block 2013-10-28 15:41:29 +08:00
Dan Poltawski b1a6c9dc52 Merge branch 'wip-mdl-41811' of git://github.com/rajeshtaneja/moodle
Conflicts:
	login/change_password.php
2013-10-28 15:37:05 +08:00
Dan Poltawski 10ac20830b Merge branch 'wip-mdl-42283' of git://github.com/rajeshtaneja/moodle 2013-10-28 14:53:21 +08:00
Frederic Massart be99db5b96 MDL-22669 course: Display section number for orphaned activities 2013-10-28 14:44:08 +08:00
Dan Poltawski ff1ec8b50f Merge branch 'MDL-42285-master' of git://github.com/phalacee/moodle 2013-10-28 14:15:27 +08:00
Marina Glancy 5ea6d66e9f Merge branch 'MDL-42028-master-4' of git://github.com/mouneyrac/moodle 2013-10-28 16:56:45 +11:00
Jerome Mouneyrac aa3e4bdec7 MDL-42028 EditPDF: replace the loading icon by a progress bar 2013-10-28 13:48:22 +08:00
Rajesh Taneja 726a3be81a MDL-42557 Events: Removed timemodified hack from course_deleted event 2013-10-28 13:01:14 +08:00
Damyon Wiese 9a84376d4b Merge branch 'w44_MDL-42110_m26_addoninstaller' of https://github.com/skodak/moodle 2013-10-28 12:39:30 +08:00
Dan Poltawski f76bd72234 Merge branch 'MDL-38419' of https://github.com/moodlerooms/moodle 2013-10-28 12:33:39 +08:00
Mark Nelson 5311f38215 MDL-35146 mod_wiki: fixed variable typo and altered code to conform to Moodle guidelines 2013-10-28 12:28:03 +08:00
Anton Fletcher 19b2d3fa9c MDL-35146 mod_wiki: fixed issue where pages for deleted groups caused an error on restore 2013-10-28 12:28:03 +08:00
Damyon Wiese 3a33578926 Merge branch 'wip-mdl-30812' of git://github.com/rajeshtaneja/moodle 2013-10-28 12:11:34 +08:00
Ankit Agarwal a993b0b93a MDL-42558 events: Enrollment actions are administration not teaching 2013-10-28 11:51:39 +08:00
Dan Poltawski bdbca0949f Merge branch 'MDL-42538_master' of git://github.com/dmonllao/moodle 2013-10-28 11:35:54 +08:00
Dan Poltawski 96d0198b8a Merge branch 'wip-mdl-42491-master' of git://github.com/deraadt/moodle 2013-10-28 11:21:26 +08:00
Dan Poltawski 4baf482daa Merge branch 'MDL-41504-master' of git://github.com/andrewnicols/moodle 2013-10-28 11:10:43 +08:00
Andrew Nicols 79ad49af63 MDL-41504 Theme: Remove duplicate width/height which seems to cause issues for WebKit 2013-10-28 11:07:37 +08:00
Andrew Nicols 3fcf3d2e78 MDL-41504 ActionMenu: Adjust position of icons 2013-10-28 11:06:51 +08:00
Andrew Nicols a65a8f2535 MDL-41504 ActionMenu: Fix block icon sizes 2013-10-28 11:06:51 +08:00
Andrew Nicols 3148fdf0f5 MDL-41504 actionmenu: Only show course actionmenu if enabled 2013-10-28 11:06:51 +08:00
Andrew Nicols 1ecde7e2ac MDL-41504 ActionMenu: Only modify margins if an actionmenu is in use 2013-10-28 11:06:51 +08:00
Sam Hemelryk ee2d09e430 MDL-41504 course: fixed action icon spacing with JS disabled 2013-10-28 11:06:50 +08:00
Sam Hemelryk a4f01fe443 MDL-41504 completion: fixed display of completion icon
This entailed applying a right spacing to the action menu on
the standard theme to accomodate the completion icon when it
is present.
On the clean them I had to apply a trick. The completion icon
is floated right however no other content is floated.
To ensure the completion icon moved in relation to the action
menu I had to reduce its container size to 0 and rely on
natural overflow. I had to counter this my applying spacing
to the activity container in order to accommodate the actual
size of the icon.
2013-10-28 11:06:49 +08:00
Rajesh Taneja 045d913d11 MDL-42560 Events: Removed use of role->name
role->name is usually empty or localized, so should not be used in events
2013-10-28 11:06:47 +08:00
Prateek Sachan 3266d14bbe MDL-38850: Fixed Horizontal bar issue in lesson 2013-10-28 11:03:17 +08:00
Damyon Wiese 042e6a47fd Merge branch 'MDL-42481-master' of git://github.com/andrewnicols/moodle 2013-10-28 10:52:41 +08:00
Dan Poltawski 92fbc0de26 Merge branch 'MDL-42534-master-int' of git://github.com/FMCorz/moodle 2013-10-28 10:51:44 +08:00
Dan Poltawski c713639b65 Merge branch 'MDL-42511-master' of git://github.com/FMCorz/moodle 2013-10-28 10:43:07 +08:00
Frederic Massart fe1361fc9c MDL-42511 portfolio: Debugging from deprecated function in cron 2013-10-28 10:28:10 +08:00
Ankit Agarwal 932f54e996 MDL-42489 backup: use correct exception class in automated backups 2013-10-28 09:58:56 +08:00
Adrian Greeve 222e0a0045 MDL-42379 behat: Automated test for approving and disapproving glossary entries.
Automate MDLQA-34 - A teacher can set that glossary entries require approval before being viewable be everyone.
2013-10-28 09:29:37 +08:00
Adrian Greeve c00252fbed MDL-40683 administration: Include alternate name fields in CSV user import.
Removal of firstname and lastname from STD_FIELDS
2013-10-28 09:14:44 +08:00
Adrian Greeve 6f4ece9f57 MDL-40683 libraries: Include alternate name fields in CSV user import. 2013-10-28 09:08:48 +08:00
AMOS bot 0ba69bc1f6 Automatically generated installer lang files 2013-10-28 00:46:40 +00:00
Petr Škoda 6ec361c6bc MDL-42485 add session lock acquire timeout to memcached session driver
Credit goes to Eric Merrill, thanks!
2013-10-27 16:05:12 +01:00
Eloy Lafuente (stronk7) 714c4119cd MDL-42551 timezone info: updated to 2013h 2013-10-26 17:14:09 +02:00
Andrew Davis 0bc72fcda6 MDL-42284 core_message: adding behat tests for viewing message history MDLQA-135 2013-10-26 17:27:55 +07:00
Marina Glancy c24b3f66f1 MDL-42400 generator: unittest for module generator 2013-10-26 14:00:27 +11:00
Marina Glancy 3bbbb3c902 MDL-42400 mod_workshop: data generator for workshop 2013-10-26 14:00:27 +11:00
Marina Glancy 20dff4b97e MDL-42400 mod_wiki: data generator for wiki 2013-10-26 14:00:27 +11:00
Marina Glancy 7b22ba41b7 MDL-42400 mod_url: data generator for url 2013-10-26 14:00:26 +11:00
Marina Glancy e426f55059 MDL-42400 mod_survey: data generator for survey 2013-10-26 14:00:26 +11:00
Marina Glancy 78135fd2ec MDL-42400 mod_lesson: data generator for lesson 2013-10-26 14:00:25 +11:00
Marina Glancy 659b15ea5b MDL-42400 mod_glossary: data generator for glossary 2013-10-26 14:00:25 +11:00
Marina Glancy 449d1fa3a4 MDL-42400 modlib: speed up add_moduleinfo, remove unnecessary queries
removed code that was causing unnecessary DB queries, this significantly speeds up data generators
2013-10-26 14:00:24 +11:00
Marina Glancy 7cff3faa94 MDL-42400 tool_generator: save db query in module generation 2013-10-26 14:00:24 +11:00
Marina Glancy b6affde2cb MDL-42400 generator: Add function testing_module_generator::create_content()
also implement it for mod_book and mod_forum to call existing create_page, create_discussion/post functions
2013-10-26 14:00:24 +11:00
Marina Glancy 7fbe33fcf1 MDL-42400 generator: module generators call add_moduleinfo instead of direct inserts 2013-10-26 14:00:23 +11:00
Marina Glancy b4b7587294 MDL-42400 modlib: include module file when it's used
- changed the place where module file is included to make sure that add_moduleinfo() can be called independently from create_module()
- removed permission check from add_moduleinfo() because this function is not supposed to check permissions. Besides it's only half-check. See can_add_moduleinfo()
- added phpdocs to some functions to indicate that they can throw an exception
2013-10-26 14:00:23 +11:00
Petr Škoda a635424f88 MDL-42110 use parent directory permissions when installing add-ons 2013-10-25 21:23:40 +02:00
Petr Škoda 302506e03a MDL-42493 revert nasty DB meta caching hack that was trying to work around shutdown issues
The original problem was resolved via new core shutdown handler support.
2013-10-25 21:20:06 +02:00
Tim Hunt 6c7e553fc4 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:08:17 +01:00
sam marshall 96c3f75a4d MDL-34654 Glossary: ampersand breaks auto-linking 2013-10-25 18:15:03 +01:00
Gareth J Barnard e2cceaffad MDL-42270 course: Section name too big message. 2013-10-25 16:52:00 +01:00
Eloy Lafuente (stronk7) 68291f2d57 on-demand release 2.6beta+ 2013-10-25 13:04:18 +02:00
Michael Aherne 85e7a92e54 MDL-42517 testing Changed events test to use assertDebuggingCalled() 2013-10-25 09:50:10 +01:00
Frederic Massart fc203e28d6 MDL-42542 portfolio: Fix handlerfile in portfolio event handler 2013-10-25 16:00:51 +08:00
Dan Poltawski 534c356a87 Merge branch 'wip-mdl-42536' of git://github.com/rajeshtaneja/moodle 2013-10-25 15:55:27 +08:00
Dan Poltawski 3e2b1a15aa Merge branch 'MDL-42514-master' of git://github.com/FMCorz/moodle 2013-10-25 15:27:48 +08:00
Frederic Massart 862ca7dbc1 MDL-41041 portfolio: Temporary solution for event portfolio_send
As we have deprecated events_trigger(), the portfolio cannot use it
any more. Though there is no easy solution to get rid of this event
as it is used to register a cron job. MDL-42541 has been raised to
refactor the portfolio code to solve this problem. In the meantime
events_trigger_legacy() will be used.
2013-10-25 14:54:34 +08:00
Dan Poltawski d62cddc569 Merge branch 'MDL-42535-master-int' of git://github.com/FMCorz/moodle 2013-10-25 13:47:00 +08:00
Andrew Nicols 6a2da367aa MDL-42471 JavaScript: Adding missing dependency to toolbox 2013-10-25 13:40:40 +08:00
Marina Glancy 10b44ec93d Merge branch 'w43_MDL-42207_m26_messageformat' of https://github.com/skodak/moodle 2013-10-25 16:16:31 +11:00
Petr Škoda 4048f5b39c MDL-42207 standardise message text formatting 2013-10-25 07:08:34 +02:00
Dan Poltawski b2d08cad46 Merge branch 'MDL-42220-master' of git://github.com/ankitagarwal/moodle 2013-10-25 12:42:38 +08:00
Dan Poltawski cf49c1b642 Merge branch 'MDL-42219-master' of git://github.com/ankitagarwal/moodle 2013-10-25 12:39:37 +08:00
Marina Glancy a2f56679f9 Merge branch 'MDL-31938-master' of git://github.com/danpoltawski/moodle 2013-10-25 14:56:31 +11:00
Thijs Kinkhorst 9953966213 MDL-31938: fix syntax error in db upgrade & update plugin version
Also correct language class name.
2013-10-25 11:51:30 +08:00
Iñaki Arenaza 02a9e4a7f3 MDL-31938, MDL-36138 auth_cas: upgrade phpCAS library
Proxy mode changes testing still pending (we don't have such a setup).
2013-10-25 11:51:23 +08:00
Frederic Massart 268bd2fe77 MDL-42534 mod_forum: Fix issue because cm_info is read only 2013-10-25 11:34:10 +08:00
Dan Poltawski 6356be73d0 Merge branch 'wip-mdl-42261' of git://github.com/rajeshtaneja/moodle 2013-10-25 11:33:19 +08:00
Rajesh Taneja ca85839fd3 MDl-42261 My Home: Fixed string key to show all courses 2013-10-25 11:26:58 +08:00
David Monllao a068887e3d MDL-42538 behat: Fixing wrong number of users 2013-10-25 11:22:34 +08:00
Rajesh Taneja 735c3a7b4f MDL-42536 enrol_self: Added groups/lib.php required file 2013-10-25 11:09:43 +08:00
Frederic Massart c58d1e0c24 MDL-42535 report_outline: Notice set_url() was not called 2013-10-25 10:20:11 +08:00
Dan Poltawski eb04bc4a86 Merge branch 'w43_MDL-42381_m26_ole' of https://github.com/skodak/moodle 2013-10-25 10:05:55 +08:00
Frederic Massart 127816472e MDL-42533 conditionlib: Field name is translated for students 2013-10-25 09:46:36 +08:00
Michael de Raadt a6989aa6e9 MDL-42491 libraries: add exception for IE11 (and hopefully later versions) 2013-10-25 09:24:47 +08:00
Frederic Massart 40bbce2499 MDL-42514 groups: Importing groups created unnamed groupings 2013-10-25 08:14:33 +08:00
Eloy Lafuente (stronk7) 27ee4c13a5 Merge branch 'MDL-42377_master' of https://github.com/markn86/moodle 2013-10-25 01:14:04 +02:00
Eloy Lafuente (stronk7) 7419751a4c Merge branch 'MDL-41966-master' of git://github.com/ankitagarwal/moodle 2013-10-25 01:09:25 +02:00
Eric Merrill ac1a29755e MDL-42528 Activity Completion: DnD upload should obey default setting
Make activities created by drad and drop obey Default completion
tracking setting.
2013-10-24 17:50:08 -04:00
Eloy Lafuente (stronk7) 20ddc0c9cf Merge branch 'MDL-42410-master' of git://github.com/danpoltawski/moodle 2013-10-24 23:35:24 +02:00
Eloy Lafuente (stronk7) c783a415dc Merge branch 'w43_MDL-42442_m26_standardwhite' of https://github.com/skodak/moodle 2013-10-24 23:33:42 +02:00
Eloy Lafuente (stronk7) d0285a0d91 Merge branch 'w43_MDL-42206_m26_metaedit' of https://github.com/skodak/moodle 2013-10-24 23:27:11 +02:00
Dan Poltawski e36f72414d Merge branch 'wip-mdl-42261' of git://github.com/rajeshtaneja/moodle 2013-10-24 16:57:47 +08:00
Rajesh Taneja bcf725398a MDL-42261 My Home: Fixed strings to match moodle standards 2013-10-24 16:55:27 +08:00
Rajesh Taneja 6fb0760827 MDL-42261 My Home: Added link to show all courses on my home page
If not forced by admin, user can see all courses by clicking on link
2013-10-24 16:55:26 +08:00
Dan Poltawski 3f9a9e86b3 Merge branch 'MDL-42338' of git://github.com/rwijaya/moodle 2013-10-24 16:28:46 +08:00
Dan Poltawski 5ab04db356 Merge branch 'MDL-42388-master' of git://github.com/sammarshallou/moodle 2013-10-24 16:15:24 +08:00
Dan Poltawski 76dcc0ee21 Merge branch 'MDL-42389-master' of git://github.com/sammarshallou/moodle 2013-10-24 16:07:17 +08:00
Dan Poltawski 680d9052ad Merge branch 'MDL-42477-master' of git://github.com/FMCorz/moodle 2013-10-24 15:55:52 +08:00
Dan Poltawski 012b0472c5 Merge branch '42299-26' of git://github.com/samhemelryk/moodle
Conflicts:
	version.php
2013-10-24 15:47:48 +08:00
Dan Poltawski c6dd6d2eb7 Merge branch 'wip-MDL-42486-master' of git://github.com/marinaglancy/moodle 2013-10-24 15:15:07 +08:00
Damyon Wiese 6d87dcebe2 MDL-42401 EditPDF: Allow dragging the edit pdf window.
Also move the location of the call the centerDialogue so it fires after the drawing region is
added to the window.
2013-10-24 13:50:58 +08:00
Damyon Wiese 298a7ee386 MDL-42402 EditPDF: CSS Improvements for editing toolbar.
The main change here is to prevent the default rendering of a select list for the page
selector, so that it looks more consistent with the rest of the toolbar on different
browsers/os combinations.

This is done with some vendor specific css rules targeting webkit, mozilla and ie.

There are also some minor tweaks to vertically align the images in the buttons and reduce the padding
above and below the toolbar.
2013-10-24 13:22:39 +08:00
Dan Poltawski 2d2c5f36c4 Merge branch 'MDL-42272-master' of git://github.com/ankitagarwal/moodle 2013-10-24 12:43:52 +08:00
Dan Poltawski 205d507f87 Merge branch 'MDL-42362_master' of git://github.com/dmonllao/moodle 2013-10-24 12:39:38 +08:00
Jason Fowler 7db052a8f2 MDL-42285 Behat: Automate MDLQA-93 - A teacher can delete questions from the question bank 2013-10-24 12:35:23 +08:00
Dan Poltawski f76c87151f Merge branch 'wip-MDL-42323-master' of git://github.com/marinaglancy/moodle 2013-10-24 12:33:15 +08:00
Marina Glancy c7944a72b3 Merge branch 'MDL-35402_editor_rules' of git://github.com/davosmith/moodle 2013-10-24 15:29:15 +11:00
Marina Glancy 33c4c3a363 Merge branch 'MDL-41252-master' of git://github.com/mouneyrac/moodle 2013-10-24 14:15:05 +11:00
Andrew Nicols 1607ead74d MDL-42481 Editor: Temporarily unhide the editor to calculate its size 2013-10-24 11:11:11 +08:00
rwijaya 45535d95b3 MDL-42338 lti_mod: convert hardcoded string. 2013-10-24 10:30:02 +08:00
Damyon Wiese 76f8eb9be9 Merge branch 'MDL-40976-behat-fix' of git://github.com/dmonllao/moodle 2013-10-24 10:29:05 +08:00
Dan Poltawski 93488d8bb0 Merge branch 'MDL-42293-master' of git://github.com/ankitagarwal/moodle 2013-10-24 10:27:23 +08:00
Dan Poltawski 459dbd4362 Merge branch 'MDL-42030-master' of git://github.com/mouneyrac/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-10-24 10:19:47 +08:00
Andrew Nicols 0f965ca901 MDL-42507 JavaScript: Fix alignment of tooltips 2013-10-24 09:58:04 +08:00
Frederic Massart 37008335c0 MDL-42477 filter_glossary: Alert was not showing 2013-10-24 09:11:15 +08:00
David Mudrák e01d4a2236 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:45:18 +02:00
Dan Poltawski 295e4fa8f4 MDL-29070 enrol_imsenterprise: more code cleanups
Including:
* fix whitespace
* coding style fixes:
* Declare method visibility
* Don't have variable names with underscores
* Comments without .
* if/for loop spacing
* Unused variables
* Split long lines
* Removed outdates files
* moodlecheck warnings
* code checker warnings
2013-10-23 17:10:56 +08:00
Brian Biggs 1ee378bbdc MDL-29070 enrol_imsenterprise: Code cleanup
In preparation for new features.
2013-10-23 17:10:35 +08:00
David Monllao 2a9275c4c5 MDL-40976 behat: Updating tests according to new behaviour
We only open the actions menu when is collapsed.
2013-10-23 16:19:33 +08:00
Rajesh Taneja 3f038d6d97 MDL-42283 Behat: Automated MDLQA-1777
MDLQA-1777: A teacher can set grade conditions to restrict availability of a section
2013-10-23 15:57:53 +08:00
Dan Poltawski b8a5092f2e Merge branch 'MDL-42342-master' of git://github.com/ankitagarwal/moodle 2013-10-23 15:26:54 +08:00
Dan Poltawski 276c451b2a Merge branch 'MDL-42343_master' of git://github.com/dmonllao/moodle 2013-10-23 15:12:22 +08:00
Dan Poltawski 0f136c1a5b Merge branch 'MDL-42290-master' of git://github.com/ankitagarwal/moodle 2013-10-23 14:36:07 +08:00
Ankit Agarwal b2b50d92f6 MDL-42219 quiz: Fix alternate name warnings in quiz
Fix the alternate name warning which is generated when submitting an attempt for a quiz
2013-10-23 14:36:00 +08:00
Marina Glancy 90eb4ddd9a Merge branch '42246-26' of git://github.com/samhemelryk/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-10-23 17:22:28 +11:00
Ankit Agarwal b469c5e750 MDL-42220 quiz: Fix name fields warning in quiz
Fix warnings generated when manually grading a quiz attempts
2013-10-23 14:21:15 +08:00
Damyon Wiese 19becd541a Merge branch 'MDL-42210_master' of git://github.com/grabs/moodle 2013-10-23 14:06:04 +08:00
Damyon Wiese db812f5e5a Merge branch 'w43_MDL-42208_m26_authunmask' of https://github.com/skodak/moodle 2013-10-23 13:37:24 +08:00
Petr Škoda a668a7e420 MDL-42208 fix JS get_string usage and remove unnecessary params from auth password unmask init 2013-10-23 07:32:24 +02:00
Dan Poltawski 40f0a3abed Merge branch 'wip-MDL-42278-master' of git://github.com/marinaglancy/moodle 2013-10-23 13:20:08 +08:00
Dan Poltawski 8c8a844f2b Merge branch '42277-26' of git://github.com/samhemelryk/moodle 2013-10-23 13:18:45 +08:00
Dan Poltawski d0041fb110 Merge branch 'w43_MDL-38743_m26_private' of https://github.com/skodak/moodle 2013-10-23 13:15:48 +08:00
rwijaya 5639454509 MDL-41251 forum_mod: add aria label and role to forum discussion page for accessibility purpose.
Thanks to Nate Baxley for creating the original patch.
2013-10-23 12:43:35 +08:00
Dan Poltawski de3d8fda10 Merge branch 'MDL-40531' of https://github.com/stronk7/moodle 2013-10-23 12:37:45 +08:00
Marina Glancy d82a3b9f76 Merge branch 'MDL-42427-master' of git://github.com/ankitagarwal/moodle 2013-10-23 15:34:47 +11:00
Ankit Agarwal f3218d15b0 MDL-42427 backup: Fix undefined errors during automated backups 2013-10-23 12:03:13 +08:00
Damyon Wiese f45d62e792 MDL-41339 Tags - use uppercase for SQL keywords (AS) 2013-10-23 12:00:01 +08:00
Damyon Wiese 549ce3fa76 Merge branch 'wip-mdl-41339' of https://github.com/jennymgray/moodle 2013-10-23 11:50:50 +08:00
Marina Glancy ab864f2c36 Merge branch 'MDL-42426-master' of git://github.com/damyon/moodle 2013-10-23 13:59:50 +11:00
Marina Glancy 4f10bc6bb0 Merge branch '42301-26' of git://github.com/samhemelryk/moodle 2013-10-23 13:51:00 +11:00
Marina Glancy 63e77f410d Merge branch 'w43_MDL-42414_m26_rev' of https://github.com/skodak/moodle 2013-10-23 13:11:13 +11:00
Marina Glancy c5df0a63bc Merge branch '42170-26' of git://github.com/samhemelryk/moodle 2013-10-23 11:43:23 +11:00
Marina Glancy f9c86035c9 Merge branch '42316-26' of git://github.com/samhemelryk/moodle 2013-10-23 11:05:59 +11:00
Marina Glancy 0d7b312247 MDL-42486 enrol: fixed bug in URL on manage enrol plugins page 2013-10-23 10:44:22 +11:00
Marina Glancy 295825feb6 Merge branch 'w43_MDL-37813_m26_filterall' of https://github.com/skodak/moodle 2013-10-23 10:17:00 +11:00
Davo Smith 60b8708076 MDL-42355 assignfeedback_editpdf - do not start a new comment immediately when deselecting the old comment 2013-10-22 18:46:45 +01:00
Davo Smith 6e67d80d50 MDL-42482 assignfeedback_editpdf - prevent blank comments from disappearing when the menu is opened 2013-10-22 18:26:44 +01:00
Dan Poltawski 34fb3545ea on demand release 2.6beta+
Thanks to all who entered the competition to find the mistake in the
last commit. It was spotted by none other than super-awesome Moodler
Justin Filip.

He collects a beer from me at our next available meeting.
2013-10-22 23:05:02 +08:00
Davo Smith 114913e31f MDL-42352 assignfeedback_editpdf - prevent scrolling when clicking on buttons 2013-10-22 15:09:15 +01:00
Dan Poltawski 129ceb5849 on demand release 2.5beta+ 2013-10-22 20:52:44 +08:00
Dan Poltawski 174df12acb Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-10-22 20:51:30 +08:00
Aaron Barnes d2cd4acab1 MDL-42476 report_progress: don't browser sniff for SVG support
Use feature detection, its more robust and better practice.
2013-10-23 00:12:18 +13:00
Jerome Mouneyrac 6bdb788679 MDL-24380 Chat: autoscroll help popup incorrect and doesn't display fully 2013-10-22 12:35:23 +02:00
Dan Poltawski 8c3ebb1a9f Merge branch 'w43_MDL-42440_m26_authenable' of https://github.com/skodak/moodle 2013-10-22 12:16:53 +02:00
Dan Poltawski 2d79065013 Merge branch 'MDL-42112-master' of git://github.com/damyon/moodle 2013-10-22 12:16:53 +02:00
Dan Poltawski 6f4747d7b4 Merge branch 'MDL-42340-master' of git://github.com/andrewnicols/moodle
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
	theme/bootstrapbase/style/moodle.css
2013-10-22 12:16:50 +02:00
Dan Poltawski d4256630e7 Merge branch '40976-26' of git://github.com/samhemelryk/moodle 2013-10-22 12:14:41 +02:00
Dan Poltawski 3481222e57 MDL-42459 upgrade: fix upgrade step ordering
Also incremented version to be safe
2013-10-22 12:14:40 +02:00
Eloy Lafuente (stronk7) bf928b2933 Merge branch 'MDL-42459-master' of git://github.com/damyon/moodle
Conflicts:
	version.php
2013-10-22 12:14:29 +02:00
Dan Poltawski a8261e2830 Merge branch 'MDL-29441-master' of git://github.com/andrewnicols/moodle 2013-10-22 12:11:48 +02:00
Dan Poltawski 0c7c5e767c Merge branch 'MDL-42115-master' of git://github.com/jamiepratt/moodle 2013-10-22 12:11:45 +02:00
Dan Poltawski 616e57d926 Merge branch 'MDL-40045_master' of https://github.com/markn86/moodle 2013-10-22 12:11:45 +02:00
Marina Glancy a90e023b4a Merge branch 'MDL-26170_rss' of https://github.com/andyjdavis/moodle 2013-10-22 12:11:44 +02:00
Dan Poltawski 59dca9505b Merge branch 'wip-mdl-31405-new' of git://github.com/rajeshtaneja/moodle 2013-10-22 12:11:42 +02:00
Dan Poltawski 181b0b3c3e Merge branch 'MDL-42117-master' of git://github.com/andrewnicols/moodle 2013-10-22 12:11:42 +02:00
Andrew Nicols 087c5d43c0 MDL-42464 mod_chat: Correct use of encoded & in link 2013-10-22 15:12:28 +08:00
Damyon Wiese 775a32c9b8 MDL-42459 Atto: Bye bye - see you in the plugins db! 2013-10-22 12:01:56 +08:00
Andrew Davis 54eb02a45c MDL-26170 RSS: fixed RSS cache clearing when items are deleted 2013-10-22 10:29:05 +07:00
Andrew Nicols d5367fb566 MDL-42117 JavaScript: Ensure that new activities are fully set up
We don't need to set up anything specifically for toolboxes any more, but
other third-party JS may require additional setup following new module
creation.
2013-10-22 11:26:44 +08:00
Andrew Nicols b676db838b MDL-42117 JavaScript: Don't rely on node data for course toolboxes
The YUI versions of getData and setData do not store the data in the DOM,
but in an instance of YUI. If you make modifications in one instance, but
apply them in another, then the data values are not accessible between
these two instances.

Additionally, there's no benefit to storing the instances on
initialisation - if anything, it increases the load overhead.

This change moves toolboxes to calculating their ancestors on click in the
same way it was done in the initialiser.
2013-10-22 11:26:36 +08:00
Rajesh Taneja 1c4d953cef 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:10:32 +08:00
Marina Glancy 8f9560091f Merge branch 'MDL-42239-master' of git://github.com/ankitagarwal/moodle 2013-10-22 14:08:12 +11:00
Ankit Agarwal 9c7f855b49 MDL-42239 calendar: Fix missing ids issue with mouseover panels 2013-10-22 10:39:32 +08:00
Dan Poltawski b750557ba0 Merge branch 'MDL-42201_master' of https://github.com/markn86/moodle 2013-10-22 10:25:44 +08:00
Ankit Agarwal 0859a08d37 MDL-42173 administration: Fix alternate name warnings during registration 2013-10-22 10:03:29 +08:00
Rajesh Taneja 0daadaaeaf MDL-34612 Restore: Gracefully handle empty file contenthash while restoring 2013-10-22 09:47:42 +08:00
Rajesh Taneja 62b6135c38 MDL-34612 Restore: Gracefully handle empty section title while restoring 2013-10-22 09:47:42 +08:00
AMOS bot f7bff0727f Automatically generated installer lang files 2013-10-22 00:45:38 +00:00
Marina Glancy 83a3e35e56 Merge branch 'wip-MDL-42177-master-three' of git://github.com/abgreeve/moodle 2013-10-22 09:48:57 +11:00
Mary Evans e69133f543 MDL-42453 theme_base: Fixed Error in base/style/admin.css that breaks CSS validator. 2013-10-21 15:19:18 +01:00
Petr Škoda d5814f4e22 MDL-41811 simplify the admin tree detection logic and fix navigation in multiple areas 2013-10-21 14:17:55 +08:00
Rajesh Taneja bafcd3f17a MDL-41811 navigation: Load site admin navigation
Go to notification page before following links within site admin
navigation, ensuring site admin navigation is loaded

With no js, test should follow site admin link and not expand it.
2013-10-21 14:17:55 +08:00
David Monllao 4338c6fc53 MDL-42408 behat: Setting the site summary 2013-10-21 14:17:54 +08:00
Rajesh Taneja b92adf24a4 MDL-41811 navigation: Fixed navigation issues on pages
Few admin pages don't add navigation node and hence they should
not show site admin
2013-10-21 14:17:54 +08:00
Rajesh Taneja 8141ba8044 MDL-41811 navigation: Avoid loading site admin navigation is not required
If settings node is added for frontpage, category, course, module, block or user
then don't load site admin navigation.
2013-10-21 14:17:54 +08:00
Rajesh Taneja 0d206054f8 MDL-41811 Navigation: set admin navigation required in badges 2013-10-21 14:17:53 +08:00
Petr Škoda e56c107da8 MDL-41811 tweak custom admin pages to force loading of admin tree 2013-10-21 14:17:53 +08:00
Petr Škoda 61bb8c933f MDL-41811 find out if admin tree needed in navigation 2013-10-21 14:17:53 +08:00
Rajesh Taneja 5ab32c11b7 MDL-41811 navigation: Site admin will be loaded by ajax on non admin pages 2013-10-21 14:17:52 +08:00
Adrian Greeve 0c76aa984c MDL-42177 libraries: Unit tests for new functions that deal with user name fields.
functions with unit tests: get_required_user_name_fields, get_enabled_user_name_fields,
get_disabled_user_name_fields.
2013-10-21 14:15:15 +08:00
Adrian Greeve 1cc3a9aecc MDL-42177 libraries: Additional checking of the fullnamedisplay language string.
If the language string is missing firstname or lastname, then when displaying the
user edit form it defaults to 'firstname lastname'

Previous logic has been moved out to new functions with unit tests.
2013-10-21 14:15:15 +08:00
Rajesh Taneja 932fa0157d MDL-42282 Behat: Automated test for MDLQA-509
MDLQA-509: A teacher can prevent students from accessing an activity
between specified dates
2013-10-21 14:12:31 +08:00
Dan Poltawski 9c5ab08e5a Merge branch 'MDL-34209-master' of git://github.com/andrewnicols/moodle 2013-10-21 13:58:14 +08:00
rwijaya bc8a409c1f MDL-38664 Lesson mod: code improvement for lesson re-attempt page 2013-10-21 13:47:22 +08:00
Jody Steele add50b5ab0 MDL-38628 mod_assign: Allow a user to specify "No Grade" when grading an assignment submission 2013-10-21 16:47:05 +11:00
Joseph Rézeau b882b8c678 MDL-38664 Lesson mod: fixed re-attempt unseen page 2013-10-21 13:43:05 +08:00
Marina Glancy e4ffd3dc7b Merge branch 'w43_MDL-42386_m26_etag' of https://github.com/skodak/moodle 2013-10-21 15:58:51 +11:00
Mark Nelson 4543bf2423 MDL-42377 backup: fixed incorrect debugging message 2013-10-21 11:54:39 +08:00
Mark Nelson e58c291cbb MDL-40045 login: removed add_to_log call when a user updates their password
This add_to_log call is not being replaced by a user_updated event as the
call to $userauth->user_update_password should (and does in the case of
manual authentication - see MDL-41170) do this already when the password
is changed in the user table. If the authentication plugin is changing
the password externally then there is no need to call the user_updated
event as this should only be called whenever any update is made on the
user table.
2013-10-21 11:53:31 +08:00
Mark Nelson f2f694f399 MDL-40045 user: replaced add_to_log call when the user list is viewed with an event 2013-10-21 11:53:31 +08:00
Mark Nelson c76318d338 MDL-40045 user: replaced add_to_log call when a user profile is viewed with an event 2013-10-21 11:53:31 +08:00
Mark Nelson c8974473d0 MDL-40045 auth: introduced PHPUnit test to ensure logging in via LDAP triggers an event 2013-10-21 11:53:31 +08:00
Mark Nelson 5991cabfd7 MDL-40045 auth: removed unnecessary add_to_log calls
Both LDAP and Shibboleth call complete_user_login which triggers
a user_loggedin event that handles the legacy call to add_to_log.
2013-10-21 11:53:30 +08:00
Mark Nelson 70f210c04f MDL-42201 backup: introduced new automatic backup state 2013-10-21 11:51:12 +08:00
Dan Poltawski 2d0316d60d Merge branch 'MDL-26244_url' of https://github.com/andyjdavis/moodle 2013-10-21 11:24:51 +08:00
rwijaya f6606495e4 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:24:06 +08:00
Dan Poltawski f381eede51 Merge branch 'MDL-42408_master' of https://github.com/dmonllao/moodle 2013-10-21 11:15:21 +08:00
David Monllao 98d72f12af MDL-42343 tool_generator: Using the new session manager 2013-10-21 11:14:14 +08:00
David Monllao 041cf62b1d MDL-42362 behat: Passing options to modules generators 2013-10-21 11:11:39 +08:00
David Monllao a0e89a8fe3 MDL-42408 behat: Setting the site summary 2013-10-21 11:09:39 +08:00
Dan Poltawski fb032ccb3f Merge branch 'wip-mdl-31405-new' of git://github.com/rajeshtaneja/moodle
Conflicts:
	lib/upgrade.txt
    mod/upgrade.txt
2013-10-21 10:57:44 +08:00
Andrew Davis fa4fb78642 MDL-26244 mod_date:added some logic show or hide the file picker button based on repository availability 2013-10-21 08:49:38 +07:00
Ankit Agarwal 93fe4d2a11 MDL-42293 behat: Add suport for custom admin paths to the behat upload repository step 2013-10-21 09:29:16 +08:00
Ankit Agarwal c3faa40f0b MDL-41966 calendar: Fix missing css files issue 2013-10-21 09:24:38 +08:00
Dan Poltawski 8173f4cf01 Merge branch 'w43_MDL-42438_m26_yuicss' of https://github.com/skodak/moodle 2013-10-21 08:56:46 +08:00
Petr Škoda 1302f765a7 MDL-42442 eliminate references to removed standardwhite theme 2013-10-20 18:01:44 +02:00
Petr Škoda e34fb2ef65 MDL-42440 fix auth enabling regression 2013-10-20 10:50:19 +02:00
Andreas Grabs bb4191ff4d MDL-42210 mod_feedback - convert tabs to space 2013-10-20 10:22:56 +02:00
Michael Milette 690266bcf7 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:22:54 +02:00
Petr Škoda 7d26038d47 MDL-42438 load missing CSS for our simple YUI rollup 2013-10-19 21:04:26 +02:00
Charles Severance ba0f89e168 MDL-40531 mod_lti: Various 1.1/1.1.1 fixes. 2013-10-19 02:57:12 +02:00
AMOS bot 9643e2de82 Automatically generated installer lang files 2013-10-19 00:47:32 +00:00
Sam Chaffee 33ad01a291 MDL-40531 mod_lti: Changed namespace in XML to IMS LTI compliant 2013-10-18 10:12:15 -06:00
Petr Škoda a67ea663b1 MDL-37813 remove missing filters when configuring string filters and fix filter uninstall 2013-10-18 15:57:27 +02:00
Petr Škoda 29c43343a2 MDL-38743 add private cache headers 2013-10-18 15:54:43 +02:00
Petr Škoda fa151f7a13 MDL-42206 improve course edit performance when use meta courses 2013-10-18 15:17:02 +02:00
Petr Škoda 6e0ace3885 MDL-42208 add password unhiding option to auth configs 2013-10-18 15:12:18 +02:00
Petr Škoda fcb103c9d3 MDL-42208 prevent autocompletion in auth configs 2013-10-18 15:11:53 +02:00
Petr Škoda 383d414478 MDL-42381 remove unused pear OLE library and other pear excel writer leftovers 2013-10-18 14:52:11 +02:00
Petr Škoda 9cc5f32b22 MDL-42386 fix invalid etag comparison
Credit goes to Eloy Lafuente, thanks!
2013-10-18 14:48:40 +02:00
Petr Škoda c1b8ec42dd MDL-42414 cleanup and fix increment_revision_number() unit test 2013-10-18 14:47:31 +02:00
sam marshall b6cdb4d660 MDL-42389 Restore: Broken restore causes notice before exception 2013-10-18 12:00:56 +01:00
sam marshall 62182e89cf MDL-42388 Restore: Some warnings displayed with debugging() 2013-10-18 11:59:45 +01:00
Dan Poltawski 4e47920f08 Moodle release 2.6beta 2013-10-18 16:21:45 +08:00
Dan Poltawski 2a3129b322 NOBUG: Fixed file access permissions 2013-10-18 16:16:18 +08:00
Dan Poltawski 8982470452 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-10-18 16:16:11 +08:00
Tony Levi 1b55bdb644 MDL-38734: Automated backup failure causing all course to fail
Conflicts:
	backup/moodle2/backup_stepslib.php
2013-10-18 15:07:35 +08:00
Damyon Wiese 5aa06c9c1f MDL-42426 Javascript: Remove debugger statement 2013-10-18 12:41:53 +08:00
Damyon Wiese 3e22717283 MDL-42112 tablelib: Generate the correct number of cols for empty rows
(And a test for it).
2013-10-18 11:51:55 +08:00
Damyon Wiese 306b31794a MDL-42112 Tablelib: Add unit tests (some) 2013-10-18 11:47:07 +08:00
Jenny Gray fc45e6767f MDL-41339 Tags: Added unique tag instance id to tag_get_tags functions
Avoids php warnings on creating new tags
2013-10-17 13:46:34 +01:00
Dan Poltawski c68bf34f83 Merge branch 'MDL-42411-master' of git://github.com/damyon/moodle 2013-10-17 16:29:05 +08:00
Damyon Wiese 5d5c4c0b73 MDL-43411 Backup: Fix restore from 1.9
The restore progress bars introduced a bug when restoring Moodle 1.9 backups.
build_plan needs to be surrounded with start_progress/end_progress with the mode
set to indeterminite or it throws coding errors.
2013-10-17 15:54:24 +08:00
Dan Poltawski 05f597ecac MDL-42410 skydrive: Fix url to microsoft oauth site 2013-10-17 14:25:06 +08:00
Ankit Agarwal 2bc22e070f MDL-42272 groups: Add automated tests for MDLQA-145 2013-10-17 10:59:36 +08:00
Sam Hemelryk df460b5a23 MDL-42299 course: management category expansion improvements 2013-10-17 12:11:31 +13:00
Marina Glancy 0198b4a5d9 MDL-42323 coursecat: Changed phpdocs in deprecated function get_categories 2013-10-17 09:53:28 +11:00
Sam Hemelryk f5593410af MDL-40976 actionmenu: toggle button second click now hides 2013-10-17 09:14:29 +13:00
Sam Hemelryk d5de874727 MDL-42299 course: management interface remember categories expanded by AJAX
Categories that have been expanded using AJAX are now remember and
expanded again autoamtically when something triggers a page refresh.
2013-10-17 08:41:12 +13:00
Sam Hemelryk 3f08254ff8 MDL-42277 course: fixed missing set context 2013-10-17 08:41:07 +13:00
Sam Hemelryk 962885e80c MDL-42316 course: moved require_login up the script 2013-10-17 08:40:55 +13:00
Sam Hemelryk 3b681e6cf8 MDL-42246 course: improved highlighting of bulk actions 2013-10-17 08:40:44 +13:00
Sam Hemelryk 4d4f516da6 MDL-42301 course: listings now show a delete icon 2013-10-17 08:39:12 +13:00
Eloy Lafuente (stronk7) 059d7bd275 Merge branch 'MDL-42380-master' of git://github.com/damyon/moodle 2013-10-16 15:19:36 +02:00
Jamie Pratt f16ed06c2c MDL-42115 exception when there are no questions 2013-10-16 19:40:04 +07:00
Damyon Wiese 2288969269 Merge branch 'MDL-42065_master' of https://github.com/sam-moodle/moodle 2013-10-16 15:45:40 +08:00
Ankit Agarwal 79b40dea57 MDL-42290 choice: Add a automated test to verify limiting number of responses works 2013-10-16 15:34:26 +08:00
Petr Škoda b2858b916a MDL-42148 new overview of 3rd party libraries
Includes:
* each plugin has own thirdpartylibs.xml file
* added missing libraries
* fixed existing library infos
* new Site administration / Development / Third party libraries page
2013-10-16 14:48:29 +08:00
Petr Škoda 80dc19699c MDL-42224 fix log output regression in auth test 2013-10-16 07:25:28 +02:00
Damyon Wiese 6de4beb8dd MDL-42380 Course unit tests: Remove assert causing oracle unit tests to die 2013-10-16 13:20:33 +08:00
Damyon Wiese fc69508f01 Merge branch 'MDL-42029-master-nomerge' of git://github.com/mouneyrac/moodle
Conflicts:
	mod/assign/feedback/editpdf/lang/en/assignfeedback_editpdf.php
2013-10-16 12:45:07 +08:00
Jerome Mouneyrac ea6d86743f MDL-42029 Editpdf: Page selector should indicate what page you are on 2013-10-16 11:55:30 +08:00
Damyon Wiese 2ec214806f Merge branch '42294-26' of git://github.com/samhemelryk/moodle 2013-10-16 11:36:16 +08:00
Eloy Lafuente (stronk7) 11182e2eb1 Merge branch 'w42_MDL-42224_m26_msgredir' of https://github.com/skodak/moodle 2013-10-16 01:23:01 +02:00
Eloy Lafuente (stronk7) 77631383f0 Merge branch 'MDL-42240' of git://github.com/danpoltawski/moodle 2013-10-16 01:04:36 +02:00
Eloy Lafuente (stronk7) cbef1d9d3f MDL-42302 course: re-shitfering management module. 2013-10-16 00:53:58 +02:00
Eloy Lafuente (stronk7) e60637052c Merge branch '42302-26' of git://github.com/samhemelryk/moodle 2013-10-16 00:39:46 +02:00
Sam Hemelryk b155a17034 MDL-42302 course: fixed bugs while changing visibility
* No longer uses show which is resvered on MySQL
* Selected category courses are now always returned.
2013-10-16 08:25:08 +13:00
Sam Hemelryk af321e0f20 MDL-42294 course: fixed delete script ordering
Added a behat test for the creation and deletion of a new course.
This should turn up any such errors like this during automated
testing in the future.
2013-10-16 08:24:56 +13:00
Davo Smith d79d07175e MDL-35402 forms - prevent crash when multiple rules defined on an editor element 2013-10-15 14:30:33 +01:00
Damyon Wiese 2c94d858f0 Merge branch 'MDL-37877-master' of git://github.com/ankitagarwal/moodle 2013-10-15 16:54:40 +08:00
David Monllao 89cf999a8d MDL-39489 behat: Updating to 2.6 moodlehq/behat-extension tag
Also solving new problem after Behat
2.5 upgrade.
2013-10-15 15:09:04 +08:00
Dan Poltawski bca2951282 Merge branch 'MDL-42209_master' of https://github.com/markn86/moodle 2013-10-15 14:43:02 +08:00
Ankit Agarwal f40be120a4 MDL-42342 blocks: Fix alternate name warning in quiz results block 2013-10-15 14:40:02 +08:00
Ankit Agarwal b2e791d153 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 12:14:23 +08:00
Dan Poltawski e3aa1fa929 Merge branch 'wip-MDL-42288-master' of git://github.com/marinaglancy/moodle 2013-10-15 11:53:26 +08:00
Marina Glancy e6bcdc5ece MDL-42278 behat: block context can be returned to original state
Automate MDLQA-1547 - The context of a block can always be returned to it's original state.
2013-10-15 14:41:55 +11:00
Marina Glancy e3d43f0d73 Merge branch 'wip-MDL-42234-master' of git://github.com/abgreeve/moodle 2013-10-15 14:11:15 +11:00
Andrew Nicols ee0a9ce92a MDL-42340 JavaScript: Stop dialogues forcing overflow - use CSS instead 2013-10-15 11:11:07 +08:00
Damyon Wiese ef2b0f5ca3 MDL-42152 Javascript: Add version bump for YUI update 2013-10-15 10:55:29 +08:00
Petr Škoda 2cd519fb71 MDL-42152 fix broken theme->yuicssmodules support 2013-10-15 10:54:34 +08:00
Petr Škoda d3e5f04671 MDL-42152 add more YUI rollup explanation from Andrew 2013-10-15 10:53:21 +08:00
Petr Škoda d17f25a56e MDL-42152 rename our rollup to start with 'yui-' to enable the stadnard regex base magic 2013-10-15 10:53:20 +08:00
Petr Škoda 2ea00a5867 MDL-42152 improve SimpleYUI docs 2013-10-15 10:53:20 +08:00
Andrew Nicols c8b9f6d9b0 MDL-42152 Use new rollup system 2013-10-15 10:53:20 +08:00
Andrew Nicols eee4cbb725 MDL-42152 AJAX: Add rollup support to YUI loader 2013-10-15 10:53:20 +08:00
Petr Škoda 8a47844629 MDL-42152 import YUI 3.13.0 and switch to emulated SimpleYUI
Includes @version@ fix
2013-10-15 10:53:08 +08:00
Tim Hunt 562684e3a0 MDL-42309 typo: fix reponse -> response throughout Moodle. 2013-10-15 13:47:27 +11:00
Adrian Greeve 40a473d5e7 MDL-42234 - Repositories: Fix undefined variable notice when no repositories are enabled. 2013-10-15 10:40:23 +08:00
Marina Glancy 41a403cd14 Merge branch '41959-26' of git://github.com/samhemelryk/moodle 2013-10-15 13:19:30 +11:00
Marina Glancy 38a5cc79f8 Merge branch 'MDL-42230' of git://github.com/timhunt/moodle 2013-10-15 13:19:20 +11:00
Dan Poltawski bd81762784 Merge branch '42247-26' of git://github.com/samhemelryk/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-10-15 09:32:27 +08:00
Marina Glancy 30fb399455 Merge branch '42258-26' of git://github.com/samhemelryk/moodle 2013-10-15 12:10:34 +11:00
Eloy Lafuente (stronk7) 9bb34fb781 Merge branch 'MDL-42226_master' of https://github.com/markn86/moodle 2013-10-15 02:09:11 +02:00
Eloy Lafuente (stronk7) 3745472f63 Merge branch 'MDL-42241-master' of git://github.com/ankitagarwal/moodle 2013-10-15 01:58:51 +02:00
Damyon Wiese 6350e5df45 Merge branch '42256-26' of git://github.com/samhemelryk/moodle 2013-10-14 16:55:39 +08:00
Damyon Wiese 35d7ba167a Merge branch 'MDL-42198_master' of git://github.com/dmonllao/moodle 2013-10-14 16:14:38 +08:00
Dan Poltawski c79239b294 Merge branch 'MDL-42151_master' of git://github.com/dmonllao/moodle 2013-10-14 16:11:50 +08:00
Dan Poltawski 7159340f7f Merge branch 'MDL-41131_c' of git://github.com/rwijaya/moodle 2013-10-14 15:46:22 +08:00
Damyon Wiese 7aeb2cc335 Merge branch '42249-26' of git://github.com/samhemelryk/moodle 2013-10-14 15:12:17 +08:00
Damyon Wiese 3abdd3273b Merge branch '42255-26' of git://github.com/samhemelryk/moodle 2013-10-14 15:07:29 +08:00
Damyon Wiese 769b434ad9 Merge branch 'MDL-42225_master' of https://github.com/markn86/moodle 2013-10-14 15:04:46 +08:00
Damyon Wiese 71c2e40993 Merge branch 'MDL-42187_master' of git://github.com/kordan/moodle 2013-10-14 14:50:53 +08:00
Dan Poltawski 7a1ce7769c Merge branch 'w42_MDL-42082_m26_authdbpass' of https://github.com/skodak/moodle 2013-10-14 14:36:14 +08:00
FilipBenco be885f1291 MDL-42209 backup: fixed wrong icon being displayed when restoring course 2013-10-14 14:32:18 +08:00
Damyon Wiese 185364d366 MDL-34586 assignment - fix whitespace 2013-10-14 14:30:08 +08:00
Damyon Wiese 48947db114 Merge branch 'MDL-34586-master' of https://github.com/mackensen/moodle 2013-10-14 14:29:52 +08:00
Dan Poltawski 7bed57ae1f Merge branch 'MDL-42232' of git://github.com/timhunt/moodle 2013-10-14 14:24:02 +08:00
Damyon Wiese 031a28ce7f Merge branch 'MDL-34612-master' of https://github.com/mackensen/moodle 2013-10-14 14:12:57 +08:00
Damyon Wiese e6338c2c65 Merge branch 'MDL-41170-master' of git://github.com/ankitagarwal/moodle 2013-10-14 14:02:34 +08:00
Ankit Agarwal 6c679d1532 MDL-41170 events: User_updated event should be triggered on password updates 2013-10-14 13:26:47 +08:00
Damyon Wiese 36f60b226d Merge branch '42253-26' of git://github.com/samhemelryk/moodle 2013-10-14 13:02:55 +08:00
David Monllao 8f50ec7db6 MDL-42198 tool_generator: Changing test plan default values
To achieve more stability on test results we
switch to less users and more loops.
2013-10-14 12:46:02 +08:00
David Monllao 9a79e456c2 MDL-42151 behat: Adding the version to the testplan 2013-10-14 12:43:52 +08:00
rwijaya f159ad7302 MDL-41131 assign module: remove setting for submission comments and edipdf plugins' setting. 2013-10-14 12:43:26 +08:00
Rajesh Taneja e63515ba93 MDL-31405 Assignment: Fixed date in reset to be called for every assignment 2013-10-14 12:34:55 +08:00
Dan Poltawski b011a17b26 Merge branch 'MDL-41672-text-mail-links' of git://github.com/mudrd8mz/moodle 2013-10-14 12:11:23 +08:00
Dan Poltawski b1bdb61e90 Merge branch 'MDL-42167-workshop-update-record' of git://github.com/mudrd8mz/moodle 2013-10-14 12:07:54 +08:00
Mark Nelson 61f039ce4b MDL-42225 badges: retrieve all the name fields when viewing the recipient list 2013-10-14 12:01:20 +08:00
Mark Nelson 5241526d20 MDL-42226 badges: retrieve all the name fields when viewing an issued badge 2013-10-14 11:59:41 +08:00
Marina Glancy 4ff520d800 MDL-42288 behat: Allowing to change choice response
Automate MDLQA-46 - A teacher can choose whether to allow students to change their choice response
2013-10-14 10:46:24 +11:00
Eloy Lafuente (stronk7) 7d766e4ca1 Merge branch 'wip-mdl-41843' of git://github.com/rajeshtaneja/moodle 2013-10-14 00:13:26 +02:00
Eloy Lafuente (stronk7) b1636b4a8b Merge branch 'MDL-37181_master' of https://github.com/markn86/moodle 2013-10-13 23:32:30 +02:00
Eloy Lafuente (stronk7) 04e49ead57 Merge branch 'w42_MDL-42243_m26_filtersettings' of https://github.com/skodak/moodle 2013-10-13 23:19:18 +02:00
Eloy Lafuente (stronk7) f71011e825 Merge branch 'w42_MDL-42292_m26_blockversion' of https://github.com/skodak/moodle 2013-10-13 23:09:53 +02:00
Eloy Lafuente (stronk7) 6ad40de465 Merge branch 'w42_MDL-41935_m26_timediff' of https://github.com/skodak/moodle 2013-10-13 18:30:49 +02:00
Petr Škoda 2a67e105b6 MDL-41935 attempt to work around random time comparison test failures 2013-10-12 15:53:25 +02:00
Petr Škoda b48b055643 MDL-42110 do not show auth_db password in plaintext 2013-10-12 14:28:49 +02:00
Petr Škoda f007e89961 MDL-42224 clean up message and email redirection testing 2013-10-12 13:59:07 +02:00
Petr Škoda c169e58048 MDL-42243 fix filter settings regression and support standard settings.php 2013-10-12 13:38:34 +02:00
Petr Škoda c66b839a14 MDL-42292 fix blockversion reading after migration to config table 2013-10-12 13:30:49 +02:00
AMOS bot 1ce76f3b1b Automatically generated installer lang files 2013-10-12 00:43:45 +00:00
Andrew Nicols ee4ece6822 MDL-29441 Chat: Use a valid name for chat popup actions 2013-10-12 00:53:48 +08:00
Tim Hunt 5562ab20ea 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:32:42 +01:00
Tim Hunt d3603928a9 MDL-42230 fix inconsistent quiz lang string.
This matches a change made to another string in MDL-32188.
2013-10-11 14:32:24 +01:00
Eloy Lafuente (stronk7) f8eff10319 weekly release 2.6dev 2013-10-11 13:20:42 +02:00
Eloy Lafuente (stronk7) 88b6721ba1 NOBUG: Fixed file access permissions 2013-10-11 13:20:42 +02:00
Damyon Wiese e4fc57eca5 Merge branch 'MDL-41792_intmaster' of https://github.com/markn86/moodle 2013-10-11 16:33:17 +08:00
Mark Nelson 1032966cee MDL-41792 core_calendar: fixed issues when using multiple calendar types
1) No longer assume that the end of the current month in Gregorian will be
the end of the month for the calendar type being used.
2) Need to take into account the hours and minutes a calendar type may vary
in order to generate timestamps.
3) When generating the previous and next month links start at the beginning
of the month, not the current day.
4) Need to convert to Gregorian when creating timestamps during calendar
exports.
2013-10-11 16:28:04 +08:00
Damyon Wiese d61c05ac4a MDL-31830 category management: Fix coding_error when moving 0 courses 2013-10-11 16:06:40 +08:00
Sam Hemelryk 6ea0f4a674 MDL-42255 course management: removed selected item icon
Removed the arrow that sits at the far right of the selected
category or course.
We already highlight with a different background colour and
that icon had caused confusion in the past.
2013-10-11 15:43:33 +13:00
Marina Glancy 1b7930fe4a Merge branch 'wip-MDL-42238-master' of git://github.com/abgreeve/moodle 2013-10-11 13:32:14 +11:00
Sam Hemelryk 5624b054d4 MDL-42072 badges: fixed cookie use 2013-10-11 13:49:02 +13:00
Eloy Lafuente (stronk7) 3ed255dc1a Merge branch 'MDL-41604-master-5' of git://github.com/mouneyrac/moodle 2013-10-11 01:33:21 +02:00
Sam Hemelryk 7c033254d4 MDL-42253 course management: fixed course pagination
If the number of courses === the number per page pagination
was being incorrectly rendered.
Fixed this and added a behat test to confirm it.
2013-10-11 12:09:23 +13:00
Eloy Lafuente (stronk7) 4d4396c3b8 Merge branch 'w41_MDL-41953_m26_componentnumbers' of https://github.com/skodak/moodle 2013-10-11 00:47:30 +02:00
Sam Hemelryk 9860e57104 MDL-42258 course management: improved role assignments string 2013-10-11 11:43:51 +13:00
Sam Hemelryk 1b7e20103b MDL-42256 course management: fixed course detail action padding 2013-10-11 11:37:24 +13:00
Petr Škoda b5486ce89b MDL-41953 add more tests for invalid plugin names 2013-10-11 00:09:04 +02:00
Petr Škoda a41d1ca0ce MDL-41953 allow plugin names to end with multiple digits 2013-10-11 00:04:39 +02:00
Sam Hemelryk a8003c0a16 MDL-42249 course: converted all dropdowns to contextmenu icon 2013-10-11 10:49:27 +13:00
Sam Hemelryk 0c80d689a6 MDL-42247 course management: better checkbox positioning 2013-10-11 10:28:46 +13:00
Sam Hemelryk 4e9c0d4c72 MDL-41959 dock: fixed action duplication 2013-10-11 10:07:29 +13:00
David Monllao 89376590c0 MDL-42013 behat: Uncommenting @core_files test 2013-10-10 18:40:29 +08:00
David Monllao e9af3ed361 MDL-42013 behat: I should (not)? see checking visibility
Only for non-Javascript tests. If the step
is named I should/should not see whatever
is makes sense that has to be visible.
2013-10-10 18:40:29 +08:00
Ankit Agarwal 96e991631d MDL-42241 tool_uploadcourse: Fix incorrect urls 2013-10-10 17:59:41 +08:00
Matteo Scaramuccia 996531e7f1 MDL-42167 Update workshop assessment record only when really changed
Under certain conditions there is nothing to actually update here. The
$DB->update_record() would throw an exception here.
2013-10-10 10:07:53 +02:00
Andrew Nicols 9f3f4a3c3f MDL-34209 JavaScript: Tidy up dragdrop code. 2013-10-10 14:42:06 +08:00
Andrew Nicols b57bc5855c MDL-34209 JavaScript: Simplify section drag/drop to fix reordering issues 2013-10-10 14:42:06 +08:00
Adrian Greeve 60e34a02db MDL-42238 - mod_quiz: Slight change to the logic to fix Alt. name messages. 2013-10-10 14:06:33 +08:00
Adrian Greeve 60f55a2f72 MDL-42238 - Groups: Alternate name sql update to groups_get_potential_members(). 2013-10-10 14:05:53 +08:00
Damyon Wiese 835a006b07 Merge branch 'MDL-42091-master' of git://github.com/phalacee/moodle 2013-10-10 14:04:47 +08:00
Adrian Greeve 6d3d9bd927 MDL-42238 - mod_wiki: Alternate name sql update to wiki_print_recent_activity 2013-10-10 14:02:32 +08:00
Adrian Greeve dda60f88cd MDL-42238 - mod_forum: Alternate name sql update to forum_print_recent_activity. 2013-10-10 14:02:23 +08:00
Dan Poltawski 9092378ddb MDL-42240 assignfeedback_editpdf: improve ghostscript debugging 2013-10-10 13:55:46 +08:00
Jason Fowler 97b251a352 MDL-42091 Atto - fixing on click indication 2013-10-10 13:47:10 +08:00
Damyon Wiese 4aac948f34 MDL-41838 Backup: Fix undefined variable
Nice spotting Ankit!
2013-10-10 12:11:18 +08:00
Damyon Wiese 26d78116c0 MDL-42039 Backup: Fix whitespace 2013-10-10 11:25:51 +08:00
Damyon Wiese 982482f01a Merge branch 'MDL-42039-master' of git://github.com/sammarshallou/moodle.git 2013-10-10 11:11:16 +08:00
Sam Hemelryk 28fef14840 Merge branch 'MDL-41940' of https://github.com/merrill-oakland/moodle 2013-10-10 16:06:40 +13:00
sam marshall 93eddacc61 MDL-42039 Restore: Add progress tracking while creating question files
If a backup contains a large number of questions, the
create_question_files function can take a very long time. This
change adds progress reporting during that function.
2013-10-10 10:57:31 +08:00
sam marshall 0e2637054f MDL-42039 Restore: Add progress tracking while creating users
When restoring a backup that contains a large number of users
to a different server where those users don't already exist,
creating users can take a significant time. This change adds
progress reporting so that it doesn't time out and shows
activity in the user interface while doing the creation.
2013-10-10 10:57:31 +08:00
sam marshall bf2a039e9a MDL-42039 Restore: Add progress tracking in restore controller load
In the case of a very large backup with many activities, simply loading
the restore controller (specifically, building the plan) can take a long
time and cause timeouts. This change adds progress reporting while the
restore controller is being loaded.

(This also reduces the time between first going to the page, and the
progress bar appearing, making a slightly better user experience.)

Conflicts:

	backup/restore.php
2013-10-10 10:57:24 +08:00
sam marshall a658b73cd0 MDL-42039 Restore: Avoid unnecessary archive file copy at start
Change the start of restore process so that the archive file can
be passed as a pathnamehash pointing to the Moodle file object,
rather than only as a filename in the temporary directory. This
avoids making an unnecessary copy of the archive file, which can
take a long time (and potentially cause a timeout) in the case
of multi-gigabyte backups.
2013-10-10 10:56:30 +08:00
sam marshall 1cd39657b5 MDL-42039 Restore: Add progress reporting to directory deletion
Deleting directories at the end of backup can take a long time if
there are many directories (potentially up to 65536 file
directories). This change reports progress while deleting
directories to avoid timeout.
2013-10-10 10:56:30 +08:00
sam marshall 37ff843d7d MDL-42039 Restore: Add progress reporting between files in resource
When a resource contains a very large number of (presumably small)
files, we should display progress between each file so that it
doesn't time out.
2013-10-10 10:56:30 +08:00
Eric Merrill 53d79266b9 MDL-41940 files Additional behat cleanup
Fixing components and Given/When/Then styling.
2013-10-09 22:56:29 -04:00
sam marshall 02da69214f MDL-42039 Restore: Prevent adding too many form fields at once
This change relates to the Moodle forms used to select activities
in the restore process.

If you add too many form fields at once, it takes a very long time
during which we can't report progress. But adding fields in smaller
groups takes longer overall, so it's a tough balance. This change
splits the adds into groups of 1,000, reporting progress between each.
2013-10-10 10:56:29 +08:00
Damyon Wiese 370058d8fb Merge branch 'MDL-41838-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/upgrade.txt
2013-10-10 10:49:11 +08:00
Dan Poltawski 00ae230f52 Merge branch 'MDL-41379_outcomes' of https://github.com/andyjdavis/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-10-10 10:31:44 +08:00
Marina Glancy 0965a9be10 Merge branch 'MDL-37153_master' of https://github.com/pauln/moodle 2013-10-10 12:52:28 +11:00
Sam Hemelryk c80ef689d5 Merge branch 'wip-mdl-41744' of https://github.com/rajeshtaneja/moodle 2013-10-10 14:40:02 +13:00
Damyon Wiese f0ae8d7a66 Merge branch 'MDL-38196-master' of git://github.com/sammarshallou/moodle
Conflicts:
	backup/backup.php
	theme/bootstrapbase/style/moodle.css
2013-10-10 09:31:33 +08:00
Damyon Wiese 80d5b253e2 Merge branch 'MDL-42091-master' of git://github.com/phalacee/moodle 2013-10-10 09:11:25 +08:00
Jason Fowler 8bcd5ddeab MDL-42091 atto - fixing on hover and active states of buttons 2013-10-10 09:05:47 +08:00
Marina Glancy 44cd0b03af Merge branch 'wip-mdl-38155' of git://github.com/rajeshtaneja/moodle 2013-10-10 11:23:06 +11:00
Dan Poltawski e077f21827 Merge branch 'wip-MDL-42020-master' of git://github.com/marinaglancy/moodle 2013-10-10 08:18:28 +08:00
Marina Glancy 9c5d6183d5 Merge branch 'MDL-42143-master' of git://github.com/danpoltawski/moodle 2013-10-10 11:12:35 +11:00
Marina Glancy bf1405a60a MDL-42020 course: performance improvement in course listings
- better performance when get_course_count() OR search_course_count() are called by themselves
- better performance in displaying course contacts
2013-10-10 10:51:16 +11:00
Dan Poltawski c08f914799 Merge branch '42057-26' of git://github.com/samhemelryk/moodle 2013-10-10 07:20:18 +08:00
Marina Glancy 9e4561b2f2 Merge branch 'MDL-41993-master-fix1' of git://github.com/damyon/moodle 2013-10-10 09:36:30 +11:00
Sam Hemelryk 2dc15b1011 Merge branch 'MDL-41940' of https://github.com/merrill-oakland/moodle 2013-10-10 08:37:03 +13:00
Sam Hemelryk 2219f50a10 Merge branch 'MDL-32188' of git://github.com/timhunt/moodle 2013-10-10 08:34:11 +13:00
Sam Chaffee 87a26cc402 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:16:54 -06:00
Alain Corbière 11b4ad97f4 MDL-41672 Fix html2text processing of multiple occurrences of the same URL 2013-10-09 15:40:38 +02:00
David Mudrák 12cead32f2 MDL-41672 Add html2text unit test for multiple occurrences of the same URL 2013-10-09 15:38:21 +02:00
Eric Merrill ff715cc936 MDL-41940 files Fixes for behat tests
Commented out second test pending MDL-42013 visibiliy checking.
2013-10-09 07:47:11 -04:00
Dan Poltawski 54cd84c84b Merge branch 'w41_MDL-42054_m26_phpmailertesting_i' of https://github.com/skodak/moodle 2013-10-09 18:16:56 +08:00
Petr Škoda 90930acff8 MDL-42054 fix incorrect email redirection in unit tests 2013-10-09 12:08:55 +02:00
Dan Poltawski f57053fc2a Merge branch 'wip-mdl-42222' of git://github.com/rajeshtaneja/moodle 2013-10-09 17:23:44 +08:00
Jerome Mouneyrac b0ec47fb19 MDL-41604 Moodle should also fallback to the default theme when a parent theme is invalid. 2013-10-09 17:05:31 +08:00
Dan Poltawski c1636aea88 Merge branch 'MDL-40493-master-fix1' of git://github.com/damyon/moodle 2013-10-09 17:01:10 +08:00
Dan Poltawski 117111b78b Merge branch 'MDL-39776-master' of git://github.com/phalacee/moodle 2013-10-09 16:54:02 +08:00
Rajesh Taneja 9dbe0313ce MDL-42222 Assignment: Added type check before checking mimetype
Online submission type pass string in files, so added check
to see if file is of type stored_file then check mimetype
2013-10-09 16:53:46 +08:00
Damyon Wiese 6e4dcb9a47 MDL-40493 Question: Explain why setAdminUser is needed for tests 2013-10-09 16:53:21 +08:00
Dan Poltawski 07b0214588 Merge branch 'm26_MDL-40226_Add_JNLP_MIME_Type_Support' of https://github.com/scara/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2013-10-09 16:46:56 +08:00
Dan Poltawski bbe834a152 Merge branch 'MDL-41986-master' of git://github.com/andrewnicols/moodle 2013-10-09 16:28:53 +08:00
Dan Poltawski c58b3ca0ca Merge branch 'MDL-41985-master' of git://github.com/andrewnicols/moodle 2013-10-09 16:27:50 +08:00
Tim Hunt e9af46d8e7 MDL-32188 fix type in question/engine/upgrade.txt 2013-10-09 09:14:24 +01:00
Kordan f846568b6f MDL-42187 theme_formal_white: alignment between radio buttons and relative labels has been restored 2013-10-09 08:44:53 +02:00
Damyon Wiese c778085550 Merge branch 'w41_MDL-42047_m26_cohortdel' of https://github.com/skodak/moodle 2013-10-09 14:42:23 +08:00
Mark Nelson 5043bcfaae MDL-37181 backup: stopped setting the status of unscheduled backups to skipped 2013-10-09 13:58:56 +08:00
Damyon Wiese 4600853128 Merge branch 'MDL-41659_master' of https://github.com/totara/openbadges 2013-10-09 13:30:40 +08:00
Damyon Wiese 6412c972e3 Merge branch 'wip-MDL-41967-master' of git://github.com/abgreeve/moodle 2013-10-09 12:46:14 +08:00
Damyon Wiese c2a2580ac9 Merge branch 'wip-MDL-40844-master' of git://github.com/abgreeve/moodle 2013-10-09 12:09:10 +08:00
Damyon Wiese 5cc2c6662d Merge branch 'MDL-41347-master' of git://github.com/FMCorz/moodle 2013-10-09 12:03:54 +08:00
Damyon Wiese 604fc45ee0 Merge branch 'wip-MDL-42098-master' of git://github.com/abgreeve/moodle 2013-10-09 11:48:14 +08:00
Jason Fowler 614119163f MDL-39776 Javascript - enable formautosubmit from a select box on android 2013-10-09 11:36:13 +08:00
Sam Hemelryk d00b3f19b9 Merge branch 'MDL-40046-master' of git://github.com/ankitagarwal/moodle 2013-10-09 16:25:22 +13:00
Ankit Agarwal 136f4c47b3 MDL-40046 events: Use correct variable for page instance id 2013-10-09 11:20:32 +08:00
Dan Poltawski e521e0724e Merge branch 'MDL-41230-master' of git://github.com/FMCorz/moodle 2013-10-09 11:16:34 +08:00
Damyon Wiese 103ba42d84 MDL-41993 Atto: Always clean/update the textarea when the content is changed 2013-10-09 11:08:06 +08:00
Sam Hemelryk f18f96f767 Merge branch 'wip-MDL-42016-master' of git://github.com/marinaglancy/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-09 15:58:45 +13:00
Paul Nicholls 0d64c75fb2 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 15:56:52 +13:00
Dan Poltawski e9091a28f5 Merge branch 'wip-MDL-42089-master' of git://github.com/abgreeve/moodle 2013-10-09 10:54:24 +08:00
Dan Poltawski 9d841c6c90 Merge branch 'mdl41908-master' of https://github.com/tlock/moodle 2013-10-09 10:27:07 +08:00
Damyon Wiese 869dd1fc6c Merge branch 'MDL-29663_alt' of https://github.com/merrill-oakland/moodle 2013-10-09 09:39:09 +08:00
Eloy Lafuente (stronk7) 7e9dadfd99 Merge branch 'MDL-42026-master' of git://github.com/damyon/moodle
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2013-10-09 01:48:45 +02:00
Sam Hemelryk 571781fbf6 Merge branch 'MDL-41940' of https://github.com/merrill-oakland/moodle 2013-10-09 12:41:36 +13:00
Eloy Lafuente (stronk7) 8fe9bbde09 Merge branch 'MDL-41761-master' of git://github.com/jamiepratt/moodle 2013-10-09 01:29:17 +02:00
Eloy Lafuente (stronk7) 38c6dc4313 Merge branch 'wip-MDL-42068-m26-showshortnamefilepicker' of git://github.com/henesnarfel/moodle 2013-10-09 01:26:52 +02:00
Petr Škoda c969753885 MDL-40493 question: set real $USER before testing question walktrough 2013-10-09 11:02:35 +13:00
Petr Škoda ed661154de MDL-41792 fix calendar test typos 2013-10-08 23:08:27 +02:00
Sam Hemelryk 08f95ac5e5 Merge branch 'w41_MDL-16073_m26_extdbtest_i' of https://github.com/skodak/moodle 2013-10-09 09:23:53 +13:00
Sam Hemelryk 9d1b909a9c Merge branch 'MDL-41956_master' of https://github.com/totara/openbadges 2013-10-09 08:54:46 +13:00
Petr Škoda 6cf2091571 MDL-16073 add test for connection to external database for authentication and enrolments 2013-10-08 21:53:51 +02:00
Eloy Lafuente (stronk7) 7d19bc1353 Merge branch 'MDL-42069' of https://github.com/appalachianstate/moodle 2013-10-08 21:25:46 +02:00
Eloy Lafuente (stronk7) cef0f4203b Merge branch 'wip-MDL-42141-master' of git://github.com/marinaglancy/moodle 2013-10-08 21:23:56 +02:00
Charles Fulton 3ed2c6e50c MDL-34612 forum: convert default format value during restore 2013-10-08 09:56:04 -07:00
Charles Fulton 68e0759c94 MDL-34586 assignment: convert default format value during restore 2013-10-08 09:45:52 -07:00
Eric Merrill bd8f5d459d MDL-29663 forum: Replace constant FORUM_TRACKING_ON with FORUM_TRACKING_FORCED
Commit for MDL-29663 that renames the FORUM_TRACKING_ON constant
to FORUM_TRACKING_FORCED to allow easier and more consistant reading.

FORUM_TRACKING_ON retained but marked depreciated.
2013-10-08 08:04:55 -04:00
sam marshall 39e5102f8b MDL-41838 Backup/restore: Support .tar.gz format for .mbz (2 of 2)
The new experimental setting enabletgzbackups allows backups to be
created so that the internal format for .mbz files is .tar.gz.

Restore transparently supports .mbz files with either internal
formats (.zip or .tar.gz).

The .tar.gz format has the following benefits for backup:
- Supports larger files (no limit on total size, 8GB on single file
  vs. 4GB limit on total size)
- Compresses text better, resulting in smaller .mbz files.
- Reports progress regularly during compression of single files,
  reducing the chance of timeouts during backups that include a
  very large file.

Time performance may also be improved although I haven't done a
direct comparison.
2013-10-08 13:04:49 +01:00
sam marshall c858655dde MDL-41838 Files: Implement .tar.gz packer (1 of 2)
A new packer for .tar.gz files (MIME type application/x-gzip) has been
implemented, including unit tests.

This packer is intended for use during backup/restore only and is not
otherwise exposed in the user interface at present. However, it is
supposed to follow the (ancient) POSIX .tar standard; files created
with this packer will open in GNU tar.

There are restrictions in support corresponding to the POSIX standard:

- Non-ASCII filenames are not supported.
- Very long file/path names are not supported.
- Individual files within the .tar may not be more than 8GB.

Some of these limitations might need to be addressed in future changes
if the packer were to be used in areas other than backup/restore.
2013-10-08 13:04:48 +01:00
Eric Merrill 20e6782f10 MDL-29663 forum: Option to allow Forced for read tracking.
Converts the use of Read Tracking On to Forced. Adds new admin setting
forum_allowforcedreadtracking. If set, Forced will be available when
adding or editing forums. In this state the forced forum overrides the
user preference of off.

With forum_allowforcedreadtracking not set (default) behavior is the
same as now, except forums previously set in the On state are treated
as Optional.

The side effect of forum_allowforcedreadtracking being on, is that users
cannot speed up the loading of course pages with lots of forums by
setting their personal forum read tracking option to off.
2013-10-08 08:03:54 -04:00
sam marshall 77b3d9dfdf MDL-38196 Backup/restore: Display log if non-empty
When doing a backup or restore operation with the normal user interface,
if there is anything in the backup/restore log, it will now be displayed
at the end of the process below the Continue button.

If you have developer debugging enabled, it sets the display level to
LOG_DEBUG and there will always be content in the log. Otherwise, it
uses LOG_INFO which generally means the log is empty, and nothing
displays (no visible change for users).
2013-10-08 11:00:11 +01:00
Jerome Mouneyrac 9f66c7c80a MDL-41252 Simple changes to main course page to improve accessibility - original patch of Nate Baxley 2013-10-08 16:53:06 +08:00
Eloy Lafuente (stronk7) 467fc03982 Merge branch 'w41_MDL-42199_m26_rev' of https://github.com/skodak/moodle 2013-10-08 10:53:03 +02:00
Dan Poltawski 4f0eaf18f4 Merge branch 'MDL-40493-master' of git://github.com/damyon/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-08 16:42:17 +08:00
Damyon Wiese 7bfc69b0c2 Merge branch 'MDL-40053-master' of git://github.com/ankitagarwal/moodle 2013-10-08 16:19:25 +08:00
Damyon Wiese 44585a1ecd Merge branch 'MDL-41792_master' of https://github.com/markn86/moodle 2013-10-08 16:03:46 +08:00
Petr Škoda 307124bed8 MDL-42199 fix course revision test 2013-10-08 09:57:09 +02:00
Dan Poltawski b56a6981b3 Merge branch 'MDL-41722-master' of git://github.com/sammarshallou/moodle 2013-10-08 15:19:09 +08:00
Ankit Agarwal c4f9401ce4 MDL-40053 events: Replace add_to_log() with new events in core_notes 2013-10-08 15:12:20 +08:00
Ankit Agarwal 1b486fc501 MDL-40053 events: Write unit tests for note events 2013-10-08 15:12:20 +08:00
Ankit Agarwal 3cc4cc68e4 MDL-40053 events: write events for core_notes
Following events were added in this commit :-
core\event\note_created
core\event\note_deleted
core\event\note_updated
core\event\notes_viewed
2013-10-08 15:12:20 +08:00
Ankit Agarwal 34088ad057 MDL-40053 events: Generator for core_notes 2013-10-08 15:12:19 +08:00
Damyon Wiese 6abc173877 Merge branch 'MDL-41520-master-mod_lti-completion-view' of github.com:Trii/moodle 2013-10-08 14:43:14 +08:00
Dan Poltawski bcb3c375e3 Merge branch 'MDL-40060-master' of git://github.com/FMCorz/moodle 2013-10-08 14:33:27 +08:00
Frederic Massart 7f6e3eefd1 MDL-40060 mod_book: Replace add_to_log with events 2013-10-08 14:11:10 +08:00
Damyon Wiese 43822d89c5 Merge branch 'MDL-32570-master' of git://github.com/danpoltawski/moodle 2013-10-08 13:47:49 +08:00
Dan Poltawski fa96fb0cea Merge branch 'MDL-42131-master' of git://github.com/damyon/moodle 2013-10-08 13:33:25 +08:00
Dan Poltawski 8431c290fd Merge branch 'MDL-42150-master' of git://github.com/damyon/moodle 2013-10-08 13:25:12 +08:00
Rajesh Taneja 3f8ccd7c5f MDL-41843 IMS-LTI: Fixed exception namespace 2013-10-08 13:24:34 +08:00
Dan Poltawski 6cd7df4df1 Merge branch 'MDL-38655' of git://github.com/aolley/moodle 2013-10-08 13:21:30 +08:00
Dongsheng Cai b56d1ecadb MDL-41843 Uses OAuthException in moodle\mod\lti namespace 2013-10-08 13:18:00 +08:00
Damyon Wiese b242214269 Merge branch 'MDL-42122' of git://github.com/aolley/moodle 2013-10-08 12:48:10 +08:00
Damyon Wiese 944cfe1dec Merge branch 'MDL-40962-master' of git://github.com/ankitagarwal/moodle 2013-10-08 12:45:43 +08:00
Sam Hemelryk ff8e257867 Merge branch 'MDL-40046-master' of git://github.com/ankitagarwal/moodle 2013-10-08 16:04:05 +13:00
Damyon Wiese 9e950187d5 MDL-23692 login: Revert change to files copyright 2013-10-08 10:31:56 +08:00
Damyon Wiese 18ef6201c0 Merge branch 'passwordreset-2013-10-07-1031Z' of https://github.com/peterbulmer/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-08 10:30:57 +08:00
Sam Hemelryk cbf34f34cc Merge branch 'MDL-32188' of git://github.com/timhunt/moodle
Conflicts:
	lib/db/upgrade.php
2013-10-08 14:43:36 +13:00
Damyon Wiese cbe5a022f1 MDL-41993 Atto: Strip yui ids from generated HTML. 2013-10-08 09:32:18 +08:00
Marina Glancy 04a4de20e8 Merge branch 'MDL-25176' of https://github.com/merrill-oakland/moodle 2013-10-08 12:03:15 +11:00
Marina Glancy 10a8d3dd7c Merge branch 'w41_MDL-37717_m26_enrolwarn' of https://github.com/skodak/moodle 2013-10-08 11:52:39 +11:00
Sam Hemelryk 87f28ddceb Merge branch 'w41_MDL-42078_m26_uninstallcleanup' of https://github.com/skodak/moodle 2013-10-08 11:20:51 +13:00
Petr Škoda e734d8850c MDL-41197 normalize ascii text conversion 2013-10-07 23:54:05 +02:00
Sam Hemelryk 8050eec577 Merge branch 'MDL-42188' of git://github.com/stronk7/moodle 2013-10-08 08:52:42 +13:00
Sam Hemelryk 6455dec02d Merge branch 'MDL-41215-master' of git://github.com/andrewnicols/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-10-08 08:48:43 +13:00
Eloy Lafuente (stronk7) 10d13aaf25 MDL-42188 shifter: delete some orphaned files 2013-10-07 21:44:13 +02:00
Sam Hemelryk 81a939be02 Merge branch 'MDL-35926_alt_c' of git://github.com/rwijaya/moodle 2013-10-08 08:27:46 +13:00
Eloy Lafuente (stronk7) e68ff1ec32 Merge branch 'MDL-41914-weekly' of git://github.com/jleyva/moodle 2013-10-07 16:06:32 +02:00
Petr Škoda e87214bda7 MDL-42078 multiple uninstall improvements and cleanup
Includes:
* update checker refactored to \core\update\ namespace
* plugininfo classes refactored to \core\plugininfo\ namespace
* plugin_manager renamed to core_plugin_manager
* redirect back to original page after plugin uninstall
* fixed assign subplugin uninstall
* move assign subplugins under the assignment in admin tree
* fixed plugininfo for all question related plugin types
* auth uninstall support
* added missing block dependencies
* added theme uninstall
* subplugin types are following the plugin on plugin overview page
* several performance improvements in plugin manager
* new warnigns when plugininfo are outdated or missing
* multiple fixes and other improvements
2013-10-07 13:10:36 +02:00
Peter Bulmer 60a67d78e8 MDL-23692 forgotpw:adhere to site autocomp setting 2013-10-07 23:29:29 +13:00
Damyon Wiese 033f721362 MDL-31830 course: Remove unused shifter built js files 2013-10-07 15:58:59 +08:00
Peter Bulmer 2f0dd8d5bd MDL-23692 forgotpw: Coding style tidyups. 2013-10-07 20:54:51 +13:00
Damyon Wiese d4770c9f00 Merge branch '31830-26' of git://github.com/samhemelryk/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-10-07 15:28:45 +08:00
James Henestofel 6afe875edd MDL-38155 Enrolments: User can be suspended by bulk upload
Added ability to suspend user enrolment during bulk upload,
this can be done by setting enrolstatus field in csv file
2013-10-07 15:24:14 +08:00
Sam Hemelryk 7fd307b153 MDL-31830 course: fixed up minor points as noted by Damyon's integration review
* Fixed typo breaking drag and drop of courses.
* Fixed the ' ' title for the create new button plus two other icons I found as well.
* Adding padding to items displayed in the action menu drop down. base + bootstrapbase.
* Padding adjusted to the same as on the course page. base + bootstrapbase.
* Removed hover icon from categories. base only.
* Fixed categroy typo
* Removed min-width that was being applied to coursename making its clickable area larger than normal.
* The category tree is now presented using aria attributes as per http://www.w3.org/WAI/GL/wiki/Using_ARIA_trees
* Bulk action selectors now use aria-labelledby
* Category course count now given access hidden label.
* Pagination links now have better titles.
* The course action icons now present with role=button
2013-10-07 19:41:52 +13:00
rwijaya 586d393fd3 MDL-35926 notification dialog: trap tab focus within dialog modal. 2013-10-07 12:40:16 +08:00
Sam Hemelryk 4d00df46b1 Merge branch 'w41_MDL-42040_m26_shutdown' of https://github.com/skodak/moodle 2013-10-07 17:38:25 +13:00
Sam Hemelryk 8aa3aa3dfd MDL-31830 course: management behat tests corrected after fixes 2013-10-07 17:34:09 +13:00
Jerome Mouneyrac 673c4ffe60 MDL-42030 EditPDF: when selecting stamp image the stamp tool is not selected 2013-10-07 12:13:08 +08:00
Dan Poltawski d1050e406f Merge branch 'MDL-42013_master' of git://github.com/dmonllao/moodle 2013-10-07 11:26:37 +08:00
Sam Hemelryk 8618757c66 Merge branch 'w41_MDL-41220_m26_pluginlist' of https://github.com/skodak/moodle 2013-10-07 15:51:45 +13:00
Sam Hemelryk 6ac0b01175 Merge branch 'MDL-42072_master' of https://github.com/totara/openbadges
Conflicts:
	badges/assertion.php
2013-10-07 15:40:48 +13:00
Adrian Greeve 94b1577a5a MDL-42098 - mod_forum: Update webservice sql query to include all name fields. 2013-10-07 10:02:44 +08:00
Sam Hemelryk 4c9da232d0 Merge branch 'w41_MDL-41197_m26_convnotices' of https://github.com/skodak/moodle 2013-10-07 13:43:08 +13:00
Sam Hemelryk d6cb394f2c Merge branch 'MDL-41229-master' of git://github.com/mouneyrac/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-10-07 12:50:29 +13:00
Sam Hemelryk 166ac0a35d MDL-41398 output: implemented maintenance renderer 2013-10-07 11:55:14 +13:00
Sam Hemelryk 484c4c6cf3 MDL-31830 course: several management interface improvements
* Tidied up course detail permissions so that user is not shown information they couldn't access elsewhere.
* category link dimming now accounts for course creation as an action as well.
* category single select when in courses view mode is now limited to courses user can action in.
* There is now a check at the start of the management page to redirect to course/index.php if the user isn't able to manage in any category.
* Tweaked navigation again, to give the limited users a navbar structure similar to the system cap'd user.
* Cancelling a category delete now takes you back to the category you were viewing.
* Fixed undefined notice
* Improved placement of course request and approval links.
* Several styling tweaks/improvements to the base theme.
* Several styling tweaks/improvements to the bootstrapbase theme.
2013-10-07 10:22:57 +13:00
Sam Hemelryk c46996ea5a MDL-31830 course: improvements to JS coding style 2013-10-07 10:22:51 +13:00
Sam Hemelryk b488058f7d MDL-31830 course: fixed interface issues with limited user
* Navigation/settings now show best available option.
* Resorting categories works now for limited access user.
* Display of up and down arrows corrected.
* Checkboxes no longer displayed if an action can't be performed.
2013-10-07 10:22:51 +13:00
Sam Hemelryk f454e3247d MDL-31830 course: management interface fixes as noted
* Fixed the highlighing of the default category when no categories have been selected.
* Fixed the bug preventing the action menu for AJAX loaded categories from functioning.
* Repositioned course idnumber infront of course actions.
* Fixed display of moveup on first item and movedown on last item (courses and categories)
* Fixed up resort selected categories string.
2013-10-07 10:22:45 +13:00
Sam Hemelryk 5aff38e4d8 MDL-31830 course: renamed functions for consistency
* course_move_by_one => course_change_sortorder_by_one
* course_move_after_course => course_move_after_course
* helper::action_course_move_after_course  => helper::action_course_change_sortorder_after_course
* helper::action_course_moveup 		   => helper::action_course_change_sortorder_up_one
* helper::action_course_movedown 	   => helper::action_course_change_sortorder_down_one
* helper::action_course_moveup_by_record   => helper::action_course_change_sortorder_up_one_by_record
* helper::action_course_movedown_by_record => helper::action_course_change_sortorder_down_one_by_record
* helper::action_category_movedown         => helper::action_category_change_sortorder_down_one
* helper::action_category_movedown_by_id   => helper::action_category_change_sortorder_down_one_by_id
* helper::action_category_moveup 	   => helper::action_category_change_sortorder_up_one
* helper::action_category_moveup_by_id     => helper::action_category_change_sortorder_up_one_by_id
* coursecat::move_by_one 	           => coursecat::change_sortorder_by_one
2013-10-07 10:22:36 +13:00
Sam Hemelryk 67e1f26874 MDL-31830 course: several small code improvements
* I can rebase this for you/the integrator before it goes in for sure no probs :)
* Fixed double phpdoc block of course_change_visibility
* Moved permission checks out of course_move_after_course and into helper function.
* Reviewed setType calls for editcategory_form.php.
* Reviewed all uses of can_resort and added more specific methods.
* Fixed method mentioned in exception for resort methods.
* Converted calls to fetch courses to call get_course.
* Exceptions now thrown when trying to move courses and problems arise.
* Fixed unnecessary namespace hinting in core_course_management_renderer.
* Abstracted common logic of can_resort_any and can_change_parent_any.
* Removed check for system level capability from has_manage_capability_on_any.
* Reviewed debugging calls I've introduced.
2013-10-07 10:22:36 +13:00
Sam Hemelryk a3b7439ff2 MDL-31830 course: added behat test of category creation 2013-10-07 10:22:36 +13:00
Sam Hemelryk 5dc361e16e MDL-31830 core_course: new course category management interface
* Implemented a new course and category management page.
* Deprecated the old management interface.
* Unit tests to cover the new API and core functions.
* Behat tests to cover the new interface.
2013-10-07 10:21:41 +13:00
Sam Hemelryk 5a26fb204e MDL-42170 tool_behat: simple OR patterns now shown as select boxes 2013-10-07 10:17:04 +13:00
Matteo Scaramuccia fd43a49b72 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:22:34 +02:00
Marina Glancy 5e5923ea28 MDL-42016 repository: Implement new sync method in repositories 2013-10-06 18:05:13 +11:00
Marina Glancy 873555604f MDL-42016 repository: Simplify API to sync external files
Too many functions, too different parameters, unnecessary DB queries.
All repositories developed for Moodle 2.3-2.5 will continue to work.

Also get rid of DB field files_reference.lifetime, it is not used by
anybody except repository itself.
2013-10-06 18:05:09 +11:00
Marina Glancy 2a68ee0eb1 MDL-42016 files: Properly synchronise internal references 2013-10-06 18:05:05 +11:00
Andrew Davis accdf036fa MDL-41379 core_outcome: added some CSS to the course outcome table to make it display nice 2013-10-06 10:00:25 +07:00
Tim Hunt 8b9ef25ea2 MDL-32188 question CBM: use short certainty name in response summaries. 2013-10-04 21:46:47 +01:00
Tim Hunt 2bf83cb218 MDL-32188 question CBM: minimal handling of certainty -1
Certainty -1 has never been used in standard Moodle, but is
used in Tony-Gardiner Medwin's patches to mean 'No idea' which
we intend to implement: MDL-42077. In the mean time, these changes
avoid errors for people who have used TGM's patches.
2013-10-04 21:46:46 +01:00
Eric Merrill cc0bb815ad MDL-41940 files Option to limit legacy course files
Adding an option that prevents users from adding new files
or directories to legacy course files. Helps with weaning
users from them.
2013-10-04 13:56:57 -04:00
James Henestofel b8db22818a MDL-42068 Filepicker course listing use setting courselistshortname to show shortname and fullname 2013-10-04 13:09:10 -04:00
Tim Hunt e74aa0aa97 MDL-32188 question CBM: compute summary stats for CBM behaviours
We now compute the average CBM score, accuracy, CBM bonus and enhanced
accuracy, both for the entire quiz, and for just the questions answered.

Note that these calculations must work correctly in the presence of
descriptions, ungraded questions, and manually graded questions. For
example, imagine a essay added at the end of the quiz "Summarise what
you learned attempting this exercise." This might have max mark zero or
non-zero. The CBM statistics just ignores questions like that.
2013-10-04 17:56:36 +01:00
Tim Hunt 9b2fe16bca MDL-32188 question CBM: improve display of the certainty choices
Switch to the neutral C=1, 2, 3 mode. Also add a helpicon, and improve
line-wrapping.
2013-10-04 17:52:31 +01:00
Tim Hunt fb74929e97 MDL-32188 question CBM: alter score handling.
We now change so that minfraction is -6 and maxfraction is 3, so getting
the question right a low certainty gives maxmark marks, and you get a
bonus for being more confident (rather than being penalised for being
unconfident). Mathematically it is the same, but the difference is
importnat psychologically.

We also change how partially correct scores are handled.
It is too harsh to penalise a partially correct score with full
certainty by doing a linear interpolation between -6 and +3. Instead,
any partially correct score (e.g. 0.5) becomes that fraction of the
correct score (e.g. 0.5 * 3 = 1.5). Also, any incorrect score is treated
as 0, so if you have a multiple choice question that normally gives a
negative score for a wrong choice, this will now never give a score of
less than -6.

Finally we change how this is displayed to students beside the question.
Rather than saying "Marked out of 1.00", we say "Base mark 1.00", and
then later we say "CBM mark 3.00" (or whatever it is).
2013-10-04 17:52:29 +01:00
Tim Hunt 7ab9ce3a3c MDL-32188 question CBM: fix hard-coded numbers -> constants. 2013-10-04 17:52:26 +01:00
Tim Hunt c4efeb2b4b MDL-32188 question CBM: fix typos in comments.
Also one method name.
2013-10-04 17:52:24 +01:00
Tim Hunt 02d3e4d557 MDL-32188 question rendering: let behaviours control mark display.
Then use this in the CBM behaviours to change how the question marks are
displayed there.
2013-10-04 17:52:21 +01:00
Tim Hunt 4e3d829350 MDL-42105 questions: let attempts have a max fraction > 1.
This parallels question_attempt->minfraction, which allows the
fractional mark to go below zere.

This is needed to allow the certainty-base marking behaviours to work
better.
2013-10-04 17:52:19 +01:00
Tim Hunt 474aa125ca MDL-32188 quiz/question: behaviours can add to the review summary.
At the top of the quiz reivew page, there is a table that summarises
infomration about the quiz attempt as a whole. For some question
behaviours, we would like to be able to add additional information to
that summary.

This commit introduces a generic method for the behaviour to provide
summary information about an entire question usage.
2013-10-04 17:52:16 +01:00
Petr Škoda 12c92bca22 MDL-37717 warn teachers before disabling or deleting their enrolment method 2013-10-04 16:02:48 +02:00
Petr Škoda 9ebd40eddf MDL-41220 fix test_get_plugin_list_with_file 2013-10-04 16:01:04 +02:00
Joshua Johnston 4938777ed3 MDL-41520 LTI: Does not track page views for completion
Add the missing code for completion_info::set_module_viewed() since LTI
says that it offers completion tracking on view
2013-10-04 09:42:19 -04:00
Fred Woolard a41945ea74 MDL-42069 mod_quiz add lastname sort for manual grading 2013-10-04 09:05:02 -04:00
Tim Hunt f3460297a9 MDL-32188 question engine: behaviour static methods -> new classes
It was always a bit of a hack to use static methods on the
qbehaviour_whatever classes to return metadata about the behaviour. It
is better design to have real qbehaviour_whatever_type classes to report
that metadata, particularly now that we are planning to add more such.

For example, inheritance works better with real classes. See, for
example, the improvements in
question_engine::get_behaviour_unused_display_options().

This change has been implemented in a backwards-compatbile way. Old
behaviours will continue to work. There will just be some developer debug
output to prompt people to upgrade their code properly.
2013-10-04 12:15:01 +01:00
Frederic Massart eb665c34ef MDL-41611 mod_quiz: Offer to return to course when supported 2013-10-04 18:21:56 +08:00
Frederic Massart 98e9e91505 MDL-41611 mod_forum: Display inline available when supported 2013-10-04 18:21:14 +08:00
Frederic Massart d9203fb775 MDL-41611 format_singleactivity: Only hide unnecessary elements 2013-10-04 18:21:13 +08:00
Frederic Massart 640ef17790 MDL-41611 format_singleactivity: Ignore unsupported modules 2013-10-04 18:21:13 +08:00
Juan Leyva 6a403810b9 MDL-41914 New webservice core_user_add_user_device 2013-10-04 11:43:45 +02:00
Peter Bulmer 92de749fc7 MDL-23692 forgotpw: Simplify forgotpw process. 2013-10-04 22:37:56 +13:00
Petr Škoda 38fc013025 MDL-42040 refactor core Moodle shutdown handlers logic 2013-10-04 11:36:46 +02:00
Juan Leyva e10df76f49 MDL-41914 New table user_devices 2013-10-04 11:36:04 +02:00
sam marshall e555a4439f MDL-41722 Backup: Very large course times out on user interface pages
Adds 'Preparing page display' progress bars for user interface pages
if they take a long time to display.

Also adds changes where other parts of the backup progress timed out on
long backups. After this change, and MDL-41838, it is finally possible on
my dev server to successfully back up the 'XL' test course.
2013-10-04 10:32:13 +01:00
Petr Škoda 483916069c MDL-42047 fix cohort method name error after deleting cohort 2013-10-04 11:32:03 +02:00
Petr Škoda ef5e1151c1 MDL-41197 ignore all problems when converting texts 2013-10-04 10:59:41 +02:00
Mark Nelson bcd5c6a958 MDL-41792 core_calendar: added some behat tests to cover calendar functionality 2013-10-04 16:17:03 +08:00
Mark Nelson 070bd1db6f MDL-41792 core_calendar: added missing abstract functions to test calendar 2013-10-04 16:17:03 +08:00
Mark Nelson 6b7d0d3ec3 MDL-41792 core_form: used the new get_name() calendar function in the date selectors 2013-10-04 16:17:02 +08:00
Mark Nelson da3041379a MDL-41792 core_calendar: refactored the calendar to allow the use of multiple calendar types 2013-10-04 16:17:02 +08:00
Andrew Nicols 09bfdcb091 MDL-41215 Filepicker: Fix issues with dynamic loading on fullscreen filepicker 2013-10-04 16:04:45 +08:00
Frederic Massart 7abaa052b4 MDL-40060 mod_book: Data generator for module and chapters 2013-10-04 15:37:04 +08:00
Damyon Wiese 1d45b0e469 MDL-42131 editpdf: Add missing require_login() to entry pages
Also:
* change require_once(config) to require(config)
* always define AJAX_SCRIPT
* Add full crumb trail to navbar for testgs.php
2013-10-04 15:20:34 +08:00
Damyon Wiese c921825977 MDL-42150 Edit PDF: Fix error on saving annotations + comments.
Everything is an instanceof stdClass - need to reverse the logic.
2013-10-04 15:15:58 +08:00
Adrian Greeve 73d363f0fa MDL-42098 - Libraries: Unit test for fullname function to ensure that debug message is
shown even when additional names are enabled.
2013-10-04 15:03:00 +08:00
Adrian Greeve a49bc6c940 MDL-42098 - Libraries: Alter fullname debugging logic to display when user name fields are missing. 2013-10-04 15:03:00 +08:00
David Monllao 8b30d05557 MDL-42013 behat: Fixing related tests
We had no false positives because of this
issue, but some checking have been restricted
to specific DOM parts.
2013-10-04 14:38:11 +08:00
David Monllao 5458ab3e2a MDL-42013 behat: Fixing problem with should not see
Using 'should see' outputs rather than an incorrect
xpath query. Also our custom selectors are not properly
used by WebAssert so switching to find xpath.
2013-10-04 14:38:11 +08:00
Mark Nelson bb74cdfef3 MDL-41792 block_calendar_upcoming: tidy existing code 2013-10-04 12:35:57 +08:00
Mark Nelson ec126f624e MDL-41792 block_calendar_month: tidy existing code 2013-10-04 12:35:57 +08:00
Jerome Mouneyrac f6a4357e19 MDL-41229 Filepicker: ie9 css - the picker content were displayed outside the picker 2013-10-04 11:01:04 +08:00
Sam Hemelryk 56cc9b387e weekly release 2.6dev 2013-10-04 15:43:58 +13:00
Sam Hemelryk cf8943779e NOBUG: Fixed file access permissions 2013-10-04 15:43:58 +13:00
Sam Hemelryk 9b70e68445 NOBUG: Fixed SVG browser compatibility 2013-10-04 15:43:53 +13:00
Sam Hemelryk 577fc805a2 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-10-04 15:43:52 +13:00
Dan Poltawski 6cebf2bd60 MDL-42143 editpdf: Convert gspath to proper setting
This will ensure we get better validation/feedback of the path.
2013-10-04 10:14:18 +08:00
Marina Glancy 25b2b0ec13 MDL-42141 Change wrong spacing from MDL-41725 2013-10-04 12:03:03 +10:00
Adam Olley c447c03538 MDL-38655: mod_assign: Use correct ordering on cap checks for submission downloads 2013-10-04 09:27:32 +09:30
Sam Hemelryk 7f62e4040a Merge branch 'MDL-9873' of https://github.com/merrill-oakland/moodle 2013-10-04 08:25:58 +13:00
Eric Merrill 300eee6a45 MDL-9873 question Require question text
This commit removes the code that requires the question text
for the multianswer question type, as it is a duplicate, and
throws errors.
2013-10-03 08:50:39 -04:00
Peter Bulmer f4491c2ade MDL-23692 forgotpw: Move redirection logic to fn.
Moving to a function because the same logic will be needed in a new
place in later commits.
2013-10-03 23:12:28 +13:00
Peter Bulmer 4f3f6524e8 MDL-23692 forgotpw: Improve failure notices. 2013-10-03 23:12:22 +13:00
Peter Bulmer f888862eb0 MDL-23692 forgotpw: Comments & layout changes.
No functional change.
2013-10-03 23:12:13 +13:00
Peter Bulmer a56e73b4a2 MDL-23692 forgotpw: Remove redundant code. 2013-10-03 23:12:04 +13:00
Peter Bulmer f1fc0d3219 MDL-23692 forgotpw: Move functionality to lib.
Move the password reset request handling into a function.
Move the password reset confirmation handling into a function.
2013-10-03 22:21:41 +13:00
Marina Glancy 1b87f31348 Merge branch 'MDL-40829_mc' of https://github.com/rwijaya/moodle 2013-10-03 18:10:31 +10:00
rwijaya 983c46a8a7 MDL-40829 frontpage course heading: add padding to coursename and fix info ajax 2013-10-03 15:47:47 +08:00
Ankit Agarwal 7f151274ad MDL-40046 events: Replace add to logs in mod page with events 2013-10-03 15:00:54 +08:00
Damyon Wiese 9f5193a4b8 MDL-42023 Assign: Edit PDF plugin - fix unit tests 2013-10-03 14:05:28 +08:00
Adam Olley e7dbb03978 MDL-42122 block_community: Dont show install option without capability 2013-10-03 14:25:06 +09:30
Frederic Massart 97376662df MDL-41230 tool_uploadcourse: Prevent max_execution_time issues 2013-10-03 11:44:54 +08:00
Frederic Massart 7bfc9edd9d MDL-41347 tool_uploadcourse: Invalid restore value handled 2013-10-03 11:22:53 +08:00
Marina Glancy 32e375bdcb Merge branch 'MDL-42023-master' of git://github.com/damyon/moodle 2013-10-03 13:08:03 +10:00
Sam Hemelryk 322ca2fc66 Merge branch 'MDL-41241-master-fix3' of git://github.com/damyon/moodle
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2013-10-03 16:03:22 +13:00
Jason Fowler dc48715eb7 MDL-40770 TinyMCE - Restoring border to colour selectors 2013-10-03 15:59:17 +13:00
Damyon Wiese 8c11cd2e09 MDL-41241 Atto: Restrict searching for anchor tags to selection. 2013-10-03 10:54:10 +08:00
Adrian Greeve 4d83abd052 MDL-42089 - Administration: Update to sql to include alternate name fields. 2013-10-03 10:34:07 +08:00
Rajesh Taneja b650fe6a8e 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:16:31 +08:00
Sam Hemelryk 18a56136e7 Revert "MDL-33569 themes: Labels create extra margin below content."
This reverts commits:
* 336c57575b.
* c528917d3f.
2013-10-03 14:41:18 +13:00
Damyon Wiese 5c3864723a MDL-42023 assign: Edit PDF plugin - Damyon's contributions 2013-10-03 09:30:32 +08:00
Barbara Ramiro 95dfde5549 MDL-42023 assign: Edit PDF plugin - Barbara's contributions 2013-10-03 09:29:54 +08:00
Jerome Mouneyrac e0cc92c650 MDL-42023 assign: Edit PDF plugin - Jerome's contributions 2013-10-03 09:29:54 +08:00
Davo Smith 1ce2ce7cb0 MDL-42023 assign: Add Edit PDF plugin to core.
This plugin is heavily based on the uploadpdf plugin from
Davo Smith <git@davosmith.co.uk>. This is a fantastic plugin
that provides a great benefit for teachers marking assignments.

A big thankyou to Davo for writing the plugin and helping us to
get it integrated to core.

The plugin provides a pdf editing interface in the teachers browser
that lets them add comments and annotations to a students assignment
submission. The comment and annotations are then added to a pdf version
of the students submission which is send back to the student so they can
download it, or read it online.

This plugin has been primarily worked on by Damyon Wiese, Jerome Mouneyrac
and Barbara Ramiro. We have also had great feedback and suggestions from others
including the entire frontend team, Martin and Frederic Massart.
2013-10-03 09:29:54 +08:00
Sam Hemelryk c7387be83b Merge branch 'MDL-16464' of https://github.com/timhunt/moodle 2013-10-03 08:34:39 +13:00
Tim Hunt dba40d4e70 MDL-16464 qtype_multichoice: fix missed question -> questionid. 2013-10-02 10:16:22 +01:00
Adrian Greeve e5d53a1c2f MDL-40844 - Activity completion: Update of the sql to include additional name fields.
The activity completion report wasn't showing the additional name fields.
2013-10-02 16:29:17 +08:00
Marina Glancy d794391d8b Merge branch 'MDL-41241-master-fix2' of github.com:damyon/moodle 2013-10-02 17:27:03 +10:00
Damyon Wiese 30509335dd MDL-41241 Atto: Make searching for the anchor tag more reliable 2013-10-02 15:21:11 +08:00
Marina Glancy 3b06d7b22b Merge branch 'MDL-42021-master-int' of git://github.com/FMCorz/moodle 2013-10-02 17:01:12 +10:00
Marina Glancy 0880a52c9a Merge branch 'MDL-40050-master' of git://github.com/FMCorz/moodle 2013-10-02 16:54:59 +10:00
Damyon Wiese 766c6401b7 MDL-41912 Atto: Min-height fix - div was too small by default. 2013-10-02 13:13:35 +08:00
Frederic Massart 26422a66ad MDL-40050 webservice: Moving new events test file to right location 2013-10-02 13:10:45 +08:00
Frederic Massart ee2df1a8b2 MDL-40050 webservice: Remove token from events 2013-10-02 13:00:28 +08:00
Damyon Wiese 3d27180e94 MDL-40493 User preference: Allow users to set their preferred text editor.
This changes the setting htmleditor in the user table from a 0 or 1 column
to a user preference for the name of their preferred html editor.
2013-10-02 12:49:30 +08:00
Frederic Massart 4fb6600eae MDL-42021 enrol: Missing objectid in enrolment_deleted event 2013-10-02 10:45:28 +08:00
Eric Merrill 46691973b3 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:17:57 -04:00
Marina Glancy a929e5e83d Merge branch 'MDL-9873' of https://github.com/merrill-oakland/moodle 2013-10-02 09:20:52 +10:00
Sam Hemelryk 0fcedc7c73 MDL-41039 mod_quiz: version bump 2013-10-02 12:10:43 +13:00
Sam Hemelryk 18f04ab625 Merge branch 'MDL-41039-master' of git://github.com/FMCorz/moodle 2013-10-02 12:10:08 +13:00
Sam Hemelryk 6579a7b791 Merge branch 'MDL-41751-master' of git://github.com/jamiepratt/moodle 2013-10-02 11:36:16 +13:00
Eloy Lafuente (stronk7) 9d4ff1e5f4 Merge branch 'MDL-41798' of git://github.com/rwijaya/moodle 2013-10-02 00:26:20 +02:00
Eloy Lafuente (stronk7) 3667a8ce7f Merge branch 'MDL-40047-master' of git://github.com/ankitagarwal/moodle 2013-10-01 23:59:05 +02:00
Sam Hemelryk 274399c00e MDL-40770 tinymce: fixed svg files included with moodle theme 2013-10-02 10:52:15 +13:00
Sam Hemelryk 55fcb3504f Merge branch 'MDL-40770-master' of git://github.com/phalacee/moodle 2013-10-02 10:52:03 +13:00
Eloy Lafuente (stronk7) d1ed736f1d Merge branch 'wip-MDL-40049-master-i' of git://github.com/abgreeve/moodle 2013-10-01 23:42:00 +02:00
Sam Hemelryk 49b38d141e Merge branch 'MDL-42017_M26' of git://github.com/lazydaisy/moodle 2013-10-02 10:36:56 +13:00
Sam Hemelryk 28a6f665f4 Merge branch 'MDL-41738' of https://github.com/Lightwork-Marking/moodle 2013-10-02 10:27:54 +13:00
rwijaya faf6010b10 MDL-40829: courses heading: remove headerblock class from header and fix heading levels.
Also, changing h3 classname from name to categoryname.
    Added note to theme/upgrade.txt to describe the heading level changes.
2013-10-02 09:46:26 +13:00
Yuliya Bozhko 5dcda2f871 MDL-41659 badges: Display course/site names through format_string() 2013-10-02 08:58:02 +13:00
Eloy Lafuente (stronk7) 268f4cb503 Merge branch 'MDL-42021-master' of git://github.com/FMCorz/moodle 2013-10-01 21:36:13 +02:00
Sam Hemelryk 7f58018843 Merge branch 'MDL-41878-master' of git://github.com/andrewnicols/moodle 2013-10-02 08:14:36 +13:00
Eloy Lafuente (stronk7) 098723aabb Merge branch 'mdl41996-master' of https://github.com/tlock/moodle 2013-10-01 20:01:33 +02:00
Eloy Lafuente (stronk7) 46e11c6690 Merge branch 'wip-MDL-41921-master' of git://github.com/marinaglancy/moodle 2013-10-01 19:55:30 +02:00
Eloy Lafuente (stronk7) e360a68adc Merge branch '41997-26' of git://github.com/samhemelryk/moodle 2013-10-01 19:50:19 +02:00
Eloy Lafuente (stronk7) da600e5314 Merge branch 'MDL-42004-master' of git://github.com/FMCorz/moodle 2013-10-01 19:43:42 +02:00
Eloy Lafuente (stronk7) 52e9827495 Merge branch 'MDL-42001-master' of git://github.com/FMCorz/moodle 2013-10-01 19:41:10 +02:00
Eloy Lafuente (stronk7) 164e90dd70 Merge branch 'MDL-42003-master' of git://github.com/FMCorz/moodle 2013-10-01 19:36:37 +02:00
Eloy Lafuente (stronk7) 91c49b8cf4 Merge branch 'MDL-41752-master' of git://github.com/jamiepratt/moodle 2013-10-01 19:18:36 +02:00
Eloy Lafuente (stronk7) 00a6df6b02 Merge branch 'w40_MDL-41999_m26_userpw' of https://github.com/skodak/moodle 2013-10-01 15:59:06 +02:00
Marina Glancy c9e4ade71e Merge branch 'MDL-32592-master' of git://github.com/danpoltawski/moodle 2013-10-01 20:49:03 +10:00
Marina Glancy 815f0ef33c Merge branch 'MDL-39653-master' of git://github.com/danpoltawski/moodle 2013-10-01 20:42:37 +10:00
Adrian Greeve c1735baff5 MDL-41967 - Gradebook: Fixed an sql syntax error for gradebook custom profile fields. 2013-10-01 17:53:22 +08:00
Dan Poltawski 259e7e6207 MDL-32570 enrol_imsenterprise: don't hardcode default category id 2013-10-01 15:50:47 +08:00
Ankit Agarwal 5c7ec9f6f8 MDL-40962 assign: Fix alternate name field warnings in assign 2013-10-01 15:32:52 +08:00
Petr Škoda 92911ef1b8 MDL-41999 fix setting of USER in chat 2013-10-01 09:23:42 +02:00
Nadav Kavalerchik eef850815c MDL-41264 Themes: Right align Tabs on Wiki page, when in RTL mode (theme/clean) 2013-10-01 15:05:49 +10:00
Marina Glancy 3a3e3fa3b5 Merge branch 'MDL-41989-master' of git://github.com/phalacee/moodle 2013-10-01 14:45:14 +10:00
Sam Hemelryk c7b6b27d77 MDL-41398 bootstrap: added a maintenance layout 2013-10-01 14:35:47 +10:00
Marina Glancy 5c06e84ab2 Merge branch 'MDL-41912-master' of git://github.com/FMCorz/moodle 2013-10-01 14:21:50 +10:00
Damyon Wiese 900f571c3a MDL-41241 Atto: Fix merge conflict (add extra param to add_toolbar_button) 2013-10-01 11:58:15 +08:00
Yuliya Bozhko f85ce0d900 MDL-42072 badges: Fix output and headers in badges ajax scripts 2013-10-01 16:50:54 +13:00
Sam Hemelryk 0af463d413 MDL-41828 mod: fixed navbar when adding modules to a course 2013-10-01 13:30:00 +10:00
Sam Hemelryk d451eb4dc5 MDL-41900 events: avoid new debug call within unit tests 2013-10-01 16:20:57 +13:00
Andrew Nicols 03e36e7077 MDL-41878 JavaScript: Add an alias for Moodle in the YUI loader 2013-10-01 10:51:40 +08:00
Yuliya Bozhko 56b9a02eea MDL-41956 messages: Accept attachments in send_message() in email message provider 2013-10-01 15:38:02 +13:00
Adrian Greeve 8a94144332 MDL-40049 mod_choice: Replaced old add_to_log calls with event triggers.
Also added a generator for unit tests.
2013-10-01 10:36:13 +08:00
Ankit Agarwal 808f8480eb MDL-40047 chat: Fix classname typo in generator tests 2013-10-01 10:13:20 +08:00
Ankit Agarwal 3f6fd94140 MDL-40047 events: Replace add_to_logs with new events in feedback 2013-10-01 10:12:06 +08:00
Ankit Agarwal 9c515cdcfb MDL-40047 events: Add unit tests for feedback events 2013-10-01 10:12:06 +08:00
Ankit Agarwal 1f00818771 MDL-40047 feedback: Add a test generator for feedback 2013-10-01 10:12:06 +08:00
Ankit Agarwal 4df4a9b93e MDL-40047 events: Add events related to feedback responses
Adding following events related to feedback responses:-
/mod_feedback/event/response_deleted
/mod_feedback/event/response_submitted
/mod_feedback/event/instances_list_viewed
/mod_feedback/event/course_module_viewed
2013-10-01 10:12:05 +08:00
Sam Hemelryk c78fdd8db3 Merge branch 'MDL-41995_master' of https://github.com/markn86/moodle 2013-10-01 14:50:53 +13:00
Sam Hemelryk 421dd2e8eb Merge branch 'MDL-41900-m' of git://github.com/micaherne/moodle 2013-10-01 14:35:49 +13:00
Sam Hemelryk 9b2fdfab44 Merge branch 'MDL-41933' of https://github.com/merrill-oakland/moodle 2013-10-01 14:06:28 +13:00
Sam Hemelryk 5101954f03 Merge branch 'MDL-41241-master' of git://github.com/damyon/moodle
Conflicts:
	lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js
	lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js
	lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js
	lib/editor/atto/plugins/link/yui/src/button/js/button.js
2013-10-01 13:58:17 +13:00
Sam Hemelryk a0a63fa526 Merge branch 'MDL-41894-master' of git://github.com/ankitagarwal/moodle 2013-10-01 13:45:18 +13:00
AMOS bot 87302d1848 Automatically generated installer lang files 2013-10-01 00:41:44 +00:00
Sam Hemelryk 52dc898d16 Merge branch 'MDL-41228_master' of https://github.com/totara/openbadges 2013-10-01 13:37:44 +13:00
Tim Lock 9c390d62ed MDL-41908 QuickForm: Fix PEAR Non-static method error 2013-10-01 09:53:26 +09:30
Eloy Lafuente (stronk7) b744b90df5 Merge branch 'w40_MDL-41707_m26_exttests' of https://github.com/skodak/moodle 2013-10-01 02:14:23 +02:00
Marina Glancy f09ecc6d8b Merge branch '41988-26' of git://github.com/samhemelryk/moodle 2013-10-01 10:01:17 +10:00
Eloy Lafuente (stronk7) b1698e9ac5 Merge branch 'MDL-41962-master' of git://github.com/FMCorz/moodle 2013-10-01 01:52:53 +02:00
Sam Hemelryk 53be2d782a Merge branch 'MDL-41926_master' of git://github.com/dmonllao/moodle 2013-10-01 12:07:22 +13:00
Sam Hemelryk 5e319f5101 Merge branch 'wip-MDL-37559-m26-showshortname' of git://github.com/henesnarfel/moodle 2013-10-01 11:18:14 +13:00
Sam Hemelryk 7da590c11b Merge branch 'MDL-40572_master' of https://github.com/totara/openbadges 2013-10-01 11:05:59 +13:00
Sam Hemelryk 8e5f86bcb3 MDL-41988 behat: improvements to spin 2013-10-01 10:24:36 +13:00
Sam Hemelryk 7bd5d84fd8 Merge branch 'wip-MDL-32773-master' of git://github.com/marinaglancy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-10-01 10:17:13 +13:00
Sam Hemelryk bd5797e6cc Merge branch 'wip-MDL-41676-master' of git://github.com/marinaglancy/moodle 2013-10-01 10:14:04 +13:00
Sam Hemelryk c392392725 Merge branch 'MDL-37973' of https://github.com/merrill-oakland/moodle 2013-10-01 09:54:26 +13:00
Eloy Lafuente (stronk7) 94211c02c3 Merge branch 'MDL-40050-master' of git://github.com/FMCorz/moodle 2013-09-30 21:55:41 +02:00
Eloy Lafuente (stronk7) 833d1eb0e2 Merge branch 'MDL-26408-master' of git://github.com/danpoltawski/moodle 2013-09-30 16:01:38 +02:00
Jamie Pratt 6dd9362e84 MDL-41761 statistics should be calculable for last or highest attempts
as well as for first or all attempts.

This commit drops a database table and then recreates it. This is in
order to be able to have some new columns in the table be NOT NULL with
no default value, which would not be possible if I added fields to an
existing table.

The quiz_statistics table is used for caching calculated values only
and thus we can safely drop it and recreate it.
2013-09-30 18:05:46 +07:00
Marina Glancy 9e11059326 Merge branch 'MDL-12403-master' of git://github.com/danpoltawski/moodle 2013-09-30 18:04:38 +10:00
Marina Glancy e6ec2366a8 Merge branch 'MDL-41885-master' of git://github.com/danpoltawski/moodle
Conflicts:
	mod/upgrade.txt
2013-09-30 17:57:30 +10:00
Mark Nielsen 50ae8814e4 MDL-40248 mod: Allow xxx_get_types() to use default display
* Added new constant: MOD_SUBTYPE_NO_CHILDREN
* When MOD_SUBTYPE_NO_CHILDREN is returned from xxx_get_types()
  then default display is used for activity chooser.
* Updated mod/upgrade.txt
* Removed dead code from navigationlib.php instead of updating
  it for new behavior of xxx_get_types
* Updated lib/upgrade.txt
2013-09-30 16:49:37 +10:00
Marina Glancy f13511451c Merge branch 'MDL-41954-workshop-zero-variance' of git://github.com/mudrd8mz/moodle 2013-09-30 16:09:40 +10:00
Sam Hemelryk d55c29562b Merge branch 'MDL-16464' of git://github.com/timhunt/moodle 2013-09-30 16:34:51 +13:00
Sam Hemelryk 73cc3bdeb0 Merge branch 'MDL-41227_dd' of https://github.com/andyjdavis/moodle
Conflicts:
	course/yui/toolboxes/toolboxes.js
2013-09-30 16:15:53 +13:00
Sam Hemelryk 5e8331c814 NOBUG fixed up whitespace 2013-09-30 15:51:08 +13:00
Sam Hemelryk 4754755625 Merge branch 'wip-MDL-33416-master' of git://github.com/marinaglancy/moodle 2013-09-30 15:42:03 +13:00
Adam Olley 7893297888 MDL-40515: report_log: List activities in optgroups
Prevents users from generating reports on invalid values

Change-Id: If358fa06c8dadd33bb2875ea54ab4bce97b16aff
2013-09-30 11:16:30 +09:30
Sam Hemelryk 00a2879412 Merge branch 'master_MDL-41848' of git://github.com/danmarsden/moodle 2013-09-30 12:09:50 +13:00
Sam Hemelryk 28a2ecc6c4 Merge branch 'w40_MDL-41176_m26_useredit' of https://github.com/skodak/moodle 2013-09-30 11:55:19 +13:00
Sam Hemelryk f88787b604 NOBUG: rebuilt bootstrap CSS 2013-09-30 11:10:21 +13:00
Sam Hemelryk e2c4c4202d Merge branch 'MDL-33569_M26' of git://github.com/lazydaisy/moodle 2013-09-30 10:48:36 +13:00
Sam Hemelryk 2f0a996b10 Merge branch 'MDL-41888-master' of git://github.com/jamiepratt/moodle 2013-09-30 10:38:11 +13:00
Sam Hemelryk 1582ee126f MDL-41997 cache: dummy store now uses static acceleration for session + request 2013-09-30 09:41:03 +13:00
Sam Hemelryk 7310a6637a MDL-41997 cache: added unit tests for disabled stores 2013-09-30 09:41:03 +13:00
Paul Charsley e8b443df33 MDL-41738 added web service function mod_assign_set_user_flags 2013-09-30 08:20:52 +13:00
Mary Evans 0402812161 MDL-42017 theme_afterburner: Additional improvements to make afterburner fully responsive. 2013-09-29 01:40:40 +01:00
Mary Evans c528917d3f MDL-33569 theme_bootsrapbase: adding re-compiled style/moodle.css 2013-09-28 16:26:01 +01:00
Mary Evans 336c57575b MDL-33569 themes: Labels create extra margin below content. 2013-09-28 15:07:22 +01:00
AMOS bot 7800935d19 Merge branch 'master' into install_master 2013-09-28 00:40:24 +00:00
Jamie Pratt d50b05e696 MDL-41751 changes to api of question_response_analyser
and code refactoring and clean up.
2013-09-27 17:38:13 +07:00
Tim Hunt 0aa04a7faf MDL-16464 remove multichoice answers field.
This field is not used, but sometimes causes errors when we try to
instert a value that is too long to fit. Therefore remove it.

At the same time, rename tables and columns to match the coding
guidelines.
2013-09-27 10:57:58 +01:00
Jamie Pratt 59abb70716 MDL-41752 question statistics class moved and improved
quiz_question_statistics_stats renamed to question_statistics_calculator
separate class question_statistics used to store calculated stats
and api changed, also code generally cleaned up.
2013-09-27 16:24:18 +07:00
Rossiani Wijaya 43601cdf73 MDL-41798 imscp module: fix heading levels. 2013-09-27 17:22:41 +08:00
Petr Škoda 5fed843324 MDL-41999 warn developers to not use $USER->password directly 2013-09-27 10:51:38 +02:00
Petr Škoda 2aaf332bb1 MDL-41999 do not use $USER->password directly 2013-09-27 10:51:13 +02:00
Petr Škoda a9d2f1b414 MDL-41707 allow custom location of external test files used from unit tests 2013-09-27 10:47:56 +02:00
Marina Glancy 6b0b05b32f MDL-41942 course: Allow course listings to work with caches disabled 2013-09-27 18:34:20 +10:00
Petr Škoda cf361a9501 MDL-41176 do not set description and pw fields in $USER when editing own profile 2013-09-27 10:33:48 +02:00
Petr Škoda e113214618 MDL-41176 make sure fresh full user record is used when mailing email confirmation 2013-09-27 10:33:48 +02:00
Petr Škoda 6c3ad77ea5 MDL-41176 fix obvious bugs and typos in new user API 2013-09-27 10:33:48 +02:00
Marina Glancy 47164284f7 MDL-41921 mod_url: less restrictions on URL field
Restoring functionality from 2.4 accidentally removed in MDL-34311
2013-09-27 18:33:27 +10:00
Marina Glancy ba3a8f3231 MDL-41676 Corrected logic when to dim the activity name and content 2013-09-27 18:29:36 +10:00
Marina Glancy 0fb7a8a3dd MDL-32773 Add a help icon for button 'Set main file' in filemanager 2013-09-27 18:12:11 +10:00
Damyon Wiese bb76233dd2 MDL-42026 Atto: Remove the styles from the headings menu + focus when opened 2013-09-27 15:55:46 +08:00
Jamie Pratt 515b3ae6a7 MDL-41752 question statistics class moved and improved
quiz_question_statistics_stats renamed to question_statistics_calculator
separate class question_statistics used to store calculated stats
and api changed, also code generally cleaned up.
2013-09-27 14:10:53 +07:00
Jamie Pratt 522bef8030 MDL-41888 More comments 2013-09-27 14:08:16 +07:00
Jamie Pratt 933ac7497a MDL-41888 allow for a blank string as format to mean not to show stat
as in MDL-41929 which applies to older stable branches.
2013-09-27 14:08:16 +07:00
Jamie Pratt 7de1e35b75 MDL-41888 separate out quiz statistics calculations from report code
also code clean up.
2013-09-27 14:08:15 +07:00
Marina Glancy e2a61ee3db MDL-33416 files: Remove unused reference fields in files table
Fields files.referencelastsync and files.referencelifetime just waste the space and actually duplicate the fields
files_reference.lifetime and files_reference.lastsync
2013-09-27 16:50:08 +10:00
Frederic Massart 31e571cdf0 MDL-42021 events: Debug message when objecttable set without an objectid 2013-09-27 14:29:21 +08:00
Frederic Massart c8135e8b18 MDL-42001 mod_chat: Transforming handlers to observers 2013-09-27 13:38:27 +08:00
Marina Glancy d45e65ccad weekly release 2.6dev 2013-09-27 14:23:44 +10:00
Marina Glancy 4de0c793b4 fix permissions 2013-09-27 14:21:20 +10:00
Dan Poltawski 75e19bf52b 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:21:03 +08:00
Marina Glancy 212757a250 ie9 svg compatibility fixes 2013-09-27 14:17:23 +10:00
Mary Evans a7611a7ccc MDL-35217 afterburner: applying orientations 2013-09-27 01:43:44 +02:00
Sam Hemelryk 322d9c8cda Merge branch 'master_MDL-39910' of https://github.com/danmarsden/moodle
Conflicts:
	mod/scorm/db/upgrade.php
2013-09-27 11:32:05 +12:00
Dan Marsden 8d29a8c3bc MDL-39910 SCORM: set correct site level defaults. 2013-09-27 10:49:54 +12:00
Dan Marsden 18784adb12 MDL-39910 SCORM: set correct site level defaults. 2013-09-26 11:36:44 +02:00
Mark Nelson 14c992b4fc MDL-41995 calendar: changed the page layout for the export page 2013-09-26 16:51:32 +08:00
Frederic Massart 0a8b091d41 MDL-41039 mod_quiz: Renaming event to attempt_becameoverdue 2013-09-26 16:43:20 +08:00
Frederic Massart d900f1dc05 MDL-41039 mod_quiz: Replace events_trigger to new events 2013-09-26 16:43:03 +08:00
Frederic Massart 05549cc5d0 MDL-42004 enrol_cohort: Convert handlers to observers 2013-09-26 16:23:25 +08:00
Frederic Massart 6ee51daf6b MDL-42003 mod_forum: Convert handlers to observers 2013-09-26 16:08:13 +08:00
Jason Fowler 0c9070c0a3 MDL-41989 Atto - Improving usability for non-touch devices 2013-09-26 15:31:04 +08:00
Dan Poltawski 9977220ae8 MDL-32592 enrol_imsenterprise: fix error when category not defined
thanks to Henrik Thorn for the fix
2013-09-26 15:00:15 +08:00
Frederic Massart 5cec6c2670 MDL-41962 events: Bumping plugin versions to update handlers 2013-09-26 14:56:12 +08:00
Dan Poltawski ba4612ebdc MDL-26408 enrol_imsenterprise: fix invalid component 2013-09-26 12:22:31 +08:00
Tim Lock 7d0f566b2d MDL-41996: Don't show the Review Attempt link if no attempts exist. 2013-09-26 13:44:15 +09:30
Frederic Massart a72a759303 MDL-41912 editor_atto: Padding for editable area 2013-09-26 12:10:29 +08:00
Marina Glancy 65a4f26d8a Revert "Merge branch 'MDL-41912-master' of git://github.com/damyon/moodle"
This reverts commit 093a6fe77f, reversing
changes made to 88a4cb4734.
2013-09-26 12:29:03 +10:00
Dan Poltawski 2d2489e59e MDL-12403 backup: prevent unset config from being applied 2013-09-26 09:55:13 +08:00
Dan Poltawski 99d5203824 MDL-12403 backup: ability configure default for question bank excludes 2013-09-26 09:55:13 +08:00
Dan Poltawski 6507aaeaff MDL-12403 backup: configure question bank in automated backups 2013-09-26 09:55:12 +08:00
Dan Poltawski f68fc38867 MDL-12403 backup: Ability to exclude question bank
Now users can choose to exclude the question bank from the backup,
this will in turn prevent any modules which use the question bank
from being included in the backup.
2013-09-26 09:55:12 +08:00
Dan Poltawski b07ef13be2 MDL-41885 modules now declare use of question bank
* FEATURE_USES_QUESTION_BANK is now a module_supports flag which declares
  that an activity uses the question engine.

* question_module_uses_questions can be used to determine if a module
  uses the question bank.
2013-09-26 09:49:34 +08:00
AMOS bot 441972d9dd Automatically generated installer lang files 2013-09-26 00:44:17 +00:00
Sam Hemelryk f8023f3072 Revert "MDL-39871 Blocks,Themes: Swap block regions in RTL mode (using pre-defined array)"
This reverts commit e89dfdbce6.
2013-09-26 11:56:00 +12:00
Andrew Nicols 8295548038 MDL-41986 JavaScript/Dock: Correct log level in Y.log statements 2013-09-26 00:20:22 +01:00
Andrew Nicols fa64202a86 MDL-41985 JavaScript: Add option to filter YUI logging statements 2013-09-25 23:58:08 +01:00
Sam Hemelryk bc29e8f07a Merge branch 'master_MDL-39910' of https://github.com/mayankgupta/moodle 2013-09-26 10:13:01 +12:00
Eloy Lafuente (stronk7) 6da8594018 Merge branch 'MDL-40811-master-behat' of https://github.com/andrewnicols/moodle 2013-09-25 23:48:42 +02:00
Sam Hemelryk e2ad11d87e Revert "MDL-39871 output: improved block manipulation inheritance"
This reverts commit eeb08203dc.
2013-09-26 09:12:44 +12:00
Andrew Nicols e818be1046 MDL-40811 JavaScript: Cast activityid to string when checking resources to show/hide 2013-09-25 18:14:06 +01:00
Eric Merrill 363f82243b MDL-9873 questions Set question text field to required.
After much discussion, it was decided that the damage done by not
not setting question text (student goes to take test and sees nothing)
is more of a problem then the use cases where teachers want empty
questions (inputing paper tests). In those cases, they will need
to add something like a period to the question text field.
2013-09-25 09:07:04 -04:00
Mayank Gupta 1680c75c88 MDL-39910 mod_scorm: fix enable/disable navigation buttons 2013-09-26 00:10:10 +12:00
Eloy Lafuente (stronk7) c72cad1f85 Merge branch 'int_uninstall' of https://github.com/skodak/moodle 2013-09-25 13:36:40 +02:00
Mayank Gupta bb22cd80b7 MDL-39910 mod_scorm: fix enable/disable navigation buttons 2013-09-25 16:41:33 +05:30
Eloy Lafuente (stronk7) a07a9c74de Merge branch 'w39_MDL-41208_m26_yui312' of https://github.com/skodak/moodle 2013-09-25 11:41:45 +02:00
Petr Škoda 723a6e5679 MDL-41437 inform developers that version column was removed from module and block tables 2013-09-25 10:52:23 +02:00
Petr Škoda 5f8012d499 MDL-41437 fix some more forgotten module.version's 2013-09-25 10:50:00 +02:00
Petr Škoda effff2a466 MDL-41437 refactor and cleanup module uninstall support 2013-09-25 10:27:09 +02:00
Petr Škoda 74762da37f MDL-41437 implement new block, enrol and course format pluginfo uninstall methods 2013-09-25 10:12:11 +02:00
Petr Škoda 3e51580be3 MDL-43437 fix course format disabling 2013-09-25 10:03:06 +02:00
Petr Škoda 72df03235e MDL-41437 implement plugininfo_quiz necessary for quiz report uninstall 2013-09-25 09:57:19 +02:00
Petr Škoda a707a0b461 MDL-41437 fix non-functional message processor uninstall 2013-09-25 09:39:36 +02:00
Dan Marsden 6db676bfa1 MDL-39910 SCORM: hide toggle button when course structure disabled and fix upgrade of old settings 2013-09-25 19:25:37 +12:00
Petr Škoda 5037785247 MDL-41208 fix more invalid @VERSION@ 2013-09-25 09:14:36 +02:00
David Monllao 6427c7d54e MDL-41421 tool_generator: Fixing help text
- p.e. replaced by e.g. which sounds more English-friendly
- Adding an extra line break as markdown don't like
p and li together
2013-09-25 15:06:35 +08:00
Petr Škoda a31e0b40c9 MDL-41437 fix and cleanup filter uninstall 2013-09-25 08:41:33 +02:00
Sam Hemelryk e50df55c91 Merge branch 'MDL-40848_master' of git://github.com/totara/openbadges
Conflicts:
	theme/base/style/core.css
	theme/bootstrapbase/less/moodle/core.less
	theme/bootstrapbase/style/moodle.css
2013-09-25 16:27:09 +12:00
Marina Glancy 093a6fe77f Merge branch 'MDL-41912-master' of git://github.com/damyon/moodle
Conflicts:
	lib/editor/atto/styles.css
2013-09-25 12:53:09 +10:00
Marina Glancy 88a4cb4734 Merge branch 'MDL-41778_master' of https://github.com/nitzo/moodle 2013-09-25 12:52:39 +10:00
Marina Glancy d0b63cbde5 Merge branch 'MDL-41870-master' of git://github.com/damyon/moodle 2013-09-25 12:21:46 +10:00
Marina Glancy e26e4b8a7b Merge branch 'MDL-41713-master' of git://github.com/phalacee/moodle
Conflicts:
	lib/editor/atto/styles.css
2013-09-25 12:21:37 +10:00
Marina Glancy 7375d9eb1f Merge branch 'MDL-41421_master' of git://github.com/dmonllao/moodle 2013-09-25 11:53:48 +10:00
Eric Merrill 4ed604996f MDL-41845 Activity Completion: Make default selection an option.
Makes an option to either default to the activity default, or default
to COMPLETION_TRACKING_NONE. This leaves open the possibility of
allowing activities to pick an actual default, instead of just on/off.
2013-09-25 11:41:07 +10:00
David Monllao 35aa018208 MDL-41421 tool_generator: Adding a CLI tool to generate the test plan 2013-09-25 09:23:37 +08:00
David Monllao 1325d493cd MDL-41421 tool_generator: Adding a test plan generator to feed JMeter
Also changing course_backend.php coding style
according to codechecker.
2013-09-25 09:19:11 +08:00
Eloy Lafuente (stronk7) 1d453eff25 Merge branch 'MDL-41910_master' of git://github.com/dmonllao/moodle 2013-09-25 03:11:53 +02:00
Marina Glancy dbad2a65ec Merge branch 'w39_MDL-41223_m26_customlogin' of https://github.com/skodak/moodle 2013-09-25 10:54:19 +10:00
Eloy Lafuente (stronk7) 75c7c41283 Merge branch 'MDL-41827_master' of git://github.com/dmonllao/moodle
Conflicts:
	admin/tool/generator/classes/site_backend.php
2013-09-25 02:38:34 +02:00
Eloy Lafuente (stronk7) 14976b3568 Merge branch 'MDL-41839-master' of git://github.com/sammarshallou/moodle 2013-09-25 02:33:30 +02:00
Eloy Lafuente (stronk7) 25e02ab6ee Merge branch 'MDL-41660-imscc-tempdir' of https://github.com/mpetrowi/moodle 2013-09-25 02:14:57 +02:00
Eloy Lafuente (stronk7) a18daae62b Merge branch 'MDL-41342_master' of git://github.com/dmonllao/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-25 02:11:51 +02:00
David Mudrák 10549cfdb7 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:04:06 +02:00
Eloy Lafuente (stronk7) 109d6fe290 Merge branch '40903-26' of git://github.com/samhemelryk/moodle 2013-09-25 02:00:22 +02:00
Eloy Lafuente (stronk7) ae67f8201f MDL-41889 Use moodle collator for NATURAL sort 2013-09-25 01:46:53 +02:00
Eloy Lafuente (stronk7) 5f7aa1e2e9 MDL-41726 bump to force site/phpunit/behat reinstall 2013-09-25 01:26:54 +02:00
Eloy Lafuente (stronk7) 24262f5948 Merge branch 'master_MDL-41806' of git://github.com/totara/moodle 2013-09-25 01:01:23 +02:00
Eloy Lafuente (stronk7) 007b803b4a Merge branch 'MDL-38192-master' of git://github.com/sammarshallou/moodle 2013-09-25 00:27:57 +02:00
Sam Hemelryk 6eef32525e Merge branch 'MDL-41907' of https://github.com/merrill-oakland/moodle 2013-09-25 10:18:30 +12:00
Sam Hemelryk 35ed37be8f Merge branch 'MDL-40835_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-25 10:02:57 +12:00
Sam Hemelryk 548fbd8e1c Merge branch 'MDL-39730_master' of https://github.com/nadavkav/moodle 2013-09-25 09:59:31 +12:00
Sam Hemelryk 4b005d8751 Merge branch 'MDL-41889_master' of git://github.com/dmonllao/moodle 2013-09-25 09:49:29 +12:00
Sam Hemelryk 1f6181e5aa Merge branch 'MDL-38286-m' of git://github.com/andrewnicols/moodle 2013-09-25 09:31:43 +12:00
Sam Hemelryk a78e39e3d3 Merge branch 'master_MDL-41580' of git://github.com/danmarsden/moodle 2013-09-25 09:27:44 +12:00
Eloy Lafuente (stronk7) 81eba750d4 Merge branch 'MDL-40811-m' of git://github.com/andrewnicols/moodle 2013-09-24 23:23:15 +02:00
Eloy Lafuente (stronk7) bbfa86fe48 Merge branch 'wip-MDL-41594-master' of git://github.com/marinaglancy/moodle 2013-09-24 23:20:53 +02:00
Sam Hemelryk 0c5cb2bf22 MDL-40903 fixed merge conflicts against integration 2013-09-25 09:19:56 +12:00
Eloy Lafuente (stronk7) 18ccaca2e2 Merge branch 'MDL-41726-master-2nd' of git://github.com/FMCorz/moodle
Conflicts:
	lang/en/moodle.php
2013-09-24 23:13:50 +02:00
Sam Hemelryk b51fed38f2 MDL-40903 cache: renamed loader method to reflect static accelerator 2013-09-25 09:05:18 +12:00
Sam Hemelryk d074fb091d MDL-40903 cache: renamed persistcache to staticacceleration 2013-09-25 09:05:18 +12:00
Sam Hemelryk fb0eaa3fda MDL-40903 cache: fixed up event invalidation 2013-09-25 09:04:36 +12:00
Marina Glancy d67a1a8815 MDL-40903 cache: Unittests and small fixes for persistent application cache 2013-09-25 09:04:36 +12:00
Sam Hemelryk 8bc1d659b8 MDL-40903 cache: coding style tidyup pre-integration 2013-09-25 09:04:35 +12:00
Sam Hemelryk 083fa87759 MDL-40903 cache: converted persistent into persistentdata
At the same time all cache instances were made persistent
2013-09-25 09:04:35 +12:00
Petr Škoda 394372b7da MDL-41437 fix plugin install issues
This patch prevents inclusion of settings from plugin that or not yet installed or upgraded,
this matches the original logic where we were using the modules table.
2013-09-24 22:43:46 +02:00
Eloy Lafuente (stronk7) 161f995849 Merge branch 'w39_MDL-41437_m26_mia' of https://github.com/skodak/moodle
Conflicts:
	admin/auth.php
	lib/db/upgrade.php
	version.php
2013-09-24 20:18:03 +02:00
James Henestofel 9d82f6a836 MDL-37558 Block course_overview/course_list use setting courselistshortname to show shortname and fullname 2013-09-24 10:38:44 -04:00
Eloy Lafuente (stronk7) dd0fa1adb1 Merge branch 'wip-MDL-41937-master' of git://github.com/marinaglancy/moodle 2013-09-24 14:05:10 +02:00
Marina Glancy 0aab5cbc59 Merge branch 'MDL-40550_master' of https://github.com/totara/openbadges 2013-09-24 21:42:20 +10:00
Marina Glancy 4fa30a8947 Merge branch 'MDL-41929' of git://github.com/timhunt/moodle 2013-09-24 21:31:46 +10:00
Marina Glancy c3a994aeef MDL-41937 tests: reset time limit after test 2013-09-24 20:53:49 +10:00
Dan Marsden b64bc10cb7 MDL-41848 SCORM: Drag drop SCORM upload fix 2013-09-24 22:50:30 +12:00
Marina Glancy ec7f3d40f1 MDL-39962 - Events: added missing required file 2013-09-24 20:02:57 +10:00
Marina Glancy 72f6cb3cd3 Merge branch 'wip-MDL-39962-master' of git://github.com/abgreeve/moodle 2013-09-24 20:00:24 +10:00
Sam Hemelryk 40643dcaad Merge branch 'int_behat' of https://github.com/skodak/moodle 2013-09-24 21:16:29 +12:00
Frederic Massart d733a8ccc3 MDL-40050 webservice: Replace add_to_log() with new events 2013-09-24 15:20:18 +08:00
Petr Škoda de230fd359 MDL-37324 fix phpunit and behat SESSION and USER setup 2013-09-24 08:59:29 +02:00
Marina Glancy bdc7ff589d Merge branch 'MDL-41725-master-onecommit' of git://github.com/jamiepratt/moodle 2013-09-24 16:49:50 +10:00
Ankit Agarwal cbacf2e5e0 MDL-41894 feedback: Remove unused code, which is generating warnings 2013-09-24 14:45:54 +08:00
Marina Glancy c484e97f45 Merge branch 'MDL-41733_master' of git://github.com/StudiUM/moodle 2013-09-24 16:33:50 +10:00
Marina Glancy 84128f46b2 Merge branch 'MDL-41087-master' of git://github.com/sammarshallou/moodle 2013-09-24 16:29:00 +10:00
Adrian Greeve b97d94ffbb MDL-39962 - Events: Replace lefacy event lti_unknown_service_api call. 2013-09-24 10:08:28 +08:00
Adrian Greeve d76a0eec39 MDL-39962 - Events: Replace the legacy event workshop_viewed
This also includes the abstract class course_module_viewed.
2013-09-24 10:08:28 +08:00
Marina Glancy c925e4fa8e Merge branch 'MDL-41840-master' of git://github.com/sammarshallou/moodle 2013-09-24 11:49:02 +10:00
Marina Glancy d9fd72feb5 Merge branch 'MDL-41669-master' of git://github.com/sammarshallou/moodle 2013-09-24 11:48:49 +10:00
AMOS bot 28334d9458 Automatically generated installer lang files 2013-09-24 00:41:59 +00:00
Yuliya 853e506a1b MDL-40572 badges: Update badge assertion to use new specification 2013-09-24 12:29:54 +12:00
Sam Hemelryk 1f4f0901d0 Merge branch 'w39_MDL-41904_m26_markdown' of https://github.com/skodak/moodle 2013-09-24 12:14:16 +12:00
Sam Hemelryk fb45f406a1 Merge branch 'w39_MDL-41903_m26_typo3' of https://github.com/skodak/moodle 2013-09-24 12:09:47 +12:00
Dan Marsden 361a47d409 MDL-41580 SCORM: allow imsmanifest.xml to be used in file system repos 2013-09-24 12:08:38 +12:00
Sam Hemelryk 0eee7f9b43 Merge branch 'w39_MDL-40107_m26_tcpdf' of https://github.com/skodak/moodle 2013-09-24 12:01:03 +12:00
Sam Hemelryk c51fda57a9 MDL-39910 mod_scorm: fixed install.xml not nulls 2013-09-24 10:58:46 +12:00
Sam Hemelryk eeb08203dc MDL-39871 output: improved block manipulation inheritance 2013-09-24 10:37:14 +12:00
Sam Hemelryk 0fd451b7ad Merge branch 'WIP-MDL-39871_master' of git://github.com/nadavkav/moodle 2013-09-24 10:02:58 +12:00
Sam Hemelryk 96218d0edb Merge branch 'MDL-41716-master' of git://github.com/phalacee/moodle 2013-09-24 09:37:10 +12:00
Eric Merrill 8b73bac647 MDL-41933 Forum: Make a admin level option to set the default value of Read Tracking. 2013-09-23 17:32:47 -04:00
Petr Škoda 136d9a4788 MDL-40107 import tcpdf 6.0.031
Includes a few more small asian fonts.
2013-09-23 23:19:53 +02:00
Sam Hemelryk b3af3bbb96 Merge branch 'MDL-35217_M26' of git://github.com/lazydaisy/moodle 2013-09-24 09:14:37 +12:00
Sam Hemelryk 339feb6420 Merge branch 'master_MDL-39910' of git://github.com/danmarsden/moodle 2013-09-24 09:04:27 +12:00
Sam Hemelryk c99fcebded Merge branch 'MDL-40048-master' of git://github.com/FMCorz/moodle 2013-09-24 08:51:41 +12:00
Sam Hemelryk cc6a0ec48f Merge branch 'MDL-36465-master' of git://github.com/andrewnicols/moodle 2013-09-24 08:33:10 +12:00
Sam Hemelryk 83c875a9a0 Merge branch 'MDL-41591_zindex' of https://github.com/andyjdavis/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-24 08:28:40 +12:00
Eloy Lafuente (stronk7) fe64d4f7c8 Merge branch 'int_install' of https://github.com/skodak/moodle 2013-09-23 22:05:26 +02:00
Petr Škoda 1a4621d8e5 MDL-31501 fake requried globals in both installers 2013-09-23 21:46:05 +02:00
Tim Hunt 9413953f08 MDL-41929 quiz statistics, overall stats not displayed. 2013-09-23 18:05:57 +01:00
David Monllao 21b0a62fc4 MDL-41926 tool_generator: Removing unused vars 2013-09-23 17:50:46 +08:00
Marina Glancy cbbaffc7d3 Merge branch 'MDL-41833-master' of git://github.com/ankitagarwal/moodle 2013-09-23 19:16:43 +10:00
David Monllao 0793389fd6 MDL-41910 user: Allowing LASTACCESS_UPDATE_SECS overwrite 2013-09-23 16:58:56 +08:00
David Monllao c43ef6c624 MDL-41889 tool_generator: Fixing problem detecting the last used course shortname 2013-09-23 16:33:29 +08:00
Andrew Nicols 0082df9d12 MDL-36465 Course JavaScript: Ensure that the zero section is not draggable 2013-09-23 09:21:44 +01:00
David Monllao 53e6d79c39 MDL-41827 tool_generator: Adding a file size limit 2013-09-23 16:20:11 +08:00
David Monllao 09373a5a62 MDL-41827 tool_generator: New unit test checking the generated files size 2013-09-23 16:16:47 +08:00
Marina Glancy 009e0d28ae Merge branch 'w39_MDL-37324_m26_phpmailer' of https://github.com/skodak/moodle 2013-09-23 18:15:35 +10:00
Petr Škoda 6226cc30fb MDL-37324 fix phpmailer method case names and standardise phpmailer init 2013-09-23 10:11:27 +02:00
David Monllao 9ac3925477 MDL-41889 tool_generator: Fixing problem detecting the last used course shortname 2013-09-23 15:14:55 +08:00
Marina Glancy 3e36c789d7 Merge branch 'MDL-41311-master' of git://github.com/danpoltawski/moodle 2013-09-23 14:48:10 +10:00
Andrew Davis f44b891630 MDL-41591 removed unnecessary zindexes from Clean 2013-09-23 11:40:34 +07:00
Marina Glancy b443071378 Merge branch 'wip-MDL-41772-master' of git://github.com/abgreeve/moodle 2013-09-23 14:39:45 +10:00
Frederic Massart f49d814abc MDL-40048 mod_chat: Replacing add_to_log with new events
For this to be done properly, a new function to send the message
and trigger the event has been created. Following that a
data generator for chat, and some unit tests.
2013-09-23 11:41:33 +08:00
Sam Hemelryk 98d696b6d5 MDL-31501 session: fixed missing autoloader during install 2013-09-23 15:38:45 +12:00
Sam Hemelryk d99847a338 Merge branch 'w39_MDL-31501_m26_sessionreboot' of https://github.com/skodak/moodle 2013-09-23 15:02:49 +12:00
Frederic Massart 481753eca6 MDL-40048 events: New abstract event for old 'view all' log 2013-09-23 10:58:28 +08:00
Dan Poltawski f5dfefdc87 MDL-41885 lib: Introduce component_callback_exists
Determines if a callback in a module exists without needing to
call that callback.
2013-09-23 10:44:42 +08:00
Andrew Davis d0f30b07ce MDL-41227 core_course:fixed up some JS that was confusing activity visibility 2013-09-23 09:35:27 +07:00
Petr Škoda bde002b81a MDL-41437 rework plugin_manager caching and version info in blocks and modules
This patch includes:

* version column removed from modules table, now using standard config, this allows decimal version for modules
* version column removed from block table, now using standard config, this allows decimal version for blocks
* module version.php can safely use $plugins instead of module
* new plugin_manager bulk caching, this should help with MUC performance when logged in as admin
* all missing plugins are now in plugin overview (previously only blocks and modules)
* simplified code and improved coding style
* reworked plugin_manager unit tests - now using real plugins instead of mocks
* unit tests now fail if any plugin does not contain proper version.php file
* allow uninstall of deleted filters
2013-09-22 21:25:26 +02:00
Mary Evans 64bf9dbc30 MDL-35217 theme_afterburner: reduce size of sideblocks in Afterburner and make into fully responsive design.
Squashed commit of the following:

commit 8871ed6a5ca3f3ecbf6d9c20ebe5a9badcfe0fef
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Sun Sep 22 14:57:18 2013 +0100

    MDL-35217 theme_afterburner: Added styles to block and course page editing icons.

    Adjusted @media styles in syyle/responsive.css.

commit 6ee5035b77f4e6fb10fc14b4d18e70ab5b8cb174
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Mon Sep 16 02:09:01 2013 +0100

    MDL-35217 theme_afterbuener: Fix for first docked block top-margin reduced to zero.

commit fc6a3fbf9267d778b8f85af0c73f6628890ccbc4
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Mon Sep 16 01:23:21 2013 +0100

    MDL-35217_M26 theme_afterburner: Improvment to make Afterburner fully responsive.

    This commit builds on the work already commited by Richard Olemann.

commit f7a750a90d40d60e965485b2a3fcb112b5e2bd80
Author: roelmann <oelmann.richard@gmail.com>
Date:   Thu Sep 12 15:55:46 2013 +0100

    wip-MDL_35217-afterburner: Reduce sidebar widths, make layout responsive, hide logo on small screens
2013-09-22 15:11:39 +01:00
Petr Škoda d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
AMOS bot 47102277dd Automatically generated installer lang files 2013-09-21 00:42:36 +00:00
Petr Škoda 29bf99fdc1 MDL-37324 import phpmailer 5.2.7 2013-09-20 18:11:50 +02:00
Petr Škoda aaee690b89 MDL-41208 import YUI 3.12.0 with @VERSION@ fix for simpleyui 2013-09-20 18:03:18 +02:00
Petr Škoda 4cf6e8b71d MDL-41223 do not store any form of login URL in $SESSION->wantsurl
Credit goes to Michael Milette, thanks.
2013-09-20 18:01:48 +02:00
Petr Škoda 687c88785c MDL-41903 import typo3 4.7.15 2013-09-20 17:58:35 +02:00
Petr Škoda baf3d69072 MDL-41904 import Markdown lib 1.3 2013-09-20 17:48:43 +02:00
Petr Škoda 81881cb9d6 MDL-41787 make sure maturity constants are defined before they are used in core_component class 2013-09-20 17:22:20 +02:00
Nitzan Bar d8a55f59bd MDL-41778 enrol/ldap add settings to allow updating of course fields during sync 2013-09-20 17:30:52 +03:00
Nadav Kavalerchik 5e55897602 MDL-39730 - Right align Badges pages when using RTL mode (theme/standard) 2013-09-20 14:19:06 +03:00
Nadav Kavalerchik f6fbe8f4ea MDL-40835 - "My badges" page, text need to be align right, in RTL mode (theme/clean, bootstrapbase) 2013-09-20 14:16:33 +03:00
Mayank Gupta df5c7086c8 MDL-39910 mod_scorm: rewrite SCORM code in YUI3, use responsive grids, add new nav setting; squashing commits 2013-09-20 22:45:36 +12:00
Jamie Pratt e68e4ccfdc MDL-41725 move db tables from quiz stats report
to question bank

- move cron to clean up old cache records move code and
rename classes
- further review of the quiz reports statistics code
- starting to separate calculations of quiz stats, question stats and
response analysis
- introduce hashcode db field for cached stats convert
- code to use qubaids hashcode for caches

We just drop the old tables (including previous upgrade steps) and
re-create the new ones, because these tables just cache calculated
statistics. No important data is stored in them.
2013-09-20 16:27:06 +07:00
Damyon Wiese 2bc4212209 MDL-41912 atto: Add a little padding to the editor content area 2013-09-20 15:47:01 +08:00
Damyon Wiese 5d2d0e12d5 MDL-41241 atto: Add a checkbox for open in new window to links 2013-09-20 15:23:02 +08:00
Damyon Wiese db1f37a411 MDL-41241 atto: YUIDoc cleanup for link plugin. 2013-09-20 15:22:50 +08:00
Damyon Wiese 6f9cf841c9 MDL-41870 atto: keyboard navigation for toolbar (arrows) 2013-09-20 14:59:20 +08:00
Jason Fowler 36973d707e MDL-41713 atto - implement new icons with matching UI 2013-09-20 14:20:05 +08:00
Frederic Massart 11b0c8e0e6 MDL-41726 mod_quiz: Replace handlers with observers for group events
This also implements a filtering of the events to be handled when
a course reset has been started.
2013-09-20 12:25:38 +08:00
Sam Hemelryk 7f3836d15a weekly release 2.6dev 2013-09-20 14:40:59 +12:00
Sam Hemelryk 0546f1bf8f NOBUG: fixed file permissions 2013-09-20 14:37:30 +12:00
Sam Hemelryk 2e79f57db9 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-09-20 14:34:25 +12:00
Eric Merrill ffc8e307f3 MDL-41907 Repositories: Maintain the sortorder of a file when overwriting it. 2013-09-19 18:43:21 -04:00
Sam Hemelryk 6af9ab573b Revert "MDL-41466 theme_formal_white: moved courses action icons once again on the right"
This reverts commit c724e00996.
2013-09-20 08:39:57 +12:00
Michael Aherne f817c41cbf MDL-41900 events Log handler failures 2013-09-19 15:50:44 +01:00
Eric Merrill e3a65c9eab 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()
2013-09-19 10:21:35 -04:00
David Monllao 6e09cf98fa MDL-41342 admin: Adding warning when upgrading a test site 2013-09-19 14:57:53 +08:00
Andrew Davis dc1bb8d067 MDL-41591 removed some unnecessary z-indexes from css 2013-09-19 10:19:39 +07:00
AMOS bot f0a617ed82 Automatically generated installer lang files 2013-09-19 00:44:10 +00:00
Sam Hemelryk 669755a423 Merge branch 'master_MDL-38489' of git://github.com/danmarsden/moodle 2013-09-19 09:49:31 +12:00
Dan Marsden d6d0c4e00b MDL-38489 SCORM: obtain correct section number when getting course_url 2013-09-19 09:36:52 +12:00
Eloy Lafuente (stronk7) 9ea4eedf22 Merge branch 'MDL-38661-m-i' of git://github.com/andrewnicols/moodle 2013-09-18 17:09:25 +02:00
Eloy Lafuente (stronk7) cae8956648 Merge branch 'MDL-41188-master-fix1' of git://github.com/damyon/moodle 2013-09-18 15:44:31 +02:00
sam marshall 88372410f5 MDL-38192 Backup and restore: Allow selection by activity type
Add to the existing 'select all/none' JavaScript so that users can choose
to select or deselect everything of a certain module (e.g. deselect all
forums).
2013-09-18 14:27:54 +01:00
Damyon Wiese ce5867a178 MDL-41188 javascript: Prevent scrolling to top
This fix is for dialogues that are not created until some time after the page
has loaded.
2013-09-18 20:21:34 +08:00
Andrew Nicols dd834cba33 MDL-38661 JavaScript: Add missing lazy loading on collapseall 2013-09-18 11:04:31 +01:00
AMOS bot 09fd6d9114 Automatically generated installer lang files 2013-09-18 00:45:28 +00:00
Eloy Lafuente (stronk7) abef633c33 Merge branch 'MDL-41570-master-v2' of git://github.com/jamiepratt/moodle 2013-09-17 21:57:07 +02:00
Eloy Lafuente (stronk7) 5c34952b82 Merge branch 'wip-mdl-41717' of git://github.com/rajeshtaneja/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-17 21:22:30 +02:00
Eloy Lafuente (stronk7) cfcd93dd11 Merge branch 'MDL-41728-master' of git://github.com/sammarshallou/moodle 2013-09-17 21:17:05 +02:00
Eloy Lafuente (stronk7) e79ca991fb Merge branch 'master_MDL-32506' of git://github.com/danmarsden/moodle 2013-09-17 21:11:26 +02:00
Eloy Lafuente (stronk7) e60756632a Merge branch 'wip-mdl-41711' of git://github.com/rajeshtaneja/moodle 2013-09-17 20:22:32 +02:00
Eloy Lafuente (stronk7) 1ee2fb5a11 Merge branch 'MDL-41188-master' of git://github.com/damyon/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-17 20:04:08 +02:00
Eloy Lafuente (stronk7) 58c9faeaca Merge branch 'MDL-38661-m-wip' of git://github.com/andrewnicols/moodle
Conflicts:
	theme/base/style/core.css
	theme/bootstrapbase/style/moodle.css
2013-09-17 19:59:55 +02:00
sam marshall 8d137307bf MDL-41840 Restore: Page title, breadcrumbs show incorrect stage
Unfortunately it isn't possible to display the current stage before
printing header any more, because we need to be able to show a
progress bar while doing the code that considers whether or not
priunt stage. So this change removes stage information from page
title. It is still present (in bold) in the strip that shows where
you are within the restore/import.

This display was inconsistent anyway; change makes it consistent
between Restore and Import.
2013-09-17 16:33:39 +01:00
sam marshall 771e3f7cab MDL-41839 Files: Zip packer progress minor bugs
The progress variable wasn't always passed to recursive calls. This
caused a lack of progress() calls between files in subfolders. I
added a unit test for this situation.
2013-09-17 14:19:07 +01:00
Marina Glancy b73d8a35c2 MDL-41594 Bug fix for orphaned invisible categories
thanks to L.Sanocki
2013-09-17 20:58:03 +10:00
Barbara Ramiro e9c56bce02 MDL-41713 usability - new icons for Atto editor from TinyMCE Theme 2013-09-17 15:19:48 +08:00
Ankit Agarwal 0f142ea0a8 MDL-41833 feedback: Fix setType() warning when deleting a response in feedback 2013-09-17 15:14:19 +08:00
Jason Fowler ae5af113d0 MDL-40770 TinyMCE - Final Icon implementation 2013-09-17 15:06:32 +08:00
Marina Glancy 2b7a557c28 Merge branch 'MDL-41622_b' of git://github.com/rwijaya/moodle 2013-09-17 16:43:12 +10:00
Rossiani Wijaya 764d7ba9b4 MDL-41622 workshop mod: fix page heading levels.
Also, changing couple of the sub header to use notification, which is more appropriate.
2013-09-17 12:44:25 +08:00
Sam Hemelryk d4d97627d2 Merge branch 'MDL-41817-master' of git://github.com/sammarshallou/moodle 2013-09-17 15:26:06 +12:00
Sam Hemelryk 26c9c586c9 Merge branch 'MDL-41572-master' of git://github.com/jamiepratt/moodle 2013-09-17 14:30:16 +12:00
Sam Hemelryk 23eed08e1a Merge branch 'MDL-41540-master-v2' of git://github.com/jamiepratt/moodle 2013-09-17 14:02:47 +12:00
Sam Hemelryk 81ece3f7aa Merge branch 'MDL-41571-master' of git://github.com/jamiepratt/moodle 2013-09-17 14:00:15 +12:00
Barbara Ramiro 845ae64913 MDL-41385 usability: new non-default icons for TinyMCE in svg and png formats
Conflicts:

	lib/editor/tinymce/tiny_mce/3.5.8/themes/advanced/skins/moodle/img/delete.png
	lib/editor/tinymce/tiny_mce/3.5.8/themes/advanced/skins/moodle/img/delete.svg
	lib/editor/tinymce/tiny_mce/3.5.8/themes/advanced/skins/moodle/img/spellcheck.png
	lib/editor/tinymce/tiny_mce/3.5.8/themes/advanced/skins/moodle/img/table.png
	lib/editor/tinymce/tiny_mce/3.5.8/themes/advanced/skins/moodle/img/table.svg
2013-09-17 09:36:06 +08:00
Jason Fowler d76a36dd05 MDL-40770 TinyMCE - Implementing new icons 2013-09-17 09:31:14 +08:00
Barbara Ramiro bb18d12d38 MDL-40769 usability: last bit of icons for TinyMCE in svg and png formats 2013-09-17 09:30:26 +08:00
Jason Fowler d461eb2296 MDL-40770 TinyMCE - Further changes to implement new icons 2013-09-17 09:30:26 +08:00
Barbara Ramiro 9d6c1849c6 MDL-40769 usability: additional icons for TinyMCE in svg and png formats 2013-09-17 09:30:25 +08:00
Jason Fowler efba9f9c0c MDL-40770 TinyMCE - Implement new icons 2013-09-17 09:30:25 +08:00
Barbara Ramiro f0b7b95522 MDL-40769 usability: new icons for TinyMCE in svg and png formats 2013-09-17 09:30:25 +08:00
Marina Glancy 9f21d24895 Merge branch 'MDL-41612_b' of git://github.com/rwijaya/moodle 2013-09-17 11:10:44 +10:00
Marina Glancy 4a91055f7c Merge branch 'MDL-39959-master' of git://github.com/ankitagarwal/moodle 2013-09-17 11:08:27 +10:00
Eloy Lafuente (stronk7) ba57caa349 Merge branch 'MDL-41595_M26' of git://github.com/lazydaisy/moodle 2013-09-17 02:15:06 +02:00
Sam Hemelryk c8f052dbdd Merge branch 'wip-MDL-41715-master' of git://github.com/marinaglancy/moodle 2013-09-17 11:44:39 +12:00
Andrew Robert Nicols 97f4bad867 MDL-38286 JavaScript: Include a YUIDoc configuration for Moodle
To build documentation run:
  yuidoc
2013-09-16 23:56:33 +01:00
Sam Hemelryk 29b56cfd09 MDL-38489 mod_scorm: added require to be explicit 2013-09-17 09:12:02 +12:00
Sam Hemelryk 77365f7ff6 Merge branch 'master_MDL-38489' of git://github.com/danmarsden/moodle 2013-09-17 09:02:32 +12:00
Sam Hemelryk f34af1167a Merge branch 'MDL-41667' of git://github.com/timhunt/moodle 2013-09-17 08:59:08 +12:00
Sam Hemelryk 82b2bb5eca Merge branch 'MDL-37148-master' of git://github.com/damyon/moodle 2013-09-17 08:50:38 +12:00
Sam Hemelryk c2e7f90427 Merge branch 'MDL-41466_master' of git://github.com/kordan/moodle 2013-09-17 08:48:59 +12:00
Sam Hemelryk 0dd46bb851 Merge branch 'MDL-38317-master' of git://github.com/StudiUM/moodle 2013-09-17 08:39:14 +12:00
Andrew Nicols 9bda17ee6f MDL-40811 JavaScript: Use the new moodle-course-util functions 2013-09-16 21:05:02 +01:00
Andrew Nicols 36c1ac9b7a MDL-40811 JavaScript: Create a course-util module to reduce code duplication 2013-09-16 20:44:19 +01:00
sam marshall 4fb31ae6cd MDL-41669 Restore: Progress bar needs to include more tasks
1. Changes progress bar code to allow headings for progress bar (so users have
   some clue what's going on if a page has more than one progress bar).
2. Changes restore code so that a progress bar can display during pre-checks if
   they take longer than 5 seconds.
3. Changes pre-check and restore code so that, in various points where the system
   can take a long time within an individual step, intederminate progress is
   indicated and it won't time out.
2013-09-16 17:18:12 +01:00
sam marshall 6a0189eb3f MDL-41817 Backup/restore without blocks gives error
Also applies to various other situations where backup includes 0 of
something. This was caused by a problem in the progress-tracking code.
2013-09-16 17:11:40 +01:00
Gilles-Philippe Leblanc adbf94c957 MDL-41733 auth_cas: Allow direct authentication with CAS to a course when multiple authentication is activated 2013-09-16 09:22:13 -04:00
Simon Coggins f6ebcd34f2 MDL-40848 badges: Validate backpack connection via Persona
Instead of trusting that the user owns the email address they
supply, we now require them to login via Persona before
connecting them to the backpack
2013-09-16 20:15:32 +12:00
David Monllao 8520de1ee4 MDL-41421 tool_generator: Import .jmx template
Ideally we should generate all the XML based on
modular components so we can also switch templates
between different sizes, this is a first step and
more work should be done in future in this direction.
2013-09-16 16:09:25 +08:00
David Monllao 217a5f97ad MDL-41421 tool_generator: Refactoring make_form to make_course_form
Also:
- Added a soft password for the
newly generated users so we can use
them to log in the site when running
performance tests.
- Added a method to see the courses-users
relation from outside course_backend class.
2013-09-16 16:09:25 +08:00
Marina Glancy a8fd33b02c MDL-41715 Increase size of char fiels in user table 2013-09-16 17:51:05 +10:00
Rossiani Wijaya b2970f963a MDL-41612 scorm: fix heading levels 2013-09-16 15:40:01 +08:00
Ankit Agarwal 63deb5c379 MDL-39959 events: Replace add_to_log() calls with events for course module actions (create, delete and update) 2013-09-16 15:29:56 +08:00
Marina Glancy 4ead355143 Merge branch 'MDL-41621' of git://github.com/rwijaya/moodle 2013-09-16 17:14:18 +10:00
Ankit Agarwal b9b994c7d2 MDL-39959 events: Add unit tests for course module events
test_course_module_created_event()
test_course_module_created_event_exceptions()
test_course_module_updated_event()
test_course_module_updated_event_exceptions()
test_course_module_deleted_event()
test_course_module_deleted_event_exceptions()
2013-09-16 13:42:37 +08:00
Ankit Agarwal 0158650f59 MDL-39959 events: Add course module events
Added event course_module_created
Added event course_module_updated
Added event course_module_deleted
2013-09-16 13:42:37 +08:00
Marina Glancy 81673647a9 Merge branch 'MDL-41315-master' of git://github.com/damyon/moodle 2013-09-16 15:31:20 +10:00
Jason Fowler 9cc23e2692 MDL-41716 atto - Fix resizing inconsistencies between editor modes 2013-09-16 12:52:04 +08:00
Simon Coggins d06ffbdf2d MDL-41806 Add assessors to moodle_url class
New assessors for scheme, host and port.
2013-09-16 16:14:29 +12:00
Yuliya Bozhko 4d7d17ddcc MDL-40550 badges: Change wording of badge activation message
Add confirmation check when activating badge from management page
2013-09-16 15:37:00 +12:00
Sam Hemelryk 31dea4fea4 Merge branch 'master_MDL-41434' of https://github.com/danmarsden/moodle 2013-09-16 15:07:57 +12:00
Sam Hemelryk da8cd86f17 Merge branch 'MDL-38194-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/upgrade.txt
2013-09-16 13:56:05 +12:00
Sam Hemelryk efc2c51712 Merge branch 'MDL-41637_master' of https://github.com/totara/openbadges 2013-09-16 13:51:12 +12:00
Sam Hemelryk db220c2972 Merge branch 'MDL-41748_master' of https://github.com/markn86/moodle 2013-09-16 13:48:48 +12:00
Sam Hemelryk a93db28850 Merge branch 'wip-mdl-41557' of git://github.com/rajeshtaneja/moodle 2013-09-16 13:46:07 +12:00
Damyon Wiese 91327d96ca MDL-37148 assign: Fix missing parameter for submit_for_grading webservice.
It is required to specify if the user has accepted the submission statement
to make sure it goes in the log/event.
2013-09-16 09:34:32 +08:00
Sam Hemelryk cf13da65e1 Merge branch 'MDL-36316-master' of git://github.com/danpoltawski/moodle 2013-09-16 13:13:41 +12:00
AMOS bot cb21774b2d Automatically generated installer lang files 2013-09-16 00:40:25 +00:00
Sam Hemelryk 0d5c80e298 Merge branch 'MDL-41662_master' of https://github.com/totara/openbadges 2013-09-16 10:48:20 +12:00
Sam Hemelryk 9034f94d07 Merge branch 'master_MDL-37524' of git://github.com/danmarsden/moodle 2013-09-16 10:42:47 +12:00
Sam Hemelryk df1d3e9115 Merge branch 'wip-MDL-27684-master' of git://github.com/satrun77/moodle 2013-09-16 10:27:16 +12:00
Dan Marsden b98dcd7dd6 MDL-38489 SCORM: use course_get_format to obtain info 2013-09-16 10:17:51 +12:00
Vinnie Monaco 011ae52a91 MDL-38489 SCORM: added check for course display format 2013-09-16 10:17:51 +12:00
Dan Marsden 36136454b7 MDL-32506 SCORM: remove obsolete setting. 2013-09-16 10:16:16 +12:00
Sam Hemelryk 7c76607aaa Merge branch 'MDL-29987' of https://github.com/bostelm/moodle 2013-09-16 10:13:17 +12:00
Dan Marsden 39355b46f9 MDL-37524 SCORM: mode not calculated correctly. 2013-09-16 10:12:49 +12:00
Dan Marsden b33e466550 MDL-41434 SCORM: add new sortorder field to allow better ordering of scos 2013-09-16 10:11:16 +12:00
Jamie Pratt 764f6153d1 MDL-41572 pass through question behaviour vars with correct prefix
Through prepare_simulated_post_data. Also includes unit tests for
multiple attempts and tries.
2013-09-15 17:52:18 +07:00
AMOS bot a2c52dabef Merge branch 'master' into install_master 2013-09-14 00:41:33 +00:00
sam marshall 137885b7e9 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 14:59:57 +01:00
Jean-Philippe Gaudreau 3aaa906b1e MDL-38317 grade import: Translation support for import mappings form. 2013-09-13 08:49:58 -04:00
Tim Hunt ca6fa1216e MDL-41667 quiz: Fix CSS rules.
Thanks to Renaat Debleu for spotting this problem.
2013-09-13 11:16:05 +01:00
sam marshall 2a70b70c44 MDL-41087 Backup: add progress tracking in slow steps
Adds calls to the new backup progress tracking API within various steps of the
backup system - previously it only tracked progress between steps, but some steps
can themselves be slow. This ensures the system displays progress (either by
moving the progress bar if possible, or by making the wibbler below it pulsate)
during nearly all of the backup process.
2013-09-13 11:07:23 +01:00
Henning Bostelmann df0671f0d2 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:30:41 +01:00
Damyon Wiese 20b7dcfc2c MDL-41315 assign: Add unit test for groupmembersonly 2013-09-13 16:43:26 +08:00
Rajesh Taneja af0afab30a MDL-31560 Error: Fixed coding style 2013-09-13 16:13:26 +08:00
Rajesh Taneja 2b503e40f2 MDL-31560 Messages: Deprecated generate_email_supportuser
generate_email_supportuser was not creating user which can
be used by messaging system. core_user::get_support_user()
should be used to get support_user record.
2013-09-13 16:13:26 +08:00
Rajesh Taneja 3bcf6b3cdd MDL-31560 Messages: Added support for noreply and support users
This is used by messaging system for sending/receiving message
to/from noreply or support user. message_send api will now use
core_user class to get noreply or support user and then
send/receive message depending on user state.
2013-09-13 16:13:26 +08:00
Rajesh Taneja 3a11e2d2d6 MDL-41557 Events: Fixed event data snapshot to save valid data 2013-09-13 16:05:23 +08:00
Adrian Greeve 82d05bc63f MDL-41772 - mod_data: Fixed database_module comments not being restored. 2013-09-13 15:26:13 +08:00
Damyon Wiese a0e59f04dd MDL-41315 assign: Dont show users not in the current grouping
This is for separate groups mode. Note - this will be slower - but
this feature is experimental and groupslib does not provide a nicer api.
2013-09-13 14:47:01 +08:00
Dan Poltawski 378b3eac83 MDL-36316 useragent: Reduce user agent sniffing
* core_useragent: Introduce is_vendor methods to improve readability
  when we are just detecting if a browser is from a vendor, rather than
  the exact version

* Remove uncessary browser version checks when we are just detecting
  vendors - this makes the intention of our sniffing clearer.

* Remove sniffing for browsers which we do not support, grades/ajax/tinymce
  all support modern browsers so there is no need to sniff for them.
2013-09-13 14:25:37 +08:00
Damyon Wiese 83f26f6407 weekly release 2.6dev 2013-09-13 14:05:33 +08:00
Damyon Wiese 1561a37cab MDL-37148 assign: Fix all phpdocs warnings from moodlecheck (except tests) 2013-09-13 13:30:02 +08:00
Damyon Wiese 539af60201 MDL-37148 assign: codechecker cleanups 2013-09-13 13:30:02 +08:00
Damyon Wiese 05a6445a14 MDL-37148 Assignment: Lots more webservices
This patch adds lots of webservices to the assignment module.
* mod_assign_revert_submissions_to_draft
* mod_assign_lock_submissions
* mod_assign_unlock_submissions
* mod_assign_save_submission
* mod_assign_submit_for_grading
* mod_assign_save_grade
* mod_assign_save_user_extensions
* mod_assign_reveal_identities
* mod_assign_copy_previous_attempt

All features such as reopening attempts and marking workflow are supported through
the save_grade and save_submission functions.

Uploading files is supported by sending draft item ids for the files_filemanager param the same functions.
2013-09-13 13:29:51 +08:00
Rossiani Wijaya f7bfb405cb MDL-41288 wiki: fix missing .rtl class for deleting comment button and improve page display for deleting comment 2013-09-13 12:56:41 +08:00
Mohamed Alsharaf dca16fd76f MDL-27684 repository: make require_login() throws exception instead of redirect 2013-09-13 16:01:55 +12:00
Rossiani Wijaya 14cdc25731 MDL-41288 Wiki: add additional fix for heading level 2013-09-13 11:04:08 +08:00
Dan Poltawski 6e3cdbdc33 MDL-41438 - unbuilt less changes 2013-09-13 10:56:12 +08:00
Rossiani Wijaya 4460e380a9 MDL-41438 core renderer: additional patch to remove .main definition from all core themes 2013-09-13 10:49:57 +08:00
AMOS bot 2c9ac05f76 Automatically generated installer lang files 2013-09-13 00:48:38 +00:00
Marina Glancy e2e9cb6a14 MDL-37028 Fixed bug, orphaned modules are moved to the 0-section 2013-09-13 10:28:52 +10:00
Dan Poltawski 7ea5f0714d NOBUG/MDL-40829 - fix whitespace errors 2013-09-12 19:22:03 +08:00
Dan Poltawski 1d49a5cdc6 Revert "MDL-40829: courses heading: remove 'headerblock' class from header and fix heading levels"
This reverts commit 278d64572d.

Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-12 19:21:43 +08:00
Mark Nelson 9df08c9c51 MDL-41748 calendar: removed unused strings 2013-09-12 16:56:31 +08:00
Frederic Massart d7587b3136 MDL-41305 group: Behat test failing due to string change 2013-09-12 16:37:23 +08:00
David Monllao f59f6b6b75 MDL-41555 behat: Fixing catch statement location
The exception is thrown when getting the
browser session, not when accessing the first
URL.
2013-09-12 15:51:24 +08:00
Damyon Wiese 2a808cef8f MDL-41188 javascript: Change full screen dialogue to position: fixed
This fixes all sorts of bother with the fullscreen dialogues. It also means that
you don't lose your scroll position in the document when the full screen popup
opens/closes.

It prevents several bugs on mobile where the dialogue could get scrolled off
the page (and handles orientation changes better).

Contains one other tiny tweak to make the close button on the dialogue
a bit bigger so it's easier to click (only for fullscreen).
2013-09-12 14:18:12 +08:00
Jason Fowler c1f10ffb24 MDL-41238 atto - fixing autoclose of style menu for firefox 2013-09-12 13:28:18 +08:00
Tim Gus c4012e7e82 MDL-38570 admin: fix cron_delete_from_temp on windows 2013-09-12 11:33:32 +08:00
Ankit Agarwal ef9ca10699 MDL-21415 reports: We should fetch active group from session not page params
Also donot allow active group to be set to something that user doesn't have access to
2013-09-12 11:18:25 +08:00
Dan Poltawski 3e29ecabea MDL-41311 tool_generator: remove legacy code
There was some functionality to generate data here, but it was not
maintained, dangerous and being monkeypatched over time.
2013-09-12 11:06:57 +08:00
Damyon Wiese 7f43748f18 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.
2013-09-12 10:34:02 +08:00
sam marshall 39ca3044ea 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:32:14 +01:00
Rajesh Taneja 33f9a60133 MDL-28561 blocks_rss_client: Fixed line separator color in bootstrap 2013-09-11 17:43:25 +08:00
Damyon Wiese fa8b1fa4a4 Merge branch 'wip-MDL-37028-fix2' of git://github.com/marinaglancy/moodle 2013-09-11 16:55:13 +08:00
Dan Poltawski e3a1fa4be8 MDL-40733 forum: fix duplciate headings
two integration patches collided..
2013-09-11 16:14:37 +08:00
Rajesh Taneja 77063326e6 MDL-41717 Theme: Aligned completion checkbox and commands on course page for label 2013-09-11 16:12:11 +08:00
Marina Glancy 6313817352 MDL-40347 Fixed gradebook css overwriting in Canvas 2013-09-11 16:45:38 +10:00
Rajesh Taneja 3aa3de0db7 MDL-41711 Glossary: Fixed seach label alignment 2013-09-11 14:34:24 +08:00
Damyon Wiese 0956dd7b5f MDL-40347 Theme canvas Remove !important override
The !important override in this rule in the grader report was
preventing the last row of cells from being highlighted.
2013-09-11 14:33:10 +08:00
Jason Fowler 3eb439e206 MDL-40833 theme - fixing centre align of sectionname headings 2013-09-11 13:20:46 +08:00
Marina Glancy cfda8732b7 MDL-37028 fixed statement to clear course cache 2013-09-11 14:57:59 +10:00
Jason Fowler fe3a7466ff MDL-40833 theme - fixing centre align of sectionname headings 2013-09-11 12:42:01 +08:00
prateeksachan 9054c04d45 MDL-38267 assign: No Submit button after cut-off date 2013-09-11 12:17:59 +08:00
Marina Glancy aba4d0090d MDL-37028 fixed course-module generation
still conditionlib should be using API functions and not inserting the data directly in DB but will fix in another issue
2013-09-11 10:47:49 +08:00
Damyon Wiese 749ce98e63 MDL-37028 Integrity check for course modules and sections
This commit reinstates:
commit 0bac49dc19
Author: Marina Glancy <marina@moodle.com>
Date:   Tue Sep 3 17:14:13 2013 +1000

    MDL-37028 Integrity check for course modules and sections

    If section mentioned in 'orphaned' module does not exist module is added to the first available section. Also corrected whitespaces

commit 1f0a9ce48b
Author: Marina Glancy <marina@moodle.com>
Date:   Mon Aug 12 14:06:48 2013 +1000

    MDL-37028 Integrity check for course modules and sections

    created function, unittest, build-in quick integrity check on each call to rebuild_course_cache()
    also added CLI script
2013-09-11 10:47:49 +08:00
Dan Poltawski 111c649600 MDL-41565 events: fix unit test 2013-09-11 10:25:31 +08:00
Frederic Massart de170aacda MDL-41436 modinfo: Concatenate SQL fields instead of passing array 2013-09-11 10:02:41 +08:00
Sam Hemelryk 6b909c759d Merge branch 'wip-mdl-41605' of git://github.com/rajeshtaneja/moodle 2013-09-11 10:50:08 +12:00
Sam Hemelryk 214816fb19 Merge branch 'MDL-40742-master' of git://github.com/ankitagarwal/moodle 2013-09-11 10:13:29 +12:00
Sam Hemelryk b3602b3e5e Merge branch 'MDL-40687' of git://github.com/rwijaya/moodle 2013-09-11 09:47:41 +12:00
Eloy Lafuente (stronk7) a13f06aec0 Merge branch 'MDL-41619_master' of https://github.com/markn86/moodle 2013-09-10 23:45:20 +02:00
Sam Hemelryk 2ecaec9bb6 Merge branch 'MDL-41658_master' of git://github.com/kordan/moodle 2013-09-11 09:42:40 +12:00
Sam Hemelryk bf6181d451 Merge branch 'MDL-40262' of git://github.com/kordan/moodle 2013-09-11 09:39:13 +12:00
Sam Hemelryk 67c52739d3 Merge branch 'MDL-41634-url-download-warning' of https://github.com/mnoorenberghe/moodle 2013-09-11 09:32:33 +12:00
Sam Hemelryk 087bc6ba67 Merge branch 'MDL-41238-master' of git://github.com/phalacee/moodle 2013-09-11 09:28:42 +12:00
Sam Hemelryk ba5d7f8b1c Merge branch 'MDL-41528_master' of https://github.com/nitzo/moodle 2013-09-11 09:26:44 +12:00
Sam Hemelryk f773cb2e94 Merge branch 'MDL-41630-master' of git://github.com/FMCorz/moodle 2013-09-11 09:20:53 +12:00
Sam Hemelryk cde5c4a58e Merge branch 'MDL-41632-master' of git://github.com/FMCorz/moodle 2013-09-11 09:12:32 +12:00
Sam Hemelryk 3623d74adc Merge branch 'wip-MDL-41578-master' of git://github.com/marinaglancy/moodle 2013-09-11 09:00:54 +12:00
Sam Hemelryk 994009ddfe Merge branch 'MDL-41599-master' of git://github.com/ankitagarwal/moodle 2013-09-11 08:54:26 +12:00
Sam Hemelryk 33636b4040 Merge branch 'MDL-41587_master' of git://github.com/dmonllao/moodle 2013-09-11 08:52:52 +12:00
Sam Hemelryk f605403fe2 Merge branch 'MDL-41555_master' of git://github.com/dmonllao/moodle 2013-09-11 08:51:02 +12:00
Sam Hemelryk 79257da228 Merge branch 'wip-mdl-41590' of git://github.com/rajeshtaneja/moodle 2013-09-11 08:45:22 +12:00
Sam Hemelryk c4f5f0ee59 Merge branch 'MDL-40471_master' of https://github.com/totara/openbadges 2013-09-11 08:42:37 +12:00
Sam Hemelryk e0a8b60f5d Merge branch 'MDL-41236-master' of git://github.com/phalacee/moodle 2013-09-11 08:36:54 +12:00
Sam Hemelryk c02045ddc4 Merge branch 'wip-mdl-41589' of git://github.com/rajeshtaneja/moodle 2013-09-11 08:34:58 +12:00
Eloy Lafuente (stronk7) f073ea045e Merge branch 'wip-MDL-41288-fix' of git://github.com/marinaglancy/moodle 2013-09-10 14:16:14 +02:00
Eloy Lafuente (stronk7) 34ac96bf6d Merge branch 'wip-MDL-41508-master' of git://github.com/marinaglancy/moodle 2013-09-10 14:09:34 +02:00
Marina Glancy 341e2460cd MDL-41288 Bugfix of error occuring when subwiki is not set 2013-09-10 22:02:24 +10:00
Dan Poltawski 261dc01734 Merge branch 'MDL-40733_forum_name' of https://github.com/andyjdavis/moodle 2013-09-10 17:35:40 +08:00
Dan Poltawski 50d7cc8463 Merge branch 'MDL-41566' of git://github.com/rwijaya/moodle 2013-09-10 17:30:04 +08:00
Rossiani Wijaya b25e7d8599 MDL-41562 file resource: fix page heading levels.
Also removing printheading options setting.
2013-09-10 17:22:08 +08:00
Dan Poltawski 89cb942c6d Merge branch 'MDL-41305-master' of git://github.com/FMCorz/moodle 2013-09-10 17:14:40 +08:00
Rossiani Wijaya d184f9bd4a MDL-41567 url resource: fix page heading levels.
Also removing printheading options setting.
2013-09-10 17:13:18 +08:00
Rossiani Wijaya 278d64572d MDL-40829: courses heading: remove 'headerblock' class from header and fix heading levels 2013-09-10 17:09:38 +08:00
Dan Poltawski 62b35d5852 Merge branch 'MDL-40833-master' of git://github.com/phalacee/moodle 2013-09-10 16:00:52 +08:00
Jamie Pratt 707825265d MDL-41540 remove use of $USER
by quiz_create_attempt internally.
2013-09-10 14:36:30 +07:00
Dan Poltawski c219df86d1 Merge branch 'MDL-41564' of git://github.com/rwijaya/moodle 2013-09-10 15:29:23 +08:00
Jamie Pratt f7f596a2a7 MDL-41571 move forced_choices_selection_strategy
out of question/engine/tests/helpers.php to
question/engine/lib.php
2013-09-10 14:29:01 +07:00
Jamie Pratt f8f37f1edc MDL-41570 fixes match qtype's prepare_simulated_post_data
And converts more unit tests to use the method
2013-09-10 14:24:32 +07:00
Dan Poltawski 4bdabf5968 Merge branch 'MDL-41565-master' of git://github.com/FMCorz/moodle 2013-09-10 15:21:49 +08:00
Dan Poltawski f2ee9b5c27 Merge branch 'MDL-39992-master' of git://github.com/damyon/moodle 2013-09-10 14:58:54 +08:00
Damyon Wiese eceecb72f3 Revert "MDL-37028 Integrity check for course modules and sections"
This is failing unit tests.

This reverts commit 0bac49dc19.
This reverts commit 1f0a9ce48b.
2013-09-10 14:34:07 +08:00
Dan Poltawski 92d92606ba Merge branch 'MDL-40631-master' of git://github.com/damyon/moodle 2013-09-10 14:33:41 +08:00
Damyon Wiese a01914128d MDL-41237 Atto: Add missing js method docs. 2013-09-10 14:30:02 +08:00
Jason Fowler 2b6361305d MDL-41237 Atto - Adjusting the text styles for the editor 2013-09-10 14:30:02 +08:00
Dan Poltawski 3b46f8dfe1 MDL-41235 fix whitespace 2013-09-10 14:26:53 +08:00
Dan Poltawski 03608c253d Merge branch 'MDL-41235-master' of git://github.com/phalacee/moodle 2013-09-10 14:25:48 +08:00
Jason Fowler 37b16441b8 MDL-41235 atto - Matching the width of the html view to the wysiwyg view 2013-09-10 14:13:14 +08:00
Dan Poltawski f07c2243b1 Merge branch '41189-26' of git://github.com/samhemelryk/moodle 2013-09-10 14:12:14 +08:00
Rossiani Wijaya 876c0ac382 MDL-41288 wiki: improve heading levels and styling 2013-09-10 14:08:34 +08:00
Damyon Wiese b10ce36806 Merge branch 'MDL-40736' of git://github.com/rwijaya/moodle 2013-09-10 13:48:01 +08:00
Dan Poltawski e025a2fc43 Merge branch 'MDL-40686' of git://github.com/rwijaya/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-10 13:39:01 +08:00
Damyon Wiese f1f4a860c6 Merge branch 'w37_MDL-41408_m26_loginredirect' of https://github.com/skodak/moodle 2013-09-10 13:33:27 +08:00
Dan Poltawski f7e719eb38 Merge branch 'MDL-41117_master' of git://github.com/kordan/moodle 2013-09-10 13:23:47 +08:00
Ankit Agarwal 28c4399b6b MDL-21415 reports: Adding support of groups to course participation reports
Also introducing new api groups_allgroups_course_menu() that generates a selector for all groups in course"
2013-09-10 13:14:33 +08:00
Damyon Wiese bfcc07504e MDL-23335 forum: Fix whitespace 2013-09-10 12:59:49 +08:00
Damyon Wiese 6aca3fc419 Merge branch 'wip-mdl-23335-master' of https://github.com/deraadt/moodle 2013-09-10 12:56:40 +08:00
Damyon Wiese 4fae13bb5e Merge branch 'wip-MDL-37028-master' of git://github.com/marinaglancy/moodle 2013-09-10 12:51:33 +08:00
Damyon Wiese 9e674dbc33 MDL-41497 auth_db: Fix typo in lang string. 2013-09-10 12:26:00 +08:00
Damyon Wiese 603913bcbb Merge branch 'MDL-41497-master' of https://github.com/willylee/moodle 2013-09-10 12:21:20 +08:00
Marina Glancy 64501eeec9 MDL-41436 Remove DB fields course.modinfo and sectioncache 2013-09-10 14:11:52 +10:00
Marina Glancy 4cc819adf0 MDL-41436 Allow user=-1 in get_fast_modinfo()
Remove ref to nonexisting course.modinfo in MNET auth, use get_fast_modinfo() for user=-1 instead
2013-09-10 14:11:51 +10:00
Marina Glancy 1cf1d6e62a MDL-41436 Save extra DB query since 'enablecompletion' is cached 2013-09-10 14:11:51 +10:00
Marina Glancy 4a3fb71c4f MDL-41436 Removing references to fields course.modinfo, sectioncache
Also add the field cacherev to the lists of default fields in course retrieval functions
2013-09-10 14:11:51 +10:00
Marina Glancy 299cfee5f2 MDL-41436 Move course content cache to MUC
added cache definition and DB field course.cacherev for cache validation
2013-09-10 14:11:45 +10:00
Petr Škoda d82993dc7f MDL-41436 implement new increment_revision_number() function
This is intended as a revision counter for local modinfo caching. It should be a lot more reliable and faster than doing it in PHP. Please note you need to invalidate all course caches after using this.
2013-09-10 14:11:44 +10:00
Marina Glancy 44ddd2a115 MDL-41219 course: Make properties of course_modinfo read-only
added phpdocs and unittests
2013-09-10 14:11:37 +10:00
Marina Glancy cbd6b1fc63 MDL-41192 course: Added unittests for cm_info properties 2013-09-10 14:11:37 +10:00
Marina Glancy 6d04c4f2a2 MDL-41192 course: Added property-read cm_info::effectivegroupmode 2013-09-10 14:11:36 +10:00
Marina Glancy d872881f2a MDL-41192 course: Properties of cm_info are read-only and calculated on request
Also added phpdocs
2013-09-10 14:11:31 +10:00
Marina Glancy 88715ba2c0 MDL-41192 course: Can not write to the read-only properties of cm_info 2013-09-10 14:11:30 +10:00
Marina Glancy 4e4309064d MDL-41218 Object section_info calculates expensive data on demand only
Added phpdocs and unittests, removed unnecessary fields such as course and userid because they can be retrieved from modinfo
2013-09-10 14:11:24 +10:00
Dan Poltawski 840bbc1b64 Merge branch 'MDL-28561_M26' of git://github.com/lazydaisy/moodle 2013-09-10 12:04:51 +08:00
Damyon Wiese cc93ed2698 Merge branch 'MDL-41451_master' of https://github.com/pauln/moodle 2013-09-10 11:59:29 +08:00
Sam Hemelryk c0382dd012 Merge branch 'MDL-40735_lesson' of https://github.com/andyjdavis/moodle 2013-09-10 15:44:49 +12:00
Dan Poltawski f841aa780d Merge branch 'MDL-38570-master' of https://github.com/timgus/moodle 2013-09-10 11:13:29 +08:00
Dan Poltawski 30d6c394e2 Merge branch 'MDL-41147-master' of git://github.com/sammarshallou/moodle 2013-09-10 10:27:59 +08:00
Andrew Nicols 4dab1c39e2 MDL-38661 JavaScript: Ensure that ARIA tags are set when expanding/collapsing content 2013-09-10 03:22:44 +01:00
Andrew Nicols 1574e6529d MDL-38661: Add keyboard support for expansion 2013-09-10 03:17:13 +01:00
Damyon Wiese b4c6b42eb6 Merge branch 'wip-MDL-40347-master' of git://github.com/marinaglancy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
	theme/upgrade.txt
2013-09-10 09:40:10 +08:00
Damyon Wiese d0eaa8bf49 Merge branch 'MDL-41626-master' of github.com:StudiUM/moodle 2013-09-10 09:30:56 +08:00
Sam Hemelryk cb7ca00c55 Merge branch 'MDL-41600' of git://github.com/aolley/moodle 2013-09-10 13:12:13 +12:00
Sam Hemelryk a63d1e2871 Merge branch 'wip-MDL-41556-master' of git://github.com/abgreeve/moodle 2013-09-10 13:07:37 +12:00
Damyon Wiese 934c70040c Merge branch 'MDL-41253-master' of git://github.com/sammarshallou/moodle 2013-09-10 09:03:42 +08:00
Sam Hemelryk 3eb032d743 NOBUG: fixed whitespace 2013-09-10 13:02:35 +12:00
Adam Olley 910051b798 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:51 +09:30
Sam Hemelryk a775f2c96d Merge branch 'MDL-40731_headings' of https://github.com/andyjdavis/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-10 11:22:04 +12:00
Sam Hemelryk bee0a508ef Merge branch 'MDL-41558-master' of git://github.com/ankitagarwal/moodle 2013-09-10 11:16:30 +12:00
Sam Hemelryk 8242ca0c34 MDL-32862 backup: fixed missing global 2013-09-10 10:57:20 +12:00
Sam Hemelryk 68d3e7682a Merge branch 'MDL-41167-master' of git://github.com/sammarshallou/moodle 2013-09-10 10:31:59 +12:00
Sam Hemelryk 12d50d8216 Merge branch 'wip-MDL-32862-master' of git://github.com/abgreeve/moodle 2013-09-10 09:38:46 +12:00
Sam Hemelryk 9b6415dd38 Merge branch 'MDL-29378-survey' of git://github.com/mudrd8mz/moodle 2013-09-10 09:36:24 +12:00
sam marshall a7a64d774a MDL-41253 Restore: Mechanism to display progress during UI stages 2013-09-09 12:42:07 +01:00
Dan Poltawski 0df3254212 Merge branch 'MDL-41254-m' of git://github.com/micaherne/moodle 2013-09-09 18:04:05 +08:00
Dan Poltawski cdf6fc243e Merge branch 'MDL-29069' of https://github.com/bostelm/moodle 2013-09-09 17:37:49 +08:00
Andrew Davis e5d932cce2 MDL-40734 mod_glossary: cleaned up some headings 2013-09-09 17:30:12 +08:00
David Mudrák badfeed04c 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:19:48 +02:00
Dan Poltawski 8eb80a2c42 Merge branch 'MDL-37804' of github.com:recreate/moodle 2013-09-09 17:13:22 +08:00
Mary Evans ddfc16c87e MDL-40575 theme_bootstrapbase: Unable to scroll language menu in theme/clean. 2013-09-09 16:11:00 +08:00
Dan Poltawski 867af9c4f3 Merge branch 'MDL-41163-master' of git://github.com/sammarshallou/moodle 2013-09-09 15:29:48 +08:00
Dan Poltawski 8250a11688 MDL-41438 version bump 2013-09-09 14:25:07 +08:00
Dan Poltawski 76c88eaffb Merge branch 'MDL-41438' of git://github.com/rwijaya/moodle 2013-09-09 14:23:41 +08:00
Damyon Wiese 426cdef0bc Merge branch 'wip-MDL-41517-master' of git://github.com/marinaglancy/moodle 2013-09-09 12:43:32 +08:00
Damyon Wiese 437b86f0ad MDL-18275 Calendar types: Add a major version + redirect for ci server fail. 2013-09-09 11:25:02 +08:00
Damyon Wiese 7bb89ae042 Merge branch 'master_MDL-41290' of git://github.com/danmarsden/moodle 2013-09-09 10:46:59 +08:00
Damyon Wiese 1320c3177b Merge branch 'MDL-18375_master' of git://github.com/markn86/moodle 2013-09-09 10:41:12 +08:00
Rossiani Wijaya bea4ed1b44 MDL-41621 Assign mod: fix page heading levels 2013-09-09 10:24:19 +08:00
Dan Poltawski d95e8420df Merge branch 'MDL-41151-master' of git://github.com/sammarshallou/moodle 2013-09-09 10:22:02 +08:00
Rossiani Wijaya 4e5f53e90e MDL-41566 page resource: fix page heading levels.
Also removing printheading options setting.
2013-09-09 10:19:11 +08:00
Rossiani Wijaya 7265e7c784 MDL-41564 folder resource: fix page heading levels 2013-09-09 10:17:28 +08:00
Rossiani Wijaya 5def24cf32 MDL-40736 Survey: improve heading levels and styling 2013-09-09 09:50:42 +08:00
Rossiani Wijaya 846cebe5b3 MDL-40687 Feedback: improve page heading levels and layouts 2013-09-09 09:48:05 +08:00
Rossiani Wijaya d8a6d49c5f MDL-40686 book: fix heading level and styling 2013-09-09 09:46:27 +08:00
Rossiani Wijaya 3b42864d65 MDL-41438 core renderer: additional patch to remove .main definition from all core themes 2013-09-09 09:39:03 +08:00
Rossiani Wijaya 699e2fd0de MDL-41438 core_renderer: Update the parameters for heading() and heading_with_help().
heading(), change the default value for classes from 'main' to null.
heading_with_help(), add 2 additional parameters for level and classnames. Default value of level is set to 2 and classnames is set to null.

With the changes for heading_with_help(), icon image vertical alignment needs to be adjusted, so it display in the middle of the heading.

Also added some notes in theme/upgrade.txt file.
2013-09-09 09:39:03 +08:00
AMOS bot e2b3dc4b77 Automatically generated installer lang files 2013-09-09 00:44:14 +00:00
Yuliya Bozhko 4c3f809b21 MDL-41637 badges: Update modules ids retrieval 2013-09-09 11:55:47 +12:00
Yuliya Bozhko 497c676f0e MDL-41662 badges: Fix viewing user profile when not logged in 2013-09-09 11:21:39 +12:00
Paul Nicholls 59de735095 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:21:33 +12:00
Sam Hemelryk 33909ed001 Merge branch 'MDL-38794' of https://github.com/prateeksachan/moodle 2013-09-09 11:12:56 +12:00
Sam Hemelryk 771080ba7d Merge branch 'MDL-41417_master' of https://github.com/markn86/moodle 2013-09-09 10:54:11 +12:00
Sam Hemelryk fb76f7492e Merge branch 'MDL-29378-survey' of git://github.com/mudrd8mz/moodle 2013-09-09 10:48:13 +12:00
Sam Hemelryk 58cc269d0c Merge branch 'w37_MDL-28094_m26_subdirs' of https://github.com/skodak/moodle 2013-09-09 10:19:00 +12:00
Matt Petro d871a0df65 MDL-41660 backup ims-cc: Use correct temp directory 2013-09-08 17:28:33 -04:00
Sam Hemelryk 0b7a2b7bec Merge branch 'MDL-41460-master' of https://github.com/FMCorz/moodle 2013-09-09 08:58:44 +12:00
Sam Hemelryk c0739778f3 MDL-41189 fixed overflow issue with filepicker thumbnail 2013-09-09 08:24:31 +12:00
kordan 8d773a885e MDL-41658 theme_formal_white: text in input select is now never centered (fixed at central level) 2013-09-08 21:01:18 +02:00
Mary Evans f6fa4b7b91 MDL-41595 mod_book: Book mod does not add TOC to default region 2013-09-08 17:40:30 +01:00
Marina Glancy 7f250174df MDL-40347 Corrections to upgrade text 2013-09-08 23:17:34 +10:00
Mary Evans 4e2b37db07 MDL-40347 grade/report/grader: cleaned up grade/report/grader/styles.css. 2013-09-08 23:17:29 +10:00
Mary Evans edb7d5ad84 MDL-40347 grade/report/grader: Fixes: Grade report does not highlight some cells properly.
Squashed commit of the following:

commit 2c2164a7e27bd2b81102251420892386e39edecc
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Tue Aug 20 12:59:47 2013 +0100

    MDL-40347 theme: Modified upgrade.txt and created bootstrapbase/upgrade.txt.

commit 4449975a0f9249785ed152f63786bf7974c1776e
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Tue Aug 13 18:42:20 2013 +0100

    MDL-40347 grade/report/grader: added RTL css previously in bootstrapbase/less/moodle/grade.less to styles.css

commit b0af8f05a411b3dbb1d9c162a0d65c7f9c069c0f
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Tue Aug 13 12:42:02 2013 +0100

    MDL-40347_M26 grade/report/grader: cleaned up grade/report/grader/styles.css.

commit 52627137dc662d47cbfdf023d056baf102f29d8a
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Sat Jul 6 17:15:12 2013 +0100

    MDL-40347 grade/report/grader: Grade report does not highlight some cells properly.

    Merged/squashed original commit by Marina Glancy who:
    - added class 'i123' to each cell in the column
    - changed JS to highlight the cells with this class instead that cells with the column number
    - changed grade report css so the .vmarked and .hmarked classes have higher priority for all rows
    - made cells in 'average range' row td instead of th
    - little corrections to css: removed background image for some cells with .header css class
    - MyMobile theme disabled cells highlighting, make sure it disables it in all cases

    Merged/squashed original commit Mary Evans who:
    - removed theme/bootstrapbase/less/moodle/grade.less
    - removed @import "moodle/grade"; from bootstrapbase/less/moodle.less
    - removed reference to plugins_exclude_sheets for grader in both bootstrapbase/config.php and clean themes/config.php
    - commented out .hidden from bootstrapbase/less/bootstrap/responsive_utilities.less
    - made minor changes to grader/style.css
2013-09-08 23:16:47 +10:00
AMOS bot bc9cb8266a Automatically generated installer lang files 2013-09-08 00:43:06 +00:00
Eloy Lafuente (stronk7) f09119e1e5 weekly release 2.6dev 2013-09-07 14:20:07 +02:00
Eloy Lafuente (stronk7) 5cfcc6a981 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-09-07 14:13:55 +02:00
Petr Škoda f9beaf4472 MDL-28094 fix subdirs support in module intro editor 2013-09-07 11:30:19 +02:00
Petr Škoda 5e95223e86 MDL-28094 keep subdirs in content upgraded from 1.x 2013-09-07 11:30:19 +02:00
Petr Škoda 4db9d48253 MDL-28094 add function that detects if subdirs used and fix subdirs option in form editor 2013-09-07 11:30:18 +02:00
Petr Škoda 17ccd3aa1b MDL-41408 redirect after incorrect login attempts 2013-09-07 11:29:14 +02:00
Dan Poltawski 4925b9e8c5 MDL-41623 rss: clean output rss content 2013-09-07 10:41:25 +08:00
Eloy Lafuente (stronk7) d037dba81c MDL-41623 ensure all rss links are valid urls. 2013-09-07 04:04:54 +02:00
AMOS bot 42a98b25e1 Automatically generated installer lang files 2013-09-07 00:43:06 +00:00
sam marshall 1f8662f6fb MDL-41446 Completion: Incorrectly marks complete when grade data present with no actual grade 2013-09-06 13:01:50 +01:00
Mark Nelson c3bf6181aa MDL-41417 course: allow the use of duplicated idnumbers if they existed before fix 2013-09-06 15:18:23 +08:00
Adrian Greeve a3b2df62a2 MDL-32862 - Backup: Rewriting resource_old links on backup. 2013-09-06 14:53:39 +08:00
Jason Fowler 21f6c5292b MDL-41238 atto - close menu style when clicking anywhere outside it 2013-09-06 14:46:45 +08:00
Matthew Noorenberghe 9b3d60fc47 MDL-41634 - URL Download Repository doesn't warn when asked to download non-image files 2013-09-05 21:37:39 -07:00
Frederic Massart 5975d573ab MDL-41632 core_component: All version hash did not consider plugin type 2013-09-06 12:03:51 +08:00
Ankit Agarwal 32dea43930 MDL-40742 blogs: Replace blog_entry_updated with events2
AMOS BEGIN
 MOV [entryupdated,core_blog],[evententryupdated,core_blog]
AMOS END
2013-09-06 11:43:01 +08:00
Francis Devine 5536a5617c MDL-41417 course: prevent duplicate idnumbers being used when updating a course 2013-09-06 11:34:04 +08:00
Frederic Massart 0e6ee5e9e2 MDL-41630 oauth: Throw exception instead of dying on error 2013-09-06 10:46:17 +08:00
Paul Nicholls 85b82a9c2f 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:16:20 +12:00
Marina Glancy 961403c4bf MDL-41578 Fixed bug in coursecat::has_course_overviewfiles 2013-09-06 10:50:59 +10:00
AMOS bot de890145ee Automatically generated installer lang files 2013-09-06 00:47:46 +00:00
AMOS bot 88d4c218e9 Merge branch 'master' into install_master 2013-09-06 00:47:45 +00:00
Marina Glancy 3df632fbc5 MDL-38661 Add pointer cursor to clickable collapse/expand icons 2013-09-06 10:44:35 +10:00
Andrew Robert Nicols 53c1b936e5 MDL-38661 Course: Add JS category expander.
This adds a category expanded which:
* fetches child content in a category tree if it has not already been loaded;
* toggles relevant classes on the category node to show and hide child content; and
* applies appropriate animations to improve user experience.
2013-09-06 10:05:36 +10:00
Nitzan Bar ee2d1451a6 MDL-41528 enrol/ldap course default settings when no course template is selected 2013-09-06 02:05:40 +03:00
Jean-Philippe Gaudreau 7eb3c3cb6a MDL-41626 cas auth: Setting the right url for the multi-authentication page 2013-09-05 16:45:59 -04:00
sam marshall 6b5a7ce833 MDL-41167 Restore: Large course times out on Review page 2013-09-05 17:32:34 +01:00
sam marshall 347e663814 MDL-41147 Restore: Large course fails due to time limit when unzipping 2013-09-05 17:22:30 +01:00
sam marshall 7b4dbf0fa2 MDL-41163 Restore: Large course restore timeout on schema page 2013-09-05 17:06:59 +01:00
sam marshall 71ab7e512b MDL-41151 Files: Zip packer should have way to indicate progress 2013-09-05 16:41:57 +01:00
Mark Nelson 5999e40f01 MDL-41619 events: ensure direct access to event class files is prohibited 2013-09-05 18:43:58 +08:00
Mark Nelson 5ca04d0ef1 MDL-18375 calendar: fixed issue when resaving the year in the datetime field causing the year to decrease
For example, a user may create a date/time profile field and set the 'Start year'
field to '2012'. Another user, using the Hijri calendar, may edit the name of
this field. They visit the settings page and in this case the date '1/1/2012'
is converted to '7/2/1433' in Hijri. So, the year '1433' is then displayed.
The user then changes the name of this field and saves the form. This is where
the issue occurs, as the date '1/1/1433' is converted into Gregorian, which
converts to the year '26/09/2011', so the year '2011' is saved in the DB, not
'2012'.
2013-09-05 18:32:16 +08:00
Mark Nelson deed22ea39 MDL-18375 calendar: removed usage of the calendar type in the usergetdate function
The usergetdate function is not only used to display dates, it is also passed
to the function make_timestamp. This means users using another calendar type
other than Gregorian will generate incorrect timestamps which may be saved in
the DB or used to populate the date_selector and date_time_selector elements.
For example, when creating an assignment using another calendar type other
than Gregorian, the mod_form.php file calls $this->apply_admin_defaults()
which uses the function usergetmidnight to set the "Allow submissions from"
date to today's date and the "Due date" field to 7 days in the future. The
usergetmidnight function calls usergetdate which is then passed to
make_timestamp. Since the usergetdate function was using the calendar
type's timestamp_to_date_array function the date being passed to
make_timestamp was not in Gregorian. So, when using the hijri calendar the
year 1434 was being passed which was generating a large negative number as
the timestamp which was then used to populate the date fields.
2013-09-05 18:32:16 +08:00
Mark Nelson 6eafa4ddba MDL-18375 calendar: changed the name of the function factory to be more descriptive 2013-09-05 18:32:16 +08:00
Mark Nelson 2aefba53a5 MDL-18375 calendar: added condition to ensure calendar type exists before loading 2013-09-05 18:32:16 +08:00
Mark Nelson 5989677e0f MDL-18375 calendar: added the Gregorian calendar type to the standard list of plugins 2013-09-05 18:32:16 +08:00
Mark Nelson df5d27d892 MDL-18375 calendar: only display the choice of calendar types if there is more than one 2013-09-05 18:32:16 +08:00
Mark Nelson df01e4c748 MDL-18375 calendar: PHPDoc tidy up as well as some other minor changes 2013-09-05 18:32:16 +08:00
Mark Nelson f59ab4adc8 MDL-18375 calendar: renamed the userdate/usergetdate functions and changed them to abstract
Renamed the userdate/usergetdate functions in the calendar type to be more
descriptive and made them abstract to ensure developers implement this
functionality in their calendar type.

Also tidied up PHPDocs for these functions.
2013-09-05 18:32:16 +08:00
Mark Nelson 0ae36d6cfc MDL-18375 calendar: created a test calendar type to use for PHPUnit tests and added tests 2013-09-05 18:32:16 +08:00
Mark Nelson 022745acd2 MDL-18375 calendar: implemented the usage of the recently introduced automatic class loading 2013-09-05 18:32:16 +08:00
Mark Nelson 84423bd9e5 MDL-18375 calendar: refactored the datetime user field so that it now uses the calendar type system 2013-09-05 18:32:15 +08:00
Mark Nelson 62321a7ba0 MDL-18375 calendar: edited the calendartype column in the install.xml file and created an upgrade path 2013-09-05 18:32:15 +08:00
Mark Nelson 7e52491cf9 MDL-18375 calendar: moved the location of the calendar type select box when editing a course 2013-09-05 18:30:05 +08:00
Mark Nelson 29cb1e83b0 MDL-18375 calendar: only display the YUI2 calendar when the Gregorian type is used 2013-09-05 18:30:05 +08:00
Mark Nelson 2f00e1b245 MDL-18375 calendar: huge refactor of the initial patch
1) Moved the calendar types location to a sub-folder in the calendar directory.
2) Removed/moved language strings.
3) Removed calendar types that should be downloaded as plugins.
4) Removed a Non-English language pack for the Gregorian calendar type that
should be downloaded separately.
5) Removed custom files responsible for checking for updates and uninstalling
calendar types, which should be done by core.
6) Removed JS from the calendar_month block as there is no non-JS alternative
provided and the JS written does not make use of the YUI library to ensure
multiple browser support.
7) Removed code from the base class responsible for creating timestamps that
are saved in the DB.
8) Added PHPDocs.

Note: In the original patch we are editing core functions responsible for saving
time in the database in the calendar base class. This is very dangerous, we do
not want to touch these functions as it could cause a complete fubar of the
database. There are places we are forcing the use of the gregorian calendar as
we are passing dates generated by the PHP date function, where as sometimes
we pass dates from usergetdate (which was being overwritten to return the
date specific to the calendar). We can not expect third party modules to
change the calendar type depending on the format they pass to these functions.
2013-09-05 18:30:05 +08:00
Shamim Rezaie 6dd59aabfa MDL-18375 calendar: added multiple calendar support
Conflicts:

	course/edit_form.php
	lib/db/install.xml
	lib/form/dateselector.php
	lib/form/datetimeselector.php
	lib/setup.php
2013-09-05 18:30:05 +08:00
Ankit Agarwal 77037e27a5 MDL-41599 events: Set relateduserid instead of userid in blog events 2013-09-05 17:10:34 +08:00
Frederic Massart 3274c5db89 MDL-41460 core_component: Validate cache against version.php 2013-09-05 14:45:09 +08:00
Dan Poltawski ba7b843c01 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-09-05 14:42:31 +08:00
Dan Poltawski b69ec2889e weekly release 2.6dev 2013-09-05 13:34:14 +08:00
Rajesh Taneja cc6a0dd095 MDL-41605 Enrolments: Updated unassign role url to use roleid as param
Filter on enrolled users page use role param to perform filtering by role,
and unassign role also contain role param to remove user role in course
which used to conflict. Looking at assign role, we use roleid param, so
using roleid for unassigning as well
2013-09-05 11:47:19 +08:00
Dan Poltawski 0de0e38bc4 Merge branch 'wip-MDL-41369-fix2' of git://github.com/marinaglancy/moodle 2013-09-05 10:34:11 +08:00
Marina Glancy 1b40564829 MDL-41369 Behat tests updated because of fixed messaging navigation 2013-09-05 12:29:29 +10:00
David Monllao 19f6703d8b MDL-41587 tool_behat: Adding site name constant 2013-09-05 10:13:25 +08:00
David Monllao 3b7d3fb8d7 MDL-41555 tool_behat: Improving behat & selenium exceptions messages
Also moving the 'selenium not running'
checking to a proper place as it was
not thrown since the homepage start
visit() was introduced.
2013-09-05 10:12:57 +08:00
Mark Nelson 1eee7ee3a0 MDL-40924 badges: added a print_error call to prevent PHP notices when no badges are found 2013-09-05 10:05:37 +08:00
David Mudrák 57c2052c20 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:08:42 +02:00
David Mudrák 7c51792932 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:08:42 +02:00
David Mudrák de9a88cdaf 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:08:42 +02:00
Henning Bostelmann d0372ed6f1 MDL-29069 Data / Glossary: allow disapproving entries 2013-09-04 20:37:46 +01:00
Tim Gus 179961e8a4 MDL-38570 administration: Temporary file deletion
Added new function "cron_delete_from_temp" to delete old files and
directories under $CFG->tempdir during cron run. Unit test included.
2013-09-04 13:48:01 -04:00
Rajesh Taneja b7a5eb1ed8 MDL-41590 Enrolments: If course is deleted, then use courseid for reference 2013-09-04 17:32:19 +08:00
Dan Poltawski bc16c7a0e3 Merge branch 'MDL-41568_master-fix_behat' of git://github.com/dmonllao/moodle 2013-09-04 16:59:20 +08:00
Jason Fowler 2e2d0f75dd MDL-40833 Course - Single topic pages need h3 for section heading 2013-09-04 15:39:27 +08:00
David Monllao 93a8bc8283 MDL-41568 lang: Fix behat features after changes 2013-09-04 15:16:59 +08:00
Marina Glancy 8f0137e192 MDL-41369 Pass viewing argument to more message screens 2013-09-04 17:11:30 +10:00
Rajesh Taneja 2e4b1fc728 MDL-41589 Enrolments: Fixed role unassign confirmation dialog 2013-09-04 14:35:36 +08:00
Damyon Wiese fedb0325df Merge branch 'MDL-41485-master' of git://github.com/ankitagarwal/moodle 2013-09-04 12:24:54 +08:00
Damyon Wiese 3516b82c9d Merge branch 'wip-mdl-41456' of git://github.com/rajeshtaneja/moodle 2013-09-04 11:45:07 +08:00
Dan Poltawski 259dfc2521 Merge branch 'wip-MDL-41369-master' of git://github.com/marinaglancy/moodle 2013-09-04 11:09:30 +08:00
Dan Poltawski 7e2a4e1638 Merge branch 'wip-mdl-41418' of git://github.com/rajeshtaneja/moodle 2013-09-04 10:38:10 +08:00
Dan Poltawski 4f9c5f332b Merge branch 'wip-MDL-41395-master' of git://github.com/marinaglancy/moodle 2013-09-04 10:33:33 +08:00
Damyon Wiese 1f08aa6685 MDL-28579 scorm: Fix broken unit tests 2013-09-04 09:44:05 +08:00
Damyon Wiese 8a4796fbcd Merge branch 'master_MDL-28579' of git://github.com/danmarsden/moodle 2013-09-04 09:00:48 +08:00
Jason Fowler f477b698ab MDL-41236 atto - Improving visibility of disabled buttons and making atto match the file manager 2013-09-04 07:52:55 +08:00
Eloy Lafuente (stronk7) 4e6f199203 MDL-41267 fix phpunit tests 2013-09-04 01:11:54 +02:00
Eloy Lafuente (stronk7) f875599462 Merge branch 'w36_MDL-41267_m26_toolsubplugins' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-09-04 01:08:37 +02:00
Yuliya Bozhko a72c2cd681 MDL-40471 badges: Fixes around badge capabilities and navigation 2013-09-04 11:03:35 +12:00
Eloy Lafuente (stronk7) df7995e3a0 Merge branch 'MDL-41146-master' of git://github.com/sammarshallou/moodle 2013-09-04 01:01:19 +02:00
Dan Marsden b565637322 MDL-41290 SCORM: Improve user report
put descriptions in help popups instead of in table.

AMOS BEGIN
MOV [interactionscorrectcount, mod_scorm],[trackcorrectcount_help, mod_scorm]
MOV [interactionslatency, mod_scorm],[tracklatency_help, mod_scorm]
MOV [interactionsresult, mod_scorm],[trackresult_help, mod_scorm]
MOV [interactionsscoremin, mod_scorm],[trackscoremin_help, mod_scorm]
MOV [interactionsscoremax, mod_scorm],[trackscoremax_help, mod_scorm]
MOV [interactionsscoreraw, mod_scorm],[trackscoreraw_help, mod_scorm]
MOV [interactionssuspenddata, mod_scorm],[tracksuspenddata_help, mod_scorm]
MOV [interactionstime, mod_scorm],[tracktime_help, mod_scorm]
MOV [interactionsweight, mod_scorm],[trackweight_help, mod_scorm]
AMOS END

Move userreport into /report and rename parameters to be more useful

fix overcomplicated parameter handling

remove SCORM 2004 specific reporting of objectives and interactions to simplify page - these will appear in full list of tracking data instead
Also remove duplicated data - the general tracks info is repated 3 times on the page so isn't required.

remove link to player as loading scos this way is problematic

split out user tracks table into it's own file

convert tracks table to flexible table and allow export

add new interactions report

add tabs to allow navigation between reports

force wrapping of track data value even when no spaces

fix some coding guideline stuff
2013-09-04 09:56:48 +12:00
Dan Marsden 27b87c10bf MDL-28579 SCORM: use filemanager instead of old file picker 2013-09-04 09:51:41 +12:00
Eloy Lafuente (stronk7) 58c80b03a8 Merge branch 'MDL-40566_master' of git://github.com/dmonllao/moodle 2013-09-03 20:38:53 +02:00
Eloy Lafuente (stronk7) f82a082ae2 Merge branch 'MDL-41568-en_fix' of git://github.com/mudrd8mz/moodle 2013-09-03 15:12:19 +02:00
Helen Foster 86698a4c72 MDL-41568 Merge English strings from the en_fix language pack 2013-09-03 12:31:35 +02:00
Frederic Massart 5995717e22 MDL-41305 group: Form improvements for group/grouping creation 2013-09-03 18:31:21 +08:00
Marina Glancy 85708da63b MDL-41395 Improved phpdocs for coursecatlib.php 2013-09-03 19:23:44 +10:00
Sam Hemelryk 1eac203343 MDL-41395 improved phpdoc's for coursecatlib.php 2013-09-03 19:09:07 +10:00
Mary Evans 156da07f92 MDL-28561 blocks_rss_client: Fixes lines between RSS feed items are not showing in all themes. 2013-09-03 09:43:06 +01:00
Damyon Wiese be62e59a93 Merge branch 'mdl26_MDL-41403_backup_reduce_memory_usage' of https://github.com/brki/moodle 2013-09-03 16:18:36 +08:00
Damyon Wiese 050167c3e6 Merge branch 'MDL-41348' of git://github.com/timhunt/moodle 2013-09-03 16:09:29 +08:00
Dan Poltawski 1f34b19a33 Merge branch 'mdl41304-master' of git://github.com/tlock/moodle 2013-09-03 16:05:38 +08:00
Damyon Wiese e66c84a157 Merge branch 'MDL-29954-master' of git://github.com/danpoltawski/moodle 2013-09-03 16:02:47 +08:00
Frederic Massart 28f1ff8def MDL-41565 event: Correct inclusion path of observers includefile 2013-09-03 15:54:20 +08:00
Jason Fowler 199c9375d0 MDL-35925 filepicker - Fixing behat tests 2013-09-03 15:43:56 +08:00
Damyon Wiese a28f43e8c7 Merge branch 'wip-MDL-23044-master' of git://github.com/marinaglancy/moodle 2013-09-03 15:33:25 +08:00
Damyon Wiese 9591f9bc54 Merge branch 'wip-mdl-41413-int' of git://github.com/rajeshtaneja/moodle 2013-09-03 15:16:42 +08:00
Marina Glancy 0bac49dc19 MDL-37028 Integrity check for course modules and sections
If section mentioned in 'orphaned' module does not exist module is added to the first available section. Also corrected whitespaces
2013-09-03 17:14:13 +10:00
Marina Glancy a7e505e659 MDL-23044 Use Files API functions in filesystem cron 2013-09-03 17:00:29 +10:00
Rajesh Taneja 9077fc61f7 MDL-41413 Events: replaced course_deleted event handler with observer 2013-09-03 14:55:03 +08:00
Rajesh Taneja 8525a8f0d5 MDL-41413 Events: replaced role_unassigned event handler with observer 2013-09-03 14:54:58 +08:00
Rajesh Taneja f58915f0bb MDL-41413 Events: replaced role_assigned event handler with observer 2013-09-03 14:54:44 +08:00
Damyon Wiese ca83aa0b99 Merge branch 'MDL-37564' of https://github.com/nebgor/moodle 2013-09-03 14:49:42 +08:00
Damyon Wiese ed204cb514 Merge branch 'MDL-33472-master' of git://github.com/danpoltawski/moodle 2013-09-03 14:35:58 +08:00
Damyon Wiese 060615d347 Merge branch 'm26_MDL-29218_plugin_init_not_blocking_when_false' of https://github.com/scara/moodle 2013-09-03 14:25:43 +08:00
Damyon Wiese 3e248a7dc8 Merge branch 'MDL-32690_restoreMissingAssignment_master' of https://github.com/moodlerooms/moodle 2013-09-03 14:13:00 +08:00
Dan Poltawski 5c1ba238d2 Merge branch 'MDL-41440_master' of https://github.com/markn86/moodle 2013-09-03 14:10:02 +08:00
Yuliya Bozhko ed23ad31c7 MDL-41228 phpunit: Reset message processors list in unit tests 2013-09-03 17:43:53 +12:00
Michael de Raadt 02d10ca0ba MDL-23335 mod_forum: allow multi-lang filtering of shortened messages 2013-09-03 13:42:06 +08:00
Ankit Agarwal f5c263836d MDL-41558 cache: Identifiers should never be passed as null to cache::make() 2013-09-03 13:37:50 +08:00
Ankit Agarwal 06f6885b27 MDL-41558 cache: Improve performance of cache::make() by using isset instead of array_key_exist() 2013-09-03 13:36:59 +08:00
Dan Poltawski f3549a51a7 Merge branch 'w36_MDL-41255_m26_changepw' of https://github.com/skodak/moodle 2013-09-03 12:58:27 +08:00
Dan Poltawski c247756b0c Merge branch 'MDL-41428-master' of git://github.com/FMCorz/moodle 2013-09-03 12:27:26 +08:00
Marina Glancy 30fe1181b5 MDL-41508 Changes in indentation 2013-09-03 14:21:28 +10:00
Dan Poltawski 4ffd70f315 Merge branch 'wip-MDL-41179-master' of git://github.com/marinaglancy/moodle 2013-09-03 11:48:45 +08:00
Marina Glancy 24f824b924 MDL-41517 Do not call fix_course_sortorder unnecessarily
Thanks to Thomas Worthington
2013-09-03 13:45:00 +10:00
Adrian Greeve 146893d62f MDL-41556 - workshop: undefined constant FILE_INTERNAL message fixed. 2013-09-03 11:44:30 +08:00
Dan Poltawski 2793260fc0 MDL-41256 course tests: improve robustness
* Fail if an exception isn't recieved
* Don't allow the possibility of an undefined variable being tested
2013-09-03 11:01:15 +08:00
Dan Poltawski c6569641e7 Merge branch 'MDL-41256-master' of https://github.com/mackensen/moodle 2013-09-03 10:51:27 +08:00
Dan Poltawski 29db803ac7 Merge branch 'wip-MDL-41317-master' of git://github.com/marinaglancy/moodle 2013-09-03 10:40:28 +08:00
David Monllao fcc0b5b920 MDL-40566 behat: Update features using the new options 2013-09-03 10:31:57 +08:00
David Monllao db5f2d3360 MDL-40566 behat: Adding info about the deprecated attr. 2013-09-03 10:29:28 +08:00
David Monllao 17344d4c8f MDL-40566 behat: Moving from behat_command to behat_selectors 2013-09-03 10:28:42 +08:00
David Monllao ecf5b898e2 MDL-40566 behat: Adding behat_selectors
Class that manages moodle selectors transition
to behat default selectors.
2013-09-03 10:28:41 +08:00
Dan Poltawski 2b1e887561 Merge branch 'MDL-40214_master' of https://github.com/markn86/moodle 2013-09-03 10:06:38 +08:00
Dan Poltawski 98c2189d62 MDL-31890 version bump
(and trailing whitespace fix)
2013-09-03 09:55:08 +08:00
Dan Poltawski 6affe9e695 Merge branch 'wip-MDL-31890-master' of git://github.com/marinaglancy/moodle 2013-09-03 09:53:22 +08:00
Damyon Wiese 8a1b820bc5 Merge branch 'w36_MDL-20045_m26_customlevels' of https://github.com/skodak/moodle 2013-09-03 09:35:16 +08:00
Dan Marsden cb029f33c6 MDL-28579 SCORM: coding guideline fixes 2013-09-03 09:12:36 +12:00
Matteo Scaramuccia a1070d3fff MDL-29218 Repository: fixed a typo in the PHPDoc 2013-09-02 23:09:24 +02:00
Matteo Scaramuccia 46d023b77a MDL-29218 Repository: $pname, get rid of all the useless code
More details in the Tracker.
2013-09-02 23:09:22 +02:00
Matteo Scaramuccia 9b64ec4dae MDL-29218 Repository: Hide the repo if repository::plugin_init returns false 2013-09-02 23:09:20 +02:00
Eloy Lafuente (stronk7) e034d84c48 Merge branch 'MDL-38190-master' of git://github.com/sammarshallou/moodle
Conflicts:
	backup/import.php
	theme/bootstrapbase/style/moodle.css
2013-09-02 16:56:50 +02:00
Damyon Wiese 0d416e9c0b MDL-39992 assign: Sort grading actions in alphabetical order 2013-09-02 22:23:03 +08:00
Damyon Wiese 8fd00a2471 MDL-40631: Prevent students from submitting empty assignments. 2013-09-02 21:59:15 +08:00
Dan Poltawski ee0be46957 Merge branch '41214-26' of git://github.com/samhemelryk/moodle
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2013-09-02 17:32:08 +08:00
Dan Poltawski 56b9e0b565 Merge branch 'MDL-41149-master' of git://github.com/damyon/moodle 2013-09-02 17:25:27 +08:00
Michael Aherne 91dbb24442 MDL-41254 backup Raise time and memory limit in precheck. 2013-09-02 10:22:40 +01:00
Dan Poltawski 53d9e41bb9 Merge branch 'MDL-41402_master-fix-langstr' of git://github.com/dmonllao/moodle 2013-09-02 17:22:14 +08:00
David Monllao 1a780189c6 MDL-41402 tool_generator: Changing plugin name according to the new feature 2013-09-02 17:04:04 +08:00
Dan Poltawski b0b85f70d8 MDL-41402 tool_generator: increment version 2013-09-02 16:32:58 +08:00
Dan Poltawski 013b0e9b79 MDL-41402 tool_generator: fix whitespace 2013-09-02 16:28:27 +08:00
Dan Poltawski f1b10b36ea Merge branch 'MDL-41402_master' of git://github.com/dmonllao/moodle 2013-09-02 16:27:46 +08:00
David Monllao 338bf2e07b MDL-41402 tool_generator: Adding maketestsite script
Uses maketestcourse.php to set up
a test site.
2013-09-02 16:25:35 +08:00
David Monllao 8cac8d3e95 MDL-41402 tool_generator: Refactoring backend class
Moving it to course_backend keeping generic
methods and attributes in backend class.

AMOS BEGIN
 MOV [size_0,tool_generator],[coursesize_0,tool_generator]
 MOV [size_1,tool_generator],[coursesize_1,tool_generator]
 MOV [size_2,tool_generator],[coursesize_2,tool_generator]
 MOV [size_3,tool_generator],[coursesize_3,tool_generator]
 MOV [size_4,tool_generator],[coursesize_4,tool_generator]
 MOV [size_5,tool_generator],[coursesize_5,tool_generator]
AMOS END
2013-09-02 16:25:33 +08:00
Dan Poltawski 4abcb5c5e2 Merge branch 'MDL-41399_master-remove_test' of git://github.com/dmonllao/moodle 2013-09-02 16:21:48 +08:00
Rajesh Taneja bb78e249cd MDL-39961 Events: Replace Legacy events - User
This change includes:
* Added user_updated event, replacing old event
* Added user_created event, replacing old event
* Added user_deleted event, replacing old event
* Added user_loggedout event, replacing old event
* Added user_enrolment_created event, replacing old event
* Added user_enrolment_deleted event, replacing old event
* Added user_enrolment_updated event, replacing old event
2013-09-02 16:10:05 +08:00
David Monllao e25be3b1dc MDL-41399 tool_generator: Removing unit test
Removing dodgy database reset in the
middle of a test as sequences reset
is not allowed.
2013-09-02 15:55:18 +08:00
Damyon Wiese 80032fea02 Merge branch 'wip-MDL-41231-master' of git://github.com/abgreeve/moodle 2013-09-02 15:26:26 +08:00
Dan Poltawski 6b25e62f48 Merge branch 'MDL-35925-master' of git://github.com/phalacee/moodle
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2013-09-02 15:23:05 +08:00
Damyon Wiese c932a4db7c Merge branch 'MDL-41259_master' of https://github.com/nitzo/moodle 2013-09-02 15:02:12 +08:00
Damyon Wiese fb692af13b Merge branch 'MDL-41516-m' of git://github.com/andrewnicols/moodle 2013-09-02 14:56:49 +08:00
Dan Poltawski 5972292444 Merge branch 'MDL-36093-master' of github.com:StudiUM/moodle 2013-09-02 14:10:28 +08:00
Dan Poltawski 7cefa10220 MDL-40676 tests: fix null byte test. 2013-09-02 13:58:53 +08:00
Yuliya Bozhko 737a352ff8 MDL-40712 badges: Display recipient information 2013-09-02 13:43:51 +08:00
Yuliya Bozhko 2d3c0faef1 MDL-40924 badges: Add caching to external badges 2013-09-02 13:40:41 +08:00
Andrew Davis 974beea10a MDL-40735 mod_lesson: fixed up a header and stripped out hardcoded formatting 2013-09-02 12:38:20 +07:00
Andrew Davis 66e2b9f8c2 MDL-38856 reposition activity group control and fixed titles in chat, database and forum 2013-09-02 11:49:39 +07:00
Petr Škoda bff1d60c05 MDL-40676 ignore null bytes 2013-09-02 12:25:02 +08:00
Dan Poltawski fff084b29f Merge branch 'MDL-41175_M26' of git://github.com/lazydaisy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-02 11:50:38 +08:00
Dan Poltawski 70189e7ad2 Merge branch 'MDL-41328-master' of git://github.com/damyon/moodle 2013-09-02 11:44:51 +08:00
Andrew Nicols ff73a6d1fb 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:27 +08:00
AMOS bot 635bf2f343 Automatically generated installer lang files 2013-09-02 00:47:05 +00:00
Marina Glancy dd8b6a19dd MDL-31890 corrected whitespaces and phdocs 2013-09-02 10:27:12 +10:00
Andrew Nicols 59849f7925 MDL-41516 Themes: Ensure that blocks are set up early
Blocks can require JavaScript which must be set up early in the page
lifecycle.
In order to do so, we should ensure that content is created in the standard
head setup before any other output is created so that any subsequent use of
block instances are no longer the first such use when they may already be
too late in the lifecycle.
2013-09-01 23:53:52 +01:00
Paul Charsley 9028d9b513 MDL-31890 added core_grading_get_gradingform_instances web service
function
2013-09-02 09:00:39 +12:00
Sam Hemelryk 3f47974fc0 MDL-41432 output: several action_menu improvements
The following improvements have been made:
* Items no longer MUST have an icon, it can now be null instead.
* You can specify the icon displayed to toggle the dropdown menu.
* You can add text in front of the aforementioned icon.
2013-09-02 08:34:54 +12:00
Sam Hemelryk f2b235cb14 MDL-41214 notification: now looks at menubar zIndex as well 2013-09-02 08:29:53 +12:00
Petr Škoda 0aa535bf1d MDL-20045 add support for custom context levels 2013-08-31 11:47:44 +02:00
Petr Škoda 40834ac88c MDL-41255 fix incorrect redirection logic when changing password
Credit goes to Michael Milette.
2013-08-31 11:42:27 +02:00
Petr Škoda ac2b2713ba MDL-41267 add support for subplugins in admin tools 2013-08-31 11:40:44 +02:00
AMOS bot 096640fc5e Merge branch 'master' into install_master 2013-08-31 00:43:52 +00:00
Willy Lee 030e2976ec MDL-41497 auth_db: Added help text for using odbc dsn names instead 2013-08-30 10:17:31 -05:00
David Monllao d9ff6296b7 MDL-41399 tool_generator: Unit test for fixeddataset 2013-08-30 18:55:07 +08:00
David Monllao 219cae03db MDL-41399 tool_generator: Adding fixeddataset option 2013-08-30 18:55:07 +08:00
Andrew Davis 82cf581693 MDL-40733 mod_forum: added the forum name to some pages that were missing it 2013-08-30 14:58:40 +07:00
Marina Glancy aec8fe2f9b MDL-41508 move_courses() bug fix and DB query improvement 2013-08-30 16:47:25 +10:00
Marina Glancy 1f0a9ce48b MDL-37028 Integrity check for course modules and sections
created function, unittest, build-in quick integrity check on each call to rebuild_course_cache()
also added CLI script
2013-08-30 16:41:13 +10:00
Marina Glancy 3e439915d3 MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current 2013-08-30 14:29:57 +10:00
Marina Glancy 2ef39ca4c5 MDL-23044 Support for storing thumbnails in repository filesystem 2013-08-30 14:22:48 +10:00
Rajesh Taneja 3b908929c1 MDL-41456 Events: Fixed existing events to respect base event access specifier and return data type 2013-08-30 11:07:48 +08:00
Damyon Wiese ee788142f2 weekly release 2.6dev 2013-08-30 09:37:04 +08:00
Damyon Wiese 4a5a5f6902 ie9 svg compatibility fixes 2013-08-30 09:29:10 +08:00
AMOS bot b5b8310e9c Automatically generated installer lang files 2013-08-30 00:41:46 +00:00
Willy Lee d991bc77fa MDL-41497 enrol_database: Added help text for using odbc dsn names instead 2013-08-29 15:36:44 -05:00
Mark Nielsen 79547e52dd 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:47:35 -07:00
Sam Hemelryk 4d5221906e MDL-40931 theme_bootstrapbase: fixed missing ! when including html5shiv 2013-08-29 20:34:45 +12:00
Damyon Wiese 77bb4425e1 Revert "MDL-39871 Find a solution to handling RTL switching in CSS"
This reverts commit 2e68b1254f.
This reverts commit 5b2ed8b5ff.
2013-08-29 15:39:25 +08:00
Ankit Agarwal ee74a2a19e MDL-41485 calendar: Replace value of action buttons on managesubscription page with int 2013-08-29 14:55:43 +08:00
Rossiani Wijaya 438715218d MDL-41438 core renderer: additional patch to remove .main definition from all core themes 2013-08-29 11:44:55 +08:00
Damyon Wiese 09d7ecbad8 Revert "MDL-40752 - Login panel should be placed on the right side, in RTL mode (theme/clean, bootstrap)"
This reverts commit 48e5db7428.

Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-08-29 11:35:42 +08:00
Rossiani Wijaya 1bc07ca21d MDL-41438 core_renderer: Update the parameters for heading() and heading_with_help().
heading(), change the default value for classes from 'main' to null.
heading_with_help(), add 2 additional parameters for level and classnames. Default value of level is set to 2 and classnames is set to null.

With the changes for heading_with_help(), icon image vertical alignment needs to be adjusted, so it display in the middle of the heading.

Also added some notes in theme/upgrade.txt file.
2013-08-29 10:30:02 +08:00
Dan Poltawski 575c57df0a Merge branch 'MDL-39682_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-29 10:15:47 +08:00
Sam Hemelryk db314fc883 MDL-41213 theme_bootstrapbase: fixed license filemanager overflow 2013-08-29 09:08:47 +12:00
Nadav Kavalerchik f63a9af78e MDL-39682 Forms, File Picker, Themes: Fix alignment of Form's Labels and Input elements in RTL mode (theme/clean) 2013-08-28 21:15:49 +03:00
Jean-Philippe Gaudreau 70be44309e MDL-36093 grade export: Fix HTML special characters printed litteraly. 2013-08-28 09:12:45 -04:00
Brian King 07dffdf5f5 MDL-41403 Backup: reduce memory usage when searching for courses / categories
Also makes a few existing comments in the changed code area adhere to coding standards.
2013-08-28 12:59:16 +02:00
Tim Hunt 0d14f2eb1e 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:15:24 +01:00
Damyon Wiese 771d17fbab Merge branch 'w35_MDL-41245_m26_pluginuninstall' of https://github.com/skodak/moodle 2013-08-28 17:06:07 +08:00
kordan 63f158db66 MDL-41466 theme_formal_white: added missing ending new line 2013-08-28 10:41:55 +02:00
kordan c724e00996 MDL-41466 theme_formal_white: moved courses action icons once again on the right 2013-08-28 10:37:31 +02:00
Damyon Wiese 1149b5d205 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:29:19 +08:00
Jason Fowler 2eaaae00be MDL-35925 File picker - Improving accessibility by adding focus and removing unnecessary alt attribs 2013-08-28 14:05:13 +08:00
Petr Škoda 2612e75e2b MDL-41245 fix redirect and missing string when cannot automatically delete uninstalled plugin 2013-08-28 08:00:19 +02:00
Colin Campbell 58672659c6 MDL-40214 mod_assign: Fixed issue with custom scale being lost during restore. 2013-08-28 10:52:47 +08:00
Dan Poltawski 033d1634cc MDL-29954 repository: remove dead code
Also remove repository_attach_id() which was never used and not useful.
2013-08-28 10:52:42 +08:00
Dan Poltawski d9cf3ca0b0 Merge branch 'MDL-41098-master-fix1' of git://github.com/damyon/moodle 2013-08-28 10:00:46 +08:00
AMOS bot 3e770d5974 Automatically generated installer lang files 2013-08-28 00:53:46 +00:00
Eloy Lafuente (stronk7) 5c45146007 Merge branch 'MDL-41387_master' of https://github.com/markn86/moodle 2013-08-27 21:00:12 +02:00
Nitzan Bar fdb04f62e9 MDL-41259 when duplicate course shortname exists an exception is thrown and sync is aborted 2013-08-27 21:13:57 +03:00
Eloy Lafuente (stronk7) c718b49bfc Merge branch 'm26_MDL-41410_Move_Comment_To_Appropriate_Place' of https://github.com/scara/moodle 2013-08-27 19:45:24 +02:00
Damyon Wiese c492d41f3b MDL-41098 atto: Enable atto text editor on upgrade
TinyMCE is still the default.
2013-08-27 21:36:21 +08:00
Damyon Wiese ceaef9a9cc MDL-41098 atto: Fix min-height on firefox. 2013-08-27 21:09:32 +08:00
Dan Poltawski 939320f721 Merge branch 'MDL-41366' of git://github.com/timhunt/moodle 2013-08-27 18:09:34 +08:00
Mark Nelson f192414ed8 MDL-41440 event: fixed incorrect treatment of get_string as a class 2013-08-27 17:03:07 +08:00
Damyon Wiese 5df7c45409 Merge branch 'MDL-41364' of git://github.com/timhunt/moodle 2013-08-27 16:31:36 +08:00
Damyon Wiese ad4f3b6ce5 Merge branch 'wip-mdl-41415' of git://github.com/rajeshtaneja/moodle 2013-08-27 16:06:32 +08:00
Damyon Wiese e3f3475079 Merge branch 'wip-MDL-41127-master' of git://github.com/marinaglancy/moodle 2013-08-27 15:55:14 +08:00
Damyon Wiese 8380bd08a8 Merge branch 'master_MDL-35380' of git://github.com/danmarsden/moodle 2013-08-27 15:51:19 +08:00
Dan Poltawski d76cb8ee26 Merge branch 'MDL-39682_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-27 15:47:52 +08:00
Damyon Wiese cbd91e23e9 Merge branch 'wip-MDL-40931-m26' of git://github.com/samhemelryk/moodle
Conflicts:
	version.php
2013-08-27 15:29:49 +08:00
Ankit Agarwal ac43f96306 MDL-40052 events: Code style fixes 2013-08-27 15:26:38 +08:00
Ankit Agarwal b9e1f0997c MDL-40052 events: Add get_url() api to various report content_viewed classes 2013-08-27 15:26:38 +08:00
Ankit Agarwal bb0038074e MDL-40052 events: Add content view events for reports
Includes:
* Add content view events for report_log
* Add content view events for report_loglive
* Add content view events for report_outline
* Add content view events for report_participation
* Add content view events for report_stats
2013-08-27 15:25:43 +08:00
Ankit Agarwal 589748316d MDL-40052 events: Add a base class for content view 2013-08-27 15:22:28 +08:00
Damyon Wiese 37e2954e19 Merge branch 'MDL-41401-master' of git://github.com/danpoltawski/moodle 2013-08-27 15:09:21 +08:00
Dan Poltawski 4436225eb1 Merge branch 'MDL-40732' of git://github.com/rwijaya/moodle 2013-08-27 15:06:38 +08:00
Damyon Wiese 8760b1eea2 MDL-41081 navbar: Cleanup comments in prepend() 2013-08-27 14:11:08 +08:00
Damyon Wiese dc7092f7b3 Merge branch 'wip-MDL-41081-m26' of git://github.com/samhemelryk/moodle 2013-08-27 14:11:03 +08:00
Dan Poltawski eb1526e059 Merge branch 'MDL-41321_master' of git://github.com/lazydaisy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-27 14:06:54 +08:00
Dan Poltawski 9a6c6d1cfd Merge branch 'MDL-38765' of git://github.com/timhunt/moodle 2013-08-27 13:51:40 +08:00
Dan Poltawski 80979f76ee Merge branch 'wip-MDL-41181-master' of git://github.com/marinaglancy/moodle 2013-08-27 13:47:39 +08:00
Marina Glancy d55f05ef43 MDL-41181 function moveto_module does not modify properties of object
instead it returns the new value for module visibility
2013-08-27 15:36:40 +10:00
Damyon Wiese f5a791ee7a Merge branch 'wip-MDL-41307-master' of git://github.com/abgreeve/moodle 2013-08-27 13:36:38 +08:00
Marina Glancy 955d91c698 MDL-41181 No need to reset modinfo cache after moveto_module()
it is already reset inside the function
2013-08-27 15:36:21 +10:00
Damyon Wiese a6163e7a5f MDL-31093 Scorm course format: Remove behat tests
The scorm course format has been removed so we don't need to test it anymore.
2013-08-27 13:26:47 +08:00
Damyon Wiese f6c2af867f Merge branch 'master_MDL-40122' of git://github.com/danmarsden/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2013-08-27 13:16:55 +08:00
Damyon Wiese 92058753ac Merge branch 'MDL-40877-master' of git://github.com/FMCorz/moodle 2013-08-27 12:46:23 +08:00
Damyon Wiese 7316f46a23 Merge branch 'MDL-40447_master' of https://github.com/nadavkav/moodle 2013-08-27 12:27:47 +08:00
Damyon Wiese 58e6ac1e9a Merge branch 'MDL-40752_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-27 12:23:16 +08:00
Dan Poltawski e820d50791 Merge branch 'MDL-37211_master' of https://github.com/nadavkav/moodle 2013-08-27 11:54:28 +08:00
Rajesh Taneja ddf05b5e9d MDL-41415 Events: get_string should not use new 2013-08-27 11:36:26 +08:00
Rajesh Taneja 41566267c5 MDL-41415 Events: get_legacy_logdata is protected 2013-08-27 11:36:11 +08:00
Damyon Wiese 2e68b1254f MDL-39871 themes RTL: Get rtlblockmanipulations from any parent 2013-08-27 11:14:53 +08:00
Nadav Kavalerchik 5b2ed8b5ff MDL-39871 Blocks,Themes: Swap block regions in RTL mode (using pre-defined array) 2013-08-27 11:14:52 +08:00
Dan Poltawski 67c6ab1646 Merge branch 'wip-MDL-41222-master' of git://github.com/marinaglancy/moodle 2013-08-27 11:03:35 +08:00
Dan Poltawski d1584b6165 Merge branch 'MDL-41098-master' of git://github.com/damyon/moodle 2013-08-27 10:57:09 +08:00
Dan Poltawski 02ebac0bf1 Merge branch 'wip-MDL-41419-master' of git://github.com/abgreeve/moodle 2013-08-27 10:55:51 +08:00
Damyon Wiese 4fd8adab75 MDL-41098 atto: Fix for dialogue ignoring centered option. 2013-08-27 10:40:31 +08:00
Damyon Wiese 08a95d50bb MDL-41098 atto: Force some styles on the editor
Bootstrap is overriding random styles on the contenteditable div like:
line-height, font-size and color. Silly - force them to be the same as the
textarea we are derived from.
2013-08-27 10:40:24 +08:00
Adrian Greeve 9c3bfea0da MDL-41419 - unit tests: Fixed up sporadic test failures in externallib_test.php.
Also added much needed comments to the unit test.
2013-08-27 10:40:08 +08:00
Frederic Massart 5d9b539ee2 MDL-41428 repository_coursefiles: Missing white space in name 2013-08-27 10:31:27 +08:00
Damyon Wiese 70512ebdfc MDL-40321 theme_bootstrapbase: Combine reset into existing overrides file 2013-08-27 10:17:23 +08:00
Damyon Wiese 37bb910633 Merge branch 'wip-MDL-40321_master' of git://github.com/gjb2048/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-27 10:07:07 +08:00
Damyon Wiese c90641facb MDL-41098 Atto Text editor: Add new text editor to core
This is an alternative to the TinyMCE text editor that is based on HTML5
content editable regions.

It has been designed to "gel" with Moodle and uses YUI for javascript,
Moodle standard dialogs and standard moodle buttons. It has also been designed
to work well on mobile devices and can collapse down to a narrow column if required.

Imported from the plugins database here:
https://moodle.org/plugins/view.php?plugin=editor_contenteditable

Original git repository here:
https://github.com/damyon/contenteditable
2013-08-26 22:16:43 +08:00
Charles Fulton 9930e4267c MDL-41256 course: improved debugging on course creation 2013-08-26 06:59:33 -07:00
Dan Poltawski 51eba172e6 Merge branch 'MDL-41291-master' of git://github.com/mr-russ/moodle 2013-08-26 17:50:08 +08:00
Dan Poltawski a0df83441b Merge branch 'MDL-38505' of git://github.com/jmvedrine/moodle 2013-08-26 17:47:05 +08:00
Damyon Wiese 650b464a16 MDL-41213 filepicker: Version bump for css changes 2013-08-26 16:18:37 +08:00
Damyon Wiese 9e179acfd3 Merge branch '41213-26' of git://github.com/samhemelryk/moodle 2013-08-26 16:00:35 +08:00
Marina Glancy b469e62a77 MDL-41317 Set correct context to send bulk message page 2013-08-26 17:41:43 +10:00
Marina Glancy 0e1bd87cc8 MDL-41369 Set proper context and navigation path for user messages 2013-08-26 17:32:57 +10:00
Rajesh Taneja 54bc6d1955 MDL-41418 Administration: Page context should be set before setting page title 2013-08-26 15:22:12 +08:00
Dan Poltawski aa8fe63937 Merge branch 'MDL-40055-master' of git://github.com/FMCorz/moodle 2013-08-26 15:09:33 +08:00
Frederic Massart 861b0510e5 MDL-39959: Replace Legacy events - Groups
This combines the following changes:

* Event for group member added
* Event for group member removed
* Event for group created
* Event for grouping created
* Event for group updated
* Event for grouping updated
* Event for group deleted
* Event for grouping deleted
* Adding tests for deleting functions
* Bulk remove of members uses low-level API

    The reason for this is that a bulk event has no value from a logging
    perspective as it is not granular. So now, the API is a bit slower,
    but the information the events contain makes sense, beside this is
    not (and should not be) used very often.

    The reason why the events_trigger_legacy() is kept is because we
    cannot create a new event for this, as we don't encourage developers
    to created bulk events, for the reasons mentioned above.

    I removed the call that gets the user record from the function
    groups_remove_member() as it was not required and only appeared
    to check if the user existed. It appears to be safe not to do
    this check as nothing would fail down the line.

* Bulk unassign of groupings uses low-level API

    As the previous commit, we keep the legacy event for now as it would
    be wrong to create a new event to replace it.

    Also, the code has been changed to call the low-level API to unassign
    groups from groupins, even though at the moment there are no
    events for that function.

* Bulk deletion of groups uses low-level API

    Again, we keep the legacy event because replacing it would force
    us to create a new event that does not make sense. See MDL-41312.

* Bulk deleting of groupings uses low-level API
* Asserting legacy event name in unit tests
* Minor SQL query and code improvements
2013-08-26 15:03:17 +08:00
Dan Poltawski 11b80a6044 Merge branch 'MDL-35930' of git://github.com/rwijaya/moodle 2013-08-26 14:55:54 +08:00
Dan Poltawski 8f9e51417e Merge branch '40249-26' of git://github.com/samhemelryk/moodle 2013-08-26 14:33:06 +08:00
Rossiani Wijaya 3f0d3a7ea0 MDL-35930 filepicker filemanaer: make announcement on page change when selecting view files options 2013-08-26 14:30:35 +08:00
Dan Poltawski ba59a28305 Merge branch 'MDL-36126_master' of https://github.com/markn86/moodle 2013-08-26 14:25:20 +08:00
Frederic Massart 725dfe6a54 MDL-40055 mod_assign: Wrong namespace when throwing exception 2013-08-26 14:21:34 +08:00
Frederic Massart 959a328472 MDL-40055 mod_assign: Setting level according to new event constants 2013-08-26 14:17:18 +08:00
Frederic Massart 5e8eb969e0 MDL-40055 mod_assign: get_name() uses get_string() not lang_string 2013-08-26 14:17:18 +08:00
Frederic Massart bd2e982998 MDL-40055 mod_assign: Replace add_to_log 'grade submission' 2013-08-26 14:17:18 +08:00
Frederic Massart 9a289c3da5 MDL-40055 mod_assign: Replace add_to_log 'unlock submission' 2013-08-26 14:17:18 +08:00
Frederic Massart 6332ff7a35 MDL-40055 mod_assign: Replace add_to_log 'submit' 2013-08-26 14:17:18 +08:00
Frederic Massart b1e52860ea MDL-40055 mod_assign: Replace add_to_log 'submission statement accepted' 2013-08-26 14:17:18 +08:00
Frederic Massart 89fbc20263 MDL-40055 mod_assign: Replace add_to_log 'submissioncopied' 2013-08-26 14:17:18 +08:00
Frederic Massart 8bb213eb60 MDL-40055 mod_assign: Replace add_to_log 'set marking workflow state' 2013-08-26 14:17:18 +08:00
Frederic Massart e59a85ba61 MDL-40055 mod_assign: Replace add_to_log 'set marking allocation' 2013-08-26 14:17:17 +08:00
Frederic Massart 159b7f4024 MDL-40055 mod_assign: Replace add_to_log 'revert submission to draft' 2013-08-26 14:17:17 +08:00
Frederic Massart ad10ad1415 MDL-40055 mod_assign: Replace add_to_log 'reveal identities' 2013-08-26 14:17:17 +08:00
Frederic Massart 3d1331be34 MDL-40055 mod_assign: Replace add_to_log 'lock submission' 2013-08-26 14:17:17 +08:00
Frederic Massart 76e77b05eb MDL-40055 mod_assign: Replace add_to_log 'grant extension' 2013-08-26 14:17:17 +08:00
Frederic Massart a65b53036e MDL-40055 mod_assign: Replace add_to_log 'download all submissions' 2013-08-26 14:17:17 +08:00
Damyon Wiese 5db088a3cb Merge branch 'w35_MDL-41245_m26_pluginuninstall' of https://github.com/skodak/moodle 2013-08-26 13:59:51 +08:00
Petr Škoda a3cbc19830 MDL-41245 prevent notices during plugin uninstall 2013-08-26 07:53:55 +02:00
Damyon Wiese 1b9db0af41 Merge branch 'mdl26_MDL-29004_wiki-fix-images-in-printer-friendly-view' of https://github.com/brki/moodle 2013-08-26 13:50:20 +08:00
Marina Glancy 46ecaa5827 MDL-41127 Remove the quick category move dropdowns if page is too big 2013-08-26 15:40:24 +10:00
Petr Škoda 835f58eb7e MDL-41245 fix new addon redirect regression 2013-08-26 07:31:40 +02:00
Dan Poltawski 8ba9df5862 Merge branch 'MDL-41249-master' of git://github.com/damyon/moodle 2013-08-26 13:11:04 +08:00
Damyon Wiese 97c91725d1 Merge branch 'MDL-41380-master' of https://github.com/mr-russ/moodle 2013-08-26 12:42:15 +08:00
Dan Poltawski 6c416558da Merge branch 'w35_MDL-41022_m26_unittests3' of https://github.com/skodak/moodle 2013-08-26 12:23:16 +08:00
Sam Hemelryk c3d2fbf9cd MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-26 13:59:19 +12:00
Damyon Wiese 2d55bee191 Merge branch 'wip-MDL-41106-m26' of git://github.com/samhemelryk/moodle 2013-08-26 09:43:06 +08:00
Damyon Wiese 3cb75dd1fb MDL-36803 tinymce: Version bump for js changes 2013-08-26 09:29:06 +08:00
Damyon Wiese 8920b2e288 Merge branch 'MDL-36803-m' of https://github.com/andrewnicols/moodle 2013-08-26 09:27:57 +08:00
Dan Marsden c7e6fb6c8d MDL-35380 SCORM: improve check for imsmanifest file and consolidate into a single function. 2013-08-26 13:06:59 +12:00
Nadav Kavalerchik e89dfdbce6 MDL-39871 Blocks,Themes: Swap block regions in RTL mode (using pre-defined array) 2013-08-26 01:06:55 +03:00
Sam Hemelryk 85008bedd5 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:15:57 +12:00
Sam Hemelryk 4d5c7cb0d8 MDL-41081 navigation: added unit tests for navbar::prepend 2013-08-26 08:52:35 +12:00
Sam Hemelryk c16b882bcd MDL-41081 navigation: added means to prepend to the navbar. 2013-08-26 08:52:35 +12:00
Sam Hemelryk 141d7a3f0c MDL-41213 bootstrap: fixed sizing of filepicker selected file licence selector 2013-08-26 08:40:26 +12:00
Sam Hemelryk 22c943b33b MDL-41213 filepicker: corrected outline of selected file dialogue 2013-08-26 08:40:11 +12:00
Sam Hemelryk 4c51269061 MDL-40249 bootstrap: activity chooser now enabled for bootstrap based themes 2013-08-26 08:33:26 +12:00
Mary Evans f021743ecb MDL-41175 themes: Add/remove group members page broken on small screens. 2013-08-25 16:56:37 +01:00
Damyon Wiese 64450444c4 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:16:34 +08:00
Damyon Wiese b5711fe527 MDL-41249 assign: Restore step missing gradingform mapping
Thanks to Matthieu Raggett for the report and the solution.
2013-08-25 21:20:53 +08:00
Matteo Scaramuccia a94bc886bb 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:00:47 +02:00
Nadav Kavalerchik 772b01f4a7 MDL-39682 Forms, File Picker, Themes: Fix alignment of Form's Labels and Input elements in RTL mode (theme/clean) 2013-08-25 01:18:42 +03:00
Gareth J Barnard 44877c48d0 MDL-40321 theme_bootstrapbase: Remove URL's from printed pages. 2013-08-24 22:50:13 +01:00
Petr Škoda 686d4ec921 MDL-41022 cleanup core_grade_scale_testcase 2013-08-24 16:21:09 +02:00
Petr Škoda c952e0911d MDL-41022 cleanup core_grade_item_testcase 2013-08-24 16:21:01 +02:00
Petr Škoda 78953f03fd MDL-41022 cleanup core_grade_grade_testcase 2013-08-24 16:20:53 +02:00
Petr Škoda 59c50aff20 MDL-41022 cleanup core_grade_category_testcase 2013-08-24 16:19:25 +02:00
Petr Škoda 401c82d7a7 MDL-41022 cleanup core_test_generator_testcase 2013-08-24 16:18:19 +02:00
Petr Škoda f52f2c9597 MDL-41022 cleanup core_phpunit_basic_testcase 2013-08-24 16:18:19 +02:00
Petr Škoda 3405d82c91 MDL-41022 cleanup core_phpunit_advanced_testcase 2013-08-24 16:18:19 +02:00
Petr Škoda 1eb135568a MDL-41022 cleanup form tests 2013-08-24 16:18:18 +02:00
Petr Škoda 5f15f7c9aa MDL-41022 cleanup core_files_zip_packer_testcase 2013-08-24 16:18:18 +02:00
Petr Škoda 4c34571b76 MDL-41022 cleanup core_files_file_storage_testcase 2013-08-24 16:18:18 +02:00
Petr Škoda 5d071be68e MDL-41022 cleanup core_external_testcase 2013-08-24 16:18:18 +02:00
Petr Škoda 9d6d32b6f0 MDL-41022 cleanup core_dml_testcase 2013-08-24 16:18:02 +02:00
Petr Škoda d5ded4e72d MDL-41022 cleanup core_ddl_testcase 2013-08-24 16:14:25 +02:00
Petr Škoda 82b1cf00b0 MDL-41245 fix multiple install, upgrade and uninstallation issues
Includes rework of cache parameter detection on admin/index.php.

Another problem is that uninstall does not leave system in consistent state,
we need to force users to go through upgrade after any type of uninstall.

This fixes also add-on installation redirect and other issues.
2013-08-24 16:08:11 +02:00
AMOS bot a28bdb1938 Merge branch 'master' into install_master 2013-08-24 00:58:58 +00:00
Dan Poltawski 007cbfe03e MDL-41401 backup: fix misnamed test method 2013-08-23 15:09:12 +08:00
Jean-Michel Vedrine efbe07b03c MDL-38505 Permit lesson to import images in question text 2013-08-23 07:54:57 +02:00
Mark Nelson 6d8627cb6b MDL-36126 backup: changed the message column in the table backup_logs to a text field to prevent DB errors 2013-08-23 11:40:36 +08:00
Dan Poltawski 179d0baa05 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:32:15 +08:00
Damyon Wiese d2aa53be1b weekly release 2.6dev 2013-08-23 10:31:56 +08:00
Mark Nelson 1e0cb59ab5 MDL-41387 tags: changed character case in string used when deleting a course 2013-08-22 17:41:52 +08:00
Dan Poltawski c232da0432 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:16 +08:00
Damyon Wiese aff220edd9 MDL-36002 dragdrop: Implement keyboard dragdrop for blocks
This is for the NEW block drag and drop code - not the other one :)
All it does it add proper drag handles.
2013-08-22 16:37:49 +08:00
Damyon Wiese aee8151f7d Revert "MDL-35380 SCORM: improve check for imsmanifest file and consolidate into a single function."
This reverts commit 492407e9f7.
2013-08-22 14:11:18 +08:00
Damyon Wiese 9ead041cdb Revert "MDL-40931 useragent: separated user agent functionality into a lib"
This reverts commit af62237d0e.
This reverts commit 87a4194fdc.
This reverts commit b2c66eb60c.

Conflicts:

	version.php
2013-08-22 13:31:25 +08:00
Damyon Wiese 50cb89177e Merge branch 'wip-MDL-41196-m26' of git://github.com/samhemelryk/moodle 2013-08-22 11:19:55 +08:00
Dan Poltawski 52ef7502d6 Merge branch 'MDL-30839-master' of git://github.com/phalacee/moodle 2013-08-22 11:17:49 +08:00
Jason Fowler 72d08bd153 MDL-30839 Accessibility - Focusing on error on submit 2013-08-22 10:54:19 +08:00
Sam Hemelryk ba214fa54c MDL-41196 phpmailer: fixed unit test detection 2013-08-22 14:46:26 +12:00
Russell Smith cdd8382b63 MDL-41380 backup: Fix incorrect function name from MDL-40618. 2013-08-22 12:41:51 +10:00
Dan Poltawski c44ff50cbc Merge branch 'debugdeveloperbitwisemess' of git://github.com/skodak/moodle 2013-08-22 10:40:47 +08:00
Dan Poltawski d7d2f263dd Merge branch 'MDL-41125-master' of git://github.com/FMCorz/moodle 2013-08-22 10:32:54 +08:00
Dan Poltawski 695969987a Merge branch 'MDL-30839-master' of git://github.com/phalacee/moodle 2013-08-22 10:14:21 +08:00
Dan Poltawski 915a6b4117 Merge branch 'MDL-39980' of git://github.com/timhunt/moodle 2013-08-22 10:04:55 +08:00
Frederic Massart 7fb35af658 MDL-41125 forum: Missing include of repository lib 2013-08-22 09:50:05 +08:00
Jason Fowler 5df7412899 MDL-30839 Fixing extra line breaks in error msg 2013-08-22 09:04:30 +08:00
Petr Škoda 037d673ea9 MDL-39474 add set_debugging() tests 2013-08-21 15:41:35 +02:00
Petr Škoda ce7b06bcd7 MDL-39474 fix incorrect bitwise ops when setting $CFG->debugdeveloper 2013-08-21 13:38:33 +02:00
Tim Hunt 7a55fd3888 MDL-41366 qbehaviour_informationitem fix name capitalisation. 2013-08-21 12:28:20 +01:00
Tim Hunt f9c1c2e5b8 MDL-41364 fix apostrophe in debug message. 2013-08-21 12:21:31 +01:00
Tim Hunt d629327a14 MDL-39980 essay attempt-on-last. Handle the no-files case.
This slighly changes the format for the way answers are stroed in the DB
in the case where there is some HTML content, but no files. This should
not cause any problems.
2013-08-21 11:56:17 +01:00
Tim Hunt ad8f011755 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:25 +01:00
Dan Marsden 3d1808c6e2 MDL-40122 SCORM: replace SCORM course format with singleactivity 2013-08-21 20:26:06 +12:00
Damyon Wiese 52ec2a60f6 Merge branch 'MDL-41191-duplicaterecords' of git://github.com/danpoltawski/moodle 2013-08-21 15:43:23 +08:00
Dan Poltawski 046514b7a2 Merge branch 'MDL-30839-master' of git://github.com/phalacee/moodle 2013-08-21 15:17:44 +08:00
Jason Fowler f8a4f2c10e MDL-30839 Fixing extra line breaks in error msg 2013-08-21 14:58:50 +08:00
Dan Poltawski a9e6a73173 MDL-41191 mod_forum: avoid DISTINCT on TEXT columns
It is not supported by all db engines
2013-08-21 14:38:22 +08:00
Dan Poltawski 72c2c0bb09 MDL-41191 add more test data to trigger duplicate course records 2013-08-21 14:17:12 +08:00
Frederic Massart e5f9659b79 MDL-40877 repository_url: Use core_text functions instead of mb_strlen() 2013-08-21 14:13:46 +08:00
Damyon Wiese 36719d4ade MDL-41057 csslib: Adding a version bump to clear css caches 2013-08-21 14:05:43 +08:00
Damyon Wiese 1f1bee6fbf Merge branch 'wip-MDL-41057-m26' of git://github.com/samhemelryk/moodle 2013-08-21 14:05:13 +08:00
Damyon Wiese 74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c.
2013-08-21 13:42:30 +08:00
Dan Poltawski a101c7f011 Merge branch 'MDL-41143-master' of git://github.com/FMCorz/moodle 2013-08-21 13:40:23 +08:00
Dan Poltawski 2af95c4b51 Merge branch 'MDL-41040-master' of git://github.com/FMCorz/moodle 2013-08-21 13:36:02 +08:00
Frederic Massart 30905b5bcb MDL-41143 course: Missing formslib required for constant use 2013-08-21 13:31:59 +08:00
Damyon Wiese 90a5a4b620 Merge branch 'master_MDL-35380' of git://github.com/danmarsden/moodle 2013-08-21 11:38:37 +08:00
Dan Poltawski d99a300563 Merge branch 'wip-MDL-36690-master' of git://github.com/marinaglancy/moodle 2013-08-21 11:35:27 +08:00
Sam Hemelryk 487caf6b65 Revert "MDL-39876 update_course_record function to update global COURSE"
This reverts commit c290ac5510.

Conflicts:
	course/lib.php
2013-08-21 15:21:06 +12:00
Dan Poltawski c3f5f4ab37 Merge branch 'wip-MDL-32191-m26' of git://github.com/samhemelryk/moodle 2013-08-21 10:44:04 +08:00
Marina Glancy 4fcdb0123c 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 12:30:38 +10:00
Frederic Massart 38d6fbfa87 MDL-41040 event: Level property uses defined event constants 2013-08-21 10:04:02 +08:00
Sam Hemelryk c1613ed53a Merge branch 'wip-MDL-40830-master' of git://github.com/marinaglancy/moodle 2013-08-21 13:17:37 +12:00
AMOS bot 4e74d1f1c9 Automatically generated installer lang files 2013-08-21 00:43:38 +00:00
Marina Glancy ac6fb0ad17 Merge branch 'MDL-32324' of git://github.com/timhunt/moodle 2013-08-21 10:28:47 +10:00
Sam Hemelryk 2968602ccb Merge branch 'MDL-41162' of git://github.com/timhunt/moodle 2013-08-21 12:13:34 +12:00
Sam Hemelryk 6eee89bc8f Merge branch 'MDL-39876-master' of git://github.com/sammarshallou/moodle
Conflicts:
	course/lib.php
2013-08-21 12:08:46 +12:00
Marina Glancy e542bc26d9 Merge branch 'wip-mdl-40042' of git://github.com/rajeshtaneja/moodle 2013-08-21 10:02:41 +10:00
Sam Hemelryk 87a4194fdc MDL-40931 useragent: converted useragent calls in ajaxenabled 2013-08-21 09:48:31 +10:00
Mary Evans cef25b2ac2 MDL-41321 theme_boostrapbase: Add styling to groupinfobox in less/moodle/user.less. 2013-08-21 00:08:20 +01:00
Sam Hemelryk f79f3c00f8 Revert "MDL-41258 Forum: Add additional unit tests for forum digest settings"
This reverts commit 0ef6f6860d.
2013-08-21 11:03:35 +12:00
Sam Hemelryk 1ef7722cba Merge branch 'master_MDL-41144' of git://github.com/danmarsden/moodle 2013-08-21 11:01:51 +12:00
Andrew Nicols be94c6d88d MDL-36803 TinyMCE: Fix TinyMCE following touch events on iOS browsers 2013-08-20 23:58:59 +01:00
Sam Hemelryk b89fbc4615 Merge branch 'MDL-41159-master' of git://github.com/damyon/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-21 10:56:00 +12:00
Sam Hemelryk ead9cce340 Merge branch 'MDL-41157-master' of git://github.com/danpoltawski/moodle 2013-08-21 10:48:02 +12:00
Sam Hemelryk cc76e82d58 Merge branch 'MDL-41210-master' of git://github.com/FMCorz/moodle 2013-08-21 10:21:04 +12:00
Sam Hemelryk 0eb65affd2 Merge branch 'MDL-41209-master' of git://github.com/FMCorz/moodle 2013-08-21 10:09:08 +12:00
Sam Hemelryk c5bba2fc2d Merge branch 'MDL-41258-m' of git://github.com/andrewnicols/moodle 2013-08-21 09:59:19 +12:00
Sam Hemelryk 93564564e4 Merge branch 'MDL-41196-m' of git://github.com/andrewnicols/moodle 2013-08-21 09:56:16 +12:00
Dan Poltawski c161e4687c Merge branch 'MDL-41143-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-08-20 18:21:17 +08:00
Dan Poltawski 144f35d9a2 Merge branch 'MDL-41136-master' of git://github.com/FMCorz/moodle 2013-08-20 17:51:18 +08:00
Frederic Massart 2ecd284779 MDL-41143 mod_forum: Prevent unnessary loading of formslib 2013-08-20 17:50:07 +08:00
Dan Poltawski 43964b852a Merge branch 'MDL-41125-master' of git://github.com/FMCorz/moodle 2013-08-20 17:10:05 +08:00
Dan Poltawski d5f8b7edc4 Merge branch 'w33_MDL-41094_m26_purgecleanup' of https://github.com/skodak/moodle 2013-08-20 17:03:47 +08:00
Damyon Wiese b2c66eb60c MDL-40931 useragentlib: Removed unused class variable + version fix 2013-08-20 16:48:18 +08:00
Damyon Wiese 89959d9ad1 Merge branch 'wip-MDL-40931-m26' of git://github.com/samhemelryk/moodle 2013-08-20 16:45:33 +08:00
Dan Poltawski 6bbcf832c4 Merge branch 'MDL-41211-master' of git://github.com/FMCorz/moodle 2013-08-20 16:44:09 +08:00
Dan Poltawski beccd9d4ff Merge branch 'MDL-39770_chat' of https://github.com/andyjdavis/moodle 2013-08-20 16:34:18 +08:00
Damyon Wiese e2f36a71a8 Merge branch 'MDL-41191-master' of git://github.com/danpoltawski/moodle 2013-08-20 16:13:55 +08:00
Damyon Wiese 93e2c2a567 Merge branch 'MDL-40709-master' of git://github.com/danpoltawski/moodle 2013-08-20 16:10:49 +08:00
Dan Poltawski 51bfad5c91 Merge branch 'w33_MDL-40952_m26_opcacheunit' of https://github.com/skodak/moodle 2013-08-20 16:07:12 +08:00
Rossiani Wijaya 8f0767f10c MDL-40732 choice: improve heading levels and styling 2013-08-20 16:05:01 +08:00
Damyon Wiese a446d62d97 Merge branch 'MDL-41071-master' of git://github.com/FMCorz/moodle 2013-08-20 16:01:12 +08:00
Mark Nelson 9e2d9135f6 MDL-39957 course: added missing assertions for events
This occurred when an add_to_log call, with no associated legacy event,
was replaced with a new event. We should still call assertEventLegacyData
even though there is no legacy event data to compare with, simply ensure
that the expected data was passed.
2013-08-20 15:59:11 +08:00
Damyon Wiese 3d262be88d MDL-40038 files: Removed commented code from unit test 2013-08-20 15:52:11 +08:00
Damyon Wiese 57cef30e42 Merge branch 'wip-MDL-40038-master' of git://github.com/abgreeve/moodle
Conflicts:
	files/tests/externallib_test.php
2013-08-20 15:51:57 +08:00
Adrian Greeve 506c8d59ee MDL-41307 - tags: Update of the user object for fullname function. 2013-08-20 15:39:40 +08:00
Damyon Wiese 531110c890 Merge branch 'w33_MDL-41112_m26_cachedist' of https://github.com/skodak/moodle 2013-08-20 15:22:34 +08:00
Dan Poltawski 7d7e0292cb Merge branch 'wip-MDL-40974-m26' of git://github.com/samhemelryk/moodle 2013-08-20 15:13:02 +08:00
Dan Poltawski faa2e68bb5 MDL-38197 tool_generator: fix use of raw LIKE sql 2013-08-20 14:55:14 +08:00
Dan Poltawski 1dae651584 Merge branch 'MDL-38197-master' of git://github.com/sammarshallou/moodle 2013-08-20 14:55:07 +08:00
Damyon Wiese 6f81158a7e Merge branch 'MDL-40162_master' of https://github.com/totara/openbadges 2013-08-20 14:45:34 +08:00
Damyon Wiese 5a10d2a7ae Merge branch 'wip-mdl-40043' of git://github.com/rajeshtaneja/moodle
Conflicts:
	course/tests/courselib_test.php
	lang/en/moodle.php
2013-08-20 14:40:42 +08:00
Jenny Gray 740c4ada36 MDL-39800 tags: moved cloud sorting to print function 2013-08-20 14:26:21 +08:00
Jenny Gray 5ea6ac9802 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-08-20 14:26:20 +08:00
Jenny Gray df428badaf MDL-39800 tags: resolved weighting in block content 2013-08-20 14:26:20 +08:00
Dan Poltawski d5b076a2ca Merge branch 'wip-MDL-37674-m26' of git://github.com/samhemelryk/moodle 2013-08-20 14:21:38 +08:00
Rajesh Taneja 71298fea03 MDL-40043 Events API: Added user_loggedinas event to replace add_to_log 2013-08-20 14:07:35 +08:00
Rajesh Taneja ed29bf0f66 MDL-40043 Events API: Added course_section_updated event to replace add_to_log 2013-08-20 14:07:35 +08:00
Damyon Wiese eedb6aae3f Merge branch 'MDL-27595-2' of https://github.com/bostelm/moodle 2013-08-20 13:31:16 +08:00
Damyon Wiese 43cc62ed13 Merge branch 'MDL-41036' of git://github.com/timhunt/moodle 2013-08-20 12:55:31 +08:00
Dan Poltawski 91a888df34 Merge branch 'MDL-39957_master' of https://github.com/markn86/moodle 2013-08-20 12:38:08 +08:00
Damyon Wiese 5a2356be38 Merge branch 'MDL-41122_master' of git://github.com/kastashov/moodle 2013-08-20 12:28:00 +08:00
Damyon Wiese b277230aad Merge branch 'MDL-39956-master' of git://github.com/FMCorz/moodle 2013-08-20 12:21:04 +08:00
Dan Poltawski bfa4c3f358 Merge branch 'MDL-36002-master' of git://github.com/damyon/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-20 12:17:16 +08:00
Dan Poltawski 6f44a73369 Merge branch 'w33_MDL-39474_m26_debugdeveloper' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-08-20 11:42:03 +08:00
Dan Poltawski 8ab325fb00 Merge branch 'MDL-38203' of git://github.com/timhunt/moodle 2013-08-20 11:28:39 +08:00
Adrian Greeve db22e31b1e MDL-41231 - mod_data: Export to portfolio and delete selected now work together. 2013-08-20 11:28:09 +08:00
Dan Poltawski 57cb5f5afa Merge branch 'WIP-MDL-36044-master' of git://github.com/nadavkav/moodle 2013-08-20 11:07:53 +08:00
Dan Poltawski 54a868d3be Merge branch 'MDL-39236-master' of git://github.com/nadavkav/moodle 2013-08-20 10:59:31 +08:00
Dan Poltawski 9d66c2bb5b Merge branch 'MDL-39980' of git://github.com/timhunt/moodle 2013-08-20 10:47:45 +08:00
Tim Lock 6b718780c6 MDL-41304: Hide and handle LDAP error when user not in context being checked 2013-08-20 10:34:16 +09:30
AMOS bot 943db9d438 Automatically generated installer lang files 2013-08-20 00:42:25 +00:00
Marina Glancy 5a3204d05b MDL-41222 Remove unnecessary course cache rebuild 2013-08-20 10:27:15 +10:00
Russell Smith 90048725b0 MDL-41291 cache: Use fread to avoid race conditions 2013-08-19 20:18:57 +10:00
Dan Poltawski 599d7d9bdf Merge branch 'MDL-30839-master' of git://github.com/phalacee/moodle 2013-08-19 17:40:37 +08:00
Damyon Wiese ea8c248c96 MDL-36002 keyboard drag drop: Hidden activities and labels
Get the correct title for hidden activities and labels.
2013-08-19 16:18:23 +08:00
Damyon Wiese e5cb7f8b7b Merge branch 'master_MDL-39572' of https://github.com/totara/moodle 2013-08-19 15:42:17 +08:00
Damyon Wiese 26ae471585 Merge branch 'MDL-40896' of git://github.com/timhunt/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-19 15:38:23 +08:00
Damyon Wiese 5ebe37fb27 Revert "MDL-41106 cache: several fixes for the session cache."
This reverts commit 89182546a0.
This reverts commit 170b05362a.
This reverts commit 2e9d5a534e.
2013-08-19 15:32:08 +08:00
Dan Poltawski c3b087ccc3 Merge branch 'MDL-40893-master' of https://github.com/mr-russ/moodle 2013-08-19 14:50:01 +08:00
Damyon Wiese 3415e1ca59 Merge branch 'wip-MDL-41106-m26' of git://github.com/samhemelryk/moodle 2013-08-19 13:50:46 +08:00
Damyon Wiese d51f9d5fd0 Merge branch 'wip-MDL-36789-master' of git://github.com/marinaglancy/moodle 2013-08-19 13:29:55 +08:00
Dan Poltawski bee137b65a Merge branch 'MDL-39703_master' of https://github.com/nadavkav/moodle 2013-08-19 13:08:10 +08:00
Dan Poltawski a945d48127 Merge branch 'master_MDL-37393' of github.com:danmarsden/moodle 2013-08-19 12:57:34 +08:00
Andrew Davis e9c599cb84 MDL-39770 mod_chat: improved the chat experience on small screens 2013-08-19 09:08:40 +07:00
Jason Fowler 0c99005a9a MDL-30839 Accessibility, Forms - Improve accessibility or error messages 2013-08-19 09:54:41 +08:00
AMOS bot 0738c90cec Automatically generated installer lang files 2013-08-19 00:42:35 +00:00
Sam Hemelryk 89182546a0 MDL-41106 cache: tidied up several elements 2013-08-19 11:32:08 +12:00
Marina Glancy 170b05362a 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
2013-08-19 09:28:36 +12:00
Nadav Kavalerchik 48e5db7428 MDL-40752 - Login panel should be placed on the right side, in RTL mode (theme/clean, bootstrap) 2013-08-18 22:04:02 +03:00
Nadav Kavalerchik 373c610ed1 MDL-39703 Roles, Themes: Fix "Add role" dialog width and position, in RTL mode (theme/clean) 2013-08-18 21:51:51 +03:00
Nadav Kavalerchik 42fabe1e87 MDL-36044 - Delete Icon ("X") blocks Score numbers, when in RTL mode (mod/assign , Rubrics editor) 2013-08-18 17:40:00 +03:00
Andrew Nicols 0ef6f6860d MDL-41258 Forum: Add additional unit tests for forum digest settings 2013-08-18 00:03:06 +01:00
Nadav Kavalerchik 445d4cc065 MDL-40447 Administration: Fix translation: "Profile" should be "Profile Fields" on advanced (more...) user filter form 2013-08-17 23:30:39 +03:00
sam marshall f06abc2ac1 MDL-38190 (3) Backup/restore: Progress display in main user interface 2013-08-16 16:28:04 +01:00
sam marshall bc4054f9dd MDL-38197 Script to generate standard-size large course for testing 2013-08-16 12:09:55 +01:00
sam marshall 2531ae2922 MDL-38190 (2) Backup/restore: Progress tracking for tasks and steps 2013-08-16 10:50:36 +01:00
sam marshall 16cd708835 MDL-38190 (1) Backup/restore: Progress tracking API 2013-08-16 10:50:35 +01:00
Nadav Kavalerchik 1a46c81c87 MDL-37211 Backup: Migrate hard-coded strings to language string for the table header labels on the restore page 2013-08-16 12:24:10 +03:00
Nadav Kavalerchik 6700806403 MDL-39236 - Right align table cells during install process, when in RTL mode (theme/standard, actually theme/base) 2013-08-16 11:53:14 +03:00
Frederic Massart aa87fe80b3 MDL-40877 core_text: Added UTF-8 safe strrchr method 2013-08-16 10:58:22 +08:00
Rajesh Taneja 135dde74ed MDL-40042 Completion: added course_completion_updated event to remove related add_to_log 2013-08-16 09:34:23 +08:00
AMOS bot 8c909f7441 Automatically generated installer lang files 2013-08-16 00:42:54 +00:00
Russell Smith 536e9be605 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:13 +10:00
Sam Hemelryk 2e9d5a534e 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:27:55 +12:00
Simon Coggins be8c6d7bc8 MDL-39572: Fix sql_order_by_text() to use length argument correctly 2013-08-16 11:26:54 +12:00
Simon Coggins be4bf53d6d MDL-39572: Fix existing tests and add more to demonstrate issue with sql_order_by_text() 2013-08-16 11:26:54 +12:00
Yuliya Bozhko b143259ee0 MDL-40162 badges: Image url breaks when slashargumets is not supported 2013-08-16 11:12:12 +12:00
Dan Marsden 492407e9f7 MDL-35380 SCORM: improve check for imsmanifest file and consolidate into a single function. 2013-08-16 09:34:06 +12:00
Dan Marsden a4aaeeaa81 MDL-41144 enrol_flatfile: ignore deleted users. 2013-08-16 09:32:22 +12:00
Matteo Scaramuccia 9d507f1d70 MDL-37393 SCORM: Fixed PHP Strict Standards errors with AICC packages 2013-08-16 09:28:41 +12:00
Dan Marsden d4978e044e MDL-37393 SCORM: Fix existing AICC scoes to use correct parent/child relationships
also fix bad version used by patch in MDL-39239
2013-08-16 09:28:40 +12:00
Jonathon Fowler 072c52bbc0 MDL-32191 navigation: Add keys to module and block settings nav nodes
Conflicts:
	lib/navigationlib.php
2013-08-16 09:18:42 +12:00
Amy Groshek dc3337b273 MDL-37674 - modify html_attributes() to add .no-header class when header will not be rendered 2013-08-16 09:17:44 +12:00
Sam Hemelryk af62237d0e MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-16 09:02:01 +12:00
Sam Hemelryk 25c605a526 MDL-40974 course: fixed group mode icon now has tooltip 2013-08-16 08:59:01 +12:00
Sam Hemelryk 2a1ebf25de MDL-41057 csslib: CSS optimiser improvements.
This commit makes the following changes:
* Tidies up coding style.
* Tidies up phpdocs.
* Improve CSS optimiser unit tests to cover browser hacks.
* Improve backgound style consolidation.
* Improve border style consolidation.
* Fixed optimiser to handle browser hacks like *zoom.
* Improved @ rule unit tests.
* Fixed @rule breakages caused by OS specific rules.
* Added more unit tests to cover a bit more CSS3.

I am pretty sure this patch will now enable to optimsier to
work on bootstrap based themes should developers not wish
to compress thier compiled less CSS.
2013-08-16 08:57:20 +12:00
Tim Hunt 9e6eb082ff 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:15:38 +01:00
Andrew Nicols 1aba6b2b4d MDL-41196 Unit Tests: Add a phpmailer message sink 2013-08-15 13:58:51 +01:00
Tim Hunt afb1b3d03b MDL-39980 question engine: Attempt on last loses response files
When doing Each attempt builds on last, we need to copy any response
files into a draft file area, and then re-save them.

While writing the unit test for this, I had to deal with a todo in the
question engine so that questions with files in the response could be
unit-tested.

I also found an fixed a bug with qtype_essay_question::is_same_response
and fixed some notices in the existing essay/manual graded unit tests.
2013-08-15 12:55:13 +01:00
Marina Glancy 676fa06af3 MDL-36789 Quick course cache integrity check for deleted modules 2013-08-15 21:48:24 +10:00
Marina Glancy 0e4954ecff MDL-40830 Clear course cache in mod_assign generator 2013-08-15 21:44:05 +10:00
Tim Hunt c9c21e1679 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:38:31 +01:00
Tim Hunt 89b04bef50 MDL-41093 qtype match: unique index upgrade problem.
Eliminate duplicate rows before we try to add a unique index. We
arbitrarily keep the duplicate row with the lowest id.
2013-08-15 12:20:07 +01:00
Tim Hunt fa5c608c62 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 12:19:47 +01:00
Tim Hunt 2f7827b241 MDL-40896 Add missing question edit CSS to bootstrapbase. 2013-08-15 12:18:00 +01:00
Tim Hunt aed2918c14 MDL-32324 qtypes and qbehaviours should use uninstall_plugin. 2013-08-15 11:58:41 +01:00
sam marshall c290ac5510 MDL-39876 update_course_record function to update global COURSE 2013-08-15 11:31:21 +01:00
sam marshall ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Henning Bostelmann 55e4100617 MDL-27595 backup: allow course import with warnings
Proceed with import if warnings are found, but display the warnings afterwards
2013-08-15 11:18:40 +01:00
Mark Nelson cd14c5cab8 MDL-39957 course: replaced add_to_log for hiding/showing courses 2013-08-15 18:14:08 +08:00
Mark Nelson e5959771b2 MDL-39957 course: added PHPUnit assertions for when a course_updated event is triggered by moving a course 2013-08-15 18:14:08 +08:00
Mark Nelson ed54cb4110 MDL-39957 course: replaced add_to_log for moving courses 2013-08-15 18:14:08 +08:00
Mark Nelson 2bf2f3599e MDL-39957 course: altered the handling of legacy log data for the course_updated event 2013-08-15 18:14:08 +08:00
Mark Nelson 02cbb621d6 MDL-39957 course: added PHPUnit test for the new course_restored event 2013-08-15 18:14:08 +08:00
Mark Nelson a4003c733a MDL-39957 course: replaced the course_restored legacy event 2013-08-15 18:14:08 +08:00
Mark Nelson 7240cd92f9 MDL-39957 course: added PHPUnit test for the new course_category_deleted event 2013-08-15 18:14:08 +08:00
Mark Nelson f326c5b4f4 MDL-39957 course: replaced the course_category_deleted legacy event 2013-08-15 18:14:08 +08:00
Mark Nelson ec8f23de3b MDL-39957 course: added PHPUnit test for the new course_content_deleted event 2013-08-15 18:14:08 +08:00
Mark Nelson db53f7fe28 MDL-39957 course: replaced the course_content_deleted legacy event 2013-08-15 18:14:08 +08:00
Mark Nelson bc3c5b222a MDL-39957 course: added PHPUnit test for the new course_deleted event 2013-08-15 18:14:07 +08:00
Mark Nelson c347241ac8 MDL-39957 course: replaced the course_deleted legacy event 2013-08-15 18:14:07 +08:00
Mark Nelson 4fd391d515 MDL-39957 course: added PHPUnit test for the new course_updated event 2013-08-15 18:14:07 +08:00
Mark Nelson 53a8e678bf MDL-39957 course: replaced the course_updated legacy event 2013-08-15 18:14:07 +08:00
Mark Nelson 35ad79e20d MDL-39957 course: added PHPUnit test for the new course_created event 2013-08-15 18:14:07 +08:00
Mark Nelson 3c2fab942b MDL-39957 course: replaced the course_created legacy event 2013-08-15 18:14:07 +08:00
Dan Poltawski 838d78a9ff weekly release 2.6dev 2013-08-15 16:38:05 +08:00
Dan Poltawski 7031373ba8 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-08-15 16:37:59 +08:00
Dan Poltawski 5d5c1bb801 fix permissions 2013-08-15 16:37:27 +08:00
Damyon Wiese bbb483b259 MDL-36002 Drag and Drop: Improvements to keyboard drag and drop
List of fixes:
* Add a simulated drag start event to fix problems with block drag and drop that
  were expecting it.
* Add an access-hidden title for the General section in a course format. This
  is used to provide the text for the drop region (better than the first activity in the section)
* Changed the text in the list to 'Move to "General"' instead of 'Move after General'. This
  makes more sense for activities when you have a list of activities and sections together.
2013-08-15 16:15:32 +08:00
Adrian Greeve 196c8b71f1 MDL-40038 - web services: Added unit tests for core_files_external::get_files(). 2013-08-15 15:28:38 +08:00
Adrian Greeve dbb8cd36bd MDL-40038 - web services: Added an alternative to using the context id.
Context id is more of an internal Moodle identifier, so we have now included
contextlevel and instanceid in the funciton core_files_external::get_files().
2013-08-15 15:28:38 +08:00
Damyon Wiese dd66b6ab48 MDL-36002 core: Make drag and drop keyboard friendly (round 2) 2013-08-15 14:39:00 +08:00
Andrew Nicols 0462b6a1a5 MDL-4908 Forum: Basic maildigest setting tests 2013-08-15 17:20:49 +12:00
Frederic Massart d90b2eb949 MDL-41210 tool_uploadcourse: Fixed restore from same backup file 2013-08-15 12:17:54 +08:00
Dan Poltawski a55ad8f86c MDL-41191 enrol: fix use of deprecated function 2013-08-15 11:50:08 +08:00
Dan Poltawski 631d9f661f MDL-41191 enrol: unit tests for enrol_get_shared_courses 2013-08-15 11:50:08 +08:00
Dan Poltawski cc8c7eaebd MDL-41191 forum: convert use of deprecated function 2013-08-15 11:50:08 +08:00
Dan Poltawski de31668790 MDL-41191 forum: unit tests for forum_get_courses_user_posted_in 2013-08-15 11:50:08 +08:00
Andrew Nicols 84869cb679 MDL-4908 Forum: Correctly check for appropriate login on maildigest changes 2013-08-15 15:24:15 +12:00
Sam Hemelryk d333a3f2da Merge branch 'MDL-41200' of https://github.com/rwijaya/moodle 2013-08-15 15:16:19 +12:00
Damyon Wiese fd782261de MDL-39851 javascript: Fixes for filepicker dialogs
Fixes display issues with the filepicker dialogs that were
converted to M.core.dialogue.

Note: These dialogue use table based layouts and the table width is not
counted in the form that it sits in. I have changed the dialogues to have
a wider width but for really small screens this causes horizontal scrolling.

The only solution for that is to rewrite all the filepicker/filemanager dialogs
to use css for layout.
2013-08-15 10:52:24 +08:00
Frederic Massart 8a4b2b944d MDL-41211 tool_uploadcourse: Passing restore file path to processor 2013-08-15 10:42:13 +08:00
Rossiani Wijaya d8817b4a7f MDL-41200 Filepicker: Reduce the string length to fit the dialog size nicely. 2013-08-15 10:38:58 +08:00
Rossiani Wijaya 0a5c86ddef MDL-41200 filepicker: change header string to select.
Add length limitation for header, so it fits nicely in mobile devices
2013-08-15 10:28:56 +08:00
Sam Hemelryk 702d1f853e Revert "MDL-36002 core: Make drag and drop keyboard friendly"
This reverts commit 7c271b9, 313e585, ade4695, and 70b4027

Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-15 13:59:06 +12:00
Frederic Massart 2a1ac90ce6 MDL-41209 tool_uploadcourse: Remove faulty form validation 2013-08-15 09:43:13 +08:00
AMOS bot e341bc4f96 Automatically generated installer lang files 2013-08-15 00:54:42 +00:00
Damyon Wiese ae19c68c9c MDL-39851 javascript: More behat fixes for filepicker changes. 2013-08-14 17:12:03 +08:00
Dan Poltawski 7e9ab93199 MDL-40709 skydrive: filter files by accepted types
This means images will only be shown in the image picker, videos
in the video picker - etc.
2013-08-14 15:56:58 +08:00
Dan Poltawski 260ea3d9a1 Merge branch 'MDL-39954-master' of git://github.com/FMCorz/moodle 2013-08-14 15:38:37 +08:00
Frederic Massart 29b8b7c7ad MDL-39954 event: Fixed errors raised while triggering event 2013-08-14 15:29:12 +08:00
Frederic Massart dde244c046 MDL-39954 event: Fixed namespace issue with \coding_exception 2013-08-14 14:53:08 +08:00
Dan Poltawski 02852c45b5 Merge branch 'MDL-36002-master-fix1' of git://github.com/damyon/moodle 2013-08-14 14:51:31 +08:00
Damyon Wiese 70b4027b52 MDL-36002 javascript: Fix keyboard drag/drop not opening win
This was caused by changes in MDL-39851.
2013-08-14 14:49:13 +08:00
Dan Poltawski 178d901cf9 MDL-41019 bump redirect_if_major_upgrade_required() 2013-08-14 14:24:30 +08:00
Damyon Wiese fdfaa5a586 MDL-39851 javascript: Add behat fix for filepicker
The filepicker was changed to use M.core.dialogue - this
patch updates the behat suite to search the changed dom for
the file picker windows closed event.
2013-08-14 11:15:41 +08:00
Dan Poltawski d20b0aa567 MDL-41157 calendar: improve calendar_get_course_cached
The function get_course() introduced in 2.5.1 will use $COURSE and
$SITE to avoid an uncessary DB query, simplifying the logic of this
function and improving perf.
2013-08-14 11:05:27 +08:00
Dan Poltawski 3607961d8f MDL-41157 calendar: add unit tests for calendar_get_course_cached 2013-08-14 11:05:27 +08:00
Sam Hemelryk 0b7e4a1474 Merge branch 'MDL-4908-m' of git://github.com/andrewnicols/moodle
Conflicts:
	version.php
2013-08-14 09:15:00 +12:00
Andrew Nicols 2eb67dfa6c MDL-4908 Forum: Add backup/restore steps for per-forum digest settings 2013-08-13 14:46:11 +01:00
Andrew Nicols 3d4cf54820 MDL-4908 Forum: Add help for profile maildigest setting 2013-08-13 14:46:11 +01:00
Andrew Nicols b28118f673 MDL-4908 Forum: Add a digest option link to outgoing forum mails 2013-08-13 14:46:11 +01:00
Andrew Nicols 8e08c731eb MDL-4908 Forum: per-forum digests 2013-08-13 14:46:10 +01:00
Sam Hemelryk 5f619cd61d weekly release 2.6dev 2013-08-13 14:46:01 +01:00
AMOS bot 51473a1938 Automatically generated installer lang files 2013-08-13 14:46:01 +01:00
AMOS bot 9bfd9f1731 Automatically generated installer lang files 2013-08-13 14:46:00 +01:00
AMOS bot 3f22a0117a Automatically generated installer lang files 2013-08-13 14:46:00 +01:00
Mark Nelson 783e8636f5 MDL-40662 block_course_overview: added addinstance capability string 2013-08-13 14:46:00 +01:00
Frederic Massart 25a66af722 MDL-39956 cohort: Event clean up and made ready for integration
* Added more PHP Documentation
* Localised strings for get_name()
* get_legacy_eventname() is now static
* get_legacy_eventdata() is now protected
* Testing legacy event data
* Added missing defined('MOODLE_INTERNAL') checks
* Added missing call to add_record_snapshot()
2013-08-13 17:41:03 +08:00
Dan Poltawski 4fece33d9a MDL-39956 cohort: Add tests for new events 2013-08-13 17:31:07 +08:00
Dan Poltawski 04aee04a25 MDL-39956 cohort: Convert to new events
* \core\event\cohort_created
* \core\event\cohort_updated
* \core\event\cohort_deleted
* \core\event\cohort_member_added
* \core\event\cohort_member_removed
2013-08-13 17:30:58 +08:00
Brian King 831ca534f4 MDL-29004 Wiki: display images in printer-friendly view 2013-08-13 10:00:46 +02:00
Dan Poltawski aae18d2af4 MDL-31836 upgrade.txt: add a note about encrypt change 2013-08-13 14:57:25 +08:00
Dan Poltawski 26e5090f9e Merge branch 'wip-MDL-31836-m26' of git://github.com/samhemelryk/moodle 2013-08-13 14:57:23 +08:00
Dan Poltawski f9b5915bc0 Merge branch 'MDL-39954-master' of git://github.com/FMCorz/moodle 2013-08-13 13:23:31 +08:00
Damyon Wiese 048422dd8e MDL-41159 theme: Remove z-index from file manager context menu icon 2013-08-13 11:31:21 +08:00
Dan Poltawski 387d040b7b Merge branch 'MDL-40668-master' of git://github.com/damyon/moodle 2013-08-13 11:14:37 +08:00
Dan Poltawski 4dca09b177 Merge branch 'MDL-39851-master-squashed' of git://github.com/damyon/moodle 2013-08-13 10:56:26 +08:00
Damyon Wiese 0c0dfa8fbd MDL-40668 tinymce: Remove collapsable editor options
We have an alternative (pdw toolbars)
Also, allow tinymce to be collapsed down to a single row.
2013-08-13 10:54:36 +08:00
Dan Poltawski ed07242713 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:19 +08:00
Damyon Wiese bf7c86cfcf MDL-39851 M.core.dialogue: Various fixes
Items addressed
* Get rid of custom attribute srcNode
* Change extraClasses to a config only parameter.
* Change attribute fullscreen to a method.
* Restore the original window overflow value.
* Use setStyles instead of setStyle for performance.
* Tinymce end the zindex wars
* Prevent fullscreen dialogs in an iframe (tinymce managefiles plugin).
* tinymce: Cross browser fix for zindex on popups
* Use CSS for overflow changes (easier to keep track of the previous state).
* Fix Coding style for css changes
2013-08-13 10:42:01 +08:00
Damyon Wiese c4bb131928 MDL-39851 filepicker: Fix for toolbar display wrapping on small screens 2013-08-13 10:39:52 +08:00
Damyon Wiese c402943a33 MDL-39851 forms: Convert filemanager popups to M.core.dialogue 2013-08-13 10:39:36 +08:00
Damyon Wiese d61c96b6b4 MDL-39851 javascript: Full screen dialogs on small screens
This change adds support to M.core.dialogue for showing fullscreen
dialogs on small screen sizes. There are 2 new configuration values that
can be set to control this when creating a dialog (responsive and responsiveWidth).

Setting responsive to false will disable this functionality completely (old behaviour).
Setting responsiveWidth controls the screen width that the dialog will switch to
fullscreen mode. Try not to think of the device that will be accessing the dialog,
but the width at which the content of the dialog needs to be displayed differently.

The activity chooser and the filepicker are the two dialogs that have been converted
in this patch. The filepicker first had to be converted to use M.core.dialog and not
Y.Panel.
2013-08-13 10:37:32 +08:00
Sam Hemelryk 969de2a200 Merge branch 'wip-mdl-39955' of git://github.com/rajeshtaneja/moodle 2013-08-13 14:13:13 +12:00
Dan Poltawski f37c923d14 MDL-19171 fix trailing whitespace 2013-08-13 10:06:34 +08:00
Dan Poltawski 41e337dd82 Merge branch 'MDL-19171' of https://github.com/bostelm/moodle 2013-08-13 09:57:52 +08:00
Dan Poltawski 942a0e37d4 Merge branch 'MDL-39507' of git://github.com/timhunt/moodle 2013-08-13 09:52:35 +08:00
Rajesh Taneja 1cb1e5fe32 MDL-39955 completion: Added unittest for course_completed event 2013-08-13 09:43:38 +08:00
Rajesh Taneja 06f8ea7bf4 MDL-39955 completion: Added course_completed event 2013-08-13 09:43:38 +08:00
Sam Hemelryk c0dfd035c4 Merge branch 'wip_MDL-40077' of https://github.com/jamiepratt/moodle 2013-08-13 10:49:12 +12:00
Sam Hemelryk 0c0efd71a1 Merge branch 'MDL-38191-master' of git://github.com/sammarshallou/moodle 2013-08-13 10:26:26 +12:00
Sam Hemelryk 615cf2d15a Merge branch 'MDL-41045-master' of git://github.com/sammarshallou/moodle 2013-08-13 10:19:34 +12:00
Sam Hemelryk 49c7794dcf Merge branch 'MDL-41082-master' of git://github.com/FMCorz/moodle 2013-08-13 10:16:14 +12:00
Sam Hemelryk 717d68544d Merge branch 'MDL-41004-master' of git://github.com/sammarshallou/moodle 2013-08-13 09:46:17 +12:00
Sam Hemelryk acf6a06d5e Merge branch 'master_MDL-40773' of git://github.com/danmarsden/moodle 2013-08-13 09:45:03 +12:00
Sam Hemelryk 0ade13532b Merge branch 'MDL-39691' of git://github.com/jmvedrine/moodle 2013-08-13 09:41:27 +12:00
Sam Hemelryk defb89c30c Merge branch 'MDL-41091' of git://github.com/timhunt/moodle 2013-08-13 09:38:40 +12:00
Sam Hemelryk 90fb4f39fd Merge branch 'MDL-41100-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-08-13 09:37:02 +12:00
Sam Hemelryk 6648f17384 Merge branch 'wip-MDL-41114-master' of git://github.com/marinaglancy/moodle 2013-08-13 09:32:48 +12:00
Sam Hemelryk bbf434b639 Merge branch 'MDL-41050-master' of git://github.com/sammarshallou/moodle 2013-08-13 09:27:50 +12:00
Sam Hemelryk 23b7f1dfcf Merge branch 'MDL-41033' of git://github.com/rwijaya/moodle 2013-08-13 09:24:12 +12:00
Sam Hemelryk 61f2c458d5 Merge branch 'MDL-40711-master' of git://github.com/ankitagarwal/moodle 2013-08-13 09:12:24 +12:00
Sam Hemelryk 41b0597855 Merge branch 'MDL-40852_master' of git://github.com/dmonllao/moodle 2013-08-13 09:10:28 +12:00
Sam Hemelryk 761b48df59 Merge branch 'MDL-40996' of git://github.com/timhunt/moodle 2013-08-13 09:08:15 +12:00
Sam Hemelryk cd0103fa60 Merge branch 'MDL-40673_master' of git://github.com/dmonllao/moodle 2013-08-13 09:03:45 +12:00
Sam Hemelryk f37d53296d Merge branch 'wip-MDL-40871-master' of git://github.com/abgreeve/moodle 2013-08-13 08:57:15 +12:00
Sam Hemelryk 1e6ac6957e Merge branch 'MDL-30895-master' of https://github.com/mouneyrac/moodle 2013-08-13 08:45:43 +12:00
Sam Hemelryk 3ad7a71e1f NOBUG: fixed whitespace 2013-08-13 08:41:09 +12:00
Sam Hemelryk 8fa5ad6212 Merge branch 'MDL-35931-master' of git://github.com/phalacee/moodle 2013-08-13 08:38:33 +12:00
Sam Hemelryk 97907a85f1 Merge branch 'MDL-35919-master' of git://github.com/phalacee/moodle 2013-08-13 08:36:01 +12:00
Sam Hemelryk 8e9709f8bf Merge branch 'MDL-35934' of git://github.com/rwijaya/moodle 2013-08-13 08:33:12 +12:00
sam marshall 07e720010a MDL-41146 Backup: backup_includes_files can leak memory 2013-08-12 13:49:26 +01:00
Petr Škoda 96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Frederic Massart 0528361cc1 MDL-39954 event: Changing get_legacy_eventname to public static 2013-08-12 17:35:30 +08:00
Frederic Massart 3785358d47 MDL-39954 event: Delocalise get_description 2013-08-12 17:35:30 +08:00
Frederic Massart b3fbd91805 MDL-39954 assignment_upload: Replacing old-style event_trigger 2013-08-12 17:35:29 +08:00
Frederic Massart 523698dc4c MDL-39954 assignment_online: Replacing old-style event_trigger 2013-08-12 17:35:29 +08:00
Frederic Massart cbf4b0e6f6 MDL-39954 mod_workshop: Log method can return array of parameters 2013-08-12 17:35:29 +08:00
Frederic Massart 62b3b99784 MDL-39954 mod_forum: Replacing old-style events_trigger 2013-08-12 17:35:29 +08:00
Frederic Massart 7dceb50057 MDL-39954 assignsubmission_onlinetext: Replacing old-style events_trigger 2013-08-12 17:35:28 +08:00
Frederic Massart e3d2d06480 MDL-39954 assignsubmission_file: Replacing old-style events_trigger 2013-08-12 17:35:28 +08:00
Tim Hunt e2b388c1a4 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 10:32:02 +01:00
Dan Poltawski 88ce8a1cb0 Merge branch 'MDL-27655' of git://github.com/timhunt/moodle 2013-08-12 16:41:29 +08:00
Frederic Massart a04cbf61c8 MDL-39954 mod_assign: Replace old-style event assessable_submitted 2013-08-12 16:26:41 +08:00
Frederic Massart caa06f4b45 MDL-39954 mod_assign: add_to_log can return an array of parameters 2013-08-12 16:26:41 +08:00
Frederic Massart e185f72d58 MDL-39954 core: Abstract event assessable_submitted & assessable_uploaded 2013-08-12 16:26:41 +08:00
Dan Poltawski e64f5d367a Merge branch 'MDL-30001' of git://github.com/jmvedrine/moodle 2013-08-12 15:54:53 +08:00
Dan Poltawski 7064ef523b Merge branch 'wip-mdl-40044' of git://github.com/rajeshtaneja/moodle 2013-08-12 14:27:35 +08:00
Dan Poltawski cb1268b109 Merge branch 'MDL-41068' of https://github.com/mr-russ/moodle 2013-08-12 13:42:41 +08:00
Frederic Massart fe5204f92c MDL-41136 badges: Prevent extra loading due to unnecessary includes 2013-08-12 13:31:21 +08:00
Dan Poltawski df8cd014be Merge branch 'w33_MDL-41019_m26_langcaches' of https://github.com/skodak/moodle 2013-08-12 13:29:17 +08:00
Dan Poltawski f8f6dbc37d Merge branch 'MDL-22236-master' of git://github.com/damyon/moodle 2013-08-12 13:27:50 +08:00
Jason Fowler baffb422e6 MDL-35919 - Activity Chooser - Adding Aria attributes to improve accessibility 2013-08-12 13:18:57 +08:00
Marina Glancy a7a04f6d62 MDL-41114 Avoid unnecessary retrieving of coursecat from DB
- course category depth can be estimated in make_categories_options() by the number of separators
2013-08-12 15:07:46 +10:00
Rossiani Wijaya 1b25169215 MDL-35934 Filemanager: change the set attribute to use setAttribute() instead of YUI set(). 2013-08-12 12:28:03 +08:00
Kirill Astashov faaf3f63c2 MDL-41122: Trim on RSS body to prevent Remote RSS block from failing on valid feeds 2013-08-12 13:38:59 +09:30
Dan Poltawski f2b45ad65f Merge branch 'MDL-36002-master' of git://github.com/damyon/moodle
Conflicts:
	theme/base/style/core.css
	theme/bootstrapbase/style/moodle.css
2013-08-12 11:56:37 +08:00
Frederic Massart 5297336942 MDL-41125 course: Only require dndupload library when necessary 2013-08-12 11:34:51 +08:00
Damyon Wiese 873482fe9b MDL-22236 webservice upload files: Update unit tests 2013-08-12 10:38:30 +08:00
Sam Hemelryk d3fb29877e Merge branch 'w33_MDL-41086_m26_upgradecheck' of https://github.com/skodak/moodle 2013-08-12 14:23:10 +12:00
Sam Hemelryk 63106eae7f Merge branch 'w33_MDL-41073_m26_needsupgrade' of https://github.com/skodak/moodle 2013-08-12 14:03:30 +12:00
Sam Hemelryk 8b7378cff0 Merge branch 'MDL-22236-master' of git://github.com/damyon/moodle
Conflicts:
	version.php
2013-08-12 12:11:07 +12:00
Sam Hemelryk 61bec33f53 Merge branch 'MDL-31487' of git://github.com/timhunt/moodle 2013-08-12 11:02:48 +12:00
Sam Hemelryk 45f133884e Merge branch 'MDL-36005-master' of git://github.com/damyon/moodle
Conflicts:
	version.php
2013-08-12 10:38:06 +12:00
Sam Hemelryk 1f0608ed34 MDL-31836 moodlelib: removed legacy encryptkey support 2013-08-12 10:26:01 +12:00
kordan dee76d242d MDL-41117 theme_formal_white: fixed border around header of course categories and sub-categories 2013-08-11 15:54:41 +02:00
Marina Glancy e4008e9db5 MDL-41114 Speeding up course listings on large sites
- function coursecat::make_categories_list() does not use retrieved contexts and has to query them again.
- /course/manage.php uses field coursecat:: that was not fetched when retrieving the course category children.
2013-08-11 21:58:12 +10:00
Petr Škoda 598a82c950 MDL-41019 improve language caching
Includes:
* no more hacky reloads, everything is written only once and kept until cache reset
* lang menu list is now cached in MUC
* both string and lang menu caches are compatible with local caches on cluster nodes
* config-dist.php cleanup
2013-08-11 09:52:34 +02:00
Jean-Michel Vedrine 2f04508377 MDL-39691 Lesson - Email graded essays not working 2013-08-11 08:18:42 +02:00
Petr Škoda 770a25c6c8 MDL-41112 fix theme and js caching info in config-dist.php 2013-08-10 23:46:09 +02:00
Jamie Pratt 3652dddda8 MDL-40077 quiz stats : Test stats as expected for csv file responses 2013-08-10 11:17:47 +07:00
Rajesh Taneja 35e4eb42c0 MDL-40044 Roles: Updated role_assigned and role_unassigned event to remove add_to_log 2013-08-09 18:02:02 +08:00
sam marshall 975f8442c9 MDL-38191 Backup/restore: Should use large memory limit 2013-08-09 11:01:14 +01:00
Rajesh Taneja 1613ffa55f MDL-40044 Roles: Added role_allow_*_updated events to replace add_to_log on role allow page
Added events:
1. role_allow_assign_updated
2. role_allow_override_updated
3. role_allow_switch_updated
2013-08-09 17:59:54 +08:00
Rajesh Taneja 82ddcad0a3 MDL-40044 Roles: Added role_capabilites_updated event and replaced related add_to_log 2013-08-09 17:59:54 +08:00
Rajesh Taneja a7524e354b MDL-40044 Roles: Added role_deleted event and replaced related add_to_log 2013-08-09 17:59:54 +08:00
Frederic Massart ce4619be9b MDL-41082 navigation: Remove unnecessary load of portfolio instances 2013-08-09 17:44:46 +08:00
Rajesh Taneja cdc541990e MDL-39955 completion: Added unittest for course_module_completion_updated event 2013-08-09 17:06:12 +08:00
Rajesh Taneja 137d94f335 MDL-39955 completion: Added course_module_completion_updated event
Conflicts:

	lib/tests/completionlib_advanced_test.php
2013-08-09 17:04:34 +08:00
Adrian Greeve e727e8ff58 MDL-40871 - mod_data: Unit tests for data_delete_record() 2013-08-09 16:53:18 +08:00
Adrian Greeve cf9ecfdac4 MDL-40871 - mod_data: Allow bulk deletion of entries in the database module. 2013-08-09 16:53:18 +08:00
Frederic Massart d0cac8b51b MDL-41100 libraries: Deprecating get_plugin_list_with_file 2013-08-09 11:59:48 +08:00
Frederic Massart d26ec8a598 MDL-41100 libraries: Moved get_plugin_list_with_file to core_component 2013-08-09 11:56:48 +08:00
Rossiani Wijaya f2e4da6876 MDL-41033 Filepicker: add ARIA attributes for selecting file in a modal 2013-08-09 10:56:21 +08:00
Rossiani Wijaya 26489591ab 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:01:36 +08:00
Rossiani Wijaya 7f60308a35 MDL-35934 Filemanager: add aria attributes for editing file/folder.
Add unique reference ids
2013-08-09 10:01:36 +08:00
Mayank Gupta 0264b3eaac MDL-40773 mod_scorm: convert yui2 -> yui3 2013-08-09 13:10:39 +12:00
Petr Škoda 7b4d5af74d MDL-41094 purge caches only before and after upgrade of plugins
It should not be necessary to purge before/after individual plugins
because caches are disabled during install and upgrade.
2013-08-08 22:40:10 +02:00
Petr Škoda c5701ce7d4 MDL-41086 rework detection of necessary upgrades 2013-08-08 21:11:40 +02:00
Henning Bostelmann f6a5ffe802 MDL-19171 Calendar: show course links in more places 2013-08-08 17:55:01 +01:00
Tim Hunt df7d175d0f MDL-41091 questions: fix get_all_submitted_qt_vars for unit testing. 2013-08-08 14:41:53 +01:00
sam marshall 84028810f4 MDL-41004 Resource: Does not have generator 2013-08-08 12:14:24 +01:00
Tim Hunt 370ee378f3 MDL-40996 quiz show user pic should also show name.
This was a regression introduced by MDL-20636 two years ago!
2013-08-08 10:24:46 +01:00
Jerome Mouneyrac 83f47164b1 MDL-30895 switch from dl tag to table in the accessible chat 2013-08-08 17:15:03 +08:00
Jean-Michel Vedrine 6c23d0d403 MDL-39507 questions: fix pluginfile URLs before format_text. 2013-08-08 10:05:48 +01:00
Tim Hunt 3987312883 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 10:03:47 +01:00
Tim Hunt 2d22f3d97f 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:59:55 +01:00
Petr Škoda 166c1d74e3 MDL-41073 do not delete plugininfo caches when testing if upgrade necessary
This should help with performance for all users when admin is logged in
because these caches need to be purged only after upgrade.
2013-08-08 10:19:01 +02:00
Petr Škoda 99a9d8d937 MDL-41019 refactor string managers to new core_ classes 2013-08-08 09:10:25 +02:00
Petr Škoda 3130c1a71f MDL-40952 skip only the opcache requirement in environment test
Please note we need other optional extensions and settings because otherwise some tests fail without explanation.
2013-08-08 09:02:40 +02:00
Jean-Michel Vedrine 398dc6a3ab MDL-30001 WEBCT Import does not work for 2.0 2013-08-08 07:43:43 +02:00
Sam Hemelryk 50ff861263 weekly release 2.6dev 2013-08-08 16:24:00 +12:00
Sam Hemelryk ec94685c4d Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-08-08 16:19:12 +12:00
Damyon Wiese 1495f2893e MDL-22236 webservice : Remove filearea restrictions on user draft areas.
It does not make sense to apply restrictions to the size of a users draft areas
so this is only checked if uploading direct to user private files.
2013-08-08 12:18:20 +08:00
Damyon Wiese 9ffa4cb3a6 MDL-22236 user webservice: add_user_private_files
Add webservice for adding files to user private files.
2013-08-08 12:05:40 +08:00
Jason Fowler ee4ab9759e MDL-35931 Accessibility - adding focus change when repository is selected 2013-08-08 10:52:04 +08:00
Damyon Wiese 106c55fb9c MDL-22236 Webservice file upload - Allow webservice file uploads direct to a draft filearea.
Via post to /webservice/upload.php
2013-08-08 09:57:57 +08:00
sam marshall 5523c34462 MDL-41045 course_add_cm_to_section should not test for sections unless necessary 2013-08-07 17:17:04 +01:00
Frederic Massart cbb3990bcb MDL-41071 core: plugininfo_mod caches in plugininfo_mod definition 2013-08-07 20:55:22 +08:00
Russell Smith ba194bdf2b MDL-41068 profile: Repair profiling after box API change
The box API was used with an extra incorrect parameter
in the profiling code.  It worked without issue until
the introduction of error checking in MDL-40842.  It
has failed since then.
2013-08-07 19:02:56 +10:00
Sam Hemelryk f05ea82cdc Merge branch 'MDL-40662_master' of https://github.com/markn86/moodle 2013-08-07 15:19:49 +12:00
Mark Nelson a739ff73da MDL-40662 block_course_overview: added addinstance capability string 2013-08-07 11:14:48 +08:00
Ankit Agarwal d1554f599c MDL-40711 events: Resolve conflicts with MDL-41000 and add phpdocs 2013-08-07 11:01:05 +08:00
Ankit Agarwal 6c66b7f3b3 MDL-40711 blogs: Replace blog_entry_deleted with events2 2013-08-07 10:27:01 +08:00
Sam Hemelryk d4519366f4 Merge branch 'MDL-40934-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-08-07 14:01:51 +12:00
Frederic Massart 4d0752069e MDL-40934 core: Bump version requiring major upgrade 2013-08-07 09:37:50 +08:00
AMOS bot 8df80d25aa Automatically generated installer lang files 2013-08-07 00:42:59 +00:00
Sam Hemelryk 823c0c80e9 Merge branch 'MDL-40086-master' of git://github.com/FMCorz/moodle
Conflicts:
	lib/filestorage/file_storage.php
2013-08-07 10:39:40 +12:00
Sam Hemelryk 774b1089a5 Merge branch 'w32_MDL-40438_m26_textlib' of https://github.com/skodak/moodle
Conflicts:
	lib/weblib.php
2013-08-07 10:23:32 +12:00
Sam Hemelryk 2e1d38db6f MDL-41023 weblib: improved coding style 2013-08-07 08:22:05 +12:00
Petr Škoda 2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
sam marshall b010a736b3 MDL-41050 Progress bar: Width parameter does not work 2013-08-06 17:35:25 +01:00
Marina Glancy e7c21ac3be Merge branch 'wip-MDL-41025-m26' of git://github.com/samhemelryk/moodle 2013-08-07 00:16:53 +10:00
Marina Glancy 25b8ce9278 Merge branch 'wip-MDL-41024-m26' of git://github.com/samhemelryk/moodle 2013-08-07 00:10:44 +10:00
Marina Glancy 9be9b412b1 Merge branch 'wip-mdl-40126' of git://github.com/rajeshtaneja/moodle 2013-08-06 22:53:19 +10:00
Marina Glancy 18a4335366 Merge branch 'MDL-40935-master' of git://github.com/ankitagarwal/moodle 2013-08-06 22:33:55 +10:00
Marina Glancy 2cf88d54fb MDL-40682 MDL-41000 event name and description return strings
event description is non-localised string
2013-08-06 22:25:21 +10:00
Marina Glancy 4b96f2ae62 Merge branch 'MDL-40682-master' of git://github.com/ankitagarwal/moodle 2013-08-06 21:05:47 +10:00
Marina Glancy 287e2a34db MDL-41034 Additional check to be extra sure that no JS error occurs 2013-08-06 20:59:21 +10:00
Marina Glancy e7328732e9 Merge branch 'MDL-41034-essay-broken' of git://github.com/ktemkin/moodle 2013-08-06 20:49:13 +10:00
Ankit Agarwal c1ff221eee MDL-40682 events: Add phpdocs for class and init method 2013-08-06 15:13:05 +08:00
David Monllao 118d53f9ad MDL-40673 behat: New scenario for permission overrides 2013-08-06 15:04:48 +08:00
David Monllao 81cd8572ba MDL-40673 behat: Data generator for permission overrides 2013-08-06 15:04:48 +08:00
Ankit Agarwal 320aee339c MDL-40935 phpunit: Remove assertLegacyEventName() since get_legacy_eventname() is public now 2013-08-06 14:58:30 +08:00
Ankit Agarwal 2244600337 MDL-40935 events: get_legacy_eventname() should be public and static 2013-08-06 14:25:37 +08:00
Frederic Massart bc42e97989 MDL-40086 file: Correct ordering of subdirectories
Thanks to Mohamed Alsharaf for the proposed solution.
2013-08-06 13:53:54 +08:00
Sam Hemelryk 36671670e1 Merge branch 'MDL-34989-master' of git://github.com/damyon/moodle 2013-08-06 17:51:30 +12:00
Sam Hemelryk d2132f02e2 Merge branch 'wip-mdl-41000' of git://github.com/rajeshtaneja/moodle 2013-08-06 17:45:16 +12:00
Sam Hemelryk 9c83b82b1b Merge branch 'MDL-40947-master' of https://github.com/lucisgit/moodle 2013-08-06 17:39:41 +12:00
Sam Hemelryk 2ad4a763ab Merge branch 'wip-mdl-40469' of git://github.com/rajeshtaneja/moodle 2013-08-06 17:36:33 +12:00
Sam Hemelryk 206f18c836 Merge branch 'MDL-40420' of https://github.com/prateeksachan/moodle 2013-08-06 17:31:14 +12:00
David Monllao 95b43d6b90 MDL-40852 behat: Wrong URLs detection 2013-08-06 13:23:07 +08:00
Marina Glancy 0fb7a90363 Merge branch 'MDL-37962_beep' of git://github.com/andyjdavis/moodle 2013-08-06 15:03:26 +10:00
Sam Hemelryk 5261f26e0e Merge branch 'w32_MDL-41002_m26_enroltypo' of https://github.com/skodak/moodle 2013-08-06 16:55:48 +12:00
Marina Glancy 87934924be Merge branch 'MDL-31226-master' of https://github.com/lucisgit/moodle 2013-08-06 14:38:08 +10:00
Sam Hemelryk 1d92024f99 Merge branch 'w32_MDL-41020_m26_umaskpermissionsnotice' of https://github.com/skodak/moodle 2013-08-06 15:50:18 +12:00
Mark Nelson b573724a03 MDL-27953 auth: documented the newly introduced function can_be_manually_set() in upgrade.txt 2013-08-06 15:46:14 +12:00
Sam Hemelryk 17440b2198 Merge branch 'w32_MDL-40815_m26_deprevent' of https://github.com/skodak/moodle
Conflicts:
	lib/deprecatedlib.php
2013-08-06 15:38:18 +12:00
Andrew Davis 9279cae63b MDL-37962 core_message:reimplemented the beep on new message functionality from 1.9 2013-08-06 10:30:07 +07:00
Marina Glancy f0655ecb71 Merge branch 'MDL-40737-master' of git://github.com/FMCorz/moodle 2013-08-06 13:04:38 +10:00
Sam Hemelryk 68736bd623 Merge branch 'MDL-40870' of https://github.com/moodlerooms/moodle 2013-08-06 14:47:38 +12:00
Sam Hemelryk c3aefeb5a6 Merge branch 'MDL-40662_master' of https://github.com/markn86/moodle 2013-08-06 14:39:49 +12:00
Sam Hemelryk e145762b17 Merge branch 'MDL-40934-master' of git://github.com/FMCorz/moodle
Conflicts:
	auth/tests/auth_test.php
2013-08-06 14:37:43 +12:00
Sam Hemelryk 3550fc28fb NOBUG: fixed whitespace 2013-08-06 14:03:54 +12:00
Sam Hemelryk 471dd4ff67 Merge branch 'MDL-40963-master' of git://github.com/ankitagarwal/moodle 2013-08-06 13:59:23 +12:00
Sam Hemelryk fe33106bb1 Merge branch 'MDL-40955-m' of git://github.com/andrewnicols/moodle
Conflicts:
	course/format/upgrade.txt
2013-08-06 12:49:28 +12:00
Sam Hemelryk 468ee9863d Merge branch 'MDL-40953-m' of git://github.com/andrewnicols/moodle 2013-08-06 12:45:20 +12:00
AMOS bot e637a5b3f0 Automatically generated installer lang files 2013-08-06 00:42:16 +00:00
Sam Hemelryk c7c020aad2 Merge branch 'MDL-39090_lti_dup_params' of https://github.com/moodlerooms/moodle 2013-08-06 10:23:45 +12:00
Sam Hemelryk 911b271215 Merge branch 'MDL-27953_master' of https://github.com/markn86/moodle 2013-08-06 10:11:20 +12:00
Sam Hemelryk b09abb05ab Merge branch 'w32_MDL-40901_m26_phpunitcleanup2' of https://github.com/skodak/moodle 2013-08-06 08:53:24 +12:00
Sam Hemelryk 1eebbc2854 Merge branch 'w32_MDL-40943_m26_observers' of https://github.com/skodak/moodle 2013-08-06 08:49:28 +12:00
Kyle Temkin f936128f5b MDL-41034 fix TinyMCE managefiles plugin for textareas that do not support file uploads
The current managefiles plugin assumes that every file manager will be created
by either calling use_editor without filepicker options ($fpoptions) or with
filepicker options that include options for the moodleimage plugin.
2013-08-05 16:12:16 -04:00
Marina Glancy 50c6e3ebac Merge branch 'MDL-41029-master' of git://github.com/FMCorz/moodle 2013-08-05 17:46:22 +10:00
Marina Glancy 698be6bbd0 Merge branch 'MDL-40997-master' of git://github.com/FMCorz/moodle 2013-08-05 17:42:09 +10:00
Frederic Massart 513d879381 MDL-41029 core: Fix wrong guessing of course id in event base 2013-08-05 15:41:16 +08:00
Frederic Massart 42f4ba9b65 MDL-40737 tool_uploadcourse: Prove that category equals to 0 is handled 2013-08-05 15:32:43 +08:00
Frederic Massart 0e8f56103c MDL-40737 tool_uploadcourse: Prevent update of frontpage 2013-08-05 15:23:22 +08:00
Marina Glancy fd6d13bab1 Merge branch 'MDL-36011-master' of git://github.com/damyon/moodle 2013-08-05 17:15:38 +10:00
Shane Elliott 0604e03bf9 MDL-40684 Fix conditional field name for custom user fields 2013-08-05 15:51:37 +12:00
Marina Glancy f5472d1fd4 Merge branch 'MDL-30852-master' of git://github.com/damyon/moodle 2013-08-05 13:49:55 +10:00
Sam Hemelryk 6aed99dd0a Merge branch 'MDL-40937_assignment_history' of git://github.com/davosmith/moodle 2013-08-05 15:46:59 +12:00
Sam Hemelryk 2c5c56e974 Merge branch 'MDL-38758_master' of https://github.com/markn86/moodle 2013-08-05 15:37:37 +12:00
Sam Hemelryk 176a60227d Merge branch 'MDL-35922-master' of git://github.com/phalacee/moodle 2013-08-05 15:33:09 +12:00
Damyon Wiese 1196cc4d28 MDL-30852 grade report: More coding guideline cleanups. 2013-08-05 11:23:29 +08:00
Marina Glancy f64777a93f Merge branch 'MDL-40825_master' of git://github.com/dmonllao/moodle 2013-08-05 13:15:25 +10:00
Sam Hemelryk 4c7f0562d0 Merge branch 'MDL-35927' of git://github.com/rwijaya/moodle 2013-08-05 14:38:47 +12:00
Marina Glancy 40e0dbd5ac Merge branch 'MDL-40320-master' of git://github.com/sammarshallou/moodle 2013-08-05 12:30:56 +10:00
Marina Glancy e22e263fa0 Merge branch 'MDL-35981-master' of git://github.com/damyon/moodle 2013-08-05 12:19:45 +10:00
Sam Hemelryk 2b80bb33df Merge branch 'w32_MDL-40995_m26_minifyreworked' of https://github.com/skodak/moodle 2013-08-05 14:15:27 +12:00
Sam Hemelryk 335fcfa4f9 Merge branch 'w32_MDL-41017_m26_purifier' of https://github.com/skodak/moodle 2013-08-05 14:06:26 +12:00
Damyon Wiese 31d861d19b MDL-35981 comments: Fix for keyboard control of "add a comment" 2013-08-05 09:49:38 +08:00
Damyon Wiese ade4695de0 MDL-36002 dragdrop: Add simulated event for keyboard drag drop.
This is to prevent any accidental state change in Y.DD.DDM.
2013-08-05 09:39:11 +08:00
Sam Hemelryk 324b489bdb Merge branch 'wip-MDL-34785-master' of git://github.com/marinaglancy/moodle 2013-08-05 13:36:56 +12:00
Marina Glancy 98260b31a5 Merge branch 'wip-mdl-40933' of git://github.com/rajeshtaneja/moodle 2013-08-05 10:48:36 +10:00
Marina Glancy a9881c1750 MDL-34785 performance improvement with big list of courses 2013-08-05 10:13:19 +10:00
Sam Hemelryk d89733f6c7 MDL-41025 moodlelib: addressed todo on truncate_userinfo 2013-08-05 09:34:55 +12:00
Sam Hemelryk 0142523d08 MDL-41024 lib: deprecate isediting 2013-08-05 09:24:06 +12:00
Petr Škoda aed2b9ba9c MDL-40901 use assertInternalType() 2013-08-04 22:16:03 +02:00
Petr Škoda 8252b7c291 MDL-40901 standardise core test case class and file names
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
Petr Škoda 2e242f4c6b MDL-40940 try to guess testcase location using info from /phpunit.xml
This will help with core tests in non-standard core subsystem locations.
2013-08-04 21:44:13 +02:00
Petr Škoda 529342bb9f MDL-41002 fix typo causing fatal error on other users page
Credit goes to Bernhard Brandstetter, thanks!
2013-08-04 15:00:53 +02:00
Petr Škoda 2d1884d987 MDL-40943 use observer priority only inside group of observers
This makes the '*' observers to be executed always first. This change allows us to implement parent event class catching if we ever decide we need it without breaking BC. This change includes some more unit test fixes.
2013-08-04 13:48:03 +02:00
Petr Škoda 7f0ffc544a MDL-41020 fix installer notices 2013-08-04 10:18:10 +02:00
Petr Škoda 6b32d6bc93 MDL-40995 simplify minify integration and fix all known issues 2013-08-03 17:16:17 +02:00
Petr Škoda 528a7b447a MDL-41017 improve purify caching
The improvements include:

* HTMLPurifier cache is stored in localcachedir
* allowobjectembed changes are not ignored any more
* the cache keys include revision and all options which makes
  this suitable for local caches on cluster nodes
* unchanged test is replaced by "true" value which should
  significantly improve performance
* removal of purge_all_caches() hack for directory recreation
* comments and coding style cleanup
2013-08-03 11:31:18 +02:00
Ruslan Kabalin f8e28244cb 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 16:19:18 +01:00
Petr Škoda f0f0e1fe73 MDL-40815 deprecate events_trigger() 2013-08-02 16:48:19 +02:00
Petr Škoda 7c3943ad0c MDL-40889 prevent 304 when minimising JS 2013-08-02 16:27:34 +02:00
Frederic Massart d6277b0ca0 MDL-40997 phpunit: Assertions for events legacy data 2013-08-02 18:30:02 +08:00
Ruslan Kabalin b2b2c136b6 MDL-40947: Fix segmentation fault issue in get_fast_modinfo. 2013-08-02 09:53:28 +01:00
Damyon Wiese 313e58519c MDL-36002 dragdrop: focus fix and exception catching
This sets the focus correctly after a cancel or drop event.
It also catches exceptions from the lock/unlock functions.
2013-08-02 16:34:24 +08:00
Rajesh Taneja 91665753df MDL-41000 Events: Fixed return values for get_name() and get_description() in existing events
Changes done for following events:
- \core_auth\event\user_loggedin
- \core\event\role_assigned
- \core\event\role_unassigned
2013-08-02 14:45:52 +08:00
Damyon Wiese e1e9ade581 MDL-30852 grade: Coding style fix for user report. 2013-08-02 14:40:23 +08:00
Steve Bader f19dd840ff MDL-30852 grade report: Add aria attributes
Converted to git branch by Damyon
2013-08-02 13:57:27 +08:00
Rajesh Taneja fc9fc9fb30 MDL-41000 Events: Fixed phpdoc for get_name and get_description in \core\event\base class 2013-08-02 13:48:11 +08:00
Damyon Wiese fe1c01e751 MDL-35981 comments: Add comment about keycodes for space and enter. 2013-08-02 11:42:45 +08:00
Damyon Wiese afc9ebd3e8 MDL-35981 comments: Remove confirm step from behat delete comments. 2013-08-02 11:42:45 +08:00
Damyon Wiese ba29e212cd MDL-35981 comments: Make delete comment keyboard accessible. 2013-08-02 11:42:44 +08:00
Damyon Wiese fdf70473a5 MDL-36011 tablelib: Make column headers expand/collapse links accessible. 2013-08-02 11:24:53 +08:00
AMOS bot 2fcd9b0b49 Automatically generated installer lang files 2013-08-02 00:38:30 +00:00
Sam Hemelryk a31e811563 weekly release 2.6dev 2013-08-02 08:21:15 +12:00
Sam Hemelryk 3d2128f6d4 NOBUG: fix file permissions 2013-08-02 08:17:40 +12:00
Sam Hemelryk b3db9ddaf8 Merge branch 'install_master' of git://git.moodle.org/moodle-install 2013-08-02 08:11:35 +12:00
sam marshall be108c7ab0 MDL-40320 Course page: Text greyed when conditional activity available 2013-08-01 14:14:43 +01:00
Damyon Wiese 323f3753a3 MDL-36005 formslib: Version bump for css changes 2013-08-01 16:46:46 +08:00
Damyon Wiese a3e57854fc MDL-36005 formslib: Move the help icons out of the form labels for accessibility. 2013-08-01 16:39:34 +08:00
Sam Hemelryk 6cd213567b MDL-40842 behat: fixed a typo 2013-08-01 20:15:29 +12:00
Rossiani Wijaya f26cc2bea7 MDL-35927 filepicker: add aria attribute to display modal error 2013-08-01 15:38:07 +08:00
Ankit Agarwal 1ccc126806 MDL-40963 events: get_name() should use get_called_class() instead of __CLASS__ 2013-08-01 15:30:08 +08:00
Sam Hemelryk 81387cafd5 MDL-40842 behat: Reverting to backtrace catchall as xdebug warnings were being missed 2013-08-01 17:03:25 +12:00
Mark Nelson 33d8af6668 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:54:51 +08:00
Sam Hemelryk 4c2892c654 MDL-40842 output: fixed fatal error display bug - thanks Marina for spotting it! 2013-08-01 16:52:34 +12:00
Rajesh Taneja c597ff32ef MDL-40469 Gradebook: Fixed setType warning while exporting gradebook with publishing set 2013-08-01 10:31:25 +08:00
Damyon Wiese 1444b2ee5a MDL-39814 actionmenu: Version bump for css changes. 2013-08-01 09:42:42 +08:00
Sam Hemelryk f803ce267f MDL-39814 actionmenu: tweaked the action menu post integration
The following changes have been made:
 * course_section_cm_edit_actions now allows the caller more options for the
   display of the action menu.
 * The site menu block now disables the JS enhancement of the actionmenu so
   that it displays as it did before. After more testing this seemed like the
   only option that worked in the limited space of the block when it had
   several modules.
 * draganddrop of resources now triggers the action menu enhancement as well.
 * Fixed display of title when the menu is not being enhanced by JS.
 * Fixed the alignment of the completion icon in the bootstrapbase theme.
 * Tweaked the CSS for the standard theme.
2013-08-01 13:05:04 +12:00
Sam Hemelryk 4a4d57ae1f Merge branch 'MDL-35053' of git://github.com/timhunt/moodle 2013-08-01 09:47:57 +12:00
Tim Hunt 1cca4e4327 MDL-35053 question files outside attempts. Fix back-compatibility. 2013-07-31 18:00:52 +01:00
Andrew Nicols 9ce4fa2fd4 MDL-40955 Course: Add a new renderer to give a complete course module 2013-07-31 11:14:05 +01:00
Damyon Wiese 7c271b918e MDL-36002 core: Make drag and drop keyboard friendly
This change adds keyboard support to core drag and drop.

Selecting a grab handle and hitting enter (or space) will
open a menu of possible drop targets and allow you to choose one.

The only other UI change this implies is we need to show the grab
for blocks.
2013-07-31 16:43:25 +08:00
Jason Fowler 1641bee253 MDL-35922 - Adding aria attributes to create-folder modal 2013-07-31 16:40:43 +08:00
Ankit Agarwal 3049780a3a MDL-40682 events: Add a event for when a blog entry is created 2013-07-31 10:09:17 +08:00
Sam Hemelryk b05cfa0e67 MDL-39430 phpunit: skip unmet optional environment checks 2013-07-31 10:46:44 +12:00
Andrew Nicols 1a3f52a102 MDL-40953 Course: Always create the CM list, even for empty sections 2013-07-30 23:46:43 +01:00
Sam Hemelryk 6867a78d75 Merge branch 'w31_MDL-39430_m26_opcache' of https://github.com/skodak/moodle 2013-07-31 09:11:22 +12:00
Mark Nielsen 533c42ea28 MDL-39090: Duplicate parameters in LTI launches
Removed endpoint query string params from body
to prevent param duplication.
2013-07-30 08:44:01 -07:00
Davo Smith 2a081f127d MDL-40937 mod_assign - remove debugging code from 'previous submissions' javascript, that was breaking in IE8/IE9 2013-07-30 11:35:30 +01:00
Frederic Massart d95db915ed MDL-40934 core: Moving \core_auth\event\user_loggedin to \core 2013-07-30 16:41:20 +08:00
Paul Charsley d1ec5c839a MDL-40547 assign: tests for workflow/allocation 2013-07-30 16:02:21 +08:00
Rajesh Taneja d9cfe855ac MDL-40933 Administration: Added 'is after' and 'is before' to date filter 2013-07-30 15:45:09 +08:00
Dan Poltawski 6d2fc575a6 Merge branch 'w31_MDL-39915_m26_tests' of https://github.com/skodak/moodle 2013-07-30 14:09:24 +08:00
Dan Poltawski 857e3ecb6c Merge branch 'w31_MDL-40898_m26_openhandles' of https://github.com/skodak/moodle 2013-07-30 14:06:04 +08:00
Petr Škoda fba8cef3a3 MDL-39915 fix core_code_testcase regression
Thanks Dan!
2013-07-30 07:56:24 +02:00
Dan Poltawski e4469ed8bf Merge branch 'wip-MDL-39814-m26' of git://github.com/samhemelryk/moodle 2013-07-30 12:19:39 +08:00
Sam Hemelryk ea5a01fbe5 MDL-39814 frontend: pre-integration fixes:
* Fixed IE8 display of icons.
* Fixed blocks using course renderer.
* Fixed behat tests.
* codecheckers fixes
* Removed alt from icons with descriptive text
* Tweaked actionmenu initialisation for performance
2013-07-30 16:15:58 +12:00
Sam Hemelryk 10fc156933 MDL-39814 frontend: added options to disable new action menus
Also:
 * Tidied up patch as per peer-reviews
2013-07-30 16:15:52 +12:00
Sam Hemelryk 3665af78ca MDL-39814 actionmenu: improved alignment, constraint handling, and accessibility 2013-07-30 16:15:26 +12:00
Sam Hemelryk e5de4933b0 MDL-39814 frontend: redeveloped overlay to correct tab-flow
Also:
 * fixed zindex issue + spinner placement
 * added notes to course format and theme upgrade texts
 * fixed behat tests after action menu changes
2013-07-30 16:15:19 +12:00
Sam Hemelryk 202fcfa130 MDL-39814 frontend: increased size of editing icons for activities 2013-07-30 16:15:12 +12:00
Sam Hemelryk cf69a00a1c MDL-39814 frontend: introduced an action_menu_action class 2013-07-30 16:15:05 +12:00
Sam Hemelryk b59f2e3bef MDL-39814 frontend: improved display of activities and the menu 2013-07-30 16:14:56 +12:00
Sam Hemelryk e282c679e3 MDL-39814 frontend: improvements to course/block editing 2013-07-30 16:07:26 +12:00
Dan Poltawski d713ba95f0 Merge branch 'MDL-40548' of https://github.com/Lightwork-Marking/moodle 2013-07-30 09:58:21 +08:00
Sam Hemelryk 56c3e4762f Merge branch 'MDL-40902_master' of https://github.com/nadavkav/moodle 2013-07-30 10:36:49 +12:00
Sam Hemelryk c6457b8acf Merge branch 'MDL-35053' of git://github.com/timhunt/moodle 2013-07-30 10:21:38 +12:00
Sam Hemelryk 4960ca0738 Merge branch 'w31_MDL-39915_m26_tests' of https://github.com/skodak/moodle 2013-07-30 10:19:41 +12:00
Sam Hemelryk 9459ccc974 NOBUG fixed whitespace 2013-07-30 10:08:51 +12:00
Sam Hemelryk a2d847842e Merge branch 'MDL-40746_master' of git://github.com/grabs/moodle 2013-07-30 09:40:40 +12:00
Sam Hemelryk 816f873068 Merge branch 'wip-MDL-40897-master' of git://github.com/marinaglancy/moodle 2013-07-30 09:39:03 +12:00
Sam Hemelryk 867eba7641 Merge branch 'w31_MDL-39786_m26_metarole' of https://github.com/skodak/moodle 2013-07-30 09:33:56 +12:00
Frederic Massart d72d541db5 MDL-40615 Repository: Updated Amazon S3 library
Fixed insecure use of CURLOPT_SSL_VERIFYHOST
2013-07-30 09:03:59 +12:00
Sam Hemelryk 6cef3dfe8e Merge branch 'MDL-39461_dev' of https://github.com/totara/openbadges 2013-07-30 08:59:58 +12:00
Sam Hemelryk 0d33dbd9b8 Merge branch 'MDL-38759-master' of https://github.com/mackensen/moodle 2013-07-30 08:58:14 +12:00
Sam Hemelryk 73b4c1da84 Merge branch 'MDL-40678-m' of git://github.com/andrewnicols/moodle 2013-07-30 08:55:35 +12:00
Sam Hemelryk fb947a424a Merge branch 'wip-MDL-40660-master' of git://github.com/phalacee/moodle 2013-07-30 08:47:34 +12:00
Mark Nelson ce2d9273b9 MDL-38758 mod_forum: fixed issue where pass by reference removal caused an undefined variable error 2013-07-29 19:14:03 +08:00
Mark Nelson 9b29f68648 MDL-27953 auth: introduced new function can_be_manually_set() to the authentication base class 2013-07-29 17:06:08 +08:00
Dan Poltawski ef3a268060 Merge branch 'w31_MDL-40900_m26_32unzip' of https://github.com/skodak/moodle 2013-07-29 16:56:40 +08:00
Dan Poltawski f7d374bd8f Merge branch 'w31_MDL-40887_m26_minify' of https://github.com/skodak/moodle 2013-07-29 16:49:39 +08:00
Dan Poltawski 0ae497f03a Merge branch 'MDL-39404' of git://github.com/jmvedrine/moodle 2013-07-29 16:29:59 +08:00
Petr Škoda f83037e8e7 MDL-40887 import latest minify 2.1.7 2013-07-29 09:50:20 +02:00
Dan Poltawski b47b4ffd91 Merge branch 'wip-MDL-40847-m26' of git://github.com/samhemelryk/moodle 2013-07-29 15:28:17 +08:00
Dan Poltawski 86005f4884 Merge branch 'MDL-40867' of git://github.com/timhunt/moodle 2013-07-29 15:23:42 +08:00
Rajesh Taneja be9bf94e4a MDL-40126 Enrolments: Implemented two webservices to get enrolment instance info
1. core_enrol_get_course_enrolment_methods() which returns all enrolment method instances
which implement get_enrol_info()
2. enrol_self_get_instance_info() will return information about self enrolment instance.
2013-07-29 15:07:37 +08:00
Dan Poltawski 50aa2587a4 Merge branch 'MDL-40618_restore_get_questions' of https://github.com/mr-russ/moodle 2013-07-29 14:14:58 +08:00
Dan Poltawski 48638b915d Merge branch 'MDL-40323-master' of https://github.com/mackensen/moodle 2013-07-29 13:59:55 +08:00
Dan Poltawski 8cb1af9a18 Merge branch 'MDL-40857' of git://github.com/timhunt/moodle 2013-07-29 13:55:25 +08:00
Dan Poltawski 62ea0cb846 Merge branch 'wip-MDL-40842-m26' of git://github.com/samhemelryk/moodle 2013-07-29 13:48:19 +08:00
Dan Poltawski 3047527093 Merge branch 'MDL-39359_master' of https://github.com/pauln/moodle 2013-07-29 13:45:50 +08:00
Dan Poltawski 26c0773f7b MDL-40775 feeback: remove uncessary header 2013-07-29 13:30:14 +08:00
Dan Poltawski 0c69118fca Merge branch 'MDL-40775_master' of git://github.com/grabs/moodle 2013-07-29 13:28:22 +08:00
Dan Poltawski 2c6f055818 Merge branch 'wip-MDL-29731-master' of git://github.com/marinaglancy/moodle 2013-07-29 13:20:59 +08:00
Dan Poltawski 90b423bda7 Merge branch 'MDL-36399' of git://github.com/timhunt/moodle 2013-07-29 12:40:05 +08:00
Dan Poltawski 245fb06b86 Merge branch 'MDL-40547' of https://github.com/Lightwork-Marking/moodle 2013-07-29 10:41:54 +08:00
Dan Poltawski 47c6239483 Merge branch 'MDL-40863' of git://github.com/timhunt/moodle 2013-07-29 10:09:45 +08:00
Jason Fowler 7eebe381a6 MDL-40660 - HTML Editor - Fix the width when toggling TinyMCE toolbars 2013-07-29 10:01:48 +08:00
Damyon Wiese fafad009f3 MDL-34989 assign: Do not add a param to grading_disabled - cannot be backported. 2013-07-29 09:55:46 +08:00
Ashley Holman c33b4c81bb MDL-34989 assign: Allow students to submit when grade is overriden
Also inform teachers when grading is disabled due to gradebook lock/override.
2013-07-29 09:55:36 +08:00
Sam Hemelryk 8452248881 Merge branch 'w31_MDL-11270_m26_nvarcharmax' of https://github.com/skodak/moodle 2013-07-29 13:05:07 +12:00
Sam Hemelryk 1091c53445 Merge branch 'MDL-40878' of git://github.com/timhunt/moodle 2013-07-29 12:54:31 +12:00
Sam Hemelryk 609bda269e Merge branch 'w31_MDL-40891_m26_mkdirrace' of https://github.com/skodak/moodle 2013-07-29 11:53:02 +12:00
Sam Hemelryk fa198e6346 Merge branch 'MDL-40727-master' of git://github.com/damyon/moodle 2013-07-29 11:50:00 +12:00
Sam Hemelryk db5ee81576 Merge branch 'MDL-40854' of git://github.com/timhunt/moodle 2013-07-29 11:01:57 +12:00
Sam Hemelryk cfafbd1270 Merge branch 'MDL-40005_lti_headers' of git://github.com/moodlerooms/moodle 2013-07-29 10:53:05 +12:00
Sam Hemelryk 3e76c7fa68 MDL-40842 behat: improved exception + debugging detection 2013-07-29 10:51:55 +12:00
Sam Hemelryk 6269efd29b Merge branch 'MDL-40806-m' of git://github.com/andrewnicols/moodle 2013-07-29 10:49:40 +12:00
Paul Charsley 07df8c38d9 MDL-40548 added mod_assign_get_user_flags and
mod_assign_get_user_mapping
2013-07-29 10:36:17 +12:00
Paul Charsley 912cbaf16d MDL-40547 added marking allocation and workflow to
mod_assign_get_assignments
2013-07-29 09:09:57 +12:00
Sam Hemelryk ac7af0daf5 MDL-40847 moodlelib: coding style + phpdoc clean up 2013-07-29 08:29:28 +12:00
Nadav Kavalerchik a14af68453 MDL-40902 - Align breadcrumbs to the right in RTL mode (theme/clean, bootstrapbase) 2013-07-28 23:21:00 +03:00
Petr Škoda d53111c008 MDL-39915 cleanup core_statslib_testcase 2013-07-28 15:36:26 +02:00
Petr Škoda c78c8aaad2 MDL-39915 fix core_navigationlib_testcase regression 2013-07-28 15:29:33 +02:00
Petr Škoda a9799afe99 MDL-39915 cleanup core_filterlib_testcase 2013-07-28 15:17:57 +02:00
Petr Škoda b33bf039f3 MDL-39915 cleanup core_weblib_testcase 2013-07-28 15:06:23 +02:00
Petr Škoda f5700877ab MDL-39915 cleanup core_upgradelib_testcase 2013-07-28 14:59:03 +02:00
Petr Škoda 2af73e22a0 MDL-39915 cleanup core_text_testcase 2013-07-28 14:58:07 +02:00
Petr Škoda ad6df1bf33 MDL-39915 cleanup core_string_manager_testcase 2013-07-28 14:49:44 +02:00
Petr Škoda 20e561315c MDL-39915 cleanup core_setuplib_testcase 2013-07-28 14:47:02 +02:00
Petr Škoda be14898fb9 MDL-39915 cleanup core_rsslib_testcase 2013-07-28 14:44:43 +02:00
Petr Škoda 3faa26e556 MDL-39915 cleanup core_questionlib_testcase 2013-07-28 14:39:16 +02:00
Petr Škoda 0d123bd71d MDL-39915 cleanup core_pluginlib testcases 2013-07-28 14:36:57 +02:00
Petr Škoda c25a5adb37 MDL-40898 try to hack around the sloppy open file handlers in backup/restore code 2013-07-28 13:29:39 +02:00
Petr Škoda e8875a86be MDL-40900 do not use 32bit unsigned integers
32bit PHP and any Windows PHP breaks otherwise.
2013-07-28 13:10:57 +02:00
Marina Glancy 1171ad564b MDL-40897 avoid extra DB queries in groups_get_activity_groupmode() 2013-07-28 18:47:57 +10:00
AMOS bot c3a2e4aeed Automatically generated installer lang files 2013-07-28 00:42:28 +00:00
Petr Škoda 6125d61530 MDL-39915 cleanup core_outputrequirementslib_testcase 2013-07-27 23:57:33 +02:00
Petr Škoda 0ef084f858 MDL-39915 cleanup outputlib testcases 2013-07-27 23:56:05 +02:00
Petr Škoda 18c4323019 MDL-39915 cleanup core_outputcomponents_testcase 2013-07-27 23:47:54 +02:00
Petr Škoda be6ce11cae MDL-39915 cleanup core_moodlelib_testcase 2013-07-27 21:41:03 +02:00
Petr Škoda e2262d70b0 MDL-39915 cleanup core_modinfolib_testcase 2013-07-27 20:28:37 +02:00
Petr Škoda 2988b725bc MDL-39915 cleanup core_messagelib_testcase 2013-07-27 19:39:47 +02:00
Petr Škoda 8603c6008c MDL-39915 cleanup core_medialib_testcase 2013-07-27 19:21:49 +02:00
Petr Škoda 8603082f64 MDL-39915 cleanup core_mathslib_testcase 2013-07-27 19:07:40 +02:00
Petr Škoda ce14faf87e MDL-39915 cleanup core_markdown_testcase 2013-07-27 18:56:25 +02:00
Petr Škoda aa2432331c MDL-39915 cleanup core_html_writer_testcase 2013-07-27 18:55:15 +02:00
Petr Škoda cd51a94441 MDL-39915 cleanup core_htmlpurifier_testcase 2013-07-27 18:53:12 +02:00
Petr Škoda c53adcaf46 MDL-39915 cleanup core_html2text_testcase 2013-07-27 18:50:42 +02:00
Petr Škoda 87288183a4 MDL-39915 cleanup core_grouplib_testcase 2013-07-27 18:48:18 +02:00
Petr Škoda b8f26f4aa6 MDL-39915 cleanup core_gradelib_testcase 2013-07-27 18:39:33 +02:00
Petr Škoda 78d4a26004 MDL-39915 cleanup core_formslib_testcase 2013-07-27 18:38:34 +02:00
Petr Škoda 0e3f2732b2 MDL-39915 better not touch filter tests, just minor cleanup 2013-07-27 18:34:04 +02:00
Petr Škoda 1d987cb7d8 MDL-39915 cleanup core_filelib_testcase 2013-07-27 18:26:32 +02:00
Petr Škoda 474196f4a5 MDL-39915 cleanup core_externallib_testcase 2013-07-27 18:18:59 +02:00
Petr Škoda e6e632ec6e MDL-39915 cleanup core_eventslib_testcase 2013-07-27 18:11:58 +02:00
Petr Škoda 96deb95070 MDL-39915 cleanup core_event_testcase 2013-07-27 18:06:55 +02:00
Petr Škoda 5b0d1b815f MDL-39915 cleanup core_environment_testcase 2013-07-27 18:01:17 +02:00
Petr Škoda 5c94af1496 MDL-39915 cleanup core_datalib_testcase 2013-07-27 18:00:15 +02:00
Petr Škoda b8daadefb1 MDL-39915 cleanup core_csvclass_testcase 2013-07-27 14:04:13 +02:00
Petr Škoda 8bd5bfa220 MDL-39915 cleanup core_csslib_testcase 2013-07-27 13:59:56 +02:00
Petr Škoda 7db309f31b MDL-39915 cleanup core_coursecatlib_testcase 2013-07-27 13:28:33 +02:00
Petr Škoda 66871ac4cb MDL-39915 cleanup core_configonlylib_testcase 2013-07-27 13:14:41 +02:00
Petr Škoda a2c8e7f423 MDL-39915 cleanup core_conditionlib_testcase 2013-07-27 13:11:36 +02:00
Petr Škoda 67846502de MDL-39915 cleanup core_componentlib_testcase 2013-07-27 12:58:02 +02:00
Petr Škoda 2058e79707 MDL-39915 cleanup core_component_testcase 2013-07-27 12:52:37 +02:00
Petr Škoda 82ff8e2937 MDL-39915 cleanup core_completionlib_testcase 2013-07-27 12:50:21 +02:00
Petr Škoda 5b59bc29d4 MDL-39915 cleanup core_collator_testcase 2013-07-27 11:32:08 +02:00
Petr Škoda 96a58e7e24 MDL-39915 cleanup core_code_testcase 2013-07-27 11:23:36 +02:00
Petr Škoda 3e654ea242 MDL-39915 cleanup core_blocklib_testcase 2013-07-27 11:21:10 +02:00
Petr Škoda 14e6c1e9cc MDL-39915 cleanup core_authlib_testcase 2013-07-27 11:13:28 +02:00
Petr Škoda 05fb92e9dd MDL-39915 cleanup core_admintree_testcase 2013-07-27 11:11:09 +02:00
Petr Škoda 4c9be79acd MDL-39915 cleanup core_accesslib_testcase 2013-07-27 11:10:58 +02:00
AMOS bot 7081e477f2 Merge branch 'master' into install_master 2013-07-27 00:43:08 +00:00
Jean-Michel Vedrine d2fd7262af MDL-39404 Update question/format files to match codechecker standards 2013-07-26 21:32:34 +02:00
Petr Škoda 6763fde8d4 MDL-40891 prevent exceptions when creating directories in file store
Even if cache creation fails moodle should continue working.
2013-07-26 20:28:57 +02:00
Petr Škoda e7451fb5bd 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:27:36 +02:00
Andreas Grabs dd67e1bfc4 MDL-40775 mod_feedback - Undefined variable in feedback activity 2013-07-26 19:43:44 +02:00
Andreas Grabs 28001450d2 MDL-40746 mod_feedback - Feedback forms display oddly in Clean theme 2013-07-26 19:43:39 +02:00
Tim Hunt 68d2f6a008 MDL-35053 questions: question files outside an attempt.
Now update all the places that display files outside attempts to use the
new API.
2013-07-26 13:10:11 +01:00
Tim Hunt 181393aad2 MDL-35053 questions: question files outside an attempt.
Sometimes it is necssary to display parts of a question outside of an
attempt. For example for staff review. When displaying the question, we
need to handle images in the question text. In the past there was a
mechanism for this that could only cope with the question text.

This commit introduces a new method that can handle displaying any
part of the question content.

This commit intentionally does not upgrade the parts of the system that
use the mecanism. That is so that this commit can be used to demonstrate
that backwards-compatibility works. The next commit will upgrade the
callers.
2013-07-26 13:10:08 +01:00
Tim Hunt 9e1fe42150 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:44:43 +01:00
Tim Hunt 7302fbf696 MDL-40857 External tool: fix incorrect moodle_url usage. 2013-07-26 11:40:32 +01:00
Tim Hunt c11ff4be69 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:40:28 +01:00
David Monllao b8335fd56b MDL-40825 behat: Giving time to display the ajax response 2013-07-26 12:38:16 +02:00
Tim Hunt 3c620d7f7c MDL-40867 fix misleading PHPdocs for _get_coursemodule_info 2013-07-26 10:40:39 +01:00
Tim Hunt 3de55d2458 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:40:16 +01:00
Tim Hunt 06ca6cc955 MDL-40863 feedback and LTI mods need get_extra_capabilities fn
Since moodle/site:accessallgroups is relevant to how them.
2013-07-26 10:39:55 +01:00
Tim Hunt cc12ae6c4f 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:38:17 +01:00
Petr Škoda 8e0ba6aa4c MDL-39430 encourage admins to use opcache extension 2013-07-26 10:39:34 +02:00
Petr Škoda 1344bc780a MDL-39786 add support for suspend only in meta course plugin 2013-07-26 10:33:14 +02:00
Petr Škoda 656250de83 MDL-11270 use NVARCHAR(MAX) and VARBINARY(MAX) in SQL Server 2013-07-26 09:28:50 +02:00
Damyon Wiese bdd045c5ec weekly release 2.6dev 2013-07-26 11:24:11 +08:00
Petr Škoda d11b8d0c63 MDL-40808 remove unused DML strings 2013-07-25 12:02:29 +02:00
Dan Poltawski f68c3b0aac Revert "MDL-39770 mod_chat: some tweaks to make it prettier to reduce screen wastage"
This reverts commit 9035e3d24b.
2013-07-25 16:40:45 +08:00
Dan Poltawski 860f4788ab Revert "MDL-39770 mod_chat: cleanup of the Bubble chat theme"
This reverts commit 5f06bf8554.
2013-07-25 16:40:40 +08:00
AMOS bot 6ff2ebd0c4 Automatically generated installer lang files 2013-07-25 00:40:39 +00:00
Mark Nielsen 7358471231 MDL-40870: Icon alt text in External Tool admin settings all read Accept 2013-07-24 14:44:25 -07:00
Mark Nielsen 135b624b0c MDL-40005: LTI module uses Apache specific function for retrieving request headers 2013-07-24 09:07:14 -07:00
Marina Glancy 2c1bbbc58e MDL-29731, MDL-40843 Correctly access course_modinfo->get_groups() 2013-07-24 21:43:56 +10:00
Marina Glancy 2511a97fd6 MDL-29731 Bugs in recent activity when using separate groups 2013-07-24 21:39:26 +10:00
Damyon Wiese 05b659b252 MDL-40727 Cache: Fix file cache store on windows. 2013-07-24 17:04:44 +08:00
Jason Fowler 343dc4ae25 MDL-39748 - Grading - Fixing the increasing height regression
Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-07-24 15:27:54 +08:00
Sam Hemelryk feb34ff4e8 Merge branch 'w30_MDL-23493_m26_fonts' of https://github.com/skodak/moodle 2013-07-24 19:19:47 +12:00
Petr Škoda 964485a3a0 MDL-23493 fix borked regex matching for non-standard font extensions 2013-07-24 08:58:23 +02:00
Petr Škoda 17601a7e12 MDL-39985 add explicit MariaDB support 2013-07-24 10:45:20 +08:00
Paul Nicholls 381e6d7359 MDL-39359 - mod/assign: Allow zipped folder to be uploaded for returning feedback files
The "Upload multiple feedback files in a zip" feature is convenient, but requires that
the files sit directly within the zip file. As the files will most likely be extracted
to a folder after downloading, it's quite reasonable to expect teachers to zip the
folder up rather than selecting all files and zipping them.  This patch allows for a
zipped folder to be uploaded; if the only file found after extracting is a directory,
the contents of the directory are used instead of the results of the extraction.
2013-07-24 13:50:25 +12:00
Frederic Massart a60bc9a35b MDL-32746 libraries: Upgrade redirect for major version
Due to the newly introduced event user_loggedin, the upgrade
could not be reached as the event class was not found during login.
To remedy this, we need to force the upgrade before login.
2013-07-24 09:30:15 +08:00
Marina Glancy c59a65b273 MDL-40766 Smarter positioning of tinymce button 2013-07-24 10:58:32 +10:00
Charles Fulton fe96447b2b MDL-38759 mod_choice: use inline-block for horizontal choices 2013-07-23 17:36:55 -07:00
Sam Hemelryk 904c38b31d Merge branch 'wip-MDL-37869-master' of git://github.com/phalacee/moodle 2013-07-24 11:28:26 +12:00
Sam Hemelryk d853f819dc Merge branch 'MDL-40315_master' of git://github.com/dmonllao/moodle 2013-07-24 11:14:14 +12:00
Eloy Lafuente (stronk7) 154bc6b240 Merge branch 'w30_MDL-40642_m26_umask' of https://github.com/skodak/moodle 2013-07-23 23:42:11 +02:00
Eloy Lafuente (stronk7) 8f9b2980b7 Merge branch 'MDL-39704_master' of https://github.com/nadavkav/moodle 2013-07-23 23:21:38 +02:00
Eloy Lafuente (stronk7) e5ae5c1247 MDL-40801 Update versions in thirdpartylibs.xml 2013-07-23 23:11:24 +02:00
Eloy Lafuente (stronk7) 7613bc7c3a Merge branch 'w30_MDL-40801_m26_jquery' of https://github.com/skodak/moodle 2013-07-23 23:06:35 +02:00
Eloy Lafuente (stronk7) 8c573a9536 Merge branch 'w30_MDL-40627_m26_extramemorylimit' of https://github.com/skodak/moodle 2013-07-23 23:04:13 +02:00
Eloy Lafuente (stronk7) ae2605ec8d Merge branch 'wip-MDL-40540-m26' of git://github.com/samhemelryk/moodle 2013-07-23 22:56:34 +02:00
Eloy Lafuente (stronk7) 01994ecee9 Merge branch 'MDL-40544_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:39:13 +02:00
Eloy Lafuente (stronk7) 6aa9735cb0 Merge branch 'MDL-40589_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:34:16 +02:00
Eloy Lafuente (stronk7) 6abf3556fd Merge branch 'MDL-40189_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:28:54 +02:00
Eloy Lafuente (stronk7) 172dda0090 Merge branch 'MDL-40071_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:10:08 +02:00
Eloy Lafuente (stronk7) 18c4d7e68c Merge branch 'w30_MDL-40723_m26_creators' of https://github.com/skodak/moodle 2013-07-23 20:32:40 +02:00
Eloy Lafuente (stronk7) cbc4aa8cfe Merge branch 'w30_MDL-40796_m26_citycountry' of https://github.com/skodak/moodle 2013-07-23 20:29:43 +02:00
Eloy Lafuente (stronk7) 070a1bf23f Merge branch 'w30_MDL-40809_m26_olduserimages' of https://github.com/skodak/moodle 2013-07-23 18:58:03 +02:00
Eloy Lafuente (stronk7) 288ba37a56 Merge branch 'w30_MDL-40679_m26_zlib' of https://github.com/skodak/moodle 2013-07-23 18:20:50 +02:00
Eloy Lafuente (stronk7) 79143f1e59 Merge branch 'MDL-40816_master' of git://github.com/markn86/moodle 2013-07-23 18:18:52 +02:00
Eloy Lafuente (stronk7) 30a209ba17 Merge branch 'MDL-40785' of git://github.com/timhunt/moodle 2013-07-23 17:50:38 +02:00
Eloy Lafuente (stronk7) 97c51dfb22 Merge branch 'MDL-40672_master' of git://github.com/dmonllao/moodle 2013-07-23 17:45:22 +02:00
Eloy Lafuente (stronk7) 2c72cc23b2 Merge branch 'MDL-40595_master' of git://github.com/dmonllao/moodle 2013-07-23 17:17:13 +02:00
Eloy Lafuente (stronk7) e71c47bf8c MDL-40700 tests: skip if there is not instance
Various reasons can lead to the cache stores not being available
(missing extension, configuration...). Under those situations
the test must be skipped because for sure it will break if
we continue.
2013-07-23 17:00:02 +02:00
Petr Škoda c6f5e84f9d MDL-40723 fix docs typo 2013-07-23 15:59:02 +02:00
Petr Škoda 54d5308ef0 MDL-40723 use guess_if_creator_will_have_course_capability() for the new weird function 2013-07-23 15:55:07 +02:00
Eloy Lafuente (stronk7) 9e1e94aafa Merge branch 'wip-MDL-40700-m26' of git://github.com/samhemelryk/moodle 2013-07-23 13:58:20 +02:00
Eloy Lafuente (stronk7) aa837b2fe6 Merge branch 'wip-MDL-40762-m26' of git://github.com/samhemelryk/moodle 2013-07-23 13:50:06 +02:00
Eloy Lafuente (stronk7) 8c2ed57043 Merge branch 'wip-MDL-40763-m26' of git://github.com/samhemelryk/moodle 2013-07-23 13:19:41 +02:00
Eloy Lafuente (stronk7) d4731fd002 Merge branch 'wip-MDL-40677-m26' of git://github.com/samhemelryk/moodle 2013-07-23 12:52:50 +02:00
Eloy Lafuente (stronk7) 3b117e79ce Merge branch 'MDL-40082_master' of https://github.com/nadavkav/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 12:16:11 +02:00
Russell Smith 3e7e2ab2ee MDL-40618 backup: centralize info field, use info in queries.
encode_backup_temp_info() and decode_backup_temp_info() have been
introduced to keep the info field encoding in one place.
Many locations used get_backup_ids_record() to obtain info, that
makes lots of calls to get_backup_ids_record() which can be slow.
We now complete all those inline by adding the info field to the query.
To reduce memory usage, all queries of that nature have been changed
to use get_recordset_*. gzcompress was introduced if available to minimize
traffic to/from the database and to decrease the memory required for caching.
The compression time is saved by the benefits in other places of having smaller data.
2013-07-23 19:50:53 +10:00
Dan Poltawski d96fcecc86 Merge branch 'MDL-20609' of git://github.com/timhunt/moodle 2013-07-23 16:44:32 +08:00
Dan Poltawski 80a1b08d40 Merge branch 'MDL-40480' of git://github.com/timhunt/moodle 2013-07-23 16:41:45 +08:00
Damyon Wiese 0b92270b19 Merge branch 'MDL-38863_master' of git://github.com/dmonllao/moodle 2013-07-23 16:04:50 +08:00
Jamie Pratt e39a2faa58 MDL-40729 check marks and grades from quiz attempts
compare to marks in csv file.
2013-07-23 16:04:13 +08:00
Frederic Massart d735f3d8f3 MDL-32746 phpunit: Adding auth/tests to PHPUnit core suites 2013-07-23 16:01:45 +08:00
Jamie Pratt da6bb0c506 MDL-40076 Build entire quiz attempts by supplying attempt
data for each question in the quiz, pulling responses
from a csv file.
2013-07-23 15:59:53 +08:00
Damyon Wiese 0070cb8bca Merge branch 'MDL-40295' of git://github.com/rwijaya/moodle 2013-07-23 15:51:59 +08:00
David Monllao a090296740 MDL-40672 behat: New activities data generator 2013-07-23 09:47:36 +02:00
David Monllao 72ddc05f67 MDL-38863 behat: Role assign generator 2013-07-23 09:46:39 +02:00
Jamie Pratt a3c5150b2a MDL-40714 pass through simulated data to sub questions
in multi-answer question type
2013-07-23 15:29:28 +08:00
Jamie Pratt c2b051c7aa MDL-40542 need to be able to select variant
in unit tests
2013-07-23 15:11:56 +08:00
Jamie Pratt c2f2e7f008 MDL-40541 need to be able to select random q
in unit tests
2013-07-23 15:08:32 +08:00
Jamie Pratt 388f047345 MDL-40543 convert from simulated responses
to post data
2013-07-23 15:00:02 +08:00
Damyon Wiese 6064e5cc00 Merge branch 'MDL-32746-master' of git://github.com/FMCorz/moodle 2013-07-23 14:49:42 +08:00
Dan Poltawski 5432ccec64 Merge branch 'wip_MDL-40778_v2' of https://github.com/jamiepratt/moodle 2013-07-23 14:26:35 +08:00
Damyon Wiese 7ea41b4a94 Merge branch 'wip-MDL-39748-master' of git://github.com/phalacee/moodle 2013-07-23 14:16:31 +08:00
Damyon Wiese 683bd5b15e MDL-28019 tinymce managefiles: change tabs to spaces 2013-07-23 14:14:08 +08:00
Marina Glancy 9e88661e58 MDL-28019 Added plugin tinymce_managefiles 2013-07-23 14:12:55 +08:00
Marina Glancy 1d94557373 MDL-28019 Added plugin repository_areafiles 2013-07-23 14:12:45 +08:00
Dan Poltawski a0035108b0 MDL-40585 fix trailing whitespace 2013-07-23 13:33:49 +08:00
Dan Poltawski 33b6da7f59 Merge branch 'MDL-40585_grouped_parent_exists' of git://github.com/mr-russ/moodle 2013-07-23 13:33:27 +08:00
Dan Poltawski 151d915c54 Merge branch 'MDL-40719' of git://github.com/timhunt/moodle 2013-07-23 13:27:32 +08:00
Dan Poltawski 3ee8607d46 Merge branch 'MDL-40584' of https://github.com/mr-russ/moodle 2013-07-23 12:35:41 +08:00
Jason Fowler 7e222836f0 MDL-39748 - Grading Methods - Fixing input field widths for Rubrics 2013-07-23 12:06:38 +08:00
Frederic Massart 3b086e3094 MDL-32746 core: Implement new user_loggedin event 2013-07-23 11:36:35 +08:00
Dan Poltawski 35c1179047 Merge branch 'MDL-40793_profile_compare' of https://github.com/mr-russ/moodle 2013-07-23 10:42:02 +08:00
Damyon Wiese 9ced78bd3e Merge branch 'wip-MDL-40648-master' of git://github.com/marinaglancy/moodle
Conflicts:
	version.php
2013-07-23 10:37:20 +08:00
Sam Hemelryk deeae9c155 Merge branch 'MDL-40680-master' of git://github.com/danpoltawski/moodle 2013-07-23 14:14:27 +12:00
Sam Hemelryk 18474f822b Merge branch 'MDL-40666-master' of git://github.com/danpoltawski/moodle 2013-07-23 14:09:08 +12:00
Dan Poltawski 131580860b Merge branch 'MDL-35674-form-dependencies' of https://github.com/andrewnicols/moodle 2013-07-23 10:01:59 +08:00
Sam Hemelryk 97ff2341b3 Merge branch 'master_MDL-40702' of git://github.com/danmarsden/moodle 2013-07-23 13:59:16 +12:00
Eloy Lafuente (stronk7) 4238060a9b Merge branch 'wip-MDL-38707-master' of git://github.com/marinaglancy/moodle 2013-07-23 03:52:16 +02:00
AMOS bot f8d14fc038 Automatically generated installer lang files 2013-07-23 00:39:23 +00:00
Jason Fowler 0ebd16d2b2 MDL-37869 - Course - Removing the ALT text from activity and resource icons as it duplicated the accesshide text 2013-07-23 08:08:24 +08:00
Sam Hemelryk 07724a9cee Merge branch 'MDL-39695_master' of git://github.com/kordan/moodle 2013-07-23 12:00:59 +12:00
Sam Hemelryk 031ef3f871 Merge branch 'MDL-40670-master' of git://github.com/barbararamiro/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 11:57:50 +12:00
Sam Hemelryk 092a99ef08 Merge branch 'MDL-40799-m' of git://github.com/andrewnicols/moodle 2013-07-23 11:12:39 +12:00
Sam Hemelryk d0ed9d6375 Merge branch 'MDL-40788-m' of git://github.com/andrewnicols/moodle 2013-07-23 11:12:34 +12:00
Eloy Lafuente (stronk7) 6d0085ef24 Merge branch 'MDL-40123_master' of git://github.com/dmonllao/moodle 2013-07-23 01:09:52 +02:00
Sam Hemelryk 374f7b1d28 Merge branch 'MDL-40787-m' of git://github.com/andrewnicols/moodle 2013-07-23 11:07:53 +12:00
Sam Hemelryk 0ad4bcd102 Merge branch 'MDL-39770_chat' of https://github.com/andyjdavis/moodle 2013-07-23 11:06:08 +12:00
Eloy Lafuente (stronk7) 63ff2c5c2f Merge branch 'MDL-39635_master' of git://github.com/dmonllao/moodle 2013-07-23 00:45:13 +02:00
Eloy Lafuente (stronk7) f2515968d2 Merge branch 'wip-MDL-33563-master' of git://github.com/marinaglancy/moodle 2013-07-22 22:36:23 +02:00
Yuliya Bozhko 3752d8236d MDL-39461 badges: Fix cURL expectation failed error when trying to connect to backpack 2013-07-23 08:21:04 +12:00
Eloy Lafuente (stronk7) 59af378baf Merge branch 'w30_MDL-40795_m26_ajaxerrordisplay' of https://github.com/skodak/moodle 2013-07-22 18:56:40 +02:00
Eloy Lafuente (stronk7) 252e545e9f Merge branch 'MDL-40626-master' of git://github.com/danpoltawski/moodle 2013-07-22 17:40:03 +02:00
Mark Nelson 888e317f2d MDL-40816 backup: code cleanup on the manage backups form 2013-07-22 18:15:07 +08:00
Mark Nelson 8874895892 MDL-40816 backup: added missing setType calls to the manage backups form 2013-07-22 18:15:00 +08:00
Dan Poltawski b3a570b56e Merge branch 'w30_MDL-38867_m26_gspell' of https://github.com/skodak/moodle 2013-07-22 17:00:40 +08:00
Damyon Wiese dc6b786446 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:12:26 +08:00
Damyon Wiese e3a96804ef Merge branch 'master_MDL-40260' of git://github.com/danmarsden/moodle 2013-07-22 16:09:29 +08:00
Damyon Wiese bbc8485708 Merge branch 'wip-MDL-40174-m26' of git://github.com/samhemelryk/moodle 2013-07-22 16:00:41 +08:00
Dan Poltawski 7a3f9421cb Merge branch 'w30_MDL-40545_m26_localcachedir' of https://github.com/skodak/moodle 2013-07-22 15:47:48 +08:00
Damyon Wiese c31909cb69 Merge branch 'w30_MDL-39846_m26_event2' of https://github.com/skodak/moodle 2013-07-22 15:05:53 +08:00
Dan Poltawski 27e2400782 Merge branch 'MDL-38837_dev' of https://github.com/totara/openbadges 2013-07-22 15:01:26 +08:00
Dan Poltawski 82d1dc3f17 Merge branch 'wip-MDL-40121-master' of git://github.com/marinaglancy/moodle 2013-07-22 14:36:29 +08:00
Jamie Pratt 09ff04bcfe MDL-40778 clear cache for random questions between tests 2013-07-22 11:12:21 +07:00
Damyon Wiese 91313e43ca Merge branch 'MDL-40649_master' of https://github.com/markn86/moodle 2013-07-22 12:11:43 +08:00
Damyon Wiese c39423139d Merge branch 'MDL-40468_master' of https://github.com/markn86/moodle 2013-07-22 11:47:21 +08:00
Dan Poltawski 51425cc045 Merge branch 'MDL-39441_master' of git://github.com/dmonllao/moodle 2013-07-22 10:45:42 +08:00
Dan Poltawski 7bdae0924f Merge branch 'wip-MDL-37333_master' of git://github.com/gjb2048/moodle 2013-07-22 10:27:11 +08:00
Russell Smith 5f052b571f MDL-40793 profiling: Allow multiple reference runs in display 2013-07-22 12:12:58 +10:00
Matt Petro 2f8edd067f MDL-35674 formslib: Optimized disabledIf javascript for large forms 2013-07-22 00:08:18 +01:00
Sam Hemelryk 75eb202ebd MDL-40174 navigation: don't remove active root nodes without children 2013-07-22 10:48:59 +12:00
Sam Hemelryk 83fa6ab6ee MDL-40540 dock: the dock loader is now a proper sub module 2013-07-22 10:46:46 +12:00
Sam Hemelryk 67da59999a MDL-40677 cache: fixed bug with maxsize when setting 2013-07-22 10:42:04 +12:00
Sam Hemelryk 6f6a8dd19e MDL-40677: cachestore_static: implemented support for maxsize 2013-07-22 10:42:04 +12:00
Sam Hemelryk cb3590091e MDL-40677: cachestore_session: implemented support for maxsize 2013-07-22 10:42:04 +12:00
Sam Hemelryk 7dfa10b02e MDL-40700 cache: memcache and memcached stores now allow alphanumext prefixes 2013-07-22 10:41:38 +12:00
Chris Wharton a423acd95c MDL-40700 cache: Validate memcache key prefix field 2013-07-22 10:41:37 +12:00
Sam Hemelryk e9d412b3f8 MDL-40700 pagelib: cleaned up phpdocs 2013-07-22 10:41:17 +12:00
Sam Hemelryk 923f1c420c MDL-40700 cache: fixed cache store unit tests 2013-07-22 10:40:45 +12:00
Petr Škoda fb33dd9611 MDL-40809 remove after 10 years old default user images 2013-07-21 18:20:09 +02:00
Petr Škoda dba745265f MDL-40723 use will_have_course_capability() to verify future course creator capabilities when creating courses 2013-07-21 17:03:20 +02:00
Petr Škoda a56ec91842 MDL-40723 add new will_have_course_capability() 2013-07-21 11:55:22 +02:00
Andrew Nicols ce286101f0 MDL-40806 JavaScript: Add module metadata in JS dev modes 2013-07-21 10:41:49 +01:00
Petr Škoda 09bacfd7ae MDL-40801 import latest jQuery and jQuery UI 2013-07-20 21:58:17 +02:00
Andrew Nicols 7868699535 MDL-40678 JavaScript: Split out moodle-core-notification into submodules 2013-07-20 20:21:31 +01:00
Petr Škoda bb42e608b0 MDL-40679 mark zlib extension as recommended 2013-07-20 21:18:20 +02:00
Petr Škoda ff539362a6 MDL-40796 do not require city and country when uploading users 2013-07-20 21:04:31 +02:00
Andrew Nicols fbd3143412 MDL-40799 JavaScript: Correct tooltip dependency on cache-base 2013-07-20 16:20:44 +01:00
Petr Škoda 0a08cb4030 MDL-40627 add 2G extramemorylimit option to admin UI and use the same units in config-dist.php to prevent confusion
Credit goes to Julien Boulen, thanks for spotting this.
2013-07-20 15:02:51 +02:00
Petr Škoda cb9ee2a953 MDL-40795 enable NO_DEBUG_DISPLAY in AJAX_SCRIPT by default
This should prevent some ajax problems in incorrectly configured production sites.

Note that developers need to learn to watch error logs all the time during development!
2013-07-20 14:23:03 +02:00
Petr Škoda 64a8058e18 MDL-40545 convert font cache to localcachedir 2013-07-20 14:11:40 +02:00
Petr Škoda cb8108dd22 MDL-40545 convert js and theme resources to localcachedir 2013-07-20 14:10:25 +02:00
Petr Škoda 85b3806114 MDL-40545 add $CFG->localcachedir intended for local caching on cluster nodes 2013-07-20 14:10:25 +02:00
Petr Škoda 37824e73f9 MDL-23493 allow numbers in components used in CSS placeholders 2013-07-20 13:08:35 +02:00
Petr Škoda 9ba6076cff MDL-23493 add support for theme fonts 2013-07-20 12:47:08 +02:00
AMOS bot f93bf4aecb Automatically generated installer lang files 2013-07-20 00:44:25 +00:00
Andrew Nicols 4a57ba7ebb MDL-40788 Profile: Remove debugging code displayed on profile page 2013-07-19 15:21:04 +01:00
Tim Hunt 7dcb9b0616 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:15:18 +01:00
Andrew Nicols 26f1e036e3 MDL-40787 Forum: Remove old commented-out code from forum 2013-07-19 15:04:13 +01:00
Tim Hunt 23a6a878ee MDL-40719 pluginfile.php: the file API is now stable, so hide debug. 2013-07-19 12:06:00 +01:00
Tim Hunt 60bfa04693 MDL-40480 tablelib: specify charset in XHMTL downloads.
Thanks to Jürgen Zimmer for the suggestion.
2013-07-19 12:05:39 +01:00
Tim Hunt 8dbcbe2101 MDL-20609 quiz tables: improve layout for long cell contents.
By allowing more wrapping.
2013-07-19 11:47:14 +01:00
Mark Nelson 02ca2cada5 MDL-40649 libraries: deprecated get_recent_enrolments() 2013-07-19 18:17:31 +08:00
David Monllao 8cda2e6fe7 MDL-40123 behat: Show all of form's elements changes.
* Avoid waiting until Show more... links appears if we
  already waited.
* Use collapse/expand button rather than clicking on
  each of the form's fieldsets.
2013-07-19 10:03:39 +02:00
David Monllao 3897608152 MDL-39635 behat: XPath cleanups
- Escaping steps arguments redirected to other steps
- Adding normalized-space() in all contains() assertions
- General xpaths review
- Convering provided xpath text strings to xpath literals
  to avoid problems with arguments containing both single
  quotes and double quotes
2013-07-19 10:02:36 +02:00
David Monllao dedb973878 MDL-39635 behat: Replacing hardcoded language strings
Using get_string() instead.
2013-07-19 10:02:10 +02:00
David Monllao 3194dc83ca MDL-39635 behat: Fixing line breaks
Not supported by Windows OSs.
2013-07-19 10:02:10 +02:00
Petr Škoda e4d3403e58 MDL-38867 remove Google spell checking option 2013-07-19 09:31:50 +02:00
Petr Škoda eb1ee665f6 MDL-40642 use this->cfg in local file store when fixing permissions 2013-07-19 09:18:44 +02:00
Petr Škoda eb459f7192 MDL-40642 set more restrictive umask and use proper permission for new dirs and files 2013-07-19 09:18:44 +02:00
Mark Nelson 4e829d48d1 MDL-40468 libraries: removed usages of get_related_contexts_string() in core
Also tidied up the functions by removing unused parameters.
2013-07-19 15:17:50 +08:00
Mark Nelson b645284403 MDL-40468 libraries: deprecated get_related_contexts_string() 2013-07-19 15:17:49 +08:00
Petr Škoda 82b1fb5184 MDL-39846 make all legacy info protected so that it is not used accidentally outside of trigger() 2013-07-19 09:00:42 +02:00
Petr Škoda fd4f3e9e8e MDL-39846 lock down snapshot handling in event 2013-07-19 08:46:29 +02:00
Petr Škoda 006f2724a5 MDL-39846 fix forgotten object event property
Thanks Dan!
2013-07-19 08:43:31 +02:00
Petr Škoda fb23739e8d MDL-39846 prevent data modification from event init() method 2013-07-19 08:43:31 +02:00
Petr Škoda ef1987dcdd MDL-39846 use new special value -1 in $CFG->loglifetime to prevent legacy logging 2013-07-19 08:43:31 +02:00
Petr Škoda 132eff909c MDL-39846 rename the $object var to match the property name
Thanks Fred again.
2013-07-19 08:43:31 +02:00
Petr Škoda 660f049f09 MDL-39846 rename object property to target
Credit goes to Fred, this should be easier to understand.
2013-07-19 08:43:31 +02:00
Petr Škoda c61a3a5c94 MDL-39846 improve docs 2013-07-19 08:43:31 +02:00
Petr Škoda f8a39659aa MDL-39846 remove contextlevel validation
Do this in new validate_data() instead, thanks Fred.
2013-07-19 08:43:30 +02:00
Petr Škoda 2d36d49860 MDL-39846 fix comment typos
Thanks Fred!
2013-07-19 08:43:30 +02:00
Petr Škoda 097011c450 MDL-39846 simplify context parameter when creating new evetns 2013-07-19 08:43:30 +02:00
Petr Škoda fddd1018f6 MDL-39846 improve validation and enable hardcoding of system context 2013-07-19 08:43:30 +02:00
Petr Škoda 4ad6d5c589 MDL-39846 prevent use of snapshots in restored events 2013-07-19 08:43:30 +02:00
Petr Škoda 300dbc66f2 MDL-39846 prevent adding of snapshots after event trigger 2013-07-19 08:43:30 +02:00
Petr Škoda 9cd7c32524 MDL-39846 improve docs and fix use of deprecated classes 2013-07-19 08:43:30 +02:00
Petr Škoda b396d40e93 MDL-39846 fix name of property for record snapshots 2013-07-19 08:43:29 +02:00
Petr Škoda 890e3e6415 MDL-39846 improve role assignment tests 2013-07-19 08:43:29 +02:00
Petr Škoda ed17808d99 MDL-39846 add event property iterator 2013-07-19 08:43:29 +02:00
Petr Škoda 27af3e625c MDL-39846 require context when creating events
No more guessing or falling back to system context.
2013-07-19 08:43:29 +02:00
Petr Škoda 62401e8fd5 MDL-39846 implement event sink for unit testing 2013-07-19 08:43:29 +02:00
Petr Škoda a85258cac8 MDL-39846 introduce new objecttable property 2013-07-19 08:43:29 +02:00
Petr Škoda 5fef139cd9 MDL-39846 rename cached record to snapshot 2013-07-19 08:43:28 +02:00
Petr Škoda b0cdc969f7 MDL-39846 use word 'extra' for special log fields 2013-07-19 08:43:28 +02:00
Petr Škoda c4297815eb MDL-39846 rename 'extra' event property to 'other' 2013-07-19 08:43:28 +02:00
Petr Škoda 605a8c336f MDL-39846 add more magic and improve tests 2013-07-19 08:43:28 +02:00
Petr Škoda 05a970d3be MDL-39846 add logging TODOs 2013-07-19 08:43:28 +02:00
Petr Škoda 2262656430 MDL-39846 protect event dispatching process 2013-07-19 08:43:28 +02:00
Petr Škoda 4b734e74ae MDL-39846 more fixing and cleanup of new events
* fix typos (thanks Rajesh)
* move log related data out from event API specification
* change callable key in definition to callback
* use event data in observers instead of cached records if possible
* event level is now a number 1…100
* improved event safety checks
* add event name and description method
* new can_view() method
* improve unit tests to test all callable types
* improved performance
2013-07-19 08:43:27 +02:00
Petr Škoda e99a209094 MDL-39846 convert enrol_category to new events and class loader 2013-07-19 08:43:27 +02:00
Petr Škoda b474bec396 MDL-39846 sample conversion of role assignment events 2013-07-19 08:43:27 +02:00
Petr Škoda d8a1f4263a MDL-39846 implement new event dispatching and base event class 2013-07-19 08:43:27 +02:00
Marina Glancy f6937172f3 MDL-38707 Display module name when the folder is displayed inline 2013-07-19 15:52:23 +10:00
Marina Glancy 09b83b85de MDL-33563 Version bump for grading methods API change 2013-07-19 15:13:24 +10:00
Marina Glancy 170f6e60a2 MDL-33563 Grading methods allow decimal grades 2013-07-19 15:12:40 +10:00
Marina Glancy de685c7d25 MDL-40648 annotated new functions in upgrade.txt 2013-07-19 14:29:14 +10:00
Marina Glancy 184518f994 MDL-40648 unittests for editor_tinymce_plugin 2013-07-19 14:29:14 +10:00
Marina Glancy 8780bf1b7e MDL-40648 Make sure the button is added in the correct row
previously code expected to find the button in particular row but the tinymce setting may change the buttons' layout
2013-07-19 14:29:14 +10:00
Marina Glancy c276b739fd MDL-40648 Use new function in parent class, increase sortorder. 2013-07-19 14:29:09 +10:00
Marina Glancy cbc2444e8a MDL-40648 Added useful functions find_button() and count_button_rows() 2013-07-19 14:13:18 +10:00
Tim Lock 986c833743 MDL-40626 gradebook: Prevent incorrect override with multiline feedback
The quick grading option doesn't allow mutliline editing.
2013-07-19 12:00:24 +08:00
Damyon Wiese ffc3f5308b weekly release 2.6dev 2013-07-19 09:47:55 +08:00
Damyon Wiese e4ef98006f Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-07-19 09:19:29 +08:00
Eloy Lafuente (stronk7) dbdfd37709 Merge branch 'wip_MDL-40074' of https://github.com/jamiepratt/moodle 2013-07-18 20:22:47 +02:00
Nadav Kavalerchik 94462b56de MDL-40082 - Several UI fixes for question chooser dialog, when in RTL/LTR modes (theme/clean, bootstrapbase) 2013-07-18 20:13:03 +03:00
Nadav Kavalerchik e22b3e2ecb MDL-40071 - Right align category titles and usernames in gradebook (theme/clean, bootstrapbase) 2013-07-18 19:25:19 +03:00
Nadav Kavalerchik 67685680cf MDL-39704 - Properly align and widen the chat bubbles in mod/chat, when in RTL mode 2013-07-18 18:58:09 +03:00
Nadav Kavalerchik 8d223d7140 MDL-40189 - Theme/Clean - Right align form labels and left align form input elements on admin pages, system wide (when in RTL mode) 2013-07-18 18:30:33 +03:00
Nadav Kavalerchik 54e0dbe89a MDL-40544 - Right align all tables (system wide) in RTL mode (theme/clean , bootstrapbase) 2013-07-18 16:14:46 +03:00
Nadav Kavalerchik 2746c04b43 MDL-40589 - Theme/CLEAN - Flip YUI3 tree item icon in RTL mode in folder resource 2013-07-18 16:05:33 +03:00
Damyon Wiese 84c5f6416e 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:45:44 +08:00
David Monllao 401f60d576 MDL-39441 behat: New setting to expand the list of allowed settings 2013-07-18 10:41:20 +02:00
David Monllao f38e22ed91 MDL-39441 behat: Restrict config.php allowed settings 2013-07-18 10:40:47 +02:00
Rossiani Wijaya 74eab231f7 MDL-40295 wiki mod: fix set_url() error for printer friendly page.
Additionally, fix wiki pagelayout for printing
2013-07-18 10:47:07 +08:00
Frederic Massart f45d70882e MDL-13114 tool_uploadcourse: Fixed typo in CLI help 2013-07-18 11:41:01 +10:00
Yuliya Bozhko 2c9108611d MDL-38837 badges: Check for http or https in badges backpack support 2013-07-18 13:38:18 +12:00
Gareth J Barnard 32b0c69649 MDL-37333 theme: Fix 'Clear theme caches' redirect. 2013-07-17 14:42:50 +01:00
Eloy Lafuente (stronk7) 07e045b844 MDL-39926 SCORM: objetives report now core plugin 2013-07-17 11:06:05 +02:00
Dan Poltawski c5ceaeaf5e MDL-40604 course: remove deprecated function
* course_delete_module was calling delete_event
* Also fix missing inclusion from 379cd2d4
2013-07-17 14:11:11 +08:00
Dan Poltawski e52c1ea65d MDL-40604 course: add test to cover course_delete_module 2013-07-17 14:11:10 +08:00
Dan Poltawski caf8d39b17 MDL-40604 wiki: fix use of print_container 2013-07-17 14:11:10 +08:00
Damyon Wiese afe36b8411 MDL-35851 Lesson: Check/fix the page order every time the pages are loaded 2013-07-17 13:04:04 +08:00
Marina Glancy 73f0d9b638 Merge branch 'MDL-40701-master' of git://github.com/danpoltawski/moodle 2013-07-17 12:45:18 +10:00
Dan Marsden 57f32aa32e MDL-40702 SCORM: - use iframe instead of object - iframe is supported better. 2013-07-17 14:32:20 +12:00
Dan Poltawski f7d8f38e21 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:29:25 +08:00
Frederic Massart 0d352dbcdd MDL-40424 user: Incorrect use of named parameters 2013-07-17 11:52:47 +10:00
prateeksachan 9ac3d68648 MDL-40420: timemodified field update when lesson_page is updated 2013-07-17 07:22:37 +05:30
Marina Glancy 576151c987 Merge branch 'MDL-40478-m' of git://github.com/andrewnicols/moodle 2013-07-17 11:09:08 +10:00
AMOS bot d9a5196933 Automatically generated installer lang files 2013-07-17 00:42:25 +00:00
Eloy Lafuente (stronk7) 379cd2d4e3 MDL-40604 Fix 2 uses causing unit test failures
There are still a lot of deprecated uses in core
that we should move to the new counterparts ASAP.

This commit just fixes the 2 deprecated uses that
are causing unit tests to fail.
2013-07-17 02:34:07 +02:00
Eloy Lafuente (stronk7) 6a30b48dff MDL-40424 vomit back wrongly digested brace, grrr. 2013-07-17 01:43:11 +02:00
Eloy Lafuente (stronk7) fb1788c598 Merge branch 'MDL-40424-master' of git://github.com/FMCorz/moodle
Conflicts:
	admin/oacleanup.php
2013-07-17 01:21:51 +02:00
Eloy Lafuente (stronk7) 68d9f13273 Merge branch 'MDL-40477-m' of git://github.com/andrewnicols/moodle 2013-07-17 01:13:17 +02:00
Eloy Lafuente (stronk7) 0b3af0798c Merge branch 'w29_MDL-40220_m26_core_component' of https://github.com/skodak/moodle 2013-07-17 01:07:21 +02:00
Eloy Lafuente (stronk7) afda9e2279 Merge branch 'wip-MDL-40634-m26' of git://github.com/samhemelryk/moodle 2013-07-17 00:58:26 +02:00
Eloy Lafuente (stronk7) a6149155c0 Merge branch 'wip-MDL-40635-m26' of git://github.com/samhemelryk/moodle 2013-07-17 00:43:45 +02:00
Eloy Lafuente (stronk7) f28051143f Merge branch 'MDL-40652_master' of git://github.com/lazydaisy/moodle 2013-07-17 00:41:15 +02:00
Eloy Lafuente (stronk7) 2be1185132 Merge branch 'w29_MDL-40611_m26_accesslibtest' of https://github.com/skodak/moodle 2013-07-17 00:32:32 +02:00
Eloy Lafuente (stronk7) b8d73bd58e Merge branch 'w29_MDL-40546_m26_jscache' of https://github.com/skodak/moodle 2013-07-17 00:30:13 +02:00
Eloy Lafuente (stronk7) a980261984 Merge branch 'MDL-40536-master' of git://github.com/danpoltawski/moodle 2013-07-17 00:24:10 +02:00
Eloy Lafuente (stronk7) 660ee07b60 Merge branch 'MDL-40604-master' of git://github.com/danpoltawski/moodle 2013-07-17 00:22:15 +02:00
Eloy Lafuente (stronk7) 3742ee163b Merge branch 'MDL-40690_master' of git://github.com/dmonllao/moodle 2013-07-17 00:17:30 +02:00
Petr Škoda cc8fecb5ed MDL-40220 improve lib/upgrade.txt info for the new core_component class and deprecated functions 2013-07-16 22:43:31 +02:00
Petr Škoda b0d1d941c9 MDL-40220 use new core_component::get_component_directory() 2013-07-16 22:42:37 +02:00
Petr Škoda 56da374e1e MDL-40220 use new core_component::normalize_component() 2013-07-16 22:41:00 +02:00
Petr Škoda 1c74b26090 MDL-40220 use new core_component::get_plugin_directory() 2013-07-16 22:38:38 +02:00
Petr Škoda 059e08ed92 MDL-40220 use new core_component::get_plugin_list_with_class() 2013-07-16 22:37:15 +02:00
Petr Škoda bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
Petr Škoda 46f6f7f224 MDL-40220 use new core_component::get_plugin_types() 2013-07-16 22:31:48 +02:00
Eloy Lafuente (stronk7) 55fcd9323e Merge branch 'MDL-38857_master' of git://github.com/dmonllao/moodle 2013-07-16 22:02:18 +02:00
Eloy Lafuente (stronk7) e28ae962be Merge branch 'w29_MDL-40423_m26_localsubdir' of https://github.com/skodak/moodle 2013-07-16 21:55:46 +02:00
Eloy Lafuente (stronk7) 4c8bba6686 MDL-39926 SCORM: Adapt report to alt name fields 2013-07-16 18:34:59 +02:00
Eloy Lafuente (stronk7) 88ad6d0a99 Merge branch 'master_MDL-39926' of git://github.com/danmarsden/moodle 2013-07-16 18:34:58 +02:00
David Monllao 39ec828571 MDL-40690 behat: Ignore StaleElementReference exception
Is another of the exceptions thrown by
Selenium when it tries to interact with
an element that disappeared from the DOM,
in happens randomly when redirecting the
user to another page with a wait period to
show him/her a message.
2013-07-16 16:45:12 +02:00
Damyon Wiese 1d1f7ac81f Merge branch 'MDL-40463-master' of git://github.com/FMCorz/moodle 2013-07-16 21:59:47 +08:00
Damyon Wiese 3fd74243a7 Merge branch 'wip-mdl-40467' of git://github.com/rajeshtaneja/moodle 2013-07-16 21:51:19 +08:00
Damyon Wiese 820ad5dfd8 Merge branch 'MDL-40465-master' of git://github.com/FMCorz/moodle 2013-07-16 21:35:38 +08:00
Damyon Wiese b30a12db52 Merge branch 'wip-MDL-40621-master' of git://github.com/marinaglancy/moodle 2013-07-16 21:29:58 +08:00
Damyon Wiese 59e649180d Merge branch 'w29_MDL-40574_m26_editordelete' of https://github.com/skodak/moodle 2013-07-16 21:23:30 +08:00
Damyon Wiese e202521f25 Merge branch 'wip-MDL-39299-master' of git://github.com/phalacee/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-16 20:59:41 +08:00
Eloy Lafuente (stronk7) 5b0804c4b1 Merge branch 'w29_MDL-40563_m26_themecaching' of https://github.com/skodak/moodle 2013-07-16 11:41:47 +02:00
Eloy Lafuente (stronk7) 3f0a8871d3 Merge branch 'MDL-40555-master' of git://github.com/FMCorz/moodle
Conflicts:
	cache/stores/static/lib.php
2013-07-16 09:57:34 +02:00
Jason Fowler c604e01c13 MDL-39299 - Course - Correcting some rendering problems in bootstrapbase 2013-07-16 15:51:23 +08:00
Damyon Wiese 259e3c2525 Merge branch 'MDL-40464-master' of git://github.com/ankitagarwal/moodle 2013-07-16 15:44:38 +08:00
Damyon Wiese 924ea4845a Merge branch 'wip-MDL-40638-master' of git://github.com/abgreeve/moodle
Conflicts:
	version.php
2013-07-16 15:14:49 +08:00
Marina Glancy 3e2b5734dd Merge branch 'w29_MDL-40549_m26_oacleanup' of https://github.com/skodak/moodle 2013-07-16 17:07:23 +10:00
Dan Poltawski fb5ce7d351 MDL-40666 enrol|cohort: PARAM_NUMBER -> PARAM_INT
PARAM_NUMBER is a float, our id's are int's

* Fix core_cohort_get_cohorts to specify correct return type on cohort id
* Fix core_enrol_get_enrolled_users_with_capability to specify correct
  correct return type on user id
* Fix core_cohort_update_cohorts to specify the right parameter type
  (int) on cohort id
* Add tests to verify the bug on core_cohort_update_cohorts param type.
2013-07-16 15:03:03 +08:00
Damyon Wiese 06c8b60936 Merge branch 'MDL-40462_master' of https://github.com/markn86/moodle 2013-07-16 15:00:46 +08:00
Petr Škoda b961cc4c59 MDL-40549 remove last traces of oacleanup
Thanks Marina!
2013-07-16 09:00:46 +02:00
Dan Poltawski 4f60c4af77 MDL-40666 cohort: remove duplicated code from tests 2013-07-16 14:51:59 +08:00
Damyon Wiese ed9e492087 Merge branch 'MDL-40431_master' of https://github.com/markn86/moodle 2013-07-16 14:49:25 +08:00
Damyon Wiese 792522198a MDL-40167 tests: The dock subsystem was removed
Fix the unit test that counts the core subsystems.
2013-07-16 14:29:59 +08:00
Marina Glancy b7361a9be7 Merge branch 'MDL-35851-master' of git://github.com/damyon/moodle 2013-07-16 16:10:13 +10:00
Damyon Wiese d33d712541 MDL-35851 lesson: removed expensive upgrade step.
Just deal with the bad data when displaying the lesson instead.

Conflicts:

	mod/lesson/db/upgrade.php
2013-07-16 14:05:07 +08:00
Damyon Wiese d981272e64 Merge branch 'wip-mdl-40428' of git://github.com/rajeshtaneja/moodle 2013-07-16 13:33:27 +08:00
Damyon Wiese 539819dc40 Merge branch 'MDL-40195' of git://github.com/aolley/moodle 2013-07-16 13:28:52 +08:00
Damyon Wiese 6ec1f2f2eb Merge branch 'wip-MDL-40167-m26' of git://github.com/samhemelryk/moodle 2013-07-16 13:25:54 +08:00
Marina Glancy cb8c7b9d56 MDL-39812 recompile less for bootstrapbase 2013-07-16 15:19:38 +10:00
Marina Glancy e2abbde44e Merge branch 'MDL-39812_bootstrapbase' of git://github.com/rwijaya/moodle 2013-07-16 14:29:24 +10:00
Marina Glancy 792e6059be Merge branch 'wip-MDL-40426-master' of git://github.com/abgreeve/moodle 2013-07-16 13:48:27 +10:00
Damyon Wiese 8eb3e1f94f Merge branch 'w29_MDL-40558_m26_guestdelete' of https://github.com/skodak/moodle 2013-07-16 11:28:57 +08:00
Damyon Wiese 2f9aeafe5e Merge branch 'MDL-40524' of git://github.com/aolley/moodle 2013-07-16 11:24:06 +08:00
Marina Glancy ff2ca3ef3d Merge branch 'MDL-13114-master' of git://github.com/FMCorz/moodle 2013-07-16 13:07:17 +10:00
Damyon Wiese 4d4fb80d8f Merge branch 'MDL-40538' of https://github.com/mr-russ/moodle 2013-07-16 11:02:54 +08:00
Marina Glancy 50d1d9949b Merge branch 'MDL-30740-master' of git://github.com/danpoltawski/moodle 2013-07-16 12:16:27 +10:00
Rossiani Wijaya eebc821c83 MDL-35851 Lesson module: fix page order id for import questions. Add upgrade script to fix lesson pages corrupted links 2013-07-16 09:52:25 +08:00
Dan Poltawski a10d6199c8 MDL-40680 store_memcached: fix serialiser options
* Use correct lang string for SERIALIZER_IGBINARY
* Use PARAM_INT for the parameter
2013-07-16 09:37:53 +08:00
Sam Hemelryk 4a749e93b4 MDL-40555 cache: implemented unit tests for default search functionality 2013-07-16 08:29:17 +08:00
Eloy Lafuente (stronk7) e780e5cb8f Merge branch 'MDL-40112_master' of https://github.com/totara/openbadges
Conflicts:
	lib/db/upgrade.php
	version.php
2013-07-16 01:29:01 +02:00
Eloy Lafuente (stronk7) adbdb9b5c7 Merge branch 'w29_MDL-40571_m26_adminblocks' of https://github.com/skodak/moodle 2013-07-16 00:26:44 +02:00
Eloy Lafuente (stronk7) 88e4c0848a Merge branch 'MDL-40412' of git://github.com/merrill-oakland/moodle 2013-07-15 22:07:47 +02:00
Eloy Lafuente (stronk7) 37aa0545a1 Merge branch 'wip-MDL-38747-master' of https://github.com/satrun77/moodle 2013-07-15 17:02:01 +02:00
Damyon Wiese 7ce7bb538c Revert "MDL-35131 Caching: Purge all will clear course modinfo cache - Thanks to Thomas for patch"
This reverts commit 6ab62db65c.

This is breaking upgrades from 22 - purgeallcaches gets called during upgrade but
rebuild_course_caches is not a safe api to use in this case.
2013-07-15 21:24:07 +08:00
Kordan a53113b9a0 MDL-40262 theme_formal_white: I simply assigned black (that is well contrasted according to http://snook.ca/technical/colour_contrast/colour.html) to links and white (that makes a not compliant contrast with background color) to plain texts in the breadcrumb. This is the less expensive solution I found to differentiate plain text and links and have links well contrasted. 2013-07-15 14:09:30 +02:00
Marina Glancy 9af02a3b36 MDL-40121 Added format_singleactivity in standard package 2013-07-15 21:42:04 +10:00
Marina Glancy 6619945b06 MDL-40121 Support old activities with subtypes 2013-07-15 21:42:04 +10:00
Marina Glancy 28c61e0aa2 MDL-40121 Added plugin format_singleactivity 2013-07-15 21:41:31 +10:00
Barbara Ramiro dc97596615 MDL-40670 Theme: Rescale headings overriding bootstrap defaults 2013-07-15 18:47:38 +08:00
Dan Poltawski f6ef724650 MDL-30740 skydrive: improve repo metadata
* Add manage link
* Use realthumbnail for lazy loading images
* Add image height/width info
* Add author information to files
2013-07-15 18:08:18 +08:00
Dan Poltawski c893448b17 MDL-30740 skydrive: convert muc to defined cache 2013-07-15 18:08:17 +08:00
Dan Poltawski 562525dcc9 MDL-30740 Add repository_skydrive to standard plugins 2013-07-15 17:57:43 +08:00
Dan Poltawski 1757cc9d15 MDL-30740 skydrive: bump version for core inclusion
Remove release name and maturity as these will now be inhereted from
core.
2013-07-15 17:57:43 +08:00
Dan Poltawski d4fd856b91 MDL-30740 skydrive: Add filepicker navigation bar
In order not to get lost in the Sky.

We use a session cache to reduce repeated calls to the skydrive API,
storing the folder name each time we get a listing.

Original concept from Ruslan Kabalin, thanks!
2013-07-15 17:57:42 +08:00
Ruslan Kabalin 1bb2f42130 MDL-30740 skydrive: show albums as essentially they are "folders"
If you create a folder in SkyDrive and add image to it, it will be calssified
as album and, this will not be listed without this patch.
2013-07-15 17:57:42 +08:00
Dan Poltawski 7446284108 MDL-30740 repository: Add Microsoft Skydrive plugin
Thanks to Universidad Teconológica de Chile (INACAP) who funded this
work initially and LUNS who permitted this to be released open source so
I could continue to work on this.
2013-07-15 17:57:42 +08:00
Adrian Greeve 7809d1557c MDL-40638 - Administration: Update of version number to avoid alternate name fields breaking before upgrade.
With the alteration of the user table to include the new alternate name fields anyone
upgrading from one version to another will receive errors until they run the upgrade.
Forcing a redirect if major version upgrade will bypass this issue.
2013-07-15 15:49:26 +08:00
Marina Glancy 73221dbdfe Merge branch 'MDL-28466-oldata-remove' of git://github.com/danpoltawski/moodle 2013-07-15 17:28:59 +10:00
Damyon Wiese 44b3927b70 MDL-39563: Change to use $CFG consistently 2013-07-15 15:01:39 +08:00
Damyon Wiese 4d4b938fa3 Merge branch 'MDL-39563' of git://github.com/jleyva/moodle 2013-07-15 14:54:20 +08:00
Dan Poltawski c2ca2d8e91 MDL-28466 remove the enrol_authorize data
If there are no records, remove the plugin
2013-07-15 14:48:23 +08:00
Russell Smith 42574d0900 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-15 16:44:45 +10:00
Damyon Wiese d7bf5fd1f7 Merge branch 'MDL-40440-m' of git://github.com/andrewnicols/moodle 2013-07-15 14:42:10 +08:00
Russell Smith f27cb59c36 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 15:07:35 +10:00
Marina Glancy 5710055d41 Merge branch 'MDL-40633' of git://github.com/timhunt/moodle 2013-07-15 14:41:55 +10:00
Damyon Wiese fff9752d2a Merge branch 'wip-mdl-35131' of git://github.com/rajeshtaneja/moodle 2013-07-15 11:54:24 +08:00
Andrew Davis 5f06bf8554 MDL-39770 mod_chat: cleanup of the Bubble chat theme 2013-07-15 11:50:16 +08:00
Frederic Massart c122e7845d MDL-13114 tool_uploadcourse: Adding to standard plugins 2013-07-15 11:45:34 +08:00
Damyon Wiese c49fea3be5 Merge branch 'w29_MDL-40435_m26_componentpermissions' of https://github.com/skodak/moodle 2013-07-15 11:25:37 +08:00
Marina Glancy 3fd0ea3c1e Merge branch 'MDL-28466-master' of git://github.com/danpoltawski/moodle 2013-07-15 13:07:37 +10:00
Damyon Wiese 527b24b104 Merge branch 'w29_MDL-40475_m26_componentcache' of https://github.com/skodak/moodle 2013-07-15 10:58:03 +08:00
Andrew Davis 9035e3d24b MDL-39770 mod_chat: some tweaks to make it prettier to reduce screen wastage 2013-07-15 10:48:39 +08:00
Marina Glancy 918cc26541 Merge branch 'wip-MDL-39062-m26' of git://github.com/samhemelryk/moodle 2013-07-15 12:40:46 +10:00
Marina Glancy 78eca0fc3c Merge branch 'wip-MDL-40650-master' of git://github.com/abgreeve/moodle 2013-07-15 12:25:23 +10:00
Dan Poltawski fdb0dfe7c0 MDL-28466 pluginlib: Add enrol_authorize as standard deleted plugin
This means we won't bother our users about it in the plugin list

thanks Marina for picking it up!
2013-07-15 10:25:22 +08:00
Dan Poltawski 317638a3d6 MDL-28466 remove enrol_authorize from standard list of plugins 2013-07-15 10:25:22 +08:00
Dan Poltawski c06a812ed6 MDL-28466 Remove enrol_authorize - this code is dead
It does not work and its not maintained.
2013-07-15 10:25:13 +08:00
Frederic Massart 41525e5510 MDL-13114 tool_uploadcourse: Removing use of deprecated get_plugin_list() 2013-07-15 10:02:56 +08:00
Frederic Massart a1af15de03 MDL-13114 tool_uploadcourse: Removing summary from mandatory fields 2013-07-15 10:02:56 +08:00
Frederic Massart 22b3be3633 MDL-13114 tool_uploadcourse: Clean up after scheck scan 2013-07-15 10:02:56 +08:00
Frederic Massart 76fca7168c MDL-13114 tool_uploadcourse: Simple Behat tests for create and update 2013-07-15 10:02:56 +08:00
Frederic Massart f802b04f03 MDL-13114 tool_uploadcourse: Better Unit Test coverage 2013-07-15 10:02:55 +08:00
Frederic Massart 8c313d1a7f MDL-13114 tool_uploadcourse: Helper uses MUC for caching 2013-07-15 10:02:55 +08:00
Frederic Massart 3f57c87e1d MDL-13114 tool_uploadcourse: Clean up 2013-07-15 10:02:55 +08:00
Frederic Massart 7a4ec85e2a MDL-13114 tool_uploadcourse: Optimised the import form 2013-07-15 10:02:55 +08:00
Frederic Massart 1e3e4efdb2 MDL-13114 tool_uploadcourse: Web UI uses the new classes 2013-07-15 10:02:55 +08:00
Frederic Massart e0164eb3c6 MDL-13114 tool_uploadcourse: Use autoload and clean require_once 2013-07-15 10:02:55 +08:00
Frederic Massart b683185bab MDL-13114 tool_uploadcourse: CLI uses new classes 2013-07-15 10:02:55 +08:00
Frederic Massart 5dcd7e2867 MDL-13114 tool_uploadcourse: Output tracker in place 2013-07-15 10:02:55 +08:00
Frederic Massart f54c49ccf0 MDL-13114 tool_uploadcourse: ID number errors handling 2013-07-15 10:02:55 +08:00
Frederic Massart 96aaf65481 MDL-13114 tool_uploadcourse: Renaming OUTCOME to DO 2013-07-15 10:02:54 +08:00
Frederic Massart 5b2f7718f0 MDL-13114 tool_uploadcourse: Introducing output tracker 2013-07-15 10:02:54 +08:00
Frederic Massart 8383903fcc MDL-13114 tool_uploadcourse: Ensure category is properly resolved 2013-07-15 10:02:54 +08:00
Frederic Massart 1d1898ac01 MDL-13114 tool_uploadcourse: Improving the error reporting 2013-07-15 10:02:54 +08:00
Frederic Massart 509dd69554 MDL-13114 tool_uploadcourse: Unit tests for introduced classes 2013-07-15 10:02:54 +08:00
Frederic Massart 9a7cd639b4 MDL-13114 tool_uploadcourse: Classes for course importation 2013-07-15 10:02:54 +08:00
Piers Harding 3a0fda69d7 MDL-13114 tool_uploadcourse: Initial commit 2013-07-15 10:02:54 +08:00
Damyon Wiese 5034db3e9f Merge branch 'wip-MDL-40658-master' of git://github.com/marinaglancy/moodle 2013-07-15 09:55:44 +08:00
Adrian Greeve 07d807ac24 MDL-40650 - workshop: Fixed fatal error in workshop cron.
Line 246 was missing a semicolon at the end and this was causing
errors.
2013-07-15 09:54:02 +08:00
Daniel Myers e1d4d14c6e MDL-40260 block_course_overview: prevent MNET courses from being dimmed 2013-07-15 13:52:57 +12:00
Marina Glancy 929a0ddd73 MDL-40658 Include tinymce_pdw and tinymce_wrap in the list of standard plugins 2013-07-15 11:49:54 +10:00
AMOS bot 69ced1b9a0 Automatically generated installer lang files 2013-07-15 00:44:24 +00:00
Sam Hemelryk 72f968dbee MDL-39062 cache: version bump to update definitions 2013-07-15 11:30:24 +12:00
Sam Hemelryk 10aabcb221 MDL-39062 cache: persist keys now set properly 2013-07-15 11:24:19 +12:00
Sam Hemelryk b69a3f1ceb MDL-39814 html_writer: Remove superfluous new lines from html_writer::alist 2013-07-15 10:24:05 +12:00
Sam Hemelryk 61b223a632 MDL-40635 moodle_url: can now set anchor during construction 2013-07-15 10:17:49 +12:00
Sam Hemelryk a783d21066 MDL-40167 dock: tidied up className attribute 2013-07-15 09:46:03 +12:00
Sam Hemelryk a69a7e89b8 MDL-40167 dock: tidy up after first peer-review 2013-07-15 09:46:03 +12:00
Sam Hemelryk 84192d7836 MDL-40167 dock: converted the dock JS to a YUI shifted module.
The patch converts the dock into a YUI shifter module and at
the same time improves several aspects of its operation.
The features of this patch include:
* Dock Module conversion.
* A loader that ensures we don't include the dock JS or its
  requirements unless actually required.
* We no longer include the dock JS for themes that don't
  enable it.
* Blocks no longer add registration events to the page
  instead a dockable attribute is added to the html and the
  loader looks for that.
* The dock module is properly documented and running YUIDoc
  gives good quality documentation.
* We no longer need the dock module registration or
  subcomponent.
* All events that can be delegated are now delegated.
* Removed unused variables and code left over after fixes.
* Support for docking blocks renderered using the new blocks
  render method. Better support for custom block regions.
2013-07-15 09:46:03 +12:00
kordan ac3331cd3d MDL-39695 theme_formal_white: added a colour hover for coursebox following trendcolour setting 2013-07-14 23:09:36 +02:00
Mary Evans 3ca6cd9665 MDL-40652 Calendar: Changed pagelayout from 'standard' to 'base' in calendar/export.php. 2013-07-14 15:01:50 +01:00
Jamie Pratt 2baf8e8a0b MDL-40074 quiz attempt walk through test 2013-07-14 16:45:26 +07:00
Jamie Pratt 1cd7c92ece MDL-40074 refactoring of quiz code
to reuse code fro quiz attempt walk through
2013-07-14 16:28:39 +07:00
Petr Škoda abb043c3a1 MDL-40435 require MOODLE_INTERNAL in core_component
We need to include db/subplugins.php when building core_component cache,
there are some MOODLE_INTERNALs there…
2013-07-13 19:25:17 +02:00
Petr Škoda 862a16700d MDL-40435 allow 0 as valid directory permission when using ACL 2013-07-13 16:10:17 +02:00
Petr Škoda 766e04f38a MDL-40435 detect permission setting problems in core_component 2013-07-13 16:08:50 +02:00
Petr Škoda 701b063791 MDL-40611 fix context cache size expectation 2013-07-13 15:37:31 +02:00
Petr Škoda 2428de82b6 MDL-40563 fix race condition in debug styles when purging caches 2013-07-12 23:25:45 +02:00
Petr Škoda ef201c966f MDL-40563 use revisions for theme css cache files and fix potential race condition 2013-07-12 23:25:00 +02:00
Petr Škoda 0238ca0d6e MDL-40563 use revisions for theme js cache files 2013-07-12 23:17:22 +02:00
Petr Škoda 036e925bfa MDL-40563 use revisions for theme image cache files 2013-07-12 23:02:15 +02:00
Petr Škoda 9ad8b423c2 MDL-40563 improve jquery serving performance
It is not necessary to do full page init to access the plugin locations API.
2013-07-12 22:38:56 +02:00
Petr Škoda cba94cec14 MDL-40563 improve yui serving performance
It is not necessary to do full page init to access the plugin locations API.
2013-07-12 22:34:12 +02:00
Petr Škoda ff74627e62 MDL-40546 send proper caching headers when $CFG->cachejs = 0
This should help developers writing old style JS that is served via lib/javascript.php.
2013-07-12 22:22:56 +02:00
Petr Škoda bf8c71b7fd MDL-40571 work around block editing hacks on admin page 2013-07-12 14:58:57 +02:00
Petr Škoda 2637ffafcf MDL-40423 fix creation of new install.xml in subplugins 2013-07-12 14:56:11 +02:00
Petr Škoda d7245e3400 MDL-40475 add alternative component cache location and other improvements
Improvements include:
* Alternative location might be useful when server administrator wants to maintain
  a local copy of component cache instead of using shared $CFG->cachedir.
* Component caching is now enabled in behat tests which should improve performance.
* Standardised ignoring of component caching.
* Fixed debug mode in ABORT_AFTER_CONFIG scripts.
* General documentation improvements.
2013-07-12 13:05:41 +02:00
Tim Hunt e93cdb6915 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:41:12 +01:00
Petr Škoda 72e3a3c9cd MDL-40549 remove unused legacy assignment upgrade tool 2013-07-12 12:40:55 +02:00
Petr Škoda 98aa874617 MDL-40558 skip admins and guest when deleting incomplete users 2013-07-12 12:36:57 +02:00
Petr Škoda 23ee749bfb MDL-40569 fix empty CSS files after cache purging 2013-07-12 12:34:05 +02:00
Petr Škoda 485392f308 MDL-40574 remove forgotten $delete from editor subplugins page 2013-07-12 12:33:05 +02:00
David Monllao 8aea365f05 MDL-40315 behat: Performance improvement
We look for exceptions after each step, this patch
includes a pre-checking query to avoid multiple queries
for each step when most of the time they are not necessary.
2013-07-12 12:16:18 +02:00
Frederic Massart 2e4c0c9181 MDL-40424 libraries: Deprecate context_instance_preload_sql() 2013-07-12 17:41:49 +08:00
Andrew Nicols f320e8d00f MDL-40478 JavaScript: Support loading of YUI submodules in the yui-loader 2013-07-12 10:12:03 +01:00
Dan Poltawski 1b2f549358 MDL-40536 course/externallib fix incorrect variable
Fixes test_import_course_invalid_deletecontent_option() from the
previous commit.
2013-07-12 16:39:41 +08:00
Dan Poltawski fce10644a0 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:39:41 +08:00
Mohamed Alsharaf dbebd5966f MDL-38747 blocks: course format options 'numsections' is required to display the block 2013-07-12 20:19:49 +12:00
Dan Poltawski ac11252375 MDL-40604 upgrade.txt: change style to be more readable
As suggested by Tim Hunt.
2013-07-12 16:19:11 +08:00
Dan Poltawski 05226d7607 MDL-40604 deprecatedlib: Sort out old ~2.0 deprecations
Make sure things are throwing debugging notices and are documented.
2013-07-12 16:02:49 +08:00
Andrew Nicols 7cfe3ebbcc MDL-40477 JavaScript: Move YUI config functions out and deminify
This should make future development and debugging of these functions much
easier. It also allows us to write inline documentation for them.
2013-07-12 08:31:57 +01:00
Damyon Wiese 07bbbcf174 weekly release 2.6dev 2013-07-12 09:46:52 +08:00
Damyon Wiese 779545e7fd Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-07-12 09:41:55 +08:00
AMOS bot ebd69f7abe Automatically generated installer lang files 2013-07-12 00:45:55 +00:00
Juan Leyva 9184d44ded MDL-39563 Fixing mobilecssurl is not being returned in WebService, phpunit tests 2013-07-11 16:25:17 +02:00
Frederic Massart b123a543a6 MDL-40463 libraries: Deprecate get_courseid_from_context() 2013-07-11 15:54:36 +08:00
David Monllao 3e6899989a MDL-39815 mod_glossary: Fixing behat test 2013-07-11 09:36:32 +02:00
Rajesh Taneja ae38dcb1dc MDL-40467 Libraries: deprecated get_role_context_caps() 2013-07-11 15:04:33 +08:00
Frederic Massart a439b2f9b4 MDL-40465 libraries: Deprecate fetch_context_capabilities() 2013-07-11 14:33:25 +08:00
Frederic Massart cfba97e9a5 MDL-40369 theme: Renaming Afterburner i/roles to i/assignroles 2013-07-11 15:59:31 +10:00
Ankit Agarwal 6acc54b3f0 MDL-40464 libraries: Deprecate get_user_courses_bycap() 2013-07-11 13:43:41 +08:00
Mark Nelson 4c9c06488a MDL-40462 libraries: added another PHPUnit test to ensure deprecated function returns the same as the replacement 2013-07-11 13:28:45 +08:00
Mark Nelson dd33f4af0a MDL-40462 libraries: deprecated get_course_context() 2013-07-11 13:28:45 +08:00
Mark Nelson 9c03dff2c9 MDL-40431 libraries: added another PHPUnit test to ensure deprecated function returns the same as the replacement 2013-07-11 13:23:45 +08:00
Mark Nelson 6c89d4e1c0 MDL-40431 libraries: deprecated get_context_url() 2013-07-11 13:23:45 +08:00
Marina Glancy 0bff314daa MDL-40621 fixed small bug in function editor_tinymce_plugin::fix_row() 2013-07-11 15:00:23 +10:00
Marina Glancy bf50508f06 MDL-37565 fixed PDW plugin to calculate number of button rows 2013-07-11 14:47:58 +10:00
Rajesh Taneja c592eea2d3 MDL-40428 Libraries: Deprecated delete_context 2013-07-11 12:18:55 +08:00
Adrian Greeve 1de02d62c9 MDL-40426 - Libraries: Deprecate mark_context_dirty(). 2013-07-11 12:16:47 +08:00
Marina Glancy 51230ba88e Merge branch 'wip-MDL-31776-master-alternatenamesfix' of git://github.com/abgreeve/moodle 2013-07-10 20:16:21 +10:00
David Monllao cb9c703cca MDL-38857 tool_behat: Adding info about the tool purpose 2013-07-10 12:07:11 +02:00
Adrian Greeve 12b4487ef3 MDL-31776 - lib: Alternate name fields - update of gradebook sql query. 2013-07-10 17:41:06 +08:00
Rajesh Taneja 117e94a050 MDL-40358 Enrolments: Fixed sql when user is suspended 2013-07-10 17:40:20 +10:00
Adrian Greeve 38dff99e64 MDL-31776 - lib: Alternate name fields - fixed up user object in question code. 2013-07-10 15:28:27 +08:00
Adrian Greeve ec71acb798 MDL-31776 - lib: mod/forums - Fixed discussion sql query. 2013-07-10 15:26:05 +08:00
Marina Glancy cb88ffb698 Merge branch 'MDL-38366-master' of git://github.com/FMCorz/moodle 2013-07-10 16:22:38 +10:00
Frederic Massart c122f484c5 MDL-38366 repository_filesystem: Prevent use of empty subdir 2013-07-10 14:03:46 +08:00
Frederic Massart a76efbcac8 MDL-38366 repository: get_option() returns proper values
Previously, even when a specific setting had to be returned, this method
would return an empty array. Now, the behaviour is the same whether
some options or none are set: if the requested setting is not found
null is returned.
2013-07-10 14:03:46 +08:00
Sam Hemelryk 858fc79db8 MDL-40368 tool_capability: fixed regression marking single result selected 2013-07-10 16:23:46 +12:00
Jamie Pratt 76149901a9 MDL-40449 use data generator to create random qs 2013-07-10 15:45:45 +12:00
Marina Glancy 06832223d4 Merge branch 'MDL-40354-master' of git://github.com/ankitagarwal/moodle 2013-07-10 13:15:37 +10:00
Ankit Agarwal e481f05c0d MDL-40354 groups: Fix issues in groups_group_visible() 2013-07-10 10:50:22 +08:00
Ankit Agarwal 2d4d29da06 MDL-40354 groups:groups_get_activity_allowed_groups() should use passed userid to check capabilities 2013-07-10 10:50:22 +08:00
Ankit Agarwal e7eb992d3a MDL-40354 groups: Add new api groups_group_visible() 2013-07-10 10:50:21 +08:00
Ankit Agarwal f4d46f6848 MDL-40354 groups: Add unit tests for the api groups_group_visible() 2013-07-10 10:50:21 +08:00
Marina Glancy f8be9f9e73 Merge branch 'm26_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile_2ndRound' of https://github.com/scara/moodle 2013-07-10 11:58:44 +10:00
Raymond Wijaya bf57184c28 MDL-40093: mod/assign: Remove count of drafts in offline assignment's grading summary screen 2013-07-10 11:18:28 +10:00
Marina Glancy 9de65fffb6 Merge branch 'w28_MDL-40488_m26_admin' of https://github.com/skodak/moodle 2013-07-10 11:08:49 +10:00
Sam Hemelryk 6426d2d264 Merge branch 'wip-MDL-40593-master' of git://github.com/marinaglancy/moodle 2013-07-10 12:19:05 +12:00
Russell Smith ae21341523 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:15:19 +10:00
Marina Glancy 9100a8f4bb Merge branch 'MDL-40441' of git://github.com/timhunt/moodle 2013-07-10 10:02:04 +10:00
Marina Glancy 9a2188812d Merge branch 'wip-mdl-40218' of git://github.com/rajeshtaneja/moodle 2013-07-10 09:58:09 +10:00
Sam Hemelryk 93b4d2658a Merge branch 'master_MDL-20867' of git://github.com/danmarsden/moodle 2013-07-10 11:07:00 +12:00
Sam Hemelryk 1be1f6be53 Merge branch 'w28_MDL-40450_m26_tinymcebuttons' of https://github.com/skodak/moodle 2013-07-10 11:02:21 +12:00
Sam Hemelryk ccae3a612d Merge branch 'w28_MDL-40537_m26_majorupgrade' of https://github.com/skodak/moodle 2013-07-10 10:43:28 +12:00
Sam Hemelryk 4e6ad78679 Merge branch 'MDL-39815' of git://github.com/rwijaya/moodle 2013-07-10 10:35:18 +12:00
Sam Hemelryk a8402cc115 Merge branch 'MDL-40527' of git://github.com/timhunt/moodle 2013-07-10 10:31:39 +12:00
Sam Hemelryk a4fd82ac75 Merge branch 'MDL-40466-master' of git://github.com/FMCorz/moodle 2013-07-10 10:19:13 +12:00
Sam Hemelryk 33ed6a9d94 Merge branch 'MDL-40516-master' of git://github.com/danpoltawski/moodle 2013-07-10 10:12:44 +12:00
Sam Hemelryk 05fb99ac70 Merge branch 'master_MDL-40512' of git://github.com/danmarsden/moodle 2013-07-10 10:10:11 +12:00
Sam Hemelryk d9734c91ee MDL-40358 enrol: whitespace clean up 2013-07-10 10:07:10 +12:00
Sam Hemelryk fc7e5a031e Merge branch 'wip-mdl-40358' of git://github.com/rajeshtaneja/moodle 2013-07-10 09:54:38 +12:00
Sam Hemelryk 59cd82f9b7 Merge branch 'MDL-40496-master' of git://github.com/danpoltawski/moodle
Conflicts:
	lib/deprecatedlib.php
2013-07-10 09:51:15 +12:00
Damyon Wiese c6df1f5ad0 Merge branch 'MDL-39420' of git://github.com/timhunt/moodle 2013-07-09 22:43:54 +08:00
Damyon Wiese 57cf73a825 Merge branch 'MDL-36479' of git://github.com/timhunt/moodle 2013-07-09 22:28:51 +08:00
Damyon Wiese e931954558 Merge branch 'MDL-40392' of git://github.com/stronk7/moodle 2013-07-09 21:51:41 +08:00
David Monllao 573eb117d8 MDL-40595 tool_behat: Referencing init.php script
Almost everybody will use init.php instead of
running manually the composer commands and util.php
to install and enable the test environment.
2013-07-09 15:40:56 +02:00
Marina Glancy deabf12e31 MDL-40593 fixed SQL query to be postgres-compartible 2013-07-09 22:24:02 +10:00
Marina Glancy f429d25d37 MDL-40472 fixed missing semicolon 2013-07-09 22:01:49 +10:00
Marina Glancy ed2896d990 Merge branch 'MDL-40472-master' of git://github.com/damyon/moodle 2013-07-09 21:34:49 +10:00
Tim Hunt dad5f63d3d MDL-39420 multichoice: fix layout of multi-line choices. 2013-07-09 11:56:28 +01:00
Tim Hunt 475225a1c8 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:43:56 +01:00
Dan Poltawski 3a1b0dd908 Merge branch 'wip-MDL-40430-master' of git://github.com/abgreeve/moodle 2013-07-09 16:57:07 +08:00
Dan Poltawski f6455e63dd Merge branch 'wip-MDL-40429-master' of git://github.com/abgreeve/moodle 2013-07-09 16:52:52 +08:00
Dan Poltawski 58b2251be3 Merge branch 'MDL-40425-master' of git://github.com/ankitagarwal/moodle 2013-07-09 16:42:18 +08:00
Adrian Greeve 329846f198 MDL-40430 - Libraries: Deprecate print_context_name(). 2013-07-09 16:11:55 +08:00
Adrian Greeve b4482dfe19 MDL-40429 - Libraries: Deprecate get_contextlevel_name(). 2013-07-09 16:07:04 +08:00
Marina Glancy 73118a2687 Merge branch 'MDL-37065-master' of git://github.com/damyon/moodle 2013-07-09 18:06:33 +10:00
Damyon Wiese ef5fd5bf40 Merge branch 'wip-mdl-40400' of git://github.com/rajeshtaneja/moodle 2013-07-09 16:05:02 +08:00
Dan Poltawski 92e9260d96 Merge branch 'wip-mdl-40427' of git://github.com/rajeshtaneja/moodle 2013-07-09 16:00:12 +08:00
Ankit Agarwal db314f34fb MDL-40425 libraries: Remove context_instance_preload() from core 2013-07-09 15:55:51 +08:00
Ankit Agarwal c5dcd25d5f MDL-40425 libraries: Deprecate context_instance_preload() 2013-07-09 15:55:40 +08:00
Dan Poltawski af578aec7c Merge branch 'wip-mdl-40407' of git://github.com/rajeshtaneja/moodle
(moved a deprecation warning around to try and avoid more conflicts in
upgrade.txt)

Conflicts:
	lib/upgrade.txt
2013-07-09 15:55:20 +08:00
Rajesh Taneja 2c5b0eb7fc MDL-40427 Libraries: Deprecated context_moved in favor of context::update_moved() 2013-07-09 15:51:29 +08:00
Dan Poltawski 9e40816b3a Merge branch 'MDL-40406-master' of git://github.com/FMCorz/moodle
Conflicts:
	lib/upgrade.txt
2013-07-09 15:49:45 +08:00
Dan Poltawski 0574cd9061 Merge branch 'MDL-40405-master' of git://github.com/FMCorz/moodle
Conflicts:
	lib/upgrade.txt
2013-07-09 15:47:07 +08:00
Rajesh Taneja 8f7d3d129f MDL-40407 Libraries: deprecated preload_course_contexts 2013-07-09 15:46:51 +08:00
Dan Poltawski d06f10cf97 Merge branch 'wip-mdl-40404' of git://github.com/rajeshtaneja/moodle
Conflicts:
	lib/upgrade.txt
2013-07-09 15:43:43 +08:00
Frederic Massart cc4de415b4 MDL-40406 libraries: Deprecate rebuild_contexts() 2013-07-09 15:43:02 +08:00
Frederic Massart 79f6b384d4 MDL-40406 libraries: Deprecate build_context_path() 2013-07-09 15:43:02 +08:00
Frederic Massart 84378a57b9 MDL-40406 libraries: Deprecate cleanup_contexts() 2013-07-09 15:43:02 +08:00
Frederic Massart 9fdbf620a4 MDL-40406 libraries: Deprecate create_contexts() 2013-07-09 15:43:02 +08:00
Frederic Massart f9aa8016b1 MDL-40405 libraries: Deprecate get_child_contexts() 2013-07-09 15:37:40 +08:00
Damyon Wiese a6673a8b04 Merge branch 'MDL-40369-master' of git://github.com/FMCorz/moodle 2013-07-09 15:28:31 +08:00
Damyon Wiese bc90ad107a Merge branch 'MDL-40455_M26' of git://github.com/lazydaisy/moodle 2013-07-09 15:20:07 +08:00
Damyon Wiese de0a6ed459 Merge branch 'MDL-40443' of git://github.com/timhunt/moodle 2013-07-09 15:15:47 +08:00
Jamie Pratt 01c898ecec MDL-40171 question saving test 2013-07-09 15:08:01 +08:00
Jamie Pratt faaf80fadb MDL-40176 mock_submit method for testing 2013-07-09 15:07:36 +08:00
Rajesh Taneja c513812cd9 MDL-40404 Libraries: Moved DEVELOPER_DEBUG outside loop 2013-07-09 14:33:21 +08:00
Rajesh Taneja 7f5b51c4e6 MDL-40404 Libraries: Deprecated get_parent_contextid() 2013-07-09 14:33:21 +08:00
Marina Glancy f64998fab3 Merge branch 'MDL-39020-master' of git://github.com/ankitagarwal/moodle 2013-07-09 16:32:16 +10:00
Andrew Davis 766fd0d92f MDL-34454 core_message: removed a deprecated function
Conflicts:

	lib/deprecatedlib.php
2013-07-09 14:11:07 +08:00
Rajesh Taneja df6c384d55 MDL-40218 Assignment: updated upgrade.txt and version number 2013-07-09 14:09:11 +08:00
Rajesh Taneja 1ecb8044b6 MDL-40218 Assignment: Added lazy loading for showactiveenrol option and supended users 2013-07-09 14:09:11 +08:00
Marina Glancy 8bed37619e Merge branch 'MDL-23646-master' of git://github.com/damyon/moodle 2013-07-09 15:55:51 +10:00
Marina Glancy 84842f54dd Merge branch 'wip-MDL-37565-master' of git://github.com/phalacee/moodle 2013-07-09 15:54:45 +10:00
Damyon Wiese 8a011a9f0a Merge branch 'w28_MDL-40243_m26_ldapsuspend' of https://github.com/skodak/moodle 2013-07-09 13:44:01 +08:00
Dan Poltawski bb0458aa7c Merge branch 'MDL-40403-master' of git://github.com/FMCorz/moodle 2013-07-09 13:38:10 +08:00
Frederic Massart 82c9aa843e MDL-40403 tests: Fix pointless assertion 2013-07-09 13:34:44 +08:00
Frederic Massart 8e8891b76b MDL-40403 libraries: Deprecate get_parent_contexts() 2013-07-09 13:34:44 +08:00
Damyon Wiese c2bee5e0d1 Merge branch 'master_MDL-37484' of git://github.com/danmarsden/moodle 2013-07-09 13:33:42 +08:00
Rajesh Taneja e6cc5347eb MDL-40218 Assignment: Added unit test to check suspended users 2013-07-09 13:32:10 +08:00
Rajesh Taneja 3fa106d0d6 MDL-40218 Assignment: User should not be able to view submissions, whithout proper permissions 2013-07-09 13:32:09 +08:00
Rajesh Taneja c494e18cbd MDL-40218 Assignment: Participants/submission/grade count only include active users 2013-07-09 13:32:08 +08:00
Rajesh Taneja a69944eb8b MDL-40218 Assignment: Show suspended user, similar to the way they are shown in grader report 2013-07-09 13:32:08 +08:00
Rajesh Taneja 4c4c7b3f3f MDL-40218 Assignment: Added show/hide suspended users functionality 2013-07-09 13:32:08 +08:00
Damyon Wiese eb729e0391 Merge branch 'MDL-40499' of git://github.com/jmvedrine/moodle 2013-07-09 13:26:49 +08:00
Damyon Wiese b9bca41b53 MDL-23646: Tinymce wrap plugin fixes.
Added info to upgrade.txt
Removed wrap plugins from the tinymce plugin list.
Fix trailing comma in wrap plugin javascript.
Removed non functioning "!" handling.
Fixed icons for wrap plugin.
2013-07-09 13:22:33 +08:00
Damyon Wiese 46a24596b8 MDL-23646 tinymce: Fix for pdw plugin
This plugin was changing the display of the toolbar tables from "display: table"
to "display: block" when hiding/unhiding the toolbars.

This broke the wrapping plugin.
2013-07-09 13:22:33 +08:00
Damyon Wiese 650a44fc26 MDL-23646 tinymce: Add upgrade algorithm for custom toolbars. 2013-07-09 13:22:33 +08:00
Damyon Wiese 05e9c136e6 MDL-23646 tinymce: Add plugin to wrap toolbar on small screens 2013-07-09 13:22:33 +08:00
Jason Fowler 3b62cd64d7 MDL-37565 - HTMLEditor - Adding a toggle plugin to TinyMCE to improve the appearance of the editor 2013-07-09 13:02:05 +08:00
Damyon Wiese 26616e4b6d Merge branch 'MDL-40386' of https://github.com/prateeksachan/moodle 2013-07-09 12:34:31 +08:00
Jamie Pratt 596ea56f6b MDL-40388 Reset globals after each unit test 2013-07-09 12:26:28 +08:00
Tony Levi 00726467f6 MDL-40035: Avoid rebuild_course_cache always for empty course 2013-07-09 13:53:27 +10:00
Adrian Greeve a327f25ef1 MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of
user names.
2013-07-09 11:45:50 +08:00
Damyon Wiese 9d871499fe Merge branch 'MDL-40318' of git://github.com/timhunt/moodle 2013-07-09 11:11:42 +08:00
Damyon Wiese 9ac5809512 Merge branch 'MDL-40562_master' of git://github.com/dmonllao/moodle 2013-07-09 11:04:58 +08:00
Damyon Wiese 35a8f0cb77 Merge branch 'wip-MDL-40368-m26' of git://github.com/samhemelryk/moodle
Conflicts:
	admin/tool/capability/index.php
2013-07-09 10:48:47 +08:00
Sam Hemelryk a13ee8e18a Merge branch 'MDL-40402-master2' of git://github.com/ankitagarwal/moodle 2013-07-09 14:42:03 +12:00
Damyon Wiese b080d5b688 Merge branch 'wip-MDL-40490-master' of git://github.com/abgreeve/moodle 2013-07-09 10:03:22 +08:00
Marina Glancy b4a044f3fb Merge branch 'MDL-40434' of git://github.com/timhunt/moodle 2013-07-09 11:30:42 +10:00
Tim Lock a9166e8210 MDL-40436: auth_ldap: Fixed warning when adding new LDAP users 2013-07-08 22:57:25 +08:00
Damyon Wiese 15b726d584 Merge branch 'MDL-40561-master' of git://github.com/FMCorz/moodle 2013-07-08 22:28:21 +08:00
Adam Olley dd8ba80005 MDL-40195: mod_assign: Display grades when quickgrading to 2 decimal places 2013-07-08 20:04:59 +09:30
David Monllao bda1dea4de MDL-40562 behat: Catch NoSuchElement exception 2013-07-08 12:05:45 +02:00
Frederic Massart dc95bdd8d9 MDL-40561 phpunit: Return the right guessed class 2013-07-08 17:58:38 +08:00
Damyon Wiese 64830bf658 Merge branch 'MDL-38314-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-07-08 15:10:58 +08:00
Frederic Massart 0d8eac408b MDL-40555 cache: Static store is searchable 2013-07-08 15:09:04 +08:00
Matt Debus cde6172df8 MDL-40524: mod_wiki: Display comments in order 2013-07-08 16:27:31 +09:30
Damyon Wiese 3536560eff Merge branch 'w28_MDL-40415_m26_opcache' of https://github.com/skodak/moodle 2013-07-08 13:40:09 +08:00
Petr Škoda 83f45bfd56 MDL-40450 update links to TinyMCE 3.x docs 2013-07-07 16:11:19 +02:00
Petr Škoda d03e450857 MDL-40243 use suspended flag in auth_enrol instead of nologin auth 2013-07-07 14:40:46 +02:00
Petr Škoda c118e4c112 MDL-40537 mark new major upgrade version
This is required for cache invalidation of classloader class map.
2013-07-07 14:34:31 +02:00
Matteo Scaramuccia 78030f9db1 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:02:17 +02:00
Matteo Scaramuccia 264631cdc8 MDL-39832 Files: Revert MDL-39688 commit, f111746140
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:02:15 +02:00
Mary Evans 5cb2f1ad9a MDL-40455: theme_formfactor: Move slash comments to be before code (not after) add missing layouts in formfactor/config,php 2013-07-06 18:53:44 +01:00
Petr Škoda a36d42a5ae MDL-40488 improve $CFG->admin docs 2013-07-06 11:47:15 +02:00
Tim Hunt 70f4ac5aea 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:30:17 +01:00
Frederic Massart ce58136547 MDL-40466 libraries: Not deprecating get_sorted_contexts() 2013-07-05 16:15:24 +08:00
Dan Poltawski 337965feb1 MDL-40516 deprecatedlib: final deprecation for old 1.9 functions
These functions have been throwing debugging notices for some time and
its time for them to be put to rest.
2013-07-05 15:09:16 +08:00
Dan Poltawski 8f7ebd1820 MDL-40496 deprecatedlib: remove 1.9 final deprecations 2013-07-05 12:34:25 +08:00
Rossiani Wijaya be27bd59d9 MDL-39815: wiki and glossary mods: update print icon and system print popup 2013-07-05 12:10:30 +08:00
Rossiani Wijaya ac9cd092d6 MDL-39815 glossary mod: code improvement.
Use html_writer to print out divs.
2013-07-05 11:23:35 +08:00
Rossiani Wijaya 2d5fb2a678 MDL-39815 Add action to display the print windows on page load 2013-07-05 11:23:35 +08:00
Rossiani Wijaya ab5bd37926 MDL-39812 clean theme: fixed breadcrumbs layout for narrow screens 2013-07-05 11:08:08 +08:00
Rossiani Wijaya c72106b277 MDL-39812: bootstrapbase theme: Fix breadcrumbs layout for narrow screens 2013-07-05 10:54:26 +08:00
Dan Marsden f2b3e82b09 MDL-37484 SCORM: disable toc in player when using direct AICC url 2013-07-05 14:37:20 +12:00
Dan Marsden 1554cfcd8f MDL-39926 SCORM: new Objectives report type 2013-07-05 13:18:10 +12:00
Dan Marsden d962e8143d MDL-20867 LDAP NTLM fast path - allow FF to use NTLM when fastpath
enabled
2013-07-05 13:05:47 +12:00
Dan Marsden 957566eb28 MDL-40512 SCORM: prevent undefined warning 2013-07-05 12:07:48 +12:00
Yuliya Bozhko e50220f840 MDL-40112 badges: Drop unused image field from badge table 2013-07-05 09:18:59 +12:00
Petr Škoda c05a50992e MDL-40415 add explicit OPcache support 2013-07-04 19:32:26 +02:00
Petr Škoda 9240ecbd98 MDL-40500 move MOODLE_INTERNAL define before core_component include
This resolves problems with MOODLE_INTERNAL in db/subplugins.php
2013-07-04 19:04:23 +02:00
Jean-Michel Vedrine f383a58a90 MDL-40499 Edit question from 1.9 backup breaks if images in subdirs 2013-07-04 14:09:13 +02:00
Tim Hunt df14e8625d MDL-40443 setType notice in quiz reports. 2013-07-04 13:08:14 +01:00
Tim Hunt 726fd6db19 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 13:07:32 +01:00
Tim Hunt b0ac85395c MDL-36479 quiz regrade: use progress bar to prevent time-outs 2013-07-04 13:06:18 +01:00
Eloy Lafuente (stronk7) 112f1ab9b0 MDL-40392 Navigation -> my courses listing tests
This introduces some behat tests to verify that
the display of enrolled courses in the navigation
block works as expected, both when a plain list
or a nested list is configured.

Personally I'm not happy with the way to select
expected text via css element. I'd love to see
something in an higher level like

I should see the text|link "xxxxx" in the "yyyy" "element"

with element being "block, header, footer, main...."

But that's another issue.
2013-07-04 13:51:25 +02:00
Ankit Agarwal 01546175d2 MDL-40402 libraries: update the mistake in comment 2013-07-04 15:46:15 +08:00
Ankit Agarwal 492ba9deb3 MDL-40402 libraries: Deprecate get_system_context() 2013-07-04 15:45:48 +08:00
Ankit Agarwal 1d364843ab MDL-40402 unittests: Make sure get_system_context() throws a deprecated warning 2013-07-04 15:41:19 +08:00
Ankit Agarwal 0601e0eef6 MDL-40402 libraries: Replace get_system_context() with context_system::instance() in core 2013-07-04 15:41:06 +08:00
Damyon Wiese f8e6e5bc30 weekly release 2.6dev 2013-07-04 15:28:10 +08:00
Rajesh Taneja 85b2e46f23 MDL-40401 Libraries: load_temp_role() and remove_temp_roles() can not be used any more. 2013-07-04 15:04:09 +08:00
Adrian Greeve b1d31f49dc MDL-40490 - database: Fixed a check on database port options.
The addition of a port for the database means that an array
would be set regardless of whether it had any information or not.
The isset() function sees an array as being set and follows through
with the rest of the if statement concatenating a colon to the end
of the database host name and throwing a connection problem if no port
number is supplied.

The if statement has now been changed to if not empty. The empty
function does see zero as an empty value, but a port shouldn't have
a value of zero anyway.
2013-07-04 15:01:53 +08:00
Mary Evans 46616bf5ee MDL-40131 theme_bootstrapbase: added missing grader table css to less/moodle/grade.less
Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-07-04 14:43:18 +08:00
Damyon Wiese af282bcc2c 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:09 +08:00
Ankit Agarwal 71e38b128e MDL-40039 phpunit: Test core_files_external::upload() without the new params 2013-07-04 13:26:07 +08:00
Sam Hemelryk 07dd7fcc11 MDL-39813 behat: fixed up behat expectations 2013-07-04 09:22:54 +12:00
Eloy Lafuente (stronk7) bb9c764caf MDL-40376 Fix copy/paste typo 2013-07-03 17:53:01 +02:00
Eloy Lafuente (stronk7) 619658b877 Merge branch 'moduleuninstallfix' of https://github.com/skodak/moodle 2013-07-03 11:36:29 +02:00
Eloy Lafuente (stronk7) 620e1e3787 Merge branch 'w27_MDL-39088_m26_uninstall' of https://github.com/skodak/moodle 2013-07-03 11:34:55 +02:00
Rajesh Taneja 33564ffb42 MDL-40400 Gradebook: get_toggles_html and print_toggle cannot be used anymore 2013-07-03 17:06:59 +08:00
Frederic Massart 8853cd202c MDL-40369 theme: Removing old gif icons with PNG/SVG versions 2013-07-03 16:58:18 +08:00
Frederic Massart 677541ebe7 MDL-40369 theme: MyMobile does not override deprecated icons 2013-07-03 16:47:36 +08:00
Frederic Massart 7125ef4b2c MDL-40369 theme: Afterburner does not override deprecated icons 2013-07-03 16:47:36 +08:00
Frederic Massart 36f5dd3943 MDL-40369 theme: Remove deprecated icons 2013-07-03 16:47:36 +08:00
Frederic Massart a8dd22a7d7 MDL-40369 theme: Fix core using deprecated icons 2013-07-03 16:47:35 +08:00
Frederic Massart 0193dd1c32 MDL-38314 repository: Improving performance of upgrade script 2013-07-03 16:24:19 +08:00
Damyon Wiese 13e82f1c67 MDL-40472: Clean all codechecker warnings on mod_assign 2013-07-03 16:00:43 +08:00
Petr Škoda 02a541ee8e MDL-39088 fix incorrect module count SQL 2013-07-03 09:40:07 +02:00
Frederic Massart 65ef774544 MDL-38314 repository: Unit Tests for delete_all_for_context() 2013-07-03 15:26:20 +08:00
Frederic Massart d802435e00 MDL-38314 repository: Delete repository instances on context deletion 2013-07-03 15:26:20 +08:00
Frederic Massart 4aa4d88da8 MDL-38314 repository: Remove orphan repository instances 2013-07-03 15:26:20 +08:00
Nadav Kavalerchik 8137e0496e MDL-37065 - Change get_string('status') token in assignment submissions page to a different token (for translation flexibility)
AMOS BEGIN
 CPY [status,core],[status,mod_assign]
AMOS END
2013-07-03 14:59:52 +08:00
Yuliya Bozhko 19a9f2eada MDL-39986 badges: Show badge navigation to users with awardbadge capability
Also fixes an arror when a user with this capability tries to award a badge,
but their role is not among the criteria set up for a badge
2013-07-03 13:13:55 +08:00
Damyon Wiese 4787014c56 MDL-39813 recompile less for bootstrapbase 2013-07-03 11:38:21 +08:00
Damyon Wiese 24e13d4283 Merge branch 'MDL-39813_login' of git://github.com/andyjdavis/moodle 2013-07-03 11:35:53 +08:00
Andrew Davis 29a24edd8b MDL-39813 added some white space above the cookie message 2013-07-03 11:07:35 +08:00
Damyon Wiese 74ed095606 MDL-39558 badges: Prevent backup of badges without user information 2013-07-03 10:52:50 +08:00
Yuliya Bozhko bd0d2bdcc9 MDL-39558 badges: Add backup/restore of manually awarded badges 2013-07-03 09:36:45 +08:00
Yuliya Bozhko 2832093f53 MDL-39558 badges: Add backup/restore to course badges 2013-07-03 09:35:06 +08:00
Eloy Lafuente (stronk7) cfe8b6df33 Merge branch 'MDL-40275-m' of git://github.com/micaherne/moodle 2013-07-02 21:52:17 +02:00
Eloy Lafuente (stronk7) 1b80060ff0 MDL-35009 Normalize deprecation (also MDL-34472)
- Use same deprecation phrases style.
- Use same upgrade.txt phrases style.
- Add unit test covering the deprecation.

See the issue for some more rationale / comments.
2013-07-02 21:40:16 +02:00
Eloy Lafuente (stronk7) 7b2ca65574 Merge branch 'wip-mdl-35009' of git://github.com/rajeshtaneja/moodle
Conflicts:
	lib/accesslib.php
	lib/deprecatedlib.php
	lib/upgrade.txt
2013-07-02 21:22:30 +02:00
Eloy Lafuente (stronk7) aefc66dd35 Merge branch 'MDL-40376-m' of git://github.com/andrewnicols/moodle 2013-07-02 21:11:49 +02:00
Eloy Lafuente (stronk7) f8c54a7469 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 20:39:05 +02:00
sam marshall 6316bfa0c7 MDL-37516 Conditional activities: user field condition display fixes 2013-07-02 20:00:17 +02:00
Eloy Lafuente (stronk7) c946f60b0d Merge branch 'MDL-40314_M26' of git://github.com/lazydaisy/moodle 2013-07-02 19:41:44 +02:00
Eloy Lafuente (stronk7) 1203222a3c Merge branch 'MDL-40246_master' of git://github.com/dmonllao/moodle 2013-07-02 14:27:34 +02:00
Eloy Lafuente (stronk7) 3c2e7a0e7c Merge branch 'MDL-34472-master' of git://github.com/ankitagarwal/moodle
Conflicts:
	lib/upgrade.txt
2013-07-02 14:09:11 +02:00
Eloy Lafuente (stronk7) 8b180f2317 Merge branch 'MDL-40439-en_fix' of git://github.com/mudrd8mz/moodle 2013-07-02 13:47:09 +02:00
Andrew Nicols 100360f96c MDL-40440 Backup: Skip files that already exist 2013-07-02 11:13:03 +01:00
Helen Foster 77fc81f3ee MDL-40439 Merge English strings from the en_fix language pack 2013-07-02 11:42:10 +02:00
Dan Poltawski 6f3c780f3b Merge branch 'w27_MDL-40337_m26_rolescleanup' of https://github.com/skodak/moodle 2013-07-02 17:09:38 +08:00
Dan Poltawski 1e031a4616 Merge branch 'MDL-40389' of git://github.com/stronk7/moodle 2013-07-02 15:52:58 +08:00
Damyon Wiese f48f4827d1 Merge branch 'w27_MDL-40299_m26_textlib' of https://github.com/skodak/moodle 2013-07-02 15:23:38 +08:00
Tim Hunt 38c3492038 MDL-40434 calculatedmulti multiple-response questions not randomised 2013-07-02 08:21:42 +01:00
Dan Poltawski fe6d32fcb3 Merge branch 'MDL-40282' of github.com:colchambers/moodle 2013-07-02 15:15:04 +08:00
Ankit Agarwal bfb99cc619 MDL-34472 phpunit: Make sure a debugging is thrown when get_context_instance() is called 2013-07-02 15:09:01 +08:00
Rajesh Taneja 38efca2315 MDL-40127 Enrolments: Updated version and update.txt 2013-07-02 14:35:35 +08:00
Rajesh Taneja 94b98dae64 MDL-40127 Enrolments: Added unit test 2013-07-02 14:35:34 +08:00
Rajesh Taneja cc1b501595 MDL-40127 Enrolments: Added status to instance info and removed displaying of enrolment form with notice
get_enrol_info will return status of enrolment instance, to notify webservice if enrolment is possible or not
If enrolment is not possible then don't show enrolment form
show_enrolme_link will use can_self_enrol to varify if enrolment link should be shown or not.
2013-07-02 14:35:33 +08:00
Rajesh Taneja 85d1c53af4 MDL-40127 Enrolments: Abstracted self_enrolment code so as to be used by webservices 2013-07-02 14:35:33 +08:00
Damyon Wiese 1fd351c207 Merge branch 'wip-MDL-40353-master' of git://github.com/marinaglancy/moodle 2013-07-02 14:28:46 +08:00
Dan Poltawski 6e4de30636 Merge branch 'MDL-40039-master' of git://github.com/ankitagarwal/moodle 2013-07-02 14:27:49 +08:00
Dan Poltawski 20cea2c57f Merge branch 'MDL-40297' of git://github.com/stronk7/moodle 2013-07-02 13:43:40 +08:00
Andreas Grabs 09c2ec4303 MDL-39570 mod_feedback - Missing privilege check 2013-07-02 13:37:10 +08:00
Dan Poltawski b25cd1f3d5 Merge branch 'w27_MDL-40399_m26_msarrayshift' of https://github.com/skodak/moodle 2013-07-02 13:34:09 +08:00
Petr Škoda 61d96926cf MDL-39088 fix admin/localplugins.php uninstall url 2013-07-02 07:24:33 +02:00
Dan Marsden 612fdeb24e MDL-39628 Chat: check mod/chat:chat capability when using daemon.
Thanks to Francois Gauthier for report/fix.
2013-07-02 12:20:29 +08:00
Damyon Wiese 021beab522 MDL-26943 Add db/subplugins.php to the local plugin readme.txt 2013-07-02 12:02:33 +08:00
Damyon Wiese a57885a651 Merge branch 'w27_MDL-26943_m26_localsubplugins' of https://github.com/skodak/moodle 2013-07-02 11:00:33 +08:00
Jason Fowler e73cb1acb8 MDL-37818 - RSS - Prevent access to blocks while RSS context errors are displayed 2013-07-02 10:03:41 +08:00
Dan Poltawski ad3ebb8f5f Merge branch 'w27_MDL-40266_m26_arrayshift' of https://github.com/skodak/moodle 2013-07-02 09:55:20 +08:00
Sam Hemelryk 46af2845d0 MDL-40368 tool_capability: clean up as per notes from peer-review.
* Coding style clean up.
* SQL indentation
* Removal of non-matching capabilities when searching.
* Fixed notices/warnings when hitting enter on search.
2013-07-02 11:34:11 +12:00
Eloy Lafuente (stronk7) 9a6a2d1ce0 Merge branch 'get_users_by_capability_fix_master' of http://github.com/timgus/moodle 2013-07-02 00:46:30 +02:00
Eloy Lafuente (stronk7) c6638cd6ce Merge branch 'w27_MDL-39088_m26_uninstall' of https://github.com/skodak/moodle 2013-07-02 00:43:31 +02:00
Sam Hemelryk 93b2977d9d Merge branch 'MDL-39733' of git://github.com/stronk7/moodle 2013-07-02 10:31:48 +12:00
Eloy Lafuente (stronk7) 2e746b72be MDL-39733 xhprof: implement import of runs 2013-07-02 00:28:47 +02:00
Rossiani Wijaya a4a2ddfbf1 MDL-39546 Lesson module: removed duplicate to decode special characters 2013-07-02 09:37:12 +12:00
Rossiani Wijaya f6b6cef8c0 MDL-39546 Lesson module: fixed matching question issues. 2013-07-02 09:37:01 +12:00
Eloy Lafuente (stronk7) dfd851be7c Merge branch 'w27_MDL-39754_m26_evn26' of https://github.com/skodak/moodle 2013-07-01 23:13:39 +02:00
Eloy Lafuente (stronk7) e4bb5050a6 Merge branch 'MDL-40370' of git://github.com/timhunt/moodle 2013-07-01 18:01:32 +02:00
Eric Merrill 7829d5d7c3 MDL-40412 course Expanding the height of module description fields.
Expanding the default height of mod descriptions to 10, which gives
you 3 real lines once TinyMCE Loads.
2013-07-01 10:24:38 -04:00
Tim Hunt dc7c9ab222 MDL-40370 qtype_shortanswer: unique index upgrade problem.
Eliminate duplicate rows before we try to add a unique index. We
arbitrarily keep the duplicate row with the lowest id.
2013-07-01 11:18:16 +01:00
prateeksachan 6b693ce8d3 MDL-40386: Fix for updating timemodified field in book_chapters 2013-07-01 14:29:10 +05:30
Petr Škoda f0fdbc5cc8 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 09:44:02 +02:00
Ankit Agarwal bea86e845e MDL-34472 libraries: Remove usage of get_context_instance() from core 2013-07-01 15:40:37 +08:00
Ankit Agarwal 61a0299a94 MDL-34472 libraries: add deprecated warning to get_context_instance() 2013-07-01 15:40:37 +08:00
Rajesh Taneja ce2b21509e MDL-35009 Libraries: Deprecated get_context_instance_by_id 2013-07-01 14:55:23 +08:00
Petr Škoda 7aed7f46ab 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:52:03 +02:00
Petr Škoda b983901d48 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:51:35 +02:00
Rajesh Taneja aa5132140b MDL-40358 Administration: Added group and status filter on user enrolment page 2013-07-01 14:20:21 +08:00
Dan Poltawski 91d445db9a Merge branch 'wip-MDL-39212-m26' of git://github.com/samhemelryk/moodle 2013-07-01 11:55:45 +08:00
Mark Nielsen aa74cccb06 MDL-40308: Privacy settings do not change
Update LTI mod form so checkboxes always submit their value.
2013-07-01 11:27:50 +08:00
Dan Poltawski 536a240891 Merge branch 'wip-MDL-40344-m26' of git://github.com/samhemelryk/moodle 2013-07-01 11:21:47 +08:00
Ankit Agarwal 9dadb59064 MDL-39020 phpunit: Rename incorrect filename
Rename externallib_tests.php to externallib_test.php
Fix failing unit tests
2013-07-01 10:32:28 +08:00
Sam Hemelryk 6ee9989d25 Merge branch 'MDL-40069' of git://github.com/timhunt/moodle 2013-07-01 13:48:05 +12:00
Sam Hemelryk e4123e7235 NOBUG: fixed whitespace 2013-07-01 13:24:27 +12:00
Sam Hemelryk e962fe0871 Merge branch 'wip-MDL-39741-master' of git://github.com/marinaglancy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-01 13:22:27 +12:00
Sam Hemelryk 88abda50aa Merge branch 'MDL-35206-email-links' of git://github.com/mudrd8mz/moodle 2013-07-01 13:08:31 +12:00
Sam Hemelryk 4d6f35cefa MDL-19390 user: fixed typo during integration 2013-07-01 09:16:59 +12:00
Andrew Nicols df8b7e73a5 MDL-40376 Themes: Remove padding from course/manage page 2013-06-30 19:27:28 +01:00
Martin Langhoff 4f3e38e745 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:25:14 +02:00
Eloy Lafuente (stronk7) 4aad6f022d MDL-40389 Test "parent" course/category generators
Verify that the category->parent switchers for
course & category behat generators are happening
as expected. Use the manage courses page for that.
2013-06-30 18:07:52 +02:00
Petr Škoda 483b680413 MDL-19390 add new option to send password to new users 2013-06-30 11:10:17 +02:00
Petr Škoda 3601c5f09c MDL-26943 implement subplugin support for local plugins 2013-06-30 09:18:35 +02:00
Tim Hunt dc38c5b4e0 MDL-40069 question/type/upgrade.txt editing changes
Try to more clearly document what question type authors need to do to
upgrade their question types.
2013-06-28 18:02:26 +01:00
Colin Chambers e686516759 MDL-40069 Document editing form changes 2013-06-28 18:02:25 +01:00
David Mudrák a7182af94a MDL-35206 Fix the links list enumeration in the html2text library 2013-06-28 13:10:10 +02:00
Colin Chambers 4704eda0f0 MDL-40282 Collapsible editor loses border in IE8-9 2013-06-28 11:18:28 +01:00
Sam Hemelryk 1eb2b51703 MDL-39212 css: we now chunk and no longer separate 2013-06-28 16:49:02 +12:00
Ankit Agarwal 57d16acd74 MDL-40039 webservices: Add support for alternate to contextid parameter to core_files_external::upload() 2013-06-28 10:51:01 +08:00
Eloy Lafuente (stronk7) 2e07539699 MDL-39733 profiling: UI for importing runs 2013-06-28 04:46:40 +02:00
Eloy Lafuente (stronk7) 1d3d4d1376 MDL-39733 profiling: UI for exporting runs 2013-06-28 04:46:40 +02:00
Eloy Lafuente (stronk7) e36a3e3643 MDL-39733 xhprof: implement export of runs 2013-06-28 04:46:39 +02:00
Eloy Lafuente (stronk7) 19263336a0 MDL-40297 whitespace, comments & var names cleanup 2013-06-28 04:46:00 +02:00
Dmytro Vorona 42b40f99c1 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-28 04:46:00 +02:00
Sam Hemelryk 9935136f4d MDL-40368 tool_capability: overall improvements made
* Can now compare multiple capabilities at the same time.
* Capability search now persists between requests.
* Upgraded to use renderers.
* Upgraded module.js to YUI shifted module.
* Converted deprecated calls.
* Converted forms to Moodleforms.
* Implemented backend functionality to overview at
  different context levels. Not possible presently as
  there are no front end hooks.
2013-06-28 12:59:01 +12:00
Sam Hemelryk 09da042b36 MDL-40344 navigation: expandable branch id is now properly unique 2013-06-28 09:59:13 +12:00
Petr Škoda 1415127ebc MDL-40337 fix some more deprecated calls in role code 2013-06-27 22:41:14 +02:00
Mark Nielsen adc23cc909 MDL-38419: External tool - when force SSL checked, URLs get corrupted 2013-06-27 13:29:35 -07:00
Petr Škoda 6a407a7c0e MDL-39088 fix enrol migration redirect url
Thanks David for spotting it!
2013-06-27 22:20:36 +02:00
Petr Škoda dd24dd37ee MDL-39088 use word "Uninstall" consistently in plugin administration UI 2013-06-27 22:20:36 +02:00
Petr Škoda d2fba597ef MDL-39088 migrate tinymce plugins uninstallation to plugin_manager 2013-06-27 22:20:36 +02:00
Petr Škoda 958b0af64f MDL-39088 migrate admin tool uninstallation to plugin_manager 2013-06-27 22:20:36 +02:00
Petr Škoda 0a53e5c5ae MDL-39088 migrate report uninstallation to plugin_manager 2013-06-27 22:20:36 +02:00
Petr Škoda 142f9d5087 MDL-39088 migrate plagiarism uninstallation to plugin_manager 2013-06-27 22:20:35 +02:00
Petr Škoda cd79930e4d MDL-39088 migrate module uninstallation to plugin_manager 2013-06-27 22:20:35 +02:00
Petr Škoda ba7ce5e150 MDL-39088 migrate local uninstallation to plugin_manager 2013-06-27 22:20:35 +02:00
Petr Škoda 5643f932e9 MDL-39088 migrate enrol uninstallation to plugin_manager 2013-06-27 22:20:35 +02:00
Petr Škoda b07526e8de MDL-39088 migrate editor uninstallation to plugin_manager 2013-06-27 22:20:35 +02:00
Petr Škoda 8a953d629f MDL-39088 migrate course format uninstallation to plugin_manager 2013-06-27 22:20:35 +02:00
Petr Škoda 6584d8a861 MDL-39088 migrate block uninstallation to plugin_manager 2013-06-27 22:20:35 +02:00
Petr Škoda 2f87bb0315 MDL-39088 add new general uninstall url support to plugin manager 2013-06-27 22:20:34 +02:00
Petr Škoda d534708fd3 MDL-40299 textlib conversion to core_text and core_collator 2013-06-27 22:18:57 +02:00
Petr Škoda 5089cca0b4 MDL-40337 use full frankenstyle in get_string() calls 2013-06-27 22:17:46 +02:00
Petr Škoda 07364397cd MDL-40337 fix remaining code checker troubles in admin/roles/* 2013-06-27 22:17:45 +02:00
Petr Škoda 282ed3e5d9 MDL-40337 cleanup users roles code 2013-06-27 22:17:45 +02:00
Petr Škoda 72de139a6e MDL-40337 cleanup role permissions code 2013-06-27 22:17:45 +02:00
Petr Škoda d7797b7924 MDL-40337 cleanup role override code 2013-06-27 22:17:45 +02:00
Petr Škoda 06a0a2955e MDL-40337 cleanup role manage UI 2013-06-27 22:17:45 +02:00
Petr Škoda bb061951a0 MDL-40337 cleanup role definition code 2013-06-27 22:17:45 +02:00
Petr Škoda aac13d6728 MDL-40337 cleanup role assign pages 2013-06-27 22:17:45 +02:00
Petr Škoda 67ab75e521 MDL-40337 cleanup role allow pages 2013-06-27 22:17:45 +02:00
Petr Škoda d6c4544d63 MDL-40337 cleanup admin select UI 2013-06-27 22:17:44 +02:00
Petr Škoda bc7b53fb49 MDL-40337 use class loader for admin/roles/* 2013-06-27 22:17:44 +02:00
Eloy Lafuente (stronk7) f0d37f4ac5 weekly release 2.6dev 2013-06-27 20:09:21 +02:00
Eloy Lafuente (stronk7) 20e511a9ac Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-06-27 20:04:35 +02:00
Marina Glancy c3820eda51 MDL-39741 removed unused css classes 2013-06-27 22:17:11 +10:00
David Monllao d0a9a29bd0 MDL-40246 mod_forum: Changing scenario to non-JS
Also replacing hardcoded waits for a
wait to be redirected.
2013-06-27 14:24:00 +08:00
Marina Glancy 69e33fa66b MDL-40353 fixed wrong redirection on course group page 2013-06-27 13:56:16 +10:00
Marina Glancy 834f4ea69d MDL-39741 Use CSS class dimmed_text instead of hidden in grader report 2013-06-27 12:37:34 +10:00
AMOS bot eba177265a Automatically generated installer lang files 2013-06-27 00:40:23 +00:00
Eloy Lafuente (stronk7) 26568ba865 Merge branch 'w26_MDL-39701_m26_filterupgrade' of git://github.com/skodak/moodle 2013-06-26 12:30:41 +02:00
Petr Škoda f18c764a7c MDL-39701 prevent string filtering before finishing 2.5 upgrade 2013-06-26 09:50:33 +02:00
Eloy Lafuente (stronk7) 74618f31d2 Merge branch 'w26_MDL-17081_m26_roles2' of git://github.com/skodak/moodle 2013-06-25 16:28:22 +02:00
Petr Škoda 4dd680c74e MDL-17081 allow role reset to self
The use case is importing of incomplete XML preset - keep current + preset changes. This also discards any pending changes.
2013-06-25 15:15:46 +02:00
Charles Fulton 74ec49a139 MDL-40323 report_log: fix strict standards error 2013-06-25 06:07:30 -07:00
Eloy Lafuente (stronk7) 09579cd198 Merge branch 'MDL-40033_master' of git://github.com/dmonllao/moodle 2013-06-25 12:08:15 +02:00
Petr Škoda 8c6b980803 MDL-17081 fix invalid role XML schema 2013-06-25 10:18:22 +02:00
Andrew Davis b4e27e9d6d MDL-39813 dewordified the login screen 2013-06-25 11:30:13 +08:00
Sam Hemelryk 4eba7399ad Merge branch 'w26_MDL-40305_m26_phpunitloader' of https://github.com/skodak/moodle 2013-06-25 12:19:30 +12:00
Eloy Lafuente (stronk7) 7f5c46db8c Merge branch 'w26_MDL-17081_m26_roles2' of git://github.com/skodak/moodle 2013-06-25 01:42:17 +02:00
Sam Hemelryk 49eef7d82d Merge branch 'wip-MDL-40204_master' of git://github.com/gjb2048/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-25 11:35:57 +12:00
Mary Evans 314ae67ddf MDL-40314 theme_formfactor: fixed parse error in style/core.css 2013-06-25 00:02:39 +01:00
Sam Hemelryk a1d472d8c6 Merge branch 'MDL-40304_master' of git://github.com/kordan/moodle 2013-06-25 10:59:29 +12:00
Mary Evans 564ef3ee94 MDL-40314 theme_formfactor: Clean up whitespace and general tidy up of CSS 2013-06-24 23:51:02 +01:00
Petr Škoda fcd75b6e6d MDL-17081 store also CAP_INHERIT in role export files 2013-06-25 00:24:55 +02:00
Sam Hemelryk a0bfe7335b MDL-40289 badges: version bump 2013-06-25 10:06:08 +12:00
Sam Hemelryk 10a741cc64 Merge branch 'wip-MDL-40065-master_4' of git://github.com/gjb2048/moodle 2013-06-25 09:59:24 +12:00
Sam Hemelryk cbc4b33afd Merge branch 'w26_MDL-40289_m26_badgescaps' of git://github.com/skodak/moodle 2013-06-25 09:13:16 +12:00
Petr Škoda d44e0aa323 MDL-40305 implement moodle specific phpunit testcase classloader 2013-06-24 21:29:37 +02:00
Eloy Lafuente (stronk7) 65ab140e00 Merge branch 'w26_MDL-40233_m26_frontset' of git://github.com/skodak/moodle 2013-06-24 21:29:05 +02:00
Eloy Lafuente (stronk7) 293aba00b7 Merge branch 'MDL-40264-essay-zero' of git://github.com/ktemkin/moodle 2013-06-24 21:24:00 +02:00
Eloy Lafuente (stronk7) 1d04b481dd Merge branch 'w26_MDL-40254_m26_flatfile' of https://github.com/skodak/moodle 2013-06-24 21:13:01 +02:00
Eloy Lafuente (stronk7) 283dd00b7e Merge branch 'MDL-34610' of git://github.com/timhunt/moodle 2013-06-24 20:21:22 +02:00
Eloy Lafuente (stronk7) b662b8576d Merge branch 'MDL-40255_master' of git://github.com/lazydaisy/moodle 2013-06-24 19:25:53 +02:00
Eloy Lafuente (stronk7) 75413055d0 Merge branch 'm26_MDL-40200_Notices_When_Viewing_Profile_Invalid_UserId' of https://github.com/scara/moodle 2013-06-24 19:00:33 +02:00
Eloy Lafuente (stronk7) e2eccd0952 Merge branch 'MDL-40258_master' of git://github.com/sam-moodle/moodle 2013-06-24 18:56:08 +02:00
Gareth J Barnard 2e3fb23ff7 MDL-40065 theme_bootstrapbase theme_clean: Simplify column lyts / fix blocks. 2013-06-24 17:06:12 +01:00
Eloy Lafuente (stronk7) 4cd8979c42 Merge branch 'MDL-40250-master' of git://github.com/ankitagarwal/moodle 2013-06-24 17:23:29 +02:00
Eloy Lafuente (stronk7) 3093713382 Merge branch 'w26_MDL-17081_m26_roles2' of git://github.com/skodak/moodle 2013-06-24 15:39:07 +02:00
kordan 2c724a63cd MDL-40304 theme_formal_white: improved the compliancy to coding rules in formal_white 2013-06-24 15:36:32 +02:00
Petr Škoda 5e72efd498 MDL-17081 add role export/import
This includes improved role creation, allowed roles are editable and other improvements.
2013-06-24 12:40:59 +02:00
Sam Hemelryk c7b6c86a49 Merge branch 'wip-MDL-39044-master' of git://github.com/phalacee/moodle 2013-06-24 15:43:19 +12:00
Sam Hemelryk 109a2ff00e Merge branch 'w26_MDL-39701_m26_filterupgrade' of git://github.com/skodak/moodle 2013-06-24 15:15:01 +12:00
Sam Hemelryk 4ba45e3955 Merge branch 'MDL-39779' of git://github.com/rwijaya/moodle 2013-06-24 14:43:00 +12:00
Sam Hemelryk 7bb2a9586e Merge branch 'MDL-39760-master' of https://github.com/lucisgit/moodle 2013-06-24 14:30:49 +12:00
Sam Hemelryk 615a5aa6f1 Merge branch 'MDL-39280-master-int' of git://github.com/FMCorz/moodle 2013-06-24 14:19:20 +12:00
Sam Hemelryk f8dcecfd07 Merge branch 'mdl26dev-MDL-40130-let-course-category-caching-be-used' of git://github.com/brki/moodle 2013-06-24 11:44:20 +12:00
Sam Hemelryk 1d713c7c53 Merge branch 'w26_MDL-40294_m26_plugininfo' of https://github.com/skodak/moodle 2013-06-24 11:42:29 +12:00
Sam Hemelryk f04721e2bf MDL-38347 fixed whitespace 2013-06-24 11:28:23 +12:00
Sam Hemelryk 2d9161791f Merge branch 'wip-MDL-38347-master' of git://github.com/phalacee/moodle 2013-06-24 11:22:30 +12:00
Sam Hemelryk 45aac51a3c MDL-38376 mod_assign: fixed whitespace 2013-06-24 11:05:51 +12:00
Sam Hemelryk 8448a12a33 Merge branch 'MDL-28124_master' of git://github.com/lazydaisy/moodle 2013-06-24 10:30:19 +12:00
Amanda Doughty ea698284cf MDL-38376 mod_assign: Feedback displayed when Grade set to hidden 2013-06-24 10:16:04 +12:00
Sam Hemelryk 0b20ce2841 Merge branch 'wip-MDL-38631-master' of git://github.com/marinaglancy/moodle 2013-06-24 10:00:20 +12:00
Sam Hemelryk ef03bb6d9f Merge branch 'MDL-39153-master' of git://github.com/ankitagarwal/moodle 2013-06-24 08:57:44 +12:00
Petr Škoda 3748e469fe MDL-40254 ignore flatfile records with no user idnumber 2013-06-23 21:37:56 +02:00
Petr Škoda 490149eb8f MDL-40294 remove references to removed plugin caches 2013-06-23 21:24:15 +02:00
Petr Škoda a7b0dfd4e2 MDL-40289 fix block_badges capability defaults 2013-06-23 12:33:40 +02:00
Petr Škoda 3e9f4c7b1b MDL-40289 fix all badges capabilities
1/ contextlevel must be the lowest level where capability can be overriden
2/ coursecreator is for course creation only!!!
3/ do not mix user with other archetypes
4/ config risk is for admin actions only in standard install

No upgrade cleanup, sorry, blame integrators...
2013-06-23 12:22:31 +02:00
Petr Škoda c3bc6f1217 MDL-39701 prevent filters before finishing 2.5 upgrade
This prevents problems with unsigned integers in MySQL 5.5
2013-06-22 22:22:47 +02:00
Petr Škoda aaf823a64d MDL-40233 add proper cache invalidation on frontpage setting save 2013-06-22 22:18:16 +02:00
Mary Evans 7f773d0bcd MDL-40255 theme_boxxie/theme_formfactor: Added block-region class to layout files to enable dnd file uploader to work. 2013-06-22 20:34:44 +01:00
Matteo Scaramuccia 243ab45c16 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-22 09:54:30 +02:00
Marina Glancy 3b42c973d7 MDL-38631 link categories in My courses only when needed 2013-06-22 16:27:28 +10:00
Dmytro Vorona 257b59e737 MDL-38631 Fixed faulty add_category call, introduced in 758103 2013-06-22 16:27:28 +10:00
Tim Hunt 3f6a09d42d MDL-34610 remove legacy IE CSS. It breaks form layout 2013-06-21 21:57:44 +01:00
Sam Chaffee 41340f0461 MDL-40258: Fixed invalid json string error in file-picker 2013-06-21 11:16:44 -04:00
Michael Aherne 4dd791328e MDL-40275 core Improve documentation for block_base::has_config() 2013-06-21 11:40:36 +01:00
Brian King b04f84bc80 MDL-40130 Caching: let make_categories_list use the cache it makes 2013-06-21 11:12:21 +02:00
David Monllao 50eeae5906 MDL-40033 behat: Waiting until file manager is available 2013-06-21 15:37:33 +08:00
Dan Poltawski 0ea1fbbb55 weekly release 2.6dev 2013-06-21 13:25:42 +08:00
Dan Poltawski a6ef66d919 fix permissions 2013-06-21 13:24:44 +08:00
Dan Poltawski ba045b31a7 Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-06-21 13:23:21 +08:00
Ankit Agarwal 11f20be783 MDL-40250 phpunit: Add unit tests for core_files_external::upload() 2013-06-21 11:32:02 +08:00
Kyle Temkin efe677970a 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-20 19:10:12 -04:00
Tim Gus 74816ad801 MDL-40259 - For SCORM reports limit fields returned from
get_users_by_capability to user ID to decrease memory utilization
2013-06-20 15:48:40 -04:00
Dan Poltawski e64e28d715 Revert "MDL-33105 flexible apply_units() function"
This reverts commit bf766d43f9.
2013-06-20 21:09:36 +08:00
Jason Fowler a9e9b129e0 MDL-39044 - Course Completion - Replaceing strtolower with multibyte safe textlib::strtolower 2013-06-20 08:56:23 +08:00
Ruslan Kabalin 450fde4e16 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 14:51:46 +01:00
Dan Poltawski 0ea73a5524 Merge branch 'fix_classloading8' of git://github.com/skodak/moodle 2013-06-19 15:47:08 +08:00
Petr Škoda 1652aa9cdd MDL-39854 fix borked core_component cache 2013-06-19 09:42:05 +02:00
Dan Poltawski 846f6fbe00 MDL-33955 filelib: accept any HTTP 1.0 in tests
This is common with proxies like squid which don't support http
pipelining.
2013-06-19 14:55:35 +08:00
David Monllao 1d4ae19d62 MDL-39854 disable component cachin in BEHAT_TEST 2013-06-19 11:28:32 +08:00
Sam Hemelryk 11fb83fee8 Merge branch 'MDL-40109_master-fix' of git://github.com/dmonllao/moodle 2013-06-19 14:06:41 +12:00
Sam Hemelryk 80b3780a53 Revert "MDL-38555 forms: Prevent same data submission multiple times."
This reverts commit 761670208a.
2013-06-19 13:45:46 +12:00
David Monllao 2532b034f4 MDL-40109 behat: Fixing backup feature 2013-06-19 08:53:08 +08:00
Sam Hemelryk 9d109ad60d Merge branch 'w25_MDL-33955_m26_curlredir' of git://github.com/skodak/moodle 2013-06-19 09:13:30 +12:00
Eloy Lafuente (stronk7) d745d2d45e MDL-40103 Now xmldb code matches original templates 100%
There were still some differences between the php code
used in the issue and the php code generated by the
xmldb editor for the template tables. This commit put
both 100% in sync.
2013-06-18 15:22:51 +02:00
Russell Smith 2412371efd MDL-40103 stats: correct incorrectly copied stats tables. 2013-06-18 12:16:38 +02:00
Petr Škoda 04a4b97f99 MDL-39854 disable component caching in BEHAT_UTIL 2013-06-18 12:02:07 +02:00
Petr Škoda 402a974e5e MDL-39854 fix get_list_of_plugins() test 2013-06-18 11:46:44 +02:00
Dan Poltawski 6ef007def6 Merge branch 'MDL-37761-m' of git://github.com/andrewnicols/moodle 2013-06-18 16:47:18 +08:00
Eloy Lafuente (stronk7) 952cd13796 Merge branch 'fix_classloading5' of git://github.com/skodak/moodle 2013-06-18 10:37:45 +02:00
Petr Škoda 7f86a95f30 MDL-39854 fix test_finder regression 2013-06-18 10:37:04 +02:00
Petr Škoda 1abf2f6acc MDL-39854 fix installer regression caused by new core_component 2013-06-18 10:31:26 +02:00
Dan Poltawski 0bd0328e6c MDL-39854: version bump for classloader new world 2013-06-18 15:13:51 +08:00
Petr Škoda e835ef583a MDL-39854 use classloader in add-on installer tool 2013-06-18 09:10:23 +02:00
Petr Škoda 299e107e97 MDL-39854 use class loader in editor_tinymce 2013-06-18 09:10:17 +02:00
Petr Škoda 9e19a0f08b MDL-39854 reimplement Frankenstyle support and enable classloader
Better performance, more reliable, completely self contained,
more validation and full backwards compatibility.

This will also allow us to implement ignoring of plugins.
2013-06-18 09:10:07 +02:00
Dan Poltawski 3d164e1ef4 Revert "MDL-39474 Library: Make a fast way to check developer debug mode"
There were multiple problems discovered.

This reverts commit 5c92e7a740.

Conflicts:
	admin/cli/install.php
2013-06-18 15:07:22 +08:00
Andrew Nicols aa15e2a8b0 MDL-37761 Backup: Add phpdoc for MODE constants 2013-06-18 07:52:04 +01:00
Andrew Nicols b1850c12c1 MDL-37761 Backup: Do not include files in backups when importing courses/activities
When we import courses or duplicate activities, the deduplicating nature of
the file_storage system means that we don't actually have to include the
real files in the backup - just their metadata from the file table.

The restoration process needs to know not to expect files from the backup
phase so a flag is set in moodle_backup metadata.
2013-06-18 07:52:04 +01:00
Ankit Agarwal fbf4acdc9e MDL-39153 libraries: role_unassign doesn't accept context as parameter. Fixing incorrect doc. 2013-06-18 14:27:30 +08:00
Ankit Agarwal 1e63179285 MDL-39153 webservices: Provide alternative to passing contextids
As per our policy webservices should never have a required contextid, thuse providing a support for passing contextlevel and instanceid as parameters to the api
2013-06-18 14:15:54 +08:00
Marina Glancy da107ae428 Merge branch 'MDL-40207-master' of git://github.com/danpoltawski/moodle 2013-06-18 15:36:42 +10:00
Andrew Nicols f1454424b5 MDL-40165 Backup: Split out test classes into multiple files 2013-06-18 06:25:13 +01:00
Dan Poltawski c0fb582c58 Merge branch 'MDL-39339_master' of https://github.com/pauln/moodle 2013-06-18 13:10:24 +08:00
Sam Hemelryk ef6650f703 Merge branch 'wip-MDL-39794-master' of git://github.com/phalacee/moodle 2013-06-18 15:35:37 +12:00
Sam Hemelryk 07cfd5e599 Merge branch 'MDL-39152-master' of git://github.com/ankitagarwal/moodle 2013-06-18 15:34:30 +12:00
Ruslan Kabalin f81d63553e MDL-33546: course: Fix current week hightlighting after dragging the section 2013-06-18 13:01:18 +10:00
Marina Glancy 5883de26ae Merge branch 'MDL-40165-m' of git://github.com/andrewnicols/moodle 2013-06-18 12:59:04 +10:00
Sam Hemelryk 36096f0fe9 Merge branch 'MDL-39634_master' of git://github.com/dmonllao/moodle 2013-06-18 14:51:06 +12:00
Sam Hemelryk 0f8d5064f1 Merge branch 'wip-MDL-38318_master' of git://github.com/gjb2048/moodle 2013-06-18 14:47:25 +12:00
Dan Poltawski 0afca44627 Merge branch 'MDL-40180_master' of https://github.com/nadavkav/moodle 2013-06-18 10:42:33 +08:00
Dan Poltawski 83b8e822f1 Merge branch 'MDL-33105' of https://github.com/ppichet/moodle 2013-06-18 10:35:47 +08:00
Sam Hemelryk 5c8cfccad3 Merge branch 'w25_MDL-26455_m26_installport' of git://github.com/skodak/moodle
Conflicts:
	admin/cli/install.php
2013-06-18 14:29:08 +12:00
Sam Hemelryk 1b194c9047 Merge branch 'MDL-17468-master' of git://github.com/danpoltawski/moodle 2013-06-18 14:06:33 +12:00
Sam Hemelryk ad3d3c2ba7 Merge branch 'MDL-40036-master' of git://github.com/FMCorz/moodle 2013-06-18 14:01:54 +12:00
Sam Hemelryk 044bb690f8 Merge branch 'MDL-39865-master' of git://github.com/FMCorz/moodle 2013-06-18 13:54:39 +12:00
Jason Fowler ee11f4a759 MDL-39794 - Course - Add 'Add a new course' button to front page when page editing is on 2013-06-18 09:26:55 +08:00
Marina Glancy 4b4ac86a37 Merge branch 'MDL-38079_master' of git://github.com/mr-russ/moodle 2013-06-18 11:18:30 +10:00
Eloy Lafuente (stronk7) b515f8001d MDL-40137 Whitespace fix 2013-06-18 01:47:13 +02:00
Eloy Lafuente (stronk7) 421e6decf4 Merge branch 'wip-MDL-40137-m26' of git://github.com/samhemelryk/moodle 2013-06-18 01:43:57 +02:00
Yuliya Bozhko 111c5fd93f MDL-40022 badges: Fix missing calls to setType in course criteria settings 2013-06-18 11:38:22 +12:00
Sam Hemelryk d35d831190 Merge branch 'MDL-38555-master' of https://github.com/lucisgit/moodle 2013-06-18 11:38:05 +12:00
Eloy Lafuente (stronk7) edd3fd91d7 MDL-40103 doc create_temptable_from_real_table() deletion. 2013-06-18 01:35:11 +02:00
Eloy Lafuente (stronk7) 27c07947c4 MDL-40103 Fix wrong call, causing restore to fail. 2013-06-18 01:30:14 +02:00
Eloy Lafuente (stronk7) 672bee2d23 MDL-40103 Bump version & whitespace/punctuation 2013-06-18 01:30:13 +02:00
Eloy Lafuente (stronk7) 96c90fab6a Merge branch 'MDL-40103_temptable' of https://github.com/mr-russ/moodle
Conflicts:
	lib/db/upgrade.php
2013-06-18 01:30:07 +02:00
Sam Hemelryk 407020ef8c Merge branch 'MDL-32253-master' of git://github.com/danpoltawski/moodle 2013-06-18 11:26:23 +12:00
Sam Hemelryk 7d7a6e3c20 Merge branch 'wip-MDL-26998-master' of git://github.com/abgreeve/moodle 2013-06-18 11:22:40 +12:00
Sam Hemelryk 21467b4461 Merge branch 'wip-mdl-39863' of git://github.com/rajeshtaneja/moodle 2013-06-18 11:19:35 +12:00
Sam Hemelryk 540a8f8499 Merge branch 'MDL-40109_master' of git://github.com/dmonllao/moodle 2013-06-18 11:08:45 +12:00
Sam Hemelryk e667bd9db0 Merge branch 'MDL-39626_master' of git://github.com/kordan/moodle
Conflicts:
	theme/formal_white/style/course.css
2013-06-18 11:03:21 +12:00
Eloy Lafuente (stronk7) 57ed9d90c7 Merge branch 'w25_MDL-40210_m26_badgescaps' of git://github.com/skodak/moodle 2013-06-18 00:55:53 +02:00
Eloy Lafuente (stronk7) a48dad1fe1 Merge branch 'MDL-33562-master' of git://github.com/danpoltawski/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2013-06-18 00:40:36 +02:00
Sam Hemelryk 007b5f5f35 Merge branch 'MDL-30132_master' of git://github.com/lazydaisy/moodle 2013-06-18 10:27:11 +12:00
Sam Hemelryk 03d34e07c0 Merge branch 'wip-mdl-16982' of git://github.com/rajeshtaneja/moodle 2013-06-18 10:04:18 +12:00
Petr Škoda ad35231698 MDL-40210 do not use CAP_PREVENT for role defaults! 2013-06-17 12:12:36 +02:00
Russell Smith 725ab3d07f MDL-38079 mod_feedback - Hide "add question to activity" button 2013-06-17 19:50:13 +10:00
Dan Poltawski e9d011250e Merge branch 'MDL-40110_master' of git://github.com/dmonllao/moodle 2013-06-17 17:02:11 +08:00
Dan Poltawski 85db00e0c3 Merge branch 'MDL-39825_dev_master' of https://github.com/totara/openbadges 2013-06-17 16:40:24 +08:00
Dan Poltawski af08eb9912 Merge branch 'MDL-39474-master' of git://github.com/sammarshallou/moodle 2013-06-17 15:36:15 +08:00
Ankit Agarwal 5b23d9adac MDL-39152 webservices: Rename external_api::get_context() to external_api::get_context_from_params() 2013-06-17 15:18:49 +08:00
Dan Poltawski 877bb8294c Merge branch 'MDL-31680' of https://github.com/ppichet/moodle 2013-06-17 14:53:19 +08:00
Dan Poltawski e00916d933 Merge branch 'wip-MDL-40136-m26' of git://github.com/samhemelryk/moodle 2013-06-17 13:37:18 +08:00
Rajesh Taneja d8372b54b9 MDL-16982 Administration: Moved bulk action outside loop and using profile api to save data 2013-06-17 12:55:09 +08:00
Sam Hemelryk 68e33c2932 Merge branch 'm26_MDL-40095_Completion_locked_Error_on_save' of https://github.com/scara/moodle 2013-06-17 16:14:00 +12:00
Sam Hemelryk ca64174031 Merge branch 'MDL-21933_master' of https://github.com/mr-russ/moodle 2013-06-17 15:45:56 +12:00
Sam Hemelryk e4ce39c99f Merge branch 'wip-MDL-40091-master' of git://github.com/satrun77/moodle 2013-06-17 15:43:31 +12:00
Rossiani Wijaya 47e00c342f MDL-39779 wiki module: fix the alignment for required label to display inline on mobile devices 2013-06-17 11:26:11 +08:00
Sam Hemelryk d63082454b Merge branch 'MDL-39369' of git://github.com/rwijaya/moodle 2013-06-17 15:10:41 +12:00
Dan Poltawski f1da132271 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:

* Introduced a way to set the timeout during intitial construction
* Converted the unit tests to use a high timeout value
2013-06-17 10:32:25 +08:00
Sam Hemelryk e41ecc6260 Merge branch 'MDL-39761-master' of https://github.com/lucisgit/moodle 2013-06-17 14:30:24 +12:00
AMOS bot a87a4764e0 Automatically generated installer lang files 2013-06-17 00:43:35 +00:00
Marina Glancy ba75dfd10d Merge branch 'wip-MDL-40142-m26' of git://github.com/samhemelryk/moodle 2013-06-17 10:43:29 +10:00
Sam Hemelryk a4f264031a MDL-39949 dock: fixed whitespace 2013-06-17 10:24:39 +12:00
Sam Hemelryk 7d1d4137ca Merge branch 'wip-MDL-39949-master' of git://github.com/phalacee/moodle 2013-06-17 10:01:10 +12:00
Sam Hemelryk d85f228f18 MDL-40137 theme_clean: corrected lib.php function names 2013-06-17 09:39:23 +12:00
Sam Hemelryk 67b34c34f0 MDL-40136 cache: fixed dirroot change bugs with plugin caches 2013-06-17 09:23:50 +12:00
Sam Hemelryk 8a7d747581 MDL-40142 navigation: fixed chainable issue with navigation JS 2013-06-17 09:11:45 +12:00
Gareth J Barnard a31445a854 MDL-40204 theme_bootstrapbase & theme_clean: Fix RTL 3 column lyt with 1 blk. 2013-06-16 19:14:43 +01:00
Gareth J Barnard a5c167486b MDL-38318 theme_mymobile: Upgrade to jQueryMobile 1.3.1. 2013-06-15 14:58:02 +01:00
Petr Škoda 1826d0ead6 MDL-26455 add support for custom DB port and socket in CLI installer 2013-06-15 15:07:28 +02:00
Petr Škoda b29ca9b5d4 MDL-26455 add custom DB port and socket to web installer 2013-06-15 14:38:07 +02:00
Russell Smith 62d6f183c4 MDL-40103 Backup: Move install.xml templates to inline XML 2013-06-15 15:07:03 +10:00
Russell Smith 283e448ab3 MDL-40103 stats: Move db temp templates to inline xmldb tables
Move all statistics temporary tables into the code.  We are not
going to continue to use database templates.  They were a mix
of reading the install.xml and tables in the database.  It is
much clearer to have them created inline at the point they are
used in the code.
2013-06-15 15:03:02 +10:00
Mary Evans cdf882cb7a MDL-28124 admin/tool/customlang: Changed page layout from 'standard' to 'report'. 2013-06-14 22:42:57 +01:00
Mohamed Alsharaf 8e484df3a6 MDL-40091 book: revision must be incremented after editing a chapter 2013-06-14 21:19:48 +12:00
David Monllao 051e9663f0 MDL-39634 behat: Removing unused arguments
Also adding deprecated methods.
2013-06-14 16:14:04 +08:00
Ankit Agarwal aac70ffc18 MDL-39152 webservices: Abstract context fetching
Since many apis in future will need to provide alternative method to fetch context, I have abstracted this bit into the core external_api class
2013-06-14 15:47:48 +08:00
Nadav Kavalerchik d0dde5cef7 MDL-40180 - RTL/Clean theme: Misalignment of student name and profile image in grader (fixed by Mary Evans) 2013-06-14 10:35:31 +03:00
Dan Poltawski 4eb42f49a1 MDL-17468 tool_uploaduser: seperate capability for user pictures 2013-06-14 14:04:25 +08:00
Petr Škoda 35ea5db031 MDL-33955 add file download and curl unit tests 2013-06-14 08:03:50 +02:00
Petr Škoda 220eef0e4c MDL-33955 make downalod_file_content() use curl class and cleanup
The options in constructor were renamed to setttings in order to prevent confusion.
This removes ignored CURLOPT_BINARYTRANSFER, add newline header cleaning,
reworks proxy settings and some other minor issues.
2013-06-14 08:03:49 +02:00
Petr Škoda 9936c2a54c MDL-33955 fix sloppy whitespace in curl class 2013-06-14 08:03:49 +02:00
Ankit Agarwal 235b5c680a MDL-39152 phpunit: Move core_role_external_testcase() to a new file
It is not recommended to have multiple test classes in a single phpunit file
2013-06-14 11:50:25 +08:00
Ankit Agarwal 95a3bb4dc8 MDL-39152 phpunit: improve tests for assign_roles()
core_role_external::assign_roles() now support alternative paramaters instead of contextid. Test working of those. Also test the parameters validation a bit, since these are no longer automatically tested being optional now
2013-06-14 11:50:25 +08:00
Ankit Agarwal 3a68f79809 MDL-39152 webservices: Provide alternative to context id
As per our policy asking for and returning contextids is discouraged in webservices. So provide alternative parameters for the same
2013-06-14 11:50:25 +08:00
Marina Glancy f192883305 weekly release 2.6dev 2013-06-14 13:18:50 +10:00
Marina Glancy 3bc90f93ee Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-06-14 12:53:23 +10:00
Andrew Nicols fd66d1de70 MDL-40165 Backup: Split out test classes into multiple files 2013-06-13 08:55:54 +01:00
Rossiani Wijaya f2a41c5136 MDL-39369: Lesson module: change settype PARAM_TEXT to PARAM_NOTAGS 2013-06-13 15:34:18 +08:00
Rossiani Wijaya a015bc030c MDL-39369: Lesson module: fix setType() properly 2013-06-13 15:26:13 +08:00
Damyon Wiese 1fba9cf66a MDL-37621 assign: Fix for DB error on update.
This properly handles the case when the teamsubmissiongroupingid is disabled.
2013-06-13 15:15:07 +08:00
Dan Poltawski 1f782c4181 MDL-39824: theme_bootstrap: initalise array before use
This causes warnings when no navigation items are returned.

Also fixed some bad whitespace.
2013-06-13 14:22:59 +08:00
Dan Poltawski a151eb403e Revert "MDL-39832 Files: Revert MDL-39688 commit, f111746140fe80a821ae69e3bf518d950bf188a1"
This reverts commit 3960c00e3c.
2013-06-13 13:56:11 +08:00
Dan Poltawski db74804ff1 Revert "MDL-39832 Files: Fixed ETag format according with RFC2616."
This reverts commit 9ab37ae3e0.
2013-06-13 13:56:09 +08:00
Damyon Wiese 7e815a6eac MDL-37459 admin: Set the default setting flags on a new install.
Make sure the default flags for all settings are saved on a new install.
2013-06-13 15:20:52 +10:00
Russell Smith d6e52b0061 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:55 +10:00
Dan Poltawski e3b472e82c Merge branch 'MDL-38359-master' of git://github.com/danmarsden/moodle 2013-06-13 10:15:25 +08:00
Damyon Wiese 54106942b3 MDL-37459 admin: Fix for error on updating a locked checkbox
Changed the way apply_admin_locked_flags gets the current value for the field.

The old way was plain wrong (looking at getValue from the quickform element).
2013-06-13 11:18:18 +10:00
AMOS bot 9a0d245145 Automatically generated installer lang files 2013-06-13 00:41:25 +00:00
Ruslan Kabalin 761670208a MDL-38555 forms: Prevent same data submission multiple times.
This disables Submit button when the form has been submitted to
prevent consequent submissions before the page has been loaded.
2013-06-12 15:19:47 +01:00
Mary Evans fb6bf33bf7 MDL-30312 User: Changed page layout from mydashboard to mypublic in user/profile.php 2013-06-12 13:29:45 +01:00
Dan Marsden 8a309823f0 MDL-38359: assign - prevent loss of associated marker
certain markers don't see the marker allocation column.
2013-06-12 21:29:39 +12:00
Dan Marsden 24835a1292 MDL-38359: assign - fix some issues with releasing grades 2013-06-12 21:16:12 +12:00
Dan Poltawski 19c1e0b80a Merge branch 'master_MDL-39239' of git://github.com/danmarsden/moodle 2013-06-12 16:49:29 +08:00
Dan Poltawski 85937391e1 Merge branch 'MDL-38359-master' of git://github.com/danmarsden/moodle 2013-06-12 16:47:38 +08:00
Dan Marsden b6d1b761a4 MDL-38359: assign - remove some old debug code. 2013-06-12 20:18:07 +12:00
Dan Poltawski 3d5f0a66e9 Revert "MDL-39489 behat: Updating to 2.6 moodlehq/behat-extension tag"
Wasn't ready for the prime time

This reverts commit ca96789d77.
2013-06-12 16:08:50 +08:00
Marina Glancy 8ea7d3a2db Merge branch 'MDL-37621-master-fix2' of git://github.com/damyon/moodle 2013-06-12 17:22:22 +10:00
Marina Glancy 128e9315d6 Merge branch 'MDL-37459-master-fix2' of git://github.com/damyon/moodle 2013-06-12 16:53:49 +10:00
Damyon Wiese c7cd8d9c84 MDL-37621 assign: Improvements to default settings.
Added a new adminsetting_configempty type so that module settings
which can have no sensible defaults can still be configured as advanced.
2013-06-12 14:20:02 +08:00
Damyon Wiese de6a0a394b MDL-37621 assign: Improvements to assignment default settings.
Remove locked flag from datetime settings.
Change requiresubmissionstatement to use the new admin flags instead of it's previous custom behaviour.
This means there is a language change:

AMOS BEGIN
 CPY [requiresubmissionstatementassignment_help,mod_assign],[requiresubmissionstatement_help,mod_assign]
AMOS END
2013-06-12 14:19:52 +08:00
Damyon Wiese c30371168f MDL-37459 admin: Code improvements for admin defaults.
Split apply_admin_defaults_after_data so the defaults are set before
set_data is called.

Change function from private to protected.

Change check for if module for is an add or an update.
2013-06-12 14:10:55 +08:00
Dan Poltawski bdce4a9cca Merge branch 'MDL-39472-master' of git://github.com/sammarshallou/moodle 2013-06-12 13:56:39 +08:00
Damyon Wiese fa358a83ad MDL-37459 admin: Change the behaviour of locked admin settings.
Now the defaults for settings will never force changes to the module update
form, and settings will only be locked if their value matches the admin default.
2013-06-12 12:30:08 +08:00
Daniel Neis Araujo 3f213cd321 MDL-32253 - Adding link to forum discussion on text emails 2013-06-12 10:28:55 +08:00
Sam Hemelryk c601027d8f Revert "MDL-38555 forms: Prevent same data submission multiple times."
This reverts commit 9f2f313e9f.
2013-06-12 14:22:01 +12:00
Damyon Wiese 459e3c88ca MDL-37459 admin: Default styles for flags for admin settings 2013-06-12 10:06:06 +08:00
Dan Poltawski 1899145c50 Merge branch 'MDL-39773_b' of git://github.com/rwijaya/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-12 09:33:23 +08:00
Sam Hemelryk 44df0d9aaa Merge branch 'MDL-38555-master' of https://github.com/lucisgit/moodle 2013-06-12 11:36:40 +12:00
Sam Hemelryk e1e6c0dd4c Merge branch 'wip-MDL-39040-master' of git://github.com/abgreeve/moodle 2013-06-12 10:21:45 +12:00
Sam Hemelryk aae402010b Merge branch 'MDL-35666-master' of git://github.com/mouneyrac/moodle 2013-06-12 10:14:14 +12:00
Sam Hemelryk 6e49802071 MDL-39629 theme_formal_white: added missing pluginfile func 2013-06-12 09:58:55 +12:00
Sam Hemelryk ac547b717a Merge branch 'MDL-39629_master' of git://github.com/kordan/moodle 2013-06-12 09:48:56 +12:00
Dan Marsden 93c984a829 MDL-39239 SCORM: drop old imsrepository code - it doesn't work anyway. 2013-06-12 09:47:26 +12:00
Sam Hemelryk ee4e6c04e2 Merge branch 'MDL-30320' of git://github.com/timhunt/moodle 2013-06-12 09:38:38 +12:00
Sam Hemelryk 5d24aff39f Merge branch 'master_MDL-38019' of git://github.com/andyjdavis/moodle 2013-06-12 09:34:06 +12:00
Sam Hemelryk 18a1f186db Merge branch 'MDL-39967-master' of git://github.com/danpoltawski/moodle 2013-06-12 09:08:55 +12:00
Sam Hemelryk cc5468de0e Merge branch 'MDL-39940-master' of git://github.com/danpoltawski/moodle 2013-06-12 09:07:01 +12:00
Sam Hemelryk 7b50002304 Merge branch 'MDL-39964-master' of git://github.com/danpoltawski/moodle
Conflicts:
	lib/deprecatedlib.php
2013-06-12 09:04:22 +12:00
Sam Hemelryk 9439d0506c Merge branch 'MDL-25901-master' of git://github.com/danpoltawski/moodle 2013-06-12 09:00:24 +12:00
Sam Hemelryk 9ce7b61e62 Merge branch 'w24_MDL-38109_m26_pluginlist' of git://github.com/skodak/moodle 2013-06-12 08:54:09 +12:00
Sam Hemelryk ec18f333bd Merge branch 'wip-MDL-39798_master' of git://github.com/gjb2048/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-12 08:51:59 +12:00
Sam Hemelryk 754fa10916 Merge branch 'wip-MDL-39820_master_2' of git://github.com/gjb2048/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-12 08:48:00 +12:00
sam marshall 5c92e7a740 MDL-39474 Library: Make a fast way to check developer debug mode 2013-06-11 16:29:00 +01:00
Petr Škoda a9cda870ba MDL-38109 use always get_plugin_list() to get list of plugins
get_list_of_plugins() is NOT intended for real plugins, only plugin like directories.
2013-06-11 10:22:45 +02:00
Damyon Wiese 7f198356ef MDL-38359 courselib: Fix unit tests
The courselib tests have hardcoded test data sets for forum and assign
modules that need to be updated every time we add a new feature.
2013-06-11 16:20:55 +08:00
Dan Poltawski e2ac6a848b Merge branch 'wip-MDL-40087_master' of git://github.com/gjb2048/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-11 16:00:18 +08:00
Dan Poltawski 75eb51818c Merge branch 'MDL-39489_master' of git://github.com/dmonllao/moodle 2013-06-11 15:41:11 +08:00
Dan Poltawski 2504dfd61d Merge branch 'MDL-39155' of https://github.com/jacks92/moodle 2013-06-11 15:38:37 +08:00
Dan Poltawski f7ec3b43a7 Merge branch 'wip-MDL-40100-m26' of git://github.com/samhemelryk/moodle 2013-06-11 15:34:48 +08:00
Dan Poltawski 6217bb5b8d Merge branch 'MDL-38359-master' of git://github.com/damyon/moodle 2013-06-11 15:31:20 +08:00
Damyon Wiese 52fdb0582a MDL-38359 assign: Set header field name so it works with shortforms
Two forms were adding headers with empty names - fixed.
2013-06-11 15:25:01 +08:00
Damyon Wiese e9416eb7ef MDL-37621 assign: Fix php error on create new assign
I removed one too many defaults in the previous patch. This patch
puts back the default for teamsubmissiongroupingid.
2013-06-11 17:13:00 +10:00
Damyon Wiese bb6471aa88 MDL-38359 assign: Add support for admin defaults for marking workflow settings 2013-06-11 14:26:33 +08:00
Dan Marsden f8d107b3a8 MDL-38359 Marking Allocation and Workflow code
based on Marking workflow code from Damyon Wiese
2013-06-11 14:11:41 +08:00
Dan Poltawski 3873f6aa60 Merge branch 'MDL-39449' of git://github.com/timhunt/moodle 2013-06-11 14:09:12 +08:00
Marina Glancy ab8e5e795d Merge branch 'MDL-37621-master' of git://github.com/damyon/moodle 2013-06-11 15:57:14 +10:00
Sam Hemelryk 30db96bd90 Merge branch 'MDL-32533-master' of git://github.com/danpoltawski/moodle 2013-06-11 17:36:18 +12:00
Damyon Wiese a8fe74e9db MDL-37621 Assign: Apply admin defaults to all module settings. Added the 3 date based settings.
Version bump for new settings.

AMOS BEGIN
    MOV [defaultplugins,mod_assign],[defaultsettings,mod_assign]
    MOV [defaultplugins_help,mod_assign],[defaultsettings_help,mod_assign]
AMOS END
2013-06-11 13:35:18 +08:00
Marina Glancy 849a016128 Merge branch 'MDL-37459-master-fix' of https://github.com/damyon/moodle 2013-06-11 15:32:27 +10:00
Sam Hemelryk 11ea436f4f Merge branch 'MDL-26925-master' of git://github.com/danpoltawski/moodle 2013-06-11 17:31:51 +12:00
Damyon Wiese 19127f6f09 MDL-37459: Fix unprintable chars in wierd commit
Somehow some unprintable chars made it into the last commit.

Removing them all...
2013-06-11 13:25:28 +08:00
Sam Hemelryk b618f2d9f7 Revert "MDL-37490 mod_assign: Add setting to show the due date on the course page."
This reverts commit ef8a6dfb33.
2013-06-11 17:10:36 +12:00
Sam Hemelryk 3e69c074ac Revert "MDL-37490 Assign: Minor patch cleanup"
This reverts commit 06b9df1145.
2013-06-11 17:10:30 +12:00
Sam Hemelryk 2b46a31a3f Merge branch 'MDL-22390' of git://github.com/timhunt/moodle 2013-06-11 17:07:14 +12:00
Dan Poltawski 47cddbed5c Merge branch 'MDL-40010_master' of https://github.com/markn86/moodle 2013-06-11 13:05:25 +08:00
Marina Glancy 7a70cfe638 Merge branch 'MDL-37459-master' of https://github.com/damyon/moodle 2013-06-11 14:57:34 +10:00
Damyon Wiese 3c88a67821 MDL-37459 admin: Admin settings flags
Make "Advanced" and "Lockable" flags for any admin setting.
2013-06-11 12:54:57 +08:00
Dan Poltawski b6174c9897 Merge branch 'm26_MDL-40002_ETag_value_must_be_a_quoted-string' of https://github.com/scara/moodle 2013-06-11 12:54:24 +08:00
Jason Fowler 74dfadea8f MDL-39949 - Blocks - preventing blocks with empty titles from blocking the execution of javascript 2013-06-11 11:46:21 +08:00
Dan Poltawski a3f92b2e0e Revert "MDL-26511 Images in Cloze multichoice"
This reverts commit feec4f8941.
2013-06-11 11:38:34 +08:00
Dan Poltawski fd6f924c08 Merge branch 'wip-MDL-39746-master' of git://github.com/phalacee/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-11 11:24:31 +08:00
Rajesh Taneja d836e3ed1f MDL-16982 Administration: Integrated Inaki's suggestions 2013-06-11 10:27:43 +08:00
Rajesh Taneja 57d135a1c6 MDL-16982 Administration: Cleaned whitespaces and alignment in orignal patch 2013-06-11 10:27:43 +08:00
Gilles-Philippe Leblanc b88adb55fc MDL-16982 Administration: Adding data mapping for custom user fields 2013-06-11 10:27:37 +08:00
Rajesh Taneja 1daab45a7a MDL-39863 Administration: Show confirmation/notice and don't redirect automatically 2013-06-11 10:19:56 +08:00
Sam Hemelryk ae82c28588 Merge branch 'MDL-39490-format_rewrite_order' of git://github.com/mudrd8mz/moodle 2013-06-11 14:16:50 +12:00
Tim Lock d0ed33d6fd MDL-40120: Fix get_course_records() which breaks in PSQL 2013-06-11 13:45:23 +12:00
Sam Hemelryk b9565a0070 Merge branch 'wip-MDL-37490-m7' of git://github.com/gjb2048/moodle 2013-06-11 13:32:36 +12:00
Sam Hemelryk 10c98b64e6 Merge branch 'MDL-39454-master' of git://github.com/sammarshallou/moodle 2013-06-11 12:26:55 +12:00
Sam Hemelryk 5d37fd271d Merge branch 'wip-mdl-28558' of git://github.com/rajeshtaneja/moodle 2013-06-11 11:06:17 +12:00
Sam Hemelryk 9052fc4489 Merge branch 'wip-mdl-33379' of git://github.com/rajeshtaneja/moodle
Conflicts:
	lib/deprecatedlib.php
2013-06-11 10:35:10 +12:00
Sam Hemelryk 2afd7d0277 Merge branch 'MDL-32898-master' of git://github.com/ankitagarwal/moodle 2013-06-11 10:31:55 +12:00
Sam Hemelryk bd7004d51c Merge branch 'wip-mdl-34508' of git://github.com/rajeshtaneja/moodle 2013-06-11 10:29:11 +12:00
Matteo Scaramuccia 6a75660eff MDL-40095 SCORM: Trivial comments tidy up 2013-06-10 20:48:05 +02:00
Matteo Scaramuccia 82bd0c6643 MDL-40095 SCORM: Fixed DML error when saving with completion options locked
Regression caused by MDL-38315.
2013-06-10 20:47:48 +02:00
Dan Poltawski 50b5ae4a8d Merge branch 'MDL-39947' of https://github.com/aolley/moodle 2013-06-10 16:19:56 +08:00
Dan Poltawski c6898e629b Merge branch 'MDL-39338_master' of git://github.com/lazydaisy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-10 16:06:22 +08:00
Dan Poltawski 0a006517e5 Merge branch 'm26_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile' of https://github.com/scara/moodle 2013-06-10 15:42:45 +08:00
Dan Poltawski f4c824c009 Merge branch 'wip-mdl-39639' of git://github.com/rajeshtaneja/moodle 2013-06-10 15:28:17 +08:00
Dan Poltawski de235efba4 Merge branch 'MDL-40018_master' of git://github.com/lazydaisy/moodle 2013-06-10 15:00:08 +08:00
Dan Poltawski bb179ab9b4 Merge branch 'MDL-40013_master' of git://github.com/oasychev/moodle 2013-06-10 14:57:48 +08:00
Dan Poltawski 7091390164 Merge branch 'MDL-40080-unused-hub-strings' of git://github.com/mudrd8mz/moodle 2013-06-10 14:41:20 +08:00
Dan Poltawski 8a78b9116a Merge branch 'MDL-40008_master' of https://github.com/markn86/moodle 2013-06-10 14:25:03 +08:00
David Monllao af248633f5 MDL-40109 format_weeks: Removing extra space 2013-06-10 13:30:10 +08:00
Dan Poltawski 28fa1533f7 Merge branch 'w24_MDL-39096_m26_obfuscate' of git://github.com/skodak/moodle 2013-06-10 13:12:11 +08:00
Yuliya Bozhko 1dcb9ff1f5 MDL-39825 badges: Remove badges from course navigation when course badges are disabled 2013-06-10 16:21:55 +12:00
Dan Poltawski 664a1e2793 Merge branch 'w24_MDL-28394_m26_enrolrestore' of git://github.com/skodak/moodle 2013-06-10 12:16:37 +08:00
Dan Poltawski bed1bc3ddc Merge branch 'master_MDL-37968' of git://github.com/danmarsden/moodle 2013-06-10 12:09:47 +08:00
Mary Evans 034710e8ee MDL-39016 theme_bootstrapbase: Added login info and home link to footer in both boostrapbase & clean layout/general.php 2013-06-10 16:05:25 +12:00
Dan Poltawski 3178aacd9e Merge branch 'w24_MDL-37974_m26_manexpire' of git://github.com/skodak/moodle 2013-06-10 11:59:03 +08:00
Sam Hemelryk 8affd1ca7e Merge branch 'MDL-40009_master' of https://github.com/markn86/moodle 2013-06-10 15:55:14 +12:00
Sam Hemelryk b8904b6ad5 Merge branch 'w24_MDL-39549_m26_cohortsearch' of git://github.com/skodak/moodle 2013-06-10 15:49:04 +12:00
ppichet feec4f8941 MDL-26511 Images in Cloze multichoice
vertical and horizontal answer and in feedback of all qtype answers
2013-06-10 11:28:46 +08:00
David Monllao e03ed0e134 MDL-40110 behat: AM/PM strings are OS-dependant, removing this part from tests 2013-06-10 11:21:04 +08:00
Sam Hemelryk 56ad6d46d1 Merge branch 'MDL-39971' of git://github.com/timhunt/moodle 2013-06-10 15:09:43 +12:00
Dan Poltawski 07bac478b6 Merge branch 'wip-MDL-39824-m26' of http://github.com/samhemelryk/moodle 2013-06-10 10:54:22 +08:00
Sam Hemelryk 018fc94211 Merge branch 'MDL-39978' of git://github.com/timhunt/moodle 2013-06-10 14:48:21 +12:00
Sam Hemelryk bf0cdbcf8a Merge branch 'w24_MDL-32480_m26_imscp' of git://github.com/skodak/moodle 2013-06-10 14:41:21 +12:00
Sam Hemelryk 9016063900 MDL-39824 theme: tweaking upgrade note version 2013-06-10 14:34:37 +12:00
Sam Hemelryk 111f5291f9 Merge branch 'wip-MDL-39608-master' of git://github.com/phalacee/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-10 14:26:04 +12:00
AMOS bot 19c01c7a80 Automatically generated installer lang files 2013-06-10 00:39:08 +00:00
Sam Hemelryk fb8010732e Merge branch 'MDL-36090_log2' of git://github.com/andyjdavis/moodle 2013-06-10 12:31:03 +12:00
Sam Hemelryk 2c0fb4c788 Merge branch 'wip-MDL-40088-master' of git://github.com/marinaglancy/moodle 2013-06-10 12:14:17 +12:00
Sam Hemelryk e559265c10 Merge branch 'wip-MDL-39227-master' of git://github.com/phalacee/moodle 2013-06-10 11:43:31 +12:00
Sam Hemelryk a6d966885b Merge branch 'MDL-39979-master' of git://github.com/FMCorz/moodle 2013-06-10 11:35:26 +12:00
Sam Hemelryk 1878661402 MDL-40100 cache: removed unneeded includes from add instance forms 2013-06-10 10:23:28 +12:00
Sam Hemelryk d3e5a21e7a MDL-39824 theme: changes recorded in theme/upgrade.txt 2013-06-10 09:26:05 +12:00
Sam Hemelryk a2f8bccf0a MDL-39824 output: fixed bug when moving blocks with rtl lang 2013-06-10 09:10:06 +12:00
Sam Hemelryk 7956a02fda MDL-40089 theme_clean: simplified layouts and converted to new OUTPUT API 2013-06-10 09:09:03 +12:00
Matteo Scaramuccia 06eca48648 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 09:43:36 +02:00
Gareth J Barnard 70d7e9141f MDL-39798 theme_bootstrapbase: Improve layout for course participation reports. 2013-06-08 13:59:15 +01:00
Damyon Wiese 06b9df1145 MDL-37490 Assign: Minor patch cleanup
Bump version number for mod_assign
Remove use of global $OUTPUT (can use get_renderer() in assign)
Fix language strings
Add missing setTypes
2013-06-08 10:44:52 +01:00
Gareth J Barnard ef8a6dfb33 MDL-37490 mod_assign: Add setting to show the due date on the course page. 2013-06-08 10:44:28 +01:00
Petr Škoda 66056f994f MDL-39096 fix obfuscate_text() utf-8 compatibility 2013-06-07 22:38:48 +02:00
Petr Škoda 0fa01f4e60 MDL-39549 fix cohort search in course categories 2013-06-07 22:07:15 +02:00
Petr Škoda 8d4f13666b MDL-37974 fix verbose output when expiring manual enrolments 2013-06-07 21:18:54 +02:00
MorrisR2 80f1c6adc0 MDL-37974 add "Disable course enrolment" expiration action for manual enrolments
Commit amended by Petr Skoda to match recommended coding style.
2013-06-07 21:06:47 +02:00
Gareth J Barnard 3355b72e3b MDL-40087 theme_bootstrapbase: Turn editing on button misaligned on nav bar. 2013-06-07 18:20:05 +01:00
Tim Hunt c2c6af946c 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-07 10:40:37 +01:00
Petr Škoda 4b75f49a63 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:02:59 +02:00
Petr Škoda f815e4cbdf MDL-32480 allow external https links in IMSCP too 2013-06-07 09:58:03 +02:00
Nicolas Dunand 4a04fef6ef MDL-32480 fix display of IMS content packages with external links 2013-06-07 09:58:03 +02:00
Jason Fowler 41d6483066 MDL-39746 - Themes - Hiding the user picture on the forum page when the screensize is too small to allow for it 2013-06-07 14:35:08 +08:00
Dan Poltawski 53717b2194 MDL-32533 tool_customlang: don't use h3 for notification
Thanks to Juho Viitasalo for the suggestion.
2013-06-07 14:06:33 +08:00
Sam Hemelryk 7362d8160a MDL-40089 theme_clean: moved general to columns3.php as prep 2013-06-07 17:33:14 +12:00
Sam Hemelryk 018721e685 MDL-39842 js: fixed block drag and drop 2013-06-07 17:33:14 +12:00
Sam Hemelryk 8bfd530bc1 MDL-39824 theme_bootstrapbase: converted $PAGE use to new $OUTPUT methods. 2013-06-07 17:32:44 +12:00
Sam Hemelryk 28700dea3c MDL-40089 theme_bootstrapbase: moved general to columns3.php as prep 2013-06-07 17:32:06 +12:00
Sam Hemelryk 06a72e0192 MDL-39824 output: tidied up output before bootstrap cleaning 2013-06-07 17:31:59 +12:00
Sam Hemelryk b8035316bb MDL-39839 renderer: new methods for calls appearing in theme layouts 2013-06-07 17:31:27 +12:00
Sam Hemelryk 3707972a78 MDL-39838 renderer: new methods for body classes and id 2013-06-07 17:31:27 +12:00
Sam Hemelryk 8cf2b9ab9b MDL-39841 renderer: new method to renderer blocks with predictable structure 2013-06-07 17:31:27 +12:00
Sam Hemelryk 36b77e3a88 MDL-39871 themes: can now specify regions to swap when using rtl langs 2013-06-07 17:31:27 +12:00
Marina Glancy 9f370860a4 MDL-40088 fixed bug with not visible course section 2013-06-07 13:55:19 +10:00
Dan Marsden d32f3eeba8 MDL-37968 course_overview: add dim class to hidden courses for teachers. 2013-06-07 14:38:13 +12:00
Mary Evans f84ad1bb0a MDL-39338 core_question: Make history box a .well 2013-06-06 22:49:27 +01:00
Matteo Scaramuccia 9ab37ae3e0 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:14:44 +02:00
Matteo Scaramuccia 3960c00e3c MDL-39832 Files: Revert MDL-39688 commit, f111746140
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:14:42 +02:00
Oleg Sychev 0b287dd2e8 MDL-40013 Easier to override saving question hints
This adds 3 new methods, called from question_type::save_hints,
to make it easier for different question types to overload this
functionality without duplicating code.

Question types that will benefit from this change include
oumultiresponse, ddmarker, preg and correctwriting.
2013-06-06 19:58:42 +03:00
David Mudrák f3fd0eebb5 MDL-40080 Remove unused strings from the core_hub subsystem 2013-06-06 12:44:13 +02:00
Frederic Massart d36dd9eb57 MDL-39979 navigation: Remove the use of an undefined variable 2013-06-06 14:52:49 +08:00
Dan Poltawski 12313d6125 MDL-26925 User selector: Set label when no results
Thanks to Jonathon Fowler for the fix!
2013-06-06 14:07:27 +08:00
Frederic Massart a8584cd6e5 MDL-40036 user: Respect capability to ignore user quota 2013-06-06 12:41:26 +08:00
Dan Poltawski b3be471f52 weekly on-sync release 2.6dev 2013-06-06 11:58:39 +08:00
Dan Poltawski 348cebac1c Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-06-06 11:54:47 +08:00
ppichet 9ddb8a56a3 MDL-31680 Correcting the format of calculated types correct response 2013-06-05 23:44:39 -04:00
Dan Poltawski d139e46447 MDL-25901 rss: do not copyright html tag
They copyright field does not permit html, it should be plain text
2013-06-06 11:21:19 +08:00
Eloy Lafuente (stronk7) b21a6e26fa Merge branch 'wip-MDL-38773-master' of git://github.com/marinaglancy/moodle 2013-06-05 19:31:53 +02:00
Eloy Lafuente (stronk7) 33a54457ca Merge branch 'w23_MDL-39588_m26_ociinstall' of git://github.com/skodak/moodle 2013-06-05 16:22:58 +02:00
Eloy Lafuente (stronk7) cd8e9b19c5 Merge branch 'w23_MDL-39503_m26_signup' of git://github.com/skodak/moodle 2013-06-05 16:10:39 +02:00
Eloy Lafuente (stronk7) 6c1c8b8ce0 Merge branch 'wip-MDL-21097-master' of git://github.com/marinaglancy/moodle 2013-06-05 10:36:16 +02:00
Dan Poltawski ed15e8a8a8 MDL-39940 tags: missing setType call 2013-06-05 16:16:49 +08:00
Marina Glancy 56b4d0282d MDL-21097 Correctly check capabilities for frontpage editing mode 2013-06-05 18:11:08 +10:00
Dan Poltawski 1caff55c2c Merge branch 'wip-MDL-21097-master' of git://github.com/marinaglancy/moodle 2013-06-05 13:10:12 +08:00
Rossiani Wijaya 01a9646138 MDL-39773 bootstrapbase: add style for .centerpadded.
Relocate .centerpadded styling from standard to base themes
2013-06-05 12:43:56 +08:00
Marina Glancy 3947b8ce4e MDL-21097 corrected course editing roles 2013-06-05 14:30:21 +10:00
Dan Poltawski c05660fc35 Merge branch 'MDL-39977' of git://github.com/lazydaisy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-05 10:11:42 +08:00
Marina Glancy cdb6045d54 MDL-38773 Purge coursecat cache on course restore 2013-06-05 12:02:33 +10:00
Andrew Davis afd2efc0e8 MDL-36090 core_grade: added logging of overriding of student grades 2013-06-05 08:51:53 +08:00
Eloy Lafuente (stronk7) 371bf22cc6 Merge branch 'master-MDL-39409-auth-cas-use-moodle-web-proxy' of https://github.com/brki/moodle 2013-06-05 02:45:37 +02:00
Eloy Lafuente (stronk7) 8c07c404be Merge branch 'w23_MDL-39416_m26_pagelog' of git://github.com/skodak/moodle 2013-06-05 02:43:21 +02:00
AMOS bot 27da58aee0 Automatically generated installer lang files 2013-06-05 00:39:44 +00:00
Eloy Lafuente (stronk7) 796b57ea0b Merge branch 'MDL-39968-master' of git://github.com/danpoltawski/moodle 2013-06-05 02:32:29 +02:00
Eloy Lafuente (stronk7) eb5bc31d24 Merge branch 'MDL-38731-master' of git://github.com/danpoltawski/moodle 2013-06-05 02:29:43 +02:00
Eloy Lafuente (stronk7) 28820155d1 Merge branch 'MDL-37332-master' of git://github.com/danpoltawski/moodle 2013-06-05 02:27:08 +02:00
Eloy Lafuente (stronk7) 3294f68f4a Merge branch 'm25_MDL-38545_PHP_Strict_error' of https://github.com/scara/moodle 2013-06-05 02:22:22 +02:00
Yuliya Bozhko 33a43a3386 MDL-39790 Add badges block to the course page 2013-06-05 01:49:40 +02:00
Eloy Lafuente (stronk7) 32ce8b6803 Merge branch 'wip-MDL-21097-master' of git://github.com/marinaglancy/moodle 2013-06-05 01:43:03 +02:00
Mary Evans 665c8e972a MDL-40018 theme_sky_high: Fixed footer in admin pages. 2013-06-04 23:36:38 +01:00
Eloy Lafuente (stronk7) a182f88f7f MDL-39723 prevent update_courses() bad habits.
All the external functions end calling require_login() that is
always in charge of setting the $COURSE global. This is not a
problem, but in the case of core_course_external::update_courses()
testing, where we are, in the same "request", both setting and getting
the $COURSE information and it's clearly outdated, so the test fails.

Alternative solution would be to modify the external function to ensure
that, after updating a course, $COURSE is also updated with the changes
but it does not seem to be necessary for "normal" usage (both UI/WS POVs).
2013-06-04 21:45:15 +02:00
Eloy Lafuente (stronk7) 79452da1c8 Merge branch 'MDL-39723-master' of git://github.com/sammarshallou/moodle 2013-06-04 17:47:45 +02:00
Mark Nelson ec16252734 MDL-40010 notes: passing an object rather than an id to avoid debugging message 2013-06-04 18:19:30 +08:00
Gareth J Barnard 321e7cb52d MDL-39820 theme_bootstrapbase: Fix form button alignment for badges. 2013-06-04 11:12:37 +01:00
Mark Nelson 35a391d3ab MDL-40009 notes: corrected the form element names passed to setType 2013-06-04 17:59:24 +08:00
Dan Poltawski dd03ed1051 Merge branch 'MDL-39945' of git://github.com/timhunt/moodle 2013-06-04 15:53:56 +08:00
Dan Poltawski 20fe8676ea Merge branch 'MDL-39835_M26' of github.com:lazydaisy/moodle 2013-06-04 14:44:35 +08:00
Dan Poltawski 93ab081025 Merge branch 'wip-MDL-39819_master' of git://github.com/gjb2048/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-04 14:37:55 +08:00
Dan Poltawski e404e040d3 Merge branch 'wip-MDL-39870-master' of git://github.com/marinaglancy/moodle 2013-06-04 14:14:18 +08:00
Dan Poltawski 31e9ffe0ac MDL-39931 less: recompile with whitespace removed 2013-06-04 14:08:28 +08:00
Dan Poltawski 42d00d3638 Merge branch 'MDL-39931' of github.com:lazydaisy/moodle 2013-06-04 13:31:34 +08:00
Dan Poltawski 7f639dd352 Merge branch 'MDL-39536-master' of git://github.com/FMCorz/moodle 2013-06-04 13:18:49 +08:00
Frederic Massart 1530fe2192 MDL-39536 completion: Unit tests for get_activities and has_activities 2013-06-04 12:57:13 +08:00
Frederic Massart 8ca0c12370 MDL-39536 completion: Prevent DB call when fetching activities 2013-06-04 12:57:10 +08:00
Dan Poltawski 984dc35457 Merge branch 'MDL-39939-scorm-basic-report-name' of git://github.com/mudrd8mz/moodle 2013-06-04 12:27:30 +08:00
Mark Nelson 85c402a89d MDL-40008 forms: fixed ordering of the calendar icon and enable checkbox for the date selector element 2013-06-04 11:55:48 +08:00
Dan Poltawski 4dfadbc99b Merge branch 'wip-mdl-39827' of git://github.com/rajeshtaneja/moodle 2013-06-04 11:29:38 +08:00
Dan Poltawski ea746c0166 Merge branch 'MDL-39317-master' of git://github.com/damyon/moodle 2013-06-04 11:26:28 +08:00
Frederic Massart 89f9dce0f7 MDL-39865 navigation: Removed unaccessible repositories node
A user is not allowed to edit another user's repositories, in any
circumstances. The repositories node under 'Profile setting for X'
does not make sense under those conditions.
2013-06-04 11:08:22 +08:00
Frederic Massart 0595d1d5a9 MDL-39865 navigation: 'Profile settings for ...' always displayed
Before this patch, 'Profile settings for X' would only be displayed
if X can access the course, which means that if the course is hidden
the node would be hidden as well. We changed this so that the user
needs to be enrolled in the course.
2013-06-04 11:07:49 +08:00
Dan Poltawski 0d9121a1c4 Merge branch 'MDL-39743-master' of git://github.com/damyon/moodle 2013-06-04 11:03:39 +08:00
Dan Poltawski 820b66be58 Merge branch 'wip_master_mdl-34085' of https://github.com/iarenaza/moodle 2013-06-04 10:42:45 +08:00
AMOS bot d7d235e025 Automatically generated installer lang files 2013-06-04 00:46:34 +00:00
Eloy Lafuente (stronk7) b50ddbdbd5 Merge branch 'wip-MDL-39801-master' of git://github.com/marinaglancy/moodle 2013-06-04 01:51:10 +02:00
Eloy Lafuente (stronk7) aed9401e14 MDL-39764 style: phpdoc changed to inline comments 2013-06-04 01:41:58 +02:00
Eloy Lafuente (stronk7) 00169e862e Merge branch 'wip-MDL-39764_master_3' of git://github.com/gjb2048/moodle 2013-06-04 01:36:16 +02:00
Eloy Lafuente (stronk7) fd4c01566e Merge branch 'w23_MDL-39882_m26_behatconfig' of git://github.com/skodak/moodle 2013-06-04 01:31:54 +02:00
Eloy Lafuente (stronk7) 422595e282 Merge branch 'MDL-39821-master' of git://github.com/damyon/moodle 2013-06-04 01:14:09 +02:00
Eloy Lafuente (stronk7) d13d3f2d31 MDL-39465 Show env. info instead of part twice. 2013-06-04 00:50:15 +02:00
Gareth J Barnard 86f590b45f MDL-39764 course_format: Allow courses to have numsections > maxsections. 2013-06-03 23:36:32 +01:00
Eloy Lafuente (stronk7) 5431fda180 Merge branch 'MDL-39936-master' of git://github.com/danpoltawski/moodle 2013-06-04 00:04:12 +02:00
Eloy Lafuente (stronk7) a346c3826b Merge branch 'w23_MDL-39465_m26_environment' of git://github.com/skodak/moodle 2013-06-03 23:59:12 +02:00
Eloy Lafuente (stronk7) 0288c5ffe1 Merge branch 'MDL-39166-m25' of https://github.com/jfilip/moodle 2013-06-03 23:51:22 +02:00
Eloy Lafuente (stronk7) 9e3b5a47f6 Merge branch 'wip-MDL-39710-master' of git://github.com/marinaglancy/moodle 2013-06-03 23:18:55 +02:00
Eloy Lafuente (stronk7) 71b2d24a9b Merge branch 'MDL-39932_master' of git://github.com/grabs/moodle 2013-06-03 19:10:00 +02:00
Eloy Lafuente (stronk7) 6cffc66647 Merge branch 'MDL-39487_master' of https://github.com/IOC/moodle 2013-06-03 19:03:15 +02:00
Eloy Lafuente (stronk7) c557f6b324 Merge branch 'MDL-39987_master' of git://github.com/lazydaisy/moodle 2013-06-03 16:20:41 +02:00
ppichet bf766d43f9 MDL-33105 flexible apply_units() function
Allow use of thousands separator as long as the decimal separator
is used in the number.
2013-06-02 20:16:19 -04:00
Mary Evans c14964cacb MDL-39987 theme_bootstrapbase: Fixed menunode text in renderers/core_renderer.php. 2013-06-02 23:04:17 +01:00
Petr Škoda 102e0c71cc MDL-39416 do not try to get detailed perflog info before PAGE int 2013-06-02 13:35:08 +02:00
Petr Škoda 8ac7cbddfc MDL-39588 require MOODLELIB Oracle package
Previously it was kind of optional, but it is now required. We also attempt to install it automatically now.
2013-06-02 11:14:43 +02:00
Mary Evans 5f831ca077 MDL-39835 theme_sky_high: Fix for footer to display correctly in higher resolutions. 2013-06-01 21:36:58 +01:00
Mary Evans 58183f9b01 MDL-39977 theme_bootstrapbase: Changes the way Clean theme's login takes its navbar styles from Bootstrapbase. 2013-06-01 18:42:09 +01:00
Gareth J Barnard 873dfb3608 MDL-39819 theme_bootstrapbase: Fix icon alignment in filepicker. 2013-05-31 22:30:26 +01:00
Petr Škoda 7dc1feaa99 MDL-39465 detect environment problems in tests
This should help explain why something else fails.
2013-05-31 22:02:34 +02:00
Tim Hunt ea07b2d622 MDL-39978 Essays with files break each attempt builds on last 2013-05-31 20:47:26 +01:00
Petr Škoda 0448818b49 MDL-39503 tell robots to not index login and signup page
This should partially prevent people from googling moodle sites that allow signup. Please note you can not use login block if because it would still disclose the signup link.
2013-05-31 21:25:27 +02:00
Tim Hunt 2ed7833790 MDL-39971 each attempt builds on last broken for previews. 2013-05-31 20:24:50 +01:00
Petr Škoda f8cb3e62ff MDL-39882 add required behat settings to config-dist 2013-05-31 21:09:52 +02:00
Dan Poltawski e807dadb55 MDL-39968 bootstrapbase: uses non-standard browser sniffing
Also theme_clean does the same sniffing, but is not necessary as its
included by bootstrapbase
2013-05-31 15:55:47 +08:00
Dan Poltawski 1bd756b337 MDL-39967 cron: eliminate browser sniffing.
This was an old hack to workaround a bug in IE6, no longer necessary
2013-05-31 15:09:22 +08:00
Dan Poltawski 8ef3a22260 MDL-39964 deprecate can_use_rotated_text()
This probably should never have landed in moodlelib anyway, as it was
only used in the completion report
2013-05-31 14:43:00 +08:00
Dan Poltawski 26c4242c68 MDL-39964 report_progress: don't browser sniff for SVG support
Use feature detection, its more robust and better practice.
2013-05-31 14:43:00 +08:00
Marina Glancy 027c230796 MDL-39710 Don't display rubric and guide preview unless option checked 2013-05-31 16:14:32 +10:00
Russell Boyatt 8f485ce28e Fixing MDL-39710: setting to limit student access to rubric now checked. 2013-05-31 16:14:26 +10:00
Dan Poltawski 687732ba6e MDL-38731 course: split course group settings header
Allow translators to translate the heading differently.

AMOS BEGIN
  CPY [groups,group],[groupsettingsheader,group]
AMOS END
2013-05-31 12:03:35 +08:00
Dan Poltawski e86a26c9b2 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:49:55 +08:00
Marina Glancy 53dda4f2fc MDL-21097 Allow user to change current section if he does not have any other manageing capability 2013-05-31 13:18:12 +10:00
Marina Glancy 1fda836ca6 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 managing capabilities
2013-05-31 13:17:12 +10:00
Dan Poltawski 9feda85d0e MDL-33562 lib: remove deleted user tokens 2013-05-31 10:21:16 +08:00
Dan Poltawski afed7b6604 MDL-33562 lib: remove private keys when user deleted 2013-05-31 10:19:05 +08:00
Marina Glancy 5150c30203 MDL-39801 navigation_node::remove does not allow to insert nodes afterwards 2013-05-31 11:49:34 +10:00
Marina Glancy e3b11a6e2b MDL-39801 navigation_node::remove fails if first child does not have a key 2013-05-31 11:49:12 +10:00
AMOS bot c092cdad24 Automatically generated installer lang files 2013-05-31 00:43:05 +00:00
Adam Olley f985bc4e65 MDL-39947 mod_forum: Add safety check to variable assignment when counting unread posts 2013-05-31 09:45:56 +09:30
Andreas Grabs e6e9bec3ee MDL-39932 mod_feedback - Mapping Feedback when Course is Deleted - thx to David N. Johnson 2013-05-30 23:10:33 +02:00
David Mudrák b60ab47cb7 MDL-39939 Fix the basic SCORM report plugin name 2013-05-30 22:42:12 +02:00
Tim Hunt f593a6414c MDL-39945 qtype multichoice was not comparing blank responses correctly. 2013-05-30 19:19:32 +01:00
Iñaki Arenaza 7469c51270 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:26:29 +02:00
Mary Evans 947483327f MDL-39931 theme_bootstrapbase: ported invisiblefieldset css rules from theme/base/core.css to less/moodle/core.css 2013-05-30 15:26:13 +01:00
Dan Poltawski 4f5bcf2eca MDL-39936 upgrade: 2.5.0 line incorrectly positioned 2013-05-30 13:41:15 +08:00
Damyon Wiese b6f8a93642 weekly on-sync release 2.6dev 2013-05-30 11:50:35 +08:00
Damyon Wiese 455d204201 Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-05-30 11:25:54 +08:00
AMOS bot 4912f45476 Automatically generated installer lang files 2013-05-30 00:38:20 +00:00
Paul Nicholls f384ce26c0 MDL-39339 - zip_archive should ignore system files
zip_archive should ignore OSX system files (__MACOSX, .DS_Store) and
Windows thumbnail cache files (Thumbs.db), to avoid issues and confusion.
2013-05-30 09:23:35 +12:00
Paul Nicholls 81d9f3d536 MDL-39339 - Add test zips for OSX system files and Thumbs.db 2013-05-30 09:22:56 +12:00
Damyon Wiese 7775545197 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:40:50 +08:00
Marina Glancy 74aeac79b4 MDL-39870 correctly determine whether activity is resource or module 2013-05-29 14:45:20 +10:00
Ashley Holman c7e4403c9f MDL-39743 assign: Fix missing capability check for "grant extension" 2013-05-29 11:58:48 +08:00
Damyon Wiese 48488bfb39 MDL-39821 assign: missing setType with advanced grading 2013-05-29 11:20:56 +08:00
AMOS bot 7440ce08c3 Automatically generated installer lang files 2013-05-29 00:39:21 +00:00
William Tam bf4eccdd42 MDL-37804 mod/assign: Students no longer able to submit files after due date with Prevent late submissions turned on. 2013-05-28 13:13:39 -07:00
Eloy Lafuente (stronk7) aeb5f9ae37 Merge branch 'w22_MDL-39676_m26_whereparam' of git://github.com/skodak/moodle 2013-05-28 15:31:07 +02:00
sam marshall a260245739 MDL-39723 Remove unnecessary queries for COURSE, SITE 2013-05-28 13:14:55 +01:00
Jason Fowler 0179d6beee MDL-38347 - Calendar - Fixing arrow output on Android devices 2013-05-28 15:25:44 +08:00
Damyon Wiese ba375bcb17 MDL-39477: Remove some unused instances of $CFG
Also change @since tags to 2.5.1 because this will be backported.
2013-05-28 11:13:52 +08:00
Damyon Wiese e750fcc4da Merge branch 'MDL-39702_master' of git://github.com/dmonllao/moodle
Conflicts:
	lib/testing/generator/repository_generator.php
2013-05-28 11:13:43 +08:00
Damyon Wiese 0f1f601368 Merge branch 'MDL-39477-master' of git://github.com/FMCorz/moodle 2013-05-28 11:12:43 +08:00
Frederic Massart 67e01a5f5f MDL-39477 repository: Tests use data generator 2013-05-28 10:44:44 +08:00
Frederic Massart 9b5e61ac1e MDL-39477 repository: Introducing data generators for repositories 2013-05-28 10:44:43 +08:00
Damyon Wiese cb7c21af80 Merge branch 'w22_MDL-39802_m26_deletedusers' of git://github.com/skodak/moodle 2013-05-28 09:57:15 +08:00
AMOS bot 131025b885 Automatically generated installer lang files 2013-05-28 00:38:14 +00:00
Eloy Lafuente (stronk7) 33b9fecd19 Merge branch 'wip-MDL-39836_master' of git://github.com/gjb2048/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-05-28 01:23:27 +02:00
Eloy Lafuente (stronk7) f50ca7b3df Merge branch 'wip-MDL-39456-m26' of git://github.com/samhemelryk/moodle 2013-05-28 01:00:57 +02:00
Eloy Lafuente (stronk7) ed602a597d Merge branch 'MDL-39853_master' of git://github.com/dmonllao/moodle 2013-05-28 00:56:37 +02:00
Eloy Lafuente (stronk7) cc4cbf67f0 Merge branch 'MDL-39795_master' of git://github.com/dmonllao/moodle 2013-05-28 00:02:58 +02:00
Damyon Wiese e6302a3c75 Merge branch 'MDL-39686_master' of git://github.com/dmonllao/moodle 2013-05-27 16:29:00 +08:00
Damyon Wiese 1833a3c449 Merge branch 'MDL-39680_master' of git://github.com/lazydaisy/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-05-27 16:24:34 +08:00
Damyon Wiese d059d80ea6 Merge branch 'MDL-39640-master-int' of git://github.com/FMCorz/moodle 2013-05-27 16:15:51 +08:00
Kordan 30a826320e MDL-39194 theme_formal_white: cleaned the category page showing course listing 2013-05-27 15:46:57 +08:00
David Monllao ae689a9633 MDL-39853 behat: Useful info for $CFG->behat_config setting 2013-05-27 15:12:26 +08:00
David Monllao 41eb672ba4 MDL-39686 behat: Add option to restart the browser 2013-05-27 15:03:25 +08:00
David Monllao 886b44bbd3 MDL-39686 behat: Adding into to config-dist.php 2013-05-27 15:01:46 +08:00
David Monllao c29e3e248f MDL-39702 generators: Adding MOODLE_INTERNAL
As discussed generators should include MOODLE_INTERNAL
as they make use of CFG and they don't make sense without
requiring config.php.
2013-05-27 14:52:53 +08:00
Frederic Massart 0852bbaed5 MDL-39477 repository: Introducing data generators for repositories 2013-05-27 14:52:11 +08:00
Dan Poltawski 2226ac117b MDL-39806 theme_bootstrapbase: run less with --compress 2013-05-27 14:44:11 +08:00
Dan Poltawski 550e8d5bc7 Merge branch 'MDL-39806_master' of git://github.com/lazydaisy/moodle 2013-05-27 14:36:46 +08:00
David Monllao 69a397cd2c MDL-39795 behat: Adapting features to consider spaces 2013-05-27 14:24:20 +08:00
David Monllao 9a1f4922bd MDL-39795 behat: Improving find-texts-in-page-contents performance 2013-05-27 14:24:20 +08:00
Dan Poltawski 92e24958e5 Merge branch 'wip-MDL-39785-master' of git://github.com/marinaglancy/moodle 2013-05-27 14:17:00 +08:00
Dan Poltawski 87787191e4 Merge branch 'MDL-38239-master' of git://github.com/StudiUM/moodle 2013-05-27 14:04:04 +08:00
Dan Poltawski 5584adfe70 Merge branch 'w22_MDL-39688_m26_etag' of git://github.com/skodak/moodle 2013-05-27 13:43:13 +08:00
Dan Poltawski cce01b49c1 Merge branch 'w22_MDL-38408_m26_paypalcost' of git://github.com/skodak/moodle 2013-05-27 13:04:45 +08:00
Yuliya Bozhko 59c6b212f5 MDL-39778 badges: Fix missing library error in delete_course() 2013-05-27 11:59:54 +08:00
Rajesh Taneja 0ca328ed23 MDL-39827 course: Trigger invalidate cache event while changing sort-order of category 2013-05-27 10:46:59 +08:00
Dan Poltawski 047a79baed Merge branch 'MDL-39768_master' of git://github.com/dmonllao/moodle 2013-05-27 10:18:21 +08:00
Gareth J Barnard af9c2dcf24 MDL-38856 theme_bootstrapbase: Inverse user name text unreadable on nav bar 2013-05-27 02:14:19 +01:00
Mary Evans 38c96b9545 MDL-39680 theme_bootstrapbase: Fixed footer alignment in less/moodle/debug.less
Squashed commit of the following:

commit 58f5e063a8b333c184ca83ece7f61ec40d2a5080
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Sun May 26 13:45:11 2013 +0100

    MDL-39680 theme_bootstrapbase: Fixed footer alignment in less/moodle/debug.less

commit 575594257a9f4fab75977d2334d07659abea0b65
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Sun May 26 02:07:00 2013 +0100

    MDL-39680 theme_bootstrapbase: Centralised text in footer.
2013-05-26 14:07:36 +01:00
Petr Škoda ee4df06f12 MDL-38408 always validate PayPal dates and cost, improve float formatting 2013-05-25 22:47:28 +02:00
Mary Evans 7eff2edc96 MDL-39806 theme_bootstrapbase: Fix for coursesearchbox label alignment. 2013-05-25 16:47:52 +01:00
Petr Škoda 5ce443a1b1 MDL-39676 improve get_role_users() unit tests 2013-05-25 10:09:42 +02:00
Petr Škoda f111746140 MDL-39688 do not set Etag when sending http ranges 2013-05-25 09:10:24 +02:00
Petr Škoda f3bd4ea6ec MDL-39802 ignore deleted users in meta enrolments 2013-05-24 21:16:21 +02:00
Petr Škoda a23fe90d18 MDL-39802 ignore deleted users in cohort enrolments 2013-05-24 21:16:14 +02:00
Petr Škoda 5b5d372c3c MDL-39802 ignore deleted users in category enrolments 2013-05-24 21:15:17 +02:00
Petr Škoda 29daca77bd MDL-39802 fix sloppy user deleting and creating in imsenterprise plugin 2013-05-24 21:14:53 +02:00
Petr Škoda 736faed6c6 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:08:45 +02:00
Damyon Wiese 73f560c7b2 weekly on-sync release 2.6dev 2013-05-24 13:18:42 +08:00
Damyon Wiese c0db7cbe50 Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-05-24 13:10:53 +08:00
Sam Hemelryk 9aacf24b62 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:11 +12:00
Eloy Lafuente (stronk7) 89f6db3776 Merge branch 'wip-MDL-39177-master' of git://github.com/marinaglancy/moodle 2013-05-23 15:50:56 +02:00
Marina Glancy bfa8ff6301 MDL-39177 make sure we don't remove existing directories when cleaning up unzip 2013-05-23 19:15:47 +10:00
Adrian Greeve 4a28ff88fb MDL-26998 - mod_wiki: the page_wiki class now stores the course module object. 2013-05-23 15:11:32 +08:00
AMOS bot c0bb811442 Automatically generated installer lang files 2013-05-22 08:26:02 +00:00
Marina Glancy f10a2e4207 MDL-39785 bug fix: filter_activitynames was not applied correctly 2013-05-22 17:30:04 +10:00
Jason Fowler f505aab201 MDL-39227 - SCORM - repositioning the navigation panel to be visible in all themes at all resolutions 2013-05-22 15:14:56 +08:00
David Monllao ad7e423784 MDL-39768 behat: Adding focused panels CSS selector 2013-05-22 15:11:05 +08:00
Kordan 60d48d87e0 MDL-39626 theme_formal_white: added color selector to change the overall color of the theme including background images too. 2013-05-22 08:52:59 +02:00
Eloy Lafuente (stronk7) 9686f7cc04 MDL-36482 Fix slipped error, thanks Petr! 2013-05-22 04:09:10 +02:00
Damyon Wiese 49125bc509 Merge branch 'MDL-39697' of git://github.com/lazydaisy/moodle 2013-05-22 09:06:29 +08:00
Eloy Lafuente (stronk7) 65fc4c39a9 Merge branch 'wip-MDL-39177-master' of git://github.com/marinaglancy/moodle 2013-05-22 02:22:55 +02:00
Gilles-Philippe Leblanc d381fb7776 MDL-38239 gradebook: Importing grades from a .txt file with commas for decimals causes an error 2013-05-21 14:15:26 -04:00
Dan Poltawski ec969f891f Merge branch 'wip-MDL-39720-master' of git://github.com/marinaglancy/moodle 2013-05-21 12:30:11 +08:00
Dan Poltawski a22b8a83e7 Merge branch 'MDL-39753' of git://github.com/stronk7/moodle 2013-05-21 10:58:37 +08:00
Dan Poltawski 94b3894aae MDL-39323 auth_ldap: fix savepoint version 2013-05-21 10:53:14 +08:00
Dan Poltawski 2f6568796a Merge branch 'wip_master_mdl-39323_fix_start_tls_undefined_notice' of https://github.com/iarenaza/moodle 2013-05-21 10:43:34 +08:00
AMOS bot 582c4af1da Automatically generated installer lang files 2013-05-21 00:38:13 +00:00
Eloy Lafuente (stronk7) a42467817b Merge branch 'MDL-36482_master' of https://github.com/mr-russ/moodle 2013-05-21 02:25:41 +02:00
Marina Glancy d8d442e9bf MDL-39720 added missing setType() in moodleform 2013-05-21 09:50:07 +10:00
Eloy Lafuente (stronk7) 40cdce2e78 Merge branch 'MDL-39758_master' of git://github.com/lazydaisy/moodle 2013-05-21 01:46:45 +02:00
Eloy Lafuente (stronk7) 388b7d7d98 Merge branch 'MDL-39638_master' of git://github.com/dmonllao/moodle 2013-05-21 00:59:42 +02:00
Eloy Lafuente (stronk7) 34e8106f5f Merge branch 'MDL-26120' of https://github.com/jacks92/moodle 2013-05-21 00:54:08 +02:00
Eloy Lafuente (stronk7) 5e1a48df97 Merge branch 'MDL-39717_master' of git://github.com/dmonllao/moodle 2013-05-21 00:44:05 +02:00
Eloy Lafuente (stronk7) 98204580b3 Merge branch 'MDL-31209-master' of git://github.com/mouneyrac/moodle 2013-05-20 19:05:14 +02:00
Ruslan Kabalin 3257f85f23 MDL-39761: mod_assign: Always check submission plugin status and visibility. 2013-05-20 15:57:52 +01:00
Eloy Lafuente (stronk7) c9e54743ec MDL-39753 Add 2.5.0 upgrade line 2013-05-20 15:33:19 +02:00
Mary Evans 4cb70acbb4 MDL-39758 theme_bootatrapbase: Added missing layout/embedded.php. 2013-05-20 12:42:43 +01:00
Iñaki Arenaza 4943a856d0 MDL-39323 Make sure start_tls config value is defined
This has been introduced in 2.5, so when upgrading from previous versions
make sure we set a default value. Otherwise, we get a notice about it
being undefined when we try to use it (and we always try to use it!).
2013-05-20 13:34:05 +02:00
Dan Poltawski ef78682e44 Merge branch 'w18_MDL-39374_m26_folderlog' of git://github.com/skodak/moodle 2013-05-20 17:58:09 +08:00
Damyon Wiese b346553fda Merge branch 'MDL-38498-master' of git://github.com/FMCorz/moodle 2013-05-20 16:11:59 +08:00
Dan Poltawski 9e95723c60 Merge branch 'MDL-39719-master' of git://github.com/FMCorz/moodle 2013-05-20 16:08:51 +08:00
Frederic Massart 29ebdddd22 MDL-38498 repository: Unit tests for repository::check_capability() 2013-05-20 15:57:01 +08:00
Dan Poltawski d6aec96dd5 Merge branch 'MDL-27748' of git://github.com/timhunt/moodle 2013-05-20 15:46:49 +08:00
Dan Poltawski 7ae324cb35 Merge branch 'MDL-39728' of git://github.com/timhunt/moodle 2013-05-20 15:28:31 +08:00
Dan Poltawski b04bfcfc54 Merge branch 'wip-MDL-36020-master' of git://github.com/troylee/moodle 2013-05-20 12:42:17 +08:00
Damyon Wiese e872912d1c Merge branch 'MDL-39363-master' of git://github.com/ankitagarwal/moodle 2013-05-20 12:12:23 +08:00
Marina Glancy 6dd92c0234 MDL-39177 Updating userid when file is overwritten 2013-05-20 14:09:11 +10:00
Damyon Wiese e8dc568b12 Merge branch 'MDL-39528_master' of git://github.com/dmonllao/moodle 2013-05-20 12:03:36 +08:00
Dan Poltawski 2f75633c6f Merge branch 'MDL-39630_master' of git://github.com/lazydaisy/moodle 2013-05-20 12:01:01 +08:00
Dan Poltawski 02f92b2d86 Merge branch 'MDL-39198_master' of git://github.com/kordan/moodle 2013-05-20 11:47:50 +08:00
Dan Poltawski 22c8aeb018 Merge branch 'MDL-38369-master' of git://github.com/FMCorz/moodle 2013-05-20 10:25:08 +08:00
Frederic Massart 4cc4ca963c MDL-39719 course: Pointing to wrong category string in requests 2013-05-20 09:15:08 +08:00
Tim Hunt 0a5aa9c610 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:39:23 +01:00
Tim Hunt 06616f4b70 MDL-30320 question engine: remove API deprectaed in Moodle 2.2. 2013-05-19 23:38:19 +01:00
AMOS bot 4152749677 Automatically generated installer lang files 2013-05-19 00:37:17 +00:00
Tim Hunt d4a666029d 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:16:05 +01:00
AMOS bot 24a856d08c Automatically generated installer lang files 2013-05-18 00:41:31 +00:00
Marina Glancy 935429af8b MDL-39177 More comments about confusing files.source field 2013-05-17 13:43:45 +10:00
Marina Glancy da4b1ee480 MDL-39177 New function file_storage::get_unused_dirname() 2013-05-17 13:43:45 +10:00
Marina Glancy 77c21e6d0d MDL-39177 Ensure files are overwritten correctly on unzip 2013-05-17 13:43:45 +10:00
Marina Glancy 32495c06b5 MDL-39177 Perform all checks on draftfile area before saving the files 2013-05-17 13:43:45 +10:00
Marina Glancy 489bd32b29 MDL-39177 Remove code duplication 2013-05-17 13:43:45 +10:00
Marina Glancy 0e7fd52e20 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-17 13:43:45 +10:00
Marina Glancy f7c588d226 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-17 13:43:45 +10:00
Marina Glancy 0ab3070c0c 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-17 13:43:44 +10:00
Marina Glancy e9e32b1d88 MDL-39177 File reference is not updated when overwriting the file 2013-05-17 13:43:44 +10:00
Marina Glancy c9b4b8d83a MDL-33719 When overwriting a file the filemanager is not refreshed 2013-05-17 13:43:44 +10:00
Damyon Wiese 2d1ad229da Merge branch 'MDL-28250-25' of git://github.com/danpoltawski/moodle
Conflicts:
	version.php
2013-05-17 11:36:09 +08:00
David Monllao 686279d047 MDL-39717 behat: Removing unstable steps and scenarios 2013-05-17 11:24:21 +08:00
David Monllao 7daab4016d MDL-39717 behat: Add info to experimental steps definitions
JS modal dialogs and drag & drop should be
considered experimental as the steps are not
working as expected in all OS/browser combinations.
2013-05-17 11:23:05 +08:00
Rajesh Taneja 6ab62db65c MDL-35131 Caching: Purge all will clear course modinfo cache - Thanks to Thomas for patch 2013-05-17 10:17:45 +08:00
Rajesh Taneja 69ff684cdb MDL-28558 Administration: Made Country and City user profile fields optional 2013-05-17 09:39:26 +08:00
Damyon Wiese 6fadab94f0 Merge branch 'w18_MDL-39678_m26_yui' of git://github.com/skodak/moodle 2013-05-16 15:53:48 +08:00
David Monllao c4509f8084 MDL-39638 behat: New step to collapse nodes based on the expand nodes
Also updating steps with a collapse behaviour.
2013-05-16 12:43:54 +08:00
David Monllao 870349ee67 MDL-39528 behat: Avoid modal window suite failure
Catching JS alerts/confirms exceptions and
auto-accepting them before each test run to
avoid chained scenarios failures.
2013-05-16 10:11:40 +08:00
AMOS bot 9693f49387 Automatically generated installer lang files 2013-05-16 00:41:17 +00:00
Mary Evans 67202e2f27 MDL-39697 theme_bootstrapbase: Updated $THEME->layouts in config.php to match those in Base theme. 2013-05-16 01:06:26 +01:00
Petr Škoda b046b96a88 MDL-39678 fix YUI 20130515 vulnerability 2013-05-15 21:57:23 +02:00
Petr Škoda d6c60a7d16 MDL-39374 log only real folder edits
Credit goes to Florian Zillner, thanks.
2013-05-15 21:34:03 +02:00
AMOS bot 45b0d9e191 Automatically generated installer lang files 2013-05-15 00:39:20 +00:00
Eloy Lafuente (stronk7) 5e1bdaca7a NOBUG: Adjust backup release for 2.6dev 2013-05-14 12:07:02 +02:00
Eloy Lafuente (stronk7) e2637d1da3 weekly release 2.6dev 2013-05-14 11:32:14 +02:00
Jerome Mouneyrac ca11d39029 MDL-31209 web service error message: Indication about the service not containg the web service function is confusing 2013-05-14 15:40:16 +08:00
Rajesh Taneja 75fd791d87 MDL-39639 Formslib: Hide calendar for datetime element on disable event 2013-05-14 11:59:05 +08:00
Troy Lee 62af3fe42b MDL-36020 overview/report: fix quiz regrade session lock 2013-05-14 10:46:13 +08:00
David Monllao ca96789d77 MDL-39489 behat: Updating to 2.6 moodlehq/behat-extension tag 2013-05-14 10:13:38 +08:00
Kordan 8fbe204b86 MDL-39629 theme_formal_white: added support for new admin_setting_configstoredfile setting element 2013-05-13 14:20:44 +02:00
Frederic Massart 989a58d0f4 MDL-38369 repository: Remove output before redirect 2013-05-13 17:33:04 +08:00
Frederic Massart 0f387618cd MDL-39640 repository: Prevent notice when editing an instance 2013-05-13 17:27:42 +08:00
Jason Fowler bfb1c6d4d2 MDL-39608 - Bootstrap - Chaning the thresholds and width values for the Form labels 2013-05-13 10:23:51 +08:00
Andrew Davis b8b50d04fe MDL-38019 added add_to_config_log() to lib/datalib.php 2013-05-13 08:57:41 +08:00
Dan Marsden 34a6bd45a4 MDL-38019 Log filter enable/disable 2013-05-13 08:57:41 +08:00
Mary Evans 57662549d7 MDL-39630 theme_afterburner: Improving the way course/category listings display. 2013-05-11 13:28:19 +01:00
Jayesh Anandani 1ecd3c304d MDL-39155 Quiz: Provide 3 image-size options on the settings page 2013-05-10 08:38:13 +05:30
Frederic Massart 58f3865fce MDL-39280 form: Multiple select support disabledIf with multiple values 2013-05-10 09:33:46 +08:00
Kordan 0273ed81f9 MDL-39198 theme_formal_white: resized and relocated the "Add..." drop down menu of the "Add a block" pseudo block 2013-05-09 13:35:16 +02:00
Russell Smith 48cb2c824d MDL-36482 activities block: Allow mod display without intro's 2013-05-09 09:57:39 +10:00
Juan Leyva 70f3a47e33 MDL-39563 Fixing mobilecssurl is not being returned in WebService get_siteinfo function 2013-05-08 11:51:46 +02:00
sam marshall 8af5bb54d0 MDL-39472 MUC: Optimise cache::get_from_persist_cache 2013-05-08 10:16:28 +01:00
David Mudrák 3633c2576d MDL-39490 Inform the developer about incorrect order of text processing
Before calling format_text(), the text must be processed with
file_rewrite_pluginfile_urls(). This order is important
for some text filters that look for valid pluginfile.php URLs.
2013-05-03 17:09:58 +02:00
Albert Gasset c4d0e4efe3 MDL-39487 mod/assign: fixed ID number of grade item changing 2013-05-03 11:07:28 +02:00
Tim Hunt 7dce02fd28 MDL-39449 course view.php: don't require forum lib.php
As far as I can see, it is not used, except in social course format, so
I moved the include there.
2013-05-02 16:38:22 +01:00
sam marshall 0d9e5992b3 MDL-39454 Accesslib: is_siteadmin is a bit slow 2013-05-02 10:42:28 +01:00
Adrian Greeve f7a00e9dbf MDL-39040 - mod_data: Database description available in single view tab. 2013-04-30 09:06:02 +08:00
AL Rachels 15d5885f84 MDL-39040 - mod_data: Database description available in add entry tab. 2013-04-30 09:06:01 +08:00
Brian King 5c8535dcea MDL-39409 auth/cas pass web proxy settings along to phpCAS 2013-04-29 17:39:12 +02:00
Ankit Agarwal d8d0b8b390 MDL-39363 scorm: Accept 0 as a valid score 2013-04-29 16:53:15 +08:00
Justin Filip 9b8e4952d4 MDL-39166 auth_ldap Add triggers for user created/updated events. 2013-04-24 16:16:52 -04:00
Jerome Mouneyrac 3f308ae916 MDL-35666 remove uninstall protocol option 2013-04-22 12:02:39 +08:00
prateeksachan 1bd6a2d051 MDL-38794 passed overflowdiv parameter 2013-04-17 20:35:52 +05:30
Rajesh Taneja fbc7f2af93 MDL-33379 course: Removed deprecated move_section() from course/lib.php 2013-04-17 14:28:28 +08:00
Rajesh Taneja afec254467 MDL-34508 Formslib: Removed deprecated setHelpButton() from editor.php and hidden.php 2013-04-17 14:21:07 +08:00
Ankit Agarwal b28bc60fdd MDL-32898 Final deprecation of moodle_strtolower() 2013-04-17 14:05:12 +08:00
Jayesh Anandani ec123a1966 MDL-26120 mod_forum: use correct object 2013-04-11 19:47:40 +05:30
Matteo Scaramuccia c980b5b2bb MDL-38545 Reports: PHP Strict Standards error in graph.php 2013-04-02 22:07:09 +02:00
Ruslan Kabalin 9f2f313e9f MDL-38555 forms: Prevent same data submission multiple times.
This disables Submit button when the form has been submitted to
prevent consequent submissions before the page has been loaded.
2013-03-19 15:25:27 +00:00
Aparup Banerjee 9a7bd21fb3 MDL-37564 linked dependant plugin component text to plugins DB 2013-01-17 14:36:39 +08:00
6725 changed files with 373067 additions and 246192 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
"sub": false,
"supernew": false,
"maxerr": 500,
"maxlen": 150,
"maxlen": 180,
"passfail": false,
"latedef": true
}
+2 -1
View File
@@ -1,4 +1,5 @@
{
"coverage": false,
"lint": "config"
"lint": "config",
"clean": true
}
+4 -2
View File
@@ -51,7 +51,8 @@ switch ($action) {
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
session_gc(); // remove stale sessions
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
break;
case 'enable':
@@ -61,7 +62,8 @@ switch ($action) {
$authsenabled = array_unique($authsenabled);
set_config('auth', implode(',', $authsenabled));
}
session_gc(); // remove stale sessions
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
break;
case 'down':
+21 -11
View File
@@ -78,6 +78,9 @@ echo '<p style="text-align: center"><input type="submit" value="' . get_string("
echo "</div>\n";
echo "</form>\n";
$PAGE->requires->string_for_js('unmaskpassword', 'core_form');
$PAGE->requires->yui_module('moodle-auth-passwordunmask', 'M.auth.passwordunmask');
echo $OUTPUT->footer();
exit;
@@ -87,8 +90,8 @@ exit;
// but some may want a custom one if they are offering
// other options
// Note: lockconfig_ fields have special handling.
function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, $updateopts) {
global $OUTPUT;
function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts, $updateopts, $customfields = array()) {
global $DB, $OUTPUT;
echo '<tr><td colspan="3">';
if ($retrieveopts) {
echo $OUTPUT->heading(get_string('auth_data_mapping', 'auth'));
@@ -107,14 +110,21 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
$pluginconfig = get_config("auth/$auth");
// helptext is on a field with rowspan
// Helptext is on a field with rowspan.
if (empty($helptext)) {
$helptext = '&nbsp;';
$helptext = '&nbsp;';
}
foreach ($user_fields as $field) {
// If we have custom fields then merge them with user fields.
if (!empty($customfields)) {
$user_fields = array_merge($user_fields, $customfields);
}
// Define some vars we'll work with
if (!empty($customfields)) {
$customfieldname = $DB->get_records('user_info_field', null, '', 'shortname, name');
}
foreach ($user_fields as $field) {
// Define some vars we'll work with.
if (!isset($pluginconfig->{"field_map_$field"})) {
$pluginconfig->{"field_map_$field"} = '';
}
@@ -128,7 +138,7 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
$pluginconfig->{"field_lock_$field"} = '';
}
// define the fieldname we display to the user
// Define the fieldname we display to the user.
$fieldname = $field;
if ($fieldname === 'lang') {
$fieldname = get_string('language');
@@ -136,6 +146,10 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} elseif (!empty($customfields) && in_array($field, $customfields)) {
// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
} else {
$fieldname = get_string($fieldname);
}
@@ -155,8 +169,6 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
echo '<label for="menulockconfig_field_updateremote_'.$field.'">'.get_string('auth_updateremote', 'auth') . '</label>&nbsp;';
echo html_writer::select($updateextoptions, "lockconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, false);
echo '<br />';
}
echo '<label for="menulockconfig_field_lock_'.$field.'">'.get_string('auth_fieldlock', 'auth') . '</label>&nbsp;';
echo html_writer::select($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false);
@@ -175,5 +187,3 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
echo '</tr>';
}
}
-76
View File
@@ -1,76 +0,0 @@
<?php
// block.php - allows admin to edit all local configuration variables for a block
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$blockid = required_param('block', PARAM_INT);
if(!$blockrecord = blocks_get_record($blockid)) {
print_error('blockdoesnotexist', 'error');
}
admin_externalpage_setup('blocksetting'.$blockrecord->name);
$block = block_instance($blockrecord->name);
if($block === false) {
print_error('blockcannotinistantiate', 'error');
}
// Define the data we're going to silently include in the instance config form here,
// so we can strip them from the submitted data BEFORE handling it.
$hiddendata = array(
'block' => $blockid,
'sesskey' => sesskey()
);
/// If data submitted, then process and store.
if ($config = data_submitted()) {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', 'error');
}
if(!$block->has_config()) {
print_error('blockcannotconfig', 'error');
}
$remove = array_keys($hiddendata);
foreach($remove as $item) {
unset($config->$item);
}
$block->config_save($config);
redirect("$CFG->wwwroot/$CFG->admin/blocks.php", get_string("changessaved"), 1);
exit;
}
/// Otherwise print the form.
$strmanageblocks = get_string('manageblocks');
$strblockname = $block->get_title();
echo $OUTPUT->header();
echo $OUTPUT->heading($strblockname);
echo $OUTPUT->notification('This block still uses an old-style config_global.html file. ' .
'It must be updated by a developer to use a settings.php file.');
echo $OUTPUT->box(get_string('configwarning', 'admin'), 'generalbox boxwidthnormal boxaligncenter');
echo '<br />';
echo '<form method="post" action="block.php">';
echo '<p>';
foreach($hiddendata as $name => $val) {
echo '<input type="hidden" name="'. $name .'" value="'. $val .'" />';
}
echo '</p>';
echo $OUTPUT->box_start();
include($CFG->dirroot.'/blocks/'. $block->name() .'/config_global.html');
echo $OUTPUT->box_end();
echo '</form>';
echo $OUTPUT->footer();
+31 -52
View File
@@ -1,6 +1,6 @@
<?php
// Allows the admin to configure blocks (hide/show, delete and configure)
// Allows the admin to configure blocks (hide/show, uninstall and configure)
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
@@ -11,14 +11,13 @@
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$delete = optional_param('delete', 0, PARAM_INT);
$unprotect = optional_param('unprotect', 0, PARAM_INT);
$protect = optional_param('protect', 0, PARAM_INT);
/// Print headings
$strmanageblocks = get_string('manageblocks');
$strdelete = get_string('delete');
$struninstall = get_string('uninstallplugin', 'core_admin');
$strversion = get_string('version');
$strhide = get_string('hide');
$strshow = get_string('show');
@@ -30,9 +29,6 @@
$strprotect = get_string('blockprotect', 'admin');
$strunprotect = get_string('blockunprotect', 'admin');
// Purge all caches related to blocks administration.
cache::make('core', 'plugininfo_block')->purge();
/// If data submitted, then process and store.
if (!empty($hide) && confirm_sesskey()) {
@@ -40,6 +36,7 @@
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
@@ -48,6 +45,7 @@
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '1', array('id'=>$block->id)); // Show block
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
@@ -81,35 +79,6 @@
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($delete) && confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
if (!$block = blocks_get_record($delete)) {
print_error('blockdoesnotexist', 'error');
}
if (get_string_manager()->string_exists('pluginname', "block_$block->name")) {
$strblockname = get_string('pluginname', "block_$block->name");
} else {
$strblockname = $block->name;
}
if (!$confirm) {
echo $OUTPUT->confirm(get_string('blockdeleteconfirm', '', $strblockname), 'blocks.php?delete='.$block->id.'&confirm=1', 'blocks.php');
echo $OUTPUT->footer();
exit;
} else {
uninstall_plugin('block', $block->name);
$a = new stdClass();
$a->block = $strblockname;
$a->directory = $CFG->dirroot.'/blocks/'.$block->name;
notice(get_string('blockdeletefiles', '', $a), 'blocks.php');
}
}
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
@@ -127,8 +96,8 @@
$table = new flexible_table('admin-blocks-compatible');
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strdelete, $strsettings));
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'settings', 'uninstall'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strsettings, $struninstall));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'admintable blockstable generaltable');
$table->set_attribute('id', 'compatibleblockstable');
@@ -145,17 +114,18 @@
$blocknames[$blockid] = $blockname;
}
}
collatorlib::asort($blocknames);
core_collator::asort($blocknames);
foreach ($blocknames as $blockid=>$strblockname) {
$block = $blocks[$blockid];
$blockname = $block->name;
$dbversion = get_config('block_'.$block->name, 'version');
if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
$blockobject = false;
$strblockname = '<span class="notifyproblem">'.$strblockname.' ('.get_string('missingfromdisk').')</span>';
$plugin = new stdClass();
$plugin->version = $block->version;
$plugin->version = $dbversion;
} else {
$plugin = new stdClass();
@@ -170,7 +140,11 @@
}
}
$delete = '<a href="blocks.php?delete='.$blockid.'&amp;sesskey='.sesskey().'">'.$strdelete.'</a>';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$blockname, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$settings = ''; // By default, no configuration
if ($blockobject and $blockobject->has_config()) {
@@ -209,13 +183,13 @@
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strshow.'">'.
'<img src="'.$OUTPUT->pix_url('t/show') . '" class="iconsmall" alt="'.$strshow.'" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
$class = 'dimmed_text';
}
if ($block->version == $plugin->version) {
$version = $block->version;
if ($dbversion == $plugin->version) {
$version = $dbversion;
} else {
$version = "$block->version ($plugin->version)";
$version = "$dbversion ($plugin->version)";
}
if (!$blockobject) {
@@ -230,15 +204,15 @@
}
$row = array(
'<span'.$class.'>'.$strblockname.'</span>',
$strblockname,
$blocklist,
'<span'.$class.'>'.$version.'</span>',
$version,
$visible,
$undeletable,
$delete,
$settings
$settings,
$uninstall,
);
$table->add_data($row);
$table->add_data($row, $class);
}
$table->print_html();
@@ -248,8 +222,8 @@
$table = new flexible_table('admin-blocks-incompatible');
$table->define_columns(array('block', 'delete'));
$table->define_headers(array($strname, $strdelete));
$table->define_columns(array('block', 'uninstall'));
$table->define_headers(array($strname, $struninstall));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'incompatibleblockstable generaltable');
@@ -257,9 +231,14 @@
$table->setup();
foreach ($incompatible as $block) {
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$block->name, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$table->add_data(array(
$block->name,
'<a href="blocks.php?delete='.$block->id.'&amp;sesskey='.sesskey().'">'.$strdelete.'</a>',
$uninstall,
));
}
$table->print_html();
+111
View File
@@ -0,0 +1,111 @@
<?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 hack is intended for clustered sites that do not want
* to use shared cachedir for component cache.
*
* This file needs to be called after any change in PHP files in dataroot,
* that is before upgrade and install.
*
* @package core
* @copyright 2013 Petr Skoda (skodak) {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
define('ABORT_AFTER_CONFIG', true); // We need just the values from config.php.
define('CACHE_DISABLE_ALL', true); // This prevents reading of existing caches.
define('IGNORE_COMPONENT_CACHE', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
// Now get cli options.
list($options, $unrecognized) = cli_get_params(
array(
'file' => false,
'rebuild' => false,
'print' => false,
'help' => false
),
array(
'h' => 'help'
)
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized), 2);
}
if (!$options['rebuild'] and !$options['file'] and !$options['print']) {
$help =
"Create alternative component cache file
Options:
-h, --help Print out this help
--rebuild Rebuild \$CFG->alternative_component_cache file
--file=filepath Save component cache to file
--print Print component cache file content
Example:
\$ php admin/cli/rebuild_alternative_component_cache.php --rebuild
";
echo $help;
exit(0);
}
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
$content = core_component::get_cache_content();
if ($options['print']) {
echo $content;
exit(0);
}
if ($options['rebuild']) {
if (empty($CFG->alternative_component_cache)) {
fwrite(STDERR, 'config.php does not contain $CFG->alternative_component_cache setting');
fwrite(STDERR, "\n");
exit(2);
}
$target = $CFG->alternative_component_cache;
} else {
$target = $options['file'];
}
if (!$target) {
fwrite(STDERR, "Invalid target file $target");
fwrite(STDERR, "\n");
exit(1);
}
$bytes = file_put_contents($target, $content);
if (!$bytes) {
fwrite(STDERR, "Error writing to $target");
fwrite(STDERR, "\n");
exit(1);
}
// Success.
echo "File $target was updated\n";
exit(0);
+1 -2
View File
@@ -75,8 +75,7 @@ if (!empty($CFG->showcronsql)) {
$DB->set_debug(true);
}
if (!empty($CFG->showcrondebugging)) {
$CFG->debug = DEBUG_DEVELOPER;
$CFG->debugdisplay = true;
set_debugging(DEBUG_DEVELOPER, true);
}
$starttime = microtime();
+125
View File
@@ -0,0 +1,125 @@
<?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 Marina Glancy
* @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');
// Get cli options.
list($options, $unrecognized) = cli_get_params(
array(
'courses' => false,
'fix' => false,
'help' => false
),
array(
'h' => 'help',
'c' => 'courses',
'f' => 'fix'
)
);
if ($options['help'] || empty($options['courses'])) {
$help =
"Checks and fixes that course modules and sections reference each other correctly.
Compares DB fields course_sections.sequence and course_modules.section
checking that:
- course_sections.sequence contains each module id not more than once in the course
- for each moduleid from course_sections.sequence the field course_modules.section
refers to the same section id (this means course_sections.sequence is more
important if they are different)
- each module in the course is present in one of course_sections.sequence
- section sequences do not contain non-existing course modules
If there are any mismatches, the message is displayed. If --fix is specified,
the records in DB are corrected.
This script may run for a long time on big systems if called for all courses.
Avoid executing the script when another user may simultaneously edit any of the
courses being checked (recommended to run in mainenance mode).
Options:
-c, --courses List courses that need to be checked (comma-separated
values or * for all). Required
-f, --fix Fix the mismatches in DB. If not specified check only and
report problems to STDERR
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/cli/fix_course_sequence.php --courses=*
\$sudo -u www-data /usr/bin/php admin/cli/fix_course_sequence.php --courses=2,3,4 --fix
";
echo $help;
die;
}
$courseslist = preg_split('/\s*,\s*/', $options['courses'], -1, PREG_SPLIT_NO_EMPTY);
if (in_array('*', $courseslist)) {
$where = '';
$params = array();
} else {
list($sql, $params) = $DB->get_in_or_equal($courseslist, SQL_PARAMS_NAMED, 'id');
$where = 'WHERE id '. $sql;
}
$coursescount = $DB->get_field_sql('SELECT count(id) FROM {course} '. $where, $params);
if (!$coursescount) {
cli_error('No courses found');
}
echo "Checking $coursescount courses...\n\n";
require_once($CFG->dirroot. '/course/lib.php');
$problems = array();
$courses = $DB->get_fieldset_sql('SELECT id FROM {course} '. $where, $params);
foreach ($courses as $courseid) {
$errors = course_integrity_check($courseid, null, null, true, empty($options['fix']));
if ($errors) {
if (!empty($options['fix'])) {
// Reset the course cache to make sure cache is recalculated next time the course is viewed.
rebuild_course_cache($courseid, true);
}
foreach ($errors as $error) {
cli_problem($error);
}
$problems[] = $courseid;
} else {
echo "Course [$courseid] is OK\n";
}
}
if (!count($problems)) {
echo "\n...All courses are OK\n";
} else {
if (!empty($options['fix'])) {
echo "\n...Found and fixed ".count($problems)." courses with problems". "\n";
} else {
echo "\n...Found ".count($problems)." courses with problems. To fix run:\n";
echo "\$sudo -u www-data /usr/bin/php admin/cli/fix_course_sequence.php --courses=".join(',', $problems)." --fix". "\n";
}
}
+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);
+90 -10
View File
@@ -36,6 +36,12 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
exit(1);
}
// Force OPcache reset if used, we do not want any stale caches
// when preparing test environment.
if (function_exists('opcache_reset')) {
opcache_reset();
}
$help =
"Command line Moodle installer, creates config.php and initializes database.
Please note you must execute this script with the same uid as apache
@@ -58,7 +64,8 @@ Options:
--dbname=NAME Database name. Default is moodle
--dbuser=USERNAME Database user. Default is root
--dbpass=PASSWORD Database password. Default is blank
--dbsocket Use database sockets. Available for some databases only.
--dbport=NUMBER Use database port.
--dbsocket=PATH Use database socket, 1 means default. Available for some databases only.
--prefix=STRING Table prefix for above database tables. Default is mdl_
--fullname=STRING The fullname of the site
--shortname=STRING The shortname of the site
@@ -130,6 +137,10 @@ define('MOODLE_INTERNAL', true);
// Disables all caching.
define('CACHE_DISABLE_ALL', true);
define('PHPUNIT_TEST', false);
define('IGNORE_COMPONENT_CACHE', true);
// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.3.3") < 0) {
$phpversion = phpversion();
@@ -140,6 +151,7 @@ if (version_compare(phpversion(), "5.3.3") < 0) {
}
// set up configuration
global $CFG;
$CFG = new stdClass();
$CFG->lang = 'en';
$CFG->dirroot = dirname(dirname(dirname(__FILE__)));
@@ -150,6 +162,10 @@ $CFG->docroot = 'http://docs.moodle.org';
$CFG->running_installer = true;
$CFG->early_install_lang = true;
$CFG->ostype = (stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'darwin')) ? 'WINDOWS' : 'UNIX';
$CFG->dboptions = array();
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = true;
$CFG->debugdeveloper = true;
$parts = explode('/', str_replace('\\', '/', dirname(dirname(__FILE__))));
$CFG->admin = array_pop($parts);
@@ -158,10 +174,14 @@ $CFG->admin = array_pop($parts);
//the problem is that we need specific version of quickforms and hacked excel files :-(
ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include_path'));
require_once($CFG->libdir.'/classes/component.php');
require_once($CFG->libdir.'/classes/text.php');
require_once($CFG->libdir.'/classes/string_manager.php');
require_once($CFG->libdir.'/classes/string_manager_install.php');
require_once($CFG->libdir.'/classes/string_manager_standard.php');
require_once($CFG->libdir.'/installlib.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->libdir.'/setuplib.php');
require_once($CFG->libdir.'/textlib.class.php');
require_once($CFG->libdir.'/weblib.php');
require_once($CFG->libdir.'/dmllib.php');
require_once($CFG->libdir.'/moodlelib.php');
@@ -170,11 +190,40 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/componentlib.class.php');
require_once($CFG->dirroot.'/cache/lib.php');
// Register our classloader, in theory somebody might want to replace it to load other hacked core classes.
// Required because the database checks below lead to session interaction which is going to lead us to requiring autoloaded classes.
if (defined('COMPONENT_CLASSLOADER')) {
spl_autoload_register(COMPONENT_CLASSLOADER);
} else {
spl_autoload_register('core_component::classloader');
}
require($CFG->dirroot.'/version.php');
$CFG->target_release = $release;
$_SESSION = array();
$_SESSION['SESSION'] = new stdClass();
$_SESSION['SESSION']->lang = $CFG->lang;
$_SESSION['USER'] = new stdClass();
$_SESSION['USER']->id = 0;
$_SESSION['USER']->mnethostid = 1;
global $SESSION;
global $USER;
$SESSION = &$_SESSION['SESSION'];
$USER = &$_SESSION['USER'];
global $COURSE;
$COURSE = new stdClass();
$COURSE->id = 1;
global $SITE;
$SITE = $COURSE;
define('SITEID', 1);
//Database types
$databases = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'native'),
'mariadb'=> moodle_database::get_driver_instance('mariadb', 'native'),
'pgsql' => moodle_database::get_driver_instance('pgsql', 'native'),
'oci' => moodle_database::get_driver_instance('oci', 'native'),
'sqlsrv' => moodle_database::get_driver_instance('sqlsrv', 'native'), // MS SQL*Server PHP driver
@@ -204,7 +253,8 @@ list($options, $unrecognized) = cli_get_params(
'dbname' => 'moodle',
'dbuser' => empty($distro->dbuser) ? 'root' : $distro->dbuser, // let distros set dbuser
'dbpass' => '',
'dbsocket' => false,
'dbport' => '',
'dbsocket' => '',
'prefix' => 'mdl_',
'fullname' => '',
'shortname' => '',
@@ -294,6 +344,8 @@ if ($interactive) {
}
}
$CFG->directorypermissions = $chmod;
$CFG->filepermissions = ($CFG->directorypermissions & 0666);
$CFG->umaskpermissions = (($CFG->directorypermissions & 0777) ^ 0777);
//We need wwwroot before we test dataroot
$wwwroot = clean_param($options['wwwroot'], PARAM_URL);
@@ -380,8 +432,9 @@ if ($interactive) {
cli_error(get_string('pathserrcreatedataroot', 'install', $a));
}
}
$CFG->tempdir = $CFG->dataroot.'/temp';
$CFG->cachedir = $CFG->dataroot.'/cache';
$CFG->tempdir = $CFG->dataroot.'/temp';
$CFG->cachedir = $CFG->dataroot.'/cache';
$CFG->localcachedir = $CFG->dataroot.'/localcache';
// download required lang packs
if ($CFG->lang !== 'en') {
@@ -497,6 +550,34 @@ if ($interactive) {
$CFG->prefix = $options['prefix'];
}
// ask for db port
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseport', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbport']);
$CFG->dboptions['dbport'] = (int)cli_input($prompt, $options['dbport']);
} else {
$CFG->dboptions['dbport'] = (int)$options['dbport'];
}
if ($CFG->dboptions['dbport'] <= 0) {
$CFG->dboptions['dbport'] = '';
}
// ask for db socket
if ($CFG->ostype === 'WINDOWS') {
$CFG->dboptions['dbsocket'] = '';
} else if ($interactive and empty($CFG->dboptions['dbport'])) {
cli_separator();
cli_heading(get_string('databasesocket', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbsocket']);
$CFG->dboptions['dbsocket'] = cli_input($prompt, $options['dbsocket']);
} else {
$CFG->dboptions['dbsocket'] = $options['dbsocket'];
}
// ask for db user
if ($interactive) {
cli_separator();
@@ -525,14 +606,14 @@ if ($interactive) {
$CFG->dbpass = cli_input($prompt, $options['dbpass']);
if (function_exists('distro_pre_create_db')) { // Hook for distros needing to do something before DB creation
$distro = distro_pre_create_db($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbsocket'=>$options['dbsocket']), $distro);
$distro = distro_pre_create_db($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']), $distro);
}
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbsocket'=>$options['dbsocket']));
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']));
} while ($hint_database !== '');
} else {
$CFG->dbpass = $options['dbpass'];
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbsocket'=>$options['dbsocket']));
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']));
if ($hint_database !== '') {
cli_error(get_string('dbconnectionerror', 'install'));
}
@@ -672,9 +753,8 @@ if (!$envstatus) {
}
// Test plugin dependencies.
require_once($CFG->libdir . '/pluginlib.php');
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_problem(get_string('pluginscheckfailed', 'admin', array('pluginslist' => implode(', ', array_unique($failed)))));
cli_error(get_string('pluginschecktodo', 'admin'));
}
+7 -2
View File
@@ -36,6 +36,12 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
exit(1);
}
// Force OPcache reset if used, we do not want any stale caches
// when preparing test environment.
if (function_exists('opcache_reset')) {
opcache_reset();
}
$help =
"Advanced command line Moodle database installer.
Please note you must execute this script with the same uid as apache.
@@ -161,9 +167,8 @@ if (!$envstatus) {
}
// Test plugin dependencies.
require_once($CFG->libdir . '/pluginlib.php');
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_problem(get_string('pluginscheckfailed', 'admin', array('pluginslist' => implode(', ', array_unique($failed)))));
cli_error(get_string('pluginschecktodo', 'admin'));
}
+8 -3
View File
@@ -29,6 +29,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// Force OPcache reset if used, we do not want any stale caches
// when detecting if upgrade necessary or when running upgrade.
if (function_exists('opcache_reset') and !isset($_SERVER['REMOTE_ADDR'])) {
opcache_reset();
}
define('CLI_SCRIPT', true);
define('CACHE_DISABLE_ALL', true);
@@ -37,7 +43,6 @@ require_once($CFG->libdir.'/adminlib.php'); // various admin-only function
require_once($CFG->libdir.'/upgradelib.php'); // general upgrade/install related functions
require_once($CFG->libdir.'/clilib.php'); // cli only functions
require_once($CFG->libdir.'/environmentlib.php');
require_once($CFG->libdir.'/pluginlib.php');
// now get cli options
list($options, $unrecognized) = cli_get_params(
@@ -111,7 +116,7 @@ if (!$envstatus) {
// Test plugin dependencies.
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_problem(get_string('pluginscheckfailed', 'admin', array('pluginslist' => implode(', ', array_unique($failed)))));
cli_error(get_string('pluginschecktodo', 'admin'));
}
@@ -166,7 +171,7 @@ set_config('branch', $branch);
upgrade_noncore(true);
// log in as admin - we need doanything permission when applying defaults
session_set_user(get_admin());
\core\session\manager::set_user(get_admin());
// apply all default settings, just in case do it twice to fill all defaults
admin_apply_default_settings(NULL, false);
+3 -50
View File
@@ -24,11 +24,9 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/pluginlib.php');
$action = required_param('action', PARAM_ALPHANUMEXT);
$formatname = required_param('format', PARAM_PLUGIN);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$syscontext = context_system::instance();
$PAGE->set_url('/admin/courseformats.php');
@@ -40,7 +38,7 @@ require_sesskey();
$return = new moodle_url('/admin/settings.php', array('section' => 'manageformats'));
$formatplugins = plugin_manager::instance()->get_plugins_of_type('format');
$formatplugins = core_plugin_manager::instance()->get_plugins_of_type('format');
$sortorder = array_flip(array_keys($formatplugins));
if (!isset($formatplugins[$formatname])) {
@@ -54,11 +52,13 @@ switch ($action) {
print_error('cannotdisableformat', 'error', $return);
}
set_config('disabled', 1, 'format_'. $formatname);
core_plugin_manager::reset_caches();
}
break;
case 'enable':
if (!$formatplugins[$formatname]->is_enabled()) {
unset_config('disabled', 'format_'. $formatname);
core_plugin_manager::reset_caches();
}
break;
case 'up':
@@ -79,52 +79,5 @@ switch ($action) {
set_config('format_plugins_sortorder', implode(',', $seq));
}
break;
case 'uninstall':
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('courseformats', 'moodle'));
$coursecount = $DB->count_records('course', array('format' => $formatname));
if ($coursecount) {
// Check that default format is set. It will be used to convert courses
// using this format
$defaultformat = get_config('moodlecourse', 'format');
$defaultformat = $formatplugins[get_config('moodlecourse', 'format')];
if (!$defaultformat) {
echo $OUTPUT->error_text(get_string('defaultformatnotset', 'admin'));
echo $OUTPUT->footer();
exit;
}
}
$format = $formatplugins[$formatname];
$deleteurl = $format->get_uninstall_url();
if (!$deleteurl) {
// somebody was trying to cheat and type non-existing link
echo $OUTPUT->error_text(get_string('cannotuninstall', 'admin', $format->displayname));
echo $OUTPUT->footer();
exit;
}
if (!$confirm) {
if ($coursecount) {
$message = get_string('formatuninstallwithcourses', 'admin',
(object)array('count' => $coursecount, 'format' => $format->displayname,
'defaultformat' => $defaultformat->displayname));
} else {
$message = get_string('formatuninstallconfirm', 'admin', $format->displayname);
}
$deleteurl->param('confirm', 1);
echo $OUTPUT->confirm($message, $deleteurl, $return);
} else {
$a = new stdClass();
$a->plugin = $format->displayname;
$a->directory = $format->rootdir;
uninstall_plugin('format', $formatname);
echo $OUTPUT->notification(get_string('formatuninstalled', 'admin', $a), 'notifysuccess');
echo $OUTPUT->continue_button($return);
}
echo $OUTPUT->footer();
exit;
}
redirect($return);
+2 -16
View File
@@ -53,7 +53,7 @@ require_once($CFG->libdir.'/clilib.php');
require_once($CFG->libdir.'/cronlib.php');
// extra safety
session_get_instance()->write_close();
\core\session\manager::write_close();
// check if execution allowed
if (!empty($CFG->cronclionly)) {
@@ -72,24 +72,10 @@ if (!empty($CFG->cronremotepassword)) {
}
// send mime type and encoding
if (check_browser_version('MSIE')) {
//ugly IE hack to work around downloading instead of viewing
@header('Content-Type: text/html; charset=utf-8');
echo "<xmp>"; //<pre> is not good enough for us here
} else {
//send proper plaintext header
@header('Content-Type: text/plain; charset=utf-8');
}
@header('Content-Type: text/plain; charset=utf-8');
// we do not want html markup in emulated CLI
@ini_set('html_errors', 'off');
// execute the cron
cron_run();
// finish the IE hack
if (check_browser_version('MSIE')) {
echo "</xmp>";
}
+1 -41
View File
@@ -83,47 +83,6 @@ switch ($action) {
}
break;
case 'uninstall':
if ($editor === 'textarea') {
redirect($returnurl);
}
if (get_string_manager()->string_exists('pluginname', 'editor_'.$editor)) {
$strplugin = get_string('pluginname', 'editor_'.$editor);
} else {
$strplugin = $editor;
}
$PAGE->set_title($strplugin);
echo $OUTPUT->header();
if (!$confirm) {
echo $OUTPUT->heading(get_string('editors', 'core_editor'));
$deleteurl = new moodle_url('/admin/editors.php', array('action'=>'uninstall', 'editor'=>$editor, 'sesskey'=>sesskey(), 'confirm'=>1));
echo $OUTPUT->confirm(get_string('editordeleteconfirm', 'core_editor', $strplugin),
$deleteurl, $returnurl);
echo $OUTPUT->footer();
die();
} else {
// Remove from enabled list.
$key = array_search($editor, $active_editors);
unset($active_editors[$key]);
set_config('texteditors', implode(',', $active_editors));
// Delete everything!!
uninstall_plugin('editor', $editor);
$a = new stdClass();
$a->name = $strplugin;
$a->directory = "$CFG->dirroot/lib/editor/$editor";
echo $OUTPUT->notification(get_string('plugindeletefiles', '', $a), 'notifysuccess');
echo $OUTPUT->continue_button($returnurl);
echo $OUTPUT->footer();
die();
}
default:
break;
}
@@ -134,6 +93,7 @@ if (empty($active_editors)) {
}
set_config('texteditors', implode(',', $active_editors));
core_plugin_manager::reset_caches();
if ($return) {
redirect ($returnurl);
+17 -48
View File
@@ -31,7 +31,6 @@ require_once($CFG->libdir.'/adminlib.php');
$action = required_param('action', PARAM_ALPHANUMEXT);
$enrol = required_param('enrol', PARAM_PLUGIN);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$migrate = optional_param('migrate', 0, PARAM_BOOL);
$PAGE->set_url('/admin/enrol.php');
$PAGE->set_context(context_system::instance());
@@ -51,6 +50,7 @@ switch ($action) {
case 'disable':
unset($enabled[$enrol]);
set_config('enrol_plugins_enabled', implode(',', array_keys($enabled)));
core_plugin_manager::reset_caches();
$syscontext->mark_dirty(); // resets all enrol caches
break;
@@ -61,6 +61,7 @@ switch ($action) {
$enabled = array_keys($enabled);
$enabled[] = $enrol;
set_config('enrol_plugins_enabled', implode(',', $enabled));
core_plugin_manager::reset_caches();
$syscontext->mark_dirty(); // resets all enrol caches
break;
@@ -96,7 +97,7 @@ switch ($action) {
set_config('enrol_plugins_enabled', implode(',', $enabled));
break;
case 'uninstall':
case 'migrate':
if (get_string_manager()->string_exists('pluginname', 'enrol_'.$enrol)) {
$strplugin = get_string('pluginname', 'enrol_'.$enrol);
} else {
@@ -106,58 +107,26 @@ switch ($action) {
$PAGE->set_title($strplugin);
echo $OUTPUT->header();
if (!$confirm) {
echo $OUTPUT->heading(get_string('enrolments', 'enrol'));
// This may take a long time.
set_time_limit(0);
$deleteurl = new moodle_url('/admin/enrol.php', array('action'=>'uninstall', 'enrol'=>$enrol, 'sesskey'=>sesskey(), 'confirm'=>1, 'migrate'=>0));
$migrateurl = new moodle_url('/admin/enrol.php', array('action'=>'uninstall', 'enrol'=>$enrol, 'sesskey'=>sesskey(), 'confirm'=>1, 'migrate'=>1));
// Disable plugin to prevent concurrent cron execution.
unset($enabled[$enrol]);
set_config('enrol_plugins_enabled', implode(',', array_keys($enabled)));
$migrate = new single_button($migrateurl, get_string('uninstallmigrate', 'enrol'));
$delete = new single_button($deleteurl, get_string('uninstalldelete', 'enrol'));
$cancel = new single_button($return, get_string('cancel'), 'get');
echo $OUTPUT->heading(get_string('uninstallmigrating', 'enrol', 'enrol_'.$enrol));
$buttons = $OUTPUT->render($delete) . $OUTPUT->render($cancel);
if ($enrol !== 'manual') {
$buttons = $OUTPUT->render($migrate) . $buttons;
}
require_once("$CFG->dirroot/enrol/manual/locallib.php");
enrol_manual_migrate_plugin_enrolments($enrol);
echo $OUTPUT->box_start('generalbox', 'notice');
echo html_writer::tag('p', markdown_to_html(get_string('uninstallconfirm', 'enrol', $strplugin)));
echo html_writer::tag('div', $buttons, array('class' => 'buttons'));
echo $OUTPUT->box_end();
echo $OUTPUT->notification(get_string('success'), 'notifysuccess');
echo $OUTPUT->footer();
exit;
} else {
// This may take a long time.
set_time_limit(0);
// Disable plugin to prevent concurrent cron execution.
unset($enabled[$enrol]);
set_config('enrol_plugins_enabled', implode(',', array_keys($enabled)));
if ($migrate) {
echo $OUTPUT->heading(get_string('uninstallmigrating', 'enrol', 'enrol_'.$enrol));
require_once("$CFG->dirroot/enrol/manual/locallib.php");
enrol_manual_migrate_plugin_enrolments($enrol);
echo $OUTPUT->notification(get_string('success'), 'notifysuccess');
}
// Delete everything!!
uninstall_plugin('enrol', $enrol);
$syscontext->mark_dirty(); // Resets all enrol caches.
$a = new stdClass();
$a->plugin = $strplugin;
$a->directory = "$CFG->dirroot/enrol/$enrol";
echo $OUTPUT->notification(get_string('uninstalldeletefiles', 'enrol', $a), 'notifysuccess');
echo $OUTPUT->continue_button($return);
echo $OUTPUT->footer();
exit;
if (!$return = core_plugin_manager::instance()->get_uninstall_url('enrol_'.$enrol, 'manage')) {
$return = new moodle_url('/admin/plugins.php');
}
echo $OUTPUT->continue_button($return);
echo $OUTPUT->footer();
exit;
}
+237
View File
@@ -892,4 +892,241 @@
</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="mariadb" version="5.3.5" />
<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_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</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>
+164 -180
View File
@@ -1,88 +1,93 @@
<?php
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.org //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// //
// This program 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 2 of the License, or //
// (at your option) any later version. //
// //
// This program 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: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
// 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/>.
/**
* Processes actions from the admin_setting_managefilters object (defined in
* adminlib.php).
* Filter management page.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package administration
*//** */
* @package core
* @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/adminlib.php');
$action = optional_param('action', '', PARAM_ALPHANUMEXT);
$filterpath = optional_param('filterpath', '', PARAM_SAFEDIR);
$action = optional_param('action', '', PARAM_ALPHA);
$filterpath = optional_param('filterpath', '', PARAM_PLUGIN);
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/site:config', $systemcontext);
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/site:config', $systemcontext);
$returnurl = "$CFG->wwwroot/$CFG->admin/filters.php";
admin_externalpage_setup('managefilters');
admin_externalpage_setup('managefilters');
// Purge all caches related to filter administration.
cache::make('core', 'plugininfo_filter')->purge();
$filters = filter_get_global_states();
// In case any new filters have been installed, but not put in the table yet.
$fitlernames = filter_get_all_installed();
$newfilters = $fitlernames;
foreach ($filters as $filter => $notused) {
unset($newfilters[$filter]);
// Clean up bogus filter states first.
$plugininfos = core_plugin_manager::instance()->get_plugins_of_type('filter');
$filters = array();
$states = filter_get_global_states();
foreach ($states as $state) {
if (!isset($plugininfos[$state->filter]) and !get_config('filter_'.$state->filter, 'version')) {
// Purge messy leftovers after incorrectly uninstalled plugins and unfinished installs.
$DB->delete_records('filter_active', array('filter' => $state->filter));
$DB->delete_records('filter_config', array('filter' => $state->filter));
error_log('Deleted bogus "filter_'.$state->filter.'" states and config data.');
} else {
$filters[$state->filter] = $state;
}
}
/// Process actions ============================================================
if ($action) {
if (!isset($filters[$filterpath]) && !isset($newfilters[$filterpath])) {
throw new moodle_exception('filternotinstalled', 'error', $returnurl, $filterpath);
}
if (!confirm_sesskey()) {
redirect($returnurl);
// Add properly installed and upgraded filters to the global states table.
foreach ($plugininfos as $filter => $info) {
if (isset($filters[$filter])) {
continue;
}
/** @var \core\plugininfo\base $info */
if ($info->is_installed_and_upgraded()) {
filter_set_global_state($filter, TEXTFILTER_DISABLED);
$states = filter_get_global_states();
foreach ($states as $state) {
if ($state->filter === $filter) {
$filters[$filter] = $state;
break;
}
}
}
}
switch ($action) {
if ($action) {
require_sesskey();
}
// Process actions.
switch ($action) {
case 'setstate':
if ($newstate = optional_param('newstate', '', PARAM_INT)) {
if (isset($filters[$filterpath]) and $newstate = optional_param('newstate', '', PARAM_INT)) {
filter_set_global_state($filterpath, $newstate);
if ($newstate == TEXTFILTER_DISABLED) {
filter_set_applies_to_strings($filterpath, false);
}
unset($newfilters[$filterpath]);
}
break;
case 'setapplyto':
$applytostrings = optional_param('stringstoo', false, PARAM_BOOL);
filter_set_applies_to_strings($filterpath, $applytostrings);
if (isset($filters[$filterpath])) {
$applytostrings = optional_param('stringstoo', false, PARAM_BOOL);
filter_set_applies_to_strings($filterpath, $applytostrings);
}
break;
case 'down':
@@ -97,145 +102,124 @@
filter_set_global_state($filterpath, $filters[$filterpath]->active, -1);
}
break;
}
case 'delete':
// If not yet confirmed, display a confirmation message.
if (!optional_param('confirm', '', PARAM_BOOL)) {
$filtername = filter_get_name($filterpath);
// Reset caches and return.
if ($action) {
reset_text_filters_cache();
core_plugin_manager::reset_caches();
redirect(new moodle_url('/admin/filters.php'));
}
$title = get_string('deletefilterareyousure', 'admin', $filtername);
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
// Print the page heading.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('filtersettings', 'admin'));
$linkcontinue = new moodle_url($returnurl, array('action' => 'delete', 'filterpath' => $filterpath, 'confirm' => 1));
$formcancel = new single_button(new moodle_url($returnurl), get_string('no'), 'get');
echo $OUTPUT->confirm(get_string('deletefilterareyousuremessage', 'admin', $filtername), $linkcontinue, $formcancel);
echo $OUTPUT->footer();
exit;
}
$states = filter_get_global_states();
$stringfilters = filter_get_string_filters();
// Do the deletion.
$title = get_string('deletingfilter', 'admin', $filterpath);
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$table = new html_table();
$table->head = array(get_string('filter'), get_string('isactive', 'filters'),
get_string('order'), get_string('applyto', 'filters'), get_string('settings'), get_string('uninstallplugin', 'core_admin'));
$table->colclasses = array ('leftalign', 'leftalign', 'centeralign', 'leftalign', 'leftalign', 'leftalign');
$table->attributes['class'] = 'admintable generaltable';
$table->id = 'filterssetting';
$table->data = array();
// Delete all data for this plugin.
filter_delete_all_for_filter($filterpath);
$a = new stdClass;
$a->filter = $filterpath;
$a->directory = "$CFG->dirroot/filter/$filterpath";
echo $OUTPUT->box(get_string('deletefilterfiles', 'admin', $a), 'generalbox', 'notice');
echo $OUTPUT->continue_button($returnurl);
echo $OUTPUT->footer();
exit;
$lastactive = null;
foreach ($states as $state) {
if ($state->active != TEXTFILTER_DISABLED) {
$lastactive = $state->filter;
}
}
// Add any missing filters to the DB table.
foreach ($newfilters as $filter => $notused) {
filter_set_global_state($filter, TEXTFILTER_DISABLED);
// Iterate through filters adding to display table.
$firstrow = true;
foreach ($states as $state) {
$filter = $state->filter;
if (!isset($plugininfos[$filter])) {
continue;
}
// Reset caches and return
if ($action) {
reset_text_filters_cache();
redirect($returnurl);
}
/// End of process actions =====================================================
/// Print the page heading.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('filtersettings', 'admin'));
$activechoices = array(
TEXTFILTER_DISABLED => get_string('disabled', 'filters'),
TEXTFILTER_OFF => get_string('offbutavailable', 'filters'),
TEXTFILTER_ON => get_string('on', 'filters'),
);
$applytochoices = array(
0 => get_string('content', 'filters'),
1 => get_string('contentandheadings', 'filters'),
);
$filters = filter_get_global_states();
// In case any new filters have been installed, but not put in the table yet.
$filternames = filter_get_all_installed();
$newfilters = $filternames;
foreach ($filters as $filter => $notused) {
unset($newfilters[$filter]);
}
$stringfilters = filter_get_string_filters();
$table = new html_table();
$table->head = array(get_string('filter'), get_string('isactive', 'filters'),
get_string('order'), get_string('applyto', 'filters'), get_string('settings'), get_string('delete'));
$table->colclasses = array ('leftalign', 'leftalign', 'centeralign', 'leftalign', 'leftalign', 'leftalign');
$table->attributes['class'] = 'admintable generaltable';
$table->id = 'filterssetting';
$table->data = array();
$lastactive = null;
foreach ($filters as $filter => $filterinfo) {
if ($filterinfo->active != TEXTFILTER_DISABLED) {
$lastactive = $filter;
}
}
// iterate through filters adding to display table
$firstrow = true;
foreach ($filters as $filter => $filterinfo) {
$applytostrings = isset($stringfilters[$filter]) && $filterinfo->active != TEXTFILTER_DISABLED;
$row = get_table_row($filterinfo, $firstrow, $filter == $lastactive, $applytostrings);
$table->data[] = $row;
if ($filterinfo->active == TEXTFILTER_DISABLED) {
$table->rowclasses[] = 'dimmed_text';
} else {
$table->rowclasses[] = '';
}
$firstrow = false;
}
foreach ($newfilters as $filter => $filtername) {
$filterinfo = new stdClass;
$filterinfo->filter = $filter;
$filterinfo->active = TEXTFILTER_DISABLED;
$row = get_table_row($filterinfo, false, false, false);
$table->data[] = $row;
$plugininfo = $plugininfos[$filter];
$applytostrings = isset($stringfilters[$filter]) && $state->active != TEXTFILTER_DISABLED;
$row = get_table_row($plugininfo, $state, $firstrow, $filter == $lastactive, $applytostrings);
$table->data[] = $row;
if ($state->active == TEXTFILTER_DISABLED) {
$table->rowclasses[] = 'dimmed_text';
} else {
$table->rowclasses[] = '';
}
$firstrow = false;
}
echo html_writer::table($table);
echo '<p class="filtersettingnote">' . get_string('filterallwarning', 'filters') . '</p>';
echo $OUTPUT->footer();
echo html_writer::table($table);
echo '<p class="filtersettingnote">' . get_string('filterallwarning', 'filters') . '</p>';
echo $OUTPUT->footer();
die;
/// Display helper functions ===================================================
/**
* Return action URL.
*
* @param string $filterpath
* @param string $action
* @return moodle_url
*/
function filters_action_url($filterpath, $action) {
if ($action === 'delete') {
return core_plugin_manager::instance()->get_uninstall_url('filter_'.$filterpath, 'manage');
}
return new moodle_url('/admin/filters.php', array('sesskey'=>sesskey(), 'filterpath'=>$filterpath, 'action'=>$action));
}
function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings) {
global $CFG, $OUTPUT, $activechoices, $applytochoices, $filternames; //TODO: this is sloppy coding style!!
/**
* Construct table record.
*
* @param \core\plugininfo\filter $plugininfo
* @param stdClass $state
* @param bool $isfirstrow
* @param bool $islastactive
* @param bool $applytostrings
* @return array data
*/
function get_table_row(\core\plugininfo\filter $plugininfo, $state, $isfirstrow, $islastactive, $applytostrings) {
global $OUTPUT;
$row = array();
$filter = $filterinfo->filter;
$filter = $state->filter;
$active = $plugininfo->is_installed_and_upgraded();
// Filter name
if (!empty($filternames[$filter])) {
$row[] = $filternames[$filter];
} else {
$row[] = '<span class="error">' . get_string('filemissing', '', $filter) . '</span>';
static $activechoices;
static $applytochoices;
if (!isset($activechoices)) {
$activechoices = array(
TEXTFILTER_DISABLED => get_string('disabled', 'core_filters'),
TEXTFILTER_OFF => get_string('offbutavailable', 'core_filters'),
TEXTFILTER_ON => get_string('on', 'core_filters'),
);
$applytochoices = array(
0 => get_string('content', 'core_filters'),
1 => get_string('contentandheadings', 'core_filters'),
);
}
// Disable/off/on
$select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $filterinfo->active, null, 'active' . $filter);
// Filter name.
$displayname = $plugininfo->displayname;
if (!$plugininfo->rootdir) {
$displayname = '<span class="error">' . $displayname . ' - ' . get_string('status_missing', 'core_plugin') . '</span>';
} else if (!$active) {
$displayname = '<span class="error">' . $displayname . ' - ' . get_string('error') . '</span>';
}
$row[] = $displayname;
// Disable/off/on.
$select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $state->active, null, 'active' . $filter);
$select->set_label(get_string('isactive', 'filters'), array('class' => 'accesshide'));
$row[] = $OUTPUT->render($select);
// Re-order
// Re-order.
$updown = '';
$spacer = '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" />';
if ($filterinfo->active != TEXTFILTER_DISABLED) {
if ($state->active != TEXTFILTER_DISABLED) {
if (!$isfirstrow) {
$updown .= $OUTPUT->action_icon(filters_action_url($filter, 'up'), new pix_icon('t/up', get_string('up'), '', array('class' => 'iconsmall')));
} else {
@@ -252,18 +236,18 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
// Apply to strings.
$select = new single_select(filters_action_url($filter, 'setapplyto'), 'stringstoo', $applytochoices, $applytostrings, null, 'applyto' . $filter);
$select->set_label(get_string('applyto', 'filters'), array('class' => 'accesshide'));
$select->disabled = $filterinfo->active == TEXTFILTER_DISABLED;
$select->disabled = ($state->active == TEXTFILTER_DISABLED);
$row[] = $OUTPUT->render($select);
// Settings link, if required
if (filter_has_global_settings($filter)) {
$row[] = '<a href="' . $CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=filtersetting' . $filter . '">' . get_string('settings') . '</a>';
// Settings link, if required.
if ($active and filter_has_global_settings($filter)) {
$row[] = html_writer::link(new moodle_url('/admin/settings.php', array('section'=>'filtersetting'.$filter)), get_string('settings'));
} else {
$row[] = '';
}
// Delete
$row[] = '<a href="' . filters_action_url($filter, 'delete') . '">' . get_string('delete') . '</a>';
// Uninstall.
$row[] = html_writer::link(filters_action_url($filter, 'delete'), get_string('uninstallplugin', 'core_admin'));
return $row;
}
+4 -3
View File
@@ -39,10 +39,11 @@ while(!feof($fd)) {
$action = clam_handle_infected_file($file,$log->userid,true);
clam_replace_infected_file($file);
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$ctxselect = ', ' . context_helper::get_preload_record_columns_sql('ctx');
$ctxjoin = "LEFT JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel)";
$sql = "SELECT c.id, c.fullname $ctxselect FROM {course} c $ctxjoin WHERE c.id = :courseid";
$course = $DB->get_record_sql($sql, array('courseid' => $log->course));
context_instance_preload($course);
$course = $DB->get_record_sql($sql, array('courseid' => $log->course, 'contextlevel' => CONTEXT_COURSE));
context_helper::preload_from_record($course);
$user = $DB->get_record("user", array("id"=>$log->userid));
$subject = get_string('virusfoundsubject','moodle',format_string($site->fullname));
+135 -82
View File
@@ -47,17 +47,39 @@ if (!function_exists('iconv')) {
define('NO_OUTPUT_BUFFERING', true);
if (empty($_GET['cache']) and empty($_POST['cache'])) {
if ((isset($_GET['cache']) and $_GET['cache'] === '0')
or (isset($_POST['cache']) and $_POST['cache'] === '0')
or (!isset($_POST['cache']) and !isset($_GET['cache']) and empty($_GET['sesskey']) and empty($_POST['sesskey']))) {
// Prevent caching at all cost when visiting this page directly,
// we redirect to self once we known no upgrades are necessary.
// Note: $_GET and $_POST are used here intentionally because our param cleaning is not loaded yet.
// Note2: the sesskey is present in all block editing hacks, we can not redirect there, so enable caching.
define('CACHE_DISABLE_ALL', true);
// Force OPcache reset if used, we do not want any stale caches
// when detecting if upgrade necessary or when running upgrade.
if (function_exists('opcache_reset')) {
opcache_reset();
}
$cache = 0;
} else {
$cache = 1;
}
require('../config.php');
// Invalidate the cache of version.php in any circumstances to help core_component
// detecting if the version has changed and component cache should be reset.
if (function_exists('opcache_invalidate')) {
opcache_invalidate($CFG->dirroot . '/version.php', true);
}
// Make sure the component cache gets rebuilt if necessary, any method that
// indirectly calls the protected init() method is good here.
core_component::get_core_subsystems();
require_once($CFG->libdir.'/adminlib.php'); // various admin-only functions
require_once($CFG->libdir.'/upgradelib.php'); // general upgrade/install related functions
require_once($CFG->libdir.'/pluginlib.php'); // available updates notifications
$id = optional_param('id', '', PARAM_TEXT);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
@@ -67,22 +89,26 @@ $showallplugins = optional_param('showallplugins', 0, PARAM_BOOL);
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
$fetchupdates = optional_param('fetchupdates', 0, PARAM_BOOL);
$newaddonreq = optional_param('installaddonrequest', null, PARAM_RAW);
$cache = optional_param('cache', 0, PARAM_BOOL);
// Set up PAGE.
$url = new moodle_url('/admin/index.php');
if (!is_null($newaddonreq)) {
// We need to set the eventual add-on installation request in the $PAGE's URL
// so that it is stored in $SESSION->wantsurl and the admin is redirected
// correctly once they are logged-in.
$url->param('installaddonrequest', $newaddonreq);
}
if ($cache) {
$url->param('cache', $cache);
}
$url->param('cache', $cache);
$PAGE->set_url($url);
unset($url);
// Are we returning from an add-on installation request at moodle.org/plugins?
if ($newaddonreq and !$cache and empty($CFG->disableonclickaddoninstall)) {
$target = new moodle_url('/admin/tool/installaddon/index.php', array(
'installaddonrequest' => $newaddonreq,
'confirm' => 0));
if (!isloggedin() or isguestuser()) {
// Login and go the the add-on tool page.
$SESSION->wantsurl = $target->out();
redirect(get_login_url());
}
redirect($target);
}
$PAGE->set_pagelayout('admin'); // Set a default pagelayout
$documentationlink = '<a href="http://docs.moodle.org/en/Installation">Installation docs</a>';
@@ -136,7 +162,7 @@ if (!core_tables_exist()) {
$strinstallation = get_string('installation', 'install');
// remove current session content completely
session_get_instance()->terminate_current();
\core\session\manager::terminate_current();
if (empty($agreelicense)) {
$strlicense = get_string('license');
@@ -146,6 +172,7 @@ if (!core_tables_exist()) {
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->install_licence_page();
die();
@@ -160,6 +187,7 @@ if (!core_tables_exist()) {
$PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
$PAGE->set_cacheable(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->install_environment_page($maturity, $envstatus, $environment_results, $release);
die();
@@ -167,7 +195,7 @@ if (!core_tables_exist()) {
// check plugin dependencies
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->navbar->add(get_string('pluginscheck', 'admin'));
$PAGE->set_title($strinstallation);
$PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
@@ -214,14 +242,19 @@ if (empty($CFG->version)) {
}
// Detect config cache inconsistency, this happens when you switch branches on dev servers.
if ($cache) {
if ($CFG->version != $DB->get_field('config', 'value', array('name'=>'version'))) {
purge_all_caches();
redirect(new moodle_url('/admin/index.php'), 'Config cache inconsistency detected, resetting caches...');
}
if ($CFG->version != $DB->get_field('config', 'value', array('name'=>'version'))) {
purge_all_caches();
redirect(new moodle_url('/admin/index.php'), 'Config cache inconsistency detected, resetting caches...');
}
if ($version > $CFG->version) { // upgrade
if (!$cache and $version > $CFG->version) { // upgrade
// Warning about upgrading a test site.
$testsite = false;
if (defined('BEHAT_SITE_RUNNING')) {
$testsite = 'behat';
}
// We purge all of MUC's caches here.
// Caches are disabled for upgrade by CACHE_DISABLE_ALL so we must set the first arg to true.
// This ensures a real config object is loaded and the stores will be purged.
@@ -234,11 +267,13 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
if (upgrade_stale_php_files_present()) {
$PAGE->set_title($stradministration);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgrade_stale_php_files_page();
die();
}
@@ -253,8 +288,7 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_heading($strdatabasechecking);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgrade_confirm_page($a->newversion, $maturity);
echo $output->upgrade_confirm_page($a->newversion, $maturity, $testsite);
die();
} else if (empty($confirmrelease)){
@@ -267,7 +301,6 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_heading($strcurrentrelease);
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgrade_environment_page($release, $envstatus, $environment_results);
die();
@@ -279,45 +312,47 @@ if ($version > $CFG->version) { // upgrade
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1));
// check plugin dependencies first
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
if ($fetchupdates) {
// no sesskey support guaranteed here
if (empty($CFG->disableupdatenotifications)) {
available_update_checker::instance()->fetch();
// No sesskey support guaranteed here, because sessions might not work yet.
$updateschecker = \core\update\checker::instance();
if ($updateschecker->enabled()) {
$updateschecker->fetch();
}
redirect($reloadurl);
}
$output = $PAGE->get_renderer('core', 'admin');
$deployer = available_update_deployer::instance();
$deployer = \core\update\deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($reloadurl, $reloadurl);
$deploydata = $deployer->submitted_data();
if (!empty($deploydata)) {
// No sesskey support guaranteed here, because sessions might not work yet.
echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
die();
}
}
echo $output->upgrade_plugin_check_page(plugin_manager::instance(), available_update_checker::instance(),
echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
$version, $showallplugins, $reloadurl,
new moodle_url('/admin/index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1)));
new moodle_url('/admin/index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1, 'cache'=>0)));
die();
} else {
// Launch main upgrade
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
// Launch main upgrade.
upgrade_core($version, true);
}
} else if ($version < $CFG->version) {
@@ -326,17 +361,21 @@ if ($version > $CFG->version) { // upgrade
}
// Updated human-readable release version if necessary
if ($release <> $CFG->release) { // Update the release version
if (!$cache and $release <> $CFG->release) { // Update the release version
set_config('release', $release);
}
if ($branch <> $CFG->branch) { // Update the branch
if (!$cache and $branch <> $CFG->branch) { // Update the branch
set_config('branch', $branch);
}
if (moodle_needs_upgrading()) {
if (!$cache and moodle_needs_upgrading()) {
if (!$PAGE->headerprinted) {
// means core upgrade or installation was not already done
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
if (!$confirmplugins) {
$strplugincheck = get_string('plugincheck');
@@ -348,40 +387,46 @@ if (moodle_needs_upgrading()) {
$PAGE->set_cacheable(false);
if ($fetchupdates) {
// no sesskey support guaranteed here
available_update_checker::instance()->fetch();
require_sesskey();
$updateschecker = \core\update\checker::instance();
if ($updateschecker->enabled()) {
$updateschecker->fetch();
}
redirect($PAGE->url);
}
$output = $PAGE->get_renderer('core', 'admin');
$deployer = available_update_deployer::instance();
$deployer = \core\update\deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($PAGE->url, $PAGE->url);
$deploydata = $deployer->submitted_data();
if (!empty($deploydata)) {
require_sesskey();
echo $output->upgrade_plugin_confirm_deploy_page($deployer, $deploydata);
die();
}
}
// check plugin dependencies first
$failed = array();
if (!plugin_manager::instance()->all_plugins_ok($version, $failed)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
die();
}
unset($failed);
// dependencies check passed, let's rock!
echo $output->upgrade_plugin_check_page(plugin_manager::instance(), available_update_checker::instance(),
// Show plugins info.
echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
$version, $showallplugins,
new moodle_url($PAGE->url),
new moodle_url('/admin/index.php', array('confirmplugincheck'=>1)));
new moodle_url('/admin/index.php', array('confirmplugincheck'=>1, 'cache'=>0)));
die();
}
// Make sure plugin dependencies are always checked.
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$reloadurl = new moodle_url('/admin/index.php', array('cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
}
unset($failed);
}
// install/upgrade all plugins and other parts
upgrade_noncore(true);
}
@@ -441,14 +486,30 @@ if (during_initial_install()) {
upgrade_finished('upgradesettings.php');
}
if (has_capability('moodle/site:config', context_system::instance())) {
if ($fetchupdates) {
require_sesskey();
$updateschecker = \core\update\checker::instance();
if ($updateschecker->enabled()) {
$updateschecker->fetch();
}
redirect(new moodle_url('/admin/index.php', array('cache' => 0)));
}
}
// Now we can be sure everything was upgraded and caches work fine,
// redirect if necessary to make sure caching is enabled.
if (!$cache) {
redirect(new moodle_url($PAGE->url, array('cache' => 1)));
redirect(new moodle_url('/admin/index.php', array('cache' => 1)));
}
// Check for valid admin user - no guest autologin
require_login(0, false);
if (isguestuser()) {
// Login as real user!
$SESSION->wantsurl = (string)new moodle_url('/admin/index.php');
redirect(get_login_url());
}
$context = context_system::instance();
require_capability('moodle/site:config', $context);
@@ -466,17 +527,6 @@ if (!empty($id) and $id == $CFG->siteidentifier) {
set_config('registered', time());
}
// Check if we are returning from an add-on installation request at moodle.org/plugins
if (!is_null($newaddonreq)) {
if (!empty($CFG->disableonclickaddoninstall)) {
// The feature is disabled in config.php, ignore the request.
} else {
redirect(new moodle_url('/admin/tool/installaddon/index.php', array(
'installaddonrequest' => $newaddonreq,
'confirm' => 0)));
}
}
// setup critical warnings before printing admin tree block
$insecuredataroot = is_dataroot_insecure(true);
$SESSION->admin_critical_warning = ($insecuredataroot==INSECURE_DATAROOT_ERROR);
@@ -488,6 +538,15 @@ if (any_new_admin_settings($adminroot)){
redirect('upgradesettings.php');
}
// Return to original page that started the plugin uninstallation if necessary.
if (isset($SESSION->pluginuninstallreturn)) {
$return = $SESSION->pluginuninstallreturn;
unset($SESSION->pluginuninstallreturn);
if ($return) {
redirect($return);
}
}
// Everything should now be set up, and the user is an admin
// Print default admin page with notifications.
@@ -499,13 +558,13 @@ $dbproblems = $DB->diagnose();
$maintenancemode = !empty($CFG->maintenance_enabled);
// Available updates for Moodle core
$updateschecker = available_update_checker::instance();
$updateschecker = \core\update\checker::instance();
$availableupdates = array();
$availableupdates['core'] = $updateschecker->get_update_info('core',
array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds));
// Available updates for contributed plugins
$pluginman = plugin_manager::instance();
$pluginman = core_plugin_manager::instance();
foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
foreach ($plugintypeinstances as $pluginname => $plugininfo) {
if (!empty($plugininfo->availableupdates)) {
@@ -530,12 +589,6 @@ $registered = $DB->count_records('registration_hubs', array('huburl' => HUB_MOOD
admin_externalpage_setup('adminnotifications');
if ($fetchupdates) {
require_sesskey();
$updateschecker->fetch();
redirect(new moodle_url('/admin/index.php'));
}
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
+9 -41
View File
@@ -33,55 +33,21 @@ require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('managelocalplugins');
$delete = optional_param('delete', '', PARAM_PLUGIN);
$confirm = optional_param('confirm', '', PARAM_BOOL);
/// If data submitted, then process and store.
if (!empty($delete) and confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('localplugins'));
if (!$confirm) {
if (get_string_manager()->string_exists('pluginname', 'local_' . $delete)) {
$strpluginname = get_string('pluginname', 'local_' . $delete);
} else {
$strpluginname = $delete;
}
echo $OUTPUT->confirm(get_string('localplugindeleteconfirm', '', $strpluginname),
new moodle_url($PAGE->url, array('delete' => $delete, 'confirm' => 1)),
$PAGE->url);
echo $OUTPUT->footer();
die();
} else {
uninstall_plugin('local', $delete);
$a = new stdclass();
$a->name = $delete;
$pluginlocation = get_plugin_types();
$a->directory = $pluginlocation['local'] . '/' . $delete;
echo $OUTPUT->notification(get_string('plugindeletefiles', '', $a), 'notifysuccess');
echo $OUTPUT->continue_button($PAGE->url);
echo $OUTPUT->footer();
die();
}
}
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('localplugins'));
/// Print the table of all installed local plugins
$table = new flexible_table('localplugins_administration_table');
$table->define_columns(array('name', 'version', 'delete'));
$table->define_headers(array(get_string('plugin'), get_string('version'), get_string('delete')));
$table->define_columns(array('name', 'version', 'uninstall'));
$table->define_headers(array(get_string('plugin'), get_string('version'), get_string('uninstallplugin', 'core_admin')));
$table->define_baseurl($PAGE->url);
$table->set_attribute('id', 'localplugins');
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
$plugins = array();
foreach (get_plugin_list('local') as $plugin => $plugindir) {
foreach (core_component::get_plugin_list('local') as $plugin => $plugindir) {
if (get_string_manager()->string_exists('pluginname', 'local_' . $plugin)) {
$strpluginname = get_string('pluginname', 'local_' . $plugin);
} else {
@@ -89,11 +55,13 @@ foreach (get_plugin_list('local') as $plugin => $plugindir) {
}
$plugins[$plugin] = $strpluginname;
}
collatorlib::asort($plugins);
core_collator::asort($plugins);
foreach ($plugins as $plugin => $name) {
$delete = new moodle_url($PAGE->url, array('delete' => $plugin, 'sesskey' => sesskey()));
$delete = html_writer::link($delete, get_string('delete'));
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('local_'.$plugin, 'manage')) {
$uninstall = html_writer::link($uninstallurl, get_string('uninstallplugin', 'core_admin'));
}
$version = get_config('local_' . $plugin);
if (!empty($version->version)) {
@@ -102,7 +70,7 @@ foreach ($plugins as $plugin => $name) {
$version = '?';
}
$table->add_data(array($name, $version, $delete));
$table->add_data(array($name, $version, $uninstall));
}
$table->print_html();
+4 -28
View File
@@ -34,8 +34,6 @@ require_capability('moodle/site:config', context_system::instance());
// Get the submitted params
$disable = optional_param('disable', 0, PARAM_INT);
$enable = optional_param('enable', 0, PARAM_INT);
$uninstall = optional_param('uninstall', 0, PARAM_INT);
$confirm = optional_param('confirm', false, PARAM_BOOL);
$headingtitle = get_string('managemessageoutputs', 'message');
@@ -44,6 +42,7 @@ if (!empty($disable) && confirm_sesskey()) {
print_error('outputdoesnotexist', 'message');
}
$DB->set_field('message_processors', 'enabled', '0', array('id'=>$processor->id)); // Disable output
core_plugin_manager::reset_caches();
}
if (!empty($enable) && confirm_sesskey()) {
@@ -51,33 +50,10 @@ if (!empty($enable) && confirm_sesskey()) {
print_error('outputdoesnotexist', 'message');
}
$DB->set_field('message_processors', 'enabled', '1', array('id'=>$processor->id)); // Enable output
core_plugin_manager::reset_caches();
}
if (!empty($uninstall) && confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->heading($headingtitle);
if (!$processor = $DB->get_record('message_processors', array('id'=>$uninstall))) {
print_error('outputdoesnotexist', 'message');
}
$processorname = get_string('pluginname', 'message_'.$processor->name);
if (!$confirm) {
echo $OUTPUT->confirm(get_string('processordeleteconfirm', 'message', $processorname), 'message.php?uninstall='.$processor->id.'&confirm=1', 'message.php');
echo $OUTPUT->footer();
exit;
} else {
message_processor_uninstall($processor->name);
$a = new stdClass();
$a->processor = $processorname;
$a->directory = $CFG->dirroot.'/message/output/'.$processor->name;
notice(get_string('processordeletefiles', 'message', $a), 'message.php');
}
}
if ($disable || $enable || $uninstall) {
if ($disable || $enable) {
$url = new moodle_url('message.php');
redirect($url);
}
@@ -95,4 +71,4 @@ $messageoutputs = $renderer->manage_messageoutputs($processors);
echo $OUTPUT->header();
echo $OUTPUT->heading($headingtitle);
echo $messageoutputs;
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+8 -6
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;
@@ -103,7 +103,7 @@ if ($form = data_submitted() and confirm_sesskey()) {
$usernames = explode(',', $form->username);
foreach ($usernames as $username) {
$username = trim(textlib::strtolower($username));
$username = trim(core_text::strtolower($username));
if (!empty($username)) {
if (mnet_update_sso_access_control($username, $form->mnet_host_id, $form->accessctrl)) {
if ($form->accessctrl == 'allow') {
@@ -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?
+1 -1
View File
@@ -95,7 +95,7 @@ class mnet_review_host_form extends moodleform {
$mform->addRule('wwwroot', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$themes = array('' => get_string('forceno'));
foreach (array_keys(get_plugin_list('theme')) as $themename) {
foreach (array_keys(core_component::get_plugin_list('theme')) as $themename) {
$themes[$themename] = get_string('pluginname', 'theme_'.$themename);
}
$mform->addElement('select', 'theme', get_string('forcetheme'), $themes);
+30 -64
View File
@@ -13,14 +13,12 @@
$show = optional_param('show', '', PARAM_PLUGIN);
$hide = optional_param('hide', '', PARAM_PLUGIN);
$delete = optional_param('delete', '', PARAM_PLUGIN);
$confirm = optional_param('confirm', '', PARAM_BOOL);
/// Print headings
$stractivities = get_string("activities");
$strdelete = get_string("delete");
$struninstall = get_string('uninstallplugin', 'core_admin');
$strversion = get_string("version");
$strhide = get_string("hide");
$strshow = get_string("show");
@@ -29,9 +27,6 @@
$stractivitymodule = get_string("activitymodule");
$strshowmodulecourse = get_string('showmodulecourse');
// Purge all caches related to activity modules administration.
cache::make('core', 'plugininfo_mod')->purge();
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
@@ -45,14 +40,14 @@
SET visibleold=visible, visible=0
WHERE module=?";
$DB->execute($sql, array($module->id));
// clear the course modinfo cache for courses
// where we just deleted something
$sql = "UPDATE {course}
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
// Increment course.cacherev for courses where we just made something invisible.
// This will force cache rebuilding on the next request.
increment_revision_number('course', 'cacherev',
"id IN (SELECT DISTINCT course
FROM {course_modules}
WHERE visibleold=1 AND module=?)";
$DB->execute($sql, array($module->id));
WHERE visibleold=1 AND module=?)",
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
@@ -62,49 +57,17 @@
}
$DB->set_field("modules", "visible", "1", array("id"=>$module->id)); // Show main module
$DB->set_field('course_modules', 'visible', '1', array('visibleold'=>1, 'module'=>$module->id)); // Get the previous saved visible state for the course module.
// clear the course modinfo cache for courses
// where we just made something visible
$sql = "UPDATE {course}
SET modinfo = ''
WHERE id IN (SELECT DISTINCT course
// Increment course.cacherev for courses where we just made something visible.
// This will force cache rebuilding on the next request.
increment_revision_number('course', 'cacherev',
"id IN (SELECT DISTINCT course
FROM {course_modules}
WHERE visible=1 AND module=?)";
$DB->execute($sql, array($module->id));
WHERE visible=1 AND module=?)",
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($delete) and confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->heading($stractivities);
if (get_string_manager()->string_exists('modulename', $delete)) {
$strmodulename = get_string('modulename', $delete);
} else {
$strmodulename = $delete;
}
if (!$confirm) {
echo $OUTPUT->confirm(get_string("moduledeleteconfirm", "", $strmodulename), "modules.php?delete=$delete&confirm=1", "modules.php");
echo $OUTPUT->footer();
exit;
} else { // Delete everything!!
if ($delete == "forum") {
print_error("cannotdeleteforummodule", 'forum');
}
uninstall_plugin('mod', $delete);
$a = new stdClass();
$a->module = $strmodulename;
$a->directory = "$CFG->dirroot/mod/$delete";
echo $OUTPUT->notification(get_string("moduledeletefiles", "", $a), 'notifysuccess');
echo $OUTPUT->continue_button("modules.php");
echo $OUTPUT->footer();
exit;
}
}
echo $OUTPUT->header();
echo $OUTPUT->heading($stractivities);
@@ -117,11 +80,11 @@
/// Print the table of all modules
// construct the flexible table ready to display
$table = new flexible_table(MODULE_TABLE);
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
$table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings));
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'uninstall', 'settings'));
$table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strsettings, $struninstall));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/modules.php');
$table->set_attribute('id', 'modules');
$table->set_attribute('class', 'generaltable');
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
foreach ($modules as $module) {
@@ -136,7 +99,10 @@
$missing = false;
}
$delete = "<a href=\"modules.php?delete=$module->name&amp;sesskey=".sesskey()."\">$strdelete</a>";
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('mod_'.$module->name, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
if (file_exists("$CFG->dirroot/mod/$module->name/settings.php") ||
file_exists("$CFG->dirroot/mod/$module->name/settingstree.php")) {
@@ -169,23 +135,23 @@
} else {
$visible = "<a href=\"modules.php?show=$module->name&amp;sesskey=".sesskey()."\" title=\"$strshow\">".
"<img src=\"" . $OUTPUT->pix_url('t/show') . "\" class=\"iconsmall\" alt=\"$strshow\" /></a>";
$class = ' class="dimmed_text"';
$class = 'dimmed_text';
}
if ($module->name == "forum") {
$delete = "";
$uninstall = "";
$visible = "";
$class = "";
}
$version = get_config('mod_'.$module->name, 'version');
$table->add_data(array(
'<span'.$class.'>'.$strmodulename.'</span>',
$strmodulename,
$countlink,
'<span'.$class.'>'.$module->version.'</span>',
$version,
$visible,
$delete,
$settings
));
$settings,
$uninstall,
), $class);
}
$table->print_html();
-174
View File
@@ -1,174 +0,0 @@
<?php
if (!isset($CFG)) {
require('../config.php');
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('oacleanup');
echo $OUTPUT->header();
online_assignment_cleanup(true);
echo $OUTPUT->footer();
}
function online_assignment_cleanup($output=false) {
global $CFG, $DB, $OUTPUT;
if ($output) {
echo $OUTPUT->heading('Online Assignment Cleanup');
echo '<center>';
}
/// We don't want to run this code if we are doing an upgrade from an assignment
/// version earlier than 2005041400
/// because the assignment type field will not exist
$amv = $DB->get_field('modules', 'version', array('name'=>'assignment'));
if ((int)$amv < 2005041400) {
if ($output) {
echo '</center>';
}
return;
}
/// get the module id for assignments from db
$arecord = $DB->get_record('modules', array('name', 'assignment'));
$aid = $arecord->id;
/// get a list of all courses on this site
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$sql = "SELECT c.* $ctxselect FROM {course} c $ctxjoin";
$courses = $DB->get_records_sql($sql);
/// cycle through each course
foreach ($courses as $course) {
context_instance_preload($course);
$context = context_course::instance($course->id);
if (empty($course->fullname)) {
$fullname = get_string('course').': '.$course->id;
} else {
$fullname = format_string($course->fullname, true, array('context' => $context));
}
if ($output) echo $OUTPUT->heading($fullname);
/// retrieve a list of sections beyond what is currently being shown
$courseformatoptions = course_get_format($course)->get_format_options();
if (!isset($courseformatoptions['numsections'])) {
// Course format does not use numsections
if ($output) {
echo 'No extra sections<br />';
}
continue;
}
$sql = "SELECT *
FROM {course_sections}
WHERE course=? AND section>?
ORDER BY section ASC";
$params = array($course->id, $courseformatoptions['numsections']);
if (!($xsections = $DB->get_records_sql($sql, $params))) {
if ($output) echo 'No extra sections<br />';
continue;
}
/// cycle through each of the xtra sections
foreach ($xsections as $xsection) {
if ($output) echo 'Checking Section: '.$xsection->section.'<br />';
/// grab any module instances from the sequence field
if (!empty($xsection->sequence)) {
$instances = explode(',', $xsection->sequence);
/// cycle through the instances
foreach ($instances as $instance) {
/// is this an instance of an online assignment
$sql = "SELECT a.id
FROM {course_modules} cm, {assignment} a
WHERE cm.id = ? AND cm.module = ? AND
cm.instance = a.id AND a.assignmenttype = 'online'";
$params = array($instance, $aid);
/// if record exists then we need to move instance to it's correct section
if ($DB->record_exists_sql($sql, $params)) {
/// check the new section id
/// the journal update erroneously stored it in course_sections->section
$newsection = $xsection->section;
/// double check the new section
if ($newsection > $courseformatoptions['numsections']) {
/// get the record for section 0 for this course
if (!($zerosection = $DB->get_record('course_sections', array('course'=>$course->id, 'section'=>'0')))) {
continue;
}
$newsection = $zerosection->id;
}
/// grab the section record
if (!($section = $DB->get_record('course_sections', array('id'=>$newsection)))) {
if ($output) {
echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '. $fullname .'<br />';
}
continue;
}
/// explode the sequence
if (($sequence = explode(',', $section->sequence)) === false) {
$sequence = array();
}
/// add instance to correct section
array_push($sequence, $instance);
/// implode the sequence
$section->sequence = implode(',', $sequence);
$DB->set_field('course_sections', 'sequence', $section->sequence, array('id'=>$section->id));
/// now we need to remove the instance from the old sequence
/// grab the old section record
if (!($section = $DB->get_record('course_sections', array('id'=>$xsection->id)))) {
if ($output) echo 'Serious error: Cannot retrieve old section: '.$xsection->id.' for course: '.$fullname.'<br />';
continue;
}
/// explode the sequence
if (($sequence = explode(',', $section->sequence)) === false) {
$sequence = array();
}
/// remove the old value from the array
$key = array_search($instance, $sequence);
unset($sequence[$key]);
/// implode the sequence
$section->sequence = implode(',', $sequence);
$DB->set_field('course_sections', 'sequence', $section->sequence, array('id'=>$section->id));
if ($output) echo 'Online Assignment (instance '.$instance.') moved from section '.$section->id.': to section '.$newsection.'<br />';
}
}
}
/// if the summary and sequence are empty then remove this section
if (empty($xsection->summary) and empty($xsection->sequence)) {
$DB->delete_records('course_sections', array('id'=>$xsection->id));
if ($output) echo 'Deleting empty section '.$xsection->section.'<br />';
}
}
}
echo '</center>';
}
+12 -40
View File
@@ -18,7 +18,7 @@
* Provides an overview of installed plagiarism plugins
*
* Displays the list of found plagiarism plugins, their version (if found) and
* a link to delete the plagiarism plugin.
* a link to uninstall the plagiarism plugin.
*
* @see http://docs.moodle.org/dev/Plagiarism_API
* @package admin
@@ -30,47 +30,17 @@ require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('manageplagiarismplugins');
$delete = optional_param('delete', '', PARAM_PLUGIN);
$confirm = optional_param('confirm', false, PARAM_BOOL);
if (!empty($delete) and confirm_sesskey()) { // If data submitted, then process and store.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('manageplagiarism', 'plagiarism'));
if (!$confirm) {
if (get_string_manager()->string_exists('pluginname', 'plagiarism_' . $delete)) {
$strpluginname = get_string('pluginname', 'plagiarism_' . $delete);
} else {
$strpluginname = $delete;
}
echo $OUTPUT->confirm(get_string('plagiarismplugindeleteconfirm', 'plagiarism', $strpluginname),
new moodle_url($PAGE->url, array('delete' => $delete, 'confirm' => 1)),
$PAGE->url);
echo $OUTPUT->footer();
die();
} else {
uninstall_plugin('plagiarism', $delete);
$a = new stdclass();
$a->name = $delete;
$pluginlocation = get_plugin_types();
$a->directory = $pluginlocation['plagiarism'] . '/' . $delete;
echo $OUTPUT->notification(get_string('plugindeletefiles', '', $a), 'notifysuccess');
echo $OUTPUT->continue_button($PAGE->url);
echo $OUTPUT->footer();
die();
}
}
echo $OUTPUT->header();
// Print the table of all installed plagiarism plugins.
$txt = get_strings(array('settings', 'name', 'version', 'delete'));
$txt = get_strings(array('settings', 'name', 'version'));
$txt->uninstall = get_string('uninstallplugin', 'core_admin');
$plagiarismplugins = get_plugin_list('plagiarism');
$plagiarismplugins = core_component::get_plugin_list('plagiarism');
if (empty($plagiarismplugins)) {
echo $OUTPUT->notification(get_string('nopluginsinstalled', 'plagiarism'));
echo $OUTPUT->footer();
@@ -81,7 +51,7 @@ echo $OUTPUT->heading(get_string('availableplugins', 'plagiarism'), 3, 'main');
echo $OUTPUT->box_start('generalbox authsui');
$table = new html_table();
$table->head = array($txt->name, $txt->version, $txt->delete, $txt->settings);
$table->head = array($txt->name, $txt->version, $txt->uninstall, $txt->settings);
$table->colclasses = array('mdl-left', 'mdl-align', 'mdl-align', 'mdl-align');
$table->data = array();
$table->attributes['class'] = 'manageplagiarismtable generaltable';
@@ -101,10 +71,12 @@ foreach ($plagiarismplugins as $plugin => $dir) {
} else {
$version = '?';
}
// Delete link.
$delete = new moodle_url($PAGE->url, array('delete' => $plugin, 'sesskey' => sesskey()));
$delete = html_writer::link($delete, get_string('delete'));
$table->data[] = array($displayname, $version, $delete, $settings);
// uninstall link.
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('plagiarism_'.$plugin, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $txt->uninstall);
}
$table->data[] = array($displayname, $version, $uninstall, $settings);
}
}
echo html_writer::table($table);
+62 -19
View File
@@ -35,31 +35,46 @@
require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/pluginlib.php');
require_once($CFG->libdir . '/filelib.php');
admin_externalpage_setup('pluginsoverview');
require_capability('moodle/site:config', context_system::instance());
$fetchremote = optional_param('fetchremote', false, PARAM_BOOL);
$updatesonly = optional_param('updatesonly', false, PARAM_BOOL);
$contribonly = optional_param('contribonly', false, PARAM_BOOL);
$uninstall = optional_param('uninstall', '', PARAM_COMPONENT);
$delete = optional_param('delete', '', PARAM_COMPONENT);
$confirmed = optional_param('confirm', false, PARAM_BOOL);
$uninstall = optional_param('uninstall', '', PARAM_COMPONENT);
$delete = optional_param('delete', '', PARAM_COMPONENT);
$confirmed = optional_param('confirm', false, PARAM_BOOL);
$return = optional_param('return', 'overview', PARAM_ALPHA);
$output = $PAGE->get_renderer('core', 'admin');
// NOTE: do not use admin_externalpage_setup() here because it loads
// full admin tree which is not possible during uninstallation.
$pluginman = plugin_manager::instance();
require_login();
$syscontext = context_system::instance();
require_capability('moodle/site:config', $syscontext);
$pluginman = core_plugin_manager::instance();
if ($uninstall) {
require_sesskey();
if (!$confirmed) {
admin_externalpage_setup('pluginsoverview');
} else {
$PAGE->set_url('/admin/plugins.php');
$PAGE->set_context($syscontext);
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
}
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$pluginfo = $pluginman->get_plugin_info($uninstall);
// Make sure we know the plugin.
if (is_null($pluginfo)) {
throw new moodle_exception('err_uninstalling_unknown_plugin', 'core_plugin', '', array('plugin' => $uninstall),
'plugin_manager::get_plugin_info() returned null for the plugin to be uninstalled');
'core_plugin_manager::get_plugin_info() returned null for the plugin to be uninstalled');
}
$pluginname = $pluginman->plugin_name($pluginfo->component);
@@ -69,15 +84,17 @@ if ($uninstall) {
if (!$pluginman->can_uninstall_plugin($pluginfo->component)) {
throw new moodle_exception('err_cannot_uninstall_plugin', 'core_plugin', '',
array('plugin' => $pluginfo->component),
'plugin_manager::can_uninstall_plugin() returned false');
'core_plugin_manager::can_uninstall_plugin() returned false');
}
if (!$confirmed) {
$continueurl = new moodle_url($PAGE->url, array('uninstall' => $pluginfo->component, 'sesskey' => sesskey(), 'confirm' => 1));
echo $output->plugin_uninstall_confirm_page($pluginman, $pluginfo, $continueurl);
$continueurl = new moodle_url($PAGE->url, array('uninstall' => $pluginfo->component, 'sesskey' => sesskey(), 'confirm' => 1, 'return'=>$return));
$cancelurl = $pluginfo->get_return_url_after_uninstall($return);
echo $output->plugin_uninstall_confirm_page($pluginman, $pluginfo, $continueurl, $cancelurl);
exit();
} else {
$SESSION->pluginuninstallreturn = $pluginfo->get_return_url_after_uninstall($return);
$progress = new progress_trace_buffer(new text_progress_trace(), false);
$pluginman->uninstall_plugin($pluginfo->component, $progress);
$progress->finished();
@@ -85,10 +102,18 @@ if ($uninstall) {
if ($pluginman->is_plugin_folder_removable($pluginfo->component)) {
$continueurl = new moodle_url($PAGE->url, array('delete' => $pluginfo->component, 'sesskey' => sesskey(), 'confirm' => 1));
echo $output->plugin_uninstall_results_removable_page($pluginman, $pluginfo, $progress, $continueurl);
// Reset op code caches.
if (function_exists('opcache_reset')) {
opcache_reset();
}
exit();
} else {
echo $output->plugin_uninstall_results_page($pluginman, $pluginfo, $progress);
// Reset op code caches.
if (function_exists('opcache_reset')) {
opcache_reset();
}
exit();
}
}
@@ -96,12 +121,21 @@ if ($uninstall) {
if ($delete and $confirmed) {
require_sesskey();
$PAGE->set_url('/admin/plugins.php');
$PAGE->set_context($syscontext);
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$pluginfo = $pluginman->get_plugin_info($delete);
// Make sure we know the plugin.
if (is_null($pluginfo)) {
throw new moodle_exception('err_removing_unknown_plugin', 'core_plugin', '', array('plugin' => $delete),
'plugin_manager::get_plugin_info() returned null for the plugin to be deleted');
'core_plugin_manager::get_plugin_info() returned null for the plugin to be deleted');
}
$pluginname = $pluginman->plugin_name($pluginfo->component);
@@ -112,7 +146,7 @@ if ($delete and $confirmed) {
if (!is_null($pluginfo->versiondb)) {
throw new moodle_exception('err_removing_installed_plugin', 'core_plugin', '',
array('plugin' => $pluginfo->component, 'versiondb' => $pluginfo->versiondb),
'plugin_manager::get_plugin_info() returned not-null versiondb for the plugin to be deleted');
'core_plugin_manager::get_plugin_info() returned not-null versiondb for the plugin to be deleted');
}
// Make sure the folder is removable.
@@ -131,11 +165,20 @@ if ($delete and $confirmed) {
// So long, and thanks for all the bugs.
fulldelete($pluginfo->rootdir);
cache::make('core', 'pluginlist')->purge();
redirect($PAGE->url);
// Reset op code caches.
if (function_exists('opcache_reset')) {
opcache_reset();
}
// We need to execute upgrade to make sure everything including caches is up to date.
redirect(new moodle_url('/admin/index.php'));
}
$checker = available_update_checker::instance();
admin_externalpage_setup('pluginsoverview');
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$checker = \core\update\checker::instance();
// Filtering options.
$options = array(
@@ -149,7 +192,7 @@ if ($fetchremote) {
redirect(new moodle_url($PAGE->url, $options));
}
$deployer = available_update_deployer::instance();
$deployer = \core\update\deployer::instance();
if ($deployer->enabled()) {
$myurl = new moodle_url($PAGE->url, array('updatesonly' => $updatesonly, 'contribonly' => $contribonly));
$deployer->initialize($myurl, new moodle_url('/admin'));
+3 -4
View File
@@ -43,9 +43,6 @@ $configstr = get_string('manageportfolios', 'portfolio');
$return = true; // direct back to the main page
// Purge all caches related to portfolio administration.
cache::make('core', 'plugininfo_portfolio')->purge();
/**
* Helper function that generates a moodle_url object
* relevant to the portfolio
@@ -91,6 +88,7 @@ if (($action == 'edit') || ($action == 'new')) {
} else {
portfolio_static_function($plugin, 'create_instance', $plugin, $fromform->name, $fromform);
}
core_plugin_manager::reset_caches();
$savedstr = get_string('instancesaved', 'portfolio');
redirect($baseurl, $savedstr, 1);
exit;
@@ -119,6 +117,7 @@ if (($action == 'edit') || ($action == 'new')) {
$instance->set('visible', $visible);
$instance->save();
core_plugin_manager::reset_caches();
$return = true;
} else if ($action == 'delete') {
$instance = portfolio_instance($portfolio);
@@ -163,7 +162,7 @@ if (($action == 'edit') || ($action == 'new')) {
$output = $OUTPUT->box_start('generalbox');
$plugins = get_plugin_list('portfolio');
$plugins = core_component::get_plugin_list('portfolio');
$plugins = array_keys($plugins);
$instances = portfolio_instances(false, false);
$usedplugins = array();
+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();
+11 -72
View File
@@ -28,7 +28,6 @@
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/pluginlib.php');
require_once($CFG->libdir . '/tablelib.php');
// Check permissions.
@@ -39,8 +38,8 @@ require_capability('moodle/question:config', $systemcontext);
admin_externalpage_setup('manageqbehaviours');
$thispageurl = new moodle_url('/admin/qbehaviours.php');
$behaviours = get_plugin_list('qbehaviour');
$pluginmanager = plugin_manager::instance();
$behaviours = core_component::get_plugin_list('qbehaviour');
$pluginmanager = core_plugin_manager::instance();
// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql_menu("
@@ -92,6 +91,7 @@ if (($disable = optional_param('disable', '', PARAM_PLUGIN)) && confirm_sesskey(
$disabledbehaviours[] = $disable;
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
}
core_plugin_manager::reset_caches();
redirect($thispageurl);
}
@@ -109,6 +109,7 @@ if (($enable = optional_param('enable', '', PARAM_PLUGIN)) && confirm_sesskey())
unset($disabledbehaviours[$key]);
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
}
core_plugin_manager::reset_caches();
redirect($thispageurl);
}
@@ -136,70 +137,6 @@ if (($down = optional_param('down', '', PARAM_PLUGIN)) && confirm_sesskey()) {
redirect($thispageurl);
}
// Delete.
if (($delete = optional_param('delete', '', PARAM_PLUGIN)) && confirm_sesskey()) {
// Check it is OK to delete this question type.
if ($delete == 'missing') {
print_error('cannotdeletemissingbehaviour', 'question', $thispageurl);
}
if (!isset($behaviours[$delete])) {
print_error('unknownbehaviour', 'question', $thispageurl, $delete);
}
$behaviourname = $sortedbehaviours[$delete];
if ($counts[$delete] > 0) {
print_error('cannotdeletebehaviourinuse', 'question', $thispageurl, $behaviourname);
}
if ($needed[$delete] > 0) {
print_error('cannotdeleteneededbehaviour', 'question', $thispageurl, $behaviourname);
}
// If not yet confirmed, display a confirmation message.
if (!optional_param('confirm', '', PARAM_BOOL)) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deletebehaviourareyousure', 'question', $behaviourname));
echo $OUTPUT->confirm(
get_string('deletebehaviourareyousuremessage', 'question', $behaviourname),
new moodle_url($thispageurl, array('delete' => $delete, 'confirm' => 1)),
$thispageurl);
echo $OUTPUT->footer();
exit;
}
// Do the deletion.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deletingbehaviour', 'question', $behaviourname));
// Delete any configuration records.
if (!unset_all_config_for_plugin('qbehaviour_' . $delete)) {
echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qbehaviour_' . $delete));
}
if (($key = array_search($delete, $disabledbehaviours)) !== false) {
unset($disabledbehaviours[$key]);
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
}
$behaviourorder = array_keys($sortedbehaviours);
if (($key = array_search($delete, $behaviourorder)) !== false) {
unset($behaviourorder[$key]);
set_config('behavioursortorder', implode(',', $behaviourorder), 'question');
}
// Then the tables themselves
drop_plugin_tables($delete, get_plugin_directory('qbehaviour', $delete) . '/db/install.xml', false);
// Remove event handlers and dequeue pending events
events_uninstall('qbehaviour_' . $delete);
$a = new stdClass();
$a->behaviour = $behaviourname;
$a->directory = get_plugin_directory('qbehaviour', $delete);
echo $OUTPUT->box(get_string('qbehaviourdeletefiles', 'question', $a), 'generalbox', 'notice');
echo $OUTPUT->continue_button($thispageurl);
echo $OUTPUT->footer();
exit;
}
// End of process actions ==================================================
// Print the page heading.
@@ -210,12 +147,12 @@ echo $OUTPUT->heading(get_string('manageqbehaviours', 'admin'));
$table = new flexible_table('qbehaviouradmintable');
$table->define_baseurl($thispageurl);
$table->define_columns(array('behaviour', 'numqas', 'version', 'requires',
'available', 'delete'));
'available', 'uninstall'));
$table->define_headers(array(get_string('behaviour', 'question'), get_string('numqas', 'question'),
get_string('version'), get_string('requires', 'admin'),
get_string('availableq', 'question'), get_string('delete')));
get_string('availableq', 'question'), get_string('uninstallplugin', 'core_admin')));
$table->set_attribute('id', 'qbehaviours');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->set_attribute('class', 'generaltable admintable');
$table->setup();
// Add a row for each question type.
@@ -270,9 +207,11 @@ foreach ($sortedbehaviours as $behaviour => $behaviourname) {
if ($needed[$behaviour]) {
$row[] = '';
} else {
$row[] = html_writer::link(new moodle_url($thispageurl,
array('delete' => $behaviour, 'sesskey' => sesskey())), get_string('delete'),
$uninstallurl = core_plugin_manager::instance()->get_uninstall_url('qbehaviour_'.$behaviour, 'manage');
if ($uninstallurl) {
$row[] = html_writer::link($uninstallurl, get_string('uninstallplugin', 'core_admin'),
array('title' => get_string('uninstallbehaviour', 'question')));
}
}
$table->add_data($row, $rowclass);
+14 -71
View File
@@ -28,7 +28,6 @@
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/pluginlib.php');
require_once($CFG->libdir . '/tablelib.php');
// Check permissions.
@@ -41,7 +40,7 @@ admin_externalpage_setup('manageqtypes');
$thispageurl = new moodle_url('/admin/qtypes.php');
$qtypes = question_bank::get_all_qtypes();
$pluginmanager = plugin_manager::instance();
$pluginmanager = core_plugin_manager::instance();
// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql("
@@ -122,64 +121,6 @@ if (($down = optional_param('down', '', PARAM_PLUGIN)) && confirm_sesskey()) {
redirect($thispageurl);
}
// Delete.
if (($delete = optional_param('delete', '', PARAM_PLUGIN)) && confirm_sesskey()) {
// Check it is OK to delete this question type.
if ($delete == 'missingtype') {
print_error('cannotdeletemissingqtype', 'question', $thispageurl);
}
if (!isset($qtypes[$delete])) {
print_error('unknownquestiontype', 'question', $thispageurl, $delete);
}
$qtypename = $qtypes[$delete]->local_name();
if ($counts[$delete]->numquestions + $counts[$delete]->numhidden > 0) {
print_error('cannotdeleteqtypeinuse', 'question', $thispageurl, $qtypename);
}
if ($needed[$delete] > 0) {
print_error('cannotdeleteqtypeneeded', 'question', $thispageurl, $qtypename);
}
// If not yet confirmed, display a confirmation message.
if (!optional_param('confirm', '', PARAM_BOOL)) {
$qtypename = $qtypes[$delete]->local_name();
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'question', $qtypename));
echo $OUTPUT->confirm(get_string('deleteqtypeareyousuremessage', 'question', $qtypename),
new moodle_url($thispageurl, array('delete' => $delete, 'confirm' => 1)),
$thispageurl);
echo $OUTPUT->footer();
exit;
}
// Do the deletion.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('deletingqtype', 'question', $qtypename));
// Delete any configuration records.
if (!unset_all_config_for_plugin('qtype_' . $delete)) {
echo $OUTPUT->notification(get_string('errordeletingconfig', 'admin', 'qtype_' . $delete));
}
unset_config($delete . '_disabled', 'question');
unset_config($delete . '_sortorder', 'question');
// Then the tables themselves
drop_plugin_tables($delete, $qtypes[$delete]->plugin_dir() . '/db/install.xml', false);
// Remove event handlers and dequeue pending events
events_uninstall('qtype_' . $delete);
$a = new stdClass();
$a->qtype = $qtypename;
$a->directory = $qtypes[$delete]->plugin_dir();
echo $OUTPUT->box(get_string('qtypedeletefiles', 'question', $a), 'generalbox', 'notice');
echo $OUTPUT->continue_button($thispageurl);
echo $OUTPUT->footer();
exit;
}
// End of process actions ==================================================
// Print the page heading.
@@ -190,10 +131,10 @@ echo $OUTPUT->heading(get_string('manageqtypes', 'admin'));
$table = new flexible_table('qtypeadmintable');
$table->define_baseurl($thispageurl);
$table->define_columns(array('questiontype', 'numquestions', 'version', 'requires',
'availableto', 'delete', 'settings'));
'availableto', 'uninstall', 'settings'));
$table->define_headers(array(get_string('questiontype', 'question'), get_string('numquestions', 'question'),
get_string('version'), get_string('requires', 'admin'), get_string('availableq', 'question'),
get_string('delete'), get_string('settings')));
get_string('settings'), get_string('uninstallplugin', 'core_admin')));
$table->set_attribute('id', 'qtypes');
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
@@ -265,15 +206,6 @@ foreach ($sortedqtypes as $qtypename => $localname) {
$icons .= question_type_icon_html('down', $qtypename, 't/down', get_string('down'), '');
$row[] = $icons;
// Delete link, if available.
if ($needed[$qtypename]) {
$row[] = '';
} else {
$row[] = html_writer::link(new moodle_url($thispageurl,
array('delete' => $qtypename, 'sesskey' => sesskey())), get_string('delete'),
array('title' => get_string('uninstallqtype', 'question')));
}
// Settings link, if available.
$settings = admin_get_root()->locate('qtypesetting' . $qtypename);
if ($settings instanceof admin_externalpage) {
@@ -285,6 +217,17 @@ foreach ($sortedqtypes as $qtypename => $localname) {
$row[] = '';
}
// Uninstall link, if available.
if ($needed[$qtypename]) {
$row[] = '';
} else {
$uninstallurl = core_plugin_manager::instance()->get_uninstall_url('qtype_'.$qtypename, 'manage');
if ($uninstallurl) {
$row[] = html_writer::link($uninstallurl, get_string('uninstallplugin', 'core_admin'),
array('title' => get_string('uninstallqtype', 'question')));
}
}
$table->add_data($row, $rowclass);
}
+3 -3
View File
@@ -137,8 +137,8 @@ class hub_selector_form extends moodleform {
$options = array();
foreach ($hubs as $hub) {
//to not display a name longer than 100 character (too big)
if (textlib::strlen($hub['name']) > 100) {
$hubname = textlib::substr($hub['name'], 0, 100);
if (core_text::strlen($hub['name']) > 100) {
$hubname = core_text::substr($hub['name'], 0, 100);
$hubname = $hubname . "...";
} else {
$hubname = $hub['name'];
@@ -287,7 +287,7 @@ class site_registration_form extends moodleform {
$mform->addHelpButton('description', 'sitedesc', 'hub');
$languages = get_string_manager()->get_list_of_languages();
collatorlib::asort($languages);
core_collator::asort($languages);
$mform->addElement('select', 'language', get_string('sitelang', 'hub'),
$languages);
$mform->setType('language', PARAM_ALPHANUMEXT);
+96 -61
View File
@@ -25,7 +25,6 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/pluginlib.php');
/**
* Standard HTML output renderer for core_admin subsystem
@@ -121,7 +120,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->header();
$output .= $this->heading(get_string('pluginscheck', 'admin'));
$output .= $this->warning(get_string('pluginscheckfailed', 'admin', array('pluginslist' => implode(', ', array_unique($failed)))));
$output .= $this->plugins_check_table(plugin_manager::instance(), $version, array('xdep' => true));
$output .= $this->plugins_check_table(core_plugin_manager::instance(), $version, array('xdep' => true));
$output .= $this->warning(get_string('pluginschecktodo', 'admin'));
$output .= $this->continue_button($reloadurl);
@@ -135,17 +134,20 @@ class core_admin_renderer extends plugin_renderer_base {
* during upgrade.
* @param string $strnewversion
* @param int $maturity
* @param string $testsite
* @return string HTML to output.
*/
public function upgrade_confirm_page($strnewversion, $maturity) {
public function upgrade_confirm_page($strnewversion, $maturity, $testsite) {
$output = '';
$continueurl = new moodle_url('index.php', array('confirmupgrade' => 1));
$cancelurl = new moodle_url('index.php');
$continueurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'cache' => 0));
$continue = new single_button($continueurl, get_string('continue'), 'get');
$cancelurl = new moodle_url('/admin/index.php');
$output .= $this->header();
$output .= $this->maturity_warning($maturity);
$output .= $this->confirm(get_string('upgradesure', 'admin', $strnewversion), $continueurl, $cancelurl);
$output .= $this->test_site_warning($testsite);
$output .= $this->confirm(get_string('upgradesure', 'admin', $strnewversion), $continue, $cancelurl);
$output .= $this->footer();
return $output;
@@ -168,7 +170,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->environment_check_table($envstatus, $environment_results);
if (!$envstatus) {
$output .= $this->upgrade_reload(new moodle_url('/admin/index.php'), array('confirmupgrade' => 1));
$output .= $this->upgrade_reload(new moodle_url('/admin/index.php'), array('confirmupgrade' => 1, 'cache' => 0));
} else {
$output .= $this->notification(get_string('environmentok', 'admin'), 'notifysuccess');
@@ -177,7 +179,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->box(get_string('langpackwillbeupdated', 'admin'), 'generalbox', 'notice');
}
$output .= $this->continue_button(new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1)));
$output .= $this->continue_button(new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0)));
}
$output .= $this->footer();
@@ -187,15 +189,15 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Display the upgrade page that lists all the plugins that require attention.
* @param plugin_manager $pluginman provides information about the plugins.
* @param available_update_checker $checker provides information about available updates.
* @param core_plugin_manager $pluginman provides information about the plugins.
* @param \core\update\checker $checker provides information about available updates.
* @param int $version the version of the Moodle code from version.php.
* @param bool $showallplugins
* @param moodle_url $reloadurl
* @param moodle_url $continueurl
* @return string HTML to output.
*/
public function upgrade_plugin_check_page(plugin_manager $pluginman, available_update_checker $checker,
public function upgrade_plugin_check_page(core_plugin_manager $pluginman, \core\update\checker $checker,
$version, $showallplugins, $reloadurl, $continueurl) {
global $CFG;
@@ -237,11 +239,11 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Prints a page with a summary of plugin deployment to be confirmed.
*
* @param available_update_deployer $deployer
* @param array $data deployer's data package as returned by {@link available_update_deployer::submitted_data()}
* @param \core\update\deployer $deployer
* @param array $data deployer's data package as returned by {@link \core\update\deployer::submitted_data()}
* @return string
*/
public function upgrade_plugin_confirm_deploy_page(available_update_deployer $deployer, array $data) {
public function upgrade_plugin_confirm_deploy_page(\core\update\deployer $deployer, array $data) {
if (!$deployer->initialized()) {
throw new coding_exception('Unable to render a page for non-initialized deployer.');
@@ -299,7 +301,7 @@ class core_admin_renderer extends plugin_renderer_base {
* @param bool $dbproblems warn db has problems
* @param bool $maintenancemode warn in maintenance mode
* @param bool $buggyiconvnomb warn iconv problems
* @param array|null $availableupdates array of available_update_info objects or null
* @param array|null $availableupdates array of \core\update\info objects or null
* @param int|null $availableupdatesfetch timestamp of the most recent updates fetch or null (unknown)
*
* @return string HTML to output.
@@ -338,12 +340,12 @@ class core_admin_renderer extends plugin_renderer_base {
* bool contribonly - show only contributed extensions
* bool updatesonly - show only plugins with an available update
*
* @param plugin_manager $pluginman
* @param available_update_checker $checker
* @param core_plugin_manager $pluginman
* @param \core\update\checker $checker
* @param array $options filtering options
* @return string HTML to output.
*/
public function plugin_management_page(plugin_manager $pluginman, available_update_checker $checker, array $options = array()) {
public function plugin_management_page(core_plugin_manager $pluginman, \core\update\checker $checker, array $options = array()) {
global $CFG;
$output = '';
@@ -374,20 +376,25 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Display a page to confirm the plugin uninstallation.
*
* @param plugin_manager $pluginman
* @param plugin_info $pluginfo
* @param core_plugin_manager $pluginman
* @param \core\plugininfo\base $pluginfo
* @param moodle_url $continueurl URL to continue after confirmation
* @param moodle_url $cancelurl URL to to go if cancelled
* @return string
*/
public function plugin_uninstall_confirm_page(plugin_manager $pluginman, plugininfo_base $pluginfo, moodle_url $continueurl) {
public function plugin_uninstall_confirm_page(core_plugin_manager $pluginman, \core\plugininfo\base $pluginfo, moodle_url $continueurl, moodle_url $cancelurl) {
$output = '';
$pluginname = $pluginman->plugin_name($pluginfo->component);
$confirm = '<p>' . get_string('uninstallconfirm', 'core_plugin', array('name' => $pluginname)) . '</p>';
if ($extraconfirm = $pluginfo->get_uninstall_extra_warning()) {
$confirm .= $extraconfirm;
}
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
$output .= $this->output->confirm(get_string('uninstallconfirm', 'core_plugin', array('name' => $pluginname)),
$continueurl, $this->page->url);
$output .= $this->output->confirm($confirm, $continueurl, $cancelurl);
$output .= $this->output->footer();
return $output;
@@ -396,18 +403,22 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Display a page with results of plugin uninstallation and offer removal of plugin files.
*
* @param plugin_manager $pluginman
* @param plugin_info $pluginfo
* @param core_plugin_manager $pluginman
* @param \core\plugininfo\base $pluginfo
* @param progress_trace_buffer $progress
* @param moodle_url $continueurl URL to continue to remove the plugin folder
* @return string
*/
public function plugin_uninstall_results_removable_page(plugin_manager $pluginman, plugininfo_base $pluginfo,
public function plugin_uninstall_results_removable_page(core_plugin_manager $pluginman, \core\plugininfo\base $pluginfo,
progress_trace_buffer $progress, moodle_url $continueurl) {
$output = '';
$pluginname = $pluginman->plugin_name($pluginfo->component);
// Do not show navigation here, they must click one of the buttons.
$this->page->set_pagelayout('maintenance');
$this->page->set_cacheable(false);
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
@@ -421,7 +432,8 @@ class core_admin_renderer extends plugin_renderer_base {
'uninstalldeleteconfirmexternal');
}
$output .= $this->output->confirm($confirm, $continueurl, $this->page->url);
// After any uninstall we must execute full upgrade to finish the cleanup!
$output .= $this->output->confirm($confirm, $continueurl, new moodle_url('/admin/index.php'));
$output .= $this->output->footer();
return $output;
@@ -430,15 +442,15 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Display a page with results of plugin uninstallation and inform about the need to remove plugin files manually.
*
* @param plugin_manager $pluginman
* @param plugin_info $pluginfo
* @param core_plugin_manager $pluginman
* @param \core\plugininfo\base $pluginfo
* @param progress_trace_buffer $progress
* @return string
*/
public function plugin_uninstall_results_page(plugin_manager $pluginman, plugininfo_base $pluginfo, progress_trace_buffer $progress) {
public function plugin_uninstall_results_page(core_plugin_manager $pluginman, \core\plugininfo\base $pluginfo, progress_trace_buffer $progress) {
$output = '';
$pluginname = $pluginman->plugin_name($pluginfo->component);
$pluginname = $pluginfo->component;
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
@@ -447,7 +459,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->output->box(get_string('uninstalldelete', 'core_plugin',
array('name' => $pluginname, 'rootdir' => $pluginfo->rootdir)), 'generalbox uninstalldelete');
$output .= $this->output->continue_button($this->page->url);
$output .= $this->output->continue_button(new moodle_url('/admin/index.php'));
$output .= $this->output->footer();
return $output;
@@ -604,6 +616,24 @@ class core_admin_renderer extends plugin_renderer_base {
'generalbox maturitywarning');
}
/*
* If necessary, displays a warning about upgrading a test site.
*
* @param string $testsite
* @return string HTML
*/
protected function test_site_warning($testsite) {
if (!$testsite) {
return '';
}
return $this->box(
$this->container(get_string('testsiteupgradewarning', 'admin', $testsite)),
'generalbox testsitewarning'
);
}
/**
* Output the copyright notice.
* @return string HTML to output.
@@ -646,7 +676,7 @@ class core_admin_renderer extends plugin_renderer_base {
* The structure of the $updates param has changed since 2.4. It contains not only updates
* for the core itself, but also for all other installed plugins.
*
* @param array|null $updates array of (string)component => array of available_update_info objects or null
* @param array|null $updates array of (string)component => array of \core\update\info objects or null
* @param int|null $fetch timestamp of the most recent updates fetch or null (unknown)
* @return string
*/
@@ -681,7 +711,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
$updateinfo .= $this->container_start('checkforupdates');
$fetchurl = new moodle_url('/admin/index.php', array('fetchupdates' => 1, 'sesskey' => sesskey(), 'cache' => 1));
$fetchurl = new moodle_url('/admin/index.php', array('fetchupdates' => 1, 'sesskey' => sesskey(), 'cache' => 0));
$updateinfo .= $this->single_button($fetchurl, get_string('checkforupdates', 'core_plugin'));
if ($fetch) {
$updateinfo .= $this->container(get_string('checkforupdateslast', 'core_plugin',
@@ -704,7 +734,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (!$registered) {
$registerbutton = $this->single_button(new moodle_url('registration/register.php',
$registerbutton = $this->single_button(new moodle_url('/admin/registration/register.php',
array('huburl' => HUB_MOODLEORGHUBURL, 'hubname' => 'Moodle.org')),
get_string('register', 'admin'));
@@ -718,9 +748,9 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Helper method to render the information about the available Moodle update
*
* @param available_update_info $updateinfo information about the available Moodle core update
* @param \core\update\info $updateinfo information about the available Moodle core update
*/
protected function moodle_available_update_info(available_update_info $updateinfo) {
protected function moodle_available_update_info(\core\update\info $updateinfo) {
$boxclasses = 'moodleupdateinfo';
$info = array();
@@ -787,12 +817,12 @@ class core_admin_renderer extends plugin_renderer_base {
* (bool)full = false: whether to display up-to-date plugins, too
* (bool)xdep = false: display the plugins with unsatisified dependecies only
*
* @param plugin_manager $pluginman provides information about the plugins.
* @param core_plugin_manager $pluginman provides information about the plugins.
* @param int $version the version of the Moodle code from version.php.
* @param array $options rendering options
* @return string HTML code
*/
public function plugins_check_table(plugin_manager $pluginman, $version, array $options = array()) {
public function plugins_check_table(core_plugin_manager $pluginman, $version, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins();
@@ -885,7 +915,7 @@ class core_admin_renderer extends plugin_renderer_base {
$requires = new html_table_cell($this->required_column($plugin, $pluginman, $version));
$statusisboring = in_array($statuscode, array(
plugin_manager::PLUGIN_STATUS_NODB, plugin_manager::PLUGIN_STATUS_UPTODATE));
core_plugin_manager::PLUGIN_STATUS_NODB, core_plugin_manager::PLUGIN_STATUS_UPTODATE));
$coredependency = $plugin->is_core_dependency_satisfied($version);
$otherpluginsdependencies = $pluginman->are_dependencies_satisfied($plugin->get_other_required_plugins());
@@ -932,7 +962,7 @@ class core_admin_renderer extends plugin_renderer_base {
$out .= $this->output->heading(get_string('nonehighlighted', 'core_plugin'));
if (empty($options['full'])) {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1)),
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1, 'cache' => 0)),
get_string('nonehighlightedinfo', 'core_plugin'));
}
$out .= $this->output->container_end();
@@ -942,11 +972,11 @@ class core_admin_renderer extends plugin_renderer_base {
$out .= $this->output->heading(get_string('somehighlighted', 'core_plugin', $sumofhighlighted));
if (empty($options['full'])) {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1)),
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 1, 'cache' => 0)),
get_string('somehighlightedinfo', 'core_plugin'));
} else {
$out .= html_writer::link(new moodle_url('/admin/index.php',
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 0)),
array('confirmupgrade' => 1, 'confirmrelease' => 1, 'showallplugins' => 0, 'cache' => 0)),
get_string('somehighlightedonly', 'core_plugin'));
}
$out .= $this->output->container_end();
@@ -961,12 +991,12 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Formats the information that needs to go in the 'Requires' column.
* @param plugininfo_base $plugin the plugin we are rendering the row for.
* @param plugin_manager $pluginman provides data on all the plugins.
* @param \core\plugininfo\base $plugin the plugin we are rendering the row for.
* @param core_plugin_manager $pluginman provides data on all the plugins.
* @param string $version
* @return string HTML code
*/
protected function required_column(plugininfo_base $plugin, plugin_manager $pluginman, $version) {
protected function required_column(\core\plugininfo\base $plugin, core_plugin_manager $pluginman, $version) {
$requires = array();
if (!empty($plugin->versionrequires)) {
@@ -1001,9 +1031,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));
}
@@ -1016,11 +1048,11 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Prints an overview about the plugins - number of installed, number of extensions etc.
*
* @param plugin_manager $pluginman provides information about the plugins
* @param core_plugin_manager $pluginman provides information about the plugins
* @param array $options filtering options
* @return string as usually
*/
public function plugins_overview_panel(plugin_manager $pluginman, array $options = array()) {
public function plugins_overview_panel(core_plugin_manager $pluginman, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins();
@@ -1029,7 +1061,7 @@ class core_admin_renderer extends plugin_renderer_base {
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($plugin->get_status() === plugin_manager::PLUGIN_STATUS_MISSING) {
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
continue;
}
$numtotal++;
@@ -1096,11 +1128,11 @@ class core_admin_renderer extends plugin_renderer_base {
*
* This default implementation renders all plugins into one big table.
*
* @param plugin_manager $pluginman provides information about the plugins.
* @param core_plugin_manager $pluginman provides information about the plugins.
* @param array $options filtering options
* @return string HTML code
*/
public function plugins_control_panel(plugin_manager $pluginman, array $options = array()) {
public function plugins_control_panel(core_plugin_manager $pluginman, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins();
@@ -1154,8 +1186,12 @@ class core_admin_renderer extends plugin_renderer_base {
);
foreach ($plugininfo as $type => $plugins) {
$header = new html_table_cell($pluginman->plugintype_name_plural($type));
$heading = $pluginman->plugintype_name_plural($type);
$pluginclass = core_plugin_manager::resolve_plugininfo_class($type);
if ($manageurl = $pluginclass::get_manage_url()) {
$heading = html_writer::link($manageurl, $heading);
}
$header = new html_table_cell(html_writer::tag('span', $heading, array('id'=>'plugin_type_cell_'.$type)));
$header->header = true;
$header->colspan = array_sum($table->headspan);
$header = new html_table_row(array($header));
@@ -1182,9 +1218,9 @@ class core_admin_renderer extends plugin_renderer_base {
}
$status = $plugin->get_status();
$row->attributes['class'] .= ' status-'.$status;
if ($status === plugin_manager::PLUGIN_STATUS_MISSING) {
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'statusmsg'));
} else if ($status === plugin_manager::PLUGIN_STATUS_NEW) {
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
$msg = html_writer::tag('span', get_string('status_new', 'core_plugin'), array('class' => 'statusmsg'));
} else {
$msg = '';
@@ -1222,8 +1258,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
$settings = new html_table_cell($settings);
if ($pluginman->can_uninstall_plugin($plugin->component)) {
$uninstallurl = $plugin->get_uninstall_url();
if ($uninstallurl = $pluginman->get_uninstall_url($plugin->component, 'overview')) {
$uninstall = html_writer::link($uninstallurl, get_string('uninstall', 'core_plugin'));
} else {
$uninstall = '';
@@ -1263,9 +1298,9 @@ class core_admin_renderer extends plugin_renderer_base {
* The passed objects always provides at least the 'version' property containing
* the (higher) version of the plugin available.
*
* @param available_update_info $updateinfo information about the available update for the plugin
* @param \core\update\info $updateinfo information about the available update for the plugin
*/
protected function plugin_available_update_info(available_update_info $updateinfo) {
protected function plugin_available_update_info(\core\update\info $updateinfo) {
$boxclasses = 'pluginupdateinfo';
$info = array();
@@ -1294,7 +1329,7 @@ class core_admin_renderer extends plugin_renderer_base {
$box .= html_writer::tag('div', get_string('updateavailable', 'core_plugin', $updateinfo->version), array('class' => 'version'));
$box .= $this->output->box(implode(html_writer::tag('span', ' ', array('class' => 'separator')), $info), '');
$deployer = available_update_deployer::instance();
$deployer = \core\update\deployer::instance();
if ($deployer->initialized()) {
$impediments = $deployer->deployment_impediments($updateinfo);
if (empty($impediments)) {
+13 -43
View File
@@ -18,7 +18,7 @@
* Provides an overview of installed reports
*
* Displays the list of found reports, their version (if found) and
* a link to delete the report.
* a link to uninstall the report.
*
* The code is based on admin/localplugins.php by David Mudrak.
*
@@ -33,55 +33,23 @@ require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('managereports');
$delete = optional_param('delete', '', PARAM_PLUGIN);
$confirm = optional_param('confirm', '', PARAM_BOOL);
/// If data submitted, then process and store.
if (!empty($delete) and confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('reports'));
if (!$confirm) {
if (get_string_manager()->string_exists('pluginname', 'report_' . $delete)) {
$strpluginname = get_string('pluginname', 'report_' . $delete);
} else {
$strpluginname = $delete;
}
echo $OUTPUT->confirm(get_string('reportsdeleteconfirm', 'admin', $strpluginname),
new moodle_url($PAGE->url, array('delete' => $delete, 'confirm' => 1)),
$PAGE->url);
echo $OUTPUT->footer();
die();
} else {
uninstall_plugin('report', $delete);
$a = new stdclass();
$a->name = $delete;
$pluginlocation = get_plugin_types();
$a->directory = $pluginlocation['report'] . '/' . $delete;
echo $OUTPUT->notification(get_string('plugindeletefiles', '', $a), 'notifysuccess');
echo $OUTPUT->continue_button($PAGE->url);
echo $OUTPUT->footer();
die();
}
}
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('reports'));
/// Print the table of all installed report plugins
$struninstall = get_string('uninstallplugin', 'core_admin');
$table = new flexible_table('reportplugins_administration_table');
$table->define_columns(array('name', 'version', 'delete'));
$table->define_headers(array(get_string('plugin'), get_string('version'), get_string('delete')));
$table->define_columns(array('name', 'version', 'uninstall'));
$table->define_headers(array(get_string('plugin'), get_string('version'), $struninstall));
$table->define_baseurl($PAGE->url);
$table->set_attribute('id', 'reportplugins');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
$plugins = array();
foreach (get_plugin_list('report') as $plugin => $plugindir) {
foreach (core_component::get_plugin_list('report') as $plugin => $plugindir) {
if (get_string_manager()->string_exists('pluginname', 'report_' . $plugin)) {
$strpluginname = get_string('pluginname', 'report_' . $plugin);
} else {
@@ -89,7 +57,7 @@ foreach (get_plugin_list('report') as $plugin => $plugindir) {
}
$plugins[$plugin] = $strpluginname;
}
collatorlib::asort($plugins);
core_collator::asort($plugins);
$like = $DB->sql_like('plugin', '?', true, true, false, '|');
$params = array('report|_%');
@@ -104,8 +72,10 @@ foreach ($installed as $config) {
}
foreach ($plugins as $plugin => $name) {
$delete = new moodle_url($PAGE->url, array('delete' => $plugin, 'sesskey' => sesskey()));
$delete = html_writer::link($delete, get_string('delete'));
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('report_'.$plugin, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
if (!isset($versions[$plugin])) {
if (file_exists("$CFG->dirroot/report/$plugin/version.php")) {
@@ -126,7 +96,7 @@ foreach ($plugins as $plugin => $name) {
}
}
$table->add_data(array($name, $version, $delete));
$table->add_data(array($name, $version, $uninstall));
}
$table->print_html();
+10 -7
View File
@@ -61,9 +61,6 @@ if (!empty($action)) {
require_sesskey();
}
// Purge all caches related to repositories administration.
cache::make('core', 'plugininfo_repository')->purge();
/**
* Helper function that generates a moodle_url object
* relevant to the repository
@@ -143,12 +140,15 @@ 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) {
// configs saved
core_plugin_manager::reset_caches();
redirect($baseurl);
} else {
print_error('instancenotsaved', 'repository', $baseurl);
@@ -189,6 +189,7 @@ if (($action == 'edit') || ($action == 'new')) {
print_error('invalidplugin', 'repository', '', $repository);
}
$repositorytype->update_visibility(true);
core_plugin_manager::reset_caches();
$return = true;
} else if ($action == 'hide') {
if (!confirm_sesskey()) {
@@ -199,6 +200,7 @@ if (($action == 'edit') || ($action == 'new')) {
print_error('invalidplugin', 'repository', '', $repository);
}
$repositorytype->update_visibility(false);
core_plugin_manager::reset_caches();
$return = true;
} else if ($action == 'delete') {
$repositorytype = repository::get_type_by_typename($repository);
@@ -209,6 +211,7 @@ if (($action == 'edit') || ($action == 'new')) {
}
if ($repositorytype->delete($downloadcontents)) {
core_plugin_manager::reset_caches();
redirect($baseurl);
} else {
print_error('instancenotdeleted', 'repository', $baseurl);
@@ -292,9 +295,9 @@ if (($action == 'edit') || ($action == 'new')) {
// Get list of used plug-ins
$repositorytypes = repository::get_types();
// Array to store plugins being used
$alreadyplugins = array();
if (!empty($repositorytypes)) {
// Array to store plugins being used
$alreadyplugins = array();
$totalrepositorytypes = count($repositorytypes);
$updowncount = 1;
foreach ($repositorytypes as $i) {
@@ -390,7 +393,7 @@ if (($action == 'edit') || ($action == 'new')) {
}
// Get all the plugins that exist on disk
$plugins = get_plugin_list('repository');
$plugins = core_component::get_plugin_list('repository');
if (!empty($plugins)) {
foreach ($plugins as $plugin => $dir) {
// Check that it has not already been listed
+3
View File
@@ -102,6 +102,7 @@ if (!empty($edit) || !empty($new)) {
$data = data_submitted();
}
if ($success) {
core_plugin_manager::reset_caches();
redirect($parenturl);
} else {
print_error('instancenotsaved', 'repository', $parenturl);
@@ -118,6 +119,7 @@ if (!empty($edit) || !empty($new)) {
} else if (!empty($hide)) {
$instance = repository::get_type_by_typename($hide);
$instance->hide();
core_plugin_manager::reset_caches();
$return = true;
} else if (!empty($delete)) {
$instance = repository::get_instance($delete);
@@ -130,6 +132,7 @@ if (!empty($edit) || !empty($new)) {
if ($sure) {
if ($instance->delete($downloadcontents)) {
$deletedstr = get_string('instancedeleted', 'repository');
core_plugin_manager::reset_caches();
redirect($parenturl, $deletedstr, 3);
} else {
print_error('instancenotdeleted', 'repository', $parenturl);
+21 -24
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,16 +15,15 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Lets you site administrators
* Select site administrators.
*
* @package core
* @subpackage role
* @copyright 2010 Petr Skoda (skodak) http://skodak.org
* @package core_role
* @copyright 2010 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirmadd = optional_param('confirmadd', 0, PARAM_INT);
$confirmdel = optional_param('confirmdel', 0, PARAM_INT);
@@ -37,10 +35,10 @@ if (!is_siteadmin()) {
die;
}
$admisselector = new admins_existing_selector();
$admisselector = new core_role_admins_existing_selector();
$admisselector->set_extra_fields(array('username', 'email'));
$potentialadmisselector = new admins_potential_selector();
$potentialadmisselector = new core_role_admins_potential_selector();
$potentialadmisselector->set_extra_fields(array('username', 'email'));
if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
@@ -48,7 +46,8 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
$user = reset($userstoadd);
$username = fullname($user) . " ($user->username, $user->email)";
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('confirmaddadmin', 'role', $username), new moodle_url('/admin/roles/admins.php', array('confirmadd'=>$user->id, 'sesskey'=>sesskey())), $PAGE->url);
$yesurl = new moodle_url('/admin/roles/admins.php', array('confirmadd'=>$user->id, 'sesskey'=>sesskey()));
echo $OUTPUT->confirm(get_string('confirmaddadmin', 'core_role', $username), $yesurl, $PAGE->url);
echo $OUTPUT->footer();
die;
}
@@ -57,11 +56,12 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
if ($userstoremove = $admisselector->get_selected_users()) {
$user = reset($userstoremove);
if ($USER->id == $user->id) {
//can not remove self
// Can not remove self.
} else {
$username = fullname($user) . " ($user->username, $user->email)";
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('confirmdeladmin', 'role', $username), new moodle_url('/admin/roles/admins.php', array('confirmdel'=>$user->id, 'sesskey'=>sesskey())), $PAGE->url);
$yesurl = new moodle_url('/admin/roles/admins.php', array('confirmdel'=>$user->id, 'sesskey'=>sesskey()));
echo $OUTPUT->confirm(get_string('confirmdeladmin', 'core_role', $username), $yesurl, $PAGE->url);
echo $OUTPUT->footer();
die;
}
@@ -72,7 +72,7 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
$newmain = reset($newmain);
$newmain = $newmain->id;
$admins = array();
foreach(explode(',', $CFG->siteadmins) as $admin) {
foreach (explode(',', $CFG->siteadmins) as $admin) {
$admin = (int)$admin;
if ($admin) {
$admins[$admin] = $admin;
@@ -89,7 +89,7 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
} else if ($confirmadd and confirm_sesskey()) {
$admins = array();
foreach(explode(',', $CFG->siteadmins) as $admin) {
foreach (explode(',', $CFG->siteadmins) as $admin) {
$admin = (int)$admin;
if ($admin) {
$admins[$admin] = $admin;
@@ -101,7 +101,7 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
} else if ($confirmdel and confirm_sesskey() and $confirmdel != $USER->id) {
$admins = array();
foreach(explode(',', $CFG->siteadmins) as $admin) {
foreach (explode(',', $CFG->siteadmins) as $admin) {
$admin = (int)$admin;
if ($admin) {
$admins[$admin] = $admin;
@@ -112,12 +112,12 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
redirect($PAGE->url);
}
/// Print header
// Print header.
echo $OUTPUT->header();
?>
<div id="addadmisform">
<h3 class="main"><?php print_string('manageadmins', 'role'); ?></h3>
<h3 class="main"><?php print_string('manageadmins', 'core_role'); ?></h3>
<form id="assignform" method="post" action="<?php echo $PAGE->url ?>">
<div>
@@ -127,18 +127,18 @@ echo $OUTPUT->header();
<tr>
<td id='existingcell'>
<p>
<label for="removeselect"><?php print_string('existingadmins', 'role'); ?></label>
<label for="removeselect"><?php print_string('existingadmins', 'core_role'); ?></label>
</p>
<?php $admisselector->display(); ?>
</td>
<td id='buttonscell'>
<td id="buttonscell">
<p class="arrow_button">
<input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().'&nbsp;'.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
<input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
<input name="main" id="main" type="submit" value="<?php echo get_string('mainadminset', 'role'); ?>" title="<?php print_string('mainadminset', 'role'); ?>" />
<input name="main" id="main" type="submit" value="<?php echo get_string('mainadminset', 'core_role'); ?>" title="<?php print_string('mainadminset', 'core_role'); ?>" />
</p>
</td>
<td id='potentialcell'>
<td id="potentialcell">
<p>
<label for="addselect"><?php print_string('users'); ?></label>
</p>
@@ -152,7 +152,4 @@ echo $OUTPUT->header();
<?php
//this must be after calling display() on the selectors so their setup JS executes first
//////$PAGE->requires->js_function_call('init_add_remove_admis_page');
echo $OUTPUT->footer();
+22 -10
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,23 +15,21 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Allow overriding of roles by other roles
* Allow overriding of roles by other roles.
*
* @package core
* @subpackage role
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
$mode = required_param('mode', PARAM_ALPHANUMEXT);
$classformode = array(
'assign' => 'role_allow_assign_page',
'override' => 'role_allow_override_page',
'switch' => 'role_allow_switch_page'
'assign' => 'core_role_allow_assign_page',
'override' => 'core_role_allow_override_page',
'switch' => 'core_role_allow_switch_page'
);
if (!isset($classformode[$mode])) {
print_error('invalidmode', '', '', $mode);
@@ -48,8 +45,23 @@ $controller = new $classformode[$mode]();
if (optional_param('submit', false, PARAM_BOOL) && data_submitted() && confirm_sesskey()) {
$controller->process_submission();
mark_context_dirty($syscontext->path);
add_to_log(SITEID, 'role', 'edit allow ' . $mode, str_replace($CFG->wwwroot . '/', '', $baseurl), '', '', $USER->id);
$syscontext->mark_dirty();
$event = null;
// Create event depending on mode.
switch ($mode) {
case 'assign':
$event = \core\event\role_allow_assign_updated::create(array('context' => $syscontext));
break;
case 'override':
$event = \core\event\role_allow_override_updated::create(array('context' => $syscontext));
break;
case 'switch':
$event = \core\event\role_allow_switch_updated::create(array('context' => $syscontext));
break;
}
if ($event) {
$event->trigger();
}
redirect($baseurl);
}
+63 -43
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,21 +15,21 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Lets you assign roles to users in a particular context.
* Assign roles to users.
*
* @package core
* @subpackage role
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../config.php');
require_once(__DIR__ . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
define("MAX_USERS_TO_LIST_PER_ROLE", 10);
$contextid = required_param('contextid',PARAM_INT);
$roleid = optional_param('roleid', 0, PARAM_INT);
$contextid = required_param('contextid', PARAM_INT);
$roleid = optional_param('roleid', 0, PARAM_INT);
$returnto = optional_param('return', null, PARAM_ALPHANUMEXT);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -51,25 +50,25 @@ if ($course) {
}
// security
// Security.
require_login($course, false, $cm);
require_capability('moodle/role:assign', $context);
$PAGE->set_url($url);
$PAGE->set_context($context);
$contextname = print_context_name($context);
$contextname = $context->get_context_name();
$courseid = $course->id;
// These are needed early because of tabs.php
// These are needed early because of tabs.php.
list($assignableroles, $assigncounts, $nameswithcounts) = get_assignable_roles($context, ROLENAME_BOTH, true);
$overridableroles = get_overridable_roles($context, ROLENAME_BOTH);
// Make sure this user can assign this role
// Make sure this user can assign this role.
if ($roleid && !isset($assignableroles[$roleid])) {
$a = new stdClass;
$a->roleid = $roleid;
$a->context = $contextname;
print_error('cannotassignrolehere', '', get_context_url($context), $a);
print_error('cannotassignrolehere', '', $context->get_url(), $a);
}
// Work out an appropriate page title.
@@ -77,12 +76,12 @@ if ($roleid) {
$a = new stdClass;
$a->role = $assignableroles[$roleid];
$a->context = $contextname;
$title = get_string('assignrolenameincontext', 'role', $a);
$title = get_string('assignrolenameincontext', 'core_role', $a);
} else {
if ($isfrontpage) {
$title = get_string('frontpageroles', 'admin');
} else {
$title = get_string('assignrolesin', 'role', $contextname);
$title = get_string('assignrolesin', 'core_role', $contextname);
}
}
@@ -92,10 +91,10 @@ if ($roleid) {
// Create the user selector objects.
$options = array('context' => $context, 'roleid' => $roleid);
$potentialuserselector = roles_get_potential_user_selector($context, 'addselect', $options);
$currentuserselector = new existing_role_holders('removeselect', $options);
$potentialuserselector = core_role_get_potential_user_selector($context, 'addselect', $options);
$currentuserselector = new core_role_existing_role_holders('removeselect', $options);
// Process incoming role assignments
// Process incoming role assignments.
$errors = array();
if (optional_param('add', false, PARAM_BOOL) && confirm_sesskey()) {
$userstoassign = $potentialuserselector->get_selected_users();
@@ -112,28 +111,24 @@ if ($roleid) {
$potentialuserselector->invalidate_selected_users();
$currentuserselector->invalidate_selected_users();
$rolename = $assignableroles[$roleid];
add_to_log($course->id, 'role', 'assign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
// Counts have changed, so reload.
list($assignableroles, $assigncounts, $nameswithcounts) = get_assignable_roles($context, ROLENAME_BOTH, true);
}
}
// Process incoming role unassignments
// Process incoming role unassignments.
if (optional_param('remove', false, PARAM_BOOL) && confirm_sesskey()) {
$userstounassign = $currentuserselector->get_selected_users();
if (!empty($userstounassign)) {
foreach ($userstounassign as $removeuser) {
//unassign only roles that are added manually, no messing with other components!!!
// Unassign only roles that are added manually, no messing with other components!!!
role_unassign($roleid, $removeuser->id, $context->id, '');
}
$potentialuserselector->invalidate_selected_users();
$currentuserselector->invalidate_selected_users();
$rolename = $assignableroles[$roleid];
add_to_log($course->id, 'role', 'unassign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
// Counts have changed, so reload.
list($assignableroles, $assigncounts, $nameswithcounts) = get_assignable_roles($context, ROLENAME_BOTH, true);
}
@@ -145,6 +140,7 @@ $PAGE->set_title($title);
switch ($context->contextlevel) {
case CONTEXT_SYSTEM:
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('assignroles', '', array('contextid' => $contextid, 'roleid' => $roleid));
break;
case CONTEXT_USER:
@@ -153,17 +149,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
$PAGE->set_heading($SITE->fullname);
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
admin_externalpage_setup('frontpageroles', '', array('contextid' => $contextid, 'roleid' => $roleid));
$PAGE->set_heading(get_string('frontpage', 'admin'));
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -174,17 +170,20 @@ switch ($context->contextlevel) {
echo $OUTPUT->header();
// Print heading.
echo $OUTPUT->heading_with_help($title, 'assignroles', 'role');
echo $OUTPUT->heading_with_help($title, 'assignroles', 'core_role');
if ($roleid) {
// Show UI for assigning a particular role to users.
// Print a warning if we are assigning system roles.
if ($context->contextlevel == CONTEXT_SYSTEM) {
echo $OUTPUT->box(get_string('globalroleswarning', 'role'));
echo $OUTPUT->box(get_string('globalroleswarning', 'core_role'));
}
// Print the form.
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
if ($returnto !== null) {
$assignurl->param('return', $returnto);
}
?>
<form id="assignform" method="post" action="<?php echo $assignurl ?>"><div>
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
@@ -192,7 +191,7 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
<table id="assigningrole" summary="" class="admintable roleassigntable generaltable" cellspacing="0">
<tr>
<td id="existingcell">
<p><label for="removeselect"><?php print_string('extusers', 'role'); ?></label></p>
<p><label for="removeselect"><?php print_string('extusers', 'core_role'); ?></label></p>
<?php $currentuserselector->display() ?>
</td>
<td id="buttonscell">
@@ -205,7 +204,7 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
</div>
</td>
<td id="potentialcell">
<p><label for="addselect"><?php print_string('potusers', 'role'); ?></label></p>
<p><label for="addselect"><?php print_string('potusers', 'core_role'); ?></label></p>
<?php $potentialuserselector->display() ?>
</td>
</tr>
@@ -229,37 +228,45 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
// Print a form to swap roles, and a link back to the all roles list.
echo '<div class="backlink">';
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('assignanotherrole', 'role');
$newroleurl = new moodle_url($PAGE->url);
if ($returnto !== null) {
$newroleurl->param('return', $returnto);
}
$select = new single_select($newroleurl, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('assignanotherrole', 'core_role');
echo $OUTPUT->render($select);
$backurl = new moodle_url('/admin/roles/assign.php', array('contextid' => $contextid));
echo '<p><a href="' . $backurl->out() . '">' . get_string('backtoallroles', 'role') . '</a></p>';
if ($returnto !== null) {
$backurl->param('return', $returnto);
}
echo '<p><a href="' . $backurl->out() . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '</div>';
} else if (empty($assignableroles)) {
// Print a message that there are no roles that can me assigned here.
echo $OUTPUT->heading(get_string('notabletoassignroleshere', 'role'), 3);
echo $OUTPUT->heading(get_string('notabletoassignroleshere', 'core_role'), 3);
} else {
// Show UI for choosing a role to assign.
// Print a warning if we are assigning system roles.
if ($context->contextlevel == CONTEXT_SYSTEM) {
echo $OUTPUT->box(get_string('globalroleswarning', 'role'));
echo $OUTPUT->box(get_string('globalroleswarning', 'core_role'));
}
// Print instruction
echo $OUTPUT->heading(get_string('chooseroletoassign', 'role'), 3);
// Print instruction.
echo $OUTPUT->heading(get_string('chooseroletoassign', 'core_role'), 3);
// Get the names of role holders for roles with between 1 and MAX_USERS_TO_LIST_PER_ROLE users,
// and so determine whether to show the extra column.
$roleholdernames = array();
$strmorethanmax = get_string('morethan', 'role', MAX_USERS_TO_LIST_PER_ROLE);
$strmorethanmax = get_string('morethan', 'core_role', MAX_USERS_TO_LIST_PER_ROLE);
$showroleholders = false;
foreach ($assignableroles as $roleid => $notused) {
$roleusers = '';
if (0 < $assigncounts[$roleid] && $assigncounts[$roleid] <= MAX_USERS_TO_LIST_PER_ROLE) {
$roleusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname');
$userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
$roleusers = get_role_users($roleid, $context, false, $userfields);
if (!empty($roleusers)) {
$strroleusers = array();
foreach ($roleusers as $user) {
@@ -270,16 +277,19 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
}
} else if ($assigncounts[$roleid] > MAX_USERS_TO_LIST_PER_ROLE) {
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
if ($returnto !== null) {
$assignurl->param('return', $returnto);
}
$roleholdernames[$roleid] = '<a href="'.$assignurl.'">'.$strmorethanmax.'</a>';
} else {
$roleholdernames[$roleid] = '';
}
}
// Print overview table
// Print overview table.
$table = new html_table();
$table->id = 'assignrole';
$table->head = array(get_string('role'), get_string('description'), get_string('userswiththisrole', 'role'));
$table->head = array(get_string('role'), get_string('description'), get_string('userswiththisrole', 'core_role'));
$table->colclasses = array('leftalign role', 'leftalign', 'centeralign userrole');
$table->attributes['class'] = 'admintable generaltable';
if ($showroleholders) {
@@ -290,6 +300,9 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
foreach ($assignableroles as $roleid => $rolename) {
$description = format_string($DB->get_field('role', 'description', array('id'=>$roleid)));
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
if ($returnto !== null) {
$assignurl->param('return', $returnto);
}
$row = array('<a href="'.$assignurl.'">'.$rolename.'</a>',
$description, $assigncounts[$roleid]);
if ($showroleholders) {
@@ -301,8 +314,15 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
echo html_writer::table($table);
if ($context->contextlevel > CONTEXT_USER) {
if ($context->contextlevel === CONTEXT_COURSECAT && $returnto === 'management') {
$url = new moodle_url('/course/management.php', array('categoryid' => $context->instanceid));
} else {
$url = $context->get_url();
}
echo html_writer::start_tag('div', array('class'=>'backlink'));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>get_context_url($context)));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href' => $url));
echo html_writer::end_tag('div');
}
}
+27 -21
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,16 +17,14 @@
/**
* Shows the result of has_capability for every capability for a user in a context.
*
* @package core
* @subpackage role
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
$contextid = required_param('contextid',PARAM_INT);
$contextid = required_param('contextid', PARAM_INT);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -47,32 +44,41 @@ if ($course) {
}
}
// security first
// Security first.
require_login($course, false, $cm);
if (!has_any_capability(array('moodle/role:assign', 'moodle/role:safeoverride', 'moodle/role:override', 'moodle/role:manage'), $context)) {
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'role'));
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'core_role'));
}
$PAGE->set_url($url);
if ($context->contextlevel == CONTEXT_USER and $USER->id != $context->instanceid) {
$PAGE->navigation->extend_for_user($user);
$PAGE->set_context(context_course::instance($course->id));
} else {
$PAGE->set_context($context);
}
$PAGE->set_context($context);
$courseid = $course->id;
$contextname = print_context_name($context);
$contextname = $context->get_context_name();
// Get the user_selector we will need.
// Teachers within a course just get to see the same list of enrolled users.
// Admins (people with moodle/role:manage) can run this report for any user.
$options = array('accesscontext' => $context);
$userselector = new role_check_users_selector('reportuser', $options);
$userselector = new core_role_check_users_selector('reportuser', $options);
$userselector->set_rows(20);
// Work out an appropriate page title.
$title = get_string('checkpermissionsin', 'role', $contextname);
$title = get_string('checkpermissionsin', 'core_role', $contextname);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($title);
switch ($context->contextlevel) {
case CONTEXT_SYSTEM:
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('checkpermissions', '', array('contextid' => $contextid));
break;
case CONTEXT_USER:
@@ -81,17 +87,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
$PAGE->set_heading($SITE->fullname);
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
admin_externalpage_setup('frontpageroles', '', array('contextid' => $contextid), $CFG->wwwroot . '/' . $CFG->admin . '/roles/check.php');
$PAGE->set_heading(get_string('frontpage', 'admin'));
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -117,7 +123,7 @@ if (!is_null($reportuser)) {
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
if (!empty($roleassignments)) {
echo $OUTPUT->heading(get_string('rolesforuser', 'role', fullname($reportuser)), 3);
echo $OUTPUT->heading(get_string('rolesforuser', 'core_role', fullname($reportuser)), 3);
echo html_writer::start_tag('ul');
$systemcontext = context_system::instance();
@@ -131,20 +137,20 @@ if (!is_null($reportuser)) {
array('action' => 'view', 'roleid' => $ra->roleid)), $rolename);
}
echo html_writer::tag('li', get_string('roleincontext', 'role',
echo html_writer::tag('li', get_string('roleincontext', 'core_role',
array('role' => $rolename, 'context' => $link)));
}
echo html_writer::end_tag('ul');
}
echo $OUTPUT->heading(get_string('permissionsforuser', 'role', fullname($reportuser)), 3);
$table = new check_capability_table($context, $reportuser, $contextname);
echo $OUTPUT->heading(get_string('permissionsforuser', 'core_role', fullname($reportuser)), 3);
$table = new core_role_check_capability_table($context, $reportuser, $contextname);
$table->display();
echo $OUTPUT->box_end();
$selectheading = get_string('selectanotheruser', 'role');
$selectheading = get_string('selectanotheruser', 'core_role');
} else {
$selectheading = get_string('selectauser', 'role');
$selectheading = get_string('selectauser', 'core_role');
}
// Show UI for choosing a user to report on.
@@ -165,14 +171,14 @@ echo $OUTPUT->heading('<label for="reportuser">' . $selectheading . '</label>',
$userselector->display();
// Submit button and the end of the form.
echo '<p id="chooseusersubmit"><input type="submit" value="' . get_string('showthisuserspermissions', 'role') . '" /></p>';
echo '<p id="chooseusersubmit"><input type="submit" value="' . get_string('showthisuserspermissions', 'core_role') . '" /></p>';
echo '</form>';
echo $OUTPUT->box_end();
// Appropriate back link.
if ($context->contextlevel > CONTEXT_USER) {
echo html_writer::start_tag('div', array('class'=>'backlink'));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>get_context_url($context)));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>$context->get_url()));
echo html_writer::end_tag('div');
}
@@ -0,0 +1,98 @@
<?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/>.
/**
* Existing admin user selector.
*
* @package core_role
* @copyright 2010 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot.'/user/selector/lib.php');
class core_role_admins_existing_selector extends user_selector_base {
/**
* Create instance.
*
* @param string $name control name
* @param array $options should have two elements with keys groupid and courseid.
*/
public function __construct($name = null, $options = array()) {
if (is_null($name)) {
$name = 'removeselect';
}
$options['multiselect'] = false;
parent::__construct($name, $options);
}
public function find_users($search) {
global $DB, $CFG;
list($wherecondition, $params) = $this->search_sql($search, '');
$fields = 'SELECT ' . $this->required_fields_sql('');
if ($wherecondition) {
$wherecondition = "$wherecondition AND id IN ($CFG->siteadmins)";
} else {
$wherecondition = "id IN ($CFG->siteadmins)";
}
$sql = " FROM {user}
WHERE $wherecondition";
list($sort, $sortparams) = users_order_by_sql('', $search, $this->accesscontext);
$params = array_merge($params, $sortparams);
$order = ' ORDER BY ' . $sort;
$availableusers = $DB->get_records_sql($fields . $sql . $order, $params);
if (empty($availableusers)) {
return array();
}
$mainadmin = array();
$mainadminuser = get_admin();
if ($mainadminuser && isset($availableusers[$mainadminuser->id])) {
$mainadmin = array($mainadminuser->id => $availableusers[$mainadminuser->id]);
unset($availableusers[$mainadminuser->id]);
}
$result = array();
if ($mainadmin) {
$result[get_string('mainadmin', 'core_role')] = $mainadmin;
}
if ($availableusers) {
if ($search) {
$groupname = get_string('extusersmatching', 'core_role', $search);
} else {
$groupname = get_string('extusers', 'core_role');
}
$result[$groupname] = $availableusers;
}
return $result;
}
protected function get_options() {
global $CFG;
$options = parent::get_options();
$options['file'] = $CFG->admin . '/roles/lib.php';
return $options;
}
}
@@ -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/>.
/**
* Potential admin user selector.
*
* @package core_role
* @copyright 2010 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot.'/user/selector/lib.php');
class core_role_admins_potential_selector extends user_selector_base {
/**
* Create instance.
*
* @param string $name control name
* @param array $options should have two elements with keys groupid and courseid.
*/
public function __construct($name = null, $options = array()) {
global $CFG;
if (is_null($name)) {
$name = 'addselect';
}
$options['multiselect'] = false;
$options['exclude'] = explode(',', $CFG->siteadmins);
parent::__construct($name, $options);
}
public function find_users($search) {
global $CFG, $DB;
list($wherecondition, $params) = $this->search_sql($search, '');
$fields = 'SELECT ' . $this->required_fields_sql('');
$countfields = 'SELECT COUNT(1)';
$sql = " FROM {user}
WHERE $wherecondition AND mnethostid = :localmnet";
// It could be dangerous to make remote users admins and also this could lead to other problems.
$params['localmnet'] = $CFG->mnet_localhost_id;
list($sort, $sortparams) = users_order_by_sql('', $search, $this->accesscontext);
$order = ' ORDER BY ' . $sort;
// Check to see if there are too many to show sensibly.
if (!$this->is_validating()) {
$potentialcount = $DB->count_records_sql($countfields . $sql, $params);
if ($potentialcount > $this->maxusersperpage) {
return $this->too_many_results($search, $potentialcount);
}
}
$availableusers = $DB->get_records_sql($fields . $sql . $order, array_merge($params, $sortparams));
if (empty($availableusers)) {
return array();
}
if ($search) {
$groupname = get_string('potusersmatching', 'core_role', $search);
} else {
$groupname = get_string('potusers', 'core_role');
}
return array($groupname => $availableusers);
}
protected function get_options() {
global $CFG;
$options = parent::get_options();
$options['file'] = $CFG->admin . '/roles/lib.php';
return $options;
}
}
+49
View File
@@ -0,0 +1,49 @@
<?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/>.
/**
* Role assign matrix.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Subclass of role_allow_role_page for the Allow assigns tab.
*/
class core_role_allow_assign_page extends core_role_allow_role_page {
public function __construct() {
parent::__construct('role_allow_assign', 'allowassign');
}
protected function set_allow($fromroleid, $targetroleid) {
allow_assign($fromroleid, $targetroleid);
}
protected function get_cell_tooltip($fromrole, $targetrole) {
$a = new stdClass;
$a->fromrole = $fromrole->localname;
$a->targetrole = $targetrole->localname;
return get_string('allowroletoassign', 'core_role', $a);
}
public function get_intro_text() {
return get_string('configallowassign', 'core_admin');
}
}
@@ -0,0 +1,49 @@
<?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/>.
/**
* Role override matrix.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Subclass of role_allow_role_page for the Allow overrides tab.
*/
class core_role_allow_override_page extends core_role_allow_role_page {
public function __construct() {
parent::__construct('role_allow_override', 'allowoverride');
}
protected function set_allow($fromroleid, $targetroleid) {
allow_override($fromroleid, $targetroleid);
}
protected function get_cell_tooltip($fromrole, $targetrole) {
$a = new stdClass;
$a->fromrole = $fromrole->localname;
$a->targetrole = $targetrole->localname;
return get_string('allowroletooverride', 'core_role', $a);
}
public function get_intro_text() {
return get_string('configallowoverride2', 'core_admin');
}
}
+164
View File
@@ -0,0 +1,164 @@
<?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/>.
/**
* Base class for allow matrices.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Base class for managing the data in the grid of checkboxes on the role allow
* allow/overrides/switch editing pages (allow.php).
*/
abstract class core_role_allow_role_page {
protected $tablename;
protected $targetcolname;
protected $roles;
protected $allowed = null;
/**
* Constructor.
*
* @param string $tablename the table where our data is stored.
* @param string $targetcolname the name of the target role id column.
*/
public function __construct($tablename, $targetcolname) {
$this->tablename = $tablename;
$this->targetcolname = $targetcolname;
$this->load_required_roles();
}
/**
* Load information about all the roles we will need information about.
*/
protected function load_required_roles() {
// Get all roles.
$this->roles = role_fix_names(get_all_roles(), context_system::instance(), ROLENAME_ORIGINAL);
}
/**
* Update the data with the new settings submitted by the user.
*/
public function process_submission() {
global $DB;
// Delete all records, then add back the ones that should be allowed.
$DB->delete_records($this->tablename);
foreach ($this->roles as $fromroleid => $notused) {
foreach ($this->roles as $targetroleid => $alsonotused) {
if (optional_param('s_' . $fromroleid . '_' . $targetroleid, false, PARAM_BOOL)) {
$this->set_allow($fromroleid, $targetroleid);
}
}
}
}
/**
* Set one allow in the database.
* @param int $fromroleid
* @param int $targetroleid
*/
protected abstract function set_allow($fromroleid, $targetroleid);
/**
* Load the current allows from the database.
*/
public function load_current_settings() {
global $DB;
// Load the current settings.
$this->allowed = array();
foreach ($this->roles as $role) {
// Make an array $role->id => false. This is probably too clever for its own good.
$this->allowed[$role->id] = array_combine(array_keys($this->roles), array_fill(0, count($this->roles), false));
}
$rs = $DB->get_recordset($this->tablename);
foreach ($rs as $allow) {
$this->allowed[$allow->roleid][$allow->{$this->targetcolname}] = true;
}
$rs->close();
}
/**
* Is target allowed?
*
* @param integer $targetroleid a role id.
* @return boolean whether the user should be allowed to select this role as a target role.
*/
protected function is_allowed_target($targetroleid) {
return true;
}
/**
* Returns structure that can be passed to print_table,
* containing one cell for each checkbox.
* @return html_table a table
*/
public function get_table() {
$table = new html_table();
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->width = '90%';
$table->align = array('left');
$table->rotateheaders = true;
$table->head = array('&#xa0;');
$table->colclasses = array('');
// Add role name headers.
foreach ($this->roles as $targetrole) {
$table->head[] = $targetrole->localname;
$table->align[] = 'left';
if ($this->is_allowed_target($targetrole->id)) {
$table->colclasses[] = '';
} else {
$table->colclasses[] = 'dimmed_text';
}
}
// Now the rest of the table.
foreach ($this->roles as $fromrole) {
$row = array($fromrole->localname);
foreach ($this->roles as $targetrole) {
$checked = '';
$disabled = '';
if ($this->allowed[$fromrole->id][$targetrole->id]) {
$checked = 'checked="checked" ';
}
if (!$this->is_allowed_target($targetrole->id)) {
$disabled = 'disabled="disabled" ';
}
$name = 's_' . $fromrole->id . '_' . $targetrole->id;
$tooltip = $this->get_cell_tooltip($fromrole, $targetrole);
$row[] = '<input type="checkbox" name="' . $name . '" id="' . $name .
'" title="' . $tooltip . '" value="1" ' . $checked . $disabled . '/>' .
'<label for="' . $name . '" class="accesshide">' . $tooltip . '</label>';
}
$table->data[] = $row;
}
return $table;
}
/**
* Snippet of text displayed above the table, telling the admin what to do.
* @return string
*/
public abstract function get_intro_text();
}
+61
View File
@@ -0,0 +1,61 @@
<?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/>.
/**
* Role witch matrix.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Subclass of role_allow_role_page for the Allow switches tab.
*/
class core_role_allow_switch_page extends core_role_allow_role_page {
protected $allowedtargetroles;
public function __construct() {
parent::__construct('role_allow_switch', 'allowswitch');
}
protected function load_required_roles() {
global $DB;
parent::load_required_roles();
$this->allowedtargetroles = $DB->get_records_menu('role', null, 'id');
}
protected function set_allow($fromroleid, $targetroleid) {
allow_switch($fromroleid, $targetroleid);
}
protected function is_allowed_target($targetroleid) {
return isset($this->allowedtargetroles[$targetroleid]);
}
protected function get_cell_tooltip($fromrole, $targetrole) {
$a = new stdClass;
$a->fromrole = $fromrole->localname;
$a->targetrole = $targetrole->localname;
return get_string('allowroletoswitch', 'core_role', $a);
}
public function get_intro_text() {
return get_string('configallowswitch', 'core_admin');
}
}
@@ -0,0 +1,61 @@
<?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/>.
/**
* Library code used by the roles administration interfaces.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot.'/user/selector/lib.php');
/**
* Base class to avoid duplicating code.
*/
abstract class core_role_assign_user_selector_base extends user_selector_base {
protected $roleid;
protected $context;
/**
* @param string $name control name
* @param array $options should have two elements with keys groupid and courseid.
*/
public function __construct($name, $options) {
global $CFG;
if (isset($options['context'])) {
$this->context = $options['context'];
} else {
$this->context = context::instance_by_id($options['contextid']);
}
$options['accesscontext'] = $this->context;
parent::__construct($name, $options);
$this->roleid = $options['roleid'];
require_once($CFG->dirroot . '/group/lib.php');
}
protected function get_options() {
global $CFG;
$options = parent::get_options();
$options['file'] = $CFG->admin . '/roles/lib.php';
$options['roleid'] = $this->roleid;
$options['contextid'] = $this->context->id;
return $options;
}
}
@@ -0,0 +1,171 @@
<?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/>.
/**
* Base capability table.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* This class represents a table with one row for each of a list of capabilities
* where the first cell in the row contains the capability name, and there is
* arbitrary stuff in the rest of the row. This class is used by
* admin/roles/manage.php, override.php and check.php.
*
* An ajaxy search UI shown at the top, if JavaScript is on.
*/
abstract class core_role_capability_table_base {
/** The context this table relates to. */
protected $context;
/** The capabilities to display. Initialised as $context->get_capabilities(). */
protected $capabilities = array();
/** Added as an id="" attribute to the table on output. */
protected $id;
/** Added to the class="" attribute on output. */
protected $classes = array('rolecap');
/** Default number of capabilities in the table for the search UI to be shown. */
const NUM_CAPS_FOR_SEARCH = 12;
/**
* Constructor.
* @param context $context the context this table relates to.
* @param string $id what to put in the id="" attribute.
*/
public function __construct(context $context, $id) {
$this->context = $context;
$this->capabilities = $context->get_capabilities();
$this->id = $id;
}
/**
* Use this to add class="" attributes to the table. You get the rolecap by
* default.
* @param array $classnames of class names.
*/
public function add_classes($classnames) {
$this->classes = array_unique(array_merge($this->classes, $classnames));
}
/**
* Display the table.
*/
public function display() {
if (count($this->capabilities) > self::NUM_CAPS_FOR_SEARCH) {
global $PAGE;
$PAGE->requires->strings_for_js(array('filter', 'clear'), 'moodle');
$PAGE->requires->js_init_call('M.core_role.init_cap_table_filter', array($this->id, $this->context->id));
}
echo '<table class="' . implode(' ', $this->classes) . '" id="' . $this->id . '">' . "\n<thead>\n";
echo '<tr><th class="name" align="left" scope="col">' . get_string('capability', 'core_role') . '</th>';
$this->add_header_cells();
echo "</tr>\n</thead>\n<tbody>\n";
// Loop over capabilities.
$contextlevel = 0;
$component = '';
foreach ($this->capabilities as $capability) {
if ($this->skip_row($capability)) {
continue;
}
// Prints a breaker if component or name or context level has changed.
if (component_level_changed($capability, $component, $contextlevel)) {
$this->print_heading_row($capability);
}
$contextlevel = $capability->contextlevel;
$component = $capability->component;
// Start the row.
echo '<tr class="' . implode(' ', array_unique(array_merge(array('rolecap'),
$this->get_row_classes($capability)))) . '">';
// Table cell for the capability name.
echo '<th scope="row" class="name"><span class="cap-desc">' . get_capability_docs_link($capability) .
'<span class="cap-name">' . $capability->name . '</span></span></th>';
// Add the cells specific to this table.
$this->add_row_cells($capability);
// End the row.
echo "</tr>\n";
}
// End of the table.
echo "</tbody>\n</table>\n";
}
/**
* Used to output a heading rows when the context level or component changes.
* @param stdClass $capability gives the new component and contextlevel.
*/
protected function print_heading_row($capability) {
echo '<tr class="rolecapheading header"><td colspan="' . (1 + $this->num_extra_columns()) . '" class="header"><strong>' .
get_component_string($capability->component, $capability->contextlevel) .
'</strong></td></tr>';
}
/**
* For subclasses to override, output header cells, after the initial capability one.
*/
protected abstract function add_header_cells();
/**
* For subclasses to override, return the number of cells that add_header_cells/add_row_cells output.
*/
protected abstract function num_extra_columns();
/**
* For subclasses to override. Allows certain capabilties
* to be left out of the table.
*
* @param object $capability the capability this row relates to.
* @return boolean. If true, this row is omitted from the table.
*/
protected function skip_row($capability) {
return false;
}
/**
* For subclasses to override. A change to reaturn class names that are added
* to the class="" attribute on the &lt;tr> for this capability.
*
* @param stdClass $capability the capability this row relates to.
* @return array of class name strings.
*/
protected function get_row_classes($capability) {
return array();
}
/**
* For subclasses to override. Output the data cells for this capability. The
* capability name cell will already have been output.
*
* You can rely on get_row_classes always being called before add_row_cells.
*
* @param stdClass $capability the capability this row relates to.
*/
protected abstract function add_row_cells($capability);
}
@@ -0,0 +1,193 @@
<?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/>.
/**
* Capabilities table with risks.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* This subclass is the bases for both the define roles and override roles
* pages. As well as adding the risks columns, this also provides generic
* facilities for showing a certain number of permissions columns, and
* recording the current and submitted permissions for each capability.
*/
abstract class core_role_capability_table_with_risks extends core_role_capability_table_base {
protected $allrisks;
protected $allpermissions; // We don't need perms ourselves, but all our subclasses do.
protected $strperms; // Language string cache.
protected $risksurl; // URL in moodledocs about risks.
protected $riskicons = array(); // Cache to avoid regenerating the HTML for each risk icon.
/** @var array The capabilities to highlight as default/inherited. */
protected $parentpermissions;
protected $displaypermissions;
protected $permissions;
protected $changed;
protected $roleid;
public function __construct($context, $id, $roleid) {
parent::__construct($context, $id);
$this->allrisks = get_all_risks();
$this->risksurl = get_docs_url(s(get_string('risks', 'core_role')));
$this->allpermissions = array(
CAP_INHERIT => 'inherit',
CAP_ALLOW => 'allow',
CAP_PREVENT => 'prevent' ,
CAP_PROHIBIT => 'prohibit',
);
$this->strperms = array();
foreach ($this->allpermissions as $permname) {
$this->strperms[$permname] = get_string($permname, 'core_role');
}
$this->roleid = $roleid;
$this->load_current_permissions();
// Fill in any blank permissions with an explicit CAP_INHERIT, and init a locked field.
foreach ($this->capabilities as $capid => $cap) {
if (!isset($this->permissions[$cap->name])) {
$this->permissions[$cap->name] = CAP_INHERIT;
}
$this->capabilities[$capid]->locked = false;
}
}
protected function load_current_permissions() {
global $DB;
// Load the overrides/definition in this context.
if ($this->roleid) {
$this->permissions = $DB->get_records_menu('role_capabilities', array('roleid' => $this->roleid,
'contextid' => $this->context->id), '', 'capability,permission');
} else {
$this->permissions = array();
}
}
protected abstract function load_parent_permissions();
/**
* Update $this->permissions based on submitted data, while making a list of
* changed capabilities in $this->changed.
*/
public function read_submitted_permissions() {
$this->changed = array();
foreach ($this->capabilities as $cap) {
if ($cap->locked || $this->skip_row($cap)) {
// The user is not allowed to change the permission for this capability.
continue;
}
$permission = optional_param($cap->name, null, PARAM_PERMISSION);
if (is_null($permission)) {
// A permission was not specified in submitted data.
continue;
}
// If the permission has changed, update $this->permissions and
// Record the fact there is data to save.
if ($this->permissions[$cap->name] != $permission) {
$this->permissions[$cap->name] = $permission;
$this->changed[] = $cap->name;
}
}
}
/**
* Save the new values of any permissions that have been changed.
*/
public function save_changes() {
// Set the permissions.
foreach ($this->changed as $changedcap) {
assign_capability($changedcap, $this->permissions[$changedcap],
$this->roleid, $this->context->id, true);
}
// Force accessinfo refresh for users visiting this context.
$this->context->mark_dirty();
}
public function display() {
$this->load_parent_permissions();
foreach ($this->capabilities as $cap) {
if (!isset($this->parentpermissions[$cap->name])) {
$this->parentpermissions[$cap->name] = CAP_INHERIT;
}
}
parent::display();
}
protected function add_header_cells() {
global $OUTPUT;
echo '<th colspan="' . count($this->displaypermissions) . '" scope="col">' .
get_string('permission', 'core_role') . ' ' . $OUTPUT->help_icon('permission', 'core_role') . '</th>';
echo '<th class="risk" colspan="' . count($this->allrisks) . '" scope="col">' . get_string('risks', 'core_role') . '</th>';
}
protected function num_extra_columns() {
return count($this->displaypermissions) + count($this->allrisks);
}
protected function get_row_classes($capability) {
$rowclasses = array();
foreach ($this->allrisks as $riskname => $risk) {
if ($risk & (int)$capability->riskbitmask) {
$rowclasses[] = $riskname;
}
}
return $rowclasses;
}
protected abstract function add_permission_cells($capability);
protected function add_row_cells($capability) {
$this->add_permission_cells($capability);
// One cell for each possible risk.
foreach ($this->allrisks as $riskname => $risk) {
echo '<td class="risk ' . str_replace('risk', '', $riskname) . '">';
if ($risk & (int)$capability->riskbitmask) {
echo $this->get_risk_icon($riskname);
}
echo '</td>';
}
}
/**
* Print a risk icon, as a link to the Risks page on Moodle Docs.
*
* @param string $type the type of risk, will be one of the keys from the
* get_all_risks array. Must start with 'risk'.
*/
public function get_risk_icon($type) {
global $OUTPUT;
if (!isset($this->riskicons[$type])) {
$iconurl = $OUTPUT->pix_url('i/' . str_replace('risk', 'risk_', $type));
$text = '<img src="' . $iconurl . '" alt="' . get_string($type . 'short', 'admin') . '" />';
$action = new popup_action('click', $this->risksurl, 'docspopup');
$this->riskicons[$type] = $OUTPUT->action_link($this->risksurl, $text, $action, array('title'=>get_string($type, 'admin')));
}
return $this->riskicons[$type];
}
}
@@ -0,0 +1,84 @@
<?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/>.
/**
* Library code used by the roles administration interfaces.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Subclass of core_role_capability_table_base for use on the Check permissions page.
*
* We have one additional column, Allowed, which contains yes/no.
*/
class core_role_check_capability_table extends core_role_capability_table_base {
protected $user;
protected $fullname;
protected $contextname;
protected $stryes;
protected $strno;
private $hascap;
/**
* Constructor
* @param object $context the context this table relates to.
* @param object $user the user we are generating the results for.
* @param string $contextname $context->get_context_name() - to save recomputing.
*/
public function __construct($context, $user, $contextname) {
parent::__construct($context, 'explaincaps');
$this->user = $user;
$this->fullname = fullname($user);
$this->contextname = $contextname;
$this->stryes = get_string('yes');
$this->strno = get_string('no');
}
protected function add_header_cells() {
echo '<th>' . get_string('allowed', 'core_role') . '</th>';
}
protected function num_extra_columns() {
return 1;
}
protected function get_row_classes($capability) {
$this->hascap = has_capability($capability->name, $this->context, $this->user->id);
if ($this->hascap) {
return array('yes');
} else {
return array('no');
}
}
protected function add_row_cells($capability) {
if ($this->hascap) {
$result = $this->stryes;
} else {
$result = $this->strno;
}
$a = new stdClass;
$a->fullname = $this->fullname;
$a->capability = $capability->name;
$a->context = $this->contextname;
echo '<td>' . $result . '</td>';
}
}
@@ -0,0 +1,153 @@
<?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/>.
/**
* User selector.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot.'/user/selector/lib.php');
/**
* User selector subclass for the selection of users in the check permissions page.
*
* @copyright 2012 Petr Skoda {@link http://skodak.org}
*/
class core_role_check_users_selector extends user_selector_base {
/** @var bool limit listing of users to enrolled only */
protected $onlyenrolled;
/**
* Constructor.
*
* @param string $name the control name/id for use in the HTML.
* @param array $options other options needed to construct this selector.
* You must be able to clone a userselector by doing new get_class($us)($us->get_name(), $us->get_options());
*/
public function __construct($name, $options) {
if (!isset($options['multiselect'])) {
$options['multiselect'] = false;
}
parent::__construct($name, $options);
$coursecontext = $this->accesscontext->get_course_context(false);
if ($coursecontext and $coursecontext->id != SITEID and !has_capability('moodle/role:manage', $coursecontext)) {
// Prevent normal teachers from looking up all users.
$this->onlyenrolled = true;
} else {
$this->onlyenrolled = false;
}
}
public function find_users($search) {
global $DB;
list($wherecondition, $params) = $this->search_sql($search, 'u');
$fields = 'SELECT ' . $this->required_fields_sql('u');
$countfields = 'SELECT COUNT(1)';
$coursecontext = $this->accesscontext->get_course_context(false);
if ($coursecontext and $coursecontext != SITEID) {
$sql1 = " FROM {user} u
JOIN {user_enrolments} ue ON (ue.userid = u.id)
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid1)
WHERE $wherecondition";
$params['courseid1'] = $coursecontext->instanceid;
if ($this->onlyenrolled) {
$sql2 = null;
} else {
$sql2 = " FROM {user} u
LEFT JOIN ({user_enrolments} ue
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid2)) ON (ue.userid = u.id)
WHERE $wherecondition
AND ue.id IS NULL";
$params['courseid2'] = $coursecontext->instanceid;
}
} else {
if ($this->onlyenrolled) {
// Bad luck, current user may not view only enrolled users.
return array();
}
$sql1 = null;
$sql2 = " FROM {user} u
WHERE $wherecondition";
}
$params['contextid'] = $this->accesscontext->id;
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext);
$order = ' ORDER BY ' . $sort;
$result = array();
if ($search) {
$groupname1 = get_string('enrolledusersmatching', 'enrol', $search);
$groupname2 = get_string('potusersmatching', 'core_role', $search);
} else {
$groupname1 = get_string('enrolledusers', 'enrol');
$groupname2 = get_string('potusers', 'core_role');
}
if ($sql1) {
$enrolleduserscount = $DB->count_records_sql($countfields . $sql1, $params);
if (!$this->is_validating() and $enrolleduserscount > $this->maxusersperpage) {
$result[$groupname1] = array();
$toomany = $this->too_many_results($search, $enrolleduserscount);
$result[implode(' - ', array_keys($toomany))] = array();
} else {
$enrolledusers = $DB->get_records_sql($fields . $sql1 . $order, array_merge($params, $sortparams));
if ($enrolledusers) {
$result[$groupname1] = $enrolledusers;
}
}
if ($sql2) {
$result[''] = array();
}
}
if ($sql2) {
$otheruserscount = $DB->count_records_sql($countfields . $sql2, $params);
if (!$this->is_validating() and $otheruserscount > $this->maxusersperpage) {
$result[$groupname2] = array();
$toomany = $this->too_many_results($search, $otheruserscount);
$result[implode(' - ', array_keys($toomany))] = array();
} else {
$otherusers = $DB->get_records_sql($fields . $sql2 . $order, array_merge($params, $sortparams));
if ($otherusers) {
$result[$groupname2] = $otherusers;
}
}
}
return $result;
}
protected function get_options() {
global $CFG;
$options = parent::get_options();
$options['file'] = $CFG->admin . '/roles/lib.php';
return $options;
}
}
@@ -0,0 +1,646 @@
<?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/>.
/**
* Advanced role definition form.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* As well as tracking the permissions information about the role we are creating
* or editing, we also track the other information about the role. (This class is
* starting to be more and more like a formslib form in some respects.)
*/
class core_role_define_role_table_advanced extends core_role_capability_table_with_risks {
/** @var stdClass Used to store other information (besides permissions) about the role we are creating/editing. */
protected $role;
/** @var array Used to store errors found when validating the data. */
protected $errors;
protected $contextlevels;
protected $allcontextlevels;
protected $disabled = '';
protected $allowassign;
protected $allowoverride;
protected $allowswitch;
public function __construct($context, $roleid) {
$this->roleid = $roleid;
parent::__construct($context, 'defineroletable', $roleid);
$this->displaypermissions = $this->allpermissions;
$this->strperms[$this->allpermissions[CAP_INHERIT]] = get_string('notset', 'core_role');
$this->allcontextlevels = array();
$levels = context_helper::get_all_levels();
foreach ($levels as $level => $classname) {
$this->allcontextlevels[$level] = context_helper::get_level_name($level);
}
}
protected function load_current_permissions() {
global $DB;
if ($this->roleid) {
if (!$this->role = $DB->get_record('role', array('id' => $this->roleid))) {
throw new moodle_exception('invalidroleid');
}
$contextlevels = get_role_contextlevels($this->roleid);
// Put the contextlevels in the array keys, as well as the values.
if (!empty($contextlevels)) {
$this->contextlevels = array_combine($contextlevels, $contextlevels);
} else {
$this->contextlevels = array();
}
$this->allowassign = array_keys($this->get_allow_roles_list('assign'));
$this->allowoverride = array_keys($this->get_allow_roles_list('override'));
$this->allowswitch = array_keys($this->get_allow_roles_list('switch'));
} else {
$this->role = new stdClass;
$this->role->name = '';
$this->role->shortname = '';
$this->role->description = '';
$this->role->archetype = '';
$this->contextlevels = array();
$this->allowassign = array();
$this->allowoverride = array();
$this->allowswitch = array();
}
parent::load_current_permissions();
}
public function read_submitted_permissions() {
global $DB;
$this->errors = array();
// Role short name. We clean this in a special way. We want to end up
// with only lowercase safe ASCII characters.
$shortname = optional_param('shortname', null, PARAM_RAW);
if (!is_null($shortname)) {
$this->role->shortname = $shortname;
$this->role->shortname = core_text::specialtoascii($this->role->shortname);
$this->role->shortname = core_text::strtolower(clean_param($this->role->shortname, PARAM_ALPHANUMEXT));
if (empty($this->role->shortname)) {
$this->errors['shortname'] = get_string('errorbadroleshortname', 'core_role');
}
}
if ($DB->record_exists_select('role', 'shortname = ? and id <> ?', array($this->role->shortname, $this->roleid))) {
$this->errors['shortname'] = get_string('errorexistsroleshortname', 'core_role');
}
// Role name.
$name = optional_param('name', null, PARAM_TEXT);
if (!is_null($name)) {
$this->role->name = $name;
// Hack: short names of standard roles are equal to archetypes, empty name means localised via lang packs.
$archetypes = get_role_archetypes();
if (!isset($archetypes[$shortname]) and html_is_blank($this->role->name)) {
$this->errors['name'] = get_string('errorbadrolename', 'core_role');
}
}
if ($this->role->name !== '' and $DB->record_exists_select('role', 'name = ? and id <> ?', array($this->role->name, $this->roleid))) {
$this->errors['name'] = get_string('errorexistsrolename', 'core_role');
}
// Description.
$description = optional_param('description', null, PARAM_RAW);
if (!is_null($description)) {
$this->role->description = $description;
}
// Legacy type.
$archetype = optional_param('archetype', null, PARAM_RAW);
if (isset($archetype)) {
$archetypes = get_role_archetypes();
if (isset($archetypes[$archetype])) {
$this->role->archetype = $archetype;
} else {
$this->role->archetype = '';
}
}
// Assignable context levels.
foreach ($this->allcontextlevels as $cl => $notused) {
$assignable = optional_param('contextlevel' . $cl, null, PARAM_BOOL);
if (!is_null($assignable)) {
if ($assignable) {
$this->contextlevels[$cl] = $cl;
} else {
unset($this->contextlevels[$cl]);
}
}
}
// Allowed roles.
$allow = optional_param_array('allowassign', null, PARAM_INT);
if (!is_null($allow)) {
$this->allowassign = $allow;
}
$allow = optional_param_array('allowoverride', null, PARAM_INT);
if (!is_null($allow)) {
$this->allowoverride = $allow;
}
$allow = optional_param_array('allowswitch', null, PARAM_INT);
if (!is_null($allow)) {
$this->allowswitch = $allow;
}
// Now read the permissions for each capability.
parent::read_submitted_permissions();
}
public function is_submission_valid() {
return empty($this->errors);
}
/**
* Call this after the table has been initialised,
* this resets everything to that role.
*
* @param int $roleid role id or 0 for no role
* @param array $options array with following keys:
* 'name', 'shortname', 'description', 'permissions', 'archetype',
* 'contextlevels', 'allowassign', 'allowoverride', 'allowswitch'
*/
public function force_duplicate($roleid, array $options) {
global $DB;
if ($roleid == 0) {
// This means reset to nothing == remove everything.
if ($options['shortname']) {
$this->role->shortname = '';
}
if ($options['name']) {
$this->role->name = '';
}
if ($options['description']) {
$this->role->description = '';
}
if ($options['archetype']) {
$this->role->archetype = '';
}
if ($options['contextlevels']) {
$this->contextlevels = array();
}
if ($options['allowassign']) {
$this->allowassign = array();
}
if ($options['allowoverride']) {
$this->allowoverride = array();
}
if ($options['allowswitch']) {
$this->allowswitch = array();
}
if ($options['permissions']) {
foreach ($this->capabilities as $capid => $cap) {
$this->permissions[$cap->name] = CAP_INHERIT;
}
}
return;
}
$role = $DB->get_record('role', array('id'=>$roleid), '*', MUST_EXIST);
if ($options['shortname']) {
$this->role->shortname = $role->shortname;
}
if ($options['name']) {
$this->role->name = $role->name;
}
if ($options['description']) {
$this->role->description = $role->description;
}
if ($options['archetype']) {
$this->role->archetype = $role->archetype;
}
if ($options['contextlevels']) {
$this->contextlevels = array();
$levels = get_role_contextlevels($roleid);
foreach ($levels as $cl) {
$this->contextlevels[$cl] = $cl;
}
}
if ($options['allowassign']) {
$this->allowassign = array_keys($this->get_allow_roles_list('assign', $roleid));
}
if ($options['allowoverride']) {
$this->allowoverride = array_keys($this->get_allow_roles_list('override', $roleid));
}
if ($options['allowswitch']) {
$this->allowswitch = array_keys($this->get_allow_roles_list('switch', $roleid));
}
if ($options['permissions']) {
$this->permissions = $DB->get_records_menu('role_capabilities',
array('roleid' => $roleid, 'contextid' => context_system::instance()->id),
'', 'capability,permission');
foreach ($this->capabilities as $capid => $cap) {
if (!isset($this->permissions[$cap->name])) {
$this->permissions[$cap->name] = CAP_INHERIT;
}
}
}
}
/**
* Change the role definition to match given archetype.
*
* @param string $archetype
* @param array $options array with following keys:
* 'name', 'shortname', 'description', 'permissions', 'archetype',
* 'contextlevels', 'allowassign', 'allowoverride', 'allowswitch'
*/
public function force_archetype($archetype, array $options) {
$archetypes = get_role_archetypes();
if (!isset($archetypes[$archetype])) {
throw new coding_exception('Unknown archetype: '.$archetype);
}
if ($options['shortname']) {
$this->role->shortname = '';
}
if ($options['name']) {
$this->role->name = '';
}
if ($options['description']) {
$this->role->description = '';
}
if ($options['archetype']) {
$this->role->archetype = $archetype;
}
if ($options['contextlevels']) {
$this->contextlevels = array();
$defaults = get_default_contextlevels($archetype);
foreach ($defaults as $cl) {
$this->contextlevels[$cl] = $cl;
}
}
if ($options['allowassign']) {
$this->allowassign = get_default_role_archetype_allows('assign', $archetype);
}
if ($options['allowoverride']) {
$this->allowoverride = get_default_role_archetype_allows('override', $archetype);
}
if ($options['allowswitch']) {
$this->allowswitch = get_default_role_archetype_allows('switch', $archetype);
}
if ($options['permissions']) {
$defaultpermissions = get_default_capabilities($archetype);
foreach ($this->permissions as $k => $v) {
if (isset($defaultpermissions[$k])) {
$this->permissions[$k] = $defaultpermissions[$k];
continue;
}
$this->permissions[$k] = CAP_INHERIT;
}
}
}
/**
* Change the role definition to match given preset.
*
* @param string $xml
* @param array $options array with following keys:
* 'name', 'shortname', 'description', 'permissions', 'archetype',
* 'contextlevels', 'allowassign', 'allowoverride', 'allowswitch'
*/
public function force_preset($xml, array $options) {
if (!$info = core_role_preset::parse_preset($xml)) {
throw new coding_exception('Invalid role preset');
}
if ($options['shortname']) {
if (isset($info['shortname'])) {
$this->role->shortname = $info['shortname'];
}
}
if ($options['name']) {
if (isset($info['name'])) {
$this->role->name = $info['name'];
}
}
if ($options['description']) {
if (isset($info['description'])) {
$this->role->description = $info['description'];
}
}
if ($options['archetype']) {
if (isset($info['archetype'])) {
$this->role->archetype = $info['archetype'];
}
}
if ($options['contextlevels']) {
if (isset($info['contextlevels'])) {
$this->contextlevels = $info['contextlevels'];
}
}
foreach (array('assign', 'override', 'switch') as $type) {
if ($options['allow'.$type]) {
if (isset($info['allow'.$type])) {
$this->{'allow'.$type} = $info['allow'.$type];
}
}
}
if ($options['permissions']) {
foreach ($this->permissions as $k => $v) {
// Note: do not set everything else to CAP_INHERIT here
// because the xml file might not contain all capabilities.
if (isset($info['permissions'][$k])) {
$this->permissions[$k] = $info['permissions'][$k];
}
}
}
}
public function get_role_name() {
return $this->role->name;
}
public function get_role_id() {
return $this->role->id;
}
public function get_archetype() {
return $this->role->archetype;
}
protected function load_parent_permissions() {
$this->parentpermissions = get_default_capabilities($this->role->archetype);
}
public function save_changes() {
global $DB;
if (!$this->roleid) {
// Creating role.
$this->role->id = create_role($this->role->name, $this->role->shortname, $this->role->description, $this->role->archetype);
$this->roleid = $this->role->id; // Needed to make the parent::save_changes(); call work.
} else {
// Updating role.
$DB->update_record('role', $this->role);
}
// Assignable contexts.
set_role_contextlevels($this->role->id, $this->contextlevels);
// Set allowed roles.
$this->save_allow('assign');
$this->save_allow('override');
$this->save_allow('switch');
// Permissions.
parent::save_changes();
}
protected function save_allow($type) {
global $DB;
$current = array_keys($this->get_allow_roles_list($type));
$wanted = $this->{'allow'.$type};
$addfunction = 'allow_'.$type;
$deltable = 'role_allow_'.$type;
$field = 'allow'.$type;
foreach ($current as $roleid) {
if (!in_array($roleid, $wanted)) {
$DB->delete_records($deltable, array('roleid'=>$this->roleid, $field=>$roleid));
continue;
}
$key = array_search($roleid, $wanted);
unset($wanted[$key]);
}
foreach ($wanted as $roleid) {
if ($roleid == -1) {
$roleid = $this->roleid;
}
$addfunction($this->roleid, $roleid);
}
}
protected function get_name_field($id) {
return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->name) . '" />';
}
protected function get_shortname_field($id) {
return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->shortname) . '" />';
}
protected function get_description_field($id) {
return print_textarea(true, 10, 50, 50, 10, 'description', $this->role->description, 0, true);
}
protected function get_archetype_field($id) {
$options = array();
$options[''] = get_string('none');
foreach (get_role_archetypes() as $type) {
$options[$type] = get_string('archetype'.$type, 'role');
}
return html_writer::select($options, 'archetype', $this->role->archetype, false);
}
protected function get_assignable_levels_control() {
$output = '';
foreach ($this->allcontextlevels as $cl => $clname) {
$extraarguments = $this->disabled;
if (in_array($cl, $this->contextlevels)) {
$extraarguments .= 'checked="checked" ';
}
if (!$this->disabled) {
$output .= '<input type="hidden" name="contextlevel' . $cl . '" value="0" />';
}
$output .= '<input type="checkbox" id="cl' . $cl . '" name="contextlevel' . $cl .
'" value="1" ' . $extraarguments . '/> ';
$output .= '<label for="cl' . $cl . '">' . $clname . "</label><br />\n";
}
return $output;
}
/**
* Returns an array of roles of the allowed type.
*
* @param string $type Must be one of: assign, switch, or override.
* @param int $roleid (null means current role)
* @return array
*/
protected function get_allow_roles_list($type, $roleid = null) {
global $DB;
if ($type !== 'assign' and $type !== 'switch' and $type !== 'override') {
debugging('Invalid role allowed type specified', DEBUG_DEVELOPER);
return array();
}
if ($roleid === null) {
$roleid = $this->roleid;
}
if (empty($roleid)) {
return array();
}
$sql = "SELECT r.*
FROM {role} r
JOIN {role_allow_{$type}} a ON a.allow{$type} = r.id
WHERE a.roleid = :roleid
ORDER BY r.sortorder ASC";
return $DB->get_records_sql($sql, array('roleid'=>$roleid));
}
/**
* Returns an array of roles with the allowed type.
*
* @param string $type Must be one of: assign, switch, or override.
* @return array Am array of role names with the allowed type
*/
protected function get_allow_role_control($type) {
if ($type !== 'assign' and $type !== 'switch' and $type !== 'override') {
debugging('Invalid role allowed type specified', DEBUG_DEVELOPER);
return '';
}
$property = 'allow'.$type;
$selected = $this->$property;
$options = array();
foreach (role_get_names(null, ROLENAME_ALIAS) as $role) {
$options[$role->id] = $role->localname;
}
if ($this->roleid == 0) {
$options[-1] = get_string('thisnewrole', 'core_role');
}
return html_writer::select($options, 'allow'.$type.'[]', $selected, false, array('multiple'=>'multiple', 'size'=>10));
}
/**
* Returns information about the risks associated with a role.
*
* @return string
*/
protected function get_role_risks_info() {
return '';
}
protected function print_field($name, $caption, $field) {
global $OUTPUT;
// Attempt to generate HTML like formslib.
echo '<div class="fitem">';
echo '<div class="fitemtitle">';
if ($name) {
echo '<label for="' . $name . '">';
}
echo $caption;
if ($name) {
echo "</label>\n";
}
echo '</div>';
if (isset($this->errors[$name])) {
$extraclass = ' error';
} else {
$extraclass = '';
}
echo '<div class="felement' . $extraclass . '">';
echo $field;
if (isset($this->errors[$name])) {
echo $OUTPUT->error_text($this->errors[$name]);
}
echo '</div>';
echo '</div>';
}
protected function print_show_hide_advanced_button() {
echo '<p class="definenotice">' . get_string('highlightedcellsshowdefault', 'core_role') . ' </p>';
echo '<div class="advancedbutton">';
echo '<input type="submit" name="toggleadvanced" value="' . get_string('hideadvanced', 'form') . '" />';
echo '</div>';
}
public function display() {
global $OUTPUT;
// Extra fields at the top of the page.
echo '<div class="topfields clearfix">';
$this->print_field('shortname', get_string('roleshortname', 'core_role').'&nbsp;'.$OUTPUT->help_icon('roleshortname', 'core_role'), $this->get_shortname_field('shortname'));
$this->print_field('name', get_string('customrolename', 'core_role').'&nbsp;'.$OUTPUT->help_icon('customrolename', 'core_role'), $this->get_name_field('name'));
$this->print_field('edit-description', get_string('customroledescription', 'core_role').'&nbsp;'.$OUTPUT->help_icon('customroledescription', 'core_role'),
$this->get_description_field('description'));
$this->print_field('menuarchetype', get_string('archetype', 'core_role').'&nbsp;'.$OUTPUT->help_icon('archetype', 'core_role'), $this->get_archetype_field('archetype'));
$this->print_field('', get_string('maybeassignedin', 'core_role'), $this->get_assignable_levels_control());
$this->print_field('menuallowassign', get_string('allowassign', 'core_role'), $this->get_allow_role_control('assign'));
$this->print_field('menuallowoverride', get_string('allowoverride', 'core_role'), $this->get_allow_role_control('override'));
$this->print_field('menuallowswitch', get_string('allowswitch', 'core_role'), $this->get_allow_role_control('switch'));
if ($risks = $this->get_role_risks_info()) {
$this->print_field('', get_string('rolerisks', 'core_role'), $risks);
}
echo "</div>";
$this->print_show_hide_advanced_button();
// Now the permissions table.
parent::display();
}
protected function add_permission_cells($capability) {
// One cell for each possible permission.
foreach ($this->displaypermissions as $perm => $permname) {
$strperm = $this->strperms[$permname];
$extraclass = '';
if ($perm == $this->parentpermissions[$capability->name]) {
$extraclass = ' capdefault';
}
$checked = '';
if ($this->permissions[$capability->name] == $perm) {
$checked = 'checked="checked" ';
}
echo '<td class="' . $permname . $extraclass . '">';
echo '<label><input type="radio" name="' . $capability->name .
'" value="' . $perm . '" ' . $checked . '/> ';
echo '<span class="note">' . $strperm . '</span>';
echo '</label></td>';
}
}
}
@@ -0,0 +1,63 @@
<?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/>.
/**
* Library code used by the roles administration interfaces.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
class core_role_define_role_table_basic extends core_role_define_role_table_advanced {
protected $stradvmessage;
protected $strallow;
public function __construct($context, $roleid) {
parent::__construct($context, $roleid);
$this->displaypermissions = array(CAP_ALLOW => $this->allpermissions[CAP_ALLOW]);
$this->stradvmessage = get_string('useshowadvancedtochange', 'core_role');
$this->strallow = $this->strperms[$this->allpermissions[CAP_ALLOW]];
}
protected function print_show_hide_advanced_button() {
echo '<div class="advancedbutton">';
echo '<input type="submit" name="toggleadvanced" value="' . get_string('showadvanced', 'form') . '" />';
echo '</div>';
}
protected function add_permission_cells($capability) {
$perm = $this->permissions[$capability->name];
$permname = $this->allpermissions[$perm];
$defaultperm = $this->allpermissions[$this->parentpermissions[$capability->name]];
echo '<td class="' . $permname . '">';
if ($perm == CAP_ALLOW || $perm == CAP_INHERIT) {
$checked = '';
if ($perm == CAP_ALLOW) {
$checked = 'checked="checked" ';
}
echo '<input type="hidden" name="' . $capability->name . '" value="' . CAP_INHERIT . '" />';
echo '<label><input type="checkbox" name="' . $capability->name .
'" value="' . CAP_ALLOW . '" ' . $checked . '/> ' . $this->strallow . '</label>';
} else {
echo '<input type="hidden" name="' . $capability->name . '" value="' . $perm . '" />';
echo $this->strperms[$permname] . '<span class="note">' . $this->stradvmessage . '</span>';
}
echo '</td>';
}
}
@@ -0,0 +1,144 @@
<?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/>.
/**
* Existing user selector.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* User selector subclass for the list of users who already have the role in
* question on the assign roles page.
*/
class core_role_existing_role_holders extends core_role_assign_user_selector_base {
public function find_users($search) {
global $DB;
list($wherecondition, $params) = $this->search_sql($search, 'u');
list($ctxcondition, $ctxparams) = $DB->get_in_or_equal($this->context->get_parent_context_ids(true), SQL_PARAMS_NAMED, 'ctx');
$params = array_merge($params, $ctxparams);
$params['roleid'] = $this->roleid;
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext);
$params = array_merge($params, $sortparams);
$sql = "SELECT ra.id AS raid," . $this->required_fields_sql('u') . ",ra.contextid,ra.component
FROM {role_assignments} ra
JOIN {user} u ON u.id = ra.userid
JOIN {context} ctx ON ra.contextid = ctx.id
WHERE $wherecondition
AND ctx.id $ctxcondition
AND ra.roleid = :roleid
ORDER BY ctx.depth DESC, ra.component, $sort";
$contextusers = $DB->get_records_sql($sql, $params);
// No users at all.
if (empty($contextusers)) {
return array();
}
// We have users. Out put them in groups by context depth.
// To help the loop below, tack a dummy user on the end of the results
// array, to trigger output of the last group.
$dummyuser = new stdClass;
$dummyuser->contextid = 0;
$dummyuser->id = 0;
$dummyuser->component = '';
$contextusers[] = $dummyuser;
$results = array(); // The results array we are building up.
$doneusers = array(); // Ensures we only list each user at most once.
$currentcontextid = $this->context->id;
$currentgroup = array();
foreach ($contextusers as $user) {
if (isset($doneusers[$user->id])) {
continue;
}
$doneusers[$user->id] = 1;
if ($user->contextid != $currentcontextid) {
// We have got to the end of the previous group. Add it to the results array.
if ($currentcontextid == $this->context->id) {
$groupname = $this->this_con_group_name($search, count($currentgroup));
} else {
$groupname = $this->parent_con_group_name($search, $currentcontextid);
}
$results[$groupname] = $currentgroup;
// Get ready for the next group.
$currentcontextid = $user->contextid;
$currentgroup = array();
}
// Add this user to the group we are building up.
unset($user->contextid);
if ($currentcontextid != $this->context->id) {
$user->disabled = true;
}
if ($user->component !== '') {
// Bad luck, you can tweak only manual role assignments.
$user->disabled = true;
}
unset($user->component);
$currentgroup[$user->id] = $user;
}
return $results;
}
protected function this_con_group_name($search, $numusers) {
if ($this->context->contextlevel == CONTEXT_SYSTEM) {
// Special case in the System context.
if ($search) {
return get_string('extusersmatching', 'core_role', $search);
} else {
return get_string('extusers', 'core_role');
}
}
$contexttype = context_helper::get_level_name($this->context->contextlevel);
if ($search) {
$a = new stdClass;
$a->search = $search;
$a->contexttype = $contexttype;
if ($numusers) {
return get_string('usersinthisxmatching', 'core_role', $a);
} else {
return get_string('noneinthisxmatching', 'core_role', $a);
}
} else {
if ($numusers) {
return get_string('usersinthisx', 'core_role', $contexttype);
} else {
return get_string('noneinthisx', 'core_role', $contexttype);
}
}
}
protected function parent_con_group_name($search, $contextid) {
$context = context::instance_by_id($contextid);
$contextname = $context->get_context_name(true, true);
if ($search) {
$a = new stdClass;
$a->contextname = $contextname;
$a->search = $search;
return get_string('usersfrommatching', 'core_role', $a);
} else {
return get_string('usersfrom', 'core_role', $contextname);
}
}
}
@@ -0,0 +1,102 @@
<?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/>.
/**
* override permissions table.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
class core_role_override_permissions_table_advanced extends core_role_capability_table_with_risks {
protected $strnotset;
protected $haslockedcapabilities = false;
/**
* Constructor.
*
* This method loads loads all the information about the current state of
* the overrides, then updates that based on any submitted data. It also
* works out which capabilities should be locked for this user.
*
* @param object $context the context this table relates to.
* @param integer $roleid the role being overridden.
* @param boolean $safeoverridesonly If true, the user is only allowed to override
* capabilities with no risks.
*/
public function __construct($context, $roleid, $safeoverridesonly) {
parent::__construct($context, 'overriderolestable', $roleid);
$this->displaypermissions = $this->allpermissions;
$this->strnotset = get_string('notset', 'core_role');
// Determine which capabilities should be locked.
if ($safeoverridesonly) {
foreach ($this->capabilities as $capid => $cap) {
if (!is_safe_capability($cap)) {
$this->capabilities[$capid]->locked = true;
$this->haslockedcapabilities = true;
}
}
}
}
protected function load_parent_permissions() {
// Get the capabilities from the parent context, so that can be shown in the interface.
$parentcontext = $this->context->get_parent_context();
$this->parentpermissions = role_context_capabilities($this->roleid, $parentcontext);
}
public function has_locked_capabilities() {
return $this->haslockedcapabilities;
}
protected function add_permission_cells($capability) {
$disabled = '';
if ($capability->locked || $this->parentpermissions[$capability->name] == CAP_PROHIBIT) {
$disabled = ' disabled="disabled"';
}
// One cell for each possible permission.
foreach ($this->displaypermissions as $perm => $permname) {
$strperm = $this->strperms[$permname];
$extraclass = '';
if ($perm != CAP_INHERIT && $perm == $this->parentpermissions[$capability->name]) {
$extraclass = ' capcurrent';
}
$checked = '';
if ($this->permissions[$capability->name] == $perm) {
$checked = 'checked="checked" ';
}
echo '<td class="' . $permname . $extraclass . '">';
echo '<label><input type="radio" name="' . $capability->name .
'" value="' . $perm . '" ' . $checked . $disabled . '/> ';
if ($perm == CAP_INHERIT) {
$inherited = $this->parentpermissions[$capability->name];
if ($inherited == CAP_INHERIT) {
$inherited = $this->strnotset;
} else {
$inherited = $this->strperms[$this->allpermissions[$inherited]];
}
$strperm .= ' (' . $inherited . ')';
}
echo '<span class="note">' . $strperm . '</span>';
echo '</label></td>';
}
}
}
@@ -0,0 +1,66 @@
<?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/>.
/**
* Allow something form.
*
* @package core_role
* @copyright 2009 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/formslib.php");
class core_role_permission_allow_form extends moodleform {
/**
* Define the form.
*/
protected function definition() {
global $CFG;
$mform = $this->_form;
list($context, $capability, $overridableroles) = $this->_customdata;
list($needed, $forbidden) = get_roles_with_cap_in_context($context, $capability->name);
foreach ($needed as $id => $unused) {
unset($overridableroles[$id]);
}
foreach ($forbidden as $id => $unused) {
unset($overridableroles[$id]);
}
$mform->addElement('header', 'allowheader', get_string('roleallowheader', 'core_role'));
$mform->addElement('select', 'roleid', get_string('roleselect', 'core_role'), $overridableroles);
$mform->addElement('hidden', 'capability');
$mform->setType('capability', PARAM_CAPABILITY);
$mform->setDefault('capability', $capability->name);
$mform->addElement('hidden', 'contextid');
$mform->setType('contextid', PARAM_INT);
$mform->setDefault('contextid', $context->id);
$mform->addElement('hidden', 'allow');
$mform->setType('allow', PARAM_INT);
$mform->setDefault('allow', 1);
$this->add_action_buttons(true, get_string('allow', 'core_role'));
}
}
@@ -0,0 +1,64 @@
<?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/>.
/**
* Prohibit something form.
*
* @package core_role
* @copyright 2009 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/formslib.php");
class core_role_permission_prohibit_form extends moodleform {
/**
* Define the form.
*/
protected function definition() {
global $CFG;
$mform = $this->_form;
list($context, $capability, $overridableroles) = $this->_customdata;
list($needed, $forbidden) = get_roles_with_cap_in_context($context, $capability->name);
foreach ($forbidden as $id => $unused) {
unset($overridableroles[$id]);
}
$mform->addElement('header', 'ptohibitheader', get_string('roleprohibitheader', 'core_role'));
$mform->addElement('select', 'roleid', get_string('roleselect', 'core_role'), $overridableroles);
$mform->addElement('hidden', 'capability');
$mform->setType('capability', PARAM_CAPABILITY);
$mform->setDefault('capability', $capability->name);
$mform->addElement('hidden', 'contextid');
$mform->setType('contextid', PARAM_INT);
$mform->setDefault('contextid', $context->id);
$mform->addElement('hidden', 'prohibit');
$mform->setType('prohibit', PARAM_INT);
$mform->setDefault('prohibit', 1);
$this->add_action_buttons(true, get_string('prohibit', 'core_role'));
}
}
+150
View File
@@ -0,0 +1,150 @@
<?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/>.
/**
* Library code used by the roles administration interfaces.
*
* @package core_role
* @copyright 2009 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Subclass of core_role_capability_table_base for use on the Permissions page.
*/
class core_role_permissions_table extends core_role_capability_table_base {
protected $contextname;
protected $allowoverrides;
protected $allowsafeoverrides;
protected $overridableroles;
protected $roles;
protected $icons = array();
/**
* Constructor.
* @param context $context the context this table relates to.
* @param string $contextname $context->get_context_name() - to save recomputing.
* @param array $allowoverrides
* @param array $allowsafeoverrides
* @param array $overridableroles
*/
public function __construct($context, $contextname, $allowoverrides, $allowsafeoverrides, $overridableroles) {
parent::__construct($context, 'permissions');
$this->contextname = $contextname;
$this->allowoverrides = $allowoverrides;
$this->allowsafeoverrides = $allowsafeoverrides;
$this->overridableroles = $overridableroles;
$roles = get_all_roles($context);
$this->roles = role_fix_names(array_reverse($roles, true), $context, ROLENAME_ALIAS, true);
}
protected function add_header_cells() {
echo '<th>' . get_string('risks', 'core_role') . '</th>';
echo '<th>' . get_string('neededroles', 'core_role') . '</th>';
echo '<th>' . get_string('prohibitedroles', 'core_role') . '</th>';
}
protected function num_extra_columns() {
return 3;
}
protected function add_row_cells($capability) {
global $OUTPUT, $PAGE;
$context = $this->context;
$contextid = $this->context->id;
$allowoverrides = $this->allowoverrides;
$allowsafeoverrides = $this->allowsafeoverrides;
$overridableroles = $this->overridableroles;
$roles = $this->roles;
list($needed, $forbidden) = get_roles_with_cap_in_context($context, $capability->name);
$neededroles = array();
$forbiddenroles = array();
$allowable = $overridableroles;
$forbitable = $overridableroles;
foreach ($neededroles as $id => $unused) {
unset($allowable[$id]);
}
foreach ($forbidden as $id => $unused) {
unset($allowable[$id]);
unset($forbitable[$id]);
}
foreach ($roles as $id => $name) {
if (isset($needed[$id])) {
$neededroles[$id] = $roles[$id];
if (isset($overridableroles[$id]) and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$preventurl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'roleid'=>$id, 'capability'=>$capability->name, 'prevent'=>1));
$neededroles[$id] .= $OUTPUT->action_icon($preventurl, new pix_icon('t/delete', get_string('prevent', 'core_role')));
}
}
}
$neededroles = implode(', ', $neededroles);
foreach ($roles as $id => $name) {
if (isset($forbidden[$id]) and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$forbiddenroles[$id] = $roles[$id];
if (isset($overridableroles[$id]) and prohibit_is_removable($id, $context, $capability->name)) {
$unprohibiturl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'roleid'=>$id, 'capability'=>$capability->name, 'unprohibit'=>1));
$forbiddenroles[$id] .= $OUTPUT->action_icon($unprohibiturl, new pix_icon('t/delete', get_string('delete')));
}
}
}
$forbiddenroles = implode(', ', $forbiddenroles);
if ($allowable and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$allowurl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'capability'=>$capability->name, 'allow'=>1));
$neededroles .= '<div class="allowmore">'.$OUTPUT->action_icon($allowurl, new pix_icon('t/add', get_string('allow', 'core_role'))).'</div>';
}
if ($forbitable and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$prohibiturl = new moodle_url($PAGE->url, array('contextid'=>$contextid, 'capability'=>$capability->name, 'prohibit'=>1));
$forbiddenroles .= '<div class="prohibitmore">'.$OUTPUT->action_icon($prohibiturl, new pix_icon('t/add', get_string('prohibit', 'core_role'))).'</div>';
}
$risks = $this->get_risks($capability);
echo '<td>' . $risks . '</td>';
echo '<td>' . $neededroles . '</td>';
echo '<td>' . $forbiddenroles . '</td>';
}
protected function get_risks($capability) {
global $OUTPUT;
$allrisks = get_all_risks();
$risksurl = new moodle_url(get_docs_url(s(get_string('risks', 'core_role'))));
$return = '';
foreach ($allrisks as $type => $risk) {
if ($risk & (int)$capability->riskbitmask) {
if (!isset($this->icons[$type])) {
$pixicon = new pix_icon('/i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
$this->icons[$type] = $OUTPUT->action_icon($risksurl, $pixicon, new popup_action('click', $risksurl));
}
$return .= $this->icons[$type];
}
}
return $return;
}
}
@@ -0,0 +1,85 @@
<?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/>.
/**
* Library code used by the roles administration interfaces.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* User selector subclass for the list of potential users on the assign roles page,
* when we are assigning in a context below the course level. (CONTEXT_MODULE and
* some CONTEXT_BLOCK).
*
* This returns only enrolled users in this context.
*/
class core_role_potential_assignees_below_course extends core_role_assign_user_selector_base {
public function find_users($search) {
global $DB;
list($enrolsql, $eparams) = get_enrolled_sql($this->context);
// Now we have to go to the database.
list($wherecondition, $params) = $this->search_sql($search, 'u');
$params = array_merge($params, $eparams);
if ($wherecondition) {
$wherecondition = ' AND ' . $wherecondition;
}
$fields = 'SELECT ' . $this->required_fields_sql('u');
$countfields = 'SELECT COUNT(u.id)';
$sql = " FROM {user} u
LEFT JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.roleid = :roleid AND ra.contextid = :contextid)
WHERE u.id IN ($enrolsql)
$wherecondition
AND ra.id IS NULL";
$params['contextid'] = $this->context->id;
$params['roleid'] = $this->roleid;
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext);
$order = ' ORDER BY ' . $sort;
// Check to see if there are too many to show sensibly.
if (!$this->is_validating()) {
$potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params);
if ($potentialmemberscount > $this->maxusersperpage) {
return $this->too_many_results($search, $potentialmemberscount);
}
}
// If not, show them.
$availableusers = $DB->get_records_sql($fields . $sql . $order, array_merge($params, $sortparams));
if (empty($availableusers)) {
return array();
}
if ($search) {
$groupname = get_string('potusersmatching', 'core_role', $search);
} else {
$groupname = get_string('potusers', 'core_role');
}
return array($groupname => $availableusers);
}
}
@@ -0,0 +1,76 @@
<?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/>.
/**
* Library code used by the roles administration interfaces.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* User selector subclass for the list of potential users on the assign roles page,
* when we are assigning in a context at or above the course level. In this case we
* show all the users in the system who do not already have the role.
*/
class core_role_potential_assignees_course_and_above extends core_role_assign_user_selector_base {
public function find_users($search) {
global $DB;
list($wherecondition, $params) = $this->search_sql($search, '');
$fields = 'SELECT ' . $this->required_fields_sql('');
$countfields = 'SELECT COUNT(1)';
$sql = " FROM {user}
WHERE $wherecondition
AND id NOT IN (
SELECT r.userid
FROM {role_assignments} r
WHERE r.contextid = :contextid
AND r.roleid = :roleid)";
list($sort, $sortparams) = users_order_by_sql('', $search, $this->accesscontext);
$order = ' ORDER BY ' . $sort;
$params['contextid'] = $this->context->id;
$params['roleid'] = $this->roleid;
if (!$this->is_validating()) {
$potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params);
if ($potentialmemberscount > $this->maxusersperpage) {
return $this->too_many_results($search, $potentialmemberscount);
}
}
$availableusers = $DB->get_records_sql($fields . $sql . $order, array_merge($params, $sortparams));
if (empty($availableusers)) {
return array();
}
if ($search) {
$groupname = get_string('potusersmatching', 'core_role', $search);
} else {
$groupname = get_string('potusers', 'core_role');
}
return array($groupname => $availableusers);
}
}
+314
View File
@@ -0,0 +1,314 @@
<?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/>.
/**
* New role XML processing.
*
* @package core_role
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* XML role file manipulation class.
*
* @package core_role
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_role_preset {
/**
* Send role export xml file to browser.
*
* @param int $roleid
* @return void does not return, send the file to output
*/
public static function send_export_xml($roleid) {
global $CFG, $DB;
require_once($CFG->libdir . '/filelib.php');
$role = $DB->get_record('role', array('id'=>$roleid), '*', MUST_EXIST);
if ($role->shortname) {
$filename = $role->shortname.'.xml';
} else {
$filename = 'role.xml';
}
$xml = self::get_export_xml($roleid);
send_file($xml, $filename, 0, false, true, true);
die();
}
/**
* Generate role export xml file.
*
* @param $roleid
* @return string
*/
public static function get_export_xml($roleid) {
global $DB;
$role = $DB->get_record('role', array('id'=>$roleid), '*', MUST_EXIST);
$dom = new DOMDocument('1.0', 'UTF-8');
$top = $dom->createElement('role');
$dom->appendChild($top);
$top->appendChild($dom->createElement('shortname', $role->shortname));
$top->appendChild($dom->createElement('name', $role->name));
$top->appendChild($dom->createElement('description', $role->description));
$top->appendChild($dom->createElement('archetype', $role->archetype));
$contextlevels = $dom->createElement('contextlevels');
$top->appendChild($contextlevels);
foreach (get_role_contextlevels($roleid) as $level) {
$name = context_helper::get_class_for_level($level);
$name = preg_replace('/^context_/', '', $name);
$contextlevels->appendChild($dom->createElement('level', $name));
}
foreach (array('assign', 'override', 'switch') as $type) {
$allows = $dom->createElement('allow'.$type);
$top->appendChild($allows);
$records = $DB->get_records('role_allow_'.$type, array('roleid'=>$roleid), "allow$type ASC");
foreach ($records as $record) {
if (!$ar = $DB->get_record('role', array('id'=>$record->{'allow'.$type}))) {
continue;
}
$allows->appendChild($dom->createElement('shortname', $ar->shortname));
}
}
$permissions = $dom->createElement('permissions');
$top->appendChild($permissions);
$capabilities = $DB->get_records_sql_menu(
"SELECT capability, permission
FROM {role_capabilities}
WHERE contextid = :syscontext AND roleid = :roleid
ORDER BY capability ASC",
array('syscontext'=>context_system::instance()->id, 'roleid'=>$roleid));
$allcapabilities = $DB->get_records('capabilities', array(), 'name ASC');
foreach ($allcapabilities as $cap) {
if (!isset($capabilities[$cap->name])) {
$permissions->appendChild($dom->createElement('inherit', $cap->name));
}
}
foreach ($capabilities as $capability => $permission) {
if ($permission == CAP_ALLOW) {
$permissions->appendChild($dom->createElement('allow', $capability));
}
}
foreach ($capabilities as $capability => $permission) {
if ($permission == CAP_PREVENT) {
$permissions->appendChild($dom->createElement('prevent', $capability));
}
}
foreach ($capabilities as $capability => $permission) {
if ($permission == CAP_PROHIBIT) {
$permissions->appendChild($dom->createElement('prohibit', $capability));
}
}
return $dom->saveXML();
}
/**
* Is this XML valid role preset?
*
* @param string $xml
* @return bool
*/
public static function is_valid_preset($xml) {
$dom = new DOMDocument();
if (!$dom->loadXML($xml)) {
return false;
} else {
$val = @$dom->schemaValidate(__DIR__.'/../role_schema.xml');
if (!$val) {
return false;
}
}
return true;
}
/**
* Parse role preset xml file.
*
* @param string $xml
* @return array role info, null on error
*/
public static function parse_preset($xml) {
global $DB;
$info = array();
if (!self::is_valid_preset($xml)) {
return null;
}
$dom = new DOMDocument();
$dom->loadXML($xml);
$info['shortname'] = self::get_node_value($dom, '/role/shortname');
if (isset($info['shortname'])) {
$info['shortname'] = strtolower(clean_param($info['shortname'], PARAM_ALPHANUMEXT));
}
$info['name'] = self::get_node_value($dom, '/role/name');
if (isset($value)) {
$info['name'] = clean_param($info['name'], PARAM_TEXT);
}
$info['description'] = self::get_node_value($dom, '/role/description');
if (isset($value)) {
$info['description'] = clean_param($info['description'], PARAM_CLEANHTML);
}
$info['archetype'] = self::get_node_value($dom, '/role/archetype');
if (isset($value)) {
$archetypes = get_role_archetypes();
if (!isset($archetypes[$info['archetype']])) {
$info['archetype'] = null;
}
}
$values = self::get_node_children_values($dom, '/role/contextlevels', 'level');
if (isset($values)) {
$info['contextlevels'] = array();
$levelmap = array_flip(context_helper::get_all_levels());
foreach ($values as $value) {
$level = 'context_'.$value;
if (isset($levelmap[$level])) {
$cl = $levelmap[$level];
$info['contextlevels'][$cl] = $cl;
}
}
}
foreach (array('assign', 'override', 'switch') as $type) {
$values = self::get_node_children_values($dom, '/role/allow'.$type, 'shortname');
if (!isset($values)) {
$info['allow'.$type] = null;
continue;
}
$info['allow'.$type] = array();
foreach ($values as $value) {
if ($value === $info['shortname']) {
array_unshift($info['allow'.$type], -1); // Means self.
}
if ($role = $DB->get_record('role', array('shortname'=>$value))) {
$info['allow'.$type][] = $role->id;
continue;
}
}
}
$info['permissions'] = array();
$values = self::get_node_children_values($dom, '/role/permissions', 'inherit');
if (isset($values)) {
foreach ($values as $value) {
if ($value = clean_param($value, PARAM_CAPABILITY)) {
$info['permissions'][$value] = CAP_INHERIT;
}
}
}
$values = self::get_node_children_values($dom, '/role/permissions', 'allow');
if (isset($values)) {
foreach ($values as $value) {
if ($value = clean_param($value, PARAM_CAPABILITY)) {
$info['permissions'][$value] = CAP_ALLOW;
}
}
}
$values = self::get_node_children_values($dom, '/role/permissions', 'prevent');
if (isset($values)) {
foreach ($values as $value) {
if ($value = clean_param($value, PARAM_CAPABILITY)) {
$info['permissions'][$value] = CAP_PREVENT;
}
}
}
$values = self::get_node_children_values($dom, '/role/permissions', 'prohibit');
if (isset($values)) {
foreach ($values as $value) {
if ($value = clean_param($value, PARAM_CAPABILITY)) {
$info['permissions'][$value] = CAP_PROHIBIT;
}
}
}
return $info;
}
protected static function get_node(DOMDocument $dom, $path) {
$parts = explode('/', $path);
$elname = end($parts);
$nodes = $dom->getElementsByTagName($elname);
if ($nodes->length == 0) {
return null;
}
foreach ($nodes as $node) {
if ($node->getNodePath() === $path) {
return $node;
}
}
return null;
}
protected static function get_node_value(DOMDocument $dom, $path) {
if (!$node = self::get_node($dom, $path)) {
return null;
}
return $node->nodeValue;
}
protected static function get_node_children(DOMDocument $dom, $path, $tagname) {
if (!$node = self::get_node($dom, $path)) {
return null;
}
$return = array();
foreach ($node->childNodes as $child) {
if ($child->nodeName === $tagname) {
$return[] = $child;
}
}
return $return;
}
protected static function get_node_children_values(DOMDocument $dom, $path, $tagname) {
$children = self::get_node_children($dom, $path, $tagname);
if ($children === null) {
return null;
}
$return = array();
foreach ($children as $child) {
$return[] = $child->nodeValue;
}
return $return;
}
}
+120
View File
@@ -0,0 +1,120 @@
<?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/>.
/**
* Role add/reset selection form.
*
* @package core_role
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/formslib.php");
/**
* Role add/reset selection form.
*
* @package core_role
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_role_preset_form extends moodleform {
/**
* Definition of this form.
*/
protected function definition() {
$mform = $this->_form;
$data = $this->_customdata;
$options = array();
$group = get_string('other');
$options[$group] = array();
$options[$group][0] = get_string('norole', 'core_role');
$group = get_string('role', 'core');
$options[$group] = array();
foreach (role_get_names(null, ROLENAME_BOTH) as $role) {
// Allow reset to self too, it may be useful when importing incomplete XML preset.
$options[$group][$role->id] = $role->localname;
}
$group = get_string('archetype', 'core_role');
$options[$group] = array();
foreach (get_role_archetypes() as $type) {
$options[$group][$type] = get_string('archetype'.$type, 'core_role');
}
$mform->addElement('header', 'presetheader', get_string('roleresetdefaults', 'core_role'));
$mform->addElement('selectgroups', 'resettype', get_string('roleresetrole', 'core_role'), $options);
$mform->addElement('filepicker', 'rolepreset', get_string('rolerepreset', 'core_role'));
if ($data['roleid']) {
$mform->addElement('header', 'resetheader', get_string('resetrole', 'core_role'));
$mform->addElement('advcheckbox', 'shortname', get_string('roleshortname', 'core_role'));
$mform->addElement('advcheckbox', 'name', get_string('customrolename', 'core_role'));
$mform->addElement('advcheckbox', 'description', get_string('customroledescription', 'core_role'));
$mform->addElement('advcheckbox', 'archetype', get_string('archetype', 'core_role'));
$mform->addElement('advcheckbox', 'contextlevels', get_string('maybeassignedin', 'core_role'));
$mform->addElement('advcheckbox', 'allowassign', get_string('allowassign', 'core_role'));
$mform->addElement('advcheckbox', 'allowoverride', get_string('allowoverride', 'core_role'));
$mform->addElement('advcheckbox', 'allowswitch', get_string('allowswitch', 'core_role'));
$mform->addElement('advcheckbox', 'permissions', get_string('permissions', 'core_role'));
}
$mform->addElement('hidden', 'roleid');
$mform->setType('roleid', PARAM_INT);
$mform->addElement('hidden', 'action');
$mform->setType('action', PARAM_ALPHA);
$mform->addElement('hidden', 'return');
$mform->setType('return', PARAM_ALPHA);
$this->add_action_buttons(true, get_string('continue', 'core'));
$this->set_data($data);
}
/**
* Validate this form.
*
* @param array $data submitted data
* @param array $files not used
* @return array errors
*/
public function validation($data, $files) {
$errors = parent::validation($data, $files);
if ($files = $this->get_draft_files('rolepreset')) {
/** @var stored_file $file */
$file = reset($files);
$xml = $file->get_content();
if (!core_role_preset::is_valid_preset($xml)) {
$errors['rolepreset'] = get_string('invalidpresetfile', 'core_role');
}
}
return $errors;
}
}
@@ -0,0 +1,136 @@
<?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/>.
/**
* Library code used by the roles administration interfaces.
*
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
class core_role_view_role_definition_table extends core_role_define_role_table_advanced {
public function __construct($context, $roleid) {
parent::__construct($context, $roleid);
$this->displaypermissions = array(CAP_ALLOW => $this->allpermissions[CAP_ALLOW]);
$this->disabled = 'disabled="disabled" ';
}
public function save_changes() {
throw new moodle_exception('invalidaccess');
}
protected function get_name_field($id) {
return role_get_name($this->role);
}
protected function get_shortname_field($id) {
return $this->role->shortname;
}
protected function get_description_field($id) {
return role_get_description($this->role);
}
protected function get_archetype_field($id) {
if (empty($this->role->archetype)) {
return get_string('none');
} else {
return get_string('archetype'.$this->role->archetype, 'core_role');
}
}
protected function get_allow_role_control($type) {
if ($roles = $this->get_allow_roles_list($type)) {
$roles = role_fix_names($roles, null, ROLENAME_ORIGINAL, true);
return implode(', ', $roles);
} else {
return get_string('none');
}
}
protected function print_show_hide_advanced_button() {
// Do nothing.
}
/**
* Returns HTML risk icons.
*
* @return string
*/
protected function get_role_risks_info() {
global $OUTPUT;
if (empty($this->roleid)) {
return '';
}
$risks = array();
$allrisks = get_all_risks();
foreach ($this->capabilities as $capability) {
$perm = $this->permissions[$capability->name];
if ($perm != CAP_ALLOW) {
continue;
}
foreach ($allrisks as $type => $risk) {
if ($risk & (int)$capability->riskbitmask) {
$risks[$type] = $risk;
}
}
}
$risksurl = new moodle_url(get_docs_url(s(get_string('risks', 'core_role'))));
foreach ($risks as $type => $risk) {
$pixicon = new pix_icon('/i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
$risks[$type] = $OUTPUT->action_icon($risksurl, $pixicon, new popup_action('click', $risksurl));
}
return implode(' ', $risks);
}
/**
* Returns true if the row should be skipped.
*
* @param string $capability
* @return bool
*/
protected function skip_row($capability) {
$perm = $this->permissions[$capability->name];
if ($perm == CAP_INHERIT) {
// Do not print empty rows in role overview, admins need to know quickly what is allowed and prohibited,
// if they want to see the list of all capabilities they can go to edit role page.
return true;
}
parent::skip_row($capability);
}
protected function add_permission_cells($capability) {
$perm = $this->permissions[$capability->name];
$permname = $this->allpermissions[$perm];
$defaultperm = $this->allpermissions[$this->parentpermissions[$capability->name]];
if ($permname != $defaultperm) {
$default = get_string('defaultx', 'core_role', $this->strperms[$defaultperm]);
} else {
$default = "&#xa0;";
}
echo '<td class="' . $permname . '">' . $this->strperms[$permname] . '<span class="note">' .
$default . '</span></td>';
}
}
+227 -121
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -19,164 +18,271 @@
* Lets the user edit role definitions.
*
* Responds to actions:
* add - add a new role
* duplicate - like add, only initialise the new role by using an existing one.
* add - add a new role (allows import, duplicate, archetype)
* export - save xml role definition
* edit - edit the definition of a role
* view - view the definition of a role
*
* @package core
* @subpackage role
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->libdir.'/adminlib.php');
$action = required_param('action', PARAM_ALPHA);
if (!in_array($action, array('add', 'duplicate', 'edit', 'view'))) {
throw new moodle_exception('invalidaccess');
}
if ($action != 'add') {
$roleid = required_param('roleid', PARAM_INT);
} else {
$roleid = 0;
}
$action = required_param('action', PARAM_ALPHA);
if (!in_array($action, array('add', 'export', 'edit', 'reset', 'view'))) {
throw new moodle_exception('invalidaccess');
}
if ($action != 'add') {
$roleid = required_param('roleid', PARAM_INT);
} else {
$roleid = 0;
}
$resettype = optional_param('resettype', '', PARAM_RAW);
$return = optional_param('return', 'manage', PARAM_ALPHA);
/// Get the base URL for this and related pages into a convenient variable.
$manageurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/manage.php';
$defineurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/define.php';
if ($action == 'duplicate') {
$baseurl = $defineurl . '?action=add';
} else {
$baseurl = $defineurl . '?action=' . $action;
if ($roleid) {
$baseurl .= '&amp;roleid=' . $roleid;
// Get the base URL for this and related pages into a convenient variable.
$baseurl = new moodle_url('/admin/roles/define.php', array('action'=>$action, 'roleid'=>$roleid));
$manageurl = new moodle_url('/admin/roles/manage.php');
if ($return === 'manage') {
$returnurl = $manageurl;
} else {
$returnurl = new moodle_url('/admin/roles/define.php', array('action'=>'view', 'roleid'=>$roleid));;
}
// Check access permissions.
$systemcontext = context_system::instance();
require_login();
require_capability('moodle/role:manage', $systemcontext);
admin_externalpage_setup('defineroles', '', array('action' => $action, 'roleid' => $roleid), new moodle_url('/admin/roles/define.php'));
// Export role.
if ($action === 'export') {
core_role_preset::send_export_xml($roleid);
die;
}
// Handle the toggle advanced mode button.
$showadvanced = get_user_preferences('definerole_showadvanced', false);
if (optional_param('toggleadvanced', false, PARAM_BOOL)) {
$showadvanced = !$showadvanced;
set_user_preference('definerole_showadvanced', $showadvanced);
}
// Get some basic data we are going to need.
$roles = get_all_roles();
$rolenames = role_fix_names($roles, $systemcontext, ROLENAME_ORIGINAL);
$rolescount = count($roles);
if ($action === 'add') {
$title = get_string('addinganewrole', 'core_role');
} else if ($action == 'view') {
$title = get_string('viewingdefinitionofrolex', 'core_role', $rolenames[$roleid]->localname);
} else if ($action == 'reset') {
$title = get_string('resettingrole', 'core_role', $rolenames[$roleid]->localname);
} else {
$title = get_string('editingrolex', 'core_role', $rolenames[$roleid]->localname);
}
// Decide how to create new role.
if ($action === 'add' and $resettype !== 'none') {
$mform = new core_role_preset_form(null, array('action'=>'add', 'roleid'=>0, 'resettype'=>'0', 'return'=>'manage'));
if ($mform->is_cancelled()) {
redirect($manageurl);
} else if ($data = $mform->get_data()) {
$resettype = $data->resettype;
$options = array(
'shortname' => 1,
'name' => 1,
'description' => 1,
'permissions' => 1,
'archetype' => 1,
'contextlevels' => 1,
'allowassign' => 1,
'allowoverride' => 1,
'allowswitch' => 1);
if ($showadvanced) {
$definitiontable = new core_role_define_role_table_advanced($systemcontext, 0);
} else {
$definitiontable = new core_role_define_role_table_basic($systemcontext, 0);
}
if (is_number($resettype)) {
// Duplicate the role.
$definitiontable->force_duplicate($resettype, $options);
} else {
// Must be an archetype.
$definitiontable->force_archetype($resettype, $options);
}
if ($xml = $mform->get_file_content('rolepreset')) {
$definitiontable->force_preset($xml, $options);
}
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help($title, 'roles', 'core_role');
$mform->display();
echo $OUTPUT->footer();
die;
}
/// Check access permissions.
$systemcontext = context_system::instance();
require_login();
require_capability('moodle/role:manage', $systemcontext);
admin_externalpage_setup('defineroles', '', array('action' => $action, 'roleid' => $roleid), $defineurl);
/// Handle the cancel button.
if (optional_param('cancel', false, PARAM_BOOL)) {
} else if ($action === 'reset' and $resettype !== 'none') {
if (!$role = $DB->get_record('role', array('id'=>$roleid))) {
redirect($manageurl);
}
$resettype = empty($role->archetype) ? '0' : $role->archetype;
$mform = new core_role_preset_form(null,
array('action'=>'reset', 'roleid'=>$roleid, 'resettype'=>$resettype , 'permissions'=>1, 'archetype'=>1, 'contextlevels'=>1, 'return'=>$return));
if ($mform->is_cancelled()) {
redirect($returnurl);
/// Handle the toggle advanced mode button.
$showadvanced = get_user_preferences('definerole_showadvanced', false);
if (optional_param('toggleadvanced', false, PARAM_BOOL)) {
$showadvanced = !$showadvanced;
set_user_preference('definerole_showadvanced', $showadvanced);
} else if ($data = $mform->get_data()) {
$resettype = $data->resettype;
$options = array(
'shortname' => $data->shortname,
'name' => $data->name,
'description' => $data->description,
'permissions' => $data->permissions,
'archetype' => $data->archetype,
'contextlevels' => $data->contextlevels,
'allowassign' => $data->allowassign,
'allowoverride' => $data->allowoverride,
'allowswitch' => $data->allowswitch);
if ($showadvanced) {
$definitiontable = new core_role_define_role_table_advanced($systemcontext, $roleid);
} else {
$definitiontable = new core_role_define_role_table_basic($systemcontext, $roleid);
}
if (is_number($resettype)) {
// Duplicate the role.
$definitiontable->force_duplicate($resettype, $options);
} else {
// Must be an archetype.
$definitiontable->force_archetype($resettype, $options);
}
if ($xml = $mform->get_file_content('rolepreset')) {
$definitiontable->force_preset($xml, $options);
}
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help($title, 'roles', 'core_role');
$mform->display();
echo $OUTPUT->footer();
die;
}
/// Get some basic data we are going to need.
$roles = get_all_roles();
$rolenames = role_fix_names($roles, $systemcontext, ROLENAME_ORIGINAL);
$rolescount = count($roles);
/// Create the table object.
if ($action == 'view') {
$definitiontable = new view_role_definition_table($systemcontext, $roleid);
} else {
// Create the table object.
if ($action === 'view') {
$definitiontable = new core_role_view_role_definition_table($systemcontext, $roleid);
} else if ($showadvanced) {
$definitiontable = new define_role_table_advanced($systemcontext, $roleid);
$definitiontable = new core_role_define_role_table_advanced($systemcontext, $roleid);
} else {
$definitiontable = new define_role_table_basic($systemcontext, $roleid);
$definitiontable = new core_role_define_role_table_basic($systemcontext, $roleid);
}
$definitiontable->read_submitted_permissions();
if ($action == 'duplicate') {
$definitiontable->make_copy();
}
// Handle the cancel button.
if (optional_param('cancel', false, PARAM_BOOL)) {
redirect($returnurl);
}
// Process submission in necessary.
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey() && $definitiontable->is_submission_valid()) {
$definitiontable->save_changes();
$tableroleid = $definitiontable->get_role_id();
// Trigger event.
$event = \core\event\role_capabilities_updated::create(
array(
'context' => $systemcontext,
'objectid' => $roleid
)
);
$event->set_legacy_logdata(array(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' . $tableroleid,
$definitiontable->get_role_name(), '', $USER->id));
if (!empty($role)) {
$event->add_record_snapshot('role', $role);
}
$event->trigger();
/// Process submission in necessary.
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey() && $definitiontable->is_submission_valid()) {
$definitiontable->save_changes();
add_to_log(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' .
$definitiontable->get_role_id(), $definitiontable->get_role_name(), '', $USER->id);
redirect($manageurl);
}
/// Print the page header and tabs.
echo $OUTPUT->header();
$currenttab = 'manage';
include('managetabs.php');
if ($action == 'add') {
$title = get_string('addinganewrole', 'role');
} else if ($action == 'duplicate') {
$title = get_string('addingrolebycopying', 'role', $rolenames[$roleid]->localname);
} else if ($action == 'view') {
$title = get_string('viewingdefinitionofrolex', 'role', $rolenames[$roleid]->localname);
} else if ($action == 'edit') {
$title = get_string('editingrolex', 'role', $rolenames[$roleid]->localname);
}
echo $OUTPUT->heading_with_help($title, 'roles', 'role');
/// Work out some button labels.
if ($action == 'add' || $action == 'duplicate') {
$submitlabel = get_string('createthisrole', 'role');
if ($action === 'add') {
redirect(new moodle_url('/admin/roles/define.php', array('action'=>'view', 'roleid'=>$definitiontable->get_role_id())));
} else {
$submitlabel = get_string('savechanges');
redirect($returnurl);
}
}
/// On the view page, show some extra controls at the top.
if ($action == 'view') {
echo $OUTPUT->container_start('buttons');
$options = array();
$options['roleid'] = $roleid;
$options['action'] = 'edit';
echo $OUTPUT->single_button(new moodle_url($defineurl, $options), get_string('edit'));
$options['action'] = 'reset';
if ($definitiontable->get_archetype()) {
echo $OUTPUT->single_button(new moodle_url($manageurl, $options), get_string('resetrole', 'role'));
} else {
echo $OUTPUT->single_button(new moodle_url($manageurl, $options), get_string('resetrolenolegacy', 'role'));
}
$options['action'] = 'duplicate';
echo $OUTPUT->single_button(new moodle_url($defineurl, $options), get_string('duplicaterole', 'role'));
echo $OUTPUT->single_button(new moodle_url($manageurl), get_string('listallroles', 'role'));
echo $OUTPUT->container_end();
}
// Print the page header and tabs.
echo $OUTPUT->header();
// Start the form.
echo $OUTPUT->box_start('generalbox');
if ($action == 'view') {
echo '<div class="mform">';
} else {
$currenttab = 'manage';
require('managetabs.php');
echo $OUTPUT->heading_with_help($title, 'roles', 'core_role');
// Work out some button labels.
if ($action === 'add') {
$submitlabel = get_string('createthisrole', 'core_role');
} else {
$submitlabel = get_string('savechanges');
}
// On the view page, show some extra controls at the top.
if ($action === 'view') {
echo $OUTPUT->container_start('buttons');
$url = new moodle_url('/admin/roles/define.php', array('action'=>'edit', 'roleid'=>$roleid, 'return'=>'define'));
echo $OUTPUT->single_button(new moodle_url($url), get_string('edit'));
$url = new moodle_url('/admin/roles/define.php', array('action'=>'reset', 'roleid'=>$roleid, 'return'=>'define'));
echo $OUTPUT->single_button(new moodle_url($url), get_string('resetrole', 'core_role'));
$url = new moodle_url('/admin/roles/define.php', array('action'=>'export', 'roleid'=>$roleid));
echo $OUTPUT->single_button(new moodle_url($url), get_string('export', 'core_role'));
echo $OUTPUT->single_button($manageurl, get_string('listallroles', 'core_role'));
echo $OUTPUT->container_end();
}
// Start the form.
echo $OUTPUT->box_start('generalbox');
if ($action === 'view') {
echo '<div class="mform">';
} else {
?>
<form id="rolesform" class="mform" action="<?php echo $baseurl; ?>" method="post"><div>
<form id="rolesform" class="mform" action="<?php p($baseurl->out(false)); ?>" method="post"><div>
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="return" value="<?php p($return); ?>" />
<input type="hidden" name="resettype" value="none" />
<div class="submit buttons">
<input type="submit" name="savechanges" value="<?php echo $submitlabel; ?>" />
<input type="submit" name="savechanges" value="<?php p($submitlabel); ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel'); ?>" />
</div>
<?php
}
}
// Print the form controls.
$definitiontable->display();
// Print the form controls.
$definitiontable->display();
/// Close the stuff we left open above.
if ($action == 'view') {
echo '</div>';
} else {
?>
// Close the stuff we left open above.
if ($action === 'view') {
echo '</div>';
} else {
?>
<div class="submit buttons">
<input type="submit" name="savechanges" value="<?php echo $submitlabel; ?>" />
<input type="submit" name="savechanges" value="<?php p($submitlabel); ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel'); ?>" />
</div>
</div></form>
<?php
}
echo $OUTPUT->box_end();
<?php
}
echo $OUTPUT->box_end();
/// Print a link back to the all roles list.
echo '<div class="backlink">';
echo '<p><a href="' . $manageurl . '">' . get_string('backtoallroles', 'role') . '</a></p>';
echo '</div>';
// Print a link back to the all roles list.
echo '<div class="backlink">';
echo '<p><a href="' . s($manageurl->out(false)) . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '</div>';
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+18 -1823
View File
File diff suppressed because it is too large Load Diff
+159 -202
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -23,237 +22,195 @@
* delete - delete a role (with are-you-sure)
* moveup - change the sort order
* movedown - change the sort order
* reset - set a role's permissions back to the default for that legacy role type.
*
* For all but the first two of those, you also need a roleid parameter, and
* possibly some other data.
*
* @package core
* @subpackage role
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
$action = optional_param('action', '', PARAM_ALPHA);
if ($action) {
$roleid = required_param('roleid', PARAM_INT);
}
$action = optional_param('action', '', PARAM_ALPHA);
if ($action) {
$roleid = required_param('roleid', PARAM_INT);
} else {
$roleid = 0;
}
/// Get the base URL for this and related pages into a convenient variable.
$baseurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/manage.php';
$defineurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/define.php';
// Get the base URL for this and related pages into a convenient variable.
$baseurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/manage.php';
$defineurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/define.php';
/// Check access permissions.
$systemcontext = context_system::instance();
require_login();
require_capability('moodle/role:manage', $systemcontext);
admin_externalpage_setup('defineroles');
// Check access permissions.
$systemcontext = context_system::instance();
require_login();
require_capability('moodle/role:manage', $systemcontext);
admin_externalpage_setup('defineroles');
/// Get some basic data we are going to need.
$roles = role_fix_names(get_all_roles(), $systemcontext, ROLENAME_ORIGINAL);
// Get some basic data we are going to need.
$roles = role_fix_names(get_all_roles(), $systemcontext, ROLENAME_ORIGINAL);
$undeletableroles = array();
$undeletableroles[$CFG->notloggedinroleid] = 1;
$undeletableroles[$CFG->guestroleid] = 1;
$undeletableroles[$CFG->defaultuserroleid] = 1;
$undeletableroles = array();
$undeletableroles[$CFG->notloggedinroleid] = 1;
$undeletableroles[$CFG->guestroleid] = 1;
$undeletableroles[$CFG->defaultuserroleid] = 1;
///.Process submitted data.
$confirmed = optional_param('confirm', false, PARAM_BOOL) && data_submitted() && confirm_sesskey();
switch ($action) {
case 'delete':
if (isset($undeletableroles[$roleid])) {
print_error('cannotdeletethisrole', '', $baseurl);
}
if (!$confirmed) {
// show confirmation
echo $OUTPUT->header();
$optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$a = new stdClass();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid));
// Process submitted data.
$confirmed = (optional_param('confirm', false, PARAM_BOOL) && data_submitted() && confirm_sesskey());
switch ($action) {
case 'delete':
if (isset($undeletableroles[$roleid])) {
print_error('cannotdeletethisrole', '', $baseurl);
}
if (!$confirmed) {
// Show confirmation.
echo $OUTPUT->header();
$optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$a = new stdClass();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid));
$formcontinue = new single_button(new moodle_url($baseurl, $optionsyes), get_string('yes'));
$formcancel = new single_button(new moodle_url($baseurl), get_string('no'), 'get');
echo $OUTPUT->confirm(get_string('deleterolesure', 'role', $a), $formcontinue, $formcancel);
echo $OUTPUT->footer();
die;
}
if (!delete_role($roleid)) {
// The delete failed, but mark the context dirty in case.
mark_context_dirty($systemcontext->path);
print_error('cannotdeleterolewithid', 'error', $baseurl, $roleid);
}
// Deleted a role sitewide...
mark_context_dirty($systemcontext->path);
add_to_log(SITEID, 'role', 'delete', 'admin/roles/manage.php', $roles[$roleid]->localname, '', $USER->id);
redirect($baseurl);
break;
$formcontinue = new single_button(new moodle_url($baseurl, $optionsyes), get_string('yes'));
$formcancel = new single_button(new moodle_url($baseurl), get_string('no'), 'get');
echo $OUTPUT->confirm(get_string('deleterolesure', 'core_role', $a), $formcontinue, $formcancel);
echo $OUTPUT->footer();
die;
}
if (!delete_role($roleid)) {
// The delete failed, but mark the context dirty in case.
$systemcontext->mark_dirty();
print_error('cannotdeleterolewithid', 'error', $baseurl, $roleid);
}
// Deleted a role sitewide...
$systemcontext->mark_dirty();
redirect($baseurl);
break;
case 'moveup':
if (confirm_sesskey()) {
$prevrole = null;
$thisrole = null;
foreach ($roles as $role) {
if ($role->id == $roleid) {
$thisrole = $role;
break;
} else {
$prevrole = $role;
}
}
if (is_null($thisrole) || is_null($prevrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
if (!switch_roles($thisrole, $prevrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
}
redirect($baseurl);
break;
case 'movedown':
if (confirm_sesskey()) {
$thisrole = null;
$nextrole = null;
foreach ($roles as $role) {
if ($role->id == $roleid) {
$thisrole = $role;
} else if (!is_null($thisrole)) {
$nextrole = $role;
break;
}
}
if (is_null($nextrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
if (!switch_roles($thisrole, $nextrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
}
redirect($baseurl);
break;
case 'reset':
if (!$confirmed) {
// show confirmation
echo $OUTPUT->header();
$optionsyes = array('action'=>'reset', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$optionsno = array('action'=>'view', 'roleid'=>$roleid);
$a = new stdClass();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->legacytype = $roles[$roleid]->archetype;
if (empty($a->legacytype)) {
$warning = get_string('resetrolesurenolegacy', 'role', $a);
case 'moveup':
if (confirm_sesskey()) {
$prevrole = null;
$thisrole = null;
foreach ($roles as $role) {
if ($role->id == $roleid) {
$thisrole = $role;
break;
} else {
$warning = get_string('resetrolesure', 'role', $a);
$prevrole = $role;
}
$formcontinue = new single_button(new moodle_url('manage.php', $optionsyes), get_string('yes'));
$formcancel = new single_button(new moodle_url('manage.php', $optionsno), get_string('no'), 'get');
echo $OUTPUT->confirm($warning, $formcontinue, $formcancel);
echo $OUTPUT->footer();
die;
}
// Reset context levels for standard archetypes
if ($roles[$roleid]->archetype) {
set_role_contextlevels($roleid, get_default_contextlevels($roles[$roleid]->archetype));
if (is_null($thisrole) || is_null($prevrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
if (!switch_roles($thisrole, $prevrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
}
//reset or delete the capabilities
reset_role_capabilities($roleid);
redirect($baseurl);
break;
// Mark context dirty, log and redirect.
mark_context_dirty($systemcontext->path);
add_to_log(SITEID, 'role', 'reset', 'admin/roles/manage.php?action=reset&roleid=' . $roleid, $roles[$roleid]->localname, '', $USER->id);
redirect($defineurl . '?action=view&roleid=' . $roleid);
break;
}
case 'movedown':
if (confirm_sesskey()) {
$thisrole = null;
$nextrole = null;
foreach ($roles as $role) {
if ($role->id == $roleid) {
$thisrole = $role;
} else if (!is_null($thisrole)) {
$nextrole = $role;
break;
}
}
if (is_null($nextrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
if (!switch_roles($thisrole, $nextrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
}
/// Print the page header and tabs.
echo $OUTPUT->header();
redirect($baseurl);
break;
$currenttab = 'manage';
include_once('managetabs.php');
}
/// Initialise table.
$table = new html_table();
$table->colclasses = array('leftalign', 'leftalign', 'leftalign', 'leftalign');
$table->id = 'roles';
$table->attributes['class'] = 'admintable generaltable';
$table->head = array(
get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'role'),
get_string('description'),
get_string('roleshortname', 'role'),
get_string('edit')
// Print the page header and tabs.
echo $OUTPUT->header();
$currenttab = 'manage';
require('managetabs.php');
// Initialise table.
$table = new html_table();
$table->colclasses = array('leftalign', 'leftalign', 'leftalign', 'leftalign');
$table->id = 'roles';
$table->attributes['class'] = 'admintable generaltable';
$table->head = array(
get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'core_role'),
get_string('description'),
get_string('roleshortname', 'core_role'),
get_string('edit')
);
// Get some strings outside the loop.
$stredit = get_string('edit');
$strdelete = get_string('delete');
$strmoveup = get_string('moveup');
$strmovedown = get_string('movedown');
// Print a list of roles with edit/copy/delete/reorder icons.
$table->data = array();
$firstrole = reset($roles);
$lastrole = end($roles);
foreach ($roles as $role) {
// Basic data.
$row = array(
'<a href="' . $defineurl . '?action=view&amp;roleid=' . $role->id . '">' . $role->localname . '</a>',
role_get_description($role),
s($role->shortname),
'',
);
/// Get some strings outside the loop.
$stredit = get_string('edit');
$strduplicate = get_string('duplicate');
$strdelete = get_string('delete');
$strmoveup = get_string('moveup');
$strmovedown = get_string('movedown');
/// Print a list of roles with edit/copy/delete/reorder icons.
$table->data = array();
$firstrole = reset($roles);
$lastrole = end($roles);
foreach ($roles as $role) {
/// Basic data.
$row = array(
'<a href="' . $defineurl . '?action=view&amp;roleid=' . $role->id . '">' . $role->localname . '</a>',
role_get_description($role),
s($role->shortname),
'',
);
/// Icons:
// move up
if ($role->sortorder != $firstrole->sortorder) {
$row[3] .= get_action_icon($baseurl . '?action=moveup&amp;roleid=' . $role->id . '&amp;sesskey=' . sesskey(), 'up', $strmoveup, $strmoveup);
} else {
$row[3] .= get_spacer();
}
// move down
if ($role->sortorder != $lastrole->sortorder) {
$row[3] .= get_action_icon($baseurl . '?action=movedown&amp;roleid=' . $role->id . '&amp;sesskey=' . sesskey(), 'down', $strmovedown, $strmovedown);
} else {
$row[3] .= get_spacer();
}
// edit
$row[3] .= get_action_icon($defineurl . '?action=edit&amp;roleid=' . $role->id,
'edit', $stredit, get_string('editxrole', 'role', $role->localname));
// duplicate
$row[3] .= get_action_icon($defineurl . '?action=duplicate&amp;roleid=' . $role->id,
'copy', $strduplicate, get_string('createrolebycopying', 'role', $role->localname));
// delete
if (isset($undeletableroles[$role->id])) {
$row[3] .= get_spacer();
} else {
$row[3] .= get_action_icon($baseurl . '?action=delete&amp;roleid=' . $role->id,
'delete', $strdelete, get_string('deletexrole', 'role', $role->localname));
}
$table->data[] = $row;
// Move up.
if ($role->sortorder != $firstrole->sortorder) {
$row[3] .= get_action_icon($baseurl . '?action=moveup&amp;roleid=' . $role->id . '&amp;sesskey=' . sesskey(), 'up', $strmoveup, $strmoveup);
} else {
$row[3] .= get_spacer();
}
// Move down.
if ($role->sortorder != $lastrole->sortorder) {
$row[3] .= get_action_icon($baseurl . '?action=movedown&amp;roleid=' . $role->id . '&amp;sesskey=' . sesskey(), 'down', $strmovedown, $strmovedown);
} else {
$row[3] .= get_spacer();
}
// Edit.
$row[3] .= get_action_icon($defineurl . '?action=edit&amp;roleid=' . $role->id,
'edit', $stredit, get_string('editxrole', 'core_role', $role->localname));
// Delete.
if (isset($undeletableroles[$role->id])) {
$row[3] .= get_spacer();
} else {
$row[3] .= get_action_icon($baseurl . '?action=delete&amp;roleid=' . $role->id,
'delete', $strdelete, get_string('deletexrole', 'core_role', $role->localname));
}
echo html_writer::table($table);
echo $OUTPUT->container_start('buttons');
echo $OUTPUT->single_button(new moodle_url($defineurl, array('action' => 'add')), get_string('addrole', 'role'), 'get');
echo $OUTPUT->container_end();
$table->data[] = $row;
}
echo html_writer::table($table);
echo $OUTPUT->footer();
die;
echo $OUTPUT->container_start('buttons');
echo $OUTPUT->single_button(new moodle_url($defineurl, array('action' => 'add')), get_string('addrole', 'core_role'), 'get');
echo $OUTPUT->container_end();
echo $OUTPUT->footer();
die;
function get_action_icon($url, $icon, $alt, $tooltip) {
global $OUTPUT;
+6 -10
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,21 +17,18 @@
/**
* Defines the tab bar used on the manage/allow assign/allow overrides pages.
*
* @package core
* @subpackage role
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); // It must be included from a Moodle page
}
defined('MOODLE_INTERNAL') || die();
$toprow = array();
$toprow[] = new tabobject('manage', new moodle_url('/admin/roles/manage.php'), get_string('manageroles', 'role'));
$toprow[] = new tabobject('assign', new moodle_url('/admin/roles/allow.php', array('mode'=>'assign')), get_string('allowassign', 'role'));
$toprow[] = new tabobject('override', new moodle_url('/admin/roles/allow.php', array('mode'=>'override')), get_string('allowoverride', 'role'));
$toprow[] = new tabobject('switch', new moodle_url('/admin/roles/allow.php', array('mode'=>'switch')), get_string('allowswitch', 'role'));
$toprow[] = new tabobject('manage', new moodle_url('/admin/roles/manage.php'), get_string('manageroles', 'core_role'));
$toprow[] = new tabobject('assign', new moodle_url('/admin/roles/allow.php', array('mode'=>'assign')), get_string('allowassign', 'core_role'));
$toprow[] = new tabobject('override', new moodle_url('/admin/roles/allow.php', array('mode'=>'override')), get_string('allowoverride', 'core_role'));
$toprow[] = new tabobject('switch', new moodle_url('/admin/roles/allow.php', array('mode'=>'switch')), get_string('allowswitch', 'core_role'));
echo $OUTPUT->tabtree($toprow, $currenttab);
+51 -27
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,17 +17,15 @@
/**
* Lets you override role definitions in contexts.
*
* @package core
* @subpackage role
* @package core_role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require('../../config.php');
require_once("$CFG->dirroot/$CFG->admin/roles/lib.php");
$contextid = required_param('contextid', PARAM_INT); // context id
$roleid = required_param('roleid', PARAM_INT); // requested role id
$contextid = required_param('contextid', PARAM_INT);
$roleid = required_param('roleid', PARAM_INT);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -48,7 +45,7 @@ if ($course) {
}
}
// security first
// Security first.
require_login($course, false, $cm);
$safeoverridesonly = false;
if (!has_capability('moodle/role:override', $context)) {
@@ -56,9 +53,19 @@ if (!has_capability('moodle/role:override', $context)) {
$safeoverridesonly = true;
}
$PAGE->set_url($url);
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
if ($context->contextlevel == CONTEXT_USER and $USER->id != $context->instanceid) {
$PAGE->navigation->extend_for_user($user);
$PAGE->set_context(context_course::instance($course->id));
navigation_node::override_active_url(new moodle_url('/admin/roles/permissions.php',
array('contextid'=>$context->id, 'userid'=>$context->instanceid, 'courseid'=>$course->id)));
} else {
$PAGE->set_context($context);
navigation_node::override_active_url(new moodle_url('/admin/roles/permissions.php', array('contextid'=>$context->id)));
}
$courseid = $course->id;
$returnurl = new moodle_url('/admin/roles/permissions.php', array('contextid' => $context->id));
@@ -70,15 +77,15 @@ if (optional_param('cancel', false, PARAM_BOOL)) {
$role = $DB->get_record('role', array('id'=>$roleid), '*', MUST_EXIST);
// These are needed early
// These are needed early.
$assignableroles = get_assignable_roles($context, ROLENAME_BOTH);
list($overridableroles, $overridecounts, $nameswithcounts) = get_overridable_roles($context, ROLENAME_BOTH, true);
// Work out an appropriate page title.
$contextname = print_context_name($context);
$straction = get_string('overrideroles', 'role'); // Used by tabs.php
$contextname = $context->get_context_name();
$straction = get_string('overrideroles', 'core_role'); // Used by tabs.php.
$a = (object)array('context' => $contextname, 'role' => $overridableroles[$roleid]);
$title = get_string('overridepermissionsforrole', 'role', $a);
$title = get_string('overridepermissionsforrole', 'core_role', $a);
$currenttab = 'permissions';
@@ -94,17 +101,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
$PAGE->set_heading($SITE->fullname);
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
admin_externalpage_setup('frontpageroles', '', array(), $PAGE->url);
$PAGE->set_heading(get_string('frontpage', 'admin'));
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -112,45 +119,62 @@ switch ($context->contextlevel) {
break;
}
// Make sure this user can override that role
// Make sure this user can override that role.
if (empty($overridableroles[$roleid])) {
$a = new stdClass;
$a->roleid = $roleid;
$a->context = $contextname;
print_error('cannotoverriderolehere', '', get_context_url($context), $a);
print_error('cannotoverriderolehere', '', $context->get_url(), $a);
}
// If we are actually overriding a role, create the table object, and save changes if appropriate.
$overridestable = new override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
$overridestable = new core_role_override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
$overridestable->read_submitted_permissions();
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
$overridestable->save_changes();
$rolename = $overridableroles[$roleid];
add_to_log($course->id, 'role', 'override', 'admin/roles/override.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
// Trigger event.
$event = \core\event\role_capabilities_updated::create(
array(
'context' => $context,
'objectid' => $roleid,
'courseid' => $courseid
)
);
$event->set_legacy_logdata(
array(
$course->id, 'role', 'override', 'admin/roles/override.php?contextid=' . $context->id . '&roleid=' . $roleid,
$rolename, '', $USER->id
)
);
$event->add_record_snapshot('role', $role);
$event->trigger();
redirect($returnurl);
}
// Finally start page output
// Finally start page output.
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help($title, 'overridepermissions', 'role');
echo $OUTPUT->heading_with_help($title, 'overridepermissions', 'core_role');
// Show UI for overriding roles.
if (!empty($capabilities)) {
echo $OUTPUT->box(get_string('nocapabilitiesincontext', 'role'), 'generalbox boxaligncenter');
echo $OUTPUT->box(get_string('nocapabilitiesincontext', 'core_role'), 'generalbox boxaligncenter');
} else {
// Print the capabilities overrideable in this context
// Print the capabilities overrideable in this context.
echo $OUTPUT->box_start('generalbox capbox');
echo html_writer::start_tag('form', array('id'=>'overrideform', 'action'=>$PAGE->url->out(), 'method'=>'post'));
echo html_writer::start_tag('div');
echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'sesskey', 'value'=>sesskey()));
echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'roleid', 'value'=>$roleid));
echo html_writer::tag('p', get_string('highlightedcellsshowinherit', 'role'), array('class'=>'overridenotice'));
echo html_writer::tag('p', get_string('highlightedcellsshowinherit', 'core_role'), array('class'=>'overridenotice'));
$overridestable->display();
if ($overridestable->has_locked_capabilities()) {
echo '<p class="overridenotice">' . get_string('safeoverridenotice', 'role') . "</p>\n";
echo '<p class="overridenotice">' . get_string('safeoverridenotice', 'core_role') . "</p>\n";
}
echo html_writer::start_tag('div', array('class'=>'submit_buttons'));
@@ -165,9 +189,9 @@ if (!empty($capabilities)) {
// Print a form to swap roles, and a link back to the all roles list.
echo html_writer::start_tag('div', array('class'=>'backlink'));
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('overrideanotherrole', 'role');
$select->label = get_string('overrideanotherrole', 'core_role');
echo $OUTPUT->render($select);
echo html_writer::tag('p', html_writer::tag('a', get_string('backtoallroles', 'role'), array('href'=>$returnurl)));
echo html_writer::tag('p', html_writer::tag('a', get_string('backtoallroles', 'core_role'), array('href'=>$returnurl)));
echo html_writer::end_tag('div');
echo $OUTPUT->footer();
+48 -36
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,19 +15,16 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script serves draft files of current user
* Change permissions.
*
* @package core
* @subpackage role
* @copyright 2009 Petr Skoda (skodak) info@skodak.org
* @package core_role
* @copyright 2009 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require('../../config.php');
require_once("$CFG->dirroot/$CFG->admin/roles/lib.php");
require_once("permissions_forms.php");
$contextid = required_param('contextid',PARAM_INT);
$contextid = required_param('contextid', PARAM_INT);
$roleid = optional_param('roleid', 0, PARAM_INT);
$capability = optional_param('capability', false, PARAM_CAPABILITY);
@@ -37,6 +33,7 @@ $prevent = optional_param('prevent', 0, PARAM_BOOL);
$allow = optional_param('allow', 0, PARAM_BOOL);
$unprohibit = optional_param('unprohibit', 0, PARAM_BOOL);
$prohibit = optional_param('prohibit', 0, PARAM_BOOL);
$return = optional_param('return', null, PARAM_ALPHANUMEXT);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -56,15 +53,22 @@ if ($course) {
}
}
// security first
// Security first.
require_login($course, false, $cm);
require_capability('moodle/role:review', $context);
$PAGE->set_url($url);
$PAGE->set_context($context);
if ($context->contextlevel == CONTEXT_USER and $USER->id != $context->instanceid) {
$PAGE->navigation->extend_for_user($user);
$PAGE->set_context(context_course::instance($course->id));
} else {
$PAGE->set_context($context);
}
$courseid = $course->id;
// These are needed early because of tabs.php
// These are needed early because of tabs.php.
$assignableroles = get_assignable_roles($context, ROLENAME_BOTH);
list($overridableroles, $overridecounts, $nameswithcounts) = get_overridable_roles($context, ROLENAME_BOTH, true);
if ($capability) {
@@ -74,9 +78,9 @@ if ($capability) {
$allowoverrides = has_capability('moodle/role:override', $context);
$allowsafeoverrides = has_capability('moodle/role:safeoverride', $context);
$contextname = print_context_name($context);
$title = get_string('permissionsincontext', 'role', $contextname);
$straction = get_string('permissions', 'role'); // Used by tabs.php
$contextname = $context->get_context_name();
$title = get_string('permissionsincontext', 'core_role', $contextname);
$straction = get_string('permissions', 'core_role'); // Used by tabs.php.
$currenttab = 'permissions';
$PAGE->set_pagelayout('admin');
@@ -91,17 +95,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
$PAGE->set_heading($SITE->fullname);
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
admin_externalpage_setup('frontpageroles', '', array(), $PAGE->url);
$PAGE->set_heading(get_string('frontpage', 'admin'));
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -109,12 +113,12 @@ switch ($context->contextlevel) {
break;
}
// handle confirmations and actions
// We have a capability and overrides are allowed or safe overrides are allowed and this is safe
// Handle confirmations and actions.
// We have a capability and overrides are allowed or safe overrides are allowed and this is safe.
if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capability($capability)))) {
// If we already know the the role ID, it is overrideable, and we are setting prevent or unprohibit
// If we already know the the role ID, it is overrideable, and we are setting prevent or unprohibit.
if (isset($overridableroles[$roleid]) && ($prevent || $unprohibit)) {
// We are preventing
// We are preventing.
if ($prevent) {
if ($confirm && data_submitted() && confirm_sesskey()) {
role_change_permission($roleid, $context, $capability->name, CAP_PREVENT);
@@ -122,22 +126,24 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
} else {
$a = (object)array('cap'=>get_capability_docs_link($capability)." ($capability->name)", 'role'=>$overridableroles[$roleid], 'context'=>$contextname);
$message = get_string('confirmroleprevent', 'role', $a);
$continueurl = new moodle_url($PAGE->url, array('contextid'=>$context->id, 'roleid'=>$roleid, 'capability'=>$capability->name, 'prevent'=>1, 'sesskey'=>sesskey(), 'confirm'=>1));
$message = get_string('confirmroleprevent', 'core_role', $a);
$continueurl = new moodle_url($PAGE->url,
array('contextid'=>$context->id, 'roleid'=>$roleid, 'capability'=>$capability->name, 'prevent'=>1, 'sesskey'=>sesskey(), 'confirm'=>1));
}
}
// We are unprohibiting
// We are unprohibiting.
if ($unprohibit) {
if ($confirm && data_submitted() && confirm_sesskey()) {
role_change_permission($roleid, $context, $capability->name, CAP_INHERIT);
redirect($PAGE->url);
} else {
$a = (object)array('cap'=>get_capability_docs_link($capability)." ($capability->name)", 'role'=>$overridableroles[$roleid], 'context'=>$contextname);
$message = get_string('confirmroleunprohibit', 'role', $a);
$continueurl = new moodle_url($PAGE->url, array('contextid'=>$context->id, 'roleid'=>$roleid, 'capability'=>$capability->name, 'unprohibit'=>1, 'sesskey'=>sesskey(), 'confirm'=>1));
$message = get_string('confirmroleunprohibit', 'core_role', $a);
$continueurl = new moodle_url($PAGE->url,
array('contextid'=>$context->id, 'roleid'=>$roleid, 'capability'=>$capability->name, 'unprohibit'=>1, 'sesskey'=>sesskey(), 'confirm'=>1));
}
}
// Display and print
// Display and print.
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
echo $OUTPUT->confirm($message, $continueurl, $PAGE->url);
@@ -147,7 +153,7 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
if ($allow || $prohibit) {
if ($allow) {
$mform = new role_allow_form(null, array($context, $capability, $overridableroles));
$mform = new core_role_permission_allow_form(null, array($context, $capability, $overridableroles));
if ($mform->is_cancelled()) {
redirect($PAGE->url);
} else if ($data = $mform->get_data() and !empty($data->roleid)) {
@@ -158,11 +164,11 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
redirect($PAGE->url);
} else {
$a = (object)array('cap'=>get_capability_docs_link($capability)." ($capability->name)", 'context'=>$contextname);
$message = get_string('roleallowinfo', 'role', $a);
$message = get_string('roleallowinfo', 'core_role', $a);
}
}
if ($prohibit) {
$mform = new role_prohibit_form(null, array($context, $capability, $overridableroles));
$mform = new core_role_permission_prohibit_form(null, array($context, $capability, $overridableroles));
if ($mform->is_cancelled()) {
redirect($PAGE->url);
} else if ($data = $mform->get_data() and !empty($data->roleid)) {
@@ -173,7 +179,7 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
redirect($PAGE->url);
} else {
$a = (object)array('cap'=>get_capability_docs_link($capability)." ($capability->name)", 'context'=>$contextname);
$message = get_string('roleprohibitinfo', 'role', $a);
$message = get_string('roleprohibitinfo', 'core_role', $a);
}
}
echo $OUTPUT->header();
@@ -188,13 +194,13 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$table = new permissions_table($context, $contextname, $allowoverrides, $allowsafeoverrides, $overridableroles);
$table = new core_role_permissions_table($context, $contextname, $allowoverrides, $allowsafeoverrides, $overridableroles);
echo $OUTPUT->box_start('generalbox capbox');
// print link to advanced override page
// Print link to advanced override page.
if ($overridableroles) {
$overrideurl = new moodle_url('/admin/roles/override.php', array('contextid' => $context->id));
$select = new single_select($overrideurl, 'roleid', $nameswithcounts);
$select->label = get_string('advancedoverride', 'role');
$select->label = get_string('advancedoverride', 'core_role');
echo html_writer::tag('div', $OUTPUT->render($select), array('class'=>'advancedoverride'));
}
$table->display();
@@ -202,10 +208,16 @@ echo $OUTPUT->box_end();
if ($context->contextlevel > CONTEXT_USER) {
if ($context->contextlevel === CONTEXT_COURSECAT && $return === 'management') {
$url = new moodle_url('/course/management.php', array('categoryid' => $context->instanceid));
} else {
$url = $context->get_url();
}
echo html_writer::start_tag('div', array('class'=>'backlink'));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>get_context_url($context)));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href' => $url));
echo html_writer::end_tag('div');
}
echo $OUTPUT->footer($course);
-101
View File
@@ -1,101 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script serves draft files of current user
*
* @package core
* @subpackage role
* @copyright 2009 Petr Skoda (skodak) info@skodak.org
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once("$CFG->libdir/formslib.php");
class role_allow_form extends moodleform {
// Define the form
function definition() {
global $CFG;
$mform = $this->_form;
list($context, $capability, $overridableroles) = $this->_customdata;
list($needed, $forbidden) = get_roles_with_cap_in_context($context, $capability->name);
foreach($needed as $id=>$unused) {
unset($overridableroles[$id]);
}
foreach($forbidden as $id=>$unused) {
unset($overridableroles[$id]);
}
$mform->addElement('header', 'allowheader', get_string('roleallowheader', 'role'));
$mform->addElement('select', 'roleid', get_string('roleselect', 'role'), $overridableroles);
$mform->addElement('hidden','capability');
$mform->setType('capability', PARAM_CAPABILITY);
$mform->setDefault('capability', $capability->name);
$mform->addElement('hidden','contextid');
$mform->setType('contextid', PARAM_INT);
$mform->setDefault('contextid', $context->id);
$mform->addElement('hidden','allow');
$mform->setType('allow', PARAM_INT);
$mform->setDefault('allow', 1);
$this->add_action_buttons(true, get_string('allow', 'role'));
}
}
class role_prohibit_form extends moodleform {
// Define the form
function definition() {
global $CFG;
$mform = $this->_form;
list($context, $capability, $overridableroles) = $this->_customdata;
list($needed, $forbidden) = get_roles_with_cap_in_context($context, $capability->name);
foreach($forbidden as $id=>$unused) {
unset($overridableroles[$id]);
}
$mform->addElement('header', 'ptohibitheader', get_string('roleprohibitheader', 'role'));
$mform->addElement('select', 'roleid', get_string('roleselect', 'role'), $overridableroles);
$mform->addElement('hidden','capability');
$mform->setType('capability', PARAM_CAPABILITY);
$mform->setDefault('capability', $capability->name);
$mform->addElement('hidden','contextid');
$mform->setType('contextid', PARAM_INT);
$mform->setDefault('contextid', $context->id);
$mform->addElement('hidden','prohibit');
$mform->setType('prohibit', PARAM_INT);
$mform->setDefault('prohibit', 1);
$this->add_action_buttons(true, get_string('prohibit', 'role'));
}
}
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="role">
<xs:complexType>
<xs:sequence>
<xs:element ref="shortname" minOccurs="0"/>
<xs:element ref="name" minOccurs="0"/>
<xs:element ref="description" minOccurs="0"/>
<xs:element ref="archetype" minOccurs="0"/>
<xs:element ref="contextlevels" minOccurs="0"/>
<xs:element ref="allowassign" minOccurs="0"/>
<xs:element ref="allowoverride" minOccurs="0"/>
<xs:element ref="allowswitch" minOccurs="0"/>
<xs:element ref="permissions" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="archetype" type="xs:string"/>
<xs:element name="contextlevels">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="level"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="level" type="xs:string"/>
<xs:element name="allowassign">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="shortname"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="allowoverride">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="shortname"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="allowswitch">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="shortname"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="permissions">
<xs:complexType>
<xs:sequence>
<xs:element ref="inherit" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="allow" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prevent" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prohibit" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="shortname" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="inherit" type="xs:string"/>
<xs:element name="allow" type="xs:string"/>
<xs:element name="prevent" type="xs:string"/>
<xs:element name="prohibit" type="xs:string"/>
</xs:schema>
+79
View File
@@ -0,0 +1,79 @@
<?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/>.
/**
* Role XML presets test case.
*
* @package core_role
* @category phpunit
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
class core_role_preset_testcase extends advanced_testcase {
public function test_xml() {
global $DB;
$roles = $DB->get_records('role');
foreach ($roles as $role) {
$xml = core_role_preset::get_export_xml($role->id);
$this->assertTrue(core_role_preset::is_valid_preset($xml));
$info = core_role_preset::parse_preset($xml);
$this->assertSame($role->shortname, $info['shortname']);
$this->assertSame($role->name, $info['name']);
$this->assertSame($role->description, $info['description']);
$this->assertSame($role->archetype, $info['archetype']);
$contextlevels = get_role_contextlevels($role->id);
$this->assertEquals(array_values($contextlevels), array_values($info['contextlevels']));
foreach (array('assign', 'override', 'switch') as $type) {
$records = $DB->get_records('role_allow_'.$type, array('roleid'=>$role->id), "allow$type ASC");
$allows = array();
foreach ($records as $record) {
if ($record->{'allow'.$type} == $role->id) {
array_unshift($allows, -1);
}
$allows[] = $record->{'allow'.$type};
}
$this->assertEquals($allows, $info['allow'.$type], "$type $role->shortname does not match");
}
$capabilities = $DB->get_records_sql(
"SELECT *
FROM {role_capabilities}
WHERE contextid = :syscontext AND roleid = :roleid
ORDER BY capability ASC",
array('syscontext'=>context_system::instance()->id, 'roleid'=>$role->id));
foreach ($capabilities as $cap) {
$this->assertEquals($cap->permission, $info['permissions'][$cap->capability]);
unset($info['permissions'][$cap->capability]);
}
// The remainders should be only inherits.
foreach ($info['permissions'] as $capability => $permission) {
if ($permission == CAP_INHERIT) {
continue;
}
$this->fail('only CAP_INHERIT expected');
}
}
}
}
+42 -44
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -19,14 +18,13 @@
* User roles report list all the users who have been assigned a particular
* role in all contexts.
*
* @package core
* @subpackage role
* @package core_role
* @copyright &copy; 2007 The Open University and others
* @author t.j.hunt@open.ac.uk and others
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../config.php');
require_once(__DIR__ . '/../../config.php');
// Get params.
$userid = required_param('userid', PARAM_INT);
@@ -43,15 +41,21 @@ $systemcontext = context_system::instance();
$baseurl = new moodle_url('/admin/roles/usersroles.php', array('userid'=>$userid, 'courseid'=>$courseid));
$PAGE->set_url($baseurl);
$PAGE->set_context($coursecontext);
$PAGE->set_pagelayout('admin');
/// Check login and permissions.
require_login($course);
// Check login and permissions.
if ($course->id == SITEID) {
require_login();
$PAGE->set_context($usercontext);
} else {
require_login($course);
$PAGE->set_context($coursecontext);
}
$canview = has_any_capability(array('moodle/role:assign', 'moodle/role:safeoverride',
'moodle/role:override', 'moodle/role:manage'), $usercontext);
if (!$canview) {
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'role'));
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'core_role'));
}
if ($userid != $USER->id) {
@@ -65,32 +69,26 @@ if ($course->id != $SITE->id || $userid != $USER->id) {
$PAGE->navbar->includesettingsbase = true;
}
/// Now get the role assignments for this user.
$sql = "SELECT
ra.id, ra.userid, ra.contextid, ra.roleid, ra.component, ra.itemid,
c.path
FROM
{role_assignments} ra
JOIN {context} c ON ra.contextid = c.id
JOIN {role} r ON ra.roleid = r.id
WHERE
ra.userid = ?
"./*AND ra.active = 1*/"
ORDER BY
contextlevel DESC, contextid ASC, r.sortorder ASC";
// Now get the role assignments for this user.
$sql = "SELECT ra.id, ra.userid, ra.contextid, ra.roleid, ra.component, ra.itemid, c.path
FROM {role_assignments} ra
JOIN {context} c ON ra.contextid = c.id
JOIN {role} r ON ra.roleid = r.id
WHERE ra.userid = ?
ORDER BY contextlevel DESC, contextid ASC, r.sortorder ASC";
$roleassignments = $DB->get_records_sql($sql, array($user->id));
$allroles = role_fix_names(get_all_roles());
/// In order to display a nice tree of contexts, we need to get all the
/// ancestors of all the contexts in the query we just did.
// In order to display a nice tree of contexts, we need to get all the
// ancestors of all the contexts in the query we just did.
$requiredcontexts = array();
foreach ($roleassignments as $ra) {
$requiredcontexts = array_merge($requiredcontexts, explode('/', trim($ra->path, '/')));
}
$requiredcontexts = array_unique($requiredcontexts);
/// Now load those contexts.
// Now load those contexts.
if ($requiredcontexts) {
list($sqlcontexttest, $contextparams) = $DB->get_in_or_equal($requiredcontexts);
$contexts = get_sorted_contexts('ctx.id ' . $sqlcontexttest, $contextparams);
@@ -98,22 +96,22 @@ if ($requiredcontexts) {
$contexts = array();
}
/// Prepare some empty arrays to hold the data we are about to compute.
// Prepare some empty arrays to hold the data we are about to compute.
foreach ($contexts as $conid => $con) {
$contexts[$conid]->children = array();
$contexts[$conid]->roleassignments = array();
}
/// Put the contexts into a tree structure.
// 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;
$parentcontext = $context->get_parent_context();
if ($parentcontext) {
$contexts[$parentcontext->id]->children[] = $conid;
}
}
/// Put the role capabilities into the context tree.
// Put the role capabilities into the context tree.
foreach ($roleassignments as $ra) {
$contexts[$ra->contextid]->roleassignments[$ra->roleid] = $ra;
}
@@ -121,17 +119,17 @@ foreach ($roleassignments as $ra) {
$assignableroles = get_assignable_roles($usercontext, ROLENAME_BOTH);
$overridableroles = get_overridable_roles($usercontext, ROLENAME_BOTH);
/// Print the header
// Print the header.
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $coursecontext));
$straction = get_string('thisusersroles', 'role');
$title = get_string('xroleassignments', 'role', $fullname);
$straction = get_string('thisusersroles', 'core_role');
$title = get_string('xroleassignments', 'core_role', $fullname);
/// Course header
// Course header.
$PAGE->set_title($title);
if ($courseid != SITEID) {
if ($courseid == SITEID) {
$PAGE->set_heading($fullname);
} else {
$PAGE->set_heading($course->fullname);
$PAGE->set_heading($course->fullname.': '.$fullname);
}
echo $OUTPUT->header();
echo $OUTPUT->heading($title, 3);
@@ -139,12 +137,12 @@ echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
// Display them.
if (!$roleassignments) {
echo '<p>', get_string('noroleassignments', 'role'), '</p>';
echo '<p>', get_string('noroleassignments', 'core_role'), '</p>';
} else {
print_report_tree($systemcontext->id, $contexts, $systemcontext, $fullname, $allroles);
}
/// End of page.
// End of page.
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
@@ -155,13 +153,13 @@ function print_report_tree($contextid, $contexts, $systemcontext, $fullname, $al
static $stredit = null, $strcheckpermissions, $globalroleassigner, $assignurl, $checkurl;
if (is_null($stredit)) {
$stredit = get_string('edit');
$strcheckpermissions = get_string('checkpermissions', 'role');
$strcheckpermissions = get_string('checkpermissions', 'core_role');
$globalroleassigner = has_capability('moodle/role:assign', $systemcontext);
$assignurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/assign.php';
$checkurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/check.php';
}
// Pull the current context into an array for convinience.
// Pull the current context into an array for convenience.
$context = context::instance_by_id($contextid);
// Print the context name.
@@ -189,11 +187,11 @@ function print_report_tree($contextid, $contexts, $systemcontext, $fullname, $al
$a->fullname = $fullname;
$a->contextlevel = $context->get_level_name();
if ($context->contextlevel == CONTEXT_SYSTEM) {
$strgoto = get_string('gotoassignsystemroles', 'role');
$strcheck = get_string('checksystempermissionsfor', 'role', $a);
$strgoto = get_string('gotoassignsystemroles', 'core_role');
$strcheck = get_string('checksystempermissionsfor', 'core_role', $a);
} else {
$strgoto = get_string('gotoassignroles', 'role', $a);
$strcheck = get_string('checkuserspermissionshere', 'role', $a);
$strgoto = get_string('gotoassignroles', 'core_role', $a);
$strcheck = get_string('checkuserspermissionshere', 'core_role', $a);
}
echo ' <a title="' . $strgoto . '" href="' . $raurl . '"><img class="iconsmall" src="' .
$OUTPUT->pix_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
+1
View File
@@ -14,6 +14,7 @@ $PAGE->set_url('/admin/settings.php', array('section' => $section));
$PAGE->set_pagetype('admin-setting-' . $section);
$PAGE->set_pagelayout('admin');
$PAGE->navigation->clear_cache();
navigation_node::require_admin_tree();
$adminroot = admin_get_root(); // need all settings
$settingspage = $adminroot->locate($section, true);
+14 -5
View File
@@ -2,7 +2,12 @@
// This file defines settingpages and externalpages under the "appearance" category
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$capabilities = array(
'moodle/my:configsyspages',
'moodle/tag:manage'
);
if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themes')));
// "themesettings" settingpage
@@ -24,7 +29,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('themes', new admin_externalpage('themeselector', new lang_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
// settings for each theme
foreach (get_plugin_list('theme') as $theme => $themedir) {
foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
$settings_path = "$themedir/settings.php";
if (file_exists($settings_path)) {
$settings = new admin_settingpage('themesetting'.$theme, new lang_string('pluginname', 'theme_'.$theme));
@@ -186,10 +191,12 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configcheckbox('doctonewwindow', new lang_string('doctonewwindow', 'admin'), new lang_string('configdoctonewwindow', 'admin'), 0));
$ADMIN->add('appearance', $temp);
$temp = new admin_externalpage('mypage', new lang_string('mypage', 'admin'), $CFG->wwwroot . '/my/indexsys.php');
$temp = new admin_externalpage('mypage', new lang_string('mypage', 'admin'), $CFG->wwwroot . '/my/indexsys.php',
'moodle/my:configsyspages');
$ADMIN->add('appearance', $temp);
$temp = new admin_externalpage('profilepage', new lang_string('myprofile', 'admin'), $CFG->wwwroot . '/user/profilesys.php');
$temp = new admin_externalpage('profilepage', new lang_string('myprofile', 'admin'), $CFG->wwwroot . '/user/profilesys.php',
'moodle/my:configsyspages');
$ADMIN->add('appearance', $temp);
// coursecontact is the person responsible for course - usually manages enrolments, receives notification, etc.
@@ -214,10 +221,12 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$setting->set_updatedcallback('js_reset_all_caches');
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('modeditingmenu', new lang_string('modeditingmenu', 'admin'), new lang_string('modeditingmenu_desc', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('blockeditingmenu', new lang_string('blockeditingmenu', 'admin'), new lang_string('blockeditingmenu_desc', 'admin'), 1));
$ADMIN->add('appearance', $temp);
// link to tag management interface
$ADMIN->add('appearance', new admin_externalpage('managetags', new lang_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
$ADMIN->add('appearance', new admin_externalpage('managetags', new lang_string('managetags', 'tag'), $CFG->wwwroot.'/tag/manage.php', 'moodle/tag:manage'));
$temp = new admin_settingpage('additionalhtml', new lang_string('additionalhtml', 'admin'));
$temp->add(new admin_setting_heading('additionalhtml_heading', new lang_string('additionalhtml_heading', 'admin'), new lang_string('additionalhtml_desc', 'admin')));
+2
View File
@@ -32,6 +32,7 @@ if (($hassiteconfig || has_any_capability(array(
'moodle/badges:createbadge',
'moodle/badges:manageglobalsettings',
'moodle/badges:awardbadge',
'moodle/badges:configurecriteria',
'moodle/badges:configuremessages',
'moodle/badges:configuredetails',
'moodle/badges:deletebadge'), $systemcontext))) {
@@ -74,6 +75,7 @@ if (($hassiteconfig || has_any_capability(array(
'moodle/badges:viewawarded',
'moodle/badges:createbadge',
'moodle/badges:awardbadge',
'moodle/badges:configurecriteria',
'moodle/badges:configuremessages',
'moodle/badges:configuredetails',
'moodle/badges:deletebadge'
+48 -20
View File
@@ -1,20 +1,51 @@
<?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 file defines settingpages and externalpages under the "courses" category
/**
* This file defines settingpages and externalpages under the "courses" category
*
* @package core
* @copyright 2002 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if ($hassiteconfig
or has_capability('moodle/backup:backupcourse', $systemcontext)
or has_capability('moodle/category:manage', $systemcontext)
or has_capability('moodle/course:create', $systemcontext)
or has_capability('moodle/site:approvecourse', $systemcontext)) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('courses', new admin_externalpage('coursemgmt', new lang_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/manage.php',
array('moodle/category:manage', 'moodle/course:create')));
$capabilities = array(
'moodle/backup:backupcourse',
'moodle/category:manage',
'moodle/course:create',
'moodle/site:approvecourse'
);
if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
// Speedup for non-admins, add all caps used on this page.
$ADMIN->add('courses',
new admin_externalpage('coursemgmt', new lang_string('coursemgmt', 'admin'),
$CFG->wwwroot . '/course/management.php',
array('moodle/category:manage', 'moodle/course:create')
)
);
$ADMIN->add('courses',
new admin_externalpage('addcategory', new lang_string('addcategory', 'admin'),
new moodle_url('/course/editcategory.php', array('parent' => 0)),
array('moodle/category:manage')
)
);
// Course Default Settings Page.
// NOTE: these settings must be applied after all other settings because they depend on them.
// Main course settings.
$temp = new admin_settingpage('coursesettings', new lang_string('coursesettings'));
require_once($CFG->dirroot.'/course/lib.php');
@@ -25,7 +56,6 @@ if ($hassiteconfig
$temp->add(new admin_setting_configselect('moodlecourse/visible', new lang_string('visible'), new lang_string('visible_help'),
1, $choices));
// Course format.
$temp->add(new admin_setting_heading('courseformathdr', new lang_string('type_format', 'plugin'), ''));
@@ -55,7 +85,6 @@ if ($hassiteconfig
$temp->add(new admin_setting_configselect('moodlecourse/coursedisplay', new lang_string('coursedisplay'),
new lang_string('coursedisplay_help'), COURSE_DISPLAY_SINGLEPAGE, $choices));
// Appearance.
$temp->add(new admin_setting_heading('appearancehdr', new lang_string('appearance'), ''));
@@ -73,7 +102,6 @@ if ($hassiteconfig
$temp->add(new admin_setting_configselect('moodlecourse/showreports', new lang_string('showreports'), '', 0,
array(0 => new lang_string('no'), 1 => new lang_string('yes'))));
// Files and uploads.
$temp->add(new admin_setting_heading('filesanduploadshdr', new lang_string('filesanduploads'), ''));
@@ -92,13 +120,11 @@ if ($hassiteconfig
$temp->add(new admin_setting_configselect('moodlecourse/maxbytes', new lang_string('maximumupload'),
new lang_string('coursehelpmaximumupload'), key($choices), $choices));
// Completion tracking.
$temp->add(new admin_setting_heading('progress', new lang_string('completion','completion'), ''));
$temp->add(new admin_setting_configselect('moodlecourse/enablecompletion', new lang_string('completion', 'completion'),
new lang_string('enablecompletion_help', 'completion'), 0, array(0 => new lang_string('no'), 1 => new lang_string('yes'))));
// Groups.
$temp->add(new admin_setting_heading('groups', new lang_string('groups', 'group'), ''));
$choices = array();
@@ -119,13 +145,13 @@ if ($hassiteconfig
$temp->add(new admin_setting_users_with_capability('courserequestnotify', new lang_string('courserequestnotify', 'admin'), new lang_string('configcourserequestnotify2', 'admin'), array(), 'moodle/site:approvecourse'));
$ADMIN->add('courses', $temp);
/// Pending course requests.
// Pending course requests.
if (!empty($CFG->enablecourserequests)) {
$ADMIN->add('courses', new admin_externalpage('coursespending', new lang_string('pendingrequests'),
$CFG->wwwroot . '/course/pending.php', array('moodle/site:approvecourse')));
}
// Add a category for backups
// Add a category for backups.
$ADMIN->add('courses', new admin_category('backups', new lang_string('backups','admin')));
// Create a page for general backups configuration and defaults.
@@ -158,9 +184,11 @@ if ($hassiteconfig
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_comments', new lang_string('generalcomments','backup'), new lang_string('configgeneralcomments','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_badges', new lang_string('generalbadges','backup'), new lang_string('configgeneralbadges','backup'), array('value'=>1,'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_logs', new lang_string('generallogs','backup'), new lang_string('configgenerallogs','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), array('value'=>1, 'locked'=>0)));
$ADMIN->add('backups', $temp);
// Create a page for general import configuration and defaults.
@@ -231,14 +259,14 @@ if ($hassiteconfig
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_comments', new lang_string('generalcomments','backup'), new lang_string('configgeneralcomments','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_badges', new lang_string('generalbadges','backup'), new lang_string('configgeneralbadges','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', new lang_string('generallogs', 'backup'), new lang_string('configgenerallogs', 'backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_questionbank', new lang_string('generalquestionbank','backup'), new lang_string('configgeneralquestionbank','backup'), 1));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_messages', new lang_string('messages', 'message'), new lang_string('backupmessageshelp','message'), 0));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blogs', new lang_string('blogs', 'blog'), new lang_string('backupblogshelp','blog'), 0));
$ADMIN->add('backups', $temp);
} // end of speedup
}
+18
View File
@@ -19,6 +19,18 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$enablecssoptimiser->set_updatedcallback('theme_reset_all_caches');
$temp->add($enablecssoptimiser);
// Backup archive .mbz format: switching to .tar.gz enables larger files, better
// progress reporting and possibly better performance. This is an experimental
// setting but if successful, should be removed and enabled by default in a future
// version. Note: this setting controls newly-created backups only; restore always
// supports both formats.
$temp->add(new admin_setting_configcheckbox('enabletgzbackups',
new lang_string('enabletgzbackups', 'admin'),
new lang_string('enabletgzbackups_desc', 'admin'), 0));
$temp->add(new admin_setting_php_extension_enabled('zlibenabled',
get_string('zlibenabled', 'admin'),
get_string('enabletgzbackups_nozlib', 'admin'), 'zlib'));
$ADMIN->add('experimental', $temp);
// "debugging" settingpage
@@ -65,6 +77,10 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
60 => new lang_string('numminutes', '', 60),
30 => new lang_string('numminutes', '', 30),
15 => new lang_string('numminutes', '', 15))));
// Define the prefix to be added to imported profiling runs.
$temp->add(new admin_setting_configtext('profilingimportprefix',
new lang_string('profilingimportprefix', 'admin'),
new lang_string('profilingimportprefix_desc', 'admin'), '(I)', PARAM_TAG, 10));
// Add the 'profiling' page to admin block
$ADMIN->add('development', $temp);
@@ -80,4 +96,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
}
$ADMIN->add('development', new admin_externalpage('purgecaches', new lang_string('purgecaches','admin'), "$CFG->wwwroot/$CFG->admin/purgecaches.php"));
$ADMIN->add('development', new admin_externalpage('thirdpartylibs', new lang_string('thirdpartylibs','admin'), "$CFG->wwwroot/$CFG->admin/thirdpartylibs.php"));
} // end of speedup
-23
View File
@@ -69,29 +69,6 @@ if (!during_initial_install()) { //do not use during installation
}
$temp->add(new admin_setting_configselect('defaultfrontpageroleid', new lang_string('frontpagedefaultrole', 'admin'), '', $defaultfrontpageroleid, $options));
$ADMIN->add('frontpage', $temp);
$ADMIN->add('frontpage', new admin_externalpage('frontpageroles', new lang_string('frontpageroles', 'admin'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $frontpagecontext->id, 'moodle/role:assign', false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('frontpagefilters', new lang_string('frontpagefilters', 'admin'), "$CFG->wwwroot/filter/manage.php?contextid=" . $frontpagecontext->id, 'moodle/filter:manage', false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('frontpagebackup', new lang_string('frontpagebackup', 'admin'), $CFG->wwwroot.'/backup/backup.php?id='.SITEID, 'moodle/backup:backupcourse', false, $frontpagecontext));
$ADMIN->add('frontpage', new admin_externalpage('frontpagerestore', new lang_string('frontpagerestore', 'admin'), $CFG->wwwroot.'/backup/restorefile.php?contextid='.$frontpagecontext->id, 'moodle/restore:restorecourse', false, $frontpagecontext));
$questioncapabilities = array(
'moodle/question:add',
'moodle/question:editmine',
'moodle/question:editall',
'moodle/question:viewmine',
'moodle/question:viewall',
'moodle/question:movemine',
'moodle/question:moveall');
$ADMIN->add('frontpage', new admin_externalpage('frontpagequestions', new lang_string('frontpagequestions', 'admin'), $CFG->wwwroot.'/question/edit.php?courseid='.SITEID, $questioncapabilities, false, $frontpagecontext));
if (!empty($SITE->legacyfiles) and $SITE->legacyfiles === 2) {
$ADMIN->add('frontpage', new admin_externalpage('sitefiles', new lang_string('sitelegacyfiles'), $CFG->wwwroot . '/files/index.php?id=' . SITEID, 'moodle/course:managefiles', false, $frontpagecontext));
}
}
}
+3 -3
View File
@@ -178,7 +178,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
// Reports
$ADMIN->add('grades', new admin_category('gradereports', new lang_string('reportsettings', 'grades')));
foreach (get_plugin_list('gradereport') as $plugin => $plugindir) {
foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) {
// Include all the settings commands for this plugin if there are any
if (file_exists($plugindir.'/settings.php')) {
$settings = new admin_settingpage('gradereport'.$plugin, new lang_string('pluginname', 'gradereport_'.$plugin), 'moodle/grade:manage');
@@ -191,7 +191,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
// Imports
$ADMIN->add('grades', new admin_category('gradeimports', new lang_string('importsettings', 'grades')));
foreach (get_plugin_list('gradeimport') as $plugin => $plugindir) {
foreach (core_component::get_plugin_list('gradeimport') as $plugin => $plugindir) {
// Include all the settings commands for this plugin if there are any
if (file_exists($plugindir.'/settings.php')) {
@@ -206,7 +206,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
// Exports
$ADMIN->add('grades', new admin_category('gradeexports', new lang_string('exportsettings', 'grades')));
foreach (get_plugin_list('gradeexport') as $plugin => $plugindir) {
foreach (core_component::get_plugin_list('gradeexport') as $plugin => $plugindir) {
// Include all the settings commands for this plugin if there are any
if (file_exists($plugindir.'/settings.php')) {
$settings = new admin_settingpage('gradeexport'.$plugin, new lang_string('pluginname', 'gradeexport_'.$plugin), 'moodle/grade:manage');
+88 -53
View File
@@ -1,47 +1,65 @@
<?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/>.
/*
* Please note that is file is always loaded last - it means that you can inject entries into other categories too.
*/
/**
* Load all plugins into the admin tree.
*
* Please note that is file is always loaded last - it means that you can inject entries into other categories too.
*
* @package core
* @copyright 2007 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if ($hassiteconfig) {
require_once("$CFG->libdir/pluginlib.php");
$allplugins = plugin_manager::instance()->get_plugins();
$ADMIN->add('modules', new admin_page_pluginsoverview());
// activity modules
$ADMIN->add('modules', new admin_category('modsettings', new lang_string('activitymodules')));
$ADMIN->add('modsettings', new admin_page_managemods());
foreach ($allplugins['mod'] as $module) {
$module->load_settings($ADMIN, 'modsettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('mod') as $plugin) {
/** @var \core\plugininfo\mod $plugin */
$plugin->load_settings($ADMIN, 'modsettings', $hassiteconfig);
}
// hidden script for converting journals to online assignments (or something like that) linked from elsewhere
$ADMIN->add('modsettings', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot.'/'.$CFG->admin.'/oacleanup.php', 'moodle/site:config', true));
// course formats
$ADMIN->add('modules', new admin_category('formatsettings', new lang_string('courseformats')));
$temp = new admin_settingpage('manageformats', new lang_string('manageformats', 'core_admin'));
$temp->add(new admin_setting_manageformats());
$ADMIN->add('formatsettings', $temp);
foreach ($allplugins['format'] as $format) {
$format->load_settings($ADMIN, 'formatsettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('format') as $plugin) {
/** @var \core\plugininfo\format $plugin */
$plugin->load_settings($ADMIN, 'formatsettings', $hassiteconfig);
}
// blocks
$ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
$ADMIN->add('blocksettings', new admin_page_manageblocks());
foreach ($allplugins['block'] as $block) {
$block->load_settings($ADMIN, 'blocksettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('block') as $plugin) {
/** @var \core\plugininfo\block $plugin */
$plugin->load_settings($ADMIN, 'blocksettings', $hassiteconfig);
}
// message outputs
$ADMIN->add('modules', new admin_category('messageoutputs', new lang_string('messageoutputs', 'message')));
$ADMIN->add('messageoutputs', new admin_page_managemessageoutputs());
$ADMIN->add('messageoutputs', new admin_page_defaultmessageoutputs());
foreach ($allplugins['message'] as $processor) {
$processor->load_settings($ADMIN, 'messageoutputs', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('message') as $plugin) {
/** @var \core\plugininfo\message $plugin */
$plugin->load_settings($ADMIN, 'messageoutputs', $hassiteconfig);
}
// authentication plugins
@@ -69,8 +87,12 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_configtext('recaptchaprivatekey', new lang_string('recaptchaprivatekey', 'admin'), new lang_string('configrecaptchaprivatekey', 'admin'), '', PARAM_NOTAGS));
$ADMIN->add('authsettings', $temp);
foreach ($allplugins['auth'] as $auth) {
$auth->load_settings($ADMIN, 'authsettings', $hassiteconfig);
$temp = new admin_externalpage('authtestsettings', get_string('testsettings', 'core_auth'), new moodle_url("/auth/test_settings.php"), 'moodle/site:config', true);
$ADMIN->add('authsettings', $temp);
foreach (core_plugin_manager::instance()->get_plugins_of_type('auth') as $plugin) {
/** @var \core\plugininfo\auth $plugin */
$plugin->load_settings($ADMIN, 'authsettings', $hassiteconfig);
}
// Enrolment plugins
@@ -78,8 +100,13 @@ if ($hassiteconfig) {
$temp = new admin_settingpage('manageenrols', new lang_string('manageenrols', 'enrol'));
$temp->add(new admin_setting_manageenrols());
$ADMIN->add('enrolments', $temp);
foreach($allplugins['enrol'] as $enrol) {
$enrol->load_settings($ADMIN, 'enrolments', $hassiteconfig);
$temp = new admin_externalpage('enroltestsettings', get_string('testsettings', 'core_enrol'), new moodle_url("/enrol/test_settings.php"), 'moodle/site:config', true);
$ADMIN->add('enrolments', $temp);
foreach(core_plugin_manager::instance()->get_plugins_of_type('enrol') as $plugin) {
/** @var \core\plugininfo\enrol $plugin */
$plugin->load_settings($ADMIN, 'enrolments', $hassiteconfig);
}
@@ -88,8 +115,9 @@ if ($hassiteconfig) {
$temp = new admin_settingpage('manageeditors', new lang_string('editorsettings', 'editor'));
$temp->add(new admin_setting_manageeditors());
$ADMIN->add('editorsettings', $temp);
foreach ($allplugins['editor'] as $editor) {
$editor->load_settings($ADMIN, 'editorsettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('editor') as $plugin) {
/** @var \core\plugininfo\editor $plugin */
$plugin->load_settings($ADMIN, 'editorsettings', $hassiteconfig);
}
/// License types
@@ -150,8 +178,9 @@ if ($hassiteconfig) {
}
$ADMIN->add('filtersettings', $temp);
foreach ($allplugins['filter'] as $filter) {
$filter->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('filter') as $plugin) {
/** @var \core\plugininfo\filter $plugin */
$plugin->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
}
@@ -230,6 +259,7 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_configtext('repositorycacheexpire', new lang_string('cacheexpire', 'repository'), new lang_string('configcacheexpire', 'repository'), 120));
$temp->add(new admin_setting_configcheckbox('repositoryallowexternallinks', new lang_string('allowexternallinks', 'repository'), new lang_string('configallowexternallinks', 'repository'), 1));
$temp->add(new admin_setting_configcheckbox('legacyfilesinnewcourses', new lang_string('legacyfilesinnewcourses', 'admin'), new lang_string('legacyfilesinnewcourses_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('legacyfilesaddallowed', new lang_string('legacyfilesaddallowed', 'admin'), new lang_string('legacyfilesaddallowed_help', 'admin'), 1));
$ADMIN->add('repositorysettings', $temp);
$ADMIN->add('repositorysettings', new admin_externalpage('repositorynew',
new lang_string('addplugin', 'repository'), $url, 'moodle/site:config', true));
@@ -241,8 +271,9 @@ if ($hassiteconfig) {
new lang_string('createrepository', 'repository'), $url, 'moodle/site:config', true));
$ADMIN->add('repositorysettings', new admin_externalpage('repositoryinstanceedit',
new lang_string('editrepositoryinstance', 'repository'), $url, 'moodle/site:config', true));
foreach ($allplugins['repository'] as $repositorytype) {
$repositorytype->load_settings($ADMIN, 'repositorysettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('repository') as $plugin) {
/** @var \core\plugininfo\repository $plugin */
$plugin->load_settings($ADMIN, 'repositorysettings', $hassiteconfig);
}
/// Web services
@@ -290,8 +321,9 @@ if ($hassiteconfig) {
'admin'), new lang_string('configenablewsdocumentation', 'admin', $wsdoclink), false));
$ADMIN->add('webservicesettings', $temp);
/// links to protocol pages
foreach ($allplugins['webservice'] as $webservice) {
$webservice->load_settings($ADMIN, 'webservicesettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('webservice') as $plugin) {
/** @var \core\plugininfo\webservice $plugin */
$plugin->load_settings($ADMIN, 'webservicesettings', $hassiteconfig);
}
/// manage token page link
$ADMIN->add('webservicesettings', new admin_externalpage('addwebservicetoken', new lang_string('managetokens', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/tokens.php", 'moodle/site:config', true));
@@ -305,10 +337,6 @@ if ($hassiteconfig) {
// Question type settings
if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
if (!$hassiteconfig) {
require_once("$CFG->libdir/pluginlib.php");
$allplugins = plugin_manager::instance()->get_plugins();
}
// Question behaviour settings.
$ADMIN->add('modules', new admin_category('qbehavioursettings', new lang_string('questionbehaviours', 'admin')));
@@ -365,8 +393,9 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
get_string('responsehistory', 'question'), '', 0, $hiddenofvisible));
// Settings for particular question types.
foreach ($allplugins['qtype'] as $qtype) {
$qtype->load_settings($ADMIN, 'qtypesettings', $hassiteconfig);
foreach (core_plugin_manager::instance()->get_plugins_of_type('qtype') as $plugin) {
/** @var \core\plugininfo\qtype $plugin */
$plugin->load_settings($ADMIN, 'qtypesettings', $hassiteconfig);
}
}
@@ -376,7 +405,8 @@ if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
$ADMIN->add('plagiarism', new admin_externalpage('manageplagiarismplugins', new lang_string('manageplagiarism', 'plagiarism'),
$CFG->wwwroot . '/' . $CFG->admin . '/plagiarism.php'));
foreach ($allplugins['plagiarism'] as $plugin) {
foreach (core_plugin_manager::instance()->get_plugins_of_type('plagiarism') as $plugin) {
/** @var \core\plugininfo\plagiarism $plugin */
$plugin->load_settings($ADMIN, 'plagiarism', $hassiteconfig);
}
}
@@ -385,7 +415,7 @@ $ADMIN->add('reports', new admin_externalpage('comments', new lang_string('comme
// Course reports settings
if ($hassiteconfig) {
$pages = array();
foreach (get_plugin_list('coursereport') as $report => $path) {
foreach (core_component::get_plugin_list('coursereport') as $report => $path) {
$file = $CFG->dirroot . '/course/report/' . $report . '/settings.php';
if (file_exists($file)) {
$settings = new admin_settingpage('coursereport' . $report,
@@ -408,7 +438,7 @@ if ($hassiteconfig) {
// Now add reports
$pages = array();
foreach (get_plugin_list('report') as $report => $plugindir) {
foreach (core_component::get_plugin_list('report') as $report => $plugindir) {
$settings_path = "$plugindir/settings.php";
if (file_exists($settings_path)) {
$settings = new admin_settingpage('report' . $report,
@@ -433,12 +463,10 @@ if ($hassiteconfig) {
$CFG->wwwroot . '/' . $CFG->admin . '/tools.php'));
}
// Now add various admin tools
foreach (get_plugin_list('tool') as $plugin => $plugindir) {
$settings_path = "$plugindir/settings.php";
if (file_exists($settings_path)) {
include($settings_path);
}
// Now add various admin tools.
foreach (core_plugin_manager::instance()->get_plugins_of_type('tool') as $plugin) {
/** @var \core\plugininfo\tool $plugin */
$plugin->load_settings($ADMIN, null, $hassiteconfig);
}
// Now add the Cache plugins
@@ -447,7 +475,7 @@ if ($hassiteconfig) {
$ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php'));
$ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php'));
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
foreach (get_plugin_list('cachestore') as $plugin => $path) {
foreach (core_component::get_plugin_list('cachestore') as $plugin => $path) {
$settingspath = $path.'/settings.php';
if (file_exists($settingspath)) {
$settings = new admin_settingpage('cachestore_'.$plugin.'_settings', new lang_string('pluginname', 'cachestore_'.$plugin), 'moodle/site:config');
@@ -457,6 +485,16 @@ if ($hassiteconfig) {
}
}
// Add Calendar type settings.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
foreach (core_component::get_plugin_list_with_file('calendartype', 'settings.php') as $plugin => $settingspath) {
$settings = new admin_settingpage('calendartype_' . $plugin . '_settings', new lang_string('pluginname', 'calendartype_' . $plugin), 'moodle/site:config');
include($settingspath);
$ADMIN->add('calendartype', $settings);
}
}
/// Add all local plugins - must be always last!
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('localplugins', new lang_string('localplugins')));
@@ -464,12 +502,9 @@ if ($hassiteconfig) {
$CFG->wwwroot . '/' . $CFG->admin . '/localplugins.php'));
}
// extend settings for each local plugin. Note that their settings may be in any part of the
// settings tree and may be visible not only for administrators. We can not use $allplugins here
foreach (get_plugin_list('local') as $plugin => $plugindir) {
$settings_path = "$plugindir/settings.php";
if (file_exists($settings_path)) {
include($settings_path);
continue;
}
// Extend settings for each local plugin. Note that their settings may be in any part of the
// settings tree and may be visible not only for administrators.
foreach (core_plugin_manager::instance()->get_plugins_of_type('local') as $plugin) {
/** @var \core\plugininfo\local $plugin */
$plugin->load_settings($ADMIN, null, $hassiteconfig);
}
+17 -5
View File
@@ -46,11 +46,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
1800 => new lang_string('numminutes', '', 30),
2700 => new lang_string('numminutes', '', 45),
3600 => new lang_string('numminutes', '', 60))));
$temp->add(new admin_setting_configselect('fullnamedisplay', new lang_string('fullnamedisplay', 'admin'), new lang_string('configfullnamedisplay', 'admin'),
'language', array('language' => new lang_string('language'),
'firstname lastname' => new lang_string('firstname').' + '.new lang_string('lastname'),
'lastname firstname' => new lang_string('lastname').' + '.new lang_string('firstname'),
'firstname' => new lang_string('firstname'))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', new lang_string('extendedusernamechars', 'admin'), new lang_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', new lang_string('sitepolicy', 'admin'), new lang_string('sitepolicy_help', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('sitepolicyguest', new lang_string('sitepolicyguest', 'admin'), new lang_string('sitepolicyguest_help', 'admin'), (isset($CFG->sitepolicy) ? $CFG->sitepolicy : ''), PARAM_RAW));
@@ -74,6 +70,22 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configtext('minpasswordupper', new lang_string('minpasswordupper', 'admin'), new lang_string('configminpasswordupper', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('minpasswordnonalphanum', new lang_string('minpasswordnonalphanum', 'admin'), new lang_string('configminpasswordnonalphanum', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('maxconsecutiveidentchars', new lang_string('maxconsecutiveidentchars', 'admin'), new lang_string('configmaxconsecutiveidentchars', 'admin'), 0, PARAM_INT));
$pwresetoptions = array(
300 => new lang_string('numminutes', '', 5),
900 => new lang_string('numminutes', '', 15),
1800 => new lang_string('numminutes', '', 30),
2700 => new lang_string('numminutes', '', 45),
3600 => new lang_string('numminutes', '', 60),
7200 => new lang_string('numminutes', '', 120),
14400 => new lang_string('numminutes', '', 240)
);
$adminsetting = new admin_setting_configselect(
'pwresettime',
new lang_string('passwordresettime','admin'),
new lang_string('configpasswordresettime','admin'),
1800,
$pwresetoptions);
$temp->add($adminsetting);
$temp->add(new admin_setting_configcheckbox('groupenrolmentkeypolicy', new lang_string('groupenrolmentkeypolicy', 'admin'), new lang_string('groupenrolmentkeypolicy_desc', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('disableuserimages', new lang_string('disableuserimages', 'admin'), new lang_string('configdisableuserimages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('emailchangeconfirmation', new lang_string('emailchangeconfirmation', 'admin'), new lang_string('configemailchangeconfirmation', 'admin'), 1));
+20 -8
View File
@@ -35,7 +35,9 @@ $ADMIN->add('server', $temp);
// "sessionhandling" settingpage
$temp = new admin_settingpage('sessionhandling', new lang_string('sessionhandling', 'admin'));
$temp->add(new admin_setting_configcheckbox('dbsessions', new lang_string('dbsessions', 'admin'), new lang_string('configdbsessions', 'admin'), 1));
if (empty($CFG->session_handler_class) and $DB->session_lock_supported()) {
$temp->add(new admin_setting_configcheckbox('dbsessions', new lang_string('dbsessions', 'admin'), new lang_string('configdbsessions', 'admin'), 0));
}
$temp->add(new admin_setting_configselect('sessiontimeout', new lang_string('sessiontimeout', 'admin'), new lang_string('configsessiontimeout', 'admin'), 7200, array(14400 => new lang_string('numhours', '', 4),
10800 => new lang_string('numhours', '', 3),
7200 => new lang_string('numhours', '', 2),
@@ -175,15 +177,25 @@ $ADMIN->add('server', new admin_externalpage('phpinfo', new lang_string('phpinfo
// "performance" settingpage
$temp = new admin_settingpage('performance', new lang_string('performance', 'admin'));
// Memory limit options for large administration tasks.
$memoryoptions = array(
'64M' => '64M',
'128M' => '128M',
'256M' => '256M',
'512M' => '512M',
'1024M' => '1024M',
'2048M' => '2048M');
// Allow larger memory usage for 64-bit sites only.
if (PHP_INT_SIZE === 8) {
$memoryoptions['3072M'] = '3072M';
$memoryoptions['4096M'] = '4096M';
}
$temp->add(new admin_setting_configselect('extramemorylimit', new lang_string('extramemorylimit', 'admin'),
new lang_string('configextramemorylimit', 'admin'), '512M',
// if this option is set to 0, default 128M will be used
array( '64M' => '64M',
'128M' => '128M',
'256M' => '256M',
'512M' => '512M',
'1024M' => '1024M'
)));
$memoryoptions));
$temp->add(new admin_setting_configtext('curlcache', new lang_string('curlcache', 'admin'),
new lang_string('configcurlcache', 'admin'), 120, PARAM_INT));
+8
View File
@@ -35,6 +35,14 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
new lang_string('enablecompletion','completion'),
new lang_string('configenablecompletion','completion'), 0));
$options = array(
1 => get_string('completionactivitydefault', 'completion'),
0 => get_string('completion_none', 'completion')
);
$optionalsubsystems->add(new admin_setting_configselect('completiondefault', new lang_string('completiondefault', 'completion'),
new lang_string('configcompletiondefault', 'completion'), 1, $options));
$optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
new lang_string('enableavailability','condition'),
new lang_string('configenableavailability','condition'), 0));
+1
View File
@@ -150,6 +150,7 @@ if ($hassiteconfig
'department' => new lang_string('department'),
'institution' => new lang_string('institution'),
)));
$temp->add(new admin_setting_configtext('fullnamedisplay', new lang_string('fullnamedisplay', 'admin'), new lang_string('configfullnamedisplay', 'admin'), 'language', PARAM_TEXT, 50));
$temp->add(new admin_setting_configtext('maxusersperpage', new lang_string('maxusersperpage','admin'), new lang_string('configmaxusersperpage','admin'), 100, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('enablegravatar', new lang_string('enablegravatar', 'admin'), new lang_string('enablegravatar_help', 'admin'), 0));
$temp->add(new admin_setting_configtext('gravatardefaulturl', new lang_string('gravatardefaulturl', 'admin'), new lang_string('gravatardefaulturl_help', 'admin'), 'mm'));
+42 -10
View File
@@ -28,7 +28,8 @@
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
require_once(__DIR__ . '/../../../lib/behat/behat_field_manager.php');
use Behat\Gherkin\Node\TableNode as TableNode,
use Behat\Behat\Context\Step\Given as Given,
Behat\Gherkin\Node\TableNode as TableNode,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
/**
@@ -58,25 +59,43 @@ class behat_admin extends behat_base {
// We expect admin block to be visible, otherwise go to homepage.
if (!$this->getSession()->getPage()->find('css', '.block_settings')) {
$this->getSession()->visit($this->locate_path('/'));
$this->wait(self::TIMEOUT, '(document.readyState === "complete")');
$this->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
}
// Search by label.
$searchbox = $this->find_field('Search in settings');
$searchbox = $this->find_field(get_string('searchinsettings', 'admin'));
$searchbox->setValue($label);
$submitsearch = $this->find('css', 'form.adminsearchform input[type=submit]');
$submitsearch->press();
$this->wait(self::TIMEOUT, '(document.readyState === "complete")');
$this->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
// Admin settings does not use the same DOM structure than other moodle forms
// but we also need to use lib/behat/form_field/* to deal with the different moodle form elements.
$exception = new ElementNotFoundException($this->getSession(), '"' . $label . '" administration setting ');
$fieldxpath = "//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]" .
"[@id=//label[contains(normalize-space(string(.)), '" . $label . "')]/@for]";
$fieldnode = $this->find('xpath', $fieldxpath, $exception);
$formfieldtypenode = $this->find('xpath', $fieldxpath . "/ancestor::div[@class='form-setting']" .
"/child::div[contains(concat(' ', @class, ' '), ' form-')]/child::*/parent::div");
// The argument should be converted to an xpath literal.
$label = $this->getSession()->getSelectorsHandler()->xpathLiteral($label);
// Single element settings.
try {
$fieldxpath = "//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]" .
"[@id=//label[contains(normalize-space(.), $label)]/@for]";
$fieldnode = $this->find('xpath', $fieldxpath, $exception);
$formfieldtypenode = $this->find('xpath', $fieldxpath . "/ancestor::div[@class='form-setting']" .
"/child::div[contains(concat(' ', @class, ' '), ' form-')]/child::*/parent::div");
} catch (ElementNotFoundException $e) {
// Multi element settings, interacting only the first one.
$fieldxpath = "//descendant::label[.= $label]/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]" .
"/descendant::div[@class='form-group']/descendant::*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]";
$fieldnode = $this->find('xpath', $fieldxpath);
// It is the same one that contains the type.
$formfieldtypenode = $fieldnode;
}
// Getting the class which contains the field type.
$classes = explode(' ', $formfieldtypenode->getAttribute('class'));
@@ -90,7 +109,7 @@ class behat_admin extends behat_base {
$field = behat_field_manager::get_field_instance($type, $fieldnode, $this->getSession());
$field->set_value($value);
$this->find_button('Save changes')->press();
$this->find_button(get_string('savechanges'))->press();
}
}
@@ -106,4 +125,17 @@ class behat_admin extends behat_base {
$this->getSession()->wait($timeout, $javascript);
}
}
/**
* Will be deprecated in 2.7. Goes to notification page.
*
* @Given /^I go to notifications page$/
* @return Given[]
*/
public function i_go_to_notifications_page() {
return array(
new Given('I expand "' . get_string('administrationsite') . '" node'),
new Given('I follow "' . get_string('notifications') . '"')
);
}
}
@@ -15,7 +15,8 @@ Feature: Display extended course names
And I should not see "C_shortname Course fullname"
Scenario: Courses list with extended course names
Given I click on "Courses" "link" in the "//div[@id='settingsnav']//descendant::li[contains(concat(' ', @class, ' '), ' type_setting ')][not(contains(., 'Site administration'))][contains(., 'Appearance')]" "xpath_element"
Given I expand "Site administration" node
And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element"
And I check "Display extended course names"
When I press "Save changes"
And I am on homepage
+2 -3
View File
@@ -14,12 +14,12 @@ Feature: Upload users
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
And I expand "Front page settings" node
And I collapse "Front page settings" node
And I expand "Site administration" node
And I expand "Users" node
And I expand "Accounts" node
And I follow "Upload users"
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filepicker
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
And I press "Upload users"
Then I should see "Upload users preview"
And I should see "Tom"
@@ -42,5 +42,4 @@ Feature: Upload users
And I expand "Users" node
And I follow "Groups"
And I select "Section 1 (1)" from "groups"
And I wait "4" seconds
And the "members" select box should contain "Tom Jones"
+76
View File
@@ -0,0 +1,76 @@
<?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/>.
/**
* List of 3rd party libs used in moodle and all plugins.
*
* @package admin
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('thirdpartylibs');
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('thirdpartylibs', 'core_admin'));
$files = array('core' => "$CFG->libdir/thirdpartylibs.xml");
$plugintypes = core_component::get_plugin_types();
foreach ($plugintypes as $type => $ignored) {
$plugins = core_component::get_plugin_list_with_file($type, 'thirdpartylibs.xml', false);
foreach ($plugins as $plugin => $path) {
$files[$type.'_'.$plugin] = $path;
}
}
$table = new html_table();
$table->head = array(
get_string('thirdpartylibrary', 'core_admin'), get_string('version'),
get_string('thirdpartylibrarylocation', 'core_admin'), get_string('license'));
$table->align = array('left', 'left', 'left', 'left');
$table->id = 'thirdpartylibs';
$table->attributes['class'] = 'admintable generaltable';
$table->data = array();
foreach ($files as $component => $xmlpath) {
$xml = simplexml_load_file($xmlpath);
foreach ($xml as $lib) {
$base = realpath(dirname($xmlpath));
$location = substr($base, strlen($CFG->dirroot)).'/'.$lib->location;
if (is_dir($CFG->dirroot.$location)) {
$location .= '/';
}
$version = '';
if (!empty($lib->version)) {
$version = $lib->version;
}
$license = $lib->license;
if (!empty($lib->licenseversion)) {
$license .= ' '.$lib->licenseversion;
}
$table->data[] = new html_table_row(array($lib->name, $version, $location, $license));
}
}
echo html_writer::table($table);
echo $OUTPUT->footer();
@@ -47,7 +47,7 @@ if (!$confirm) {
}
raise_memory_limit(MEMORY_EXTRA);
// Release session.
session_get_instance()->write_close();
\core\session\manager::write_close();
echo $renderer->header();
echo $renderer->heading(get_string('batchupgrade', 'tool_assignmentupgrade'));
+3 -3
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013050100;
$plugin->requires = 2013050100;
$plugin->version = 2013110500;
$plugin->requires = 2013110500;
$plugin->component = 'tool_assignmentupgrade';
$plugin->dependencies = array('mod_assign' => 2013050100);
$plugin->dependencies = array('mod_assign' => 2013110500);
+7
View File
@@ -26,8 +26,15 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
die(); // No access from web!
}
// Force OPcache reset if used, we do not want any stale caches
// when preparing test environment.
if (function_exists('opcache_reset')) {
opcache_reset();
}
// Is not really necessary but adding it as is a CLI_SCRIPT.
define('CLI_SCRIPT', true);
define('CACHE_DISABLE_ALL', true);
// Basic functions.
require_once(__DIR__ . '/../../../../lib/clilib.php');
+15 -15
View File
@@ -84,6 +84,7 @@ define('BEHAT_UTIL', true);
define('CLI_SCRIPT', true);
define('ABORT_AFTER_CONFIG', true);
define('NO_OUTPUT_BUFFERING', true);
define('IGNORE_COMPONENT_CACHE', true);
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', '1');
@@ -92,21 +93,17 @@ ini_set('log_errors', '1');
// Getting $CFG data.
require_once(__DIR__ . '/../../../../config.php');
// CFG->behat_prefix must be set and with value different than CFG->prefix and phpunit_prefix.
if (empty($CFG->behat_prefix) ||
($CFG->behat_prefix == $CFG->prefix) ||
(!empty($CFG->phpunit_prefix) && $CFG->behat_prefix == $CFG->phpunit_prefix)) {
behat_error(BEHAT_EXITCODE_CONFIG,
'Define $CFG->behat_prefix in config.php with a value different than $CFG->prefix and $CFG->phpunit_prefix');
}
// When we use the utilities we don't know how the site
// will be accessed, so if neither $CFG->behat_switchcompletely or
// $CFG->behat_wwwroot are set we must think that the site will
// be accessed using the built-in server which is set by default
// to localhost:8000. We need to do this to prevent uses of the production
// wwwroot when the site is being installed / dropped...
$CFG->behat_wwwroot = behat_get_wwwroot();
// CFG->behat_dataroot must be set and with value different than CFG->dataroot and phpunit_dataroot.
if (empty($CFG->behat_dataroot) ||
($CFG->behat_dataroot == $CFG->dataroot) ||
(!empty($CFG->phpunit_dataroot) && $CFG->behat_dataroot == $CFG->phpunit_dataroot)) {
behat_error(BEHAT_EXITCODE_CONFIG,
'Define $CFG->behat_dataroot in config.php with a value different than $CFG->dataroot and $CFG->phpunit_dataroot');
}
// Checking the integrity of the provided $CFG->behat_* vars
// to prevent conflicts with production and phpunit environments.
behat_check_config_vars();
// Create behat_dataroot if it doesn't exists.
if (!file_exists($CFG->behat_dataroot)) {
@@ -142,6 +139,9 @@ foreach ($vars as $var) {
$CFG->{$var} = $CFG->{'behat_' . $var};
}
// Clean $CFG extra values before performing any action.
behat_clean_init_config();
$CFG->noemailever = true;
$CFG->passwordsaltmain = 'moodle';
@@ -150,6 +150,7 @@ $CFG->jsrev = 1;
// Unset cache and temp directories to reset them again with the new $CFG->dataroot.
unset($CFG->cachedir);
unset($CFG->localcachedir);
unset($CFG->tempdir);
// Continues setup.
@@ -159,7 +160,6 @@ require("$CFG->dirroot/lib/setup.php");
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/upgradelib.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->libdir.'/pluginlib.php');
require_once($CFG->libdir.'/installlib.php');
require_once($CFG->libdir.'/testing/classes/test_lock.php');
+4 -2
View File
@@ -22,8 +22,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['aim'] = 'This administration tool helps developers and test writers to create .feature files describing Moodle\'s functionalities and run them automatically.';
$string['allavailablesteps'] = 'All the available steps definitions';
$string['giveninfo'] = 'Given. Processes to set up the environment';
$string['infoheading'] = 'Info';
$string['installinfo'] = 'Read {$a} for installation and tests execution info';
$string['moreinfoin'] = 'More info in {$a}';
$string['newstepsinfo'] = 'Read {$a} for info about how to add new steps definitions';
@@ -36,9 +38,9 @@ $string['stepsdefinitionscontains'] = 'Contains';
$string['stepsdefinitionsfilters'] = 'Steps definitions';
$string['stepsdefinitionstype'] = 'Type';
$string['theninfo'] = 'Then. Checkings to ensure the outcomes are the expected ones';
$string['unknownexceptioninfo'] = 'There was a problem with Selenium or your browser. Please ensure you are using the latest version of Selenium. Error:';
$string['viewsteps'] = 'Filter';
$string['wheninfo'] = 'When. Actions that provokes an event';
$string['wrongbehatsetup'] = 'Something is wrong with behat setup, ensure:<ul>
<li>You ran "curl http://getcomposer.org/installer | php"</li>
<li>You ran "php composer.phar install --dev"</li>
<li>You ran "php admin/tool/behat/cli/init.php" from your moodle root directory</li>
<li>vendor/bin/behat file has execution permissions</li></ul>';
+15 -5
View File
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/behat/classes/behat_command.php');
require_once($CFG->libdir . '/behat/classes/behat_selectors.php');
/**
* Renderer for behat tool web features
@@ -64,9 +64,10 @@ class tool_behat_renderer extends plugin_renderer_base {
get_string('newstepsinfo', 'tool_behat', $writestepslink)
);
// List of steps
// List of steps.
$html .= $this->output->box_start();
$html .= html_writer::tag('h1', 'Info');
$html .= html_writer::tag('h1', get_string('infoheading', 'tool_behat'));
$html .= html_writer::tag('div', get_string('aim', 'tool_behat'));
$html .= html_writer::empty_tag('div');
$html .= html_writer::empty_tag('ul');
$html .= html_writer::empty_tag('li');
@@ -91,7 +92,7 @@ class tool_behat_renderer extends plugin_renderer_base {
// Replace text selector type arguments with a user-friendly select.
$stepsdefinitions = preg_replace_callback('/(TEXT_SELECTOR\d?_STRING)/',
function ($matches) {
return html_writer::select(behat_command::$allowedtextselectors, uniqid());
return html_writer::select(behat_selectors::get_allowed_text_selectors(), uniqid());
},
$stepsdefinitions
);
@@ -99,7 +100,16 @@ class tool_behat_renderer extends plugin_renderer_base {
// Replace selector type arguments with a user-friendly select.
$stepsdefinitions = preg_replace_callback('/(SELECTOR\d?_STRING)/',
function ($matches) {
return html_writer::select(behat_command::$allowedselectors, uniqid());
return html_writer::select(behat_selectors::get_allowed_selectors(), uniqid());
},
$stepsdefinitions
);
// Replace simple OR options.
$regex = '#\(\?P<[^>]+>([^\)|]+\|[^\)]+)\)#';
$stepsdefinitions = preg_replace_callback($regex,
function($matches){
return html_writer::select(explode('|', $matches[1]), uniqid());
},
$stepsdefinitions
);
@@ -18,12 +18,16 @@ Feature: Page contents assertions
When I follow "Overview"
And I wait until the page is ready
And I wait "2" seconds
And I hover ".region-content .generaltable td span" "css_element"
And I hover "#region-main .generaltable td span" "css_element"
Then I should see "I'm the description"
And "Grouping" "select" in the "region-main" "region" should be visible
And "Group" "select" should be visible
And "Messaging" "link" in the "Administration" "block" should not be visible
And "Change password" "link" should not be visible
And I should see "Filter groups by"
And I should not see "Filter groupssss by"
And I should see "Group members" in the ".region-content table th.c1" "css_element"
And I should not see "Group membersssss" in the ".region-content table th.c1" "css_element"
And I should see "Group members" in the "#region-main table th.c1" "css_element"
And I should not see "Group membersssss" in the "#region-main table th.c1" "css_element"
And I follow "Groups"
And the "#groupeditform #showcreateorphangroupform" "css_element" should be enabled
And the "#groupeditform #showeditgroupsettingsform" "css_element" should be disabled
@@ -35,9 +39,9 @@ Feature: Page contents assertions
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Course 1"
When I click on "Move this to the dock" "button" in the ".block_settings" "css_element"
Then I should not see "Question bank"
And I click on "//div[@id='dock']/descendant::*[contains(., 'Administration')]/h2" "xpath_element"
When I dock "Administration" block
Then I should not see "Question bank" in the "region-pre" "region"
And I click on "//div[@id='dock']/descendant::h2[normalize-space(.)='Administration']" "xpath_element"
@javascript
Scenario: Locators inside specific DOM nodes using XPath
@@ -45,5 +49,5 @@ Feature: Page contents assertions
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
When I click on "Move this to the dock" "button" in the "//*[contains(concat(' ', normalize-space(@class), ' '), ' block_settings ')]" "xpath_element"
Then I should not see "Turn editing on"
When I dock "Administration" block
Then I should not see "Turn editing on" in the "region-pre" "region"
@@ -1,4 +1,4 @@
@tool @tool_behat
@tool @tool_behat @_only_local
Feature: Set up contextual data for tests
In order to write tests quickly
As a developer
@@ -30,6 +30,17 @@ Feature: Set up contextual data for tests
Then I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I go to the courses management page
And I follow "Cat 1"
And I should see "Cat 2"
And I should see "Cat 3"
And I follow "Cat 3"
And I should see "Course 1"
And I should see "Course 2"
And I follow "Cat 2"
And I should see "No courses in this category"
And I follow "Miscellaneous"
And I should see "Course 3"
@javascript
Scenario: Add a bunch of groups and groupings
@@ -54,6 +65,37 @@ Feature: Set up contextual data for tests
And I should see "Grouping 1"
And I should see "Grouping 2"
@javascript
Scenario: Role overrides
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
And the following "categories" exists:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exists:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exists:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "permission overrides" exists:
| capability | permission | role | contextlevel | reference |
| mod/forum:editanypost | Allow | student | Course | C1 |
| mod/forum:replynews | Prevent | editingteacher | Course | C1 |
When I log in as "admin"
And I follow "Course 1"
And I expand "Users" node
And I follow "Permissions"
And I select "Student (1)" from "Advanced role override"
Then the "mod/forum:editanypost" field should match "1" value
And I press "Cancel"
And I select "Teacher (1)" from "Advanced role override"
And the "mod/forum:replynews" field should match "-1" value
And I press "Cancel"
Scenario: Add course enrolments
Given the following "users" exists:
| username | firstname | lastname | email |
@@ -68,6 +110,92 @@ Feature: Set up contextual data for tests
And I follow "Course 1"
Then I should see "Topic 1"
Scenario: Add role assigns
Given the following "users" exists:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@moodlemoodle.com |
| user2 | User | 2 | user2@moodlemoodle.com |
| user3 | User | 3 | user3@moodlemoodle.com |
And the following "categories" exists:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | CAT1 |
And the following "role assigns" exists:
| user | role | contextlevel | reference |
| user1 | manager | System | |
| user2 | editingteacher | Category | CAT1 |
| user3 | editingteacher | Course | C1 |
When I log in as "user1"
Then I should see "Front page settings"
And I log out
And I log in as "user2"
And I follow "Course 1"
And I should see "Turn editing on"
And I log out
And I log in as "user3"
And I follow "Course 1"
And I should see "Turn editing on"
Scenario: Add modules
Given the following "courses" exists:
| fullname | shortname |
| Course 1 | C1 |
And the following "activities" exists:
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| assignment | Test assignment22 name | Test assignment22 description | C1 | assignment1 |
| book | Test book name | Test book description | C1 | book1 |
| chat | Test chat name | Test chat description | C1 | chat1 |
| choice | Test choice name | Test choice description | C1 | choice1 |
| data | Test database name | Test database description | C1 | data1 |
| feedback | Test feedback name | Test feedback description | C1 | feedback1 |
| folder | Test folder name | Test folder description | C1 | folder1 |
| forum | Test forum name | Test forum description | C1 | forum1 |
| glossary | Test glossary name | Test glossary description | C1 | glossary1 |
| imscp | Test imscp name | Test imscp description | C1 | imscp1 |
| label | Test label name | Test label description | C1 | label1 |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
| lti | Test lti name | Test lti description | C1 | lti1 |
| page | Test page name | Test page description | C1 | page1 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
| resource | Test resource name | Test resource description | C1 | resource1 |
| scorm | Test scorm name | Test scorm description | C1 | scorm1 |
| survey | Test survey name | Test survey description | C1 | survey1 |
| url | Test url name | Test url description | C1 | url1 |
| wiki | Test wiki name | Test wiki description | C1 | wiki1 |
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
When I log in as "admin"
And I follow "Course 1"
Then I should see "Test assignment name"
# Assignment 2.2 module type is disabled by default
# And I should see "Test assignment22 name"
And I should see "Test book name"
And I should see "Test chat name"
And I should see "Test choice name"
And I should see "Test database name"
# Feedback module type is disabled by default
# And I should see "Test feedback name"
And I should see "Test folder name"
And I should see "Test forum name"
And I should see "Test glossary name"
And I should see "Test imscp name"
# We don't see label name, we see only description:
And I should see "Test label description"
And I should see "Test lesson name"
And I should see "Test lti name"
And I should see "Test page name"
And I should see "Test quiz name"
And I should see "Test resource name"
And I should see "Test scorm name"
And I should see "Test survey name"
And I should see "Test url name"
And I should see "Test wiki name"
And I should see "Test workshop name"
And I follow "Test assignment name"
And I should see "Test assignment description"
@javascript
Scenario: Add relations between users and groups
Given the following "users" exists:
@@ -102,8 +230,6 @@ Feature: Set up contextual data for tests
Then the "groups" select box should contain "Group 1 (1)"
And the "groups" select box should contain "Group 2 (1)"
And I select "Group 1 (1)" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 1"
And I select "Group 2 (1)" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 2"
@@ -10,10 +10,10 @@ Feature: Forms manipulation
And I follow "Admin User"
And I follow "Edit profile"
When I fill in "First name" with "Field value"
And I select "Use standard web forms" from "When editing text"
And I select "Plain text area" from "Text editor"
And I check "Unmask"
Then the "First name" field should match "Field value" value
And the "When editing text" select box should contain "Use standard web forms"
And the "Text editor" select box should contain "Plain text area"
And the "Unmask" checkbox should be checked
And I uncheck "Unmask"
And the "Unmask" checkbox should not be checked
@@ -32,5 +32,5 @@ Feature: Forms manipulation
Then I should see "Close the quiz"
And I should see "Group mode"
And I should see "Grouping"
And I should not see "Show more..."
And I should not see "Show more..." in the "region-main" "region"
And I should see "Show less..."

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