Compare commits

...

933 Commits

Author SHA1 Message Date
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
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
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
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 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
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
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
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
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
Ankit Agarwal 756a0bc3a1 MDL-41485 calendar: Replace value of action buttons on managesubscription page with int 2013-08-30 17:20:30 +08: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
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
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
Frederic Massart 0f387618cd MDL-39640 repository: Prevent notice when editing an instance 2013-05-13 17:27:42 +08:00
Ankit Agarwal d8d0b8b390 MDL-39363 scorm: Accept 0 as a valid score 2013-04-29 16:53:15 +08:00
756 changed files with 16818 additions and 3481 deletions
+91
View File
@@ -0,0 +1,91 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script fixed incorrectly deleted users.
*
* @package core
* @subpackage cli
* @copyright 2013 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
// Now get cli options.
list($options, $unrecognized) = cli_get_params(array('help'=>false),
array('h'=>'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help =
"Fix incorrectly deleted users.
This scripts detects users that are marked as deleted instead
of calling delete_user().
Deleted users do not have original username, idnumber or email,
we must also delete all roles, enrolments, group memberships, etc.
Please note this script does not delete any public information
such as forum posts.
Options:
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/cli/fix_deleted_users.php
";
echo $help;
die;
}
cli_heading('Looking for sloppy user deletes');
// Look for sloppy deleted users where somebody only flipped the deleted flag.
$sql = "SELECT *
FROM {user}
WHERE deleted = 1 AND email LIKE '%@%' AND username NOT LIKE '%@%'";
$rs = $DB->get_recordset_sql($sql);
foreach ($rs as $user) {
echo "Redeleting user $user->id: $user->username ($user->email)\n";
delete_user($user);
}
cli_heading('Deleting all leftovers');
$DB->set_field('user', 'idnumber', '', array('deleted'=>1));
$DB->delete_records_select('role_assignments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('cohort_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('groups_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_enrolments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_preferences', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_info_data', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_lastaccess', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('external_tokens', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('external_services_users', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
exit(0);
+115
View File
@@ -892,4 +892,119 @@
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
<MOODLE version="2.6" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.1.33" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.3.3" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="optional">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="64M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="safe_mode" value="0" level="optional">
<FEEDBACK>
<ON_CHECK message="settingsafemode" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+3 -2
View File
@@ -47,10 +47,11 @@ if (!function_exists('iconv')) {
define('NO_OUTPUT_BUFFERING', true);
if (empty($_GET['cache']) and empty($_POST['cache'])) {
if (empty($_GET['cache']) and empty($_POST['cache']) and empty($_GET['sesskey']) and empty($_POST['sesskey'])) {
// Prevent caching at all cost when visiting this page directly,
// we redirect to self once we known no upgrades are necessary.
// Note: $_GET and $_POST are used here intentionally because our param cleaning is not loaded yet.
// Note2: the sesskey is present in all block editing hacks, we can not redirect there, so enable caching.
define('CACHE_DISABLE_ALL', true);
}
@@ -443,7 +444,7 @@ if (during_initial_install()) {
// Now we can be sure everything was upgraded and caches work fine,
// redirect if necessary to make sure caching is enabled.
if (!$cache) {
if (!$cache and !optional_param('sesskey', '', PARAM_RAW)) {
redirect(new moodle_url($PAGE->url, array('cache' => 1)));
}
+30 -30
View File
@@ -27,37 +27,37 @@ require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
// If we have got here as a confirmed aciton, do it.
if ($confirm && isloggedin() && confirm_sesskey()) {
require_capability('moodle/site:config', context_system::instance());
// Valid request. Purge, and redirect the user back to where they came from.
purge_all_caches();
if ($returnurl) {
$returnurl = $CFG->wwwroot . $returnurl;
} else {
$returnurl = new moodle_url('/admin/purgecaches.php');
}
redirect($returnurl, get_string('purgecachesfinished', 'admin'));
}
// Otherwise, show a button to actually purge the caches.
admin_externalpage_setup('purgecaches');
require_login();
require_capability('moodle/site:config', context_system::instance());
if ($confirm) {
require_sesskey();
// Valid request. Purge, and redisplay the form so it is easy to purge again
// in the near future.
purge_all_caches();
redirect(new moodle_url('/admin/purgecaches.php'), get_string('purgecachesfinished', 'admin'));
} else {
// Show a confirm form.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('purgecaches', 'admin'));
$url = new moodle_url('/admin/purgecaches.php', array('sesskey'=>sesskey(), 'confirm'=>1));
$button = new single_button($url, get_string('purgecaches','admin'), 'post');
// Cancel button takes them back to the page the were on, if possible,
// otherwise to the site home page.
$return = new moodle_url('/');
if (isset($_SERVER['HTTP_REFERER']) and !empty($_SERVER['HTTP_REFERER'])) {
if ($_SERVER['HTTP_REFERER'] !== "$CFG->wwwroot/$CFG->admin/purgecaches.php") {
$return = $_SERVER['HTTP_REFERER'];
}
}
echo $OUTPUT->confirm(get_string('purgecachesconfirm', 'admin'), $button, $return);
echo $OUTPUT->footer();
$actionurl = new moodle_url('/admin/purgecaches.php', array('sesskey'=>sesskey(), 'confirm'=>1));
if ($returnurl) {
$actionurl->param('returnurl', $returnurl);
}
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('purgecaches', 'admin'));
echo $OUTPUT->box_start('generalbox', 'notice');
echo html_writer::tag('p', get_string('purgecachesconfirm', 'admin'));
echo $OUTPUT->single_button($actionurl, get_string('purgecaches', 'admin'), 'post');
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+3 -1
View File
@@ -1001,9 +1001,11 @@ class core_admin_renderer extends plugin_renderer_base {
} else {
$str = 'otherplugin';
}
$componenturl = new moodle_url('https://moodle.org/plugins/view.php?plugin='.$component);
$componenturl = html_writer::tag('a', $component, array('href' => $componenturl->out()));
$requires[] = html_writer::tag('li',
get_string($str, 'core_plugin',
array('component' => $component, 'version' => $requiredversion)),
array('component' => $componenturl, 'version' => $requiredversion)),
array('class' => $class));
}
+3 -1
View File
@@ -143,8 +143,10 @@ if (($action == 'edit') || ($action == 'new')) {
$success = $repositorytype->update_options($settings);
} else {
$type = new repository_type($plugin, (array)$fromform, $visible);
$type->create();
$success = true;
if (!$repoid = $type->create()) {
$success = false;
}
$data = data_submitted();
}
if ($success) {
+2
View File
@@ -158,6 +158,7 @@ if ($hassiteconfig
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_comments', new lang_string('generalcomments','backup'), new lang_string('configgeneralcomments','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_badges', new lang_string('generalbadges','backup'), new lang_string('configgeneralbadges','backup'), array('value'=>1,'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_logs', new lang_string('generallogs','backup'), new lang_string('configgenerallogs','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), array('value'=>0, 'locked'=>0)));
@@ -231,6 +232,7 @@ if ($hassiteconfig
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_comments', new lang_string('generalcomments','backup'), new lang_string('configgeneralcomments','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_badges', new lang_string('generalbadges','backup'), new lang_string('configgeneralbadges','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_userscompletion', new lang_string('generaluserscompletion','backup'), new lang_string('configgeneraluserscompletion','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_logs', new lang_string('generallogs', 'backup'), new lang_string('configgenerallogs', 'backup'), 0));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_histories', new lang_string('generalhistories','backup'), new lang_string('configgeneralhistories','backup'), 0));
+4
View File
@@ -65,6 +65,10 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
60 => new lang_string('numminutes', '', 60),
30 => new lang_string('numminutes', '', 30),
15 => new lang_string('numminutes', '', 15))));
// Define the prefix to be added to imported profiling runs.
$temp->add(new admin_setting_configtext('profilingimportprefix',
new lang_string('profilingimportprefix', 'admin'),
new lang_string('profilingimportprefix_desc', 'admin'), '(I)', PARAM_TAG, 10));
// Add the 'profiling' page to admin block
$ADMIN->add('development', $temp);
+7 -3
View File
@@ -62,7 +62,7 @@ class behat_admin extends behat_base {
}
// Search by label.
$searchbox = $this->find_field('Search in settings');
$searchbox = $this->find_field(get_string('searchinsettings', 'admin'));
$searchbox->setValue($label);
$submitsearch = $this->find('css', 'form.adminsearchform input[type=submit]');
$submitsearch->press();
@@ -72,8 +72,12 @@ class behat_admin extends behat_base {
// Admin settings does not use the same DOM structure than other moodle forms
// but we also need to use lib/behat/form_field/* to deal with the different moodle form elements.
$exception = new ElementNotFoundException($this->getSession(), '"' . $label . '" administration setting ');
// The argument should be converted to an xpath literal.
$label = $this->getSession()->getSelectorsHandler()->xpathLiteral($label);
$fieldxpath = "//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]" .
"[@id=//label[contains(normalize-space(string(.)), '" . $label . "')]/@for]";
"[@id=//label[contains(normalize-space(.), $label)]/@for]";
$fieldnode = $this->find('xpath', $fieldxpath, $exception);
$formfieldtypenode = $this->find('xpath', $fieldxpath . "/ancestor::div[@class='form-setting']" .
"/child::div[contains(concat(' ', @class, ' '), ' form-')]/child::*/parent::div");
@@ -90,7 +94,7 @@ class behat_admin extends behat_base {
$field = behat_field_manager::get_field_instance($type, $fieldnode, $this->getSession());
$field->set_value($value);
$this->find_button('Save changes')->press();
$this->find_button(get_string('savechanges'))->press();
}
}
@@ -15,7 +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 click on "Courses" "link" in the "//div[@id='settingsnav']//descendant::li[contains(concat(' ', @class, ' '), ' type_setting ')][not(contains(., 'Site administration'))][contains(., 'Appearance')]" "xpath_element"
Given I 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 -1
View File
@@ -14,7 +14,7 @@ Feature: Upload users
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
And I expand "Front page settings" node
And I collapse "Front page settings" node
And I expand "Site administration" node
And I expand "Users" node
And I expand "Accounts" node
+3
View File
@@ -142,6 +142,9 @@ foreach ($vars as $var) {
$CFG->{$var} = $CFG->{'behat_' . $var};
}
// Clean $CFG extra values before performing any action.
behat_clean_init_config();
$CFG->noemailever = true;
$CFG->passwordsaltmain = 'moodle';
+3 -2
View File
@@ -22,8 +22,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['aim'] = 'This administration tool helps developers and test writers to create .feature files describing Moodle\'s functionalities and run them automatically.';
$string['allavailablesteps'] = 'All the available steps definitions';
$string['giveninfo'] = 'Given. Processes to set up the environment';
$string['infoheading'] = 'Info';
$string['installinfo'] = 'Read {$a} for installation and tests execution info';
$string['moreinfoin'] = 'More info in {$a}';
$string['newstepsinfo'] = 'Read {$a} for info about how to add new steps definitions';
@@ -39,6 +41,5 @@ $string['theninfo'] = 'Then. Checkings to ensure the outcomes are the expected o
$string['viewsteps'] = 'Filter';
$string['wheninfo'] = 'When. Actions that provokes an event';
$string['wrongbehatsetup'] = 'Something is wrong with behat setup, ensure:<ul>
<li>You ran "curl http://getcomposer.org/installer | php"</li>
<li>You ran "php composer.phar install --dev"</li>
<li>You ran "php admin/tool/behat/cli/init.php" from your moodle root directory</li>
<li>vendor/bin/behat file has execution permissions</li></ul>';
+6 -5
View File
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/behat/classes/behat_command.php');
require_once($CFG->libdir . '/behat/classes/behat_selectors.php');
/**
* Renderer for behat tool web features
@@ -64,9 +64,10 @@ class tool_behat_renderer extends plugin_renderer_base {
get_string('newstepsinfo', 'tool_behat', $writestepslink)
);
// List of steps
// List of steps.
$html .= $this->output->box_start();
$html .= html_writer::tag('h1', 'Info');
$html .= html_writer::tag('h1', get_string('infoheading', 'tool_behat'));
$html .= html_writer::tag('div', get_string('aim', 'tool_behat'));
$html .= html_writer::empty_tag('div');
$html .= html_writer::empty_tag('ul');
$html .= html_writer::empty_tag('li');
@@ -91,7 +92,7 @@ class tool_behat_renderer extends plugin_renderer_base {
// Replace text selector type arguments with a user-friendly select.
$stepsdefinitions = preg_replace_callback('/(TEXT_SELECTOR\d?_STRING)/',
function ($matches) {
return html_writer::select(behat_command::$allowedtextselectors, uniqid());
return html_writer::select(behat_selectors::get_allowed_text_selectors(), uniqid());
},
$stepsdefinitions
);
@@ -99,7 +100,7 @@ class tool_behat_renderer extends plugin_renderer_base {
// Replace selector type arguments with a user-friendly select.
$stepsdefinitions = preg_replace_callback('/(SELECTOR\d?_STRING)/',
function ($matches) {
return html_writer::select(behat_command::$allowedselectors, uniqid());
return html_writer::select(behat_selectors::get_allowed_selectors(), uniqid());
},
$stepsdefinitions
);
@@ -35,9 +35,9 @@ Feature: Page contents assertions
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Course 1"
When I click on "Move this to the dock" "button" in the ".block_settings" "css_element"
When I click on "Move this to the dock" "button" in the "Administration" "block"
Then I should not see "Question bank"
And I click on "//div[@id='dock']/descendant::*[contains(., 'Administration')]/h2" "xpath_element"
And I click on "//div[@id='dock']/descendant::h2[normalize-space(.)='Administration']" "xpath_element"
@javascript
Scenario: Locators inside specific DOM nodes using XPath
@@ -45,5 +45,5 @@ Feature: Page contents assertions
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
When I click on "Move this to the dock" "button" in the "//*[contains(concat(' ', normalize-space(@class), ' '), ' block_settings ')]" "xpath_element"
When I click on "Move this to the dock" "button" in the "Administration" "block"
Then I should not see "Turn editing on"
@@ -30,6 +30,17 @@ Feature: Set up contextual data for tests
Then I should see "Course 1"
And I should see "Course 2"
And I should see "Course 3"
And I go to the courses management page
And I follow "Cat 1"
And I should see "Cat 2"
And I should see "Cat 3"
And I follow "Cat 3"
And I should see "Course 1"
And I should see "Course 2"
And I select "Cat 1 / Cat 2" from "Course categories:"
And I should see "No courses in this category"
And I select "Miscellaneous" from "Course categories:"
And I should see "Course 3"
@javascript
Scenario: Add a bunch of groups and groupings
+4
View File
@@ -38,5 +38,9 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Put any upgrade step following this
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -32,7 +32,7 @@ $lng = required_param('lng', PARAM_LANG);
$currentpage = optional_param('p', 0, PARAM_INT);
$translatorsubmitted = optional_param('translatorsubmitted', 0, PARAM_BOOL);
$PAGE->set_pagelayout('standard');
$PAGE->set_pagelayout('report'); // Allows for wide page contents.
$PAGE->set_url('/admin/tool/customlang/edit.php', array('lng' => $lng));
navigation_node::override_active_url(new moodle_url('/admin/tool/customlang/index.php'));
$PAGE->set_title(get_string('pluginname', 'tool_customlang'));
@@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['install'] = 'Install selected language pack';
$string['install'] = 'Install selected language pack(s)';
$string['installedlangs'] = 'Installed language packs';
$string['langimport'] = 'Language import utility';
$string['langimportdisabled'] = 'Language import feature has been disabled. You have to update your language packs manually at the file-system level. Do not forget to purge string caches after you do so.';
@@ -37,8 +37,8 @@ $string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of
$string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
$string['pluginname'] = 'Language packs';
$string['purgestringcaches'] = 'Purge string caches';
$string['remotelangnotavailable'] = 'Because Moodle can not connect to download.moodle.org, we are unable to do language pack installation automatically. Please download the appropriate zip file(s) from http://download.moodle.org, copy them to your {$a} directory and unzip them manually.';
$string['uninstall'] = 'Uninstall selected language pack';
$string['remotelangnotavailable'] = 'Because Moodle cannot connect to download.moodle.org, it is not possible for language packs to be installed automatically. Please download the appropriate ZIP file(s) from <a href="http://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['uninstall'] = 'Uninstall selected language pack(s)';
$string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
$string['updatelangs'] = 'Update all installed language packs';
+56
View File
@@ -0,0 +1,56 @@
<?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/>.
/**
* Profiling tool export utility.
*
* @package tool_profiling
* @copyright 2013 onwards Eloy Lafuente (stronk7) {@link http://stronk7.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->libdir . '/xhprof/xhprof_moodle.php');
// Page parameters.
$runid = required_param('runid', PARAM_ALPHANUM);
$listurl = required_param('listurl', PARAM_PATH);
admin_externalpage_setup('toolprofiling');
$PAGE->navbar->add(get_string('export', 'tool_profiling'));
// Calculate export variables.
$tempdir = 'profiling';
make_temp_directory($tempdir);
$runids = array($runid);
$filename = $runid . '.mpr';
$filepath = $CFG->tempdir . '/' . $tempdir . '/' . $filename;
// Generate the mpr file and send it.
if (profiling_export_runs($runids, $filepath)) {
send_file($filepath, $filename, 0, 0, false, false, '', true);
unlink($filepath); // Delete once sent.
die;
}
// Something wrong happened, notice it and done.
$urlparams = array(
'runid' => $runid,
'listurl' => $listurl);
$url = new moodle_url('/admin/tool/profiling/index.php', $urlparams);
notice(get_string('exportproblem', 'tool_profiling', $urlparams), $url);
+70
View File
@@ -0,0 +1,70 @@
<?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/>.
/**
* Profiling tool import utility.
*
* @package tool_profiling
* @copyright 2013 onwards Eloy Lafuente (stronk7) {@link http://stronk7.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->libdir . '/xhprof/xhprof_moodle.php');
require_once(dirname(__FILE__) . '/import_form.php');
admin_externalpage_setup('toolprofiling');
$PAGE->navbar->add(get_string('import', 'tool_profiling'));
// Calculate export variables.
$tempdir = 'profiling';
make_temp_directory($tempdir);
// URL where we'll end, both on success and failure.
$url = new moodle_url('/admin/tool/profiling/index.php');
// Instantiate the upload profiling runs form.
$mform = new profiling_import_form();
// If there is any file to import.
if ($data = $mform->get_data()) {
$filename = $mform->get_new_filename('mprfile');
$file = $CFG->tempdir . '/' . $tempdir . '/' . $filename;
$status = $mform->save_file('mprfile', $file);
if ($status) {
// File saved properly, let's import it.
$status = profiling_import_runs($file, $data->importprefix);
}
// Delete the temp file, not needed anymore.
if (file_exists($file)) {
unlink($file);
}
if ($status) {
// Import ended ok, let's redirect to main profiling page.
redirect($url, get_string('importok', 'tool_profiling', $filename));
}
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('import', 'tool_profiling'));
$mform->display();
echo $OUTPUT->footer();
die;
}
// Something wrong happened, notice it and done.
notice(get_string('importproblem', 'tool_profiling', $filename), $url);
+47
View File
@@ -0,0 +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/>.
/**
* Profiling tool import utility form.
*
* @package tool_profiling
* @copyright 2013 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/formslib.php');
class profiling_import_form extends moodleform {
public function definition () {
global $CFG;
$mform = $this->_form;
$mform->addElement('header', 'settingsheader', get_string('upload'));
$mform->addElement('filepicker', 'mprfile', get_string('file'), null, array('accepted_types' => array('.mpr', '.zip')));
$mform->addRule('mprfile', null, 'required');
$mform->addElement('text', 'importprefix',
get_string('importprefix', 'tool_profiling'), array('size' => 10));
$mform->setDefault('importprefix', $CFG->profilingimportprefix);
$mform->setType('importprefix', PARAM_TAG);
$this->add_action_buttons(false, get_string('import', 'tool_profiling'));
}
}
+8 -11
View File
@@ -17,8 +17,7 @@
/**
* Profiling tool.
*
* @package tool
* @subpackage profiling
* @package tool_profiling
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -75,12 +74,11 @@ if (isset($script)) {
$prevreferences = $DB->get_records_select('profiling',
'url = ? AND runreference = 1 AND timecreated < ?',
array($run->url, $run->timecreated),
'timecreated DESC', 'runid', 0, 1);
$prevrunid = $prevreferences ? reset($prevreferences)->runid : false;
'timecreated DESC', 'runid, runcomment, timecreated', 0, 10);
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
$header = get_string('lastrunof', 'tool_profiling', $script);
echo $OUTPUT->heading($header);
$table = profiling_print_run($run, $prevrunid);
$table = profiling_print_run($run, $prevreferences);
echo $table;
echo $OUTPUT->box_end();
@@ -127,12 +125,11 @@ if (isset($script)) {
$prevreferences = $DB->get_records_select('profiling',
'url = ? AND runreference = 1 AND timecreated < ?',
array($run->url, $run->timecreated),
'timecreated DESC', 'runid', 0, 1);
$prevrunid = $prevreferences ? reset($prevreferences)->runid : false;
'timecreated DESC', 'runid, runcomment, timecreated', 0, 10);
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
$header = get_string('summaryof', 'tool_profiling', $run->url);
echo $OUTPUT->heading($header);
$table = profiling_print_run($run, $prevrunid);
$table = profiling_print_run($run, $prevreferences);
echo $table;
echo $OUTPUT->box_end();
@@ -161,6 +158,9 @@ if (isset($script)) {
echo $OUTPUT->heading($header);
// Print the controller block with different options.
echo profiling_list_controls($listurl);
// TODO: Fix flexitable to validate tsort/thide/tshow/tifirs/tilast/page
// TODO: Fix table_sql to allow it to work without WHERE clause
// add silly condition (1 = 1) because of table_sql bug
@@ -179,9 +179,6 @@ if (isset($script)) {
$table->define_baseurl($baseurl);
$table->column_suppress('url');
$table->out(PROFILING_RUNSPERPAGE, true);
// Print the controller block with different options
echo profiling_list_controls($listurl);
}
// Footer.
@@ -24,13 +24,22 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['calls'] = 'Function calls';
$string['cannotfindanyrunforurl'] = 'Sorry, cannot find any profiling run for the \'{$a}\' URL';
$string['cannotfindanyrunforrunid'] = 'Sorry, cannot find the \'{$a}\' profiling run';
$string['comment'] = 'Comment';
$string['cputime'] = 'CPU time';
$string['differencesbetween2runsof'] = 'Differences between 2 runs of {$a}';
$string['executiontime'] = 'Execution time';
$string['cputime'] = 'CPU time';
$string['export'] = 'Export';
$string['exportproblem'] = 'Some problem happened exporting the profile run "{$a->runid}" corresponding to the request "{$a->listurl}".';
$string['exportthis'] = 'Export this profiling run';
$string['import'] = 'Import';
$string['importok'] = 'File "{$a}" imported successfully.';
$string['importprefix'] = 'Import prefix';
$string['importproblem'] = 'Some problem happened importing the file "{$a}".';
$string['lastrunof'] = 'Summary of last run of {$a}';
$string['markreferencerun'] = 'Mark as reference run/comment';
$string['memory'] = 'Memory used';
@@ -42,5 +51,5 @@ $string['referencerun'] = 'Reference run/comment';
$string['runid'] = 'Run ID';
$string['summaryof'] = 'Summary of {$a}';
$string['viewdetails'] = 'View profiling details';
$string['viewdiff'] = 'View profiling differences with last reference run';
$string['viewdiff'] = 'View profiling differences with:';
$string['viewdiffdetails'] = 'View profiling diff details';
+2 -3
View File
@@ -17,14 +17,13 @@
/**
* Version details.
*
* @package tool
* @subpackage profiling
* @package tool_profiling
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013050100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2013050200; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2013050100; // Requires this Moodle version
$plugin->component = 'tool_profiling'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -321,8 +321,8 @@ function uu_process_template_callback($username, $firstname, $lastname, $block)
* @return array type=>name
*/
function uu_supported_auths() {
// only following plugins are guaranteed to work properly
$whitelist = array('manual', 'nologin', 'none', 'email');
// Only the following plugins are guaranteed to work properly.
$whitelist = array('email', 'ldap', 'manual', 'nologin', 'none');
$plugins = get_enabled_auth_plugins();
$choices = array();
foreach ($plugins as $plugin) {
@@ -118,7 +118,8 @@ class create_xml_file extends XMLDBAction {
function get_plugin_type($dirpath) {
global $CFG;
$dirpath = $CFG->dirroot.$dirpath;
$plugintypes = get_plugin_types();
// Reverse order so that we get subplugin matches.
$plugintypes = array_reverse(get_plugin_types());
foreach ($plugintypes as $plugintype => $pluginbasedir) {
if (substr($dirpath, 0, strlen($pluginbasedir)) == $pluginbasedir) {
return $plugintype;
+28 -14
View File
@@ -33,24 +33,38 @@ $string['confirmdeleteindex'] = 'Are you absolutely sure that you want to delete
$string['confirmdeletekey'] = 'Are you absolutely sure that you want to delete the key:';
$string['confirmdeletetable'] = 'Are you absolutely sure that you want to delete the table:';
$string['confirmdeletexmlfile'] = 'Are you absolutely sure that you want to delete the file:';
$string['confirmcheckbigints'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of wrong integers.<br /><br />
$string['confirmcheckbigints'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of wrong integers.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckdefaults'] = 'This functionality will search for inconsistent default values in your Moodle server, generating (but not executing!) the needed SQL statements to have all the default values properly defined.<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of inconsistent default values.<br /><br />
$string['confirmcheckdefaults'] = 'This functionality will search for inconsistent default values in your Moodle server, generating (but not executing!) the needed SQL statements to have all the default values properly defined.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of inconsistent default values.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckforeignkeys'] = 'This functionality will search for potential violations of the foreign keys defined in the install.xml definitions. (Moodle does not currently generate actual foreign key constraints in the database, which is why invalid data may be present.)<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of missing indexes.<br /><br />
$string['confirmcheckforeignkeys'] = 'This functionality will search for potential violations of the foreign keys defined in the install.xml definitions. (Moodle does not currently generate actual foreign key constraints in the database, which is why invalid data may be present.)
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of missing indexes.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckindexes'] = 'This functionality will search for potential missing indexes in your Moodle server, generating (but not executing!) automatically the needed SQL statements to keep everything updated.<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (1.8, 1.9, 2.x ...) before executing the search of missing indexes.<br /><br />
$string['confirmcheckindexes'] = 'This functionality will search for potential missing indexes in your Moodle server, generating (but not executing!) automatically the needed SQL statements to keep everything updated.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of missing indexes.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).<br /><br />
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).<br /><br />
It\'s highly recommended to be running the latest (+ version) available of your Moodle release (2.2, 2.3, 2.x ...) before executing the search of BYTE semantics.<br /><br />
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of BYTE semantics.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmrevertchanges'] = 'Are you absolutely sure that you want to revert changes performed over:';
$string['create'] = 'Create';
+11 -3
View File
@@ -23,6 +23,7 @@ echo $OUTPUT->header();
//TODO: add support for large number of users
if ($confirm and confirm_sesskey()) {
$notifications = '';
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$rs = $DB->get_recordset_select('user', "id $in", $params, '', 'id, username, secret, confirmed, auth, firstname, lastname');
foreach ($rs as $user) {
@@ -32,12 +33,19 @@ if ($confirm and confirm_sesskey()) {
$auth = get_auth_plugin($user->auth);
$result = $auth->user_confirm($user->username, $user->secret);
if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
echo $OUTPUT->notification(get_string('usernotconfirmed', '', fullname($user, true)));
$notifications .= $OUTPUT->notification(get_string('usernotconfirmed', '', fullname($user, true)));
}
}
$rs->close();
redirect($return, get_string('changessaved'));
echo $OUTPUT->box_start('generalbox', 'notice');
if (!empty($notifications)) {
echo $notifications;
} else {
echo $OUTPUT->notification(get_string('changessaved'), 'notifysuccess');
}
$continue = new single_button(new moodle_url($return), get_string('continue'), 'post');
echo $OUTPUT->render($continue);
echo $OUTPUT->box_end();
} else {
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
+11 -4
View File
@@ -23,20 +23,27 @@ echo $OUTPUT->header();
//TODO: add support for large number of users
if ($confirm and confirm_sesskey()) {
$notifications = '';
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$rs = $DB->get_recordset_select('user', "id $in", $params);
foreach ($rs as $user) {
if (!is_siteadmin($user) and $USER->id != $user->id and delete_user($user)) {
unset($SESSION->bulk_users[$user->id]);
} else {
echo $OUTPUT->notification(get_string('deletednot', '', fullname($user, true)));
$notifications .= $OUTPUT->notification(get_string('deletednot', '', fullname($user, true)));
}
}
$rs->close();
session_gc(); // remove stale sessions
redirect($return, get_string('changessaved'));
echo $OUTPUT->box_start('generalbox', 'notice');
if (!empty($notifications)) {
echo $notifications;
} else {
echo $OUTPUT->notification(get_string('changessaved'), 'notifysuccess');
}
$continue = new single_button(new moodle_url($return), get_string('continue'), 'post');
echo $OUTPUT->render($continue);
echo $OUTPUT->box_end();
} else {
list($in, $params) = $DB->get_in_or_equal($SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
+22 -1
View File
@@ -174,7 +174,7 @@ class auth_plugin_cas extends auth_plugin_ldap {
*
*/
function connectCAS() {
global $PHPCAS_CLIENT;
global $CFG, $PHPCAS_CLIENT;
if (!is_object($PHPCAS_CLIENT)) {
// Make sure phpCAS doesn't try to start a new PHP session when connecting to the CAS server.
@@ -185,6 +185,27 @@ class auth_plugin_cas extends auth_plugin_ldap {
}
}
// If Moodle is configured to use a proxy, phpCAS needs some curl options set.
if (!empty($CFG->proxyhost) && !is_proxybypass($this->config->hostname)) {
phpCAS::setExtraCurlOption(CURLOPT_PROXY, $CFG->proxyhost);
if (!empty($CFG->proxyport)) {
phpCAS::setExtraCurlOption(CURLOPT_PROXYPORT, $CFG->proxyport);
}
if (!empty($CFG->proxytype)) {
// Only set CURLOPT_PROXYTYPE if it's something other than the curl-default http
if ($CFG->proxytype == 'SOCKS5') {
phpCAS::setExtraCurlOption(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
}
}
if (!empty($CFG->proxyuser) and !empty($CFG->proxypassword)) {
phpCAS::setExtraCurlOption(CURLOPT_PROXYUSERPWD, $CFG->proxyuser.':'.$CFG->proxypassword);
if (defined('CURLOPT_PROXYAUTH')) {
// any proxy authentication if PHP 5.1
phpCAS::setExtraCurlOption(CURLOPT_PROXYAUTH, CURLAUTH_BASIC | CURLAUTH_NTLM);
}
}
}
if($this->config->certificate_check && $this->config->certificate_path){
phpCAS::setCasServerCACert($this->config->certificate_path);
}else{
+43
View File
@@ -0,0 +1,43 @@
<?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/>.
/**
* CAS authentication plugin upgrade code
*
* @package auth_cas
* @copyright 2013 Iñaki Arenaza
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @param int $oldversion the version we are upgrading from
* @return bool result
*/
function xmldb_auth_cas_upgrade($oldversion) {
// Moodle v2.5.0 release upgrade line
// Put any upgrade step following this
// MDL-39323 New setting in 2.5, make sure it's defined.
if ($oldversion < 2013052100) {
if (get_config('start_tls', 'auth/cas') === false) {
set_config('start_tls', 0, 'auth/cas');
}
upgrade_plugin_savepoint(true, 2013052100, 'auth', 'cas');
}
return true;
}
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013050100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2013052100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2013050100; // Requires this Moodle version
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
+12
View File
@@ -598,6 +598,8 @@ class auth_plugin_ldap extends auth_plugin_base {
if ($user->firstaccess == 0) {
$DB->set_field('user', 'firstaccess', time(), array('id'=>$user->id));
}
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
return AUTH_CONFIRM_OK;
}
} else {
@@ -770,6 +772,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$updateuser->auth = 'nologin';
$DB->update_record('user', $updateuser);
echo "\t"; print_string('auth_dbsuspenduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
}
}
} else {
@@ -795,6 +799,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$updateuser->auth = $this->authtype;
$DB->update_record('user', $updateuser);
echo "\t"; print_string('auth_dbreviveduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
}
} else {
print_string('nouserentriestorevive', 'auth_ldap');
@@ -908,6 +914,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$id = $DB->insert_record('user', $user);
echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $id));
events_trigger('user_created', $euser);
if (!empty($this->config->forcechangepassword)) {
set_user_preference('auth_forcepasswordchange', 1, $id);
}
@@ -978,6 +986,10 @@ class auth_plugin_ldap extends auth_plugin_base {
}
}
}
if (!empty($updatekeys)) {
$euser = $DB->get_record('user', array('id' => $userid));
events_trigger('user_updated', $euser);
}
} else {
return false;
}
+43
View File
@@ -0,0 +1,43 @@
<?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/>.
/**
* LDAP authentication plugin upgrade code
*
* @package auth_ldap
* @copyright 2013 Iñaki Arenaza
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @param int $oldversion the version we are upgrading from
* @return bool result
*/
function xmldb_auth_ldap_upgrade($oldversion) {
// Moodle v2.5.0 release upgrade line
// Put any upgrade step following this
// MDL-39323 New setting in 2.5, make sure it's defined.
if ($oldversion < 2013052100) {
if (get_config('start_tls', 'auth/ldap') === false) {
set_config('start_tls', 0, 'auth/ldap');
}
upgrade_plugin_savepoint(true, 2013052100, 'auth', 'ldap');
}
return true;
}
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013050100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2013052100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2013050100; // Requires this Moodle version
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
+4
View File
@@ -40,5 +40,9 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Put any upgrade step following this
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+4
View File
@@ -40,5 +40,9 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Put any upgrade step following this
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+5 -5
View File
@@ -49,10 +49,10 @@ class behat_auth extends behat_base {
public function i_log_in_as($username) {
return array(new Given('I am on homepage'),
new Given('I follow "Login"'),
new Given('I fill in "Username" with "'.$username.'"'),
new Given('I fill in "Password" with "'.$username.'"'),
new Given('I press "Login"')
new Given('I follow "' . get_string('login') . '"'),
new Given('I fill in "' . get_string('username') . '" with "' . $this->escape($username) . '"'),
new Given('I fill in "' . get_string('password') . '" with "'. $this->escape($username) . '"'),
new Given('I press "' . get_string('login') . '"')
);
}
@@ -62,7 +62,7 @@ class behat_auth extends behat_base {
* @Given /^I log out$/
*/
public function i_log_out() {
return new When('I follow "Logout"');
return new When('I follow "' . get_string('logout') . '"');
}
}
+5
View File
@@ -1,6 +1,11 @@
This files describes API changes in /auth/* - plugins,
information provided here is intended especially for developers.
=== 2.5.2 ===
* can_be_manually_set() - This function was introduced in the base class and returns false by default. If overriden by
an authentication plugin to return true, the authentication plugin will be able to be manually set for users. For example,
when bulk uploading users you will be able to select it as the authentication method they use.
=== 2.4 ===
+1 -1
View File
@@ -109,7 +109,7 @@ abstract class backup implements checksumable {
const OPERATION_RESTORE ='restore';// We are performing one restore
// Version (to keep CFG->backup_version (and release) updated automatically)
const VERSION = 2013050100;
const VERSION = 2013051400;
const RELEASE = '2.5';
}
+19 -4
View File
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -24,16 +23,32 @@
require_once($CFG->libdir.'/formslib.php');
class backup_files_edit_form extends moodleform {
function definition() {
/**
* Form definition.
*/
public function definition() {
$mform =& $this->_form;
$contextid = $this->_customdata['contextid'];
$options = array('subdirs'=>0, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL | FILE_REFERENCE);
$options = array('subdirs' => 0, 'maxfiles' => -1, 'accepted_types' => '*', 'return_types' => FILE_INTERNAL | FILE_REFERENCE);
$mform->addElement('filemanager', 'files_filemanager', get_string('files'), null, $options);
$mform->addElement('hidden', 'contextid', $this->_customdata['contextid']);
$mform->setType('contextid', PARAM_INT);
$mform->addElement('hidden', 'currentcontext', $this->_customdata['currentcontext']);
$mform->setType('currentcontext', PARAM_INT);
$mform->addElement('hidden', 'filearea', $this->_customdata['filearea']);
$mform->setType('filearea', PARAM_AREA);
$mform->addElement('hidden', 'component', $this->_customdata['component']);
$mform->setType('component', PARAM_COMPONENT);
$mform->addElement('hidden', 'returnurl', $this->_customdata['returnurl']);
$mform->setType('returnurl', PARAM_URL);
$this->add_action_buttons(true, get_string('savechanges'));
$this->set_data($this->_customdata['data']);
}
+29 -14
View File
@@ -113,31 +113,46 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
// Mark the UI finished.
$rc->finish_ui();
// Execute prechecks
$warnings = false;
if (!$rc->execute_precheck()) {
$precheckresults = $rc->get_precheck_results();
if (is_array($precheckresults) && !empty($precheckresults['errors'])) {
fulldelete($tempdestination);
if (is_array($precheckresults)) {
if (!empty($precheckresults['errors'])) { // If errors are found, terminate the import.
fulldelete($tempdestination);
echo $OUTPUT->header();
echo $renderer->precheck_notices($precheckresults);
echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id'=>$course->id)));
echo $OUTPUT->footer();
die();
echo $OUTPUT->header();
echo $renderer->precheck_notices($precheckresults);
echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id'=>$course->id)));
echo $OUTPUT->footer();
die();
}
if (!empty($precheckresults['warnings'])) { // If warnings are found, go ahead but display warnings later.
$warnings = $precheckresults['warnings'];
}
}
} else {
if ($restoretarget == backup::TARGET_CURRENT_DELETING || $restoretarget == backup::TARGET_EXISTING_DELETING) {
restore_dbops::delete_course_content($course->id);
}
// Execute the restore
$rc->execute_plan();
}
if ($restoretarget == backup::TARGET_CURRENT_DELETING || $restoretarget == backup::TARGET_EXISTING_DELETING) {
restore_dbops::delete_course_content($course->id);
}
// Execute the restore.
$rc->execute_plan();
// Delete the temp directory now
fulldelete($tempdestination);
// Display a notification and a continue button
echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('importsuccess', 'backup'),'notifysuccess');
if ($warnings) {
echo $OUTPUT->box_start();
echo $OUTPUT->notification(get_string('warning'), 'notifywarning');
echo html_writer::start_tag('ul', array('class'=>'list'));
foreach ($warnings as $warning) {
echo html_writer::tag('li', $warning);
}
echo html_writer::end_tag('ul');
echo $OUTPUT->box_end();
}
echo $OUTPUT->notification(get_string('importsuccess', 'backup'), 'notifysuccess');
echo $OUTPUT->continue_button(new moodle_url('/course/view.php', array('id'=>$course->id)));
echo $OUTPUT->footer();
@@ -92,6 +92,11 @@ class backup_final_task extends backup_task {
// Generate the course completion
$this->add_step(new backup_course_completion_structure_step('course_completion', 'completion.xml'));
// Conditionally generate the badges file.
if ($this->get_setting_value('badges')) {
$this->add_step(new backup_badges_structure_step('course_badges', 'badges.xml'));
}
// Generate the scales file with all the (final) annotated scales
$this->add_step(new backup_final_scales_structure_step('scaleslist', 'scales.xml'));
@@ -122,6 +122,13 @@ class backup_root_task extends backup_task {
$this->add_setting($comments);
$users->add_dependency($comments);
// Define badges (dependent of activities).
$badges = new backup_badges_setting('badges', base_setting::IS_BOOLEAN, true);
$badges->set_ui(new backup_setting_ui_checkbox($badges, get_string('rootsettingbadges', 'backup')));
$this->add_setting($badges);
$activities->add_dependency($badges);
$users->add_dependency($badges);
// Define calendar events (dependent of users)
$events = new backup_calendarevents_setting('calendarevents', base_setting::IS_BOOLEAN, true);
$events->set_ui(new backup_setting_ui_checkbox($events, get_string('rootsettingcalendarevents', 'backup')));
+6
View File
@@ -101,6 +101,12 @@ class backup_logs_setting extends backup_anonymize_setting {}
*/
class backup_comments_setting extends backup_anonymize_setting {}
/**
* root setting to control if backup will include badges or not,
* depends on @backup_activities_setting
*/
class backup_badges_setting extends backup_generic_setting {}
/**
* root setting to control if backup will include
* calender events or no (any level), depends of @backup_users_setting
+77
View File
@@ -812,6 +812,83 @@ class backup_comments_structure_step extends backup_structure_step {
}
}
/**
* structure step in charge of constructing the badges.xml file for all the badges found
* in a given context
*/
class backup_badges_structure_step extends backup_structure_step {
protected function execute_condition() {
// Check that all activities have been included.
if ($this->task->is_excluding_activities()) {
return false;
}
return true;
}
protected function define_structure() {
// Define each element separated.
$badges = new backup_nested_element('badges');
$badge = new backup_nested_element('badge', array('id'), array('name', 'description',
'timecreated', 'timemodified', 'usercreated', 'usermodified', 'issuername',
'issuerurl', 'issuercontact', 'expiredate', 'expireperiod', 'type', 'courseid',
'message', 'messagesubject', 'attachment', 'notification', 'status', 'nextcron'));
$criteria = new backup_nested_element('criteria');
$criterion = new backup_nested_element('criterion', array('id'), array('badgeid',
'criteriatype', 'method'));
$parameters = new backup_nested_element('parameters');
$parameter = new backup_nested_element('parameter', array('id'), array('critid',
'name', 'value', 'criteriatype'));
$manual_awards = new backup_nested_element('manual_awards');
$manual_award = new backup_nested_element('manual_award', array('id'), array('badgeid',
'recipientid', 'issuerid', 'issuerrole', 'datemet'));
// Build the tree.
$badges->add_child($badge);
$badge->add_child($criteria);
$criteria->add_child($criterion);
$criterion->add_child($parameters);
$parameters->add_child($parameter);
$badge->add_child($manual_awards);
$manual_awards->add_child($manual_award);
// Define sources.
$badge->set_source_table('badge', array('courseid' => backup::VAR_COURSEID));
$criterion->set_source_table('badge_criteria', array('badgeid' => backup::VAR_PARENTID));
$parametersql = 'SELECT cp.*, c.criteriatype
FROM {badge_criteria_param} cp JOIN {badge_criteria} c
ON cp.critid = c.id
WHERE critid = :critid';
$parameterparams = array('critid' => backup::VAR_PARENTID);
$parameter->set_source_sql($parametersql, $parameterparams);
$manual_award->set_source_table('badge_manual_award', array('badgeid' => backup::VAR_PARENTID));
// Define id annotations.
$badge->annotate_ids('user', 'usercreated');
$badge->annotate_ids('user', 'usermodified');
$criterion->annotate_ids('badge', 'badgeid');
$parameter->annotate_ids('criterion', 'critid');
$badge->annotate_files('badges', 'badgeimage', 'id');
$manual_award->annotate_ids('badge', 'badgeid');
$manual_award->annotate_ids('user', 'recipientid');
$manual_award->annotate_ids('user', 'issuerid');
$manual_award->annotate_ids('role', 'issuerrole');
// Return the root element ($badges).
return $badges;
}
}
/**
* structure step in charge of constructing the calender.xml file for all the events found
* in a given context
+14 -2
View File
@@ -73,8 +73,20 @@ class restore_course_task extends restore_task {
$this->add_step(new restore_course_legacy_files_step('legacy_files'));
// Restore course enrolments (plugins and membership). Conditionally prevented for any IMPORT/HUB operation
if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
// Deal with enrolment methods and user enrolments.
if ($this->plan->get_mode() == backup::MODE_IMPORT) {
// No need to do anything with enrolments.
} else if (!$this->get_setting_value('users') or $this->plan->get_mode() == backup::MODE_HUB) {
if ($this->get_target() == backup::TARGET_CURRENT_ADDING or $this->get_target() == backup::TARGET_EXISTING_ADDING) {
// Keep current enrolments unchanged.
} else {
// If no instances yet add default enrol methods the same way as when creating new course in UI.
$this->add_step(new restore_default_enrolments_step('default_enrolments'));
}
} else {
// Restore course enrolment data.
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
}
@@ -66,6 +66,11 @@ class restore_final_task extends restore_task {
$this->add_step(new restore_course_completion_structure_step('course_completion', 'completion.xml'));
}
// Conditionally restore course badges.
if ($this->get_setting_value('badges')) {
$this->add_step(new restore_badges_structure_step('course_badges', 'badges.xml'));
}
// Review all the module_availability records in backup_ids in order
// to match them with existing modules / grade items.
$this->add_step(new restore_process_course_modules_availability('process_modules_availability'));
@@ -143,6 +148,9 @@ class restore_final_task extends restore_task {
$rules[] = new restore_log_rule('course', 'report stats', 'report/stats/index.php?id={course}', '{course}');
$rules[] = new restore_log_rule('course', 'view section', 'view.php?id={course}&sectionid={course_section}', '{course_section}');
// module 'grade' rules
$rules[] = new restore_log_rule('grade', 'update', 'report/grader/index.php?id={course}', null);
// module 'user' rules
$rules[] = new restore_log_rule('user', 'view', 'view.php?id={user}&course={course}', '{user}');
$rules[] = new restore_log_rule('user', 'change password', 'view.php?id={user}&course={course}', '{user}');
+24 -18
View File
@@ -35,6 +35,18 @@ defined('MOODLE_INTERNAL') || die();
*/
abstract class restore_qtype_plugin extends restore_plugin {
/*
* A simple answer to id cache for a single questions answers.
* @var array
*/
private $questionanswercache = array();
/*
* The id of the current question in the questionanswercache.
* @var int
*/
private $questionanswercacheid = null;
/**
* Add to $paths the restore_path_elements needed
* to handle question_answers for a given question
@@ -147,38 +159,32 @@ abstract class restore_qtype_plugin extends restore_plugin {
// The question existed, we need to map the existing question_answers
} else {
// Look in question_answers by answertext matching
$sql = 'SELECT id
FROM {question_answers}
WHERE question = ?
AND ' . $DB->sql_compare_text('answer', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$params = array($newquestionid, $data->answertext);
$newitemid = $DB->get_field_sql($sql, $params);
// Not able to find the answer, let's try cleaning the answertext
// of all the question answers in DB as slower fallback. MDL-30018.
if (!$newitemid) {
// Have we cached the current question?
if ($this->questionanswercacheid !== $newquestionid) {
// The question changed, purge and start again!
$this->questionanswercache = array();
$params = array('question' => $newquestionid);
$answers = $DB->get_records('question_answers', $params, '', 'id, answer');
$this->questionanswercacheid = $newquestionid;
// Cache all cleaned answers for a simple text match.
foreach ($answers as $answer) {
// Clean in the same way than {@link xml_writer::xml_safe_utf8()}.
// MDL-30018: Clean in the same way as {@link xml_writer::xml_safe_utf8()}.
$clean = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is','', $answer->answer); // Clean CTRL chars.
$clean = preg_replace("/\r\n|\r/", "\n", $clean); // Normalize line ending.
if ($clean === $data->answertext) {
$newitemid = $data->id;
}
$this->questionanswercache[$clean] = $answer->id;
}
}
// If we haven't found the newitemid, something has gone really wrong, question in DB
// is missing answers, exception
if (!$newitemid) {
if (!isset($this->questionanswercache[$data->answertext])) {
// If we haven't found the matching answer, something has gone really wrong, the question in the DB
// is missing answers, throw an exception.
$info = new stdClass();
$info->filequestionid = $oldquestionid;
$info->dbquestionid = $newquestionid;
$info->answer = $data->answertext;
throw new restore_step_exception('error_question_answers_missing_in_db', $info);
}
$newitemid = $this->questionanswercache[$data->answertext];
}
// Create mapping (we'll use this intensively when restoring question_states. And also answerfeedback files)
$this->set_mapping('question_answer', $oldid, $newitemid);
@@ -115,6 +115,7 @@ class restore_root_task extends restore_task {
$rootenrolmanual = new restore_users_setting('enrol_migratetomanual', base_setting::IS_BOOLEAN, false);
$rootenrolmanual->set_ui(new backup_setting_ui_checkbox($rootenrolmanual, get_string('rootenrolmanual', 'backup')));
$rootenrolmanual->get_ui()->set_changeable(enrol_is_enabled('manual'));
$rootenrolmanual->get_ui()->set_changeable($changeable);
$this->add_setting($rootenrolmanual);
$users->add_dependency($rootenrolmanual);
@@ -180,6 +181,20 @@ class restore_root_task extends restore_task {
$this->add_setting($comments);
$users->add_dependency($comments);
// Define badges (dependent of activities).
$defaultvalue = false; // Safer default.
$changeable = false;
if (isset($rootsettings['badges']) && $rootsettings['badges']) { // Only enabled when available.
$defaultvalue = true;
$changeable = true;
}
$badges = new restore_badges_setting('badges', base_setting::IS_BOOLEAN, $defaultvalue);
$badges->set_ui(new backup_setting_ui_checkbox($badges, get_string('rootsettingbadges', 'backup')));
$badges->get_ui()->set_changeable($changeable);
$this->add_setting($badges);
$activities->add_dependency($badges);
$users->add_dependency($badges);
// Define Calendar events (dependent of users)
$defaultvalue = false; // Safer default
$changeable = false;
+6
View File
@@ -63,6 +63,12 @@ class restore_activities_setting extends restore_generic_setting {}
*/
class restore_comments_setting extends restore_role_assignments_setting {}
/**
* root setting to control if restore will create badges or not,
* depends on @restore_activities_setting
*/
class restore_badges_setting extends restore_generic_setting {}
/**
* root setting to control if restore will create
* events or no, depends of @restore_users_setting
+198 -1
View File
@@ -477,6 +477,8 @@ class restore_rebuild_course_cache extends restore_execution_step {
// Rebuild cache now that all sections are in place
rebuild_course_cache($this->get_courseid());
cache_helper::purge_by_event('changesincourse');
cache_helper::purge_by_event('changesincoursecat');
}
}
@@ -631,7 +633,7 @@ class restore_load_included_files extends restore_structure_step {
// TODO: qtype_xxx should be replaced by proper backup_qtype_plugin::get_components_and_fileareas() use,
// but then we'll need to change it to load plugins itself (because this is executed too early in restore)
$isfileref = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'fileref', $data->id);
$iscomponent = ($data->component == 'user' || $data->component == 'group' ||
$iscomponent = ($data->component == 'user' || $data->component == 'group' || $data->component == 'badges' ||
$data->component == 'grouping' || $data->component == 'grade' ||
$data->component == 'question' || substr($data->component, 0, 5) == 'qtype');
if ($isfileref || $iscomponent) {
@@ -1623,6 +1625,29 @@ class restore_ras_and_caps_structure_step extends restore_structure_step {
}
}
/**
* If no instances yet add default enrol methods the same way as when creating new course in UI.
*/
class restore_default_enrolments_step extends restore_execution_step {
public function define_execution() {
global $DB;
$course = $DB->get_record('course', array('id'=>$this->get_courseid()), '*', MUST_EXIST);
if ($DB->record_exists('enrol', array('courseid'=>$this->get_courseid(), 'enrol'=>'manual'))) {
// Something already added instances, do not add default instances.
$plugins = enrol_get_plugins(true);
foreach ($plugins as $plugin) {
$plugin->restore_sync_course($course);
}
} else {
// Looks like a newly created course.
enrol_course_updated(true, $course, null);
}
}
}
/**
* This structure steps restores the enrol plugins and their underlying
* enrolments, performing all the mappings and/or movements required
@@ -1930,6 +1955,178 @@ class restore_comments_structure_step extends restore_structure_step {
}
}
/**
* This structure steps restores the badges and their configs
*/
class restore_badges_structure_step extends restore_structure_step {
/**
* Conditionally decide if this step should be executed.
*
* This function checks the following parameters:
*
* 1. Badges and course badges are enabled on the site.
* 2. The course/badges.xml file exists.
* 3. All modules are restorable.
* 4. All modules are marked for restore.
*
* @return bool True is safe to execute, false otherwise
*/
protected function execute_condition() {
global $CFG;
// First check is badges and course level badges are enabled on this site.
if (empty($CFG->enablebadges) || empty($CFG->badges_allowcoursebadges)) {
// Disabled, don't restore course badges.
return false;
}
// Check if badges.xml is included in the backup.
$fullpath = $this->task->get_taskbasepath();
$fullpath = rtrim($fullpath, '/') . '/' . $this->filename;
if (!file_exists($fullpath)) {
// Not found, can't restore course badges.
return false;
}
// Check we are able to restore all backed up modules.
if ($this->task->is_missing_modules()) {
return false;
}
// Finally check all modules within the backup are being restored.
if ($this->task->is_excluding_activities()) {
return false;
}
return true;
}
protected function define_structure() {
$paths = array();
$paths[] = new restore_path_element('badge', '/badges/badge');
$paths[] = new restore_path_element('criterion', '/badges/badge/criteria/criterion');
$paths[] = new restore_path_element('parameter', '/badges/badge/criteria/criterion/parameters/parameter');
$paths[] = new restore_path_element('manual_award', '/badges/badge/manual_awards/manual_award');
return $paths;
}
public function process_badge($data) {
global $DB, $CFG;
require_once($CFG->libdir . '/badgeslib.php');
$data = (object)$data;
$data->usercreated = $this->get_mappingid('user', $data->usercreated);
$data->usermodified = $this->get_mappingid('user', $data->usermodified);
// We'll restore the badge image.
$restorefiles = true;
$courseid = $this->get_courseid();
$params = array(
'name' => $data->name,
'description' => $data->description,
'image' => 0,
'timecreated' => $this->apply_date_offset($data->timecreated),
'timemodified' => $this->apply_date_offset($data->timemodified),
'usercreated' => $data->usercreated,
'usermodified' => $data->usermodified,
'issuername' => $data->issuername,
'issuerurl' => $data->issuerurl,
'issuercontact' => $data->issuercontact,
'expiredate' => $this->apply_date_offset($data->expiredate),
'expireperiod' => $data->expireperiod,
'type' => BADGE_TYPE_COURSE,
'courseid' => $courseid,
'message' => $data->message,
'messagesubject' => $data->messagesubject,
'attachment' => $data->attachment,
'notification' => $data->notification,
'status' => BADGE_STATUS_INACTIVE,
'nextcron' => $this->apply_date_offset($data->nextcron)
);
$newid = $DB->insert_record('badge', $params);
$this->set_mapping('badge', $data->id, $newid, $restorefiles);
}
public function process_criterion($data) {
global $DB;
$data = (object)$data;
$params = array(
'badgeid' => $this->get_new_parentid('badge'),
'criteriatype' => $data->criteriatype,
'method' => $data->method
);
$newid = $DB->insert_record('badge_criteria', $params);
$this->set_mapping('criterion', $data->id, $newid);
}
public function process_parameter($data) {
global $DB, $CFG;
require_once($CFG->libdir . '/badgeslib.php');
$data = (object)$data;
$criteriaid = $this->get_new_parentid('criterion');
// Parameter array that will go to database.
$params = array();
$params['critid'] = $criteriaid;
$oldparam = explode('_', $data->name);
if ($data->criteriatype == BADGE_CRITERIA_TYPE_ACTIVITY) {
$module = $this->get_mappingid('course_module', $oldparam[1]);
$params['name'] = $oldparam[0] . '_' . $module;
$params['value'] = $oldparam[0] == 'module' ? $module : $data->value;
} else if ($data->criteriatype == BADGE_CRITERIA_TYPE_COURSE) {
$params['name'] = $oldparam[0] . '_' . $this->get_courseid();
$params['value'] = $oldparam[0] == 'course' ? $this->get_courseid() : $data->value;
} else if ($data->criteriatype == BADGE_CRITERIA_TYPE_MANUAL) {
$role = $this->get_mappingid('role', $data->value);
if (!empty($role)) {
$params['name'] = 'role_' . $role;
$params['value'] = $role;
} else {
return;
}
}
if (!$DB->record_exists('badge_criteria_param', $params)) {
$DB->insert_record('badge_criteria_param', $params);
}
}
public function process_manual_award($data) {
global $DB;
$data = (object)$data;
$role = $this->get_mappingid('role', $data->issuerrole);
if (!empty($role)) {
$award = array(
'badgeid' => $this->get_new_parentid('badge'),
'recipientid' => $this->get_mappingid('user', $data->recipientid),
'issuerid' => $this->get_mappingid('user', $data->issuerid),
'issuerrole' => $role,
'datemet' => $this->apply_date_offset($data->datemet)
);
$DB->insert_record('badge_manual_award', $award);
}
}
protected function after_execute() {
// Add related files.
$this->add_related_files('badges', 'badgeimage', 'badge');
}
}
/**
* This structure steps restores the calendar events
*/
@@ -483,6 +483,7 @@ abstract class backup_controller_dbops extends backup_dbops {
'backup_general_blocks' => 'blocks',
'backup_general_filters' => 'filters',
'backup_general_comments' => 'comments',
'backup_general_badges' => 'badges',
'backup_general_userscompletion' => 'userscompletion',
'backup_general_logs' => 'logs',
'backup_general_histories' => 'grade_histories'
+13 -6
View File
@@ -614,13 +614,20 @@ abstract class restore_dbops {
} else {
self::set_backup_ids_record($restoreid, 'question_category', $category->id, $matchcat->id, $targetcontext->id);
$questions = self::restore_get_questions($restoreid, $category->id);
// Collect all the questions for this category into memory so we only talk to the DB once.
$questioncache = $DB->get_records_sql_menu("SELECT ".$DB->sql_concat('stamp', "' '", 'version').", id
FROM {question}
WHERE category = ?", array($matchcat->id));
foreach ($questions as $question) {
$matchq = $DB->get_record('question', array(
'category' => $matchcat->id,
'stamp' => $question->stamp,
'version' => $question->version));
if (isset($questioncache[$question->stamp." ".$question->version])) {
$matchqid = $questioncache[$question->stamp." ".$question->version];
} else {
$matchqid = false;
}
// 5a) No match, check if user can add q
if (!$matchq) {
if (!$matchqid) {
// 6a) User can, mark the q to be created
if ($canadd) {
// Nothing to mark, newitemid means create
@@ -645,7 +652,7 @@ abstract class restore_dbops {
// 5b) Match, mark q to be mapped
} else {
self::set_backup_ids_record($restoreid, 'question', $question->id, $matchq->id);
self::set_backup_ids_record($restoreid, 'question', $question->id, $matchqid);
}
}
}
@@ -26,101 +26,6 @@ defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
/**
* Restore dbops tests (all).
*/
class restore_dbops_testcase extends advanced_testcase {
/**
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
*
* Note that those private implementations are tested here by using the public
* backup_ids API and later performing low-level tests.
*/
public function test_backup_ids_cached() {
global $DB;
$dbman = $DB->get_manager(); // We are going to use database_manager services.
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
// Some variables and objects for testing.
$restoreid = 'testrestoreid';
$mapping = new stdClass();
$mapping->itemname = 'user';
$mapping->itemid = 1;
$mapping->newitemid = 2;
$mapping->parentitemid = 3;
$mapping->info = 'info';
// Create the backup_ids temp tables used by restore.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with defaults.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
$dbman->drop_table(new xmldb_table('backup_files_temp'));
// Verify the mapping continues returning the same info,
// now from cache (the table does not exist).
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Recreate the temp table, just to drop it using the restore API in
// order to check that, then, the cache becomes invalid for the same request.
restore_controller_dbops::create_restore_temp_tables($restoreid);
restore_controller_dbops::drop_restore_temp_tables($restoreid);
// No cached info anymore, so the mapping request will arrive to
// DB leading to error (temp table does not exist).
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
// Create the backup_ids temp tables once more.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with complete values.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame($mapping->newitemid, $result->newitemid);
$this->assertSame($mapping->parentitemid, $result->parentitemid);
$this->assertSame($mapping->info, $result->info);
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
restore_controller_dbops::drop_restore_temp_tables($restoreid);
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
}
}
/**
* Backup dbops tests (all).
@@ -0,0 +1,122 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package core_backup
* @category phpunit
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
/**
* Restore dbops tests (all).
*/
class restore_dbops_testcase extends advanced_testcase {
/**
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
*
* Note that those private implementations are tested here by using the public
* backup_ids API and later performing low-level tests.
*/
public function test_backup_ids_cached() {
global $DB;
$dbman = $DB->get_manager(); // We are going to use database_manager services.
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
// Some variables and objects for testing.
$restoreid = 'testrestoreid';
$mapping = new stdClass();
$mapping->itemname = 'user';
$mapping->itemid = 1;
$mapping->newitemid = 2;
$mapping->parentitemid = 3;
$mapping->info = 'info';
// Create the backup_ids temp tables used by restore.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with defaults.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
$dbman->drop_table(new xmldb_table('backup_files_temp'));
// Verify the mapping continues returning the same info,
// now from cache (the table does not exist).
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Recreate the temp table, just to drop it using the restore API in
// order to check that, then, the cache becomes invalid for the same request.
restore_controller_dbops::create_restore_temp_tables($restoreid);
restore_controller_dbops::drop_restore_temp_tables($restoreid);
// No cached info anymore, so the mapping request will arrive to
// DB leading to error (temp table does not exist).
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
// Create the backup_ids temp tables once more.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with complete values.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame($mapping->newitemid, $result->newitemid);
$this->assertSame($mapping->parentitemid, $result->parentitemid);
$this->assertSame($mapping->info, $result->info);
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
restore_controller_dbops::drop_restore_temp_tables($restoreid);
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
}
}
@@ -383,6 +383,7 @@ abstract class backup_cron_automated_helper {
'blocks' => 'backup_auto_blocks',
'filters' => 'backup_auto_filters',
'comments' => 'backup_auto_comments',
'badges' => 'backup_auto_badges',
'completion_information' => 'backup_auto_userscompletion',
'logs' => 'backup_auto_logs',
'histories' => 'backup_auto_histories'
@@ -59,7 +59,13 @@ class database_logger extends base_logger {
if ($this->levelcol) {
$columns[$this->levelcol] = $level;
}
$columns[$this->messagecol] = $message; //TODO: should this be cleaned?
$message = clean_param($message, PARAM_NOTAGS);
// Check if the message exceeds the 255 character limit in the database,
// if it does, shorten it so that it can be inserted successfully.
if (textlib::strlen($message) > 255) {
$message = textlib::substr($message, 0, 252) . '...';
}
$columns[$this->messagecol] = $message;
return $this->insert_log_record($this->logtable, $columns);
}
@@ -69,6 +75,6 @@ class database_logger extends base_logger {
// to preserve DB logs if the whole backup/restore transaction is
// rollback
global $DB;
return $DB->insert_record($this->logtable, $columns, false); // Don't return inserted id
return $DB->insert_record($table, $columns, false); // Don't return inserted id
}
}
@@ -69,7 +69,7 @@ class backup_base_optigroup_testcase extends basic_testcase {
/**
* Incorrect creation tests (attributes and final elements)
*/
function itest_wrong_creation() {
function test_wrong_creation() {
// Create instance with invalid name
try {
+1 -1
View File
@@ -140,7 +140,7 @@ class core_backup_renderer extends plugin_renderer_base {
}
if (empty($table)) {
$table = new html_table();
$table->head = array('Module', 'Title', 'Userinfo');
$table->head = array(get_string('module','backup'), get_string('title','backup'), get_string('userinfo','backup'));
$table->colclasses = array('modulename', 'moduletitle', 'userinfoincluded');
$table->align = array('left','left', 'center');
$table->attributes = array('class'=>'activitytable generaltable');
@@ -13,8 +13,9 @@ Feature: Backup Moodle courses
@javascript
Scenario: Backup a course providing options
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
Then I should see "Restore"
And I click on "Restore" "link" in the ".backup-files-table" "css_element"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should see "URL of backup"
And I should see "Anonymize user information"
@@ -27,11 +28,11 @@ Feature: Backup Moodle courses
| setting_section_section_5_userinfo | 0 |
| setting_section_section_5_included | 0 |
Then I should see "Restore"
And I click on "Restore" "link" in the ".backup-files-table" "css_element"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should not see "Section 3"
And I press "Continue"
And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
And I click on "//div[contains(concat(' ', @class, ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element"
And I click on "setting_root_logs" "checkbox" in the "//div[contains(@class, 'fitem')][contains(., 'Include course logs')]" "xpath_element"
And "//div[contains(concat(' ', normalize-space(@class), ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element" should exists
And I check "Include course logs"
And I press "Cancel"
And I click on "Cancel" "button" in the ".confirmation-dialogue" "css_element"
And I click on "Cancel" "button" in the "Cancel backup" "dialogue"
+47 -34
View File
@@ -61,25 +61,25 @@ class behat_backup extends behat_base {
$this->find_link($backupcourse)->click();
// Click the backup link.
$this->find_link('Backup')->click();
$this->find_link(get_string('backup'))->click();
// Initial settings.
$this->fill_backup_restore_form($options);
$this->find_button('Next')->press();
$this->find_button(get_string('backupstage1action', 'backup'))->press();
// Schema settings.
$this->fill_backup_restore_form($options);
$this->find_button('Next')->press();
$this->find_button(get_string('backupstage2action', 'backup'))->press();
// Confirmation and review, backup filename can also be specified.
$this->fill_backup_restore_form($options);
$this->find_button('Perform backup')->press();
$this->find_button(get_string('backupstage4action', 'backup'))->press();
// Waiting for it to finish.
$this->wait(10);
// Last backup continue button.
$this->find_button('Continue')->press();
$this->find_button(get_string('backupstage16action', 'backup'))->press();
}
/**
@@ -105,36 +105,37 @@ class behat_backup extends behat_base {
// Click the course link.
$this->find_link($tocourse)->click();
// Click the backup link.
$this->find_link('Import')->click();
// Click the import link.
$this->find_link(get_string('import'))->click();
// Select the course.
$exception = new ExpectationException('"' . $fromcourse . '" course not found in the list of courses to import from', $this->getSession());
$fromcourse = str_replace("'", "\'", $fromcourse);
$xpath = "//div[contains(concat(' ', @class, ' '), ' ics-results ')]" .
"/descendant::tr[contains(., '" . $fromcourse . "')]" .
// The argument should be converted to an xpath literal.
$fromcourse = $this->getSession()->getSelectorsHandler()->xpathLiteral($fromcourse);
$xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' ics-results ')]" .
"/descendant::tr[contains(., $fromcourse)]" .
"/descendant::input[@type='radio']";
$radionode = $this->find('xpath', $xpath, $exception);
$radionode->check();
$radionode->click();
$this->find_button('Continue')->press();
$this->find_button(get_string('continue'))->press();
// Initial settings.
$this->fill_backup_restore_form($options);
$this->find_button('Next')->press();
$this->find_button(get_string('importbackupstage1action', 'backup'))->press();
// Schema settings.
$this->fill_backup_restore_form($options);
$this->find_button('Next')->press();
$this->find_button(get_string('importbackupstage2action', 'backup'))->press();
// Run it.
$this->find_button('Perform import')->press();
$this->find_button(get_string('importbackupstage4action', 'backup'))->press();
$this->wait();
// Continue and redirect to 'to' course.
$this->find_button('Continue')->press();
$this->find_button(get_string('continue'))->press();
}
/**
@@ -150,17 +151,20 @@ class behat_backup extends behat_base {
// Confirm restore.
$this->select_backup($backupfilename);
// The argument should be converted to an xpath literal.
$existingcourse = $this->getSession()->getSelectorsHandler()->xpathLiteral($existingcourse);
// Selecting the specified course (we can not call behat_forms::select_radio here as is in another behat subcontext).
$existingcourse = str_replace("'", "\'", $existingcourse);
$radionode = $this->find('xpath', "//div[contains(@class, 'bcs-existing-course')]" .
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-existing-course ')]" .
"/descendant::div[@class='restore-course-search']" .
"/descendant::tr[contains(., '" . $existingcourse . "')]" .
"/descendant::tr[contains(., $existingcourse)]" .
"/descendant::input[@type='radio']");
$radionode->check();
$radionode->click();
// Pressing the continue button of the restore into an existing course section.
$continuenode = $this->find('xpath', "//div[contains(@class, 'bcs-existing-course')]/descendant::input[@type='submit'][@value='Continue']");
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-existing-course ')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
@@ -181,14 +185,15 @@ class behat_backup extends behat_base {
$this->select_backup($backupfilename);
// The first category in the list.
$radionode = $this->find('xpath', "//div[contains(@class, 'bcs-new-course')]" .
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-new-course ')]" .
"/descendant::div[@class='restore-course-search']" .
"/descendant::input[@type='radio']");
$radionode->check();
$radionode->click();
// Pressing the continue button of the restore into an existing course section.
$continuenode = $this->find('xpath', "//div[contains(@class, 'bcs-new-course')]/descendant::input[@type='submit'][@value='Continue']");
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), ' bcs-new-course ')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
@@ -209,14 +214,14 @@ class behat_backup extends behat_base {
$this->select_backup($backupfilename);
// Merge without deleting radio option.
$radionode = $this->find('xpath', "//div[contains(@class, 'bcs-current-course')]" .
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='radio'][@name='target'][@value='1']");
$radionode->check();
$radionode->click();
// Pressing the continue button of the restore merging section.
$continuenode = $this->find('xpath', "//div[contains(@class, 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='Continue']");
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
@@ -237,14 +242,14 @@ class behat_backup extends behat_base {
$this->select_backup($backupfilename);
// Delete contents radio option.
$radionode = $this->find('xpath', "//div[contains(@class, 'bcs-current-course')]" .
$radionode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='radio'][@name='target'][@value='0']");
$radionode->check();
$radionode->click();
// Pressing the continue button of the restore merging section.
$continuenode = $this->find('xpath', "//div[contains(@class, 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='Continue']");
$continuenode = $this->find('xpath', "//div[contains(concat(' ', normalize-space(@class), ' '), 'bcs-current-course')]" .
"/descendant::input[@type='submit'][@value='" . get_string('continue') . "']");
$continuenode->click();
$this->wait();
@@ -263,12 +268,16 @@ class behat_backup extends behat_base {
// Using xpath as there are other restore links before this one.
$exception = new ExpectationException('The "' . $backupfilename . '" backup file can not be found in this page', $this->getSession());
$xpath = "//tr[contains(., '" . $backupfilename . "')]/descendant::a[contains(., 'Restore')]";
// The argument should be converted to an xpath literal.
$backupfilename = $this->getSession()->getSelectorsHandler()->xpathLiteral($backupfilename);
$xpath = "//tr[contains(., $backupfilename)]/descendant::a[contains(., '" . get_string('restore') . "')]";
$restorelink = $this->find('xpath', $xpath, $exception);
$restorelink->click();
// Confirm the backup contents.
$restore = $this->find_button('Continue')->press();
$restore = $this->find_button(get_string('continue'))->press();
}
/**
@@ -284,18 +293,18 @@ class behat_backup extends behat_base {
// Settings.
$this->fill_backup_restore_form($options);
$this->find_button('Next')->press();
$this->find_button(get_string('restorestage4action', 'backup'))->press();
// Schema.
$this->fill_backup_restore_form($options);
$this->find_button('Next')->press();
$this->find_button(get_string('restorestage8action', 'backup'))->press();
// Review, no options here.
$this->find_button('Perform restore')->press();
$this->find_button(get_string('restorestage16action', 'backup'))->press();
$this->wait(10);
// Last restore continue button, redirected to restore course after this.
$this->find_button('Continue')->press();
$this->find_button(get_string('restorestage32action', 'backup'))->press();
}
/**
@@ -322,7 +331,7 @@ class behat_backup extends behat_base {
try {
$fieldnode = $this->find_field($locator);
$field = behat_field_manager::get_field($fieldnode, $locator, $this->getSession());
$field = behat_field_manager::get_form_field($fieldnode, $this->getSession());
$field->set_value($value);
} catch (ElementNotFoundException $e) {
@@ -339,6 +348,10 @@ class behat_backup extends behat_base {
*/
protected function wait($timeout = false) {
if (!$this->running_javascript()) {
return;
}
if (!$timeout) {
$timeout = self::TIMEOUT;
}
@@ -43,6 +43,18 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
protected $groupedpaths; // Paths we are requesting grouped
protected $currentdata; // Where we'll be acummulating data
/**
* Keep cache of parent directory paths for XML parsing.
* @var array
*/
protected $parentcache = array();
/**
* Remaining space for parent directory paths.
* @var integer
*/
protected $parentcacheavailablesize = 2048;
public function __construct(array $paths = array()) {
$this->groupedpaths = array();
$this->currentdata = null;
@@ -65,7 +77,7 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
$a->child = $found;
throw new progressive_parser_exception('xml_grouped_child_found', $a);
}
$this->groupedpaths[] = $path;
$this->groupedpaths[$path] = true;
}
parent::add_path($path);
}
@@ -141,7 +153,7 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
}
protected function path_is_grouped($path) {
return in_array($path, $this->groupedpaths);
return isset($this->groupedpaths[$path]);
}
/**
@@ -150,16 +162,41 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
* false if not
*/
protected function grouped_parent_exists($path) {
$parentpath = progressive_parser::dirname($path);
$parentpath = $this->get_parent_path($path);
while ($parentpath != '/') {
if ($this->path_is_grouped($parentpath)) {
return $parentpath;
}
$parentpath = progressive_parser::dirname($parentpath);
$parentpath = $this->get_parent_path($parentpath);
}
return false;
}
/**
* Get the parent path using a local cache for performance.
*
* @param $path string The pathname you wish to obtain the parent name for.
* @return string The parent pathname.
*/
protected function get_parent_path($path) {
if (!isset($this->parentcache[$path])) {
$this->parentcache[$path] = progressive_parser::dirname($path);
$this->parentcacheavailablesize--;
if ($this->parentcacheavailablesize < 0) {
// Older first is cheaper than LRU. We use 10% as items are grouped together and the large quiz
// restore from MDL-40585 used only 600 parent paths. This is an XML heirarchy, so common paths
// are grouped near each other. eg; /question_bank/question_category/question/element. After keeping
// question_bank paths in the cache when we move to another area and the question_bank cache is not
// useful any longer.
$this->parentcache = array_slice($this->parentcache, 200, null, true);
$this->parentcacheavailablesize += 200;
}
}
return $this->parentcache[$path];
}
/**
* Function that will look for any grouped
* child for the given path, returning it if found,
@@ -167,7 +204,7 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
*/
protected function grouped_child_exists($path) {
$childpath = $path . '/';
foreach ($this->groupedpaths as $groupedpath) {
foreach ($this->groupedpaths as $groupedpath => $set) {
if (strpos($groupedpath, $childpath) === 0) {
return $groupedpath;
}
+24 -15
View File
@@ -89,22 +89,31 @@ if (count($acceptedroles) > 1) {
$roleids = array_map(create_function('$o', 'return $o->roleid;'), $roles);
$selection = array_intersect($acceptedroles, $roleids);
}
list($usertest, $userparams) = $DB->get_in_or_equal($selection, SQL_PARAMS_NAMED, 'existing', true);
$options = $DB->get_records_sql('SELECT * FROM {role} WHERE id ' . $usertest, $userparams);
foreach ($options as $p) {
$select[$p->id] = role_get_name($p);
}
if (!$role) {
$pageurl = new moodle_url('/badges/award.php', array('id' => $badgeid));
if (!empty($selection)) {
list($usertest, $userparams) = $DB->get_in_or_equal($selection, SQL_PARAMS_NAMED, 'existing', true);
$options = $DB->get_records_sql('SELECT * FROM {role} WHERE id ' . $usertest, $userparams);
foreach ($options as $p) {
$select[$p->id] = role_get_name($p);
}
if (!$role) {
$pageurl = new moodle_url('/badges/award.php', array('id' => $badgeid));
echo $OUTPUT->header();
echo $OUTPUT->box(get_string('selectaward', 'badges') . $OUTPUT->single_select(new moodle_url($pageurl), 'role', $select));
echo $OUTPUT->footer();
die();
} else {
$pageurl = new moodle_url('/badges/award.php', array('id' => $badgeid));
$issuerrole = new stdClass();
$issuerrole->roleid = $role;
$roleselect = get_string('selectaward', 'badges') . $OUTPUT->single_select(new moodle_url($pageurl), 'role', $select, $role);
}
} else {
echo $OUTPUT->header();
echo $OUTPUT->box(get_string('selectaward', 'badges') . $OUTPUT->single_select(new moodle_url($pageurl), 'role', $select));
$return = html_writer::link(new moodle_url('recipients.php', array('id' => $badge->id)), $strrecipients);
echo $OUTPUT->notification(get_string('notacceptedrole', 'badges', $return));
echo $OUTPUT->footer();
die();
} else {
$pageurl = new moodle_url('/badges/award.php', array('id' => $badgeid));
$issuerrole = new stdClass();
$issuerrole->roleid = $role;
$roleselect = get_string('selectaward', 'badges') . $OUTPUT->single_select(new moodle_url($pageurl), 'role', $select, $role);
}
} else {
// User has to be an admin or the one with the required role.
@@ -112,8 +121,8 @@ if (count($acceptedroles) > 1) {
$usersids = array_keys($users);
if (!$isadmin && !in_array($USER->id, $usersids)) {
echo $OUTPUT->header();
$rlink = html_writer::link(new moodle_url('recipients.php', array('id' => $badge->id)), get_string('recipients', 'badges'));
echo $OUTPUT->notification(get_string('notacceptedrole', 'badges', $rlink));
$return = html_writer::link(new moodle_url('recipients.php', array('id' => $badge->id)), $strrecipients);
echo $OUTPUT->notification(get_string('notacceptedrole', 'badges', $return));
echo $OUTPUT->footer();
die();
} else {
+14 -1
View File
@@ -2,7 +2,20 @@
* Push badges to backpack.
*/
function addtobackpack(event, args) {
OpenBadges.issue([args.assertion], function(errors, successes) { });
var badgetable = Y.one('#issued-badge-table');
var errordiv = Y.one('#addtobackpack-error');
var errortext = M.util.get_string('error:backpackproblem', 'badges');
var errorhtml = '<div id="addtobackpack-error" class="box boxaligncenter notifyproblem">' + errortext + '</div>';
if (typeof OpenBadges !== 'undefined') {
OpenBadges.issue([args.assertion], function(errors, successes) { });
} else {
// Add error div if it doesn't exist yet.
if (!errordiv) {
var badgerror = Y.Node.create(errorhtml);
badgetable.insert(badgerror, 'before');
}
}
}
/**
+2 -4
View File
@@ -56,10 +56,8 @@ if (isloggedin()) {
navigation_node::override_active_url($url);
}
// TODO: Better way of pushing badges to Mozilla backpack?
if (!empty($CFG->badges_allowexternalbackpack)) {
$PAGE->requires->js(new moodle_url('http://backpack.openbadges.org/issuer.js'), true);
}
// Include JS files for backpack support.
badges_setup_backpack_js();
echo $OUTPUT->header();
+1
View File
@@ -168,6 +168,7 @@ abstract class award_criteria {
if (in_array('grade', $this->optional_params)) {
$parameter[] =& $mform->createElement('static', 'mgrade_' . $param['id'], null, get_string('mingrade', 'badges'));
$parameter[] =& $mform->createElement('text', 'grade_' . $param['id'], '', array('size' => '5'));
$mform->setType('grade_' . $param['id'], PARAM_INT);
}
if (in_array('bydate', $this->optional_params)) {
@@ -119,6 +119,7 @@ class award_criteria_course extends award_criteria {
$parameter[] =& $mform->createElement('text', 'grade_' . $param['course'], '', array('size' => '5'));
$parameter[] =& $mform->createElement('static', 'complby_' . $param['course'], null, get_string('bydate', 'badges'));
$parameter[] =& $mform->createElement('date_selector', 'bydate_' . $param['course'], '', array('optional' => true));
$mform->setType('grade_' . $param['course'], PARAM_INT);
$mform->addGroup($parameter, 'param_' . $param['course'], '', array(' '), false);
$mform->disabledIf('bydate_' . $param['course'] . '[day]', 'bydate_' . $param['course'] . '[enabled]', 'notchecked');
+48 -3
View File
@@ -27,14 +27,59 @@
require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir . '/badgeslib.php');
$json = required_param('badge', PARAM_RAW);
$json = optional_param('badge', null, PARAM_RAW);
// Redirect to homepage if users are trying to access external badge through old url.
if ($json) {
redirect($CFG->wwwroot, get_string('invalidrequest', 'error'), 3);
}
$hash = required_param('hash', PARAM_ALPHANUM);
$userid = required_param('user', PARAM_INT);
$PAGE->set_url(new moodle_url('/badges/external.php', array('hash' => $hash, 'user' => $userid)));
// Using the same setting as user profile page.
if (!empty($CFG->forceloginforprofiles)) {
require_login();
if (isguestuser()) {
$SESSION->wantsurl = $PAGE->url->out(false);
redirect(get_login_url());
}
} else if (!empty($CFG->forcelogin)) {
require_login();
}
// Get all external badges of a user.
$out = get_backpack_settings($userid);
// If we didn't find any badges then print an error.
if (is_null($out)) {
print_error('error:externalbadgedoesntexist', 'badges');
}
$badges = $out->badges;
// The variable to store the badge we want.
$badge = '';
// Loop through the badges and check if supplied badge hash exists in user external badges.
foreach ($badges as $b) {
if ($hash == hash("md5", $b->hostedUrl)) {
$badge = $b;
break;
}
}
// If we didn't find the badge a user might be trying to replace the userid parameter.
if (empty($badge)) {
print_error('error:externalbadgedoesntexist', 'badges');
}
$PAGE->set_context(context_system::instance());
$output = $PAGE->get_renderer('core', 'badges');
$badge = new external_badge(unserialize($json));
$badge = new external_badge($badge, $userid);
$PAGE->set_url('/badges/external.php');
$PAGE->set_pagelayout('base');
$PAGE->set_title(get_string('issuedbadge', 'badges'));
+4 -1
View File
@@ -191,8 +191,11 @@ if ($totalcount) {
echo $output->render($badges);
} else {
echo $output->notification(get_string('nobadges', 'badges'));
echo $OUTPUT->single_button(new moodle_url('newbadge.php', array('type' => $type, 'id' => $courseid)),
if (has_capability('moodle/badges:createbadge', $PAGE->context)) {
echo $OUTPUT->single_button(new moodle_url('newbadge.php', array('type' => $type, 'id' => $courseid)),
get_string('newbadge', 'badges'));
}
}
echo $OUTPUT->footer();
-1
View File
@@ -26,7 +26,6 @@
defined('MOODLE_INTERNAL') || die();
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->libdir . '/badgeslib.php');
require_once($CFG->dirroot . '/user/selector/lib.php');
+4 -3
View File
@@ -60,10 +60,11 @@ class OpenBadgesBackpackHandler {
}
$options = array(
'FRESH_CONNECT' => true,
'FRESH_CONNECT' => true,
'RETURNTRANSFER' => true,
'FORBID_REUSE' => true,
'HEADER' => 0,
'FORBID_REUSE' => true,
'HEADER' => 0,
'HTTPHEADER' => array('Expect:'),
'CONNECTTIMEOUT' => 3,
);
+3
View File
@@ -53,11 +53,13 @@ $PAGE->set_heading($title);
$PAGE->set_pagelayout('mydashboard');
$backpack = $DB->get_record('badge_backpack', array('userid' => $USER->id));
$badgescache = cache::make('core', 'externalbadges');
if ($disconnect && $backpack) {
require_sesskey();
$DB->delete_records('badge_external', array('backpackid' => $backpack->id));
$DB->delete_records('badge_backpack', array('userid' => $USER->id));
$badgescache->delete($USER->id);
redirect(new moodle_url('/badges/mybackpack.php'));
}
@@ -103,6 +105,7 @@ if ($backpack) {
$DB->insert_record('badge_external', $obj);
}
}
$badgescache->delete($USER->id);
redirect(new moodle_url('/badges/mybadges.php'));
}
} else {
+2 -5
View File
@@ -90,11 +90,8 @@ $PAGE->set_title($title);
$PAGE->set_heading($title);
$PAGE->set_pagelayout('mydashboard');
// TODO: Better way of pushing badges to Mozilla backpack?
if (!empty($CFG->badges_allowexternalbackpack)) {
$PAGE->requires->js(new moodle_url('http://backpack.openbadges.org/issuer.js'), true);
$PAGE->requires->js('/badges/backpack.js', true);
}
// Include JS files for backpack support.
badges_setup_backpack_js();
$output = $PAGE->get_renderer('core', 'badges');
$badges = badges_get_user_badges($USER->id);
+98 -22
View File
@@ -26,7 +26,6 @@
require_once($CFG->libdir . '/badgeslib.php');
require_once($CFG->libdir . '/tablelib.php');
require_once($CFG->dirroot . '/user/filters/lib.php');
/**
* Standard HTML output renderer for badges
@@ -82,9 +81,10 @@ class core_badges_renderer extends plugin_renderer_base {
$url = new moodle_url('badge.php', array('hash' => $badge->uniquehash));
} else {
if (!$external) {
$url = new moodle_url($CFG->wwwroot . '/badges/badge.php', array('hash' => $badge->uniquehash));
$url = new moodle_url('/badges/badge.php', array('hash' => $badge->uniquehash));
} else {
$url = new moodle_url($CFG->wwwroot . '/badges/external.php', array('badge' => serialize($badge)));
$hash = hash('md5', $badge->hostedUrl);
$url = new moodle_url('/badges/external.php', array('hash' => $hash, 'user' => $userid));
}
}
$actions = html_writer::tag('div', $push . $download . $status, array('class' => 'badge-actions'));
@@ -277,16 +277,18 @@ class core_badges_renderer extends plugin_renderer_base {
protected function render_issued_badge(issued_badge $ibadge) {
global $USER, $CFG, $DB;
$issued = $ibadge->issued;
$userinfo = $ibadge->recipient;
$badge = new badge($ibadge->badgeid);
$today_date = date('Y-m-d');
$today = strtotime($today_date);
$table = new html_table();
$table->id = 'issued-badge-table';
$imagetable = new html_table();
$imagetable->attributes = array('class' => 'clearfix badgeissuedimage');
$imagetable->data[] = array(html_writer::empty_tag('img', array('src' => $issued['badge']['image'])));
if ($USER->id == $ibadge->recipient && !empty($CFG->enablebadges)) {
if ($USER->id == $userinfo->id && !empty($CFG->enablebadges)) {
$imagetable->data[] = array($this->output->single_button(
new moodle_url('/badges/badge.php', array('hash' => $ibadge->hash, 'bake' => true)),
get_string('download'),
@@ -294,22 +296,33 @@ class core_badges_renderer extends plugin_renderer_base {
$expiration = isset($issued['expires']) ? strtotime($issued['expires']) : $today + 1;
if (!empty($CFG->badges_allowexternalbackpack) && ($expiration > $today) && badges_user_has_backpack($USER->id)) {
$assertion = new moodle_url('/badges/assertion.php', array('b' => $ibadge->hash));
$action = new component_action('click', 'addtobackpack', array('assertion' => $assertion->out(false)));
$attributes = array(
'type' => 'button',
'value' => get_string('addtobackpack', 'badges'),
'onclick' => 'OpenBadges.issue(["' . $assertion->out(false) . '"], function(errors, successes) { })');
'type' => 'button',
'id' => 'addbutton',
'value' => get_string('addtobackpack', 'badges'));
$tobackpack = html_writer::tag('input', '', $attributes);
$this->output->add_action_handler($action, 'addbutton');
$imagetable->data[] = array($tobackpack);
}
}
$datatable = new html_table();
$datatable->attributes = array('class' => 'badgeissuedinfo');
$datatable->colclasses = array('bfield', 'bvalue');
// Recipient information.
$datatable->data[] = array($this->output->heading(get_string('recipientdetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('name'), fullname($userinfo));
if (empty($userinfo->backpackemail)) {
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->accountemail));
} else {
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->backpackemail));
}
$datatable->data[] = array($this->output->heading(get_string('issuerdetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('issuername', 'badges'), $badge->issuername);
if (isset($badge->issuercontact) && !empty($badge->issuercontact)) {
$datatable->data[] = array(get_string('contact', 'badges'),
html_writer::tag('a', $badge->issuercontact, array('href' => 'mailto:' . $badge->issuercontact)));
$datatable->data[] = array(get_string('contact', 'badges'), obfuscate_mailto($badge->issuercontact));
}
$datatable->data[] = array($this->output->heading(get_string('badgedetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('name'), $badge->name);
@@ -345,7 +358,7 @@ class core_badges_renderer extends plugin_renderer_base {
// Print evidence.
$agg = $badge->get_aggregation_methods();
$evidence = $badge->get_criteria_completions($ibadge->recipient);
$evidence = $badge->get_criteria_completions($userinfo->id);
$eids = array_map(create_function('$o', 'return $o->critid;'), $evidence);
unset($badge->criteria[BADGE_CRITERIA_TYPE_OVERALL]);
@@ -376,6 +389,7 @@ class core_badges_renderer extends plugin_renderer_base {
$issued = $ibadge->issued;
$assertion = $issued->assertion;
$issuer = $assertion->badge->issuer;
$userinfo = $ibadge->recipient;
$table = new html_table();
$imagetable = new html_table();
@@ -385,13 +399,29 @@ class core_badges_renderer extends plugin_renderer_base {
$datatable = new html_table();
$datatable->attributes = array('class' => 'badgeissuedinfo');
$datatable->colclasses = array('bfield', 'bvalue');
// Recipient information.
$datatable->data[] = array($this->output->heading(get_string('recipientdetails', 'badges'), 3), '');
// Technically, we should alway have a user at this point, but added an extra check just in case.
if ($userinfo) {
$datatable->data[] = array(get_string('name'), fullname($userinfo));
if (!$ibadge->valid) {
$notify = $this->output->notification(get_string('recipientvalidationproblem', 'badges'), 'notifynotice');
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->email) . $notify);
} else {
$datatable->data[] = array(get_string('email'), obfuscate_mailto($userinfo->email));
}
} else {
$notify = $this->output->notification(get_string('recipientidentificationproblem', 'badges'), 'notifynotice');
$datatable->data[] = array(get_string('name'), $notify);
}
$datatable->data[] = array($this->output->heading(get_string('issuerdetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('issuername', 'badges'), $issuer->name);
$datatable->data[] = array(get_string('issuerurl', 'badges'),
html_writer::tag('a', $issuer->origin, array('href' => $issuer->origin)));
if (isset($issuer->contact)) {
$datatable->data[] = array(get_string('contact', 'badges'),
html_writer::tag('a', $issuer->contact, array('href' => 'mailto:' . $issuer->contact)));
$datatable->data[] = array(get_string('contact', 'badges'), obfuscate_mailto($issuer->contact));
}
$datatable->data[] = array($this->output->heading(get_string('badgedetails', 'badges'), 3), '');
$datatable->data[] = array(get_string('name'), $assertion->badge->name);
@@ -459,7 +489,7 @@ class core_badges_renderer extends plugin_renderer_base {
get_string('downloadall'), 'POST', array('class' => 'activatebadge'));
// Local badges.
$localhtml = html_writer::start_tag('fieldset', array('class' => 'generalbox'));
$localhtml = html_writer::start_tag('fieldset', array('id' => 'issued-badge-table', 'class' => 'generalbox'));
$localhtml .= html_writer::tag('legend',
$this->output->heading_with_help(get_string('localbadges', 'badges', $SITE->fullname), 'localbadgesh', 'badges'));
if ($badges->badges) {
@@ -549,9 +579,12 @@ class core_badges_renderer extends plugin_renderer_base {
$paging = new paging_bar($badges->totalcount, $badges->page, $badges->perpage, $this->page->url, 'page');
// New badge button.
$n['type'] = $this->page->url->get_param('type');
$n['id'] = $this->page->url->get_param('id');
$htmlnew = $this->output->single_button(new moodle_url('newbadge.php', $n), get_string('newbadge', 'badges'));
$htmlnew = '';
if (has_capability('moodle/badges:createbadge', $this->page->context)) {
$n['type'] = $this->page->url->get_param('type');
$n['id'] = $this->page->url->get_param('id');
$htmlnew = $this->output->single_button(new moodle_url('newbadge.php', $n), get_string('newbadge', 'badges'));
}
$htmlpagingbar = $this->render($paging);
$table = new html_table();
@@ -870,7 +903,7 @@ class issued_badge implements renderable {
public $issued;
/** @var badge recipient */
public $recipient = 0;
public $recipient;
/** @var badge visibility to others */
public $visible = 0;
@@ -896,7 +929,12 @@ class issued_badge implements renderable {
WHERE ' . $DB->sql_compare_text('uniquehash', 40) . ' = ' . $DB->sql_compare_text(':hash', 40),
array('hash' => $hash), IGNORE_MISSING);
if ($rec) {
$this->recipient = $rec->userid;
// Get a recipient from database.
$user = $DB->get_record_sql('SELECT u.id, u.lastname, u.firstname,
u.email AS accountemail, b.email AS backpackemail
FROM {user} u LEFT JOIN {badge_backpack} b ON u.id = b.userid
WHERE u.id = :userid', array('userid' => $rec->userid));
$this->recipient = $user;
$this->visible = $rec->visible;
$this->badgeid = $rec->badgeid;
}
@@ -910,13 +948,51 @@ class external_badge implements renderable {
/** @var issued badge */
public $issued;
/** @var User ID */
public $recipient;
/** @var validation of external badge */
public $valid = true;
/**
* Initializes the badge to display
*
* @param string $json External badge information.
* @param object $badge External badge information.
* @param int $recipient User id.
*/
public function __construct($json) {
$this->issued = $json;
public function __construct($badge, $recipient) {
global $DB;
// At this point a user has connected a backpack. So, we are going to get
// their backpack email rather than their account email.
$user = $DB->get_record_sql('SELECT u.lastname, u.firstname, b.email
FROM {user} u INNER JOIN {badge_backpack} b ON u.id = b.userid
WHERE userid = :userid', array('userid' => $recipient), IGNORE_MISSING);
$this->issued = $badge;
$this->recipient = $user;
// Check if recipient is valid.
// There is no way to be 100% sure that a badge belongs to a user.
// Backpack does not return any recipient information.
// All we can do is compare that backpack email hashed using salt
// provided in the assertion matches a badge recipient from the assertion.
if ($user) {
if (validate_email($badge->assertion->recipient) && $badge->assertion->recipient == $user->email) {
// If we have email, compare emails.
$this->valid = true;
} else if ($badge->assertion->recipient == 'sha256$' . hash('sha256', $user->email)) {
// If recipient is hashed, but no salt, compare hashes without salt.
$this->valid = true;
} else if ($badge->assertion->recipient == 'sha256$' . hash('sha256', $user->email . $badge->assertion->salt)) {
// If recipient is hashed, compare hashes.
$this->valid = true;
} else {
// Otherwise, we cannot be sure that this user is a recipient.
$this->valid = false;
}
} else {
$this->valid = false;
}
}
}
@@ -1011,7 +1087,7 @@ class badge_user_collection extends badge_collection implements renderable {
parent::__construct($badges);
if (!empty($CFG->badges_allowexternalbackpack)) {
$this->backpack = get_backpack_settings($userid);
$this->backpack = get_backpack_settings($userid, true);
}
}
}
+11 -3
View File
@@ -52,7 +52,7 @@ class block_badges extends block_base {
return array(
'admin' => false,
'site-index' => true,
'course-view' => false,
'course-view' => true,
'mod' => false,
'my' => true
);
@@ -88,8 +88,16 @@ class block_badges extends block_base {
if (empty($CFG->enablebadges)) {
$this->content->text .= get_string('badgesdisabled', 'badges');
} else if ($badges = badges_get_user_badges($USER->id, null, 0, $this->config->numberofbadges)) {
$output = $PAGE->get_renderer('core', 'badges');
return $this->content;
}
$courseid = $this->page->course->id;
if ($courseid == SITEID) {
$courseid = null;
}
if ($badges = badges_get_user_badges($USER->id, $courseid, 0, $this->config->numberofbadges)) {
$output = $this->page->get_renderer('core', 'badges');
$this->content->text = $output->print_badges_list($badges, $USER->id, true);
} else {
$this->content->text .= get_string('nothingtodisplay', 'block_badges');
+4 -4
View File
@@ -26,11 +26,11 @@
$capabilities = array(
'block/badges:addinstance' => array(
'riskbitmask' => RISK_PERSONAL,
'captype' => 'read',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'user' => CAP_ALLOW,
'contextlevel' => CONTEXT_BLOCK,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/site:manageblocks'
),
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013050100; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2013050101; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2013050100; // Requires this Moodle version.
$plugin->component = 'block_badges';
@@ -63,7 +63,7 @@ class behat_block_comments extends behat_base {
$commentstextarea = $this->find('css', '.comment-area textarea', $exception);
$commentstextarea->setValue($comment);
$this->find_link('Save comment')->click();
$this->find_link(get_string('savecomment'))->click();
// Wait for the AJAX request.
$this->getSession()->wait(4 * 1000, false);
@@ -91,8 +91,11 @@ class behat_block_comments extends behat_base {
$exception = new ElementNotFoundException($this->getSession(), '"' . $comment . '" comment ');
$commentxpath = "//div[contains(concat(' ', @class, ' '), ' block_comments ')]" .
"/descendant::div[@class='comment-message'][contains(., '" . $comment . "')]";
// Using xpath liternal to avoid possible problems with comments containing quotes.
$commentliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($comment);
$commentxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' block_comments ')]" .
"/descendant::div[@class='comment-message'][contains(., $commentliteral)]";
$commentnode = $this->find('xpath', $commentxpath, $exception);
// Click on delete icon.
@@ -100,10 +103,6 @@ class behat_block_comments extends behat_base {
$deleteicon = $this->find('css', '.comment-delete a img', $deleteexception, $commentnode);
$deleteicon->click();
// Yes confirm.
$confirmnode = $this->find('xpath', "//div[@class='comment-delete-confirm']/descendant::a[contains(., 'Yes')]");
$confirmnode->click();
// Wait for the AJAX request.
$this->getSession()->wait(4 * 1000, false);
}
+4
View File
@@ -54,5 +54,9 @@ function xmldb_block_community_upgrade($oldversion) {
// Put any upgrade step following this
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+4
View File
@@ -60,5 +60,9 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Savepoint reached.
upgrade_block_savepoint(true, 2012112901, 'completionstatus');
}
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3 -3
View File
@@ -210,12 +210,12 @@ if (empty($completions)) {
$agg = $info->get_aggregation_method($row['type']);
echo '('. html_writer::start_tag('i');
if ($agg == COMPLETION_AGGREGATION_ALL) {
echo strtolower(get_string('all', 'completion'));
echo textlib::strtolower(get_string('all', 'completion'));
} else {
echo strtolower(get_string('any', 'completion'));
echo textlib::strtolower(get_string('any', 'completion'));
}
echo html_writer::end_tag('i') .strtolower(get_string('required')).')';
echo html_writer::end_tag('i') .textlib::strtolower(get_string('required')).')';
$agg_type = false;
}
}
@@ -26,9 +26,9 @@
$string['adminview'] = 'Admin view';
$string['allcourses'] = 'Admin user sees all courses';
$string['configadminview'] = 'What should the admin see in the course list block?';
$string['confighideallcourseslink'] = 'Hide "All courses" link at the bottom of the block. Link hiding does not affects Admin\'s view';
$string['confighideallcourseslink'] = 'Remove the \'All courses\' link under the list of courses. (This setting does not affect the admin view.)';
$string['course_list:addinstance'] = 'Add a new courses block';
$string['course_list:myaddinstance'] = 'Add a new courses block to My home';
$string['hideallcourseslink'] = 'Hide All courses link';
$string['hideallcourseslink'] = 'Hide \'All courses\' link';
$string['owncourses'] = 'Admin user sees own courses';
$string['pluginname'] = 'Courses';
+12
View File
@@ -34,5 +34,17 @@ $capabilities = array(
),
'clonepermissionsfrom' => 'moodle/my:manageblocks'
),
'block/course_overview:addinstance' => array(
'riskbitmask' => RISK_SPAM | RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_BLOCK,
'archetypes' => array(
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/site:manageblocks'
)
);
@@ -27,6 +27,7 @@ $string['alwaysshowall'] = 'Always Show All';
$string['collapseall'] = 'Collapse All Course Lists';
$string['configotherexpanded'] = 'If enabled, Other Courses will be expanded by default unless overriden by user preferences.';
$string['configpreservestates'] = 'If enabled, the collapsed/expanded states set by the user are stored and used on each load.';
$string['course_overview:addinstance'] = 'Add a new course overview block';
$string['course_overview:myaddinstance'] = 'Add a new course overview block to My home';
$string['defaultmaxcourses'] = 'Default maximum courses';
$string['defaultmaxcoursesdesc'] = 'Maximum courses which should be displayed on course overview block, 0 will show all courses';
+11 -2
View File
@@ -31,8 +31,17 @@
function block_course_overview_get_overviews($courses) {
$htmlarray = array();
if ($modules = get_plugin_list_with_function('mod', 'print_overview')) {
foreach ($modules as $fname) {
$fname($courses,$htmlarray);
// Split courses list into batches with no more than MAX_MODINFO_CACHE_SIZE courses in one batch.
// Otherwise we exceed the cache limit in get_fast_modinfo() and rebuild it too often.
if (defined('MAX_MODINFO_CACHE_SIZE') && MAX_MODINFO_CACHE_SIZE > 0 && count($courses) > MAX_MODINFO_CACHE_SIZE) {
$batches = array_chunk($courses, MAX_MODINFO_CACHE_SIZE, true);
} else {
$batches = array($courses);
}
foreach ($batches as $courses) {
foreach ($modules as $fname) {
$fname($courses, $htmlarray);
}
}
}
return $htmlarray;
+3
View File
@@ -104,6 +104,9 @@ class block_course_overview_renderer extends plugin_renderer_base {
// No need to pass title through s() here as it will be done automatically by html_writer.
$attributes = array('title' => $course->fullname);
if ($course->id > 0) {
if (empty($course->visible)) {
$attributes['class'] = 'dimmed';
}
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
$coursefullname = format_string($course->fullname, true, $course->id);
$link = html_writer::link($courseurl, $coursefullname, $attributes);
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2013050100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2013050101; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2013050100; // Requires this Moodle version
$plugin->component = 'block_course_overview'; // Full name of the plugin (used for diagnostics)
+4
View File
@@ -65,5 +65,9 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
}
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+9 -2
View File
@@ -836,8 +836,15 @@ M.core_dock.genericblock.prototype = {
}
// Must set the image src seperatly of we get an error with XML strict headers
var moveto = Y.Node.create('<input type="image" class="moveto customcommand requiresjs" alt="'+M.str.block.addtodock+'" title="'+
Y.Escape.html(M.util.get_string('dockblock', 'block', node.one('.header .title h2').getHTML())) +'" />');
var moveto = Y.Node.create('<input type="image" class="moveto customcommand requiresjs" />');
var header = node.one('.header .title h2');
moveto.setAttribute('alt', Y.Escape.html(M.util.get_string('addtodock', 'block')));
if (header) {
moveto.setAttribute('title', Y.Escape.html(M.util.get_string('dockblock', 'block', header.getHTML())));
} else {
moveto.setAttribute('title', Y.Escape.html(M.util.get_string('addtodock', 'block')));
}
var icon = 't/block_to_dock';
if (right_to_left()) {
icon = 't/block_to_dock_rtl';
+4
View File
@@ -40,5 +40,9 @@ function xmldb_block_html_upgrade($oldversion) {
// Put any upgrade step following this
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -340,7 +340,7 @@ class block_base {
/**
* Subclasses should override this and return true if the
* subclass block has a config_global.html file.
* subclass block has a settings.php file.
*
* @return boolean
*/
+4
View File
@@ -66,5 +66,9 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// Put any upgrade step following this
// Moodle v2.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3 -1
View File
@@ -105,7 +105,9 @@ class block_navigation_renderer extends plugin_renderer_base {
if ($item->hidden) {
$attributes['class'] = 'dimmed_text';
}
if (is_string($item->action) || empty($item->action) || ($item->type === navigation_node::TYPE_CATEGORY && empty($options['linkcategories']))) {
if (is_string($item->action) || empty($item->action) ||
(($item->type === navigation_node::TYPE_CATEGORY || $item->type === navigation_node::TYPE_MY_CATEGORY) &&
empty($options['linkcategories']))) {
$attributes['tabindex'] = '0'; //add tab support to span but still maintain character stream sequence.
$content = html_writer::tag('span', $content, $attributes);
} else if ($item->action instanceof action_link) {
@@ -0,0 +1,71 @@
@block @block_navigation
Feature: View my courses in navigation block
In order to navigate to my courses
As a student
I need my courses displayed in the navigation block
Background:
Given the following "users" exists:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
And the following "categories" exists:
| name | category | idnumber |
| cat1 | 0 | cat1 |
| cat2 | 0 | cat2 |
| cat3 | 0 | cat3 |
| cat31 | cat3 | cat31 |
| cat32 | cat3 | cat32 |
| cat33 | cat3 | cat33 |
And the following "courses" exists:
| fullname | shortname | category |
| Course1 | c1 | cat1 |
| Course2 | c2 | cat2 |
| Course31 | c31 | cat31 |
| Course32 | c32 | cat32 |
| Course331| c331 | cat33 |
| Course332| c332 | cat33 |
And the following "course enrolments" exists:
| user | course | role |
| student1 | c1 | student |
| student1 | c31 | student |
| student1 | c331 | student |
And I log in as "admin"
@javascript
Scenario: The plain list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 0 |
And I log out
And I log in as "student1"
When I follow "My home"
Then I should not see "cat1" in the "Navigation" "block"
And I should not see "cat2" in the "Navigation" "block"
And I should see "c1" in the "Navigation" "block"
And I should see "c31" in the "Navigation" "block"
And I should see "c331" in the "Navigation" "block"
And I should not see "c2" in the "Navigation" "block"
And I should not see "c32" in the "Navigation" "block"
And I should not see "c332" in the "Navigation" "block"
@javascript
Scenario: The nested list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 1 |
And I log out
And I log in as "student1"
When I follow "My home"
Then I should see "cat1" in the "Navigation" "block"
And I should see "cat3" in the "Navigation" "block"
And I should not see "cat2" in the "Navigation" "block"
And I expand "cat3" node
And I wait "2" seconds
And I should see "cat31" in the "Navigation" "block"
And I should see "cat33" in the "Navigation" "block"
And I should not see "cat32" in the "Navigation" "block"
And I expand "cat31" node
And I wait "2" seconds
And I should see "c31" in the "Navigation" "block"
And I expand "cat33" node
And I wait "2" seconds
And I should see "c331" in the "Navigation" "block"
And I should not see "c332" in the "Navigation" "block"
@@ -391,11 +391,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
*
* @chainable
* @method wire
* @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
return false;
return this;
}
if (this.get('expandable')) {
this.node.setAttribute('data-expandable', '1');
File diff suppressed because one or more lines are too long
@@ -391,11 +391,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
*
* @chainable
* @method wire
* @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
return false;
return this;
}
if (this.get('expandable')) {
this.node.setAttribute('data-expandable', '1');
+5 -1
View File
@@ -389,11 +389,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
*
* @chainable
* @method wire
* @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
return false;
return this;
}
if (this.get('expandable')) {
this.node.setAttribute('data-expandable', '1');

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