Compare commits

..

1642 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 5c172059aa Moodle release 2.6.10 2015-03-10 00:42:29 +01:00
Eloy Lafuente (stronk7) e66e082d2a weekly release 2.6.9+ 2015-03-09 16:47:38 +01:00
Marina Glancy 9be5b22718 MDL-49418 core: partial revert of MDL-48804
this is a quick fix for the issue 'Course module with two or more availability restrictions is not accessible'
MDL-49434 is created to deal with the renderer access inside availability check
2015-03-09 11:33:33 +08:00
Eloy Lafuente (stronk7) 6870037042 Moodle release 2.6.9 2015-03-07 11:23:30 +01:00
Eloy Lafuente (stronk7) 086a9df86a Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2015-03-07 11:23:25 +01:00
David Monllao eb45017b61 MDL-49204 core_message: Checking current user 2015-03-04 10:06:23 +08:00
Andrew Nicols 8b16c884e7 Merge branch 'MDL-49364_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2015-03-04 08:54:01 +08:00
Tim Hunt 71aeb8a9cb MDL-49364 quiz statistics: escape output in the response analysis 2015-03-03 18:01:20 +00:00
Eloy Lafuente (stronk7) 12a8fcb5e4 MDL-49087 mdeploy: now relying on config.php documented 2015-03-03 02:48:45 +01:00
Andrew Nicols de169b7944 MDL-49087 mnet: Ensure typeroot is in dirroot 2015-03-03 02:47:41 +01:00
Andrew Nicols 240e7be734 MDL-49087 mnet: Use real dataroot instead of user-provided 2015-03-03 02:47:41 +01:00
Marina Glancy 5f0bfb120f MDL-48804 core: do not set current course until login validated 2015-03-02 16:53:48 +01:00
Juan Leyva 6e284d55b2 MDL-48691 webservices: Check if the user must be changing password 2015-03-02 14:40:06 +00:00
Simey Lameze 8b4e370840 MDL-49084 core_tag: add capability check to flag as inappropriate action 2015-03-02 12:52:17 +00:00
Andrew Nicols 5339e23057 MDL-49144 blocks: Sanitise alt and title for block controls 2015-03-02 12:21:51 +00:00
Andrew Nicols 0759f543f9 MDL-49144 blocks: Add behat test to ensury sanity of block title 2015-03-02 12:21:51 +00:00
Ankit Agarwal 82406581af MDL-38466 filters: Redos protection and unit tests 2015-03-02 11:31:25 +01:00
Zachary Durber 71ab589855 MDL-38466 filters: ReDoS protection for text to URL conversion. 2015-03-02 11:31:25 +01:00
Damyon Wiese 592d4ee6b0 MDL-49167 YUI: Fix for theme/yui_combo.php and $CFG->yuislashargs
It was too aggressively cleaning it's params (broken in MDL-48980).
2015-02-16 11:27:00 +08:00
AMOS bot 16a94e9caf Automatically generated installer lang files 2015-02-11 00:04:17 +08:00
AMOS bot e5728d97ee Automatically generated installer lang files 2015-02-05 00:04:15 +08:00
Eloy Lafuente (stronk7) 316670bfe1 Moodle release 2.6.8 2015-01-30 12:35:01 +01:00
Eloy Lafuente (stronk7) 23c00f5706 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2015-01-30 12:34:51 +01:00
AMOS bot 43da95c8cd Automatically generated installer lang files 2015-01-30 00:04:20 +08:00
Damyon Wiese cc496f5b27 MDL-48980 Security: Always clean the result from min_get_slash_argument
The result from this function is used in send_file calls and if unclean
(windows dir separators, or .. path components) it could expose sensitive
files (e.g. .php files). Now we always clean the result from this function
even if it means double cleaning.

I also fixed the unit test for this function and added a new test for this cleaning.

I also updated the comments to point to get_file_argument as the full version of
min_get_slash_argument.
2015-01-28 14:37:45 +08:00
AMOS bot d8e971cf72 Automatically generated installer lang files 2015-01-28 00:04:29 +08:00
AMOS bot 07ae12ad2d Automatically generated installer lang files 2015-01-18 00:04:05 +08:00
AMOS bot c7e7a1a9f3 Automatically generated installer lang files 2015-01-15 00:04:09 +08:00
AMOS bot 5b8eec8891 Automatically generated installer lang files 2015-01-13 00:04:10 +08:00
AMOS bot 5ef401c83c Automatically generated installer lang files 2015-01-11 00:04:13 +08:00
Eloy Lafuente (stronk7) 19a44918b4 Moodle release 2.6.7 2015-01-10 13:12:36 +01:00
Eloy Lafuente (stronk7) 31f4669230 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2015-01-10 13:12:30 +01:00
AMOS bot 5766dfa7fa Automatically generated installer lang files 2015-01-09 00:04:20 +08:00
Zachary Durber 531492a32c MDL-48546 filters: Split on all tags for multimedia filter check. 2015-01-07 18:57:24 +01:00
Eloy Lafuente (stronk7) 505f67520f Merge branch 'MDL-48748-26-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2015-01-07 17:24:48 +01:00
AMOS bot 4657fbdfde Automatically generated installer lang files 2015-01-08 00:04:08 +08:00
Zachary Durber d11969e777 MDL-48546 filters: ReDoS protection for multimedia links. 2015-01-07 12:29:13 +08:00
Helen Foster 03ccfe6a87 MDL-48748 lang: Fix the regression from the last en_fix merge
See https://moodle.org/mod/forum/discuss.php?d=277584#p1192876
2015-01-06 22:36:27 +01:00
Simey Lameze 371d58d70d MDL-47964 auth_shibboleth: Fix DOS on the shibboleth logout 2015-01-06 11:05:50 +00:00
Simey Lameze ae4a17183a MDL-48017 core_calendar: add context validation to get_calendar_events 2015-01-05 14:13:51 +00:00
Andrew Nicols e83c756f84 MDL-48106 mod_glossary: Add missing sesskey checks 2015-01-05 13:38:12 +00:00
David Monllao c9fa67f7cb MDL-48329 core_message: Checking that messaging system is enabled 2015-01-05 13:14:12 +00:00
Simey Lameze b270bb0d75 MDL-48368 course: fix xss on course request pending page 2015-01-05 12:59:02 +00:00
Jetha Chan 52555c3698 MDL-47920 mod_lti: add capability checks, http headers 2015-01-05 12:50:12 +00:00
AMOS bot 80e30241d2 Automatically generated installer lang files 2014-12-28 00:04:20 +08:00
AMOS bot 11e832a4d1 Automatically generated installer lang files 2014-12-24 00:04:20 +08:00
AMOS bot 0f4b4040fe Automatically generated installer lang files 2014-12-22 00:04:16 +08:00
AMOS bot 9f1e48a5a4 Automatically generated installer lang files 2014-12-20 00:04:18 +08:00
AMOS bot 6592c0289b Automatically generated installer lang files 2014-12-13 00:04:10 +08:00
AMOS bot cd21fd45fd Automatically generated installer lang files 2014-12-11 00:04:11 +08:00
AMOS bot 806361d757 Automatically generated installer lang files 2014-12-06 00:03:59 +08:00
AMOS bot 1bf281664e Automatically generated installer lang files 2014-12-04 00:04:41 +08:00
AMOS bot 634749bb6d Automatically generated installer lang files 2014-11-25 00:04:17 +08:00
Dan Poltawski 25b43f7af5 weekly release 2.6.6+ 2014-11-20 18:05:24 +00:00
Dan Poltawski 08452fad7f NOBUG: Fixed file access permissions 2014-11-20 18:05:24 +00:00
AMOS bot a2b62eebcb Merge branch 'MOODLE_26_STABLE' into install_26_STABLE 2014-11-21 00:05:49 +08:00
AMOS bot 2002c90ff2 Automatically generated installer lang files 2014-11-19 00:05:47 +08:00
Dan Poltawski b6e289615f Merge branch 'MDL-48042_26' of git://github.com/ppichet/moodle into MOODLE_26_STABLE 2014-11-18 11:52:09 +00:00
Pierre Pichet 26d67aecdf MDL-48042 Questions: Reset Calculated qtype comments on datasets
Reset back the modifications of Calculated qtype comments on datasets
    done by MDL-47224

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

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

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

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

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

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

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

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

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

This commit introduces two new steps:

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

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

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

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

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

Before this change the following was being done:

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

After this change the following happens:

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

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

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

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

The solution is to rewrite the query so that:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	theme/bootstrapbase/less/moodle/admin.less
	theme/bootstrapbase/style/moodle.css
2014-05-12 15:52:43 +08:00
Michael Aherne 72fcbcd444 MDL-45496 core Added space to logged in as line 2014-05-12 08:51:06 +01:00
Rajesh Taneja 167136718e MDL-45514 behat: Fixed should_not_exist timout param 2014-05-12 14:14:35 +08:00
Kevin Wiliarty 7d80ee4455 MDL-45483 mod_forum: corrects values for maxattachments in forum settings 2014-05-12 00:00:18 -04:00
AMOS bot 49b427eda0 Automatically generated installer lang files 2014-05-12 00:39:49 +00:00
AMOS bot 5fe214d9d8 Automatically generated installer lang files 2014-05-11 00:47:52 +00:00
Eloy Lafuente (stronk7) 92ac518fdc Moodle release 2.6.3 2014-05-10 18:30:45 +02:00
AMOS bot afe9a42240 Automatically generated installer lang files 2014-05-10 00:46:41 +00:00
AMOS bot 1dfa14ed5c Automatically generated installer lang files 2014-05-09 00:40:56 +00:00
Eloy Lafuente (stronk7) a1858e9509 weekly release 2.6.2+ 2014-05-08 16:35:55 +02:00
sam marshall f6d6df37b6 MDL-45469 Conditional availability: Restrict by text area broken
It has never worked, because the data for text area fields is not
loaded into the $USER object.

Changing it so that the dropdown list does not include these types
of field. (This 2.6 version of change is similar to the 2.7 code
but in a different location and without unit test.)
2014-05-08 14:04:35 +01:00
Marina Glancy 30dc7fe149 Merge branch 'MDL-45462-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-08 19:51:31 +08:00
Eloy Lafuente (stronk7) a1336aea88 Merge branch 'wip-mdl-44262-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-05-08 12:00:46 +02:00
Rajesh Taneja f2791d4944 MDL-44262 Behat: Bump behat version to get format fix 2014-05-08 17:38:17 +08:00
Andrew Nicols c8097f88a5 MDL-45472 AJAX: Whitelist prototype values form JS Error in exception dialogue 2014-05-08 16:45:59 +08:00
Frederic Massart 5c276a4c32 MDL-45332 repository_url: URL parameter is using PARAM_URL 2014-05-08 15:35:08 +08:00
Marina Glancy 7a950591a9 MDL-45414 wiki: blank image for page index icons 2014-05-08 12:12:34 +08:00
Frederic Massart f395f30b03 MDL-45462 flickr: Requests are now done over HTTPS 2014-05-08 11:28:32 +08:00
Dan Poltawski b5505253bc MDL-43312 tinymce: bump plugin version 2014-05-08 10:53:21 +08:00
Dan Poltawski a9d14d2a36 Merge branch 'MDL-43312-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-05-08 10:51:53 +08:00
Damyon Wiese f6f25e4040 Merge branch 'MDL-45304-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-05-08 10:04:03 +08:00
Tony Butler cbeee0a46e MDL-45432 mod_assign Declare character encoding in onlinetext export
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-05-07 13:12:26 +01:00
Simey Lameze b6c8f92f0b MDL-45304 events: Triggering event course module update actions. 2014-05-07 17:30:13 +08:00
Marina Glancy da6b75343a Merge branch 'MDL-45282_message_26' of git://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-05-07 16:53:16 +08:00
Damyon Wiese 1a8c8084ef MDL-44750 Assign: Do not reveal student identities to screen readers 2014-05-07 16:50:10 +08:00
Dan Poltawski 20b65746e3 Merge branch 'MDL-45410-en_fix-26' of git://github.com/mudrd8mz/moodle into MOODLE_26_STABLE 2014-05-07 16:40:42 +08:00
Marina Glancy fcf199e7a1 MDL-45126 do not allow guests see name and summary of hidden course 2014-05-07 16:22:22 +08:00
Juan Leyva 14c16a4163 MDL-43119 Add valid until dates for tokens created by login/token.php
3 months were decided
2014-05-07 16:14:03 +08:00
Andrew Davis 21a1cee106 MDL-45282 core_user: fixed up some oddities in the bulk user messaging screen 2014-05-07 15:57:39 +08:00
Frederic Massart 568514ee7f MDL-43877 blocks: Files from blocks in my/ were accessible to the world 2014-05-07 14:27:27 +08:00
Adam Olley 2be96ee2d1 MDL-23566 mod_lesson: Float answers so paragraphs line up correctly next to the inputs 2014-05-07 15:45:55 +09:30
Damyon Wiese 333e42243c MDL-44606 assign: Disable sesskey protection for unit test. 2014-05-07 14:08:03 +08:00
Damyon Wiese 64e366c82b Merge branch 'MDL-45290-26-fix2' of https://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-07 13:29:42 +08:00
Marina Glancy 9b33dd001f Merge branch 'MDL-45201-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-07 13:07:18 +08:00
Marina Glancy 80efce1bc9 Merge branch 'MDL-45387-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-07 13:07:08 +08:00
Damyon Wiese 2f0fa43133 MDL-43312 TinyMCE: Version bump to 3.5.10. Remove all the hacks.
I retested the old bugs that required custom hacks to tinymce and could not reproduce them,
so I have not reimplemented the hacks.
2014-05-07 12:53:35 +08:00
Damyon Wiese f977d376c9 MDL-44606 Assign: Some grading functions are missing sesskey protection 2014-05-07 12:37:08 +08:00
Dan Poltawski c1d62ed25d Merge branch 'wip-MDL-45414-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-05-07 12:05:43 +08:00
Dan Poltawski 34d75ff115 Merge branch 'wip-MDL-45429-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-05-07 11:50:13 +08:00
Jetha Chan 5b80099806 MDL-45387 core_form: erroneous escaping on reference list
Fixed erroneous escaping in JS.
2014-05-07 10:56:55 +08:00
Helen Foster 2966be7e01 MDL-45410 Merge English strings from the en_fix language pack 2014-05-07 00:21:56 +02:00
Marina Glancy a9b8d52d84 MDL-45429 block_glossary_random: check capability before suggesting to edit 2014-05-06 17:24:00 +08:00
Jetha Chan a0cb023389 MDL-45290 rubrics: overflow, delete button alignment
Adjusted delete button alignment, restored overflow rule, amended button alignment, minor RTL fixes.
2014-05-06 16:42:30 +08:00
Damyon Wiese b37c9cf233 MDL-45412 Cache: Look for the newer classname first (mongo store) 2014-05-06 12:02:51 +08:00
Damyon Wiese 5684f787ee Merge branch '45412-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-05-06 12:02:33 +08:00
Marina Glancy ca0f287dad MDL-45414 wiki: fix broken image 2014-05-06 11:33:20 +08:00
Damyon Wiese 53a28c9528 Merge branch 'MDL-45290-26-fix' of http://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-06 11:25:10 +08:00
Dan Poltawski e8d36cbc1a Merge branch 'MDL-45376-m26' of https://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-05-06 11:16:40 +08:00
Jetha Chan 502deae544 MDL-45290 rubric: IE8 and minor fixes, RTL
Added a fallback style for IE8, adjusted some minor styles, added RTL capability.
2014-05-06 10:47:05 +08:00
Dan Poltawski 9ea9d487af Merge branch 'MDL-42956-26' of git://github.com/lameze/moodle into MOODLE_26_STABLE 2014-05-06 10:18:44 +08:00
Sam Hemelryk f627c8b770 MDL-45412 cachestore_mongodb: fixed use of deprecated Mongo class 2014-05-06 09:31:01 +12:00
Marina Glancy 74d62545da Merge branch 'MDL-34904-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-05 17:44:02 +08:00
Damyon Wiese 5a0e3521b9 Merge branch 'MDL-45359-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-05-05 17:25:05 +08:00
Marina Glancy d1f5077f84 Merge branch 'MDL-43319-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-05-05 17:19:51 +08:00
Marina Glancy 8dfd2e2407 Merge branch 'MDL-45342-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-05 17:19:39 +08:00
Marina Glancy 09bf74f265 Merge branch 'MDL-44174-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-05 17:19:29 +08:00
Ankit Agarwal 78995d63a3 MDL-45201 recent_activity: Fix set type notice in recent activity form 2014-05-05 13:31:20 +08:00
Damyon Wiese 76e28ec58a Merge branch 'MDL-45290-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-05 10:53:18 +08:00
Marina Glancy a0a7521e5b Merge branch 'wip-MDL-45127-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-05-05 10:18:25 +08:00
Dan Poltawski af41a7ef13 weekly release 2.6.2+ 2014-05-02 17:45:44 +08:00
Dan Poltawski 30453f2bc8 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-05-02 17:45:41 +08:00
Adrian Greeve cb6a69a1b6 MDL-45127 mod_lesson: Behat test for reviewing a lesson. 2014-05-02 16:12:30 +08:00
Adrian Greeve 6dd0e57020 MDL-45127 mod_lesson: Fixed reviewing lesson answers changing the lesson grade. 2014-05-02 16:12:30 +08:00
Adrian Greeve 745f876b3e MDL-45127 mod_lesson: Updated question edit screen with more help text.
Unless the custom scores is selected in the lesson settings the score section
in the question settings will be disabled. A help link has been added with
a description similar to this one.
2014-05-02 16:12:30 +08:00
Jetha Chan 15081f54a4 MDL-45290 rubric: visual fixups
Fixed up visual issues with rubric editor on Clean.
2014-05-02 14:21:14 +08:00
Ankit Agarwal 9cca987e0a MDL-34904 lti: Fix notice while using lti in frontpage 2014-05-02 14:07:55 +08:00
Ankit Agarwal e322d80a06 MDL-45342 book: Automate MDLQA-2423 - A teacher can create book chapters and subchapters 2014-05-02 13:27:21 +08:00
Frederic Massart 38bbd78ebe MDL-44174 theme_clean: Updating information in readme file 2014-05-02 12:56:32 +08:00
AMOS bot a201d4b6a8 Automatically generated installer lang files 2014-05-02 00:39:11 +00:00
sam marshall 62e02e583f MDL-45376 Completion: Form locking is still not working right
On submit of the form, it called 'freeze' on the completion-related
fields (even though they shouldn't have been frozen because you
already clicked the unlock button).
2014-05-01 18:16:14 +01:00
Tim Hunt 66bf3fb986 MDL-45273 quiz fixup settings initialisation. 2014-05-01 21:18:27 +08:00
Jetha Chan e2ab510709 MDL-36836 filepicker: alfresco select box fix
Adjusted position of alfresco select box; amended border/background application in base.
2014-05-01 17:14:45 +08:00
Dan Poltawski 8cc974000b Merge branch 'MDL-45365-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-05-01 14:52:06 +08:00
Dan Poltawski 3959ea18ca MDL-43570 uprade: fix indentation 2014-05-01 14:45:29 +08:00
Dan Poltawski 47cdef3d70 Merge branch 'MDL-43570-M26' of https://github.com/KristerV/moodle into MOODLE_26_STABLE 2014-05-01 14:36:06 +08:00
Marina Glancy 3e1b758044 Merge branch 'MDL-44398-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-05-01 14:21:59 +08:00
Damyon Wiese cd999ba175 MDL-45365 Courselib unit tests: cmid -> instanceid confusion
Yet again an instanceid is being passed instead of a cmid.
2014-05-01 14:03:25 +08:00
Andrew Nicols d59b21dcf1 MDL-45359 JS: Only change mask zIndex on modal dialogues
When dealing with a non-modal dialogue within a modal dialogue, we should
not update the z-index of the underyling maskNode as it does not belong to
this dialogue.
2014-05-01 14:01:29 +08:00
Dan Poltawski 84529fcf60 MDL-43319 phpdoc: fix too much ham consumption by developers 2014-05-01 13:35:33 +08:00
Dan Poltawski 278d605714 Merge branch 'MDL-45165_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-05-01 12:36:00 +08:00
Marina Glancy 62b945b70a MDL-45273 quiz: whitespace fix 2014-05-01 12:21:02 +08:00
Marina Glancy 10d96f0e37 Merge branch 'MDL-45273_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-05-01 12:20:07 +08:00
Marina Glancy 3d7b978247 Merge branch 'MDL-45292-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-05-01 11:48:47 +08:00
Dan Poltawski 62fa6fc6d5 Merge branch 'MDL-45283-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-05-01 10:40:58 +08:00
Krister Viirsaar aba7899302 MDL-43570 filetypes: Added new filetypes - ddoc, bdoc, cdoc 2014-04-30 13:08:26 +03:00
Damyon Wiese 4176b66597 Merge branch 'MDL-45166_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-30 17:23:50 +08:00
Damyon Wiese 68798bec46 Merge branch 'mdl44575-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-04-30 15:58:07 +08:00
Dan Poltawski e363a0fb6a Merge branch 'MDL-45256-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-30 15:48:58 +08:00
Frederic Massart d3f1d516e0 MDL-45256 portfolio: Adding missing global in testcase 2014-04-30 15:31:22 +08:00
Dan Poltawski 8f8f583406 Merge branch 'MDL-45256-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-30 14:58:49 +08:00
Frederic Massart 17753f88b1 MDL-45283 restore: Prevent failure when user course grade exists
When we restore a course, the grade that a user has for the
grade item of the course cannot be created twice. If we try
to create it when it already exists, a database exception is
raised because of index duplication.

The safest way to proceed is certainly to ignore the grade
information from the backup, otherwise we could potentially
overwrite existing information. Though, this only applies
to restore as merge, and it does not affect the update of
the course grade.
2014-04-30 12:17:14 +08:00
Simey Lameze 3c0307d623 MDL-42956 auth: Fix hard-coded LIMIT clause on keepalive_client method. 2014-04-30 10:51:52 +08:00
Marina Glancy 067a1bcb4d Merge branch 'MDL-45315-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-30 09:54:39 +08:00
Marina Glancy 049c8ed4d1 Merge branch 'MDL-27459-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-30 09:54:27 +08:00
Krister 5e3da2f722 MDL-42635 lesson: change from error to user friendly message 2014-04-30 09:52:26 +08:00
Eloy Lafuente (stronk7) a76fb41a02 MDL-45221 Allow unit tests to pass under any OS
This commit gets rid of the old lib/tests/other/executable.php
file completely because it was only executable under unix OSs
and moves the check to be performed against some mimetex binaries
that are known to be executable and bundled with every installation.

Note this was discovered because the weekly rolling process changed
the execution permissions of the "fixture" file and, at the end
we decided to get rid of it completely, folowing the plan above.
2014-04-29 19:32:13 +02:00
Eloy Lafuente (stronk7) 3bd12f7156 weekly release 2.6.2+ 2014-04-29 15:13:57 +02:00
Eloy Lafuente (stronk7) 72ed847d63 NOBUG: Fixed file access permissions 2014-04-29 15:13:56 +02:00
Tim Hunt fddcf077ab MDL-45273 quiz: Fix codechecker issues. 2014-04-29 11:57:32 +01:00
Tim Hunt 6f9a441023 MDL-45273 only create the quiz settings if necessary. 2014-04-29 11:57:31 +01:00
Tim Hunt 22f09398cd MDL-45273 remove the need for quiz settings.php to include locallib.php. 2014-04-29 11:57:29 +01:00
Tim Hunt f57d7f3f95 MDL-45273 quiz: move admin settings into classes folder. 2014-04-29 11:57:27 +01:00
Frederic Massart 687e149038 MDL-45256 portfolio: Unit tests for rewrite pluginfile urls 2014-04-29 17:44:10 +08:00
Frederic Massart b647aa51b1 MDL-45256 portfolio: Do not require strict XML when parsing content 2014-04-29 17:44:10 +08:00
Marina Glancy cb5260014a Revert "Merge branch 'MDL-45229-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE"
This reverts commit d6eb354664, reversing
changes made to 93b2d3baca.
2014-04-29 17:29:01 +08:00
Dan Poltawski 5244995a26 MDL-45315 block_news_items: Add missing depedency 2014-04-29 14:29:18 +08:00
Marina Glancy a632d590f3 Merge branch 'MDL-45289-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-29 12:50:05 +08:00
Damyon Wiese c814c5f947 Merge branch 'MDL-44916-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2014-04-29 10:22:01 +08:00
Dan Poltawski 1f5f345d65 MDL-45289 block_course_summary: Add behat tests 2014-04-29 10:06:50 +08:00
Sam Hemelryk ff6a130dcd Merge branch 'MDL-45312_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-04-29 10:24:23 +12:00
Sam Hemelryk d1b900ea92 Merge branch 'MDL-45221-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-29 09:10:12 +12:00
Tim Hunt 1be0a4c812 MDL-45312 qtype_missingtype or qbehaviour_missing cannot be uninstalled.
They are required by the system.
2014-04-28 21:46:13 +01:00
Sam Hemelryk d6eb354664 Merge branch 'MDL-45229-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-29 08:40:20 +12:00
Marina Glancy 93b2d3baca Merge branch 'w18_MDL-45287_m26_dbreset' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-28 20:18:19 +08:00
Marina Glancy 795fb4aea4 Merge branch 'MDL-45266-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-28 18:02:36 +08:00
Marina Glancy 7b6bdc91e9 Merge branch 'MDL-45156_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 18:02:25 +08:00
Petr Skoda 2e123e7120 MDL-45287 fix behat database reset between scenarios
We cannot find out if DB received any writes because behat
web access runs in different request.

This was affecting only scenarios without generators.
2014-04-28 17:13:29 +08:00
Damyon Wiese f91bf9a768 Merge branch 'MDL-45079_26' of https://github.com/totara/openbadges into MOODLE_26_STABLE 2014-04-28 17:08:12 +08:00
Jetha Chan 1a039ee822 MDL-45292 filepicker: fixed border style
Fixed base style issues on RTL.
2014-04-28 15:55:27 +08:00
Marina Glancy 14df84f65e Merge branch 'MDL-45288_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 13:49:02 +08:00
David Monllao d15809bb81 MDL-45156 behat: Changing html_writer::empty_tag for start_tag
Credits to Daniele Cordella.
2014-04-28 12:30:35 +07:00
Marina Glancy 7ca387b3cf Merge branch 'MDL-44614_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 13:04:08 +08:00
Andrew Nicols 29fe6d8155 MDL-45221 admin: configexecutable admin settings should only accept files 2014-04-28 12:21:42 +08:00
Frederic Massart 0d84ac90bf MDL-45229 event: Validate sectionnum in course_section_updated 2014-04-28 11:40:54 +08:00
Jason Fowler 418cbf32ed MDL-44916 Question: Fixing alignment in bootstrap themes
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-28 11:38:39 +08:00
David Monllao 70cbedd4cf MDL-45288 behat: Restricting click to .logininfo 2014-04-28 10:27:45 +07:00
Marina Glancy 4f214c3b64 Merge branch 'MDL-44004-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-28 11:17:06 +08:00
Damyon Wiese b7a172cc23 Merge branch 'MDL-45268-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-28 10:52:46 +08:00
Marina Glancy 1f2e95e7eb Merge branch 'm26_MDL-45210' of git://github.com/totara/moodle into MOODLE_26_STABLE 2014-04-28 10:46:50 +08:00
Dan Poltawski 1a1cb928dd MDL-45266 behat: tests for login block 2014-04-28 10:45:39 +08:00
Sam Hemelryk 5701d152e5 Merge branch 'MDL-45164_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 14:09:29 +12:00
Sam Hemelryk 3638582c2f Merge branch 'MDL-45284_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-28 14:09:21 +12:00
Sam Hemelryk 2f9955d4cc Merge branch 'wip-MDL-45280-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-28 12:22:51 +12:00
Eloy Lafuente (stronk7) 9d3933d4ad MDL-45286 timezones: updated to 2014b 2014-04-28 01:01:56 +02:00
Yuliya Bozhko 40b34dc0e3 MDL-45079 badges: Remove user email address from badge page
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-04-28 10:05:58 +12:00
David Monllao 408c5347e7 MDL-44614 behat: Automate MDLQA-61
In an Offline activity assignment, a teacher can
grade and give comments on an assignment completed
offline.
2014-04-27 13:06:09 +07:00
David Monllao 80f0d099ee MDL-45164 behat: Automate MDLQA-1464
A student can add submission comments to an
online text type assignment.
2014-04-27 12:28:18 +07:00
David Monllao fa5d2874b9 MDL-45165 behat: Automating MDLQA-20
Database activity entries can be viewed in a list
or singly or they can be searched or browsed.
2014-04-27 12:27:13 +07:00
David Monllao 689451731c MDL-45165 behat: Adding text selector
Same behaviour than I should see step,
it looks for the text in the node + descendants,
but, to get the lower level match discards the
nodes with children that also contains the
same text.
2014-04-27 12:27:13 +07:00
David Monllao 6dac47a69c MDL-45166 behat: MDLQA-18 converted to a behat scenario
In a database activity, students can add
entries to a database.
2014-04-27 12:26:22 +07:00
David Monllao 7eaa6e208b MDL-45166 behat: Steps to speed up mod_data features creation
A step to add a field to a database and
another one to add a database entry.
2014-04-27 12:26:22 +07:00
David Monllao 32aea6a84f MDL-45284 behat: Replace wrongly triggered not found exception 2014-04-27 11:57:03 +07:00
Marina Glancy cf5b0a4be5 MDL-45280 wrtie default value for admin_setting_configstoredfile
this fixes regression from MDL-45134
2014-04-26 10:38:37 +08:00
Dan Poltawski e374bfd61a MDL-45268 behat: tests for participants block 2014-04-25 16:21:27 +08:00
Dan Poltawski eabcd76d4d weekly release 2.6.2+ 2014-04-24 17:56:49 +08:00
Dan Poltawski e679eb6c27 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-04-24 17:56:45 +08:00
Ankit Agarwal a5657deada MDL-44398 tags: Fix incorrect usage of caps 2014-04-24 16:39:31 +08:00
Frederic Massart 2133c33314 MDL-44004 grading_rubric: Ensure that score is set before using it 2014-04-24 16:22:09 +08:00
Dan Poltawski 53318d684a Merge branch '45046-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-04-24 10:00:59 +08:00
Steve Clay 06a76addad MDL-45096 block_navigation: Check for existence of the siteadminbranch before modifying it
Prevents JS errors in some themes when admin block is hidden
2014-04-24 12:15:56 +12:00
Sam Hemelryk 291bb582ad Merge branch 'MDL-45124-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-24 11:03:22 +12:00
Sam Hemelryk 7b292552dd Merge branch 'MDL-45186-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-24 11:01:41 +12:00
Daniel Neis Araujo a661cc9113 MDL-45245 html_writer::select_time does not respect 5th parameter "attributes" 2014-04-23 14:56:40 -03:00
Dan Poltawski 5d933a6abe Merge branch 'MDL-45172_block_26' of https://github.com/andyjdavis/moodle into MOODLE_26_STABLE 2014-04-23 16:40:26 +08:00
Dan Poltawski 4a85e96b97 Merge branch 'MDL-45075-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-23 16:18:14 +08:00
Andrew Nicols 07e57c28ea MDL-45075 mod_forum: Add unit tests for forum subscription on forum creation 2014-04-23 16:08:11 +08:00
Simon Coggins 3ccba78a57 MDL-45210: Fix broken link when plagiarism plugins are disabled 2014-04-23 19:45:16 +12:00
Marina Glancy 5db4854d64 Merge branch 'MDL-45134-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-23 14:46:16 +08:00
Dan Poltawski e3986158bf Merge branch 'wip-MDL-45148-26' of https://github.com/mackensen/moodle into MOODLE_26_STABLE 2014-04-23 14:22:21 +08:00
Marina Glancy b3799a8678 Merge branch 'MDL-44991-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-23 13:25:38 +08:00
Marina Glancy b212e89231 Merge branch 'MDL-44855-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-23 13:13:56 +08:00
Frederic Massart ffc6df1ba2 MDL-45134 adminlib: No more validation error when a config file is not set
When the destination draft area existed and the user draft area has not
been used, and thus does not exist, an error was displayed to the user
saying that they could not save the setting.

