Compare commits

..

2702 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) a7a0e1fea1 Moodle release 2.5.7 2014-07-12 19:10:29 +02:00
AMOS bot 0b3cbbc70d Automatically generated installer lang files 2014-07-12 00:42:51 +00:00
AMOS bot cdc60776d7 Merge branch 'MOODLE_25_STABLE' into install_25_STABLE 2014-07-11 00:44:28 +00:00
Ankit Agarwal ec6f010b22 MDL-46148 qtype_calculated: low-level defence against bad formulas
This catches things like:
 * Malicious equations coming from backup files.
 * Malicious equations in old questions in the database.
2014-07-10 17:54:44 +08:00
Andrew Nicols e3fd900dcd MDL-38990 mod_forum: Restrict ability to post to all groups in a forum
In order to post to all groups in a forum, you must have the
moodle/site:accessallgroups capability.

Thanks to Jakob Ackermann <jackermann@onlineschool.ca> for part of the fix
on this one.
2014-07-10 16:41:25 +08:00
Damyon Wiese b2f2535c53 MDL-46148 questions: Added missing allow_commit for transaction 2014-07-10 11:38:46 +08:00
Tim Hunt 0509827f7e MDL-46148 qtype_calculatedsimple: fix notice
... when adding a dataset with a formula error.
2014-07-09 14:11:47 +01:00
Tim Hunt b46ec69145 MDL-46148 qtype_calculated: fix validation when importing.
In order to do this in a sane way, I cleaned up a lot of old mess,
inclduing:

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

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

3. Finally, I made import use a transaction around saving each
question, so we don't get half questions in the database when an error
occurs.
2014-07-09 14:11:47 +01:00
Tim Hunt 6a8d442b0f MDL-46148 qtype_calculated: removed unused method. 2014-07-09 14:11:46 +01:00
David Mudrák e42b6e20bd MDL-46223 Fix frequently used comments in the marking guide
When the frequently used comment contains a character like >, re-use it
directly instead of its HTML entitiy.
2014-07-09 16:44:58 +08:00
David Mudrák 72d1a3ab0b MDL-46223 Improve the display of marking guide validation message 2014-07-09 16:44:54 +08:00
Frederic Massart 6eb787b873 MDL-45471 javascript: Escape content of exception dialogs 2014-07-08 14:13:42 +01:00
Marina Glancy ec57b5669c MDL-43948 forms: setting types to filemanager and editor elements 2014-07-08 10:47:38 +01:00
David Mudrák 98d5566c22 MDL-46223 Improve the marking guide output 2014-07-08 13:20:48 +08:00
David Mudrák 555ee08b17 MDL-46223 Improve the rubric output 2014-07-08 13:20:48 +08:00
Yuliya Bozhko 9eef6b5237 MDL-46042 badges: Clean up external badge data
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-07-07 16:37:55 +01:00
Osanda Malith Jayathissa f7b6562f20 MDL-45683 user: Escaping Skype ID used in profile 2014-07-07 16:05:12 +01:00
Marina Glancy dc97145785 MDL-45760 make sure to check permission before setting header 2014-07-07 15:06:56 +01:00
Tim Hunt bee1c88151 MDL-46148 qtype_calculated: fix formula validation. 2014-07-07 14:34:10 +01:00
Frederic Massart 01cf8fdd9c MDL-45417 mod_imscp: Prevent entity injections from package content 2014-07-07 13:03:09 +01:00
Frederic Massart cadfc08197 MDL-45463 mod_lti: Prevent XML entity injections from provider 2014-07-07 13:00:11 +01:00
Marina Glancy 7bcf9b1e2c MDL-45616 repositories: use json encoding instead of serialization 2014-07-07 15:23:49 +08:00
Marina Glancy 3fe105953d MDL-45616 repositories: more clearly distinguish when we use source and when reference
Function repository::get_moodle_file() should always be called on packed reference and not on the source received from user.
Also added phpdocs to some other methods that were confusing source and reference
2014-07-07 15:23:49 +08:00
Rex Lorenzo f0ab42f985 MDL-45485 auth_shibboleth: User taking over other user's session
Replacing code with call to complete_user_login() since it calls session_regenerate_id().
2014-07-07 13:58:05 +08:00
Dan Poltawski 0d5a27b1b1 MDL-43848 messages: do not display message content in popups
The user is not in control of when these popups show up and it
may not be appropiate to have part of this content display whilst
in the presence of other users.
2014-07-07 13:48:38 +08:00
AMOS bot 9ac2ce599c Automatically generated installer lang files 2014-07-04 00:44:36 +00:00
AMOS bot 0b65ec524b Automatically generated installer lang files 2014-07-02 00:44:54 +00:00
AMOS bot 492f00a24a Automatically generated installer lang files 2014-06-29 00:43:06 +00:00
AMOS bot e4aff08fd1 Automatically generated installer lang files 2014-06-25 00:45:42 +00:00
AMOS bot a864cd5fed Automatically generated installer lang files 2014-06-25 00:45:42 +00:00
AMOS bot d52f081367 Automatically generated installer lang files 2014-06-21 00:43:51 +00:00
AMOS bot cf1375b9c3 Automatically generated installer lang files 2014-06-19 00:43:05 +00:00
AMOS bot 52927856ae Automatically generated installer lang files 2014-06-18 00:42:41 +00:00
AMOS bot 51cc85d6f4 Automatically generated installer lang files 2014-06-15 00:43:00 +00:00
AMOS bot a50aa50524 Automatically generated installer lang files 2014-06-12 00:43:50 +00:00
AMOS bot bc2bc938ed Automatically generated installer lang files 2014-05-30 01:24:44 +00:00
AMOS bot 679b93d064 Automatically generated installer lang files 2014-05-30 01:24:44 +00:00
Eloy Lafuente (stronk7) 70f9f9365c weekly release 2.5.6+ 2014-05-29 12:51:25 +02:00
Eloy Lafuente (stronk7) 85c553a0bb Merge branch 'install_25_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_25_STABLE 2014-05-29 12:51:20 +02:00
Sam Hemelryk 33fdd3fd87 Merge branch 'wip-mdl-45698-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-05-29 14:28:01 +12:00
Rajesh Taneja c5f4890466 MDL-45698 behat: Fixed behat and symfony versions 2014-05-29 09:50:22 +08:00
Marina Glancy a267e32848 Merge branch 'MDL-45661-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-05-26 14:47:54 +08:00
Marina Glancy ccffe26dbb Merge branch 'MDL-44482-25' of git://github.com/jethac/moodle into MOODLE_25_STABLE 2014-05-26 14:47:45 +08:00
Jetha Chan 81b1de6928 MDL-44482 mod_lti: use localized dates
Fixed an issue where LTI external tools had creation datestamps of NaN/NaN/NaN under particular non-English languages.
2014-05-26 14:01:28 +08:00
Marina Glancy db82ad12d2 MDL-45688 added missing library requirement
Conflicts:
	course/modlib.php
2014-05-26 12:50:24 +08:00
Damyon Wiese 59d85345e6 MDL-45661 Assign: Clean bad data from DB after MDL-42526
Conflicts:
	mod/assign/db/upgrade.php
	mod/assign/version.php
2014-05-26 12:40:36 +08:00
Damyon Wiese 7076f1534f Merge branch '45499-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-05-26 12:13:52 +08:00
Sam Hemelryk 52292d67b0 Merge branch 'MDL-42526-25' of git://github.com/jamiepratt/moodle into MOODLE_25_STABLE 2014-05-26 10:33:47 +12:00
Sam Hemelryk bf01021815 Merge branch 'm25_MDL-45623' of git://github.com/totara/moodle into MOODLE_25_STABLE 2014-05-26 09:58:53 +12:00
Sam Hemelryk 8bbce8c1c1 MDL-45499 admin: fixed error when displaying page settings 2014-05-26 09:01:05 +12:00
AMOS bot a71350bdfe Automatically generated installer lang files 2014-05-23 00:53:04 +00:00
Eloy Lafuente (stronk7) e79f1f25ba weekly release 2.5.6+ 2014-05-22 16:47:02 +02:00
Eloy Lafuente (stronk7) a13a12f68f Merge branch 'install_25_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_25_STABLE 2014-05-22 16:46:57 +02:00
James Pratt 60c66becbc MDL-42526 mod_assignment : fix record insert with assigment.id 0 2014-05-22 12:55:00 +07:00
AMOS bot 274b3e559b Automatically generated installer lang files 2014-05-22 01:08:20 +00:00
Eloy Lafuente (stronk7) d3e6508d5b Merge branch '44711-25-r3' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-05-22 00:07:08 +02:00
Simon Coggins 8b87f5215a MDL-45623: Fix assigned users count on role delete confirmation page 2014-05-22 08:21:46 +12:00
Dan Poltawski acbaec594e Revert "MDL-45605 Phpunit: Do not call gc_collect_cycles as part of reset."
This reverts commit c0f29f18d7.
2014-05-21 18:20:26 +08:00
Dan Poltawski 5f901117a8 Revert "MDL-45606 Unit test fix for MySQL and added a comment about the removed code."
This reverts commit 0f18f3fa6f.
2014-05-21 18:20:18 +08:00
Sam Hemelryk 84cdd9bb4b MDL-44711 navigation: reverted behat chaneges 2014-05-21 21:02:29 +12:00
Marina Glancy e7172ea726 MDL-45469 profile: make sure profile fields can be initialised without arguments 2014-05-21 11:54:31 +08:00
Marina Glancy 25f41a4d11 MDL-45320 behat: change to block selector 2014-05-20 21:03:38 +08:00
Marina Glancy 78288de702 MDL-45320 block_html: behat tests 2014-05-20 21:03:38 +08:00
Marina Glancy a4615aa8c2 MDL-45320 behat: Step definitions for blocks 2014-05-20 21:03:35 +08:00
David Monllao 64c1ec38d6 MDL-45294 behat: Updating block references to aria label value
Also improving moodle selectors xpath expressions
readability.
2014-05-20 20:56:18 +08:00
David Monllao f335645600 MDL-45294 behat: Supporting an aria-label as a block ref 2014-05-20 20:55:39 +08:00
Dan Poltawski aadf64b7f6 Merge branch '44711-25-r2' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-05-20 20:34:10 +08:00
Sam Hemelryk 5d946b7458 MDL-44711 block_navigation: fixed typo in behat tests 2014-05-20 23:28:36 +12:00
Damyon Wiese 0f18f3fa6f MDL-45606 Unit test fix for MySQL and added a comment about the removed code. 2014-05-20 18:09:44 +08:00
Dan Poltawski d4a84d8f0c Merge branch 'MDL-45496-m25' of https://github.com/micaherne/moodle into MOODLE_25_STABLE 2014-05-20 15:55:14 +08:00
Marina Glancy f7bb24c2c9 Merge branch 'MDL-45525-25' of git://github.com/jethac/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 14:30:38 +08:00
Marina Glancy f5ad923b97 Merge branch 'MDL-45536-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-05-20 14:27:07 +08:00
Marina Glancy c962724c19 Merge branch 'wip-MDL-45512-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2014-05-20 14:23:07 +08:00
Marina Glancy bced459a23 Merge branch 'MDL-44333_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-05-20 14:12:13 +08:00
Andrew Nicols bc406338b7 MDL-45536 theme: Use width auto for inputs and textareas specifying them 2014-05-20 14:09:37 +08:00
Damyon Wiese e1c60b220b Merge branch 'm25_MDL-45583' of github.com:danmarsden/moodle into MOODLE_25_STABLE 2014-05-20 13:30:21 +08:00
Damyon Wiese 1fba34f7c7 Merge branch 'MDL-45323-25' of git://github.com/lameze/moodle into MOODLE_25_STABLE 2014-05-20 13:29:59 +08:00
Dan Poltawski 9ace4d026e Merge branch 'MDL-45545-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-05-20 12:21:59 +08:00
Sam Hemelryk 7babd6da45 Merge branch 'MDL-44027-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-05-20 15:39:26 +12:00
Dan Poltawski a06c905d07 Merge branch 'MDL-45605-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-05-20 10:51:32 +08:00
Dan Poltawski c6e7b00ca5 Merge branch 'MDL-45546-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-05-20 10:24:46 +08:00
Dan Poltawski 4fbc0fcb1d Merge branch '44711-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-05-20 10:14:30 +08:00
Sam Hemelryk c6e2fa901f Merge branch 'MDL-45603-25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2014-05-20 13:59:29 +12:00
Marina Glancy dd206a8daa Merge branch 'MDL-45469-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-05-20 09:53:02 +08:00
Dan Poltawski 1151c25eda Merge branch 'MDL-44449_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-05-20 09:50:55 +08:00
Dan Poltawski 8afd9fd886 Merge branch 'MDL-45432-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2014-05-20 09:47:54 +08:00
Dan Poltawski 9813e71861 Merge branch 'MDL-41109-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-05-20 09:46:39 +08:00
sam marshall a02e76ee3f MDL-45477 Behat: List of steps takes too long to load, times out
Increase time limit to 300 seconds (5 minutes).
2014-05-20 11:59:26 +12:00
Sam Hemelryk b3e480d34e Merge branch 'MDL-45535-m25' of https://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-05-20 11:55:41 +12:00
Sam Hemelryk e44fbe9307 Merge branch 'MDL-37838-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-05-20 10:42:14 +12:00
Sam Hemelryk 5c462d30cd Merge branch 'MDL-45380-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 08:53:04 +12:00
Sam Hemelryk d6909258f1 Merge branch 'MDL-45135-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-05-20 08:47:19 +12:00
Tim Hunt ceb332bc24 MDL-44449 quiz access rules should have a delete hook.
So they can clean up their settings when the quiz is deleted.

See
https://github.com/moodleou/moodle-quizaccess_honestycheck/commit/babf149c2cc6dd734c272cd332b2032cc19db7d8
for an example of using this.
2014-05-19 16:59:22 +01:00
Damyon Wiese f7556c9e9b Merge branch 'MDL-43833_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-05-19 20:12:37 +08:00
Damyon Wiese bf121f4cfc Merge branch 'MDL-45455_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-05-19 19:58:26 +08:00
Marina Glancy c24b3e1989 Merge branch 'wip-MDL-45483-MOODLE_25_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_25_STABLE 2014-05-19 15:57:34 +08:00
Damyon Wiese 9d886a4a9e Merge branch 'MDL-32543-25' of https://github.com/danielneis/moodle into MOODLE_25_STABLE 2014-05-19 12:53:52 +08:00
Damyon Wiese 12c568d758 Merge branch 'MDL-23566_25' of https://github.com/aolley/moodle into MOODLE_25_STABLE 2014-05-19 12:42:44 +08:00
Damyon Wiese bc9cb2ce49 Merge branch 'MDL-44634-25' of https://github.com/dbezborodovrp/moodle into MOODLE_25_STABLE 2014-05-19 12:21:39 +08:00
Damyon Wiese c0f29f18d7 MDL-45605 Phpunit: Do not call gc_collect_cycles as part of reset.
This takes 25% of the time in running tests and there is no benefit. The
behaviour of destructors is the same before/after the patch.

Conflicts:
	lib/phpunit/classes/util.php
2014-05-19 10:40:32 +08:00
Sam Hemelryk 74dcc9c1ba Merge branch 'MDL-45561-25' of git://github.com/jethac/moodle into MOODLE_25_STABLE 2014-05-19 13:37:15 +12:00
Sam Hemelryk 84e0b70dd7 MDL-44711 navigation: better handling of course expansion exception 2014-05-19 08:41:04 +12:00
Eric Merrill 056c4c4d3b MDL-45603 cache Fix the mappingsonly option to work as advertised. 2014-05-17 23:57:25 -04:00
Tim Hunt 6a1f14fc7b MDL-44333 quiz reports: use consitent name for user pref
The Marks for each question setting was not being saved properly as a
user preference.
2014-05-17 15:16:57 +01:00
Andrew Nicols bd541d1d4c MDL-41109 dndupload: Add missing error string 2014-05-16 13:46:15 +08:00
Dan Marsden 552d9d4350 MDL-45583 badges: check parent contexts consistantly when checking required role. 2014-05-16 13:54:36 +12:00
Tim Hunt a08f454f1e MDL-45455 quiz cron must rollback transaction on error. 2014-05-15 15:08:19 +01:00
Tim Hunt f5fff1fcfb MDL-43833 quiz reports: persist states settings between pages. 2014-05-15 15:07:48 +01:00
Jetha Chan ac16b91268 MDL-45561 themes: horizontal scroll in RTL base 2014-05-15 15:50:19 +08:00
Damyon Wiese 3d176316cc weekly release 2.5.6+ 2014-05-15 15:35:51 +08:00
Damyon Wiese d4b16a1462 Merge branch 'install_25_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_25_STABLE 2014-05-15 15:35:47 +08:00
Simey Lameze 27692563f3 MDL-45323 grade: Unit test for grade_get_grade_items_for_activity() 2014-05-15 15:08:57 +08:00
Simey Lameze 07981af07a MDL-45323 grade: Fix query errors on grade_get_grade_for_activity method. 2014-05-15 15:08:56 +08:00
Damien Bezborodov f9782ac4a5 MDL-44634 Regression: link to user profile in comments block fails due to double URI encoding 2014-05-15 11:47:09 +09:30
Damien Bezborodov 4a678042eb MDL-44634 Regression: link to user profile in comments block fails due to double URI encoding 2014-05-15 10:51:55 +09:30
sam marshall 815fa99724 MDL-45535 CSS chunking breaks media rules if CSS invalid (IE)
Invalid CSS with extra } symbols, which previously (by fluke)
worked, was broken by recent chunking improvements. This change
makes the chunking code robust against this (stupid) situation.
2014-05-14 13:01:46 +01:00
Marina Glancy b91be533d1 Merge branch 'wip-MDL-36670-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-05-14 16:36:52 +08:00
Juan Leyva ad9124d045 MDL-36670 logging: action parameter length restricted to 40 chars 2014-05-14 16:33:04 +08:00
Frederic Massart 90007bef59 MDL-45546 mod_forum: Login the user before getting its context 2014-05-14 16:17:20 +08:00
Frederic Massart dd8491d234 MDL-45545 csslib: Chunking handles commas in media query definitions 2014-05-14 15:28:04 +08:00
Dan Poltawski 233b974dbf MDL-44027 groups: remove some junk html 2014-05-13 16:20:31 +08:00
Jetha Chan 9faa1e9377 MDL-45525 themes: minor forum improvements
Fixed an RTL style that wasn't kicking in properly on 2.6 and 2.7; backported to 2.5.
2014-05-13 14:42:48 +08:00
Jetha Chan c6a4cac799 MDL-41383 theme: filepicker zoom resiliency
Fixed an issue that broke the file picker on bootstrapbase when zooming in and out.
2014-05-13 14:20:17 +08:00
Dan Poltawski 1e8501a0bb MDL-37838 block_courseoverview: fix pluaralisation logic
Note that this kind of handling of plurals is extremely limited, see:

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

However, this is a simple fix to the existing logic
2014-05-13 14:19:04 +08:00
Adrian Greeve 3fc4cc141d MDL-45512 comments: Added full date to comment details. 2014-05-13 10:46:07 +08:00
Daniel Neis Araujo 84e991ac77 MDL-32543 (backport) Make sure the action and url fields of log table have correct sizes 2014-05-12 12:23:30 -03:00
Dan Poltawski a8b0be6ad5 MDL-45135 mod_glossary: fix RTL alignment of table
Tablelib has a specific 'hook' to allow alignment to be corrected for
RTL languages, but needs to be specified direction in lowercase.
2014-05-12 17:10:17 +08:00
Michael Aherne bad6c2c139 MDL-45496 core Added space to logged in as line 2014-05-12 08:52:54 +01:00
Frederic Massart d089b2b090 MDL-45380 theme_bootstrapbase: Restore config override highlight
Conflicts:

	theme/bootstrapbase/less/moodle/admin.less
	theme/bootstrapbase/style/moodle.css
2014-05-12 15:50:54 +08:00
Kevin Wiliarty ebf7626db9 MDL-45483 mod_forum: corrects values for maxattachments in forum settings 2014-05-12 00:02:13 -04:00
AMOS bot 51920aa25b Automatically generated installer lang files 2014-05-12 00:39:55 +00:00
AMOS bot 91fba1b97b Automatically generated installer lang files 2014-05-11 00:48:00 +00:00
Eloy Lafuente (stronk7) 263f3b1ff7 Moodle release 2.5.6 2014-05-10 18:30:36 +02:00
AMOS bot 15df3810bf Automatically generated installer lang files 2014-05-10 00:46:48 +00:00
AMOS bot 02cd547b44 Automatically generated installer lang files 2014-05-09 00:41:04 +00:00
Eloy Lafuente (stronk7) dedc1f3c46 weekly release 2.5.5+ 2014-05-08 16:35:48 +02:00
sam marshall b2d5a4ee38 MDL-45469 Conditional availability: Restrict by text area broken
It has never worked, because the data for text area fields is not
loaded into the $USER object.

Changing it so that the dropdown list does not include these types
of field. (This 2.6 version of change is similar to the 2.7 code
but in a different location and without unit test.)
2014-05-08 14:10:08 +01:00
Marina Glancy d713240ef8 Merge branch 'MDL-45462-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-05-08 19:51:58 +08:00
Eloy Lafuente (stronk7) ff677821fc Merge branch 'wip-mdl-44262-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-05-08 12:02:38 +02:00
Rajesh Taneja 4d439eb7bf MDL-44262 Behat: Bump behat version to get format fix 2014-05-08 17:29:38 +08:00
Frederic Massart b8a6f7d19d MDL-45332 repository_url: URL parameter is using PARAM_URL 2014-05-08 15:35:10 +08:00
Marina Glancy 05062fa166 MDL-45414 wiki: blank image for page index icons 2014-05-08 12:12:19 +08:00
Frederic Massart 1d91b14416 MDL-45462 flickr: Requests are now done over HTTPS 2014-05-08 11:28:16 +08:00
Dan Poltawski 7ff7ebef40 Merge branch 'MDL-43312-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-05-08 10:51:59 +08:00
Damyon Wiese 05b66405dc MDL-43312 TinyMCE: Add back the upgrade instructions for z-index on 2.5 2014-05-08 10:50:43 +08:00
Damyon Wiese aaf8af0793 MDL-43312 TinyMCE: Reapply the z-index hacks (25 only) 2014-05-08 09:52:57 +08:00
Tony Butler b376ec3360 MDL-45432 mod_assign Declare character encoding in onlinetext export
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-05-07 13:10:29 +01:00
Marina Glancy 18a1f91b2c Merge branch 'MDL-45282_message_25' of git://github.com/andyjdavis/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-07 16:54:01 +08:00
Damyon Wiese 1b609667b0 MDL-44750 Assign: Do not reveal student identities to screen readers 2014-05-07 16:50:37 +08:00
Dan Poltawski 8adc7c37c5 Merge branch 'MDL-45410-en_fix-25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2014-05-07 16:40:46 +08:00
Marina Glancy e28b3956a9 MDL-45126 do not allow guests see name and summary of hidden course 2014-05-07 16:22:23 +08:00
Juan Leyva b5b2eab677 MDL-43119 Add valid until dates for tokens created by login/token.php
3 months were decided

Conflicts:
	login/token.php
2014-05-07 16:12:03 +08:00
Andrew Davis e7f899e32a MDL-45282 core_user: fixed up some oddities in the bulk user messaging screen 2014-05-07 16:05:51 +08:00
Helen Foster e6cb9d833b MDL-45410 Merge English strings from the en_fix language pack 2014-05-07 09:25:30 +02:00
Frederic Massart 7b9acc77ef MDL-43877 blocks: Files from blocks in my/ were accessible to the world 2014-05-07 14:27:30 +08:00
Adam Olley 931e39917b MDL-23566 mod_lesson: Float answers so paragraphs line up correctly next to the inputs 2014-05-07 15:46:18 +09:30
Damyon Wiese 716b8fc1bb Merge branch 'MDL-45290-25-fix3' of https://github.com/jethac/moodle into MOODLE_25_STABLE 2014-05-07 13:30:22 +08:00
Marina Glancy 0f3f3b3b01 Merge branch 'MDL-45387-25' of git://github.com/jethac/moodle into MOODLE_25_STABLE 2014-05-07 13:07:53 +08:00
Marina Glancy 72e9e72b17 Merge branch 'MDL-45201-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-05-07 13:07:44 +08:00
Damyon Wiese eb074b9fa3 MDL-43312 TinyMCE: Version bump to 3.5.10. Remove all the hacks.
I retested the old bugs that required custom hacks to tinymce and could not reproduce them,
so I have not reimplemented the hacks.
2014-05-07 12:52:56 +08:00
Damyon Wiese 436ef91ceb MDL-44606 Assign: Some grading functions are missing sesskey protection 2014-05-07 12:37:20 +08:00
Dan Poltawski f532c41347 Merge branch 'wip-MDL-45414-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-05-07 12:05:36 +08:00
Dan Poltawski 1eb784b79a Merge branch 'wip-MDL-45429-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-05-07 11:50:15 +08:00
Jetha Chan 70d1ab21fb MDL-45387 core_form: erroneous escaping on reference list
Fixed erroneous escaping in JS.
2014-05-07 10:59:05 +08:00
Marina Glancy d9e3bc247d MDL-45429 block_glossary_random: check capability before suggesting to edit 2014-05-06 17:25:02 +08:00
Jetha Chan 5946b1c97d MDL-45290 rubrics: overflow, delete button alignment
Adjusted delete button alignment, restored overflow rule, amended button alignment, minor RTL fixes.
2014-05-06 16:43:42 +08:00
Dan Poltawski b001cabae3 Merge branch 'wip-mdl-45383' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-05-06 12:07:00 +08:00
Damyon Wiese b391a772df MDL-45412 Cache: Look for the newer classname first (mongo store) 2014-05-06 11:58:15 +08:00
Damyon Wiese 5cdb2ff7c3 Merge branch '45412-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-05-06 11:57:23 +08:00
Marina Glancy 43b01f065d MDL-45414 wiki: fix broken image 2014-05-06 11:28:48 +08:00
Damyon Wiese e169e9ca70 Merge branch 'MDL-45290-25-fix2' of http://github.com/jethac/moodle into MOODLE_25_STABLE 2014-05-06 11:22:04 +08:00
Dan Poltawski 466a121117 Merge branch 'MDL-45376-m25' of https://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-05-06 11:17:13 +08:00
Jetha Chan 1d5e1d5662 MDL-45290 rubric: IE8 and minor fixes, RTL
Added a fallback style for IE8, adjusted some minor styles, added RTL capability.
2014-05-06 10:54:47 +08:00
Sam Hemelryk 268f075fbb MDL-45412 cachestore_mongodb: fixed use of deprecated Mongo class 2014-05-06 09:31:10 +12:00
Marina Glancy 698f4d27de Merge branch 'MDL-34904-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-05-05 17:44:28 +08:00
Marina Glancy 42c95439ab Merge branch 'MDL-43319-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-05-05 17:20:58 +08:00
Marina Glancy ab0b3fc51e Merge branch 'MDL-45342-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-05-05 17:20:45 +08:00
Marina Glancy 5f320315e5 Merge branch 'MDL-44174-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-05-05 17:20:36 +08:00
Ankit Agarwal 6043b93ffe MDL-45201 recent_activity: Fix set type notice in recent activity form 2014-05-05 13:31:07 +08:00
Rajesh Taneja 30524c6c0a MDL-45383 test generator: Rebuild course cache after inserting module in db 2014-05-05 13:28:41 +08:00
Damyon Wiese 955b72bd54 Merge branch 'MDL-45290-25' of git://github.com/jethac/moodle into MOODLE_25_STABLE 2014-05-05 11:01:30 +08:00
Marina Glancy 5eb5b4d9bf Merge branch 'wip-MDL-45127-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2014-05-05 10:18:56 +08:00
Dan Poltawski c61ed39712 weekly release 2.5.5+ 2014-05-02 17:44:15 +08:00
Dan Poltawski b12749ee0e Merge branch 'install_25_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_25_STABLE 2014-05-02 17:44:12 +08:00
Adrian Greeve edb0ac7b21 MDL-45127 mod_lesson: Behat test for reviewing a lesson. 2014-05-02 16:16:12 +08:00
Adrian Greeve 895138cf12 MDL-45127 mod_lesson: Fixed reviewing lesson answers changing the lesson grade. 2014-05-02 16:16:12 +08:00
Adrian Greeve 9b1cf5a626 MDL-45127 mod_lesson: Updated question edit screen with more help text.
Unless the custom scores is selected in the lesson settings the score section
in the question settings will be disabled. A help link has been added with
a description similar to this one.
2014-05-02 16:16:11 +08:00
Jetha Chan b9323d7989 MDL-45290 rubric: visual fixups
Fixed up visual issues with rubric editor on Clean.
2014-05-02 14:24:42 +08:00
Ankit Agarwal 7ec3dbd75d MDL-34904 lti: Fix notice while using lti in frontpage 2014-05-02 14:07:46 +08:00
Frederic Massart 56f8936ffb MDL-44174 theme_clean: Updating information in readme file 2014-05-02 12:56:23 +08:00
Ankit Agarwal 404b9f92f9 MDL-45342 book: Automate MDLQA-2423 - A teacher can create book chapters and subchapters 2014-05-02 12:32:54 +08:00
AMOS bot 7ae2c9f67f Automatically generated installer lang files 2014-05-02 00:39:18 +00:00
sam marshall 08793ac4b5 MDL-45376 Completion: Form locking is still not working right
On submit of the form, it called 'freeze' on the completion-related
fields (even though they shouldn't have been frozen because you
already clicked the unlock button).
2014-05-01 18:18:00 +01:00
Jetha Chan 030b907bd4 MDL-36836 filepicker: alfresco select box fix
Adjusted position of alfresco select box.
2014-05-01 17:12:58 +08:00
Dan Poltawski e8839b4184 Merge branch 'MDL-45365-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-05-01 14:52:09 +08:00
Dan Poltawski 053953a041 MDL-43570 upgrade: fix indentation 2014-05-01 14:45:02 +08:00
Dan Poltawski 6a8ebfcd37 Merge branch 'MDL-43570-M25' of https://github.com/KristerV/moodle into MOODLE_25_STABLE 2014-05-01 14:36:10 +08:00
Marina Glancy d9dd21fd4e Merge branch 'MDL-44398-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-05-01 14:22:12 +08:00
Damyon Wiese fde2e1cb6d MDL-45365 Courselib unit tests: cmid -> instanceid confusion
Yet again an instanceid is being passed instead of a cmid.
2014-05-01 14:04:36 +08:00
Dan Poltawski 2075d225b1 MDL-43319 phpdoc: fix too much ham consumption by developers 2014-05-01 13:37:21 +08:00
Marina Glancy 0b4d7c9bc7 Merge branch 'MDL-45292-25' of git://github.com/jethac/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-01 11:49:40 +08:00
Dan Poltawski ddd764639f Merge branch 'MDL-45283-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-05-01 10:41:03 +08:00
Krister Viirsaar 66748a565c MDL-43570 filetypes: Added new filetypes - ddoc, bdoc, cdoc 2014-04-30 13:10:13 +03:00
Damyon Wiese 7b82edb2f8 Merge branch 'mdl44575-moodle25' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2014-04-30 16:00:20 +08:00
Dan Poltawski 2b447f7df9 Merge branch 'MDL-45256-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-30 14:58:59 +08:00
Jetha Chan e0e9e2259b MDL-45292 filepicker: improved RTL styles
Fixed some broken RTL styles.
2014-04-30 12:24:07 +08:00
Frederic Massart c9d7e1d2a4 MDL-45283 restore: Prevent failure when user course grade exists
When we restore a course, the grade that a user has for the
grade item of the course cannot be created twice. If we try
to create it when it already exists, a database exception is
raised because of index duplication.

The safest way to proceed is certainly to ignore the grade
information from the backup, otherwise we could potentially
overwrite existing information. Though, this only applies
to restore as merge, and it does not affect the update of
the course grade.
2014-04-30 12:17:03 +08:00
Marina Glancy 458d13af33 Merge branch 'MDL-27459-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-04-30 09:53:53 +08:00
Krister 20ec5349d4 MDL-42635 lesson: change from error to user friendly message 2014-04-30 09:53:19 +08:00
Eloy Lafuente (stronk7) d5f15d905c MDL-45221 Allow unit tests to pass under any OS
This commit gets rid of the old lib/tests/other/executable.php
file completely because it was only executable under unix OSs
and moves the check to be performed against some mimetex binaries
that are known to be executable and bundled with every installation.

Note this was discovered because the weekly rolling process changed
the execution permissions of the "fixture" file and, at the end
we decided to get rid of it completely, folowing the plan above.
2014-04-29 19:34:38 +02:00
Eloy Lafuente (stronk7) fca0a1b913 weekly release 2.5.5+ 2014-04-29 15:13:49 +02:00
Eloy Lafuente (stronk7) f5df04fed6 NOBUG: Fixed file access permissions 2014-04-29 15:13:48 +02:00
Frederic Massart 19f113aa48 MDL-45256 portfolio: Unit tests for rewrite pluginfile urls 2014-04-29 17:45:37 +08:00
Frederic Massart d72a0202b7 MDL-45256 portfolio: Do not require strict XML when parsing content 2014-04-29 17:44:08 +08:00
Marina Glancy a169c0213d Merge branch 'MDL-45289-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-04-29 12:50:54 +08:00
Damyon Wiese 806014d3d0 Merge branch 'MDL-44916-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2014-04-29 10:37:52 +08:00
Dan Poltawski af7c61ba5c MDL-45289 block_course_summary: Add behat tests 2014-04-29 10:05:58 +08:00
Sam Hemelryk 8f2747e5ca Merge branch 'MDL-45221-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-04-29 09:10:09 +12:00
Marina Glancy b8f41dfa45 Merge branch 'w18_MDL-45287_m25_dbreset' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2014-04-28 20:18:43 +08:00
Marina Glancy 33ee767041 Merge branch 'MDL-45266-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-04-28 18:03:38 +08:00
Marina Glancy 9a1227cf54 Merge branch 'MDL-45156_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-04-28 18:03:20 +08:00
Petr Skoda 7d4eb8991f MDL-45287 fix behat database reset between scenarios
We cannot find out if DB received any writes because behat
web access runs in different request.

This was affecting only scenarios without generators.
2014-04-28 17:14:09 +08:00
Damyon Wiese 73ec7fdab7 Merge branch 'MDL-45079_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-04-28 17:11:57 +08:00
Marina Glancy 72983c8569 Merge branch 'MDL-45288_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-04-28 13:49:19 +08:00
David Monllao b617b2d7c8 MDL-45156 behat: Changing html_writer::empty_tag for start_tag
Credits to Daniele Cordella.
2014-04-28 12:32:27 +07:00
Andrew Nicols 0dd962dd99 MDL-45221 admin: configexecutable admin settings should only accept files 2014-04-28 12:21:55 +08:00
Jason Fowler 4d3ffbc8d9 MDL-44916 Question: Fixing alignment in bootstrap themes
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-28 11:37:38 +08:00
David Monllao 429fc19d26 MDL-45288 behat: Restricting click to .logininfo 2014-04-28 10:26:06 +07:00
Marina Glancy be2c92d3a1 Merge branch 'MDL-44004-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-28 11:17:30 +08:00
Damyon Wiese 3e4806625a Merge branch 'MDL-45268-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-04-28 10:53:07 +08:00
Dan Poltawski 7e494c1630 MDL-45266 behat: tests for login block 2014-04-28 10:39:55 +08:00
Sam Hemelryk 98778ee04f Merge branch 'wip-MDL-45280-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-28 12:22:48 +12:00
Sam Hemelryk ebda3b8926 Merge branch 'MDL-45286_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2014-04-28 12:15:41 +12:00
Eloy Lafuente (stronk7) f7f2b4f06d MDL-45286 timezones: updated to 2014b 2014-04-28 01:02:17 +02:00
Yuliya Bozhko 51151976b6 MDL-45079 badges: Remove user email address from badge page
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-04-28 10:11:49 +12:00
Marina Glancy 3e56504a85 MDL-45280 wrtie default value for admin_setting_configstoredfile
this fixes regression from MDL-45134
2014-04-26 10:42:41 +08:00
Dan Poltawski 7fb06347df MDL-45268 behat: tests for participants block 2014-04-25 16:20:55 +08:00
Dan Poltawski 7732473108 Merge branch 'MDL-45236-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-04-25 13:56:32 +08:00
Dan Poltawski 0154a32f73 weekly release 2.5.5+ 2014-04-24 17:56:24 +08:00
Dan Poltawski 19ce7a47d9 Merge branch 'install_25_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_25_STABLE 2014-04-24 17:56:21 +08:00
Ankit Agarwal 4503543488 MDL-44398 tags: Fix incorrect usage of caps 2014-04-24 16:39:12 +08:00
Frederic Massart c791222d52 MDL-44004 grading_rubric: Ensure that score is set before using it 2014-04-24 16:21:57 +08:00
Marina Glancy e4f066d1b1 Merge branch 'MDL-45234-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-04-24 14:14:13 +08:00
Andrew Nicols f93a6cc2a4 MDL-45236 AJAX: Correct reproduction link casting 2014-04-24 13:42:20 +08:00
Dan Poltawski 391726782e Merge branch '45046-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-04-24 10:01:01 +08:00
Sam Hemelryk 66d76d5196 Merge branch 'MDL-45124-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-04-24 11:03:18 +12:00
Sam Hemelryk bedf257b40 Merge branch 'MDL-45186-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-24 11:01:37 +12:00
Dan Poltawski b24067ce0f Merge branch 'MDL-45172_block_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-04-23 16:40:22 +08:00
Andrew Nicols 681179b6f7 MDL-45234 filter_glossary: Correct use of COUNT in autolinker 2014-04-23 16:17:11 +08:00
Dan Poltawski 7b59af440d Merge branch 'MDL-45075-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-04-23 16:16:29 +08:00
Andrew Nicols 46017edb0e MDL-45075 mod_forum: Add unit tests for forum subscription on forum creation 2014-04-23 16:11:18 +08:00
Marina Glancy ba7a72d413 Merge branch 'MDL-45134-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-23 14:46:57 +08:00
Dan Poltawski 5c50050133 Merge branch 'wip-MDL-45148-25' of https://github.com/mackensen/moodle into MOODLE_25_STABLE 2014-04-23 14:23:22 +08:00
Marina Glancy e7c8139f53 Merge branch 'MDL-44991-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-04-23 13:26:18 +08:00
Marina Glancy fa4df78be0 Merge branch 'MDL-44855-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-04-23 13:14:59 +08:00
Frederic Massart af91288814 MDL-45134 adminlib: No more validation error when a config file is not set
When the destination draft area existed and the user draft area has not
been used, and thus does not exist, an error was displayed to the user
saying that they could not save the setting.

This was intended to handle the cases where the draft area disappears
and would overwrite the content of the destination area, deleting
all its content. But now we do not prompt with an error when
overwriting empty with empty.
2014-04-23 12:40:43 +08:00
Andrew Davis e8ae121fd7 MDL-45172 block_completionstatus: added a check for an empty string before appending 2014-04-23 11:42:37 +08:00
AMOS bot 3651b27b6c Automatically generated installer lang files 2014-04-23 00:38:15 +00:00
AMOS bot 035b6840d9 Merge branch 'MOODLE_25_STABLE' into install_25_STABLE 2014-04-23 00:38:14 +00:00
AMOS bot 5db57bd802 Automatically generated installer lang files 2014-04-22 11:15:18 +00:00
Eloy Lafuente (stronk7) 689f9aa1f5 weekly release 2.5.5+ 2014-04-22 12:26:39 +02:00
Andrew Nicols 1450d17fb4 MDL-44855 AJAX: Arrays and Objects should be defined in the initializer
JavaScript is a prototypal language and complex types should be defined as
null in the prototype, and set up in the initializer instead.
2014-04-22 17:06:00 +08:00
Andrew Nicols bceebf179e MDL-45124 dndupload: Lowercase types when comparing
IE helpfull uses a mixed-case version of 'Text' which fails the string
comparison. All other browsers use lowercase for their mime-types.
2014-04-22 16:10:41 +08:00
Andrew Nicols dbc3519e20 MDL-40716 report_completion: Set RTL 2014-04-22 15:21:56 +08:00
Dan Poltawski 040b8cd17f Merge branch 'wip-MDL-45154-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-22 12:36:17 +08:00
Frederic Massart 1a08b30a34 MDL-45186 mod_quiz: Some RTL improvements on quiz edit page 2014-04-22 12:34:23 +08:00
Marina Glancy 2f9f37bedd Merge branch 'MDL-43673_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2014-04-22 12:29:26 +08:00
Marina Glancy 4a41887292 MDL-45154 user profiles: category name duplication error 2014-04-22 10:45:58 +08:00
Sam Hemelryk 8ca3744662 Merge branch 'wip-MDL-45045_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-04-22 10:47:06 +12:00
Sam Hemelryk 697496bcac Merge branch 'MDL-43145-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-04-22 10:39:17 +12:00
Sam Hemelryk 6c4fa4d535 Merge branch 'mdl45012-moodle25' of git://github.com/tlock/moodle into MOODLE_25_STABLE 2014-04-22 10:12:18 +12:00
Sam Hemelryk 0a11ddf4c7 Merge branch 'wip-MDL-45037-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2014-04-22 09:59:05 +12:00
Sam Hemelryk c3b94d9954 Merge branch 'MDL-44270_25' of git://github.com/jonof/moodle into MOODLE_25_STABLE 2014-04-22 09:18:24 +12:00
Matt Petro 067d7ee92d MDL-45118 shibboleth: set context on index page 2014-04-22 09:17:19 +12:00
Sam Hemelryk fd266e48bc Merge branch 'MDL-42761-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-22 08:57:29 +12:00
Dan Poltawski 2b77a4e58e Merge branch 'w16_MDL-45049_m25_debugging' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-04-21 14:42:09 +08:00
David Scotson a9d31ba048 MDL-44468 backup: use html_writer::div call
Simplify the renderer code with the new html_writer
div function.
2014-04-18 15:29:42 +08:00
David Scotson 10281644a3 MDL-44468 backup: use notification API
Replace a hardcoded div.notifyproblem with a API call that,
in Standard theme, outputs the same HTML.

Also removes the .notifyproblem class from the heading,
as that might cause problems for themers who expect it to be
used consistently with the API.
2014-04-18 15:29:32 +08:00
Nadav Kavalerchik caebab9297 MDL-40716 - Activity labels are not visible in course completion report, when in RTL mode (theme/clean , bootstrap) 2014-04-18 15:21:29 +08:00
Dan Poltawski 7759b28bd3 Merge branch 'MDL-45010-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-18 14:55:33 +08:00
Sam Hemelryk 13a554a52e MDL-45147 my: automate testing of block restriction 2014-04-18 14:16:54 +08:00
Dan Poltawski 9cf90f9c77 Merge branch 'MDL-43789_25' of https://github.com/rajeevs1992/moodle into MOODLE_25_STABLE 2014-04-18 11:05:56 +08:00
Dan Poltawski 735347134f Merge branch 'MDL-41975-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-18 10:05:27 +08:00
Dan Poltawski 8dafdfbe86 Merge branch 'wip-MDL-45154-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-18 09:57:23 +08:00
Eloy Lafuente (stronk7) 0eafbc99e3 weekly release 2.5.5+ 2014-04-17 15:49:20 +02:00
Charles Fulton 7b13bb0463 MDL-45148 unit testing: pass role id instead of user id 2014-04-17 04:38:32 -07:00
Marina Glancy 93815e49d2 MDL-45154 user profiles: avoid redirection warnings 2014-04-17 14:55:32 +08:00
Frederic Massart 5727b32b3f MDL-42761 badges: Remove H2s from help popup 2014-04-17 12:46:39 +08:00
sam marshall 30503a0c21 MDL-27459 Completion: When ratings off, disallow grade completion
For activities that use ratings, there is no grade unless ratings
are enabled. The completion system still lets you select 'complete
when user gets a grade', which leads to later errors.

This change simply disables the 'completion on grade' field if
ratings are enabled for the activity, but not turned on in the form.
2014-04-16 15:11:21 +01:00
Andrew Nicols 21f7505fec MDL-45119 ajax: AJAX exceptions need a String in the Link 2014-04-16 16:00:48 +08:00
Jetha Chan e878836e54 MDL-44951 theme_bootstrapbase: forum post css tweak backport
Adjusted forum post CSS for cleaner appearance.
2014-04-16 15:33:06 +08:00
Dan Poltawski 23d7cdaa24 Merge branch 'wip-mdl-44977-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-04-16 14:35:04 +08:00
Rajesh Taneja 20329767bc MDL-44977 tool_profiling: set xhprof default settings
Set xhprof default settings, even if xhprof is not installed.
If xhprof is not installed, hide profiling admin settings,
else show them.
This is needed, because if xhprof is installed, then it will
fail all non-js behats which navigate to setting under
site administration, as profiling settings get displayed on
default admin page.
2014-04-16 14:27:53 +08:00
Frederic Massart ec0efc18e1 MDL-41975 repository_alfresco: Updating details about Alfresco URL and timestamps 2014-04-16 13:57:01 +08:00
Michael Woods 5dd47fa9e5 MDL-41975 repository_alfresco: Ensure Moodle sends GMT time to Alfresco 2014-04-16 13:57:00 +08:00
Dan Poltawski 5d3b26c350 Merge branch 'wip-mdl-44979-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-04-16 13:56:41 +08:00
Marina Glancy 179a0809ae Merge branch 'MDL-45081-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-16 11:52:33 +08:00
Andrew Nicols ab978c7e02 MDL-43277 block_navigation: Trim from the left for long names 2014-04-16 11:13:56 +08:00
Dan Poltawski 58eea2b500 Merge branch 'MDL-45076-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-16 09:10:34 +08:00
Sam Hemelryk 0f2e18f9c8 Merge branch 'w16_MDL-45100_m25_coursecontext' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-04-16 11:43:54 +12:00
Eloy Lafuente (stronk7) 90cca33eaa weekly release 2.5.5+ 2014-04-15 16:32:55 +02:00
Petr Škoda ccc9f4569d MDL-45100 fix course_context classname PHPDdos typo in context API 2014-04-15 15:50:15 +08:00
Tony Levi 889603945c MDL-44908: Fix upgrade_grade_item_fix_sortorder performance 2014-04-15 14:29:44 +08:00
Sam Hemelryk 3137105165 Merge branch 'MDL-40674_M25' of https://github.com/nadavkav/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-15 16:47:47 +12:00
Frederic Massart e969f5f83b MDL-45076 theme_bootstrapbase: Clean up participants controls LESS
Conflicts:

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

Conflicts:

	theme/bootstrapbase/style/moodle.css
2014-04-15 12:20:45 +08:00
Jonathon Fowler 0859a464cb MDL-44270 files: handle drag-drop js error when event has null types
This can happen when the 'dragover' event fires as has been observed
in Safari. When the dataTransfer.types property of the event is null,
accessing types.length throws a JavaScript error.
2014-04-15 14:19:35 +10:00
Nadav Kavalerchik bf7ff55c96 MDL-41891 Theme: Bullets and Numbering are missing from lists, When in RTL mode (theme/clean) 2014-04-15 11:28:57 +12:00
Frederic Massart d2d95374eb MDL-45081 curl: Prefer usage of CURLFile over @file arguments 2014-04-14 17:43:03 +08:00
Petr Škoda 2620fcc116 MDL-45049 improve debugging output in error log for NO_DEBUG_DISPLAY scripts 2014-04-14 13:19:34 +08:00
Damyon Wiese 7c8bac1438 Merge branch 'MDL-44936-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-14 11:39:22 +08:00
Adrian Greeve 1c5d239f2d MDL-45037 gradebook: Allow dashes in xml grade values to be ignored.
This was delivering an error message when trying to import an exported
xml file (from Moodle).
2014-04-14 10:50:57 +08:00
Dan Poltawski 64b88aa948 Merge branch 'MDL-45048-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-14 10:02:01 +08:00
Andrew Nicols da7f707de7 MDL-43145 dock: Enable regions before the drag operation starts 2014-04-14 09:34:14 +08:00
Sam Hemelryk aa1f42288e MDL-43145 dock: fixed up region_completely_docked code to ignore empty regions 2014-04-14 09:33:54 +08:00
Tim Lock 9d399ce4da MDL-45012: Enable support for wma files within tinymce Moodle Media plugin 2014-04-14 08:32:45 +09:30
Gareth J Barnard a95e278050 MDL-45045 block theme: Fake blocks show empty region when editing and clicked. 2014-04-11 13:29:01 +01:00
sam marshall 1933f0316e MDL-44991 Behat: step to check if attribute does not contain text
The step checks that an attribute exists, but doesn't contain the
specified text.

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

Also official tags are verified to be working ok. With support
for multiple options added by MDL-43713 and MDL-43738.
2014-04-11 10:38:42 +02:00
Frederic Massart 24b784da67 MDL-45048 repository_wikimedia: Abusing usage of optional_param
The optional_param call was moved outside of the constructor
because it was called every time the repository would be initialised.
That was leading to problems when the parameter was defined from
another form and not complying with its expected type.
2014-04-11 15:20:27 +08:00
Frederic Massart 89bcfb88b6 MDL-44936 csslib: Chunking supports @media queries and commas in rules 2014-04-11 12:04:47 +08:00
Dan Poltawski 9257294cf2 weekly release 2.5.5+ 2014-04-11 11:40:03 +08:00
Dan Poltawski f4f0dbed33 Merge branch 'install_25_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_25_STABLE 2014-04-11 11:40:00 +08:00
AMOS bot 24817522c2 Automatically generated installer lang files 2014-04-10 22:38:47 +00:00
Sam Hemelryk 8758bd7ccc MDL-45046 output: reviewed standard/base layouts and converted where a better option was available 2014-04-11 09:30:23 +12:00
Damyon Wiese b576ff3914 MDL-44170 LTI - fix unit tests. 2014-04-10 14:16:12 +08:00
Adrian Fish 3ca6a45713 [MDL-44170] Added form field for url matched type.
Added a new mod_form field called urlmatchedtypeid which is populated
by mod_form.js when a matched url is entered. On save, if typeid is 0
and urlmatchedtypeid is supplied, the type id is set to the url matched
id.
2014-04-10 13:39:59 +08:00
Rajesh Taneja 01a223550f MDL-44979 behat: no need to purge all cache again 2014-04-10 11:03:34 +08:00
Marina Glancy f6cc073116 MDL-40843 chat: fixed bug in SQL query in recent activity block 2014-04-09 15:45:50 +08:00
Mark Nelson 9941015719 MDL-42462 mod_feedback: added $OUTPUT to list of global variables used to avoid error 2014-04-09 15:37:56 +08:00
Damyon Wiese a4f8f60b56 MDL-42195 Bootstrap: Make selector for responsive images 100% the same as bootstrap3.
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-09 15:17:52 +08:00
Frederic Massart 6e3006e359 MDL-45010 mod_chat: Use H3 instead of H2 in recent activity info 2014-04-09 15:10:56 +08:00
Damyon Wiese 7d72f26d77 Merge branch 'mdl44669-moodle25' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2014-04-09 13:12:14 +08:00
Rajeev S dc396cf1e2 MDL-43789: coursename disallows spaces in user bulk actions filter
coursename filter for user bulk actions.This prevents filtering
based upon courserole if the coursename contains spaces or other non
alphanumeric characters.
2014-04-09 10:34:14 +05:30
Jonathan Champ 37701d2038 MDL-29572 Grade Import: Avoid creating invalid temporary rows; Provide feedback on error 2014-04-09 11:41:41 +08:00
Ashley Holman fd0d236dce MDL-39740 grade: Fix grade_item::add_idnumber strict type checking 2014-04-09 11:14:31 +08:00
Damyon Wiese c5466e991c MDL-42195 Bootstrap - put border and vertical-align back in the reset for all images
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-08 17:08:49 +08:00
Michael Milette d8f15e4aeb MDL-42462 - Feedback - Fix for WCAG 2.0 issue with Informational and Error Content Displayed in red
1) The same code used in other Moodle forms is now used in Feedback to display the "There are required fields in this form marked (*/Required field)" message at the top of the screen and each of the asterisks next to required fields.

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

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

Affected files:

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

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-04-08 14:12:18 +08:00
Damyon Wiese f6e2dde16d Merge branch 'MDL-41895-m25' of https://github.com/micaherne/moodle into MOODLE_25_STABLE 2014-04-08 13:12:16 +08:00
Marina Glancy 4842f37df5 Merge branch 'MDL-44891-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-04-08 11:16:08 +08:00
Marina Glancy af5f239548 Merge branch 'MDL-42195-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-04-08 08:54:39 +08:00
Sam Hemelryk 7ce77b73e2 Merge branch 'MDL-38183_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2014-04-08 11:30:58 +12:00
AMOS bot 997aa27c35 Automatically generated installer lang files 2014-04-07 22:39:56 +00:00
Damyon Wiese 3e7311717b Merge branch 'wip-MDL-40843-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-07 16:31:32 +08:00
Damyon Wiese 547f6953e6 Merge branch 'wip-MDL-43021-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-07 15:21:55 +08:00
Dan Poltawski 19fd2cbb02 Merge branch 'wip-MDL-33486-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-07 13:10:42 +08:00
Sam Hemelryk b20fe20b99 MDL-41551 theme_base: improved custom block region handling for base 2014-04-06 15:21:06 +12:00
Sam Hemelryk def99f21ff MDL-41551 blocks: added tracking and recognition of custom block regions 2014-04-06 15:20:35 +12:00
Sam Hemelryk 3a2048c5dd MDL-41511 blocks: improved how custom block regions were being rendered.
There is a new theme property 'blockrendermethod' that can be set by the
theme in its config.php and tells Moodle what method it is using to render
blocks in the layout files.
Either blocks, or blocks_for_region.
Then when adding custom block regions to a page content we ensure we use
the same method the theme is using elsewhere.

This is really a hack becuase we (I) didn't properly deprecate
blocks_for_region when I added the blocks method.
2014-04-06 15:19:34 +12:00
Mary Evans 8c33208510 MDL-38183 themes: Removed redundant css rules for #adminsettings .form-overridden from standard and formal_white. 2014-04-05 16:55:57 +01:00
sam marshall 3df85ca744 MDL-44891 Behat: Add step to check attribute
This commit creates a Behat step of the form:

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

This is useful because unless I missed something there is currently
no step that checks attribute values; this seems like a simple
generic step. Behat is intended to check user-visible effects in
the resulting HTML, and sometimes these effects are implemented
using attribute values (two common examples are the alt= attribute,
which is visible to screenreader users, and the title= attribute,
which is visible to all users; there's also the src attribute of
images, and lots of other possibilities too).
2014-04-04 18:31:29 +01:00
Marina Glancy 9061261187 MDL-40843 workshop: sort entries in recent activity block by time 2014-04-04 17:15:09 +08:00
Marina Glancy ddd2862925 MDL-40843 workshop: show user names in recent activity 2014-04-04 17:07:40 +08:00
Marina Glancy f5da629eb6 MDL-40843 recent_activity: corrections to grouping and user fields 2014-04-04 17:07:36 +08:00
Marina Glancy 2d54449c07 MDL-40872 Restore functionality of showrecentsubmissions setting 2014-04-04 16:59:41 +08:00
AMOS bot 2309853e70 Automatically generated installer lang files 2014-04-03 09:28:19 +00:00
Marina Glancy 255bb80080 weekly release 2.5.5+ 2014-04-03 12:39:46 +08:00
Marina Glancy 68f41b26b8 MDL-43021 course: corrections to the shortname and idnumber uniqueness validation 2014-04-03 11:14:08 +08:00
Damyon Wiese 110cfbc935 MDL-42195 Bootstrap: Make bootstrap responsive images "opt-in".
This responsive image behaviour prevents setting of image sizes in text editors,
as well as a string of pix icon bugs / profile image bugs across Moodle.

We are switching to Bootstrap 3 syntax where you need img-responsive class to images
that want this behaviour.
2014-04-03 09:24:15 +08:00
Marina Glancy 52d88560e1 Merge branch 'MDL-41063_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2014-04-02 09:47:02 +08:00
Eloy Lafuente (stronk7) aded9ff972 Merge branch 'MDL-31262_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-04-02 03:23:50 +02:00
Marina Glancy 1db4576ef7 Merge branch 'm25_MDL-44753' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-04-02 09:16:50 +08:00
Marina Glancy 234f301977 MDL-34012 chat: removing repetetive db query (performance) 2014-04-02 02:58:14 +02:00
Eloy Lafuente (stronk7) 21e91b9287 Merge branch 'wip-MDL-43398-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-02 02:50:51 +02:00
Petr Škoda c2b8818c71 MDL-44843 try to hack around strict locale names in OSX
Conflicts:
	lib/moodlelib.php
2014-04-02 02:31:28 +02:00
Eloy Lafuente (stronk7) 3b7aef2de9 Merge branch 'wip-MDL-41102-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-02 02:20:57 +02:00
Sam Hemelryk 6aefe4ec3c Merge branch 'w14_MDL-44824_m25_subplugins' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-04-02 13:04:49 +13:00
Dan Marsden bf5a0651b1 MDL-44753 SCORM: add check during SCORM restore to make sure valid launch sco is set 2014-04-02 10:04:10 +13:00
Sam Hemelryk db1e66c1e0 Merge branch 'MDL-43284-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2014-04-02 09:27:05 +13:00
Eloy Lafuente (stronk7) b869a723da Merge branch 'wip-MDL-35305-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-04-01 21:50:31 +02:00
Marina Glancy 70dc247627 Merge branch '25STABLE-wip-MDL44021' of git://github.com/jennymgray/moodle into MOODLE_25_STABLE 2014-04-01 17:41:31 +08:00
Jenny Gray a843ac0de2 MDL-44021 mod_glossary - fixed search multiple keywords sql duplicate parameter error 2014-04-01 09:38:24 +01:00
Michael Aherne 3b6ce707cb MDL-41895 conditions Show details of grouping restriction 2014-04-01 09:16:03 +01:00
Marina Glancy df1f81e3ec Merge branch 'W14_MDL-44862_m25_pgsocket' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2014-04-01 15:34:08 +08:00
Marina Glancy 511fda4596 Merge branch 'MDL-44701_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE 2014-04-01 11:07:13 +08:00
Marina Glancy c08890750c Merge branch 'MDL-44670-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-04-01 11:06:01 +08:00
sam marshall 50218f3a92 MDL-44837 Behat: 'dialogue' selector only works for confirm dialogues
The dialogue selector in Behat (used only in one place) didn't work for
other types of standard Moodle notification dialogue.
2014-03-31 13:52:42 +01:00
Eloy Lafuente (stronk7) dd693b76fa MDL-44862 postgres: tests to support socket & port
Both the database auth and enrol plugins use ADOdb
to perform connections. Socket and port are allowed
there if passed as "socket:port", so, when both are
configured in CFG, we pass them that way. Else
ADOdb defaults to standard port (5432).
2014-03-31 09:30:27 +08:00
Jean-Michel Vedrine e87688d1f4 MDL-41063 Lesson qformat_default class is missing an error function 2014-03-30 09:25:05 +02:00
Petr Škoda 64b18f75b9 MDL-44862 always add dbport to dbsocket in pg driver
This should hopefully resolve problems when using sockets connection
to pg servers running on non-standard ports.
2014-03-30 10:13:39 +08:00
Tim Hunt 8e32e83f0a MDL-31262 fix quiz review capability check.
This change is logically the same as changing
    $this->has_capability('mod/quiz:viewreports')
to
    $this->has_capability('mod/quiz:viewreports') || $this->has_capability('mod/quiz:preview')
in the original code. However, I rewrote the logic so that we test the
most common and performance-critical case first - that of a student
lookign at their own attempt.
2014-03-28 18:40:21 +00:00
Marina Glancy d096d4e43c MDL-41102 report_performance: correctly check state of automated backups
Thanks to Renaat Debleu for the patch
2014-03-28 16:41:59 +08:00
Marina Glancy 0a3c3555ab MDL-33486 wiki: allow searching individual wikis 2014-03-28 14:18:27 +08:00
Marina Glancy ce417f72fa MDL-35305 wiki: backup and restore files
Thanks to Tatsuya Shirai for the patch
2014-03-28 10:26:01 +08:00
Marina Glancy d59796af1a weekly release 2.5.5+ 2014-03-27 16:52:14 +08:00
Marina Glancy db0b8a91e8 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-03-27 16:52:13 +08:00
Marina Glancy 8f3311bc5e MDL-43398 wiki: remove extra Choose... option from select 2014-03-27 14:53:24 +08:00
Jerome Mouneyrac 07470deddb MDL-43398 Wiki: Choose... options cause SQL errors or seen inappropriate. 2014-03-27 14:52:31 +08:00
Adam Olley ca27069762 MDL-44701 gradereport_grader: Display warning on navigation if unsaved grades are present 2014-03-27 14:57:42 +10:30
Petr Škoda 1ac1d97c9f MDL-44824 add missing subplugin type names 2014-03-27 11:54:29 +08:00
Jason Fowler 4933572085 MDL-43284 Theme: Clean theme errors with padding in Question Bank fixed 2014-03-27 10:41:59 +08:00
AMOS bot 39bbfceab6 Automatically generated installer lang files 2014-03-27 00:48:34 +00:00
Tim Lock 50e92d657b MDL-44575: Prevent cron from sending feedback notifications when assignments are hidden in the gradebook 2014-03-26 09:48:23 +10:30
Eloy Lafuente (stronk7) 82d6ad7a7f Merge branch 'wip-MDL-41285-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-25 21:54:12 +01:00
Marina Glancy 3c34681071 Merge branch 'mdl44573-moodle25' of git://github.com/tlock/moodle into MOODLE_25_STABLE 2014-03-25 16:21:52 +08:00
Marina Glancy c047d16474 Merge branch 'MDL-44665_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-03-25 14:29:49 +08:00
Frederic Massart 8eadcc6860 MDL-44670 theme_clean: Updating screenshot 2014-03-25 12:38:41 +08:00
Sam Hemelryk 5e0e6a8c44 Merge branch 'MDL-43960-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-03-25 12:30:43 +13:00
Tim Hunt 8af04d5908 MDL-44665 declare all quiz page types in the blocks UI. 2014-03-21 14:43:45 +00:00
Marina Glancy 71e4f93e41 MDL-41285 block_recent_activity: behat test for structural changes 2014-03-21 15:48:07 +08:00
Damyon Wiese f9323c70d6 MDL-43985 Assign: Allow teachers to skip notifying students about grade update.
Backport of MDL-33600

Conflicts:
	mod/assign/locallib.php
2014-03-21 14:51:36 +08:00
Marina Glancy c2066a014c weekly release 2.5.5+ 2014-03-20 16:00:11 +08:00
Jetha Chan e73e495b77 MDL-44582 installer: added check for php json extension 2014-03-19 16:18:07 +13:00
Marina Glancy c7d46f034c Merge branch 'MDL-43341_25' of git://github.com/nobelium/moodle into MOODLE_25_STABLE 2014-03-19 10:36:07 +08:00
Marina Glancy 773c952bf3 MDL-44141 restore: added phpdocs 'since' for new method 2014-03-19 10:09:53 +08:00
Marina Glancy e8aa64fc90 Merge branch 'MDL-44141-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-03-19 09:57:02 +08:00
Nobelium 92d914e13d MDL-43341 SCORM Report: spacer.gif must be managed with ->spacer 2014-03-18 19:40:58 +00:00
sam marshall ebf2c14453 MDL-44141 Completion: System updates data during restore
The completion system has code which is supposed to prevent it
updating completion status while grades are being restored. This
code was a nasty hack and had not worked for some time. As a result
completion dates were restored incorrectly.

This commit implements a 'proper' way to find out if a restore is
currently running, replacing the previous hack.
2014-03-18 13:29:58 +00:00
Marina Glancy b0eeaaacfe Merge branch 'MDL-38636-25' of git://github.com/roelmann/moodle into MOODLE_25_STABLE 2014-03-18 17:41:00 +08:00
Marina Glancy 5f2a9a8962 Merge branch 'w12_MDL-44191_m25_mysql56' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2014-03-18 16:04:49 +08:00
Marina Glancy 7c671ddb9c Merge branch 'MDL-44246_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-03-18 15:33:43 +08:00
Marina Glancy d9a23f9dd8 Merge branch 'MDL-44416_25' of git://github.com/appalachianstate/moodle into MOODLE_25_STABLE 2014-03-18 14:46:53 +08:00
Marina Glancy 1bd20a2402 Merge branch 'MDL-44148-25' of git://github.com/jethac/moodle into MOODLE_25_STABLE 2014-03-18 14:34:18 +08:00
Jetha Chan a98a915ddf MDL-44148 portfolio: set_user_config usage fix
Amended user/portfolio.php's use of portfolio_plugin_base::set_user_config to be consistent with the API.
2014-03-18 14:25:12 +08:00
Sam Hemelryk ee986da3ed Merge branch 'wip-MDL-44542-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-18 17:05:01 +13:00
Marina Glancy 049d092071 MDL-44524 feedback: fix bug in sql under oracle
Thanks to Rob King"
2014-03-18 11:59:58 +08:00
Sam Hemelryk 29591a867f Merge branch 'MDL-44502-25' of https://github.com/bostelm/moodle into MOODLE_25_STABLE 2014-03-18 14:41:02 +13:00
Sam Hemelryk 5cf880d883 Merge branch 'MDL-44433-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-03-18 14:35:59 +13:00
Mary Evans b8e816a8e2 MDL-44381 theme_brick: Removed whitespace and reference to arialist theme in config.php. 2014-03-18 14:33:51 +13:00
Sam Hemelryk 069b3ae29c Merge branch 'mdl44499-moodle25' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2014-03-18 14:27:02 +13:00
Tim Lock d747a1d9aa MDL-44669: mod/assign: fix batchoperations JS when using select all checkboxes. 2014-03-18 11:11:02 +10:30
Petr Škoda cadca2ab9a MDL-44527 import latest certificate bundle 2014-03-18 12:52:43 +13:00
Sam Hemelryk faa87eb28c Merge branch 'w12_MDL-44516_m25_purifier' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-03-18 11:48:28 +13:00
Sam Hemelryk 7ad84b0c46 Merge branch 'MDL-44585-moodle25' of https://github.com/StudiUM/moodle into MOODLE_25_STABLE 2014-03-18 09:03:26 +13:00
Marina Glancy d2e55bfee4 Merge branch 'MDL-44588_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-03-17 18:19:57 +08:00
Marina Glancy 5f85fbc3e9 Merge branch 'w12_MDL-44624_m25_dmltest' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2014-03-17 18:13:28 +08:00
Marina Glancy 122dcf4081 Merge branch 'MDL-44356-M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2014-03-17 17:10:27 +08:00
Marina Glancy 3a38900645 Merge branch 'm25_MDL-39568' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-03-17 16:22:03 +08:00
Marina Glancy c02da6acc7 Merge branch 'w12_MDL-44635_m25_ajaxlogs' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2014-03-17 14:29:21 +08:00
Petr Škoda f56f0fc402 MDL-44635 discard error logging during ajax tests 2014-03-17 11:32:55 +08:00
Tim Lock fa61c13806 MDL-44573: Remove HTML tags in outputs column in offline grading worksheet 2014-03-17 12:44:47 +10:30
Trevor Cunningham b7777142e3 MDL-39568 gradinform_guide: show maxgrade to students when viewing marking guide 2014-03-17 09:03:56 +13:00
Mary Evans a2b69c5c7d MDL-44356 theme_bootstrapbase: Centralize the drag and drop arrow in filemanager. 2014-03-15 21:36:23 +00:00
roelmann 7c57864769 MDL-38636 Hidden module names are difficult to read on breadcumb in Serenity
modified:   core.css
2014-03-15 21:00:40 +00:00
Gilles-Philippe Leblanc f29f455e8d MDL-44585 grade_import: Restrict the accepted types in the gradebook import 2014-03-14 08:06:20 -04:00
Henning Bostelmann eed14281d4 MDL-44502 filelib: Add mimetype for Maple worksheets 2014-03-14 11:40:47 +00:00
Petr Škoda bf2df218ab MDL-44624 fix false failures in DML tests 2014-03-14 14:16:16 +08:00
Petr Škoda 7529d53da0 MDL-44516 import htmlpurifier 4.6.0 2014-03-14 12:12:56 +08:00
Petr Škoda e06ec0459f MDL-44339 treat unexpected debugging() calls in phpunit tests as errors 2014-03-14 11:47:31 +08:00
Petr Škoda 8c40a301cb MDL-44191 hack around MySQL 5.6 inability to lower auto_increment 2014-03-14 11:32:51 +08:00
Fred Woolard fdfeabf177 MDL-44416 Correct detail view paging 2014-03-13 19:56:51 -04:00
Eloy Lafuente (stronk7) 2d9a0b8f39 weekly release 2.5.5+ 2014-03-13 23:56:00 +01:00
Eloy Lafuente (stronk7) 96555937ad MDL-43266 testing: avoid assoc arrays for json
Last commit switched from raw arrays to associative
arrays. That leads to json_encode() to generate an
object instead of an array, ultimately leading to
problems with the rest of code expecting an array.

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

Also, fix some file permissions.
2014-03-13 22:15:16 +01:00
Dan Poltawski 06861f02ed MDL-44433 lang: Update the name of country code CV
ISO-3166 has updated this name to Cabo Verde:
https://www.iso.org/obp/ui/#iso:code:3166:CV
2014-03-13 17:16:53 +08:00
Damyon Wiese 3cd6404f3b MDL-43960 assign: Add missing include
There was a report of mod_assign_save_grade webservice failing because of this.
I couldn't reproduce it, but grepping the code found one place where this include
should be added.
2014-03-13 12:50:20 +08:00
Eloy Lafuente (stronk7) 796e6f2153 Merge branch 'MDL-43266_25-last-fixes' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-03-12 23:28:07 +01:00
Tim Hunt 8145f93b54 MDL-44588 quiz: fix crazy variable called $this. 2014-03-12 18:22:14 +00:00
David Monllao 322a47d526 MDL-43266 testing: Removing duplicated keys 2014-03-12 17:51:49 +08:00
Sam Hemelryk 1dc93170ae Merge branch 'm25_MDL-37733' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-03-12 14:13:12 +13:00
Dan Poltawski 584c7d3da7 Merge branch 'MDL-44061-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-03-12 09:09:19 +08:00
Eloy Lafuente (stronk7) f755c4a849 Merge branch 'wip-MDL-32699-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-12 00:19:31 +01:00
Sam Hemelryk f3e25119ad Merge branch 'MDL-42368-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-03-12 11:56:55 +13:00
Sam Hemelryk c6f0baa387 Merge branch 'MDL-44345-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-03-12 11:21:54 +13:00
Andrew Nicols d6af66c6f0 MDL-44061 Ajax: Log whitespace issues to the server error log 2014-03-11 23:30:52 +08:00
David Monllao c922f91a3c MDL-44246 behat: New mod_quiz test when JS is disabled 2014-03-11 17:25:46 +08:00
Dan Poltawski 46e5012aa7 Merge branch 'wip-MDL-44337-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-11 15:41:54 +08:00
Dan Poltawski b0e0506650 MDL-44480 yui: shifter build 2014-03-11 14:37:03 +08:00
Dan Poltawski d356168432 Merge branch 'MDL-44480-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-03-11 14:33:22 +08:00
Dan Poltawski 549f507e78 Merge branch 'wip-MDL-42870-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-11 11:37:50 +08:00
Sam Hemelryk eb5d6cc574 Merge branch 'wip-MDL-40721-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-11 14:22:37 +13:00
Sam Hemelryk d59a7f97dd Merge branch 'w11_MDL-44451_m25_addonloc' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-03-11 14:18:11 +13:00
Eloy Lafuente (stronk7) 46e04019c2 Merge branch '44547-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-03-11 00:29:13 +01:00
Sam Hemelryk ecba21b695 MDL-44547 repository_alfresco: version bump 2014-03-11 12:04:59 +13:00
Sam Hemelryk e75faa20f6 Merge branch 'MDL-43721-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-03-11 08:54:32 +13:00
Dan Poltawski 57ce177561 Merge branch 'MDL-43236_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-03-10 12:04:17 +08:00
David Monllao 956050084b MDL-43236 behat: Backporting new method to ease backporting future scenarios 2014-03-10 11:47:46 +08:00
Niclas Tollstorff c9d15cee1a MDL-37733 SCORM: Correct check for force new attempt 2014-03-08 21:23:24 +13:00
Eloy Lafuente (stronk7) ce3c7668b0 Moodle release 2.5.5 2014-03-07 18:51:43 +01:00
Tim Lock a2e726382a MDL-44499: Fix PHP warning in upload_manager class 2014-03-07 14:17:02 +10:30
Krister 03f939565c MDL-42368 Themes: Anomaly breadcrumb fix
Previously the editing button could become unreachable with small window
sizes.
2014-03-07 11:36:56 +08:00
Marina Glancy 60c3f02c14 MDL-42870 completion: show failed activities as incompleted 2014-03-07 10:23:57 +08:00
Marina Glancy b65f535a47 MDL-44337 glossary: behat test for glossary categories 2014-03-07 10:04:07 +08:00
Marina Glancy bd48aedd93 MDL-40721 wiki: missing page->set_url() when restoring wiki 2014-03-07 10:02:16 +08:00
Marina Glancy 200cf9a5be MDL-32699 wiki: only edit capability is required to restore wiki revision 2014-03-07 10:01:58 +08:00
Eloy Lafuente (stronk7) 2616d6343b weekly release 2.5.4+ 2014-03-06 22:17:11 +01:00
Eloy Lafuente (stronk7) 495d15279b Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-03-06 22:17:05 +01:00
Andrew Nicols 8b20595603 MDL-44480 Javascript: Correct dialogue ID generation 2014-03-06 17:10:14 +08:00
Damyon Wiese 32c9c2588c MDL-43721 Assign + groups: Improve performance of assign grading table
Add a function to the groups lib to filter a list of users down
to the ones who can see the module. Required because calling
groups_course_module_visible() for a list of users is too slow
and we shouldn't spread group logic outside of grouplib.php.

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

This is 12secs down to 2.5secs.

Conflicts:
	mod/assign/locallib.php
2014-03-06 15:53:12 +08:00
Damyon Wiese 6a5effb1a0 MDL-43721 Assign: Static cache for plugin is_enabled and is_visible because they get used alot 2014-03-06 15:51:53 +08:00
Yuliya Bozhko c5d7d20f40 MDL-44140 badges: Prevent non-owners to change visibility of issued badges
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-03-06 14:37:38 +08:00
Dan Poltawski 1c99db293d Revert "MDL-43852 Filters Fixed naked-OR conditions."
While the patch worked as intended, we discovered some other concerns
about use of this setting in testing.

This reverts commit 96315c3478.
2014-03-06 09:05:56 +08:00
Eloy Lafuente (stronk7) bf6f9d043d Merge branch 'MDL-44425-enfix_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2014-03-06 00:37:09 +01:00
Helen Foster 6758339e44 MDL-44425 Merge English strings from the en_fix language pack 2014-03-05 13:38:27 +01:00
Frederic Massart 4c11d263ea MDL-44345 repository_youtube: Endless loop when reaching last results 2014-03-05 16:59:13 +08:00
Petr Škoda ecf005f956 MDL-44451 fix plugin_misplaced_exception exception 2014-03-05 16:56:01 +08:00
Dan Poltawski 3ca102e45a Merge branch 'wip-MDL-44287-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-05 14:18:25 +08:00
Damyon Wiese 186b8fed30 Merge branch 'MDL-44370-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-03-05 14:04:00 +08:00
Yuliya Bozhko 04d32d24a6 MDL-41585 badges: Add a note that badge recipient is a deleted user
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>

Conflicts:
	badges/renderer.php
2014-03-05 13:09:18 +08:00
Dan Poltawski 0634e5d581 Merge branch 'MDL-41248_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-03-05 12:40:01 +08:00
Dan Poltawski 12e33d79c0 Merge branch 'wip-MDL-44258-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-03-05 12:28:10 +08:00
Marina Glancy c726fd0064 MDL-44287 glossary: do not output before redirecting 2014-03-05 11:46:59 +08:00
Marina Glancy 471253efc7 MDL-44287 glossary: fixing warnings when importing as new module 2014-03-05 11:31:36 +08:00
Dan Poltawski 27a3ba41d2 Merge branch 'MDL-43930-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-03-05 11:29:25 +08:00
Dan Poltawski b8cccad323 Merge branch 'MDL-44065-m25' of https://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-03-05 10:52:50 +08:00
Damyon Wiese bdf5c9bd16 Merge branch 'wip-MDL-44074-M25_4' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2014-03-05 09:43:30 +08:00
AMOS bot 8147a04777 Automatically generated installer lang files 2014-03-05 00:54:46 +00:00
Frederic Massart 76a19577f9 MDL-44436 accesslib: Tests fail due to strict comparison 2014-03-04 17:32:45 +08:00
Ankit Agarwal 1d6c74a0c8 MDL-44370 calendar: Add support for restoring calendar log rules 2014-03-04 16:17:30 +08:00
Ankit Agarwal a6b1963349 MDL-44370 calendar: Fix calendar url in reports 2014-03-04 16:17:23 +08:00
Dan Poltawski 1533381d61 Merge branch 'MDL-44278_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-03-04 15:46:24 +08:00
Dan Poltawski 3104f89ec8 Merge branch 'MDL-44436-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-03-04 14:41:31 +08:00
Frederic Massart 890e85767e MDL-44436 context: Context IDs are forced to be int
The method context::insert_context_record() sets the context::$id to
an int, while when we create an instance, the $id is often read from
a DB $record object, and is a string. The ID should always be an int.
2014-03-04 14:25:20 +08:00
Damyon Wiese 94a875bee9 Merge branch 'MDL-43738_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-03-04 13:17:46 +08:00
Dan Poltawski cd0281f97e Merge branch 'm25_MDL-43852_SWF_Not_Embedded_By_Mediaplugin_Filter' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-03-04 12:56:15 +08:00
Dan Poltawski ea8647b39e MDL-43146 enrol_imsenterprise: missing sesskey protection 2014-03-04 12:26:21 +08:00
Frederic Massart a71a6de914 MDL-29409 repository_alfresco: Drop support for URL/link
The current solution has two major issues. Firstly, it is using the
session key in the file URL, allowing anyone with the link to steal
the identify of the poster. Secondly, the links are not presistent
and become broken as soon as the server is restarted. Let's not
support this any more until a proper solution is found in MDL-26454.
2014-03-04 11:35:02 +08:00
Dan Poltawski 1249c069bb Merge branch 'MDL-44377_25' of https://github.com/stronk7/moodle into MOODLE_25_STABLE 2014-03-03 15:15:23 +08:00
Marina Glancy fa07779026 MDL-39990 wiki: more detailed validation of view/edit access 2014-03-03 14:45:25 +08:00
Andrew Davis 3d7810ab3d MDL-44082 mod_chat: added a security check for users already in the chat activity 2014-03-03 12:16:59 +08:00
Tomasz Muras 7b839b0ec1 MDL-43656 mod_feedback: availablity date logic incorrect 2014-03-03 11:24:30 +08:00
Maria Torres 2978623cda MDL-43916 - Email addresses incorrectly displayed
When capabilities and settings do not allow it.
2014-03-03 10:37:36 +08:00
Dan Poltawski ed28719f03 Merge branch 'w06_MDL-43344_m25_flow' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-03-03 10:07:21 +08:00
Gareth J Barnard 68a5672df8 MDL-44074 theme_bootstrapbase: No 768px-979px & 1200px+ empty blk span calcs. 2014-03-01 08:59:42 +00:00
AMOS bot 2f9b2b81a3 Automatically generated installer lang files 2014-03-01 00:56:06 +00:00
Gordon Bateson 96315c3478 MDL-43852 Filters Fixed naked-OR conditions. 2014-02-28 23:57:31 +01:00
Eloy Lafuente (stronk7) 04904076fe MDL-44377 dml: enforce non-empty prefix for sqlsrv
Only MySQL is allowed to run Moodle instances without
(with an empty) database prefix. The rationale is that
"user" is a reserved word in every RDBMS but MySQL.

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

This check is present in all the drivers, just sqlsrv was missing it.
2014-02-28 10:12:43 +01:00
Marina Glancy 067c2025e4 MDL-44258 Behat test for workshop, automate MDLQA-99 2014-02-28 16:31:34 +08:00
Tim Hunt 241634f1ab MDL-44278 Quiz time overrides: use the same step everywhere.
On the main form, you could select to the nearest minute. On
the override form you could only select to the nearest 5 minutes.
2014-02-28 09:01:00 +01:00
Tim Hunt 7d3af76e63 MDL-41248 completion: fix non-translatable text.
There were two hard-coded strings. Thanks to Guido Hornig for the suggested fix.
2014-02-28 08:09:39 +01:00
Damyon Wiese 53490ad50d weekly release 2.5.4+ 2014-02-28 10:02:24 +08:00
Damyon Wiese e6232f35d8 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-02-28 10:02:19 +08:00
David Monllao 39ce052c66 MDL-43738 behat: Refactoring the field type guesser
The previous behaviour delegates the responsability
of overwriting the 3 public methods to the child
classes, now the field type or moodleform field is
guessed earlier in the execution flow.

Other changes introduced here:
- Fix wrong moodleform detection when there is a form
  in the page but the field we are dealing with is
  not inside it.
- Some coding style changes.
2014-02-27 18:49:17 +08:00
David Monllao 67a73f7457 MDL-43738 behat: Backport to 2.5
Other issues this patch depends on were not
backported to 2.5 so we need to cover it:
- Add hardcoded waits as MDL-42625 was not
  integrated
- Add behat_form_field::get_internal_field_id()
- Use document.readyState rather than our
  custom JS query (MDL-42625)
2014-02-27 18:06:54 +08:00
David Monllao c8cd93583d MDL-43738 behat: Backporting new 2.7 methods to 2.5
We encourage backporting new feature files, adding
here also these Moodle 2.7 new step definitions so
future features will be easier to backport as we
would be able to directly cherry-pick them.
2014-02-27 18:06:54 +08:00
David Monllao b8939c9318 MDL-43738 behat: New step to adapt to radio buttons behaviour
Now we interact with radio fields through it's value
or text.
2014-02-27 18:06:53 +08:00
David Monllao cdbd432616 MDL-43738 behat: Normalization and major refactoring of getters and setters
Every single step that sets or gets a value from a field
has been updated to follow the same behaviour both when
using it through a single step or through generic steps
like "I fill the moodle form with:", to resume all the
changes:
- Created a behat_form_group to re-guess the field type
  and act appropriately setting and getting it's value
- Normalize all getters and setters to use behat_form_field
  children
- Complete behat_form_checkbox to trigger the appropiate JS
  event needed to perform some JS scripts that are listening
- Refactor MDL-43713 multi-select changes and remove
  the two new steps introduced there as that behaviour can
  be managed from the generic getter
2014-02-27 18:06:52 +08:00
David Monllao 6013abc914 MDL-43738 behat: Functional tests for fields management
We are cheating with this .feature file as this
is not a behaviour and we are just testing the
framework, but in this case I think that everybody
will agree on the need of doing it, as every browser
behaves differently and minor changes in the getters
and setters can easily end up breaking the behaviours.

All credit goes to Eloy Lafuente (stronk7).
2014-02-27 18:06:11 +08:00
Eloy Lafuente (stronk7) 33fa8e7dba MDL-43713 behat: improve multi-select support
This patch implements:

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

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

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

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

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

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

The change 5) causes Safari to fail. The problem has been traced down to
the extra ->click() present there. Anyway there are not test cases
requiring that "immediate" evaluation right now. Only the special feature
file attached verifies it.
2014-02-27 18:06:10 +08:00
Damyon Wiese 28b3ddbdbe Merge branch 'wip-mdl-44248' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-02-27 13:32:22 +08:00
Rajesh Taneja 98c5ac394f MDL-44248 badges: Added wait after ajax request
After ajax give some time to make sure request is complete
else Modal dialog present error will appear and fail behat
2014-02-27 12:52:33 +08:00
David Monllao a9c0c865dd MDL-44286 behat: Fixing JS code error
PhantomJS console shows a JS error regarding
an undefined Syn var; as explained by Andrew
Nicols this is caused by Syn supported features
checker, the change in moodle-behat-extension
solves this problem.
2014-02-27 11:55:54 +08:00
Dan Poltawski 361604089e Merge branch 'MDL-43882_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-25 15:34:03 +08:00
Jerome Mouneyrac f411652f78 MDL-43266 Testing sites are cleaning all test dataroot contents 2014-02-25 14:49:14 +08:00
David Monllao 8865729c0c MDL-43882 lib: Adding info about the change in upgrade.txt 2014-02-25 11:27:51 +08:00
Damyon Wiese a3d2e1c590 MDL-40619 mod_quiz: Remove commented non-js behat scenario 2014-02-25 11:05:57 +08:00
Damyon Wiese 94133c20fa Merge branch 'wip-MDL-40619-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-25 11:05:26 +08:00
Dan Poltawski c1a7185e62 Merge branch 'MDL-43405_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2014-02-25 10:30:38 +08:00
David Scotson 723fc6fd4a MDL-44168 html: border=1 on regexdetect table
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-24 15:21:32 +08:00
Damyon Wiese d3ccdf54bd Merge branch 'MDL-44248_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-02-24 14:26:29 +08:00
Damyon Wiese 5e200e3215 Merge branch '44279-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-24 13:39:05 +08:00
Damyon Wiese d92edc97b5 Merge branch 'MDL-44286_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-24 13:34:08 +08:00
Michael Aherne 624dd20db1 MDL-44066 caching Don't advertise session mode for MongoDB and memcached 2014-02-24 12:50:17 +08:00
Damyon Wiese 89093f0f07 Merge branch '44217-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-24 11:14:25 +08:00
Damyon Wiese 931c3f4cfb Merge branch 'MDL-34319_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2014-02-24 11:10:37 +08:00
Sam Hemelryk 1bd8e824a5 MDL-44217 theme_bootstrapbase: darkend link colour by 5% for accessibility 2014-02-24 16:07:34 +13:00
Damyon Wiese d36afa9f17 Merge branch 'MDL-41767-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-02-24 10:41:49 +08:00
David Monllao 6a9d169ec8 MDL-43882 dml: New test for perf_get_xxxx() methods 2014-02-21 13:20:16 +08:00
David Monllao b77b992178 MDL-43882 performance: New metric, time spent by the database
This patch adds a new performance metric to the performance
info shown by MDL_PERF* vars, the time spent by the database,
it was one of the wonderful @poltawski ideas. To be more specific
the value displayed is the sum of the time elapsed between query_start()
and query_end().
2014-02-21 13:20:16 +08:00
David Monllao b4d3073b1c MDL-44286 behat: Updating to our custom Syn library 2014-02-21 10:18:46 +08:00
AMOS bot b34752a198 Automatically generated installer lang files 2014-02-21 00:45:32 +00:00
Sam Hemelryk 987a9359ac MDL-42279 user: fixed typo in user_get_user_details_courses 2014-02-21 08:34:39 +13:00
Sam Hemelryk ad16262bc5 MDL-44279 user: added unit test to trigger known bug 2014-02-21 08:34:39 +13:00
Eloy Lafuente (stronk7) 7d415929ec weekly release 2.5.4+ 2014-02-20 12:43:22 +01:00
Eloy Lafuente (stronk7) 6e21938526 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-02-20 12:43:17 +01:00
Damyon Wiese cfbc6b93db MDL-43930 assign: Do not log when user is logged in as someone else.
I do not agree with this behaviour - but this makes it consistent with other modules.

Conflicts:
	mod/assign/locallib.php
2014-02-20 12:35:06 +08:00
Damyon Wiese 4131d08b74 Merge branch 'MDL-44118_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-19 09:20:36 +08:00
Dan Poltawski 4aceac6294 Merge branch 'MDL-43182_25' of git://github.com/mr-russ/moodle into MOODLE_25_STABLE 2014-02-19 09:16:51 +08:00
Eloy Lafuente (stronk7) cb7bdd7dd3 MDL-43265 question: incorrect closing parenthesis 2014-02-19 00:11:47 +01:00
Eloy Lafuente (stronk7) cb3385aefa Merge branch 'MDL-43265_25' of https://github.com/jacks92/moodle into MOODLE_25_STABLE 2014-02-18 23:56:23 +01:00
Eloy Lafuente (stronk7) 2864423334 Merge branch 'MDL-43337-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-02-18 23:25:44 +01:00
Tim Hunt 777017e784 MDL-44118 new environment check are all quiz attempts upgraded.
In Moodle 2.1, there was a major DB upgrade relating to questions, and
it was possible to delay some of that upgrade. Now, those DB tables are
changing again, and the time has come to insist that all the updata has
been upgraded (or deleted).
2014-02-18 12:03:13 +00:00
Dan Poltawski 71ca9c1d48 Merge branch 'm25_MDL-43541' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-02-18 14:14:02 +08:00
Damyon Wiese ead7a51e42 Merge branch 'MDL-41646_25' of git://github.com/apsdehal/moodle into MOODLE_25_STABLE 2014-02-18 12:42:31 +08:00
Eloy Lafuente (stronk7) 42651ea3f1 Merge branch '43822-25-fixonly' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-18 02:12:30 +01:00
Yuliya Bozhko e0b5717b80 MDL-44248 badges: Fix download badge button on badge page
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-02-18 09:56:41 +13:00
sam marshall 6de5b2108f MDL-44065 Course: _add_instance exception leads to inconsistent db
If an exception occurs during a module's _add_instance function, this
results in a course_modules entry with instance=0. The system already
handled returning false to this function, but did not handle
exceptions.
2014-02-17 10:54:31 +00:00
Dan Marsden 2a26bd6dde MDL-43541 SCORM: set first launchable sco correctly. 2014-02-17 19:58:36 +13:00
Damyon Wiese 2c3e6e3d16 Merge branch 'MDL-43504-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-17 14:24:52 +08:00
Marina Glancy 94424caa27 MDL-40619 behat: test for creating a one-question quiz 2014-02-17 14:20:24 +08:00
Dan Poltawski 13628d19a8 Merge branch 'MDL-42618_25' of git://github.com/SWiT/moodle into MOODLE_25_STABLE 2014-02-17 12:14:21 +08:00
Dan Poltawski 392c600873 Merge branch 'MDL-27414_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2014-02-17 12:06:46 +08:00
Damyon Wiese dd8cfb18cb Merge branch 'MDL-42902-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-02-17 11:40:50 +08:00
Andrew Nicols 51b833de3e MDL-43504 Course: Include the course/category collapse JS correctly
This was previously only included when there were hidden categories to show
which were not yet visible. As a result, if all categories were visible,
then the JS was not included.
2014-02-17 11:40:48 +08:00
Andrew Nicols 5b7fbdb938 MDL-43504 Javascript: Frontpage collapsing should not depend on enableajax
This is an oversight, but we should not depend on the enableajax setting
which we're trying to deprecate.
2014-02-17 11:40:48 +08:00
Dan Poltawski a392332a28 Merge branch 'MDL-42033_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2014-02-17 10:32:37 +08:00
Damyon Wiese 6b7f27698c Merge branch 'MDL-44018_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-17 09:25:21 +08:00
fabmen 68ca11f96a MDL-43405 auth_ldap: Fixed issue with undefined variable: ldap_cookie 2014-02-16 14:23:11 -08:00
fabmen 058bb7cd33 MDL-34319 auth_cas: Fixed issue with undefined variable: ldapconnection 2014-02-16 14:20:36 -08:00
Sam Hemelryk 9ef6537e4c Merge branch 'MDL-44037_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-17 10:16:36 +13:00
Sam Hemelryk 0c51cfefb7 Merge branch 'MDL-42404_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-17 10:15:39 +13:00
Sam Hemelryk 077aa1b431 Merge branch 'MDL-44142-25' of git://github.com/mrverrall/moodle into MOODLE_25_STABLE 2014-02-17 09:16:36 +13:00
Sam Hemelryk a2b2fa9b3f Merge branch 'MDL-44079-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification/moodle-core-notification-min.js
2014-02-17 08:48:52 +13:00
Sam Hemelryk fc46d5b93f MDL-43822 theme_bootstrapbase: blocks less tidied and reorganised
Thanks Gareth for the peer-review.
2014-02-17 08:17:21 +13:00
Jean-Michel Vedrine bc55fbe372 MDL-42033 Files in subdirs not exported correctly by question XML format 2014-02-16 19:50:50 +01:00
Simon Coggins 821746c2c0 MDL-43049 accesslib: Fix typo in memory optimization code 2014-02-16 20:15:40 +11:00
AMOS bot bfb1d60e15 Automatically generated installer lang files 2014-02-15 00:43:53 +00:00
Jean-Michel Vedrine ee34440ae4 MDL-27414 Upgrade the randomsamatch qtype to the new question engine
Added XML import/export
Different randomsamatch qtypes in the same quiz can now pick the same
shortanswer question.
Images are not preserved if shortanswer question is deleted after being
used in a randomsamatch attempt.
2014-02-14 16:56:47 +01:00
Paul Verrall 3f6d43dc32 MDL-44142 Cohorts: Use maxusersperpage for list of current users. 2014-02-13 16:19:59 +00:00
Eloy Lafuente (stronk7) c8d383fdcd weekly release 2.5.4+ 2014-02-13 15:29:58 +01:00
Eloy Lafuente (stronk7) ac58bd76b8 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-02-13 15:29:53 +01:00
Jayesh Anandani 83578abe1d MDL-43265 Fix question name text to 255 chars 2014-02-13 17:02:59 +05:30
David Monllao 2e1b3ff470 MDL-44037 behat: New feature -> publishing rubric templates
This patch automates MDLQA-1186; rubrics can be
shared as templates.
2014-02-13 17:01:27 +08:00
David Monllao 9f0a128b2b MDL-42404 behat: Covering MDL-39710 with behat features
I've contributed to a large an ugly scenario
in favour of performance as separating it in another
scenario or feature would add 3 or 4 minutes to the suite.
2014-02-13 16:20:41 +08:00
David Monllao f4d445755a MDL-42404 behat: Adding feature to test reusing user's rubrics
Automates MDLQA-1187, teachers can reuse their
rubrics in other activity.
2014-02-13 16:20:41 +08:00
David Monllao 6c40937443 MDL-42404 behat: Adding rubrics step definitions 2014-02-13 16:20:41 +08:00
David Monllao 98ce4582f7 MDL-42404 behat: Adding edit rubrics feature
Automates the following MDLQA-1185, MDLQA-1188
and MDLQA-1427. All of them related with the
expected outcomes after editing rubrics definitions
that were already used to grade students.
2014-02-13 16:20:41 +08:00
David Monllao 68153c52ad MDL-42404 behat: Adding yui-dialog to dialogue selector 2014-02-13 16:20:41 +08:00
Frederic Massart 8d9528a0b1 MDL-43337 enrol: More tests for get_enrolled_users_with_capability 2014-02-13 12:07:19 +08:00
Frederic Massart 8c12248e77 MDL-43337 enrol: Missing break in get_enrolled_users WS 2014-02-13 12:07:19 +08:00
apsdehal b506b1af20 MDL-43337 WebService: Missing break statement added
In function get_enrolled_users_with_capability
2014-02-13 12:07:19 +08:00
Sam Hemelryk 96dabdf68d Merge branch 'int25_MDL-43200' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-02-13 08:25:47 +13:00
Petr Škoda a23b04e522 MDL-43200 fix enrol_manual externallib tests 2014-02-12 16:03:18 +08:00
Andrew Nicols 19421b8bdb MDL-43941 Behat: Section visibility tests should not check if activities are visible
It should be possible for activities to be visible even when the section
they are in is hidden.

However, when a section is hidden, all activities in that section are also
then initially hidden. Therefore, this commit splits out the hidden test to
a new test so that the initial state of activities after hiding can still
be tested.
2014-02-12 12:24:05 +08:00
David Mudrák ae5a3f287c MDL-42711/MDL-42902 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
2014-02-12 09:02:23 +08:00
Sam Hemelryk be1ae343ea Merge branch 'MDL-41644_25' of git://github.com/apsdehal/moodle into MOODLE_25_STABLE 2014-02-12 09:24:08 +13:00
Marina Glancy 72c9dda9fd Merge branch '28567-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-02-11 14:43:22 +08:00
Marina Glancy aff0144914 MDL-42505 whitespace correction 2014-02-11 14:36:58 +08:00
Michael Milette 2a8b9a0bfb MDL-42505 - Feedback plugin: Inappropriate use of fieldset tags around form and cancel button
Changes:
* Removed the fieldset HTML tags around the Cancel button at the bottom of the form.
* Removed the fieldset HTML tags around the whole form.
* Added missing fieldset tags around groups of radio buttons and checkboxes.
* Removed unordered list wrapping dropdown lists.
* Removed duplicate label for dropdown lists.

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

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-02-11 14:15:24 +08:00
Andrew Nicols d5080b821b MDL-44079 Javascript: Closing a tooltip should pass event details 2014-02-11 12:30:21 +08:00
Andrew Nicols afe32a1fe5 MDL-44079 Javascript: Check whether a dialogue is focused before closing 2014-02-11 12:30:07 +08:00
Sam Hemelryk e91a87511b Merge branch 'MDL-43941-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-11 14:10:55 +13:00
AMOS bot b46eba8d14 Automatically generated installer lang files 2014-02-11 00:42:13 +00:00
Andrew Nicols 72d4172c61 MDL-43994 Blocks: Hide the move icon when blocks are docked on Afterburner too 2014-02-11 00:10:56 +01:00
Sam Hemelryk 04324e81e2 Merge branch 'MDL-43929_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-11 08:27:40 +13:00
Sam Hemelryk ccf9c3300e MDL-43977 theme_bootstrapbase: small fix to make custom menu work with JS disabled
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-10 18:18:44 +08:00
Tim Hunt 78270bd900 MDL-43929 question manual grading: keep comment when validation fails.
If the validation failed, so the manual grading page was re-displayed
with a validation error, then any comment that had just been typed in
was getting lost. This fixes that.
2014-02-10 07:38:38 +00:00
Sam Hemelryk f7dea8ae75 Merge branch 'wip_25_mdl-32724' of https://github.com/iarenaza/moodle into MOODLE_25_STABLE 2014-02-10 15:26:18 +13:00
Sam Hemelryk 36803e0f78 Merge branch 'MDL-43774_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-02-10 15:20:20 +13:00
Sam Hemelryk d42f989c81 Merge branch 'MDL-40938-25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2014-02-10 14:16:17 +13:00
apsdehal 1f45af2437 MDL-43200 WebServices: Reset Instance variable 2014-02-10 14:13:19 +13:00
Sam Hemelryk d97c8c30ea Merge branch 'MDL-42882-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2014-02-10 13:13:00 +13:00
Sam Hemelryk 387883a928 MDL-44056 question: added new default property to unit tests 2014-02-10 12:56:56 +13:00
Sam Hemelryk 074b8b2989 Merge branch 'MDL-44056_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-10 11:30:16 +13:00
Sam Hemelryk 3c1bba2b11 Merge branch 'MDL-43838_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-02-10 11:27:07 +13:00
Sam Hemelryk a29f1f9629 Merge branch 'MDL-43992-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-10 09:40:17 +13:00
Sam Hemelryk d16cd0840d MDL-44020 core: version bump for service change 2014-02-10 09:37:25 +13:00
Sam Hemelryk 579319888c Merge branch 'MDL-44020-STABLE-25' of git://github.com/jleyva/moodle into MOODLE_25_STABLE 2014-02-10 09:31:01 +13:00
Sam Hemelryk 1ffb89f9b8 Merge branch 'MDL-44046_m25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2014-02-10 09:28:14 +13:00
Sam Hemelryk 5afb7fd120 Merge branch 'MDL-43978_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-02-10 09:23:56 +13:00
Sam Hemelryk 966bb0f45a Merge branch 'MDL-43994-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-10 09:06:35 +13:00
Sam Hemelryk 202e947ffc Merge branch 'MDL-44029-quiz-group-delete-handler-bug_25_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_25_STABLE 2014-02-10 08:44:50 +13:00
Sam Hemelryk 1397e103ba Merge branch 'MDL-43946_m25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2014-02-10 08:42:59 +13:00
Sam Hemelryk 00b099a6c7 MLD-28567 calendar: improved course filter process 2014-02-10 08:31:39 +13:00
Tim Hunt b0e225ba47 MDL-44056 questions: restore essay attempts from 2.0 notice. 2014-02-09 17:56:28 +00:00
AMOS bot 242cf47123 Automatically generated installer lang files 2014-02-09 00:42:15 +00:00
Mary Evans 67ad915c00 MDL-40938 theme_bootstrapbase: Fix for text fields in login block. 2014-02-08 02:40:42 +00:00
Tim Hunt add46ba2eb MDL-44018 quesiton variant was not backed up or restored. 2014-02-07 21:55:29 +00:00
Eric Merrill a48ab57f89 MDL-44046 gradebook Reduce duplicates returned during sortorder fixing. 2014-02-07 09:30:53 -05:00
Juan Leyva 809a70be6b MDL-44020 Add core_calendar_get_calendar_events function to the Moodle Mobile service 2014-02-07 11:27:31 +01:00
Andrew Nicols b5c5cb4390 MDL-43994 Blocks: Hide the move icon when blocks are docked 2014-02-07 17:47:10 +08:00
Andrew Nicols b65613e439 MDL-43992 Javascript: Remove <return> key listener for confirmation
The listener was previously confirming, even when the cancel or 'No'
buttons were selected. However, having the default action as 'Confirm'
seems dangerous in this situation, so removing this option entirely.
2014-02-07 16:35:50 +08:00
Petr Skoda 9f2967e301 MDL-43344 upgrade to latest Flowplayer 2014-02-07 13:11:33 +08:00
Sam Hemelryk 4c56e8210c weekly release 2.5.4+ 2014-02-07 11:46:06 +13:00
Yuliya Bozhko 0fc6693dd1 MDL-43978 badges: Fix lang string 2014-02-07 09:10:09 +13:00
Matt Petro b095ee9f3a MDL-44029 mod_quiz: Fixing group deleted handler so it does not remove user overrides. 2014-02-06 14:11:36 -05:00
Eric Merrill 68f1f6eeb7 MDL-43946 gradebook upgrade Improve SQL to find duplicate sortorders. 2014-02-05 14:01:40 -05:00
Marina Glancy d977433b7a Merge branch 'MDL-42339_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2014-02-05 15:58:42 +08:00
Rossiani Wijaya d5e77b4e12 MDL-42339 - removed double formatting for set_title() and set_heading() 2014-02-05 15:28:01 +08:00
Dan Poltawski e7c932da99 MDL-42882 upgrade: Improvements to upgrade code
Suggested by Petr:
* Don't rely on single user for upgrade
* Make the pathnamehash generation a bit clearer (and add
  a test to verify its correctly formed).
2014-02-05 14:40:51 +08:00
Yuliya Bozhko 3d46592c8b MDL-43774 badges: Stop overriding default course navigation 2014-02-05 10:48:40 +13:00
Yuliya Bozhko 666ab4becb MDL-43978 badges: Display error message to guest users viewing "My Badges" page 2014-02-05 10:00:50 +13:00
Iñaki Arenaza 5448b6b94f MDL-32724: LDAP Auth function user_update() returns true even if update has failed 2014-02-04 19:26:14 +01:00
Eloy Lafuente (stronk7) 06a25d72fa Merge branch 'wip-MDL-41384-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-04 10:41:10 +01:00
apsdehal 14dcbc3622 MDL-41644 Backup: Update CSS class .notifywarning with .notifyproblem 2014-02-04 09:45:16 +05:30
Andrew Nicols 6a87e32c28 MDL-43941 Course: Allow AJAX show/hide of activities in hidden and orphaned sections 2014-02-04 10:58:22 +08:00
Sam Hemelryk ab34537ca4 Merge branch 'MDL-43369-25' of git://github.com/jamiepratt/moodle into MOODLE_25_STABLE 2014-02-04 15:23:57 +13:00
Oleg Sychev 64ab5badbf MDL-42456: add Mercurial vcs support to plugin_external_source 2014-02-04 13:13:03 +13:00
Sam Hemelryk 06ce535d9c Merge branch 'MDL-43885-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-02-04 12:38:25 +13:00
Eloy Lafuente (stronk7) ae9a8e772a Merge branch 'wip-MDL-43821-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-04 00:12:18 +01:00
Eloy Lafuente (stronk7) 85f47a3ebd Merge branch 'wip-MDL-43828-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-03 23:58:22 +01:00
Sam Hemelryk 8aaf8591f1 Merge branch 'MDL-43892_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-02-04 10:57:32 +13:00
Sam Hemelryk 23ca363633 Merge branch 'wip-MDL-33920-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-02-04 10:47:04 +13:00
Gordon Bateson d084d17c0e MDL-40410 remove ampersands required for PHP strict standards lib/tablelib.php 2014-02-04 10:06:34 +13:00
Sam Hemelryk 881b8443ce Merge branch 'MDL-43884-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-02-04 09:11:36 +13:00
Sam Hemelryk 5461c61f02 Merge branch 'wip-MDL-39942-MOODLE_25_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_25_STABLE 2014-02-04 08:29:09 +13:00
Eloy Lafuente (stronk7) ba971d4cca Merge branch 'm25_MDL-37714' of git://github.com/greg-or/moodle into MOODLE_25_STABLE 2014-02-03 17:58:49 +01:00
Marina Glancy ccb30e1f7b Merge branch 'MDL-41647_25' of git://github.com/apsdehal/moodle into MOODLE_25_STABLE 2014-02-03 17:35:17 +08:00
Dan Poltawski ec62826d8d MDL-42882 upgrade: improved SQL query
Kudos to Tim Hunt who came up with this, on mysql with 4 milion
records (and a fast SSD) the performance difference is:

Original: 36.83 sec
New query: 8.63 sec
2014-02-03 17:30:40 +08:00
Dan Poltawski 7ea6574332 MDL-42882 upgrade: unit tests for root folders upgrade
Just verifying the original behaviour
2014-02-03 17:30:39 +08:00
David Monllao 3a362028d8 MDL-43838 behat: Clean theme compatibility with small and medium screen sizes 2014-02-03 17:11:28 +08:00
Marina Glancy 1038bbb275 Merge branch 'MDL-43805-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2014-02-03 16:10:17 +08:00
Marina Glancy 8c3470e3ce Merge branch 'MDL-43440-25' of git://github.com/mr-russ/moodle into MOODLE_25_STABLE 2014-02-03 13:52:11 +08:00
apsdehal 416751f3c2 MDL-41646 Wiki: Removed unnecessary wiki_info class 2014-02-02 15:51:06 +05:30
apsdehal 72438fb70e MDL-41647 WebServices: Changed notification CSS class 2014-02-02 15:22:00 +05:30
Marina Glancy 992da86444 MDL-43828 forum: allow to select single available group when posting 2014-01-31 17:01:09 +08:00
Marina Glancy 8eb0c4d400 MDL-43821 completion: fix bug in section completion progress
Thanks to Shane Dye for the provided patch
2014-01-31 17:00:56 +08:00
Marina Glancy c8ced7721a MDL-41384 course: do not show debugging message if $COURSE contains format options
before showing debugging message make sure that field exists in database and not only in the object
2014-01-31 17:00:45 +08:00
Marina Glancy 570352c735 MDL-41384 upgrade: make sure to re-read $SITE from DB when course table is altered 2014-01-31 17:00:45 +08:00
Marina Glancy bc9f8dc94e MDL-33920 filepicker: hide 'save as' field when not applicable 2014-01-31 16:48:37 +08:00
Marina Glancy a7cae2648d weekly release 2.5.4+ 2014-01-31 14:11:16 +08:00
Marina Glancy c2a4d082a6 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-31 14:11:15 +08:00
Gregory Faller d291a6fddd MDL-37714: Correctly identify frequently used comments during restore 2014-01-31 10:21:49 +10:30
Damyon Wiese a502377bac MDL-43805 assign: Behat test for quickgrading bug 2014-01-29 20:42:21 +08:00
Damyon Wiese b1e2f79ff6 MDL-43805 assign: Quickgrading wipes out grades for hidden columns.
Grr.. quickgrading will always be a hack.

Conflicts:
	mod/assign/locallib.php
2014-01-29 20:42:16 +08:00
Andrew Nicols 2f2ccf4b81 MDL-43885 Javascript: Make the [X] button work like 'No' in relevant dialogues
The [X] button on the dialogue is another form of the 'No' button and
should behave as such. In some dialogues this matters more than others
because the dialogue is destroyed.
2014-01-29 11:20:31 +08:00
Tim Hunt 6062fc2a50 MDL-43892 dbtransfer: Fix missing string. 2014-01-28 15:57:10 +00:00
Ankit Agarwal d1458fc374 MDL-43884 database: Fix get_tables() api for external stores 2014-01-28 16:50:00 +08:00
Kevin Wiliarty 5fe7d182d8 MDL-39942: invite only users who can post to discuss 2014-01-27 22:40:26 -05:00
Eloy Lafuente (stronk7) 23cf5d3da2 Merge branch 'm25_MDL-43797' of https://github.com/totara/moodle into MOODLE_25_STABLE 2014-01-28 00:44:49 +01:00
David Curry 64e6f2348e MDL-43797 lib/db/upgrade.php: Optimise sql for my_pages deletion
Change-Id: I329ef400cf2e3da80450460901e28061b42b0fd4
2014-01-28 12:32:28 +13:00
Sam Hemelryk 9b14c62e98 Merge branch 'MDL-43246_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-28 12:16:23 +13:00
Eloy Lafuente (stronk7) 68fe9b045c Merge branch '43688-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-28 00:01:26 +01:00
Eloy Lafuente (stronk7) 2ee4c99575 Merge branch 'MDL-43874_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-27 23:53:40 +01:00
David Curry 0be6396993 MDL-43797 lib/db/upgrade.php: Remove custom pages for deleted users
Change-Id: I51f7d11abdf559944e18891703611dbd729cde64
2014-01-28 11:13:21 +13:00
David Curry daea5bfeca MDL-43797 lib/moodlelib.php: Remove custom homepages on user deletion
Change-Id: Ic4cd220cb7a6694dc56625ded649cf5172e899a7
2014-01-28 11:07:38 +13:00
Eloy Lafuente (stronk7) e3870e29d8 Merge branch 'MDL-43757_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-27 21:11:23 +01:00
Eloy Lafuente (stronk7) 238e8a94f8 Merge branch 'wip-mdl-43766-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-01-27 19:20:52 +01:00
Eloy Lafuente (stronk7) 7e84ef177d Merge branch 'MDL-43773-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2014-01-27 17:23:32 +01:00
Eloy Lafuente (stronk7) 333751af3a Merge branch 'MDL-43581_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-27 17:04:47 +01:00
Tim Hunt 16fcc8807b MDL-43874 quiz, teacher comments should respect display options.
Whether the comments on manually graded questions were visible to
students should have been controlled by the 'Specific feedback' Review
option in the quiz settings. However, the quiz was not setting
$displayoptions->manualcomment, so it did not work.
2014-01-27 12:26:52 +00:00
Eloy Lafuente (stronk7) f6590d5dd3 Merge branch 'wip-MDL-43800-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-01-27 12:02:51 +01:00
Tim Hunt bcd1fba672 MDL-43581 additionalhtmlfooter should be added to every page
Not just pages with a visible footer.
2014-01-27 10:26:08 +00:00
Eloy Lafuente (stronk7) e373f3bd04 Merge branch 'MDL-43809_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-27 11:00:47 +01:00
AMOS bot 203d95dcbe Automatically generated installer lang files 2014-01-27 00:42:37 +00:00
Mark Nielsen dbabf975c5 MDL-43734: Prevent purging of all user session cache 2014-01-27 00:29:38 +01:00
Sam Hemelryk 6536f04a5e Merge branch 'w04_MDL-43746_m25_courselogin' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-01-27 11:32:20 +13:00
Tony Butler dcab3e1a26 MDL-43773 mod_choice: Swap order of name column headings in text export 2014-01-24 11:21:09 +00:00
David Monllao fa6a33af90 MDL-43757 behat: Allowing the form field guesser to detect TinyMCE
It includes 2 more minor fixes:
- Escapes values sent to TinyMCE as it was breaking
  when values contained double quotes.
- Adding seconds to the screenshots directory to
  avoid using the same folder for multiple runs.
2014-01-24 15:19:31 +08:00
David Monllao e456f9d65d MDL-43757 messaging: Behat feature to test participants messaging
The new test checks that messages can be sent from
the participants block and they can be read when
accesing user's recent conversations.
2014-01-24 15:14:43 +08:00
Petr Skoda 5dd9d46895 MDL-43746 fix require_course_login regression caused by MDL-25981 2014-01-24 13:52:25 +08:00
Russell Smith 03efa67f50 MDL-43440 unit testing: Use cmid in unit tests when it should be used.
instance is has been used instead of cmid.  This works as all id's are 1
in most cases, but not always.

accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.
2014-01-24 11:54:04 +11:00
Jason Fowler 2799d319e2 MDL-40786 User profile: Fixing narrow screen RTL collapse 2014-01-24 08:40:37 +08:00
Nadav Kavalerchik 7c683e50a3 MDL-40786 User Profile: Right align profile fields in RTL mode (theme/bootstrapbase, theme/clean) 2014-01-24 08:40:29 +08:00
Sam Hemelryk ce6dd3e690 MDL-43688 dndupload: fixed positioning across themes 2014-01-24 09:52:28 +13:00
Tim Hunt a541c63bb0 MDL-43809 qformat_xml messes up $s in multianswer questions. 2014-01-23 15:20:34 +00:00
Tim Hunt 6bce418d28 MDL-43246 question engine: avoid order-by id.
This was breaking with oracle master/master replication. Fortunately all
the places that needed to be changed were private to datalib.php. There
is still some ordering by id there, but only places where we want a
consitent, rather than meaningful, order, so that is OK.

The queries changed by this patch all have subqueries in aggregate
queries that pull out the latest step for a question_attempt. Those
queries used to look for MAX(id) but now they look for
MAX(sequencenumber). This is equivalent (for databases where ids always
increase with time, except for auto-saved steps. In the past,  an
auto-saved step might have been considered latest. Now the latest step
will always be one that has been properly processed. You can aruge that
this change is an improvement. Anyway, it is a moot point. All these
queries are only used in reports which are run on completed attempts,
where there will not be any autosaved data.
2014-01-23 15:20:15 +00:00
Tim Hunt 9378b7b48f MDL-43246 some question data mapper unit tests
With fixes for the issues unearthed by these tests.
2014-01-23 15:20:15 +00:00
Tim Hunt 99c639061e MDL-43246 give unit tests class a better name. 2014-01-23 15:20:14 +00:00
Eloy Lafuente (stronk7) 953239d6b5 weekly release 2.5.4+ 2014-01-23 12:38:34 +01:00
Eloy Lafuente (stronk7) cd3c9e492b Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-23 12:38:29 +01:00
Marina Glancy 10dd9c3ddf MDL-43800 course: groupings are sorted alphabetically 2014-01-23 09:54:18 +08:00
AMOS bot 9e896a0fe1 Automatically generated installer lang files 2014-01-22 00:55:30 +00:00
Dan Poltawski 5ac8f08a2d Merge branch 'MDL-41506-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 23:29:29 +08:00
Damyon Wiese 5c66818d77 Merge branch 'MDL-42104_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2014-01-21 16:40:43 +08:00
Frederic Massart ff87018312 MDL-41506 theme_bootstrapbase: Implement highlight class 2014-01-21 09:04:08 +01:00
Dan Poltawski 5f69d9c594 Merge branch 'mdl34020-moodle25' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2014-01-21 15:21:20 +08:00
Dan Poltawski 4bdaa6a78d Merge branch '43714-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-21 14:49:29 +08:00
Damyon Wiese 9102d4ef4e Merge branch 'MDL-43725-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2014-01-21 13:48:48 +08:00
Dan Poltawski 7bf3f870f5 Merge branch 'MDL-43693-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2014-01-21 11:21:56 +08:00
Damyon Wiese 021aa8c16c Merge branch 'MDL-41688-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 09:43:17 +08:00
Eloy Lafuente (stronk7) 38dc2cc5bd Merge branch 'MDL-43401-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-21 01:47:00 +01:00
Eloy Lafuente (stronk7) 1075da56e2 Merge branch 'MDL-43480_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-21 01:44:56 +01:00
Eloy Lafuente (stronk7) 3dfaeb413b Merge branch 'MDL-41693-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-21 01:14:01 +01:00
Eloy Lafuente (stronk7) 3dfb63df12 Merge branch 'MDL-39684-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:21:58 +01:00
Eloy Lafuente (stronk7) 9a0d6896d0 Merge branch 'MDL-40533-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-21 00:17:48 +01:00
Eloy Lafuente (stronk7) db8c137e35 Merge branch 'MDL-41362-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-21 00:03:03 +01:00
Eloy Lafuente (stronk7) 2ad45eaf53 Merge branch 'MDL-41484-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 23:43:05 +01:00
Frederic Massart 815d252a39 MDL-41688 gradebook: Improved grading layout on bootstrapbase themes 2014-01-20 16:41:11 +01:00
Frederic Massart 90cddc9e6e MDL-41767 themes: Support for parent-specific sheets in plugins 2014-01-20 13:31:13 +01:00
Tony Butler 2e7b157bb8 MDL-43632 mod_feedback: Use SSL for reCAPTCHA API request if Moodle is using it 2014-01-20 17:13:57 +08:00
Rajesh Taneja 079fcddc29 MDL-43766 reports: Fixed wrong string variable 2014-01-20 16:48:05 +08:00
Dan Poltawski 785e7d36a7 Merge branch 'wip-MDL-41062-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2014-01-20 15:29:23 +08:00
Dan Poltawski d85aad0a18 Merge branch '42682-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 15:26:43 +08:00
Dan Poltawski 1b87b7232e Merge branch 'MDL-43690_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-20 14:24:41 +08:00
Michael Aherne 386cd5a24c MDL-42495 lesson Prevent coding error for invalid user 2014-01-20 13:22:14 +08:00
Dan Poltawski be34306a60 Merge branch 'MDL-42980_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 12:56:23 +08:00
Marina Glancy 5d01385163 MDL-41062 gradebook: corrections to grade_item upgrade script, more tests 2014-01-20 12:24:51 +08:00
Damyon Wiese f93f62ae7b Merge branch 'MDL-39683-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 11:05:21 +08:00
Damyon Wiese 1687d46223 Merge branch '43675-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-20 10:58:14 +08:00
Dan Poltawski 4abee6b225 Merge branch 'MDL-43671_message_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-20 10:53:51 +08:00
Dan Poltawski 44e7dfe7a0 Merge branch 'MDL-40139-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-20 10:33:39 +08:00
Ankit Agarwal 9702075c4d MDL-43725 report_loglive: Fixing undefined variable error
AMOS BEGIN
 CPY [page,report_log],[page,report_loglive]
AMOS END
2014-01-20 10:24:57 +08:00
Damyon Wiese 0be26df8b1 Merge branch 'MDL-43733_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-20 10:15:24 +08:00
Andrew Davis 71c3354bed MDL-43671 message: removed an overly cautious check 2014-01-20 10:06:34 +08:00
Dan Poltawski c0486e9b91 Merge branch 'wip-mdl-43306-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2014-01-20 09:45:48 +08:00
Dan Poltawski a0147ffa28 Merge branch 'MDL-40752-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-20 09:26:22 +08:00
AMOS bot 5622004442 Automatically generated installer lang files 2014-01-20 00:41:23 +00:00
AMOS bot 8047250587 Automatically generated installer lang files 2014-01-19 00:41:57 +00:00
Tim Hunt f2f129828c MDL-43733 use any auto-saved responses when questions are finished.
Before this, autosave was only working to save data when a student went
back in to continue an attempt. If the student, having crashed out,
never went back in and continued the attempt, their auto-saved responses
were not used when the attempt was automatically finished. That was a
rather bad oversight, which should now be fixed.
2014-01-17 17:17:52 +00:00
Tim Hunt 5da73345fd MDL-43690 quiz_question_tostring missing s().
This meant that the edit quiz page sometimes had invalid HTML.
2014-01-17 10:46:56 +00:00
Dan Poltawski 4468527db9 MDL-41062 gradebook: remove sortorder duplicates
* Upgrade function to remove duplicates from the grade item duplicates
  column. Duplicates were causing sorting to fail in some cases.
* Add some unit tests which simulate sort order duplicate data and
  verify that they have been removed.
2014-01-17 17:34:50 +08:00
rwijaya 419cb8e5e9 MDL-42104: trap tab focus within dialog modal,
in filepicker and filemanager
2014-01-17 16:53:22 +08:00
rwijaya ec05636a3c MDL-42980 clean theme: fixed add/cancel buttons position for safari on iPhone with ios7. 2014-01-17 15:58:49 +08:00
David Monllao 54ecdf3f24 MDL-43480 behat: Adding @_file_upload and @_alert tags
Keeping the previous @_only_local and @_alerts as
this is a stable branch.
2014-01-17 10:42:57 +08:00
David Monllao 00695acc5b MDL-43480 behat: Removing @_only_local tags from steps where it is not necessary 2014-01-17 10:42:56 +08:00
AMOS bot 553746bbff Automatically generated installer lang files 2014-01-17 00:48:08 +00:00
Sam Hemelryk 70c46470fe MDL-43714 blocks: fixed notice when moving to an empty region 2014-01-17 10:46:47 +13:00
Sam Hemelryk ff0205018e MDL-43675 navigation: courses branch is now recognised as expandable 2014-01-17 10:26:53 +13:00
Sam Hemelryk 2d29c7d10f MDL-42682 theme_bootstrapbase: fixed styling of discussion selector 2014-01-17 10:25:02 +13:00
Sam Hemelryk dce9475071 MDL-42682 theme_bootstrapbase: fixed forum search alignment
Conflicts:
	theme/bootstrapbase/less/moodle/modules.less
	theme/bootstrapbase/style/moodle.css
2014-01-17 10:24:56 +13:00
Sam Hemelryk 5712b4ed8b MDL-41505 theme_bootstrapbase: section actions now visible again 2014-01-17 10:24:39 +13:00
Eloy Lafuente (stronk7) 6370d316fd weekly release 2.5.4+ 2014-01-16 18:51:08 +01:00
Eloy Lafuente (stronk7) 2e3aa01daa Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-16 18:51:04 +01:00
AMOS bot dddc19a3ef Automatically generated installer lang files 2014-01-16 00:43:18 +00:00
Eloy Lafuente (stronk7) cc3bfdc006 Merge branch 'm25_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-01-15 22:02:54 +01:00
Dan Marsden d677215cf4 MDL-43222 SCORM: Fix invalid sql 2014-01-16 09:49:59 +13:00
Rajesh Taneja 91c1b542e7 MDL-43306 restore: Fix grade_item sortorder after restoring course
While restoring course/activity, restore will blindly insert grade_item
sortorder. Which cause dulicate sortorder and lead to unpredicatble sorting
results.

Now we will call grade_item::fix_duplicate_sortorder() after restore is finished
to fix duplicate sortorder and order grade items to the closest order possible
2014-01-15 13:33:39 +08:00
Damyon Wiese e1dd20b34e Merge branch 'MDL-43621_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2014-01-15 13:27:30 +08:00
Yuliya Bozhko ed60873986 MDL-43621 badges: Fix has_awards() result when deleted users are the only recipients of a badge 2014-01-15 16:17:17 +13:00
Damyon Wiese 788e545b4d Merge branch 'MDL-43461_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-15 09:38:02 +08:00
Dan Poltawski 4703d6ba20 Merge branch 'MDL-43619-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2014-01-15 08:20:39 +08:00
Yuliya Bozhko f8f860fd22 MDL-43621 badges: Don't count deleted users as badge recipients 2014-01-15 10:07:51 +13:00
Yuliya Bozhko 5e35e9fe87 MDL-43621 badges: Don't display deleted users in badge recipients list 2014-01-15 10:05:02 +13:00
Frederic Massart 1ce3b04c39 MDL-40533 block_html: Remove styles specific to the block 2014-01-14 19:09:45 +01:00
Eloy Lafuente (stronk7) a89836aa27 Merge branch 'wip-MDL-31597-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2014-01-14 19:08:02 +01:00
Ruslan Kabalin c86faa37b0 MDL-43693: assignment: Fix JS error on grading page. 2014-01-14 16:12:00 +00:00
Eloy Lafuente (stronk7) 5d394d10a3 Merge branch 'MDL-43332_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2014-01-14 16:57:13 +01:00
Frederic Massart 0ecb19e209 MDL-41484 theme_bootstrabase: Alignment of labels on smaller screens 2014-01-14 16:50:00 +01:00
Eloy Lafuente (stronk7) 712cb8569e Merge branch 'm25_MDL-43222' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-01-14 16:45:53 +01:00
sam marshall 07ba3c2c6b MDL-43619 Roles: reset_role_capabilities unit test, cache fix 2014-01-14 13:54:37 +00:00
sam marshall 1daa40be7f MDL-43619 Roles: Reset role destroys all overrides 2014-01-14 13:54:23 +00:00
Dan Poltawski e2565b23b7 Merge branch 'm25_MDL-43577_Incorrect_Variable_Expansion' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-14 15:58:14 +08:00
Dan Poltawski 155c7dfd13 Merge branch 'MDL-43642_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-14 15:48:53 +08:00
Dan Poltawski 3717140752 Merge branch 'm25_MDL-43575_Typo_In_The_Overridden_setOption' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-14 15:37:01 +08:00
Petr Škoda 87b2e5e162 MDL-43511 do not cache the MUC cache in question code 2014-01-14 14:31:25 +08:00
Damyon Wiese a27a965a52 Merge branch 'MDL-43371-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-14 14:03:32 +08:00
Damyon Wiese 952f0a1620 Merge branch 'MDL-43460-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-14 13:34:33 +08:00
David Monllao 7a9abcb675 MDL-43461 testing: Avoid switching to .bat files when running MinGW
MinGW can not execute .bat files (http://sourceforge.net/p/mingw/bugs/1902)
so we should not switch to .bat files when running MinGW.
2014-01-14 13:15:46 +08:00
David Monllao c97c55a9b7 MDL-43461 behat: Using linux-style directory separators when using cygwin 2014-01-14 13:15:46 +08:00
Damyon Wiese 88bad1ec38 Merge branch 'MDL-43610-m25' of git://github.com/micaherne/moodle into MOODLE_25_STABLE 2014-01-14 12:02:50 +08:00
Adrian Greeve 892d952cb9 MDL-31597 gradebook: Update to gradebook behat tests to include testing grade weightings. 2014-01-14 11:56:29 +08:00
Adrian Greeve 31bf4ef646 MDL-31597 gradebook: Removed the percentage symbol from weights in the gradebook. 2014-01-14 11:56:18 +08:00
Dan Poltawski 3f1b2de488 Merge branch 'm25_MDL-42792' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2014-01-14 11:28:46 +08:00
Dan Poltawski 6462a6308b Merge branch 'MDL-43412_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-14 10:46:36 +08:00
Nadav Kavalerchik dc12df4802 MDL-40752 Login RTL: Swapping the panels on two-panel login pages for RTL
Additional changes added by Jason Fowler <phalacee@gmail.com>
2014-01-14 09:26:21 +08:00
AMOS bot f8570b3824 Automatically generated installer lang files 2014-01-14 00:45:39 +00:00
Mark Nelson 0343f4081b MDL-43332 core_grades: automated basic grade viewing functionality performed in MDLQA-317 2014-01-13 15:48:06 -08:00
Eloy Lafuente (stronk7) 5af2e8c082 Merge branch 'MDL-43109_25' of https://github.com/mdikih/moodle into MOODLE_25_STABLE 2014-01-13 21:55:18 +01:00
Matteo Scaramuccia a58ba59c71 MDL-43575 Libraries Google_CurlIO ext, typo in the overridden setOption(). 2014-01-13 21:39:32 +01:00
Matteo Scaramuccia 412e724830 MDL-43577 Messages Incorrect variable expansion in the message template. 2014-01-13 21:15:55 +01:00
Frederic Massart 4025ac2181 MDL-41362 theme_bootstrapbase: Alignment of User Selector controls 2014-01-13 18:41:00 +01:00
Frederic Massart 5b5ee3320a MDL-39684 theme: RTL align of restrictions label in file manager 2014-01-13 16:33:59 +01:00
Frederic Massart 6023d8e8d0 MDL-39683 message: RTL alignment of messages in theme_base 2014-01-13 15:44:09 +01:00
Nadav Kavalerchik 6e6af85069 MDL-39683 Messages, Themes: Fix "my" and "other person" message alignment in RTL mode (theme/clean) 2014-01-13 15:27:31 +01:00
Dan Poltawski 3c1c78cef2 Merge branch 'MDL-40849-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-13 15:50:48 +08:00
Frederic Massart e7d960cfee MDL-40849 gradingform_guide: Fixed CSS issues with Bootstrapbase 2014-01-13 08:13:15 +01:00
Dan Poltawski 6584492f07 Merge branch 'MDL-39603-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 12:35:04 +08:00
Dan Poltawski 6fb9497847 Merge branch '41226-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 11:12:06 +08:00
Dan Poltawski 36785d10de Merge branch '40821-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-13 11:03:39 +08:00
Dan Poltawski 9a443297f7 Merge branch '40693-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-13 10:07:56 +08:00
Dan Poltawski ac76e9b797 Merge branch 'MDL-41152-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-13 10:03:16 +08:00
Sam Hemelryk 53f2e7a5c8 MDL-40205 theme: fixed overflow of block headers
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:41:40 +08:00
Dan Poltawski 0dc14c0b56 Merge branch 'MDL-40705-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 09:36:35 +08:00
Dan Poltawski 60a188b9f3 Merge branch 'MDL-39661-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-13 08:54:26 +08:00
Sam Hemelryk 38ffecf198 MDL-40821 theme_bootstrapbase: fixed positioning of profile controls
Conflicts:
	theme/bootstrapbase/style/moodle.css

Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-01-13 08:17:09 +13:00
Sam Hemelryk 897b178feb MDL-40821 theme_bootstrapbase: show the current lang in the menu 2014-01-13 08:15:59 +13:00
Sam Hemelryk 0cdd23121b MDL-40693 theme_bootstrapbase: changed navbar separator to official separator 2014-01-13 08:15:34 +13:00
Eloy Lafuente (stronk7) 686364d1a9 Moodle release 2.5.4 2014-01-11 15:57:26 +01:00
Eloy Lafuente (stronk7) 612ca7327d MDL-43590 Revert to previous version
There was no unapproval in 25_STABLE, hence the
capability cannot include that concept.
2014-01-10 18:58:23 +01:00
Michael Aherne 756011e478 MDL-46310 assign Prevent blind marking submission notification email being sent to noreplyemail address 2014-01-10 16:01:31 +00:00
Frederic Massart 7680547727 MDL-40139 block_privatefiles: Prevent usage of unmaintained edit page 2014-01-10 13:01:24 +01:00
Frederic Massart e1bece2b7b MDL-41693 group: Use standard layout for group related pages 2014-01-10 12:29:11 +01:00
David Monllao 1be87968a2 MDL-43642 behat: Setting the correct files @package 2014-01-10 17:48:40 +08:00
Eloy Lafuente (stronk7) 77f8d8142f Merge branch 'MDL-43590-en_fix_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2014-01-10 10:10:37 +01:00
Dan Marsden 69f07dc3aa MDL-43222 SCORM: correct check for list of attempts and make correct check for current attempt in scorm_get_toc 2014-01-10 22:05:20 +13:00
Dan Marsden c93e9bcdc2 MDL-42792 SCORM: Prevent JS error when network connection fails. - return false to SCORM package so that issue can be detected and reported. 2014-01-10 21:07:11 +13:00
Damyon Wiese 7f82be199e weekly release 2.5.3+ 2014-01-10 14:20:18 +08:00
Damyon Wiese 4fc8754588 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2014-01-10 14:20:14 +08:00
Eloy Lafuente (stronk7) 030c6d49da MDL-36721 make upgrade queries cross-db 2014-01-10 11:21:24 +08:00
Frederic Massart b7831c1f80 MDL-43401 mod_lesson: Fix serving of the pluginfile mediafile 2014-01-09 16:55:32 +01:00
Frederic Massart 40f8aece87 MDL-43371 mod_lesson: Remove files upon page or module deletion 2014-01-09 16:22:30 +01:00
Frederic Massart 11fd45b383 MDL-41152 theme_bootstrapbase: Optimise width for gradebook tree view 2014-01-09 10:42:17 +01:00
AMOS bot 3a5af40f91 Automatically generated installer lang files 2014-01-09 00:42:14 +00:00
Helen Foster 258ee617ee MDL-43590 Merge English strings from the en_fix language pack 2014-01-09 01:15:21 +01:00
Tim Hunt 4d74202460 MDL-43412 quiz with grade period and password did not work.
Once the attempt became overdue, it was impossible to get in to submit
it because of a redirect loop. This fix resovles that loop, so the
student can enter their password and get in.
2014-01-08 17:57:39 +00:00
Andrew Nicols fe20e33cb6 MDL-40119 Forms: Remove cursor style override for calendar button 2014-01-08 11:14:55 +01:00
Frederic Massart 4d270650f4 MDL-39603 theme_bootstrapbase: Alignment of filter form elements on enrol page 2014-01-08 10:42:57 +01:00
Eloy Lafuente (stronk7) ccd01c08f4 Merge branch 'MDL-40119-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-08 02:18:21 +01:00
Eloy Lafuente (stronk7) 51add5708c Merge branch 'w01_MDL-42797_m25_admin' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-01-08 02:11:13 +01:00
Eloy Lafuente (stronk7) 6cb311f306 Merge branch 'MDL-43423_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2014-01-08 02:03:16 +01:00
Eloy Lafuente (stronk7) f9e99683f7 Merge branch 'wip-MDL-42310-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2014-01-08 01:52:48 +01:00
Eloy Lafuente (stronk7) cedb3f6428 Merge branch 'm25_MDL-43508_Invalid_String_Identifier' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-08 00:46:20 +01:00
Eloy Lafuente (stronk7) dcc69ec040 Merge branch 'MDL-42607_rss_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-08 00:42:52 +01:00
Eloy Lafuente (stronk7) d88a963883 Merge branch 'MDL-42392-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-08 00:34:01 +01:00
Dan Poltawski 73a17686b7 Merge branch 'm25_MDL-43482_Lot_Of_Passed_By_Reference_Messages' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-07 17:20:51 +08:00
Damyon Wiese dd7f25835e Merge branch 'MDL-43411-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-07 12:52:26 +08:00
Dan Poltawski b232a25269 Merge branch 'm25_MDL-40379_Prevent_Some_Mobile_Network_Providers_From_Modifying_Content' of https://github.com/scara/moodle into MOODLE_25_STABLE 2014-01-07 12:43:32 +08:00
Dan Poltawski 16c17a36c5 Merge branch 'MDL-42995-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-07 11:51:23 +08:00
Rajesh Taneja 87d8b94aa7 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:34 +08:00
Dan Poltawski 7023778c66 Merge branch 'MDL-43394a-25' of https://github.com/srynot4sale/moodle into MOODLE_25_STABLE 2014-01-07 11:00:14 +08:00
Tony Butler 87f2d79a08 MDL-43373 core_enrol: Display enrolments dimmed if outside of start or end times 2014-01-07 10:44:34 +08:00
Damyon Wiese 5ca04a7039 Merge branch 'MDL-43448_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2014-01-07 09:21:54 +08:00
Frederic Massart f69ee87411 MDL-40705 theme_bootstrapbase: Handling of long words in block content 2014-01-06 15:49:53 +01:00
Frederic Massart d9a7ada865 MDL-39661 blocks: Removed notice when moving a block 2014-01-06 12:44:37 +01:00
Frederic Massart 78942f349c MDL-43460 calendar: Decode event description links on restore 2014-01-06 11:46:35 +01:00
Frederic Massart d80472e336 MDL-42995 mod_assign: Extended tests for update_calendar method 2014-01-06 11:02:24 +01:00
Frederic Massart 80ecc2593b MDL-42995 mod_assign: Remove files from calendar event description 2014-01-06 11:02:24 +01:00
Frederic Massart d6f428b233 MDL-42995 libraries: Global function to strip pluginfile content 2014-01-06 11:02:19 +01:00
Damyon Wiese f81aec80ad Merge branch 'MDL-43399-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2014-01-06 16:14:41 +08:00
Damyon Wiese 331ecb86f9 Merge branch 'w01_MDL-36721_m25_passlog' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2014-01-06 14:50:39 +08:00
Dan Poltawski d71dd15415 Merge branch '43349-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2014-01-06 14:21:49 +08:00
Rajesh Taneja 4ba0924322 MDL-42883 Administration: Check sessionkey before taking action on user profile fields 2014-01-06 13:59:06 +08:00
Tony Butler df9f225353 MDL-43408 gradereport_grader: Display users with expired enrolments as inactive in grader report
Conflicts:
	grade/report/grader/lib.php
2014-01-06 10:38:27 +08:00
Sam Hemelryk ba5255f4f1 Merge branch 'MDL-35973_redirect_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-06 11:28:10 +13:00
Sam Hemelryk 8a89a476e7 Merge branch 'MDL-43281-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2014-01-06 11:21:42 +13:00
Sam Hemelryk bf78d33216 Merge branch 'MDL-37962_beep_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2014-01-06 11:17:58 +13:00
Sam Hemelryk 4c852874d1 Merge branch 'MDL-43530-25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2014-01-06 11:13:55 +13:00
Sam Hemelryk 871b85e8cf Merge branch 'MDL-42212-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2014-01-06 10:30:02 +13:00
Andrew Davis 30205b3e5a 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:15:28 +08:00
Russell Smith 2f86a952d7 MDL-43530 cache: Cache multiple different dirroots
In some clustered environments (Amazon OpsWorks) the deployment
folders on different nodes use different file paths.  As we cache
the realpath in the shared MUC, you don't always get the right answer.

We now cache each dirroot in it's own full path location to allow
each node to get the correct file locations for itself.
2014-01-03 14:59:11 +11:00
Michael Milette fd22071331 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:32:55 +08:00
Andrew Davis ed634db27e MDL-42607 mod_forum:fixed some inefficiencies in forum RSS generation 2014-01-02 10:51:07 +08:00
Petr Škoda 94ada50dd7 MDL-42797 require real user login on upgrade settings page 2014-01-02 09:18:00 +08:00
Sam Hemelryk 22cb8ba92c MDL-43349 cache: init now checks store requirements are met 2014-01-02 09:22:34 +13:00
Petr Škoda d1e6c50749 MDL-42797 require real user login on admin page 2014-01-01 15:20:10 +08:00
Andrew Nicols 0660624e26 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:23:41 +08:00
Andrew Nicols caccbdda8d 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 16:06:32 +08:00
AMOS bot ea3be3fd41 Automatically generated installer lang files 2013-12-30 00:43:24 +00:00
AMOS bot e71aa8a645 Automatically generated installer lang files 2013-12-29 00:43:26 +00:00
Matteo Scaramuccia 8ea95b35cb MDL-40379 Files Prevent mobile network providers from modifying content. 2013-12-28 14:05:07 +01:00
Matteo Scaramuccia 0ed3049d38 MDL-43508 Quiz Invalid get_string() identifier. 2013-12-28 11:30:55 +01:00
Andrew Nicols 798ca416a9 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:41:11 +08:00
Petr Škoda 7d238c6bc4 MDL-36721 do not store passwords in config logs 2013-12-27 11:23:43 +08:00
AMOS bot 4d6e381bf3 Automatically generated installer lang files 2013-12-25 00:42:51 +00:00
Matteo Scaramuccia bae0c56962 MDL-43482 Chat Lot of "Only variables should be passed by reference". 2013-12-24 11:08:13 +01:00
Sam Hemelryk e92da00284 weekly release 2.5.3+ 2013-12-24 17:17:43 +13:00
Sam Hemelryk 9caa330e56 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-24 17:17:40 +13:00
Sam Hemelryk 986e4f6720 Merge branch 'wip-MDL-41788_M25_3' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-12-24 12:51:50 +13:00
Sam Hemelryk 5d10a4c690 Merge branch 'MDL-41246-moodle25' of git://github.com/StudiUM/moodle into MOODLE_25_STABLE 2013-12-24 11:41:23 +13:00
Sam Hemelryk 1d5e5cc670 Merge branch 'MDL-43438-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-24 11:22:53 +13:00
Sam Hemelryk 77104a2bd2 Merge branch 'MDL-43250-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-12-24 10:51:00 +13:00
AMOS bot bb78109b45 Automatically generated installer lang files 2013-12-23 12:40:13 +00:00
AMOS bot 162d293a60 Automatically generated installer lang files 2013-12-23 12:26:28 +00:00
Aaron Barnes fc938d3c5e MDL-43394 behat: Fix checkbox action 2013-12-23 15:59:00 +13:00
Sam Hemelryk c7f13ceafc Merge branch 'MDL-35032-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-23 15:57:36 +13:00
Andrew Nicols 0a4dd3ab6b MDL-43411 JavaScript: Correct checks for section support to use helper function 2013-12-23 09:45:41 +08:00
Sam Hemelryk 7eba9ea899 Merge branch 'MDL-30195-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-23 14:35:16 +13:00
Sam Hemelryk 3aba4d0f12 Merge branch 'w52_MDL-43367_m25_contextpath' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-23 14:31:29 +13:00
Eloy Lafuente (stronk7) d4a8372892 Merge branch 'MDL-43318-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-12-23 00:51:09 +01:00
Sam Hemelryk d071a951e1 Merge branch 'MDL-34182-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-12-23 08:15:57 +13:00
Petr Škoda 37377fb146 MDL-43367 stop returning of bogus context children when path unknown
This also prevents deletion of system context.
2013-12-22 16:00:49 +08:00
Tim Hunt bc863a0a8f 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:48 +00:00
Damyon Wiese 1a993df1aa weekly release 2.5.3+ 2013-12-20 11:57:51 +08:00
Damyon Wiese fe17c7e8e6 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-20 11:57:38 +08:00
Damyon Wiese d8c28564ec MDL-43318 Assign: Fix bug when editing previous attempt feedback
Conflicts:

	mod/assign/renderable.php
2013-12-20 11:16:21 +08:00
Gareth J Barnard 82168ad20c MDL-41788 theme_bootstrapbase: Custom menus - sub-menus breaking. 2013-12-19 12:16:07 +00:00
David Monllao 2d3d456399 MDL-43404 behat: Fix add_scorm.feature regression
Also adding more compatibility with phantomjs tagging
features without @_switch_window and @_only_local.
2013-12-19 16:24:36 +08:00
Sam Hemelryk 3dc592815a Merge branch 'MDL-40750-25-fixup' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-19 17:01:04 +13:00
Eloy Lafuente (stronk7) 861c69d981 Revert "MDL-43306 restore: fix grade item sortorder restoration"
This reverts commit 32df282b1b.
2013-12-19 02:14:39 +01:00
AMOS bot 4602d0d2ab Automatically generated installer lang files 2013-12-19 00:44:16 +00:00
Sam Hemelryk 9f90cd7553 Merge branch 'MDL-43235_25-extrafix' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-19 09:22:41 +13:00
Jean-Philippe Gaudreau 990a792039 MDL-41246 cache: Fix PHP notice of non well formed numeric values for the memcache store 2013-12-18 08:53:18 -05:00
Frederic Massart a5565303f5 MDL-40750 course: Remove usage of selector :not() for IE8 2013-12-18 12:29:27 +01:00
Eloy Lafuente (stronk7) 404b3d2654 Merge branch 'MDL-43404_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-18 12:09:20 +01:00
Frederic Massart fc21d5879c MDL-43438 mod_assignment: Prevent double inclusion of plugin files 2013-12-18 09:17:26 +01:00
David Monllao 49b5a38265 MDL-43235 behat: Remove notice about undeclared var 2013-12-18 16:04:09 +08:00
Dan Poltawski 740981c93f Merge branch 'MDL-41198-25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-12-18 15:00:01 +08:00
David Monllao cd898cebf5 MDL-43404 behat: Form change checker disabled when running behat 2013-12-18 14:20:54 +08:00
David Monllao 01b9236a50 MDL-43404 behat: Removing auto accept_alert 2013-12-18 14:20:48 +08:00
Russell Smith 3da65e9373 MDL-41198 lib: Add comment about the changes to srand on adodb 2013-12-18 16:58:00 +11:00
Russell Smith 02ea7c378c MDL-41198 lib: Allow PHP to generate random seed on script start
Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.

Conflicts:

	lib/tests/accesslib_test.php
2013-12-18 16:56:50 +11:00
Russell Smith e6af311972 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:54:04 +11:00
Sam Hemelryk 66de9b8f9c Revert "MDL-42104: trap tab focus within dialog modal,"
This reverts commit 3a0be85aeb.
2013-12-18 15:53:49 +13:00
Russell Smith ddc0064a52 MDL-41292 cache: only update identifiers if they change 2013-12-18 02:23:46 +01:00
rwijaya 3a0be85aeb MDL-42104: trap tab focus within dialog modal,
for filepicker and filemanager

Conflicts:
	lib/form/filemanager.js
2013-12-18 13:32:30 +13:00
Sam Hemelryk f6c3162520 Merge branch 'MDL-43235_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-18 11:19:19 +13:00
Sam Hemelryk 2f73b98955 Merge branch 'MDL-43355_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-18 10:45:13 +13:00
Sam Hemelryk 8a0ba53b9c Merge branch 'MDL-38698-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-18 09:21:21 +13:00
Sam Hemelryk 32196e43ca Merge branch 'MDL-40750-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-18 09:18:32 +13:00
David Monllao a0735059b5 MDL-43423 behat: Running hooks before and after each step of a chained step 2013-12-17 18:15:18 +08:00
Eloy Lafuente (stronk7) 1b646dc362 Merge branch 'MDL-43306-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-12-17 10:29:42 +01:00
Frederic Massart 9a8f3078f7 MDL-38698 filter_urltolink: Remove performance test in Unit Test 2013-12-17 07:05:29 +01:00
Frederic Massart f8fc65dae8 MDL-38698 filter_urltolink: Do not link the URL property of CSS 2013-12-17 07:05:29 +01:00
Marina Glancy f989165cb8 Merge branch 'MDL-37679-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 16:44:27 +11:00
Frederic Massart 46ea75aca3 MDL-40750 course: Add JS category expander (backport of MDL-38661)
This includes the following commits:

 * dd834cb MDL-38661 JavaScript: Add missing lazy loading on collapseall
 * 4dab1c3 MDL-38661 JavaScript: Ensure that ARIA tags are set when expanding/collapsing content
 * 1574e65 MDL-38661: Add keyboard support for expansion
 * 3df632f MDL-38661 Add pointer cursor to clickable collapse/expand icons
 * 53c1b93 MDL-38661 Course: Add JS category expander.
2013-12-17 06:39:36 +01:00
Mark Nielsen e345a21c96 MDL-37679 Course: Adding section to page title on section only pages 2013-12-17 11:43:13 +08:00
Marina Glancy 61f6209afa Merge branch 'MDL-41075-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-12-17 11:24:25 +11:00
Russell Smith ed8ee21d25 MDL-39725 database: Apply database statistics update to daily stats 2013-12-17 10:28:59 +13:00
Russell Smith 395d08ea72 MDL-39725 database: Include stats collections in unit tests
Conflicts:
	lib/ddl/tests/ddl_test.php
2013-12-17 10:28:54 +13:00
Russell Smith f015f73397 MDL-39725 database: Add statistics collection functions
Conflicts:
	lib/dml/moodle_database.php
2013-12-17 10:27:54 +13:00
Sam Hemelryk 2a3ce2b33d Merge branch 'MDL-25473-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 08:53:57 +13:00
Sam Hemelryk 474a218fc8 Merge branch 'MDL-34321-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 08:47:37 +13:00
Sam Hemelryk 8e4e9d8d67 Merge branch 'MDL-36984-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-17 08:44:42 +13:00
Frederic Massart 7e5fb1404b MDL-30195 portfolio_googledocs: Allow export of rich HTML 2013-12-16 11:06:31 +01:00
Jerome Mouneyrac 7da2b5e231 MDL-43399 Badge: the Choose... option can still be selected once a role is choosen. 2013-12-16 14:34:00 +08:00
Frederic Massart 275ce15b5d MDL-42212 mod_lesson: Localise area names 2013-12-16 06:50:31 +01:00
Frederic Massart c447a4454a MDL-42212 mod_lesson: Fix callbacks retrieving activity files 2013-12-16 06:50:31 +01:00
Jerome Mouneyrac 97410938ce MDL-41075 Remove "Choose..." option from participants page. 2013-12-16 12:08:49 +08:00
Damyon Wiese 8762a70f5d 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:51:55 +08:00
Sam Hemelryk 0c41eeda3a Merge branch 'wip-mdl-21180-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-12-16 15:43:23 +13:00
Rajesh Taneja 78835c1a6c MDL-21180 Gradebook: Consistent handling of change in aggregation
Change from/to GRADE_AGGREGATE_WEIGHTED_MEAN and GRADE_AGGREGATE_EXTRACREDIT_MEAN was only
handled prior to this patch. GRADE_AGGREGATE_SUM and GRADE_AGGREGATE_WEIGHTED_MEAN2 also
behave similar and should be handled same way
2013-12-16 09:59:28 +08:00
Andrew Davis b0edefb8e5 MDL-43188 core_message:reimplemented the beep on new message functionality from 1.9 2013-12-16 09:28:55 +08:00
Marina Glancy 0ce9ea0df0 Merge branch 'MDL-37972-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-12-16 12:28:55 +11:00
Sam Hemelryk 92d66ed0be Merge branch 'wip-MDL-43348_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-12-16 14:09:32 +13:00
Sam Hemelryk 1ebfb4a6c6 Merge branch 'MDL-40096-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-12-16 13:51:53 +13:00
Sam Hemelryk 960edf3828 Merge branch 'MDL-40436-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-16 11:31:02 +13:00
Sam Hemelryk 7827adcf28 Merge branch 'w51_MDL-42931_m25_env27' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-16 11:17:33 +13:00
Sam Hemelryk 13ab45efe4 Merge branch 'MDL-42085-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-12-16 11:11:18 +13:00
James Pratt 7cd9c85868 MDL-43369 : quiz statistics - average across attempts
where item seen and not across all attempts for subqs.
2013-12-13 17:45:45 +07:00
Frederic Massart 20bfdb97d7 MDL-35032 mod_book: 1.9 backup restore convertis files to book area 2013-12-13 10:26:46 +01:00
David Monllao 381007fb2a MDL-43235 behat: Ensure that behat_config_manager::get_config_file_contents() has always a behat_wwwroot 2013-12-13 14:54:55 +08:00
Andrew Nicols f82f12e83e MDL-34182 Repositories: Check for and warn on invalid output in the file picker 2013-12-13 14:25:19 +08:00
Andrew Nicols 84008f4a33 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:25:19 +08:00
Petr Škoda 7a07a6ad1e MDL-42931 set new requirements for 2.7 2013-12-13 14:07:34 +08:00
Sam Hemelryk 8e92813abe weekly release 2.5.3+ 2013-12-13 16:59:26 +13:00
Sam Hemelryk 90dec729a5 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-13 16:59:23 +13:00
AMOS bot dc5cd8c5a9 Automatically generated installer lang files 2013-12-13 00:42:14 +00:00
Gareth J Barnard 687fad1ab9 MDL-43348 theme: html <nav> element on the wrong content. 2013-12-12 16:24:25 +00:00
David Monllao 9826b73dfc MDL-43355 testing: Return the hash when HEAD points to a hash 2013-12-12 17:41:11 +08:00
Frederic Massart 2f02e550d3 MDL-40436 block_course_list: Fix bad context resolution
We were trying to get the course context of a remote course
from a completely unrelated ID. It would sometimes work if the
ID was matching the one of a local course. In other places
we are not trying to find a context for the remote course, we
simply use the $PAGE context in format_string. So the usage
of the context has been removed here too.
2013-12-12 09:09:57 +01:00
Jerome Mouneyrac b48bc91044 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:51 +08:00
Jason Fowler 60bf905b94 MDL-36984 Assign: Add redirect after saving grades 2013-12-12 14:19:51 +08:00
Marina Glancy a2712209f9 Merge branch 'mucupdates25' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-12 15:40:22 +11:00
Petr Škoda 137570614b MDL-42973 fix MUC caching issue when fetching available updates 2013-12-12 11:47:46 +08:00
Jason Fowler 12a11dd2b4 MDL-34321 Assignment2.2 - Fixing submission count 2013-12-12 10:36:07 +08:00
Eloy Lafuente (stronk7) d05e2ff9e6 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:17:26 +01:00
Eloy Lafuente (stronk7) 47c14f40b7 Merge branch 'w50_MDL-31410_m25_paypalipn' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-12 01:17:39 +01:00
Marina Glancy 82b0059468 MDL-43218 blog: prepare the blog navigation only when needed 2013-12-11 15:37:48 +13:00
Simon Coggins d7c163f70b MDL-43218 navigation: Remove link to blogs when they are disabled 2013-12-11 15:37:44 +13:00
Marina Glancy 81ea8ce8b9 Merge branch 'MDL-43071-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2013-12-11 12:47:29 +11:00
Marina Glancy e6a3977d3e Merge branch 'MDL-43258' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-12-11 11:48:31 +11:00
Mary Evans e6294b4877 MDL-43258 theme_bootstrapbase: Style coursebox info name better in Bootstrap themes. 2013-12-11 00:25:29 +00:00
Sam Hemelryk a458eacede Merge branch 'MDL-43252-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-12-11 11:03:14 +13:00
Sam Hemelryk 0dc8e80097 Merge branch 'wip-MDL-43279-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-11 10:58:31 +13:00
Eloy Lafuente (stronk7) 175b9dcfff Merge branch '25STABLE-wip-MDL-43135' of https://github.com/jennymgray/moodle into MOODLE_25_STABLE 2013-12-10 19:46:59 +01:00
Jenny Gray af84623f44 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:17:09 +00:00
Sam Chaffee 46a9498f62 MDL-37972 Assignment: fixing settings link for upload single submissions 2013-12-10 14:09:13 +08:00
Dan Poltawski 32df282b1b MDL-43306 restore: fix grade item sortorder restoration
Previously, restore was blindly inserting the old sort order into the
database, causing duplicate sortorders which lead to unpredicatble
sorting results.

Now we will use the api function to add it after the original sortorder,
this means if a duplicate exists in the original location, this item
will appear after it.
2013-12-10 12:33:30 +08:00
Michael Dikih 23353087ca MDL-43109: mod/wiki - When editing pages populate the default value for the tags input. 2013-12-10 14:19:17 +10:30
Marina Glancy 36d93b57e7 Merge branch 'm25_MDL-43082_IE9_Compat_View_SVG_Say_No' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-12-10 14:47:20 +11:00
Marina Glancy 930acdb3e9 Merge branch 'MDL-43131_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-10 14:13:09 +11:00
Marina Glancy 78392c426e Merge branch 'mdl42487-moodle25' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2013-12-10 13:57:39 +11:00
Jason Fowler 91f6bf0977 MDL-25473 mediaplayer - prevent embedded videos from looping 2013-12-10 10:43:58 +08:00
Marina Glancy 8805a8017b MDL-43279 block_blog_recent: fixed undefined property notice 2013-12-10 09:30:10 +11:00
Sam Hemelryk 69a40654d8 Merge branch 'm25_MDL-43159_Wrong_Naming_Convention_For_Variable' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-12-10 09:20:17 +13:00
Sam Hemelryk 0da3aac317 Merge branch 'MDL-43194-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-12-10 08:47:46 +13:00
Sam Hemelryk aa1549681a Merge branch 'MDL-43152-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-12-10 08:43:23 +13:00
Sam Hemelryk d12121f385 Merge branch 'm25_MDL-43019' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-12-10 08:28:56 +13:00
Eloy Lafuente (stronk7) 3efc95ed81 Merge branch 'MDL-40003-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-12-09 16:24:44 +01:00
sam marshall f00bc60e74 MDL-43252 Group menu in wrong order when groupings used 2013-12-09 13:04:25 +00:00
Sam Chaffee ae3cca4561 MDL-40003 mod_assign: Fixed submission comments not being restored 2013-12-09 11:04:24 +01:00
Marina Glancy 53ca1f85fd Merge branch 'w50_MDL-42973_m25_addonupd' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-09 18:29:08 +11:00
Damyon Wiese e135e187b4 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:38 +08:00
Marina Glancy af76b17662 Merge branch 'wip-MDL-40213_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-12-09 11:14:24 +11:00
Petr Škoda 70dbbf5763 MDL-31410 always send 200 in PayPal IPN response and hide all errors 2013-12-06 10:05:11 +08:00
Petr Škoda 8d6ea2a913 MDL-42973 fix multiple addon update issues 2013-12-06 09:38:50 +08:00
Andrew Nicols 88ec4afdb8 MDL-43152 JavaScript: Add update instructions for gallery-bootstrap 2013-12-06 09:20:38 +08:00
Andrew Nicols 3a46810152 MDL-43152 JavaScript: Fix linting issues with moodle-core-notification 2013-12-06 09:20:35 +08:00
Andrew Nicols 4294e95811 MDL-43152 JavaScript: Fix linting issues with moodle-block_navigation-navigation 2013-12-06 09:20:31 +08:00
Andrew Nicols 97828bead6 MDL-43152 JavaScript: Fix linting issues with moodle-theme_bootstrapbase 2013-12-06 09:20:24 +08:00
Andrew Nicols 12d52ecb3c MDL-43152 JavaScript: Fix linting issues with moodle-core-blocks 2013-12-06 09:20:18 +08:00
Matteo Scaramuccia 5a575d8487 MDL-43159 Libraries Wrong naming convention in $supports_json_contenttype. 2013-12-05 16:10:17 +01:00
Matteo Scaramuccia 4cd8dff321 MDL-43082 Themes IE 9 Compatibility View doesn't support SVG. 2013-12-05 15:59:09 +01:00
Tim Hunt da40d09a43 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:11:35 +00:00
Dan Poltawski cf0e9701af weekly release 2.5.3+ 2013-12-05 15:10:07 +08:00
Dan Poltawski b35bc421f2 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-12-05 15:10:04 +08:00
David Monllao 16236c6241 MDL-41592 behat: Setting a default value for CFG->behat_wwwroot in case it is empty 2013-12-05 17:06:26 +13:00
Dan Poltawski 6d8f88fb44 Merge branch 'MDL-43068_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-05 09:34:02 +08:00
Dan Marsden 421f2eca6e MDL-43019 SCORM: always use iframe instead of object - backported from 2.6 - fixes issue with IE 11 SCORM packages not loading 2013-12-05 13:16:29 +13:00
Frederic Massart e100c8137d MDL-43185 behat: Use realpath on existing paths 2013-12-05 08:18:17 +13:00
Tim Hunt 65c22578bf MDL-43068 course&gradebook: fix use of new API in old branches. 2013-12-04 15:34:31 +00:00
Gareth J Barnard 97108b8f9a MDL-40213 theme_clean: Layout "secure.php" missing settings. 2013-12-04 11:51:23 +00:00
Andrew Nicols 6fef66dfb7 MDL-43194 JavaScript: Correct maxlen jshint configuration 2013-12-04 16:40:33 +08:00
Dan Poltawski f1c88bc16c Merge branch 'wip-MDL-40191-2-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-04 15:44:14 +08:00
Marina Glancy 90e0c511b1 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:42 +11:00
Tim Lock 3e048cb036 MDL-34020: Further work on IMS package importing when using Blackboard packages 2013-12-04 15:18:28 +10:30
AMOS bot 127441b4c8 Automatically generated installer lang files 2013-12-04 00:43:15 +00:00
Eloy Lafuente (stronk7) f0b9fd3348 Merge branch 'MDL-41446-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-12-03 23:55:56 +01:00
Sam Hemelryk c7cde40bb5 Merge branch 'MDL-41592_25' of https://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-04 11:52:23 +13:00
Eloy Lafuente (stronk7) fd73fdaec0 Merge branch 'MDL-43142_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-12-03 23:41:34 +01:00
Eloy Lafuente (stronk7) 008b26a609 Merge branch 'MDL-43140_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-12-03 23:25:43 +01:00
Sam Hemelryk d653c838b0 Merge branch 'MDL-43093_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-04 10:11:51 +13:00
Eloy Lafuente (stronk7) e81cd4c375 Merge branch 'moodle25-mdl33971' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2013-12-03 17:18:26 +01:00
Eloy Lafuente (stronk7) b357a2a083 Merge branch 'MDL-43079-25' of https://github.com/jamiepratt/moodle into MOODLE_25_STABLE 2013-12-03 15:38:24 +01:00
Damyon Wiese 247901a4f7 Merge branch 'wip-MDL-42731-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-03 17:30:15 +08:00
Eloy Lafuente (stronk7) 35d2284423 Merge branch 'MDL-42885_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-12-03 10:02:00 +01:00
Damyon Wiese a87ae3371d Merge branch 'wip-MDL-43026-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-03 16:12:27 +08:00
Dan Poltawski 6fa2d2c2e1 Merge branch 'moodle25-mdl43020' of https://github.com/tlock/moodle into MOODLE_25_STABLE 2013-12-03 16:08:25 +08:00
Dan Poltawski 8708b9b3e2 Merge branch 'MDL-43066_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-12-03 12:36:56 +08:00
Damyon Wiese 73e2de1ff9 Merge branch 'wip-mdl-43048-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-12-03 11:44:09 +08:00
Damyon Wiese a296572f2c MDL-42904: Self enrol. Fix sloppy version numbers 2013-12-03 11:19:24 +08:00
Damyon Wiese 05d6010d2c Merge branch 'wip-mdl-42904-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-12-03 11:16:53 +08:00
Sam Hemelryk f591b27e11 Merge branch 'w48_MDL-41819_m25_maxinputvars' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-12-03 09:57:25 +13:00
Tim Hunt 237e532ee5 MDL-43093 update repeat_elements PHPdoc. 2013-12-02 17:48:18 +00:00
Damyon Wiese ccd4e10e00 Merge branch 'm25_MDL-43039_SessionDiskFull_False_Positive' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-12-02 14:36:33 +08:00
David Monllao 3efc96f546 MDL-41592 general: Also checking the site path 2013-12-02 14:20:04 +08:00
David Monllao f016ecaebf 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:20:04 +08:00
Aaron Barnes 2d68ba169d 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:20:04 +08:00
David Monllao f46d530abc MDL-43066 behat: Checking that the site is not already installed 2013-12-02 14:11:53 +08:00
Dan Poltawski 6dd2511d2f Merge branch 'wip-MDL-40191-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-12-02 11:19:47 +08:00
Dan Poltawski f683548a78 Merge branch 'MDL-43068_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-12-02 11:11:10 +08:00
AMOS bot eec4dbcf8c Automatically generated installer lang files 2013-12-02 00:42:56 +00:00
Petr Škoda 219fda2b67 MDL-41819 try to work around max_input_vars restriction 2013-12-02 08:30:15 +08:00
Marina Glancy b7f8a886f2 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:49:18 +11:00
David Mudrák 71adff6999 MDL-40191 MDLSITE-2455 Do not throw coding exception when the activity is not found
Under certain conditions, coding exception is thrown when fetching items from
the navigation bar. The patch prevents them. See more details in the tracker.
2013-12-02 10:49:17 +11:00
Marina Glancy c67553ef0b MDL-42731 block_activity_modules: add behat tests 2013-12-02 10:03:17 +11:00
Sam Hemelryk a0a05fa456 MDL-43033 cache: added stats logging to set_many methods 2013-12-02 09:29:38 +13:00
Sam Hemelryk c8e3e6f1f0 MDL-43033 cache: fixed display of definition stores in admin interface 2013-12-02 09:29:37 +13:00
Sam Hemelryk 5f70bde008 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:37 +13:00
Sam Hemelryk d9a72b3c05 MDL-43033 cache: fixed mode map event invalidation scenario 2013-12-02 09:29:37 +13:00
Sam Hemelryk ead81f3fd2 MDL-43033 cache: added stats logging to get_many methods 2013-12-02 09:29:37 +13:00
Matteo Scaramuccia 563557f21e MDL-43039 Libraries "The session partition is full." false positive. 2013-11-30 14:34:06 +01:00
Mark Nelson c90c329d57 MDL-43140 mnet: display header after redirects to avoid warning 2013-11-29 14:26:03 -08:00
Mark Nelson 6d5aa15b8d MDL-43142 mnet: fixed typo in variable passed to get_string 2013-11-29 14:15:30 -08:00
Dan Poltawski 3dc57a1203 weekly release 2.5.3+ 2013-11-29 12:52:50 +08:00
Dan Poltawski 2b18121895 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-29 12:52:47 +08:00
Tim Lock 5ba4c94328 MDL-42487: Forced userprofile dl style to be displayed: inline-block. 2013-11-29 09:29:23 +10:30
Tim Hunt 9c4dd6381f MDL-43068 course&gradebook: show/hide cm & CONTROLS_GRADE_VISIBILITY
Making a quiz visible on the course page, of via the settings form,
could cause the grade item to become visible in the gradebook, even
though the quiz supports FEATURE_CONTROLS_GRADE_VISIBILITY to ensure
that when the grades are hidden in the quiz settings, they do not appear
in the gradebook.

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

In addition, there was a bug when saving the quiz form, where it used
the value of $cm->visible from the database, which was wrong if the
value of cm->visible had just been changed on the setting form.
2013-11-28 10:03:49 +00:00
AMOS bot 25770d6ae4 Automatically generated installer lang files 2013-11-28 09:12:43 +00:00
James Pratt d8ca0c903c MDL-43079 quiz statistics : fix stats graph when all grades zero 2013-11-27 17:54:05 +07:00
Rajesh Taneja fcfb7ec498 MDL-43048 block_tags: Initalised content->text for tags block 2013-11-27 14:37:45 +08:00
Mark Nelson 44a9508cb9 MDL-42885 tool_uploaduser: removed misleading debugging message 2013-11-26 21:26:27 -08:00
Dan Poltawski f4ce42df46 MDL-42942 behat: increment version 2013-11-27 11:39:12 +08:00
Dan Poltawski 76c4158fa7 Merge branch 'MDL-42942_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-27 11:39:07 +08:00
AMOS bot 1f8c03b16e Automatically generated installer lang files 2013-11-27 00:48:25 +00:00
Tim Lock 1df90c1813 MDL-33971: When viewing course log entries for Quiz View Summary a number is displayed not the quiz name 2013-11-27 08:13:17 +10:30
Tim Lock 6ba76e04df MDL-43020: Fix lesson scale warnings when deleting user attempts 2013-11-27 07:41:21 +10:30
Tim Lock 20d1fea57f MDL-43020: Fix calculation of lesson scale value warning 2013-11-27 07:40:21 +10:30
Tim Lock 7b52944b5e MDL-43020: Lesson using a scale always gives the minimum scale value 2013-11-27 07:40:21 +10:30
Eloy Lafuente (stronk7) 9703d42284 Merge branch 'm25_MDL-43045' of git://github.com/totara/moodle into MOODLE_25_STABLE 2013-11-26 21:30:31 +01:00
Ruslan Kabalin 3bc1bd6ee8 MDL-43071 assign: Fix offline grades import for scale grading. 2013-11-26 16:45:29 +00:00
Dan Poltawski 8e999b2643 Merge branch 'MDL-43000_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-26 15:06:32 +08:00
Dan Poltawski ff68fc5dbd Merge branch 'MDL-40741_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-26 14:57:17 +08:00
Dan Poltawski 768aa4ac33 Merge branch 'wip-MDL-43006-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-26 13:24:45 +08:00
David Monllao cea825d5ad MDL-40741 behat: Changing xpaths for clean theme
Keeps compatibility with standard theme.
2013-11-26 13:04:15 +08:00
Dan Poltawski ed66d9399a Merge branch 'MDL-42733_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-26 12:12:49 +08:00
Tim Lock ef95b087f8 MDL-42998: Fix user selection search options autoselectunique. 2013-11-26 10:50:35 +08:00
David Monllao a9be971c84 MDL-42842 behat: Adding a new formatter
Based on ProgressFormatter, the site info
will be displayed when the suite begins.
2013-11-26 10:46:39 +08:00
Dan Poltawski 2f3a0c3d93 Merge branch 'wip-mdl-41635-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-11-26 10:25:03 +08:00
Sam Hemelryk 4cedd8fb9d Merge branch 'MDL-43005-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-26 08:42:02 +13:00
Simon Coggins eaab90a2df MDL-43045 report: Fix missing role name in security overview report 2013-11-26 08:23:23 +13:00
Damyon Wiese bf44c1e521 Merge branch 'wip-MDL-41257-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2013-11-25 14:03:26 +08:00
Dan Poltawski 05b233d112 Merge branch 'w48_MDL-37016_m25_sloppymysql' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-11-25 13:40:58 +08:00
Damyon Wiese d1dd8b1496 Merge branch 'wip-mdl-42924-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-11-25 13:16:51 +08:00
Damyon Wiese 818c05cd0e Merge branch 'MDL-42913a-25' of https://github.com/srynot4sale/moodle into MOODLE_25_STABLE 2013-11-25 12:30:46 +08:00
Marina Glancy bce35f82c9 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:01:13 +11:00
Dan Poltawski beb6b442ca Merge branch 'MDL-42547_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-25 10:37:38 +08:00
Rajesh Taneja 26ebec6219 MDL-42904 self_enrol: Set customint1 if it's null 2013-11-25 10:03:23 +08:00
Eloy Lafuente (stronk7) a24766c374 Merge branch 'wip-MDL-29071-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-24 16:51:12 +01:00
Petr Škoda 074c243ed2 MDL-37016 fix sloppy mysql nulls in event.uuid 2013-11-24 15:12:39 +08:00
Tim Hunt f9306bd5b8 MDL-43000 shortanswer qtype: handle patterns with many *s
Teachers were typing patterns like
********************************<em>****************************</em>
which translates into a pattern like .*.*.*.*, which is very inefficient
to try to match, althought it is equivalent ot a single .*. At a certain
point preg was just giving up.

Since people actually do this, we should simplify the regex by treating
runs of * like a single *.
2013-11-22 11:34:26 +00:00
Marina Glancy 58ac1b444e MDL-43026 behat: Add tests for all existing module generators 2013-11-22 17:35:29 +11:00
Eloy Lafuente (stronk7) 20776b450f weekly release 2.5.3+ 2013-11-21 19:33:38 +01:00
Eloy Lafuente (stronk7) 7ce12c2d74 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-21 19:33:33 +01:00
David Monllao 7bf1651295 MDL-42733 behat: Removing the restriction of an started output to handle the PHP errors 2013-11-21 14:36:13 +08:00
Ankit Agarwal 03260d9cc8 MDL-43005 blogs: Fix issues with blog tags 2013-11-21 13:39:32 +08:00
Marina Glancy caeb793db0 MDL-29071 ddl: unittest for objects name length 2013-11-21 12:39:59 +11:00
Marina Glancy d33af201ab MDL-29071 ddl: make sure object name never exceeds max length
Many thanks to Ray Bon for finding the problem
2013-11-21 12:39:45 +11:00
Sam Hemelryk b1a0fe9318 NOBUG: fixed whitespace 2013-11-21 08:06:15 +13:00
Jerome Mouneyrac bb12a401ec MDL-42184 remove the body top padding for bootstrapbase popup + fix get_device_type call
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-21 08:03:58 +13:00
Mark Nelson 68cc921a37 MDL-42547 tool_uploaduser: trim values before uploading users 2013-11-20 00:35:57 -08:00
David Monllao 378d11db3e MDL-42842 testing: Generalization of the site info 2013-11-20 13:50:05 +08:00
FilipBenco 78efd16298 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:27:46 +08:00
Marina Glancy ccbd4e40c5 Merge branch 'MDL-42767-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-20 13:23:57 +11:00
Michael Milette d2927dfcb5 MDL-41257 calendar: Day and Upcoming-Events view not processed through text_filters() function
This fix adds text filtering to the Calendar Day view and Upcoming Events view, specifically the event name and event description.

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2013-11-20 10:14:17 +08:00
Aaron Barnes 3f44ba8664 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:01:02 +13:00
Rajesh Taneja 756778fc7f MDL-42924 Administration: use normalize_component to extract plugin name and type 2013-11-19 11:58:52 +08:00
Dan Poltawski 36bb3af665 Merge branch '42060-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-11-19 10:39:34 +08:00
Dan Poltawski b4275e41ec Merge branch 'MDL-42504_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-19 10:31:51 +08:00
Dan Poltawski e1d8082792 Merge branch 'MDL-42181_25' of git://github.com/mkassaei/moodle into MOODLE_25_STABLE 2013-11-19 10:07:06 +08:00
Damyon Wiese 5a2d5cfaf1 Merge branch 'm25_MDL-40223' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-11-19 09:51:36 +08:00
AMOS bot d515f0d9b3 Automatically generated installer lang files 2013-11-19 00:40:28 +00:00
Dan Marsden bf79273a0f MDL-40223 SCORM: pass limit into function instead of hardcoding to allow cross-db 2013-11-19 13:30:27 +13:00
Sam Hemelryk 4f314c0d62 Merge branch 'MDL-41316-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-19 12:27:55 +13:00
Sam Hemelryk b85181b3cd Merge branch 'w47_MDL-42612_m25_paypalruble' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-11-19 12:24:28 +13:00
Sam Hemelryk d9ca430e4f Merge branch 'MDL-42774-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-11-19 12:06:08 +13:00
Sam Hemelryk 37c71ce3cc Merge branch 'MDL-42863_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-19 12:03:25 +13:00
Sam Hemelryk a073d7c8b0 Merge branch 'MDL-42865_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-19 11:50:32 +13:00
Sam Hemelryk 3dc6381f90 MDL-42852 theme_bootstrapbase: fixed whitespace 2013-11-19 11:44:29 +13:00
Sam Hemelryk 31767636d8 Merge branch 'wip-MDL-42852_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-19 11:43:42 +13:00
Sam Hemelryk ca8790e981 Merge branch 'MDL-42184-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-11-19 10:13:13 +13:00
Sam Hemelryk 5b8ead0e73 Merge branch 'MDL-42853-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-19 10:08:05 +13:00
Ankit Agarwal d39f1ca2a5 MDL-42767 notes: Delete notes on a course delete 2013-11-18 16:03:52 +08:00
Dan Poltawski 1157cc9798 Merge branch 'MDL-42880b_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-18 15:39:18 +08:00
Damyon Wiese e9182f584f Merge branch 'MDL-42808-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-18 15:27:53 +08:00
Damyon Wiese 9bd2c37acc Merge branch 'm25_MDL-41695' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-11-18 15:21:20 +08:00
Damyon Wiese 22000e52b7 Merge branch 'MDL-42582-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-11-18 14:54:17 +08:00
Petr Škoda 401cecabd2 MDL-42612 add support for Russian Ruble in PayPal 2013-11-18 11:46:27 +08:00
Sam Hemelryk 3cc85c6a66 MDL-42060 block_course_list: fixed sorting of mycourses 2013-11-18 11:15:43 +13:00
Dan Marsden ccc2cf8793 MDL-41695 SCORM: allow unlimited decimal places in CMIDecimal 2013-11-18 10:28:31 +13:00
Dan Marsden 3c22f80a98 MDL-40223 SCORM: update scorm->launch param after restore - also check that scorm->launch is valid. 2013-11-18 09:51:37 +13:00
Gareth J Barnard 6bb8eba308 MDL-42852 lib: Blocks disappear in Clean in RTL. 2013-11-17 13:55:09 +00:00
Tim Hunt 3098e4254d MDL-42880 quiz settings: remove unnecessary disabledif rules.
These rules were causing problems in the case where the form was
sumitted with validation errors. In that case, the During the attempt ->
The attempt checkbox was becoming unset, and hence the other During the
attmept checkboxes became disabled, and the values were not saved.

Thanks to Sam Marshall for suggesting this fix.
2013-11-15 19:20:24 +00:00
M Kassaei bdbbe777d9 MDL-42181 quiz nav: highight all buttons when all Qs on one page 2013-11-15 16:36:18 +00:00
Tim Hunt c48f58ba9f MDL-42863 make capabilities overview more fault-tolerant. 2013-11-15 15:12:53 +00:00
Tim Hunt dcc650ef40 MDL-42865 Make XMLDB foreign key check more robust.
Otherwise, installing one bad add-on can completely break this report.
2013-11-15 14:59:29 +00:00
Tim Hunt e9a504c2f8 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-15 14:59:02 +00:00
Eloy Lafuente (stronk7) b3f2d75a47 weekly release 2.5.3+ 2013-11-15 11:14:58 +01:00
Eloy Lafuente (stronk7) 55dc7b6be9 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-15 11:14:54 +01:00
Frederic Massart 820ef5cdbc MDL-42912 mod_glossary: Fix typo and call to core_text 2013-11-15 09:42:46 +01:00
Eloy Lafuente (stronk7) 850fd970cb Merge branch 'MDL-42447_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-15 02:14:15 +01:00
David Monllao b5f1e8f1e7 MDL-42447 performance: New var to add perf. info to redirections 2013-11-15 09:13:37 +08:00
Eloy Lafuente (stronk7) 4233914802 Merge branch 'wip-MDL-42912-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-15 02:06:02 +01:00
Marina Glancy 0eb9a0a03d MDL-42912 glossary: oracle-compatibility of SQL queries 2013-11-15 11:53:02 +11:00
Frederic Massart cec4acd408 MDL-42853 course: Fix edit title icon margin on RTL 2013-11-14 09:45:45 +08:00
AMOS bot f5280e9706 Automatically generated installer lang files 2013-11-14 00:45:21 +00:00
Eloy Lafuente (stronk7) 262edf64ca Merge branch 'MDL-42768-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-13 23:15:51 +01:00
Frederic Massart 1919471ec0 MDL-42768 restore: Use sql_compare_text instead for text comparison 2013-11-13 14:47:04 +08:00
Damyon Wiese 175137de18 Merge branch 'MDL-42598_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-13 14:35:34 +08:00
Damyon Wiese ef9b7c943b Merge branch 'MDL-33536-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-11-13 13:11:19 +08:00
Ankit Agarwal 6a25e29bfc MDL-41316 tool_spamcleaner: AS keyword is not allowed in sql qeries for table alias as Oracle doesn't support it 2013-11-13 11:31:53 +08:00
Damyon Wiese a6d5825da4 MDL-33536 Navigation: Add missing require_once for safety. 2013-11-13 10:03:45 +08:00
AMOS bot 2db12e1ff2 Automatically generated installer lang files 2013-11-13 00:47:31 +00:00
Marina Glancy bf6fd02b43 MDL-38574 recompiled moodle.css in bootstrapbase 2013-11-13 11:17:21 +11:00
Eloy Lafuente (stronk7) 5d4b5a560a Merge branch 'MDL-42790_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-13 01:12:45 +01:00
Eloy Lafuente (stronk7) d385005eaf Merge branch 'MDL-42839-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-11-13 01:10:20 +01:00
Marina Glancy 96b5e3fc49 Merge branch 'MDL-38574_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-13 11:05:35 +11:00
Eloy Lafuente (stronk7) 4ac33ebc05 Merge branch 'wip_25_mdl-42723' of https://github.com/iarenaza/moodle into MOODLE_25_STABLE 2013-11-13 01:02:55 +01:00
Eloy Lafuente (stronk7) e17a5a4d21 Merge branch 'wip-MDL-42672-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-12 20:07:14 +01:00
sam marshall 6457d2eca3 MDL-42839 MUC: Memcache server configuration too sensitive to whitespace 2013-11-12 12:38:09 +00:00
Tim Hunt 493a747afc 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-12 10:46:31 +00:00
Marina Glancy 63d05b24d9 Merge branch 'MDL-42276_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-12 15:11:41 +11:00
Marina Glancy 00be378045 Merge branch 'MDL-42540_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-12 14:48:10 +11:00
Mark Nelson 49875e3a89 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:07:05 -08:00
Damyon Wiese 5a668a8c81 Merge branch '42806-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-11-12 10:04:38 +08:00
AMOS bot bffb56756a Automatically generated installer lang files 2013-11-12 00:53:13 +00:00
Marina Glancy ce20ddf41a Merge branch 'MDL-41775_25' of git://github.com/grabs/moodle into MOODLE_25_STABLE 2013-11-12 11:24:07 +11:00
Eloy Lafuente (stronk7) 3bf475dbfe Merge branch 'MDL-40481_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-12 00:41:38 +01:00
Andreas Grabs 92bf874cfa MDL-41775 mod_feedback - Input fields are shown with a fixed width on bootstrap based themes 2013-11-11 20:55:20 +01:00
Tim Hunt 3089c9a4c2 MDL-42598 quiz variant randomisation not random enough.
A student would get the same question variants (for example for a
calculated question) on their first attempt at both copies of a
duplicated quiz.
2013-11-11 14:17:25 +00:00
Tim Hunt fd85294415 MDL-42540 quiz manual grading should have setType 2013-11-11 14:17:10 +00:00
Tim Hunt 4517b6c832 MDL-40481 quiz responses report needs cols need text_sorting 2013-11-11 14:16:41 +00:00
Tim Hunt 4ce081c117 MDL-38574 qtype chooser: quick fix to make it fit on-screen.
MDL-32729 will provide a better fix for this, but we may as well apply
this quick fix on stable branches.
2013-11-11 14:16:15 +00:00
Andrew Nicols e121230981 MDL-42774 JavaScript: Ensure that shifter cleans build directories before running 2013-11-11 18:30:19 +08:00
Marina Glancy e5f2d6cdff NOBUG: convert tabs to whitespaces 2013-11-11 21:28:28 +11:00
Marina Glancy af19ff0d79 Merge branch 'MDL-42043-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-11 21:11:08 +11:00
Sam Hemelryk e0b110399b MDL-42806 block_mentees: can only be docked if it has a valid title set. 2013-11-11 17:23:41 +08:00
Damyon Wiese a97d655d8f Merge branch 'MDL-42803-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-11 17:17:13 +08:00
Frederic Massart 21293bbae0 MDL-42808 library: Google API was resetting the timezone 2013-11-11 15:32:52 +08:00
Sam Hemelryk 36c192677e Merge branch 'wip-mdl-42795-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-11-11 14:09:54 +08:00
Ankit Agarwal 072b02cc14 MDL-42803 behat: Add a wait to fix possible random behat errors in CI 2013-11-11 14:06:27 +08:00
Frederic Massart 87cd6776a5 MDL-42043 theme: Use $theme instead of $OUTPUT for pix_url() 2013-11-11 13:18:37 +08:00
Jason Fowler 26d49a12b0 MDL-42699 TinyMCE: adding padding to content area in Clean 2013-11-11 12:17:01 +08:00
Renaat Debleu 2602828491 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:48:19 +08:00
Eloy Lafuente (stronk7) 89e6c5c0e9 Moodle release 2.5.3 2013-11-10 01:58:48 +01:00
Damyon Wiese a7d4d3431d weekly release 2.5.2+ 2013-11-08 12:53:13 +08:00
Damyon Wiese 836ab073a3 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-08 12:53:09 +08:00
Jerome Mouneyrac 3f74db6578 MDL-42184 bootstrapbase: popup should have no header 2013-11-08 11:59:48 +08:00
AMOS bot f6b388ebfd Automatically generated installer lang files 2013-11-08 00:43:05 +00:00
Damyon Wiese 5a3a531267 Merge branch 'MDL-42668-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-07 16:10:59 +08:00
Dan Poltawski 934c120bf7 Merge branch 'MDL-42666-25-fixup' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-07 15:56:31 +08:00
Frederic Massart e4feadd902 MDL-42668 portfolio_boxnet: Do not run upgrade multiple times
Conflicts:

	portfolio/boxnet/db/upgrade.php
	portfolio/boxnet/version.php
2013-11-07 15:37:18 +08:00
Frederic Massart 0fe0fe9ebe MDL-42666 repository_boxnet: Do not run the upgrade multiple times
Conflicts:

	repository/boxnet/db/upgrade.php
	repository/boxnet/version.php
2013-11-07 15:25:33 +08:00
Frederic Massart f15dccae2a MDL-42668 portfolio_boxnet: Disable the portfolio when non-HTTPS 2013-11-07 14:34:18 +08:00
Frederic Massart 01b9b03441 MDL-42668 portfolio_boxnet: Disable the portfolio during upgrade 2013-11-07 14:34:17 +08:00
Frederic Massart c13e763ef1 MDL-42668 portfolio_boxnet: Notify the admins about the upgrade process
Conflicts:

	portfolio/boxnet/version.php
2013-11-07 14:34:12 +08:00
Frederic Massart 0ae0d09eb9 MDL-42668 portfolio_boxnet: Migration to APIv2
Conflicts:

	lib/boxlib.php
2013-11-07 14:31:32 +08:00
Dan Poltawski edb8542bae Merge branch 'MDL-42666-25-fixup' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-07 14:19:10 +08:00
Frederic Massart 2c9b25f0cf MDL-42666 tests: Setting new Box.net mandatory arguments 2013-11-07 13:55:07 +08:00
Marina Glancy a41b923702 Merge branch 'MDL-42697-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-11-07 16:31:22 +11:00
Dan Poltawski 95e92d994a Merge branch 'MDL-42666-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-07 11:44:45 +08:00
Frederic Massart c19d952ad2 MDL-42666 repository_boxnet: New lang strings rather than replace 2013-11-07 11:14:12 +08:00
Damyon Wiese 9f4c5ff972 Merge branch 'MDL-42605-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-07 11:02:10 +08:00
Frederic Massart f5b8ccf6e4 MDL-42666 repository_boxnet: Improved output during migration 2013-11-07 11:00:33 +08:00
Dan Poltawski dc7910cfb5 Merge branch 'MDL-42728-en_fix_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-11-07 09:36:01 +08:00
Frederic Massart 550be25d23 MDL-42666 repository_boxnet: Avoid re-download of sync'd references 2013-11-06 15:04:04 +08:00
Petr Škoda 00163ad105 MDL-38743 add private cache headers 2013-11-06 13:56:22 +08:00
Marina Glancy 36c9dadd67 Merge branch 'MDL-42640-25' of https://github.com/colin-umn/moodle into MOODLE_25_STABLE 2013-11-06 16:31:46 +11:00
Frederic Massart 05c9a3da2a MDL-42666 repository_boxnet: Downloading a file follows locations 2013-11-06 12:46:17 +08:00
Frederic Massart d4617dcbae MDL-42666 repository_boxnet: Fix undefined variable usage 2013-11-06 12:46:17 +08:00
Frederic Massart 78e8d438e1 MDL-42666 repository_boxnet: Using the right reference 2013-11-06 12:45:14 +08:00
Andrew Nicols 0276873e4d MDL-42697 Theme: Fix overflow on docked blocks 2013-11-06 12:01:40 +08:00
Marina Glancy 628c568f2d MDL-42672 blocks: warnings on /mod/xxx/index.php for frontpage course 2013-11-06 14:37:27 +11:00
Frederic Massart 79277af9cb MDL-42666 repository_boxnet: Convert all the references asap
This has been done in case the script fails during the processing
and needs to be re-run. Now all the references are converted as soon
as we can, where as before they could have ended up being re-downloaded.
2013-11-06 11:24:07 +08:00
Frederic Massart b633be82aa MDL-42666 repository_boxnet: Warn on HTTPS requirement when non HTTPS 2013-11-06 11:24:07 +08:00
Frederic Massart aea6108e05 MDL-42666 repository_boxnet: Alert the admins of the migration process
Conflicts:

	repository/boxnet/version.php
2013-11-06 11:24:05 +08:00
Frederic Massart 4aaab482ff MDL-42666 repository_boxnet: Revoke access token when logging out 2013-11-06 11:22:34 +08:00
Frederic Massart c800a57c7d MDL-42666 oauthlib: Getter methods for accesstoken, client id and secret 2013-11-06 11:22:34 +08:00
Frederic Massart b04cc1f3a7 MDL-42666 repository_boxnet: Remove hardcoded date for APIv1 end of life 2013-11-06 11:22:33 +08:00
Frederic Massart 7ee244b1a4 MDL-42666 repository_boxnet: Disabling file references 2013-11-06 11:22:33 +08:00
Frederic Massart 3fa4ae2a33 MDL-42666 repository_boxnet: Advise the user to run the migration tool 2013-11-06 11:22:33 +08:00
Frederic Massart 738a724ce7 MDL-42666 repository_boxnet: Tool to launch the migration 2013-11-06 11:22:32 +08:00
Frederic Massart 3f944b3350 MDL-42666 repository_boxnet: Function to convert APIv1 references to true copies 2013-11-06 11:22:32 +08:00
Frederic Massart f1b93a70bf MDL-42666 repository_boxnet: Convert repository to APIv2
The support for downloading images when they are references
from Box.net have been dropped in this script as the new
API does not support references. Unfortunately the old
references thumbnails will not be updated any more.

Conflicts:

	lib/upgrade.txt
	repository/boxnet/lib.php
2013-11-06 11:21:16 +08:00
Damyon Wiese 2f78f30342 MDL-39800 tags: Fix tags/upgrade.txt version number in backport 2013-11-06 10:45:42 +08:00
Damyon Wiese bff2785bbb Merge branch 'wip-MDL-41309-25STABLE' of https://github.com/jennymgray/moodle into MOODLE_25_STABLE 2013-11-06 10:37:09 +08:00
Mary Evans 7e7123eb04 MDL-40244 forms: added setType() for groupinfo in forum and wiki 2013-11-06 12:24:55 +11:00
Helen Foster 0282d3ec01 MDL-42728 Merge English strings from the en_fix language pack 2013-11-05 23:49:47 +01:00
Iñaki Arenaza 7a69e7a88f MDL-42723: Hide and handle LDAP error when user not in context being checked
MDL-41304 only fixed the case when 'Search subcontext' is enabled. We need to
fix the case when it's not enabled too.

While silencing errors with an @ should be avoided if possible, there's no
other way to prevent the warnings in this case.
2013-11-05 17:05:30 +01:00
Damyon Wiese ef7b0158c9 Merge branch 'wip-MDL-38228-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-05 22:39:27 +08:00
Jenny Gray 4aafc00b17 MDL-39800 tags: moved cloud sorting to print function 2013-11-05 10:59:09 +00:00
Jenny Gray bbec0210fa MDL-39800 tags: Applied weight and ordering fix on all more page options
Also:
Fixed weight and ordering on more page show=all
Fixed weight and ordering on more page show=my
rationalised tag_print_cloud lines now identical
2013-11-05 10:58:59 +00:00
Jenny Gray 1ee5db0a96 MDL-39800 tags: resolved weighting in block content 2013-11-05 10:58:48 +00:00
David Monllao b1c08d5b81 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:26:52 +08:00
Dan Poltawski e9c05243e0 Merge branch 'MDL-42613_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-05 16:46:34 +08:00
David Monllao 4e6fe1af7a MDL-42363 behat: Avoid random failure because of timing differences 2013-11-05 15:53:34 +08:00
Marina Glancy 5636172729 Merge branch 'MDL-40267-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-11-05 17:45:13 +11:00
Dan Poltawski f6c01ed03d Merge branch 'MDL-42385_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-05 12:34:37 +08:00
rwijaya b493d5f228 MDL-42280 Behat: add behat test for block settings.
Test includes: modifying setting to hide and move block appearance
2013-11-05 11:37:56 +08:00
Aaron Barnes 3ddd77dfd7 MDL-42476 report_progress: don't browser sniff for SVG support
Use feature detection, its more robust and better practice.
2013-11-05 11:24:33 +08:00
Colin Campbell 7bdfb60b14 MDL-42640 quiz: Fix restore of backup without overduehandling setting
Use default quiz overduehandling setting when restoring a
backup from older Moodle version that does not have a quiz
overduehandling setting.
2013-11-04 21:12:33 -06:00
Marina Glancy c12f6b3191 MDL-38228 upgrade: Rewrite and re-apply script that fixes corrupt course modules to sequence relation 2013-11-05 14:12:32 +11:00
Ray Morris 3e90b472a0 MDL-42265 make Browse Users list scrollable for smaller screens 2013-11-05 10:50:19 +08:00
Dan Poltawski 60d8c0214b MDL-40267 forms: fix utf8 string length rules 2013-11-05 10:19:41 +08:00
Eloy Lafuente (stronk7) 6cb4f34ebd MDL-40267 forms: added some tests for the range rule 2013-11-05 10:08:11 +08:00
Damyon Wiese 7877f2a10d Merge branch 'wip-MDL-42374-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-05 09:27:46 +08:00
Dan Poltawski 9b8d886a7d Merge branch 'MDL-42273-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-04 23:41:08 +08:00
Dan Poltawski 9686f6db9b Merge branch 'MDL-42363_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-04 23:34:28 +08:00
Dan Poltawski 742f8adac4 Merge branch 'wip-MDL-42270_M25_2' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-11-04 22:54:16 +08:00
Dan Poltawski 23e3fe5449 Merge branch 'MDL-42548_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-11-04 22:35:05 +08:00
Dan Poltawski 028528e223 Merge branch 'MDL-42453_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-11-04 22:17:20 +08:00
Dan Poltawski 2aed63d053 MDL-42533 conditionlib: Add clarifying comments 2013-11-04 22:04:09 +08:00
Dan Poltawski 99870bc223 Merge branch 'MDL-42533-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-11-04 21:55:37 +08:00
Dan Poltawski d06720b0b5 Merge branch 'MDL-42326_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-04 21:43:49 +08:00
Dan Poltawski 824105f80f Merge branch '42350-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-11-04 17:38:01 +08:00
Jerome Mouneyrac c7cc3271c0 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:18:08 +08:00
Jerome Mouneyrac a10af7329e MDL-42331 Automate MDLQA-5258 - A teacher can add and allocate a course badge 2013-11-04 17:15:05 +08:00
Dan Poltawski 46ee24b31e Merge branch 'MDL-42551_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-11-04 16:22:46 +08:00
Jerome Mouneyrac 79a12d2d3f MDL-42330 Automate MDLQA-5257 - An admin can award a site badge 2013-11-04 16:19:42 +08:00
Marina Glancy bdb51186d7 Merge branch 'MDL-42604-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-04 19:16:44 +11:00
Dan Poltawski 162fe6fab2 Merge branch 'w45_MDL-42044_m25_zipaddon' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-11-04 16:14:39 +08:00
Sam Hemelryk 084b8ae091 MDL-42350 mod_assign: fixed display of submission button 2013-11-04 15:58:16 +08:00
Dan Poltawski 43eaae3502 MDL-42111 fix trailing whitespace 2013-11-04 15:36:19 +08:00
Dan Poltawski fde722805f Merge branch 'MDL-42111_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-11-04 15:36:08 +08:00
Damyon Wiese f4dfc6aec3 Merge branch 'MDL-34654-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-11-04 15:22:58 +08:00
Dan Poltawski 9e947fe303 Merge branch 'MDL-42494-workshop-exception_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-11-04 14:51:52 +08:00
Marina Glancy a13c26eca3 Merge branch 'MDL-42429_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-04 17:28:15 +11:00
Marina Glancy 7b6142193d Merge branch 'MDL-42566_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-04 17:23:12 +11:00
Dan Poltawski 211b771e3b MDL-42286 fix trailing whitespace 2013-11-04 14:15:13 +08:00
Dan Poltawski 8b03e53926 Merge branch 'MDL-42286_behat_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2013-11-04 14:13:49 +08:00
Sam Hemelryk 6d50856c1f Merge branch 'MDL-42648_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-11-04 14:00:19 +08:00
Marina Glancy 01e7a77619 Merge branch 'MDL-42465_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-04 16:58:11 +11:00
Frederic Massart 95a7908c29 MDL-41807 repository_filesystem: Prevent access to parent directories 2013-11-04 13:31:11 +08:00
Damyon Wiese 6885480643 Merge branch 'MDL-42489-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-04 13:17:02 +08:00
Marina Glancy c82257cc88 Merge branch 'MDL-42617_25' of git://github.com/jleyva/moodle into MOODLE_25_STABLE 2013-11-04 16:14:57 +11:00
Marina Glancy b981f1b847 Merge branch 'MDL-38664_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-11-04 15:16:43 +11:00
Dan Poltawski ed4d821352 Merge branch 'MDL-40515_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE 2013-11-04 12:10:56 +08:00
Damyon Wiese 1b6b8865bb Merge branch 'MDL-35146_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-11-04 11:55:44 +08:00
Petr Škoda 80d1934fe3 MDL-41941 clean message text 2013-11-04 11:37:59 +08:00
Tim Hunt 8f39e9f1af 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:04 +08:00
Damyon Wiese 2116cfe31b Merge branch 'MDL-42521_25' of git://github.com/grabs/moodle into MOODLE_25_STABLE 2013-11-04 11:00:55 +08:00
Damyon Wiese 978271ca9b Merge branch 'MDL-42663_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-11-04 10:49:21 +08:00
Marina Glancy b5ba65ebf1 Merge branch 'MDL-42664-performance_measuring_filter_manager_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-11-04 13:18:15 +11:00
Damyon Wiese 3e84d1746a Merge branch 'w45_MDL-42496_m25_addonredir' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-11-04 10:00:24 +08:00
Damyon Wiese da9e7233b9 Merge branch 'MDL-38850_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-11-04 09:41:46 +08:00
Andreas Grabs 3085f3395b MDL-42521 mod_feedback - Feedback does not show line graphs in Clean theme 2013-11-03 19:12:42 +01:00
Mary Evans 8a5c822a99 MDL-42648 lib: Clean theme throws exception if set_pagelayout is called too late. 2013-11-02 00:57:32 +00:00
Damyon Wiese 6c867463ae Merge branch 'wip-MDL-28463-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-11-01 21:50:15 +08:00
Petr Škoda 924a623b74 MDL-42044 standardise list of unzipped files in add-on installer 2013-11-01 10:44:28 +01:00
Petr Škoda f112423e0a MDL-42496 backport MDL-41245 add-on install request redirection fix 2013-11-01 10:40:17 +01:00
Dan Poltawski 7eaaf2dac8 Merge branch 'MDL-42287-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-11-01 17:38:03 +08:00
David Monllao 8881afbb1a 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:38:48 +08:00
Mark Nelson f329d60c38 MDL-42429 mod_lesson: removed unnecessary conditional check 2013-11-01 16:23:40 +08:00
David Mudrák 2c6520c719 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:19:22 +01:00
Dan Poltawski c9ee1a77a5 weekly release 2.5.2+ 2013-11-01 15:47:51 +08:00
Dan Poltawski 3eb7f7103b Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-11-01 15:47:48 +08:00
Marina Glancy c77dfbdd05 MDL-28463 conditionlib: 10 minutes lifetime of cached grades 2013-11-01 16:53:12 +11:00
Andrew Davis 17988b1854 MDL-42286 questionbank: add behat tests for putting questions in categories MDLQA-95 2013-11-01 10:37:39 +08:00
Sam Hemelryk fe1a264095 MDL-42619 block_community: delete course redirect bug fix 2013-11-01 10:16:26 +08:00
Marina Glancy 27fa761b19 Merge branch 'MDL-41624_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2013-10-31 22:17:58 +11:00
Juan Leyva 119faec054 MDL-42617 Add support for frozen fields in searchableselector form elements 2013-10-31 11:48:45 +01:00
Marina Glancy 42863ec241 Merge branch 'MDL-40971_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-10-31 21:17:08 +11:00
Sam Hemelryk 51b47fd406 MDL-33536 navigation: hide hidden categories from the navbar 2013-10-31 17:11:59 +08:00
Mark Nelson 38ad8f35da MDL-42566 mod_data: introduced check to ensure the picture supplied is valid 2013-10-31 17:10:59 +08:00
Michael Aherne 04be3fce3e MDL-42517 testing Changed events test to use assertDebuggingCalled() 2013-10-31 13:38:16 +08:00
Marina Glancy 609aa78de1 Merge branch 'MDL-42587_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE 2013-10-31 16:00:16 +11:00
Ankit Agarwal ade7240b9f 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:49:12 +08:00
Frederic Massart a89784e9f3 MDL-42605 portfolio_flickr: Do not auto select a set to export to 2013-10-31 10:32:50 +08:00
Frederic Massart e957693eab MDL-42605 portfolio_flickr: Photos can be added to a set on export 2013-10-31 10:32:49 +08:00
Mary Evans f859cd373b MDL-40971 grade: Importing Outcomes breaks Clean theme. 2013-10-30 23:56:17 +00:00
Matt Switlik a94d76da9d MDL-42618 fix grade importing of whitespace idnumbers 2013-10-30 15:38:12 -04:00
Jean-Michel Vedrine 4f80368f82 MDL-41624 DragMath crashes Firefox 2013-10-30 18:17:27 +01:00
David Monllao 753c8736f5 MDL-42385 behat: New test to cover MDL-38661
Scenarios to cover the category and combo list
frontpage display modes, checking the AJAX
calls to expand/collapse children nodes. Also refactoring
the site settings step as it has problems to deal
with multiple-field settings.
2013-10-30 18:33:03 +08:00
David Monllao 6887714946 MDL-42363 behat: Covering MDL-41817 testing
Covering backup/restore without blocks
and with a single course section.
2013-10-30 18:28:49 +08:00
Mark Nelson 89f71167f1 MDL-42613 core_group: removed unnecessary table row when there is no group description or picture 2013-10-30 17:59:29 +08:00
Damyon Wiese 1cf4616825 Merge branch 'MDL-38734-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-10-30 17:21:52 +08:00
Damyon Wiese 4323d78919 Merge branch 'MDL-41092-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-30 16:25:08 +08:00
Damyon Wiese c2e79fd044 MDL-41092 Assign: Expose SQL error in cron unit test 2013-10-30 16:24:37 +08:00
Sam Hemelryk 121de7fe9f Merge branch 'wip-MDL-42379-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2013-10-30 15:08:49 +08:00
Sam Hemelryk 65c6eb8141 Merge branch 'MDL-42284_behat_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2013-10-30 14:19:41 +08:00
Sam Hemelryk 4d5be0764a Merge branch 'MDL-42574-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-30 13:44:48 +08:00
Ankit Agarwal 248cd99de6 MDL-42604 scorm: Fix division by zero warnings in error logs 2013-10-30 10:57:27 +08:00
Damyon Wiese 657faa98d8 Merge branch 'wip-MDL-41337-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-10-30 10:53:52 +08:00
Sam Hemelryk 0460b39c13 Merge branch 'MDL-42542-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-10-30 08:39:24 +08:00
sam marshall a55a5d28c2 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-10-29 16:54:06 +00:00
Marina Glancy ca50abdd5d MDL-41337 files: Fixed bug with accidental delete of the root directory 2013-10-29 20:30:01 +11:00
Michael de Raadt 23288150aa MDL-41092 assign: Fix duplicate key error in assign cron 2013-10-29 14:41:10 +08:00
John Beedell fb97f9a5cf MDL-41473 book: Book html zip import, incorrect url produced for internal linking to other chapters 2013-10-29 14:28:28 +08:00
Damyon Wiese 56ed66a537 Merge branch 'MDL-40470-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-10-29 13:56:12 +08:00
Rajesh Taneja 0dc1862e77 MDL-42282 Behat: Max year in date feild is 2020 in 2.5 2013-10-29 13:54:18 +08:00
Damyon Wiese 39ab79ca19 Merge branch 'm25_MDL-39810_IE_Compatibility_View_Does_Not_Recognize_JSON_RFC4627_MIME_Type' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-10-29 13:42:58 +08:00
Adam Olley 14a99847bc MDL-42587: calendar: Fix regression that stops dates autocorrecting 2013-10-29 14:18:43 +10:30
Dan Poltawski 3dcfa0e6aa Merge branch 'wip-mdl-42282-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-29 11:44:36 +08:00
Andrew Nicols 4b98297808 MDL-40470 JavaScript: Correct issue when checking select change in Firefox 2013-10-29 10:43:01 +08:00
Ankit Agarwal d4c3263cea MDL-42287 behat: Add an autoamted test to test MDLQA-82 2013-10-29 10:39:08 +08:00
Dan Poltawski 0da4fd0c21 Merge branch 'wip-mdl-42281-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-29 10:33:11 +08:00
Rajesh Taneja ffaa69b81e 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:49:41 +08:00
Dan Poltawski 796538b786 Merge branch 'MDL-22669-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-10-28 16:31:30 +08:00
Ankit Agarwal 5bcfa0511f MDL-42574 blocks: Fix strict standards warning in community block 2013-10-28 15:41:06 +08:00
Dan Poltawski 321a08bff9 Merge branch 'wip-mdl-42283-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-28 14:54:10 +08:00
Dan Poltawski 3c137dafb3 Merge branch 'MDL-42285-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-10-28 14:15:40 +08:00
Mark Nielsen 0f0fa7a86c MDL-38419: External tool - when force SSL checked, URLs get corrupted 2013-10-28 12:35:07 +08:00
Mark Nelson 4b83e704b1 MDL-35146 mod_wiki: fixed variable typo and altered code to conform to Moodle guidelines 2013-10-28 12:32:07 +08:00
Anton Fletcher 84c3f002ea MDL-35146 mod_wiki: fixed issue where pages for deleted groups caused an error on restore 2013-10-28 12:32:07 +08:00
Damyon Wiese 59f8555512 Merge branch 'wip-mdl-30812-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-28 12:14:52 +08:00
Dan Poltawski 92642bed3c Merge branch 'MDL-42538_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-28 11:36:08 +08:00
Dan Poltawski 3fa16c9c7b Merge branch 'wip-mdl-42491-m25' of git://github.com/deraadt/moodle into MOODLE_25_STABLE 2013-10-28 11:33:27 +08:00
David Monllao fb8ea65f94 MDL-42326 behat: New scenario for permission overrides 2013-10-28 11:33:17 +08:00
David Monllao 3b51b66e2b MDL-42326 behat: Data generator for permission overrides 2013-10-28 11:33:17 +08:00
Prateek Sachan b9fdc61f99 MDL-38850: Fixed Horizontal bar issue in lesson 2013-10-28 11:08:26 +08:00
Damyon Wiese b842558dc2 Merge branch 'MDL-36818-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-10-28 10:58:54 +08:00
Adrian Greeve d3da736981 MDL-42379 behat: Automated test for approving glossary entries.
Automate MDLQA-34 - A teacher can set that glossary entries require approval before being viewable be everyone.
2013-10-28 09:31:52 +08:00
AMOS bot a7275914da Automatically generated installer lang files 2013-10-28 00:46:43 +00:00
Matteo Scaramuccia 47e52bfdca MDL-39810 Files: IE doesn't recognize JSON MIME Type (RFC4627).
Affected versions:
- IE 8+, under Compatibility View.
2013-10-27 07:58:51 +01:00
Eloy Lafuente (stronk7) 448589b517 MDL-42551 timezone info: updated to 2013h 2013-10-26 17:14:57 +02:00
Andrew Davis 0a4563b1d4 MDL-42284 core_message: adding behat tests for viewing message history MDLQA-135 2013-10-26 17:51:38 +07:00
Tim Hunt 0bf397b20c MDL-42548 quiz review: don't show grade for non-finished attempts.
Now we show the attempt state separately, so there is no need to show
Grade: Attempt still in progress - especially since we were showing that
for abandoned and overdue attempts which is just wrong.
2013-10-25 20:11:23 +01:00
Gareth J Barnard a22207d167 MDL-42270 course: Section name too big message. 2013-10-25 16:45:55 +01:00
Eloy Lafuente (stronk7) 67d4599aff weekly release 2.5.2+ 2013-10-25 13:03:41 +02:00
Eloy Lafuente (stronk7) a108831497 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-10-25 13:03:36 +02:00
Frederic Massart a229f6aeb6 MDL-42542 portfolio: Fix handlerfile in portfolio event handler 2013-10-25 16:02:49 +08:00
Dan Poltawski ac48ed217d Merge branch 'wip-mdl-42536-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-25 15:55:36 +08:00
Dan Poltawski 3c78ccf5c4 Merge branch 'MDL-42514-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-10-25 15:28:23 +08:00
Rajesh Taneja 4ccbf72147 MDL-42536 enrol_self: Added behat to test group key self enrolment 2013-10-25 15:17:03 +08:00
Dan Poltawski b629c8b244 Merge branch 'MDL-42272-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-25 12:01:42 +08:00
Ankit Agarwal 12330cda14 MDL-42272 behat: Fix incorrect strings 2013-10-25 11:44:28 +08:00
David Monllao 31b981afa9 MDL-42538 behat: Fixing wrong number of users 2013-10-25 11:37:45 +08:00
Frederic Massart 0a6ebc609d MDL-42533 conditionlib: Field name is translated for students 2013-10-25 09:52:20 +08:00
Michael de Raadt 8fac075a5c MDL-42491 libraries: add exception for IE11 (and hopefully later versions) 2013-10-25 09:01:21 +08:00
Frederic Massart cb8ba87d4e MDL-42514 groups: Importing groups created unnamed groupings 2013-10-25 08:23:11 +08:00
Eloy Lafuente (stronk7) 183058c8b5 Merge branch 'MDL-42377_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-10-25 01:13:46 +02:00
Dan Poltawski 3a32362a30 Merge branch 'MDL-42338_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-10-24 16:29:11 +08:00
Jason Fowler 13b88e122b MDL-42285 Behat: Automate MDLQA-93 - A teacher can delete questions from the question bank 2013-10-24 13:50:06 +08:00
Dan Poltawski 860553218c Merge branch 'MDL-42272-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-24 13:42:09 +08:00
Dan Poltawski 047f523d91 Merge branch 'MDL-42362_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-24 12:39:49 +08:00
Dan Poltawski 7e24c4bbb2 Merge branch 'wip-MDL-42323-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-10-24 12:33:21 +08:00
Marina Glancy a4b421c1fb Merge branch 'MDL-35402_editor_rules_25' of git://github.com/davosmith/moodle into MOODLE_25_STABLE 2013-10-24 15:29:57 +11:00
Marina Glancy b46fc7cefd Merge branch 'MDL-41252-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-10-24 14:15:39 +11:00
rwijaya 4b178e7ab6 MDL-42338 lti_mod: convert hardcoded string. 2013-10-24 10:35:11 +08:00
Dan Poltawski f9b6e96e59 Merge branch 'MDL-42293-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-24 10:27:45 +08:00
sam marshall fb166770b9 MDL-34654 Glossary: ampersand breaks auto-linking 2013-10-23 16:21:39 +01:00
David Mudrák 30f8726bed 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:49:54 +02:00
Dan Poltawski 95fcab4480 Merge branch 'MDL-42324_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-23 17:14:37 +08:00
Rajesh Taneja ba9af1f476 MDL-42283 Behat: Automated MDLQA-1777
MDLQA-1777: A teacher can set grade conditions to restrict availability of a section
2013-10-23 15:59:00 +08:00
Jerome Mouneyrac e0b8bc0a08 MDL-41252 Simple changes to main course page to improve accessibility - original patch of Nate Baxley 2013-10-23 15:18:50 +08:00
Dan Poltawski fd60979576 Merge branch 'MDL-42290-25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-23 15:05:43 +08:00
Damyon Wiese 6e81b099fb Merge branch 'MDL-42210_25' of git://github.com/grabs/moodle into MOODLE_25_STABLE 2013-10-23 14:19:26 +08:00
Ankit Agarwal acea79f644 MDL-42489 backup: use correct exception class in automated backups 2013-10-23 13:55:47 +08:00
Damyon Wiese 023ab3da11 Merge branch 'w43_MDL-42208_m25_authunmask' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-23 13:41:46 +08:00
Dan Poltawski 7eed88eef9 Merge branch 'wip-MDL-42278-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-10-23 13:21:07 +08:00
Dan Poltawski 48c67d9c75 Merge branch 'MDL-40531_25' of https://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-10-23 12:37:52 +08:00
Ankit Agarwal b48366111d MDL-42427 backup: Fix undefined errors during automated backups 2013-10-23 12:11:06 +08:00
Damyon Wiese 75f39a0946 MDL-41339 Tags - use uppercase for SQL keywords (AS) 2013-10-23 11:59:38 +08:00
Damyon Wiese 2840c2ae62 Merge branch '25STABLE-wip-mdl-41339' of https://github.com/jennymgray/moodle into MOODLE_25_STABLE 2013-10-23 11:53:16 +08:00
Marina Glancy 538e06f2b5 Merge branch 'w43_MDL-37813_m25_filterall' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-23 10:17:58 +11:00
Dan Poltawski 68c4e246d6 Merge branch 'MDL-42112-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-10-22 16:40:50 +08:00
Mark Nelson a57462fab5 MDL-42465 mod_chat: instantiated message object before declaring properties 2013-10-22 16:09:14 +08:00
Dan Poltawski c2767fb456 Merge branch 'MDL-29441-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-10-22 13:21:14 +08:00
Marina Glancy 265b16589d Merge branch 'MDL-26170_rss_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2013-10-22 15:04:12 +11:00
Andrew Davis 3234d689b4 MDL-26170 RSS: fixed RSS cache clearing when items are deleted 2013-10-22 10:56:21 +07:00
Dan Poltawski 065e6bf386 Merge branch 'wip-mdl-31405-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-22 11:53:17 +08:00
Marina Glancy b2108d9955 Merge branch 'MDL-24380-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-10-22 14:34:53 +11:00
Rajesh Taneja e2311f397b 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:16:15 +08:00
Marina Glancy 575ec94611 Merge branch 'MDL-42239-m25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-22 14:08:45 +11:00
Jerome Mouneyrac a8fe589f4d MDL-24380 Chat: autoscroll help popup incorrect and doesn't display fully (it only concerns the alternative chat methods) 2013-10-22 10:44:47 +08:00
Ankit Agarwal 8be7543205 MDL-42239 calendar: Fix missing ids issue with mouseover panels 2013-10-22 10:43:39 +08:00
Dan Poltawski 9fcd4cc785 Merge branch 'MDL-42201_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-10-22 10:26:41 +08:00
Rajesh Taneja 944c3000bd MDL-34612 Restore: Gracefully handle empty file contenthash while restoring 2013-10-22 09:49:03 +08:00
Rajesh Taneja 89f04265df MDL-34612 Restore: Gracefully handle empty section title while restoring 2013-10-22 09:49:03 +08:00
AMOS bot c303806970 Automatically generated installer lang files 2013-10-22 00:45:41 +00:00
Mary Evans a31108712f MDL-42453 theme_base: Fixed Error in base/style/admin.css that breaks CSS validator. 2013-10-21 15:34:20 +01:00
Jenny Gray acdf10b7f0 MDL-41339 Tags: Added unique tag instance id to tag_get_tags functions
Avoids php warnings on creating new tags
2013-10-21 10:10:01 +01:00
Rajesh Taneja 5c2fa2124e 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:13:23 +08:00
Dan Poltawski e9f8075b54 Merge branch 'MDL-34209-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-10-21 13:58:28 +08:00
Jody Steele 94b2dbb9b5 MDL-38628 mod_assign: Allow a user to specify "No Grade" when grading an assignment submission 2013-10-21 16:49:50 +11:00
Marina Glancy 10ae2a6d0e Merge branch 'w43_MDL-42386_m25_etag' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-21 16:00:27 +11:00
Dan Poltawski 3a77dc864f MDL-42408 tool_behat: fix version number 2013-10-21 12:29:01 +08:00
Mark Nelson fae00b43fe MDL-42377 backup: fixed incorrect debugging message 2013-10-21 11:55:02 +08:00
Mark Nelson 5f931bb78d MDL-42201 backup: introduced new automatic backup state 2013-10-21 11:46:41 +08:00
Andrew Nicols dc9159d70a MDL-34209 JavaScript: Simplify section drag/drop to fix reordering issues 2013-10-21 11:39:21 +08:00
Dan Poltawski ab2f2f93b1 Merge branch 'MDL-26244_url_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2013-10-21 11:25:15 +08:00
David Monllao 857ff6210b MDL-42362 behat: Passing options to modules generators 2013-10-21 11:19:29 +08:00
David Monllao 552af5abdd MDL-42324 behat: New activities data generator 2013-10-21 11:16:23 +08:00
Dan Poltawski 429cc7c8dc Merge branch 'MDL-42408_25' of https://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-21 11:15:50 +08:00
rwijaya 7e43cc70d8 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:15:44 +08:00
David Monllao d653929fde MDL-42325 behat: Role assign generator 2013-10-21 11:15:02 +08:00
David Monllao 472b456325 MDL-42408 behat: Setting the site summary 2013-10-21 11:10:41 +08:00
Dan Poltawski bd7a6434be MDL-31405 assign: avoid uncessary get_string call 2013-10-21 11:03:10 +08:00
Dan Poltawski 6b2c8581fa Merge branch 'wip-mdl-31405-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-21 10:58:24 +08:00
Andreas Grabs 4d686df651 MDL-42210 mod_feedback - convert tabs to space 2013-10-20 10:06:41 +02:00
Michael Milette 66b193ccb8 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:06:40 +02:00
AMOS bot 4d11461638 Automatically generated installer lang files 2013-10-20 00:42:08 +00:00
Charles Severance 326dc8f5a8 MDL-40531 mod_lti: Various 1.1/1.1.1 fixes.
Conflicts:
	mod/lti/service.php
2013-10-19 03:03:36 +02:00
Sam Chaffee d565223abd MDL-40531 mod_lti: Changed namespace in XML to IMS LTI compliant 2013-10-19 02:59:32 +02:00
AMOS bot c55cbda0d4 Automatically generated installer lang files 2013-10-19 00:47:34 +00:00
Petr Škoda bfc508c937 MDL-37813 remove missing filters when configuring string filters and fix filter uninstall 2013-10-18 15:58:34 +02:00
Petr Škoda 94d15100cd MDL-42208 prevent autocompletion in auth configs 2013-10-18 15:08:31 +02:00
Petr Škoda 15bf471bb6 MDL-42386 fix invalid etag comparison
Credit goes to Eloy Lafuente, thanks!
2013-10-18 14:49:14 +02:00
Ankit Agarwal 1269807d3c MDL-42290 choice: Add a automated test to verify limiting number of responses works 2013-10-18 17:35:53 +08:00
Dan Poltawski 1115bb3780 weekly release 2.5.2+ 2013-10-18 16:16:57 +08:00
Dan Poltawski ebb6f201ce Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-10-18 16:16:48 +08:00
Tony Levi cd9c46207d MDL-38734: Automated backup failure causing all course to fail 2013-10-18 15:04:22 +08:00
Damyon Wiese 5964cfdb51 Merge branch 'MDL-41554-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-10-18 13:29:03 +08:00
Dan Poltawski eacd2567db MDL-41554 rss: Move to more robust test url
tinyurl was sometimes failing (was bad to use them anyway)
2013-10-18 12:45:46 +08:00
Dan Poltawski b390cce066 Merge branch 'MDL-42421_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-10-18 12:15:11 +08:00
Damyon Wiese 691a2cc881 MDL-42112 tablelib: Generate the correct number of cols for empty rows
(And a test for it).
2013-10-18 11:53:52 +08:00
Damyon Wiese 690d3ed5fa MDL-42112 Tablelib: Add unit tests (some) 2013-10-18 11:53:51 +08:00
Mark Nelson 3c78a1c381 MDL-42421 auth: removed incorrect statement in upgrade.txt 2013-10-18 11:38:08 +08:00
Ankit Agarwal 68fb639f97 MDL-42272 groups: Add automated tests for MDLQA-145 2013-10-17 11:03:06 +08:00
Marina Glancy b96535cdaa MDL-42323 coursecat: Changed phpdocs in deprecated function get_categories 2013-10-17 09:56:30 +11:00
Damyon Wiese 5cd7d9c9fe Merge branch 'MDL-42065_25' of https://github.com/sam-moodle/moodle into MOODLE_25_STABLE 2013-10-16 15:47:12 +08:00
Rajesh Taneja c7f9332f11 MDL-31405 Assignment: Fixed date in reset to be called once 2013-10-16 12:09:06 +08:00
Marina Glancy 0446e658c2 MDL-42347 course: Added behat test for deleting a course 2013-10-16 15:05:56 +11:00
Jayesh Anandani 090e0ad543 MDL-31405 Assignment reset issue solved 2013-10-16 11:54:14 +08:00
Damyon Wiese 51db769bbd Merge branch 'MDL-37528-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-10-16 10:42:04 +08:00
Eloy Lafuente (stronk7) 644a0d0023 MDL-37877 backup: fix incorrect backported code. 2013-10-16 00:34:54 +02:00
Davo Smith 5ef9103c67 MDL-35402 forms - prevent crash when multiple rules defined on an editor element 2013-10-15 14:33:38 +01:00
Damyon Wiese 5d56f7d188 Merge branch 'MDL-37877-m25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-15 16:57:16 +08:00
Dan Poltawski f12a4819ef Merge branch 'MDL-42209_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-10-15 14:43:12 +08:00
Ankit Agarwal a48e5399a1 MDL-42293 behat: Add suport for custom admin paths to the behat upload repository step 2013-10-15 13:46:03 +08:00
Ankit Agarwal f2793fa225 MDL-37877 backup: Fix issues with zipping of large files
Files bigger than 4GB is not supported at this point. Zip archiver doesn't know about it and always returns true. We need to verify if it is a valid file or not and delete if not
Also delete the backup file immediately if anything goes wrong anywhere in backup. We don't want to use up space
2013-10-15 13:16:49 +08:00
Dan Poltawski 26037c6e3d Merge branch 'wip-MDL-42288-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-10-15 11:53:03 +08:00
Marina Glancy f4c8c454b9 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:43:15 +11:00
Marina Glancy d3cb602c42 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-15 14:24:37 +11:00
Marina Glancy 071ac9ffdd Merge branch 'wip-MDL-42234-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2013-10-15 14:11:40 +11:00
Tim Hunt 6efb360102 MDL-42309 typo: fix reponse -> response throughout Moodle. 2013-10-15 13:48:39 +11:00
Adrian Greeve 8f5fea965a MDL-42234 - Repositories: Fix undefined variable notice when no repositories are enabled. 2013-10-15 10:43:14 +08:00
Damyon Wiese c0c2547bf6 Merge branch 'MDL-42198_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-14 16:15:10 +08:00
Dan Poltawski 4d2d515c47 Merge branch 'MDL-42151_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-14 16:12:05 +08:00
Dan Poltawski 9070663ecd Merge branch 'w42_MDL-42082_m25_authdbpass' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-14 14:36:22 +08:00
FilipBenco d35fc13537 MDL-42209 backup: fixed wrong icon being displayed when restoring course 2013-10-14 14:33:18 +08:00
Damyon Wiese 84a185f513 MDL-34586 assignment - fix whitespace 2013-10-14 14:28:24 +08:00
Damyon Wiese f5c356d06c Merge branch 'MDL-34586-25' of https://github.com/mackensen/moodle into MOODLE_25_STABLE 2013-10-14 14:27:48 +08:00
Dan Poltawski 73dc6a5b52 Merge branch 'MDL-42232_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-10-14 14:24:10 +08:00
Damyon Wiese 15ba938554 Merge branch 'MDL-34612-25' of https://github.com/mackensen/moodle into MOODLE_25_STABLE 2013-10-14 14:12:38 +08:00
Ankit Agarwal 053cee9767 MDL-41170 events: Update upgrade.txt to reflect changes made in MDL-41170 2013-10-14 13:19:22 +08:00
Akinsaya Delamarre 74f501e7b5 MDL-41170: Added user updated event triggers to password updating functions. 2013-10-14 13:17:19 +08:00
David Monllao 12539911a2 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:45 +08:00
David Monllao d0df167ba2 MDL-42151 behat: Adding the version to the testplan 2013-10-14 12:44:26 +08:00
Dan Poltawski 85cb1bc059 Merge branch 'MDL-41672-text-mail-links_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-10-14 12:11:47 +08:00
Dan Poltawski e13f7b4ed4 Merge branch 'MDL-42167-workshop-update-record_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-10-14 12:08:10 +08:00
Thijs Kinkhorst 1e34fbb36d MDL-36818 cas: improve SSL validation 2013-10-14 10:12:22 +08:00
Eloy Lafuente (stronk7) 88401c3494 Merge branch 'wip-mdl-41843-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-14 00:14:54 +02:00
Eloy Lafuente (stronk7) 2f334c6464 Merge branch 'MDL-37181_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-10-13 23:32:46 +02:00
Andrew Nicols 85d8381fe7 MDL-29441 Chat: Use a valid name for chat popup actions 2013-10-13 20:05:54 +08:00
Petr Škoda 6cc255a25d MDL-42110 do not show auth_db password in plaintext 2013-10-12 13:52:57 +02:00
AMOS bot 77b1206511 Automatically generated installer lang files 2013-10-12 00:43:48 +00:00
Tim Hunt 2f4fceec28 MDL-42232 Multiple choice question choice alignment issue
The problem was with the alignment of:
* tables inside the choices.
* Lists inside the choices.
* The specific feedback, when it spanned mulitple lines.

The problem was introduced by MDL-39420.
2013-10-11 14:26:24 +01:00
Eloy Lafuente (stronk7) 5c740905f5 weekly release 2.5.2+ 2013-10-11 13:21:02 +02:00
Andrew Davis aba5044091 MDL-26244 mod_date:added some logic show or hide the file picker button based on repository availability 2013-10-11 10:45:46 +07:00
Sam Hemelryk 903cdd6fe8 MDL-42072 badges: fixed cookie use 2013-10-11 09:34:29 +13:00
David Monllao 230c137498 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:35:30 +08:00
Andrew Nicols 75da763cd9 MDL-37528 Libraries: Fix gesture + mouse issues with YUI
This addresses issues with devices which support both mouse and gesture
input devices whereby the presence of gesture support on the device causes
mouse interactions to be ignored.

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

This is fixed in the latest version of YUI in a similar way, and the
addition of a new system to only trigger the event from the first action to
be triggered.
2013-10-10 17:02:02 +08:00
Matteo Scaramuccia 22b70ca985 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:12:07 +02:00
Dan Poltawski 5ed1769371 MDL-41379 - fix whitespace 2013-10-10 10:33:14 +08:00
Dan Poltawski 26f1ad0c09 Merge branch 'MDL-41379_outcomes_25' of https://github.com/andyjdavis/moodle into MOODLE_25_STABLE 2013-10-10 10:32:04 +08:00
Andrew Davis 9d7c75bb3a MDL-41379 core_outcome: added some CSS to the course outcome table to make it display nice 2013-10-10 09:27:33 +07:00
Marina Glancy dd70b2b84a Merge branch 'MDL-37153_25' of https://github.com/pauln/moodle into MOODLE_25_STABLE 2013-10-10 12:53:04 +11:00
Sam Hemelryk 9c60ab1513 Merge branch 'wip-mdl-41744-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-10-10 14:39:32 +13:00
Sam Chaffee 5deb021566 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:27:18 -06:00
Alain Corbière a182efb289 MDL-41672 Fix html2text processing of multiple occurrences of the same URL 2013-10-09 15:44:18 +02:00
David Mudrák 1ee66b79a9 MDL-41672 Add html2text unit test for multiple occurrences of the same URL 2013-10-09 15:44:07 +02:00
Dan Poltawski 72c707f101 Merge branch 'w41_MDL-42054_m25_phpmailertesting_i' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-09 18:19:58 +08:00
Petr Škoda 5c5687765e MDL-42054 fix incorrect email redirection in unit tests 2013-10-09 11:49:27 +02:00
Dan Poltawski 7d3a6249a8 Merge branch 'MDL-39776-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-10-09 16:54:17 +08:00
Dan Poltawski 686abf0be9 Merge branch 'm25_MDL-40226_Add_JNLP_MIME_Type_Support' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-10-09 16:48:11 +08:00
Damyon Wiese 59e180d6d7 Merge branch 'w41_MDL-42047_m25_cohortdel' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-09 14:42:42 +08:00
Mark Nelson 8580fba156 MDL-37181 backup: stopped setting the status of unscheduled backups to skipped 2013-10-09 14:16:09 +08:00
Damyon Wiese df253b3030 Merge branch 'MDL-41659_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-10-09 13:35:43 +08:00
Damyon Wiese 418d50d6a7 Merge branch 'wip-MDL-41967-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2013-10-09 13:12:14 +08:00
Jason Fowler 30bf77467e MDL-39776 Javascript - enable formautosubmit from a select box on android 2013-10-09 11:37:07 +08:00
Charles Fulton 46575720a1 MDL-34612 forum: convert default format value during restore 2013-10-08 20:04:56 -07:00
Paul Nicholls 7551ada29a MDL-37153 - assign: Obey grade display settings in submission status
The assignment submission status screen was ignoring the grade item's
display setting, showing scores even if it's set to display letters only.
2013-10-09 16:00:13 +13:00
Tim Lock 7258ef74f5 MDL-41908 QuickForm: Fix PEAR Non-static method error 2013-10-09 10:27:20 +08:00
James Henestofel 7822bb9b6d MDL-42068 Filepicker course listing use setting courselistshortname to show shortname and fullname 2013-10-09 01:27:42 +02:00
Eloy Lafuente (stronk7) 5e50cd9355 Merge branch 'MDL-42069_25' of https://github.com/appalachianstate/moodle into MOODLE_25_STABLE 2013-10-08 21:27:18 +02:00
Charles Fulton d5336bd3f4 MDL-34586 assignment: convert default format value during restore 2013-10-08 09:47:57 -07:00
Rajesh Taneja 6b3870a612 MDL-41843 IMS-LTI: Fixed exception namespace 2013-10-08 15:55:30 +08:00
Dongsheng Cai 1027fd95bd MDL-41843 Uses OAuthException in moodle\mod\lti namespace 2013-10-08 15:55:29 +08:00
Damyon Wiese 46b46de84d Merge branch 'MDL-41520-MOODLE_25_STABLE-mod_lti-completion-view' of github.com:Trii/moodle into MOODLE_25_STABLE 2013-10-08 14:34:03 +08:00
Damyon Wiese 43eb9aadcd Merge branch 'MDL-32570-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-10-08 13:47:18 +08:00
Dan Poltawski fa4dda1dcb Merge branch 'MDL-38655_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE 2013-10-08 13:21:37 +08:00
Damyon Wiese a59646ee31 Merge branch 'MDL-42122_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE 2013-10-08 12:49:07 +08:00
Rossiani Wijaya eea9ffd551 MDL-38664 Lesson mod: code improvement for lesson attemps 2013-10-08 10:44:28 +08:00
Joseph Rézeau 21c314df14 MDL-38664 Lesson mod: fixed re-attempt unseen page 2013-10-08 10:44:17 +08:00
Marina Glancy 573ceb9459 Merge branch 'MDL-25176_m25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2013-10-08 12:03:48 +11:00
Petr Škoda 896a790f69 MDL-41197 normalize ascii text conversion 2013-10-08 00:00:21 +02:00
Sam Hemelryk 06db3cf3cc Merge branch 'MDL-42188_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-10-08 08:52:04 +13:00
Eloy Lafuente (stronk7) 2895da0152 MDL-42188 shifter: delete some orphaned files 2013-10-07 21:45:42 +02:00
Frederic Massart 7776c0d28f MDL-22669 course: Display section number for orphaned activities 2013-10-07 16:54:22 +08:00
Dan Poltawski 5a12c4e258 Merge branch 'MDL-42013_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-07 11:33:45 +08:00
Sam Hemelryk 2ec16f735a Merge branch 'MDL-42072_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-10-07 15:39:42 +13:00
Sam Hemelryk c50daf9ae7 Merge branch 'w41_MDL-41197_m25_convnotices' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-07 13:42:47 +13:00
Sam Hemelryk 93bf71cd8e Merge branch 'MDL-41352-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-10-07 12:34:07 +13:00
Matteo Scaramuccia e5ae972885 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:37:51 +02:00
Joshua Johnston 92b226d58d MDL-41520 LTI: Does not track page views for completion 2013-10-04 09:46:07 -04:00
Fred Woolard b8fe053e0d MDL-42069 mod_quiz add lastname sort for manual grading 2013-10-04 09:11:11 -04:00
Petr Škoda 804f44a191 MDL-42047 fix cohort method name error after deleting cohort 2013-10-04 11:32:56 +02:00
Petr Škoda 1e8dcbd251 MDL-41197 ignore all problems when converting texts 2013-10-04 11:10:36 +02:00
David Monllao 29a3e32499 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 15:03:25 +08:00
David Monllao 56a0ca595b 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 15:03:24 +08:00
Sam Hemelryk 22084d5ea2 weekly release 2.5.2+ 2013-10-04 15:43:50 +13:00
Sam Hemelryk af911b089a Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-10-04 15:43:45 +13:00
Adam Olley 635216b08b MDL-38655: mod_assign: Use correct ordering on cap checks for submission downloads
Conflicts:
	mod/assign/locallib.php
2013-10-04 09:32:52 +09:30
Adam Olley 60da0467ec MDL-42122 block_community: Dont show install option without capability 2013-10-03 14:25:55 +09:30
Rajesh Taneja e35aca3b0b MDL-41744 Users: Convert key to value in bulk upload
Menu profile field expects value, during bulk upload if value is passed by form
then options key is passed. So converting key to value if passed though form
2013-10-03 10:18:00 +08:00
Sam Hemelryk a4aec61855 Revert "MDL-33569 themes: Labels create extra margin below content."
This reverts commits:
* 050e0d8724.
* 055418e963.
2013-10-03 14:43:15 +13:00
Eric Merrill 86eec9b429 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:18:43 -04:00
Damyon Wiese b085cf96d3 Merge branch 'MDL-41955_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-02 08:42:34 +08:00
Yuliya Bozhko 320376f0b7 MDL-41659 badges: Display course/site names through format_string() 2013-10-02 08:45:41 +13:00
Tim Lock 06e8ce4f88 MDL-41996: Don't show the Review Attempt link if no attempts exist. 2013-10-01 20:04:55 +02:00
Eloy Lafuente (stronk7) 46b23b69fa Merge branch 'wip-MDL-41921-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-10-01 19:56:27 +02:00
Eloy Lafuente (stronk7) a348f55e3f Merge branch '41997-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-10-01 19:53:22 +02:00
Eloy Lafuente (stronk7) 3ee1a66de9 Merge branch 'w40_MDL-41999_m25_userpw' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-10-01 15:59:15 +02:00
Marina Glancy 31f1464297 Merge branch 'MDL-32592-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-10-01 20:49:29 +10:00
Marina Glancy e4f0750a12 Merge branch 'MDL-39653-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-10-01 20:43:25 +10:00
Adrian Greeve 2bb1ee93df MDL-41967 - Gradebook: Fixed an sql syntax error for gradebook custom profile fields. 2013-10-01 17:58:16 +08:00
Damyon Wiese 190cd152a6 Merge branch 'MDL-41913_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-01 15:54:27 +08:00
Dan Poltawski b1edf3afac MDL-32570 enrol_imsenterprise: don't hardcode default category id 2013-10-01 15:51:35 +08:00
Damyon Wiese f0233c7acd Merge branch 'MDL-41882_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE
Conflicts:
	admin/tool/generator/version.php
2013-10-01 15:41:33 +08:00
Damyon Wiese a2742ff0de Merge branch 'MDL-41861_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-01 15:36:25 +08:00
Damyon Wiese 1702f40046 MDL-41853 tool_generator: Fix version bump for backport 2013-10-01 15:18:48 +08:00
Damyon Wiese df831ae75f Merge branch 'MDL-41853_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-10-01 14:56:53 +08:00
Nadav Kavalerchik fc41842371 MDL-41264 Themes: Right align Tabs on Wiki page, when in RTL mode (theme/clean) 2013-10-01 15:02:26 +10:00
Sam Hemelryk e45ef9ec88 MDL-41398 bootstrap: added a maintenance layout 2013-10-01 14:31:49 +10:00
Yuliya Bozhko 021501f152 MDL-42072 badges: Fix output and headers in badges ajax scripts 2013-10-01 16:48:04 +13:00
Sam Hemelryk 5076c6dd17 MDL-41828 mod: fixed navbar when adding modules to a course 2013-10-01 13:32:59 +10:00
Sam Hemelryk a91af282a3 MDL-41900 events: avoid new debug call within unit tests 2013-10-01 16:21:10 +13:00
Sam Hemelryk 8c90bbcde0 Merge branch 'MDL-41995_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-10-01 14:50:13 +13:00
Sam Hemelryk ae9f3c0671 Merge branch 'MDL-41900-m25' of git://github.com/micaherne/moodle into MOODLE_25_STABLE 2013-10-01 14:35:37 +13:00
Sam Hemelryk 82ce52426e Merge branch 'MDL-41894-m25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-10-01 13:44:54 +13:00
AMOS bot 944cd43d0d Automatically generated installer lang files 2013-10-01 00:41:46 +00:00
Sam Hemelryk b45f2c01c6 Merge branch 'MDL-41228_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-10-01 13:37:29 +13:00
Sam Hemelryk a45ff7d8a6 Merge branch 'wip-MDL-41676-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-10-01 10:01:16 +13:00
Sam Hemelryk 3f4b04ec3e Merge branch 'MDL-37973_m25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2013-10-01 09:53:56 +13:00
Eloy Lafuente (stronk7) 69634029f5 Merge branch 'MDL-26408-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-09-30 16:01:46 +02:00
David Monllao 2980b5cfff MDL-41955 tool_generator: Adding a file size limit 2013-09-30 17:06:02 +08:00
David Monllao 10a020f07f MDL-41955 tool_generator: New unit test checking the generated files size 2013-09-30 17:06:02 +08:00
David Monllao 8c76886dff MDL-41913 tool_generator: Adding a CLI tool to generate the test plan 2013-09-30 17:05:06 +08:00
David Monllao 71f774e5e8 MDL-41913 tool_generator: Adding a test plan generator to feed JMeter
Also changing course_backend.php coding style
according to codechecker.
2013-09-30 17:00:52 +08:00
David Monllao 3320e59e51 MDL-41913 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-30 17:00:52 +08:00
David Monllao 188fd8006b MDL-41913 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-30 17:00:52 +08:00
David Monllao c09fed9ee4 MDL-41882 tool_generator: New unit test 2013-09-30 16:58:36 +08:00
David Monllao 028b8dc3e9 MDL-41882 tool_generator: Adding maketestsite script
Uses maketestcourse.php to set up
a test site.
2013-09-30 16:58:34 +08:00
Marina Glancy d23f108197 Merge branch 'MDL-41954-workshop-zero-variance_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-09-30 16:10:48 +10:00
Adam Olley 4e87aec553 MDL-40515: report_log: List activities in optgroups
Prevents users from generating reports on invalid values

Change-Id: If358fa06c8dadd33bb2875ea54ab4bce97b16aff
2013-09-30 11:18:03 +09:30
Sam Hemelryk df3108ed21 NOBUG: rebuilt bootstrap CSS 2013-09-30 11:11:03 +13:00
Sam Hemelryk fea809a7b8 Merge branch 'MDL-33569_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-09-30 10:45:44 +13:00
Sam Hemelryk 96f91e34bf MDL-41997 cache: dummy store now uses static acceleration for session + request 2013-09-30 09:42:39 +13:00
Sam Hemelryk 0055b93959 MDL-41997 cache: added unit tests for disabled stores 2013-09-30 09:42:36 +13:00
Mary Evans 055418e963 MDL-33569 theme_boostrapbase: adding re-compiled style/moodle.css 2013-09-28 16:00:23 +01:00
Mary Evans 050e0d8724 MDL-33569 themes: Labels create extra margin below content. 2013-09-28 15:55:06 +01:00
Petr Škoda e404da07d4 MDL-41999 do not use $USER->password directly 2013-09-27 10:54:43 +02:00
Marina Glancy b81afac481 MDL-41942 course: Allow course listings to work with caches disabled 2013-09-27 18:34:37 +10:00
Marina Glancy b0aea95a96 MDL-41921 mod_url: less restrictions on URL field
Restoring functionality from 2.4 accidentally removed in MDL-34311
2013-09-27 18:33:44 +10:00
Marina Glancy 95d6999f89 MDL-41676 Corrected logic when to dim the activity name and content 2013-09-27 18:31:51 +10:00
Marina Glancy c777836c69 weekly release 2.5.2+ 2013-09-27 14:53:29 +10:00
Marina Glancy 9573950b9d Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-09-27 14:51:14 +10:00
Dan Poltawski c0a5cd3e33 MDL-39653 enrol_imsenterprise: only mail admins on change
The existing beavhiour was sending useless emails to admins and
generating warnings.

Thanks to Matthew Orlando for the suggested fix.
2013-09-27 12:23:48 +08:00
Mark Nelson e26f1e83a1 MDL-41995 calendar: changed the page layout for the export page 2013-09-26 16:54:20 +08:00
Dan Poltawski 7f5f0ba2d3 MDL-32592 enrol_imsenterprise: fix error when category not defined
thanks to Henrik Thorn for the fix
2013-09-26 14:59:48 +08:00
Dan Poltawski acd6ad0fa1 MDL-26408 enrol_imsenterprise: fix invalid component 2013-09-26 12:22:14 +08:00
AMOS bot f0b5658ee9 Automatically generated installer lang files 2013-09-26 00:44:18 +00:00
David Monllao 456c9d1648 MDL-41882 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-25 10:13:30 +08:00
David Monllao b0e19c4ca6 MDL-41861 tool_generator: Adding fixeddataset option 2013-09-25 10:12:33 +08:00
David Monllao c65e322ff0 MDL-41861 tool_generator: Unit test for fixeddataset 2013-09-25 10:12:33 +08:00
David Monllao e6f9c31b6e MDL-41853 tool_generator: Adding required files
No autoloader in Moodle 2.5
2013-09-25 10:11:18 +08:00
Dan Poltawski 186a80d203 MDL-41853 tool_generator: fix use of raw LIKE sql 2013-09-25 10:11:18 +08:00
sam marshall e886af6e7e MDL-41853 Script to generate standard-size large course for testing 2013-09-25 10:11:16 +08:00
Eloy Lafuente (stronk7) d5971d75a1 Merge branch 'MDL-41910_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-09-25 03:11:49 +02:00
Petr Škoda 7c97129a9a MDL-41223 do not store any form of login URL in $SESSION->wantsurl
Credit goes to Michael Milette, thanks.
2013-09-25 10:57:54 +10:00
Eloy Lafuente (stronk7) a943166fc1 Merge branch 'MDL-41852_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-09-25 02:49:10 +02:00
Matt Petro 8917283c22 MDL-41660 backup ims-cc: Use correct temp directory 2013-09-25 02:15:47 +02:00
Eloy Lafuente (stronk7) 8ecd67c48e Merge branch 'MDL-41342_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-25 02:13:22 +02:00
Eloy Lafuente (stronk7) 1cf52db9b4 Merge branch '40903-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-09-25 02:00:34 +02:00
David Mudrák b5b58382fb 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 01:57:03 +02:00
Sam Hemelryk b8cf62bf04 Merge branch 'MDL-41907_m25' of https://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2013-09-25 10:18:13 +12:00
Eloy Lafuente (stronk7) 4008db6d6a Merge branch 'wip-MDL-41594-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-09-24 23:21:04 +02:00
Marina Glancy 90336898da Merge branch 'MDL-40550_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-09-24 21:43:18 +10:00
Marina Glancy 0184a31bad Merge branch 'MDL-41929_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-09-24 21:32:35 +10:00
Sam Hemelryk de760ea9a3 MDL-40903 cached: fixed up versions 2013-09-24 21:13:33 +12:00
Sam Hemelryk cf078f8427 MDL-40903 cache: renamed persistcache to staticacceleration 2013-09-24 21:13:33 +12:00
Sam Hemelryk 6ad2368071 MDL-40903 cache: fixed up event invalidation 2013-09-24 21:13:33 +12:00
Marina Glancy ae3f682a63 MDL-40903 cache: Unittests and small fixes for persistent application cache 2013-09-24 21:13:33 +12:00
Sam Hemelryk b7a3f7457d MDL-40903 cache: coding style tidyup pre-integration 2013-09-24 21:13:32 +12:00
Sam Hemelryk c755b4ef1f MDL-40903 cache: converted persistent into persistentdata
At the same time all cache instances were made persistent
2013-09-24 21:13:32 +12:00
Ankit Agarwal bdd668849b MDL-41894 feedback: Remove unused code, which is generating warnings 2013-09-24 15:01:15 +08:00
AMOS bot bd993fcf5c Automatically generated installer lang files 2013-09-24 00:42:00 +00:00
Sam Hemelryk 72ca4b0acf Merge branch 'MDL-40848_m25' of git://github.com/totara/openbadges into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-24 09:17:52 +12:00
Sam Hemelryk 9b70e23754 Merge branch 'MDL-36465-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-09-24 08:32:57 +12:00
Tim Hunt 4c619d6788 MDL-41929 quiz statistics, overall stats not displayed. 2013-09-23 18:07:47 +01:00
Marina Glancy 1537f8241e Merge branch 'MDL-41833-m25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-09-23 19:17:34 +10:00
David Monllao 0129cc9ec7 MDL-41910 user: Allowing LASTACCESS_UPDATE_SECS overwrite 2013-09-23 16:57:53 +08:00
Andrew Nicols 35c81d2938 MDL-36465 Course JavaScript: Ensure that the zero section is not draggable 2013-09-23 09:19:18 +01:00
Jason Fowler c537b4a9d5 MDL-41352 MyMobile - fixing region/layout/drag-n-drop issues 2013-09-23 14:09:43 +08:00
Marina Glancy 30f43b0e9c Merge branch 'wip-MDL-41772-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2013-09-23 14:40:35 +10:00
AMOS bot 7ceb85398d Automatically generated installer lang files 2013-09-21 00:42:38 +00:00
Sam Hemelryk ca1c4bacbf weekly release 2.5.2+ 2013-09-20 14:42:03 +12:00
Sam Hemelryk 158785810a Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-09-20 14:34:46 +12:00
Eric Merrill f9c7450825 MDL-41907 Repositories: Maintain the sortorder of a file when overwriting it. 2013-09-19 18:53:58 -04:00
Eric Merrill c41e70525b 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:58:05 -04:00
Michael Aherne 98fa01e59f MDL-41900 events Log handler failures 2013-09-19 15:55:50 +01:00
David Monllao c455e8bca5 MDL-41342 admin: Adding warning when upgrading a test site 2013-09-19 15:07:37 +08:00
AMOS bot 9fbe8daafb Automatically generated installer lang files 2013-09-19 00:44:11 +00:00
sam marshall 5b15ad907a MDL-41852 Resource: Does not have generator 2013-09-18 15:44:47 +08:00
Simon Coggins 6880b9f822 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-18 12:58:42 +12:00
AMOS bot fc246cab3c Automatically generated installer lang files 2013-09-18 00:45:30 +00:00
Eloy Lafuente (stronk7) dd344e3709 Merge branch 'wip-mdl-41717-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-09-17 21:22:42 +02:00
Eloy Lafuente (stronk7) 2307474181 Merge branch 'MDL-41728-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-09-17 21:18:34 +02:00
Eloy Lafuente (stronk7) 9336caebaa Merge branch 'wip-mdl-41711-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-09-17 20:29:59 +02:00
Marina Glancy 09b8f892ac MDL-41594 Bug fix for orphaned invisible categories
thanks to L.Sanocki
2013-09-17 20:58:33 +10:00
Ankit Agarwal 81d8cc2765 MDL-41833 feedback: Fix setType() warning when deleting a response in feedback 2013-09-17 15:26:29 +08:00
Eloy Lafuente (stronk7) 69253612e4 Merge branch 'MDL-41595_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-09-17 02:15:22 +02:00
Sam Hemelryk b27ca3514e Merge branch 'MDL-41667_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-09-17 08:58:33 +12:00
Sam Hemelryk 6d05276c02 Merge branch 'MDL-38317-moodle25' of git://github.com/StudiUM/moodle into MOODLE_25_STABLE 2013-09-17 08:39:02 +12:00
Jean-Philippe Gaudreau b35c36def5 MDL-38317 grade import: Translation support for import mappings form. 2013-09-16 09:20:12 -04:00
Marina Glancy eca39eaeee Merge branch 'MDL-41315-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-09-16 15:32:45 +10:00
Yuliya Bozhko a2547d7087 MDL-40550 badges: Change wording of badge activation message
Add confirmation check when activating badge from management page
2013-09-16 15:34:33 +12:00
Sam Hemelryk 82dc37c88c Merge branch 'MDL-38194-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-09-16 13:55:25 +12:00
Sam Hemelryk c998a75fdb Merge branch 'MDL-41637_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-09-16 13:50:54 +12:00
AMOS bot d443dd501f Automatically generated installer lang files 2013-09-16 00:40:26 +00:00
Sam Hemelryk f534464a06 Merge branch 'MDL-41662_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-09-16 10:47:47 +12:00
Sam Hemelryk f8eaa73b41 Merge branch 'm25_MDL-37524' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-09-16 10:38:34 +12:00
Sam Hemelryk 10c3f9e7e8 Merge branch 'wip-MDL-27684-MOODLE_25_STABLE' of git://github.com/satrun77/moodle into MOODLE_25_STABLE 2013-09-16 10:27:01 +12:00
Dan Marsden 7cf1d8bd60 MDL-37524 SCORM: mode not calculated correctly. 2013-09-16 10:13:18 +12:00
AMOS bot caf0834e40 Merge branch 'MOODLE_25_STABLE' into install_25_STABLE 2013-09-14 00:41:35 +00:00
sam marshall 5912c3e43e 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 15:01:13 +01:00
Tim Hunt 71eb4e2cda MDL-41667 quiz: Fix CSS rules.
Thanks to Renaat Debleu for spotting this problem.
2013-09-13 11:00:42 +01:00
Henning Bostelmann eb6492e62f 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:26:57 +01:00
Damyon Wiese 0b213ee795 MDL-41315 assign: Add unit test for groupmembersonly 2013-09-13 16:47:11 +08:00
Damyon Wiese ad02ac1d8c 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.

Conflicts:

	mod/assign/locallib.php
2013-09-13 16:47:08 +08:00
Adrian Greeve 09c5de5075 MDL-41772 - mod_data: Fixed database_module comments not being restored. 2013-09-13 15:33:17 +08:00
Damyon Wiese 444433b575 weekly release 2.5.2+ 2013-09-13 14:08:51 +08:00
Mohamed Alsharaf a12346d527 MDL-27684 repository: make require_login() throws exception instead of redirect 2013-09-13 16:08:36 +12:00
AMOS bot 3eb159ca23 Automatically generated installer lang files 2013-09-13 00:48:40 +00:00
David Monllao ffc377877b 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:53:36 +08:00
Damyon Wiese da09c760a4 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:37:29 +08:00
sam marshall c4492952bf 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:36:08 +01:00
Rajesh Taneja 7671200b0f MDL-28561 blocks_rss_client: Fixed line separator color in bootstrap
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-11 17:44:27 +08:00
Rajesh Taneja d1b7e2dfa5 MDL-41717 Theme: Aligned completion checkbox and commands on course page for label 2013-09-11 16:16:36 +08:00
Rajesh Taneja 314285ef10 MDL-41711 Glossary: Fixed seach label alignment 2013-09-11 14:39:01 +08:00
prateeksachan c544b9c601 MDL-38267 assign: No Submit button after cut-off date 2013-09-11 12:18:27 +08:00
Sam Hemelryk 8377c04acf Merge branch 'wip-mdl-41605-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-09-11 10:49:53 +12:00
Sam Hemelryk 884d1b2a41 Merge branch 'MDL-41658_M25' of git://github.com/kordan/moodle into MOODLE_25_STABLE 2013-09-11 09:42:25 +12:00
Matthew Noorenberghe 4342b9320d MDL-41634 - URL Download Repository doesn't warn when asked to download non-image files 2013-09-11 09:37:35 +12:00
Sam Hemelryk 7952a767a3 Merge branch 'MDL-41528_MOODLE_25_STABLE' of https://github.com/nitzo/moodle into MOODLE_25_STABLE 2013-09-11 09:26:21 +12:00
Sam Hemelryk eb398c5ce6 Merge branch 'MDL-41630-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-09-11 09:20:39 +12:00
Sam Hemelryk 89c92427ad Merge branch 'wip-MDL-41578-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-09-11 09:00:23 +12:00
Sam Hemelryk c26684b2be Merge branch 'MDL-41587_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-09-11 08:52:38 +12:00
Sam Hemelryk 492351897d Merge branch 'MDL-41555_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-09-11 08:50:50 +12:00
Rajesh Taneja b7e603a70c MDL-41590 Enrolments: If course is deleted, then use courseid for reference 2013-09-11 08:46:59 +12:00
Yuliya Bozhko 05f840e8a4 MDL-40471 badges: Fixes around badge capabilities and navigation 2013-09-11 08:43:20 +12:00
Dan Poltawski 039b551f68 Merge branch 'MDL-40631-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-09-10 14:31:51 +08:00
Dan Poltawski e869047273 Merge branch '41189-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-09-10 14:12:18 +08:00
Damyon Wiese 0e3841a273 Merge branch 'wip-mdl-23335-m25' of https://github.com/deraadt/moodle into MOODLE_25_STABLE 2013-09-10 12:57:11 +08:00
Damyon Wiese 62674fcafc MDL-41497 auth_db: Fix typo in lang string. 2013-09-10 12:25:31 +08:00
Damyon Wiese b0d5d6b0bb Merge branch 'MDL-41497-25' of https://github.com/willylee/moodle into MOODLE_25_STABLE 2013-09-10 12:23:30 +08:00
Dan Poltawski 81a6ccf14a Merge branch 'MDL-28561_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-09-10 12:05:02 +08:00
Damyon Wiese 3a15ac7c21 Merge branch 'MDL-41451_25' of https://github.com/pauln/moodle into MOODLE_25_STABLE 2013-09-10 11:59:08 +08:00
Damyon Wiese 9c8c97c53e Merge branch 'MDL-41626-moodle25' of github.com:StudiUM/moodle into MOODLE_25_STABLE 2013-09-10 09:16:20 +08:00
Sam Hemelryk 3f6c2f7de8 Merge branch 'MDL-41600_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE 2013-09-10 13:11:54 +12:00
Adam Olley e8c41b0a5f 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:13:31 +09:30
Sam Hemelryk 0e2b007f33 MDL-32862 backup: fixed missing global 2013-09-10 10:47:25 +12:00
Sam Hemelryk 7eb3ddf9b5 Merge branch 'wip-MDL-32862-25' of git://github.com/abgreeve/moodle into MOODLE_25_STABLE 2013-09-10 09:38:35 +12:00
Sam Hemelryk eb52eb1df0 Merge branch 'MDL-29378-survey-25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-09-10 09:35:59 +12:00
Dan Poltawski 9778aa2333 Merge branch 'MDL-41254-m25' of git://github.com/micaherne/moodle into MOODLE_25_STABLE 2013-09-09 18:04:39 +08:00
David Mudrák 9cc00ae71e 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:21:48 +02:00
William Tam 04928750f0 MDL-37804 mod/assign: Students no longer able to submit files after due date with Prevent late submissions turned on. 2013-09-09 17:13:33 +08:00
Mary Evans 29892d8739 MDL-41595 mod_book: Book mod does not add TOC to default region 2013-09-09 09:48:53 +01:00
Mary Evans 6d44eaad0c MDL-40575 theme_bootstrapbase: Unable to scroll language menu in theme/clean. 2013-09-09 16:10:17 +08:00
Dan Poltawski 4d9ae8de10 Merge branch 'MDL-41163-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-09-09 15:39:45 +08:00
Damyon Wiese fa2d417f36 Merge branch 'wip-MDL-41517-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-09-09 12:10:53 +08:00
Damyon Wiese d2b7eee400 Merge branch 'm25_MDL-31232' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-09-09 11:45:30 +08:00
Rajesh Taneja e232c3b900 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-09 09:19:00 +08:00
AMOS bot 46658b1dcf Automatically generated installer lang files 2013-09-09 00:44:15 +00:00
Sam Hemelryk 971d920469 MDL-41417 course: fixed idnumbertaken string 2013-09-09 12:16:17 +12:00
Yuliya Bozhko e3fc376a86 MDL-41637 badges: Update modules ids retrieval 2013-09-09 11:56:38 +12:00
Paul Nicholls c50e070d29 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:29:59 +12:00
Yuliya Bozhko 37deeaf42e MDL-41662 badges: Fix viewing user profile when not logged in 2013-09-09 11:23:49 +12:00
Sam Hemelryk 119bc4adfc Merge branch 'MDL-38794_25' of https://github.com/prateeksachan/moodle into MOODLE_25_STABLE 2013-09-09 11:12:23 +12:00
Sam Hemelryk 9691b405fc Merge branch 'MDL-41417_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-09-09 10:51:07 +12:00
Sam Hemelryk efe6343ee0 Merge branch 'MDL-29378-survey-25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-09-09 10:48:37 +12:00
Sam Hemelryk a5f2a9da42 MDL-41189 fixed overflow issue with filepicker thumbnail 2013-09-09 08:24:35 +12:00
kordan 3746d1ae8b MDL-41658 theme_formal_white: text in input select is now never centered (fixed at central level) 2013-09-08 21:03:30 +02:00
AMOS bot 60a9a13c10 Automatically generated installer lang files 2013-09-08 00:43:07 +00:00
Eloy Lafuente (stronk7) 6acbecf531 Moodle release 2.5.2 2013-09-07 14:27:18 +02:00
Eloy Lafuente (stronk7) 93e4ea20f2 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-09-07 14:11:59 +02:00
Dan Poltawski 1aecfc42b6 MDL-41623 rss: clean output rss content 2013-09-07 10:41:37 +08:00
Eloy Lafuente (stronk7) 0694d65e7e MDL-41623 ensure all rss links are valid urls. 2013-09-07 04:05:38 +02:00
AMOS bot 60d9fe07a6 Automatically generated installer lang files 2013-09-07 00:43:08 +00:00
sam marshall bd2d268d13 MDL-41446 Completion: Incorrectly marks complete when grade data present with no actual grade 2013-09-06 13:04:34 +01:00
Mark Nelson 33a42df4ad MDL-41417 course: allow the use of duplicated idnumbers if they existed before fix 2013-09-06 15:19:01 +08:00
Francis Devine 85251082bf MDL-41417 course: prevent duplicate idnumbers being used when updating a course 2013-09-06 15:17:00 +08:00
Adrian Greeve 769bef0ee0 MDL-32862 - Backup: Rewriting resource_old links on backup. 2013-09-06 14:51:48 +08:00
Frederic Massart 5a45f5fd84 MDL-41630 oauth: Throw exception instead of dying on error 2013-09-06 10:48:15 +08:00
Paul Nicholls 4e93e23bcd 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:37:29 +12:00
Marina Glancy c93c81e263 MDL-41578 Fixed bug in coursecat::has_course_overviewfiles 2013-09-06 10:52:58 +10:00
AMOS bot 4589706812 Automatically generated installer lang files 2013-09-06 00:47:47 +00:00
AMOS bot ce31fccf0e Merge branch 'MOODLE_25_STABLE' into install_25_STABLE 2013-09-06 00:47:47 +00:00
Nitzan Bar b8648c74ed MDL-41528 enrol/ldap course default settings when no course template is selected 2013-09-06 02:13:22 +03:00
Jean-Philippe Gaudreau c729f19add MDL-41626 cas auth: Setting the right url for the multi-authentication page 2013-09-05 16:47:25 -04:00
sam marshall 8f0ce3ca17 MDL-41163 Restore: Large course restore timeout on schema page 2013-09-05 17:14:42 +01:00
Dan Poltawski 2d269d8a4f Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-09-05 14:43:20 +08:00
Dan Poltawski d8835503a8 weekly release 2.5.1+ 2013-09-05 13:36:12 +08:00
David Monllao 084e8459ef MDL-41587 tool_behat: Adding site name constant 2013-09-05 10:35:13 +08:00
David Monllao 0141968b9e 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:34:33 +08:00
Mark Nelson 60abf0f6bd MDL-40924 badges: added a print_error call to prevent PHP notices when no badges are found 2013-09-05 10:05:52 +08:00
David Mudrák f60c7e6851 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:01:42 +02:00
David Mudrák b46b093e5c 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:01:17 +02:00
David Mudrák 597f4acd89 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-04 23:42:35 +02:00
David Monllao 0c26302299 MDL-41568 lang: Fix behat features after changes 2013-09-04 15:18:43 +08:00
Damyon Wiese 59abd58e9f Merge branch 'MDL-41485-m25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-09-04 12:26:15 +08:00
Jason Fowler e8924ea727 MDL-35925 Behat - Fixing behat test for Create Folder 2013-09-04 11:55:52 +08:00
Damyon Wiese 32c5dad8f0 MDL-41179 assign: Ensure a submission record exists for lock/unlock
Can't change the function params because it is changed in master already.
This will create a draft submission when a student is prevented from submitting
but that is a minor sideeffect and doesn't happen in master.
2013-09-04 11:02:30 +08:00
Dan Poltawski f5fc022310 Merge branch 'wip-mdl-41418-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-09-04 10:38:19 +08:00
Eloy Lafuente (stronk7) f2900567a8 Merge branch 'MDL-40566_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-09-03 22:07:04 +02:00
Eloy Lafuente (stronk7) 247f3e95e7 Merge branch 'MDL-41568-en_fix-25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-09-03 15:11:41 +02:00
Helen Foster 09fd8327e2 MDL-41568 Merge English strings from the en_fix language pack 2013-09-03 12:50:11 +02:00
Mary Evans e5c7462afa MDL-28561 blocks_rss_client: Fixes lines between RSS feed items are not showing in all themes. 2013-09-03 09:51:55 +01:00
Damyon Wiese cdecb726ec Merge branch 'MDL-41348_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-09-03 16:09:46 +08:00
Tim Lock a5db1b5432 MDL-41304: Hide and handle LDAP error when user not in context being checked 2013-09-03 16:05:49 +08:00
Jason Fowler 3a9a74b259 MDL-35925 filepicker - Fixing behat tests 2013-09-03 15:48:08 +08:00
Aparup Banerjee 75b0c09bd1 MDL-37564 linked dependant plugin component text to plugins DB 2013-09-03 14:56:49 +08:00
Damyon Wiese a36b1f9c65 Merge branch 'MDL-33472-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-09-03 14:38:28 +08:00
Damyon Wiese efb7f5173a Merge branch 'm25_MDL-29218_plugin_init_not_blocking_when_false' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-09-03 14:28:58 +08:00
Damyon Wiese 6093c3ddf8 Merge branch 'MDL-32690_restoreMissingAssignment_25' of https://github.com/moodlerooms/moodle into MOODLE_25_STABLE 2013-09-03 14:16:10 +08:00
Michael de Raadt 00a3eed306 MDL-23335 mod_forum: allow multi-lang filtering of shortened messages 2013-09-03 13:40:32 +08:00
Yuliya Bozhko 5dffc067da MDL-41228 phpunit: Reset message processors list in unit tests 2013-09-03 17:39:18 +12:00
Dan Poltawski a60215797d Merge branch 'w36_MDL-41255_m25_changepw' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-09-03 12:58:52 +08:00
Dan Poltawski 5202933cdd Merge branch 'MDL-41428-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-09-03 12:28:20 +08:00
Dan Poltawski 3e07519d3f Merge branch 'wip-MDL-41179-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-09-03 11:48:58 +08:00
Marina Glancy ff8018c65c MDL-41517 Do not call fix_course_sortorder unnecessarily
Thanks to Thomas Worthington
2013-09-03 13:45:56 +10:00
David Monllao fe0f9adbe3 MDL-40566 behat: Update features using the new options 2013-09-03 11:15:12 +08:00
David Monllao 9e14d32b12 MDL-40566 behat: Adding info about the deprecated attr. 2013-09-03 11:10:30 +08:00
David Monllao 9ae0496854 MDL-40566 behat: Moving from behat_command to behat_selectors 2013-09-03 11:10:30 +08:00
David Monllao 79b2f3a6f9 MDL-40566 behat: Adding behat_selectors
Class that manages moodle selectors transition
to behat default selectors.
2013-09-03 11:10:30 +08:00
Dan Poltawski fb7bb9af16 Merge branch 'wip-MDL-41317-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-09-03 10:40:34 +08:00
Dan Poltawski 0522e090fb Merge branch 'MDL-40214_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-09-03 10:06:48 +08:00
Matteo Scaramuccia 2fa86e7b56 MDL-29218 Repository: fixed a typo in the PHPDoc 2013-09-02 23:14:37 +02:00
Matteo Scaramuccia 259415dc8d MDL-29218 Repository: $pname, get rid of all the useless code
More details in the Tracker.
2013-09-02 23:14:35 +02:00
Matteo Scaramuccia fd0608a226 MDL-29218 Repository: Hide the repo if repository::plugin_init returns false 2013-09-02 23:14:34 +02:00
Damyon Wiese a4945e23d6 MDL-40631: Prevent students from submitting empty assignments. 2013-09-02 21:59:53 +08:00
Michael Aherne dc4018e5c2 MDL-41254 backup Raise time and memory limit in precheck. 2013-09-02 11:45:25 +01:00
Dan Poltawski 5e86f2ea86 Merge branch 'MDL-41149-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-09-02 17:25:38 +08:00
Dan Poltawski 37d1f21b36 Merge branch 'MDL-35925-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-09-02 15:24:23 +08:00
Nitzan Bar 9dccff7793 MDL-41259 when duplicate course shortname exists an exception is thrown and sync is aborted 2013-09-02 15:08:28 +08:00
Damyon Wiese 18839cbbdc Merge branch 'MDL-41516-m25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-09-02 14:58:21 +08:00
Dan Poltawski 0ab8ba8bf9 Merge branch 'MDL-36093-moodle25' of github.com:StudiUM/moodle into MOODLE_25_STABLE 2013-09-02 14:10:39 +08:00
Dan Poltawski d6edbd9945 MDL-40676 tests: fix null byte test. 2013-09-02 13:59:12 +08:00
Yuliya Bozhko b51c44ac3d MDL-40712 badges: Display recipient information 2013-09-02 13:45:57 +08:00
Yuliya Bozhko 129e7dffeb MDL-40924 badges: Add caching to external badges 2013-09-02 13:45:13 +08:00
Petr Škoda 71b06edf6b MDL-40676 ignore null bytes 2013-09-02 12:27:58 +08:00
Dan Poltawski 5218a6e8fb Merge branch 'MDL-41175_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-09-02 11:52:21 +08:00
Dan Poltawski 581a1695ac Merge branch 'MDL-41328-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-09-02 11:44:58 +08:00
Andrew Nicols dacc2f8847 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:48 +08:00
AMOS bot ce1a153335 Automatically generated installer lang files 2013-09-02 00:47:08 +00:00
Andrew Nicols 7402dcd5fd 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-02 00:02:07 +01:00
Petr Škoda 24b58fa892 MDL-41255 fix incorrect redirection logic when changing password
Credit goes to Michael Milette.
2013-08-31 11:42:54 +02:00
AMOS bot 2fc1329f44 Merge branch 'MOODLE_25_STABLE' into install_25_STABLE 2013-08-31 00:43:54 +00:00
Willy Lee 42fd2c0b67 MDL-41497 auth_db: Added help text for using odbc dsn names instead 2013-08-30 10:24:50 -05:00
Willy Lee 1d2f1fe762 MDL-41497 enrol_database: Added help text for using odbc dsn names instead 2013-08-30 09:12:07 -05:00
Ankit Agarwal 756a0bc3a1 MDL-41485 calendar: Replace value of action buttons on managesubscription page with int 2013-08-30 17:20:30 +08:00
Dan Marsden 58a6404dbf MDL-31232 SCORM: Wrap suspend_data even when no spaces in value. 2013-08-30 20:34:51 +12:00
Damyon Wiese 0bd9f000b7 weekly release 2.5.1+ 2013-08-30 09:42:53 +08:00
AMOS bot 976d7e3442 Automatically generated installer lang files 2013-08-30 00:41:47 +00:00
Mark Nielsen 65d14146af 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:50:31 -07:00
Nadav Kavalerchik 3703b1d5de MDL-39682 Forms, File Picker, Themes: Fix alignment of Form's Labels and Input elements in RTL mode (theme/clean)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-29 10:16:51 +08:00
Sam Hemelryk eb0aa3f039 MDL-41213 theme_bootstrapbase: fixed license filemanager overflow
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-29 09:12:16 +12:00
Jean-Philippe Gaudreau 13142cece4 MDL-36093 grade export: Fix HTML special characters printed litteraly. 2013-08-28 09:16:00 -04:00
Tim Hunt 69492f8654 MDL-41348 question code depends on filelib.
I think this used to work because mod/forum/lib.php used to be included
everywhere, and in turn included lib/formslib.php. We should declare the
dependencey explicitly.
2013-08-28 11:18:23 +01:00
Damyon Wiese ef8a68a73f 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:31:32 +08:00
Colin Campbell f931b66a26 MDL-40214 mod_assign: Fixed issue with custom scale being lost during restore. 2013-08-28 10:52:10 +08:00
Marina Glancy 827c357830 MDL-41317 Set correct context to send bulk message page 2013-08-28 11:06:57 +10:00
AMOS bot 90f6e5af5d Automatically generated installer lang files 2013-08-28 00:53:50 +00:00
Eloy Lafuente (stronk7) 14616c145f Merge branch 'MDL-41387_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-08-27 21:00:28 +02:00
Eloy Lafuente (stronk7) 19ed5ae02f Merge branch 'm25_MDL-41410_Move_Comment_To_Appropriate_Place' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-08-27 19:46:00 +02:00
Dan Poltawski cb096cef51 Merge branch 'MDL-41366_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-27 18:09:41 +08:00
Damyon Wiese 01209ab96b Merge branch 'wip-MDL-41127-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-08-27 15:57:28 +08:00
Nadav Kavalerchik 0d376b00be MDL-39682 Forms, File Picker, Themes: Fix alignment of Form's Labels and Input elements in RTL mode (theme/clean)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-27 15:50:10 +08:00
Damyon Wiese fe3ccd7e4d Merge branch 'MDL-41401-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-08-27 15:08:13 +08:00
Dan Poltawski 44e1bb52ec Merge branch 'MDL-41321_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-27 14:08:14 +08:00
Dan Poltawski 7f0cbbfea6 MDL-38765 quiz: fix incorrect comment 2013-08-27 14:00:18 +08:00
Dan Poltawski 60426b9a2d Merge branch 'MDL-38765_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-27 13:52:22 +08:00
Damyon Wiese 5212cb7d8f Merge branch 'MDL-40877-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-08-27 12:49:36 +08:00
Damyon Wiese 082b0866bc Merge branch 'MDL-40447_M25' of https://github.com/nadavkav/moodle into MOODLE_25_STABLE 2013-08-27 12:29:21 +08:00
Nadav Kavalerchik 1715d58161 MDL-37211 Backup: Migrate hard-coded strings to language string for the table header labels on the restore page 2013-08-27 11:57:53 +08:00
Dan Poltawski abfbffa640 Merge branch 'wip-MDL-41222-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-08-27 11:03:48 +08:00
Damyon Wiese 5b04c580a1 MDL-40321 theme_bootstrapbase: Combine reset into existing overrides file 2013-08-27 10:46:31 +08:00
Frederic Massart 7788b69996 MDL-41428 repository_coursefiles: Missing white space in name 2013-08-27 10:30:20 +08:00
Damyon Wiese ab2a4e3562 Merge branch 'wip-MDL-40321_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-08-27 10:08:19 +08:00
Marina Glancy 3ab2f6c00a MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current 2013-08-27 09:49:58 +10:00
Dan Poltawski 0846c3a54a Merge branch 'MDL-41291-25' of git://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-08-26 18:07:00 +08:00
Damyon Wiese 739ed4ce38 MDL-41213 filepicker: Version bump for css changes 2013-08-26 16:17:17 +08:00
Damyon Wiese 6472bbfbc7 Merge branch '41213-25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-08-26 16:10:02 +08:00
Rajesh Taneja 897995391b MDL-41418 Administration: Page context should be set before setting page title 2013-08-26 15:25:42 +08:00
Dan Poltawski 9a29baa05e Merge branch 'MDL-35930_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-08-26 14:56:34 +08:00
Dan Poltawski 7f3b8fa7b7 Merge branch 'MDL-36126_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-08-26 14:25:29 +08:00
Mark Nelson 58e8778421 MDL-36126 backup: ensure the backup_logs message does not exceed the maximum allowed length in the DB 2013-08-26 20:41:22 +08:00
Damyon Wiese 879330c428 Merge branch 'mdl25_MDL-29004_wiki-fix-images-in-printer-friendly-view' of https://github.com/brki/moodle into MOODLE_25_STABLE 2013-08-26 13:50:54 +08:00
Marina Glancy b47150934d MDL-41127 Remove the quick category move dropdowns if page is too big 2013-08-26 15:42:27 +10:00
Dan Poltawski c9b822387b Merge branch 'MDL-41249-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-08-26 13:11:10 +08:00
Damyon Wiese 29b8db0e0b Merge branch 'wip-MDL-41106-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-08-26 09:43:58 +08:00
Damyon Wiese fcc147dd2d MDL-36803 tinymce: Version bump for js changes 2013-08-26 09:30:42 +08:00
Damyon Wiese c12ec889fa Merge branch 'MDL-36803-m25' of https://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-08-26 09:29:53 +08:00
Russell Smith 1627ea320a MDL-41291 cache: Use fread to avoid race conditions 2013-08-26 10:50:57 +10:00
Sam Hemelryk 63ce1b82c6 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:50:16 +12:00
Sam Hemelryk 6cc1668dcd MDL-41213 bootstrap: fixed sizing of filepicker selected file licence selector 2013-08-26 08:39:01 +12:00
Sam Hemelryk 6568daf0db MDL-41213 filepicker: corrected outline of selected file dialogue 2013-08-26 08:38:34 +12:00
Mary Evans 1148cdfd6c MDL-41175 themes: Add/remove group members page broken on small screens. 2013-08-25 17:08:28 +01:00
Damyon Wiese 2f2cae97ad MDL-41149 assign: Group submission updates emailed to wrong person
grade_item_update was altering the userid in the submission record
instead of cloning it. This meant only the last member of a group
recieved all notifications meant for other students in the group.
2013-08-25 22:18:29 +08:00
Damyon Wiese a7effadb53 MDL-41249 assign: Restore step missing gradingform mapping
Thanks to Matthieu Raggett for the report and the solution.
2013-08-25 21:24:09 +08:00
Matteo Scaramuccia 44ac793fcb 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:15:23 +02:00
Gareth J Barnard 70ff400c16 MDL-40321 theme_bootstrapbase: Remove URL's from printed pages. 2013-08-24 13:04:25 +01:00
AMOS bot 441678ecb4 Merge branch 'MOODLE_25_STABLE' into install_25_STABLE 2013-08-24 00:59:02 +00:00
Dan Poltawski eb0f2163dd MDL-41401 backup: fix misnamed test method 2013-08-23 15:10:24 +08:00
Dan Poltawski bda1180dc2 MDL-33472 google plugins: move helper functions to upgradelib.php
upgrade.php is reserved for the upgrade steps only. See also
MDL-34103
2013-08-23 11:34:03 +08:00
Damyon Wiese dd99fdd232 weekly release 2.5.1+ 2013-08-23 10:34:49 +08:00
Mark Nelson 848c33eb87 MDL-41387 tags: changed character case in string used when deleting a course 2013-08-22 17:41:15 +08:00
Dan Poltawski c177228500 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:28 +08:00
Damyon Wiese 6bd0ce14ed Merge branch 'wip-MDL-41196-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-08-22 11:21:46 +08:00
Dan Poltawski 6c98669c9b Merge branch 'MDL-30839-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-08-22 11:18:01 +08:00
Jason Fowler 1dc17ccea2 MDL-30839 Accessibility - Focusing on error on submit 2013-08-22 10:53:56 +08:00
Sam Hemelryk b59bdff58d MDL-41196 phpmailer: fixed unit test detection 2013-08-22 14:46:35 +12:00
Dan Poltawski c36c24ec26 Merge branch 'MDL-30839-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-08-22 10:14:40 +08:00
Dan Poltawski 2799d45f08 Merge branch 'MDL-39980_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-22 10:05:11 +08:00
Jason Fowler 93e775ab57 MDL-30839 Fixing extra line breaks in error msg 2013-08-22 09:06:01 +08:00
Mary Evans 7d7d4a7c30 MDL-41321 theme_bootstrapbase: Adds styling to groupinfobox. 2013-08-21 17:46:15 +01:00
Tim Hunt 3272a3f771 MDL-41366 qbehaviour_informationitem fix name capitalisation. 2013-08-21 12:29:55 +01:00
Tim Hunt f02a10f38c 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:57:46 +01:00
Tim Hunt 12ea5b4b00 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:28 +01:00
Dan Poltawski 0901b32113 MDL-41191 add more test data to trigger duplicate course records 2013-08-21 15:45:48 +08:00
Dan Poltawski 5db91ce2a4 MDL-41191 mod_forum: avoid DISTINCT on TEXT columns
It is not supported by all db engines
2013-08-21 15:45:42 +08:00
Dan Poltawski 94bcd74360 Merge branch 'MDL-30839-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-08-21 15:17:52 +08:00
Jason Fowler 75d2b7da91 MDL-30839 Fixing extra line breaks in error msg 2013-08-21 15:01:07 +08:00
Frederic Massart 1ae04d082d MDL-40877 repository_url: Use textlib functions instead of mb_strlen() 2013-08-21 14:02:13 +08:00
Dan Poltawski e1435f9e6e Merge branch 'wip-MDL-36690-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-08-21 11:35:58 +08:00
Marina Glancy c6af0e03cb MDL-36690 Do not cache objects inside course.modinfo as they may fail to serialize
convert moodle_url (all other fields are numbers or strings) to string before caching and then back to moodle_url when restoring.
Otherwise serialized modinfo can contain \0 byte which cause problems in Postgres DB
2013-08-21 13:09:36 +10:00
Dan Poltawski 69504a7154 Merge branch 'wip-MDL-32191-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-08-21 10:44:39 +08:00
Sam Hemelryk 5cdbdc4a71 Merge branch 'wip-MDL-40830-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-08-21 13:13:18 +12:00
AMOS bot d43d1610c6 Automatically generated installer lang files 2013-08-21 00:43:39 +00:00
Sam Hemelryk 34884b3ec8 Merge branch 'MDL-41162_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-21 12:13:06 +12:00
Sam Hemelryk aee98acb92 Merge branch 'm25_MDL-41144' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-08-21 10:59:54 +12:00
Andrew Nicols 37ca398629 MDL-36803 TinyMCE: Fix TinyMCE following touch events on iOS browsers 2013-08-20 23:58:23 +01:00
Sam Hemelryk 8afa842c60 Merge branch 'MDL-41157-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-08-21 10:34:21 +12:00
Sam Hemelryk 6ef239f1c8 Merge branch 'MDL-41196-m25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-08-21 09:30:14 +12:00
Frederic Massart d4f16db9aa MDL-41136 badges: Prevent extra loading due to unnecessary includes 2013-08-20 17:51:32 +08:00
Damyon Wiese fa2a822a17 Merge branch 'MDL-41191-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-08-20 16:15:14 +08:00
Damyon Wiese f669d36b69 Merge branch 'MDL-41071-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-08-20 15:57:59 +08:00
Damyon Wiese 19ad0a3658 Merge branch 'w33_MDL-41112_m25_cachedist' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-08-20 15:15:40 +08:00
Damyon Wiese 1e28defac5 Merge branch 'MDL-40162_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-08-20 14:49:08 +08:00
Jason Fowler 59d18ddfa7 MDL-35925 - File picker - Adding aria attributes to assist in accessibility 2013-08-20 14:19:06 +08:00
Damyon Wiese fe8c182f0a Merge branch 'MDL-27595-2_25' of https://github.com/bostelm/moodle into MOODLE_25_STABLE 2013-08-20 13:49:04 +08:00
Damyon Wiese 32fc11d77a Merge branch 'MDL-41036_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-20 13:00:54 +08:00
Damyon Wiese bf3ed270ec Merge branch 'MDL-41122_2.5' of git://github.com/kastashov/moodle into MOODLE_25_STABLE 2013-08-20 12:30:10 +08:00
Dan Poltawski ba54a0b296 Merge branch 'MDL-38203_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-20 11:34:20 +08:00
Nadav Kavalerchik 5d2f59236a MDL-36044 - Delete Icon ("X") blocks Score numbers, when in RTL mode (mod/assign , Rubrics editor) 2013-08-20 11:08:14 +08:00
Nadav Kavalerchik 14d6091f20 MDL-39236 - Right align table cells during install process, when in RTL mode (theme/standard, actually theme/base) 2013-08-20 11:03:15 +08:00
Dan Poltawski 23756ddfea Merge branch 'MDL-39980_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-20 10:48:09 +08:00
Marina Glancy 1afdd452aa MDL-41222 Remove unnecessary course cache rebuild 2013-08-20 10:26:34 +10:00
Dan Poltawski 31235acf2b Merge branch 'MDL-30839-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-08-19 17:51:11 +08:00
Damyon Wiese c67f7093a4 Merge branch 'm25_MDL-39572' of https://github.com/totara/moodle into MOODLE_25_STABLE 2013-08-19 15:43:59 +08:00
Damyon Wiese 97557f92f3 Merge branch 'MDL-40896_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-19 15:38:10 +08:00
Damyon Wiese 01f44f262a Revert "MDL-41106 cache: several fixes for the session cache."
This reverts commit 17aed88ed4.
This reverts commit 4e9ccabd81.
This reverts commit a0933c542e.
2013-08-19 15:32:56 +08:00
Dan Poltawski 2febf20223 Merge branch 'MDL-40893-25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-08-19 14:50:10 +08:00
Damyon Wiese 4fea0a3490 Merge branch 'wip-MDL-41106-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-08-19 13:51:25 +08:00
Damyon Wiese 07cafa966a Merge branch 'wip-MDL-36789-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-08-19 13:17:03 +08:00
Nadav Kavalerchik c299975400 MDL-39703 Roles, Themes: Fix "Add role" dialog width and position, in RTL mode (theme/clean)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-19 13:13:04 +08:00
Dan Poltawski b31d9b8cbd Merge branch 'm25_MDL-37393' of github.com:danmarsden/moodle into MOODLE_25_STABLE 2013-08-19 12:57:50 +08:00
Jason Fowler 78dd49f5d0 MDL-30839 Accessibility, Forms - Improve accessibility or error messages 2013-08-19 09:55:43 +08:00
AMOS bot 1df739021c Automatically generated installer lang files 2013-08-19 00:42:36 +00:00
Sam Hemelryk 17aed88ed4 MDL-41106 cache: tidied up several elements
Conflicts:
	cache/stores/session/lib.php
2013-08-19 11:30:50 +12:00
Marina Glancy 4e9ccabd81 MDL-41106 Cleaning up expired elements in session cache store
- Always make sure the elements in cache are sorted so we need to remove only elements in the beginning of array
- Remove expired elements from session store to free memory
- Minor bug fixes

Conflicts:
	cache/stores/session/lib.php
	cache/stores/session/tests/session_test.php
2013-08-19 11:01:04 +12:00
Andrew Nicols 6e8edc5af0 MDL-41196 Unit Tests: Add a phpmailer message sink 2013-08-18 16:15:58 +01:00
Nadav Kavalerchik da552f01bb MDL-40447 Administration: Fix translation: "Profile" should be "Profile Fields" on advanced (more...) user filter form 2013-08-17 23:37:12 +03:00
Frederic Massart a0b3ed79e3 MDL-40877 core_text: Added UTF-8 safe strrchr method 2013-08-16 14:17:04 +08:00
Rossiani Wijaya 405ebd52d2 MDL-35930 filepicker filemanaer: make announcement on page change when selecting view files options 2013-08-16 12:09:54 +08:00
AMOS bot e432d94b3b Automatically generated installer lang files 2013-08-16 00:42:55 +00:00
Russell Smith a49e900fda 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:34 +10:00
Sam Hemelryk a0933c542e MDL-41106 cache: several fixes for the session cache.
This issue makes several fixes for the session loader and the session store.
* maxsize argument now works for session caches.
* fixed performance hole when interation occurs frequently.
* fixed cache purge bug occuring when multiple caches are defined before being used.
* improved lastaccess handling.
2013-08-16 11:59:02 +12:00
Simon Coggins d16c91e919 MDL-39572: Fix sql_order_by_text() to use length argument correctly 2013-08-16 11:29:05 +12:00
Simon Coggins b9d40871f0 MDL-39572: Fix existing tests and add more to demonstrate issue with sql_order_by_text() 2013-08-16 11:29:05 +12:00
Yuliya Bozhko 2857077011 MDL-40162 badges: Image url breaks when slashargumets is not supported 2013-08-16 11:13:37 +12:00
Dan Marsden 5883b36a76 MDL-41144 enrol_flatfile: ignore deleted users. 2013-08-16 09:32:52 +12:00
Dan Marsden df47d2c38c MDL-37393 SCORM: Fix existing AICC scoes to use correct parent/child relationships 2013-08-16 09:29:31 +12:00
Matteo Scaramuccia 1ceee0d0d6 MDL-37393 SCORM: Fixed PHP Strict Standards errors with AICC packages 2013-08-16 09:29:31 +12:00
Jonathon Fowler 2cd5d3c03c MDL-32191 navigation: Add keys to module and block settings nav nodes 2013-08-16 09:18:46 +12:00
Tim Hunt 97d8cfa90a MDL-38203 multianswer qtype: feedback pop-up should be constrained.
So that, when there is a lot of feedback, it is all visible.
2013-08-15 14:16:24 +01:00
Tim Hunt a292ada723 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:56:22 +01:00
Marina Glancy 173839c0a6 MDL-36789 Quick course cache integrity check for deleted modules 2013-08-15 21:46:58 +10:00
Marina Glancy d69129045f MDL-40830 Clear course cache in mod_assign generator 2013-08-15 21:45:03 +10:00
Tim Hunt 3a5f219636 MDL-41162 quiz view page: invalid HTML.
We were sometimes outputting nested p tags. Change the outer one to a
div.
2013-08-15 12:41:27 +01:00
Tim Hunt a369215799 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 11:58:57 +01:00
Tim Hunt 42f6e9def5 MDL-41036 Question category info should use HTML editor
This is a minimal fix. All this code could do with a clean-up, but at
the moment, it works, so I am not going to touch it.
2013-08-15 11:58:35 +01:00
Tim Hunt e614f12797 MDL-40896 Add missing question edit CSS to bootstrapbase. 2013-08-15 11:58:12 +01:00
Henning Bostelmann a15ad2be17 MDL-27595 backup: allow course import with warnings
Proceed with import if warnings are found, but display the warnings afterwards
2013-08-15 11:20:38 +01:00
Dan Poltawski 661777c503 weekly release 2.5.1+ 2013-08-15 16:42:18 +08:00
Dan Poltawski 2571672496 Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-08-15 16:41:41 +08:00
Rossiani Wijaya 3d29241619 MDL-41200 filepicker: change header string to select.
limit the length for header, so it fits nicely in mobile devices
2013-08-15 10:58:56 +08:00
AMOS bot f2c29f9b97 Automatically generated installer lang files 2013-08-15 00:54:43 +00:00
Dan Poltawski 0d8d0a34e7 Merge branch 'MDL-39507_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-14 21:57:43 +08:00
Dan Poltawski 760cb9ee99 MDL-41191 enrol: unit tests for enrol_get_shared_courses 2013-08-14 21:41:38 +08:00
Dan Poltawski 0f96a45b28 MDL-41191 forum: unit tests for forum_get_courses_user_posted_in 2013-08-14 21:39:13 +08:00
Tim Hunt 766a9a9d8f MDL-39507 Question HTML export: fix image handling.
Some code got committed to stable branches that relied on a new API that
was in master only. This fixes it to use the old API.
2013-08-14 11:02:35 +01:00
Dan Poltawski ad2fc9d060 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:06:17 +08:00
Dan Poltawski d0cd4de2dd MDL-41157 calendar: add unit tests for calendar_get_course_cached 2013-08-14 11:06:16 +08:00
Brian King ee5a68022f MDL-29004 Wiki: display images in printer-friendly view 2013-08-13 10:03:02 +02:00
Dan Poltawski a5a39298fa 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:36 +08:00
Dan Poltawski 2d0f489759 Merge branch 'MDL-39507_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-13 09:53:09 +08:00
Sam Hemelryk 3f1c01de8d Merge branch 'MDL-41045-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-08-13 10:19:16 +12:00
Sam Hemelryk 7ccc8e8b1c Merge branch 'MDL-39691_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2013-08-13 09:41:10 +12:00
Sam Hemelryk acea87e9b2 Merge branch 'MDL-41091_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-13 09:38:29 +12:00
Sam Hemelryk 05c04ad471 Merge branch 'wip-MDL-41114-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-08-13 09:31:43 +12:00
sam marshall f1cb34a17a MDL-41050 Progress bar: Width parameter does not work 2013-08-13 09:29:22 +12:00
Sam Hemelryk 6ae19630c5 Merge branch 'MDL-41033_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-08-13 09:22:44 +12:00
Sam Hemelryk 19f92cfd80 Merge branch 'MDL-40852_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-08-13 09:09:59 +12:00
Sam Hemelryk 8e086c697e Merge branch 'MDL-40996_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-13 09:08:04 +12:00
Sam Hemelryk 2f1dbeb9ba Merge branch 'MDL-30895-25' of https://github.com/mouneyrac/moodle into MOODLE_25_STABLE 2013-08-13 08:45:25 +12:00
Sam Hemelryk 499637cbc4 NOBUG: fixed whitespace 2013-08-13 08:41:37 +12:00
Sam Hemelryk 5c46191bd0 Merge branch 'MDL-35931-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-08-13 08:38:20 +12:00
Sam Hemelryk 55ad6e5841 Merge branch 'MDL-35919-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-08-13 08:35:34 +12:00
Sam Hemelryk 2f4aa72775 Merge branch 'MDL-35934_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-08-13 08:32:43 +12:00
Tim Hunt 1d428a476a MDL-39507 questions: fix pluginfile URLs before format_text.
This commit build's on Jean-Michel's work, tidying up a few lose ends.
2013-08-12 13:13:59 +01:00
Jean-Michel Vedrine 4cb50d230b MDL-39507 questions: fix pluginfile URLs before format_text. 2013-08-12 10:37:11 +01:00
Dan Poltawski c6a8d2c08c Merge branch 'MDL-27655_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-08-12 16:41:59 +08:00
Dan Poltawski 666d9bea6b Merge branch 'MDL-30001_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2013-08-12 16:13:20 +08:00
Jason Fowler 6cc0caebb5 MDL-35919 - Activity Chooser - Adding Aria attributes to improve accessibility 2013-08-12 13:23:32 +08:00
Marina Glancy 7e7e871915 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:11:16 +10:00
Rossiani Wijaya b303f6663a MDL-35934 Filemanager: change the set attribute to use setAttribute() instead of YUI set(). 2013-08-12 12:46:38 +08:00
Kirill Astashov 5ec001f19f MDL-41122: Trim on RSS body to prevent Remote RSS block from failing on valid feeds 2013-08-12 12:41:02 +09:30
Marina Glancy fdec161716 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:48:30 +10:00
Jean-Michel Vedrine 17c77ac500 MDL-39691 Lesson - Email graded essays not working 2013-08-11 08:12:22 +02:00
Jean-Michel Vedrine e87a512c55 MDL-30001 WEBCT Import does not work for 2.0 2013-08-11 07:59:56 +02:00
Petr Škoda 287f2af5a0 MDL-41112 fix theme and js caching info in config-dist.php 2013-08-10 23:46:47 +02:00
Rossiani Wijaya c50d563b63 MDL-41033 Filepicker: add ARIA attributes for selecting file in a modal 2013-08-09 10:55:41 +08:00
Rossiani Wijaya cf4a857e45 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:53:08 +08:00
Rossiani Wijaya 80f8d50daa MDL-35934 Filemanager: add aria attributes for editing file/folder.
Add unique reference ids
2013-08-09 10:52:54 +08:00
Tim Hunt fa92bc270f MDL-41091 questions: fix get_all_submitted_qt_vars for unit testing. 2013-08-08 14:43:35 +01:00
Jerome Mouneyrac 0b121f1518 MDL-30895 switch from dl tag to table in the accessible chat 2013-08-08 17:48:24 +08:00
Tim Hunt 0d3a5c085f MDL-40996 quiz show user pic should also show name.
This was a regression introduced by MDL-20636 two years ago!
2013-08-08 09:57:58 +01:00
Tim Hunt 60238d1c24 MDL-31487 fix FEATURE_CONTROLS_GRADE_VISIBILITY for quiz.
This is a followup to MDL-18301. That fix missed the following points:

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

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

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

If you go to the purge all caches page in the admin menu, it shows you a
purge button, with no cancel button. Clicking the button purges the
caches and takes you back to the page with the button.
2013-08-08 09:56:33 +01:00
Sam Hemelryk cda44a165a weekly release 2.5.1+ 2013-08-08 16:24:57 +12:00
Sam Hemelryk 7ff9696fcb Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-08-08 16:19:30 +12:00
Jason Fowler f8243dc071 MDL-35931 Accessibility - adding focus change when repository is selected 2013-08-08 11:30:55 +08:00
sam marshall 99aa447550 MDL-41045 course_add_cm_to_section should not test for sections unless necessary 2013-08-07 17:18:41 +01:00
Frederic Massart e106ecb639 MDL-41071 core: plugininfo_mod caches in plugininfo_mod definition 2013-08-07 20:58:10 +08:00
Mark Nelson 23ad39f773 MDL-40662 block_course_overview: added addinstance capability string 2013-08-07 15:20:02 +12:00
AMOS bot e29655450d Automatically generated installer lang files 2013-08-07 00:43:00 +00:00
Sam Hemelryk 7478d2534b Merge branch 'MDL-40086-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-08-07 10:37:34 +12:00
Frederic Massart 03589368a3 MDL-40086 file: Correct ordering of subdirectories
Thanks to Mohamed Alsharaf for the proposed solution.
2013-08-06 13:55:25 +08:00
Sam Hemelryk 3267d96132 Merge branch 'MDL-34989-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-08-06 17:51:17 +12:00
David Monllao 87b252defd MDL-40852 behat: Wrong URLs detection 2013-08-06 13:43:37 +08:00
Ruslan Kabalin f327285ab3 MDL-40947: Fix segmentation fault issue in get_fast_modinfo. 2013-08-06 17:42:08 +12:00
Sam Hemelryk aca4d181b9 Merge branch 'wip-mdl-40469-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-08-06 17:36:08 +12:00
Sam Hemelryk 0b1ee3b871 Merge branch 'MDL-40420_25' of https://github.com/prateeksachan/moodle into MOODLE_25_STABLE 2013-08-06 17:01:55 +12:00
Sam Hemelryk ce3fe87f91 Merge branch 'w32_MDL-41002_m25_enroltypo' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-08-06 16:55:31 +12:00
Marina Glancy 71699c5a81 Merge branch 'MDL-31226-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2013-08-06 14:39:26 +10:00
Mark Nelson ea6b3ac108 MDL-27953 auth: documented the newly introduced function can_be_manually_set() in upgrade.txt 2013-08-06 15:47:36 +12:00
Mark Nielsen 01af794851 MDL-40870: Icon alt text in External Tool admin settings all read Accept 2013-08-06 14:48:58 +12:00
Sam Hemelryk d3751ed482 Merge branch 'MDL-40662_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-08-06 14:39:29 +12:00
AMOS bot 866fa55703 Automatically generated installer lang files 2013-08-06 00:42:17 +00:00
Mark Nielsen e1ff960c94 MDL-39090: Duplicate parameters in LTI launches
Removed endpoint query string params from body
to prevent param duplication.
2013-08-06 10:24:44 +12:00
Sam Hemelryk a2f561b6a7 Merge branch 'MDL-27953_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-08-06 10:10:46 +12:00
Sam Hemelryk eeb784d41d Merge branch 'w32_MDL-40889_m25_jsminify' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-08-06 09:55:10 +12:00
Marina Glancy 0b1723fd57 Merge branch 'MDL-36011-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-08-05 17:16:47 +10:00
Marina Glancy 25dcfa6f54 Merge branch 'MDL-30852-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-08-05 13:52:38 +10:00
Shane Elliott c794ad68c8 MDL-40684 Fix conditional field name for custom user fields 2013-08-05 15:51:34 +12:00
Sam Hemelryk 85180a0fa9 Merge branch 'MDL-40937_assignment_history_25' of git://github.com/davosmith/moodle into MOODLE_25_STABLE 2013-08-05 15:46:44 +12:00
Sam Hemelryk 737542c674 Merge branch 'MDL-38758_m25' of https://github.com/markn86/moodle into MOODLE_25_STABLE 2013-08-05 15:37:14 +12:00
Sam Hemelryk f16972e717 Merge branch 'MDL-35922-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-08-05 15:32:12 +12:00
Damyon Wiese 93d1a6147b MDL-30852 grade report: More coding guideline cleanups. 2013-08-05 11:24:00 +08:00
Damyon Wiese ff8e3b0739 MDL-30852 grade: Coding style fix for user report. 2013-08-05 11:24:00 +08:00
Steve Bader 95ad1cee12 MDL-30852 grade report: Add aria attributes
Converted to git branch by Damyon
2013-08-05 11:24:00 +08:00
Marina Glancy a4bd80565f Merge branch 'MDL-40825_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-08-05 13:16:34 +10:00
Sam Hemelryk 9f15b383d1 Merge branch 'MDL-35927_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-08-05 14:38:38 +12:00
Marina Glancy 153cb0b4c3 Merge branch 'MDL-40320-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-08-05 12:31:53 +10:00
Marina Glancy 2adfb6528e Merge branch 'MDL-35981-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-08-05 12:20:40 +10:00
Damyon Wiese 36b58250b7 MDL-35981 comments: Fix for keyboard control of "add a comment" 2013-08-05 09:50:44 +08:00
Damyon Wiese 25379e44ad MDL-35981 comments: Remove confirm step from behat delete comments. 2013-08-05 09:50:44 +08:00
Damyon Wiese 38866c905a MDL-35981 comments: Add comment about keycodes for space and enter. 2013-08-05 09:50:44 +08:00
Damyon Wiese 32c72ccb37 MDL-35981 comments: Make delete comment keyboard accessible. 2013-08-05 09:50:43 +08:00
Sam Hemelryk 03c3e7c4e8 Merge branch 'wip-MDL-34785-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-08-05 13:36:43 +12:00
Marina Glancy e8a943e361 Merge branch 'wip-mdl-40933-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-08-05 10:49:32 +10:00
Marina Glancy b4750e06c9 MDL-34785 performance improvement with big list of courses 2013-08-05 10:14:34 +10:00
Petr Škoda 70e746f43e MDL-41002 fix typo causing fatal error on other users page
Credit goes to Bernhard Brandstetter, thanks!
2013-08-04 15:01:43 +02:00
Ruslan Kabalin 6c16201632 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:55:59 +01:00
Petr Škoda 3dd51921de MDL-40889 prevent 304 when minimising JS 2013-08-02 16:29:12 +02:00
Damyon Wiese b0998d5099 MDL-36011 tablelib: Make column headers expand/collapse links accessible.
Conflicts:

	theme/base/style/core.css
	theme/bootstrapbase/style/moodle.css
2013-08-02 11:29:45 +08:00
AMOS bot df84da67ec Automatically generated installer lang files 2013-08-02 00:38:31 +00:00
Sam Hemelryk a9657adb0f weekly release 2.5.1+ 2013-08-02 08:24:49 +12:00
Sam Hemelryk 1496e4990f Merge branch 'install_25_STABLE' of git://git.moodle.org/moodle-install into MOODLE_25_STABLE 2013-08-02 08:12:26 +12:00
sam marshall c358c8a2c0 MDL-40320 Course page: Text greyed when conditional activity available 2013-08-01 14:13:43 +01:00
Rossiani Wijaya 239fd1544f MDL-35927 filepicker: add aria attribute to display modal error 2013-08-01 15:40:49 +08:00
Mark Nelson 4a546bf04c 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:53:15 +08:00
Rajesh Taneja bbf727c3a8 MDL-40469 Gradebook: Fixed setType warning while exporting gradebook with publishing set 2013-08-01 10:33:51 +08:00
Jason Fowler 219d7ec5c0 MDL-35922 - Adding aria attributes to create-folder modal 2013-07-31 16:42:01 +08:00
Davo Smith 42e54cffad MDL-40937 mod_assign - remove debugging code from 'previous submissions' javascript, that was breaking in IE8/IE9 2013-07-30 11:37:34 +01:00
Rajesh Taneja dcb5678e99 MDL-40933 Administration: Added 'is after' and 'is before' to date filter 2013-07-30 16:15:06 +08:00
Nadav Kavalerchik a36788687a MDL-40902 - Align breadcrumbs to the right in RTL mode (theme/clean, bootstrapbase)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-30 10:36:25 +12:00
Sam Hemelryk cecc076eb7 Merge branch 'MDL-40746_25' of git://github.com/grabs/moodle into MOODLE_25_STABLE 2013-07-30 09:40:28 +12:00
Frederic Massart 2d325dfcf8 MDL-40615 Repository: Updated Amazon S3 library
Fixed insecure use of CURLOPT_SSL_VERIFYHOST
2013-07-30 09:04:58 +12:00
Sam Hemelryk a38830a07b Merge branch 'MDL-39461_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-07-30 08:59:26 +12:00
Mark Nelson db69373d40 MDL-38758 mod_forum: fixed issue where pass by reference removal caused an undefined variable error 2013-07-29 19:12:38 +08:00
Mark Nelson 8a868abe22 MDL-27953 auth: allowed the LDAP plugin to be manually assigned to uploaded users 2013-07-29 17:11:13 +08:00
Dan Poltawski ff8d9b59ef Merge branch 'MDL-40867_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-29 15:24:54 +08:00
Charles Fulton 9fc858e93e MDL-40323 report_log: fix strict standards error 2013-07-29 14:00:34 +08:00
Dan Poltawski ae19a843bc Merge branch 'MDL-40857_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-29 13:56:46 +08:00
Dan Poltawski 5279ff0725 MDL-40775 feeback: remove uncessary header 2013-07-29 13:31:17 +08:00
Dan Poltawski c79efe260b Merge branch 'MDL-40775_25' of git://github.com/grabs/moodle into MOODLE_25_STABLE 2013-07-29 13:30:35 +08:00
Dan Poltawski 673a456343 Merge branch 'wip-MDL-29731-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-07-29 13:21:12 +08:00
Dan Poltawski 2018e8f12a Merge branch 'MDL-36399_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-29 12:40:12 +08:00
Dan Poltawski 3d4cb04ded Merge branch 'MDL-40863_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-29 10:09:53 +08:00
Damyon Wiese aea34768be MDL-34989 assign: Do not add a param to grading_disabled - cannot be backported.
Conflicts:

	mod/assign/locallib.php
2013-07-29 09:57:18 +08:00
Ashley Holman fae11d2ef1 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:56:47 +08:00
Sam Hemelryk 5fb1fad943 Merge branch 'MDL-40878_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-29 12:54:16 +12:00
Sam Hemelryk 7b3a806741 Merge branch 'w31_MDL-40891_m25_mkdirrace' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-29 11:52:35 +12:00
Sam Hemelryk 8ba4fd3b9a Merge branch 'MDL-40727-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-07-29 11:49:41 +12:00
Sam Hemelryk fa386d3e36 Merge branch 'MDL-40854_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-29 11:01:45 +12:00
Mark Nielsen 9fe0281217 MDL-40005: LTI module uses Apache specific function for retrieving request headers 2013-07-29 10:54:10 +12:00
AMOS bot f0592ad3a3 Automatically generated installer lang files 2013-07-28 00:42:29 +00:00
AMOS bot 0147686fc7 Merge branch 'MOODLE_25_STABLE' into install_25_STABLE 2013-07-27 00:43:10 +00:00
Petr Škoda f4a4e5e8e6 MDL-40891 prevent exceptions when creating directories in file store
Even if cache creation fails moodle should continue working.
2013-07-26 20:30:41 +02:00
Petr Škoda 7a8ef1453e 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:29:55 +02:00
Andreas Grabs d460eb563e MDL-40775 mod_feedback - Undefined variable in feedback activity 2013-07-26 19:42:28 +02:00
Andreas Grabs 61925ed61c MDL-40746 mod_feedback - Feedback forms display oddly in Clean theme 2013-07-26 19:42:24 +02:00
Tim Hunt 6eb9e11615 MDL-40854 fix mod/...:view capabilities
Prior to the fix, if you did not have a capability like mod/page:view,
then you woulds still see the link to the Page activity in the course
section, but when you clicked on it, you would run into a
require_capability error.

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

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

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

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

I have changed a couple of the archetypes so that guests cannot launch
LTI activities, and editing teachers cannot do editing things.
2013-07-26 11:41:34 +01:00
David Monllao f1c1230a77 MDL-40825 behat: Giving time to display the ajax response 2013-07-26 12:38:56 +02:00
Tim Hunt 521932c6d8 MDL-40867 fix misleading PHPdocs for _get_coursemodule_info 2013-07-26 10:17:33 +01:00
Tim Hunt 364b991369 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:17:13 +01:00
Tim Hunt 944e90bd6d MDL-40863 feedback and LTI mods need get_extra_capabilities fn
Since moodle/site:accessallgroups is relevant to how them.
2013-07-26 10:16:54 +01:00
Tim Hunt 18dde90e33 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:16:11 +01:00
Damyon Wiese f171a8c06e weekly release 2.5.1+ 2013-07-26 11:29:27 +08:00
AMOS bot c0aa2a2c57 Automatically generated installer lang files 2013-07-25 00:40:39 +00:00
Marina Glancy 8127fbe1e1 MDL-29731 Bugs in recent activity when using separate groups 2013-07-24 21:50:02 +10:00
Damyon Wiese 025b889981 MDL-40727 Cache: Fix file cache store on windows. 2013-07-24 17:08:36 +08:00
Jason Fowler 304e27ed5f MDL-39748 - Grading - Fixing the increasing height regression
Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-07-24 15:25:32 +08:00
Sam Hemelryk 7de495d5c6 Merge branch 'wip-MDL-37869-stable25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-07-24 11:27:58 +12:00
Sam Hemelryk 5590ac2aff Merge branch 'MDL-40315_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-24 11:14:01 +12:00
Nadav Kavalerchik cf1e9e9ae3 MDL-39704 - Properly align and widen the chat bubbles in mod/chat, when in RTL mode 2013-07-23 23:23:31 +02:00
Nadav Kavalerchik 614a5201ad MDL-40544 - Right align all tables (system wide) in RTL mode (theme/clean , bootstrapbase)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:40:26 +02:00
Nadav Kavalerchik e992ee44d4 MDL-40589 - Theme/CLEAN - Flip YUI3 tree item icon in RTL mode in folder resource
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:34:55 +02:00
Nadav Kavalerchik 4e0a41305d MDL-40189 - Theme/Clean - Right align form labels and left align form input elements on admin pages, system wide (when in RTL mode)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:30:10 +02:00
Nadav Kavalerchik 018904a185 MDL-40071 - Right align category titles and usernames in gradebook (theme/clean, bootstrapbase)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 22:15:18 +02:00
Eloy Lafuente (stronk7) 1bb7b65496 Merge branch 'w30_MDL-40679_m25_zlib' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-23 18:21:09 +02:00
Eloy Lafuente (stronk7) d03c0ef72d Merge branch 'MDL-40816_m25' of git://github.com/markn86/moodle into MOODLE_25_STABLE 2013-07-23 18:19:32 +02:00
Eloy Lafuente (stronk7) c8dd490281 Merge branch 'MDL-40785_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-23 18:01:19 +02:00
David Monllao 374d9f98d6 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-23 17:17:36 +02:00
Eloy Lafuente (stronk7) e681d0ed58 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:02:36 +02:00
Eloy Lafuente (stronk7) 52affa8a9a Merge branch 'wip-MDL-40700-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-07-23 13:58:30 +02:00
Eloy Lafuente (stronk7) e988493e68 Merge branch 'wip-MDL-40763-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-07-23 13:19:54 +02:00
Nadav Kavalerchik e88a456eb3 MDL-40082 - Several UI fixes for question chooser dialog, when in RTL/LTR modes (theme/clean, bootstrapbase)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-23 12:18:03 +02:00
Dan Poltawski c38a4b6f04 Merge branch 'MDL-20609_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-23 16:45:22 +08:00
Dan Poltawski 4353b3d830 Merge branch 'MDL-40480_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-23 16:38:17 +08:00
Damyon Wiese e2bb8c1bbd Merge branch 'MDL-40295_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-07-23 15:54:10 +08:00
Jason Fowler bf3371458d MDL-39748 - Grading Methods - Fixing input field widths for Rubrics
Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-07-23 14:32:58 +08:00
Dan Poltawski 36c3919916 MDL-40585 fix trailing whitespace 2013-07-23 13:34:33 +08:00
Dan Poltawski a8369f6a96 Merge branch 'MDL-40585_25' of git://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-07-23 13:34:29 +08:00
Dan Poltawski fdcad4d5f3 Merge branch 'MDL-40584_25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-07-23 12:38:27 +08:00
Dan Poltawski 1f506acf58 Merge branch 'MDL-40793_25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-07-23 10:42:07 +08:00
Sam Hemelryk 63ddd040c0 Merge branch 'MDL-40680-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-07-23 14:13:59 +12:00
Eloy Lafuente (stronk7) 932ad50a6e Merge branch 'wip-MDL-38707-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-07-23 03:52:23 +02:00
Jason Fowler f55ac904fa MDL-37869 - Course - Removing the ALT text from activity and resource icons as it duplicated the accesshide text 2013-07-23 08:57:44 +08:00
AMOS bot be2a25c80f Automatically generated installer lang files 2013-07-23 00:39:23 +00:00
Eloy Lafuente (stronk7) 2f956f40b6 Merge branch 'MDL-40123_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-23 01:09:20 +02:00
Eloy Lafuente (stronk7) e024b7130a Merge branch 'MDL-39635_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-23 00:45:20 +02:00
Eloy Lafuente (stronk7) ed3a28dcec Merge branch 'wip-MDL-33563-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-07-22 22:36:33 +02:00
Yuliya Bozhko aee7b7544c MDL-39461 badges: Fix cURL expectation failed error when trying to connect to backpack 2013-07-23 08:19:17 +12:00
Eloy Lafuente (stronk7) 55be97fba4 Merge branch 'MDL-40626-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-07-22 17:41:01 +02:00
Mark Nelson e94b6c678d MDL-40816 backup: code cleanup on the manage backups form 2013-07-22 18:18:12 +08:00
Mark Nelson ed31b623bc MDL-40816 backup: added missing setType calls to the manage backups form 2013-07-22 18:18:03 +08:00
Dan Poltawski 6ca8973eca Merge branch 'w30_MDL-38867_m25_gspell' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-22 17:00:56 +08:00
Damyon Wiese 690b65ca56 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:15:32 +08:00
Damyon Wiese 1ab82c6775 Merge branch 'm25_MDL-40260' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-07-22 16:15:05 +08:00
Damyon Wiese d99508f25b Merge branch 'wip-MDL-40174-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-07-22 16:02:47 +08:00
Dan Poltawski 114b8bed28 Merge branch 'MDL-38837_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-07-22 15:02:21 +08:00
Dan Poltawski 4896a0ba25 Merge branch 'MDL-39441_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-22 10:46:47 +08:00
Dan Poltawski d46d40d407 Merge branch 'wip-MDL-37333_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-07-22 10:31:47 +08:00
Russell Smith 874d5a4f85 MDL-40793 profiling: Allow multiple reference runs in display 2013-07-22 12:15:02 +10:00
Sam Hemelryk 5b88c03311 MDL-40174 navigation: don't remove active root nodes without children 2013-07-22 10:49:05 +12:00
Sam Hemelryk 07e26360b8 MDL-40700 cache: memcache and memcached stores now allow alphanumext prefixes 2013-07-22 10:41:42 +12:00
Chris Wharton fe6eeced0b MDL-40700 cache: Validate memcache key prefix field 2013-07-22 10:41:42 +12:00
Sam Hemelryk 497d70c3ec MDL-40700 cache: fixed cache store unit tests 2013-07-22 10:40:56 +12:00
Petr Škoda 5d7faafa0f MDL-40679 mark zlib extension as recommended 2013-07-20 21:20:06 +02:00
AMOS bot dcccd8e2bb Automatically generated installer lang files 2013-07-20 00:44:26 +00:00
Tim Hunt d882d06cea 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:16:53 +01:00
Nadav Kavalerchik 73cd3cba61 MDL-40674 - Main menu's "sub menu" should open to the left in RTL mode (theme/clean , bootstrapbase) 2013-07-19 14:51:52 +03:00
Tim Hunt 9a62c01edc MDL-40480 tablelib: specify charset in XHMTL downloads.
Thanks to Jürgen Zimmer for the suggestion.
2013-07-19 11:46:35 +01:00
Tim Hunt 58c44e5c20 MDL-20609 quiz tables: improve layout for long cell contents.
By allowing more wrapping.
2013-07-19 11:46:18 +01:00
David Monllao 2ab6b4d43d 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:36:29 +02:00
David Monllao 55e9a99c18 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:35:54 +02:00
David Monllao 15c461d34d MDL-39635 behat: Replacing hardcoded language strings
Using get_string() instead.
2013-07-19 10:07:31 +02:00
David Monllao a4fad25c53 MDL-39635 behat: Fixing line breaks
Not supported by Windows OSs.
2013-07-19 10:07:31 +02:00
Petr Škoda 6139b462d7 MDL-38867 remove Google spell checking option 2013-07-19 09:32:11 +02:00
Marina Glancy 63e1765c91 MDL-38707 Display module name when the folder is displayed inline 2013-07-19 15:53:13 +10:00
Marina Glancy 16307c1428 MDL-33563 Version bump for grading methods API change 2013-07-19 15:15:21 +10:00
Marina Glancy f2fe655aeb MDL-33563 Grading methods allow decimal grades 2013-07-19 15:13:58 +10:00
Tim Lock 448fc8ab1a MDL-40626 gradebook: Prevent incorrect override with multiline feedback
The quick grading option doesn't allow mutliline editing.
2013-07-19 12:01:37 +08:00
Damyon Wiese 7aed82f15d weekly release 2.5.1+ 2013-07-19 09:51:35 +08:00
Damyon Wiese 4217cea494 Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-07-19 09:25:04 +08:00
David Monllao c5a0598bf9 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-18 11:22:57 +02:00
Damyon Wiese 19f2b2a41f 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:48:09 +08:00
Rossiani Wijaya 00c9d81bb7 MDL-40295 wiki mod: fix set_url() error for printer friendly page.
Additionally, fix wiki pagelayout for printing
2013-07-18 10:57:11 +08:00
Yuliya Bozhko 2e64d85668 MDL-38837 badges: Check for http or https in badges backpack support 2013-07-18 13:41:33 +12:00
Gareth J Barnard ffadd1242a MDL-37333 theme: Fix 'Clear theme caches' redirect. 2013-07-17 17:39:33 +01:00
Damyon Wiese 2bdf958208 MDL-35851 Lesson: Check/fix the page order every time the pages are loaded 2013-07-17 13:04:32 +08:00
Marina Glancy d11977ebc9 Merge branch 'MDL-40701-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-07-17 12:46:26 +10:00
Dan Poltawski 947933e62b MDL-40701 mod_assignment: fix refresh events
It was getting the cm event with the wrong id and calling
deprecated functions
2013-07-17 10:31:22 +08:00
prateeksachan 7c7563c46a MDL-40420: timemodified field update when lesson_page is updated 2013-07-17 07:24:06 +05:30
AMOS bot d87db3bc5e Automatically generated installer lang files 2013-07-17 00:42:26 +00:00
Eloy Lafuente (stronk7) b5d967cb1d Merge branch 'MDL-40652_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-07-17 00:41:19 +02:00
Eloy Lafuente (stronk7) c59f83cec2 Merge branch 'w29_MDL-40611_m25_accesslibtest' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-17 00:32:37 +02:00
Eloy Lafuente (stronk7) cbd227ffae Merge branch 'MDL-40536-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-07-17 00:26:43 +02:00
Eloy Lafuente (stronk7) bc27ec579e Merge branch 'MDL-40690_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-17 00:17:43 +02:00
Eloy Lafuente (stronk7) 980746ce63 Merge branch 'MDL-38857_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-16 22:02:23 +02:00
Eloy Lafuente (stronk7) 2ff8b13dee Merge branch 'w29_MDL-40423_m25_localsubdir' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-16 21:55:55 +02:00
David Monllao 623544086d 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:59 +02:00
Damyon Wiese 9dafb1ba89 Merge branch 'wip-MDL-40621-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-07-16 21:30:29 +08:00
Damyon Wiese e1982a25cd Merge branch 'wip-MDL-39299-stable25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-16 21:14:45 +08:00
Jason Fowler 845198b7d7 MDL-39299 - Course - Correcting some rendering problems in bootstrapbase
Conflicts:

	theme/bootstrapbase/style/moodle.css
2013-07-16 15:48:10 +08:00
Eloy Lafuente (stronk7) aeee792c86 Merge branch 'MDL-40555-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	cache/stores/static/lib.php
2013-07-16 09:46:27 +02:00
Marina Glancy 996d775457 Merge branch 'MDL-35851-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-07-16 16:11:29 +10:00
Damyon Wiese 8fedf20b63 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:07:01 +08:00
Damyon Wiese e811b5fbe1 Merge branch 'MDL-40195_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE 2013-07-16 13:29:38 +08:00
Marina Glancy 3e704e0d7f MDL-39812 recompile less for bootstrapbase 2013-07-16 15:24:55 +10:00
Marina Glancy da4a51d096 Merge branch 'MDL-39812_bootstrapbase_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-07-16 14:33:24 +10:00
Damyon Wiese f352c87f67 Merge branch 'w29_MDL-40558_m25_guestdelete' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-16 11:29:14 +08:00
Matt Debus b66e88a4d1 MDL-40524: mod_wiki: Display comments in order 2013-07-16 11:25:41 +08:00
Damyon Wiese edb2b3c8a0 Merge branch 'MDL-40538_25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-07-16 10:25:14 +08:00
Rossiani Wijaya 5247f16b14 MDL-35851 Lesson module: fix page order id for import questions. Add upgrade script to fix lesson pages corrupted links 2013-07-16 10:02:19 +08:00
Dan Poltawski 82b32059b5 MDL-40680 store_memcached: fix serialiser options
* Use correct lang string for SERIALIZER_IGBINARY
* Use PARAM_INT for the parameter
2013-07-16 09:38:59 +08:00
Sam Hemelryk b9082c4b0a MDL-40555 cache: implemented unit tests for default search functionality 2013-07-16 08:33:30 +08:00
Frederic Massart 59ba272aa2 MDL-40555 cache: Static store is searchable 2013-07-16 08:33:30 +08:00
Eloy Lafuente (stronk7) ed405efb4c Merge branch 'w29_MDL-40571_m25_adminblocks' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-16 00:26:51 +02:00
Russell Smith d51121efbe MDL-40584 backup: Query db once per category in precheck
The cache is function local and testing against a large database
indicates 10k questions is a large category.  Restore already
uses MEMORY_EXTRA and that will have enough space for the couple
of megabtyes a local sql hash will introduce.
2013-07-16 08:03:59 +10:00
Eloy Lafuente (stronk7) 40aa1f4d88 Merge branch 'MDL-40412_m25' of git://github.com/merrill-oakland/moodle into MOODLE_25_STABLE 2013-07-15 22:08:09 +02:00
Eloy Lafuente (stronk7) ad92b2f1ae Merge branch 'wip-MDL-38747-MOODLE_25_STABLE' of https://github.com/satrun77/moodle into MOODLE_25_STABLE 2013-07-15 17:06:31 +02:00
David Monllao fb50800b16 MDL-39441 behat: Restrict config.php allowed settings 2013-07-15 11:26:12 +02:00
Russell Smith 619fc0cd3c MDL-40585 backup: cache XML parent paths
For $this->groupedpaths, using a key is faster as there is
no need to do in_array searches.

Parent cache allows dirname calls to be substantially reduced.
2048 was chosen as a cache size as this class operates on chunks
of the restore at a time, 8k questions produces a parent cache of
about 500 paths and uses 300K of memory.  Scaling up to 2048 will
use about 1.2M of RAM for really large restores.  This is acceptable
for the 48% function call reduction and the 10% runtime improvement
seen.
2013-07-15 19:23:00 +10:00
Damyon Wiese 4e0dd403e7 MDL-39563: Change to use $CFG consistently 2013-07-15 15:04:58 +08:00
Juan Leyva 2500cd01b1 MDL-39563 Fixing mobilecssurl is not being returned in WebService, phpunit tests
Conflicts:

	webservice/externallib.php
2013-07-15 15:04:24 +08:00
Marina Glancy 2500fc57d0 Merge branch 'MDL-40633_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-15 14:44:22 +10:00
Marina Glancy eccf42d9d9 Merge branch 'wip-MDL-39062-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-07-15 12:42:57 +10:00
Daniel Myers c43b7393f8 MDL-40260 block_course_overview: prevent MNET courses from being dimmed 2013-07-15 13:55:28 +12:00
AMOS bot eda6f4d463 Automatically generated installer lang files 2013-07-15 00:44:25 +00:00
Sam Hemelryk 13a363e534 MDL-39062 cache: version bump to update definitions 2013-07-15 12:01:38 +12:00
Sam Hemelryk 72433ecb43 MDL-39062 cache: persist keys now set properly 2013-07-15 12:01:08 +12:00
Mary Evans 7836d4c93e MDL-40652 Calendar: Changed pagelayout from 'standard' to 'base' in calendar/export.php. 2013-07-14 15:15:35 +01:00
Marina Glancy 046804ce55 MDL-40621 fixed small bug in function editor_tinymce_plugin::fix_row() 2013-07-14 15:04:40 +10:00
Petr Škoda 5d43f79358 MDL-40611 fix context cache size expectation 2013-07-13 15:39:49 +02:00
Petr Škoda fe2577d197 MDL-40571 work around block editing hacks on admin page 2013-07-12 14:59:30 +02:00
Petr Škoda 22010649e1 MDL-40423 fix creation of new install.xml in subplugins 2013-07-12 14:56:44 +02:00
Tim Hunt 3a14deef9e MDL-40633 filter_urltolink breaking some image links.
This was a regression caused by MDL-22390. HTML like
<img src="http://www.example.com/logo.gif" />
was being broken.
2013-07-12 11:43:28 +01:00
Petr Škoda bf39b9a42d MDL-40558 skip admins and guest when deleting incomplete users 2013-07-12 12:37:23 +02:00
Petr Škoda 2d35bf9e04 MDL-40569 fix empty CSS files after cache purging 2013-07-12 12:34:40 +02:00
Dan Poltawski ac470250f7 MDL-40536 course/externallib fix incorrect variable
Fixes test_import_course_invalid_deletecontent_option() from the
previous commit.
2013-07-12 16:43:58 +08:00
Dan Poltawski 77e41db50e 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:43:57 +08:00
Mohamed Alsharaf 47ef2a432a MDL-38747 blocks: course format options 'numsections' is required to display the block 2013-07-12 20:23:09 +12:00
Damyon Wiese c2ad901002 weekly release 2.5.1+ 2013-07-12 09:52:21 +08:00
Damyon Wiese 3afab77ad6 Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-07-12 09:43:13 +08:00
AMOS bot acf6bc9cdc Automatically generated installer lang files 2013-07-12 00:45:57 +00:00
prateeksachan ee36201eee MDL-38794 passed overflowdiv parameter 2013-07-11 07:26:56 +05:30
David Monllao 210290a905 MDL-38857 tool_behat: Adding info about the tool purpose 2013-07-10 12:08:54 +02:00
Marina Glancy 63c8f25b1b Merge branch 'MDL-38366-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-07-10 16:25:38 +10:00
Frederic Massart 21e0b2a025 MDL-38366 repository_filesystem: Prevent use of empty subdir 2013-07-10 13:48:28 +08:00
Marina Glancy 0f2a0a3fb0 Merge branch 'm25_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile_2ndRound' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-07-10 12:01:29 +10:00
Raymond Wijaya 41e7411b9d MDL-40093_M25: mod/assign: Remove count of drafts in offline assignment's grading summary screen 2013-07-10 11:22:18 +10:00
Marina Glancy 4d8ff7c8e2 Merge branch 'w28_MDL-40488_m25_admin' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-10 11:09:44 +10:00
Russell Smith 30967ff481 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:41:22 +10:00
Sam Hemelryk 70e9700195 Merge branch 'wip-MDL-40593-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-07-10 12:18:36 +12:00
Marina Glancy 512ab8e262 Merge branch 'MDL-40441_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-10 10:02:53 +10:00
Sam Hemelryk c001e046e0 Merge branch 'w28_MDL-40450_m25_tinymcebuttons' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-10 11:02:01 +12:00
Sam Hemelryk 7c6e64c36c Merge branch 'MDL-40527_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-10 10:31:25 +12:00
Sam Hemelryk c6b546a1ee Merge branch 'm25_MDL-40512' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-07-10 10:09:59 +12:00
Damyon Wiese 94fbefa96b Merge branch 'MDL-39420_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-09 22:43:43 +08:00
Damyon Wiese 218f778417 Merge branch 'MDL-36479_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-09 22:30:12 +08:00
Damyon Wiese 641595c1fa Merge branch 'MDL-40392_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-07-09 21:52:07 +08:00
Marina Glancy edd3c6961e MDL-40593 fixed SQL query to be postgres-compartible 2013-07-09 22:28:41 +10:00
Marina Glancy 1b0951a26a Merge branch 'MDL-40472-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-07-09 21:36:12 +10:00
Tim Hunt 5f45c039fd MDL-39420 multichoice: fix layout of multi-line choices. 2013-07-09 11:57:06 +01:00
Tim Hunt b9f1aaa8de 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:44:57 +01:00
Damyon Wiese 234d90b209 Merge branch 'MDL-40443_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-09 15:16:16 +08:00
Jamie Pratt 81e01645d8 MDL-40176 mock_submit method for testing 2013-07-09 15:09:10 +08:00
Marina Glancy 82043201ea Merge branch 'MDL-39020-m25' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-07-09 16:34:28 +10:00
Damyon Wiese 10061c1de7 Merge branch 'MDL-40499_25' of git://github.com/jmvedrine/moodle into MOODLE_25_STABLE 2013-07-09 13:27:28 +08:00
Damyon Wiese a16698d10b Merge branch 'MDL-40386_25' of https://github.com/prateeksachan/moodle into MOODLE_25_STABLE 2013-07-09 12:34:52 +08:00
Jamie Pratt 161d67d8df MDL-40388 Reset globals after each unit test 2013-07-09 11:56:04 +08:00
Tony Levi d4bbe8997f MDL-40035: Avoid rebuild_course_cache always for empty course 2013-07-09 13:54:24 +10:00
Damyon Wiese d5e3d9a06d Merge branch 'MDL-40318_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-09 11:12:19 +08:00
Damyon Wiese 79fd52c6c3 Merge branch 'MDL-40562_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-09 11:05:39 +08:00
Marina Glancy 33025649f3 Merge branch 'MDL-40434_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-09 11:31:52 +10:00
Tim Lock 6fe662302c MDL-40436: auth_ldap: Fixed warning when adding new LDAP users 2013-07-08 22:59:11 +08:00
Adam Olley 66a38f083a MDL-40195: mod_assign: Display grades when quickgrading to 2 decimal places 2013-07-08 20:08:01 +09:30
David Monllao c81f3193ce MDL-40562 behat: Catch NoSuchElement exception 2013-07-08 12:08:15 +02:00
Damyon Wiese ca4077c79d Merge branch 'MDL-38314-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Conflicts:
	version.php
2013-07-08 15:14:55 +08:00
Petr Škoda 3e17040a6e MDL-40450 update links to TinyMCE 3.x docs 2013-07-07 16:12:04 +02:00
Matteo Scaramuccia a05efa34e2 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:06:48 +02:00
Matteo Scaramuccia 31afec2312 MDL-39832 Files: Revert MDL-39688 commit, 161be92065
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:06:47 +02:00
Eloy Lafuente (stronk7) fb41a38153 Moodle release 2.5.1 2013-07-06 17:59:23 +02:00
Petr Škoda c0c0353438 MDL-40488 improve $CFG->admin docs 2013-07-06 11:47:50 +02:00
Tim Hunt 47c9a54e63 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:32:26 +01:00
Rossiani Wijaya 54f0dd9492 MDL-39812 clean theme: fixed breadcrumbs layout for narrow screens 2013-07-05 11:09:21 +08:00
Rossiani Wijaya 0a4c3a88db MDL-39812: bootstrapbase theme: Fix breadcrumbs layout for narrow screen 2013-07-05 10:58:15 +08:00
Dan Marsden 353d91fa1d MDL-40512 SCORM: prevent undefined warning 2013-07-05 12:09:21 +12:00
Jean-Michel Vedrine 0c2a1dec76 MDL-40499 Edit question from 1.9 backup breaks if images in subdirs 2013-07-04 15:01:18 +02:00
Eloy Lafuente (stronk7) dc50d26267 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:48 +02:00
Tim Hunt 1cdc4d2556 MDL-40443 setType notice in quiz reports. 2013-07-04 12:37:59 +01:00
Tim Hunt 3feb538a46 MDL-40318 quiz intro comprising just an impage was not shown
Also, ensure that we don't output an empty box if there are no access
messages.
2013-07-04 12:37:19 +01:00
Tim Hunt 48eec6a5bf MDL-36479 quiz regrade: use progress bar to prevent time-outs 2013-07-04 12:36:36 +01:00
Damyon Wiese 4c6f1ec52e weekly release 2.5+ 2013-07-04 15:34:24 +08:00
Damyon Wiese ef572665e9 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:23 +08:00
Eloy Lafuente (stronk7) 0383404678 MDL-40376 Fix copy/paste typo 2013-07-03 17:54:14 +02:00
Frederic Massart 03ab0ed880 MDL-38314 repository: Improving performance of upgrade script 2013-07-03 16:29:51 +08:00
Frederic Massart f0c176fccc MDL-38314 repository: Remove orphan repository instances 2013-07-03 16:29:48 +08:00
Frederic Massart 6b7b7455d1 MDL-38314 repository: Delete repository instances on context deletion 2013-07-03 16:27:13 +08:00
Frederic Massart 2bc5ceb31c MDL-38314 repository: Unit Tests for delete_all_for_context() 2013-07-03 16:27:13 +08:00
Damyon Wiese 895f8d2b5f MDL-40472: Clean all codechecker warnings on mod_assign 2013-07-03 16:01:52 +08:00
Yuliya Bozhko a7c2742900 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:05:50 +08:00
Damyon Wiese fc83888891 MDL-39558 badges: Prevent backup of badges without user information 2013-07-03 10:54:31 +08:00
Yuliya Bozhko 18811be378 MDL-39558 badges: Add backup/restore of manually awarded badges 2013-07-03 10:13:05 +08:00
Yuliya Bozhko 56d54e1eed MDL-39558 badges: Add backup/restore to course badges 2013-07-03 10:12:46 +08:00
Michael Aherne 3a4a5356eb MDL-40275 core Improve documentation for block_base::has_config() 2013-07-02 21:52:59 +02:00
Eloy Lafuente (stronk7) 1a5986dab9 Merge branch 'MDL-40376-m25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-07-02 21:12:10 +02:00
Eloy Lafuente (stronk7) c10fc915ad MDL-37516 Translate fieldnames on output only.
This reverts a change performed by the previous commit where user
fieldnames were being translated (and cached) when fetched,
causing the information to remain static later, not responding
to language switches (and perhaps leading to other problems if those
structures are used lated for DB / $USER comparisons.

With the commit, the translation happens on output, so no
potential interferences will happen and, also, the information
changes dynamically on lang switching.
2013-07-02 21:01:56 +02:00
sam marshall a6683d327f MDL-37516 Conditional activities: user field condition display fixes 2013-07-02 20:59:07 +02:00
Eloy Lafuente (stronk7) a9155c2875 Merge branch 'MDL-40246_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-07-02 14:27:24 +02:00
Eloy Lafuente (stronk7) 4d52fbbc14 Merge branch 'MDL-40439-en_fix_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-07-02 13:47:37 +02:00
Helen Foster bb07f7ecce MDL-40439 Merge English strings from the en_fix language pack 2013-07-02 11:47:49 +02:00
Dan Poltawski dee6316364 Merge branch 'MDL-40389_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-07-02 15:53:06 +08:00
Tim Hunt b465164c24 MDL-40434 calculatedmulti multiple-response questions not randomised 2013-07-02 08:23:56 +01:00
Dan Poltawski f6b1260812 Merge branch 'MDL-40282.25' of github.com:colchambers/moodle into MOODLE_25_STABLE 2013-07-02 15:15:32 +08:00
Damyon Wiese 1e6919f6c8 Merge branch 'wip-MDL-40353-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-07-02 14:29:08 +08:00
Dan Poltawski a852df6f11 Merge branch 'MDL-40297_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-07-02 13:43:45 +08:00
Andreas Grabs e235c97f09 MDL-39570 mod_feedback - Missing privilege check 2013-07-02 13:36:51 +08:00
Dan Poltawski d7e626156e Merge branch 'w27_MDL-40399_m25_msarrayshift' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-02 13:33:59 +08:00
Dan Marsden 0bde9de161 MDL-39628 Chat: check mod/chat:chat capability when using daemon.
Thanks to Francois Gauthier for report/fix.
2013-07-02 12:18:24 +08:00
Jason Fowler dafe65e438 MDL-37818 - RSS - Prevent access to blocks while RSS context errors are displayed 2013-07-02 10:03:57 +08:00
Dan Poltawski 204383e50d Merge branch 'w27_MDL-40266_m25_arrayshift' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-02 09:55:24 +08:00
Eloy Lafuente (stronk7) f1293083a2 Merge branch 'get_users_by_capability_fix_m25' of http://github.com/timgus/moodle into MOODLE_25_STABLE 2013-07-02 00:46:38 +02:00
Sam Hemelryk f0d974fb28 Merge branch 'MDL-39733_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-07-02 10:31:28 +12:00
Eloy Lafuente (stronk7) 16a2860ad2 MDL-39733 xhprof: implement import of runs 2013-07-02 00:27:30 +02:00
Rossiani Wijaya bb9024d9d4 MDL-39546 Lesson module: removed duplicate to decode special characters 2013-07-02 09:36:46 +12:00
Rossiani Wijaya a77f19bc47 MDL-39546 Lesson module: fixed matching question issues. 2013-07-02 09:36:32 +12:00
Eloy Lafuente (stronk7) 2bc8f21600 Merge branch 'w27_MDL-39754_m25_evn26' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-07-01 23:14:05 +02:00
Eloy Lafuente (stronk7) 75b8d4a146 Merge branch 'MDL-40370_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-01 18:02:51 +02:00
Eric Merrill 74d5fbac04 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:26:52 -04:00
Tim Hunt 33b4331eaf 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:23:55 +01:00
prateeksachan ef57de83db MDL-40386: Fix for updating timemodified field in book_chapters 2013-07-01 14:32:34 +05:30
Petr Škoda 00a2921469 MDL-39754 copy 2.5 requirements to Moodle 2.6
Optional features and warnings may be added later,
but we need at least required environment for 2.5.1

This includes database family cleanup and more realistic memory requirement.
2013-07-01 10:03:14 +02:00
Petr Škoda fc4523f8f3 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:51 +02:00
Petr Škoda 39714cb255 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:52:51 +02:00
Mark Nielsen c11621b415 MDL-40308: Privacy settings do not change
Update LTI mod form so checkboxes always submit their value.
2013-07-01 11:27:43 +08:00
Dan Poltawski 7698803c95 Merge branch 'wip-MDL-40344-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-07-01 11:22:05 +08:00
Ankit Agarwal 770710e1cd MDL-39020 phpunit: Rename incorrect filename
Rename externallib_tests.php to externallib_test.php
Fix failing unit tests
2013-07-01 10:52:42 +08:00
Sam Hemelryk ebc9b6d158 Merge branch 'MDL-40069_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-07-01 13:47:50 +12:00
Sam Hemelryk ae754bba07 NOBUG: fixed whitespace 2013-07-01 13:24:04 +12:00
Sam Hemelryk d20391916c Merge branch 'wip-MDL-39741-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-07-01 13:17:48 +12:00
Sam Hemelryk 9a561bc5a1 Merge branch 'MDL-35206-email-links_25' of git://github.com/mudrd8mz/moodle into MOODLE_25_STABLE 2013-07-01 13:08:15 +12:00
Eloy Lafuente (stronk7) 7af092c2d6 MDL-39733 profiling: UI for importing runs 2013-07-01 01:39:55 +02:00
Eloy Lafuente (stronk7) 706db16531 MDL-39733 profiling: UI for exporting runs 2013-07-01 01:39:50 +02:00
Eloy Lafuente (stronk7) e3c2cb4656 MDL-39733 xhprof: implement export of runs 2013-07-01 01:39:45 +02:00
Andrew Nicols 2738bb2c2f MDL-40376 Themes: Remove padding from course/manage page 2013-06-30 19:28:41 +01:00
Martin Langhoff c17768973e 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:39:53 +02:00
Eloy Lafuente (stronk7) 11ffc395f4 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:10:25 +02:00
Eloy Lafuente (stronk7) 1608fbe7c0 MDL-40297 whitespace, comments & var names cleanup 2013-06-30 16:48:44 +02:00
Dmytro Vorona 0927af1e8d MDL-40297 Hide empty categories in my courses
This is a followup of MDL-38631 were was detected that
whith categories being displayed in my courses, some of
them, not having courses for the user, were still shown.

With this patch, any category in the tree, not having courses
is automatically hidden, any depth.
2013-06-30 16:48:39 +02:00
Tim Hunt 77504426de 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:21:04 +01:00
Colin Chambers 2fe9be7a9e MDL-40069 Document editing form changes 2013-06-28 18:21:02 +01:00
David Mudrák 52d485c435 MDL-35206 Fix the links list enumeration in the html2text library 2013-06-28 13:13:29 +02:00
Colin Chambers 93a2a0e3d7 MDL-40282 Collapsible editor loses border in IE8-9 2013-06-28 11:23:47 +01:00
Mary Evans dc59a1b1f9 MDL-40131 theme_bootstrapbase: added missing grader table css to less/moodle/grade.less 2013-06-28 02:45:29 +01:00
Sam Hemelryk 21d9cb723b MDL-40344 navigation: expandable branch id is now properly unique 2013-06-28 09:59:09 +12:00
Eloy Lafuente (stronk7) 32e550a6eb weekly release 2.5+ 2013-06-27 20:12:40 +02:00
Eloy Lafuente (stronk7) 97a7b6a7aa Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-06-27 20:05:10 +02:00
Marina Glancy 3c4c23876c MDL-39741 removed unused css classes 2013-06-27 22:18:59 +10:00
David Monllao ff46f98998 MDL-40246 mod_forum: Changing scenario to non-JS
Also replacing hardcoded waits for a
wait to be redirected.
2013-06-27 15:13:12 +08:00
Marina Glancy 00b4836197 MDL-40353 fixed wrong redirection on course group page 2013-06-27 13:45:16 +10:00
Marina Glancy 4af378d743 MDL-39741 Use CSS class dimmed_text instead of hidden in grader report 2013-06-27 12:36:11 +10:00
AMOS bot fab0986a5b Automatically generated installer lang files 2013-06-27 00:40:24 +00:00
Eloy Lafuente (stronk7) 866ab6e1ce Merge branch 'w26_MDL-39701_m25_filterupgrade' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-26 12:30:51 +02:00
Petr Škoda 0b675e0ca2 MDL-39701 prevent string filtering before finishing 2.5 upgrade 2013-06-26 09:51:03 +02:00
Eloy Lafuente (stronk7) 3166c21471 Merge branch 'MDL-40033_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-06-25 12:08:25 +02:00
Gareth J Barnard 2ab1b3de30 MDL-40204 theme_bootstrapbase & theme_clean: Fix RTL 3 column lyt with 1 blk. 2013-06-25 11:38:27 +12:00
Sam Hemelryk 6e07abb32d Merge branch 'wip-MDL-40065-m25_4' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-06-25 09:58:44 +12:00
Sam Hemelryk bc0227d3e5 Merge branch 'w26_MDL-40289_m25_badgescaps' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-25 09:13:05 +12:00
Eloy Lafuente (stronk7) e9d80e664b Merge branch 'w26_MDL-40233_m25_frontset' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-24 21:29:13 +02:00
Eloy Lafuente (stronk7) ffc480afbd Merge branch 'MDL-40264-m25-essay-zero' of git://github.com/ktemkin/moodle into MOODLE_25_STABLE 2013-06-24 21:23:43 +02:00
Eloy Lafuente (stronk7) 3d4a0f2887 Merge branch 'w26_MDL-40254_m25_flatfile' of https://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-24 21:13:06 +02:00
Eloy Lafuente (stronk7) 9067595bf3 Merge branch 'MDL-34610_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-06-24 20:21:30 +02:00
Eloy Lafuente (stronk7) 94a541f7ff Merge branch 'MDL-40255_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-06-24 19:26:22 +02:00
Eloy Lafuente (stronk7) 3e6f11b240 Merge branch 'm25_MDL-40200_Notices_When_Viewing_Profile_Invalid_UserId' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-06-24 19:00:43 +02:00
Sam Chaffee 7991637057 MDL-40258: Fixed invalid json string error in file-picker 2013-06-24 18:56:54 +02:00
Ankit Agarwal 4f61afa0b7 MDL-40250 phpunit: Add unit tests for core_files_external::upload() 2013-06-24 18:06:26 +02:00
Gareth J Barnard fb42a8c761 MDL-40065 theme_bootstrapbase theme_clean: Simplify column lyts / fix blocks. 2013-06-24 16:59:11 +01:00
Sam Hemelryk 4418496864 Merge branch 'wip-MDL-39044-stable25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE 2013-06-24 15:41:24 +12:00
Sam Hemelryk 82125f7a78 Merge branch 'w26_MDL-39701_m25_filterupgrade' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-24 15:07:14 +12:00
Sam Hemelryk 9e5adb9305 Merge branch 'MDL-39779_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-06-24 14:33:04 +12:00
Sam Hemelryk 23dd6b7ebf Merge branch 'MDL-39760-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2013-06-24 14:29:56 +12:00
Frederic Massart af4bdb8c8d MDL-39280 form: Multiple select support disabledIf with multiple values 2013-06-24 14:20:33 +12:00
Sam Hemelryk 12a9b4ec3a Merge branch 'mdl25-MDL-40130-let-course-category-caching-be-used' of git://github.com/brki/moodle into MOODLE_25_STABLE 2013-06-24 11:43:54 +12:00
Sam Hemelryk 084b971bc8 MDL-38347 fixed whitespace 2013-06-24 11:29:26 +12:00
Jason Fowler df7662560b MDL-38347 - Calendar - Fixing arrow output on Android devices 2013-06-24 11:22:51 +12:00
Sam Hemelryk 405a60712b Merge branch 'MDL-28124_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-06-24 10:30:08 +12:00
Amanda Doughty bce7b6d40e MDL-38376 mod_assign: Feedback displayed when Grade set to hidden 2013-06-24 10:22:34 +12:00
Petr Škoda 55384d2016 MDL-40254 ignore flatfile records with no user idnumber 2013-06-23 21:38:39 +02:00
Petr Škoda f8bb8999e8 MDL-40289 fix block_badges capability defaults 2013-06-23 12:34:02 +02:00
Petr Škoda 2fbf721f27 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:23:50 +02:00
Mary Evans 233edd4dde MDL-40255 theme_boxxie/theme_formfactor: Added block-region class to layout files to enable dnd file uploader to work. 2013-06-22 21:24:23 +01:00
Petr Škoda 75f1afeda0 MDL-39701 prevent filters before finishing 2.5 upgrade
This prevents problems with unsigned integers in MySQL 5.5
2013-06-22 22:23:25 +02:00
Petr Škoda 808043d356 MDL-40233 add proper cache invalidation on frontpage setting save 2013-06-22 22:19:27 +02:00
Matteo Scaramuccia da0c3ea381 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 10:00:59 +02:00
Marina Glancy a028ac4aaf MDL-38631 link categories in My courses only when needed 2013-06-22 16:25:43 +10:00
Dmytro Vorona 02e1c8ad20 MDL-38631 Fixed faulty add_category call, introduced in 758103 2013-06-22 16:25:42 +10:00
Tim Hunt 3174f09839 MDL-34610 remove legacy IE CSS. It breaks form layout 2013-06-21 21:57:37 +01:00
Brian King 1a703d311e MDL-40130 Caching: let make_categories_list use the cache it makes 2013-06-21 11:14:08 +02:00
David Monllao 922a5cf370 MDL-40033 behat: Waiting until file manager is available 2013-06-21 15:36:41 +08:00
Dan Poltawski e978b66009 weekly release 2.5+ 2013-06-21 13:30:52 +08:00
Dan Poltawski 8e29fe2d72 Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-06-21 13:29:46 +08:00
Kyle Temkin 11f6680dee 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:12:21 -04:00
Tim Gus 0bad576425 MDL-40259 - For SCORM reports limit fields returned from
get_users_by_capability to user ID to decrease memory utilization
2013-06-20 15:56:07 -04:00
Jason Fowler 1620d20165 MDL-39044 - Course Completion - Replaceing strtolower with multibyte safe textlib::strtolower 2013-06-20 08:49:38 +08:00
Ruslan Kabalin e2d5b6cbc8 MDL-39760: mod_assign: Add few more callback methods.
Adds lock, unlock and release_to_draft. All of them accept single parameter -
an assign_submission record.
2013-06-19 15:34:02 +01:00
Yuliya Bozhko e787333622 MDL-40022 badges: Fix missing calls to setType in course criteria settings 2013-06-19 13:41:49 +08:00
David Monllao 4ab623b9b6 MDL-40109 behat: Fixing backup feature 2013-06-19 09:14:05 +08:00
Marina Glancy 8526be5612 Merge branch 'MDL-40207-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-18 15:38:20 +10:00
Ruslan Kabalin eede0dbd7b MDL-33546: course: Fix current week hightlighting after dragging the section 2013-06-18 13:02:27 +10:00
Marina Glancy 4d7c173514 Merge branch 'MDL-40165-m25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE 2013-06-18 12:57:06 +10:00
Sam Hemelryk 70d4b3182d Merge branch 'MDL-39634_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-06-18 14:50:47 +12:00
Nadav Kavalerchik 32a3dc0ec0 MDL-40180 - RTL/Clean theme: Misalignment of student name and profile image in grader (fixed by Mary Evans)
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-18 10:43:48 +08:00
Sam Hemelryk 663c69e974 Merge branch 'MDL-40036-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-06-18 13:59:30 +12:00
Sam Hemelryk eaf4854359 Merge branch 'MDL-39865-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-06-18 13:54:56 +12:00
Marina Glancy 04597742cf Merge branch 'MDL-38079_25' of git://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-06-18 11:13:26 +10:00
Eloy Lafuente (stronk7) f68a2c50e6 MDL-40137 Whitespace fix 2013-06-18 01:47:44 +02:00
Eloy Lafuente (stronk7) 5e069cbd96 Merge branch 'wip-MDL-40137-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-06-18 01:45:27 +02:00
Sam Hemelryk 3d19b183c6 Merge branch 'wip-mdl-39863-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-06-18 11:19:30 +12:00
Sam Hemelryk d81ebc8f0d Merge branch 'MDL-40109_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-06-18 11:07:57 +12:00
Eloy Lafuente (stronk7) 5cc26839e7 Merge branch 'w25_MDL-40210_m25_badgescaps' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-18 00:56:11 +02:00
Eloy Lafuente (stronk7) a831f154ae Merge branch 'MDL-33562-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE
Conflicts:
	lib/db/upgrade.php
	version.php
2013-06-18 00:44:17 +02:00
Sam Hemelryk 54c7d518f3 Merge branch 'MDL-30132_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-06-18 10:26:53 +12:00
Petr Škoda ec18ffb86c MDL-40210 do not use CAP_PREVENT for role defaults! 2013-06-17 12:13:20 +02:00
Russell Smith 842aac5ecb MDL-38079 mod_feedback - Hide "add question to activity" button 2013-06-17 19:59:37 +10:00
David Monllao dc24efe971 MDL-40110 behat: AM/PM strings are OS-dependant, removing this part from tests 2013-06-17 17:06:38 +08:00
Dan Poltawski 160e432aee Merge branch 'MDL-39825_master' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-06-17 16:41:15 +08:00
Dan Poltawski e38c37939a Merge branch 'wip-MDL-40136-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-06-17 13:37:23 +08:00
Sam Hemelryk e15bf9b1e5 Merge branch 'm25_MDL-40095_Completion_locked_Error_on_save' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-06-17 16:10:38 +12:00
Sam Hemelryk 1d1b52eb0c Merge branch 'MDL-21933_25' of https://github.com/mr-russ/moodle into MOODLE_25_STABLE 2013-06-17 15:45:33 +12:00
Sam Hemelryk 209658eab2 Merge branch 'wip-MDL-40091-MOODLE_25_STABLE' of git://github.com/satrun77/moodle into MOODLE_25_STABLE 2013-06-17 15:43:18 +12:00
Rossiani Wijaya 49a60b6c65 MDL-39779 wiki module: fix the alignment for required label to display inline on mobile devices 2013-06-17 11:42:47 +08:00
Sam Hemelryk 8c155823cc Merge branch 'MDL-39369_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE 2013-06-17 15:10:21 +12:00
Dan Poltawski 3c4fcce769 MDL-40207 simplepie: reduce false failures in unit tests
The simplepie tests time out too quickly due to a low connect timeout,
to fix this, I converted the unit tests to use a high timeout value.
2013-06-17 10:46:53 +08:00
Sam Hemelryk 443563a82e Merge branch 'MDL-39761-MOODLE_25_STABLE' of https://github.com/lucisgit/moodle into MOODLE_25_STABLE 2013-06-17 14:26:37 +12:00
David Monllao 346765035a MDL-39634 behat: Adding debugging() messages to deprecated methods 2013-06-17 09:02:39 +08:00
David Monllao 944fd1ca83 MDL-39634 behat: Adding deprecated methods
To keep compatibility if someone is
already using these methods.
2013-06-17 09:01:38 +08:00
David Monllao ded65ca8e0 MDL-39634 behat: Removing unused arguments 2013-06-17 08:59:59 +08:00
AMOS bot 2bf9edf84f Automatically generated installer lang files 2013-06-17 00:43:36 +00:00
Marina Glancy 29a4508930 Merge branch 'wip-MDL-40142-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-06-17 10:40:39 +10:00
Sam Hemelryk bda2a7bdf5 MDL-39949 dock: fixed whitespace 2013-06-17 10:24:53 +12:00
Jason Fowler 64ddb28dfd MDL-39949 - Blocks - preventing blocks with empty titles from blocking the execution of javascript 2013-06-17 10:01:44 +12:00
Sam Hemelryk 6fa5e8658a MDL-40137 theme_clean: corrected lib.php function names 2013-06-17 09:39:20 +12:00
Sam Hemelryk 43dc7aa976 MDL-40136 cache: fixed dirroot change bugs with plugin caches 2013-06-17 09:23:47 +12:00
Sam Hemelryk 5d9349b61a MDL-40142 navigation: fixed chainable issue with navigation JS 2013-06-17 09:12:43 +12:00
Mary Evans ff24397ff3 MDL-28124 admin/tool/customlang: Changed page layout from 'standard' to 'report'. 2013-06-14 23:27:34 +01:00
Mohamed Alsharaf de5568b18e MDL-40091 book: revision must be incremented after editing a chapter 2013-06-14 21:28:31 +12:00
Marina Glancy d3cf194050 weekly release 2.5+ 2013-06-14 13:53:28 +10:00
Marina Glancy 37d38a3125 Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-06-14 13:50:50 +10:00
Andrew Nicols 2804eb29c6 MDL-40165 Backup: Split out test classes into multiple files 2013-06-13 08:57:24 +01:00
Rossiani Wijaya e85e3bff3e MDL-39369: Lesson module: change settype PARAM_TEXT to PARAM_NOTAGS 2013-06-13 15:37:45 +08:00
Rossiani Wijaya 51c72ecaa5 MDL-39369: Lesson module: fix setType() properly 2013-06-13 15:36:16 +08:00
Dan Poltawski 30703dc8f2 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:23:55 +08:00
Dan Poltawski 33beb96847 Revert "MDL-39832 Files: Revert MDL-39688 commit, 161be9206571787557eb5c11ee440c9e6ae93ca8"
This reverts commit d618e3c07d.
2013-06-13 13:57:02 +08:00
Dan Poltawski 7f742cece1 Revert "MDL-39832 Files: Fixed ETag format according with RFC2616."
This reverts commit 52286ac358.
2013-06-13 13:57:00 +08:00
Russell Smith ab0e64524d 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:43:29 +10:00
AMOS bot 2a93e8d72c Automatically generated installer lang files 2013-06-13 00:41:25 +00:00
Mary Evans 6780a2301e MDL-30312 User: Changed page layout from mydashboard to mypublic in user/profile.php 2013-06-12 21:33:28 +01:00
sam marshall 3a2e904098 MDL-39472 MUC: Optimise cache::get_from_persist_cache 2013-06-12 14:29:48 +08:00
Dan Poltawski 6117c578e4 Merge branch 'MDL-39773_b_m25' of git://github.com/rwijaya/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-12 09:34:04 +08:00
Sam Hemelryk 69303857c7 Merge branch 'MDL-39940-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-12 09:06:33 +12:00
Sam Hemelryk a4848b4044 Merge branch 'MDL-39964-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-12 09:02:40 +12:00
Sam Hemelryk a6b980d13b Merge branch 'MDL-25901-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-12 09:00:11 +12:00
Sam Hemelryk 9e53bbd007 Merge branch 'w24_MDL-38109_m25_pluginlist' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-12 08:53:49 +12:00
Sam Hemelryk e0699a7154 Merge branch 'wip-MDL-39798_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-12 08:51:21 +12:00
Sam Hemelryk aa41f96d1a Merge branch 'wip-MDL-39820_M25_2' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-12 08:46:45 +12:00
Petr Škoda e4fcb52f44 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:23:14 +02:00
Dan Poltawski bacf4c5c71 Merge branch 'wip-MDL-40087_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-11 16:00:51 +08:00
Dan Poltawski 43c5a7d5ad Merge branch 'wip-MDL-40100-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-06-11 15:35:31 +08:00
Sam Hemelryk 624f270a26 Merge branch 'MDL-26925-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-11 17:31:36 +12:00
Sam Hemelryk 313bcd5268 Merge branch 'MDL-22390_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-06-11 17:07:24 +12:00
Mark Nelson 5a21d336f3 MDL-40010 notes: passing an object rather than an id to avoid debugging message 2013-06-11 13:05:40 +08:00
Dan Poltawski f60ad3fdff Merge branch 'm25_MDL-40002_ETag_value_must_be_a_quoted-string' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-06-11 12:54:38 +08:00
Jason Fowler 2daa9998ae MDL-39746 - Themes - Hiding the user picture on the forum page when the screensize is too small to allow for it
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-11 11:25:04 +08:00
Rajesh Taneja 6079448098 MDL-39863 Administration: Show confirmation/notice and don't redirect automatically 2013-06-11 10:24:51 +08:00
Tim Lock 992c0ec50d MDL-40120: Fix get_course_records() which breaks in PSQL 2013-06-11 13:47:05 +12:00
sam marshall aca67ae8b0 MDL-39454 Accesslib: is_siteadmin is a bit slow 2013-06-11 12:27:09 +12:00
Matteo Scaramuccia 474c13f27f MDL-40095 SCORM: Trivial comments tidy up 2013-06-10 20:52:24 +02:00
Matteo Scaramuccia 7480e99306 MDL-40095 SCORM: Fixed DML error when saving with completion options locked
Regression caused by MDL-38315.
2013-06-10 20:52:14 +02:00
Dan Poltawski 96241e57e9 Merge branch 'MDL-39947_25' of https://github.com/aolley/moodle into MOODLE_25_STABLE 2013-06-10 16:20:30 +08:00
Dan Poltawski ade2afc29f Merge branch 'MDL-39338_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-10 16:07:28 +08:00
Dan Poltawski 534f1476f4 Merge branch 'm25_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile' of https://github.com/scara/moodle into MOODLE_25_STABLE 2013-06-10 15:42:53 +08:00
Rajesh Taneja b625e48b87 MDL-39639 Formslib: Hide calendar for datetime element on disable event 2013-06-10 15:29:16 +08:00
Dan Poltawski a327e87866 Merge branch 'MDL-40018_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-06-10 15:00:20 +08:00
Dan Poltawski 0f74c82897 Merge branch 'MDL-40013_25stable' of git://github.com/oasychev/moodle into MOODLE_25_STABLE 2013-06-10 14:58:12 +08:00
David Mudrák 3ee63c14e0 MDL-40080 Remove unused strings from the core_hub subsystem 2013-06-10 14:41:53 +08:00
Mark Nelson f31670ef40 MDL-40008 forms: fixed ordering of the calendar icon and enable checkbox for the date selector element 2013-06-10 14:25:14 +08:00
David Monllao b1f151c933 MDL-40109 format_weeks: Removing extra space 2013-06-10 13:31:22 +08:00
Dan Poltawski 7f9f03442a Merge branch 'w24_MDL-39096_m25_obfuscate' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-10 13:12:16 +08:00
Dan Poltawski 9d1a909f0e Merge branch 'w24_MDL-28394_m25_enrolrestore' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-10 12:17:04 +08:00
Yuliya Bozhko 8b7c33ae77 MDL-39825 badges: Remove badges from course navigation when course badges are disabled 2013-06-10 16:16:59 +12:00
Dan Poltawski c9d1c4993d Merge branch 'm25_MDL-37968' of git://github.com/danmarsden/moodle into MOODLE_25_STABLE 2013-06-10 12:09:59 +08:00
Mary Evans 7b9caeb92b MDL-39016 theme_bootstrapbase: Added login info and home link to footer in both boostrapbase & clean layout/general.php 2013-06-10 16:04:22 +12:00
Mark Nelson 49acbbad2f MDL-40009 notes: corrected the form element names passed to setType 2013-06-10 15:55:53 +12:00
Sam Hemelryk afe247a0ca Merge branch 'w24_MDL-39549_m25_cohortsearch' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-10 15:48:11 +12:00
Sam Hemelryk f7c2942961 Merge branch 'MDL-39971_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-06-10 15:09:34 +12:00
Dan Poltawski 6f4232974e Merge branch 'wip-MDL-39824-m25' of http://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-06-10 10:54:27 +08:00
Sam Hemelryk f981643f58 Merge branch 'MDL-39978_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-06-10 14:44:40 +12:00
Sam Hemelryk 2f8602990f Merge branch 'w24_MDL-32480_m25_imscp' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-10 14:41:07 +12:00
Sam Hemelryk 7174920aaa MDL-39824 theme: tweaking upgrade note version 2013-06-10 14:34:25 +12:00
Jason Fowler 57ecff6356 MDL-39608 - Bootstrap - Chaning the thresholds and width values for the Form labels
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-10 14:28:54 +12:00
AMOS bot 2d69af043d Automatically generated installer lang files 2013-06-10 00:39:09 +00:00
Andrew Davis a1d43d9e4f MDL-36090 core_grade: added logging of overriding of student grades 2013-06-10 12:35:03 +12:00
Sam Hemelryk 08c2a3ca1f Merge branch 'wip-MDL-40088-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-06-10 12:14:04 +12:00
Jason Fowler fbc635e400 MDL-39227 - SCORM - repositioning the navigation panel to be visible in all themes at all resolutions 2013-06-10 11:59:36 +12:00
Sam Hemelryk 00afef17bb Merge branch 'MDL-39979-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-06-10 11:33:59 +12:00
Sam Hemelryk c174a19207 MDL-40100 cache: removed unneeded includes from add instance forms 2013-06-10 10:26:27 +12:00
Sam Hemelryk d89fbe0285 MDL-39871 themes: can now specify regions to swap when using rtl langs
Conflicts:
	lib/pagelib.php
2013-06-10 09:31:05 +12:00
Sam Hemelryk ddf1b0741d MDL-39824 theme: changes recorded in theme/upgrade.txt 2013-06-10 09:29:58 +12:00
Sam Hemelryk dac7c261ca MDL-39824 output: fixed bug when moving blocks with rtl lang 2013-06-10 09:29:58 +12:00
Sam Hemelryk 8504444307 MDL-40089 theme_clean: simplified layouts and converted to new OUTPUT API 2013-06-10 09:29:58 +12:00
Sam Hemelryk 602255df1a MDL-40089 theme_clean: moved general to columns3.php as prep 2013-06-10 09:29:58 +12:00
Sam Hemelryk ee7a52ae91 MDL-39842 js: fixed block drag and drop 2013-06-10 09:29:58 +12:00
Sam Hemelryk 6964e6a580 MDL-39824 theme_bootstrapbase: converted $PAGE use to new $OUTPUT methods. 2013-06-10 09:29:58 +12:00
Sam Hemelryk 5c8c94eabe MDL-40089 theme_bootstrapbase: moved general to columns3.php as prep 2013-06-10 09:29:57 +12:00
Sam Hemelryk 00f906b114 MDL-39824 output: tidied up output before bootstrap cleaning
Conflicts:
	lib/pagelib.php
2013-06-10 09:29:03 +12:00
Sam Hemelryk 2d28b03d90 MDL-39839 renderer: new methods for calls appearing in theme layouts 2013-06-10 09:28:24 +12:00
Sam Hemelryk 03fa7a2ba3 MDL-39838 renderer: new methods for body classes and id 2013-06-10 09:28:24 +12:00
Sam Hemelryk cd79352fbd MDL-39841 renderer: new method to renderer blocks with predictable structure 2013-06-10 09:28:24 +12:00
Matteo Scaramuccia f082c5e390 MDL-40002 Files: ETag value must be a quoted-string.
ETag value must be double quoted, http://tools.ietf.org/html/rfc2616#section-3.11.
More details about potential impacts in MDL-39832: shortly, at least when using
HTTP Partial GET Requests (HTTP Status: 206) plus X-Sendfile HTTP Header.
In this commit, the impact is to be RFC2616 compliant when using the ETag Header.
2013-06-09 10:14:02 +02:00
Tim Hunt 266ceb16a6 MDL-22390 autolink filter: handle URLs in brackets better.
This breaks some legitimate URLs like
http://en.wikipedia.org/wiki/Slash_(punctuation).
This is a necessary trade-off. Many other web systems do not handle that
case correctly either. The work-around it so escape the ) as %29.

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

It also fixes a couple of other tricky cases that were spotted in
the forums while this was being discussed. See the new test cases.
2013-06-08 17:28:53 +01:00
Gareth J Barnard 35b76a3507 MDL-39798 theme_bootstrapbase: Improve layout for course participation reports. 2013-06-08 13:55:22 +01:00
Petr Škoda 06de509918 MDL-39096 fix obfuscate_text() utf-8 compatibility 2013-06-07 22:43:26 +02:00
Petr Škoda 788e1924a2 MDL-39549 fix cohort search in course categories 2013-06-07 22:07:53 +02:00
Gareth J Barnard 9bc4a4cc79 MDL-40087 theme_bootstrapbase: Turn editing on button misaligned on nav bar. 2013-06-07 18:15:34 +01:00
Petr Škoda d98b9a945e 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:03:25 +02:00
Petr Škoda 4ab6c6fbc0 MDL-32480 allow external https links in IMSCP too 2013-06-07 09:58:54 +02:00
Nicolas Dunand a2ec961309 MDL-32480 fix display of IMS content packages with external links 2013-06-07 09:58:53 +02:00
Marina Glancy 86882b6dfe MDL-40088 fixed bug with not visible course section 2013-06-07 13:58:57 +10:00
Dan Marsden ff3a54a5f7 MDL-37968 course_overview: add dim class to hidden courses for teachers. 2013-06-07 14:39:29 +12:00
Mary Evans 82887b29e8 MDL-39338 core_question: Make history box a .well 2013-06-06 22:57:09 +01:00
Matteo Scaramuccia 52286ac358 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:11:15 +02:00
Matteo Scaramuccia d618e3c07d MDL-39832 Files: Revert MDL-39688 commit, 161be92065
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:11:14 +02:00
Oleg Sychev 14e5c99960 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:59:33 +03:00
Frederic Massart 333df7d951 MDL-39979 navigation: Remove the use of an undefined variable 2013-06-06 14:53:27 +08:00
Dan Poltawski 6cf8499253 MDL-26925 User selector: Set label when no results
Thanks to Jonathon Fowler for the fix!
2013-06-06 14:09:39 +08:00
Frederic Massart a3fa82636d MDL-40036 user: Respect capability to ignore user quota 2013-06-06 12:43:34 +08:00
Dan Poltawski 1430866232 weekly release 2.5+ 2013-06-06 12:01:38 +08:00
Dan Poltawski 1c437c97f7 Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-06-06 11:55:07 +08:00
Dan Poltawski 0fbfae718d MDL-25901 rss: do not copyright html tag
They copyright field does not permit html, it should be plain text
2013-06-06 11:30:27 +08:00
Eloy Lafuente (stronk7) 61899ac202 Merge branch 'wip-MDL-38773-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-06-05 19:32:14 +02:00
Eloy Lafuente (stronk7) 92c46e00eb Merge branch 'w23_MDL-39588_m25_ociinstall' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-05 16:24:22 +02:00
Eloy Lafuente (stronk7) 1127607bce Merge branch 'w23_MDL-39503_m25_signup' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-05 16:18:01 +02:00
Eloy Lafuente (stronk7) ef580461f6 Merge branch 'wip-MDL-21097-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-06-05 10:36:22 +02:00
Dan Poltawski 2d0faffb7f MDL-39940 tags: missing setType call 2013-06-05 16:17:26 +08:00
Marina Glancy f9d68a11da MDL-21097 Correctly check capabilities for frontpage editing mode 2013-06-05 18:09:34 +10:00
Dan Poltawski 0a8985843e MDL-39964 report_progress: don't browser sniff for SVG support
Use feature detection, its more robust and better practice.
2013-06-05 15:42:26 +08:00
Dan Poltawski e0e6015416 Merge branch 'wip-MDL-21097-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-06-05 13:10:18 +08:00
Rossiani Wijaya 9db4dcb68b MDL-39773 bootstrapbase: add style for .centerpadded.
Relocate .centerpadded styling from standard to base themes
2013-06-05 12:50:15 +08:00
Marina Glancy 6b52abc0af MDL-21097 corrected course editing roles 2013-06-05 14:27:50 +10:00
Mary Evans 179fbc7f11 MDL-39977 theme_bootstrapbase: Changes the way Clean theme's login takes its navbar styles from Bootstrapbase.
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-05 10:13:39 +08:00
Marina Glancy 28ce5653c0 MDL-38773 Purge coursecat cache on course restore 2013-06-05 12:05:05 +10:00
Brian King c017ccff4c MDL-39409 auth/cas pass web proxy settings along to phpCAS 2013-06-05 02:46:25 +02:00
Eloy Lafuente (stronk7) ea85ee6f63 Merge branch 'w23_MDL-39416_m25_pagelog' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-05 02:43:48 +02:00
AMOS bot 2fb98d4bc0 Automatically generated installer lang files 2013-06-05 00:39:45 +00:00
Dan Poltawski 9a0e9776c0 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-06-05 02:34:13 +02:00
Eloy Lafuente (stronk7) 832aa7eb71 Merge branch 'MDL-38731-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-05 02:30:56 +02:00
Eloy Lafuente (stronk7) 0e73df9df6 Merge branch 'MDL-37332-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-05 02:27:35 +02:00
Matteo Scaramuccia ab8e75ef40 MDL-38545 Reports: PHP Strict Standards error in graph.php 2013-06-05 02:23:05 +02:00
Eloy Lafuente (stronk7) ef8a1c4908 Merge branch 'MDL-39790_master' of git://github.com/totara/openbadges into MOODLE_25_STABLE 2013-06-05 01:45:28 +02:00
Eloy Lafuente (stronk7) 0f51a82bae Merge branch 'wip-MDL-21097-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-06-05 01:43:11 +02:00
Mary Evans 358544f9b7 MDL-40018 theme_sky_high: Fixed footer in admin pages. 2013-06-05 00:18:33 +01:00
Eloy Lafuente (stronk7) 36e5df06b3 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:49:35 +02:00
Eloy Lafuente (stronk7) 8c8b3eba24 Merge branch 'MDL-39723-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE 2013-06-04 17:48:57 +02:00
Gareth J Barnard faccb2ba9f MDL-39820 theme_bootstrapbase: Fix form button alignment for badges. 2013-06-04 11:17:23 +01:00
Dan Poltawski bf2360c597 Merge branch 'MDL-39945_25' of git://github.com/timhunt/moodle into MOODLE_25_STABLE 2013-06-04 15:54:01 +08:00
Dan Poltawski e7bb4b1ee7 Merge branch 'MDL-39835_M25' of github.com:lazydaisy/moodle into MOODLE_25_STABLE 2013-06-04 14:43:13 +08:00
Dan Poltawski 2b7e18fded Merge branch 'wip-MDL-39819_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-06-04 14:38:36 +08:00
Marina Glancy f85cb076aa MDL-39870 correctly determine whether activity is resource or module 2013-06-04 14:14:39 +08:00
Dan Poltawski 836dab79c0 MDL-39931 less: recompile with whitespace removed 2013-06-04 14:09:28 +08:00
Dan Poltawski 2fdfdd49d4 Merge branch 'MDL-39931-M25' of github.com:lazydaisy/moodle into MOODLE_25_STABLE 2013-06-04 13:32:33 +08:00
Dan Poltawski cb1318754e Merge branch 'MDL-39536-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-06-04 13:19:16 +08:00
Frederic Massart 491e196107 MDL-39536 completion: Unit tests for get_activities and has_activities 2013-06-04 12:58:03 +08:00
Frederic Massart 13f73be25b MDL-39536 completion: Prevent DB call when fetching activities 2013-06-04 12:58:02 +08:00
David Mudrák 21c4402280 MDL-39939 Fix the basic SCORM report plugin name 2013-06-04 12:27:42 +08:00
Dan Poltawski 2140e5afa4 Merge branch 'wip-mdl-39827-m25' of git://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE 2013-06-04 11:29:57 +08:00
Dan Poltawski acae4313c8 Merge branch 'MDL-39317-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-06-04 11:26:33 +08:00
Frederic Massart 16725a78d0 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:14:02 +08:00
Frederic Massart 3e17b1c4a7 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:14:02 +08:00
Dan Poltawski e19a07bfcb Merge branch 'MDL-39743-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE 2013-06-04 11:03:45 +08:00
Dan Poltawski c687e8d741 Merge branch 'wip_25_mdl-34085' of https://github.com/iarenaza/moodle into MOODLE_25_STABLE 2013-06-04 10:42:55 +08:00
AMOS bot 09c0ea1f39 Automatically generated installer lang files 2013-06-04 00:46:34 +00:00
Eloy Lafuente (stronk7) 1fe7be205c Merge branch 'wip-MDL-39801-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-06-04 01:58:27 +02:00
Eloy Lafuente (stronk7) 6399a82028 MDL-39764 style: phpdoc changed to inline comments 2013-06-04 01:43:35 +02:00
Eloy Lafuente (stronk7) 8a2cee5091 Merge branch 'wip-MDL-39764_M25_3' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE 2013-06-04 01:43:28 +02:00
Eloy Lafuente (stronk7) ca7f399be7 Merge branch 'w23_MDL-39882_m25_behatconfig' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-04 01:32:12 +02:00
Damyon Wiese 6c37003d05 MDL-39821 assign: missing setType with advanced grading 2013-06-04 01:30:20 +02:00
Eloy Lafuente (stronk7) d1963974a9 MDL-39465 Show env. info instead of part twice. 2013-06-04 00:50:55 +02:00
Gareth J Barnard 3b4752e1f2 MDL-39764 course_format: Allow courses to have numsections > maxsections. 2013-06-03 23:43:24 +01:00
Eloy Lafuente (stronk7) 618737d7e9 Merge branch 'MDL-39936-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-06-04 00:05:04 +02:00
Eloy Lafuente (stronk7) 06ab9b8888 Merge branch 'w23_MDL-39465_m25_environment' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-06-04 00:00:44 +02:00
Justin Filip c7abb11786 MDL-39166 auth_ldap Add triggers for user created/updated events. 2013-06-03 23:55:30 +02:00
Eloy Lafuente (stronk7) 73f8ab649f Merge branch 'wip-MDL-39710-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE 2013-06-03 23:22:17 +02:00
Eloy Lafuente (stronk7) 189590bb37 Merge branch 'MDL-39932_25' of git://github.com/grabs/moodle into MOODLE_25_STABLE 2013-06-03 19:10:39 +02:00
Albert Gasset 827e54dde5 MDL-39487 mod/assign: fixed ID number of grade item changing 2013-06-03 19:05:55 +02:00
Eloy Lafuente (stronk7) 42a9e3efc2 Merge branch 'MDL-39987_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-06-03 16:07:47 +02:00
Mary Evans f58fadfeba MDL-39987 theme_bootstrapbase: Fixed menunode text in renderers/core_renderer.php. 2013-06-02 23:17:14 +01:00
Petr Škoda f498ae7652 MDL-39416 do not try to get detailed perflog info before PAGE int 2013-06-02 13:35:40 +02:00
Petr Škoda dd85f5aed0 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:10 +02:00
Mary Evans b91fcb9094 MDL-39835 theme_sky_high: Fix for footer to display correctly in higher resolutions. 2013-06-01 21:53:19 +01:00
Gareth J Barnard dfb83eb132 MDL-39819 theme_bootstrapbase: Fix icon alignment in filepicker. 2013-05-31 22:32:03 +01:00
Petr Škoda 1e558fdf66 MDL-39465 detect environment problems in tests
This should help explain why something else fails.
2013-05-31 22:03:15 +02:00
Tim Hunt 7dad4a5e59 MDL-39978 Essays with files break each attempt builds on last 2013-05-31 20:48:03 +01:00
Tim Hunt 8b2e668a19 MDL-39971 each attempt builds on last broken for previews. 2013-05-31 20:32:52 +01:00
Petr Škoda 65380ecd0a 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:26:23 +02:00
Petr Škoda b5ce3bc8f4 MDL-39882 add required behat settings to config-dist 2013-05-31 21:09:05 +02:00
Marina Glancy 51173470b6 MDL-39710 Don't display rubric and guide preview unless option checked 2013-05-31 16:13:18 +10:00
Russell Boyatt 8df87c160f Fixing MDL-39710: setting to limit student access to rubric now checked. 2013-05-31 16:13:13 +10:00
Dan Poltawski e5326193bf 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:04:51 +08:00
Dan Poltawski e9fd6e5dd6 MDL-37332 portfolio: don't add double slashes
get_filepath() always returns trailing slash.

This breaks windows export - thanks to Jason Platts
2013-05-31 11:52:34 +08:00
Marina Glancy a74edf03ad MDL-39801 navigation_node::remove does not allow to insert nodes afterwards 2013-05-31 13:51:13 +10:00
Marina Glancy bd205fa484 MDL-39801 navigation_node::remove fails if first child does not have a key 2013-05-31 13:51:13 +10:00
Marina Glancy 93ac52a9f3 MDL-21097 Allow user to change current section if he does not have any other manageing capability 2013-05-31 13:20:16 +10:00
Marina Glancy db8d852af9 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:20:10 +10:00
Dan Poltawski 068373c86a MDL-33562 lib: remove deleted user tokens 2013-05-31 10:23:51 +08:00
Dan Poltawski 4c4c90f4b0 MDL-33562 lib: remove private keys when user deleted 2013-05-31 10:22:02 +08:00
AMOS bot a270a2c129 Automatically generated installer lang files 2013-05-31 00:43:06 +00:00
Adam Olley 096707c01d MDL-39947 mod_forum: Add safety check to variable assignment when counting unread posts 2013-05-31 09:50:05 +09:30
Andreas Grabs b4de832553 MDL-39932 mod_feedback - Mapping Feedback when Course is Deleted - thx to David N. Johnson 2013-05-30 23:11:37 +02:00
Tim Hunt f0dc1a71c1 MDL-39945 qtype multichoice was not comparing blank responses correctly. 2013-05-30 19:22:21 +01:00
Iñaki Arenaza 2f467a82a1 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:45:30 +02:00
Mary Evans 91cf8cc82c MDL-39931 theme_bootstrapbase: ported invisiblefieldset css rules from theme/base/core.css to less/moodle/core.css 2013-05-30 15:51:16 +01:00
Dan Poltawski 2e80405940 MDL-39936 upgrade: 2.5.0 line incorrectly positioned 2013-05-30 13:40:28 +08:00
Damyon Wiese f36066fa9e weekly release 2.5+ 2013-05-30 12:09:08 +08:00
Damyon Wiese a4e0171b2c Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-05-30 11:27:46 +08:00
AMOS bot 8352a1b138 Automatically generated installer lang files 2013-05-30 00:38:21 +00:00
Damyon Wiese 028b56f875 MDL-39317 assign: Fix for submitted filter on grading table.
Some old upgraded assignments have no timecreated column so use
a different one to check for a valid submission.
2013-05-29 14:50:42 +08:00
Ashley Holman e9efc2baa2 MDL-39743 assign: Fix missing capability check for "grant extension" 2013-05-29 12:04:22 +08:00
AMOS bot 7e720621ec Automatically generated installer lang files 2013-05-29 00:39:21 +00:00
Yuliya Bozhko 626c84bca9 MDL-39790 Add badges block to the course page 2013-05-29 09:42:11 +12:00
Eloy Lafuente (stronk7) 4bc4844d5b Merge branch 'w22_MDL-39676_m25_whereparam' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-05-28 15:33:33 +02:00
sam marshall 695f6f3c23 MDL-39723 Remove unnecessary queries for COURSE, SITE 2013-05-28 13:16:03 +01:00
Damyon Wiese f4075573b9 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:11:42 +08:00
David Monllao a13cbfb3e7 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-28 11:10:35 +08:00
Frederic Massart 799dbbfbaa MDL-39477 repository: Tests use data generator 2013-05-28 11:08:58 +08:00
Frederic Massart e5c6694de8 MDL-39477 repository: Introducing data generators for repositories 2013-05-28 11:08:54 +08:00
Damyon Wiese d3aeeb93c2 Merge branch 'w22_MDL-39802_m25_deletedusers' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-05-28 09:56:08 +08:00
AMOS bot f5940428a9 Automatically generated installer lang files 2013-05-28 00:38:15 +00:00
Eloy Lafuente (stronk7) e58af1dfcd Merge branch 'wip-MDL-39836_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-05-28 01:24:58 +02:00
Eloy Lafuente (stronk7) 4f0d6118ff Merge branch 'wip-MDL-39456-m25' of git://github.com/samhemelryk/moodle into MOODLE_25_STABLE 2013-05-28 01:02:34 +02:00
Eloy Lafuente (stronk7) 8b77e81201 Merge branch 'MDL-39853_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-05-28 00:57:06 +02:00
Eloy Lafuente (stronk7) d6e2b0a03e Merge branch 'MDL-39795_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-05-28 00:45:02 +02:00
Damyon Wiese a665577b37 Merge branch 'MDL-39686_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-05-27 16:28:48 +08:00
Damyon Wiese f32e55c8d7 Merge branch 'MDL-39680-M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-05-27 16:21:44 +08:00
Damyon Wiese 6a3a3bd868 Merge branch 'MDL-39640-master-int' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-05-27 16:14:59 +08:00
Kordan f70d382498 MDL-39194 theme_formal_white: cleaned the category page showing course listing 2013-05-27 15:23:08 +08:00
David Monllao e132b54a6a MDL-39853 behat: Useful info for $CFG->behat_config setting 2013-05-27 15:14:06 +08:00
David Monllao c0b59154ba MDL-39686 behat: Add option to restart the browser 2013-05-27 15:06:15 +08:00
David Monllao 268cb03e2d MDL-39686 behat: Adding into to config-dist.php 2013-05-27 15:06:09 +08:00
Dan Poltawski ad97a56875 MDL-39806 theme_bootstrapbase: run less with --compress 2013-05-27 14:42:44 +08:00
Dan Poltawski 8d94299b02 Merge branch 'MDL-39806_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-05-27 14:36:55 +08:00
David Monllao 0653761da2 MDL-39795 behat: Adapting features to consider spaces 2013-05-27 14:25:40 +08:00
David Monllao e489df87bf MDL-39795 behat: Improving find-texts-in-page-contents performance 2013-05-27 14:25:34 +08:00
Marina Glancy 87a445ec70 MDL-39785 bug fix: filter_activitynames was not applied correctly 2013-05-27 14:17:15 +08:00
Dan Poltawski 121e2492e8 Merge branch 'MDL-38239-moodle25' of git://github.com/StudiUM/moodle into MOODLE_25_STABLE 2013-05-27 14:13:36 +08:00
Dan Poltawski 6c16494f03 Merge branch 'w22_MDL-39688_m25_etag' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-05-27 13:43:37 +08:00
Dan Poltawski 191e70c2e2 Merge branch 'w22_MDL-38408_m25_paypalcost' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-05-27 13:05:14 +08:00
Yuliya Bozhko 7291b026a0 MDL-39778 badges: Fix missing library error in delete_course() 2013-05-27 12:00:38 +08:00
Rajesh Taneja df4da0fe79 MDL-39827 course: Trigger invalidate cache event while changing sort-order of category 2013-05-27 10:55:48 +08:00
Dan Poltawski ceb4030763 Merge branch 'MDL-39768_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-05-27 10:18:32 +08:00
Gareth J Barnard 69ecf8c0a9 MDL-38856 theme_bootstrapbase: Inverse user name text unreadable on nav bar 2013-05-27 02:09:01 +01:00
Mary Evans 039c78702d 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 13:55:45 +01:00
Petr Škoda 7fa470de03 MDL-38408 always validate PayPal dates and cost, improve float formatting 2013-05-25 22:48:44 +02:00
Mary Evans 6ceb6eb672 MDL-39806 theme_bootstrapbase: Fix for coursesearchbox label alignment. 2013-05-25 17:16:39 +01:00
Petr Škoda 644b1df502 MDL-39676 improve get_role_users() unit tests 2013-05-25 10:10:17 +02:00
Petr Škoda 161be92065 MDL-39688 do not set Etag when sending http ranges 2013-05-25 09:12:03 +02:00
Petr Škoda 5878ac3957 MDL-39802 ignore deleted users in meta enrolments 2013-05-24 21:28:38 +02:00
Petr Škoda 761227cfc6 MDL-39802 ignore deleted users in cohort enrolments 2013-05-24 21:28:38 +02:00
Petr Škoda 97d68b5652 MDL-39802 ignore deleted users in category enrolments 2013-05-24 21:28:37 +02:00
Petr Škoda 3ecf7ddd15 MDL-39802 fix sloppy user deleting and creating in imsenterprise plugin 2013-05-24 21:28:37 +02:00
Petr Škoda b6ef79950e 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:28:37 +02:00
Damyon Wiese f65261d096 weekly release 2.5+ 2013-05-24 13:26:46 +08:00
Damyon Wiese 93f645f0ae Merge branch 'install_25_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_25_STABLE 2013-05-24 13:12:11 +08:00
Sam Hemelryk e5184cac0e 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:54:18 +12:00
Marina Glancy caaad8b08d MDL-39177 make sure we don't remove existing directories when cleaning up unzip 2013-05-23 15:59:53 +02:00
AMOS bot cb033b9fab Automatically generated installer lang files 2013-05-22 08:26:02 +00:00
David Monllao 4f629bc677 MDL-39768 behat: Adding focused panels CSS selector 2013-05-22 15:11:55 +08:00
Eloy Lafuente (stronk7) d917dc9e40 MDL-36482 Fix slipped error, thanks Petr! 2013-05-22 04:14:01 +02:00
Damyon Wiese d74f740722 Merge branch 'MDL-39697-M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-05-22 09:03:31 +08:00
Marina Glancy 6168502474 MDL-39177 Updating userid when file is overwritten 2013-05-22 02:25:18 +02:00
Marina Glancy 751cebfc3d MDL-39177 More comments about confusing files.source field 2013-05-22 02:25:12 +02:00
Marina Glancy acfd39cbf8 MDL-39177 New function file_storage::get_unused_dirname() 2013-05-22 02:25:07 +02:00
Marina Glancy 2efc8ff39f MDL-39177 Ensure files are overwritten correctly on unzip 2013-05-22 02:25:02 +02:00
Marina Glancy 2a0b243137 MDL-39177 Perform all checks on draftfile area before saving the files 2013-05-22 02:24:56 +02:00
Marina Glancy b8aca19538 MDL-39177 Remove code duplication 2013-05-22 02:24:50 +02:00
Marina Glancy 2fbfedb310 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-22 02:24:40 +02:00
Marina Glancy 6c43ee510f 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-22 02:24:32 +02:00
Marina Glancy d262212a1f 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-22 02:24:24 +02:00
Marina Glancy d50f747fd8 MDL-39177 File reference is not updated when overwriting the file 2013-05-22 02:24:13 +02:00
Marina Glancy d95506e05a MDL-33719 When overwriting a file the filemanager is not refreshed 2013-05-22 02:24:08 +02:00
Gilles-Philippe Leblanc f7d180a7fb MDL-38239 gradebook: Importing grades from a .txt file with commas for decimals causes an error 2013-05-21 14:43:07 -04:00
Marina Glancy 91af4fa5bf MDL-39720 added missing setType() in moodleform 2013-05-21 12:30:21 +08:00
Dan Poltawski b051261ecc Merge branch 'MDL-39753_25' of git://github.com/stronk7/moodle into MOODLE_25_STABLE 2013-05-21 11:00:32 +08:00
Dan Poltawski aeaf5c1337 MDL-39323 auth_ldap: fix savepoint version 2013-05-21 10:52:44 +08:00
Iñaki Arenaza 9f13f53393 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-21 10:44:11 +08:00
Russell Smith 0bc310eb5a MDL-36482 activities block: Allow mod display without intro's 2013-05-21 02:27:58 +02:00
Eloy Lafuente (stronk7) ab6a0ac4f7 Merge branch 'MDL-39758_M25' of git://github.com/lazydaisy/moodle into MOODLE_25_STABLE 2013-05-21 01:48:38 +02:00
David Monllao 18003f2adb MDL-39638 behat: New step to collapse nodes based on the expand nodes
Also updating steps with a collapse behaviour.
2013-05-21 01:00:36 +02:00
Jayesh Anandani 2ab5928066 MDL-26120 mod_forum: use correct object 2013-05-21 00:55:17 +02:00
Eloy Lafuente (stronk7) e3c1bd2593 Merge branch 'MDL-39717_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-05-21 00:44:22 +02:00
Jerome Mouneyrac 99f5bad554 MDL-31209 web service error message: Indication about the service not containg the web service function is confusing 2013-05-20 19:06:59 +02:00
Ruslan Kabalin 666117e830 MDL-39761: mod_assign: Always check submission plugin status and visibility. 2013-05-20 16:32:04 +01:00
Eloy Lafuente (stronk7) 9b19f3f4fb MDL-39753 Add 2.5.0 upgrade line 2013-05-20 15:34:44 +02:00
Mary Evans b6d07f25a1 MDL-39758 theme_bootatrapbase: Added missing layout/embedded.php. 2013-05-20 13:04:44 +01:00
Dan Poltawski e90eb091c5 Merge branch 'w18_MDL-39374_m25_folderlog' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-05-20 17:58:29 +08:00
Damyon Wiese 5cc84acabe Merge branch 'MDL-38498-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE 2013-05-20 16:12:34 +08:00
Frederic Massart 543b5feae0 MDL-39719 course: Pointing to wrong category string in requests 2013-05-20 16:10:07 +08:00
Frederic Massart cdd041e631 MDL-38498 repository: Unit tests for repository::check_capability() 2013-05-20 16:00:11 +08:00
Tim Hunt 6d393bd97c MDL-27748 question: grade options should be localised.
question_bank::fraction_options should use format_float to display
decimal pionts correctly.
2013-05-20 15:47:22 +08:00
Tim Hunt f8aec131e9 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-20 15:28:59 +08:00
Troy Lee 62cf9a1d2a MDL-36020 overview/report: fix quiz regrade session lock 2013-05-20 12:42:38 +08:00
Damyon Wiese 76f881c83a Merge branch 'MDL-39363-master' of git://github.com/ankitagarwal/moodle into MOODLE_25_STABLE 2013-05-20 12:13:09 +08:00
Damyon Wiese c4500213d6 Merge branch 'MDL-39528_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE 2013-05-20 12:06:51 +08:00
Mary Evans 1cdcb6599a MDL-39630 theme_afterburner: Improving the way course/category listings display. 2013-05-20 12:03:00 +08:00
Kordan ff3f1f3ef3 MDL-39198 theme_formal_white: resized and relocated the "Add..." drop down menu of the "Add a block" pseudo block 2013-05-20 11:48:23 +08:00
Frederic Massart b42e6e1c2e MDL-38369 repository: Remove output before redirect 2013-05-20 10:25:34 +08:00
Damyon Wiese d8581a2367 Merge branch 'MDL-28250-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE 2013-05-17 12:11:31 +08:00
David Monllao 236ebcfe78 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-17 12:09:04 +08:00
David Monllao c340dca9b0 MDL-39717 behat: Removing unstable steps and scenarios 2013-05-17 11:48:29 +08:00
David Monllao a3c292ee64 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:48:20 +08:00
Damyon Wiese b7bbb615d7 Merge branch 'w18_MDL-39678_m25_yui' of git://github.com/skodak/moodle into MOODLE_25_STABLE 2013-05-16 15:55:45 +08:00
Mary Evans 9141e05262 MDL-39697 theme_bootstrapbase: Updated $THEME->layouts in config.php to match those in Base theme. 2013-05-16 00:57:40 +01:00
Petr Škoda e9cfbe4290 MDL-39678 fix YUI 20130515 vulnerability 2013-05-15 22:12:12 +02:00
Petr Škoda 2e297423cd MDL-39374 log only real folder edits
Credit goes to Florian Zillner, thanks.
2013-05-15 21:32:27 +02:00
Eloy Lafuente (stronk7) 8daf98a10f NOBUG: Keep backup YYYYMMDD on sync with 2.5 2013-05-14 12:42:15 +02:00
6545 changed files with 243583 additions and 360403 deletions
+2 -4
View File
@@ -51,8 +51,7 @@ switch ($action) {
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
session_gc(); // remove stale sessions
break;
case 'enable':
@@ -62,8 +61,7 @@ switch ($action) {
$authsenabled = array_unique($authsenabled);
set_config('auth', implode(',', $authsenabled));
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
session_gc(); // remove stale sessions
break;
case 'down':
+11 -21
View File
@@ -78,9 +78,6 @@ 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;
@@ -90,8 +87,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, $customfields = array()) {
global $DB, $OUTPUT;
function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, $updateopts) {
global $OUTPUT;
echo '<tr><td colspan="3">';
if ($retrieveopts) {
echo $OUTPUT->heading(get_string('auth_data_mapping', 'auth'));
@@ -110,21 +107,14 @@ 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;';
}
// If we have custom fields then merge them with user fields.
if (!empty($customfields)) {
$user_fields = array_merge($user_fields, $customfields);
}
if (!empty($customfields)) {
$customfieldname = $DB->get_records('user_info_field', null, '', 'shortname, name');
}
foreach ($user_fields as $field) {
// Define some vars we'll work with.
// Define some vars we'll work with
if (!isset($pluginconfig->{"field_map_$field"})) {
$pluginconfig->{"field_map_$field"} = '';
}
@@ -138,14 +128,10 @@ 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');
} elseif (!empty($customfields) && in_array($field, $customfields)) {
// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} elseif ($fieldname == 'url') {
@@ -169,6 +155,8 @@ 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);
@@ -187,3 +175,5 @@ function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts,
echo '</tr>';
}
}
+76
View File
@@ -0,0 +1,76 @@
<?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();
+52 -31
View File
@@ -1,6 +1,6 @@
<?php
// Allows the admin to configure blocks (hide/show, uninstall and configure)
// Allows the admin to configure blocks (hide/show, delete and configure)
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
@@ -11,13 +11,14 @@
$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');
$struninstall = get_string('uninstallplugin', 'core_admin');
$strdelete = get_string('delete');
$strversion = get_string('version');
$strhide = get_string('hide');
$strshow = get_string('show');
@@ -29,6 +30,9 @@
$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()) {
@@ -36,7 +40,6 @@
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
}
@@ -45,7 +48,6 @@
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
}
@@ -79,6 +81,35 @@
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);
@@ -96,8 +127,8 @@
$table = new flexible_table('admin-blocks-compatible');
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'settings', 'uninstall'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strsettings, $struninstall));
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'admintable blockstable generaltable');
$table->set_attribute('id', 'compatibleblockstable');
@@ -114,18 +145,17 @@
$blocknames[$blockid] = $blockname;
}
}
core_collator::asort($blocknames);
collatorlib::asort($blocknames);
foreach ($blocknames as $blockid=>$strblockname) {
$block = $blocks[$blockid];
$blockname = $block->name;
$dbversion = get_config('block_'.$block->name, 'version');
if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
$blockobject = false;
$strblockname = '<span class="notifyproblem">'.$strblockname.' ('.get_string('missingfromdisk').')</span>';
$plugin = new stdClass();
$plugin->version = $dbversion;
$plugin->version = $block->version;
} else {
$plugin = new stdClass();
@@ -140,11 +170,7 @@
}
}
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$blockname, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$delete = '<a href="blocks.php?delete='.$blockid.'&amp;sesskey='.sesskey().'">'.$strdelete.'</a>';
$settings = ''; // By default, no configuration
if ($blockobject and $blockobject->has_config()) {
@@ -183,13 +209,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 = 'dimmed_text';
$class = ' class="dimmed_text"'; // Leading space required!
}
if ($dbversion == $plugin->version) {
$version = $dbversion;
if ($block->version == $plugin->version) {
$version = $block->version;
} else {
$version = "$dbversion ($plugin->version)";
$version = "$block->version ($plugin->version)";
}
if (!$blockobject) {
@@ -204,15 +230,15 @@
}
$row = array(
$strblockname,
'<span'.$class.'>'.$strblockname.'</span>',
$blocklist,
$version,
'<span'.$class.'>'.$version.'</span>',
$visible,
$undeletable,
$settings,
$uninstall,
$delete,
$settings
);
$table->add_data($row, $class);
$table->add_data($row);
}
$table->print_html();
@@ -222,8 +248,8 @@
$table = new flexible_table('admin-blocks-incompatible');
$table->define_columns(array('block', 'uninstall'));
$table->define_headers(array($strname, $struninstall));
$table->define_columns(array('block', 'delete'));
$table->define_headers(array($strname, $strdelete));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'incompatibleblockstable generaltable');
@@ -231,14 +257,9 @@
$table->setup();
foreach ($incompatible as $block) {
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$block->name, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$table->add_data(array(
$block->name,
$uninstall,
'<a href="blocks.php?delete='.$block->id.'&amp;sesskey='.sesskey().'">'.$strdelete.'</a>',
));
}
$table->print_html();
-111
View File
@@ -1,111 +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 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);
+2 -1
View File
@@ -75,7 +75,8 @@ if (!empty($CFG->showcronsql)) {
$DB->set_debug(true);
}
if (!empty($CFG->showcrondebugging)) {
set_debugging(DEBUG_DEVELOPER, true);
$CFG->debug = DEBUG_DEVELOPER;
$CFG->debugdisplay = true;
}
$starttime = microtime();
-125
View File
@@ -1,125 +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 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";
}
}
+10 -82
View File
@@ -36,12 +36,6 @@ 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
@@ -64,8 +58,7 @@ Options:
--dbname=NAME Database name. Default is moodle
--dbuser=USERNAME Database user. Default is root
--dbpass=PASSWORD Database password. Default is blank
--dbport=NUMBER Use database port.
--dbsocket=PATH Use database socket, 1 means default. Available for some databases only.
--dbsocket Use database sockets. 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
@@ -137,10 +130,6 @@ 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();
@@ -151,7 +140,6 @@ 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__)));
@@ -162,10 +150,6 @@ $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);
@@ -174,14 +158,10 @@ $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');
@@ -190,32 +170,11 @@ 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;
\core\session\manager::init_empty_session();
global $SESSION;
global $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
@@ -245,8 +204,7 @@ list($options, $unrecognized) = cli_get_params(
'dbname' => 'moodle',
'dbuser' => empty($distro->dbuser) ? 'root' : $distro->dbuser, // let distros set dbuser
'dbpass' => '',
'dbport' => '',
'dbsocket' => '',
'dbsocket' => false,
'prefix' => 'mdl_',
'fullname' => '',
'shortname' => '',
@@ -336,8 +294,6 @@ 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);
@@ -424,9 +380,8 @@ if ($interactive) {
cli_error(get_string('pathserrcreatedataroot', 'install', $a));
}
}
$CFG->tempdir = $CFG->dataroot.'/temp';
$CFG->cachedir = $CFG->dataroot.'/cache';
$CFG->localcachedir = $CFG->dataroot.'/localcache';
$CFG->tempdir = $CFG->dataroot.'/temp';
$CFG->cachedir = $CFG->dataroot.'/cache';
// download required lang packs
if ($CFG->lang !== 'en') {
@@ -542,34 +497,6 @@ 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();
@@ -598,14 +525,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, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']), $distro);
$distro = distro_pre_create_db($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbsocket'=>$options['dbsocket']), $distro);
}
$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']));
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbsocket'=>$options['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, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']));
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbsocket'=>$options['dbsocket']));
if ($hint_database !== '') {
cli_error(get_string('dbconnectionerror', 'install'));
}
@@ -745,8 +672,9 @@ if (!$envstatus) {
}
// Test plugin dependencies.
require_once($CFG->libdir . '/pluginlib.php');
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!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'));
}
+2 -7
View File
@@ -36,12 +36,6 @@ 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.
@@ -167,8 +161,9 @@ if (!$envstatus) {
}
// Test plugin dependencies.
require_once($CFG->libdir . '/pluginlib.php');
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!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'));
}
-202
View File
@@ -1,202 +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/>.
/**
* MySQL table row compression tool tool.
*
* @package core
* @copyright 2014 Totara Learning Solutions Ltd {@link http://www.totaralms.com/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Petr Skoda <petr.skoda@totaralms.com>
*/
define('CLI_SCRIPT', true);
require(dirname(__FILE__).'/../../config.php');
require_once($CFG->libdir . '/clilib.php');
if ($DB->get_dbfamily() !== 'mysql') {
cli_error('This script is used for MySQL databases only.');
}
$engine = strtolower($DB->get_dbengine());
if ($engine !== 'innodb' and $engine !== 'xtradb') {
cli_error('This script is for MySQL servers using InnoDB or XtraDB engines only.');
}
list($options, $unrecognized) = cli_get_params(
array('help' => false, 'info' => false, 'list' => false, 'fix' => false, 'showsql' => false),
array('h' => 'help', 'i' => 'info', 'l' => 'list', 'f' => 'fix', 's' => 'showsql')
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$help =
"Script for detection of row size problems in MySQL InnoDB tables.
By default InnoDB storage table is using legacy Antelope file format
which has major restriction on database row size.
Use this script to detect and fix database tables with potential data
overflow problems.
Options:
-i, --info Show database information
-l, --list List problematic tables
-f, --fix Attempt to fix all tables (requires SUPER privilege)
-s, --showsql Print SQL statements for fixing of tables
-h, --help Print out this help
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/mysql_compressed_rows.php -l
";
/** @var mysql_sql_generator $generator */
$generator = $DB->get_manager()->generator;
$info = $DB->get_server_info();
$filepertable = $DB->get_record_sql("SHOW VARIABLES LIKE 'innodb_file_per_table'");
$filepertable = $filepertable ? $filepertable->value : '';
$fileformat = $DB->get_record_sql("SHOW VARIABLES LIKE 'innodb_file_format'");
$fileformat = $fileformat ? $fileformat->value : '';
$prefix = $DB->get_prefix();
$database = $CFG->dbname;
if (!empty($options['info'])) {
echo "Database version: " . $info['description'] . "\n";
echo "Database name: $database\n";
echo "Database engine: " . $DB->get_dbengine() . "\n";
echo "innodb_file_per_table: $filepertable\n";
echo "innodb_file_format: $fileformat\n";
exit(0);
} else if (!empty($options['list'])) {
$problem = false;
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT);
echo str_pad($format, 11, ' ', STR_PAD_RIGHT);
if ($format === 'Compact' or $format === 'Redundant') {
$problem = true;
echo " (needs fixing)\n";
} else if ($format !== 'Compressed' and $format !== 'Dynamic') {
echo " (unknown)\n";
} else {
echo "\n";
}
}
if ($problem) {
exit(1);
}
exit(0);
} else if (!empty($options['fix'])) {
$fixtables = array();
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
if ($format === 'Compact' or $format === 'Redundant') {
$fixtables[$table] = $table;
}
}
if (!$fixtables) {
echo "No changes necessary\n";
exit(0);
}
if ($filepertable !== 'ON') {
try {
$DB->execute("SET GLOBAL innodb_file_per_table=1");
} catch (dml_exception $e) {
echo "Cannot enable GLOBAL innodb_file_per_table setting, use --showsql option and execute the statements manually.";
throw $e;
}
}
if ($fileformat !== 'Barracuda') {
try {
$DB->execute("SET GLOBAL innodb_file_format=Barracuda");
} catch (dml_exception $e) {
echo "Cannot change GLOBAL innodb_file_format setting, use --showsql option and execute the statements manually.";
throw $e;
}
}
if (!$DB->is_compressed_row_format_supported(false)) {
echo "MySQL server is not compatible with compressed row format.";
exit(1);
}
foreach ($fixtables as $table) {
$DB->change_database_structure("ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed");
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT) . " ... Compressed\n";
}
exit(0);
} else if (!empty($options['showsql'])) {
$fixtables = array();
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
if ($format === 'Compact' or $format === 'Redundant') {
$fixtables[$table] = $table;
}
}
if (!$fixtables) {
echo "No changes necessary\n";
exit(0);
}
echo "Copy the following SQL statements and execute them using account with SUPER privilege:\n\n";
echo "USE $database;\n";
echo "SET SESSION sql_mode=STRICT_ALL_TABLES;\n";
echo "SET GLOBAL innodb_file_per_table=1;\n";
echo "SET GLOBAL innodb_file_format=Barracuda;\n";
foreach ($fixtables as $table) {
echo "ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed;\n";
}
echo "\n";
exit(0);
} else {
echo $help;
die;
}
+3 -8
View File
@@ -29,12 +29,6 @@
* @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);
@@ -43,6 +37,7 @@ 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(
@@ -116,7 +111,7 @@ if (!$envstatus) {
// Test plugin dependencies.
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!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'));
}
@@ -171,7 +166,7 @@ set_config('branch', $branch);
upgrade_noncore(true);
// log in as admin - we need doanything permission when applying defaults
\core\session\manager::set_user(get_admin());
session_set_user(get_admin());
// apply all default settings, just in case do it twice to fill all defaults
admin_apply_default_settings(NULL, false);
+50 -3
View File
@@ -24,9 +24,11 @@
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');
@@ -38,7 +40,7 @@ require_sesskey();
$return = new moodle_url('/admin/settings.php', array('section' => 'manageformats'));
$formatplugins = core_plugin_manager::instance()->get_plugins_of_type('format');
$formatplugins = plugin_manager::instance()->get_plugins_of_type('format');
$sortorder = array_flip(array_keys($formatplugins));
if (!isset($formatplugins[$formatname])) {
@@ -52,13 +54,11 @@ 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,5 +79,52 @@ 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);
+16 -2
View File
@@ -53,7 +53,7 @@ require_once($CFG->libdir.'/clilib.php');
require_once($CFG->libdir.'/cronlib.php');
// extra safety
\core\session\manager::write_close();
session_get_instance()->write_close();
// check if execution allowed
if (!empty($CFG->cronclionly)) {
@@ -72,10 +72,24 @@ if (!empty($CFG->cronremotepassword)) {
}
// send mime type and encoding
@header('Content-Type: text/plain; charset=utf-8');
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');
}
// 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>";
}
+41 -1
View File
@@ -83,6 +83,47 @@ 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;
}
@@ -93,7 +134,6 @@ if (empty($active_editors)) {
}
set_config('texteditors', implode(',', $active_editors));
core_plugin_manager::reset_caches();
if ($return) {
redirect ($returnurl);
+48 -17
View File
@@ -31,6 +31,7 @@ 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());
@@ -50,7 +51,6 @@ 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,7 +61,6 @@ 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;
@@ -97,7 +96,7 @@ switch ($action) {
set_config('enrol_plugins_enabled', implode(',', $enabled));
break;
case 'migrate':
case 'uninstall':
if (get_string_manager()->string_exists('pluginname', 'enrol_'.$enrol)) {
$strplugin = get_string('pluginname', 'enrol_'.$enrol);
} else {
@@ -107,26 +106,58 @@ switch ($action) {
$PAGE->set_title($strplugin);
echo $OUTPUT->header();
// This may take a long time.
set_time_limit(0);
if (!$confirm) {
echo $OUTPUT->heading(get_string('enrolments', 'enrol'));
// Disable plugin to prevent concurrent cron execution.
unset($enabled[$enrol]);
set_config('enrol_plugins_enabled', implode(',', array_keys($enabled)));
$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));
echo $OUTPUT->heading(get_string('uninstallmigrating', 'enrol', 'enrol_'.$enrol));
$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');
require_once("$CFG->dirroot/enrol/manual/locallib.php");
enrol_manual_migrate_plugin_enrolments($enrol);
$buttons = $OUTPUT->render($delete) . $OUTPUT->render($cancel);
if ($enrol !== 'manual') {
$buttons = $OUTPUT->render($migrate) . $buttons;
}
echo $OUTPUT->notification(get_string('success'), 'notifysuccess');
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();
if (!$return = core_plugin_manager::instance()->get_uninstall_url('enrol_'.$enrol, 'manage')) {
$return = new moodle_url('/admin/plugins.php');
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;
}
echo $OUTPUT->continue_button($return);
echo $OUTPUT->footer();
exit;
}
+3 -3
View File
@@ -45,7 +45,7 @@ admin_externalpage_setup('environment', '', $extraurlparams);
// Handle the 'updatecomponent' action
if ($action == 'updatecomponent' && confirm_sesskey()) {
// Create component installer and execute it
if ($cd = new component_installer('https://download.moodle.org',
if ($cd = new component_installer('http://download.moodle.org',
'environment',
'environment.zip')) {
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
@@ -53,7 +53,7 @@ if ($action == 'updatecomponent' && confirm_sesskey()) {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'https://download.moodle.org/environment/environment.zip';
$a->url = 'http://download.moodle.org/environment/environment.zip';
$a->dest = $CFG->dataroot . '/';
print_error($cd->get_error(), 'error', $PAGE->url, $a);
die();
@@ -102,7 +102,7 @@ if ($contents = load_environment_xml()) {
}
// Get the results of the environment check.
list($envstatus, $environment_results) = check_moodle_environment($version, ENV_SELECT_NEWER);
list($envstatus, $environment_results) = check_moodle_environment($version);
// Display the page.
$output = $PAGE->get_renderer('core', 'admin');
-129
View File
@@ -899,7 +899,6 @@
</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" />
@@ -1006,11 +1005,6 @@
<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">
@@ -1136,127 +1130,4 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.8" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+180 -164
View File
@@ -1,93 +1,88 @@
<?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/>.
///////////////////////////////////////////////////////////////////////////
// //
// 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 //
// //
///////////////////////////////////////////////////////////////////////////
/**
* Filter management page.
* Processes actions from the admin_setting_managefilters object (defined in
* adminlib.php).
*
* @package core
* @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package administration
*//** */
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_ALPHA);
$filterpath = optional_param('filterpath', '', PARAM_PLUGIN);
$action = optional_param('action', '', PARAM_ALPHANUMEXT);
$filterpath = optional_param('filterpath', '', PARAM_SAFEDIR);
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/site:config', $systemcontext);
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/site:config', $systemcontext);
admin_externalpage_setup('managefilters');
$returnurl = "$CFG->wwwroot/$CFG->admin/filters.php";
admin_externalpage_setup('managefilters');
// 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;
// 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]);
}
}
// 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;
}
/// Process actions ============================================================
if ($action) {
if (!isset($filters[$filterpath]) && !isset($newfilters[$filterpath])) {
throw new moodle_exception('filternotinstalled', 'error', $returnurl, $filterpath);
}
if (!confirm_sesskey()) {
redirect($returnurl);
}
}
}
if ($action) {
require_sesskey();
}
// Process actions.
switch ($action) {
switch ($action) {
case 'setstate':
if (isset($filters[$filterpath]) and $newstate = optional_param('newstate', '', PARAM_INT)) {
if ($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':
if (isset($filters[$filterpath])) {
$applytostrings = optional_param('stringstoo', false, PARAM_BOOL);
filter_set_applies_to_strings($filterpath, $applytostrings);
}
$applytostrings = optional_param('stringstoo', false, PARAM_BOOL);
filter_set_applies_to_strings($filterpath, $applytostrings);
break;
case 'down':
@@ -102,124 +97,145 @@ switch ($action) {
filter_set_global_state($filterpath, $filters[$filterpath]->active, -1);
}
break;
}
// Reset caches and return.
if ($action) {
reset_text_filters_cache();
core_plugin_manager::reset_caches();
redirect(new moodle_url('/admin/filters.php'));
}
case 'delete':
// If not yet confirmed, display a confirmation message.
if (!optional_param('confirm', '', PARAM_BOOL)) {
$filtername = filter_get_name($filterpath);
// Print the page heading.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('filtersettings', 'admin'));
$title = get_string('deletefilterareyousure', 'admin', $filtername);
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$states = filter_get_global_states();
$stringfilters = filter_get_string_filters();
$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;
}
$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();
// Do the deletion.
$title = get_string('deletingfilter', 'admin', $filterpath);
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$lastactive = null;
foreach ($states as $state) {
if ($state->active != TEXTFILTER_DISABLED) {
$lastactive = $state->filter;
// 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;
}
}
// Iterate through filters adding to display table.
$firstrow = true;
foreach ($states as $state) {
$filter = $state->filter;
if (!isset($plugininfos[$filter])) {
continue;
// Add any missing filters to the DB table.
foreach ($newfilters as $filter => $notused) {
filter_set_global_state($filter, TEXTFILTER_DISABLED);
}
$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) {
// 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;
$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();
die;
echo html_writer::table($table);
echo '<p class="filtersettingnote">' . get_string('filterallwarning', 'filters') . '</p>';
echo $OUTPUT->footer();
/// 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));
}
/**
* 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;
function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings) {
global $CFG, $OUTPUT, $activechoices, $applytochoices, $filternames; //TODO: this is sloppy coding style!!
$row = array();
$filter = $state->filter;
$active = $plugininfo->is_installed_and_upgraded();
$filter = $filterinfo->filter;
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'),
);
// Filter name
if (!empty($filternames[$filter])) {
$row[] = $filternames[$filter];
} else {
$row[] = '<span class="error">' . get_string('filemissing', '', $filter) . '</span>';
}
// 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);
// Disable/off/on
$select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $filterinfo->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 ($state->active != TEXTFILTER_DISABLED) {
if ($filterinfo->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 {
@@ -236,18 +252,18 @@ function get_table_row(\core\plugininfo\filter $plugininfo, $state, $isfirstrow,
// 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 = ($state->active == TEXTFILTER_DISABLED);
$select->disabled = $filterinfo->active == TEXTFILTER_DISABLED;
$row[] = $OUTPUT->render($select);
// 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'));
// 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>';
} else {
$row[] = '';
}
// Uninstall.
$row[] = html_writer::link(filters_action_url($filter, 'delete'), get_string('uninstallplugin', 'core_admin'));
// Delete
$row[] = '<a href="' . filters_action_url($filter, 'delete') . '">' . get_string('delete') . '</a>';
return $row;
}
+3 -4
View File
@@ -39,11 +39,10 @@ while(!feof($fd)) {
$action = clam_handle_infected_file($file,$log->userid,true);
clam_replace_infected_file($file);
$ctxselect = ', ' . context_helper::get_preload_record_columns_sql('ctx');
$ctxjoin = "LEFT JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = :contextlevel)";
list($ctxselect, $ctxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$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, 'contextlevel' => CONTEXT_COURSE));
context_helper::preload_from_record($course);
$course = $DB->get_record_sql($sql, array('courseid' => $log->course));
context_instance_preload($course);
$user = $DB->get_record("user", array("id"=>$log->userid));
$subject = get_string('virusfoundsubject','moodle',format_string($site->fullname));
+49 -81
View File
@@ -62,31 +62,12 @@ if ((isset($_GET['cache']) and $_GET['cache'] === '0')
// 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);
@@ -96,6 +77,7 @@ $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');
@@ -169,7 +151,7 @@ if (!core_tables_exist()) {
$strinstallation = get_string('installation', 'install');
// remove current session content completely
\core\session\manager::terminate_current();
session_get_instance()->terminate_current();
if (empty($agreelicense)) {
$strlicense = get_string('license');
@@ -179,7 +161,6 @@ 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();
@@ -194,7 +175,6 @@ 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();
@@ -202,7 +182,7 @@ if (!core_tables_exist()) {
// check plugin dependencies
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!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);
@@ -241,13 +221,6 @@ if (!core_tables_exist()) {
// Check version of Moodle code on disk compared with database
// and upgrade if possible.
if (!$cache) {
// Do not try to do anything fancy in non-cached mode,
// this prevents themes from fetching data from non-existent tables.
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
}
$stradministration = get_string('administration');
$PAGE->set_context(context_system::instance());
@@ -256,12 +229,14 @@ if (empty($CFG->version)) {
}
// Detect config cache inconsistency, this happens when you switch branches on dev servers.
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 ($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 (!$cache and $version > $CFG->version) { // upgrade
if ($version > $CFG->version) { // upgrade
// Warning about upgrading a test site.
$testsite = false;
@@ -278,6 +253,9 @@ if (!$cache and $version > $CFG->version) { // upgrade
// We then purge the regular caches.
purge_all_caches();
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
@@ -323,18 +301,18 @@ if (!$cache and $version > $CFG->version) { // upgrade
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1));
if ($fetchupdates) {
// No sesskey support guaranteed here, because sessions might not work yet.
$updateschecker = \core\update\checker::instance();
$updateschecker = available_update_checker::instance();
if ($updateschecker->enabled()) {
// No sesskey support guaranteed here, because sessions might not work yet.
$updateschecker->fetch();
}
redirect($reloadurl);
}
$deployer = \core\update\deployer::instance();
$deployer = available_update_deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($reloadurl, $reloadurl);
@@ -346,15 +324,17 @@ if (!$cache and $version > $CFG->version) { // upgrade
}
}
echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
echo $output->upgrade_plugin_check_page(plugin_manager::instance(), available_update_checker::instance(),
$version, $showallplugins, $reloadurl,
new moodle_url('/admin/index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1, 'cache'=>0)));
new moodle_url('/admin/index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1)));
die();
} else {
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
if (!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();
@@ -370,39 +350,41 @@ if (!$cache and $version > $CFG->version) { // upgrade
}
// Updated human-readable release version if necessary
if (!$cache and $release <> $CFG->release) { // Update the release version
if ($release <> $CFG->release) { // Update the release version
set_config('release', $release);
}
if (!$cache and $branch <> $CFG->branch) { // Update the branch
if ($branch <> $CFG->branch) { // Update the branch
set_config('branch', $branch);
}
if (!$cache and moodle_needs_upgrading()) {
if (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');
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$PAGE->navbar->add($strplugincheck);
$PAGE->set_title($strplugincheck);
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
if ($fetchupdates) {
require_sesskey();
$updateschecker = \core\update\checker::instance();
$updateschecker = available_update_checker::instance();
if ($updateschecker->enabled()) {
require_sesskey();
$updateschecker->fetch();
}
redirect($PAGE->url);
redirect($reloadurl);
}
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$deployer = \core\update\deployer::instance();
$deployer = available_update_deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($PAGE->url, $PAGE->url);
@@ -415,25 +397,24 @@ if (!$cache and moodle_needs_upgrading()) {
}
// Show plugins info.
echo $output->upgrade_plugin_check_page(core_plugin_manager::instance(), \core\update\checker::instance(),
echo $output->upgrade_plugin_check_page(plugin_manager::instance(), available_update_checker::instance(),
$version, $showallplugins,
new moodle_url($PAGE->url),
new moodle_url('/admin/index.php', array('confirmplugincheck'=>1, 'cache'=>0)));
new moodle_url('/admin/index.php', array('confirmplugincheck'=>1)));
die();
}
// Make sure plugin dependencies are always checked.
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
if (!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);
}
@@ -495,9 +476,9 @@ if (during_initial_install()) {
if (has_capability('moodle/site:config', context_system::instance())) {
if ($fetchupdates) {
require_sesskey();
$updateschecker = \core\update\checker::instance();
$updateschecker = available_update_checker::instance();
if ($updateschecker->enabled()) {
require_sesskey();
$updateschecker->fetch();
}
redirect(new moodle_url('/admin/index.php', array('cache' => 0)));
@@ -506,8 +487,8 @@ if (has_capability('moodle/site:config', context_system::instance())) {
// 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('/admin/index.php', array('cache' => 1)));
if (!$cache and !optional_param('sesskey', '', PARAM_RAW)) {
redirect(new moodle_url($PAGE->url, array('cache' => 1)));
}
// Check for valid admin user - no guest autologin
@@ -545,15 +526,6 @@ 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.
@@ -565,13 +537,13 @@ $dbproblems = $DB->diagnose();
$maintenancemode = !empty($CFG->maintenance_enabled);
// Available updates for Moodle core
$updateschecker = \core\update\checker::instance();
$updateschecker = available_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 = core_plugin_manager::instance();
$pluginman = plugin_manager::instance();
foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
foreach ($plugintypeinstances as $pluginname => $plugininfo) {
if (!empty($plugininfo->availableupdates)) {
@@ -593,14 +565,10 @@ $availableupdatesfetch = $updateschecker->get_last_timefetched();
$buggyiconvnomb = (!function_exists('mb_convert_encoding') and @iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
//check if the site is registered on Moodle.org
$registered = $DB->count_records('registration_hubs', array('huburl' => HUB_MOODLEORGHUBURL, 'confirmed' => 1));
// Check if there are any cache warnings.
$cachewarnings = cache_helper::warnings();
admin_externalpage_setup('adminnotifications');
/* @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings);
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered);
+41 -9
View File
@@ -33,21 +33,55 @@ 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', 'uninstall'));
$table->define_headers(array(get_string('plugin'), get_string('version'), get_string('uninstallplugin', 'core_admin')));
$table->define_columns(array('name', 'version', 'delete'));
$table->define_headers(array(get_string('plugin'), get_string('version'), get_string('delete')));
$table->define_baseurl($PAGE->url);
$table->set_attribute('id', 'localplugins');
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
$plugins = array();
foreach (core_component::get_plugin_list('local') as $plugin => $plugindir) {
foreach (get_plugin_list('local') as $plugin => $plugindir) {
if (get_string_manager()->string_exists('pluginname', 'local_' . $plugin)) {
$strpluginname = get_string('pluginname', 'local_' . $plugin);
} else {
@@ -55,13 +89,11 @@ foreach (core_component::get_plugin_list('local') as $plugin => $plugindir) {
}
$plugins[$plugin] = $strpluginname;
}
core_collator::asort($plugins);
collatorlib::asort($plugins);
foreach ($plugins as $plugin => $name) {
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('local_'.$plugin, 'manage')) {
$uninstall = html_writer::link($uninstallurl, get_string('uninstallplugin', 'core_admin'));
}
$delete = new moodle_url($PAGE->url, array('delete' => $plugin, 'sesskey' => sesskey()));
$delete = html_writer::link($delete, get_string('delete'));
$version = get_config('local_' . $plugin);
if (!empty($version->version)) {
@@ -70,7 +102,7 @@ foreach ($plugins as $plugin => $name) {
$version = '?';
}
$table->add_data(array($name, $version, $uninstall));
$table->add_data(array($name, $version, $delete));
}
$table->print_html();
+28 -4
View File
@@ -34,6 +34,8 @@ 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');
@@ -42,7 +44,6 @@ 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()) {
@@ -50,10 +51,33 @@ 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 ($disable || $enable) {
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) {
$url = new moodle_url('message.php');
redirect($url);
}
@@ -71,4 +95,4 @@ $messageoutputs = $renderer->manage_messageoutputs($processors);
echo $OUTPUT->header();
echo $OUTPUT->heading($headingtitle);
echo $messageoutputs;
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+1 -1
View File
@@ -103,7 +103,7 @@ if ($form = data_submitted() and confirm_sesskey()) {
$usernames = explode(',', $form->username);
foreach ($usernames as $username) {
$username = trim(core_text::strtolower($username));
$username = trim(textlib::strtolower($username));
if (!empty($username)) {
if (mnet_update_sso_access_control($username, $form->mnet_host_id, $form->accessctrl)) {
if ($form->accessctrl == 'allow') {
+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(core_component::get_plugin_list('theme')) as $themename) {
foreach (array_keys(get_plugin_list('theme')) as $themename) {
$themes[$themename] = get_string('pluginname', 'theme_'.$themename);
}
$mform->addElement('select', 'theme', get_string('forcetheme'), $themes);
+64 -30
View File
@@ -13,12 +13,14 @@
$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");
$struninstall = get_string('uninstallplugin', 'core_admin');
$strdelete = get_string("delete");
$strversion = get_string("version");
$strhide = get_string("hide");
$strshow = get_string("show");
@@ -27,6 +29,9 @@
$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()) {
@@ -40,14 +45,14 @@
SET visibleold=visible, visible=0
WHERE module=?";
$DB->execute($sql, array($module->id));
// 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
// clear the course modinfo cache for courses
// where we just deleted something
$sql = "UPDATE {course}
SET modinfo=''
WHERE id IN (SELECT DISTINCT course
FROM {course_modules}
WHERE visibleold=1 AND module=?)",
array($module->id));
core_plugin_manager::reset_caches();
WHERE visibleold=1 AND module=?)";
$DB->execute($sql, array($module->id));
admin_get_root(true, false); // settings not required - only pages
}
@@ -57,17 +62,49 @@
}
$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.
// 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
// clear the course modinfo cache for courses
// where we just made something visible
$sql = "UPDATE {course}
SET modinfo = ''
WHERE id IN (SELECT DISTINCT course
FROM {course_modules}
WHERE visible=1 AND module=?)",
array($module->id));
core_plugin_manager::reset_caches();
WHERE visible=1 AND module=?)";
$DB->execute($sql, array($module->id));
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);
@@ -80,11 +117,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', 'uninstall', 'settings'));
$table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strsettings, $struninstall));
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
$table->define_headers(array($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/modules.php');
$table->set_attribute('id', 'modules');
$table->set_attribute('class', 'admintable generaltable');
$table->set_attribute('class', 'generaltable');
$table->setup();
foreach ($modules as $module) {
@@ -99,10 +136,7 @@
$missing = false;
}
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('mod_'.$module->name, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$delete = "<a href=\"modules.php?delete=$module->name&amp;sesskey=".sesskey()."\">$strdelete</a>";
if (file_exists("$CFG->dirroot/mod/$module->name/settings.php") ||
file_exists("$CFG->dirroot/mod/$module->name/settingstree.php")) {
@@ -135,23 +169,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 = 'dimmed_text';
$class = ' class="dimmed_text"';
}
if ($module->name == "forum") {
$uninstall = "";
$delete = "";
$visible = "";
$class = "";
}
$version = get_config('mod_'.$module->name, 'version');
$table->add_data(array(
$strmodulename,
'<span'.$class.'>'.$strmodulename.'</span>',
$countlink,
$version,
'<span'.$class.'>'.$module->version.'</span>',
$visible,
$settings,
$uninstall,
), $class);
$delete,
$settings
));
}
$table->print_html();
+174
View File
@@ -0,0 +1,174 @@
<?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>';
}
+40 -12
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 uninstall the plagiarism plugin.
* a link to delete the plagiarism plugin.
*
* @see http://docs.moodle.org/dev/Plagiarism_API
* @package admin
@@ -30,17 +30,47 @@ 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'));
$txt->uninstall = get_string('uninstallplugin', 'core_admin');
$txt = get_strings(array('settings', 'name', 'version', 'delete'));
$plagiarismplugins = core_component::get_plugin_list('plagiarism');
$plagiarismplugins = get_plugin_list('plagiarism');
if (empty($plagiarismplugins)) {
echo $OUTPUT->notification(get_string('nopluginsinstalled', 'plagiarism'));
echo $OUTPUT->footer();
@@ -51,7 +81,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->uninstall, $txt->settings);
$table->head = array($txt->name, $txt->version, $txt->delete, $txt->settings);
$table->colclasses = array('mdl-left', 'mdl-align', 'mdl-align', 'mdl-align');
$table->data = array();
$table->attributes['class'] = 'manageplagiarismtable generaltable';
@@ -71,12 +101,10 @@ foreach ($plagiarismplugins as $plugin => $dir) {
} else {
$version = '?';
}
// 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);
// 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);
}
}
echo html_writer::table($table);
+19 -62
View File
@@ -35,46 +35,31 @@
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);
$return = optional_param('return', 'overview', PARAM_ALPHA);
$uninstall = optional_param('uninstall', '', PARAM_COMPONENT);
$delete = optional_param('delete', '', PARAM_COMPONENT);
$confirmed = optional_param('confirm', false, PARAM_BOOL);
// NOTE: do not use admin_externalpage_setup() here because it loads
// full admin tree which is not possible during uninstallation.
$output = $PAGE->get_renderer('core', 'admin');
require_login();
$syscontext = context_system::instance();
require_capability('moodle/site:config', $syscontext);
$pluginman = core_plugin_manager::instance();
$pluginman = 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),
'core_plugin_manager::get_plugin_info() returned null for the plugin to be uninstalled');
'plugin_manager::get_plugin_info() returned null for the plugin to be uninstalled');
}
$pluginname = $pluginman->plugin_name($pluginfo->component);
@@ -84,17 +69,15 @@ if ($uninstall) {
if (!$pluginman->can_uninstall_plugin($pluginfo->component)) {
throw new moodle_exception('err_cannot_uninstall_plugin', 'core_plugin', '',
array('plugin' => $pluginfo->component),
'core_plugin_manager::can_uninstall_plugin() returned false');
'plugin_manager::can_uninstall_plugin() returned false');
}
if (!$confirmed) {
$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);
$continueurl = new moodle_url($PAGE->url, array('uninstall' => $pluginfo->component, 'sesskey' => sesskey(), 'confirm' => 1));
echo $output->plugin_uninstall_confirm_page($pluginman, $pluginfo, $continueurl);
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();
@@ -102,18 +85,10 @@ 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();
}
}
@@ -121,21 +96,12 @@ 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),
'core_plugin_manager::get_plugin_info() returned null for the plugin to be deleted');
'plugin_manager::get_plugin_info() returned null for the plugin to be deleted');
}
$pluginname = $pluginman->plugin_name($pluginfo->component);
@@ -146,7 +112,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),
'core_plugin_manager::get_plugin_info() returned not-null versiondb for the plugin to be deleted');
'plugin_manager::get_plugin_info() returned not-null versiondb for the plugin to be deleted');
}
// Make sure the folder is removable.
@@ -165,20 +131,11 @@ if ($delete and $confirmed) {
// So long, and thanks for all the bugs.
fulldelete($pluginfo->rootdir);
// 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'));
cache::make('core', 'pluginlist')->purge();
redirect($PAGE->url);
}
admin_externalpage_setup('pluginsoverview');
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$checker = \core\update\checker::instance();
$checker = available_update_checker::instance();
// Filtering options.
$options = array(
@@ -192,7 +149,7 @@ if ($fetchremote) {
redirect(new moodle_url($PAGE->url, $options));
}
$deployer = \core\update\deployer::instance();
$deployer = available_update_deployer::instance();
if ($deployer->enabled()) {
$myurl = new moodle_url($PAGE->url, array('updatesonly' => $updatesonly, 'contribonly' => $contribonly));
$deployer->initialize($myurl, new moodle_url('/admin'));
+4 -3
View File
@@ -43,6 +43,9 @@ $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
@@ -88,7 +91,6 @@ 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;
@@ -117,7 +119,6 @@ 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);
@@ -162,7 +163,7 @@ if (($action == 'edit') || ($action == 'new')) {
$output = $OUTPUT->box_start('generalbox');
$plugins = core_component::get_plugin_list('portfolio');
$plugins = get_plugin_list('portfolio');
$plugins = array_keys($plugins);
$instances = portfolio_instances(false, false);
$usedplugins = array();
+72 -11
View File
@@ -28,6 +28,7 @@
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.
@@ -38,8 +39,8 @@ require_capability('moodle/question:config', $systemcontext);
admin_externalpage_setup('manageqbehaviours');
$thispageurl = new moodle_url('/admin/qbehaviours.php');
$behaviours = core_component::get_plugin_list('qbehaviour');
$pluginmanager = core_plugin_manager::instance();
$behaviours = get_plugin_list('qbehaviour');
$pluginmanager = plugin_manager::instance();
// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql_menu("
@@ -91,7 +92,6 @@ 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,7 +109,6 @@ 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);
}
@@ -137,6 +136,70 @@ 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.
@@ -147,12 +210,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', 'uninstall'));
'available', 'delete'));
$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('uninstallplugin', 'core_admin')));
get_string('availableq', 'question'), get_string('delete')));
$table->set_attribute('id', 'qbehaviours');
$table->set_attribute('class', 'generaltable admintable');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
// Add a row for each question type.
@@ -207,11 +270,9 @@ foreach ($sortedbehaviours as $behaviour => $behaviourname) {
if ($needed[$behaviour]) {
$row[] = '';
} else {
$uninstallurl = core_plugin_manager::instance()->get_uninstall_url('qbehaviour_'.$behaviour, 'manage');
if ($uninstallurl) {
$row[] = html_writer::link($uninstallurl, get_string('uninstallplugin', 'core_admin'),
$row[] = html_writer::link(new moodle_url($thispageurl,
array('delete' => $behaviour, 'sesskey' => sesskey())), get_string('delete'),
array('title' => get_string('uninstallbehaviour', 'question')));
}
}
$table->add_data($row, $rowclass);
+71 -14
View File
@@ -28,6 +28,7 @@
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.
@@ -40,7 +41,7 @@ admin_externalpage_setup('manageqtypes');
$thispageurl = new moodle_url('/admin/qtypes.php');
$qtypes = question_bank::get_all_qtypes();
$pluginmanager = core_plugin_manager::instance();
$pluginmanager = plugin_manager::instance();
// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql("
@@ -121,6 +122,64 @@ 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.
@@ -131,10 +190,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', 'uninstall', 'settings'));
'availableto', 'delete', '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('settings'), get_string('uninstallplugin', 'core_admin')));
get_string('delete'), get_string('settings')));
$table->set_attribute('id', 'qtypes');
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
@@ -206,6 +265,15 @@ 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) {
@@ -217,17 +285,6 @@ 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 (core_text::strlen($hub['name']) > 100) {
$hubname = core_text::substr($hub['name'], 0, 100);
if (textlib::strlen($hub['name']) > 100) {
$hubname = textlib::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();
core_collator::asort($languages);
collatorlib::asort($languages);
$mform->addElement('select', 'language', get_string('sitelang', 'hub'),
$languages);
$mform->setType('language', PARAM_ALPHANUMEXT);
+71 -112
View File
@@ -25,6 +25,7 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/pluginlib.php');
/**
* Standard HTML output renderer for core_admin subsystem
@@ -120,7 +121,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(core_plugin_manager::instance(), $version, array('xdep' => true));
$output .= $this->plugins_check_table(plugin_manager::instance(), $version, array('xdep' => true));
$output .= $this->warning(get_string('pluginschecktodo', 'admin'));
$output .= $this->continue_button($reloadurl);
@@ -140,14 +141,13 @@ class core_admin_renderer extends plugin_renderer_base {
public function upgrade_confirm_page($strnewversion, $maturity, $testsite) {
$output = '';
$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');
$continueurl = new moodle_url('index.php', array('confirmupgrade' => 1));
$cancelurl = new moodle_url('index.php');
$output .= $this->header();
$output .= $this->maturity_warning($maturity);
$output .= $this->test_site_warning($testsite);
$output .= $this->confirm(get_string('upgradesure', 'admin', $strnewversion), $continue, $cancelurl);
$output .= $this->confirm(get_string('upgradesure', 'admin', $strnewversion), $continueurl, $cancelurl);
$output .= $this->footer();
return $output;
@@ -189,15 +189,15 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Display the upgrade page that lists all the plugins that require attention.
* @param core_plugin_manager $pluginman provides information about the plugins.
* @param \core\update\checker $checker provides information about available updates.
* @param plugin_manager $pluginman provides information about the plugins.
* @param available_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(core_plugin_manager $pluginman, \core\update\checker $checker,
public function upgrade_plugin_check_page(plugin_manager $pluginman, available_update_checker $checker,
$version, $showallplugins, $reloadurl, $continueurl) {
global $CFG;
@@ -239,11 +239,11 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Prints a page with a summary of plugin deployment to be confirmed.
*
* @param \core\update\deployer $deployer
* @param array $data deployer's data package as returned by {@link \core\update\deployer::submitted_data()}
* @param available_update_deployer $deployer
* @param array $data deployer's data package as returned by {@link available_update_deployer::submitted_data()}
* @return string
*/
public function upgrade_plugin_confirm_deploy_page(\core\update\deployer $deployer, array $data) {
public function upgrade_plugin_confirm_deploy_page(available_update_deployer $deployer, array $data) {
if (!$deployer->initialized()) {
throw new coding_exception('Unable to render a page for non-initialized deployer.');
@@ -301,15 +301,14 @@ 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 \core\update\info objects or null
* @param array|null $availableupdates array of available_update_info objects or null
* @param int|null $availableupdatesfetch timestamp of the most recent updates fetch or null (unknown)
* @param string[] $cachewarnings An array containing warnings from the Cache API.
*
* @return string HTML to output.
*/
public function admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch,
$buggyiconvnomb, $registered, array $cachewarnings = array()) {
$buggyiconvnomb, $registered) {
global $CFG;
$output = '';
@@ -322,7 +321,6 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->cron_overdue_warning($cronoverdue);
$output .= $this->db_problems($dbproblems);
$output .= $this->maintenance_mode_warning($maintenancemode);
$output .= $this->cache_warnings($cachewarnings);
$output .= $this->registration_warning($registered);
//////////////////////////////////////////////////////////////////////////////////////////////////
@@ -342,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 core_plugin_manager $pluginman
* @param \core\update\checker $checker
* @param plugin_manager $pluginman
* @param available_update_checker $checker
* @param array $options filtering options
* @return string HTML to output.
*/
public function plugin_management_page(core_plugin_manager $pluginman, \core\update\checker $checker, array $options = array()) {
public function plugin_management_page(plugin_manager $pluginman, available_update_checker $checker, array $options = array()) {
global $CFG;
$output = '';
@@ -378,25 +376,20 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Display a page to confirm the plugin uninstallation.
*
* @param core_plugin_manager $pluginman
* @param \core\plugininfo\base $pluginfo
* @param plugin_manager $pluginman
* @param plugin_info $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(core_plugin_manager $pluginman, \core\plugininfo\base $pluginfo, moodle_url $continueurl, moodle_url $cancelurl) {
public function plugin_uninstall_confirm_page(plugin_manager $pluginman, plugininfo_base $pluginfo, moodle_url $continueurl) {
$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($confirm, $continueurl, $cancelurl);
$output .= $this->output->confirm(get_string('uninstallconfirm', 'core_plugin', array('name' => $pluginname)),
$continueurl, $this->page->url);
$output .= $this->output->footer();
return $output;
@@ -405,22 +398,18 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Display a page with results of plugin uninstallation and offer removal of plugin files.
*
* @param core_plugin_manager $pluginman
* @param \core\plugininfo\base $pluginfo
* @param plugin_manager $pluginman
* @param plugin_info $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(core_plugin_manager $pluginman, \core\plugininfo\base $pluginfo,
public function plugin_uninstall_results_removable_page(plugin_manager $pluginman, 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)));
@@ -434,8 +423,7 @@ class core_admin_renderer extends plugin_renderer_base {
'uninstalldeleteconfirmexternal');
}
// 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->confirm($confirm, $continueurl, $this->page->url);
$output .= $this->output->footer();
return $output;
@@ -444,15 +432,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 core_plugin_manager $pluginman
* @param \core\plugininfo\base $pluginfo
* @param plugin_manager $pluginman
* @param plugin_info $pluginfo
* @param progress_trace_buffer $progress
* @return string
*/
public function plugin_uninstall_results_page(core_plugin_manager $pluginman, \core\plugininfo\base $pluginfo, progress_trace_buffer $progress) {
public function plugin_uninstall_results_page(plugin_manager $pluginman, plugininfo_base $pluginfo, progress_trace_buffer $progress) {
$output = '';
$pluginname = $pluginfo->component;
$pluginname = $pluginman->plugin_name($pluginfo->component);
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
@@ -461,7 +449,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(new moodle_url('/admin/index.php'));
$output .= $this->output->continue_button($this->page->url);
$output .= $this->output->footer();
return $output;
@@ -585,19 +573,6 @@ class core_admin_renderer extends plugin_renderer_base {
return $this->warning($dbproblems);
}
/**
* Renders cache warnings if there are any.
*
* @param string[] $cachewarnings
* @return string
*/
public function cache_warnings(array $cachewarnings) {
if (!count($cachewarnings)) {
return '';
}
return join("\n", array_map(array($this, 'warning'), $cachewarnings));
}
/**
* Render an appropriate message if the site in in maintenance mode.
* @param bool $maintenancemode
@@ -691,7 +666,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 \core\update\info objects or null
* @param array|null $updates array of (string)component => array of available_update_info objects or null
* @param int|null $fetch timestamp of the most recent updates fetch or null (unknown)
* @return string
*/
@@ -749,7 +724,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (!$registered) {
$registerbutton = $this->single_button(new moodle_url('/admin/registration/register.php',
$registerbutton = $this->single_button(new moodle_url('registration/register.php',
array('huburl' => HUB_MOODLEORGHUBURL, 'hubname' => 'Moodle.org')),
get_string('register', 'admin'));
@@ -763,9 +738,9 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Helper method to render the information about the available Moodle update
*
* @param \core\update\info $updateinfo information about the available Moodle core update
* @param available_update_info $updateinfo information about the available Moodle core update
*/
protected function moodle_available_update_info(\core\update\info $updateinfo) {
protected function moodle_available_update_info(available_update_info $updateinfo) {
$boxclasses = 'moodleupdateinfo';
$info = array();
@@ -832,12 +807,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 core_plugin_manager $pluginman provides information about the plugins.
* @param 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(core_plugin_manager $pluginman, $version, array $options = array()) {
public function plugins_check_table(plugin_manager $pluginman, $version, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins();
@@ -930,7 +905,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(
core_plugin_manager::PLUGIN_STATUS_NODB, core_plugin_manager::PLUGIN_STATUS_UPTODATE));
plugin_manager::PLUGIN_STATUS_NODB, plugin_manager::PLUGIN_STATUS_UPTODATE));
$coredependency = $plugin->is_core_dependency_satisfied($version);
$otherpluginsdependencies = $pluginman->are_dependencies_satisfied($plugin->get_other_required_plugins());
@@ -1006,12 +981,12 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Formats the information that needs to go in the 'Requires' column.
* @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 plugininfo_base $plugin the plugin we are rendering the row for.
* @param plugin_manager $pluginman provides data on all the plugins.
* @param string $version
* @return string HTML code
*/
protected function required_column(\core\plugininfo\base $plugin, core_plugin_manager $pluginman, $version) {
protected function required_column(plugininfo_base $plugin, plugin_manager $pluginman, $version) {
$requires = array();
if (!empty($plugin->versionrequires)) {
@@ -1026,28 +1001,19 @@ class core_admin_renderer extends plugin_renderer_base {
}
foreach ($plugin->get_other_required_plugins() as $component => $requiredversion) {
$ok = true;
$otherplugin = $pluginman->get_plugin_info($component);
$actions = array();
if (is_null($otherplugin)) {
// The required plugin is not installed.
$class = 'requires-failed requires-missing';
$installurl = new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $component));
$uploadurl = new moodle_url('/admin/tool/installaddon/');
$actions[] = html_writer::link($installurl, get_string('dependencyinstall', 'core_plugin'));
$actions[] = html_writer::link($uploadurl, get_string('dependencyupload', 'core_plugin'));
$ok = false;
} else if ($requiredversion != ANY_VERSION and $otherplugin->versiondisk < $requiredversion) {
// The required plugin is installed but needs to be updated.
$class = 'requires-failed requires-outdated';
if (!$otherplugin->is_standard()) {
$updateurl = new moodle_url($this->page->url, array('sesskey' => sesskey(), 'fetchupdates' => 1));
$actions[] = html_writer::link($updateurl, get_string('checkforupdates', 'core_plugin'));
}
$ok = false;
}
} else {
// Already installed plugin with sufficient version.
if ($ok) {
$class = 'requires-ok';
} else {
$class = 'requires-failed';
}
if ($requiredversion != ANY_VERSION) {
@@ -1055,11 +1021,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',
html_writer::div(get_string($str, 'core_plugin',
array('component' => $component, 'version' => $requiredversion)), 'component').
html_writer::div(implode(' | ', $actions), 'actions'),
get_string($str, 'core_plugin',
array('component' => $componenturl, 'version' => $requiredversion)),
array('class' => $class));
}
@@ -1072,11 +1038,11 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Prints an overview about the plugins - number of installed, number of extensions etc.
*
* @param core_plugin_manager $pluginman provides information about the plugins
* @param plugin_manager $pluginman provides information about the plugins
* @param array $options filtering options
* @return string as usually
*/
public function plugins_overview_panel(core_plugin_manager $pluginman, array $options = array()) {
public function plugins_overview_panel(plugin_manager $pluginman, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins();
@@ -1085,7 +1051,7 @@ class core_admin_renderer extends plugin_renderer_base {
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
if ($plugin->get_status() === plugin_manager::PLUGIN_STATUS_MISSING) {
continue;
}
$numtotal++;
@@ -1152,11 +1118,11 @@ class core_admin_renderer extends plugin_renderer_base {
*
* This default implementation renders all plugins into one big table.
*
* @param core_plugin_manager $pluginman provides information about the plugins.
* @param plugin_manager $pluginman provides information about the plugins.
* @param array $options filtering options
* @return string HTML code
*/
public function plugins_control_panel(core_plugin_manager $pluginman, array $options = array()) {
public function plugins_control_panel(plugin_manager $pluginman, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins();
@@ -1210,12 +1176,8 @@ class core_admin_renderer extends plugin_renderer_base {
);
foreach ($plugininfo as $type => $plugins) {
$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 = new html_table_cell($pluginman->plugintype_name_plural($type));
$header->header = true;
$header->colspan = array_sum($table->headspan);
$header = new html_table_row(array($header));
@@ -1242,9 +1204,9 @@ class core_admin_renderer extends plugin_renderer_base {
}
$status = $plugin->get_status();
$row->attributes['class'] .= ' status-'.$status;
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
if ($status === plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'statusmsg'));
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
} else if ($status === plugin_manager::PLUGIN_STATUS_NEW) {
$msg = html_writer::tag('span', get_string('status_new', 'core_plugin'), array('class' => 'statusmsg'));
} else {
$msg = '';
@@ -1282,7 +1244,8 @@ class core_admin_renderer extends plugin_renderer_base {
}
$settings = new html_table_cell($settings);
if ($uninstallurl = $pluginman->get_uninstall_url($plugin->component, 'overview')) {
if ($pluginman->can_uninstall_plugin($plugin->component)) {
$uninstallurl = $plugin->get_uninstall_url();
$uninstall = html_writer::link($uninstallurl, get_string('uninstall', 'core_plugin'));
} else {
$uninstall = '';
@@ -1322,9 +1285,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 \core\update\info $updateinfo information about the available update for the plugin
* @param available_update_info $updateinfo information about the available update for the plugin
*/
protected function plugin_available_update_info(\core\update\info $updateinfo) {
protected function plugin_available_update_info(available_update_info $updateinfo) {
$boxclasses = 'pluginupdateinfo';
$info = array();
@@ -1353,7 +1316,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 = \core\update\deployer::instance();
$deployer = available_update_deployer::instance();
if ($deployer->initialized()) {
$impediments = $deployer->deployment_impediments($updateinfo);
if (empty($impediments)) {
@@ -1379,7 +1342,7 @@ class core_admin_renderer extends plugin_renderer_base {
* configuration and how it suits Moodle needs.
*
* @param boolean $result final result of the check (true/false)
* @param environment_results[] $environment_results array of results gathered
* @param array $environment_results array of results gathered
* @return string HTML to output.
*/
public function environment_check_table($result, $environment_results) {
@@ -1391,10 +1354,9 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('name'),
get_string('info'),
get_string('report'),
get_string('plugin'),
get_string('status'),
);
$servertable->colclasses = array('centeralign name', 'centeralign info', 'leftalign report', 'leftalign plugin', 'centeralign status');
$servertable->colclasses = array('centeralign name', 'centeralign status', 'leftalign report', 'centeralign info');
$servertable->attributes['class'] = 'admintable environmenttable generaltable';
$servertable->id = 'serverstatus';
@@ -1404,10 +1366,9 @@ class core_admin_renderer extends plugin_renderer_base {
$othertable->head = array(
get_string('info'),
get_string('report'),
get_string('plugin'),
get_string('status'),
);
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'alignleft plugin', 'aligncenter status');
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'aligncenter status');
$othertable->attributes['class'] = 'admintable environmenttable generaltable';
$othertable->id = 'otherserverstatus';
@@ -1423,7 +1384,6 @@ class core_admin_renderer extends plugin_renderer_base {
$type = $environment_result->getPart();
$info = $environment_result->getInfo();
$status = $environment_result->getStatus();
$plugin = $environment_result->getPluginName();
$error_code = $environment_result->getErrorCode();
// Process Report field
$rec = new stdClass();
@@ -1500,8 +1460,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (!empty($info)){
$linkparts[] = $info;
}
// Plugin environments do not have docs pages yet.
if (empty($CFG->docroot) or $environment_result->plugin) {
if (empty($CFG->docroot)) {
$report = get_string($stringtouse, 'admin', $rec);
} else {
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec));
@@ -1527,9 +1486,9 @@ class core_admin_renderer extends plugin_renderer_base {
// Add the row to the table
if ($environment_result->getPart() == 'custom_check'){
$otherdata[$messagetype][] = array ($info, $report, $plugin, $status);
$otherdata[$messagetype][] = array ($info, $report, $status);
} else {
$serverdata[$messagetype][] = array ($type, $info, $report, $plugin, $status);
$serverdata[$messagetype][] = array ($type, $info, $report, $status);
}
}
}
+43 -13
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 uninstall the report.
* a link to delete the report.
*
* The code is based on admin/localplugins.php by David Mudrak.
*
@@ -33,23 +33,55 @@ 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', 'uninstall'));
$table->define_headers(array(get_string('plugin'), get_string('version'), $struninstall));
$table->define_columns(array('name', 'version', 'delete'));
$table->define_headers(array(get_string('plugin'), get_string('version'), get_string('delete')));
$table->define_baseurl($PAGE->url);
$table->set_attribute('id', 'reportplugins');
$table->set_attribute('class', 'admintable generaltable');
$table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide');
$table->setup();
$plugins = array();
foreach (core_component::get_plugin_list('report') as $plugin => $plugindir) {
foreach (get_plugin_list('report') as $plugin => $plugindir) {
if (get_string_manager()->string_exists('pluginname', 'report_' . $plugin)) {
$strpluginname = get_string('pluginname', 'report_' . $plugin);
} else {
@@ -57,7 +89,7 @@ foreach (core_component::get_plugin_list('report') as $plugin => $plugindir) {
}
$plugins[$plugin] = $strpluginname;
}
core_collator::asort($plugins);
collatorlib::asort($plugins);
$like = $DB->sql_like('plugin', '?', true, true, false, '|');
$params = array('report|_%');
@@ -72,10 +104,8 @@ foreach ($installed as $config) {
}
foreach ($plugins as $plugin => $name) {
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('report_'.$plugin, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$delete = new moodle_url($PAGE->url, array('delete' => $plugin, 'sesskey' => sesskey()));
$delete = html_writer::link($delete, get_string('delete'));
if (!isset($versions[$plugin])) {
if (file_exists("$CFG->dirroot/report/$plugin/version.php")) {
@@ -96,7 +126,7 @@ foreach ($plugins as $plugin => $name) {
}
}
$table->add_data(array($name, $version, $uninstall));
$table->add_data(array($name, $version, $delete));
}
$table->print_html();
+4 -5
View File
@@ -61,6 +61,9 @@ 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
@@ -148,7 +151,6 @@ if (($action == 'edit') || ($action == 'new')) {
}
if ($success) {
// configs saved
core_plugin_manager::reset_caches();
redirect($baseurl);
} else {
print_error('instancenotsaved', 'repository', $baseurl);
@@ -189,7 +191,6 @@ 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()) {
@@ -200,7 +201,6 @@ 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);
@@ -211,7 +211,6 @@ if (($action == 'edit') || ($action == 'new')) {
}
if ($repositorytype->delete($downloadcontents)) {
core_plugin_manager::reset_caches();
redirect($baseurl);
} else {
print_error('instancenotdeleted', 'repository', $baseurl);
@@ -393,7 +392,7 @@ if (($action == 'edit') || ($action == 'new')) {
}
// Get all the plugins that exist on disk
$plugins = core_component::get_plugin_list('repository');
$plugins = get_plugin_list('repository');
if (!empty($plugins)) {
foreach ($plugins as $plugin => $dir) {
// Check that it has not already been listed
-3
View File
@@ -102,7 +102,6 @@ if (!empty($edit) || !empty($new)) {
$data = data_submitted();
}
if ($success) {
core_plugin_manager::reset_caches();
redirect($parenturl);
} else {
print_error('instancenotsaved', 'repository', $parenturl);
@@ -119,7 +118,6 @@ 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);
@@ -132,7 +130,6 @@ 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);
+24 -21
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,15 +16,16 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Select site administrators.
* Lets you site administrators
*
* @package core_role
* @copyright 2010 Petr Skoda {@link http://skodak.org}
* @package core
* @subpackage role
* @copyright 2010 Petr Skoda (skodak) http://skodak.org
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
$confirmadd = optional_param('confirmadd', 0, PARAM_INT);
$confirmdel = optional_param('confirmdel', 0, PARAM_INT);
@@ -35,10 +37,10 @@ if (!is_siteadmin()) {
die;
}
$admisselector = new core_role_admins_existing_selector();
$admisselector = new admins_existing_selector();
$admisselector->set_extra_fields(array('username', 'email'));
$potentialadmisselector = new core_role_admins_potential_selector();
$potentialadmisselector = new admins_potential_selector();
$potentialadmisselector->set_extra_fields(array('username', 'email'));
if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
@@ -46,8 +48,7 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
$user = reset($userstoadd);
$username = fullname($user) . " ($user->username, $user->email)";
echo $OUTPUT->header();
$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->confirm(get_string('confirmaddadmin', 'role', $username), new moodle_url('/admin/roles/admins.php', array('confirmadd'=>$user->id, 'sesskey'=>sesskey())), $PAGE->url);
echo $OUTPUT->footer();
die;
}
@@ -56,12 +57,11 @@ 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();
$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->confirm(get_string('confirmdeladmin', 'role', $username), new moodle_url('/admin/roles/admins.php', array('confirmdel'=>$user->id, 'sesskey'=>sesskey())), $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', 'core_role'); ?></h3>
<h3 class="main"><?php print_string('manageadmins', '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', 'core_role'); ?></label>
<label for="removeselect"><?php print_string('existingadmins', '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', 'core_role'); ?>" title="<?php print_string('mainadminset', 'core_role'); ?>" />
<input name="main" id="main" type="submit" value="<?php echo get_string('mainadminset', 'role'); ?>" title="<?php print_string('mainadminset', 'role'); ?>" />
</p>
</td>
<td id="potentialcell">
<td id='potentialcell'>
<p>
<label for="addselect"><?php print_string('users'); ?></label>
</p>
@@ -152,4 +152,7 @@ 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();
+10 -22
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,21 +16,23 @@
// 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_role
* @package core
* @subpackage 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' => 'core_role_allow_assign_page',
'override' => 'core_role_allow_override_page',
'switch' => 'core_role_allow_switch_page'
'assign' => 'role_allow_assign_page',
'override' => 'role_allow_override_page',
'switch' => 'role_allow_switch_page'
);
if (!isset($classformode[$mode])) {
print_error('invalidmode', '', '', $mode);
@@ -45,23 +48,8 @@ $controller = new $classformode[$mode]();
if (optional_param('submit', false, PARAM_BOOL) && data_submitted() && confirm_sesskey()) {
$controller->process_submission();
$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();
}
mark_context_dirty($syscontext->path);
add_to_log(SITEID, 'role', 'edit allow ' . $mode, str_replace($CFG->wwwroot . '/', '', $baseurl), '', '', $USER->id);
redirect($baseurl);
}
+43 -63
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,21 +16,21 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Assign roles to users.
* Lets you assign roles to users in a particular context.
*
* @package core_role
* @package core
* @subpackage role
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../config.php');
require_once(dirname(__FILE__) . '/../../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);
$returnto = optional_param('return', null, PARAM_ALPHANUMEXT);
$contextid = required_param('contextid',PARAM_INT);
$roleid = optional_param('roleid', 0, PARAM_INT);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -50,25 +51,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 = $context->get_context_name();
$contextname = print_context_name($context);
$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', '', $context->get_url(), $a);
print_error('cannotassignrolehere', '', get_context_url($context), $a);
}
// Work out an appropriate page title.
@@ -76,12 +77,12 @@ if ($roleid) {
$a = new stdClass;
$a->role = $assignableroles[$roleid];
$a->context = $contextname;
$title = get_string('assignrolenameincontext', 'core_role', $a);
$title = get_string('assignrolenameincontext', 'role', $a);
} else {
if ($isfrontpage) {
$title = get_string('frontpageroles', 'admin');
} else {
$title = get_string('assignrolesin', 'core_role', $contextname);
$title = get_string('assignrolesin', 'role', $contextname);
}
}
@@ -91,10 +92,10 @@ if ($roleid) {
// Create the user selector objects.
$options = array('context' => $context, 'roleid' => $roleid);
$potentialuserselector = core_role_get_potential_user_selector($context, 'addselect', $options);
$currentuserselector = new core_role_existing_role_holders('removeselect', $options);
$potentialuserselector = roles_get_potential_user_selector($context, 'addselect', $options);
$currentuserselector = new 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();
@@ -111,24 +112,28 @@ 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);
}
@@ -140,7 +145,6 @@ $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:
@@ -149,17 +153,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading($SITE->fullname);
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
$PAGE->set_heading(get_string('frontpage', 'admin'));
admin_externalpage_setup('frontpageroles', '', array('contextid' => $contextid, 'roleid' => $roleid));
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -170,20 +174,17 @@ switch ($context->contextlevel) {
echo $OUTPUT->header();
// Print heading.
echo $OUTPUT->heading_with_help($title, 'assignroles', 'core_role');
echo $OUTPUT->heading_with_help($title, 'assignroles', '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->notification(get_string('globalroleswarning', 'core_role'));
echo $OUTPUT->box(get_string('globalroleswarning', 'role'));
}
// Print the form.
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
if ($returnto !== null) {
$assignurl->param('return', $returnto);
}
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
?>
<form id="assignform" method="post" action="<?php echo $assignurl ?>"><div>
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
@@ -191,7 +192,7 @@ if ($roleid) {
<table id="assigningrole" summary="" class="admintable roleassigntable generaltable" cellspacing="0">
<tr>
<td id="existingcell">
<p><label for="removeselect"><?php print_string('extusers', 'core_role'); ?></label></p>
<p><label for="removeselect"><?php print_string('extusers', 'role'); ?></label></p>
<?php $currentuserselector->display() ?>
</td>
<td id="buttonscell">
@@ -204,7 +205,7 @@ if ($roleid) {
</div>
</td>
<td id="potentialcell">
<p><label for="addselect"><?php print_string('potusers', 'core_role'); ?></label></p>
<p><label for="addselect"><?php print_string('potusers', 'role'); ?></label></p>
<?php $potentialuserselector->display() ?>
</td>
</tr>
@@ -228,45 +229,37 @@ if ($roleid) {
// Print a form to swap roles, and a link back to the all roles list.
echo '<div class="backlink">';
$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');
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('assignanotherrole', 'role');
echo $OUTPUT->render($select);
$backurl = new moodle_url('/admin/roles/assign.php', array('contextid' => $contextid));
if ($returnto !== null) {
$backurl->param('return', $returnto);
}
echo '<p><a href="' . $backurl->out() . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '<p><a href="' . $backurl->out() . '">' . get_string('backtoallroles', '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', 'core_role'), 3);
echo $OUTPUT->heading(get_string('notabletoassignroleshere', '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->notification(get_string('globalroleswarning', 'core_role'));
echo $OUTPUT->box(get_string('globalroleswarning', 'role'));
}
// Print instruction.
echo $OUTPUT->heading(get_string('chooseroletoassign', 'core_role'), 3);
// Print instruction
echo $OUTPUT->heading(get_string('chooseroletoassign', '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', 'core_role', MAX_USERS_TO_LIST_PER_ROLE);
$strmorethanmax = get_string('morethan', '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) {
$userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
$roleusers = get_role_users($roleid, $context, false, $userfields);
$roleusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname');
if (!empty($roleusers)) {
$strroleusers = array();
foreach ($roleusers as $user) {
@@ -277,19 +270,16 @@ if ($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', 'core_role'));
$table->head = array(get_string('role'), get_string('description'), get_string('userswiththisrole', 'role'));
$table->colclasses = array('leftalign role', 'leftalign', 'centeralign userrole');
$table->attributes['class'] = 'admintable generaltable';
if ($showroleholders) {
@@ -300,9 +290,6 @@ if ($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) {
@@ -314,15 +301,8 @@ if ($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' => $url));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>get_context_url($context)));
echo html_writer::end_tag('div');
}
}
+21 -27
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -17,14 +18,16 @@
/**
* Shows the result of has_capability for every capability for a user in a context.
*
* @package core_role
* @package core
* @subpackage 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);
@@ -44,41 +47,32 @@ 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', 'core_role'));
print_error('nopermissions', 'error', '', get_string('checkpermissions', '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 = $context->get_context_name();
$contextname = print_context_name($context);
// 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 core_role_check_users_selector('reportuser', $options);
$userselector = new role_check_users_selector('reportuser', $options);
$userselector->set_rows(20);
// Work out an appropriate page title.
$title = get_string('checkpermissionsin', 'core_role', $contextname);
$title = get_string('checkpermissionsin', '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:
@@ -87,17 +81,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading($SITE->fullname);
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
$PAGE->set_heading(get_string('frontpage', 'admin'));
admin_externalpage_setup('frontpageroles', '', array('contextid' => $contextid), $CFG->wwwroot . '/' . $CFG->admin . '/roles/check.php');
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -123,7 +117,7 @@ if (!is_null($reportuser)) {
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
if (!empty($roleassignments)) {
echo $OUTPUT->heading(get_string('rolesforuser', 'core_role', fullname($reportuser)), 3);
echo $OUTPUT->heading(get_string('rolesforuser', 'role', fullname($reportuser)), 3);
echo html_writer::start_tag('ul');
$systemcontext = context_system::instance();
@@ -137,20 +131,20 @@ if (!is_null($reportuser)) {
array('action' => 'view', 'roleid' => $ra->roleid)), $rolename);
}
echo html_writer::tag('li', get_string('roleincontext', 'core_role',
echo html_writer::tag('li', get_string('roleincontext', 'role',
array('role' => $rolename, 'context' => $link)));
}
echo html_writer::end_tag('ul');
}
echo $OUTPUT->heading(get_string('permissionsforuser', 'core_role', fullname($reportuser)), 3);
$table = new core_role_check_capability_table($context, $reportuser, $contextname);
echo $OUTPUT->heading(get_string('permissionsforuser', 'role', fullname($reportuser)), 3);
$table = new check_capability_table($context, $reportuser, $contextname);
$table->display();
echo $OUTPUT->box_end();
$selectheading = get_string('selectanotheruser', 'core_role');
$selectheading = get_string('selectanotheruser', 'role');
} else {
$selectheading = get_string('selectauser', 'core_role');
$selectheading = get_string('selectauser', 'role');
}
// Show UI for choosing a user to report on.
@@ -171,14 +165,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', 'core_role') . '" /></p>';
echo '<p id="chooseusersubmit"><input type="submit" value="' . get_string('showthisuserspermissions', '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'=>$context->get_url()));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>get_context_url($context)));
echo html_writer::end_tag('div');
}
@@ -1,98 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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;
}
}
@@ -1,91 +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/>.
/**
* 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
@@ -1,49 +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/>.
/**
* 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');
}
}
@@ -1,49 +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/>.
/**
* 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
@@ -1,164 +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/>.
/**
* 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
@@ -1,61 +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/>.
/**
* 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');
}
}
@@ -1,61 +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/>.
/**
* 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;
}
}
@@ -1,179 +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/>.
/**
* 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;
$jsmodule = array(
'name' => 'rolescapfilter',
'fullpath' => '/admin/roles/module.js',
'strings' => array(
array('filter', 'moodle'),
array('clear', 'moodle'), ),
'requires' => array('node', 'cookie', 'escape')
);
$PAGE->requires->js_init_call('M.core_role.init_cap_table_filter', array($this->id, $this->context->id), false,
$jsmodule);
}
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);
}
@@ -1,193 +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/>.
/**
* 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];
}
}
@@ -1,84 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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>';
}
}
@@ -1,153 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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;
}
}
@@ -1,646 +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/>.
/**
* 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>';
}
}
}
@@ -1,63 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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>';
}
}
@@ -1,144 +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/>.
/**
* 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);
}
}
}
@@ -1,102 +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/>.
/**
* 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>';
}
}
}
@@ -1,66 +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/>.
/**
* 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'));
}
}
@@ -1,64 +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/>.
/**
* 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
@@ -1,150 +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/>.
/**
* 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;
}
}
@@ -1,86 +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/>.
/**
* 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 ($enrolsql) enrolled_users_view
JOIN {user} u ON u.id = enrolled_users_view.id
LEFT JOIN {role_assignments} ra ON (ra.userid = enrolled_users_view.id AND
ra.roleid = :roleid AND ra.contextid = :contextid)
WHERE ra.id IS NULL
$wherecondition";
$params['contextid'] = $this->context->id;
$params['roleid'] = $this->roleid;
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);
}
}
@@ -1,76 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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
@@ -1,314 +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/>.
/**
* 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
@@ -1,120 +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/>.
/**
* 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;
}
}
@@ -1,136 +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/>.
/**
* 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>';
}
}
+122 -228
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,271 +19,164 @@
* Lets the user edit role definitions.
*
* Responds to actions:
* add - add a new role (allows import, duplicate, archetype)
* export - save xml role definition
* add - add a new role
* duplicate - like add, only initialise the new role by using an existing one.
* edit - edit the definition of a role
* view - view the definition of a role
*
* @package core_role
* @package core
* @subpackage 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');
$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.
$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);
}
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.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 {
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help($title, 'roles', 'core_role');
$mform->display();
echo $OUTPUT->footer();
die;
$roleid = 0;
}
} else if ($action === 'reset' and $resettype !== 'none') {
if (!$role = $DB->get_record('role', array('id'=>$roleid))) {
/// 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;
}
}
/// 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)) {
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);
} 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;
/// 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 {
// Create the table object.
if ($action === 'view') {
$definitiontable = new core_role_view_role_definition_table($systemcontext, $roleid);
/// 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 if ($showadvanced) {
$definitiontable = new core_role_define_role_table_advanced($systemcontext, $roleid);
$definitiontable = new define_role_table_advanced($systemcontext, $roleid);
} else {
$definitiontable = new core_role_define_role_table_basic($systemcontext, $roleid);
$definitiontable = new define_role_table_basic($systemcontext, $roleid);
}
$definitiontable->read_submitted_permissions();
}
// 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);
if ($action == 'duplicate') {
$definitiontable->make_copy();
}
$event->trigger();
if ($action === 'add') {
redirect(new moodle_url('/admin/roles/define.php', array('action'=>'view', 'roleid'=>$definitiontable->get_role_id())));
/// 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');
} else {
redirect($returnurl);
$submitlabel = get_string('savechanges');
}
}
// Print the page header and tabs.
echo $OUTPUT->header();
/// 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();
}
$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 {
// Start the form.
echo $OUTPUT->box_start('generalbox');
if ($action == 'view') {
echo '<div class="mform">';
} else {
?>
<form id="rolesform" class="mform" action="<?php p($baseurl->out(false)); ?>" method="post"><div>
<form id="rolesform" class="mform" action="<?php echo $baseurl; ?>" 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 p($submitlabel); ?>" />
<input type="submit" name="savechanges" value="<?php echo $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 p($submitlabel); ?>" />
<input type="submit" name="savechanges" value="<?php echo $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="' . s($manageurl->out(false)) . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '</div>';
/// 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>';
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+1823 -18
View File
File diff suppressed because it is too large Load Diff
+203 -160
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -22,196 +23,238 @@
* 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_role
* @package core
* @subpackage 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');
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
$action = optional_param('action', '', PARAM_ALPHA);
if ($action) {
$roleid = required_param('roleid', PARAM_INT);
} else {
$roleid = 0;
}
$action = optional_param('action', '', PARAM_ALPHA);
if ($action) {
$roleid = required_param('roleid', PARAM_INT);
}
// 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_select('role_assignments',
'roleid = ?', array($roleid), 'COUNT(DISTINCT userid)');
///.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_select('role_assignments',
'roleid = ?', array($roleid), 'COUNT(DISTINCT userid)');
$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;
$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;
case 'moveup':
if (confirm_sesskey()) {
$prevrole = null;
$thisrole = null;
foreach ($roles as $role) {
if ($role->id == $roleid) {
$thisrole = $role;
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);
} else {
$prevrole = $role;
$warning = get_string('resetrolesure', 'role', $a);
}
$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;
}
if (is_null($thisrole) || is_null($prevrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
// Reset context levels for standard archetypes
if ($roles[$roleid]->archetype) {
set_role_contextlevels($roleid, get_default_contextlevels($roles[$roleid]->archetype));
}
if (!switch_roles($thisrole, $prevrole)) {
print_error('cannotmoverolewithid', 'error', '', $roleid);
}
}
redirect($baseurl);
break;
//reset or delete the capabilities
reset_role_capabilities($roleid);
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);
}
}
// 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;
}
redirect($baseurl);
break;
/// Print the page header and tabs.
echo $OUTPUT->header();
}
$currenttab = 'manage';
include_once('managetabs.php');
// 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),
'',
/// 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')
);
// 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));
}
/// 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');
$table->data[] = $row;
}
echo html_writer::table($table);
/// Print a list of roles with edit/copy/delete/reorder icons.
$table->data = array();
$firstrole = reset($roles);
$lastrole = end($roles);
foreach ($roles as $role) {
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();
/// Basic data.
$row = array(
'<a href="' . $defineurl . '?action=view&amp;roleid=' . $role->id . '">' . $role->localname . '</a>',
role_get_description($role),
s($role->shortname),
'',
);
echo $OUTPUT->footer();
die;
/// 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;
}
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();
echo $OUTPUT->footer();
die;
function get_action_icon($url, $icon, $alt, $tooltip) {
global $OUTPUT;
+10 -6
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -17,18 +18,21 @@
/**
* Defines the tab bar used on the manage/allow assign/allow overrides pages.
*
* @package core_role
* @package core
* @subpackage 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();
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); // It must be included from a Moodle page
}
$toprow = array();
$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'));
$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'));
echo $OUTPUT->tabtree($toprow, $currenttab);
+1 -1
View File
@@ -51,7 +51,7 @@ M.core_role.init_cap_table_filter = function(Y, tableid, contextid) {
marginRight : 'auto'
});
// Create the capability search input.
this.input = Y.Node.create('<input type="text" id="'+this.table.get('id')+'capabilitysearch" value="'+Y.Escape.html(filtervalue)+'" />');
this.input = Y.Node.create('<input type="text" id="'+this.table.get('id')+'capabilitysearch" value="'+filtervalue+'" />');
// Create a label for the search input.
this.label = Y.Node.create('<label for="'+this.input.get('id')+'">'+M.str.moodle.filter+' </label>');
// Create a clear button to clear the input.
+27 -50
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -17,15 +18,17 @@
/**
* Lets you override role definitions in contexts.
*
* @package core_role
* @package core
* @subpackage 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);
$roleid = required_param('roleid', PARAM_INT);
$contextid = required_param('contextid', PARAM_INT); // context id
$roleid = required_param('roleid', PARAM_INT); // requested role id
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -45,7 +48,7 @@ if ($course) {
}
}
// Security first.
// security first
require_login($course, false, $cm);
$safeoverridesonly = false;
if (!has_capability('moodle/role:override', $context)) {
@@ -53,19 +56,9 @@ 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));
@@ -77,15 +70,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 = $context->get_context_name();
$straction = get_string('overrideroles', 'core_role'); // Used by tabs.php.
$contextname = print_context_name($context);
$straction = get_string('overrideroles', 'role'); // Used by tabs.php
$a = (object)array('context' => $contextname, 'role' => $overridableroles[$roleid]);
$title = get_string('overridepermissionsforrole', 'core_role', $a);
$title = get_string('overridepermissionsforrole', 'role', $a);
$currenttab = 'permissions';
@@ -101,17 +94,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading($SITE->fullname);
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
$PAGE->set_heading(get_string('frontpage', 'admin'));
admin_externalpage_setup('frontpageroles', '', array(), $PAGE->url);
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -119,61 +112,45 @@ 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', '', $context->get_url(), $a);
print_error('cannotoverriderolehere', '', get_context_url($context), $a);
}
// If we are actually overriding a role, create the table object, and save changes if appropriate.
$overridestable = new core_role_override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
$overridestable = new 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];
// Trigger event.
$event = \core\event\role_capabilities_updated::create(
array(
'context' => $context,
'objectid' => $roleid,
)
);
$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();
add_to_log($course->id, 'role', 'override', 'admin/roles/override.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
redirect($returnurl);
}
// Finally start page output.
// Finally start page output
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help($title, 'overridepermissions', 'core_role');
echo $OUTPUT->heading_with_help($title, 'overridepermissions', 'role');
// Show UI for overriding roles.
if (!empty($capabilities)) {
echo $OUTPUT->box(get_string('nocapabilitiesincontext', 'core_role'), 'generalbox boxaligncenter');
echo $OUTPUT->box(get_string('nocapabilitiesincontext', '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', 'core_role'), array('class'=>'overridenotice'));
echo html_writer::tag('p', get_string('highlightedcellsshowinherit', 'role'), array('class'=>'overridenotice'));
$overridestable->display();
if ($overridestable->has_locked_capabilities()) {
echo '<p class="overridenotice">' . get_string('safeoverridenotice', 'core_role') . "</p>\n";
echo '<p class="overridenotice">' . get_string('safeoverridenotice', 'role') . "</p>\n";
}
echo html_writer::start_tag('div', array('class'=>'submit_buttons'));
@@ -188,9 +165,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', 'core_role');
$select->label = get_string('overrideanotherrole', 'role');
echo $OUTPUT->render($select);
echo html_writer::tag('p', html_writer::tag('a', get_string('backtoallroles', 'core_role'), array('href'=>$returnurl)));
echo html_writer::tag('p', html_writer::tag('a', get_string('backtoallroles', 'role'), array('href'=>$returnurl)));
echo html_writer::end_tag('div');
echo $OUTPUT->footer();
+36 -48
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,16 +16,19 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Change permissions.
* This script serves draft files of current user
*
* @package core_role
* @copyright 2009 Petr Skoda {@link http://skodak.org}
* @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('../../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);
@@ -33,7 +37,6 @@ $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);
@@ -53,22 +56,15 @@ if ($course) {
}
}
// Security first.
// security first
require_login($course, false, $cm);
require_capability('moodle/role:review', $context);
$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;
// 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) {
@@ -78,9 +74,9 @@ if ($capability) {
$allowoverrides = has_capability('moodle/role:override', $context);
$allowsafeoverrides = has_capability('moodle/role:safeoverride', $context);
$contextname = $context->get_context_name();
$title = get_string('permissionsincontext', 'core_role', $contextname);
$straction = get_string('permissions', 'core_role'); // Used by tabs.php.
$contextname = print_context_name($context);
$title = get_string('permissionsincontext', 'role', $contextname);
$straction = get_string('permissions', 'role'); // Used by tabs.php
$currenttab = 'permissions';
$PAGE->set_pagelayout('admin');
@@ -95,17 +91,17 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading($SITE->fullname);
$PAGE->set_heading("$SITE->fullname: ".get_string("categories"));
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
$PAGE->set_heading(get_string('frontpage', 'admin'));
admin_externalpage_setup('frontpageroles', '', array(), $PAGE->url);
} else {
$PAGE->set_heading($course->fullname);
}
break;
case CONTEXT_MODULE:
$PAGE->set_heading($context->get_context_name(false));
$PAGE->set_heading(print_context_name($context, false));
$PAGE->set_cacheable(false);
break;
case CONTEXT_BLOCK:
@@ -113,12 +109,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);
@@ -126,24 +122,22 @@ 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', 'core_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', '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', 'core_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', '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);
@@ -153,7 +147,7 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
if ($allow || $prohibit) {
if ($allow) {
$mform = new core_role_permission_allow_form(null, array($context, $capability, $overridableroles));
$mform = new role_allow_form(null, array($context, $capability, $overridableroles));
if ($mform->is_cancelled()) {
redirect($PAGE->url);
} else if ($data = $mform->get_data() and !empty($data->roleid)) {
@@ -164,11 +158,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', 'core_role', $a);
$message = get_string('roleallowinfo', 'role', $a);
}
}
if ($prohibit) {
$mform = new core_role_permission_prohibit_form(null, array($context, $capability, $overridableroles));
$mform = new role_prohibit_form(null, array($context, $capability, $overridableroles));
if ($mform->is_cancelled()) {
redirect($PAGE->url);
} else if ($data = $mform->get_data() and !empty($data->roleid)) {
@@ -179,7 +173,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', 'core_role', $a);
$message = get_string('roleprohibitinfo', 'role', $a);
}
}
echo $OUTPUT->header();
@@ -194,13 +188,13 @@ if ($capability && ($allowoverrides || ($allowsafeoverrides && is_safe_capabilit
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$table = new core_role_permissions_table($context, $contextname, $allowoverrides, $allowsafeoverrides, $overridableroles);
$table = new 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', 'core_role');
$select->label = get_string('advancedoverride', 'role');
echo html_writer::tag('div', $OUTPUT->render($select), array('class'=>'advancedoverride'));
}
$table->display();
@@ -208,16 +202,10 @@ 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' => $url));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>get_context_url($context)));
echo html_writer::end_tag('div');
}
echo $OUTPUT->footer($course);
+101
View File
@@ -0,0 +1,101 @@
<?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
@@ -1,65 +0,0 @@
<?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
@@ -1,79 +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/>.
/**
* 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');
}
}
}
}
+44 -42
View File
@@ -1,4 +1,5 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,13 +19,14 @@
* User roles report list all the users who have been assigned a particular
* role in all contexts.
*
* @package core_role
* @package core
* @subpackage 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(__DIR__ . '/../../config.php');
require_once(dirname(__FILE__) . '/../../config.php');
// Get params.
$userid = required_param('userid', PARAM_INT);
@@ -41,21 +43,15 @@ $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.
if ($course->id == SITEID) {
require_login();
$PAGE->set_context($usercontext);
} else {
require_login($course);
$PAGE->set_context($coursecontext);
}
/// Check login and permissions.
require_login($course);
$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', 'core_role'));
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'role'));
}
if ($userid != $USER->id) {
@@ -69,26 +65,32 @@ 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 = ?
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 = ?
"./*AND ra.active = 1*/"
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);
@@ -96,22 +98,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);
$parentcontext = $context->get_parent_context();
if ($parentcontext) {
$contexts[$parentcontext->id]->children[] = $conid;
$parentcontextid = get_parent_contextid($context);
if ($parentcontextid) {
$contexts[$parentcontextid]->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;
}
@@ -119,17 +121,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', 'core_role');
$title = get_string('xroleassignments', 'core_role', $fullname);
$straction = get_string('thisusersroles', 'role');
$title = get_string('xroleassignments', '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.': '.$fullname);
$PAGE->set_heading($course->fullname);
}
echo $OUTPUT->header();
echo $OUTPUT->heading($title, 3);
@@ -137,12 +139,12 @@ echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
// Display them.
if (!$roleassignments) {
echo '<p>', get_string('noroleassignments', 'core_role'), '</p>';
echo '<p>', get_string('noroleassignments', '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();
@@ -153,13 +155,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', 'core_role');
$strcheckpermissions = get_string('checkpermissions', '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 convenience.
// Pull the current context into an array for convinience.
$context = context::instance_by_id($contextid);
// Print the context name.
@@ -187,11 +189,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', 'core_role');
$strcheck = get_string('checksystempermissionsfor', 'core_role', $a);
$strgoto = get_string('gotoassignsystemroles', 'role');
$strcheck = get_string('checksystempermissionsfor', 'role', $a);
} else {
$strgoto = get_string('gotoassignroles', 'core_role', $a);
$strcheck = get_string('checkuserspermissionshere', 'core_role', $a);
$strgoto = get_string('gotoassignroles', 'role', $a);
$strcheck = get_string('checkuserspermissionshere', 'role', $a);
}
echo ' <a title="' . $strgoto . '" href="' . $raurl . '"><img class="iconsmall" src="' .
$OUTPUT->pix_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
-1
View File
@@ -14,7 +14,6 @@ $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);
+6 -18
View File
@@ -2,12 +2,7 @@
// This file defines settingpages and externalpages under the "appearance" category
$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
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themes')));
// "themesettings" settingpage
@@ -29,7 +24,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
$ADMIN->add('themes', new admin_externalpage('themeselector', new lang_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
// settings for each theme
foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
foreach (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));
@@ -41,11 +36,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
}
// Calendar settings.
// calendar
$temp = new admin_settingpage('calendar', new lang_string('calendarsettings','admin'));
$temp->add(new admin_setting_configselect('calendartype', new lang_string('calendartype', 'admin'),
new lang_string('calendartype_desc', 'admin'), 'gregorian', \core_calendar\type_factory::get_list_of_calendar_types()));
$temp->add(new admin_setting_special_adminseesall());
//this is hacky because we do not want to include the stuff from calendar/lib.php
$temp->add(new admin_setting_configselect('calendar_site_timeformat', new lang_string('pref_timeformat', 'calendar'),
@@ -194,12 +186,10 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
$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',
'moodle/my:configsyspages');
$temp = new admin_externalpage('mypage', new lang_string('mypage', 'admin'), $CFG->wwwroot . '/my/indexsys.php');
$ADMIN->add('appearance', $temp);
$temp = new admin_externalpage('profilepage', new lang_string('myprofile', 'admin'), $CFG->wwwroot . '/user/profilesys.php',
'moodle/my:configsyspages');
$temp = new admin_externalpage('profilepage', new lang_string('myprofile', 'admin'), $CFG->wwwroot . '/user/profilesys.php');
$ADMIN->add('appearance', $temp);
// coursecontact is the person responsible for course - usually manages enrolments, receives notification, etc.
@@ -224,12 +214,10 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
$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', 'moodle/tag:manage'));
$ADMIN->add('appearance', new admin_externalpage('managetags', new lang_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
$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')));
+20 -46
View File
@@ -1,51 +1,20 @@
<?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
*
* @package core
* @copyright 2002 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This file defines settingpages and externalpages under the "courses" category
$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')
)
);
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')));
// 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');
@@ -56,6 +25,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$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'), ''));
@@ -85,6 +55,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$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'), ''));
@@ -102,6 +73,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$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'), ''));
@@ -120,11 +92,13 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$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();
@@ -145,13 +119,13 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$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.
@@ -188,7 +162,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$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.
@@ -263,10 +236,11 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$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
-14
View File
@@ -19,18 +19,6 @@ 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
@@ -94,6 +82,4 @@ 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,6 +69,29 @@ 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 (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) {
foreach (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 (core_component::get_plugin_list('gradeimport') as $plugin => $plugindir) {
foreach (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 (core_component::get_plugin_list('gradeexport') as $plugin => $plugindir) {
foreach (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');
+54 -89
View File
@@ -1,65 +1,47 @@
<?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/>.
/**
* 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
*/
/*
* Please note that is file is always loaded last - it means that you can inject entries into other categories too.
*/
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 (core_plugin_manager::instance()->get_plugins_of_type('mod') as $plugin) {
/** @var \core\plugininfo\mod $plugin */
$plugin->load_settings($ADMIN, 'modsettings', $hassiteconfig);
foreach ($allplugins['mod'] as $module) {
$module->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 (core_plugin_manager::instance()->get_plugins_of_type('format') as $plugin) {
/** @var \core\plugininfo\format $plugin */
$plugin->load_settings($ADMIN, 'formatsettings', $hassiteconfig);
foreach ($allplugins['format'] as $format) {
$format->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 (core_plugin_manager::instance()->get_plugins_of_type('block') as $plugin) {
/** @var \core\plugininfo\block $plugin */
$plugin->load_settings($ADMIN, 'blocksettings', $hassiteconfig);
foreach ($allplugins['block'] as $block) {
$block->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 (core_plugin_manager::instance()->get_plugins_of_type('message') as $plugin) {
/** @var \core\plugininfo\message $plugin */
$plugin->load_settings($ADMIN, 'messageoutputs', $hassiteconfig);
foreach ($allplugins['message'] as $processor) {
$processor->load_settings($ADMIN, 'messageoutputs', $hassiteconfig);
}
// authentication plugins
@@ -87,12 +69,8 @@ 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);
$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);
foreach ($allplugins['auth'] as $auth) {
$auth->load_settings($ADMIN, 'authsettings', $hassiteconfig);
}
// Enrolment plugins
@@ -100,13 +78,8 @@ if ($hassiteconfig) {
$temp = new admin_settingpage('manageenrols', new lang_string('manageenrols', 'enrol'));
$temp->add(new admin_setting_manageenrols());
$ADMIN->add('enrolments', $temp);
$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);
foreach($allplugins['enrol'] as $enrol) {
$enrol->load_settings($ADMIN, 'enrolments', $hassiteconfig);
}
@@ -115,9 +88,8 @@ if ($hassiteconfig) {
$temp = new admin_settingpage('manageeditors', new lang_string('editorsettings', 'editor'));
$temp->add(new admin_setting_manageeditors());
$ADMIN->add('editorsettings', $temp);
foreach (core_plugin_manager::instance()->get_plugins_of_type('editor') as $plugin) {
/** @var \core\plugininfo\editor $plugin */
$plugin->load_settings($ADMIN, 'editorsettings', $hassiteconfig);
foreach ($allplugins['editor'] as $editor) {
$editor->load_settings($ADMIN, 'editorsettings', $hassiteconfig);
}
/// License types
@@ -178,9 +150,8 @@ if ($hassiteconfig) {
}
$ADMIN->add('filtersettings', $temp);
foreach (core_plugin_manager::instance()->get_plugins_of_type('filter') as $plugin) {
/** @var \core\plugininfo\filter $plugin */
$plugin->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
foreach ($allplugins['filter'] as $filter) {
$filter->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
}
@@ -259,7 +230,6 @@ 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));
@@ -271,9 +241,8 @@ 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 (core_plugin_manager::instance()->get_plugins_of_type('repository') as $plugin) {
/** @var \core\plugininfo\repository $plugin */
$plugin->load_settings($ADMIN, 'repositorysettings', $hassiteconfig);
foreach ($allplugins['repository'] as $repositorytype) {
$repositorytype->load_settings($ADMIN, 'repositorysettings', $hassiteconfig);
}
/// Web services
@@ -321,9 +290,8 @@ if ($hassiteconfig) {
'admin'), new lang_string('configenablewsdocumentation', 'admin', $wsdoclink), false));
$ADMIN->add('webservicesettings', $temp);
/// links to protocol pages
foreach (core_plugin_manager::instance()->get_plugins_of_type('webservice') as $plugin) {
/** @var \core\plugininfo\webservice $plugin */
$plugin->load_settings($ADMIN, 'webservicesettings', $hassiteconfig);
foreach ($allplugins['webservice'] as $webservice) {
$webservice->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));
@@ -337,6 +305,10 @@ 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')));
@@ -375,7 +347,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
2 => get_string('showmarkandmax', 'question'),
);
$settings->add(new admin_setting_configselect('question_preview/marks',
get_string('marks', 'question'), '', 2, $marksoptions));
get_string('marks', 'question'), '', 1, $marksoptions));
$settings->add(new admin_setting_configselect('question_preview/markdp',
get_string('decimalplacesingrades', 'question'), '', 2, array(0, 1, 2, 3, 4, 5, 6, 7)));
@@ -393,9 +365,8 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
get_string('responsehistory', 'question'), '', 0, $hiddenofvisible));
// Settings for particular question types.
foreach (core_plugin_manager::instance()->get_plugins_of_type('qtype') as $plugin) {
/** @var \core\plugininfo\qtype $plugin */
$plugin->load_settings($ADMIN, 'qtypesettings', $hassiteconfig);
foreach ($allplugins['qtype'] as $qtype) {
$qtype->load_settings($ADMIN, 'qtypesettings', $hassiteconfig);
}
}
@@ -405,8 +376,7 @@ if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
$ADMIN->add('plagiarism', new admin_externalpage('manageplagiarismplugins', new lang_string('manageplagiarism', 'plagiarism'),
$CFG->wwwroot . '/' . $CFG->admin . '/plagiarism.php'));
foreach (core_plugin_manager::instance()->get_plugins_of_type('plagiarism') as $plugin) {
/** @var \core\plugininfo\plagiarism $plugin */
foreach ($allplugins['plagiarism'] as $plugin) {
$plugin->load_settings($ADMIN, 'plagiarism', $hassiteconfig);
}
}
@@ -415,7 +385,7 @@ $ADMIN->add('reports', new admin_externalpage('comments', new lang_string('comme
// Course reports settings
if ($hassiteconfig) {
$pages = array();
foreach (core_component::get_plugin_list('coursereport') as $report => $path) {
foreach (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,
@@ -438,7 +408,7 @@ if ($hassiteconfig) {
// Now add reports
$pages = array();
foreach (core_component::get_plugin_list('report') as $report => $plugindir) {
foreach (get_plugin_list('report') as $report => $plugindir) {
$settings_path = "$plugindir/settings.php";
if (file_exists($settings_path)) {
$settings = new admin_settingpage('report' . $report,
@@ -463,10 +433,12 @@ if ($hassiteconfig) {
$CFG->wwwroot . '/' . $CFG->admin . '/tools.php'));
}
// 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 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 the Cache plugins
@@ -475,7 +447,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 (core_component::get_plugin_list('cachestore') as $plugin => $path) {
foreach (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');
@@ -485,16 +457,6 @@ 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')));
@@ -502,9 +464,12 @@ 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.
foreach (core_plugin_manager::instance()->get_plugins_of_type('local') as $plugin) {
/** @var \core\plugininfo\local $plugin */
$plugin->load_settings($ADMIN, null, $hassiteconfig);
// 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;
}
}
+5 -17
View File
@@ -46,7 +46,11 @@ 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));
@@ -70,22 +74,6 @@ 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));
+8 -20
View File
@@ -35,9 +35,7 @@ $ADMIN->add('server', $temp);
// "sessionhandling" settingpage
$temp = new admin_settingpage('sessionhandling', new lang_string('sessionhandling', 'admin'));
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_configcheckbox('dbsessions', new lang_string('dbsessions', 'admin'), new lang_string('configdbsessions', 'admin'), 1));
$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),
@@ -177,25 +175,15 @@ $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',
$memoryoptions));
// if this option is set to 0, default 128M will be used
array( '64M' => '64M',
'128M' => '128M',
'256M' => '256M',
'512M' => '512M',
'1024M' => '1024M'
)));
$temp->add(new admin_setting_configtext('curlcache', new lang_string('curlcache', 'admin'),
new lang_string('configcurlcache', 'admin'), 120, PARAM_INT));
-8
View File
@@ -35,14 +35,6 @@ 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,7 +150,6 @@ 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'));
+5 -20
View File
@@ -28,8 +28,7 @@
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
require_once(__DIR__ . '/../../../lib/behat/behat_field_manager.php');
use Behat\Behat\Context\Step\Given as Given,
Behat\Gherkin\Node\TableNode as TableNode,
use Behat\Gherkin\Node\TableNode as TableNode,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
/**
@@ -59,7 +58,7 @@ 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 * 1000, self::PAGE_READY_JS);
$this->wait(self::TIMEOUT, '(document.readyState === "complete")');
}
// Search by label.
@@ -68,7 +67,7 @@ class behat_admin extends behat_base {
$submitsearch = $this->find('css', 'form.adminsearchform input[type=submit]');
$submitsearch->press();
$this->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
$this->wait(self::TIMEOUT, '(document.readyState === "complete")');
// 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.
@@ -80,8 +79,7 @@ class behat_admin extends behat_base {
// 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 or " .
"@id=//span[contains(normalize-space(.), $label)]/preceding-sibling::label[1]/@for]";
"[@id=//label[contains(normalize-space(.), $label)]/@for]";
$fieldnode = $this->find('xpath', $fieldxpath, $exception);
$formfieldtypenode = $this->find('xpath', $fieldxpath . "/ancestor::div[@class='form-setting']" .
@@ -90,7 +88,7 @@ class behat_admin extends behat_base {
} catch (ElementNotFoundException $e) {
// Multi element settings, interacting only the first one.
$fieldxpath = "//*[label[.= $label]|span[.= $label]]/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]" .
$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);
@@ -126,17 +124,4 @@ 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,8 +15,7 @@ Feature: Display extended course names
And I should not see "C_shortname Course fullname"
Scenario: Courses list with extended course names
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"
Given I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][not(contains(., 'Site administration'))][contains(., 'Appearance')]" "xpath_element"
And I check "Display extended course names"
When I press "Save changes"
And I am on homepage
@@ -1,27 +0,0 @@
@core @core_admin
Feature: Set admin settings value
In order to set admin settings value
As an admin
I need to set admin setting value and verify it is applied
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course fullname | C_shortname | 0 |
And I log in as "admin"
And I should see "Course fullname"
And I should not see "C_shortname Course fullname"
Scenario: set admin value with full name
Given I set the following administration settings values:
| Display extended course names | 1 |
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
Scenario: set admin value with short name
Given I set the following administration settings values:
| courselistshortnames | 1 |
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
+7 -2
View File
@@ -14,8 +14,12 @@ Feature: Upload users
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
And I navigate to "Upload users" node in "Site administration > Users > Accounts"
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
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
And I press "Upload users"
Then I should see "Upload users preview"
And I should see "Tom"
@@ -38,4 +42,5 @@ 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
@@ -1,76 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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.
\core\session\manager::write_close();
session_get_instance()->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 = 2013110500;
$plugin->requires = 2013110500;
$plugin->version = 2013050100;
$plugin->requires = 2013050100;
$plugin->component = 'tool_assignmentupgrade';
$plugin->dependencies = array('mod_assign' => 2013110500);
$plugin->dependencies = array('mod_assign' => 2013050100);
-7
View File
@@ -26,15 +26,8 @@ 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');
+1 -2
View File
@@ -84,7 +84,6 @@ 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');
@@ -150,7 +149,6 @@ $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.
@@ -160,6 +158,7 @@ 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');
-9
View File
@@ -105,15 +105,6 @@ class tool_behat_renderer extends plugin_renderer_base {
$stepsdefinitions
);
// Replace simple OR options.
$regex = '#\(\?P<[^>]+>([^\)|]+\|[^\)]+)\)#';
$stepsdefinitions = preg_replace_callback($regex,
function($matches){
return html_writer::select(explode('|', $matches[1]), uniqid());
},
$stepsdefinitions
);
}
// Steps definitions.
@@ -20,10 +20,6 @@ Feature: Page contents assertions
And I wait "2" seconds
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-main table th.c1" "css_element"
@@ -39,8 +35,8 @@ Feature: Page contents assertions
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Course 1"
When I dock "Administration" block
Then I should not see "Question bank" in the ".block-region" "css_element"
When I click on "Move this to the dock" "button" in the "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
@@ -49,5 +45,5 @@ Feature: Page contents assertions
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
When I dock "Administration" block
Then I should not see "Turn editing on" in the ".block-region" "css_element"
When I click on "Move this to the dock" "button" in the "Administration" "block"
Then I should not see "Turn editing on" in the "region-pre" "region"
@@ -37,9 +37,9 @@ Feature: Set up contextual data for tests
And I follow "Cat 3"
And I should see "Course 1"
And I should see "Course 2"
And I follow "Cat 2"
And I select "Cat 1 / Cat 2" from "Course categories:"
And I should see "No courses in this category"
And I follow "Miscellaneous"
And I select "Miscellaneous" from "Course categories:"
And I should see "Course 3"
@javascript
@@ -146,53 +146,26 @@ Feature: Set up contextual data for tests
| 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
# Assignment 2.2 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:
# User can see label description instead of name on the course page:
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"
@@ -230,61 +203,8 @@ 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"
Scenario: Add cohorts and cohort members with data generator
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
And the following "cohorts" exist:
| name | idnumber |
| System cohort A | CHSA |
And the following "cohorts" exist:
| name | idnumber | contextlevel | reference |
| System cohort B | CHSB | System | |
| Cohort in category | CHC | Category | CAT1 |
| Empty cohort | CHE | Category | CAT1 |
And the following "cohort members" exist:
| user | cohort |
| student1 | CHSA |
| student2 | CHSB |
| student1 | CHSB |
| student1 | CHC |
When I log in as "admin"
And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
Then the following should exist in the "cohorts" table:
| Name | Cohort size |
| System cohort A | 1 |
| System cohort B | 2 |
And I should not see "Cohort in category"
And I follow "Courses"
And I follow "Cat 1"
And I follow "Cohorts"
And I should not see "System cohort"
And the following should exist in the "cohorts" table:
| Name | Cohort size |
| Cohort in category | 1 |
| Empty cohort | 0 |
Scenario: Add grade categories with data generator
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "grade categories" exist:
| fullname | course |
| Grade category 1 | C1|
And the following "grade categories" exist:
| fullname | course | gradecategory |
| Grade sub category 2 | C1 | Grade category 1|
When I log in as "admin"
And I follow "Courses"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
@@ -29,9 +29,6 @@ Feature: Verify that all form fields values can be get and set
| student2 | G1 |
| student2 | G2 |
| student3 | G2 |
And the following "activities" exists:
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I expand "Site administration" node
And I expand "Appearance" node
@@ -42,6 +39,12 @@ Feature: Verify that all form fields values can be get and set
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Wiki" to section "1" and I fill the form with:
| Wiki name | Test this one |
| Description | Test this one |
| First page name | Test this one |
| Wiki mode | Collaborative wiki |
| Visible | Hide |
And I follow "Test this one"
And I press "Create page"
# Select (multi-select) - Checking "the select box should contain".
@@ -147,10 +150,13 @@ Feature: Verify that all form fields values can be get and set
And I follow "Groups"
# Select (multi-select & AJAX) - Checking "I select from" and "select box should contain".
And I select "Group 2" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 2"
And the "members" select box should contain "Student 3"
And the "members" select box should not contain "Student 1"
And I select "Group 1" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 2"
And the "members" select box should contain "Student 1"
And the "members" select box should contain "Student 2"
And the "members" select box should not contain "Student 3"
@@ -7,7 +7,9 @@ Feature: List the system steps definitions
Background:
Given I am on homepage
And I log in as "admin"
And I navigate to "Acceptance testing" node in "Site administration > Development"
And I expand "Site administration" node
And I expand "Development" node
And I follow "Acceptance testing"
@javascript
Scenario: Accessing the list
@@ -7,12 +7,13 @@ Feature: Forms manipulation
@javascript
Scenario: Basic forms manipulation
Given I log in as "admin"
And I navigate to "Edit profile" node in "My profile settings"
And I follow "Admin User"
And I follow "Edit profile"
When I fill in "First name" with "Field value"
And I select "Plain text area" from "Text editor"
And I select "Use standard web forms" from "When editing text"
And I check "Unmask"
Then the "First name" field should match "Field value" value
And the "Text editor" select box should contain "Plain text area"
And the "When editing text" select box should contain "Use standard web forms"
And the "Unmask" checkbox should be checked
And I uncheck "Unmask"
And the "Unmask" checkbox should not be checked

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