This was intended to handle the cases where the draft area disappears
and would overwrite the content of the destination area, deleting
all its content. But now we do not prompt with an error when
overwriting empty with empty.
2014-04-23 12:40:50 +08:00
Andrew Davis b7055f89d4 MDL-45172 block_completionstatus: added a check for an empty string before appending 2014-04-23 11:42:05 +08:00
AMOS bot cf12210cbe Automatically generated installer lang files 2014-04-23 00:38:07 +00:00
AMOS bot 9ae6b73caf Merge branch 'MOODLE_26_STABLE' into install_26_STABLE 2014-04-23 00:38:06 +00:00
AMOS bot 20b0dd3910 Automatically generated installer lang files 2014-04-22 11:15:12 +00:00
Eloy Lafuente (stronk7) 0afcad7c36 weekly release 2.6.2+ 2014-04-22 12:26:47 +02:00
Andrew Nicols 89b63282b4 MDL-44855 AJAX: Arrays and Objects should be defined in the initializer
JavaScript is a prototypal language and complex types should be defined as
null in the prototype, and set up in the initializer instead.
2014-04-22 17:06:08 +08:00
Andrew Nicols 6930901d9e MDL-45124 dndupload: Lowercase types when comparing
IE helpfull uses a mixed-case version of 'Text' which fails the string
comparison. All other browsers use lowercase for their mime-types.
2014-04-22 16:10:39 +08:00
Andrew Nicols c07b42d7d8 MDL-40716 report_completion: Set RTL 2014-04-22 15:22:09 +08:00
Dan Poltawski 0574e41f62 Merge branch 'wip-MDL-45154-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-22 12:36:02 +08:00
Frederic Massart 7e570b2248 MDL-45186 mod_quiz: Some RTL improvements on quiz edit page 2014-04-22 12:34:39 +08:00
Marina Glancy 79040c7534 Merge branch 'MDL-43673_26' of git://github.com/stronk7/moodle into MOODLE_26_STABLE 2014-04-22 12:28:54 +08:00
Marina Glancy bad25f1c4d MDL-45154 user profiles: category name duplication error 2014-04-22 10:45:41 +08:00
Sam Hemelryk b6ac19d4d9 Merge branch 'wip-MDL-45045_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-04-22 10:47:27 +12:00
Sam Hemelryk 6049011264 Merge branch 'MDL-43145-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-22 10:39:26 +12:00
Sam Hemelryk 96ce0b22d6 Merge branch 'mdl45012-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-04-22 10:10:11 +12:00
Sam Hemelryk ff7061d521 Merge branch 'wip-MDL-45037-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-22 09:59:09 +12:00
Sam Hemelryk 8a51e2d563 Merge branch 'MDL-44270_26' of git://github.com/jonof/moodle into MOODLE_26_STABLE 2014-04-22 09:18:28 +12:00
Matt Petro 8f1498e562 MDL-45118 shibboleth: set context on index page 2014-04-22 09:17:05 +12:00
Sam Hemelryk abe2fe6180 Merge branch 'MDL-42761-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-22 08:57:33 +12:00
Dan Poltawski 1e19ea00d8 Merge branch 'w16_MDL-45049_m26_debugging' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-21 14:41:46 +08:00
Dan Poltawski e0b9784138 Merge branch 'MDL-44468_26_STABLE' of git://github.com/ds125v/moodle into MOODLE_26_STABLE 2014-04-18 15:27:41 +08:00
Nadav Kavalerchik 58a309c392 MDL-40716 - Activity labels are not visible in course completion report, when in RTL mode (theme/clean , bootstrap) 2014-04-18 15:16:12 +08:00
Dan Poltawski fc67885300 Merge branch 'MDL-45010-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-18 14:55:33 +08:00
Sam Hemelryk cb8e625f94 MDL-45147 my: automate testing of block restriction 2014-04-18 14:17:49 +08:00
Rajeev S 99849ce131 MDL-43789: coursename disallows spaces in user bulk actions filter
Spaces and other non alphanumeric characters are disallowed in
coursename filter for user bulk actions.This prevents filtering
based upon courserole if the coursename contains spaces or other non
alphanumeric characters.
2014-04-18 11:06:47 +08:00
Dan Poltawski f21e920beb Merge branch 'wip-MDL-43626-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-18 10:52:48 +08:00
Dan Poltawski 8019375e12 Merge branch 'wip-MDL-45036-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-18 10:50:07 +08:00
Dan Poltawski 3c9bd29d89 Merge branch 'MDL-45071_m26' of https://github.com/markn86/moodle into MOODLE_26_STABLE 2014-04-18 10:47:06 +08:00
Dan Poltawski cafeac819f Merge branch 'MDL-44981-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2014-04-18 10:32:18 +08:00
Dan Poltawski 6e674be060 Merge branch 'MDL-41975-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-18 10:05:27 +08:00
Dan Poltawski 84cff47814 Merge branch 'wip-MDL-45154-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-18 09:57:22 +08:00
Eloy Lafuente (stronk7) bbbd0556e5 weekly release 2.6.2+ 2014-04-17 15:49:27 +02:00
Charles Fulton 184af2f471 MDL-45148 unit testing: pass role id instead of user id 2014-04-17 04:46:53 -07:00
Dan Poltawski b2f7a0b31f Merge branch 'MDL-44619_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-17 17:01:43 +08:00
Marina Glancy 86702277af MDL-45154 user profiles: avoid redirection warnings 2014-04-17 14:53:44 +08:00
Frederic Massart 0c30255b32 MDL-42761 badges: Remove H2s from help popup 2014-04-17 12:46:42 +08:00
Andrew Nicols 422737c54e MDL-45119 editpdf: Do not load quick comments in read-only mode 2014-04-17 11:48:58 +08:00
Andrew Nicols 9bab08a4e6 MDL-45119 ajax: Correct use of COUNT in exception dialogue 2014-04-17 11:48:58 +08:00
Andrew Nicols ab38ff96e5 MDL-45119 ajax: AJAX exceptions need a String in the Link 2014-04-17 11:48:57 +08:00
Sam Hemelryk 1a5748b258 Merge branch 'MDL-44616_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-04-17 08:52:10 +12:00
Sam Hemelryk d947f5d08f Merge branch 'wip-MDL-45116-MOODLE_26_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_26_STABLE 2014-04-17 08:39:39 +12:00
Eloy Lafuente (stronk7) 1e1acdfa77 Merge branch 'MDL-45132-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-16 19:09:58 +02:00
sam marshall 9deb25b785 MDL-27459 Completion: When ratings off, disallow grade completion
For activities that use ratings, there is no grade unless ratings
are enabled. The completion system still lets you select 'complete
when user gets a grade', which leads to later errors.

This change simply disables the 'completion on grade' field if
ratings are enabled for the activity, but not turned on in the form.
2014-04-16 15:06:00 +01:00
Kevin Wiliarty 395d730013 MDL-45116: Workshop submission title displays behind author picture 2014-04-16 09:07:12 -04:00
Frederic Massart 40cf8f62b9 MDL-45132 curl: Unit Tests for file uploads 2014-04-16 17:35:45 +08:00
Marina Glancy 65b84ebe7d Merge branch 'MDL-44951-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-16 14:45:00 +08:00
Dan Poltawski 8ce6a7dfd3 Merge branch 'wip-mdl-44977-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-04-16 14:35:01 +08:00
Frederic Massart 8fe97a4be4 MDL-41975 repository_alfresco: Updating details about Alfresco URL and timestamps 2014-04-16 13:57:09 +08:00
Michael Woods 0ca5c122aa MDL-41975 repository_alfresco: Ensure Moodle sends GMT time to Alfresco 2014-04-16 13:57:09 +08:00
Dan Poltawski 63a9c2522c Merge branch 'wip-mdl-44979-m26' of https://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-04-16 13:56:39 +08:00
Marina Glancy 29088f4bf5 Merge branch 'MDL-45081-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-16 11:52:16 +08:00
Dan Poltawski 9b7456b82e Merge branch 'MDL-44295_v26' of https://github.com/scyrma/moodle into MOODLE_26_STABLE 2014-04-16 11:39:50 +08:00
Damyon Wiese edaf96a19a Merge branch 'MDL-43277-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-04-16 11:13:12 +08:00
Dan Poltawski f588d0efad Merge branch 'MDL-44941-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-16 10:30:45 +08:00
Dan Poltawski 1c5bdb54b7 Merge branch 'MDL-45076-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-16 09:10:32 +08:00
Sam Hemelryk 5c3c27ac6a Merge branch 'w16_MDL-45100_m26_coursecontext' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-16 11:43:59 +12:00
Eloy Lafuente (stronk7) 1f405407fc weekly release 2.6.2+ 2014-04-15 16:33:02 +02:00
Frederic Massart 74b89ac031 MDL-44941 core: Removing irrelevant assertion causing failures
The timemodified property is not called when the user logs in, and
so we should not be checking if its value matches the current time.
2014-04-15 17:28:00 +08:00
David Monllao be6583cfef MDL-44616 behat: Adding steps to test MDLQA-1709 and MDLQA-62
- In an assignment with file submissions enabled,
  students can upload a set number of files.
- In assignments with file uploading enabled
  the Student can use File Picker to upload files.
2014-04-15 16:03:54 +07:00
Petr Škoda d6a3f86b2e MDL-45100 fix course_context classname PHPDdos typo in context API 2014-04-15 15:47:01 +08:00
Damyon Wiese 060c55b39a Merge branch 'w16_MDL-45098_m26_mariaenv' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-15 15:03:38 +08:00
Marina Glancy 28ff871c4a Merge branch 'MDL-45035-26' of git://github.com/ankitagarwal/moodle into MOODLE_26_STABLE 2014-04-15 14:34:48 +08:00
Tony Levi 08ab12bd48 MDL-44908: Fix upgrade_grade_item_fix_sortorder performance 2014-04-15 14:27:54 +08:00
Nadav Kavalerchik e3d3ed5afd MDL-40674 - Main menu's "sub menu" should open to the left in RTL mode (theme/clean , bootstrapbase) 2014-04-15 17:07:48 +12:00
Frederic Massart 5054d25aa2 MDL-45076 theme_bootstrapbase: Clean up participants controls LESS
Conflicts:

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

Conflicts:

	theme/bootstrapbase/style/moodle.css
2014-04-15 12:20:58 +08:00
Jonathon Fowler 911d3e9f0b MDL-44270 files: handle drag-drop js error when event has null types
This can happen when the 'dragover' event fires as has been observed
in Safari. When the dataTransfer.types property of the event is null,
accessing types.length throws a JavaScript error.
2014-04-15 14:20:01 +10:00
Dan Poltawski 8240dc0f01 Merge branch 'MDL-45003-26' of git://github.com/jamiepratt/moodle into MOODLE_26_STABLE 2014-04-15 10:33:16 +08:00
Dan Poltawski 812bee0f4f Merge branch '44354-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-04-15 10:27:09 +08:00
Andrew Nicols 570affa81b MDL-43277 block_navigation: Trim from the left for long names 2014-04-15 10:25:48 +08:00
Petr Škoda 52e403c1a3 MDL-45098 backport support for MariaDB 10.x
This will allow admins to verify 2.7 compatibility from existing 2.6 sites.
2014-04-15 09:44:30 +08:00
Nadav Kavalerchik 50333ecb3b MDL-41891 Theme: Bullets and Numbering are missing from lists, When in RTL mode (theme/clean) 2014-04-15 11:27:58 +12:00
Frederic Massart f984420e48 MDL-45081 curl: Prefer usage of CURLFile over @file arguments 2014-04-14 17:43:25 +08:00
Dan Poltawski 8939d65608 Merge branch 'wip-MDL-43719-26' of git://github.com/abgreeve/moodle into MOODLE_26_STABLE 2014-04-14 15:23:18 +08:00
Petr Škoda c4f6292cc8 MDL-45049 improve debugging output in error log for NO_DEBUG_DISPLAY scripts 2014-04-14 13:17:53 +08:00
Damyon Wiese da4533bcd4 Merge branch 'MDL-44936-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-14 11:47:45 +08:00
Adrian Greeve 7a1d3e4db8 MDL-45037 gradebook: Allow dashes in xml grade values to be ignored.
This was delivering an error message when trying to import an exported
xml file (from Moodle).
2014-04-14 10:48:42 +08:00
Dan Poltawski 951ba5e8a6 Merge branch 'MDL-45048-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-14 10:02:01 +08:00
Mark Nelson 55a579c960 MDL-45071 mod_quiz: retrieve all the name fields when deleting a user override 2014-04-13 18:42:24 -07:00
Tim Lock 6769f7302b MDL-45012: Enable support for wma files within tinymce Moodle Media plugin 2014-04-14 08:32:11 +09:30
Andrew Nicols b3cf6fa12a MDL-43145 dock: Enable regions before the drag operation starts 2014-04-13 18:27:09 +08:00
Sam Hemelryk edb5a21285 MDL-43145 dock: fixed up region_completely_docked code to ignore empty regions 2014-04-13 18:27:00 +08:00
Gareth J Barnard 1f8f7aea0a MDL-45045 block theme: Fake blocks show empty region when editing and clicked.
Conflicts:
	lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js
2014-04-11 13:17:05 +01:00
sam marshall 10d98c1b73 MDL-44991 Behat: step to check if attribute does not contain text
The step checks that an attribute exists, but doesn't contain the
specified text.

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

Also official tags are verified to be working ok. With support
for multiple options added by MDL-43713 and MDL-43738.
2014-04-11 10:38:33 +02:00
Jetha Chan 2f06c0bb34 MDL-44951 theme_bootstrapbase: forum post css tweaks
Adjusted forum post CSS for cleaner appearance.
2014-04-11 16:18:43 +08:00
Frederic Massart 3acaa40e0d MDL-45048 repository_wikimedia: Abusing usage of optional_param
The optional_param call was moved outside of the constructor
because it was called every time the repository would be initialised.
That was leading to problems when the parameter was defined from
another form and not complying with its expected type.
2014-04-11 15:20:36 +08:00
James Pratt 9cf2bc9d3f MDL-45003 qtype numeric : classify invalid response as no response. 2014-04-11 14:14:14 +07:00
James Pratt 6569d675f1 MDL-44981 quiz statistics report : Differentiating '0' and no response
in numeric questions.
2014-04-11 13:36:15 +07:00
Adrian Greeve 76204f6898 MDL-45036 blocks: Update to the mentee block sql to incorporate additional name fields. 2014-04-11 14:02:10 +08:00
Adrian Greeve f2ae72dcf0 MDL-43719 tags: Fix the sql statement in the tag management page.
MSSQL and Oracle require that all fields in teh select also be present
in the group by section.
2014-04-11 13:55:31 +08:00
Ankit Agarwal 6aa4c5186a MDL-45035 events: Fix @package and @since tags in Moodle 2.6 events 2014-04-11 13:38:12 +08:00
Adrian Greeve 8bfd7dbe2c MDL-43626 survey: Addition of additional names to survey. 2014-04-11 13:35:37 +08:00
Frederic Massart 0ae185c9d3 MDL-44936 csslib: Chunking supports @media queries and commas in rules 2014-04-11 12:04:53 +08:00
Dan Poltawski c16911b50f weekly release 2.6.2+ 2014-04-11 11:40:10 +08:00
Dan Poltawski a219c38b13 Merge branch 'install_26_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_26_STABLE 2014-04-11 11:40:06 +08:00
AMOS bot 56b837c82b Automatically generated installer lang files 2014-04-10 22:38:41 +00:00
Sam Hemelryk 6c334f7875 MDL-45046 output: reviewed standard/base layouts and converted where a better option was available 2014-04-11 09:30:55 +12:00
Damyon Wiese fd06eb6d79 MDL-44170 LTI - fix unit tests. 2014-04-10 14:15:50 +08:00
Adrian Fish 83543ffcb9 MDL-44170 Added form field for url matched type.
Added a new mod_form field called urlmatchedtypeid which is populated
by mod_form.js when a matched url is entered. On save, if typeid is 0
and urlmatchedtypeid is supplied, the type id is set to the url matched
id.
2014-04-10 13:41:46 +08:00
Sam Hemelryk bdaa857d78 MDL-44354 page: fixed ignored property when fetching a renderer 2014-04-10 15:15:38 +12:00
Rajesh Taneja 1706f96ce7 MDL-44979 behat: no need to purge all cache again 2014-04-10 11:02:12 +08:00
David Monllao f791924e98 MDL-44619 behat: Converting MDLQA-8
In a standard forum, students can start discussions
add replies and attach files to their posts.
2014-04-09 20:09:11 +07:00
David Monllao 0786df6ebe MDL-44619 behat: filemanager field manager
Enough to allow attachments use in multi-field steps.
2014-04-09 19:37:12 +07:00
David Monllao c3499ca3f2 MDL-44619 behat: Helper to init contexts outside behat 2014-04-09 19:37:12 +07:00
Marina Glancy 52194ac12d MDL-40843 chat: fixed bug in SQL query in recent activity block 2014-04-09 15:45:04 +08:00
Mark Nelson 1b1350947e MDL-42462 mod_feedback: added $OUTPUT to list of global variables used to avoid error 2014-04-09 15:37:52 +08:00
Damyon Wiese 077c9b0dcb MDL-42195 Bootstrap: Make selector for responsive images 100% the same as bootstrap3.
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-09 15:16:48 +08:00
Frederic Massart 76dcccc1e3 MDL-45010 mod_chat: Use H3 instead of H2 in recent activity info 2014-04-09 15:11:18 +08:00
Damyon Wiese 8c3065911b Merge branch 'mdl44669-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-04-09 13:11:45 +08:00
Dan Poltawski b54edd00e2 Merge branch 'MDL-29572_moodle26' of https://github.com/jrchamp/moodle into MOODLE_26_STABLE 2014-04-09 11:41:26 +08:00
Ashley Holman 9a1e5b9911 MDL-39740 grade: Fix grade_item::add_idnumber strict type checking 2014-04-09 11:13:05 +08:00
David Scotson 40a88c19a0 MDL-44468 backup: use html_writer::div call
Simplify the renderer code with the new html_writer
div function.
2014-04-08 12:10:35 +01:00
David Scotson 68de16b334 MDL-44468 backup: use notification API
Replace a hardcoded div.notifyproblem with a API call that,
in Standard theme, outputs the same HTML.

Also removes the .notifyproblem class from the heading,
as that might cause problems for themers who expect it to be
used consistently with the API.
2014-04-08 12:10:25 +01:00
Damyon Wiese a1bb397cf4 MDL-42195 Bootstrap - put border and vertical-align back in the reset for all images
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-08 17:09:05 +08:00
Michael Milette e69ef947b4 MDL-42462 - Feedback - Fix for WCAG 2.0 issue with Informational and Error Content Displayed in red
1) The same code used in other Moodle forms is now used in Feedback to display the "There are required fields in this form marked (*/Required field)" message at the top of the screen and each of the asterisks next to required fields.

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

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

Affected files:

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

Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
2014-04-08 14:12:14 +08:00
Damyon Wiese ed14b4c8e2 Merge branch 'MDL-41895-m26' of https://github.com/micaherne/moodle into MOODLE_26_STABLE 2014-04-08 13:17:09 +08:00
Marina Glancy 6520c5362b Merge branch 'MDL-44891-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-08 11:15:39 +08:00
Dan Poltawski 8cb19a633b Merge branch '42317-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-04-08 09:22:21 +08:00
Marina Glancy 1ec21eb0cd Merge branch 'MDL-42195-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-04-08 08:54:27 +08:00
Marina Glancy 87618534eb Merge branch 'm26_MDL-44938' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-08 08:54:14 +08:00
Sam Hemelryk 7e9b7392ca Merge branch 'MDL-38183_M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-04-08 11:31:01 +12:00
AMOS bot 6726fa2c1b Automatically generated installer lang files 2014-04-07 22:39:50 +00:00
Damyon Wiese b2b6b83028 Merge branch 'wip-MDL-40843-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-07 16:27:37 +08:00
Marina Glancy fce220eb97 Merge branch 'wip-mdl-44873-m26' of git://github.com/rajeshtaneja/moodle into MOODLE_26_STABLE 2014-04-07 16:16:47 +08:00
Damyon Wiese 55a65aed19 Merge branch 'wip-MDL-43021-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-07 15:21:34 +08:00
Rajesh Taneja c6aeca6c8f MDL-44977 tool_profiling: set xhprof default settings
Set xhprof default settings, even if xhprof is not installed.
If xhprof is not installed, hide profiling admin settings,
else show them.
This is needed, because if xhprof is installed, then it will
fail all non-js behats which navigate to setting under
site administration, as profiling settings get displayed on
default admin page.
2014-04-07 14:57:56 +08:00
Dan Poltawski 80787633cc Merge branch 'wip-MDL-33486-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-07 13:10:41 +08:00
Sam Hemelryk 2a20285c35 Merge branch 'm26_MDL-44738' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-07 16:02:56 +12:00
Sam Hemelryk 333d189d9f Merge branch 'w15_MDL-44882_m26_upgrademaint' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-07 15:43:15 +12:00
Petr Škoda 09df45e044 MDL-44882 always set maintenance mode on non-cached admin pages
This should resolve all issues with themes during upgrades.
2014-04-06 20:38:26 +08:00
Sam Hemelryk 62e299a73a MDL-42317 theme_bootstrapbase: more responsive styling for forms with blocks pre && post 2014-04-06 15:25:17 +12:00
Sam Hemelryk 2112362c40 MDL-41551 theme_base: improved custom block region handling for base 2014-04-06 15:17:42 +12:00
Sam Hemelryk bd82f5806a MDL-41551 blocks: added tracking and recognition of custom block regions 2014-04-06 15:17:42 +12:00
Sam Hemelryk a65cbb009c MDL-41511 blocks: improved how custom block regions were being rendered.
There is a new theme property 'blockrendermethod' that can be set by the
theme in its config.php and tells Moodle what method it is using to render
blocks in the layout files.
Either blocks, or blocks_for_region.
Then when adding custom block regions to a page content we ensure we use
the same method the theme is using elsewhere.

This is really a hack becuase we (I) didn't properly deprecate
blocks_for_region when I added the blocks method.

Conflicts:
	lib/outputlib.php
2014-04-06 15:17:42 +12:00
Mary Evans 82cce3b097 MDL-38183 themes: Removed redundant css rules for #adminsettings .form-overridden from standard and formal_white. 2014-04-05 17:11:07 +01:00
sam marshall 90761f1a8c MDL-44891 Behat: Add step to check attribute
This commit creates a Behat step of the form:

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

This is useful because unless I missed something there is currently
no step that checks attribute values; this seems like a simple
generic step. Behat is intended to check user-visible effects in
the resulting HTML, and sometimes these effects are implemented
using attribute values (two common examples are the alt= attribute,
which is visible to screenreader users, and the title= attribute,
which is visible to all users; there's also the src attribute of
images, and lots of other possibilities too).
2014-04-04 18:29:32 +01:00
Marina Glancy 28e8c6e95c MDL-40843 workshop: sort entries in recent activity block by time 2014-04-04 17:05:20 +08:00
Marina Glancy 2a91ea91b9 MDL-40843 workshop: show user names in recent activity 2014-04-04 17:05:20 +08:00
Marina Glancy b0bbb673e0 MDL-40843 recent_activity: corrections to grouping and user fields 2014-04-04 17:05:20 +08:00
Marina Glancy d66bbb7f6f MDL-40872 Restore functionality of showrecentsubmissions setting 2014-04-04 17:05:00 +08:00
Rajesh Taneja b25d44c200 MDL-44873 behat: Added suppport for clean error class. 2014-04-04 17:00:44 +08:00
Rajesh Taneja cfaaab6656 MDL-44873 theme_bootstrapbase: Added support for notifytiny class 2014-04-04 17:00:39 +08:00
Dan Marsden 626d97248d MDL-44738 SCORM: don't show heading when in popup mode. 2014-04-04 11:42:47 +13:00
Dan Marsden 0b26fbc7be MDL-44938 SCORM: missing constant definition during upgrade. 2014-04-04 09:39:57 +13:00
Mathieu Petit-Clair 61ebf8e5af MDL-44295 auth: Update truncate_userinfo to match current DB fields size. 2014-04-03 10:19:36 -04:00
AMOS bot 42a7a084d3 Automatically generated installer lang files 2014-04-03 09:28:13 +00:00
Marina Glancy 89117976b8 weekly release 2.6.2+ 2014-04-03 12:39:51 +08:00
Marina Glancy 6815afcc89 MDL-43021 course: corrections to the shortname and idnumber uniqueness validation 2014-04-03 11:07:56 +08:00
Damyon Wiese ff34886e8f MDL-42195 Bootstrap: Make bootstrap responsive images "opt-in".
This responsive image behaviour prevents setting of image sizes in text editors,
as well as a string of pix icon bugs / profile image bugs across Moodle.

We are switching to Bootstrap 3 syntax where you need img-responsive class to images
that want this behaviour.
2014-04-03 09:23:27 +08:00
Damyon Wiese 82fbf80171 Merge branch 'm26_MDL-44753' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-02 16:35:27 +08:00
Dan Marsden eee676dcd8 MDL-44753 SCORM: make correct selection of first sco - also fixes MDL-44896 2014-04-02 20:51:48 +13:00
Marina Glancy e0f47ce98c Merge branch 'MDL-41063_26' of git://github.com/jmvedrine/moodle into MOODLE_26_STABLE 2014-04-02 09:46:50 +08:00
Eloy Lafuente (stronk7) 13689e7d20 Merge branch 'MDL-31262_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-04-02 03:23:42 +02:00
Marina Glancy 7b5cd3154d Merge branch 'm26_MDL-44753' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-04-02 09:16:26 +08:00
Marina Glancy acc0d89f5b MDL-34012 chat: removing repetetive db query (performance) 2014-04-02 02:58:02 +02:00
Eloy Lafuente (stronk7) ee21ac5333 Merge branch 'wip-MDL-43398-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-02 02:50:34 +02:00
Eloy Lafuente (stronk7) 001247f3c9 Merge branch 'w14_MDL-44843_m26_localedash' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-02 02:23:46 +02:00
Eloy Lafuente (stronk7) c6008a30cd Merge branch 'wip-MDL-41102-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-02 02:20:44 +02:00
Sam Hemelryk d7680b1f23 Merge branch 'w14_MDL-44824_m26_subplugins' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-02 13:04:52 +13:00
Dan Marsden 8fb32f86dd MDL-44753 SCORM: add check during SCORM restore to make sure valid launch sco is set 2014-04-02 10:03:40 +13:00
Sam Hemelryk 15f780a797 Merge branch 'MDL-43284-26' of git://github.com/phalacee/moodle into MOODLE_26_STABLE 2014-04-02 09:27:07 +13:00
Eloy Lafuente (stronk7) 8414fb7073 Merge branch 'wip-MDL-35305-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-04-01 21:50:23 +02:00
Michael Aherne 195a68a508 MDL-41895 conditions Show details of grouping restriction 2014-04-01 13:39:18 +01:00
Marina Glancy 4c0e7741c3 Merge branch '26STABLE-wip-MDL44021' of git://github.com/jennymgray/moodle into MOODLE_26_STABLE 2014-04-01 17:40:57 +08:00
Jenny Gray c1fa0dce9e MDL-44021 mod_glossary - fixed search multiple keywords sql duplicate parameter error 2014-04-01 09:40:58 +01:00
Marina Glancy 0cbcd72e8f Merge branch 'W14_MDL-44862_m26_pgsocket' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-04-01 15:33:54 +08:00
Marina Glancy d19792d5de Merge branch 'MDL-44746_m26' of git://github.com/markn86/moodle into MOODLE_26_STABLE 2014-04-01 13:52:52 +08:00
Marina Glancy 3b7b097f2a Merge branch 'MDL-44701_26' of git://github.com/aolley/moodle into MOODLE_26_STABLE 2014-04-01 11:06:48 +08:00
Marina Glancy 1a0bc77645 Merge branch 'MDL-44670-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-04-01 11:05:45 +08:00
Marina Glancy 37de060263 Merge branch 'MDL-44590-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-04-01 11:05:09 +08:00
Marina Glancy b3aed4e5aa Merge branch 'MDL-44837-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-04-01 10:40:07 +08:00
Marina Glancy ea3d172274 Merge branch 'wip_MDL-44854_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2014-04-01 10:37:56 +08:00
Marina Glancy cc247afe18 Merge branch 'wip-MDL-44850_M26' of git://github.com/gjb2048/moodle into MOODLE_26_STABLE 2014-04-01 10:36:39 +08:00
sam marshall d0434cb119 MDL-44837 Behat: 'dialogue' selector only works for confirm dialogues
The dialogue selector in Behat (used only in one place) didn't work for
other types of standard Moodle notification dialogue.
2014-03-31 13:50:47 +01:00
Gareth J Barnard 16b4059ca3 MDL-44854 theme: 'svg' font type not served. 2014-03-31 11:07:47 +01:00
Gareth J Barnard 5b74abc38d MDL-44850 theme: 'eot' font type not served. 2014-03-31 11:05:08 +01:00
Damyon Wiese 6d458076d5 MDL-44583 Assign: performance fixes 2014-03-31 12:53:41 +08:00
Marina Glancy 26a44fc7bb Merge branch 'MDL-44822_26' of git://github.com/aolley/moodle into MOODLE_26_STABLE 2014-03-31 12:47:14 +08:00
Eloy Lafuente (stronk7) 106f3e9ce9 MDL-44862 postgres: tests to support socket & port
Both the database auth and enrol plugins use ADOdb
to perform connections. Socket and port are allowed
there if passed as "socket:port", so, when both are
configured in CFG, we pass them that way. Else
ADOdb defaults to standard port (5432).
2014-03-31 09:29:53 +08:00
Jean-Michel Vedrine 081468fdb1 MDL-41063 Lesson qformat_default class is missing an error function 2014-03-30 09:22:25 +02:00
Petr Škoda d94e9570c7 MDL-44862 always add dbport to dbsocket in pg driver
This should hopefully resolve problems when using sockets connection
to pg servers running on non-standard ports.
2014-03-30 10:13:08 +08:00
Mark Nelson d27dadca87 MDL-44746 core_events: minor changes to the user_deleted event 2014-03-28 17:08:55 -07:00
Mark Nelson 12d0bf448f MDL-44746 core_events: removed incorrect use of snapshot 2014-03-28 16:55:24 -07:00
Tim Hunt bb42f6d46f MDL-31262 fix quiz review capability check.
This change is logically the same as changing
    $this->has_capability('mod/quiz:viewreports')
to
    $this->has_capability('mod/quiz:viewreports') || $this->has_capability('mod/quiz:preview')
in the original code. However, I rewrote the logic so that we test the
most common and performance-critical case first - that of a student
lookign at their own attempt.
2014-03-28 18:40:07 +00:00
Marina Glancy e0529dfbad MDL-41102 report_performance: correctly check state of automated backups
Thanks to Renaat Debleu for the patch
2014-03-28 16:41:24 +08:00
Marina Glancy 1e6e35e277 MDL-33486 wiki: allow searching individual wikis 2014-03-28 14:16:55 +08:00
Petr Škoda fb3ed1a19a MDL-44843 try to hack around strict locale names in OSX 2014-03-28 11:49:15 +08:00
Marina Glancy 2877a60763 MDL-35305 wiki: backup and restore files
Thanks to Tatsuya Shirai for the patch
2014-03-28 10:29:20 +08:00
Marina Glancy 18b388efe7 weekly release 2.6.2+ 2014-03-27 16:52:20 +08:00
Marina Glancy 6f29595eba Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE 2014-03-27 16:52:19 +08:00
Marina Glancy d654a1e6d2 MDL-43398 wiki: remove extra Choose... option from select 2014-03-27 14:57:26 +08:00
Jerome Mouneyrac ec7de91744 MDL-43398 Wiki: Choose... options cause SQL errors or seen inappropriate. 2014-03-27 14:57:08 +08:00
Adam Olley e4f7b38325 MDL-44701 gradereport_grader: Display warning on navigation if unsaved grades are present 2014-03-27 14:59:07 +10:30
Petr Škoda e21117fdc0 MDL-44824 add missing subplugin type names 2014-03-27 11:47:51 +08:00
Petr Škoda 60b1e67bae MDL-44824 add missing subplugin type names 2014-03-27 11:47:42 +08:00
Jason Fowler 8340935745 MDL-43284 Theme: Clean theme errors with padding in Question Bank fixed 2014-03-27 10:39:53 +08:00
AMOS bot 428f3d8988 Automatically generated installer lang files 2014-03-27 00:48:27 +00:00
Adam Olley bb57cb8e34 MDL-44822 assignfeedback_editpdf: Stop test generation in is_enabled()
This change also moves one of the checks in test_gs_path. If
generateimage is false, there's no need to stat for the fixture file.
2014-03-27 10:16:38 +10:30
Tim Lock 3e12cb397a MDL-44575: Prevent cron from sending feedback notifications when assignments are hidden in the gradebook 2014-03-26 09:47:48 +10:30
Dan Poltawski 683c7ee245 Merge branch 'wip-MDL-44686-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-26 05:17:55 +08:00
Eloy Lafuente (stronk7) 1179ba8aaa Merge branch 'wip-MDL-41285-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-25 21:53:53 +01:00
Marina Glancy 15ca2aede6 Merge branch 'mdl44573-moodle26' of git://github.com/tlock/moodle into MOODLE_26_STABLE 2014-03-25 16:21:20 +08:00
Marina Glancy 0f10b86557 Merge branch 'MDL-44665_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-25 14:29:23 +08:00
Frederic Massart b3a0c630c8 MDL-44670 theme_clean: Updating screenshot 2014-03-25 12:36:56 +08:00
Sam Hemelryk 50fea8055f Merge branch 'MDL-43960-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-25 12:30:47 +13:00
Jonathan Champ 338fd396b7 MDL-29572 Grade Import: Avoid creating invalid temporary rows; Provide feedback on error 2014-03-22 21:42:25 -04:00
Tim Hunt 91148a2bb5 MDL-44665 declare all quiz page types in the blocks UI. 2014-03-21 14:43:42 +00:00
Marina Glancy c0a9f0139a MDL-44686 behat: limit failure filename length to 255 chars 2014-03-21 15:50:31 +08:00
Marina Glancy ceeac6bcc6 MDL-41285 block_recent_activity: behat test for structural changes 2014-03-21 15:47:20 +08:00
Damyon Wiese 941f4597b0 MDL-43985 Assign: Allow teachers to skip notifying students about grade update.
backport of MDL-33600
2014-03-21 14:45:12 +08:00
Marina Glancy b8604eb33b weekly release 2.6.2+ 2014-03-20 16:00:14 +08:00
Jetha Chan 8c2ec9a11a MDL-44582 installer: added check for php json extension 2014-03-19 16:17:54 +13:00
Marina Glancy 4a7ab01717 MDL-42025 behat: changed behat tag _only_local to _file_upload 2014-03-19 10:40:41 +08:00
Marina Glancy 140caa5b67 Merge branch 'MDL-43341_26' of git://github.com/nobelium/moodle into MOODLE_26_STABLE 2014-03-19 10:35:44 +08:00
Marina Glancy d632f1b82a MDL-44141 restore: added phpdocs 'since' for new method 2014-03-19 10:09:06 +08:00
Marina Glancy c21f8f13e5 Merge branch 'MDL-44141-m26' of git://github.com/sammarshallou/moodle into MOODLE_26_STABLE 2014-03-19 09:50:11 +08:00
Nobelium 4c6bf7a9ff MDL-43341 SCORM Report: spacer.gif must be managed with ->spacer 2014-03-18 19:41:41 +00:00
sam marshall 0f2929fab1 MDL-44141 Completion: System updates data during restore
The completion system has code which is supposed to prevent it
updating completion status while grades are being restored. This
code was a nasty hack and had not worked for some time. As a result
completion dates were restored incorrectly.

This commit implements a 'proper' way to find out if a restore is
currently running, replacing the previous hack.
2014-03-18 13:25:37 +00:00
Andreas Grabs 7ef24c3bde MDL-44653 mod_feedback - Include additional name fields using user_picture::fields() 2014-03-18 18:25:09 +08:00
Marina Glancy d64521fec2 Merge branch 'MDL-38636-26' of git://github.com/roelmann/moodle into MOODLE_26_STABLE 2014-03-18 17:40:09 +08:00
Jerome Mouneyrac 1df485f566 MDL-42025 assignfeedback_editpdf: add behat tests 2014-03-18 17:17:45 +08:00
Marina Glancy 2aacf70ebd Merge branch 'w12_MDL-44191_m26_mysql56' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-18 16:04:16 +08:00
Marina Glancy 99c8dbc2dd Merge branch 'MDL-44246_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-18 15:33:20 +08:00
Marina Glancy 7e0af0cdd5 Merge branch 'MDL-44416_26' of git://github.com/appalachianstate/moodle into MOODLE_26_STABLE 2014-03-18 14:46:25 +08:00
Marina Glancy cb470c3c70 Merge branch 'MDL-44148-26' of git://github.com/jethac/moodle into MOODLE_26_STABLE 2014-03-18 14:33:42 +08:00
Jetha Chan 3a1237997a MDL-44148 portfolio: set_user_config usage fix
Amended user/portfolio.php's use of portfolio_plugin_base::set_user_config to be consistent with the API.
2014-03-18 14:27:02 +08:00
Sam Hemelryk 03ba50f556 Merge branch 'wip-MDL-44542-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-18 17:05:05 +13:00
Marina Glancy c1db0e40d6 MDL-44524 feedback: fix bug in sql under oracle
Thanks to Rob King"
2014-03-18 11:59:30 +08:00
Sam Hemelryk 7b78b30212 Merge branch 'MDL-44502-26' of https://github.com/bostelm/moodle into MOODLE_26_STABLE 2014-03-18 14:41:07 +13:00
Sam Hemelryk 8b0892d605 Merge branch 'MDL-44433-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-03-18 14:36:04 +13:00
Mary Evans ecdec8f8c7 MDL-44381 theme_brick: Removed whitespace and reference to arialist theme in config.php. 2014-03-18 14:33:41 +13:00
Sam Hemelryk a2db21c633 Merge branch 'mdl44499-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE 2014-03-18 14:27:08 +13:00
Tim Lock 85165b9473 MDL-44669: mod/assign: fix batchoperations JS when using select all checkboxes. 2014-03-18 11:10:23 +10:30
Petr Škoda 5809fcf52f MDL-44527 import latest certificate bundle 2014-03-18 12:52:35 +13:00
Sam Hemelryk 80440a4a66 Merge branch 'w12_MDL-44516_m26_purifier' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-18 11:48:34 +13:00
Sam Hemelryk 683b5caa06 Merge branch 'MDL-44585-moodle26' of https://github.com/StudiUM/moodle into MOODLE_26_STABLE 2014-03-18 09:03:31 +13:00
Marina Glancy 031d1e3f7d Merge branch 'MDL-44588_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE 2014-03-17 18:19:19 +08:00
Marina Glancy 234e7b0066 Merge branch 'w12_MDL-44624_m26_dmltest' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-17 18:12:55 +08:00
Marina Glancy 682f0db9f6 Merge branch 'MDL-44356-M26' of git://github.com/lazydaisy/moodle into MOODLE_26_STABLE 2014-03-17 17:09:47 +08:00
Marina Glancy 322baf1570 Merge branch 'm26_MDL-39568' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-17 16:21:33 +08:00
Marina Glancy b28a4887f5 Merge branch 'w12_MDL-44635_m26_ajaxlogs' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-17 14:29:42 +08:00
Marina Glancy 1cd64d1208 Merge branch 'w12_MDL-44339_m26_testdebug' of git://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-17 13:53:01 +08:00
Petr Škoda 672de8ff9d MDL-44635 discard error logging during ajax tests 2014-03-17 11:31:56 +08:00
Tim Lock bd5fbede39 MDL-44573: Remove HTML tags in outputs column in offline grading worksheet 2014-03-17 12:44:21 +10:30
Petr Škoda 678ab4101a MDL-44300 force PHP 5.6.x to return raw file names for our own guessing 2014-03-17 12:34:13 +13:00
Trevor Cunningham 33c621255d MDL-39568 gradinform_guide: show maxgrade to students when viewing marking guide 2014-03-17 09:03:26 +13:00
Mary Evans 834848461c MDL-44356 theme_bootstrapbase: Centralize the drag and drop arrow in filemanager. 2014-03-15 21:30:14 +00:00
roelmann 963009a0f8 modified: core.css 2014-03-15 20:54:47 +00:00
Henning Bostelmann 4b05939d2f MDL-44502 filelib: Add mimetype for Maple worksheets 2014-03-14 11:40:18 +00:00
Gilles-Philippe Leblanc 7ae964bf89 MDL-44585 grade_import: Restrict the accepted types in the gradebook import 2014-03-14 07:37:19 -04:00
Petr Škoda a12c7eff9f MDL-44624 fix false failures in DML tests 2014-03-14 14:15:47 +08:00
Petr Škoda 9d66c76277 MDL-44516 import htmlpurifier 4.6.0 2014-03-14 12:12:22 +08:00
Petr Škoda fa4dea1472 MDL-44339 treat unexpected debugging() calls in phpunit tests as errors 2014-03-14 11:44:48 +08:00
Petr Škoda 59de93ccdf MDL-44299 resolve collision with session_gc() in PHP 5.6 2014-03-14 11:35:05 +08:00
Petr Škoda 59f3898185 MDL-44191 hack around MySQL 5.6 inability to lower auto_increment 2014-03-14 11:32:23 +08:00
Fred Woolard 69c3994c3c MDL-44416 Correct detail view paging 2014-03-13 19:45:48 -04:00
Eloy Lafuente (stronk7) 872f4e2899 weekly release 2.6.2+ 2014-03-13 23:56:07 +01:00
Eloy Lafuente (stronk7) d91852cc7e MDL-43266 testing: avoid assoc arrays for json
Last commit switched from raw arrays to associative
arrays. That leads to json_encode() to generate an
object instead of an array, ultimately leading to
problems with the rest of code expecting an array.

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

Also, fix some file permissions.
2014-03-13 22:14:50 +01:00
Dan Poltawski 70fbd52bfd MDL-44433 lang: Update the name of country code CV
ISO-3166 has updated this name to Cabo Verde:
https://www.iso.org/obp/ui/#iso:code:3166:CV
2014-03-13 17:16:33 +08:00
Damyon Wiese d58964b320 MDL-43960 assign: Add missing include
There was a report of mod_assign_save_grade webservice failing because of this.
I couldn't reproduce it, but grepping the code found one place where this include
should be added.
2014-03-13 12:47:38 +08:00
Dan Poltawski 720b69eca6 MDL-44590 behat: Add test for course category idnumber duplication 2014-03-13 10:06:33 +08:00
Dan Poltawski 6bc5172b88 MDL-44590 category: correct get_string component 2014-03-13 10:06:32 +08:00
Eloy Lafuente (stronk7) 3dd695bce0 Merge branch 'MDL-43266_26-last-fixes' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-12 23:26:25 +01:00
Tim Hunt 77437a0e61 MDL-44588 quiz: fix crazy variable called $this. 2014-03-12 18:22:10 +00:00
David Monllao 8efc71b90c MDL-43266 testing: Removing duplicated keys 2014-03-12 17:51:07 +08:00
Frederic Massart ff189a25a9 MDL-44334 lockscroll: Fix wrong warning message 2014-03-12 15:43:34 +08:00
Dan Poltawski 8a9b350182 Merge branch 'm26_MDL-43247' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-12 09:32:51 +08:00
Sam Hemelryk 390188606e Merge branch 'm26_MDL-37733' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-12 14:13:14 +13:00
Dan Poltawski 2fabb89456 Merge branch 'MDL-44061-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE 2014-03-12 09:08:52 +08:00
Eloy Lafuente (stronk7) 6d8f9d4756 Merge branch 'wip-MDL-32699-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-12 00:19:11 +01:00
Sam Hemelryk 559834f786 Merge branch 'MDL-42368-26' of git://github.com/danpoltawski/moodle into MOODLE_26_STABLE 2014-03-12 11:57:01 +13:00
Sam Hemelryk ce05c00453 Merge branch 'MDL-44345-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE 2014-03-12 11:21:59 +13:00
David Monllao 0b5ac03e36 MDL-44246 behat: New mod_quiz test when JS is disabled 2014-03-11 17:22:18 +08:00
Dan Poltawski 1c57cd34e6 Merge branch 'MDL-44095_m26' of https://github.com/shashirepo/moodle into MOODLE_26_STABLE 2014-03-11 15:50:42 +08:00
Dan Poltawski ab9986bf05 Merge branch 'wip-MDL-44337-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 15:41:51 +08:00
Dan Poltawski a808f24536 Merge branch 'MDL-44480-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-03-11 14:35:40 +08:00
Dan Poltawski 666af83e4e Merge branch 'wip-MDL-42870-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 11:37:45 +08:00
Dan Poltawski af80706515 Merge branch 'm26_MDL-44066' of git://github.com/danmarsden/moodle into MOODLE_26_STABLE 2014-03-11 11:29:00 +08:00
Sam Hemelryk 509f371389 Merge branch 'wip-MDL-40721-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 14:22:41 +13:00
Sam Hemelryk 4294de1edf Merge branch 'w11_MDL-44451_m26_addonloc' of https://github.com/skodak/moodle into MOODLE_26_STABLE 2014-03-11 14:18:14 +13:00
Eloy Lafuente (stronk7) b17149ee38 Merge branch '44547-26' of git://github.com/samhemelryk/moodle into MOODLE_26_STABLE 2014-03-11 00:28:47 +01:00
Sam Hemelryk 598bae139d MDL-44547 repository_alfresco: version bump 2014-03-11 12:05:10 +13:00
Sam Hemelryk 5caac6a494 Merge branch 'MDL-44334-26' of git://github.com/andrewnicols/moodle into MOODLE_26_STABLE
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
2014-03-11 10:10:28 +13:00
Sam Hemelryk 6b347521e3 Merge branch 'MDL-43721-26' of git://github.com/damyon/moodle into MOODLE_26_STABLE 2014-03-11 08:54:39 +13:00
Sam Hemelryk 2f5288dea0 Merge branch 'wip-MDL-44471-m26' of git://github.com/marinaglancy/moodle into MOODLE_26_STABLE 2014-03-11 08:46:11 +13:00
Dan Poltawski f9835ffed0 Merge branch 'MDL-44440_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-10 13:45:27 +08:00
David Monllao d295418ee6 MDL-44440 behat: Changing , for > as a navigation tree nodes separator
Using greater than as seems a more natural separator
than the comma when separating nodes which have a
hierarchy relation.
2014-03-10 13:35:12 +08:00
Dan Poltawski aacc48a7e6 Merge branch 'MDL-43236_26' of git://github.com/dmonllao/moodle into MOODLE_26_STABLE 2014-03-10 12:04:16 +08:00
David Monllao 4e8c18cc86 MDL-43236 behat: Backporting new method to ease backporting future scenarios 2014-03-10 11:45:19 +08:00
Niclas Tollstorff 45ac1dc77b MDL-37733 SCORM: Correct check for force new attempt 2014-03-08 21:23:05 +13:00
Dan Marsden e75b7988ef MDL-44066 Restore: Restore source field.
Causes problems when restoring a SCORM pacakge that uses an alias.
2014-03-08 21:10:13 +13:00
Dan Marsden 34d0ed1cbf MDL-43247 SCORM: improve pop-up handling and redirect to homepage on close. 2014-03-08 21:03:38 +13:00
David Monllao d7f1447861 MDL-44440 behat: Refactoring features to use I navigate to
Replacing multiple "I expand node" steps by the
new "I navigate to". Also fixing few I navigate to
when dealing with non-JS.
2014-03-07 14:54:11 +08:00
David Monllao c4934eed77 MDL-44440 behat: Other fixes to make clean work properly
- Update the step to follow links inside a treeview
  to work also when JS is disabled.
- Make regions accept header and footer.
- Change some locators refering to non-clean compatible
  regions.
- Restricting click to the table row in forum tracking
  because seems to conflict with the navigation bar when
  using narrow window sizes.
2014-03-07 14:54:11 +08:00
Rajesh Taneja ca29a8f865 MDL-44440 navigation: Added behat step to navigate from navigation/Admin block
This step will help navigate to different parts of moodle
using navigation or adminstration block.
2014-03-07 14:54:11 +08:00
David Monllao b04af90c33 MDL-44440 behat: Log out compatible with clean
.navbar needs to be clicked before following
log in or log out links.
2014-03-07 14:54:11 +08:00
Tim Lock 56e19b54af MDL-44499: Fix PHP warning in upload_manager class 2014-03-07 14:18:41 +10:30
Krister eec5c76ce1 MDL-42368 Themes: Anomaly breadcrumb fix
Previously the editing button could become unreachable with small window
sizes.
2014-03-07 11:37:17 +08:00
Marina Glancy 10bf53490d MDL-42870 completion: show failed activities as incompleted 2014-03-07 10:22:56 +08:00
Marina Glancy a2ae0a7643 MDL-44471 Revert "MDL-42238 mod_wiki: Alternate name sql update to wiki_print_recent_activity"
This reverts commit 6d3d9bd927.
2014-03-07 10:00:51 +08:00
Marina Glancy 417f7b6ecd MDL-44337 glossary: behat test for glossary categories 2014-03-07 10:00:27 +08:00
Marina Glancy cdd3ca573a MDL-40721 wiki: missing page->set_url() when restoring wiki 2014-03-07 09:58:23 +08:00
Marina Glancy b7c751a60c MDL-32699 wiki: only edit capability is required to restore wiki revision 2014-03-07 09:58:05 +08:00
Andrew Nicols 2e29720f21 MDL-44480 Javascript: Correct dialogue ID generation 2014-03-06 17:05:45 +08:00
Damyon Wiese 0a0c276e28 MDL-43721 Assign + groups: Improve performance of assign grading table
Add a function to the groups lib to filter a list of users down
to the ones who can see the module. Required because calling
groups_course_module_visible() for a list of users is too slow
and we shouldn't spread group logic outside of grouplib.php.

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

This is 12secs down to 2.5secs.
2014-03-06 15:51:22 +08:00
Damyon Wiese 3ff7c4e389 MDL-43721 Assign: Static cache for plugin is_enabled and is_visible because they get used alot 2014-03-06 15:51:22 +08:00
Frederic Massart 76170febcc MDL-44345 repository_youtube: Endless loop when reaching last results 2014-03-05 16:58:44 +08:00
Andrew Nicols 2bc980a970 MDL-44061 Ajax: Log whitespace issues to the server error log 2014-03-05 16:34:57 +08:00
Petr Škoda 8f85cea647 MDL-44451 fix plugin_misplaced_exception exception 2014-03-05 16:34:49 +08:00
Andrew Nicols 798c04b25d MDL-44334 Javascript: Prevent scroll locking for small screen heights 2014-03-05 14:08:26 +08:00
shashirepo 33ca478a19 MDL-44095 frontend: fix typos in readme file 2014-02-26 16:04:19 +05:30
Jerome Mouneyrac ed2bd8e4d3 MDL-43266 Testing sites are cleaning all test dataroot contents 2014-02-25 14:48:59 +08:00
Mark Nielsen 9b9226fc98 MDL-44014 Navigation: Set the correct context when retrieved via AJAX 2014-02-10 11:45:44 +08:00
1896 changed files with 77791 additions and 53516 deletions
+4 -4
View File
@@ -142,14 +142,14 @@ function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts,
$fieldname = $field;
if ($fieldname === 'lang') {
$fieldname = get_string('language');
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} elseif (!empty($customfields) && in_array($field, $customfields)) {
// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
} elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
$fieldname = get_string($matches[1]) . ' ' . $matches[2];
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
$fieldname = get_string($fieldname);
}
+18 -19
View File
@@ -97,27 +97,26 @@ foreach ($settingspage->children as $childpage) {
$outputhtml .= $OUTPUT->heading(html_writer::link($childpage->url, $childpage->visiblename), 3);
} else if ($childpage instanceof admin_settingpage) {
$outputhtml .= $OUTPUT->heading(html_writer::link(new moodle_url('/'.$CFG->admin.'/settings.php', array('section' => $childpage->name)), $childpage->visiblename), 3);
// If its a settings page and has settings lets display them.
if (!empty($childpage->settings)) {
$outputhtml .= html_writer::start_tag('fieldset', array('class' => 'adminsettings'));
foreach ($childpage->settings as $setting) {
if (empty($setting->nosave)) {
$savebutton = true;
}
$fullname = $setting->get_full_name();
if (array_key_exists($fullname, $adminroot->errors)) {
$data = $adminroot->errors[$fullname]->data;
} else {
$data = $setting->get_setting();
}
$outputhtml .= html_writer::tag('div', '<!-- -->', array('class' => 'clearer'));
$outputhtml .= $setting->output_html($data);
}
$outputhtml .= html_writer::end_tag('fieldset');
}
} else if ($childpage instanceof admin_category) {
$outputhtml .= $OUTPUT->heading(html_writer::link(new moodle_url('/'.$CFG->admin.'/category.php', array('category' => $childpage->name)), get_string('admincategory', 'admin', $childpage->visiblename)), 3);
} else {
continue;
}
if (!empty($childpage->settings)) {
$outputhtml .= html_writer::start_tag('fieldset', array('class' => 'adminsettings'));
foreach ($childpage->settings as $setting) {
if (empty($setting->nosave)) {
$savebutton = true;
}
$fullname = $setting->get_full_name();
if (array_key_exists($fullname, $adminroot->errors)) {
$data = $adminroot->errors[$fullname]->data;
} else {
$data = $setting->get_setting();
}
$outputhtml .= html_writer::tag('div', '<!-- -->', array('class' => 'clearer'));
$outputhtml .= $setting->output_html($data);
}
$outputhtml .= html_writer::end_tag('fieldset');
}
}
if ($savebutton) {
+1 -9
View File
@@ -201,17 +201,9 @@ if (defined('COMPONENT_CLASSLOADER')) {
require($CFG->dirroot.'/version.php');
$CFG->target_release = $release;
$_SESSION = array();
$_SESSION['SESSION'] = new stdClass();
$_SESSION['SESSION']->lang = $CFG->lang;
$_SESSION['USER'] = new stdClass();
$_SESSION['USER']->id = 0;
$_SESSION['USER']->mnethostid = 1;
\core\session\manager::init_empty_session();
global $SESSION;
global $USER;
$SESSION = &$_SESSION['SESSION'];
$USER = &$_SESSION['USER'];
global $COURSE;
$COURSE = new stdClass();
+202
View File
@@ -0,0 +1,202 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* MySQL table row compression tool tool.
*
* @package core
* @copyright 2014 Totara Learning Solutions Ltd {@link http://www.totaralms.com/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @author Petr Skoda <petr.skoda@totaralms.com>
*/
define('CLI_SCRIPT', true);
require(dirname(__FILE__).'/../../config.php');
require_once($CFG->libdir . '/clilib.php');
if ($DB->get_dbfamily() !== 'mysql') {
cli_error('This script is used for MySQL databases only.');
}
$engine = strtolower($DB->get_dbengine());
if ($engine !== 'innodb' and $engine !== 'xtradb') {
cli_error('This script is for MySQL servers using InnoDB or XtraDB engines only.');
}
list($options, $unrecognized) = cli_get_params(
array('help' => false, 'info' => false, 'list' => false, 'fix' => false, 'showsql' => false),
array('h' => 'help', 'i' => 'info', 'l' => 'list', 'f' => 'fix', 's' => 'showsql')
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$help =
"Script for detection of row size problems in MySQL InnoDB tables.
By default InnoDB storage table is using legacy Antelope file format
which has major restriction on database row size.
Use this script to detect and fix database tables with potential data
overflow problems.
Options:
-i, --info Show database information
-l, --list List problematic tables
-f, --fix Attempt to fix all tables (requires SUPER privilege)
-s, --showsql Print SQL statements for fixing of tables
-h, --help Print out this help
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/mysql_compressed_rows.php -l
";
/** @var mysql_sql_generator $generator */
$generator = $DB->get_manager()->generator;
$info = $DB->get_server_info();
$filepertable = $DB->get_record_sql("SHOW VARIABLES LIKE 'innodb_file_per_table'");
$filepertable = $filepertable ? $filepertable->value : '';
$fileformat = $DB->get_record_sql("SHOW VARIABLES LIKE 'innodb_file_format'");
$fileformat = $fileformat ? $fileformat->value : '';
$prefix = $DB->get_prefix();
$database = $CFG->dbname;
if (!empty($options['info'])) {
echo "Database version: " . $info['description'] . "\n";
echo "Database name: $database\n";
echo "Database engine: " . $DB->get_dbengine() . "\n";
echo "innodb_file_per_table: $filepertable\n";
echo "innodb_file_format: $fileformat\n";
exit(0);
} else if (!empty($options['list'])) {
$problem = false;
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT);
echo str_pad($format, 11, ' ', STR_PAD_RIGHT);
if ($format === 'Compact' or $format === 'Redundant') {
$problem = true;
echo " (needs fixing)\n";
} else if ($format !== 'Compressed' and $format !== 'Dynamic') {
echo " (unknown)\n";
} else {
echo "\n";
}
}
if ($problem) {
exit(1);
}
exit(0);
} else if (!empty($options['fix'])) {
$fixtables = array();
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
if ($format === 'Compact' or $format === 'Redundant') {
$fixtables[$table] = $table;
}
}
if (!$fixtables) {
echo "No changes necessary\n";
exit(0);
}
if ($filepertable !== 'ON') {
try {
$DB->execute("SET GLOBAL innodb_file_per_table=1");
} catch (dml_exception $e) {
echo "Cannot enable GLOBAL innodb_file_per_table setting, use --showsql option and execute the statements manually.";
throw $e;
}
}
if ($fileformat !== 'Barracuda') {
try {
$DB->execute("SET GLOBAL innodb_file_format=Barracuda");
} catch (dml_exception $e) {
echo "Cannot change GLOBAL innodb_file_format setting, use --showsql option and execute the statements manually.";
throw $e;
}
}
if (!$DB->is_compressed_row_format_supported(false)) {
echo "MySQL server is not compatible with compressed row format.";
exit(1);
}
foreach ($fixtables as $table) {
$DB->change_database_structure("ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed");
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT) . " ... Compressed\n";
}
exit(0);
} else if (!empty($options['showsql'])) {
$fixtables = array();
foreach ($DB->get_tables(false) as $table) {
$columns = $DB->get_columns($table, false);
$size = $generator->guess_antolope_row_size($columns);
$format = $DB->get_row_format($table);
if ($size <= $generator::ANTELOPE_MAX_ROW_SIZE) {
continue;
}
if ($format === 'Compact' or $format === 'Redundant') {
$fixtables[$table] = $table;
}
}
if (!$fixtables) {
echo "No changes necessary\n";
exit(0);
}
echo "Copy the following SQL statements and execute them using account with SUPER privilege:\n\n";
echo "USE $database;\n";
echo "SET SESSION sql_mode=STRICT_ALL_TABLES;\n";
echo "SET GLOBAL innodb_file_per_table=1;\n";
echo "SET GLOBAL innodb_file_format=Barracuda;\n";
foreach ($fixtables as $table) {
echo "ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed;\n";
}
echo "\n";
exit(0);
} else {
echo $help;
die;
}
+3 -3
View File
@@ -45,7 +45,7 @@ admin_externalpage_setup('environment', '', $extraurlparams);
// Handle the 'updatecomponent' action
if ($action == 'updatecomponent' && confirm_sesskey()) {
// Create component installer and execute it
if ($cd = new component_installer('http://download.moodle.org',
if ($cd = new component_installer('https://download.moodle.org',
'environment',
'environment.zip')) {
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
@@ -53,7 +53,7 @@ if ($action == 'updatecomponent' && confirm_sesskey()) {
case COMPONENT_ERROR:
if ($cd->get_error() == 'remotedownloaderror') {
$a = new stdClass();
$a->url = 'http://download.moodle.org/environment/environment.zip';
$a->url = 'https://download.moodle.org/environment/environment.zip';
$a->dest = $CFG->dataroot . '/';
print_error($cd->get_error(), 'error', $PAGE->url, $a);
die();
@@ -102,7 +102,7 @@ if ($contents = load_environment_xml()) {
}
// Get the results of the environment check.
list($envstatus, $environment_results) = check_moodle_environment($version);
list($envstatus, $environment_results) = check_moodle_environment($version, ENV_SELECT_NEWER);
// Display the page.
$output = $PAGE->get_renderer('core', 'admin');
+123
View File
@@ -1136,4 +1136,127 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.8" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+26 -15
View File
@@ -45,6 +45,13 @@ if (!function_exists('iconv')) {
die();
}
// Make sure php5-json is available.
if (!function_exists('json_encode') || !function_exists('json_decode')) {
// This also shouldn't happen.
echo 'Moodle requires the json PHP extension. Please install or enable the json extension.';
die();
}
define('NO_OUTPUT_BUFFERING', true);
if ((isset($_GET['cache']) and $_GET['cache'] === '0')
@@ -234,6 +241,13 @@ if (!core_tables_exist()) {
// Check version of Moodle code on disk compared with database
// and upgrade if possible.
if (!$cache) {
// Do not try to do anything fancy in non-cached mode,
// this prevents themes from fetching data from non-existent tables.
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
}
$stradministration = get_string('administration');
$PAGE->set_context(context_system::instance());
@@ -264,9 +278,6 @@ if (!$cache and $version > $CFG->version) { // upgrade
// We then purge the regular caches.
purge_all_caches();
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
@@ -344,8 +355,6 @@ if (!$cache and $version > $CFG->version) { // upgrade
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$reloadurl = new moodle_url('/admin/index.php', array('confirmupgrade' => 1, 'confirmrelease' => 1, 'cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
@@ -373,14 +382,9 @@ if (!$cache and moodle_needs_upgrading()) {
if (!$PAGE->headerprinted) {
// means core upgrade or installation was not already done
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
if (!$confirmplugins) {
$strplugincheck = get_string('plugincheck');
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
$PAGE->navbar->add($strplugincheck);
$PAGE->set_title($strplugincheck);
$PAGE->set_heading($strplugincheck);
@@ -395,6 +399,9 @@ if (!$cache and moodle_needs_upgrading()) {
redirect($PAGE->url);
}
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$deployer = \core\update\deployer::instance();
if ($deployer->enabled()) {
$deployer->initialize($PAGE->url, $PAGE->url);
@@ -418,8 +425,8 @@ if (!$cache and moodle_needs_upgrading()) {
// Make sure plugin dependencies are always checked.
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->set_pagelayout('maintenance');
$PAGE->set_popup_notification_allowed(false);
/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
$reloadurl = new moodle_url('/admin/index.php', array('cache' => 0));
echo $output->unsatisfied_dependencies_page($version, $failed, $reloadurl);
die();
@@ -586,10 +593,14 @@ $availableupdatesfetch = $updateschecker->get_last_timefetched();
$buggyiconvnomb = (!function_exists('mb_convert_encoding') and @iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
//check if the site is registered on Moodle.org
$registered = $DB->count_records('registration_hubs', array('huburl' => HUB_MOODLEORGHUBURL, 'confirmed' => 1));
// Check if there are any cache warnings.
$cachewarnings = cache_helper::warnings();
admin_externalpage_setup('adminnotifications');
/* @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered);
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings);
+47 -19
View File
@@ -303,12 +303,13 @@ class core_admin_renderer extends plugin_renderer_base {
* @param bool $buggyiconvnomb warn iconv problems
* @param array|null $availableupdates array of \core\update\info objects or null
* @param int|null $availableupdatesfetch timestamp of the most recent updates fetch or null (unknown)
* @param string[] $cachewarnings An array containing warnings from the Cache API.
*
* @return string HTML to output.
*/
public function admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch,
$buggyiconvnomb, $registered) {
$buggyiconvnomb, $registered, array $cachewarnings = array()) {
global $CFG;
$output = '';
@@ -321,6 +322,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->cron_overdue_warning($cronoverdue);
$output .= $this->db_problems($dbproblems);
$output .= $this->maintenance_mode_warning($maintenancemode);
$output .= $this->cache_warnings($cachewarnings);
$output .= $this->registration_warning($registered);
//////////////////////////////////////////////////////////////////////////////////////////////////
@@ -583,6 +585,19 @@ class core_admin_renderer extends plugin_renderer_base {
return $this->warning($dbproblems);
}
/**
* Renders cache warnings if there are any.
*
* @param string[] $cachewarnings
* @return string
*/
public function cache_warnings(array $cachewarnings) {
if (!count($cachewarnings)) {
return '';
}
return join("\n", array_map(array($this, 'warning'), $cachewarnings));
}
/**
* Render an appropriate message if the site in in maintenance mode.
* @param bool $maintenancemode
@@ -1011,19 +1026,28 @@ class core_admin_renderer extends plugin_renderer_base {
}
foreach ($plugin->get_other_required_plugins() as $component => $requiredversion) {
$ok = true;
$otherplugin = $pluginman->get_plugin_info($component);
$actions = array();
if (is_null($otherplugin)) {
$ok = false;
} else if ($requiredversion != ANY_VERSION and $otherplugin->versiondisk < $requiredversion) {
$ok = false;
}
// The required plugin is not installed.
$class = 'requires-failed requires-missing';
$installurl = new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $component));
$uploadurl = new moodle_url('/admin/tool/installaddon/');
$actions[] = html_writer::link($installurl, get_string('dependencyinstall', 'core_plugin'));
$actions[] = html_writer::link($uploadurl, get_string('dependencyupload', 'core_plugin'));
} else if ($requiredversion != ANY_VERSION and $otherplugin->versiondisk < $requiredversion) {
// The required plugin is installed but needs to be updated.
$class = 'requires-failed requires-outdated';
if (!$otherplugin->is_standard()) {
$updateurl = new moodle_url($this->page->url, array('sesskey' => sesskey(), 'fetchupdates' => 1));
$actions[] = html_writer::link($updateurl, get_string('checkforupdates', 'core_plugin'));
}
if ($ok) {
$class = 'requires-ok';
} else {
$class = 'requires-failed';
// Already installed plugin with sufficient version.
$class = 'requires-ok';
}
if ($requiredversion != ANY_VERSION) {
@@ -1031,11 +1055,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' => $componenturl, 'version' => $requiredversion)),
html_writer::div(get_string($str, 'core_plugin',
array('component' => $component, 'version' => $requiredversion)), 'component').
html_writer::div(implode(' | ', $actions), 'actions'),
array('class' => $class));
}
@@ -1355,7 +1379,7 @@ class core_admin_renderer extends plugin_renderer_base {
* configuration and how it suits Moodle needs.
*
* @param boolean $result final result of the check (true/false)
* @param array $environment_results array of results gathered
* @param environment_results[] $environment_results array of results gathered
* @return string HTML to output.
*/
public function environment_check_table($result, $environment_results) {
@@ -1367,9 +1391,10 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('name'),
get_string('info'),
get_string('report'),
get_string('plugin'),
get_string('status'),
);
$servertable->colclasses = array('centeralign name', 'centeralign status', 'leftalign report', 'centeralign info');
$servertable->colclasses = array('centeralign name', 'centeralign info', 'leftalign report', 'leftalign plugin', 'centeralign status');
$servertable->attributes['class'] = 'admintable environmenttable generaltable';
$servertable->id = 'serverstatus';
@@ -1379,9 +1404,10 @@ class core_admin_renderer extends plugin_renderer_base {
$othertable->head = array(
get_string('info'),
get_string('report'),
get_string('plugin'),
get_string('status'),
);
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'aligncenter status');
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'alignleft plugin', 'aligncenter status');
$othertable->attributes['class'] = 'admintable environmenttable generaltable';
$othertable->id = 'otherserverstatus';
@@ -1397,6 +1423,7 @@ class core_admin_renderer extends plugin_renderer_base {
$type = $environment_result->getPart();
$info = $environment_result->getInfo();
$status = $environment_result->getStatus();
$plugin = $environment_result->getPluginName();
$error_code = $environment_result->getErrorCode();
// Process Report field
$rec = new stdClass();
@@ -1473,7 +1500,8 @@ class core_admin_renderer extends plugin_renderer_base {
if (!empty($info)){
$linkparts[] = $info;
}
if (empty($CFG->docroot)) {
// Plugin environments do not have docs pages yet.
if (empty($CFG->docroot) or $environment_result->plugin) {
$report = get_string($stringtouse, 'admin', $rec);
} else {
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec));
@@ -1499,9 +1527,9 @@ class core_admin_renderer extends plugin_renderer_base {
// Add the row to the table
if ($environment_result->getPart() == 'custom_check'){
$otherdata[$messagetype][] = array ($info, $report, $status);
$otherdata[$messagetype][] = array ($info, $report, $plugin, $status);
} else {
$serverdata[$messagetype][] = array ($type, $info, $report, $status);
$serverdata[$messagetype][] = array ($type, $info, $report, $plugin, $status);
}
}
}
+2 -2
View File
@@ -176,7 +176,7 @@ if ($roleid) {
// Show UI for assigning a particular role to users.
// Print a warning if we are assigning system roles.
if ($context->contextlevel == CONTEXT_SYSTEM) {
echo $OUTPUT->box(get_string('globalroleswarning', 'core_role'));
echo $OUTPUT->notification(get_string('globalroleswarning', 'core_role'));
}
// Print the form.
@@ -251,7 +251,7 @@ if ($roleid) {
// Print a warning if we are assigning system roles.
if ($context->contextlevel == CONTEXT_SYSTEM) {
echo $OUTPUT->box(get_string('globalroleswarning', 'core_role'));
echo $OUTPUT->notification(get_string('globalroleswarning', 'core_role'));
}
// Print instruction.
+10 -2
View File
@@ -74,8 +74,16 @@ abstract class core_role_capability_table_base {
public function display() {
if (count($this->capabilities) > self::NUM_CAPS_FOR_SEARCH) {
global $PAGE;
$PAGE->requires->strings_for_js(array('filter', 'clear'), 'moodle');
$PAGE->requires->js_init_call('M.core_role.init_cap_table_filter', array($this->id, $this->context->id));
$jsmodule = array(
'name' => 'rolescapfilter',
'fullpath' => '/admin/roles/module.js',
'strings' => array(
array('filter', 'moodle'),
array('clear', 'moodle'), ),
'requires' => array('node', 'cookie', 'escape')
);
$PAGE->requires->js_init_call('M.core_role.init_cap_table_filter', array($this->id, $this->context->id), false,
$jsmodule);
}
echo '<table class="' . implode(' ', $this->classes) . '" id="' . $this->id . '">' . "\n<thead>\n";
echo '<tr><th class="name" align="left" scope="col">' . get_string('capability', 'core_role') . '</th>';
@@ -48,11 +48,12 @@ class core_role_potential_assignees_below_course extends core_role_assign_user_s
$fields = 'SELECT ' . $this->required_fields_sql('u');
$countfields = 'SELECT COUNT(u.id)';
$sql = " FROM {user} u
LEFT JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.roleid = :roleid AND ra.contextid = :contextid)
WHERE u.id IN ($enrolsql)
$wherecondition
AND ra.id IS NULL";
$sql = " FROM ($enrolsql) enrolled_users_view
JOIN {user} u ON u.id = enrolled_users_view.id
LEFT JOIN {role_assignments} ra ON (ra.userid = enrolled_users_view.id AND
ra.roleid = :roleid AND ra.contextid = :contextid)
WHERE ra.id IS NULL
$wherecondition";
$params['contextid'] = $this->context->id;
$params['roleid'] = $this->roleid;
+2 -1
View File
@@ -75,7 +75,8 @@ switch ($action) {
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid));
$a->count = $DB->count_records_select('role_assignments',
'roleid = ?', array($roleid), 'COUNT(DISTINCT userid)');
$formcontinue = new single_button(new moodle_url($baseurl, $optionsyes), get_string('yes'));
$formcancel = new single_button(new moodle_url($baseurl), get_string('no'), 'get');
+1 -1
View File
@@ -51,7 +51,7 @@ M.core_role.init_cap_table_filter = function(Y, tableid, contextid) {
marginRight : 'auto'
});
// Create the capability search input.
this.input = Y.Node.create('<input type="text" id="'+this.table.get('id')+'capabilitysearch" value="'+filtervalue+'" />');
this.input = Y.Node.create('<input type="text" id="'+this.table.get('id')+'capabilitysearch" value="'+Y.Escape.html(filtervalue)+'" />');
// Create a label for the search input.
this.label = Y.Node.create('<label for="'+this.input.get('id')+'">'+M.str.moodle.filter+' </label>');
// Create a clear button to clear the input.
-1
View File
@@ -139,7 +139,6 @@ if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
array(
'context' => $context,
'objectid' => $roleid,
'courseid' => $courseid
)
);
+39 -41
View File
@@ -44,48 +44,46 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configcheckbox('debugpageinfo', new lang_string('debugpageinfo', 'admin'), new lang_string('configdebugpageinfo', 'admin'), 0));
$ADMIN->add('development', $temp);
// "profiling" settingpage (conditionally if the 'xhprof' extension is available only)
if (extension_loaded('xhprof') && function_exists('xhprof_enable')) {
$temp = new admin_settingpage('profiling', new lang_string('profiling', 'admin'));
// Main profiling switch
$temp->add(new admin_setting_configcheckbox('profilingenabled', new lang_string('profilingenabled', 'admin'), new lang_string('profilingenabled_help', 'admin'), false));
// List of URLs that will be automatically profiled
$temp->add(new admin_setting_configtextarea('profilingincluded', new lang_string('profilingincluded', 'admin'), new lang_string('profilingincluded_help', 'admin'), ''));
// List of URLs that won't be profiled ever
$temp->add(new admin_setting_configtextarea('profilingexcluded', new lang_string('profilingexcluded', 'admin'), new lang_string('profilingexcluded_help', 'admin'), ''));
// Allow random profiling each XX requests
$temp->add(new admin_setting_configtext('profilingautofrec', new lang_string('profilingautofrec', 'admin'), new lang_string('profilingautofrec_help', 'admin'), 0, PARAM_INT));
// Allow PROFILEME/DONTPROFILEME GPC
$temp->add(new admin_setting_configcheckbox('profilingallowme', new lang_string('profilingallowme', 'admin'), new lang_string('profilingallowme_help', 'admin'), false));
// Allow PROFILEALL/PROFILEALLSTOP GPC
$temp->add(new admin_setting_configcheckbox('profilingallowall', new lang_string('profilingallowall', 'admin'), new lang_string('profilingallowall_help', 'admin'), false));
// TODO: Allow to skip PHP functions (XHPROF_FLAGS_NO_BUILTINS)
// TODO: Allow to skip call_user functions (ignored_functions array)
// Specify the life time (in minutes) of profiling runs
$temp->add(new admin_setting_configselect('profilinglifetime', new lang_string('profilinglifetime', 'admin'), new lang_string('profilinglifetime_help', 'admin'), 24*60, array(
0 => new lang_string('neverdeleteruns', 'admin'),
30*24*60 => new lang_string('numdays', '', 30),
15*24*60 => new lang_string('numdays', '', 15),
7*24*60 => new lang_string('numdays', '', 7),
4*24*60 => new lang_string('numdays', '', 4),
2*24*60 => new lang_string('numdays', '', 2),
24*60 => new lang_string('numhours', '', 24),
16*80 => new lang_string('numhours', '', 16),
8*60 => new lang_string('numhours', '', 8),
4*60 => new lang_string('numhours', '', 4),
2*60 => new lang_string('numhours', '', 2),
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);
}
// "Profiling" settingpage (conditionally if the 'xhprof' extension is available only).
$xhprofenabled = extension_loaded('xhprof') && function_exists('xhprof_enable');
$temp = new admin_settingpage('profiling', new lang_string('profiling', 'admin'), 'moodle/site:config', !$xhprofenabled);
// Main profiling switch.
$temp->add(new admin_setting_configcheckbox('profilingenabled', new lang_string('profilingenabled', 'admin'), new lang_string('profilingenabled_help', 'admin'), false));
// List of URLs that will be automatically profiled.
$temp->add(new admin_setting_configtextarea('profilingincluded', new lang_string('profilingincluded', 'admin'), new lang_string('profilingincluded_help', 'admin'), ''));
// List of URLs that won't be profiled ever.
$temp->add(new admin_setting_configtextarea('profilingexcluded', new lang_string('profilingexcluded', 'admin'), new lang_string('profilingexcluded_help', 'admin'), ''));
// Allow random profiling each XX requests.
$temp->add(new admin_setting_configtext('profilingautofrec', new lang_string('profilingautofrec', 'admin'), new lang_string('profilingautofrec_help', 'admin'), 0, PARAM_INT));
// Allow PROFILEME/DONTPROFILEME GPC.
$temp->add(new admin_setting_configcheckbox('profilingallowme', new lang_string('profilingallowme', 'admin'), new lang_string('profilingallowme_help', 'admin'), false));
// Allow PROFILEALL/PROFILEALLSTOP GPC.
$temp->add(new admin_setting_configcheckbox('profilingallowall', new lang_string('profilingallowall', 'admin'), new lang_string('profilingallowall_help', 'admin'), false));
// TODO: Allow to skip PHP functions (XHPROF_FLAGS_NO_BUILTINS)
// TODO: Allow to skip call_user functions (ignored_functions array)
// Specify the life time (in minutes) of profiling runs.
$temp->add(new admin_setting_configselect('profilinglifetime', new lang_string('profilinglifetime', 'admin'), new lang_string('profilinglifetime_help', 'admin'), 24*60, array(
0 => new lang_string('neverdeleteruns', 'admin'),
30*24*60 => new lang_string('numdays', '', 30),
15*24*60 => new lang_string('numdays', '', 15),
7*24*60 => new lang_string('numdays', '', 7),
4*24*60 => new lang_string('numdays', '', 4),
2*24*60 => new lang_string('numdays', '', 2),
24*60 => new lang_string('numhours', '', 24),
16*80 => new lang_string('numhours', '', 16),
8*60 => new lang_string('numhours', '', 8),
4*60 => new lang_string('numhours', '', 4),
2*60 => new lang_string('numhours', '', 2),
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);
// Web service test clients DO NOT COMMIT : THE EXTERNAL WEB PAGE IS NOT AN ADMIN PAGE !!!!!
$ADMIN->add('development', new admin_externalpage('testclient', new lang_string('testclient', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/testclient.php"));
+1 -1
View File
@@ -375,7 +375,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
2 => get_string('showmarkandmax', 'question'),
);
$settings->add(new admin_setting_configselect('question_preview/marks',
get_string('marks', 'question'), '', 1, $marksoptions));
get_string('marks', 'question'), '', 2, $marksoptions));
$settings->add(new admin_setting_configselect('question_preview/markdp',
get_string('decimalplacesingrades', 'question'), '', 2, array(0, 1, 2, 3, 4, 5, 6, 7)));
+3 -2
View File
@@ -80,7 +80,8 @@ class behat_admin extends behat_base {
// Single element settings.
try {
$fieldxpath = "//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]" .
"[@id=//label[contains(normalize-space(.), $label)]/@for]";
"[@id=//label[contains(normalize-space(.), $label)]/@for or " .
"@id=//span[contains(normalize-space(.), $label)]/preceding-sibling::label[1]/@for]";
$fieldnode = $this->find('xpath', $fieldxpath, $exception);
$formfieldtypenode = $this->find('xpath', $fieldxpath . "/ancestor::div[@class='form-setting']" .
@@ -89,7 +90,7 @@ class behat_admin extends behat_base {
} catch (ElementNotFoundException $e) {
// Multi element settings, interacting only the first one.
$fieldxpath = "//descendant::label[.= $label]/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]" .
$fieldxpath = "//*[label[.= $label]|span[.= $label]]/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]" .
"/descendant::div[@class='form-group']/descendant::*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]";
$fieldnode = $this->find('xpath', $fieldxpath);
@@ -0,0 +1,27 @@
@core @core_admin
Feature: Set admin settings value
In order to set admin settings value
As an admin
I need to set admin setting value and verify it is applied
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course fullname | C_shortname | 0 |
And I log in as "admin"
And I should see "Course fullname"
And I should not see "C_shortname Course fullname"
Scenario: set admin value with full name
Given I set the following administration settings values:
| Display extended course names | 1 |
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
Scenario: set admin value with short name
Given I set the following administration settings values:
| courselistshortnames | 1 |
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
+1 -5
View File
@@ -14,11 +14,7 @@ Feature: Upload users
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
And I collapse "Front page settings" node
And I expand "Site administration" node
And I expand "Users" node
And I expand "Accounts" node
And I follow "Upload users"
And I navigate to "Upload users" node in "Site administration > Users > Accounts"
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
And I press "Upload users"
Then I should see "Upload users preview"
+5
View File
@@ -27,6 +27,11 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/behat/locallib.php');
require_once($CFG->libdir . '/behat/classes/behat_config_manager.php');
// This page usually takes an exceedingly long time to load, so we need to
// increase the time limit. At present it takes about a minute on some
// systems, but let's allow room for expansion.
set_time_limit(300);
$filter = optional_param('filter', '', PARAM_ALPHANUMEXT);
$type = optional_param('type', false, PARAM_ALPHAEXT);
$component = optional_param('component', '', PARAM_ALPHAEXT);
+4 -4
View File
@@ -68,10 +68,10 @@ class tool_behat_renderer extends plugin_renderer_base {
$html .= $this->output->box_start();
$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');
$html .= implode(html_writer::end_tag('li') . html_writer::empty_tag('li'), $infos);
$html .= html_writer::start_tag('div');
$html .= html_writer::start_tag('ul');
$html .= html_writer::start_tag('li');
$html .= implode(html_writer::end_tag('li') . html_writer::start_tag('li'), $infos);
$html .= html_writer::end_tag('li');
$html .= html_writer::end_tag('ul');
$html .= html_writer::end_tag('div');
@@ -40,7 +40,7 @@ Feature: Page contents assertions
And I log in as "admin"
And I follow "Course 1"
When I dock "Administration" block
Then I should not see "Question bank" in the "region-pre" "region"
Then I should not see "Question bank" in the ".block-region" "css_element"
And I click on "//div[@id='dock']/descendant::h2[normalize-space(.)='Administration']" "xpath_element"
@javascript
@@ -50,4 +50,4 @@ Feature: Page contents assertions
| Course 1 | C1 | 0 |
And I log in as "admin"
When I dock "Administration" block
Then I should not see "Turn editing on" in the "region-pre" "region"
Then I should not see "Turn editing on" in the ".block-region" "css_element"
@@ -233,3 +233,58 @@ Feature: Set up contextual data for tests
And the "members" select box should contain "Student 1"
And I select "Group 2 (1)" from "groups"
And the "members" select box should contain "Student 2"
Scenario: Add cohorts and cohort members with data generator
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
And the following "cohorts" exist:
| name | idnumber |
| System cohort A | CHSA |
And the following "cohorts" exist:
| name | idnumber | contextlevel | reference |
| System cohort B | CHSB | System | |
| Cohort in category | CHC | Category | CAT1 |
| Empty cohort | CHE | Category | CAT1 |
And the following "cohort members" exist:
| user | cohort |
| student1 | CHSA |
| student2 | CHSB |
| student1 | CHSB |
| student1 | CHC |
When I log in as "admin"
And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
Then the following should exist in the "cohorts" table:
| Name | Cohort size |
| System cohort A | 1 |
| System cohort B | 2 |
And I should not see "Cohort in category"
And I follow "Courses"
And I follow "Cat 1"
And I follow "Cohorts"
And I should not see "System cohort"
And the following should exist in the "cohorts" table:
| Name | Cohort size |
| Cohort in category | 1 |
| Empty cohort | 0 |
Scenario: Add grade categories with data generator
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "grade categories" exist:
| fullname | course |
| Grade category 1 | C1|
And the following "grade categories" exist:
| fullname | course | gradecategory |
| Grade sub category 2 | C1 | Grade category 1|
When I log in as "admin"
And I follow "Courses"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
@@ -7,9 +7,7 @@ Feature: List the system steps definitions
Background:
Given I am on homepage
And I log in as "admin"
And I expand "Site administration" node
And I expand "Development" node
And I follow "Acceptance testing"
And I navigate to "Acceptance testing" node in "Site administration > Development"
@javascript
Scenario: Accessing the list
@@ -7,8 +7,7 @@ Feature: Forms manipulation
@javascript
Scenario: Basic forms manipulation
Given I log in as "admin"
And I follow "Admin User"
And I follow "Edit profile"
And I navigate to "Edit profile" node in "My profile settings"
When I fill in "First name" with "Field value"
And I select "Plain text area" from "Text editor"
And I check "Unmask"
@@ -10,8 +10,7 @@ Feature: Transform steps arguments
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Admin User"
And I follow "Edit profile"
And I navigate to "Edit profile" node in "My profile settings"
Scenario: Use nasty strings on steps arguments
When I fill in "Surname" with "$NASTYSTRING1"
@@ -36,6 +36,10 @@ class tool_generator_course_backend extends tool_generator_backend {
* @var array Number of sections in course
*/
private static $paramsections = array(1, 10, 100, 500, 1000, 2000);
/**
* @var array Number of assignments in course
*/
private static $paramassignments = array(1, 10, 100, 500, 1000, 2000);
/**
* @var array Number of Page activities in course
*/
@@ -179,6 +183,7 @@ class tool_generator_course_backend extends tool_generator_backend {
// Make course.
$this->course = $this->create_course();
$this->create_users();
$this->create_assignments();
$this->create_pages();
$this->create_small_files();
$this->create_big_files();
@@ -318,6 +323,26 @@ class tool_generator_course_backend extends tool_generator_backend {
$this->end_log();
}
/**
* Creates a number of Assignment activities.
*/
private function create_assignments() {
// Set up generator.
$assigngenerator = $this->generator->get_plugin_generator('mod_assign');
// Create assignments.
$number = self::$paramassignments[$this->size];
$this->log('createassignments', $number, true);
for ($i = 0; $i < $number; $i++) {
$record = array('course' => $this->course);
$options = array('section' => $this->get_target_section());
$assigngenerator->create_instance($record, $options);
$this->dot($i, $number);
}
$this->end_log();
}
/**
* Creates a number of Page activities.
*/
@@ -71,6 +71,7 @@ $string['pluginname'] = 'Development data generator';
$string['progress_checkaccounts'] = 'Checking user accounts ({$a})';
$string['progress_coursecompleted'] = 'Course completed ({$a}s)';
$string['progress_createaccounts'] = 'Creating user accounts ({$a->from} - {$a->to})';
$string['progress_createassignments'] = 'Creating assignments ({$a})';
$string['progress_createbigfiles'] = 'Creating big files ({$a})';
$string['progress_createcourse'] = 'Creating course {$a}';
$string['progress_createforum'] = 'Creating forum ({$a} posts)';
@@ -66,6 +66,7 @@ $string['validationmsg_filenotexists'] = 'Extracted file not found';
$string['validationmsg_filesnumber'] = 'Not enough files found in the package';
$string['validationmsg_filestatus'] = 'Unable to extract all files';
$string['validationmsg_filestatus_info'] = 'Attempting to extract file {$a->file} resulted in error \'{$a->status}\'.';
$string['validationmsg_foundlangfile'] = 'Found language file';
$string['validationmsg_maturity'] = 'Declared maturity level';
$string['validationmsg_maturity_help'] = 'The add-on can declare its maturity level. If the maintainer considers the add-on stable, the declared maturity level will read MATURITY_STABLE. All other maturity levels (such as alpha or beta) should be considered unstable and a warning is raised.';
$string['validationmsg_missingexpectedlangenfile'] = 'English language file name mismatch';
+1 -1
View File
@@ -17,7 +17,7 @@
/**
* Fetches language packages from download.moodle.org server
*
* Language packages are available at http://download.moodle.org/langpack/
* Language packages are available at https://download.moodle.org/langpack/
* in ZIP format together with a file languages.md5 containing their hashes
* and meta info.
* Locally, language packs are saved into $CFG->dataroot/lang/
@@ -37,7 +37,7 @@ $string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of
$string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
$string['pluginname'] = 'Language packs';
$string['purgestringcaches'] = 'Purge string caches';
$string['remotelangnotavailable'] = 'Because Moodle 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['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="https://download.moodle.org/langpack/">download.moodle.org/langpack</a>, copy them to your {$a} directory and unzip them manually.';
$string['uninstall'] = 'Uninstall selected language pack';
$string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
$string['updatelangs'] = 'Update all installed language packs';
+2 -2
View File
@@ -45,7 +45,7 @@
$message = '<br /><br />';
$message .= $CFG->tempdir.'/olson.txt<br />';
$message .= $CFG->tempdir.'/timezone.txt<br />';
$message .= '<a href="http://download.moodle.org/timezone/">http://download.moodle.org/timezone/</a><br />';
$message .= '<a href="https://download.moodle.org/timezone/">https://download.moodle.org/timezone/</a><br />';
$message .= '<a href="'.$CFG->wwwroot.'/lib/timezone.txt">'.$CFG->dirroot.'/lib/timezone.txt</a><br />';
$message .= '<br />';
@@ -83,7 +83,7 @@
}
/// Otherwise, let's try moodle.org's copy
$source = 'http://download.moodle.org/timezone/';
$source = 'https://download.moodle.org/timezone/';
if (!$importdone && ($content=download_file_content($source))) {
if ($file = fopen($CFG->tempdir.'/timezone.txt', 'w')) { // Make local copy
fwrite($file, $content);
@@ -9,9 +9,7 @@ Feature: An admin can create courses using a CSV file
| fullname | shortname | category |
| First course | C1 | 0 |
And I log in as "admin"
And I expand "Site administration" node
And I expand "Courses" node
And I follow "Upload courses"
And I navigate to "Upload courses" node in "Site administration > Courses"
@javascript
Scenario: Creation of unexisting courses
@@ -9,9 +9,7 @@ Feature: An admin can update courses using a CSV file
| fullname | shortname | category |
| Some random name | C1 | 0 |
And I log in as "admin"
And I expand "Site administration" node
And I expand "Courses" node
And I follow "Upload courses"
And I navigate to "Upload courses" node in "Site administration > Courses"
@javascript
Scenario: Updating a course fullname
@@ -35,6 +35,13 @@ global $CFG;
*/
class tool_uploadcourse_course_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
public function test_proceed_without_prepare() {
$this->resetAfterTest(true);
$mode = tool_uploadcourse_processor::MODE_CREATE_NEW;
@@ -36,6 +36,13 @@ require_once($CFG->libdir . '/csvlib.class.php');
*/
class tool_uploadcourse_processor_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
public function test_basic() {
global $DB;
$this->resetAfterTest(true);
+8 -2
View File
@@ -669,7 +669,7 @@ if ($formdata = $mform2->is_cancelled()) {
if ($doupdate or $existinguser->password !== $oldpw) {
// We want only users that were really updated.
user_update_user($existinguser, false);
user_update_user($existinguser, false, false);
$upt->track('status', $struserupdated);
$usersupdated++;
@@ -687,6 +687,9 @@ if ($formdata = $mform2->is_cancelled()) {
}
}
// Trigger event.
\core\event\user_updated::create_from_userid($existinguser->id)->trigger();
} else {
// no user information changed
$upt->track('status', $struseruptodate);
@@ -800,7 +803,7 @@ if ($formdata = $mform2->is_cancelled()) {
$upt->track('password', '-', 'normal', false);
}
$user->id = user_create_user($user, false);
$user->id = user_create_user($user, false, false);
$upt->track('username', html_writer::link(new moodle_url('/user/profile.php', array('id'=>$user->id)), s($user->username)), 'normal', false);
// pre-process custom profile menu fields data from csv file
@@ -815,6 +818,9 @@ if ($formdata = $mform2->is_cancelled()) {
set_user_preference('create_password', 1, $user);
}
// Trigger event.
\core\event\user_created::create_from_userid($user->id)->trigger();
$upt->track('status', $struseradded);
$upt->track('id', $user->id, 'normal', false);
$usersnew++;
-5
View File
@@ -256,17 +256,12 @@
$table->colclasses = array();
$table->head[] = $fullnamedisplay;
$table->attributes['class'] = 'admintable generaltable';
$table->colclasses[] = 'leftalign';
foreach ($extracolumns as $field) {
$table->head[] = ${$field};
$table->colclasses[] = 'leftalign';
}
$table->head[] = $city;
$table->colclasses[] = 'leftalign';
$table->head[] = $country;
$table->colclasses[] = 'leftalign';
$table->head[] = $lastaccess;
$table->colclasses[] = 'leftalign';
$table->head[] = get_string('edit');
$table->colclasses[] = 'centeralign';
$table->head[] = "";
+3 -3
View File
@@ -35,12 +35,12 @@ function get_selection_data($ufiltering) {
if ($scount) {
if ($scount < MAX_BULK_USERS) {
$in = implode(',', $SESSION->bulk_users);
$bulkusers = $SESSION->bulk_users;
} else {
$bulkusers = array_slice($SESSION->bulk_users, 0, MAX_BULK_USERS, true);
$in = implode(',', $bulkusers);
}
$userlist['susers'] = $DB->get_records_select_menu('user', "id IN ($in)", null, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
list($in, $inparams) = $DB->get_in_or_equal($bulkusers);
$userlist['susers'] = $DB->get_records_select_menu('user', "id $in", $inparams, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
}
return $userlist;
+260 -348
View File
@@ -63,7 +63,7 @@ if (!defined('E_USER_DEPRECATED')) {
/**
* phpCAS version. accessible for the user by phpCAS::getVersion().
*/
define('PHPCAS_VERSION', '1.3.2');
define('PHPCAS_VERSION', '1.3.3');
/**
* @addtogroup public
@@ -78,6 +78,10 @@ define("CAS_VERSION_1_0", '1.0');
* CAS version 2.0
*/
define("CAS_VERSION_2_0", '2.0');
/**
* CAS version 3.0
*/
define("CAS_VERSION_3_0", '3.0');
// ------------------------------------------------------------------------
// SAML defines
@@ -318,18 +322,6 @@ class phpCAS
if (is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')');
}
if (gettype($server_version) != 'string') {
phpCAS :: error('type mismatched for parameter $server_version (should be `string\')');
}
if (gettype($server_hostname) != 'string') {
phpCAS :: error('type mismatched for parameter $server_hostname (should be `string\')');
}
if (gettype($server_port) != 'integer') {
phpCAS :: error('type mismatched for parameter $server_port (should be `integer\')');
}
if (gettype($server_uri) != 'string') {
phpCAS :: error('type mismatched for parameter $server_uri (should be `string\')');
}
// store where the initializer is called from
$dbg = debug_backtrace();
@@ -341,10 +333,14 @@ class phpCAS
);
// initialize the object $_PHPCAS_CLIENT
self::$_PHPCAS_CLIENT = new CAS_Client(
$server_version, false, $server_hostname, $server_port, $server_uri,
$changeSessionID
);
try {
self::$_PHPCAS_CLIENT = new CAS_Client(
$server_version, false, $server_hostname, $server_port, $server_uri,
$changeSessionID
);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
phpCAS :: traceEnd();
}
@@ -370,18 +366,6 @@ class phpCAS
if (is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')');
}
if (gettype($server_version) != 'string') {
phpCAS :: error('type mismatched for parameter $server_version (should be `string\')');
}
if (gettype($server_hostname) != 'string') {
phpCAS :: error('type mismatched for parameter $server_hostname (should be `string\')');
}
if (gettype($server_port) != 'integer') {
phpCAS :: error('type mismatched for parameter $server_port (should be `integer\')');
}
if (gettype($server_uri) != 'string') {
phpCAS :: error('type mismatched for parameter $server_uri (should be `string\')');
}
// store where the initialzer is called from
$dbg = debug_backtrace();
@@ -393,10 +377,14 @@ class phpCAS
);
// initialize the object $_PHPCAS_CLIENT
self::$_PHPCAS_CLIENT = new CAS_Client(
$server_version, true, $server_hostname, $server_port, $server_uri,
$changeSessionID
);
try {
self::$_PHPCAS_CLIENT = new CAS_Client(
$server_version, true, $server_hostname, $server_port, $server_uri,
$changeSessionID
);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
phpCAS :: traceEnd();
}
@@ -636,13 +624,13 @@ class phpCAS
*/
public static function setLang($lang)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setLang($lang);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($lang) != 'string') {
phpCAS :: error('type mismatched for parameter $lang (should be `string\')');
}
self::$_PHPCAS_CLIENT->setLang($lang);
}
/** @} */
@@ -682,13 +670,13 @@ class phpCAS
*/
public static function setHTMLHeader($header)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setHTMLHeader($header);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($header) != 'string') {
phpCAS :: error('type mismatched for parameter $header (should be `string\')');
}
self::$_PHPCAS_CLIENT->setHTMLHeader($header);
}
/**
@@ -700,13 +688,13 @@ class phpCAS
*/
public static function setHTMLFooter($footer)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setHTMLFooter($footer);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($footer) != 'string') {
phpCAS :: error('type mismatched for parameter $footer (should be `string\')');
}
self::$_PHPCAS_CLIENT->setHTMLFooter($footer);
}
/** @} */
@@ -729,19 +717,13 @@ class phpCAS
public static function setPGTStorage($storage)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
phpCAS::_validateProxyExists();
try {
self::$_PHPCAS_CLIENT->setPGTStorage($storage);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called before ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() (called at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ')');
}
if ( !($storage instanceof CAS_PGTStorage) ) {
phpCAS :: error('type mismatched for parameter $storage (should be a CAS_PGTStorage `object\')');
}
self::$_PHPCAS_CLIENT->setPGTStorage($storage);
phpCAS :: traceEnd();
}
@@ -766,25 +748,13 @@ class phpCAS
$password='', $table='', $driver_options=null
) {
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
phpCAS::_validateProxyExists();
try {
self::$_PHPCAS_CLIENT->setPGTStorageDb($dsn_or_pdo, $username, $password, $table, $driver_options);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called before ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() (called at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ')');
}
if (gettype($username) != 'string') {
phpCAS :: error('type mismatched for parameter $username (should be `string\')');
}
if (gettype($password) != 'string') {
phpCAS :: error('type mismatched for parameter $password (should be `string\')');
}
if (gettype($table) != 'string') {
phpCAS :: error('type mismatched for parameter $table (should be `string\')');
}
self::$_PHPCAS_CLIENT->setPGTStorageDb($dsn_or_pdo, $username, $password, $table, $driver_options);
phpCAS :: traceEnd();
}
@@ -799,19 +769,13 @@ class phpCAS
public static function setPGTStorageFile($path = '')
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
phpCAS::_validateProxyExists();
try {
self::$_PHPCAS_CLIENT->setPGTStorageFile($path);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called before ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() (called at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ')');
}
if (gettype($path) != 'string') {
phpCAS :: error('type mismatched for parameter $path (should be `string\')');
}
self::$_PHPCAS_CLIENT->setPGTStorageFile($path);
phpCAS :: traceEnd();
}
/** @} */
@@ -836,23 +800,13 @@ class phpCAS
public static function getProxiedService ($type)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
if (gettype($type) != 'string') {
phpCAS :: error('type mismatched for parameter $type (should be `string\')');
}
phpCAS::_validateProxyExists();
$res = self::$_PHPCAS_CLIENT->getProxiedService($type);
try {
$res = self::$_PHPCAS_CLIENT->getProxiedService($type);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
phpCAS :: traceEnd();
return $res;
@@ -872,20 +826,13 @@ class phpCAS
*/
public static function initializeProxiedService (CAS_ProxiedService $proxiedService)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
phpCAS::_validateProxyExists();
self::$_PHPCAS_CLIENT->initializeProxiedService($proxiedService);
try {
self::$_PHPCAS_CLIENT->initializeProxiedService($proxiedService);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
}
/**
@@ -906,23 +853,13 @@ class phpCAS
public static function serviceWeb($url, & $err_code, & $output)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string\')');
}
phpCAS::_validateProxyExists();
$res = self::$_PHPCAS_CLIENT->serviceWeb($url, $err_code, $output);
try {
$res = self::$_PHPCAS_CLIENT->serviceWeb($url, $err_code, $output);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
phpCAS :: traceEnd($res);
return $res;
@@ -950,28 +887,14 @@ class phpCAS
public static function serviceMail($url, $service, $flags, & $err_code, & $err_msg, & $pt)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string\')');
}
phpCAS::_validateProxyExists();
if (gettype($flags) != 'integer') {
phpCAS :: error('type mismatched for parameter $flags (should be `integer\')');
try {
$res = self::$_PHPCAS_CLIENT->serviceMail($url, $service, $flags, $err_code, $err_msg, $pt);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
$res = self::$_PHPCAS_CLIENT->serviceMail($url, $service, $flags, $err_code, $err_msg, $pt);
phpCAS :: traceEnd($res);
return $res;
}
@@ -998,13 +921,13 @@ class phpCAS
*/
public static function setCacheTimesForAuthRecheck($n)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setCacheTimesForAuthRecheck($n);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($n) != 'integer') {
phpCAS :: error('type mismatched for parameter $n (should be `integer\')');
}
self::$_PHPCAS_CLIENT->setCacheTimesForAuthRecheck($n);
}
/**
@@ -1028,9 +951,7 @@ class phpCAS
*/
public static function setPostAuthenticateCallback ($function, array $additionalArgs = array())
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
self::$_PHPCAS_CLIENT->setPostAuthenticateCallback($function, $additionalArgs);
}
@@ -1051,9 +972,7 @@ class phpCAS
*/
public static function setSingleSignoutCallback ($function, array $additionalArgs = array())
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
self::$_PHPCAS_CLIENT->setSingleSignoutCallback($function, $additionalArgs);
}
@@ -1071,9 +990,7 @@ class phpCAS
public static function checkAuthentication()
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
$auth = self::$_PHPCAS_CLIENT->checkAuthentication();
@@ -1094,16 +1011,13 @@ class phpCAS
public static function forceAuthentication()
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
$auth = self::$_PHPCAS_CLIENT->forceAuthentication();
// store where the authentication has been checked and the result
self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
/* if (!$auth) {
/* if (!$auth) {
phpCAS :: trace('user is not authenticated, redirecting to the CAS server');
self::$_PHPCAS_CLIENT->forceAuthentication();
} else {
@@ -1122,9 +1036,8 @@ class phpCAS
public static function renewAuthentication()
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
$auth = self::$_PHPCAS_CLIENT->renewAuthentication();
// store where the authentication has been checked and the result
@@ -1143,9 +1056,7 @@ class phpCAS
public static function isAuthenticated()
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
// call the isAuthenticated method of the $_PHPCAS_CLIENT object
$auth = self::$_PHPCAS_CLIENT->isAuthenticated();
@@ -1166,9 +1077,8 @@ class phpCAS
*/
public static function isSessionAuthenticated()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
return (self::$_PHPCAS_CLIENT->isSessionAuthenticated());
}
@@ -1176,65 +1086,56 @@ class phpCAS
* This method returns the CAS user's login name.
*
* @return string the login name of the authenticated user
* @warning should not be called only after phpCAS::forceAuthentication()
* @warning should only be called after phpCAS::forceAuthentication()
* or phpCAS::checkAuthentication().
* */
public static function getUser()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
return self::$_PHPCAS_CLIENT->getUser();
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::forceAuthentication() or ' . __CLASS__ . '::isAuthenticated()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
return self::$_PHPCAS_CLIENT->getUser();
}
/**
* Answer attributes about the authenticated user.
*
* @warning should not be called only after phpCAS::forceAuthentication()
* @warning should only be called after phpCAS::forceAuthentication()
* or phpCAS::checkAuthentication().
*
* @return array
*/
public static function getAttributes()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
return self::$_PHPCAS_CLIENT->getAttributes();
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::forceAuthentication() or ' . __CLASS__ . '::isAuthenticated()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
return self::$_PHPCAS_CLIENT->getAttributes();
}
/**
* Answer true if there are attributes for the authenticated user.
*
* @warning should not be called only after phpCAS::forceAuthentication()
* @warning should only be called after phpCAS::forceAuthentication()
* or phpCAS::checkAuthentication().
*
* @return bool
*/
public static function hasAttributes()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
return self::$_PHPCAS_CLIENT->hasAttributes();
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::forceAuthentication() or ' . __CLASS__ . '::isAuthenticated()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
return self::$_PHPCAS_CLIENT->hasAttributes();
}
/**
@@ -1243,21 +1144,18 @@ class phpCAS
* @param string $key attribute name
*
* @return bool
* @warning should not be called only after phpCAS::forceAuthentication()
* @warning should only be called after phpCAS::forceAuthentication()
* or phpCAS::checkAuthentication().
*/
public static function hasAttribute($key)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
return self::$_PHPCAS_CLIENT->hasAttribute($key);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::forceAuthentication() or ' . __CLASS__ . '::isAuthenticated()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
return self::$_PHPCAS_CLIENT->hasAttribute($key);
}
/**
@@ -1266,21 +1164,18 @@ class phpCAS
* @param string $key attribute name
*
* @return mixed string for a single value or an array if multiple values exist.
* @warning should not be called only after phpCAS::forceAuthentication()
* @warning should only be called after phpCAS::forceAuthentication()
* or phpCAS::checkAuthentication().
*/
public static function getAttribute($key)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
return self::$_PHPCAS_CLIENT->getAttribute($key);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCalled()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::forceAuthentication() or ' . __CLASS__ . '::isAuthenticated()');
}
if (!self::$_PHPCAS_CLIENT->wasAuthenticationCallSuccessful()) {
phpCAS :: error('authentication was checked (by ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerMethod() . '() at ' . self::$_PHPCAS_CLIENT->getAuthenticationCallerFile() . ':' . self::$_PHPCAS_CLIENT->getAuthenticationCallerLine() . ') but the method returned false');
}
return self::$_PHPCAS_CLIENT->getAttribute($key);
}
/**
@@ -1293,9 +1188,8 @@ class phpCAS
*/
public static function handleLogoutRequests($check_client = true, $allowed_clients = false)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
return (self::$_PHPCAS_CLIENT->handleLogoutRequests($check_client, $allowed_clients));
}
@@ -1307,9 +1201,8 @@ class phpCAS
*/
public static function getServerLoginURL()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
return self::$_PHPCAS_CLIENT->getServerLoginURL();
}
@@ -1324,13 +1217,14 @@ class phpCAS
public static function setServerLoginURL($url = '')
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after' . __CLASS__ . '::client()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setServerLoginURL($url);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string`)');
}
self::$_PHPCAS_CLIENT->setServerLoginURL($url);
phpCAS :: traceEnd();
}
@@ -1345,13 +1239,14 @@ class phpCAS
public static function setServerServiceValidateURL($url = '')
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after' . __CLASS__ . '::client()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setServerServiceValidateURL($url);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string`)');
}
self::$_PHPCAS_CLIENT->setServerServiceValidateURL($url);
phpCAS :: traceEnd();
}
@@ -1366,13 +1261,14 @@ class phpCAS
public static function setServerProxyValidateURL($url = '')
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after' . __CLASS__ . '::client()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setServerProxyValidateURL($url);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string`)');
}
self::$_PHPCAS_CLIENT->setServerProxyValidateURL($url);
phpCAS :: traceEnd();
}
@@ -1386,13 +1282,14 @@ class phpCAS
public static function setServerSamlValidateURL($url = '')
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after' . __CLASS__ . '::client()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setServerSamlValidateURL($url);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be`string\')');
}
self::$_PHPCAS_CLIENT->setServerSamlValidateURL($url);
phpCAS :: traceEnd();
}
@@ -1404,9 +1301,8 @@ class phpCAS
*/
public static function getServerLogoutURL()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
return self::$_PHPCAS_CLIENT->getServerLogoutURL();
}
@@ -1421,17 +1317,14 @@ class phpCAS
public static function setServerLogoutURL($url = '')
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error(
'this method should only be called after' . __CLASS__ . '::client()'
);
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setServerLogoutURL($url);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($url) != 'string') {
phpCAS :: error(
'type mismatched for parameter $url (should be `string`)'
);
}
self::$_PHPCAS_CLIENT->setServerLogoutURL($url);
phpCAS :: traceEnd();
}
@@ -1446,9 +1339,8 @@ class phpCAS
public static function logout($params = "")
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
$parsedParams = array ();
if ($params != "") {
if (is_string($params)) {
@@ -1480,9 +1372,8 @@ class phpCAS
public static function logoutWithRedirectService($service)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
if (!is_string($service)) {
phpCAS :: error('type mismatched for parameter $service (should be `string\')');
}
@@ -1532,9 +1423,8 @@ class phpCAS
{
trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED);
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
if (!is_string($service)) {
phpCAS :: error('type mismatched for parameter $service (should be `string\')');
}
@@ -1563,16 +1453,14 @@ class phpCAS
public static function setFixedCallbackURL($url = '')
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
phpCAS::_validateProxyExists();
try {
self::$_PHPCAS_CLIENT->setCallbackURL($url);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (!self::$_PHPCAS_CLIENT->isProxy()) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string\')');
}
self::$_PHPCAS_CLIENT->setCallbackURL($url);
phpCAS :: traceEnd();
}
@@ -1587,13 +1475,14 @@ class phpCAS
public static function setFixedServiceURL($url)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
phpCAS::_validateProxyExists();
try {
self::$_PHPCAS_CLIENT->setURL($url);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($url) != 'string') {
phpCAS :: error('type mismatched for parameter $url (should be `string\')');
}
self::$_PHPCAS_CLIENT->setURL($url);
phpCAS :: traceEnd();
}
@@ -1604,9 +1493,7 @@ class phpCAS
*/
public static function getServiceURL()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
}
phpCAS::_validateProxyExists();
return (self::$_PHPCAS_CLIENT->getURL());
}
@@ -1621,13 +1508,13 @@ class phpCAS
*/
public static function retrievePT($target_service, & $err_code, & $err_msg)
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
phpCAS::_validateProxyExists();
try {
return (self::$_PHPCAS_CLIENT->retrievePT($target_service, $err_code, $err_msg));
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($target_service) != 'string') {
phpCAS :: error('type mismatched for parameter $target_service(should be `string\')');
}
return (self::$_PHPCAS_CLIENT->retrievePT($target_service, $err_code, $err_msg));
}
/**
@@ -1642,16 +1529,14 @@ class phpCAS
public static function setCasServerCACert($cert, $validate_cn = true)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->setCasServerCACert($cert, $validate_cn);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if (gettype($cert) != 'string') {
phpCAS :: error('type mismatched for parameter $cert (should be `string\')');
}
if (gettype($validate_cn) != 'boolean') {
phpCAS :: error('type mismatched for parameter $validate_cn (should be `boolean\')');
}
self::$_PHPCAS_CLIENT->setCasServerCACert($cert, $validate_cn);
phpCAS :: traceEnd();
}
@@ -1663,9 +1548,8 @@ class phpCAS
public static function setNoCasServerValidation()
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
phpCAS :: trace('You have configured no validation of the legitimacy of the cas server. This is not recommended for production use.');
self::$_PHPCAS_CLIENT->setNoCasServerValidation();
phpCAS :: traceEnd();
@@ -1684,9 +1568,8 @@ class phpCAS
public static function setNoClearTicketsFromUrl()
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
self::$_PHPCAS_CLIENT->setNoClearTicketsFromUrl();
phpCAS :: traceEnd();
}
@@ -1705,9 +1588,8 @@ class phpCAS
public static function setExtraCurlOption($key, $value)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
}
phpCAS::_validateClientExists();
self::$_PHPCAS_CLIENT->setExtraCurlOption($key, $value);
phpCAS :: traceEnd();
}
@@ -1751,11 +1633,11 @@ class phpCAS
public static function allowProxyChain(CAS_ProxyChain_Interface $proxy_chain)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
}
if (self::$_PHPCAS_CLIENT->getServerVersion() !== CAS_VERSION_2_0) {
phpCAS :: error('this method can only be used with the cas 2.0 protool');
phpCAS::_validateClientExists();
if (self::$_PHPCAS_CLIENT->getServerVersion() !== CAS_VERSION_2_0
&& self::$_PHPCAS_CLIENT->getServerVersion() !== CAS_VERSION_3_0) {
phpCAS :: error('this method can only be used with the cas 2.0/3.0 protocols');
}
self::$_PHPCAS_CLIENT->getAllowedProxyChains()->allowProxyChain($proxy_chain);
phpCAS :: traceEnd();
@@ -1772,9 +1654,7 @@ class phpCAS
*/
public static function getProxies ()
{
if ( !is_object(self::$_PHPCAS_CLIENT) ) {
phpCAS::error('this method should only be called after '.__CLASS__.'::client()');
}
phpCAS::_validateProxyExists();
return(self::$_PHPCAS_CLIENT->getProxies());
}
@@ -1795,13 +1675,14 @@ class phpCAS
{
phpCAS::traceBegin();
phpCAS::log('rebroadcastNodeUrl:'.$rebroadcastNodeUrl);
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->addRebroadcastNode($rebroadcastNodeUrl);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
if ( !(bool)preg_match("/^(http|https):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i", $rebroadcastNodeUrl)) {
phpCAS::error('type mismatched for parameter $rebroadcastNodeUrl (should be `url\')');
}
self::$_PHPCAS_CLIENT->addRebroadcastNode($rebroadcastNodeUrl);
phpCAS::traceEnd();
}
@@ -1816,14 +1697,45 @@ class phpCAS
public static function addRebroadcastHeader($header)
{
phpCAS :: traceBegin();
if (!is_object(self::$_PHPCAS_CLIENT)) {
phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
phpCAS::_validateClientExists();
try {
self::$_PHPCAS_CLIENT->addRebroadcastHeader($header);
} catch (Exception $e) {
phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
}
self::$_PHPCAS_CLIENT->addRebroadcastHeader($header);
phpCAS :: traceEnd();
}
}
/**
* Checks if a client already exists
*
* @throws CAS_OutOfSequenceBeforeClientException
*
* @return void
*/
private static function _validateClientExists()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
throw new CAS_OutOfSequenceBeforeClientException();
}
}
/**
* Checks of a proxy client aready exists
*
* @throws CAS_OutOfSequenceBeforeProxyException
*
* @return void
*/
private static function _validateProxyExists()
{
if (!is_object(self::$_PHPCAS_CLIENT)) {
throw new CAS_OutOfSequenceBeforeProxyException();
}
}
}
// ########################################################################
// DOCUMENTATION
// ########################################################################
+2 -1
View File
@@ -74,7 +74,7 @@ implements CAS_Exception
printf(
$lang->getYouWereNotAuthenticated(),
htmlentities($client->getURL()),
$_SERVER['SERVER_ADMIN']
isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN']:''
);
phpCAS::trace('CAS URL: '.$cas_url);
phpCAS::trace('Authentication failure: '.$failure);
@@ -89,6 +89,7 @@ implements CAS_Exception
phpCAS::trace('Reason: CAS error');
break;
case CAS_VERSION_2_0:
case CAS_VERSION_3_0:
if ( empty($err_code) ) {
phpCAS::trace('Reason: no CAS error');
} else {
+30 -22
View File
@@ -25,35 +25,39 @@ function CAS_autoload($class)
{
// Static to hold the Include Path to CAS
static $include_path;
// Setup the include path if it's not already set from a previous call
if (!$include_path) {
$include_path = dirname(dirname(__FILE__));
}
// Check only for CAS classes
if (substr($class, 0, 4) !== 'CAS_') {
return false;
}
// Declare local variable to store the expected full path to the file
$file_path = $include_path . '/' . str_replace('_', '/', $class) . '.php';
// Setup the include path if it's not already set from a previous call
if (empty($include_path)) {
$include_path = array(dirname(dirname(__FILE__)), dirname(dirname(__FILE__)) . '/../test/' );
}
$fp = @fopen($file_path, 'r', true);
if ($fp) {
fclose($fp);
include $file_path;
if (!class_exists($class, false) && !interface_exists($class, false)) {
die(
new Exception(
'Class ' . $class . ' was not present in ' .
$file_path .
' [CAS_autoload]'
)
);
// Declare local variable to store the expected full path to the file
foreach ($include_path as $path) {
$file_path = $path . '/' . str_replace('_', '/', $class) . '.php';
$fp = @fopen($file_path, 'r', true);
if ($fp) {
fclose($fp);
include $file_path;
if (!class_exists($class, false) && !interface_exists($class, false)) {
die(
new Exception(
'Class ' . $class . ' was not present in ' .
$file_path .
' [CAS_autoload]'
)
);
}
return true;
}
return true;
}
$e = new Exception(
'Class ' . $class . ' could not be loaded from ' .
$file_path . ', file does not exist (Path="'
. $include_path .'") [CAS_autoload]'
. implode(':', $include_path) .'") [CAS_autoload]'
);
$trace = $e->getTrace();
if (isset($trace[2]) && isset($trace[2]['function'])
@@ -71,9 +75,13 @@ function CAS_autoload($class)
// set up __autoload
if (function_exists('spl_autoload_register')) {
if (!(spl_autoload_functions()) || !in_array('CAS_autoload', spl_autoload_functions())) {
if (!(spl_autoload_functions())
|| !in_array('CAS_autoload', spl_autoload_functions())
) {
spl_autoload_register('CAS_autoload');
if (function_exists('__autoload') && !in_array('__autoload', spl_autoload_functions())) {
if (function_exists('__autoload')
&& !in_array('__autoload', spl_autoload_functions())
) {
// __autoload() was being used, but now would be ignored, add
// it to the autoload stack
spl_autoload_register('__autoload');
File diff suppressed because it is too large Load Diff
+14 -6
View File
@@ -161,7 +161,9 @@ class CAS_CookieJar
protected function parseCookieHeader ($line, $defaultDomain)
{
if (!$defaultDomain) {
throw new CAS_InvalidArgumentException('$defaultDomain was not provided.');
throw new CAS_InvalidArgumentException(
'$defaultDomain was not provided.'
);
}
// Set our default values
@@ -315,10 +317,14 @@ class CAS_CookieJar
protected function cookieMatchesTarget ($cookie, $target)
{
if (!is_array($target)) {
throw new CAS_InvalidArgumentException('$target must be an array of URL attributes as generated by parse_url().');
throw new CAS_InvalidArgumentException(
'$target must be an array of URL attributes as generated by parse_url().'
);
}
if (!isset($target['host'])) {
throw new CAS_InvalidArgumentException('$target must be an array of URL attributes as generated by parse_url().');
throw new CAS_InvalidArgumentException(
'$target must be an array of URL attributes as generated by parse_url().'
);
}
// Verify that the scheme matches
@@ -352,15 +358,17 @@ class CAS_CookieJar
}
}
} else {
// If the cookie host doesn't begin with '.', the host must case-insensitive
// match exactly
// If the cookie host doesn't begin with '.',
// the host must case-insensitive match exactly
if (strcasecmp($target['host'], $cookie['domain']) !== 0) {
return false;
}
}
// Verify that the port matches
if (isset($cookie['ports']) && !in_array($target['port'], $cookie['ports'])) {
if (isset($cookie['ports'])
&& !in_array($target['port'], $cookie['ports'])
) {
return false;
}
+2 -2
View File
@@ -99,7 +99,7 @@ class CAS_Languages_German implements CAS_Languages_LanguageInterface
*/
public function getYouWereNotAuthenticated()
{
return '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontkatieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>';
return '<p>Sie wurden nicht angemeldet.</p><p>Um es erneut zu versuchen klicken Sie <a href="%s">hier</a>.</p><p>Wenn das Problem bestehen bleibt, kontaktieren Sie den <a href="mailto:%s">Administrator</a> dieser Seite.</p>';
}
/**
@@ -113,4 +113,4 @@ class CAS_Languages_German implements CAS_Languages_LanguageInterface
}
}
?>
?>
@@ -0,0 +1,56 @@
<?php
/**
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* PHP Version 5
*
* @file CAS/OutOfSequenceBeforeAuthenticationCallException.php
* @category Authentication
* @package PhpCAS
* @author Joachim Fritschi <jfritschi@freenet.de>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
/**
* This class defines Exceptions that should be thrown when the sequence of
* operations is invalid. In this case it should be thrown when an
* authentication call has not yet happened.
*
* @class CAS_OutOfSequenceBeforeAuthenticationCallException
* @category Authentication
* @package PhpCAS
* @author Joachim Fritschi <jfritschi@freenet.de>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
class CAS_OutOfSequenceBeforeAuthenticationCallException
extends CAS_OutOfSequenceException
implements CAS_Exception
{
/**
* Return standard error meessage
*
* @return void
*/
public function __construct ()
{
parent::__construct('An authentication call hasn\'t happened yet.');
}
}
@@ -0,0 +1,58 @@
<?php
/**
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* PHP Version 5
*
* @file CAS/OutOfSequenceBeforeClientException.php
* @category Authentication
* @package PhpCAS
* @author Joachim Fritschi <jfritschi@freenet.de>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
/**
* This class defines Exceptions that should be thrown when the sequence of
* operations is invalid. In this case it should be thrown when the client() or
* proxy() call has not yet happened and no client or proxy object exists.
*
* @class CAS_OutOfSequenceBeforeClientException
* @category Authentication
* @package PhpCAS
* @author Joachim Fritschi <jfritschi@freenet.de>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
class CAS_OutOfSequenceBeforeClientException
extends CAS_OutOfSequenceException
implements CAS_Exception
{
/**
* Return standard error message
*
* @return void
*/
public function __construct ()
{
parent::__construct(
'this method cannot be called before phpCAS::client() or phpCAS::proxy()'
);
}
}
@@ -0,0 +1,59 @@
<?php
/**
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* PHP Version 5
*
* @file CAS/OutOfSequenceBeforeProxyException.php
* @category Authentication
* @package PhpCAS
* @author Joachim Fritschi <jfritschi@freenet.de>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
/**
* This class defines Exceptions that should be thrown when the sequence of
* operations is invalid. In this case it should be thrown when the proxy() call
* has not yet happened and no proxy object exists.
*
* @class CAS_OutOfSequenceBeforeProxyException
* @category Authentication
* @package PhpCAS
* @author Joachim Fritschi <jfritschi@freenet.de>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
class CAS_OutOfSequenceBeforeProxyException
extends CAS_OutOfSequenceException
implements CAS_Exception
{
/**
* Return standard error message
*
* @return void
*/
public function __construct ()
{
parent::__construct(
'this method cannot be called before phpCAS::proxy()'
);
}
}
@@ -68,7 +68,9 @@ abstract class CAS_PGTStorage_AbstractStorage
{
phpCAS::traceBegin();
if ( !$cas_parent->isProxy() ) {
phpCAS::error('defining PGT storage makes no sense when not using a CAS proxy');
phpCAS::error(
'defining PGT storage makes no sense when not using a CAS proxy'
);
}
phpCAS::traceEnd();
}
+20 -9
View File
@@ -135,8 +135,10 @@ class CAS_PGTStorage_Db extends CAS_PGTStorage_AbstractStorage
* @param string $driver_options any driver options to use when
* connecting to the database
*/
public function __construct($cas_parent, $dsn_or_pdo, $username='', $password='', $table='', $driver_options=null)
{
public function __construct(
$cas_parent, $dsn_or_pdo, $username='', $password='', $table='',
$driver_options=null
) {
phpCAS::traceBegin();
// call the ancestor's constructor
parent::__construct($cas_parent);
@@ -188,7 +190,10 @@ class CAS_PGTStorage_Db extends CAS_PGTStorage_AbstractStorage
// create the PDO object if it doesn't exist already
if (!($this->_pdo instanceof PDO)) {
try {
$this->_pdo = new PDO($this->_dsn, $this->_username, $this->_password, $this->_driver_options);
$this->_pdo = new PDO(
$this->_dsn, $this->_username, $this->_password,
$this->_driver_options
);
}
catch(PDOException $e) {
phpCAS::error('Database connection error: ' . $e->getMessage());
@@ -247,23 +252,28 @@ class CAS_PGTStorage_Db extends CAS_PGTStorage_AbstractStorage
*/
protected function createTableSql()
{
return 'CREATE TABLE ' . $this->_getTable() . ' (pgt_iou VARCHAR(255) NOT NULL PRIMARY KEY, pgt VARCHAR(255) NOT NULL)';
return 'CREATE TABLE ' . $this->_getTable()
. ' (pgt_iou VARCHAR(255) NOT NULL PRIMARY KEY, pgt VARCHAR(255) NOT NULL)';
}
/**
* This method returns the query used to store a pgt
*
* @return the store PGT SQL, :pgt and :pgt_iou are the bind params contained in the query
* @return the store PGT SQL, :pgt and :pgt_iou are the bind params contained
* in the query
*/
protected function storePgtSql()
{
return 'INSERT INTO ' . $this->_getTable() . ' (pgt_iou, pgt) VALUES (:pgt_iou, :pgt)';
return 'INSERT INTO ' . $this->_getTable()
. ' (pgt_iou, pgt) VALUES (:pgt_iou, :pgt)';
}
/**
* This method returns the query used to retrieve a pgt. the first column of the first row should contain the pgt
* This method returns the query used to retrieve a pgt. the first column
* of the first row should contain the pgt
*
* @return the retrieve PGT SQL, :pgt_iou is the only bind param contained in the query
* @return the retrieve PGT SQL, :pgt_iou is the only bind param contained
* in the query
*/
protected function retrievePgtSql()
{
@@ -273,7 +283,8 @@ class CAS_PGTStorage_Db extends CAS_PGTStorage_AbstractStorage
/**
* This method returns the query used to delete a pgt.
*
* @return the delete PGT SQL, :pgt_iou is the only bind param contained in the query
* @return the delete PGT SQL, :pgt_iou is the only bind param contained in
* the query
*/
protected function deletePgtSql()
{
+17 -6
View File
@@ -55,15 +55,20 @@ implements CAS_ProxiedService, CAS_ProxiedService_Testable
*
* @return void
* @throws InvalidArgumentException If the $proxyTicket is invalid.
* @throws CAS_OutOfSequenceException If called after a proxy ticket has already been initialized/set.
* @throws CAS_OutOfSequenceException If called after a proxy ticket has
* already been initialized/set.
*/
public function setProxyTicket ($proxyTicket)
{
if (empty($proxyTicket)) {
throw new CAS_InvalidArgumentException("Trying to initialize with an empty proxy ticket.");
throw new CAS_InvalidArgumentException(
'Trying to initialize with an empty proxy ticket.'
);
}
if (!empty($this->_proxyTicket)) {
throw new CAS_OutOfSequenceException('Already initialized, cannot change the proxy ticket.');
throw new CAS_OutOfSequenceException(
'Already initialized, cannot change the proxy ticket.'
);
}
$this->_proxyTicket = $proxyTicket;
}
@@ -78,7 +83,9 @@ implements CAS_ProxiedService, CAS_ProxiedService_Testable
protected function getProxyTicket ()
{
if (empty($this->_proxyTicket)) {
throw new CAS_OutOfSequenceException('No proxy ticket yet. Call $this->initializeProxyTicket() to aquire the proxy ticket.');
throw new CAS_OutOfSequenceException(
'No proxy ticket yet. Call $this->initializeProxyTicket() to aquire the proxy ticket.'
);
}
return $this->_proxyTicket;
@@ -105,7 +112,9 @@ implements CAS_ProxiedService, CAS_ProxiedService_Testable
public function setCasClient (CAS_Client $casClient)
{
if (!empty($this->_proxyTicket)) {
throw new CAS_OutOfSequenceException('Already initialized, cannot change the CAS_Client.');
throw new CAS_OutOfSequenceException(
'Already initialized, cannot change the CAS_Client.'
);
}
$this->_casClient = $casClient;
@@ -124,7 +133,9 @@ implements CAS_ProxiedService, CAS_ProxiedService_Testable
protected function initializeProxyTicket()
{
if (!empty($this->_proxyTicket)) {
throw new CAS_OutOfSequenceException('Already initialized, cannot initialize again.');
throw new CAS_OutOfSequenceException(
'Already initialized, cannot initialize again.'
);
}
// Allow usage of a particular CAS_Client for unit testing.
if (empty($this->_casClient)) {
@@ -38,9 +38,8 @@
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
abstract class CAS_ProxiedService_Http_Abstract
extends CAS_ProxiedService_Abstract
implements CAS_ProxiedService_Http
abstract class CAS_ProxiedService_Http_Abstract extends
CAS_ProxiedService_Abstract implements CAS_ProxiedService_Http
{
/**
* The HTTP request mechanism talking to the target service.
@@ -64,8 +63,9 @@ implements CAS_ProxiedService_Http
*
* @return void
*/
public function __construct (CAS_Request_RequestInterface $requestHandler, CAS_CookieJar $cookieJar)
{
public function __construct(CAS_Request_RequestInterface $requestHandler,
CAS_CookieJar $cookieJar
) {
$this->requestHandler = $requestHandler;
$this->_cookieJar = $cookieJar;
}
@@ -82,10 +82,12 @@ implements CAS_ProxiedService_Http
* @return string
* @throws Exception If no service url is available.
*/
public function getServiceUrl ()
public function getServiceUrl()
{
if (empty($this->_url)) {
throw new CAS_ProxiedService_Exception('No URL set via '.get_class($this).'->setUrl($url).');
throw new CAS_ProxiedService_Exception(
'No URL set via ' . get_class($this) . '->setUrl($url).'
);
}
return $this->_url;
@@ -93,7 +95,7 @@ implements CAS_ProxiedService_Http
/*********************************************************
* Configure the Request
*********************************************************/
*********************************************************/
/**
* Set the URL of the Request
@@ -103,10 +105,12 @@ implements CAS_ProxiedService_Http
* @return void
* @throws CAS_OutOfSequenceException If called after the Request has been sent.
*/
public function setUrl ($url)
public function setUrl($url)
{
if ($this->hasBeenSent()) {
throw new CAS_OutOfSequenceException('Cannot set the URL, request already sent.');
throw new CAS_OutOfSequenceException(
'Cannot set the URL, request already sent.'
);
}
if (!is_string($url)) {
throw new CAS_InvalidArgumentException('$url must be a string.');
@@ -117,7 +121,7 @@ implements CAS_ProxiedService_Http
/*********************************************************
* 2. Send the Request
*********************************************************/
*********************************************************/
/**
* Perform the request.
@@ -132,10 +136,12 @@ implements CAS_ProxiedService_Http
* @throws CAS_ProxiedService_Exception If there is a failure sending the
* request to the target service.
*/
public function send ()
public function send()
{
if ($this->hasBeenSent()) {
throw new CAS_OutOfSequenceException('Cannot send, request already sent.');
throw new CAS_OutOfSequenceException(
'Cannot send, request already sent.'
);
}
phpCAS::traceBegin();
@@ -144,9 +150,9 @@ implements CAS_ProxiedService_Http
$this->initializeProxyTicket();
$url = $this->getServiceUrl();
if (strstr($url, '?') === false) {
$url = $url.'?ticket='.$this->getProxyTicket();
$url = $url . '?ticket=' . $this->getProxyTicket();
} else {
$url = $url.'&ticket='.$this->getProxyTicket();
$url = $url . '&ticket=' . $this->getProxyTicket();
}
try {
@@ -199,7 +205,7 @@ implements CAS_ProxiedService_Http
* @throws CAS_ProxiedService_Exception If there is a failure sending the
* request to the target service.
*/
protected function makeRequest ($url)
protected function makeRequest($url)
{
// Verify that we are not in a redirect loop
$this->_numRequests++;
@@ -220,9 +226,10 @@ implements CAS_ProxiedService_Http
$this->populateRequest($request);
// Perform the request.
phpCAS::trace('Performing proxied service request to \''.$url.'\'');
phpCAS::trace('Performing proxied service request to \'' . $url . '\'');
if (!$request->send()) {
$message = 'Could not perform proxied service request to URL`'.$url.'\'. '.$request->getErrorMessage();
$message = 'Could not perform proxied service request to URL`'
. $url . '\'. ' . $request->getErrorMessage();
phpCAS::trace($message);
throw new CAS_ProxiedService_Exception($message);
}
@@ -231,8 +238,9 @@ implements CAS_ProxiedService_Http
$this->_cookieJar->storeCookies($url, $request->getResponseHeaders());
// Follow any redirects
if ($redirectUrl = $this->getRedirectUrl($request->getResponseHeaders())) {
phpCAS :: trace('Found redirect:'.$redirectUrl);
if ($redirectUrl = $this->getRedirectUrl($request->getResponseHeaders())
) {
phpCAS::trace('Found redirect:' . $redirectUrl);
$this->makeRequest($redirectUrl);
} else {
@@ -249,7 +257,9 @@ implements CAS_ProxiedService_Http
*
* @return void
*/
abstract protected function populateRequest (CAS_Request_RequestInterface $request);
abstract protected function populateRequest(
CAS_Request_RequestInterface $request
);
/**
* Answer a redirect URL if a redirect header is found, otherwise null.
@@ -258,11 +268,12 @@ implements CAS_ProxiedService_Http
*
* @return string or null
*/
protected function getRedirectUrl (array $responseHeaders)
protected function getRedirectUrl(array $responseHeaders)
{
// Check for the redirect after authentication
foreach ($responseHeaders as $header) {
if (preg_match('/^(Location:|URI:)\s*([^\s]+.*)$/', $header, $matches)) {
if ( preg_match('/^(Location:|URI:)\s*([^\s]+.*)$/', $header, $matches)
) {
return trim(array_pop($matches));
}
}
@@ -271,14 +282,14 @@ implements CAS_ProxiedService_Http
/*********************************************************
* 3. Access the response
*********************************************************/
*********************************************************/
/**
* Answer true if our request has been sent yet.
*
* @return bool
*/
protected function hasBeenSent ()
protected function hasBeenSent()
{
return ($this->_numRequests > 0);
}
@@ -289,10 +300,12 @@ implements CAS_ProxiedService_Http
* @return array An array of header strings.
* @throws CAS_OutOfSequenceException If called before the Request has been sent.
*/
public function getResponseHeaders ()
public function getResponseHeaders()
{
if (!$this->hasBeenSent()) {
throw new CAS_OutOfSequenceException('Cannot access response, request not sent yet.');
throw new CAS_OutOfSequenceException(
'Cannot access response, request not sent yet.'
);
}
return $this->_responseHeaders;
@@ -304,10 +317,12 @@ implements CAS_ProxiedService_Http
* @return int
* @throws CAS_OutOfSequenceException If called before the Request has been sent.
*/
public function getResponseStatusCode ()
public function getResponseStatusCode()
{
if (!$this->hasBeenSent()) {
throw new CAS_OutOfSequenceException('Cannot access response, request not sent yet.');
throw new CAS_OutOfSequenceException(
'Cannot access response, request not sent yet.'
);
}
return $this->_responseStatusCode;
@@ -319,10 +334,12 @@ implements CAS_ProxiedService_Http
* @return string
* @throws CAS_OutOfSequenceException If called before the Request has been sent.
*/
public function getResponseBody ()
public function getResponseBody()
{
if (!$this->hasBeenSent()) {
throw new CAS_OutOfSequenceException('Cannot access response, request not sent yet.');
throw new CAS_OutOfSequenceException(
'Cannot access response, request not sent yet.'
);
}
return $this->_responseBody;
@@ -334,7 +351,7 @@ implements CAS_ProxiedService_Http
*
* @return array An array containing cookies. E.g. array('name' => 'val');
*/
public function getCookies ()
public function getCookies()
{
return $this->_cookieJar->getCookies($this->getServiceUrl());
}
+24 -23
View File
@@ -32,30 +32,31 @@
*
* Usage Example:
*
* try {
* $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
* $service->setUrl('http://www.example.com/path/');
* $service->send();
* if ($service->getResponseStatusCode() == 200)
* return $service->getResponseBody();
* else
* // The service responded with an error code 404, 500, etc.
* throw new Exception('The service responded with an error.');
* try {
* $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_GET);
* $service->setUrl('http://www.example.com/path/');
* $service->send();
* if ($service->getResponseStatusCode() == 200)
* return $service->getResponseBody();
* else
* // The service responded with an error code 404, 500, etc.
* throw new Exception('The service responded with an error.');
*
* } catch (CAS_ProxyTicketException $e) {
* if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE)
* return "Your login has timed out. You need to log in again.";
* else
* // Other proxy ticket errors are from bad request format (shouldn't happen)
* // or CAS server failure (unlikely) so lets just stop if we hit those.
* throw $e;
* } catch (CAS_ProxiedService_Exception $e) {
* // Something prevented the service request from being sent or received.
* // We didn't even get a valid error response (404, 500, etc), so this
* // might be caused by a network error or a DNS resolution failure.
* // We could handle it in some way, but for now we will just stop.
* throw $e;
* }
* } catch (CAS_ProxyTicketException $e) {
* if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE)
* return "Your login has timed out. You need to log in again.";
* else
* // Other proxy ticket errors are from bad request format
* // (shouldn't happen) or CAS server failure (unlikely)
* // so lets just stop if we hit those.
* throw $e;
* } catch (CAS_ProxiedService_Exception $e) {
* // Something prevented the service request from being sent or received.
* // We didn't even get a valid error response (404, 500, etc), so this
* // might be caused by a network error or a DNS resolution failure.
* // We could handle it in some way, but for now we will just stop.
* throw $e;
* }
*
* @class CAS_ProxiedService_Http_Get
* @category Authentication
+36 -28
View File
@@ -32,32 +32,33 @@
*
* Usage Example:
*
* try {
* $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_POST);
* $service->setUrl('http://www.example.com/path/');
* $service->setContentType('text/xml');
* $service->setBody(''<?xml version="1.0"?'.'><methodCall><methodName>example.search</methodName></methodCall>');
* $service->send();
* if ($service->getResponseStatusCode() == 200)
* return $service->getResponseBody();
* else
* // The service responded with an error code 404, 500, etc.
* throw new Exception('The service responded with an error.');
* try {
* $service = phpCAS::getProxiedService(PHPCAS_PROXIED_SERVICE_HTTP_POST);
* $service->setUrl('http://www.example.com/path/');
* $service->setContentType('text/xml');
* $service->setBody('<?xml version="1.0"?'.'><methodCall><methodName>example.search</methodName></methodCall>');
* $service->send();
* if ($service->getResponseStatusCode() == 200)
* return $service->getResponseBody();
* else
* // The service responded with an error code 404, 500, etc.
* throw new Exception('The service responded with an error.');
*
* } catch (CAS_ProxyTicketException $e) {
* if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE)
* return "Your login has timed out. You need to log in again.";
* else
* // Other proxy ticket errors are from bad request format (shouldn't happen)
* // or CAS server failure (unlikely) so lets just stop if we hit those.
* throw $e;
* } catch (CAS_ProxiedService_Exception $e) {
* // Something prevented the service request from being sent or received.
* // We didn't even get a valid error response (404, 500, etc), so this
* // might be caused by a network error or a DNS resolution failure.
* // We could handle it in some way, but for now we will just stop.
* throw $e;
* }
* } catch (CAS_ProxyTicketException $e) {
* if ($e->getCode() == PHPCAS_SERVICE_PT_FAILURE)
* return "Your login has timed out. You need to log in again.";
* else
* // Other proxy ticket errors are from bad request format
* // (shouldn't happen) or CAS server failure (unlikely) so lets just
* // stop if we hit those.
* throw $e;
* } catch (CAS_ProxiedService_Exception $e) {
* // Something prevented the service request from being sent or received.
* // We didn't even get a valid error response (404, 500, etc), so this
* // might be caused by a network error or a DNS resolution failure.
* // We could handle it in some way, but for now we will just stop.
* throw $e;
* }
*
* @class CAS_ProxiedService_Http_Post
* @category Authentication
@@ -95,7 +96,9 @@ extends CAS_ProxiedService_Http_Abstract
public function setContentType ($contentType)
{
if ($this->hasBeenSent()) {
throw new CAS_OutOfSequenceException('Cannot set the content type, request already sent.');
throw new CAS_OutOfSequenceException(
'Cannot set the content type, request already sent.'
);
}
$this->_contentType = $contentType;
@@ -112,7 +115,9 @@ extends CAS_ProxiedService_Http_Abstract
public function setBody ($body)
{
if ($this->hasBeenSent()) {
throw new CAS_OutOfSequenceException('Cannot set the body, request already sent.');
throw new CAS_OutOfSequenceException(
'Cannot set the body, request already sent.'
);
}
$this->_body = $body;
@@ -128,7 +133,10 @@ extends CAS_ProxiedService_Http_Abstract
protected function populateRequest (CAS_Request_RequestInterface $request)
{
if (empty($this->_contentType) && !empty($this->_body)) {
throw new CAS_ProxiedService_Exception("If you pass a POST body, you must specify a content type via ".get_class($this).'->setContentType($contentType).');
throw new CAS_ProxiedService_Exception(
"If you pass a POST body, you must specify a content type via "
.get_class($this).'->setContentType($contentType).'
);
}
$request->makePost();
+30 -10
View File
@@ -79,7 +79,9 @@ extends CAS_ProxiedService_Abstract
public function getServiceUrl ()
{
if (empty($this->_url)) {
throw new CAS_ProxiedService_Exception('No URL set via '.get_class($this).'->getServiceUrl($url).');
throw new CAS_ProxiedService_Exception(
'No URL set via '.get_class($this).'->getServiceUrl($url).'
);
}
return $this->_url;
@@ -100,7 +102,9 @@ extends CAS_ProxiedService_Abstract
public function setServiceUrl ($url)
{
if ($this->hasBeenOpened()) {
throw new CAS_OutOfSequenceException('Cannot set the URL, stream already opened.');
throw new CAS_OutOfSequenceException(
'Cannot set the URL, stream already opened.'
);
}
if (!is_string($url) || !strlen($url)) {
throw new CAS_InvalidArgumentException('Invalid url.');
@@ -127,7 +131,9 @@ extends CAS_ProxiedService_Abstract
public function setMailbox ($mailbox)
{
if ($this->hasBeenOpened()) {
throw new CAS_OutOfSequenceException('Cannot set the mailbox, stream already opened.');
throw new CAS_OutOfSequenceException(
'Cannot set the mailbox, stream already opened.'
);
}
if (!is_string($mailbox) || !strlen($mailbox)) {
throw new CAS_InvalidArgumentException('Invalid mailbox.');
@@ -155,7 +161,9 @@ extends CAS_ProxiedService_Abstract
public function setOptions ($options)
{
if ($this->hasBeenOpened()) {
throw new CAS_OutOfSequenceException('Cannot set options, stream already opened.');
throw new CAS_OutOfSequenceException(
'Cannot set options, stream already opened.'
);
}
if (!is_int($options)) {
throw new CAS_InvalidArgumentException('Invalid options.');
@@ -178,14 +186,19 @@ extends CAS_ProxiedService_Abstract
* PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE
* PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE
* PHPCAS_SERVICE_PT_FAILURE
* @throws CAS_ProxiedService_Exception If there is a failure sending the request to the target service. */
* @throws CAS_ProxiedService_Exception If there is a failure sending the
* request to the target service.
*/
public function open ()
{
if ($this->hasBeenOpened()) {
throw new CAS_OutOfSequenceException('Stream already opened.');
}
if (empty($this->_mailbox)) {
throw new CAS_ProxiedService_Exception('You must specify a mailbox via '.get_class($this).'->setMailbox($mailbox)');
throw new CAS_ProxiedService_Exception(
'You must specify a mailbox via '.get_class($this)
.'->setMailbox($mailbox)'
);
}
phpCAS::traceBegin();
@@ -193,13 +206,16 @@ extends CAS_ProxiedService_Abstract
// Get our proxy ticket and append it to our URL.
$this->initializeProxyTicket();
phpCAS::trace('opening IMAP mailbox `'.$this->_mailbox.'\'...');
$this->_stream = @imap_open($this->_mailbox, $this->_username, $this->getProxyTicket(), $this->_options);
$this->_stream = @imap_open(
$this->_mailbox, $this->_username, $this->getProxyTicket(),
$this->_options
);
if ($this->_stream) {
phpCAS::trace('ok');
} else {
phpCAS::trace('could not open mailbox');
// @todo add localization integration.
$message = 'IMAP Error: '.$url.' '. var_export(imap_errors(), true);
$message = 'IMAP Error: '.$this->_url.' '. var_export(imap_errors(), true);
phpCAS::trace($message);
throw new CAS_ProxiedService_Exception($message);
}
@@ -236,7 +252,9 @@ extends CAS_ProxiedService_Abstract
public function getStream ()
{
if (!$this->hasBeenOpened()) {
throw new CAS_OutOfSequenceException('Cannot access stream, not opened yet.');
throw new CAS_OutOfSequenceException(
'Cannot access stream, not opened yet.'
);
}
return $this->_stream;
}
@@ -252,7 +270,9 @@ extends CAS_ProxiedService_Abstract
public function getImapProxyTicket ()
{
if (!$this->hasBeenOpened()) {
throw new CAS_OutOfSequenceException('Cannot access errors, stream not opened yet.');
throw new CAS_OutOfSequenceException(
'Cannot access errors, stream not opened yet.'
);
}
return $this->getProxyTicket();
}
+5 -3
View File
@@ -31,8 +31,9 @@
* This interface defines methods that allow proxy-authenticated service handlers
* to be tested in unit tests.
*
* Classes implementing this interface SHOULD store the CAS_Client passed and initialize
* themselves with that client rather than via the static phpCAS method. For example:
* Classes implementing this interface SHOULD store the CAS_Client passed and
* initialize themselves with that client rather than via the static phpCAS
* method. For example:
*
* / **
* * Fetch our proxy ticket.
@@ -65,7 +66,8 @@ interface CAS_ProxiedService_Testable
* @param CAS_Client $casClient Cas client object
*
* @return void
* @throws CAS_OutOfSequenceException If called after a proxy ticket has already been initialized/set.
* @throws CAS_OutOfSequenceException If called after a proxy ticket has
* already been initialized/set.
*/
public function setCasClient (CAS_Client $casClient);
+14 -5
View File
@@ -59,7 +59,8 @@ implements CAS_ProxyChain_Interface
*/
public function __construct(array $chain)
{
$this->chain = array_values($chain); // Ensure that we have an indexed array
// Ensure that we have an indexed array
$this->chain = array_values($chain);
}
/**
@@ -78,17 +79,25 @@ implements CAS_ProxyChain_Interface
$proxy_url = $list[$i];
if (preg_match('/^\/.*\/[ixASUXu]*$/s', $search)) {
if (preg_match($search, $proxy_url)) {
phpCAS::trace("Found regexp " . $search . " matching " . $proxy_url);
phpCAS::trace(
"Found regexp " . $search . " matching " . $proxy_url
);
} else {
phpCAS::trace("No regexp match " . $search . " != " . $proxy_url);
phpCAS::trace(
"No regexp match " . $search . " != " . $proxy_url
);
$mismatch = true;
break;
}
} else {
if (strncasecmp($search, $proxy_url, strlen($search)) == 0) {
phpCAS::trace("Found string " . $search . " matching " . $proxy_url);
phpCAS::trace(
"Found string " . $search . " matching " . $proxy_url
);
} else {
phpCAS::trace("No match " . $search . " != " . $proxy_url);
phpCAS::trace(
"No match " . $search . " != " . $proxy_url
);
$mismatch = true;
break;
}
+4 -1
View File
@@ -60,7 +60,10 @@ implements CAS_Exception
PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE,
);
if (!in_array($code, $ptCodes)) {
trigger_error('Invalid code '.$code.' passed. Must be one of PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, or PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE.');
trigger_error(
'Invalid code '.$code
.' passed. Must be one of PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, or PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE.'
);
}
parent::__construct($message, $code);
+53 -17
View File
@@ -68,7 +68,9 @@ implements CAS_Request_RequestInterface
public function setUrl ($url)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
$this->url = $url;
@@ -86,7 +88,9 @@ implements CAS_Request_RequestInterface
public function addCookie ($name, $value)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
$this->cookies[$name] = $value;
@@ -105,7 +109,9 @@ implements CAS_Request_RequestInterface
public function addCookies (array $cookies)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
$this->cookies = array_merge($this->cookies, $cookies);
@@ -122,7 +128,9 @@ implements CAS_Request_RequestInterface
public function addHeader ($header)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
$this->headers[] = $header;
@@ -139,7 +147,9 @@ implements CAS_Request_RequestInterface
public function addHeaders (array $headers)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
$this->headers = array_merge($this->headers, $headers);
@@ -154,7 +164,9 @@ implements CAS_Request_RequestInterface
public function makePost ()
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
$this->isPost = true;
@@ -171,10 +183,14 @@ implements CAS_Request_RequestInterface
public function setPostBody ($body)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
if (!$this->isPost) {
throw new CAS_OutOfSequenceException('Cannot add a POST body to a GET request, use makePost() first.');
throw new CAS_OutOfSequenceException(
'Cannot add a POST body to a GET request, use makePost() first.'
);
}
$this->postBody = $body;
@@ -192,7 +208,9 @@ implements CAS_Request_RequestInterface
public function setSslCaCert ($caCertPath,$validate_cn=true)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
$this->caCertPath = $caCertPath;
$this->validateCN = $validate_cn;
@@ -211,10 +229,14 @@ implements CAS_Request_RequestInterface
public function send ()
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot send again.');
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot send again.'
);
}
if (is_null($this->url) || !$this->url) {
throw new CAS_OutOfSequenceException('A url must be specified via setUrl() before the request can be sent.');
throw new CAS_OutOfSequenceException(
'A url must be specified via setUrl() before the request can be sent.'
);
}
$this->_sent = true;
return $this->sendRequest();
@@ -288,7 +310,9 @@ implements CAS_Request_RequestInterface
public function getResponseHeaders ()
{
if (!$this->_sent) {
throw new CAS_OutOfSequenceException('Request has not been sent yet. Cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has not been sent yet. Cannot '.__METHOD__
);
}
return $this->_responseHeaders;
}
@@ -302,11 +326,19 @@ implements CAS_Request_RequestInterface
public function getResponseStatusCode ()
{
if (!$this->_sent) {
throw new CAS_OutOfSequenceException('Request has not been sent yet. Cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has not been sent yet. Cannot '.__METHOD__
);
}
if (!preg_match('/HTTP\/[0-9.]+\s+([0-9]+)\s*(.*)/', $this->_responseHeaders[0], $matches)) {
throw new CAS_Request_Exception("Bad response, no status code was found in the first line.");
if (!preg_match(
'/HTTP\/[0-9.]+\s+([0-9]+)\s*(.*)/',
$this->_responseHeaders[0], $matches
)
) {
throw new CAS_Request_Exception(
'Bad response, no status code was found in the first line.'
);
}
return intval($matches[1]);
@@ -321,7 +353,9 @@ implements CAS_Request_RequestInterface
public function getResponseBody ()
{
if (!$this->_sent) {
throw new CAS_OutOfSequenceException('Request has not been sent yet. Cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has not been sent yet. Cannot '.__METHOD__
);
}
return $this->_responseBody;
@@ -336,7 +370,9 @@ implements CAS_Request_RequestInterface
public function getErrorMessage ()
{
if (!$this->_sent) {
throw new CAS_OutOfSequenceException('Request has not been sent yet. Cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has not been sent yet. Cannot '.__METHOD__
);
}
return $this->_errorMessage;
}
+15 -5
View File
@@ -64,10 +64,14 @@ implements CAS_Request_MultiRequestInterface
public function addRequest (CAS_Request_RequestInterface $request)
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
if (!$request instanceof CAS_Request_CurlRequest) {
throw new CAS_InvalidArgumentException('As a CAS_Request_CurlMultiRequest, I can only work with CAS_Request_CurlRequest objects.');
throw new CAS_InvalidArgumentException(
'As a CAS_Request_CurlMultiRequest, I can only work with CAS_Request_CurlRequest objects.'
);
}
$this->_requests[] = $request;
@@ -81,7 +85,9 @@ implements CAS_Request_MultiRequestInterface
public function getNumRequests()
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot '.__METHOD__);
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot '.__METHOD__
);
}
return count($this->_requests);
}
@@ -100,10 +106,14 @@ implements CAS_Request_MultiRequestInterface
public function send ()
{
if ($this->_sent) {
throw new CAS_OutOfSequenceException('Request has already been sent cannot send again.');
throw new CAS_OutOfSequenceException(
'Request has already been sent cannot send again.'
);
}
if (!count($this->_requests)) {
throw new CAS_OutOfSequenceException('At least one request must be added via addRequest() before the multi-request can be sent.');
throw new CAS_OutOfSequenceException(
'At least one request must be added via addRequest() before the multi-request can be sent.'
);
}
$this->_sent = true;
+4 -2
View File
@@ -75,7 +75,9 @@ implements CAS_Request_RequestInterface
$buf = curl_exec($ch);
if ( $buf === false ) {
phpCAS::trace('curl_exec() failed');
$this->storeErrorMessage('CURL error #'.curl_errno($ch).': '.curl_error($ch));
$this->storeErrorMessage(
'CURL error #'.curl_errno($ch).': '.curl_error($ch)
);
$res = false;
} else {
$this->storeResponseBody($buf);
@@ -120,7 +122,7 @@ implements CAS_Request_RequestInterface
if ($this->validateCN) {
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
} else {
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
}
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_CAINFO, $this->caCertPath);
@@ -0,0 +1,70 @@
<?php
/**
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* PHP Version 5
*
* @file CAS/InvalidArgumentException.php
* @category Authentication
* @package PhpCAS
* @author Adam Franco <afranco@middlebury.edu>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
/**
* Exception that denotes invalid arguments were passed.
*
* @class CAS_InvalidArgumentException
* @category Authentication
* @package PhpCAS
* @author Adam Franco <afranco@middlebury.edu>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://wiki.jasig.org/display/CASC/phpCAS
*/
class CAS_TypeMismatchException
extends CAS_InvalidArgumentException
{
/**
* Constructor, provides a nice message.
*
* @param mixed $argument Argument
* @param string $argumentName Argument Name
* @param string $type Type
* @param string $message Error Message
* @param integer $code Code
*
* @return void
*/
public function __construct (
$argument, $argumentName, $type, $message = '', $code = 0
) {
if (is_object($argument)) {
$foundType = get_class($argument).' object';
} else {
$foundType = gettype($argument);
}
parent::__construct(
'type mismatched for parameter '
. $argumentName . ' (should be \'' . $type .' \'), '
. $foundType . ' given. ' . $message, $code
);
}
}
?>
+2 -2
View File
@@ -1,5 +1,5 @@
Description of phpCAS 1.3.2 library import
Description of phpCAS 1.3.3 library import
* downloaded from http://downloads.jasig.org/cas-clients/php/current/
iarenaza
merrill
+39 -25
View File
@@ -111,6 +111,26 @@ class auth_plugin_cas extends auth_plugin_ldap {
return;
}
// If the multi-authentication setting is used, check for the param before connecting to CAS.
if ($this->config->multiauth) {
$authCAS = optional_param('authCAS', '', PARAM_RAW);
if ($authCAS == 'NOCAS') {
return;
}
// Show authentication form for multi-authentication.
// Test pgtIou parameter for proxy mode (https connection in background from CAS server to the php server).
if ($authCAS != 'CAS' && !isset($_GET['pgtIou'])) {
$PAGE->set_url('/login/index.php');
$PAGE->navbar->add($CASform);
$PAGE->set_title("$site->fullname: $CASform");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
include($CFG->dirroot.'/auth/cas/cas_form.html');
echo $OUTPUT->footer();
exit();
}
}
// Connection to CAS server
$this->connectCAS();
@@ -134,27 +154,6 @@ class auth_plugin_cas extends auth_plugin_ldap {
return;
}
if ($this->config->multiauth) {
$authCAS = optional_param('authCAS', '', PARAM_RAW);
if ($authCAS == 'NOCAS') {
return;
}
// Show authentication form for multi-authentication
// test pgtIou parameter for proxy mode (https connection
// in background from CAS server to the php server)
if ($authCAS != 'CAS' && !isset($_GET['pgtIou'])) {
$PAGE->set_url('/login/index.php');
$PAGE->navbar->add($CASform);
$PAGE->set_title("$site->fullname: $CASform");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
include($CFG->dirroot.'/auth/cas/cas_form.html');
echo $OUTPUT->footer();
exit();
}
}
// Force CAS authentication (if needed).
if (!phpCAS::isAuthenticated()) {
phpCAS::setLang($this->config->language);
@@ -167,12 +166,27 @@ class auth_plugin_cas extends auth_plugin_ldap {
*
*/
function prelogout_hook() {
global $CFG;
global $CFG, $USER, $DB;
if (!empty($this->config->logoutcas)) {
$backurl = $CFG->wwwroot;
if (!empty($this->config->logoutcas) && $USER->auth == $this->authtype) {
$backurl = !empty($this->config->logout_return_url) ? $this->config->logout_return_url : $CFG->wwwroot;
$this->connectCAS();
phpCAS::logoutWithURL($backurl);
// Note: Hack to stable versions to trigger the event before it redirect to CAS logout.
$sid = session_id();
$event = \core\event\user_loggedout::create(
array(
'userid' => $USER->id,
'objectid' => $USER->id,
'other' => array('sessionid' => $sid),
)
);
if ($session = $DB->get_record('sessions', array('sid' => $sid))) {
$event->add_record_snapshot('sessions', $session);
}
\core\session\manager::terminate_current();
$event->trigger();
phpCAS::logoutWithRedirectService($backurl);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<location>CAS</location>
<name>CAS</name>
<license>BSD</license>
<version>1.3.2</version>
<version>1.3.3</version>
<licenseversion></licenseversion>
</library>
</libraries>
+11
View File
@@ -384,6 +384,10 @@ class auth_plugin_db extends auth_plugin_base {
if ($old_user = $DB->get_record('user', array('username'=>$username, 'deleted'=>0, 'suspended'=>1, 'mnethostid'=>$CFG->mnet_localhost_id, 'auth'=>$this->authtype))) {
$DB->set_field('user', 'suspended', 0, array('id'=>$old_user->id));
$trace->output(get_string('auth_dbreviveduser', 'auth_db', array('name'=>$username, 'id'=>$old_user->id)), 1);
// Trigger user_updated event.
\core\event\user_updated::create_from_userid($old_user->id)->trigger();
continue;
}
}
@@ -410,6 +414,10 @@ class auth_plugin_db extends auth_plugin_base {
}
try {
$id = $DB->insert_record ('user', $user); // it is truly a new user
// Trigger user_created event.
\core\event\user_created::create_from_userid($id)->trigger();
$trace->output(get_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)), 1);
} catch (moodle_exception $e) {
$trace->output(get_string('auth_dbinsertusererror', 'auth_db', $user->username), 1);
@@ -547,6 +555,9 @@ class auth_plugin_db extends auth_plugin_base {
}
if ($updated) {
$DB->set_field('user', 'timemodified', time(), array('id'=>$userid));
// Trigger user_updated event.
\core\event\user_updated::create_from_userid($userid)->trigger();
}
return $DB->get_record('user', array('id'=>$userid, 'deleted'=>0));
}
+17 -14
View File
@@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die();
class auth_db_testcase extends advanced_testcase {
protected function init_auth_database() {
public function init_auth_database() {
global $DB, $CFG;
require_once("$CFG->dirroot/auth/db/auth.php");
@@ -46,14 +46,9 @@ class auth_db_testcase extends advanced_testcase {
set_config('host', $CFG->dbhost.':'.$CFG->dboptions['dbport'], 'auth/db');
}
switch (get_class($DB)) {
case 'mssql_native_moodle_database':
set_config('type', 'mssql_n', 'auth/db');
set_config('sybasequoting', '1', 'auth/db');
break;
switch ($DB->get_dbfamily()) {
case 'mariadb_native_moodle_database':
case 'mysqli_native_moodle_database':
case 'mysql':
set_config('type', 'mysqli', 'auth/db');
set_config('setupsql', "SET NAMES 'UTF-8'", 'auth/db');
set_config('sybasequoting', '0', 'auth/db');
@@ -66,12 +61,12 @@ class auth_db_testcase extends advanced_testcase {
}
break;
case 'oci_native_moodle_database':
case 'oracle':
set_config('type', 'oci8po', 'auth/db');
set_config('sybasequoting', '1', 'auth/db');
break;
case 'pgsql_native_moodle_database':
case 'postgres':
set_config('type', 'postgres7', 'auth/db');
$setupsql = "SET NAMES 'UTF-8'";
if (!empty($CFG->dboptions['dbschema'])) {
@@ -81,20 +76,28 @@ class auth_db_testcase extends advanced_testcase {
set_config('sybasequoting', '0', 'auth/db');
if (!empty($CFG->dboptions['dbsocket']) and ($CFG->dbhost === 'localhost' or $CFG->dbhost === '127.0.0.1')) {
if (strpos($CFG->dboptions['dbsocket'], '/') !== false) {
set_config('host', $CFG->dboptions['dbsocket'], 'auth/db');
$socket = $CFG->dboptions['dbsocket'];
if (!empty($CFG->dboptions['dbport'])) {
$socket .= ':' . $CFG->dboptions['dbport'];
}
set_config('host', $socket, 'auth/db');
} else {
set_config('host', '', 'auth/db');
}
}
break;
case 'sqlsrv_native_moodle_database':
set_config('type', 'mssqlnative', 'auth/db');
case 'mssql':
if (get_class($DB) == 'mssql_native_moodle_database') {
set_config('type', 'mssql_n', 'auth/db');
} else {
set_config('type', 'mssqlnative', 'auth/db');
}
set_config('sybasequoting', '1', 'auth/db');
break;
default:
throw new exception('Unknown database driver '.get_class($DB));
throw new exception('Unknown database family ' . $DB->get_dbfamily());
}
$table = new xmldb_table('auth_db_users');
+150
View File
@@ -0,0 +1,150 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Events tests.
*
* @package auth_db
* @category test
* @copyright 2014 Mark Nelson <markn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/auth/db/tests/db_test.php');
class auth_db_events_testcase extends advanced_testcase {
/**
* Test set up.
*/
public function setUp() {
$this->resetAfterTest(true);
}
/**
* Tests that the locations in the auth_db API that create a user trigger the user_created event.
*/
public function test_user_created() {
global $DB;
$this->preventResetByRollback();
// Initialise the database.
$authdbtestcase = new auth_db_testcase();
$authdbtestcase->init_auth_database();
$auth = get_auth_plugin('db');
$auth->db_init();
// Add a user to the auth_db_users table - we will then call sync_users to
// deal with the record here. In this case it will create the user.
$user = new stdClass();
$user->name = 'mark';
$user->pass = 'password123';
$user->email = 'what@legend.com';
$user->id = $DB->insert_record('auth_db_users', $user);
// Run sync_users and capture the user_created event.
$sink = $this->redirectEvents();
$trace = new null_progress_trace();
$auth->sync_users($trace, false);
$events = $sink->get_events();
$sink->close();
// Check that there is only one event.
$this->assertEquals(1, count($events));
// Get the event.
$event = array_pop($events);
// Test that the user created event was triggered - no need to test the other
// details of the event as that is done extensively in other unit tests.
$this->assertInstanceOf('\core\event\user_created', $event);
}
/**
* Tests that the locations in the auth_db API that update a user trigger the user_updated event.
*/
public function test_user_updated() {
global $CFG, $DB;
$this->preventResetByRollback();
// Initialise the database.
$authdbtestcase = new auth_db_testcase();
$authdbtestcase->init_auth_database();
$auth = get_auth_plugin('db');
$auth->db_init();
// Add a suspended user.
$user = array();
$user['username'] = 'mark';
$user['suspended'] = '1';
$user['mnethostid'] = $CFG->mnet_localhost_id;
$user['auth'] = 'db';
$this->getDataGenerator()->create_user($user);
// Add a user to the auth_db_users table - we will then call sync_users to
// deal with the record here. In this case it will un-suspend the user.
$user = new stdClass();
$user->name = 'mark';
$user->pass = 'password123';
$user->email = 'what@legend.com';
$user->id = $DB->insert_record('auth_db_users', $user);
// Set the config to remove the suspension on the user.
set_config('removeuser', AUTH_REMOVEUSER_SUSPEND, 'auth/db');
$auth->config->removeuser = AUTH_REMOVEUSER_SUSPEND;
// Run sync_users and capture the user_updated event.
$sink = $this->redirectEvents();
$trace = new null_progress_trace();
$auth->sync_users($trace, false);
$events = $sink->get_events();
$sink->close();
// Check that there is only one event.
$this->assertEquals(1, count($events));
// Get the event.
$event = array_pop($events);
// Test that the user updated event was triggered - no need to test the other
// details of the event as that is done extensively in other unit tests.
$this->assertInstanceOf('\core\event\user_updated', $event);
// Run sync_users and capture the user_updated event.
$sink = $this->redirectEvents();
$auth->update_user_record('mark');
$events = $sink->get_events();
$sink->close();
// Check that there is only one event.
$this->assertEquals(1, count($events));
// Get the event.
$event = array_pop($events);
// Test that the user updated event was triggered - no need to test the other
// details of the event as that is done extensively in other unit tests.
$this->assertInstanceOf('\core\event\user_updated', $event);
}
}
+4 -1
View File
@@ -94,11 +94,14 @@ class auth_plugin_email extends auth_plugin_base {
$user->calendartype = $CFG->calendartype;
}
$user->id = user_create_user($user, false);
$user->id = user_create_user($user, false, false);
// Save any custom profile field information.
profile_save_data($user);
// Trigger event.
\core\event\user_created::create_from_userid($user->id)->trigger();
if (! send_confirmation_email($user)) {
print_error('auth_emailnoemail','auth_email');
}
+5 -2
View File
@@ -551,7 +551,7 @@ class auth_plugin_ldap extends auth_plugin_base {
print_error('auth_ldap_create_error', 'auth_ldap');
}
$user->id = user_create_user($user, false);
$user->id = user_create_user($user, false, false);
// Save any custom profile field information
profile_save_data($user);
@@ -564,6 +564,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$user = $DB->get_record('user', array('id'=>$user->id));
\core\event\user_created::create_from_userid($user->id)->trigger();
if (! send_confirmation_email($user)) {
print_error('noemail', 'auth_ldap');
}
@@ -735,6 +737,7 @@ class auth_plugin_ldap extends auth_plugin_base {
do {
$value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute);
$value = core_text::convert($value[0], $this->config->ldapencoding, 'utf-8');
$value = trim($value);
$this->ldap_bulk_insert($value);
} while ($entry = ldap_next_entry($ldapconnection, $entry));
}
@@ -1027,7 +1030,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
}
}
user_update_user($newuser, false);
user_update_user($newuser, false, false);
}
} else {
return false;
+2 -2
View File
@@ -79,7 +79,7 @@ $string['auth_ldap_passtype'] = 'Specify the format of new or changed passwords
$string['auth_ldap_passtype_key'] = 'Password format';
$string['auth_ldap_passwdexpire_settings'] = 'LDAP password expiration settings.';
$string['auth_ldap_preventpassindb'] = 'Select yes to prevent passwords from being stored in Moodle\'s DB.';
$string['auth_ldap_preventpassindb_key'] = 'Hide passwords';
$string['auth_ldap_preventpassindb_key'] = 'Don\'t cache passwords';
$string['auth_ldap_search_sub'] = 'Search users from subcontexts.';
$string['auth_ldap_search_sub_key'] = 'Search subcontexts';
$string['auth_ldap_server_settings'] = 'LDAP server settings';
@@ -125,7 +125,7 @@ $string['notcalledfromserver'] = 'Should not be called from the web server!';
$string['noupdatestobedone'] = "No updates to be done\n";
$string['nouserentriestoremove'] = "No user entries to be removed\n";
$string['nouserentriestorevive'] = "No user entries to be revived\n";
$string['nouserstobeadded'] = "No users to be added\n";
$string['nouserstobeadded'] = 'No user entries to be added';
$string['ntlmsso_attempting'] = 'Attempting Single Sign On via NTLM...';
$string['ntlmsso_failed'] = 'Auto-login failed, try the normal login page...';
$string['ntlmsso_isdisabled'] = 'NTLM SSO is disabled.';
+136
View File
@@ -279,6 +279,142 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$this->assertEventLegacyLogData($expectedlog, $event);
}
/**
* Test logging in via LDAP calls a user_loggedin event.
*/
public function test_ldap_user_signup() {
global $CFG, $DB;
// User to create.
$user = array(
'username' => 'usersignuptest1',
'password' => 'Moodle2014!',
'idnumber' => 'idsignuptest1',
'firstname' => 'First Name User Test 1',
'lastname' => 'Last Name User Test 1',
'middlename' => 'Middle Name User Test 1',
'lastnamephonetic' => '最後のお名前のテスト一号',
'firstnamephonetic' => 'お名前のテスト一号',
'alternatename' => 'Alternate Name User Test 1',
'email' => 'usersignuptest1@email.com',
'description' => 'This is a description for user 1',
'city' => 'Perth',
'country' => 'au',
'mnethostid' => $CFG->mnet_localhost_id,
'auth' => 'ldap'
);
if (!extension_loaded('ldap')) {
$this->markTestSkipped('LDAP extension is not loaded.');
}
$this->resetAfterTest();
require_once($CFG->dirroot.'/auth/ldap/auth.php');
require_once($CFG->libdir.'/ldaplib.php');
if (!defined('TEST_AUTH_LDAP_HOST_URL') or !defined('TEST_AUTH_LDAP_BIND_DN') or !defined('TEST_AUTH_LDAP_BIND_PW') or !defined('TEST_AUTH_LDAP_DOMAIN')) {
$this->markTestSkipped('External LDAP test server not configured.');
}
// Make sure we can connect the server.
$debuginfo = '';
if (!$connection = ldap_connect_moodle(TEST_AUTH_LDAP_HOST_URL, 3, 'rfc2307', TEST_AUTH_LDAP_BIND_DN, TEST_AUTH_LDAP_BIND_PW, LDAP_DEREF_NEVER, $debuginfo, false)) {
$this->markTestSkipped('Can not connect to LDAP test server: '.$debuginfo);
}
$this->enable_plugin();
// Create new empty test container.
$topdn = 'dc=moodletest,'.TEST_AUTH_LDAP_DOMAIN;
$this->recursive_delete($connection, TEST_AUTH_LDAP_DOMAIN, 'dc=moodletest');
$o = array();
$o['objectClass'] = array('dcObject', 'organizationalUnit');
$o['dc'] = 'moodletest';
$o['ou'] = 'MOODLETEST';
if (!ldap_add($connection, 'dc=moodletest,'.TEST_AUTH_LDAP_DOMAIN, $o)) {
$this->markTestSkipped('Can not create test LDAP container.');
}
// Create a few users.
$o = array();
$o['objectClass'] = array('organizationalUnit');
$o['ou'] = 'users';
ldap_add($connection, 'ou='.$o['ou'].','.$topdn, $o);
// Configure the plugin a bit.
set_config('host_url', TEST_AUTH_LDAP_HOST_URL, 'auth/ldap');
set_config('start_tls', 0, 'auth/ldap');
set_config('ldap_version', 3, 'auth/ldap');
set_config('ldapencoding', 'utf-8', 'auth/ldap');
set_config('pagesize', '2', 'auth/ldap');
set_config('bind_dn', TEST_AUTH_LDAP_BIND_DN, 'auth/ldap');
set_config('bind_pw', TEST_AUTH_LDAP_BIND_PW, 'auth/ldap');
set_config('user_type', 'rfc2307', 'auth/ldap');
set_config('contexts', 'ou=users,'.$topdn, 'auth/ldap');
set_config('search_sub', 0, 'auth/ldap');
set_config('opt_deref', LDAP_DEREF_NEVER, 'auth/ldap');
set_config('user_attribute', 'cn', 'auth/ldap');
set_config('memberattribute', 'memberuid', 'auth/ldap');
set_config('memberattribute_isdn', 0, 'auth/ldap');
set_config('creators', 'cn=creators,'.$topdn, 'auth/ldap');
set_config('removeuser', AUTH_REMOVEUSER_KEEP, 'auth/ldap');
set_config('field_map_email', 'mail', 'auth/ldap');
set_config('field_updatelocal_email', 'oncreate', 'auth/ldap');
set_config('field_updateremote_email', '0', 'auth/ldap');
set_config('field_lock_email', 'unlocked', 'auth/ldap');
set_config('field_map_firstname', 'givenName', 'auth/ldap');
set_config('field_updatelocal_firstname', 'oncreate', 'auth/ldap');
set_config('field_updateremote_firstname', '0', 'auth/ldap');
set_config('field_lock_firstname', 'unlocked', 'auth/ldap');
set_config('field_map_lastname', 'sn', 'auth/ldap');
set_config('field_updatelocal_lastname', 'oncreate', 'auth/ldap');
set_config('field_updateremote_lastname', '0', 'auth/ldap');
set_config('field_lock_lastname', 'unlocked', 'auth/ldap');
set_config('passtype', 'md5', 'auth/ldap');
set_config('create_context', 'ou=users,'.$topdn, 'auth/ldap');
$this->assertEquals(2, $DB->count_records('user'));
$this->assertEquals(0, $DB->count_records('role_assignments'));
/** @var auth_plugin_ldap $auth */
$auth = get_auth_plugin('ldap');
$sink = $this->redirectEvents();
$auth->user_signup((object)$user, false);
$this->assertDebuggingCalled('Not sending email due to $CFG->noemailever config setting');
$events = $sink->get_events();
$sink->close();
// Verify 2 events get generated.
$this->assertCount(2, $events);
// Get record from db.
$dbuser = $DB->get_record('user', array('username' => $user['username']));
$user['id'] = $dbuser->id;
// Last event is user_created.
$event = array_pop($events);
$this->assertInstanceOf('\core\event\user_created', $event);
$this->assertEquals($user['id'], $event->objectid);
$this->assertEquals('user_created', $event->get_legacy_eventname());
$this->assertEquals(context_user::instance($user['id']), $event->get_context());
$expectedlogdata = array(SITEID, 'user', 'add', '/view.php?id='.$event->objectid, fullname($dbuser));
$this->assertEventLegacyLogData($expectedlogdata, $event);
// First event is user_password_updated.
$event = array_pop($events);
$this->assertInstanceOf('\core\event\user_updated', $event);
// Delete user which we just created.
ldap_delete($connection, 'cn='.$user['username'].',ou=users,'.$topdn);
}
protected function create_ldap_user($connection, $topdn, $i) {
$o = array();
$o['objectClass'] = array('inetOrgPerson', 'organizationalPerson', 'person', 'posixAccount');
+2 -3
View File
@@ -775,10 +775,9 @@ class auth_plugin_mnet extends auth_plugin_base {
u.mnethostid = ?
AND l.id > ?
AND l.course IS NOT NULL
ORDER by l.id ASC
LIMIT 500";
ORDER by l.id ASC";
$mnethostlogs = $DB->get_records_sql($mnethostlogssql, array($mnethostid, $mnet_request->response['last log id']));
$mnethostlogs = $DB->get_records_sql($mnethostlogssql, array($mnethostid, $mnet_request->response['last log id']), 0, 500);
if ($mnethostlogs == false) {
continue;
+9 -3
View File
@@ -4,7 +4,9 @@
require('../../config.php');
$context = context_system::instance();
$PAGE->set_url('/auth/shibboleth/index.php');
$PAGE->set_context($context);
// Support for WAYFless URLs.
$target = optional_param('target', '', PARAM_LOCALURL);
@@ -38,9 +40,13 @@
if (!empty($_SERVER[$pluginconfig->user_attribute])) { // Shibboleth auto-login
$frm = new stdClass();
$frm->username = strtolower($_SERVER[$pluginconfig->user_attribute]);
$frm->password = substr(base64_encode($_SERVER[$pluginconfig->user_attribute]),0,8);
// The random password consists of the first 8 letters of the base 64 encoded user ID
// This password is never used unless the user account is converted to manual
// The password is never actually used, but needs to be passed to the functions 'user_login' and
// 'authenticate_user_login'. Shibboleth returns true for the function 'prevent_local_password', which is
// used when setting the password in 'update_internal_user_password'. When 'prevent_local_password'
// returns true, the password is set to 'not cached' (AUTH_PASSWORD_NOT_CACHED) in the Moodle DB. However,
// rather than setting the password to a hard-coded value, we will generate one each time, in case there are
// changes to the Shibboleth plugin and it is actually used.
$frm->password = generate_password(8);
/// Check if the user has actually submitted login data to us
+18 -24
View File
@@ -8,6 +8,8 @@ require_once("../../config.php");
require_once($CFG->dirroot."/auth/shibboleth/auth.php");
$action = optional_param('action', '', PARAM_ALPHA);
$redirect = optional_param('return', '', PARAM_URL);
// Find out whether host supports https
$protocol = 'http://';
@@ -15,38 +17,32 @@ if ( isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']
$protocol = 'https://';
}
// Front channel logout
if (
isset($_GET['return'])
&& isset($_GET['action'])
&& $_GET['action'] == 'logout'
){
// Logout out user from application
// E.g. destroy application session/cookie etc
require_logout();
// Finally, send user to the return URL
redirect($_GET['return']);
// If the shibboleth plugin is not enable, throw an exception.
if (!is_enabled_auth('shibboleth')) {
throw new moodle_exception(get_string('pluginnotenabled', 'auth', 'shibboleth'));
}
// Back channel logout
elseif (!empty($HTTP_RAW_POST_DATA)) {
// Front channel logout.
if ($action == 'logout' && !empty($redirect)) {
// Requires PHP 5
if ($USER->auth == 'shibboleth') {
// Logout out user from application.
require_logout();
// Finally, send user to the return URL.
redirect($redirect);
}
} else if (!empty($HTTP_RAW_POST_DATA)) {
// Set SOAP header
// Back channel logout.
// Set SOAP header.
$server = new SoapServer($protocol.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'/LogoutNotification.wsdl');
$server->addFunction("LogoutNotification");
$server->handle();
}
// Return WSDL
else {
} else {
// Return WSDL.
header('Content-Type: text/xml');
echo <<<WSDL
@@ -119,9 +115,7 @@ For more information see:
</definitions>
WSDL;
exit;
}
/******************************************************************************/
function LogoutNotification($SessionID){
+48 -17
View File
@@ -55,7 +55,7 @@ class behat_auth extends behat_base {
// Generic steps (we will prefix them later expanding the navigation dropdown if necessary).
$steps = array(
new Given('I follow "' . get_string('login') . '"'),
new Given('I click on "' . get_string('login') . '" "link" in the ".logininfo" "css_element"'),
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') . '"')
@@ -69,21 +69,9 @@ class behat_auth extends behat_base {
// Wait for the homepage to be ready.
$this->getSession()->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
// Checking if we need to click the navbar button to show the navigation menu, it
// is hidden by default when using clean theme and a medium or small size screen size.
// The DOM and the JS should be all ready and loaded. Running without spinning
// as this is a widely used step and we can not spend time here trying to see
// a DOM node that is not always there (at the moment clean is not even the
// default theme...).
$navbuttonjs = "return (
Y.one('.btn-navbar') &&
Y.one('.btn-navbar').getComputedStyle('display') !== 'none'
)";
// Adding an extra click we need to show the 'Log in' link.
if ($this->getSession()->getDriver()->evaluateScript($navbuttonjs)) {
array_unshift($steps, new Given('I click on ".btn-navbar" "css_element"'));
// If it is needed, it expands the navigation bar with the 'Log in' link.
if ($clicknavbar = $this->get_expand_navbar_step()) {
array_unshift($steps, $clicknavbar);
}
return $steps;
@@ -95,7 +83,50 @@ class behat_auth extends behat_base {
* @Given /^I log out$/
*/
public function i_log_out() {
return new When('I follow "' . get_string('logout') . '"');
$steps = array(new When('I follow "' . get_string('logout') . '"'));
// No need to check anything else if we run without JS.
if (!$this->running_javascript()) {
return $steps;
}
// If it is needed, it expands the navigation bar with the 'Log out' link.
if ($clicknavbar = $this->get_expand_navbar_step()) {
array_unshift($steps, $clicknavbar);
}
return $steps;
}
/**
* Returns a step to open the navigation bar if it is needed.
*
* The top log in and log out links are hidden when middle or small
* size windows (or devices) are used. This step returns a step definition
* clicking to expand the navbar if it is hidden.
*
* @return Given|bool A step definition or false if there is no need to show the navbar.
*/
protected function get_expand_navbar_step() {
// Checking if we need to click the navbar button to show the navigation menu, it
// is hidden by default when using clean theme and a medium or small screen size.
// The DOM and the JS should be all ready and loaded. Running without spinning
// as this is a widely used step and we can not spend time here trying to see
// a DOM node that is not always there (at the moment clean is not even the
// default theme...).
$navbuttonjs = "return (
Y.one('.btn-navbar') &&
Y.one('.btn-navbar').getComputedStyle('display') !== 'none'
)";
// Adding an extra click we need to show the 'Log in' link.
if (!$this->getSession()->getDriver()->evaluateScript($navbuttonjs)) {
return false;
}
return new Given('I click on ".btn-navbar" "css_element"');
}
}
+4 -4
View File
@@ -6,12 +6,12 @@ Feature: Authentication
Scenario: Log in with the predefined admin user with Javascript disabled
Given I log in as "admin"
Then I should see "You are logged in as Admin User"
Then I should see "You are logged in as Admin User" in the "page-footer" "region"
@javascript
Scenario: Log in with the predefined admin user with Javascript enabled
Given I log in as "admin"
Then I should see "You are logged in as Admin User"
Then I should see "You are logged in as Admin User" in the "page-footer" "region"
Scenario: Log in as an existing admin user filling the form
Given the following "users" exists:
@@ -22,7 +22,7 @@ Feature: Authentication
And I fill in "Username" with "testuser"
And I fill in "Password" with "testuser"
And I press "Log in"
Then I should see "You are logged in as"
Then I should see "You are logged in as" in the "page-footer" "region"
Scenario: Log in as an unexisting user filling the form
Given the following "users" exists:
@@ -38,4 +38,4 @@ Feature: Authentication
Scenario: Log out
Given I log in as "admin"
When I log out
Then I should see "You are not logged in"
Then I should see "You are not logged in" in the "page-footer" "region"
+1 -1
View File
@@ -338,7 +338,7 @@ class cc2moodle {
$replace_values = array($i,
$i - 1,
$topic['title'],
entities::safexml($topic['title']),
$node_node_course_sections_section_mods_mod);
} else {
+24 -1
View File
@@ -57,6 +57,9 @@ class restore_controller extends base_controller {
protected $checksum; // Cache @checksumable results for lighter @is_checksum_correct() uses
/** @var int Number of restore_controllers that are currently executing */
protected static $executing = 0;
/**
* Constructor.
*
@@ -325,7 +328,27 @@ class restore_controller extends base_controller {
$this->log('notifying plan about excluded activities by type', backup::LOG_DEBUG);
$this->plan->set_excluding_activities();
}
return $this->plan->execute();
self::$executing++;
try {
$this->plan->execute();
} catch (Exception $e) {
self::$executing--;
throw $e;
}
self::$executing--;
}
/**
* Checks whether restore is currently executing. Certain parts of code that
* is called during restore, but not directly part of the restore system, may
* need to behave differently during restore (e.g. do not bother resetting a
* cache because we know it will be reset at end of operation).
* @since Moodle 2.6.3
*
* @return bool True if any restore is currently executing
*/
public static function is_executing() {
return self::$executing > 0;
}
/**
@@ -26,6 +26,7 @@ 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');
/*
* controller tests (all)
@@ -101,6 +102,73 @@ class core_backup_controller_testcase extends advanced_testcase {
backup::INTERACTIVE_NO, backup::MODE_IMPORT, $this->userid);
$this->assertEquals($bc->get_include_files(), 0);
}
/**
* Tests the restore_controller.
*/
public function test_restore_controller_is_executing() {
global $CFG;
// Make a backup.
check_dir_exists($CFG->tempdir . '/backup');
$bc = new backup_controller(backup::TYPE_1ACTIVITY, $this->moduleid, backup::FORMAT_MOODLE,
backup::INTERACTIVE_NO, backup::MODE_IMPORT, $this->userid);
$backupid = $bc->get_backupid();
$bc->execute_plan();
$bc->destroy();
// The progress class will get called during restore, so we can use that
// to check the executing flag is true.
$progress = new core_backup_progress_restore_is_executing();
// Set up restore.
$rc = new restore_controller($backupid, $this->courseid,
backup::INTERACTIVE_NO, backup::MODE_SAMESITE, $this->userid,
backup::TARGET_EXISTING_ADDING);
$this->assertTrue($rc->execute_precheck());
// Check restore is NOT executing.
$this->assertFalse(restore_controller::is_executing());
// Execute restore.
$rc->set_progress($progress);
$rc->execute_plan();
// Check restore is NOT executing afterward either.
$this->assertFalse(restore_controller::is_executing());
$rc->destroy();
// During restore, check that executing was true.
$this->assertTrue(count($progress->executing) > 0);
$alltrue = true;
foreach ($progress->executing as $executing) {
if (!$executing) {
$alltrue = false;
break;
}
}
$this->assertTrue($alltrue);
// Avoid test warning.
set_time_limit(0);
}
}
/**
* Progress class that records the result of restore_controller::is_executing calls.
*
* @package core_backup
* @copyright 2014 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_backup_progress_restore_is_executing extends core_backup_progress {
/** @var array Array of results from calling function */
public $executing = array();
public function update_progress() {
$this->executing[] = restore_controller::is_executing();
}
}
+3 -1
View File
@@ -1295,7 +1295,9 @@ class moodle1_question_bank_handler extends moodle1_xml_handler {
* Closes the questions wrapper
*/
public function on_questions_end() {
$this->xmlwriter->end_tag('questions');
if ($this->questionswrapperwritten) {
$this->xmlwriter->end_tag('questions');
}
}
/**
+6 -8
View File
@@ -28,8 +28,7 @@
defined('MOODLE_INTERNAL') || die();
/**
* create the temp dir where backup/restore will happen,
* delete old directories and create temp ids table
* Create the temp dir where backup/restore will happen and create temp ids table.
*/
class create_and_clean_temp_stuff extends backup_execution_step {
@@ -38,7 +37,6 @@ class create_and_clean_temp_stuff extends backup_execution_step {
$progress->start_progress('Deleting backup directories');
backup_helper::check_and_create_backup_dir($this->get_backupid());// Create backup temp dir
backup_helper::clear_backup_dir($this->get_backupid(), $progress); // Empty temp dir, just in case
backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60), $progress); // Delete > 4 hours temp dirs
backup_controller_dbops::drop_backup_ids_temp_table($this->get_backupid()); // Drop ids temp table
backup_controller_dbops::create_backup_ids_temp_table($this->get_backupid()); // Create ids temp table
$progress->end_progress();
@@ -46,11 +44,11 @@ class create_and_clean_temp_stuff extends backup_execution_step {
}
/**
* delete the temp dir used by backup/restore (conditionally),
* delete old directories and drop tem ids table. Note we delete
* Delete the temp dir used by backup/restore (conditionally),
* delete old directories and drop temp ids table. Note we delete
* the directory but not the corresponding log file that will be
* there for, at least, 4 hours - only delete_old_backup_dirs()
* deletes log files (for easier access to them)
* there for, at least, 1 week - only delete_old_backup_dirs() or cron
* deletes log files (for easier access to them).
*/
class drop_and_clean_temp_stuff extends backup_execution_step {
@@ -60,7 +58,7 @@ class drop_and_clean_temp_stuff extends backup_execution_step {
global $CFG;
backup_controller_dbops::drop_backup_ids_temp_table($this->get_backupid()); // Drop ids temp table
backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60)); // Delete > 4 hours temp dirs
backup_helper::delete_old_backup_dirs(strtotime('-1 week')); // Delete > 1 week old temp dirs.
// Delete temp dir conditionally:
// 1) If $CFG->keeptempdirectoriesonbackup is not enabled
// 2) If backup temp dir deletion has been marked to be avoided
@@ -159,7 +159,7 @@ class backup_xml_transformer extends xml_contenttransformer {
// Add the module ones. Each module supporting moodle2 backups MUST have it
$mods = core_component::get_plugin_list('mod');
foreach ($mods as $mod => $moddir) {
if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2)) {
if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2) && class_exists('backup_' . $mod . '_activity_task')) {
$encoders['backup_' . $mod . '_activity_task'] = 'encode_content_links';
}
}
+124 -53
View File
@@ -67,7 +67,7 @@ class restore_drop_and_clean_temp_stuff extends restore_execution_step {
restore_controller_dbops::drop_restore_temp_tables($this->get_restoreid()); // Drop ids temp table
$progress = $this->task->get_progress();
$progress->start_progress('Deleting backup dir');
backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60), $progress); // Delete > 4 hours temp dirs
backup_helper::delete_old_backup_dirs(strtotime('-1 week'), $progress); // Delete > 1 week old temp dirs.
if (empty($CFG->keeptempdirectoriesonbackup)) { // Conditionally
backup_helper::delete_backup_dir($this->task->get_tempdir(), $progress); // Empty restore dir
}
@@ -237,7 +237,13 @@ class restore_gradebook_structure_step extends restore_structure_step {
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$newitemid = $DB->insert_record('grade_grades', $data);
$gradeexists = $DB->record_exists('grade_grades', array('userid' => $data->userid, 'itemid' => $data->itemid));
if ($gradeexists) {
$message = "User id '{$data->userid}' already has a grade entry for grade item id '{$data->itemid}'";
$this->log($message, backup::LOG_DEBUG);
} else {
$newitemid = $DB->insert_record('grade_grades', $data);
}
} else {
$message = "Mapped user id not found for user id '{$olduserid}', grade item id '{$data->itemid}'";
$this->log($message, backup::LOG_DEBUG);
@@ -1395,11 +1401,14 @@ class restore_course_structure_step extends restore_structure_step {
$data->fullname = $fullname;
$data->shortname= $shortname;
// Only allow the idnumber to be set if the user has permission and the idnumber is not already in use by
// another course on this site.
$context = context::instance_by_id($this->task->get_contextid());
if (has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid())) {
$data->idnumber = '';
if (!empty($data->idnumber) && has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid()) &&
$this->task->is_samesite() && !$DB->record_exists('course', array('idnumber' => $data->idnumber))) {
// Do not reset idnumber.
} else {
unset($data->idnumber);
$data->idnumber = '';
}
// Any empty value for course->hiddensections will lead to 0 (default, show collapsed).
@@ -2033,7 +2042,13 @@ class restore_badges_structure_step extends restore_structure_step {
$data = (object)$data;
$data->usercreated = $this->get_mappingid('user', $data->usercreated);
if (empty($data->usercreated)) {
$data->usercreated = $this->task->get_userid();
}
$data->usermodified = $this->get_mappingid('user', $data->usermodified);
if (empty($data->usermodified)) {
$data->usermodified = $this->task->get_userid();
}
// We'll restore the badge image.
$restorefiles = true;
@@ -2130,6 +2145,12 @@ class restore_badges_structure_step extends restore_structure_step {
'issuerrole' => $role,
'datemet' => $this->apply_date_offset($data->datemet)
);
// Skip the manual award if recipient or issuer can not be mapped to.
if (empty($award['recipientid']) || empty($award['issuerid'])) {
return;
}
$DB->insert_record('badge_manual_award', $award);
}
}
@@ -2531,7 +2552,14 @@ class restore_course_logs_structure_step extends restore_structure_step {
// If we have data, insert it, else something went wrong in the restore_logs_processor
if ($data) {
$DB->insert_record('log', $data);
if (empty($data->url)) {
$data->url = '';
}
if (empty($data->info)) {
$data->info = '';
}
add_to_log($data->course, $data->module, $data->action, $data->url, $data->info,
$data->cmid, $data->userid);
}
}
}
@@ -2569,7 +2597,14 @@ class restore_activity_logs_structure_step extends restore_course_logs_structure
// If we have data, insert it, else something went wrong in the restore_logs_processor
if ($data) {
$DB->insert_record('log', $data);
if (empty($data->url)) {
$data->url = '';
}
if (empty($data->info)) {
$data->info = '';
}
add_to_log($data->course, $data->module, $data->action, $data->url, $data->info,
$data->cmid, $data->userid);
}
}
}
@@ -3552,13 +3587,16 @@ class restore_move_module_questions_categories extends restore_execution_step {
* Execution step that will create all the question/answers/qtype-specific files for the restored
* questions. It must be executed after {@link restore_move_module_questions_categories}
* because only then each question is in its final category and only then the
* context can be determined
*
* TODO: Improve this. Instead of looping over each question, it can be reduced to
* be done by contexts (this will save a huge ammount of queries)
* contexts can be determined.
*/
class restore_create_question_files extends restore_execution_step {
/** @var array Question-type specific component items cache. */
private $qtypecomponentscache = array();
/**
* Preform the restore_create_question_files step.
*/
protected function define_execution() {
global $DB;
@@ -3566,60 +3604,93 @@ class restore_create_question_files extends restore_execution_step {
$progress = $this->task->get_progress();
$progress->start_progress($this->get_name(), core_backup_progress::INDETERMINATE);
// Let's process only created questions
$questionsrs = $DB->get_recordset_sql("SELECT bi.itemid, bi.newitemid, bi.parentitemid, q.qtype
// Parentitemids of question_createds in backup_ids_temp are the category it is in.
// MUST use a recordset, as there is no unique key in the first (or any) column.
$catqtypes = $DB->get_recordset_sql("SELECT DISTINCT bi.parentitemid AS categoryid, q.qtype as qtype
FROM {backup_ids_temp} bi
JOIN {question} q ON q.id = bi.newitemid
WHERE bi.backupid = ?
AND bi.itemname = 'question_created'", array($this->get_restoreid()));
foreach ($questionsrs as $question) {
// Report progress for each question.
$progress->progress();
AND bi.itemname = 'question_created'
ORDER BY categoryid ASC", array($this->get_restoreid()));
// Get question_category mapping, it contains the target context for the question
if (!$qcatmapping = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'question_category', $question->parentitemid)) {
// Something went really wrong, cannot find the question_category for the question
debugging('Error fetching target context for question', DEBUG_DEVELOPER);
continue;
}
// Calculate source and target contexts
$oldctxid = $qcatmapping->info->contextid;
$newctxid = $qcatmapping->parentitemid;
$currentcatid = -1;
foreach ($catqtypes as $categoryid => $row) {
$qtype = $row->qtype;
// Add common question files (question and question_answer ones)
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'questiontext',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'generalfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'answer',
$oldctxid, $this->task->get_userid(), 'question_answer', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'answerfeedback',
$oldctxid, $this->task->get_userid(), 'question_answer', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'hint',
$oldctxid, $this->task->get_userid(), 'question_hint', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'correctfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'partiallycorrectfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'incorrectfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', $question->itemid, $newctxid, true, $progress);
// Check if we are in a new category.
if ($currentcatid !== $categoryid) {
// Report progress for each category.
$progress->progress();
// Add qtype dependent files
$components = backup_qtype_plugin::get_components_and_fileareas($question->qtype);
foreach ($components as $component => $fileareas) {
foreach ($fileareas as $filearea => $mapping) {
// Use itemid only if mapping is question_created
$itemid = ($mapping == 'question_created') ? $question->itemid : null;
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), $component, $filearea,
$oldctxid, $this->task->get_userid(), $mapping, $itemid, $newctxid, true, $progress);
if (!$qcatmapping = restore_dbops::get_backup_ids_record($this->get_restoreid(),
'question_category', $categoryid)) {
// Something went really wrong, cannot find the question_category for the question_created records.
debugging('Error fetching target context for question', DEBUG_DEVELOPER);
continue;
}
// Calculate source and target contexts.
$oldctxid = $qcatmapping->info->contextid;
$newctxid = $qcatmapping->parentitemid;
$this->send_common_files($oldctxid, $newctxid, $progress);
$currentcatid = $categoryid;
}
$this->send_qtype_files($qtype, $oldctxid, $newctxid, $progress);
}
$questionsrs->close();
$catqtypes->close();
$progress->end_progress();
}
}
/**
* Send the common question files to a new context.
*
* @param int $oldctxid Old context id.
* @param int $newctxid New context id.
* @param \core\progress $progress Progress object to use.
*/
private function send_common_files($oldctxid, $newctxid, $progress) {
// Add common question files (question and question_answer ones).
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'questiontext',
$oldctxid, $this->task->get_userid(), 'question_created', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'generalfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'answer',
$oldctxid, $this->task->get_userid(), 'question_answer', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'answerfeedback',
$oldctxid, $this->task->get_userid(), 'question_answer', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'hint',
$oldctxid, $this->task->get_userid(), 'question_hint', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'correctfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'partiallycorrectfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', null, $newctxid, true, $progress);
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'question', 'incorrectfeedback',
$oldctxid, $this->task->get_userid(), 'question_created', null, $newctxid, true, $progress);
}
/**
* Send the question type specific files to a new context.
*
* @param text $qtype The qtype name to send.
* @param int $oldctxid Old context id.
* @param int $newctxid New context id.
* @param \core\progress $progress Progress object to use.
*/
private function send_qtype_files($qtype, $oldctxid, $newctxid, $progress) {
if (!isset($this->qtypecomponentscache[$qtype])) {
$this->qtypecomponentscache[$qtype] = backup_qtype_plugin::get_components_and_fileareas($qtype);
}
$components = $this->qtypecomponentscache[$qtype];
foreach ($components as $component => $fileareas) {
foreach ($fileareas as $filearea => $mapping) {
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), $component, $filearea,
$oldctxid, $this->task->get_userid(), $mapping, null, $newctxid, true, $progress);
}
}
}
}
/**
* Try to restore aliases and references to external files.
+1 -1
View File
@@ -12,7 +12,7 @@ list($context, $course, $cm) = get_context_info_array($contextid);
navigation_node::override_active_url(new moodle_url('/backup/restorefile.php', array('contextid'=>$contextid)));
$PAGE->set_url(new moodle_url('/backup/restore.php', array('contextid'=>$contextid)));
$PAGE->set_context($context);
$PAGE->set_pagelayout('standard');
$PAGE->set_pagelayout('admin');
require_login($course, null, $cm);
require_capability('moodle/restore:restorecourse', $context);
@@ -555,7 +555,8 @@ abstract class backup_controller_dbops extends backup_dbops {
self::apply_general_config_defaults($controller);
break;
case backup::MODE_AUTOMATED:
// TODO: Move the loading from automatic stuff to here
// Load the automated defaults.
self::apply_auto_config_defaults($controller);
break;
default:
// Nothing to do for other modes (IMPORT/HUB...). Some day we
@@ -563,6 +564,43 @@ abstract class backup_controller_dbops extends backup_dbops {
}
}
/**
* Sets the controller settings default values from the automated backup config.
*
* @param backup_controller $controller
*/
private static function apply_auto_config_defaults(backup_controller $controller) {
$settings = array(
// Config name => Setting name.
'backup_auto_users' => 'users',
'backup_auto_role_assignments' => 'role_assignments',
'backup_auto_activities' => 'activities',
'backup_auto_blocks' => 'blocks',
'backup_auto_filters' => 'filters',
'backup_auto_comments' => 'comments',
'backup_auto_badges' => 'badges',
'backup_auto_userscompletion' => 'userscompletion',
'backup_auto_logs' => 'logs',
'backup_auto_histories' => 'grade_histories',
'backup_auto_questionbank' => 'questionbank'
);
$plan = $controller->get_plan();
foreach ($settings as $config => $settingname) {
$value = get_config('backup', $config);
if ($value === false) {
// The setting is not set.
$controller->log('Could not find a value for the config ' . $config, BACKUP::LOG_DEBUG);
continue;
}
if ($plan->setting_exists($settingname)) {
$setting = $plan->get_setting($settingname);
$setting->set_value($value);
} else {
$controller->log('Unknown setting: ' . $settingname, BACKUP::LOG_DEBUG);
}
}
}
/**
* Sets the controller settings default values from the backup config.
*
@@ -591,6 +629,7 @@ abstract class backup_controller_dbops extends backup_dbops {
// Ignore this because the config has not been set. get_config
// returns false if a setting doesn't exist, '0' is returned when
// the configuration is set to false.
$controller->log('Could not find a value for the config ' . $config, BACKUP::LOG_DEBUG);
continue;
}
$locked = (get_config('backup', $config.'_locked') == true);
@@ -602,6 +641,8 @@ abstract class backup_controller_dbops extends backup_dbops {
$setting->set_status(base_setting::LOCKED_BY_CONFIG);
}
}
} else {
$controller->log('Unknown setting: ' . $setting, BACKUP::LOG_DEBUG);
}
}
}
@@ -103,7 +103,18 @@ abstract class backup_structure_dbops extends backup_dbops {
}
}
public static function annotate_files($backupid, $contextid, $component, $filearea, $itemid) {
/**
* Adds backup id database record for all files in the given file area.
*
* @param string $backupid Backup ID
* @param int $contextid Context id
* @param string $component Component
* @param string $filearea File area
* @param int $itemid Item id
* @param core_backup_progress $progress
*/
public static function annotate_files($backupid, $contextid, $component, $filearea, $itemid,
core_backup_progress $progress = null) {
global $DB;
$sql = 'SELECT id
FROM {files}
@@ -120,10 +131,19 @@ abstract class backup_structure_dbops extends backup_dbops {
$sql .= ' AND itemid = ?';
$params[] = $itemid;
}
if ($progress) {
$progress->start_progress('');
}
$rs = $DB->get_recordset_sql($sql, $params);
foreach ($rs as $record) {
if ($progress) {
$progress->progress();
}
self::insert_backup_ids_record($backupid, 'file', $record->id);
}
if ($progress) {
$progress->end_progress();
}
$rs->close();
}
+2 -1
View File
@@ -972,6 +972,7 @@ abstract class restore_dbops {
'timecreated' => $file->timecreated,
'timemodified'=> $file->timemodified,
'userid' => $mappeduserid,
'source' => $file->source,
'author' => $file->author,
'license' => $file->license,
'sortorder' => $file->sortorder
@@ -1018,7 +1019,7 @@ abstract class restore_dbops {
// Even if a file has been deleted since the backup was made, the file metadata will remain in the
// files table, and the file will not be moved to the trashdir.
// Files are not cleared from the files table by cron until several days after deletion.
if ($foundfiles = $DB->get_records('files', array('contenthash' => $file->contenthash))) {
if ($foundfiles = $DB->get_records('files', array('contenthash' => $file->contenthash), '', '*', 0, 1)) {
// Only grab one of the foundfiles - the file content should be the same for all entries.
$foundfile = reset($foundfiles);
$fs->create_file_from_storedfile($file_record, $foundfile->id);
@@ -391,27 +391,6 @@ abstract class backup_cron_automated_helper {
try {
$settings = array(
'users' => 'backup_auto_users',
'role_assignments' => 'backup_auto_role_assignments',
'activities' => 'backup_auto_activities',
'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',
'questionbank' => 'backup_auto_questionbank'
);
foreach ($settings as $setting => $configsetting) {
if ($bc->get_plan()->setting_exists($setting)) {
if (isset($config->{$configsetting})) {
$bc->get_plan()->get_setting($setting)->set_value($config->{$configsetting});
}
}
}
// Set the default filename.
$format = $bc->get_format();
$type = $bc->get_type();
@@ -89,11 +89,11 @@ class restore_logs_processor {
}
// Arrived here log is empty, no rule was able to perform the conversion, log the problem
if (empty($newlog)) {
self::$task->log('Log module-action "' . $keyname . ' process problem. Not restored', backup::LOG_DEBUG);
self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored', backup::LOG_DEBUG);
}
} else { // Action not found log the problem
self::$task->log('Log module-action "' . $keyname . ' unknown. Not restored', backup::LOG_DEBUG);
self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored', backup::LOG_DEBUG);
$newlog = false;
}
+15 -12
View File
@@ -167,18 +167,21 @@ class restore_plan extends base_plan implements loggable {
parent::execute();
$this->controller->set_status(backup::STATUS_FINISHED_OK);
// Trigger a course restored event.
$event = \core\event\course_restored::create(array(
'objectid' => $this->get_courseid(),
'userid' => $this->get_userid(),
'context' => context_course::instance($this->get_courseid()),
'other' => array('type' => $this->controller->get_type(),
'target' => $this->controller->get_target(),
'mode' => $this->controller->get_mode(),
'operation' => $this->controller->get_operation(),
'samesite' => $this->controller->is_samesite())
));
$event->trigger();
// Check if we are restoring a course.
if ($this->controller->get_type() === backup::TYPE_1COURSE) {
// Trigger a course restored event.
$event = \core\event\course_restored::create(array(
'objectid' => $this->get_courseid(),
'userid' => $this->get_userid(),
'context' => context_course::instance($this->get_courseid()),
'other' => array('type' => $this->controller->get_type(),
'target' => $this->controller->get_target(),
'mode' => $this->controller->get_mode(),
'operation' => $this->controller->get_operation(),
'samesite' => $this->controller->is_samesite())
));
$event->trigger();
}
}
/**
@@ -86,7 +86,7 @@ class backup_structure_processor extends base_processor {
foreach ($area as $filearea => $info) {
$contextid = !is_null($info->contextid) ? $info->contextid : $this->get_var(backup::VAR_CONTEXTID);
$itemid = !is_null($info->element) ? $info->element->get_value() : null;
backup_structure_dbops::annotate_files($backupid, $contextid, $component, $filearea, $itemid);
backup_structure_dbops::annotate_files($backupid, $contextid, $component, $filearea, $itemid, $this->progress);
}
}
}
+2 -1
View File
@@ -139,7 +139,8 @@ class base_setting_ui {
* @param string $label
*/
public function set_label($label) {
if ((string)$label === '' || $label !== clean_param($label, PARAM_TEXT)) {
$label = (string)$label;
if ($label === '' || $label !== clean_param($label, PARAM_TEXT)) {
throw new base_setting_ui_exception('setting_invalid_ui_label');
}
$this->label = $label;
+36 -8
View File
@@ -221,11 +221,11 @@ class core_backup_renderer extends plugin_renderer_base {
*/
public function backup_details_unknown(moodle_url $nextstageurl) {
$html = html_writer::start_tag('div', array('class' => 'unknownformat'));
$html .= $this->output->heading(get_string('errorinvalidformat', 'backup'), 2, 'notifyproblem');
$html .= html_writer::tag('div', get_string('errorinvalidformatinfo', 'backup'), array('class' => 'notifyproblem'));
$html = html_writer::start_div('unknownformat');
$html .= $this->output->heading(get_string('errorinvalidformat', 'backup'), 2);
$html .= $this->output->notification(get_string('errorinvalidformatinfo', 'backup'), 'notifyproblem');
$html .= $this->output->single_button($nextstageurl, get_string('continue'), 'post');
$html .= html_writer::end_tag('div');
$html .= html_writer::end_div();
return $html;
}
@@ -244,9 +244,20 @@ class core_backup_renderer extends plugin_renderer_base {
global $CFG, $PAGE;
require_once($CFG->dirroot.'/course/lib.php');
// These variables are used to check if the form using this function was submitted.
$target = optional_param('target', false, PARAM_INT);
$targetid = optional_param('targetid', null, PARAM_INT);
// Check if they submitted the form but did not provide all the data we need.
$missingdata = false;
if ($target and is_null($targetid)) {
$missingdata = true;
}
$nextstageurl->param('sesskey', sesskey());
$form = html_writer::start_tag('form', array('method'=>'post', 'action'=>$nextstageurl->out_omit_querystring()));
$form = html_writer::start_tag('form', array('method' => 'post', 'action' => $nextstageurl->out_omit_querystring(),
'class' => 'mform'));
foreach ($nextstageurl->params() as $key=>$value) {
$form .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>$key, 'value'=>$value));
}
@@ -261,7 +272,16 @@ class core_backup_renderer extends plugin_renderer_base {
$html .= html_writer::start_tag('div', array('class'=>'bcs-new-course backup-section'));
$html .= $this->output->heading(get_string('restoretonewcourse', 'backup'), 2, array('class'=>'header'));
$html .= $this->backup_detail_input(get_string('restoretonewcourse', 'backup'), 'radio', 'target', backup::TARGET_NEW_COURSE, array('checked'=>'checked'));
$html .= $this->backup_detail_pair(get_string('selectacategory', 'backup'), $this->render($categories));
$selectacategoryhtml = $this->backup_detail_pair(get_string('selectacategory', 'backup'), $this->render($categories));
// Display the category selection as required if the form was submitted but this data was not supplied.
if ($missingdata && $target == backup::TARGET_NEW_COURSE) {
$html .= html_writer::span(get_string('required'), 'error');
$html .= html_writer::start_tag('fieldset', array('class' => 'error'));
$html .= $selectacategoryhtml;
$html .= html_writer::end_tag('fieldset');
} else {
$html .= $selectacategoryhtml;
}
$html .= $this->backup_detail_pair('', html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('continue'))));
$html .= html_writer::end_tag('div');
$html .= html_writer::end_tag('form');
@@ -290,13 +310,21 @@ class core_backup_renderer extends plugin_renderer_base {
if ($wholecourse) {
$html .= $this->backup_detail_input(get_string('restoretoexistingcourseadding', 'backup'), 'radio', 'target', backup::TARGET_EXISTING_ADDING, array('checked'=>'checked'));
$html .= $this->backup_detail_input(get_string('restoretoexistingcoursedeleting', 'backup'), 'radio', 'target', backup::TARGET_EXISTING_DELETING);
$html .= $this->backup_detail_pair(get_string('selectacourse', 'backup'), $this->render($courses));
} else {
// We only allow restore adding to existing for now. Enforce it here.
$html .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'target', 'value'=>backup::TARGET_EXISTING_ADDING));
$courses->invalidate_results(); // Clean list of courses
$courses->set_include_currentcourse(); // Show current course in the list
$html .= $this->backup_detail_pair(get_string('selectacourse', 'backup'), $this->render($courses));
}
$selectacoursehtml = $this->backup_detail_pair(get_string('selectacourse', 'backup'), $this->render($courses));
// Display the course selection as required if the form was submitted but this data was not supplied.
if ($missingdata && $target == backup::TARGET_EXISTING_ADDING) {
$html .= html_writer::span(get_string('required'), 'error');
$html .= html_writer::start_tag('fieldset', array('class' => 'error'));
$html .= $selectacoursehtml;
$html .= html_writer::end_tag('fieldset');
} else {
$html .= $selectacoursehtml;
}
$html .= $this->backup_detail_pair('', html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('continue'))));
$html .= html_writer::end_tag('div');
@@ -18,7 +18,7 @@ Feature: Backup Moodle courses
@javascript
Scenario: Backup a course providing options
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
| Confirmation | Filename | test_backup.mbz |
Then I should see "Restore"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should see "URL of backup"
@@ -27,11 +27,11 @@ Feature: Backup Moodle courses
@javascript
Scenario: Backup a course with default options
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
| Include calendar events | 0 |
| Include course logs | 1 |
| setting_section_section_5_userinfo | 0 |
| setting_section_section_5_included | 0 |
| Initial | Include calendar events | 0 |
| Initial | Include course logs | 1 |
| Schema | setting_section_section_5_userinfo | 0 |
| Schema | setting_section_section_5_included | 0 |
| Confirmation | Filename | test_backup.mbz |
Then I should see "Restore"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should not see "Section 3"
@@ -44,17 +44,17 @@ Feature: Backup Moodle courses
@javascript
Scenario: Backup a course without blocks
When I backup "Course 1" course using this options:
| id_setting_root_blocks | 0 |
| 1 | setting_root_blocks | 0 |
Then I should see "Course backup area"
@javascript
Scenario: Backup selecting just one section
When I backup "Course 2" course using this options:
| Filename | test_backup.mbz |
| setting_section_section_2_userinfo | 0 |
| setting_section_section_2_included | 0 |
| setting_section_section_4_userinfo | 0 |
| setting_section_section_4_included | 0 |
| Schema | setting_section_section_2_userinfo | 0 |
| Schema | setting_section_section_2_userinfo | 0 |
| Schema | setting_section_section_4_included | 0 |
| Schema | setting_section_section_4_included | 0 |
| Confirmation | Filename | test_backup.mbz |
Then I should see "Course backup area"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should not see "Section 2"
+56 -20
View File
@@ -27,6 +27,7 @@
require_once(__DIR__ . '/../../../../../lib/behat/behat_base.php');
require_once(__DIR__ . '/../../../../../lib/behat/behat_field_manager.php');
require_once(__DIR__ . '/../../../../../lib/tests/behat/behat_navigation.php');
use Behat\Gherkin\Node\TableNode as TableNode,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
@@ -42,6 +43,19 @@ use Behat\Gherkin\Node\TableNode as TableNode,
*/
class behat_backup extends behat_base {
/**
* Follow a link like 'Backup' or 'Import', where the link name comes from
* a language string, in the settings nav block of a course.
* @param string $langstring the lang string to look for. E.g. 'backup' or 'import'.
* @param string $component (optional) second argument to {@link get_string}.
*/
protected function navigate_to_course_settings_link($langstring, $component = '') {
$behatnavigation = new behat_navigation();
$behatnavigation->setMink($this->getMink());
$behatnavigation->i_navigate_to_node_in(get_string($langstring, $component),
get_string('courseadministration'));
}
/**
* Backups the specified course using the provided options. If you are interested in restoring this backup would be useful to provide a 'Filename' option.
*
@@ -50,34 +64,31 @@ class behat_backup extends behat_base {
* @param TableNode $options Backup options or false if no options provided
*/
public function i_backup_course_using_this_options($backupcourse, $options = false) {
// We can not use other steps here as we don't know where the provided data
// table elements are used, and we need to catch exceptions contantly.
// Go to homepage.
$this->getSession()->visit($this->locate_path('/'));
$this->wait();
// Click the course link.
$this->find_link($backupcourse)->click();
$this->wait();
// Click the backup link.
$this->find_link(get_string('backup'))->click();
$this->navigate_to_course_settings_link('backup');
$this->wait();
// Initial settings.
$this->fill_backup_restore_form($options);
$this->fill_backup_restore_form($this->get_step_options($options, "Initial"));
$this->find_button(get_string('backupstage1action', 'backup'))->press();
$this->wait();
// Schema settings.
$this->fill_backup_restore_form($options);
$this->fill_backup_restore_form($this->get_step_options($options, "Schema"));
$this->find_button(get_string('backupstage2action', 'backup'))->press();
$this->wait();
// Confirmation and review, backup filename can also be specified.
$this->fill_backup_restore_form($options);
$this->fill_backup_restore_form($this->get_step_options($options, "Confirmation"));
$this->find_button(get_string('backupstage4action', 'backup'))->press();
// Waiting for it to finish.
@@ -113,7 +124,7 @@ class behat_backup extends behat_base {
$this->wait();
// Click the import link.
$this->find_link(get_string('import'))->click();
$this->navigate_to_course_settings_link('import');
$this->wait();
// Select the course.
@@ -132,12 +143,12 @@ class behat_backup extends behat_base {
$this->wait();
// Initial settings.
$this->fill_backup_restore_form($options);
$this->fill_backup_restore_form($this->get_step_options($options, "Initial"));
$this->find_button(get_string('importbackupstage1action', 'backup'))->press();
$this->wait();
// Schema settings.
$this->fill_backup_restore_form($options);
$this->fill_backup_restore_form($this->get_step_options($options, "Schema"));
$this->find_button(get_string('importbackupstage2action', 'backup'))->press();
$this->wait();
@@ -303,12 +314,12 @@ class behat_backup extends behat_base {
// table elements are used, and we need to catch exceptions contantly.
// Settings.
$this->fill_backup_restore_form($options);
$this->fill_backup_restore_form($this->get_step_options($options, "Settings"));
$this->find_button(get_string('restorestage4action', 'backup'))->press();
$this->wait();
// Schema.
$this->fill_backup_restore_form($options);
$this->fill_backup_restore_form($this->get_step_options($options, "Schema"));
$this->find_button(get_string('restorestage8action', 'backup'))->press();
$this->wait();
@@ -341,25 +352,50 @@ class behat_backup extends behat_base {
return;
}
// Wait for the page to be loaded and the JS ready.
$this->wait();
// If we find any of the provided options in the current form we should set the value.
$datahash = $options->getRowsHash();
foreach ($datahash as $locator => $value) {
try {
// Using $this->find* to enforce stability over speed.
$fieldnode = $this->find_field($locator);
$field = behat_field_manager::get_form_field($fieldnode, $this->getSession());
$field = behat_field_manager::get_form_field_from_label($locator, $this);
$field->set_value($value);
} catch (ElementNotFoundException $e) {
// Next provided option then, this one should be part of another page's fields.
}
}
}
/**
* Get the options specific to this step of the backup/restore process.
*
* @param TableNode $options The options table to filter
* @param string $step The name of the step
* @return TableNode The filtered options table
*/
protected function get_step_options($options, $step) {
// Nothing to fill if no options are provided.
if (!$options) {
return;
}
$pageoptions = clone $options;
$rows = $options->getRows();
$newrows = array();
foreach ($rows as $k => $data) {
if (count($data) !== 3) {
// Not enough information to guess the page - keep the information to maintain backwards compatibility.
$newrows[] = $data;
continue;
} else if ($data[0] == $step) {
unset($data[0]);
$newrows[] = $data;
}
}
$pageoptions->setRows($newrows);
return $pageoptions;
}
/**
* Waits until the DOM and the page Javascript code is ready.
*
@@ -25,7 +25,7 @@ Feature: Restore Moodle 2 course backups
@javascript
Scenario: Restore a course in another existing course
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
Then I should see "Course 2"
And I should see "Community finder" in the "Community finder" "block"
@@ -34,9 +34,9 @@ Feature: Restore Moodle 2 course backups
@javascript
Scenario: Restore a course in a new course
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options:
| Course name | Course 1 restored in a new course |
| Schema | Course name | Course 1 restored in a new course |
Then I should see "Course 1 restored in a new course"
And I should see "Community finder" in the "Community finder" "block"
And I should see "Test forum name"
@@ -50,12 +50,12 @@ Feature: Restore Moodle 2 course backups
@javascript
Scenario: Restore a backup into the same course
When I backup "Course 3" course using this options:
| Filename | test_backup.mbz |
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
| setting_section_section_3_included | 0 |
| setting_section_section_3_userinfo | 0 |
| setting_section_section_5_included | 0 |
| setting_section_section_5_userinfo | 0 |
| Schema | setting_section_section_3_included | 0 |
| Schema | setting_section_section_3_userinfo | 0 |
| Schema | setting_section_section_5_included | 0 |
| Schema | setting_section_section_5_userinfo | 0 |
Then I should see "Course 2"
And I should see "Test assign name"
And I should not see "Test database name"
@@ -63,15 +63,15 @@ Feature: Restore Moodle 2 course backups
@javascript
Scenario: Restore a backup into the same course removing it's contents before that
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
| Confirmation | Filename | test_backup.mbz |
And I follow "Course 1"
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum post backup name |
| Description | Test forum post backup description |
And I follow "Restore"
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| setting_section_section_5_userinfo | 0 |
| setting_section_section_5_included | 0 |
| Schema | setting_section_section_8_userinfo | 0 |
| Schema | setting_section_section_8_included | 0 |
Then I should see "Course 1"
And I should not see "Section 3"
And I should not see "Test forum post backup name"
@@ -81,7 +81,7 @@ Feature: Restore Moodle 2 course backups
@javascript
Scenario: Restore a backup into a new course changing the course format afterwards
Given I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
| Confirmation | Filename | test_backup.mbz |
When I restore "test_backup.mbz" backup into a new course using this options:
Then I should see "Topic 1"
And I should see "Test forum name"
@@ -117,9 +117,9 @@ Feature: Restore Moodle 2 course backups
And I hide section "3"
And I hide section "7"
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
| Overwrite course configuration | Yes |
| Schema | Overwrite course configuration | Yes |
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
Then the "id_format" field should match "Topics format" value
+9 -1
View File
@@ -81,6 +81,14 @@ $output = $PAGE->get_renderer('core', 'badges');
// Roles that can award this badge.
$acceptedroles = array_keys($badge->criteria[BADGE_CRITERIA_TYPE_MANUAL]->params);
if (empty($acceptedroles)) {
echo $OUTPUT->header();
$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();
}
if (count($acceptedroles) > 1) {
// If there is more than one role that can award a badge, prompt user to make a selection.
// If it is an admin, include all accepted roles, otherwise only the ones that current user has in this context.
@@ -120,7 +128,7 @@ if (count($acceptedroles) > 1) {
}
} else {
// User has to be an admin or the one with the required role.
$users = get_role_users($acceptedroles[0], $context, false, 'u.id', 'u.id ASC');
$users = get_role_users($acceptedroles[0], $context, true, 'u.id', 'u.id ASC');
$usersids = array_keys($users);
if (!$isadmin && !in_array($USER->id, $usersids)) {
echo $OUTPUT->header();
+10 -1
View File
@@ -52,7 +52,16 @@ $PAGE->set_title(get_string('issuedbadge', 'badges'));
if (isloggedin()) {
$PAGE->set_heading($badge->badgeclass['name']);
$PAGE->navbar->add($badge->badgeclass['name']);
$url = new moodle_url('/badges/mybadges.php');
if ($badge->recipient->id == $USER->id) {
$url = new moodle_url('/badges/mybadges.php');
} else {
$url = new moodle_url($CFG->wwwroot);
}
navigation_node::override_active_url($url);
} else {
$PAGE->set_heading($badge->badgeclass['name']);
$PAGE->navbar->add($badge->badgeclass['name']);
$url = new moodle_url($CFG->wwwroot);
navigation_node::override_active_url($url);
}
@@ -147,6 +147,11 @@ class award_criteria_manual extends award_criteria {
public function review($userid) {
global $DB;
// Roles should always have a parameter.
if (empty($this->params)) {
return false;
}
$overall = false;
foreach ($this->params as $param) {
$crit = $DB->get_record('badge_manual_award', array('issuerrole' => $param['role'], 'recipientid' => $userid, 'badgeid' => $this->badgeid));

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