Compare commits

...

1391 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 803ddf9af3 Moodle release 2.7.3 2014-11-08 23:30:01 +01:00
AMOS bot 35842d38af Automatically generated installer lang files 2014-11-09 00:05:36 +08:00
Eloy Lafuente (stronk7) e29bdea42e weekly release 2.7.2+ 2014-11-07 16:53:22 +01:00
John Okely a866ad40be MDL-47949 mod_wiki: Validate parameters for page deletion 2014-11-07 15:13:25 +08:00
Damyon Wiese 125cb6df08 Merge branch 'wip-MDL-48091-m27-2' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-07 09:29:22 +08:00
Eloy Lafuente (stronk7) e88e7ae3ad Merge branch 'MDL-47943-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE 2014-11-06 18:47:38 +01:00
Marina Glancy bacb95612e MDL-48091 users: revert MDL-42875
Rvert of: "Show only profile visible roles on participants list"

This reverts commit ecc8244e62.
2014-11-06 18:41:05 +08:00
Eloy Lafuente (stronk7) 4752706116 Merge branch 'MDL-48035-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-06 11:15:13 +01:00
David Mudrák 07ff315180 MDL-48035 Fix Behat tests regressions after merging en_fix strings 2014-11-06 10:55:41 +01:00
John Okely 4800d01e2e 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:40:50 +00:00
Damyon Wiese e9d3aad54c MDL-43430 ldap: whitespace fix 2014-11-06 12:06:42 +08:00
Damyon Wiese 8b91ec3dda Merge branch 'wip_27_mdl-43430' of https://github.com/iarenaza/moodle into MOODLE_27_STABLE 2014-11-06 11:59:39 +08:00
Marina Glancy 3925a3e287 Merge branch 'wip_MDL-48083_m27_rollback' of git://github.com/skodak/moodle into MOODLE_27_STABLE 2014-11-06 11:42:23 +08:00
Petr Skoda 489e91282b MDL-48083 dml: Empty buffers on forced rollback 2014-11-06 15:53:29 +13:00
Eloy Lafuente (stronk7) a618d35082 Merge branch 'wip-MDL-47174-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-06 02:15:54 +01:00
Marina Glancy d8b19527fe MDL-47174 events: new calendar event may have 0 timestart 2014-11-06 08:58:16 +08:00
Eloy Lafuente (stronk7) 7ef5172818 Merge branch 'wip-mdl-45416-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-06 00:58:12 +01:00
Eloy Lafuente (stronk7) 2b46342766 Merge branch 'MDL-47990_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-06 00:24:15 +01:00
Dan Poltawski a647d27ad7 Merge branch 'MDL-47466-MOODLE_27_STABLE' of https://github.com/tehanuyor/moodle into MOODLE_27_STABLE 2014-11-05 16:26:03 +00:00
Daniel Thies 3c2b67f5d4 MDL-47943 editor_atto: Save selection on mouseleave for Chrome 2014-11-05 09:37:24 -06:00
Andrew Nicols c812956efd 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:56 +00:00
Damyon Wiese 4289728d7c Merge branch 'MDL-46500_27' of https://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-11-05 16:44:01 +08:00
Iñaki Arenaza ce45e0b188 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:02:56 +01:00
Damyon Wiese f427d8efd6 Merge branch '48025-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-05 15:52:48 +08:00
Damyon Wiese be17a78d5c Merge branch 'wip-MDL-46262-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-05 14:40:31 +08:00
Damyon Wiese 7ce72e385d MDL-47793 assign: trivial fix for inconsistent use of get_instance() 2014-11-05 14:29:16 +08:00
Damyon Wiese 250b70735b Merge branch 'MDL-47793-m27' of https://github.com/micaherne/moodle into MOODLE_27_STABLE 2014-11-05 14:29:01 +08:00
Damyon Wiese 9aefa9c8d3 Merge branch 'MDL-47930-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-05 14:21:28 +08:00
Damyon Wiese 24422c9028 MDL-27930 lesson: Remove custom styling from timer 2014-11-05 13:58:52 +08:00
Damyon Wiese 845b9de5c6 Merge branch 'MDL-27930_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-11-05 13:51:52 +08:00
Rajesh Taneja 691bb2a90f MDL-45416 enrol_ldap: Use null_progress_trace while running phpunit 2014-11-05 11:13:10 +08:00
Eloy Lafuente (stronk7) 98d1b938a3 Merge branch 'MDL-48035-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-05 01:16:20 +01:00
Helen Foster 13523e51e4 MDL-48035 Merge English strings from the en_fix language pack 2014-11-04 22:05:07 +01:00
Jean-Michel Vedrine 0db87f6d4a MDL-27930 Lesson: the count-down timer does not work 2014-11-04 14:56:51 +01:00
Eloy Lafuente (stronk7) d91b8d1c6f weekly release 2.7.2+ 2014-11-04 11:35:14 +01:00
Eloy Lafuente (stronk7) 1b1634740e Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-11-04 11:35:09 +01:00
Damyon Wiese bddb47374d Merge branch 'MDL-45636-course_M27' of https://github.com/eSrem/moodle into MOODLE_27_STABLE 2014-11-04 12:07:07 +08:00
Eloy Lafuente (stronk7) 478ab0f602 Merge branch 'MDL-47883-27-foundlangfile' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-11-04 02:03:24 +01:00
Eloy Lafuente (stronk7) d5fc05e2a0 Merge branch '47969-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-04 01:57:07 +01:00
Eloy Lafuente (stronk7) 17a90193bb Merge branch '47968-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-04 01:55:19 +01:00
Petr Skoda 2f87351d54 MDL-47868 ws: verify upload areas 2014-11-04 01:50:03 +01:00
Petr Skoda e1331607a8 MDL-48013 calendar: force download of user files 2014-11-04 01:41:48 +01:00
Eloy Lafuente (stronk7) cc74fd9ea2 Merge branch '47917-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-11-04 00:03:58 +01:00
Damyon Wiese 44e712e9b7 MDL-47927 LTI: Use PARAM_TEXT and p() for returned messages and errors 2014-11-04 11:47:06 +13:00
Frederic Massart 932694ca59 MDL-47965 tag: Enforcing security of tag auto completion 2014-11-04 11:27:54 +13:00
David Monllao bac38b11ab MDL-47924 mod_lti: Fixing missing sesskey checkings
Also fixing a missing capability checking.
2014-11-04 11:03:00 +13:00
Yuliya Bozhko ab96babbb4 MDL-47190 Ensure badges cannot be awarded without a role
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-11-04 10:16:40 +13:00
Frederic Massart 324b018bbc MDL-47321 iplookup: Prevent guest users from using iplookup 2014-11-04 10:01:34 +13:00
Adrian Greeve 3e312a16f4 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:09 +13:00
Juan Leyva 3aa9d93c7a MDL-45303 Web Services: forum_get_discussions ws misses permissions check 2014-11-03 21:53:42 +01:00
Juan Leyva 3b8876f5ef MDL-47766 web services: get_grades exposes hidden grades to students 2014-11-04 09:13:35 +13:00
John Okely 263f78b8b8 MDL-47921 mod_lti: Add access control to mod/lti/launch.php 2014-11-04 09:09:11 +13:00
Dave Cooper 04f2e83ce7 MDL-47050 core_wordlist: Updated wordlist to include only animals. 2014-11-04 09:06:13 +13:00
Damyon Wiese 25612b59ee Merge branch 'MDL-48010_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-11-03 17:15:49 +08:00
Petr Skoda 84baa6b141 MDL-47287 prevent web access to phpunit boostrap 2014-11-03 17:10:56 +08:00
Marina Glancy 2cb907d11d Merge branch 'wip-mdl-45204-m27' of git://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-11-03 17:04:20 +08:00
Damyon Wiese 1dd7fab104 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:56:48 +08:00
Andreas Grabs 8bf49b7377 MDL-47865 mod_feedback - XSS through $searchstring in mod/feedback/mapcourse.php 2014-11-03 14:56:44 +08:00
Damyon Wiese d3e7b45d27 MDL-45538 Fix version bump. 2014-11-03 14:26:09 +08:00
Damyon Wiese 10b07bf8cc Merge branch 'wip-MDL-45538-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-11-03 14:25:45 +08:00
Damyon Wiese 07304c8ee7 Merge branch 'MDL-35008_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-11-03 14:04:41 +08:00
pau.ferrer-ocana c2b8c7c8c2 MDL-26447 gradebook: Default gradedisplaytype fixed for all locales 2014-11-03 13:56:56 +08:00
Damyon Wiese 2d10a2cebb Merge branch 'wip_MDL-47966_m27_defaultheaders' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-11-03 13:08:02 +08:00
Sam Hemelryk aba092e128 MDL-47917 cachestore_memcached: fixed get_many ordering 2014-11-03 14:55:25 +13:00
Sam Hemelryk f8bf49f137 MDL-48025 user: fixed typo in user_search HTML 2014-11-03 10:08:19 +13:00
Sam Hemelryk b6bf71702d MDL-47969 mod_survey: fixed HTML5 validation of index.php 2014-11-03 08:55:09 +13:00
Sam Hemelryk 5d45f54b6c MDL-47968 mod_forum: fixed search form HTML5 validation 2014-11-03 08:54:54 +13:00
AMOS bot b37e3a818b Automatically generated installer lang files 2014-11-02 00:05:38 +08:00
Marina Glancy 6eef37f045 MDL-46262 availability: validation of fields without value
Thanks to Tomasz Pawlik | CKO USl for the patch
2014-11-01 16:58:51 +08:00
Tim Hunt 82bf77561f MDL-48010 grade import from URL: don't corrupt the URL. 2014-10-31 19:53:34 +00:00
Tim Hunt c268bbc9e6 MDL-48008 gradeimport_xml: report errors usefully 2014-10-31 19:53:33 +00:00
Tim Hunt c3d1ced72e MDL-47797 quesion preview: improve the behat script
Tests a few more buttons, and also verify more of the UI.
2014-10-31 15:52:38 +00:00
Tim Hunt 78ac8f6045 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:52:36 +00:00
David Mudrák 52184908fa MDL-47883 admin: Fix missing string in the plugin validation 2014-10-31 12:59:26 +01:00
Dan Poltawski cdb1de64e4 weekly release 2.7.2+ 2014-10-31 09:08:53 +00:00
Rajesh Taneja abacf844f9 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:46:52 +08:00
Petr Skoda ac6e453d11 MDL-47966 Add default content type and encoding 2014-10-31 14:01:46 +13:00
Sam Hemelryk 244be92c8e Merge branch 'MDL-47875_MOODLE_27_STABLE' of https://github.com/crazyserver/moodle into MOODLE_27_STABLE 2014-10-31 11:15:21 +13:00
Iñaki Arenaza f7b5782d5c 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 22:52:33 +01:00
Iñaki Arenaza 1d17b54861 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 22:52:33 +01:00
pau.ferrer-ocana 3d5e1f113d 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:51:16 +01:00
pau.ferrer-ocana ecc8244e62 MDL-42875 users: Show only profile visible roles on participants list 2014-10-31 10:36:44 +13:00
Tim Hunt dd22636bef MDL-47990 qtype_multichoice: fix test response import/export 2014-10-30 18:26:00 +00:00
Jean-Michel Vedrine 6a59a3e073 MDL-35008 Lesson: url decode rules not applied to answers and responses 2014-10-30 13:25:29 +01:00
Marina Glancy 7892e8dd6a Merge branch 'MDL-25057-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-30 17:14:42 +08:00
Marina Glancy 6d5a4e733b Merge branch 'MDL-47569_CC_Errors27' of git://github.com/moodlerooms/moodle into MOODLE_27_STABLE 2014-10-30 16:16:32 +08:00
Marina Glancy eccad2d4bc Merge branch '47970-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-30 16:16:23 +08:00
David Monllao 9a08527acf MDL-46500 mod_data: Removing duplicate filemanager initialisations 2014-10-30 16:09:47 +08:00
Marina Glancy 0081072ff1 Merge branch 'MDL-29873_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-10-30 14:17:55 +08:00
Andrew Nicols 906ecbfd05 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 13:34:42 +08:00
Ben Kelada aa39745d05 MDL-46500 filepicker: prevent error when element does not exist 2014-10-30 13:07:20 +08:00
Marina Glancy 7dcabab098 MDL-45538 files: restore missing records in draft areas 2014-10-30 10:46:59 +08:00
Sam Hemelryk eede7b3efe MDL-47970 mod_scorm: fixed HTML5 validation error 2014-10-30 14:56:04 +13:00
Mark Nielsen 3315c01e0f 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:30:58 -07:00
Mark Nielsen d9e9e79954 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:30:47 -07:00
Dan Poltawski 5906d379db Merge branch 'wip_MDL-40949_m27_pathsettings' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-10-29 14:20:26 +00:00
Michael Aherne f4ec918f9b MDL-47793 assign: Reset reveal identities 2014-10-29 11:20:05 +00:00
Julien Boulen aa4318a823 MDL-47584 database SQL: add debug info on connection error notices 2014-10-29 16:55:30 +08:00
Damyon Wiese 917d5e1caa Merge branch 'wip-MDL-47647-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-10-29 16:18:29 +08:00
Marina Glancy b33d633510 Merge branch 'MDL-47916-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-29 16:15:32 +08:00
Damyon Wiese f9aab389e6 Merge branch 'MDL-47790-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-10-29 15:49:57 +08:00
Daniel Kosinski df0a353377 MDL-46219 assignment: delete files when resetting assign activities 2014-10-29 15:39:24 +08:00
Damyon Wiese e92a430405 Merge branch 'MDL-47755_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-10-29 15:31:45 +08:00
Damyon Wiese cdb3a6b6c1 Merge branch 'wip-MDL-47796-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-10-29 15:16:14 +08:00
Damyon Wiese dad46c5c1f Merge branch 'MDL-47612-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-29 14:49:13 +08:00
Damyon Wiese e1cc83875f Merge branch 'MDL-47227_MOODLE_27_STABLE' of https://github.com/crazyserver/moodle into MOODLE_27_STABLE 2014-10-29 14:43:38 +08:00
Damyon Wiese c40485aeee Merge branch 'MDL-47201-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-10-29 14:27:17 +08:00
Adrian Greeve 99cf374a42 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:09:34 +08:00
Damyon Wiese 203ef3bd3e Merge branch 'MDL-47898-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-29 13:36:40 +08:00
Dan Marsden af4417f0aa MDL-33939 gradingform_guide: use correct max grade for scales. 2014-10-29 13:23:46 +08:00
Damyon Wiese 37e7a3849b Merge branch 'wip-MDL-46517-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-29 13:13:58 +08:00
David Scotson fc8984234c 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:55:37 +08:00
Andrea Bicciolo c00787ae08 MDL-47201 Reports: Read from multiple log stores in outline report 2014-10-29 12:48:43 +08:00
Andrew Nicols 2fe3a171c4 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:13 +08:00
Marina Glancy 451ea7b118 MDL-46517 calendar: adjust display for DST
Thanks to Jo Matthews for providing a patch
2014-10-29 11:25:32 +08:00
Damyon Wiese a6113f4dd1 Merge branch 'MDL-47835_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-10-29 11:23:51 +08:00
Corey Wallis e8db7737da MDL-46517 calendar: adjust dates for DST
Change-Id: I269382031e4ffa714396f3d9ce2315a5c96d929c
2014-10-29 11:01:33 +08:00
David Monllao 321bfdbedf MDL-47835 block_recent_activity: Same entry keys order
insert_records() is sensitive to the order of the keys
assigned to the inserted objects (inserted as arrays in
this case). Now keys are assigned using the same order.
2014-10-29 10:53:23 +08:00
Damyon Wiese 86594f9a95 Merge branch 'wip-MDL-36987-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-29 10:38:56 +08:00
Petr Skoda d42ba3d0af MDL-40949 admin: Fix $CFG->preventexecpath hints
This setting restricts all local paths, not just
executables.
2014-10-29 10:47:33 +13:00
Dan Poltawski 3803574711 weekly release 2.7.2+ 2014-10-28 12:32:20 +00:00
Dan Poltawski 25c57e8cc2 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-28 12:32:18 +00:00
Juan Leyva d8c1ffd0a0 MDL-47916 web services: Fixed invalid returned value type 2014-10-28 10:28:38 +01:00
Pau Ferrer Ocaña 5776292b94 MDL-47227 admin: Fix user bulk selection over 1000 2014-10-28 08:52:00 +01:00
Kordan 43163295a5 MDL-47790 core_outputcomponents: added one more <tr> around <td clspan="xx"> when $table->data[] = "hr" is provided 2014-10-28 15:49:39 +08:00
Marina Glancy 63f1e3b287 Merge branch '47914-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-28 12:24:01 +08:00
Sam Hemelryk 09d83a4038 MDL-47183 post-integration fixes
* Fixed typo with context_module::instance
* Fixed use of $mod->get_context()
2014-10-28 15:50:17 +13:00
Sam Hemelryk 76b6d2e750 Merge branch 'MDL-47183-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-28 14:02:28 +13:00
Andrew Nicols f3e6ff8a6c MDL-47898 mod_quiz: Correct path when checking content_editable
Addresses a number of issues when using the text editor in a quiz using
secure mode.
2014-10-28 07:32:42 +08:00
Sam Hemelryk 61685bb0df MDL-47914 report_stats: better handling of user and mode 2014-10-28 11:52:51 +13:00
Sam Hemelryk c18c38f3f6 Merge branch 'wip-MDL-47585-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-28 09:28:17 +13:00
AMOS bot 3e0fd2ed8e Automatically generated installer lang files 2014-10-28 00:05:36 +08:00
Adrian Greeve 1a67124e67 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:42:00 +08:00
Damyon Wiese fc9ff77426 Merge branch 'MDL-47588_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-27 15:30:20 +08:00
Damyon Wiese ff8b2535d7 Merge branch 'm27_MDL-47210_IIS_PATH_INFO_Ignored_In_Required_Login_Pluginfile_Redirect' of https://github.com/scara/moodle into MOODLE_27_STABLE 2014-10-27 14:00:12 +08:00
Marina Glancy 7047ebb7a3 Merge branch 'MDL-47882_scorm_loadsco_invalid_html_27_STABLE' of git://github.com/MorrisR2/moodle into MOODLE_27_STABLE 2014-10-27 11:49:01 +08:00
Damyon Wiese 3217e572cb MDL-47690 Course: Remove unused variable from unit tests. 2014-10-27 11:27:55 +08:00
Damyon Wiese a4e7898729 Merge branch 'MDL-47690-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-27 11:27:40 +08:00
Damyon Wiese c187aa03c4 Merge branch 'wip-MDL-30358-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-27 10:31:11 +08:00
Matteo Scaramuccia 2ebfef8f7b MDL-47210 Files API: IIS, PATH_INFO ignored in required login redirect. 2014-10-26 08:05:23 +01:00
Ray Morris 784b3b9262 MDL-47882 SCORM: invalid HTML in loadSCO.php 2014-10-24 16:54:57 -05:00
Tim Hunt 8f089f100c 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:48:39 +01:00
Tim Hunt 2be10633d8 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:38 +01:00
Tim Hunt e6d8ca248d MDL-46088 quiz secure window: further Atto JS fixes. 2014-10-24 17:11:24 +01:00
Damyon Wiese d61b59175c MDL-46088 Quiz: Prevent alert when clicking in editor in secure popup 2014-10-24 17:11:16 +01:00
Dan Poltawski 8afccaf846 Merge branch 'MDL-46712-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-10-24 15:37:31 +01:00
Dan Poltawski 3d86260c08 Merge branch 'MDL-47780_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-10-24 15:19:49 +01:00
Dan Poltawski a0088bb79b Merge branch 'wip-MDL-47760-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-24 15:18:33 +01:00
Dan Poltawski f393fbb08b Merge branch '46518-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-24 15:16:56 +01:00
Dan Poltawski 73715b3aa8 Merge branch 'MDL-47804_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-10-24 15:14:38 +01:00
Dan Poltawski 61cd8bb3cd Merge branch '47608-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-24 15:13:16 +01:00
Dan Poltawski 19089bc416 Merge branch 'MDL-47397-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-24 15:09:55 +01:00
Dan Poltawski e6035a8b38 weekly release 2.7.2+ 2014-10-24 11:15:12 +01:00
Dan Poltawski edfa06b103 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-24 11:15:10 +01:00
Juan Leyva deb9221748 MDL-47690 web services: Fixed invalid return parameter type in mod_url 2014-10-24 10:30:08 +02:00
Adam Olley 09352c5677 MDL-47804 events: calendar_event_updated needs to accept a timestart == 0 2014-10-24 15:35:14 +10:30
Marina Glancy 779d68eb8a Merge branch 'MDL-47340-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-10-24 11:55:16 +08:00
Damyon Wiese 441a8a209b Merge branch '46499-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-24 11:03:36 +08:00
Damyon Wiese ba639bb069 Merge branch 'MDL-47740_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-24 09:50:41 +08:00
Sam Hemelryk e68b0e289d NOBUG: fixed whitespace 2014-10-24 14:44:11 +13:00
Sam Hemelryk 6606760811 MDL-46332 fixed whitespace 2014-10-24 14:34:46 +13:00
Sam Hemelryk c43bfca338 Merge branch 'MDL-46332-grouping-remove-button-27' of git://github.com/DanBennettUK/moodle into MOODLE_27_STABLE 2014-10-24 12:02:18 +13:00
Sam Hemelryk 1ecb6d4d1b Merge branch 'MDL-47555_27' of https://github.com/rlorenzo/moodle into MOODLE_27_STABLE 2014-10-24 11:17:04 +13:00
Sam Hemelryk 148a0db4cf Merge branch 'wip_MDL-47795_M27' of git://github.com/gjb2048/moodle into MOODLE_27_STABLE 2014-10-24 09:59:01 +13:00
gdharris cdc2fedcac MDL-46853 calendar: fix import of no duration events 2014-10-24 09:55:50 +13:00
Dan Poltawski 3c795ec9cb Merge branch 'MDL-47815-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-10-23 17:28:40 +01:00
Dan Poltawski e7b026846b Merge branch '47684-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-23 16:33:27 +01:00
Dan Poltawski db2ba9f335 Merge branch '47752-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-23 16:32:22 +01:00
Frederic Massart c3d5443a43 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:56:48 +08:00
Frederic Massart cc9e6ebbf7 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:56:47 +08:00
Frederic Massart 04cc05c0d3 MDL-47397 editor_atto: Properly close confirm dialogue in Behat test 2014-10-23 17:56:47 +08:00
Damyon Wiese eba4b02677 MDL-47499 tasks: Scheduled tasks custom schedule is reset on upgrade.
Add a unit test for reset_scheduled_tasks_for_component and make sure it doesn't clear
customised schedules for existing tasks.
2014-10-23 10:23:12 +01:00
Marina Glancy eefedf7a06 Merge branch 'wip-MDL-47675-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-10-23 16:58:13 +08:00
Damyon Wiese 139c36d5d4 Merge branch '47077-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-23 16:10:11 +08:00
Damyon Wiese d7ee0ce9db Merge branch 'MDL-32616_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-23 12:03:32 +08:00
Adrian Greeve 9c630abcd7 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 08:54:35 +08:00
Tim Hunt 191dc626dd 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:20 +01:00
Tim Hunt 4b9d9d281c MDL-32616 question engine: move unit test to better name 2014-10-22 11:01:19 +01:00
Damyon Wiese eceb11d200 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:01:53 +08:00
Andrew Nicols 9cc49c2f58 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:19:23 +08:00
Damyon Wiese 2fe83c2c9b MDL-46527 Grades: Webservice only returns first activity grade. 2014-10-22 11:22:15 +08:00
Damyon Wiese c274f4dd62 Merge branch 'MDL-46527-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-22 10:24:06 +08:00
AMOS bot 9e6714f148 Automatically generated installer lang files 2014-10-22 00:07:40 +08:00
Gareth J Barnard 87e7e6a130 MDL-47795 SCORM: SCORM report not a report. 2014-10-21 15:42:32 +01:00
Tim Hunt 5151147372 MDL-47740 question engine: let qs update variant later if appropriate
Variant has two purposes. First to determine which version of the
question the student will see. Hence it is used to set up the state
of the quetsion when the question is started. Then the internal state of
the question is saved in the first step.

Once that has been done, the variant number is purely informative, and
just used to break down the statistics.

In some cases (the one I have in mind is qtype_opaque) then there is a
complex randomisation process, which may lead to several inital variant
numbers acutally giving the same version of the question. In this case
it is nice if the question can update the stored variant number, to make
the statistics more meaningful.
2014-10-21 11:44:10 +01:00
Juan Leyva 0fdb3d3fdc MDL-46527 grades: grade_get_grades external function rewritten 2014-10-21 12:33:40 +02:00
Mark Nelson 702e2eb195 MDL-47780 core: corrected docs for get_user_capability_course() 2014-10-21 00:53:19 -07:00
Damyon Wiese 7cdb32a8ea Merge branch 'wip_MDL-41593_m27_preventexecdefault' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-10-21 13:23:33 +08:00
Yuliya Bozhko 08574f01cc MDL-47755 badges: Fix internal message output
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-10-21 16:28:38 +13:00
Sam Hemelryk b12d387f93 Merge branch 'm27_MDL-36669_UFO_references_in_filelib' of https://github.com/scara/moodle into MOODLE_27_STABLE 2014-10-21 15:17:59 +13:00
Matteo Scaramuccia 8cdcbf3455 MDL-36669 Filters: Remove the last ref to the UFO library. 2014-10-20 23:23:25 +02:00
Dan Poltawski 41ce6946d2 Merge branch 'MDL-38172_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-10-20 18:28:48 +01:00
Dan Poltawski 0930a859ac Merge branch 'MDL-47651_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:44:35 +01:00
Dan Poltawski 2c1a9dcca6 Merge branch 'MDL-47666_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:31:58 +01:00
Dan Poltawski 813e70a35a Merge branch 'MDL-47711_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:28:54 +01:00
Dan Poltawski 520308af7e Merge branch 'MDL-47726_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:26:38 +01:00
Dan Poltawski 7bb3575813 Merge branch 'MDL-47673_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-20 17:21:43 +01:00
Tim Hunt 362d958e5a MDL-47726 availability: fix tests when there is a text custom field
This unit tests assumed that on a fresh install, there were no custom
user-profile fields. Given some third-party plugins, that assumption is
false.
2014-10-20 16:15:59 +01:00
Tim Hunt d313ad40e6 MDL-47711 behat: make it easier to copy the init.php command. 2014-10-20 12:05:50 +01:00
Tim Hunt bb7030cf98 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:42 +01:00
Tim Hunt 9812ea0a62 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:34 +01:00
Tim Hunt c5b928ce4a MDL-47651 quiz responses: allow for qtypes without responses 2014-10-20 12:05:26 +01:00
Jetha Chan f5beaa7e00 MDL-47340 action_menu: selector, RTL, consistency fixes 2014-10-20 17:10:05 +08:00
Marina Glancy d8a7d44a65 Merge branch 'wip_MDL-47754_m27_installredir' of git://github.com/skodak/moodle into MOODLE_27_STABLE 2014-10-20 17:04:42 +08:00
Dan Bennett bbe7727499 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-20 09:47:23 +01:00
Marina Glancy 97f240e7b6 Merge branch 'MDL-38065-fix-27' of git://github.com/jmarthaler/moodle into MOODLE_27_STABLE 2014-10-20 14:08:34 +08:00
Marina Glancy a23348da27 MDL-47760 grades: dim category name if hidden 2014-10-20 14:05:50 +08:00
Petr Skoda 49e057453f MDL-47754 install: fix redirect loop 2014-10-20 12:53:04 +13:00
Sam Hemelryk 8d76895d08 MDL-46518 navigation: site glossaries now expand properly 2014-10-20 11:20:13 +13:00
Sam Hemelryk 19e095a757 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:04:54 +13:00
Sam Hemelryk f7492e8526 MDL-47077 report_participation: fixed pagination in groups 2014-10-20 11:01:31 +13:00
Sam Hemelryk 0cd220c870 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:37 +13:00
Sam Hemelryk 7c23f7f865 MDL-47752 grading: fixed bugs with the modgrade element 2014-10-20 10:34:09 +13:00
Sam Hemelryk fb7c991ed5 MDL-47684 mod: better validation of rating options 2014-10-20 08:44:27 +13:00
Jean-Michel Vedrine fcc5996cda MDL-29873 Lesson: Essays not shown on grade page with SQL server 2014-10-18 19:57:46 +02:00
Jean-Michel Vedrine 458cb3927a MDL-38172 Lesson: Additional Info not displayed at end of lesson 2014-10-17 17:12:40 +02:00
Dan Poltawski 3eeb53655e weekly release 2.7.2+ 2014-10-17 14:31:38 +01:00
Dan Poltawski 5728a1f51c Revert "MDL-47684 mod: better validation of rating options"
This reverts commit c58758d207.
2014-10-17 14:28:19 +01:00
Dan Poltawski c91ddd50e6 Revert "MDL-44548 mod_scorm: force an external sync to check for updated files."
This reverts commit 8af706e33b.
2014-10-17 09:31:29 +01:00
Jon Marthaler 4fab973d4b 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:26:45 -05:00
Dan Poltawski b41bcab492 Merge branch '47631-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-16 15:04:14 +01:00
Dan Poltawski 875f3b001c Merge branch 'm27_MDL-44548' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-10-16 11:46:34 +01:00
Dan Poltawski bb4245f1a4 Merge branch 'MDL-47710_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-16 11:35:29 +01:00
Marina Glancy c6458c381a MDL-36987 auth_manual: fix config for field locking
Thanks to Sergey for the patch
2014-10-16 18:17:25 +08:00
Tim Hunt 898f7f9eab MDL-47710 qformat_gift: fix bahat fails due to different ids in exports 2014-10-16 11:04:44 +01:00
Dan Poltawski af236997dd Merge branch '47684-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-16 11:02:37 +01:00
Dan Poltawski 5033b3cf73 Merge branch 'MDL-47657-27' of git://github.com/gurgus/moodle into MOODLE_27_STABLE 2014-10-16 10:52:59 +01:00
Dan Poltawski 7d92cb5719 Merge branch 'MDL-47686-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-10-16 10:40:03 +01:00
Damyon Wiese 5d82824d6d Merge branch 'MDL-47667_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-16 13:17:23 +08:00
Sam Hemelryk c58758d207 MDL-47684 mod: better validation of rating options 2014-10-16 16:24:59 +13:00
Dave Cooper 255d191a1d MDL-47657 mod_glossary: Fixed wrong error message on edit timeout. 2014-10-16 09:44:10 +08:00
Sam Hemelryk 85e3c16479 Merge branch 'MDL-47594_M27' of git://github.com/kordan/moodle into MOODLE_27_STABLE 2014-10-16 11:05:02 +13:00
Sam Hemelryk 30cc99cd98 Merge branch 'wip-MDL-47629-MOODLE_27_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_27_STABLE 2014-10-16 10:31:28 +13:00
Yolanda Ordóñez Rufat e1250d89fb MDL-47466 calendar: fixed error ORA-01795 in calendar_get_events 2014-10-15 14:19:23 +02:00
Damyon Wiese a14b534965 Merge branch 'wip-MDL-47613-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-15 16:58:48 +08:00
Damyon Wiese 6d126348e2 MDL-47686 assign: Fix restoring from a mod_assignment backup.
This was only working for admins.
2014-10-15 15:58:32 +08:00
Dan Poltawski 8b3c12ec5b Merge branch 'MDL-38732-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-15 08:41:13 +01:00
Dan Marsden 0b2494f82d MDL-47431 advanced grading: correct use of frankenstyle names for consistency 2014-10-15 14:56:10 +08:00
Damyon Wiese 7364b0fea5 Merge branch 'MDL-47646_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-15 14:30:05 +08:00
Damyon Wiese b57cfa8462 Merge branch 'wip-MDL-47572-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-15 14:09:07 +08:00
Damyon Wiese f6b9c0f77b Merge branch 'wip-MDL-47583-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-15 13:50:38 +08:00
Frederic Massart f1c933f470 MDL-38732 gradereport_grader: Undefined variable in unit tests 2014-10-15 12:23:34 +08:00
Marina Glancy c396f64224 MDL-30358 forms: strict validation is too strict 2014-10-15 11:58:09 +08:00
Kevin Wiliarty 295f32737f MDL-47629 quiz review: display cloze feedback on top of "Check" button 2014-10-14 15:40:05 -04:00
Dan Poltawski 450e3f27c9 Merge branch 'MDL-38732-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-14 19:02:11 +01:00
Dan Poltawski 45f4833f90 weekly release 2.7.2+ 2014-10-14 18:03:14 +01:00
Dan Poltawski 05c1422566 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-14 18:03:11 +01:00
Dan Poltawski a58d2935dd MDL-46235/MDL-46971 mysql_compress_rows: fix typo 2014-10-14 15:12:01 +01:00
Dan Poltawski 7252078d48 Merge branch 'wip_MDL-46235_m27_innodbtext' of github.com:skodak/moodle into MOODLE_27_STABLE 2014-10-14 12:27:03 +01:00
Tim Hunt fd03bcae29 MDL-47667 profile unit tests: don't assume none by default.
E.g. if an add-on creates a user profile field on install, the test was
failing.
2014-10-14 12:12:05 +01:00
Damyon Wiese 0cda7b5785 Merge branch '46151-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-10-14 15:33:52 +08:00
Sam Hemelryk d1a370838c MDL-46151 cachestore_memcache: set_many now uses set 2014-10-14 20:04:20 +13:00
Frederic Massart 84dd6d42ce MDL-38732 gradereport_grader: Handle simultaneous graders 2014-10-14 13:50:17 +08:00
Adrian Greeve 2baeeeb9fa MDL-46546 core_grades: Move error checking after csv load. 2014-10-14 10:31:03 +08:00
Damyon Wiese 0914be8afe MDL-46235 Admin: Fix typos in mysql_compressed_rows.php cli script 2014-10-14 10:04:41 +13:00
Sam Hemelryk 4ad4c19b58 MDL-46151 cachestore_memcache: now checks extension version for support 2014-10-14 08:27:33 +13:00
AMOS bot a35e7562d5 Automatically generated installer lang files 2014-10-14 00:05:39 +08:00
Tim Hunt 8c0c30dd66 MDL-47646 CURL redirect unit test: handle broken servers 2014-10-13 15:53:26 +01:00
Andrew Nicols 6e2ae29005 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:28:54 +08:00
Adrian Greeve cdc1f7f709 MDL-46546 gradebook: Grade import gives error on bad csv upload. 2014-10-13 10:48:40 +08:00
Sam Hemelryk d3046f1761 MDL-47631 report_participation: fixed filtering by letter 2014-10-13 12:28:31 +13:00
Rex Lorenzo 5719e3f0fa MDL-47555 core_availability: Issue with page layout & grade restriction
* Set pagelayout before getting section info, otherwise conditional activity renderers will default to the default 'base' layout.
2014-10-10 14:57:41 -07:00
Dan Poltawski 6a10ec4260 weekly release 2.7.2+ 2014-10-10 12:08:54 +01:00
Dan Poltawski 124da5b9bf Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-10 12:08:51 +01:00
Marina Glancy 2d022e4c3e MDL-47613 wiki: allow searching several words
Thanks to Sandeep B for suggested solution
2014-10-10 16:34:04 +08:00
Kordan 893ded8a91 MDL-47594 core_accesslib: removed three useless lines of code 2014-10-10 08:44:07 +02:00
Dan Marsden 8af706e33b MDL-44548 mod_scorm: force an external sync to check for updated files. 2014-10-10 15:14:50 +13:00
AMOS bot ddda9e2d5f Automatically generated installer lang files 2014-10-10 00:05:31 +08:00
Dan Poltawski 60f462b19d MDL-47497 qformat_gift: fix bad backported behat test 2014-10-09 13:24:24 +01:00
Marina Glancy b530fdbb36 MDL-47585 stats: fixed incorrect user dropdown 2014-10-09 14:35:15 +08:00
Dan Poltawski 79d84a5c72 Merge branch 'MDL-46647-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-09 07:10:19 +01:00
Marina Glancy a8812800e5 MDL-47583 atto_managefiles: correctly decode filename 2014-10-09 10:58:44 +08:00
Marina Glancy 3ef132fe0e MDL-47583 tinymce_managefiles: correctly decode filename 2014-10-09 10:55:37 +08:00
Sam Hemelryk 15dfb316cf Merge branch 'MDL-46984_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-10-09 09:16:47 +13:00
Dan Poltawski 92cdd5338b Merge branch 'MDL-47536_27' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2014-10-08 15:24:39 +01:00
Damyon Wiese d682a9d31d Merge branch 'wip-mdl-46987-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-10-08 21:35:08 +08:00
Tim Hunt da1e9ff3af 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:54:07 +08:00
Tim Hunt 74d0792515 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:54:07 +08:00
Damyon Wiese 3a77bc290a Merge branch 'wip-MDL-47492-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-08 16:55:48 +08:00
Marina Glancy 1e10504ff8 MDL-47572 libraries: modify unittest to avoid random timing fail
Thanks to Nigel Cunningham
2014-10-08 10:59:46 +08:00
Sam Hemelryk a4534af8b7 Merge branch 'MDL-47470-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-10-08 12:21:41 +13:00
Sam Hemelryk 2cfba2cb2e Merge branch 'MDL-47474-27' of https://github.com/bostelm/moodle into MOODLE_27_STABLE 2014-10-08 11:52:23 +13:00
Sam Hemelryk 80165b6ee8 Merge branch 'MDL-47481-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-10-08 11:51:38 +13:00
Sam Hemelryk 2e16cac8a2 Merge branch 'MDL-47484_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-10-08 11:40:53 +13:00
Sam Hemelryk 80802921d4 Merge branch 'MDL-46182_MOODLE_27_STABLE' of https://github.com/NeillM/moodle into MOODLE_27_STABLE 2014-10-08 11:28:32 +13:00
Sam Hemelryk e3eea31d67 Merge branch 'MDL-28075_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-08 10:57:22 +13:00
Sam Hemelryk dae0eba253 Merge branch 'MDL-46391-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-10-08 10:45:37 +13:00
Sam Hemelryk 94b702b49b Revert "MDL-46978 gradebook: Edit grade item changes visibility of category"
This reverts commit a7566c53e5.
2014-10-08 10:37:29 +13:00
AMOS bot 3281f6b0ad Automatically generated installer lang files 2014-10-08 00:05:28 +08:00
Dan Poltawski c2b4959b36 Merge branch 'MDL-47518_27' of https://github.com/rlorenzo/moodle into MOODLE_27_STABLE 2014-10-07 14:33:07 +01:00
Frederic Massart 256616c5e0 MDL-46647 core_grades: Adding tests for fetch_all_helper() 2014-10-07 15:26:40 +08:00
Eloy Lafuente (stronk7) 1d09472f1f 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:40 +08:00
Sam Hemelryk 4e6d7fb30b Merge branch 'MDL-36460-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-10-07 15:16:59 +13:00
Marina Glancy fce57fd26e MDL-31936 workshop: version bump and @since phpdocs 2014-10-07 10:10:12 +08:00
Marina Glancy 58f87868d0 Merge branch 'MDL-31936-27-workshop-reset' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-10-07 10:10:06 +08:00
Petr Skoda e22af76803 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:32 +13:00
Sam Hemelryk 98844557ae Merge branch 'MDL-46295-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-10-07 10:36:53 +13:00
David Mudrák abb876c334 MDL-31936 workshop: Improve unit tests for the course reset support 2014-10-06 23:30:18 +02:00
Sam Hemelryk d5eea92499 Merge branch 'MDL-46978-27' of https://github.com/danielneis/moodle into MOODLE_27_STABLE 2014-10-07 10:26:25 +13:00
David Mudrák 5de218bcb3 MDL-31936 workshop: Generator able to create submissions and assessments
This is a basic implementation of the actual content generation in the workshop
generator. Note the we do not generate actual grading form data (which is what
the grading strategy plugins would do), just their results.
2014-10-06 23:13:54 +02:00
David Mudrák fcb3fe7238 MDL-31936 workshop: Add more options to the course reset form
This is built upon original work by Michael Hughes. We now have separate
settings for deleting workshop submissions, assessments and for resetting the
workshop phase.
2014-10-06 23:13:53 +02:00
David Mudrák 5d0c6ae61e MDL-31936 workshop: Delete attachments on record removal
The methods workshop::delete_submission() and workshop::delete_assessment() did
not delete files (embedded and attachments) associated with the given
submission or assessment. This is fixed now.

Additionally, the delete_assessment() method now cleans-up records from the
table workshop_grades, too. This internal workshop API still does not give
workshop subplugins a chance to clean up their data, should they store them in
their own tables instead of the workshop_grades one. This should be improved in
the future yet.
2014-10-06 23:13:53 +02:00
David Mudrák 9d873205b1 MDL-31936 workshop: Fix overall feedback content processing order
This is unrelated to the issue but was spotted while testing it. The order of
format_text() and file_rewrite_pluginfile_urls() was incorrect and threw
debugging message. Fixed now.
2014-10-06 23:13:53 +02:00
Dan Poltawski 647c6bf8a5 Merge branch 'MDL-46054-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-10-06 16:01:31 +01:00
Dan Poltawski 8669550962 Merge branch 'MDL-45504_27' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2014-10-06 15:48:11 +01:00
Dan Poltawski 17bdcc11aa Merge branch 'MDL-47426_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-10-06 08:56:26 +01:00
Gregory Faller d2d568a034 MDL-46712: Center EditPDF window on browser resize / zoom 2014-10-06 14:54:45 +08:00
Andrew Nicols ac4f596acd MDL-47183: viewhiddenactivities should use the module context
Thanks to Paulo Matos for the forum part of this change.
2014-10-06 12:22:09 +08:00
Eloy Lafuente (stronk7) 24b4ee9814 MDL-47536 timezones: update to 2014h (2296 rules) 2014-10-06 01:55:15 +02:00
Eloy Lafuente (stronk7) 2e261e4a88 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:16:28 +02:00
Sam Hemelryk b2ea054081 Merge branch 'm27_MDL-47316' of git://git.catalyst.net.nz/moodle-r2 into MOODLE_27_STABLE 2014-10-06 11:15:50 +13:00
AMOS bot db94a9a86e Automatically generated installer lang files 2014-10-05 00:05:34 +08:00
Daniel Neis Araujo a7566c53e5 MDL-46978 gradebook: Edit grade item changes visibility of category 2014-10-03 14:08:27 -03:00
Neill Magill 68153616be 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:25:54 +01:00
Michael Hughes 079944a878 MDL-31936 workshop: Add unit tests for the workshop reset 2014-10-03 11:06:46 +02:00
Michael Hughes a55a982746 MDL-31936 workshop: Initial implementation of the course reset support 2014-10-03 11:03:47 +02:00
David Mudrák ad3d8dbaa3 MDL-44536 workshop: Fix missing phpDoc for user report callbacks 2014-10-03 10:00:16 +02:00
David Mudrák 78ed559f5f MDL-44536 workshop: Instantiate with the plain course module record
When the workshop class constructor signature was designed, the class
cm_info did not exist yet. Instead, plain course modules records were
used everywhere - including the $mod parameter in the
workshop_user_complete() callback. Even if cm_info is backwards
compatible with the plain data record when it comes to behaviour, it
must not be passed where the workshop API expects the stdClass (coding
error is thrown).

Alternative solution would be to remove the type hinting in the workshop
constructor. That is what the 'assign' class does, for example (the
inline docs describe the expected type to be stdClass, but that is not
forced via the method declaration).

As the problem seems to be pretty sole, I prefer not touching the
workshop internal API for now. So we let the cm_info degrade back into
the stdClass to make the workshop constructor happy without significant
performance lost.
2014-10-03 10:00:16 +02:00
Andrew Nicols fbb6559b82 MDL-36460 mod_forum: Restrict forum subsription list based on availability info 2014-10-03 11:56:43 +08:00
Rex Lorenzo d0b0227d4e MDL-47518 report_log: Logfiles of single users no longer accessible
* Removing join on courseid if it is the SITEID.
2014-10-02 16:35:02 -07:00
Tim Hunt f812f9b6d2 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:55:05 +01:00
Tim Hunt e680e70098 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:54:29 +01:00
Tim Hunt 25a487b90a 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:10:57 +01:00
Dan Poltawski 29507f2816 weekly release 2.7.2+ 2014-10-02 15:19:05 +01:00
Dan Poltawski c9a4dda024 NOBUG: Fixed file access permissions 2014-10-02 15:19:05 +01:00
Dan Poltawski 885b34c751 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-10-02 15:19:01 +01:00
sam marshall 805122a72f MDL-47481 Availability: Profile condition error if no users 2014-10-02 10:47:06 +01:00
Dan Poltawski 23ba64bdc3 Merge branch 'MDL-37707-27-fixup' of https://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-10-02 09:50:50 +01:00
Marina Glancy b1cdf13013 MDL-47492 core_grades: Behat test for using scales and mingrade in gradebook 2014-10-02 15:59:53 +08:00
Marina Glancy f4df7d7961 MDL-47492 behat: refer to table column indexes instead of names 2014-10-02 15:59:48 +08:00
Sam Hemelryk 670eb0f171 Merge branch 'MDL-47408-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-10-02 17:31:10 +13:00
Dmitry Nefedov 0d7c8bb4b0 MDL-47408 user: Add checking before adding blog's link.
Checking enableblogs  and bloglevel, userid, constant  BLOG_USER_LEVEL.
2014-10-02 12:21:32 +08:00
Willy Lee 1da93e09d0 MDL-46295 course: add search box to all course listings, manage button when appropriate 2014-10-01 22:37:03 +08:00
Henning Bostelmann cdf3cdd608 MDL-47474 Calendar export: Fix user id in authorization check 2014-10-01 15:24:50 +01:00
Dan Poltawski f857cd49d9 Merge branch 'MDL-47214-27' of github.com:andrewnicols/moodle into MOODLE_27_STABLE 2014-10-01 08:38:20 +01:00
Andrew Nicols 9c8f956e9d MDL-47214 core: IPs should be cleaned 2014-10-01 15:29:30 +08:00
Adam Olley 8e0093973f MDL-47484 atto_indent: Prevent loss of rangy markers in some cases 2014-10-01 13:56:53 +09:30
Frederic Massart 6cc503ee87 MDL-37707 mod_assign: Prevent user from changing grouping in team submissions 2014-10-01 11:29:10 +08:00
Sam Hemelryk c00fb90718 Revert "MDL-47033 general: Fix incorrect use of 'course' layout"
This reverts commit 92f89f593c.
2014-10-01 15:49:25 +13:00
Sam Hemelryk f0f3d01025 Merge branch 'm27_MDL-47404' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-10-01 15:38:07 +13:00
Dan Marsden ac1751b29a MDL-47404 filelib: Prevent flash from treating files as uploads
added to send_stored_file as well.
2014-10-01 15:08:51 +13:00
Sam Hemelryk c90137561b MDL-47428 language: fixed typo 2014-09-30 23:43:35 +02:00
zbdd 5d39d47ab6 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:28 +13:00
Dan Poltawski 622c15ca7c MDL-47470 behat: fix 'I navigate to' exception
When a child page is not found
2014-09-30 15:30:11 +01:00
Yolanda Ordóñez Rufat 91d693643b MDL-47466 calendar: use get_in_or_equal() in function calendar_get_events to fix problem with ORA-01795 2014-09-30 14:07:26 +02:00
Dan Poltawski 3ddbd23f09 Merge branch 'MDL-47385-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-09-30 11:41:40 +01:00
Dan Poltawski 2e17bba40b Merge branch 'm27_MDL-47097' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-30 08:31:01 +01:00
Dan Poltawski 85cb248688 Merge branch 'MDL-32275-27' of git://github.com/gurgus/moodle into MOODLE_27_STABLE 2014-09-30 08:29:03 +01:00
Julien Boulen 59ae54dffe MDL-46984 core_course: added grouping name for activities with no link 2014-09-29 20:45:14 -07:00
Stephen Bourget c4829d57e2 MDL-46084 Calendar: Fix importing of full day events from Google 2014-09-30 11:28:43 +13:00
Sam Hemelryk ca4bb8441c Merge branch 'm27_MDL-47170' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-30 10:03:17 +13:00
Sam Hemelryk 6657094417 Merge branch 'MDL-47214-ClientIp-wrong-with-multiple-proxies_27_STABLE' of https://github.com/mhughes2k/moodle into MOODLE_27_STABLE 2014-09-30 08:48:28 +13:00
Dan Poltawski 196f94ec09 Merge branch 'MDL-46920-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-09-29 16:25:48 +01:00
Juan Leyva 495ab49e82 MDL-46054 web_services: Fixed invalid parameter definitions 2014-09-29 16:02:06 +02:00
Marina Glancy 7f6875287f MDL-46054 web_services: wrong key in exception string 2014-09-29 16:02:06 +02:00
Marina Glancy 395c27abcf MDL-46054 web_services: bug fix in core_user_get_users
Thanks to Mikko Rantanen for the patch
2014-09-29 16:01:53 +02:00
Dan Poltawski b79a21df51 Merge branch 'wip-mdl-47154-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-09-29 12:50:12 +01:00
Dan Poltawski 6fdf8bcc53 Merge branch 'MDL-47069-27-plugin-dependency' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-09-29 12:46:53 +01:00
Dan Poltawski 6b57d95fe3 Merge branch 'MDL-47322-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-29 10:55:13 +01:00
Dan Poltawski 43bac317f8 Merge branch 'wip_MDL-47333_m27_fonts' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-09-29 10:44:27 +01:00
Dmitry Nefedov 3234f4324e MDL-46391 messages: Add search button under contact list.
Add search button to only Message navigation -> Contacts section.
2014-09-29 17:19:30 +08:00
Sam Hemelryk 6e0760db2b Merge branch 'MDL-47033_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-09-29 15:18:09 +13:00
Sam Hemelryk 1fcb39fbb2 Merge branch 'wip-MDL-47398-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-29 14:35:15 +13:00
Sam Hemelryk 3d9daae5a9 Merge branch 'MDL-47408-27' of https://github.com/DmitryNefedov/moodle into MOODLE_27_STABLE 2014-09-29 14:32:51 +13:00
Sam Hemelryk 5f78ef781f Merge branch 'm27_MDL-47404' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-09-29 14:23:31 +13:00
Sam Hemelryk c05e69c836 Merge branch 'MDL-39190_27' of https://github.com/pauln/moodle into MOODLE_27_STABLE 2014-09-29 14:20:08 +13:00
David Mudrák e0acb17830 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:57 +02:00
Sam Hemelryk dfefc00f56 Merge branch 'MDL-37707-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-09-29 11:35:32 +13:00
Sam Hemelryk 3f6243f4be Merge branch 'MDL-42974-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-29 11:21:24 +13:00
Sam Hemelryk 015d47f67d Merge branch 'MDL-47378-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-09-29 11:19:10 +13:00
Sam Hemelryk 37fe4b68ea Merge branch 'MDL-43566-27' of https://github.com/willylee/moodle into MOODLE_27_STABLE 2014-09-29 09:51:45 +13:00
Sam Hemelryk 95944b32fd Merge branch 'MDL-47381_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-29 09:06:42 +13:00
Sam Hemelryk 7686d4b3b7 Merge branch 'MDL-47380-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-29 09:02:57 +13:00
Eloy Lafuente (stronk7) ad39e5550e MDL-47242 theme_bootstrapbase: Fixed whitespace (take2)
Seems that previous whitespace fix was not ok.
2014-09-28 18:33:46 +02:00
AMOS bot 3b008d30cb Automatically generated installer lang files 2014-09-28 00:09:30 +08:00
Dmitry Nefedov 6e9aeadd75 MDL-47408 user: Add enableblogs checking before adding blog's link. 2014-09-27 15:20:21 +08:00
sam marshall dea57f0107 MDL-47380 Availability: Editing interface broken in IE8 2014-09-26 15:46:02 +01:00
sam marshall eb2e5d8a83 MDL-42974 UI: Modal dialogs do not work in IE8 2014-09-26 15:45:43 +01:00
sam marshall 0e290bc008 MDL-47322 Availability: empty availability should be saved as null 2014-09-26 15:43:53 +01:00
Tim Hunt df9589e32c MDL-47381 qformat: Behat tests have wrong plugin type. 2014-09-26 11:30:41 +01:00
Dave Cooper 6b4ab27d4f MDL-32275 enrol: Last site access column now shows last course access 2014-09-26 11:29:30 +08:00
Petr Skoda 207f4b22cc MDL-47333 fix support for custom fonts in tcpdf 2014-09-26 13:58:54 +12:00
David Mudrák 4a3dd577a9 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:49:05 +02:00
Dmitry Nefedov d1ab9d16ac MDL-47385 coursecat: Mistake line in phpdocs deleted. 2014-09-25 21:16:31 +08:00
Willy Lee 387ec15d2d MDL-43566 course: add delete icon to search returns in course management listings 2014-09-25 05:59:32 -07:00
Dan Poltawski 8c85081478 weekly release 2.7.2+ 2014-09-25 11:18:03 +01:00
Dan Poltawski c52defd7c4 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-09-25 11:18:00 +01:00
Marina Glancy 3c3012388d MDL-47398 core_grades: fix grade category generator 2014-09-25 10:32:35 +08:00
Dan Marsden 68406d778c 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:17 +12:00
Sam Hemelryk d593522699 MDL-47242: Fixed whitespace 2014-09-25 12:19:41 +12:00
Dan Poltawski 5921dfb9c4 MDL-47378 mod_assign: prevent debugging notice
Parameters come out of get_user_preferences as strings.
2014-09-24 15:42:22 +01:00
Pavel Sokolov 155e70008b MDL-37707 mod_assign: Prevent user from switching to and from team submissions 2014-09-24 16:08:13 +08:00
Jetha Chan b4dad816b1 MDL-47242 theme_bootstrapbase: inverted color and RTL fixes 2014-09-24 15:54:57 +08:00
David Mudrák 2795a7cee0 MDL-47248 Use new Moodle logo for RSS feeds generated by Moodle
Themes can override this logo as any other core pix file. The new logo copied
from https://moodle.org/logo/ and resized to match the previous logo size
(140x35px).
2014-09-24 01:38:12 +02:00
Eloy Lafuente (stronk7) 5d6d351f02 Merge branch 'MDL-47224_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-09-24 01:27:06 +02:00
Eloy Lafuente (stronk7) d9016fd581 MDL-47180 qformat_webct: whitespace cleanup 2014-09-24 00:58:04 +02:00
Eloy Lafuente (stronk7) bacf193e66 Merge branch 'MDL-47180_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-09-24 00:41:01 +02:00
AMOS bot ea6b6393e4 Automatically generated installer lang files 2014-09-24 00:05:56 +08:00
Jean-Michel Vedrine ba50cd880c MDL-47180 qformat_webct: Import of calculated questions broken 2014-09-23 14:47:36 +02:00
Paul Nicholls 86f2e36939 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:38:09 +12:00
Sam Hemelryk d56c53c90e Merge branch 'MDL-46811-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-09-23 16:36:14 +12:00
Jonathan Harker f5fb4991bd 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:55:08 +12:00
Sam Hemelryk 8bcc9fbff7 Merge branch 'MDL-47242-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-09-23 12:04:31 +12:00
Eloy Lafuente (stronk7) 1d4b21c07d Merge branch 'MDL-47182-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-09-23 01:52:21 +02:00
Eloy Lafuente (stronk7) 292f350282 Merge branch 'MDL-47269_M27' of https://github.com/nadavkav/moodle into MOODLE_27_STABLE 2014-09-23 01:29:33 +02:00
Eloy Lafuente (stronk7) 2893aa4904 Merge branch 'MDL-47266_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-23 01:12:22 +02:00
Tim Hunt a733c2ce43 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:24:51 +01:00
Dan Poltawski 7e36f977b1 Merge branch 'MDL-47238_guest_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-09-22 16:13:42 +01:00
Dan Poltawski 42db1010f0 Merge branch 'MDL-47270-core-component-classmap-ordering_27_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_27_STABLE 2014-09-22 16:03:53 +01:00
Dan Poltawski dec70bc47e Merge branch 'MDL-40006_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-22 11:55:50 +01:00
Dan Poltawski 300510afc1 Merge branch 'MDL-46991-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-09-22 10:57:56 +01:00
Nadav Kavalerchik c3676d6c33 MDL-47269 yui/src/dock: Invert dock reset blocks icon, in RTL mode 2014-09-22 11:42:20 +03:00
Rajesh Taneja 6edd1ef671 MDL-46987 report_participation: Count duplicate logs as 1
Some of the actions generate more then 1 event.
Example: forum post create generate:
- post_created and
- accessible_uploaded
events which  gets logged at the same time.
Count them as 1 action and not 2, as it is
single action and report should show 1 and not 2
2014-09-22 15:22:26 +08:00
Marina Glancy fe38ae10d3 MDL-47154 behat: escape user supplied strings in xpath 2014-09-22 13:24:21 +08:00
Rajesh Taneja 7a7546eb64 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:24:13 +08:00
Andrew Davis ac9425c993 MDL-47238 core_user: added an error message if guests access user profiles and they aren't allowed to 2014-09-22 11:37:00 +08:00
AMOS bot 2898461aec Automatically generated installer lang files 2014-09-21 00:08:57 +08:00
Tim Hunt 77c9d6d7e5 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:57:56 +01:00
AMOS bot 9dfb587ff8 Automatically generated installer lang files 2014-09-20 00:05:43 +08:00
Adam Olley d629afa0e2 MDL-47224 qtype_calculated: Calculated qtype comment on datasetitems should follow formatting rules 2014-09-19 09:32:54 +09:30
sam marshall 81c4057908 MDL-46991 Availability: Conditional dates not updated on restore 2014-09-18 16:36:38 +01:00
Dan Poltawski 8152e9fa60 weekly release 2.7.2+ 2014-09-18 07:41:10 +01:00
Jetha Chan 73c01865f6 MDL-46920 theme_bootstrapbase: fix dropdown to use data-target 2014-09-17 15:32:40 +08:00
Matt Petro 8349864b0e MDL-47270 core_component: make cache independent of filesystem ordering 2014-09-16 13:18:39 -04:00
Eloy Lafuente (stronk7) 8da5cf92c9 Merge branch 'MDL-46613-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-16 19:10:52 +02:00
Dan Poltawski 9efa6cf36d MDL-47182 admin: warn about delayed scheduled tasks
Rather than using module cron, use scheduled tasks to work out
if cron has been running recently.

This is not perfect, the admin could disble all tasks, or reschedule
them - but its not complex to compute.
2014-09-16 17:52:10 +01:00
Eloy Lafuente (stronk7) 074b467000 Merge branch 'wip-MDL-47079-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-16 18:38:53 +02:00
Tim Hunt 3024caa173 MDL-47266 quiz: fix restore log message. 2014-09-16 14:42:31 +01:00
Juan Leyva 439a1a4d8c MDL-46613 grades ws: Fixed external function declaration
Gradebook items with overridden grades was causing error as Web
Services response

coding style
2014-09-16 10:08:28 +02:00
Damyon Wiese 35fa1656ab MDL-44257 Message: Update phpdocs for email_to_user function 2014-09-16 15:07:48 +08:00
Damyon Wiese 0bdbe84828 Merge branch 'MDL-44257-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-09-16 15:03:53 +08:00
Simey Lameze 7972603cc4 MDL-44257 lib: fix the attachment code to accept tempdir and dataroot.
Credit goes to Damyon, thanks.
2014-09-16 10:34:05 +08:00
Simey Lameze 1780c99e06 MDL-44257 message: added test to make sure the stored file still exists 2014-09-16 10:23:58 +08:00
Simey Lameze bd2519c596 MDL-44257 message: check if the attachment exists before remove it
Credit goes to Mark Nielsen, thanks.
2014-09-16 10:23:58 +08:00
Marina Glancy df45195a04 MDL-47079 user: behat test for deleting users 2014-09-16 09:54:07 +08:00
Eloy Lafuente (stronk7) a0f94236fa Merge branch 'MDL-46588-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-16 00:23:00 +02:00
Dan Poltawski b5ecf0dbae Merge branch 'MDL-46195_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 16:07:09 +01:00
Dan Poltawski e7697e57f7 Merge branch 'MDL-46331_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 12:18:56 +01:00
Dan Poltawski 7194a13a33 Merge branch 'wip-MDL-47187-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-15 11:21:37 +01:00
Jetha Chan aace1408ec MDL-47242 theme_bootstrapbase: fix nested custom_menu responsive display 2014-09-15 17:36:39 +08:00
Damyon Wiese 8693c8f373 Merge branch 'MDL-47143_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 16:14:02 +08:00
Damyon Wiese 86df808aa5 Merge branch 'MDL-47167_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 15:55:21 +08:00
Damyon Wiese d2c77503c5 Merge branch 'MDL-46944-27-lti-iframe' of git://github.com/schmod/moodle into MOODLE_27_STABLE 2014-09-15 15:25:07 +08:00
Brian Barnes e7da6db9ca MDL-47186 calendar: Changed month name to h2 from h1 2014-09-15 14:20:59 +08:00
Damyon Wiese f2211e7c9a Merge branch 'MDL-46747_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 14:05:58 +08:00
Damyon Wiese 9f54825718 Merge branch 'MDL-47209-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-09-15 13:56:32 +08:00
Damyon Wiese 86e09bfb9c Merge branch 'MDL-47208_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-09-15 12:18:39 +08:00
Damyon Wiese 574b53efde Merge branch 'MDL-46088_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-15 11:32:29 +08:00
Juan Leyva b189a26f3d MDL-46588 web services: Fixed system context instanceid eq 0 case 2014-09-12 11:26:42 +02:00
Juan Leyva 3c354a42ed MDL-46588 web services: Unit tests added 2014-09-12 11:26:42 +02:00
Juan Leyva 4712967f4c MDL-46588 web services: Fixed invalid check of empty contextid in function get_context_from_params 2014-09-12 11:26:42 +02:00
Adam Olley 2181953d43 MDL-47208 core_availability: Return false when cm isnt in modinfo list
If a cm isn't in modinfo's cm list, then the user shouldn't be able to see that cm.
This fixes an issue where hidden activities would cause users to be unable to use moodle.
2014-09-12 09:15:26 +09:30
Tim Hunt ca01459727 MDL-46747 questions: add More info link to qbehaviour help.
Thanks to Tony Gardner-Medwin for the suggestion.
2014-09-11 16:13:45 +01:00
Dan Poltawski 9a45421093 weekly release 2.7.2+ 2014-09-11 15:44:37 +01:00
Dan Poltawski ee566d2482 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-09-11 15:44:34 +01:00
Michael Hughes ce31bc5d36 MDL-47214 General: Multiple IP addresses in X-Forwarded-For Fixed
Fixed getremoteaddr() function handle multiple IP addresses
2014-09-11 15:01:25 +01:00
Frederic Massart c7dfb90672 MDL-47209 repository_skydrive: Use new oauth URLs 2014-09-11 15:17:41 +08:00
Marina Glancy 871f534785 MDL-46834 dndupload: check course dndupload cap on course level 2014-09-11 12:12:43 +08:00
AMOS bot f374e53b8d Automatically generated installer lang files 2014-09-11 00:05:40 +08:00
Andrew Schmadel 19b0b0bb7f 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:01:07 -04:00
Marina Glancy 6f7320673b MDL-46834 dndupload: check course dndupload cap on course level 2014-09-10 08:08:40 +01:00
Marina Glancy 12a88823f0 MDL-47187 assign: fixed timing unittest failure 2014-09-10 11:57:02 +08:00
Frederic Massart 28dfc4eebc MDL-46818 core_grade: Prevent form checker to catch move fields 2014-09-10 10:44:02 +08:00
Tim Hunt 3bafe8d0c4 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:20 +01:00
Tim Hunt 074aec1846 MDL-47167 XML question format: behat tests 2014-09-09 22:57:00 +01:00
Tim Hunt aef4661635 MDL-46195 WebCT question import: Behat test 2014-09-09 22:54:42 +01:00
AMOS bot e9d4d084e3 Automatically generated installer lang files 2014-09-10 00:05:33 +08:00
Dan Poltawski 5101f9b131 MDL-46811 update download.moodle.org url to https
https is now the prefferd protocol for this site
2014-09-09 16:37:28 +01:00
Marina Glancy 0a70f84dde Merge branch 'MDL-46997-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-09-09 17:18:53 +08:00
Marina Glancy a8d69de7bd Merge branch 'm27_MDL-47076' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-09 17:13:09 +08:00
Dan Poltawski b30bf418c8 Merge branch 'wip-MDL-47080-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-09 10:06:03 +01:00
Dan Poltawski 20758f187d Merge branch 'wip-MDL-46834-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-09 08:11:12 +01:00
Damyon Wiese 589e140d83 MDL-46997 Grades: fix sum of grades with hidden items with differing maxgrades 2014-09-09 14:02:14 +08:00
Damyon Wiese 78c55e13a2 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:02:13 +08:00
Damyon Wiese b5415ecd9d 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
2014-09-09 14:02:06 +08:00
David Curry 3ae804809e MDL-47076 badges: Add checks to user fields during badges restoration
Change-Id: I49d2137666d2d7c1f6abca7ae83c07b326d9b0c4
2014-09-09 16:20:41 +12:00
Brian Barnes 90f7b090b9 MDL-47170 tiny_mce: Fixed display of bullets in rtl languages 2014-09-09 15:56:41 +12:00
Marina Glancy d0965c1dc4 MDL-46834 dndupload: Hide dnd message when user cant upload files 2014-09-09 10:03:25 +08:00
Marina Glancy 7f0bfd592e MDL-46834 filepicker: dnd upload should respect the current context id 2014-09-09 10:03:25 +08:00
Eloy Lafuente (stronk7) 309c82bf0e Merge branch 'm27_MDL-47054' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-09-09 02:19:42 +02:00
Tim Hunt aec38d6b33 MDL-46195 fix error handling. 2014-09-08 22:26:33 +01:00
Tim Hunt c73d96bc91 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:57:51 +01:00
Dan Poltawski 937ccd60b2 Merge branch 'MDL-40451-m27-random-glossary-block-title' of git://github.com/amandadoughty/moodle into MOODLE_27_STABLE 2014-09-08 17:26:57 +01:00
Dan Poltawski 98cf5b4f0c Merge branch 'wip-MDL-45602-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-08 16:30:56 +01:00
Dan Poltawski 01afa79fe7 Merge branch 'MDL-46586-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-08 15:31:12 +01:00
Dan Poltawski 9b31e3bc3f Merge branch 'wip-MDL-43739-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-08 15:16:39 +01:00
Dan Poltawski ee977370d2 Merge branch 'MDL-46982_m27' of https://github.com/shashirepo/moodle into MOODLE_27_STABLE 2014-09-08 12:22:28 +01:00
Dan Poltawski 5e61e7b667 Merge branch 'MDL-47014-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-08 12:19:34 +01:00
Dan Poltawski 9ded19fe12 Merge branch 'wip-MDL-46254-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-08 12:16:12 +01:00
Juan Leyva 95afe143d7 MDL-47014 airnotifier: Missing require of filelib.php 2014-09-08 11:46:50 +02:00
Marina Glancy dc2e48bda7 Merge branch 'MDL-46818_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-09-08 14:05:06 +08:00
Marina Glancy 5260b523c3 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:48 +08:00
Marina Glancy 55c051f352 MDL-47080 theme: call format_string on site shortname 2014-09-08 13:57:40 +08:00
Marina Glancy f0dd12dfc1 MDL-46254 theme: apply filters to theme footnote 2014-09-08 13:57:17 +08:00
Marina Glancy 55111d2bf4 MDL-45602 behat: add members to cohorts 2014-09-08 13:56:46 +08:00
Marina Glancy b7b5d98a24 Merge branch 'MDL-46564_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-09-08 13:49:41 +08:00
Marina Glancy 09deaef4e9 Merge branch 'MDL-46821-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-09-08 13:49:28 +08:00
Marina Glancy bd8eae5245 Merge branch 'MDL-46761_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-08 13:49:16 +08:00
Marina Glancy 7b6eb2a1ac Merge branch 'MDL-46587-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-09-08 13:49:01 +08:00
Marina Glancy 36d9887093 Merge branch 'MDL-44304-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-09-08 12:58:12 +08:00
Tim Hunt 16ebf7a574 MDL-47143 questions: fix default for question_preview/marks setting. 2014-09-07 12:58:30 +01:00
Tim Hunt 1d02898b38 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:28 +01:00
Tim Hunt cb81111118 MDL-46088 Impossible to click on Atto in a Quiz in 'Secure' mode. 2014-09-06 18:18:36 +01:00
Eloy Lafuente (stronk7) 31059fd653 Moodle release 2.7.2 2014-09-06 13:01:52 +02:00
Juan Leyva 5bc6887180 MDL-46587 files: Invalid $itemid conversion in core_files_get_files Web Service 2014-09-05 13:45:52 +02:00
Juan Leyva 18aba19678 MDL-46586 files: Invalid return parameters definition in core_files_get_files external function 2014-09-05 13:41:52 +02:00
shashirepo ad2b5cdd9f MDL-46982 core: fixes wrong opening div tag 2014-09-05 10:21:30 +05:30
Yuliya Bozhko 92f89f593c 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:30:21 +12:00
Eloy Lafuente (stronk7) cbdde9a495 weekly release 2.7.1+ 2014-09-04 19:55:11 +02:00
Eloy Lafuente (stronk7) ce65706ceb Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-09-04 19:55:06 +02:00
Marina Glancy 65f8dc31d8 MDL-46861 webservice: reverted unnecessary change in 2.7 2014-09-04 11:40:48 +08:00
Brian Barnes 4ce01c9d96 MDL-47097 theme: Fixed issue with dd's sliding up 2014-09-04 14:25:12 +12:00
Brian Barnes 5c779defab MDL-47054 theme: fixed issue with the user rtl table 2014-09-04 09:38:42 +12:00
Eloy Lafuente (stronk7) 779303d869 Merge branch 'MDL-47031-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-09-03 19:25:55 +02:00
Amanda Doughty 7740ad458d MDL-40451 block/glossary_random Fixed missing header when adding new block 2014-09-03 14:04:04 +01:00
Helen Foster 28c9a1993d MDL-47031 Merge English strings from the en_fix language pack 2014-09-03 10:59:31 +02:00
Marina Glancy 8f866fa1c3 Merge branch 'm27_MDL-46639' of git://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-09-03 16:59:16 +08:00
Dan Marsden a556c4d02c MDL-46639 SCORM: incorrect setting of launch param, it is done in scorm_parse_aicc 2014-09-03 20:21:31 +12:00
Yuliya Bozhko 6797273854 MDL-46564 badges: Fix 'All' option in badges block
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-09-03 18:45:04 +12:00
Ankit Agarwal d99bb10f68 MDL-46821 gradereport_user: Fix background color of user report 2014-09-03 12:12:18 +05:30
Charles Fulton 87c0820260 MDL-30414 block_private_files: convert button to inline link 2014-09-03 01:09:32 +02:00
Damyon Wiese 0444bcffc7 Merge branch 'wip-MDL-47052-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-02 15:30:46 +08:00
Marina Glancy 15990b65ac MDL-47052 report_participation: fixed bug when filtering by first letter 2014-09-02 15:01:32 +08:00
Mark Nelson 9d4861fa75 MDL-46818 core_grades: added YUI form change validation 2014-09-01 23:02:33 -07:00
Michael de Raadt 1f3066f197 MDL-46619 Forum: link to the discussion only if users cannot see posts. 2014-09-02 10:10:05 +08:00
Michael de Raadt 532c25d5bd MDL-46619 Forum: only output last poster's name if user can view it. 2014-09-02 10:10:02 +08:00
Marina Glancy c256614eab Merge branch 'MDL-45952_27' of git://github.com/Syxton/moodle into MOODLE_27_STABLE 2014-09-02 09:58:58 +08:00
Eloy Lafuente (stronk7) 0f67177a54 Merge branch 'MDL-46633_m27' of https://github.com/shashirepo/moodle into MOODLE_27_STABLE 2014-09-02 02:12:22 +02:00
Eloy Lafuente (stronk7) 2e6e70ccd2 Merge branch 'wip_MDL-46679_m27_addonenv' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-09-02 02:08:43 +02:00
Eloy Lafuente (stronk7) a13ae2ac2d Merge branch 'MDL-46979_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-09-02 01:48:56 +02:00
Eloy Lafuente (stronk7) e19f164fc7 Merge branch 'MDL-45909_install_M27' of https://github.com/nadavkav/moodle into MOODLE_27_STABLE 2014-09-02 01:46:34 +02:00
Eloy Lafuente (stronk7) 702c4b1206 Merge branch 'MDL-43639_updatePassEveryLogin_27' of https://github.com/moodlerooms/moodle into MOODLE_27_STABLE 2014-09-02 01:07:43 +02:00
Virgil Ashruf db765d575b MDL-45636 course_rest: changed modcontext to coursecontext 2014-09-01 11:27:07 +02:00
Damyon Wiese 17a31c7a1f Merge branch 'MDL-46852-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-09-01 16:16:33 +08:00
Damyon Wiese 7b258d7186 Merge branch 'wip-MDL-46540-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-01 16:08:00 +08:00
Marina Glancy 609a129b84 MDL-46540 stats: missing include file
Thanks to Vadim Dvorovenko for finding a bug and providing a solution
2014-09-18 03:40:17 +08:00
Marina Glancy ecd01922e9 Merge branch 'MDL-46861_27_STABLE' of https://github.com/Lightwork-Marking/moodle into MOODLE_27_STABLE 2014-09-01 16:07:05 +08:00
Damyon Wiese c8782c56d7 Merge branch 'MDL-46902_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-09-01 15:54:18 +08:00
Damyon Wiese 4deed68f49 Merge branch 'MDL-46911-27' of https://github.com/bostelm/moodle into MOODLE_27_STABLE 2014-09-01 15:45:52 +08:00
Damyon Wiese 40b705e153 Merge branch 'm27_MDL-46985_7ZIP_RAR_MIME_types_missing' of https://github.com/scara/moodle into MOODLE_27_STABLE 2014-09-01 15:36:22 +08:00
Damyon Wiese 3b35ea4686 Merge branch 'm27_MDL-46961' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-09-01 15:29:03 +08:00
Damyon Wiese 5a9dde69b1 Merge branch 'wip-mdl-46670-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-09-01 15:23:23 +08:00
Damyon Wiese a02ad260e0 Merge branch 'MDL-45818_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-09-01 15:17:57 +08:00
Marina Glancy 15f15ccddd Merge branch 'm27_MDL-46639' of git://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-09-01 14:34:52 +08:00
Marina Glancy 346e41d042 Merge branch 'MDL-46539-fix-27' of https://github.com/jmarthaler/moodle into MOODLE_27_STABLE 2014-09-01 14:34:40 +08:00
Frederic Massart 36bf61e152 MDL-46852 mod_lesson: More accurate comparison of shortanswer answers 2014-09-01 14:25:31 +08:00
Damyon Wiese bc180cd111 Merge branch 'wip-MDL-39233-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-09-01 13:40:38 +08:00
Damyon Wiese b10d7c59ae MDL-46619 Forum: whitespace fixes 2014-09-01 11:35:26 +08:00
Damyon Wiese 6aee251874 Merge branch 'MDL-46619-2.7-visisble-authors-qanda' of https://github.com/amandadoughty/moodle into MOODLE_27_STABLE 2014-09-01 11:00:35 +08:00
Damyon Wiese d1e9bdfbc8 Merge branch 'm27_MDL-46737' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-09-01 10:55:22 +08:00
zbdd 0c18577317 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-09-01 10:44:50 +08:00
Rajesh Taneja 255221acdf MDL-46670 report_participation: Look for records in legacy and current
Priority log store will have current information, so
make sure to get information and aggregate that with
legacy data
2014-09-01 10:24:51 +08:00
Petr Skoda 91f1dbd319 MDL-46235 ddl: add support for large number of text fields in one database table 2014-09-01 08:42:52 +12:00
Matteo Scaramuccia 93bd10c300 MDL-46985 Added 7-Zip and RAR MIME types. 2014-08-31 22:39:37 +02:00
Petr Skoda 03bdfbd37b 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:11 +12:00
AMOS bot d7de792dac Automatically generated installer lang files 2014-09-01 00:05:42 +08:00
Mark Nelson 763e5d6c83 MDL-45818 core_message: use system context if user no longer exists 2014-08-29 16:20:08 -07:00
Mark Nelson 436c7825b1 MDL-46902 core_course: display meaningful message when no courses found 2014-08-29 14:31:55 -07:00
AMOS bot 9074f5914f Automatically generated installer lang files 2014-08-30 00:05:30 +08:00
Paul Charsley 62ff078fcf MDL-46861 added missing required field areaname 2014-08-29 10:53:38 +12:00
Nadav Kavalerchik df174952fd MDL-45909 install/css: Left align input form fields on Install pages,in RTL mode 2014-08-28 22:58:02 +03:00
Tim Hunt 9d97806c7e MDL-46979 backup: remove duplicate string.
Thanks to Matt Sammarco for spotting this.
2014-08-28 20:45:00 +01:00
Eloy Lafuente (stronk7) e6f1c141bf weekly release 2.7.1+ 2014-08-28 19:12:21 +02:00
Eloy Lafuente (stronk7) 687f244a6f Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-08-28 19:12:14 +02:00
AMOS bot 461532ecfc Automatically generated installer lang files 2014-08-29 00:05:30 +08:00
shashirepo 16b6239a88 MDL-46633 chat: Chat send button gets stuck 2014-08-28 15:01:49 +05:30
Syxton 8121a2fad0 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:14:08 -04:00
Mark Nielsen d78e72a940 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:24:51 -07:00
Jon Marthaler 16a175de06 MDL-46539 assign calendar: Fix lastcron value for assign cron 2014-08-27 11:15:38 -05:00
AMOS bot ec4f31f984 Automatically generated installer lang files 2014-08-28 00:05:33 +08:00
Damyon Wiese 323a7a151b Merge branch 'MDL-46812-27-fixup' of https://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-08-27 10:49:08 +08:00
Frederic Massart 14eb0c478d MDL-46812 gradereport_grader: Hide vertical scrollbar of scroller 2014-08-27 10:44:02 +08:00
Damyon Wiese e8b487e010 Merge branch 'wip-MDL-39888-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-08-27 09:56:58 +08:00
Faisal Kaleem 641351118e MDL-46961 SCORM: JavaScript Hoisting issue. 2014-08-27 13:08:59 +12:00
Eloy Lafuente (stronk7) 12e42d2246 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:11:59 +02:00
Eloy Lafuente (stronk7) 0a668af390 Merge branch 'm27_MDL-46875' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-08-27 02:03:37 +02:00
Damyon Wiese 22290d726a Revert "Merge branch 'MDL-46917-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE"
This reverts commit 439f2e7e83, reversing
changes made to b523d5bc33.
2014-08-26 17:20:41 +08:00
Henning Bostelmann 03fc135cb6 MDL-46911 Database activity: jump to correct place in list after (un)approve 2014-08-26 10:17:07 +01:00
Marina Glancy 0459ed43e1 MDL-39233 mod_url: added unittest for get_course_content 2014-08-26 13:55:11 +08:00
Jason 928f531307 MDL-39233 mod_url: fix php notice 2014-08-26 13:55:10 +08:00
Damyon Wiese 767dfb307d MDL-46842 assign: Fix for unit tests - previous patch was completely ignoring manually reopening attempts. 2014-08-26 10:34:03 +08:00
Brian Barnes 3efe531af4 MDL-46875 tinymce: Fixed issue with full screen and spelling 2014-08-26 13:23:01 +12:00
Eloy Lafuente (stronk7) ef54b1272a Merge branch 'MDL-46477_m27' of https://github.com/shashirepo/moodle into MOODLE_27_STABLE 2014-08-26 02:24:31 +02:00
Eloy Lafuente (stronk7) 2e97e57edb Merge branch 'MDL-46753-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-08-26 02:08:17 +02:00
Eloy Lafuente (stronk7) 2f64ea2a2e Merge branch 'm27_MDL-46842' of https://github.com/greg-or/moodle-mod_assign into MOODLE_27_STABLE 2014-08-26 01:59:25 +02:00
Eloy Lafuente (stronk7) 3fda0a9736 Merge branch 'MDL-46868_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-26 01:40:48 +02:00
Eloy Lafuente (stronk7) 0047e4612c Merge branch 'm27_MDL-46816' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-08-26 00:10:50 +02:00
Eloy Lafuente (stronk7) 44088a5aeb Merge branch 'wip-MDL-46874-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-08-25 22:11:17 +02:00
Eloy Lafuente (stronk7) 2507ecbd3e Merge branch 'm27_MDL-46900' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-08-25 20:55:29 +02:00
Damyon Wiese 439f2e7e83 Merge branch 'MDL-46917-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-08-25 16:55:08 +08:00
Marina Glancy b523d5bc33 Merge branch 'MDL-46894_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-25 16:53:40 +08:00
Marina Glancy 63e0fee364 Merge branch 'MDL-46916_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-25 16:50:05 +08:00
Damyon Wiese 063c6e23d4 Merge branch 'MDL-46923_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-08-25 16:48:11 +08:00
Damyon Wiese 5c1f1690bb Merge branch 'wip_MDL-43918_m27_cm' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-08-25 16:44:50 +08:00
Marina Glancy b46ad4bdd5 Merge branch 'M27_MDL46887_assignment_file_max_size' of git://github.com/Dave-B/moodle into MOODLE_27_STABLE 2014-08-25 16:29:33 +08:00
Marina Glancy 8001ddd8b2 Merge branch 'MDL-46895_27' of git://github.com/colchambers/moodle into MOODLE_27_STABLE 2014-08-25 16:28:02 +08:00
Rex Lorenzo b9894e1e9f 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:49 +08:00
Dan Marsden 0e26b1d309 MDL-46639 mod_scorm: Fix load of simple AICC content
Thanks to Ian Wild for the report and suggested patch.
2014-08-25 20:01:45 +12:00
Marina Glancy 5cc6700f27 Merge branch 'MDL-46904-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-08-25 14:45:38 +08:00
Damyon Wiese 090f8f300d Merge branch 'wip-MDL-46812_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE 2014-08-25 14:03:18 +08:00
Damyon Wiese fc36873f61 Merge branch 'wip-MDL-46703-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-08-25 13:53:52 +08:00
Marina Glancy 315392626b Merge branch 'MDL-46918_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-25 12:01:27 +08:00
Petr Skoda c27add8d87 MDL-43918 add more validation to $modulename parameter when fetching cms 2014-08-25 12:19:11 +12:00
Adrian Greeve ae18cf2461 MDL-39888 mnet: Added a notification that logs may not be displayed in the log report.
In Moodle 2.7+ we are using the new logging system and if legacy logs are not enabled
(on the client system) then no logs will be displayed.
2014-08-23 11:55:57 +08:00
Colin Chambers deab7fda59 MDL-46895 qtype_calculated_find_formula_errors not defined causes Calculated question type test to fail 2014-08-22 14:03:36 +01:00
Andrew Nicols af3085d2d5 MDL-46917 atto: Focus on the editor when the form label is selected 2014-08-22 15:00:20 +08:00
Eloy Lafuente (stronk7) 55a8f72251 MDL-46918 ddl: cover behavior with unit test 2014-08-21 18:33:39 +01:00
Tim Hunt af02385d49 MDL-46918 ddl: fix error when renaming table already exists 2014-08-21 18:33:39 +01:00
AMOS bot c5b3017b49 Automatically generated installer lang files 2014-08-22 00:05:31 +08:00
Tim Hunt 5ec684b353 MDL-46916 behat: improve question state test. 2014-08-21 14:15:22 +01:00
Tim Hunt 0a03803081 MDL-46894 make Behat backup steps more robust. 2014-08-21 14:15:08 +01:00
Tim Hunt 6527b097e8 MDL-46868 glossary / filter: performance, check modinfo sooner.
Since we need to check modinfo anyway, do that as soon as possible so we
can get a performance win if there are no glossaries in the course.
2014-08-21 14:14:56 +01:00
Dan Poltawski 8f5c4f6b34 MDL-46880 mod_forum: move cron to scheduled task
Note that this is a very basic conversion without doing any refactoring
to split the tasks up better. That will come in MDL-44734, this is about
being a safe backportable change to give admins better control over the
running of the forum cron task.

Conflicts:
	mod/forum/version.php
2014-08-21 13:46:33 +01:00
Amanda Doughty b1325427ec MDL-46619 Forum: author showing in Q and A forum 2014-08-21 13:13:15 +01:00
shashirepo 5de6795ec0 MDL-46477 chat:hard coded string in mod/chat 2014-08-21 17:32:34 +05:30
Mary Evans 0dc138d47c MDL-46812 grade/report/grader: Need to tie up loose ends in Gradebook after MDL-43824
Squashed commit of the following:

commit 4ae57a823ba6fa1d627d2bad296cdf905b1930ee
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Thu Aug 21 02:05:35 2014 +0100

    MDL-46812 grade/report/grader: Reset previous commit for left scroller.

commit 7e3d27d3cc9d22ffe8e1dbb54eb705a65153a6b0
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Thu Aug 21 01:23:09 2014 +0100

    MDL-46812 grade/report/grader: Added jsenabled css body class to rtl style.

commit 0b5c3341b79c4b4bfefcd82eef1940964448ccba
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Thu Aug 21 01:13:34 2014 +0100

    MDL-46812 theme_base: Removed more redundant CSS.

commit 8c44e8a4c644a9139d1750af498bed6a14decf5c
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Wed Aug 20 15:44:42 2014 +0100

    MDL-46812 theme_base: Removed redundent grade/report/grader CSS in style/grade.css

commit 7c69b546fab03163d3863044ab9d1d9130c1cdd9
Author: Mary Evans <lazydaisy@visible-expression.co.uk>
Date:   Thu Aug 14 12:50:14 2014 +0100

    MDL-46812 grade/report/grader: Need to tie up loose ends in Gradebook after MDL-43824

        1. fixed gradebook layout when JS is disabled
        2. added height and background color to scroller when JS is enabled
        3. removed redundent top margin in user-grades table
2014-08-21 11:23:27 +01:00
Mark Nelson f367cfcbef MDL-46923 core_behat: fixed typos in function names 2014-08-20 22:11:31 -07:00
Damyon Wiese a02eefb35e MDL-44304 assignfeedback_editpdf: Fix fatal error when viewing team assignments with editpdf responses. 2014-08-21 12:09:39 +08:00
Damyon Wiese 6a449a9719 MDL-44304 assignfeedback_editpdf: Behat test for group submissions 2014-08-21 12:09:39 +08:00
Brian Barnes c2b526c484 MDL-46900 theme: allowed more than 1 nav collapse element 2014-08-21 15:01:58 +12:00
Marina Glancy b01092111c weekly release 2.7.1+ 2014-08-21 10:18:55 +08:00
Marina Glancy 8ef945280c Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-08-21 10:18:53 +08:00
AMOS bot fbfeb98d39 Automatically generated installer lang files 2014-08-21 00:05:30 +08:00
Damyon Wiese 24276da9ce MDL-46904 core_task: Gracefully handle rubbish entries in the tasks table. 2014-08-20 17:02:02 +08:00
Gregory Faller 1f316df7d9 MDL-46842: Reopen assignment submissions when using offline grading worksheet 2014-08-20 17:28:38 +09:30
Damyon Wiese 467aefd1a6 Merge branch 'MDL-45029-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE
Conflicts:
	course/modlib.php
2014-08-20 13:58:58 +08:00
Simey Lameze f354a67357 MDL-45029 core_course: set aggregationcoef while creating a new course module 2014-08-20 12:07:34 +08:00
Mark Nelson 32193155f5 MDL-46188 core_course: use correct hide/show icon 2014-08-20 12:04:59 +08:00
Damyon Wiese b3f6c093aa Merge branch 'MDL-45029-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-08-20 10:21:46 +08:00
Eloy Lafuente (stronk7) 82a678c91e Merge branch 'MDL-46302-atto-float-right' of git://github.com/uhunkler/moodle into MOODLE_27_STABLE 2014-08-20 00:57:22 +02:00
Mark Nielsen f3f21f18c4 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 21:51:13 +02:00
AMOS bot 05c7b75672 Automatically generated installer lang files 2014-08-20 00:05:29 +08:00
Mark Nielsen 39c01271f0 MDL-46051 mod_lti: Not enough data passed to lti_extend_lti_services 2014-08-19 17:08:59 +02:00
Mark Nielsen c09f63c5ac MDL-46051 mod_lti: Fixing errors in unknown_service_api_called class
Also adding unit tests.
2014-08-19 17:08:47 +02:00
Eloy Lafuente (stronk7) 9f9bcb251c Merge branch 'MDL-46301' of https://github.com/michaelwheeler/moodle into MOODLE_27_STABLE 2014-08-19 15:37:26 +02:00
David Balch 39864d9e88 MDL-46887 mod_assign: Enforce module's maxbytes setting at submission. 2014-08-19 14:01:15 +01:00
Marina Glancy 2a46808ed3 Merge branch 'wip-mdl-46327-m27' of git://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-08-19 17:39:40 +08:00
Rajesh Taneja 4221300426 MDL-46327 phpunit: drop_table should be used, rather then drop_temp_table 2014-08-19 17:17:50 +08:00
Simey Lameze d14fe6017f MDL-45029 core_course: set aggregationcoef while creating a new course module 2014-08-19 17:08:10 +08:00
Marina Glancy cdc0a8db3f MDL-46538 theme_base: recompiled moodle.css 2014-08-19 16:52:42 +08:00
Marina Glancy 9ddb811866 Merge branch 'MDL-46538_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE 2014-08-19 16:52:08 +08:00
Petr Skoda 29dd7397e2 MDL-46711 session: add support for multiple servers to memcache session driver
Includes proper definition of object properties which fixes handling of timout default.
2014-08-19 16:41:26 +08:00
Marina Glancy bef5900bdb Merge branch 'MDL-46281-MOODLE_27_STABLE' of git://github.com/lucisgit/moodle into MOODLE_27_STABLE 2014-08-19 16:22:24 +08:00
Marina Glancy 623379d82b Merge branch 'MDL-46829_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE 2014-08-19 14:21:18 +08:00
Marina Glancy 8480fd9364 Merge branch 'MDL-46833-MOODLE_27_STABLE' of git://github.com/lucisgit/moodle into MOODLE_27_STABLE 2014-08-19 14:21:09 +08:00
Damyon Wiese 5faaf18173 Merge branch 'MDL-41513-Scrollbar_not_working-27' of https://github.com/MorrisR2/moodle into MOODLE_27_STABLE 2014-08-19 14:07:10 +08:00
Marina Glancy d23d771071 Merge branch 'wip-mdl-46817-m27' of git://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-08-19 14:04:05 +08:00
Marina Glancy 5f690a9be6 Merge branch 'MDL-43197-27-2nd' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-08-19 13:26:01 +08:00
Damyon Wiese 95dae00235 Merge branch 'MDL-46188_m27' of https://github.com/shashirepo/moodle into MOODLE_27_STABLE 2014-08-19 13:14:45 +08:00
Marina Glancy 7c4e3db7c0 MDL-46874 gradereport: replace usage of class hidden with dimmed_text 2014-08-19 12:56:11 +08:00
Michael Wheeler 0ed1b7d277 MDL-46794 install: Fixed typo in config-dist.php 2014-08-19 11:26:49 +08:00
Marina Glancy 690988d958 Merge branch 'm27_MDL-46775' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-08-19 11:21:52 +08:00
Marina Glancy 26b3b4e80e Merge branch 'wip-mdl-46327-m27' of git://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-08-19 10:50:34 +08:00
Marina Glancy a5e67c5bcc Merge branch 'wip-MDL-46791-MOODLE_27_STABLE' of git://github.com/satrun77/moodle into MOODLE_27_STABLE 2014-08-19 10:50:22 +08:00
Frederic Massart 01327cfcf5 MDL-43197 gradereport_user: Parents/mentors can see all the relevant grades 2014-08-19 10:48:11 +08:00
Rajesh Taneja 1b775e96c1 MDL-46327 phpunit: Fixed oracle fail 2014-08-19 10:13:55 +08:00
Marina Glancy ef467ee957 MDL-46691 mod_choice: apply filters to user input 2014-08-19 03:04:57 +02:00
James Henestofel 247b756248 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:43:44 +02:00
Eloy Lafuente (stronk7) 1eedfdf2c0 Merge branch 'MDL-44894_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-19 02:34:48 +02:00
Eloy Lafuente (stronk7) d4bbbedbde Merge branch 'wip_MDL-46552_m27_memcached' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-08-19 02:29:06 +02:00
Eloy Lafuente (stronk7) c8abe81b99 Merge branch 'MDL-45874-27' of https://github.com/danielneis/moodle into MOODLE_27_STABLE 2014-08-19 02:12:19 +02:00
Eloy Lafuente (stronk7) 7943aabfbe Merge branch 'wip-MDL-46826-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-08-18 20:06:54 +02:00
Eloy Lafuente (stronk7) 2de77919d8 Merge branch 'wip-MDL-46589-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-08-18 19:48:42 +02:00
Marina Glancy 5094443f65 MDL-41284 stats: fix sql query from MDL-41284 2014-08-18 19:42:41 +02:00
Eric Merrill 9ec65dc485 MDL-46766 auth_cas: Upgrading to phpCAS 1.3.3 2014-08-18 16:38:55 +08:00
Simey Lameze 068ef548de MDL-46753 auth_cas: Replace hardcoded logout_return_url to user defined URL.
Credit goes to Mitsuru Udagawa, thanks!
2014-08-18 12:57:34 +08:00
Damyon Wiese bad563d2f4 Merge branch 'm27_MDL-46760' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-08-18 12:41:12 +08:00
Rajesh Taneja 50eb74065b MDL-46817 behat: Step to check if value exist/not in table column 2014-08-18 10:01:06 +08:00
AMOS bot febd8afc8e Automatically generated installer lang files 2014-08-18 00:07:49 +08:00
Marina Glancy cac959739b MDL-46703 mod_data: limit the width of select element when editing templates
Thanks to Hittesh for the provided solution
2014-08-16 13:27:27 +08:00
Marina Glancy cef5600303 MDL-46589 scheduled task does not send emails
Thanks to  Luděk Šulák  for the patch
2014-08-16 12:48:16 +08:00
Mary Evans 63a2e24bc2 MDL-46538 theme_base/theme_bootstrapbase: Removed incorrect RTL CSS. 2014-08-16 01:11:31 +01:00
Daniel Neis 35eefad6b3 MDL-45874 Fix access to users reports in navigation when using separate groups 2014-08-15 17:06:39 -03:00
Rajesh Taneja c8121c53d1 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:17:06 +08:00
Marina Glancy 74f6a6ae5b MDL-46826 forum: make sql query indexed, regression from MDL-31089 2014-08-15 11:46:01 +08:00
Ray Morris d560fb3e26 MDL-41513 mod_quiz: Scrollbar not working in JS Security Popup 2014-08-14 15:44:51 -05:00
Ruslan Kabalin 213220c159 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 16:04:54 +01:00
shashirepo baa476ce92 MDL-46188 course:show/hide button disappears after action 2014-08-14 20:32:31 +05:30
Mary Evans 795dc143c2 MDL-46829 theme_base: Fixed regression in Base casued by MDL-45031. 2014-08-14 14:27:06 +01:00
Tony Butler a18e060c5b 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:15 +01:00
Mohamed Alsharaf 84ebf61b82 MDL-46791 question: fixed incorrect 5th param for tag_set() 2014-08-14 23:51:41 +12:00
Tim Hunt 300dff939f 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:25 +01:00
Marina Glancy 2aa6dd4c60 weekly release 2.7.1+ 2014-08-14 14:52:31 +08:00
Marina Glancy e59d25c944 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-08-14 14:52:27 +08:00
Dan Marsden a86531f20b MDL-46816 mod_asssign plagiarism: Remove unnecessary code. 2014-08-14 13:09:42 +12:00
Dan Marsden 239bfa31b0 MDL-46760 mod_scorm: Fix js error when preview mode disabled 2014-08-14 10:10:45 +12:00
Eloy Lafuente (stronk7) 9056ee506a MDL-45031 theme: fix tabs base line alignment by 1px.
Credit goes to Damyon Wiese, thanks!
2014-08-13 21:33:02 +02:00
Michael Wheeler 5a8fdd1c27 Normalize request header names. 2014-08-13 14:51:44 -04:00
AMOS bot be14be6175 Automatically generated installer lang files 2014-08-14 00:05:45 +08:00
Marina Glancy 0b09c8e48f Revert "Merge branch 'm27_MDL-46643' of git://github.com/totara/moodle into MOODLE_27_STABLE"
This reverts commit a62801941e, reversing
changes made to 0282c20862.
2014-08-13 16:30:07 +08:00
Andrew Nicols 90e4b26229 MDL-45759 mod_quiz: Correct behat test to reflect changes from a translation fix 2014-08-13 15:49:45 +08:00
Eloy Lafuente (stronk7) 8b9c45b666 Merge branch 'MDL-46697_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-08-13 02:08:16 +02:00
Eloy Lafuente (stronk7) 2c3eea86fa Merge branch 'MDL-45031_M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE 2014-08-13 00:33:03 +02:00
Eloy Lafuente (stronk7) 39259ea58b Merge branch 'wip-MDL-46470-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-08-13 00:26:16 +02:00
Tim Hunt 3ce36f6ac1 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:38:26 +01:00
Dan Poltawski 6a9a7005b0 Merge branch 'MDL-43824-M27' of git://github.com/lazydaisy/moodle into MOODLE_27_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-08-12 11:08:11 +01:00
Dan Poltawski 2d9145638c Merge branch 'm27_MDL-46718' of https://github.com/greg-or/moodle-mod_assign into MOODLE_27_STABLE 2014-08-12 11:02:18 +01:00
Marina Glancy 531b675632 Merge branch 'MDL-46308_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-12 16:02:54 +08:00
Marina Glancy c41d4355ac Merge branch 'MDL-21042_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-08-12 16:02:11 +08:00
Marina Glancy ac4bf23c02 Merge branch 'm27_MDL-46315' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-08-12 15:02:03 +08:00
Marina Glancy 51c59e8b9f Merge branch 'MDL-46600_import_failed_27' of git://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-08-12 15:01:55 +08:00
Marina Glancy 606db83726 Merge branch 'wip_MDL-46480_m27_footernan' of git://github.com/skodak/moodle into MOODLE_27_STABLE 2014-08-12 15:01:46 +08:00
Marina Glancy a62801941e Merge branch 'm27_MDL-46643' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-08-12 13:31:41 +08:00
Marina Glancy 0282c20862 Merge branch 'MDL-43740_manual_none_27' of git://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-08-12 13:29:30 +08:00
Simon Coggins 915e21170c MDL-46775: Fix call to unavailable function when loading an invalid JS file 2014-08-12 14:33:23 +12:00
Mary Evans 11b6abd02c MDL-45031 theme_base: Added style/tabs.css and updated config.php
also removed tabtree css from style/core.css to style/tabs.css.
2014-08-12 01:11:31 +01:00
Eloy Lafuente (stronk7) 6005337c33 Merge branch 'MDL-46676_2.7' of https://github.com/ikawhero/moodle into MOODLE_27_STABLE 2014-08-12 01:48:18 +02:00
Eloy Lafuente (stronk7) ea2833bc35 Merge branch 'MDL-46681_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-12 01:44:23 +02:00
Mary Evans 2271f1845c MDL-43824 core/grade/report/grader: Fix for misalignment of static rows with scale grades. 2014-08-11 23:53:36 +01:00
Dan Poltawski b4875aa348 Merge branch 'MDL-46496-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-08-11 14:38:35 +01:00
Dan Poltawski 3b4cc68ff4 Merge branch 'm27_MDL-44015' of https://github.com/greg-or/moodle-mod_assign into MOODLE_27_STABLE 2014-08-11 14:31:04 +01:00
Dan Poltawski 2f0d26c522 Merge branch 'MDL-46688_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-08-11 14:13:14 +01:00
Andrew Davis 3dd8bd5069 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:17:13 +08:00
Dan Poltawski eede6aae43 Merge branch 'MDL-45759-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-08-11 11:24:20 +01:00
Dan Poltawski a623fdf11b Merge branch 'wip-MDL-30668-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-08-11 10:41:42 +01:00
Marina Glancy 617144f163 Merge branch 'MDL-35984-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-08-11 17:24:48 +08:00
Dan Poltawski 61d3898de9 Merge branch 'MDL-46748-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-08-11 08:37:35 +01:00
Damyon Wiese ec297cc65b MDL-35984 Grades: Fix deprecation of grade_category::aggregate_values 2014-08-11 14:22:27 +08:00
Damyon Wiese 5e33ee65e5 MDL-35984 grade: Recalculate min/max for sum of grades when hidden grades are involved. 2014-08-11 14:22:27 +08:00
Damyon Wiese 3bf4cc3887 MDL-35984 grade: Add behat tests for grade aggregations 2014-08-11 14:22:27 +08:00
Andrew Nicols 4f88c9f38d MDL-45780 mod_quiz: Autosave should listen for textarea:change events too 2014-08-11 12:32:15 +08:00
Andrew Nicols 096ef13c79 MDL-45780 editor_atto: Update the textarea more often
This change updates the frequency of the textarea update to additionally
update it:
* on keypress; and
* on content paste.
2014-08-11 12:32:13 +08:00
Damyon Wiese c49e848571 MDL-46748 MathJax filter: Update setting default for https cdn url. 2014-08-11 12:03:54 +08:00
Damyon Wiese 25a0be8b27 MDL-46748 MathJax filter: Make misconfigured mathjax url less "fatal" for Atto. 2014-08-11 12:03:05 +08:00
Tim Hunt b760c63189 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:15 +01:00
Tim Hunt b3569fb6fa MDL-46688 weblib: improve the highlight function.
Thanks to Joseph Baxter for suggesting some of the test cases.
2014-08-08 17:53:04 +01:00
Marina Glancy db14163584 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:16:32 +08:00
Andrew Nicols c58559191a MDL-46496 libraries: Add additional tests for jquery and jqueryUI
The additional tests add a clear example of the use of jquery UI images in
addition to working JavaScript.
2014-08-08 14:06:20 +08:00
Gregory Faller d86be9c53e MDL-46718: Return user to last accessed page when quick grading 2014-08-08 14:12:03 +09:30
Dan Marsden 7de6a916a2 MDL-46737 SCORM: correct dml syntax. 2014-08-08 15:10:11 +12:00
Andrew Nicols cf93e03ea0 MDL-45759 javascript: Handle setting of the confirm button fields post-init 2014-08-08 08:36:20 +08:00
Petr Skoda f2774239cb MDL-46480 fix get_htmlelement_size() to deal with hidden or non-block elements 2014-08-08 10:28:51 +12:00
Tim Hunt 5049dfceca 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:07 +01:00
Marina Glancy 186af5a430 weekly release 2.7.1+ 2014-08-07 13:15:08 +08:00
Marina Glancy 7a4826bc3e Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-08-07 13:15:07 +08:00
Paul Holden 1b1432ab88 MDL-21042 report_security: don't display warning for riskbackup unnecessarily 2014-08-06 19:54:23 -07:00
Andrew Davis 5bfbec5521 MDL-46600 core_grades: made it explicit in the error message that a failed grade import means nothing was imported. 2014-08-07 09:17:04 +08:00
Shane Elliott eee25b4a13 MDL-46676 profilefield_datetime: Use moodle time API 2014-08-06 16:36:03 +08:00
Adam Olley a175c5d1ba MDL-46697 gradebook: Only count active users when needed (and only id)
The code only needs the id column to perform its count. On courses with a lot of users
fetching the whole user record for them all easily adds up to several hundred MB of
memory.
2014-08-06 15:58:11 +09:30
Gregory Faller d209e7161a MDL-44015: EditPDF scrolls instead of drawing on iOS 2014-08-06 14:42:53 +09:30
Marina Glancy ef494edcd6 MDL-46470 bootstrapbase: support linkedwhenselected attribute for tabs 2014-08-06 11:46:16 +08:00
Brian Barnes 20ada5de55 MDL-46643 calendar: improved tab order of calendar detail pages 2014-08-06 15:32:02 +12:00
Eloy Lafuente (stronk7) c21c4761d1 Merge branch 'm27_MDL-46625' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-08-05 13:04:37 +02:00
Brian Barnes 9ab9793c53 MDL-46315 themes: Fixed display inconsistancy with help modals 2014-08-05 13:08:17 +12:00
Eloy Lafuente (stronk7) 4a106a5759 Merge branch 'MDL-46641_27-delete-activity-step' of https://github.com/rlorenzo/moodle into MOODLE_27_STABLE 2014-08-05 02:27:35 +02:00
Petr Skoda b5256231a6 MDL-46552 session: add support for multiple servers in memcached session driver 2014-08-05 11:40:28 +12:00
Eloy Lafuente (stronk7) b29e02d57e Merge branch 'MDL-44149-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-08-04 17:10:58 +02:00
Damyon Wiese 95bb29b902 MDL-44149 Assign: Reopen attempts from quick grading (reopenuntilpass) 2014-08-04 15:55:10 +08:00
Marina Glancy 59fe1b009f Merge branch 'MDL-44794-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-08-04 14:24:51 +08:00
Simey Lameze ab8571d19a MDL-44794 group: unit test for groups_get_user_groups method. 2014-08-04 11:35:32 +08:00
Simey Lameze 90ff64881e MDL-44794 group: unit test for get_groups method. 2014-08-04 11:35:32 +08:00
Marina Glancy 1818308bca Merge branch 'MDL-46457_27' of git://github.com/aolley/moodle into MOODLE_27_STABLE 2014-08-04 11:24:30 +08:00
Marina Glancy b47604e938 Merge branch 'MDL-46414-m27' of git://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-08-04 11:24:17 +08:00
Eloy Lafuente (stronk7) c1ee5cf31b Merge branch 'MDL-46620-27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-08-03 20:01:44 +02:00
Rex Lorenzo 18f802f85a MDL-46641 behat: Delete activity step does not work without actions menu open 2014-07-31 11:32:53 -07:00
AMOS bot ea8c5bdc74 Automatically generated installer lang files 2014-08-01 00:05:36 +08:00
Dan Poltawski 6b7a5f86a0 weekly release 2.7.1+ 2014-07-31 09:37:24 +01:00
Dan Poltawski f28ce6eb2e Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-07-31 09:37:20 +01:00
Brian Barnes 5bb55eeb21 MDL-46625 theme: Added a way to target the current page 2014-07-31 13:21:16 +12:00
Eric Merrill ddb652c706 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:04 -04:00
sam marshall 648cc055c2 MDL-46414 Conditional availability: Dropdowns not set correctly when editing in IE
In IE, you cannot set the value of a dropdown to an integer; it has to be a string.
This caused a bug in several parts of the conditional availability editing
interface.
2014-07-29 18:35:21 +01:00
Dan Poltawski 0fbda60bb3 Merge branch 'MDL-46236_27' of git://github.com/nobelium/moodle into MOODLE_27_STABLE 2014-07-29 12:04:32 +01:00
AMOS bot 486ad6e842 Automatically generated installer lang files 2014-07-29 16:02:21 +08:00
Dan Poltawski 74980995b4 Merge branch 'wip-MDL-46338-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-07-29 08:50:37 +01:00
Marina Glancy 33c3193f06 Merge branch 'm27_MDL-46325' of git://github.com/totara/moodle into MOODLE_27_STABLE 2014-07-29 11:58:55 +08:00
Sam Hemelryk 95924516fa Merge branch 'MDL-43908-MOODLE_27_STABLE' of https://github.com/lucisgit/moodle into MOODLE_27_STABLE 2014-07-29 15:51:09 +12:00
Sam Hemelryk 1663aa1fb9 Merge branch 'MDL-45041_27_STABLE' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-07-29 15:47:22 +12:00
Sam Hemelryk 970536b659 Merge branch 'MDL-46460_27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-07-29 15:44:34 +12:00
Marina Glancy b6fadf63d4 MDL-46338 enrol_self: Icon should indicate enrolment availability 2014-07-29 09:51:21 +08:00
Adam Olley f1213f3a75 MDL-46457 mod_lti: Render lti description through standard format_module_intro 2014-07-29 10:41:40 +09:30
Sam Hemelryk adac041f8c Merge branch 'MDL-45044-m27-master' of https://github.com/dthies/moodle into MOODLE_27_STABLE 2014-07-29 08:47:00 +12:00
Dan Poltawski acadd22a65 Merge branch 'MDL-46206-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-07-28 17:25:05 +01:00
Dan Poltawski acafcb18f5 Merge branch 'MDL-45594_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-07-28 12:54:17 +01:00
Dan Poltawski 71f4cb812c Merge branch 'wip-MDL-46503-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-07-28 12:49:15 +01:00
Dan Poltawski b1f78408a5 Merge branch 'm27_MDL-45715' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-07-28 12:47:32 +01:00
Dan Poltawski 1669cf37f0 Merge branch 'MDL-46459_27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2014-07-28 11:59:03 +01:00
Dan Poltawski 71e7387f43 Merge branch 'MDL-46433-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-07-28 11:49:38 +01:00
Dan Poltawski 4eb9f7dd72 Merge branch 'MDL-46504_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-07-28 10:56:43 +01:00
Nobelium 568e9560af MDL-46236 mod_scorm : Setting lauch options for scorm in popup 2014-07-28 06:41:40 +00:00
Sam Hemelryk dc7fe6acca Merge branch 'wip_MDL-46449_m27_loginblock' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-07-28 13:25:19 +12:00
Sam Hemelryk 786a6227d0 Merge branch 'MDL-43390_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-07-28 12:22:51 +12:00
Sam Hemelryk fd9ee7dd8b Merge branch 'wip-MDL-46525-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-07-28 12:13:53 +12:00
Sam Hemelryk 8ba664e245 Merge branch 'MDL-46506-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-07-28 08:46:11 +12:00
Juan Leyva b88a31a654 MDL-45041 Web Service: add_user_device doesn't store entries for different users using the same push key 2014-07-25 10:40:08 +02:00
Juan Leyva 76dc0848c1 MDL-46460 Web Services: Invalid check of grades visibility for missing grades 2014-07-25 10:20:44 +02:00
Juan Leyva c838cb15d8 MDL-46459 Web Services: Incorrect return parameters get_grades external function 2014-07-25 09:31:43 +02:00
Damyon Wiese 3b1fec6fb2 MDL-46485 Assign: Fix when submitting to a group assignment from the default group 2014-07-25 15:20:36 +08:00
Damyon Wiese 4939d0d71a MDL-46485 Assign: New unit test to show error with group submission 2014-07-25 15:20:36 +08:00
Marina Glancy d61604b455 MDL-46525 enrol_cohort: fix JS error 2014-07-25 14:45:22 +08:00
Jason Fowler ec085021f2 MDL-46206 Accessibility: Add aria role to footer image 2014-07-25 14:36:06 +08:00
Brian Barnes 4c6481694e MDL-46325 behat: Fixed issue where 'teacher1' didn't exist 2014-07-25 15:44:26 +12:00
AMOS bot fdeb6af76e Automatically generated installer lang files 2014-07-24 22:41:56 +00:00
Petr Skoda ee7af1e19d MDL-46449 fix username prompt in login block when authloginviaemail enabled 2014-07-25 10:10:54 +12:00
Tony Butler 7561f3d64a MDL-43908 mod_assign: Order submissions by course id then cm id
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-07-24 17:30:18 +01:00
Tony Butler a65c0da40d MDL-43908 mod_assign: Remove redundant code and improve SQL query
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-07-24 17:30:09 +01:00
Tony Butler 1e07291026 MDL-43908 mod_assign: Prevent notifications for unavailable assignments
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-07-24 17:29:59 +01:00
Tony Butler 1215c112c0 MDL-43908 mod_assign: Defer notifications for unavailable assignments
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-07-24 17:29:40 +01:00
Daniel Thies 0e37d94b67 MDL-45044 filter_tex: properly escape excutable pathnames for Windows 2014-07-24 11:05:00 -05:00
uhunkler 3264dcece0 MDL-46302 correct atto img float right
Correct the atto image "float right" margin CSS
2014-07-24 17:24:37 +02:00
Dan Poltawski cc1dc858c0 weekly release 2.7.1+ 2014-07-24 09:51:04 +01:00
Dan Poltawski 6ca7efb157 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-07-24 09:51:01 +01:00
Damyon Wiese 72d49e8419 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:23 +08:00
David Monllao cd2f4a87a4 MDL-46504 libraries: Fixing typo 2014-07-24 11:16:44 +08:00
Damyon Wiese b8ba7f3619 MDL-46017 Assign: Restore can't rely allocated marker fields existing in backup 2014-07-24 10:57:26 +08:00
Marina Glancy aa8ae42d24 MDL-46503 behat: cohort generator allows to create cohort in category 2014-07-24 10:04:12 +08:00
Mark Nelson 1c7509bc86 MDL-45594 core_message: added unit tests 2014-07-23 16:40:25 -07:00
Mark Nelson 7ed94cbe9c MDL-45594 core_message: ordered recent notifications by timecreated 2014-07-23 16:40:25 -07:00
Tim Hunt 7c7d086ae1 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:25 -07:00
AMOS bot 725ce55546 Automatically generated installer lang files 2014-07-23 22:46:16 +00:00
Simey Lameze 1f55a12bf8 MDL-46433 blog: fix error message when creating an external blog 2014-07-23 16:12:05 +08:00
Dan Poltawski ee0f0b3986 Revert "Merge branch 'MDL-45594_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE"
This reverts commit 0cc8a0b4b2, reversing
changes made to 6d32f6300e.
2014-07-23 09:02:02 +01:00
Dan Poltawski 92d4bcd9f7 Merge branch 'MDL-46017-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-07-23 08:24:26 +01:00
Dan Marsden e7215ce5b7 MDL-45715 assign: disable marking allocation if markingworkflow is not set. 2014-07-23 19:21:30 +12:00
Sam Hemelryk 6dc0b5482b MDL-45724 cache: fixed warning structure bug 2014-07-23 15:24:35 +12:00
AMOS bot 45d7ec6123 Automatically generated installer lang files 2014-07-22 22:49:11 +00:00
Dan Poltawski a7e348e937 Merge branch 'MDL-37509-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-07-22 15:56:58 +01:00
Dan Poltawski eba7490c31 Merge branch 'MDL-34248_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-07-22 12:01:04 +01:00
Dan Poltawski a4798ada52 Merge branch '45724-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-07-22 09:07:25 +01:00
Sam Hemelryk 0cc8a0b4b2 Merge branch 'MDL-45594_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-07-22 11:12:17 +12:00
Sam Hemelryk 6d32f6300e Merge branch 'MDL-43063-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-07-22 09:49:10 +12:00
Dan Poltawski 08348b8f86 Merge branch 'MDL-46386-27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-07-21 14:11:46 +01:00
Eric Merrill 519eec044c MDL-46386 question Whitelist the Atto editor from return blocking
Prevent the question engine from blocking return/enter key presses
from being sent to the Atto editor.
2014-07-21 09:08:52 -04:00
Dan Poltawski ab156686ff Merge branch '46335-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-07-21 09:59:06 +01:00
Dan Poltawski 1fc8ebf085 Merge branch 'MDL-46370_27' of https://github.com/moodlerooms/moodle into MOODLE_27_STABLE 2014-07-21 09:54:57 +01:00
Damyon Wiese 0086364857 MDL-46017 Assign: Fix restore of marking workflow data 2014-07-21 16:38:21 +08:00
Damyon Wiese 05cc5bf052 MDL-37509 Assign: Do not put description in calendar before it should be shown to students 2014-07-21 15:58:08 +08:00
Simey Lameze 8bd3dfd6f5 MDL-43063 core: fix phpdoc comment codechecker issue. 2014-07-21 10:14:12 +08:00
Julien Boulen 1c9e079b7c MDL-46206 Accessibility: Remove alt attribute for footer image 2014-07-21 08:21:06 +08:00
Sam Hemelryk 8b90e93c94 MDL-42909 course: fixed whitespace 2014-07-21 11:43:04 +12:00
Sam Hemelryk 94f0349745 Merge branch 'MDL-42909-27' of git://github.com/phalacee/moodle into MOODLE_27_STABLE 2014-07-21 11:35:54 +12:00
David Balch 50cc7daa0f MDL-40479 mod_assign: Fix the colour of grading success messages. 2014-07-21 11:33:04 +12:00
Brian Barnes 0a841ac85c MDL-46406 core_auth: Placed remember username before submit login form 2014-07-21 11:22:22 +12:00
Sam Hemelryk 28d6752d07 Merge branch 'mdl-46427-m27' of git://github.com/deraadt/moodle into MOODLE_27_STABLE 2014-07-21 11:12:11 +12:00
Willy Lee 1d0f235097 MDL-46159 course: Add search box to course management pages 2014-07-21 10:56:22 +12:00
Sam Hemelryk 93d7596d3f Merge branch 'MDL-45339-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-07-21 10:49:33 +12:00
Sam Hemelryk aa9f17df92 Merge branch 'm27_MDL-46363' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-07-21 10:45:43 +12:00
Sam Hemelryk d251180b31 MDL-45724 cache: added cache API warnings to the admin notifications page 2014-07-21 09:48:54 +12:00
Sam Hemelryk 67a77fa36f 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:15 +12:00
AMOS bot c3cf035fad Automatically generated installer lang files 2014-07-20 00:44:24 +00:00
AMOS bot 8a52ccea0c Automatically generated installer lang files 2014-07-19 00:41:49 +00:00
Michael de Raadt d35f49ba45 MDL-46427 Course: Correcting dimmed course link class on profile pages. 2014-07-18 15:43:05 +08:00
Jason Fowler 38748c6ada MDL-42909 Course: Fix title for move-targets 2014-07-18 14:43:10 +08:00
Mark Nelson 68fb3969e1 MDL-34248 core_backup: used API instead of inserting into the log table directly 2014-07-17 18:12:01 -07:00
Mark Nelson 527afcfb8c MDL-34248 core_backup: added missing end quotation 2014-07-17 18:12:00 -07:00
Jim Thorpe c62f8bc71f enrol_imsenterprise: MDL-46363 including course lib when create_course is
used
2014-07-18 11:27:15 +12:00
Sam Hemelryk d3c034f8e8 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:53 +12:00
John Okely 5f399d0c52 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:14 +08:00
Dan Poltawski a9e0505fde weekly release 2.7.1+ 2014-07-17 09:22:55 +01:00
Dan Poltawski 96d73266ef Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-07-17 09:22:51 +01:00
AMOS bot 66a0fea650 Automatically generated installer lang files 2014-07-17 00:52:51 +00:00
AMOS bot a4bba406ad Automatically generated installer lang files 2014-07-17 00:52:51 +00:00
Mark Nelson 20914ba26a MDL-45594 core_message: added unit tests 2014-07-16 17:06:39 -07:00
Mark Nelson 8b5520877b MDL-45594 core_message: ordered recent notifications by timecreated 2014-07-16 17:06:39 -07:00
Tim Hunt 7cacba3db3 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:39 -07:00
Sam Chaffee f4c37747dc MDL-46370 Ajax and Javascript - Fixes docked blocks not expanding when using dock on right 2014-07-16 12:04:50 -06:00
Dan Poltawski 3e65f72a40 Revert "MDL-46226 core: pix_icon no longer sets title to the alt text"
This reverts commit 956ec418c6.
2014-07-16 13:45:35 +01:00
Dan Poltawski d613a0db57 Revert "MDL-46226 fix unit tests"
This reverts commit d927f222a9.
2014-07-16 13:45:32 +01:00
Rajesh Taneja 26f004f29b MDL-30431 behat: Fixed wiki behat 2014-07-16 09:18:51 +02:00
Eloy Lafuente (stronk7) 0ed87e5063 MDL-30431 mod_wiki: whitespace fix 2014-07-16 01:19:36 +02:00
Eloy Lafuente (stronk7) 87cc899c44 Merge branch 'MDL-30431_wiki_comments_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-07-16 01:16:19 +02:00
AMOS bot e1661a6346 Automatically generated installer lang files 2014-07-15 00:46:33 +00:00
Eloy Lafuente (stronk7) 3ba2b5c925 Merge branch 'MDL-46080_27' of https://github.com/jonof/moodle into MOODLE_27_STABLE 2014-07-14 23:30:25 +02:00
Sam Hemelryk 7c5d28c26c Merge branch 'MDL-42179-003-27' of https://github.com/dbezborodovrp/moodle into MOODLE_27_STABLE 2014-07-15 08:41:31 +12:00
Eloy Lafuente (stronk7) 67711964d1 Merge branch 'm27_MDL-31366' of git://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-07-14 18:17:44 +02:00
Dan Poltawski bf394372d8 Merge branch 'MDL-42752-27' of git://github.com/phalacee/moodle into MOODLE_27_STABLE 2014-07-14 16:09:29 +01:00
Dan Poltawski d927f222a9 MDL-46226 fix unit tests 2014-07-14 15:49:20 +01:00
Dan Poltawski bbcbbcd130 Merge branch 'MDL-46218_disabled2_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-07-14 15:33:13 +01:00
Eloy Lafuente (stronk7) cc0b20ba9d Merge branch 'm27_MDL-46197' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-07-14 16:25:21 +02:00
Dan Poltawski 8f15eebc22 Merge branch 'm27_MDL-46226' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-07-14 15:13:45 +01:00
Damien Bezborodov d8b6437fa9 MDL-42179 mod_assign: Time remaining issue for group assignment 2014-07-14 13:52:41 +09:30
David Monllao e257ad8372 MDL-43390 files: Only lock when locking is not prevented 2014-07-14 12:13:41 +08:00
Sam Hemelryk ba03dc18ad Merge branch 'MDL-42214_popup_blocked_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-07-14 15:27:46 +12:00
Sam Hemelryk 7c15d3b34c Merge branch 'MDL-46073_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-07-14 15:15:57 +12:00
Andrew Davis 1c76803ec1 MDL-42214 core_message:prevented popup notifications of messages from blocked users 2014-07-14 10:11:14 +08:00
Andrew Davis 5660ceba8d MDL-30431 mod_wiki: clarified the logic around editing and deleting wiki comments and added behat tests 2014-07-14 08:16:39 +08:00
Sam Hemelryk ae59c35eb9 Merge branch 'MDL-45765-moodle27' of https://github.com/StudiUM/moodle into MOODLE_27_STABLE 2014-07-14 12:09:50 +12:00
Sam Hemelryk 3c129829ce MDL-46138 post integratino phpdoc fixes 2014-07-14 10:50:42 +12:00
Sam Hemelryk 050720be90 Merge branch 'MDL-46138-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-07-14 10:40:37 +12:00
Sam Hemelryk 7573d5ff21 Merge branch 'wip-MDL-46280-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-07-14 10:32:42 +12:00
Gilles-Philippe Leblanc b3656b26be MDL-22469 auth_cas: CAS module : parameter authCAS=NOCAS not properly handled 2014-07-14 10:21:48 +12:00
Sam Hemelryk 804c22b8f1 Merge branch 'MDL-31089_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-07-14 09:51:39 +12:00
Sam Hemelryk 8716b6c89f Merge branch 'MDL-45562-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-07-14 08:41:38 +12:00
Eloy Lafuente (stronk7) 8b3d19c2f5 Moodle release 2.7.1 2014-07-12 19:10:44 +02:00
David Monllao cf9ed67a4e MDL-31089 mod_forum: Filtering non-visible groups 2014-07-11 16:49:39 +08:00
Simey Lameze 417b6921d5 MDL-45562 blog: fixed issues when creating/editing an external blog. 2014-07-11 15:16:28 +08:00
Damyon Wiese f72a23d69b MDL-46138 tasks: The adhoc task is being too helpful with json_encoding/decoding. 2014-07-11 09:45:27 +08:00
Dan Marsden ca602b6beb MDL-31366 Feedback: decode htmlchars on output to excel 2014-07-11 13:28:59 +12:00
Brian Barnes 2b8647034a MDL-46197 core_calendar: Added label text to durations in minutes field 2014-07-11 09:09:10 +12:00
Brian Barnes 956ec418c6 MDL-46226 core: pix_icon no longer sets title to the alt text 2014-07-11 08:39:45 +12:00
Jean-Philippe Gaudreau 31d453f735 MDL-45765 Calendar import: Fix undefined variable in cron when updating calendar subscriptions 2014-07-10 16:09:04 -04:00
Eloy Lafuente (stronk7) b4d0a4479c weekly release 2.7+ 2014-07-10 19:15:41 +02:00
Eloy Lafuente (stronk7) 3e07b8a2f3 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-07-10 19:15:37 +02:00
Ankit Agarwal 383776876b 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:55:03 +08:00
Andrew Nicols 91c8d4da71 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:52:57 +08:00
Damyon Wiese 1721c8eb85 MDL-46148 questions: Added missing allow_commit for transaction 2014-07-10 11:36:57 +08:00
Andrew Davis ad3d9452bf MDL-46218 reshuffled access checks in blog and notes 2014-07-10 11:25:15 +08:00
Damyon Wiese c5f351435e Merge branch 'MDL-19270_moodle27stable' of https://github.com/nadavkav/moodle into MOODLE_27_STABLE
Conflicts:
	lib/graphlib.php
2014-07-10 09:58:44 +08:00
AMOS bot 03b06dedbc Automatically generated installer lang files 2014-07-10 00:47:09 +00:00
Tim Hunt da80885cc6 MDL-46148 qtype_calculatedsimple: fix notice
... when adding a dataset with a formula error.
2014-07-09 14:11:39 +01:00
Tim Hunt 94ac7a87fa 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:38 +01:00
Tim Hunt 10b02d6d41 MDL-46148 qtype_calculated: removed unused method. 2014-07-09 14:11:38 +01:00
Nadav Kavalerchik ebb6f3e80b MDL-19270 - Quiz graph - Fix reverse display of Hebrew legend text in RTL mode 2014-07-09 16:07:56 +03:00
David Mudrák 7f4db6f4d9 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:43:40 +08:00
David Mudrák 4fc5861cba MDL-46223 Improve the display of marking guide validation message 2014-07-09 16:43:37 +08:00
Dan Poltawski 40b205197c MDL-46227 fix typo 2014-07-09 08:23:14 +01:00
Dan Poltawski cb914a71aa 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:35 +02:00
Eloy Lafuente (stronk7) 85f376892d Merge branch 'MDL-43849_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-07-08 20:29:04 +02:00
Dan Poltawski e0708141f8 Merge branch 'MDL-45599-27-addons' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-07-08 15:31:53 +01:00
Dan Poltawski 76b012d611 Merge branch 'MDL-44492_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-07-08 14:18:01 +01:00
Frederic Massart 53ca351f7a MDL-45471 javascript: Escape content of exception dialogs 2014-07-08 14:13:33 +01:00
Tim Hunt ea9f3057da 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 13:33:41 +01:00
Tim Hunt f1406d3b39 MDL-44492 quiz reports: revert some style overrides.
But add one more. This makes Clean theme look a lot better.
2014-07-08 13:33:38 +01:00
Tim Hunt 91251e4889 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 13:33:36 +01:00
Tim Hunt 8994593332 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 13:33:33 +01:00
Dan Poltawski 67b3704318 Merge branch 'MDL-45381_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-07-08 11:29:03 +01:00
Dan Poltawski 37e7d91b8c Merge branch 'MDL-45596-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-07-08 10:50:55 +01:00
Marina Glancy 3fe64cbd7d MDL-43948 forms: setting types to filemanager and editor elements 2014-07-08 10:47:35 +01:00
Dan Poltawski 22051a4e34 Merge branch 'MDL-46231-27-en_fix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-07-08 08:32:35 +01:00
Helen Foster e7cd680765 MDL-45599 Fix tiny grammatical errors in the plugin installer 2014-07-08 09:02:06 +02:00
Marina Glancy 84d2c6f761 Merge branch 'MDL-46229_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-07-08 13:51:40 +08:00
Skylar Kelty f97581eda7 MDL-46227 Fix XSS in scheduled tasks 2014-07-08 13:38:01 +08:00
David Mudrák 2c0b608cda MDL-46223 Improve the marking guide output 2014-07-08 13:18:59 +08:00
David Mudrák eb1381de1d MDL-46223 Improve the rubric output 2014-07-08 13:18:58 +08:00
Marina Glancy c7bfbb01c6 MDL-46280 filter_activitynames: sort activities by length in reverse order 2014-07-08 10:55:25 +08:00
Sam Hemelryk 4eacb77012 Merge branch 'MDL-46016_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-07-08 14:28:02 +12:00
Sam Hemelryk 93835758f3 MDL-19270 core_text: added unit tests for strrev 2014-07-08 14:15:02 +12:00
Sam Hemelryk a238e7ed72 Merge branch 'MDL-19270_moodle27stable' of https://github.com/nadavkav/moodle into MOODLE_27_STABLE 2014-07-08 13:53:52 +12:00
Sam Hemelryk 98ac33bcb0 Merge branch 'MDL-46200-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-07-08 13:38:08 +12:00
Sam Hemelryk 0caa8c60d2 Merge branch 'mdl45982-moodle27' of https://github.com/tlock/moodle into MOODLE_27_STABLE 2014-07-08 13:26:58 +12:00
Sam Hemelryk 2dbdaedc3e Merge branch 'm27_MDL-46144' of https://github.com/totara/moodle into MOODLE_27_STABLE 2014-07-08 13:10:36 +12:00
Eloy Lafuente (stronk7) 30a264540b Merge branch '46208-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-07-08 02:13:44 +02:00
Sam Hemelryk 6d05bee940 Merge branch 'MDL-46212_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-07-08 10:45:01 +12:00
Sam Hemelryk 2535dfaf64 Merge branch 'MDL-46240-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-07-08 10:34:30 +12:00
Eloy Lafuente (stronk7) 35186e3725 Merge branch 'wip_MDL-45945_m27_mssqlcol' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-07-08 00:32:09 +02:00
Sam Hemelryk bfe4417cb7 MDL-45678 cache: renamed new cache and better comments 2014-07-08 09:52:53 +12:00
Sam Hemelryk 6b6affec1f Merge branch 'MDL-45678-006-27' of https://github.com/dbezborodovrp/moodle into MOODLE_27_STABLE 2014-07-08 09:42:51 +12:00
Sam Hemelryk 9e13649c89 Merge branch 'wip_MDL-46126_m27_passnulls' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-07-08 09:37:20 +12:00
Yuliya Bozhko 1465b22f7d 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:36:21 +12:00
Sam Hemelryk f549deed15 Merge branch 'MDL-43347-27' of https://github.com/mackensen/moodle into MOODLE_27_STABLE 2014-07-08 09:28:31 +12:00
Adrian Greeve ab59b7db71 MDL-46201 events: Sanitization of username before returning the description. 2014-07-07 18:19:11 +01:00
Yuliya Bozhko 200a2b7fad MDL-46042 badges: Clean up external badge data
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-07-07 16:37:44 +01:00
Dan Poltawski 9945bcec41 Merge branch 'MDL-42393-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-07-07 16:27:32 +01:00
Dan Poltawski b4ac5653ed Merge branch 'MDL-41389_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-07-07 16:10:26 +01:00
Osanda Malith Jayathissa 0207466e77 MDL-45683 user: Escaping Skype ID used in profile 2014-07-07 16:05:10 +01:00
Marina Glancy 2ca9e09dab MDL-45760 make sure to check permission before setting header 2014-07-07 15:06:40 +01:00
Tim Hunt 6eaf5ec8e3 MDL-46148 qtype_calculated: fix formula validation. 2014-07-07 14:34:02 +01:00
Frederic Massart 1d110af2d6 MDL-45417 mod_imscp: Prevent entity injections from package content 2014-07-07 13:03:05 +01:00
Frederic Massart 2d121036cc MDL-45463 mod_lti: Prevent XML entity injections from provider 2014-07-07 13:00:39 +01:00
Marina Glancy 61961447c2 MDL-45616 repositories: use json encoding instead of serialization 2014-07-07 15:17:42 +08:00
Marina Glancy 867f40990b 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:17:42 +08:00
Jason Fowler da6ce47102 MDL-42752 File-picker: Fix tabbing to disabled icons 2014-07-07 14:30:17 +08:00
Dan Poltawski 78ba7d9e6b 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:46:35 +08:00
Nadav Kavalerchik 63010978b4 MDL-19270 - Quiz graph - Fix reverse display of Hebrew legend text in RTL mode 2014-07-06 19:00:23 +03:00
Helen Foster c5e9bc48f0 MDL-46231 Merge English strings from the en_fix language pack 2014-07-04 22:37:30 +02:00
Dan Poltawski cd90445d4a MDL-46200 fix missing space in failed login message 2014-07-04 14:55:43 +01:00
Dan Poltawski 0052796dbb MDL-46240 atto_collapse: fix icon url 2014-07-04 14:35:16 +01:00
David Mudrák b522356839 MDL-45599 Stop using the 'add-on' term
We now call them all as just 'plugins' for consistency. There where we need to
explicitly distinguish the source of the plugin, we say they are 'additional
plugins' on contrary to 'standards plugins' coming with the core.
2014-07-04 11:34:34 +02:00
David Mudrák 1d45b926f3 MDL-45599 Remove string editingnoncorelangfile from core_admin
This string mentions 'add-on' and has been greylisted in AMOS since 2.0. The
usage of it was removed in 00b41d.
2014-07-04 10:36:53 +02:00
Damien Bezborodov 0ba5f02b15 MDL-45678 assignsubmission_comments: Improve performance for permissions checking 2014-07-04 14:25:06 +09:30
Petr Skoda a31fdfb145 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:40 +12:00
Frederic Massart d019ffd21f MDL-45596 roles: Escape filter value before using it in form field 2014-07-04 11:49:42 +08:00
Mark Nelson a93f8344ae MDL-41389 auth_db: added unit tests for events 2014-07-03 20:16:56 -07:00
Petr Skoda 2d7617aa18 MDL-45945 mssql: force default database collation in all tables including temp table 2014-07-04 15:05:24 +12:00
AMOS bot 84acc68175 Automatically generated installer lang files 2014-07-04 00:44:19 +00:00
Mark Nelson 38d8b7b703 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:15:57 -07:00
Mark Nelson 69ddeb42e2 MDL-41389 auth_db: added user_updated/created event triggers 2014-07-03 14:28:44 -07:00
Sam Hemelryk 2bd9cd1077 MDL-46208 cachestore_mongo: fixed invalid collection name use 2014-07-04 08:11:24 +12:00
Tim Hunt 35588aa876 MDL-46212 question editing: extra answer fields notice.
It turns out that PHP does not interpret "$field[$key]" the way we were
expecting.
2014-07-03 13:40:38 +01:00
Dan Poltawski fc415ee908 weekly release 2.7+ 2014-07-03 10:53:27 +01:00
Dan Poltawski 10b4bda916 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-07-03 10:53:24 +01:00
Marina Glancy 3708e1bb7c MDL-46163 question/quiz: fix elements ids and their labels 2014-07-03 10:13:23 +01:00
David Monllao e7e79055e1 MDL-43849 enrol_meta: Renaming methods according to what they test 2014-07-03 14:51:00 +08:00
David Monllao 3d4cf404df MDL-43849 mod_forum: Adding tests for observers 2014-07-03 14:50:52 +08:00
Frederic Massart 31c0efeac7 MDL-42393 calendar: Preventing open/close loop in events overlay 2014-07-03 10:17:41 +08:00
Yuliya Bozhko 3571cd46d2 MDL-46229 badges: Fix missing additional names fields
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2014-07-03 09:33:27 +12:00
Tim Hunt fa6db7b8c1 MDL-46163 quiz/questions: fix missing hidden fields.
I have done this by eliminating the duplication between the base class
and the subclass.

This was a regression introdcued by MDL-40313.
2014-07-02 15:04:56 +01:00
AMOS bot 947a90339a Automatically generated installer lang files 2014-07-02 00:44:40 +00:00
Eloy Lafuente (stronk7) dc30afaafc Merge branch 'wip-mdl-45889-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-07-02 00:36:26 +02:00
Eloy Lafuente (stronk7) 03a5278a38 Merge branch '45209-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-07-01 23:49:46 +02:00
Sam Hemelryk d683942c6a Merge branch 'wip-MDL-46147-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-07-02 09:31:25 +12:00
Mary Evans 24c0432bbc MDL-45507 theme_bootstrapbase: Fix regression for theme based custom menu
in renderers/core_renderer.php.
2014-07-02 09:22:43 +12:00
Eloy Lafuente (stronk7) c16de45a14 MDL-45961 user profile: track user on reset
It seems that redirect (after reset button) was also
missing the userid so the user track was lost.
2014-07-01 19:22:14 +02:00
Eloy Lafuente (stronk7) 9d19781014 Merge branch 'MDL-45961_MOODLE_27_STABLE' of https://github.com/NeillM/moodle into MOODLE_27_STABLE 2014-07-01 19:22:05 +02:00
Dan Poltawski ab6ae906cd Merge branch 'MDL-46063_27' of git://github.com/schach/moodle into MOODLE_27_STABLE 2014-07-01 17:29:16 +01:00
Dan Poltawski f45b59d427 Merge branch 'MDL-46036_survey_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-07-01 16:34:29 +01:00
Charles Fulton 3add7d878f MDL-43347 grades: convert keep highest to text field 2014-07-01 07:34:23 -07:00
Charles Fulton c9bd902bd3 MDL-43347 grades: consistent interface for drop lowest setting 2014-07-01 07:34:11 -07:00
Dan Poltawski 366124d222 Merge branch 'MDL-46107_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2014-07-01 14:20:53 +01:00
Dan Poltawski 89203e11a7 Merge branch 'MDL-4013-stable27' of https://github.com/MorrisR2/moodle into MOODLE_27_STABLE 2014-07-01 14:16:22 +01:00
Dan Poltawski dd83fbfbbc Merge branch 'wip_MDL-46099_m27_userglobal' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2014-07-01 10:39:15 +01:00
Marina Glancy 1fb374121a MDL-46147 modinfo: performance improvement for course page (check filterall) 2014-07-01 15:30:28 +08:00
Damyon Wiese f3163a2002 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:30:22 +08:00
Mark Nelson 65764352dd MDL-45381 mod_forum: updated unit tests for subscription created/deleted events 2014-06-30 23:35:37 -07:00
Mark Nelson 2c7b800f2f MDL-45381 mod_forum: changed event URL for subscription created/deleted events 2014-06-30 23:35:36 -07:00
Brian Barnes ed7d676329 MDL-46144 core_calendar:Fixed label linking in calendar 2014-07-01 13:44:56 +12:00
Sam Hemelryk b23bc0a148 Merge branch 'MDL-40805-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-07-01 09:06:20 +12:00
Petr Skoda df9a669791 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:10 +12:00
Sam Hemelryk b1ab535efa Merge branch 'MDL-46118_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-07-01 08:33:16 +12:00
Dan Poltawski 1e9dce0df4 Merge branch 'wip-mdl-45641-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-06-30 15:26:34 +01:00
Dan Poltawski 8dd0756226 Merge branch 'MDL-42467_database_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-06-30 15:09:53 +01:00
Dan Poltawski 8458e3d2c2 Merge branch 'MDL-45833_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-06-30 13:27:16 +01:00
Dan Poltawski 951a64f6ef Merge branch 'MDL-46044-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-06-30 11:45:29 +01:00
Heiko Schach b336cf98b4 MDL-46063 feedback: Fix user pictures 2014-06-30 13:27:39 +03:00
Dan Poltawski b6ac868d71 Merge branch 'MDL-40228-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-30 08:55:39 +01:00
AMOS bot 57ce05c631 Automatically generated installer lang files 2014-06-29 00:42:51 +00:00
Ray Morris f0538cee92 MDL-4013 Question bank: Category selector renders as nested form (invalid html) 2014-06-27 10:00:11 -05:00
NeillM f4f4965a1c MDL-45961 Customise this page button on user profile page only works correctly for users own profile 2014-06-27 09:05:49 +01:00
Rajesh Taneja 93a593daab MDL-45641 event: Ldap user_signup unit test added 2014-06-27 15:43:49 +08:00
Rajesh Taneja c8c1a2cb10 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 15:43:49 +08:00
Rajesh Taneja 793ab11d95 MDL-45641 event: Removed multiple user_updated event trigger
user_updated event was being triggred while
setting password, which is not correct. It now
trigger user_password_updated event. Few more
modifications done:
1. Correct event is being triggred.
2. Event is only triggred when password is chnaged.
3. Password is updated via single api.
4. Updated unit test
2014-06-27 15:43:49 +08:00
Rajesh Taneja 47221d5fdd 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 15:43:49 +08:00
Damyon Wiese 1affa3ea22 MDL-46044 Assign: Add conditions to the inner query for performance 2014-06-27 15:01:17 +08:00
Damyon Wiese 70971d43eb 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:17 +08:00
Damyon Wiese 99e0bb23bf MDL-46044 Assign: Move common setup to setUp method (share it for all of lib_test.php) 2014-06-27 14:18:10 +08:00
Damyon Wiese d95453d903 MDL-46044 Assign: Fix print_overview function when there are multiple attempts 2014-06-27 14:17:53 +08:00
Damyon Wiese 53fb01aef0 MDL-46044 Assign: Update unit test to test multiple attempts on overview page 2014-06-27 14:17:44 +08:00
David Monllao cfd5ba4101 MDL-46118 report_log: No results limit when downloading 2014-06-27 11:35:06 +08:00
David Monllao 5eb386fd09 MDL-45833 event: Removing courseid as the context is higher than course context 2014-06-27 11:25:07 +08:00
Yuliya Bozhko 594848bb15 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:48:01 +12:00
Sam Hemelryk 64fea720ce MDL-45209 course: fixed navbar when creating,editing courses 2014-06-27 09:39:45 +12:00
Eloy Lafuente (stronk7) 83d08fcc21 weekly release 2.7+ 2014-06-26 10:35:58 +02:00
Eloy Lafuente (stronk7) 01e7204646 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-06-26 10:35:54 +02:00
Eloy Lafuente (stronk7) 3152864fd5 Revert " MDL-45044 filter_tex: properly escape excutable pathnames for Windows"
This reverts commit 7eac026a02.
2014-06-26 10:05:49 +02:00
Rajesh Taneja 2997bd6dce MDL-45889 behat: Allow admin config to set by shortname 2014-06-26 13:18:32 +08:00
Andrew Davis 083d5a6f0c MDL-46036 mod_survey: added logic to prevent user trying to download when there are no results 2014-06-26 11:18:29 +08:00
Rajesh Taneja c1ee80fef5 MDL-46061 behat: Fixed blur event problem for atto_image
atto_image look for blur event after changing width/height
Added a new step to get focus off the element, so this can
work.
2014-06-26 10:29:35 +08:00
Andrew Davis 0a9815d14e MDL-42467 mod_data: added code to delete cached RSS feeds when database or glossary entries are deleted 2014-06-26 09:30:18 +08:00
Damyon Wiese 3ac5a3544c MDL-45983 Atto equation editor: Exclude phantomjs from this behat test because it's buggy 2014-06-25 15:05:01 +08:00
Jonathon Fowler b7cb9c60c1 MDL-46080 assign: fix offline grading worksheet marker column 2014-06-25 12:23:34 +10:00
AMOS bot 6f5ca6613f Automatically generated installer lang files 2014-06-25 00:45:27 +00:00
AMOS bot a16755314a Automatically generated installer lang files 2014-06-25 00:45:27 +00:00
Eloy Lafuente (stronk7) a4919abf4f Merge branch 'MDL-46079-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-06-25 01:33:37 +02:00
Eloy Lafuente (stronk7) 022a58af8d Merge branch 'MDL-45445_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-25 00:47:43 +02:00
Eloy Lafuente (stronk7) 6480ec0c48 Merge branch 'MDL-41258-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-06-24 20:10:48 +02:00
Damyon Wiese 1e4e4a05d7 Merge branch 'MDL-45652_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-24 16:59:42 +08:00
Damyon Wiese 9dc9608795 Merge branch 'MDL-10115-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-06-24 16:03:53 +08:00
John Okely e08d290469 MDL-10115 User profile: Use title to aid in the ellipsis link being understood by screen readers 2014-06-24 15:38:58 +08:00
Marina Glancy 80bb90c3ca Merge branch 'MDL-45933-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-06-24 13:52:42 +08:00
Marina Glancy a3ddcab336 Merge branch 'MDL-45983-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-06-24 13:52:14 +08:00
Marina Glancy a839769c23 Merge branch 'MDL-46061-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-24 13:32:25 +08:00
Marina Glancy 1eb503b379 Merge branch 'MDL-45044-m27-master' of git://github.com/dthies/moodle into MOODLE_27_STABLE 2014-06-24 13:29:06 +08:00
Damyon Wiese cc5f8bd53f Merge branch 'wip-MDL-46038-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-06-24 13:10:52 +08:00
Damyon Wiese bb512f7c1f Merge branch 'MDL-46035_survey_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2014-06-24 13:08:17 +08:00
Damyon Wiese 5b5a73019d Merge branch 'MDL-46046-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-24 11:48:02 +08:00
Damyon Wiese ce0b9bb7ca Merge branch 'MDL-46056-27' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-06-24 11:35:21 +08:00
Damyon Wiese 38063e7d1b Merge branch 'MDL-44512-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-06-24 10:58:17 +08:00
Damyon Wiese ee5b9e137d Merge branch 'MDL-44773-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-24 10:19:16 +08:00
Eloy Lafuente (stronk7) 55103810f0 Merge branch 'MDL-45721_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-24 01:00:10 +02:00
Eloy Lafuente (stronk7) e5b111f26b Merge branch 'MDL-39883-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-06-24 00:48:56 +02:00
Eloy Lafuente (stronk7) 7c2e2133cc Merge branch 'MDL-45764_generalTool_27' of https://github.com/moodlerooms/moodle into MOODLE_27_STABLE 2014-06-24 00:03:34 +02:00
Damyon Wiese 3352ffcfa2 Merge branch 'MDL-45580-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-23 15:20:14 +08:00
Simey Lameze 8e74bfa8e8 MDL-40805 auth_cas : Trigger user_loggedout event before CAS logout. 2014-06-23 15:19:07 +08:00
Frederic Massart 9f630b6cc4 MDL-45580 assignfeedback_editpdf: Save readonly version in backup 2014-06-23 14:56:08 +08:00
Frederic Massart c2779c9f29 MDL-45580 assignfeedback_editpdf: Delete draft content on new submission 2014-06-23 14:56:08 +08:00
Frederic Massart 7fecbba80b MDL-45580 assignfeedback_editpdf: Store a readonly version of the PDF 2014-06-23 14:56:08 +08:00
Damyon Wiese 80b81e5094 Merge branch '37145-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-06-23 14:39:56 +08:00
Damyon Wiese 6e977fcdd6 Merge branch 'MDL-38693-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-06-23 14:15:36 +08:00
Damyon Wiese 9c8c5f2d01 MDL-41746 External api: Allow multiple calls to validate_context at different levels
(Only from webservices)
2014-06-23 13:39:21 +08:00
Damyon Wiese 9134f3f0df Merge branch 'MDL-35453_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-06-23 12:30:41 +08:00
Damyon Wiese b093752289 Merge branch 'MDL-46086_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-06-23 12:26:31 +08:00
Mark Nielsen bd87c3e225 MDL-46013 theme: Uninstall theme unconditionally unsets configs 2014-06-23 11:34:59 +08:00
Marina Glancy 7bea1ea240 Merge branch 'MDL-44124-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-06-23 11:34:10 +08:00
Sam Hemelryk afd6e7d542 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:01:51 +12:00
AMOS bot e29eef4bde Automatically generated installer lang files 2014-06-21 00:43:37 +00:00
Tim Hunt 63dd180030 MDL-46086 quiz: fix unit test on Oracle 2014-06-20 22:29:28 +01:00
Tim Hunt 8eacbd5a32 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:55:35 +01:00
sam marshall 680ff52414 MDL-46079 Restore: Can run out of memory in get_records call 2014-06-20 14:14:53 +01:00
Frederic Massart 884e310a3b MDL-40228 backup: Settings were ignored during automated backups 2014-06-20 15:38:29 +08:00
Daniel Thies 7eac026a02 MDL-45044 filter_tex: properly escape excutable pathnames for Windows 2014-06-19 21:34:10 -05:00
Andrew Davis deaddfb6b8 MDL-46035 mod_survey: a string change to make an error message always correct 2014-06-20 09:17:47 +08:00
Frederic Massart 85b40b18d5 MDL-46061 atto_image: Improved tests to cover sizing feature 2014-06-19 16:00:47 +08:00
Frederic Massart 3b6987cea3 MDL-46061 atto_image: Prevent error when image does not have a size 2014-06-19 16:00:47 +08:00
Jetha Chan 14ff3d59b3 MDL-44512 themes: fix for custom menu submenu arrows on RTL languages 2014-06-19 15:16:52 +08:00
Damyon Wiese dd02a787d8 weekly release 2.7+ 2014-06-19 14:13:25 +08:00
Damyon Wiese cefe7c7f59 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-06-19 14:13:20 +08:00
Frederic Massart d9fc73dc7a MDL-44773 atto_accessibilitychecker: Improved image test coverage 2014-06-19 13:38:36 +08:00
Frederic Massart 3bc1e345ca MDL-44773 atto_accessibilitychecker: Set focus on clicked warnings 2014-06-19 13:38:35 +08:00
AMOS bot 5d3fe21ab2 Automatically generated installer lang files 2014-06-19 00:42:51 +00:00
David Mudrák 17db3e8af1 MDL-46056 Remove invalid string definition from the workshop module
The correct version of the string is defined above.
2014-06-19 00:33:24 +02:00
Frederic Massart a0da864ac2 MDL-46046 atto_accessibilityhelper: Remove dead code from the plugin 2014-06-18 16:52:48 +08:00
Ankit Agarwal 0978aab839 MDL-39883 events: Trigger a module created event when duplicating a module 2014-06-18 16:02:23 +08:00
Ankit Agarwal 7d947ad66c MDL-39883 events: Create a new api create_from_cm for module create event 2014-06-18 15:46:26 +08:00
Damyon Wiese 5e63c8e57e MDL-45933 Assign: Prevent fatal error when there are no users in the grading table 2014-06-18 15:17:36 +08:00
Ankit Agarwal 34bcea8159 MDL-44124 libraries: Allow rrules with only one part during rrule validation checks 2014-06-18 14:14:49 +08:00
Marina Glancy 2a56e3c8b9 MDL-46038 repositories: added forgotten global 2014-06-18 13:39:43 +08:00
Mark Nelson 1fb1c6d456 MDL-45652 core_backup: display warning on restore destination form when necessary data is missing 2014-06-17 21:56:21 -07:00
Mark Nelson 469e7dd82d MDL-45721 core_backup: only trigger the course_restored event when restoring a course 2014-06-17 19:38:30 -07:00
AMOS bot 1461f9d664 Automatically generated installer lang files 2014-06-18 00:42:28 +00:00
Eloy Lafuente (stronk7) 8791525d88 Merge branch 'MDL-45978_27' of git://github.com/grabs/moodle into MOODLE_27_STABLE 2014-06-17 11:54:50 +02:00
Andrew Nicols a0f39f2b57 MDL-41258 Forum: Add additional unit tests for forum digest settings 2014-06-17 16:07:59 +08:00
Damyon Wiese 6fc2264a8a MDL-45983 Atto equation editor: Various bugs when editing an existing equation
(And a behat test for it).
2014-06-17 15:21:20 +08:00
Andreas Grabs 8893b111c2 MDL-45978 logging - added missing parameter id 2014-06-17 07:05:58 +02:00
Damyon Wiese 3362673173 MDL-45582 Editpdf: Prevent debugging when there is no pdf 2014-06-17 10:19:55 +08:00
Damyon Wiese 49703ecf1d Merge branch 'm27_MDL-45582' of git://github.com/greg-or/moodle-mod_assign into MOODLE_27_STABLE
Conflicts:
	mod/assign/feedback/editpdf/locallib.php
2014-06-17 10:17:55 +08:00
Eloy Lafuente (stronk7) d56f3531b4 Merge branch 'MDL-45970_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-06-17 01:15:47 +02:00
Eloy Lafuente (stronk7) 902a36137a Merge branch 'MDL-45611-27' of git://github.com/phalacee/moodle into MOODLE_27_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-06-17 01:12:02 +02:00
Eloy Lafuente (stronk7) 19e4d5ada8 Merge branch 'wip-mdl-45719-m27' of https://github.com/deraadt/moodle into MOODLE_27_STABLE 2014-06-17 01:03:58 +02:00
Eloy Lafuente (stronk7) d81917322f Merge branch 'MDL-45870-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-17 00:51:33 +02:00
Marina Glancy b657f6db05 Merge branch 'MDL-45940-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-06-16 17:28:30 +08:00
Marina Glancy abd980d36d Merge branch 'MDL-45901_Quiz_MOODLE-27-STABLE' of git://github.com/nadavkav/moodle into MOODLE_27_STABLE 2014-06-16 17:27:40 +08:00
Rajneel Totaram 7b27045680 MDL-45967 admin lang: Fix typo 2014-06-16 17:26:50 +08:00
Marina Glancy e4a56bd9dd Merge branch 'MDL-43274-27' of git://github.com/xow/moodle into MOODLE_27_STABLE 2014-06-16 17:24:10 +08:00
Jonathon Fowler 5807b224d9 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.
2014-06-16 16:43:54 +08:00
Gregory Faller 8b1596c257 MDL-45582: Apply grades and feedback to entire group does not work with Annotate PDF feature 2014-06-16 18:06:09 +09:30
John Okely 2649eefe1c MDL-43274 Course: Remove message about course logs from upgrade.txt 2014-06-16 16:23:51 +08:00
Damyon Wiese b3bb3a4422 MDL-45940 Assign: Improved access check
Call can_edit() instead of repeating a (slightly wrong) access check.
2014-06-16 16:20:34 +08:00
Damyon Wiese 6e10f195c5 Merge branch 'm27_MDL-45582' of git://github.com/greg-or/moodle-mod_assign into MOODLE_27_STABLE 2014-06-16 14:29:51 +08:00
Daniel Neis ab7c329acf MDL-35648 adding missing distinct selector in sql on participation report 2014-06-16 14:22:46 +08:00
Marina Glancy 95d39aabc7 Merge branch 'MDL-45935-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-06-16 14:22:42 +08:00
John Okely 6e515be94f MDL-10115 User profile: Use moodle_url and html_writer::link for course links on user profiles 2014-06-16 14:08:44 +08:00
Damyon Wiese b3b4f9a4a4 Merge branch 'MDL-31998_27' of git://github.com/grabs/moodle into MOODLE_27_STABLE 2014-06-16 12:07:40 +08:00
Gregory Faller c71d8267ed MDL-45582: Apply grades and feedback to entire group does not work with Annotate PDF feature 2014-06-16 12:44:23 +09:30
Damyon Wiese 1742e76777 Merge branch 'wip-mdl-46001-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-06-16 11:13:45 +08:00
Rajesh Taneja 2797fcc75e MDL-46001 atto_clear: modfied behat test to work on xvfb 2014-06-16 11:10:29 +08:00
Damyon Wiese 2538e2dab1 Merge branch 'MDL-45803_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-16 11:01:04 +08:00
John Okely 6bf5eeed56 MDL-43274 Course: Remove ability to delete logs on a course during reset 2014-06-16 09:54:20 +08:00
AMOS bot c14d87daaa Automatically generated installer lang files 2014-06-15 00:42:44 +00:00
Nadav Kavalerchik cb201e866b MDL-45901 - Quiz - Random question category question are not visible, in RTL mode 2014-06-14 00:42:30 +03:00
Mark Nelson cc6a8bc792 MDL-45445 events: added '(optional)' to event params where applicable 2014-06-12 20:47:21 -07:00
Mark Nelson fa71841e9d MDL-45445 events: documented the additional validation 2014-06-12 20:47:21 -07:00
Mark Nelson be7809f5fd MDL-45445 events: added missing 'other' validation 2014-06-12 20:47:20 -07:00
Mark Nelson 655cdde2dc MDL-45445 events: added missing 'relateduserid' validation 2014-06-12 20:47:20 -07:00
Mark Nelson 7f75f1507e MDL-45445 events: trivial changes 2014-06-12 20:47:20 -07:00
Jason Fowler 3fbf089303 MDL-45611 Questions: Fixing the layout of the 'points box' 2014-06-13 10:24:20 +08:00
Tim Lock 8a453265d2 MDL-45982: Implement displaying of non error messages from a provider. 2014-06-13 10:13:57 +09:30
AMOS bot 807d45073a Merge branch 'MOODLE_27_STABLE' into install_27_STABLE 2014-06-13 00:41:59 +00:00
Andreas Grabs 253bbbb668 MDL-31998 mod_feedback - Feedback depend questions bug 2014-06-13 01:44:59 +02:00
Tim Hunt 8fbc1919df 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:42 +01:00
Eloy Lafuente (stronk7) c41ace2f7a weekly release 2.7+ 2014-06-12 18:59:06 +02:00
Eloy Lafuente (stronk7) 3be351cabc Merge branch 'MDL-44871-27' of git://github.com/damyon/moodle into MOODLE_27_STABLE 2014-06-12 11:38:37 +02:00
Damyon Wiese 53bd21e7d8 MDL-42835 Scorm: Fix for JS error because no nodes are selected in the toc. 2014-06-12 10:00:56 +02:00
John Okely 217530dfca MDL-10115 User profile: Allow full list of courses to be viewed on a user's profile 2014-06-12 15:03:27 +08:00
Rajesh Taneja 30271d87aa MDL-45808 enrol_self: Fixed behat to observe the group key policy 2014-06-12 14:20:37 +08:00
Damyon Wiese f271df32ec MDL-44871 Atto: Add missing tags to behat tests @editor and @editor_atto 2014-06-12 11:15:17 +08:00
Rajesh Taneja 77ae35faba MDL-44871 behat: Hack to make equation editor visible 2014-06-12 11:11:17 +08:00
Damyon Wiese 32d746479b MDL-44871 Atto behat: Use one less page load to get to profile edit page 2014-06-12 11:11:17 +08:00
Damyon Wiese b18fd23232 MDL-44871 Atto: Move custom select text step to atto specific step definition. 2014-06-12 11:11:17 +08:00
Damyon Wiese bbd644ea34 MDL-44871 Atto behat tests: Modified the tests to work around focus bugs with workspaces
The main changes here are that the "select the text in" step was modified to select only the
first text node in the editor field, and to focus on it's parent instead of the entire editable div.

Some tests had to be modified to match the new behaviour, and another "real" bug was found in the table plugin.
2014-06-12 11:11:17 +08:00
Damyon Wiese c4bfba91c2 MDL-44871 Behat: Add tests for Atto functionalities (some of them) 2014-06-12 11:11:17 +08:00
AMOS bot 6e7a7aecf3 Automatically generated installer lang files 2014-06-12 00:43:36 +00:00
Mark Nelson 635493f6dd MDL-45803 mod_quiz: removed the quiz_fire_attempt_started function
Also commented in mod/quiz/upgrade.txt to inform developers.
2014-06-11 13:57:24 -07:00
Mark Nelson 0f583e0c91 MDL-45803 mod_quiz: removed usage of the function quiz_fire_attempt_started_event 2014-06-11 13:57:24 -07:00
Mark Nelson 1a7ded8989 MDL-45803 mod_quiz: prevented the attempt_started event from being triggered twice 2014-06-11 13:57:23 -07:00
Mark Nelson 159e18c977 MDL-45803 mod_quiz: added attempt snapshot for the attempt and preview started events 2014-06-11 13:57:23 -07:00
Damyon Wiese 801dea3298 MDL-45763 Question types: Allow saving '0' as question text. 2014-06-11 17:29:26 +08:00
Marina Glancy d468b949f1 MDL-39726 backup: fix SQL syntax for Oracle 2014-06-11 17:16:40 +08:00
Marina Glancy a0881872c7 MDL-39726 backup: fix SQL syntax for Oracle 2014-06-11 12:17:25 +08:00
Marina Glancy a9e9cd31e1 MDL-45763 question: fix SQL syntax for Oracle 2014-06-11 12:17:25 +08:00
Frederic Massart 0085d95576 MDL-45870 mod_assign: Behat test covering some outcome usage 2014-06-11 10:34:44 +08:00
Frederic Massart e4226ddc26 MDL-45870 mod_assign: Outcomes are saved for each group member 2014-06-11 10:34:44 +08:00
Eloy Lafuente (stronk7) 4c7169437b Merge branch 'm27_MDL-29708_Typo_Extra_Slashes' of https://github.com/scara/moodle into MOODLE_27_STABLE 2014-06-11 01:36:56 +02:00
Frederic Massart b2cdd35a46 MDL-45808 group: Observe the group key policy upon group creation 2014-06-10 23:02:58 +02:00
Eloy Lafuente (stronk7) aa0fad65e3 Merge branch 'MDL-45579-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-10 22:25:54 +02:00
Eloy Lafuente (stronk7) 4c06cef684 Merge branch 'MDL-45418_27' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2014-06-10 20:13:28 +02:00
Barbara Ramiro 6871df272d MDL-45943: Replacement for publisher icons 2014-06-10 19:31:22 +02:00
Jason Fowler 40a4427420 MDL-45418 Files: Adding upgrade steps for publisher docs
Conflicts:
	lib/db/upgrade.php
	version.php
2014-06-10 19:31:04 +02:00
James McLean f76b5133a5 MDL-45418 Files: Adding publisher docs to Filetypes 2014-06-10 19:27:46 +02:00
Eric Merrill d5a7b7873e MDL-45763 question: Correct random question text if set to true or false 2014-06-10 20:08:25 +08:00
Marina Glancy ffa71ca45e Merge branch 'MDL-45813-scheduled_task_27' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2014-06-10 15:42:56 +08:00
Marina Glancy 5248eb8831 Merge branch 'MDL-20154-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-06-10 15:42:13 +08:00
Damyon Wiese 5468d02e60 Merge branch '45524-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-06-10 15:31:00 +08:00
Marina Glancy 251fd097bb Merge branch '27STABLE-wip-MDL45846' of git://github.com/jennymgray/moodle into MOODLE_27_STABLE 2014-06-10 14:20:02 +08:00
Daniel Neis Araujo 3ac721e5a3 MDL-45245 html_writer::select_time does not respect 5th parameter "attributes" 2014-06-10 14:19:29 +08:00
Damyon Wiese ecd99dc88a Merge branch 'wip-mdl-44309-m27' of https://github.com/deraadt/moodle into MOODLE_27_STABLE 2014-06-10 14:08:03 +08:00
Damyon Wiese 3097fca71c Merge branch 'MDL-45761-27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-06-10 14:00:58 +08:00
Damyon Wiese bc1c896692 Merge branch 'MDL-45767_returnInstanceid_27' of https://github.com/moodlerooms/moodle into MOODLE_27_STABLE 2014-06-10 13:53:43 +08:00
Damyon Wiese 6a927661f2 Merge branch 'MDL-45763-27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-06-10 13:12:07 +08:00
Andrew Nicols 601d32ae66 MDL-45935 tests: Specify step names during backup/restore tests 2014-06-10 12:14:09 +08:00
Michael de Raadt 2dde0b96da MDL-45719 mod_lti - Pass language strings to inline JS to allow for escaping 2014-06-10 11:39:12 +08:00
Eloy Lafuente (stronk7) d420bf952f Merge branch 'MDL-45789_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-10 01:17:00 +02:00
Eloy Lafuente (stronk7) a02d7831b6 Merge branch 'MDL-45804_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-10 01:14:29 +02:00
Jetha Chan 604db7d557 MDL-42782 usability: fix for extreme course page indenting 2014-06-10 01:10:31 +02:00
Nobelium 41ab96e7ff MDL-42835 mod_scorm: Close tree nodes using TreeView API 2014-06-10 00:37:16 +02:00
Eloy Lafuente (stronk7) 9dfb59fa28 Merge branch 'MDL-45574-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-06-09 21:49:18 +02:00
Eloy Lafuente (stronk7) ad94e63238 Merge branch 'wip-MDL-44501-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2014-06-09 18:59:22 +02:00
Jenny Gray 82c0485aab MDL-45846 Libraries custom user agent device detection unit test added 2014-06-09 13:59:10 +01:00
Eloy Lafuente (stronk7) 4524454ff2 Merge branch 'wip-mdl-45769-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-06-09 13:25:17 +02:00
Andrew Nicols 658bba713a 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-06-09 17:24:56 +08:00
Marina Glancy 238c388016 Merge branch 'MDL-45634-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-06-09 17:24:36 +08:00
David Mudrák 5e10e88673 MDL-45813 Fix variable name in scheduled task 2014-06-09 09:47:01 +02:00
Jetha Chan 7b6bad24ee 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:16:24 +08:00
Damyon Wiese 11be1e8b2b Merge branch 'MDL-39726-27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-06-09 12:43:27 +08:00
Rajesh Taneja 42126ff6a5 MDL-45769 behat: use final versions of symfony and behat 2014-06-09 09:59:19 +08:00
Rajesh Taneja f12f99241c MDL-45769 Behat: Fixed behat, was failing because of xpath chaining 2014-06-09 09:59:13 +08:00
Damyon Wiese 8fde6e8ef9 Merge branch 'MDL-45714-27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-06-09 08:56:00 +08:00
Sam Hemelryk 36bd6f3319 MDL-45524 navigation: fixed non-expandable node behat tests 2014-06-09 09:34:02 +12:00
Sam Hemelryk 0f52f263ca MDL-44711 navigation: improved expandable course calculation 2014-06-09 09:34:02 +12:00
Matteo Scaramuccia b9e1842e02 MDL-29708 Fixed file_exception() arguments in rename(). 2014-06-07 09:56:24 +02:00
Matteo Scaramuccia 99261fdf05 MDL-29708 Fixed extra slashes in $string['storedfilenotcreated']. 2014-06-07 09:56:23 +02:00
sam marshall 07388eaded 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:42:27 +01:00
Jenny Gray d983601e46 MDL-45846 Libraries Reinstate custom user agent device detection 2014-06-06 09:12:58 +01:00
Sam Chaffee fd85f4eeb9 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:07 -07:00
Eric Merrill c11ac48868 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.
2014-06-05 11:06:59 -04:00
Eric Merrill 0d5c68bfd8 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-05 11:06:59 -04:00
Eloy Lafuente (stronk7) a6b91c8407 weekly release 2.7+ 2014-06-05 16:58:54 +02:00
Eloy Lafuente (stronk7) f6cac05e9c Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-06-05 16:58:49 +02:00
Eric Merrill 9a2938c57c MDL-45761 assign Set inline comment format properly when plugin is empty
If a plugin says it is empty, skip it for for building the inline
comment.

If not format was found in any plugins, set to FORMAT_HTML, which is
the default for feedback anyways.
2014-06-05 08:58:09 -04:00
Michael de Raadt f4d6bab1b4 MDL-44309 Administration - correcting inproperly assigned column classes in environment table 2014-06-05 10:52:43 +08:00
Mark Nielsen ebfbd63b3c 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:19 -07:00
Eric Merrill 9ec7228b03 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:19:52 -04:00
Adrian Greeve 0a1f0c4b1f MDL-44501 mod_data: Only attempt to export 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:30:03 +08:00
Frederic Massart 7180fb19c1 MDL-45579 group: Behat tests to cover group enrolment key rules 2014-06-04 15:12:12 +08:00
Frederic Massart ac2015f2ce MDL-45579 group: Prevent duplicate enrolment keys in course groups 2014-06-04 15:12:12 +08:00
Marina Glancy 6fc8187375 Merge branch 'MDL-18162-27-2' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-06-04 12:59:42 +08:00
Andrew Nicols 81e433d505 MDL-18162 mod_forum: Correct @param type in phpdoc to use stdClass 2014-06-04 11:26:10 +08:00
Damyon Wiese 9fbdee633a Merge branch 'MDL-45568_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-04 10:20:15 +08:00
Mark Nelson f1dee5ce23 MDL-45568 events: fixed the description for the 'course_module_completion_updated' event 2014-06-03 17:26:22 -07:00
Mark Nelson 1ffce0c735 MDL-45789 mod_wiki: removed undefined "$this->other['itemid']" from the comments_viewed event description 2014-06-03 15:23:50 -07:00
Eloy Lafuente (stronk7) 3e307259ac Merge branch 'MDL-44620_master' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2014-06-03 18:11:37 +02:00
Dan Poltawski 8455124070 Merge branch '45333-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-06-03 15:26:01 +01:00
Tim Hunt a1d932bd82 MDL-44054 quiz_statistics fix lang string concatenation. 2014-06-03 13:01:25 +01:00
Jason Fowler d9ef98fc80 MDL-42953 Themes: Fixing CSS for headers of central blocks 2014-06-03 12:12:37 +02:00
Damyon Wiese 4affd3c42e Merge branch 'MDL-45592_27' of git://github.com/grabs/moodle into MOODLE_27_STABLE 2014-06-03 16:14:56 +08:00
Damyon Wiese 8771f49c0a Merge branch 'MDL-45677_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-06-03 14:38:57 +08:00
Damyon Wiese b018b44b49 Merge branch 'm27_MDL-44098' of git://github.com/greg-or/moodle-mod_assign into MOODLE_27_STABLE 2014-06-03 12:49:59 +08:00
Damyon Wiese 3d4f5c6bf8 MDL-45781 mod_quiz: Shifted files did not match CI version 2014-06-03 12:14:07 +08:00
Frederic Massart 6bbdb16bb1 MDL-45634 editor_atto: Adding type button to toolbar buttons
This prevents the browser to assume that those buttons are submit
buttons. In which case the submit action was stolen and the form
could not be submitted pressing the 'enter' key.
2014-06-03 12:09:46 +08:00
Damyon Wiese 07783f9c20 Merge branch 'MDL-45781_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-06-03 11:57:54 +08:00
Andrew Nicols b19370bd35 MDL-18162 mod_forum: Correct phpdoc for forum_clean_search_terms 2014-06-03 15:19:41 +12:00
Eric Merrill 9d18c714b8 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:48 -04:00
Eloy Lafuente (stronk7) 474dd3da66 Merge branch 'm27_MDL-45726' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2014-06-03 02:20:34 +02:00
Mark Nelson 5095725a00 MDL-45804 mod_workshop: fixed objecttable specified for the submission_reassessed event 2014-06-02 16:35:15 -07:00
Sam Hemelryk 02da49597c Merge branch 'MDL-33763-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-06-03 08:57:39 +12:00
Eric Merrill 5f86aa9d14 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.
2014-06-02 15:33:00 -04:00
Albert Gasset ae916b5d6a MDL-35514 mod_forum: Fixed warning message to students in forums with groups 2014-06-02 18:25:21 +02:00
AMOS bot ea66859873 Automatically generated installer lang files 2014-05-31 01:06:17 +00:00
Tim Hunt 23f43bb4c4 MDL-45781 quiz autosave: detect and report when the session is lost.
and also other errors.
2014-05-30 16:29:56 +01:00
AMOS bot 108d281f6b Automatically generated installer lang files 2014-05-30 01:24:20 +00:00
AMOS bot 4a0e272c5b Automatically generated installer lang files 2014-05-30 01:24:20 +00:00
Ciaran Irvine 647a688de3 MDL-45726 SCORM: Correct check for forcenewattempt 2014-05-30 09:48:50 +12:00
Sam Hemelryk 3f9ea21ae3 MDL-45333 output: navbar is now wrapped in a <nav> tag 2014-05-30 08:41:34 +12:00
Andreas Grabs 34a46904c2 MDL-45592 mod_feedback - unwanted linebreak after import or duplicating a feedback 2014-05-29 17:16:10 +02:00
Eloy Lafuente (stronk7) d73b1f3e71 weekly release 2.7+ 2014-05-29 12:51:41 +02:00
Eloy Lafuente (stronk7) 2c356d8ecd Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2014-05-29 12:51:36 +02:00
Damyon Wiese 62c7d543f6 MDL-45654 Cron: Fix for unit test that was causing integer overflow in 32 bit php 2014-05-29 16:29:58 +12:00
Rajesh Taneja 008cfb2a1f MDL-45698 behat: Added extra setting, to avoid timout issue 2014-05-29 14:52:57 +12:00
Sam Hemelryk 243f766222 Merge branch 'wip-mdl-45698-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-05-29 14:28:13 +12:00
Rajesh Taneja 2b9259ed7f MDL-45698 behat: Fixed behat and symfony versions 2014-05-29 09:47:55 +08:00
Sam Hemelryk c5d9d36e79 MDL-45654 cron: fixed dataprovider timestamp issue 2014-05-29 11:31:13 +12:00
Sam Hemelryk 296029fadf Merge branch 'wip-mdl-45565-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-05-29 08:12:43 +12:00
Eloy Lafuente (stronk7) 7e78f9c4a5 MDL-45503 upgrade: add v2.7.0 sep lines 2014-05-28 01:16:36 +02:00
Simey Lameze 83bc3ccfdf MDL-45544 events: Add event user_profile_viewed trigger to user/profile.php. 2014-05-27 07:50:35 +01:00
Rajesh Taneja 6a001a3223 MDL-45565 phpunit: Changed testsuite_name, so as to avoid class collision 2014-05-27 09:45:16 +08:00
Rajesh Taneja 1974f5ade7 MDL-45565 core_message: Reset internal users in phpunit 2014-05-27 09:45:15 +08:00
Gregory Faller 837e3741fd MDL-44098: Late submissions with extension calculate period of lateness incorrectly 2014-05-27 11:13:41 +09:30
AMOS bot 4bdb702918 Automatically generated installer lang files 2014-05-26 16:46:54 +00:00
AMOS bot e588f20b6c Automatically generated installer lang files 2014-05-26 16:46:54 +00:00
Dan Poltawski ad7d8edf0c Merge branch 'MDL-45676_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-05-26 12:02:41 +01:00
Dan Poltawski 9f4a69a8cd Merge branch 'MDL-45675_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2014-05-26 11:58:57 +01:00
Andrew Nicols fd4c7d7b69 MDL-45682 editor_atto: Ensure that the current editor is active when saving selections 2014-05-26 11:24:11 +01:00
Jetha Chan e77b4ac0de 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:46:21 +08:00
Damyon Wiese 4fe4fbba9d MDL-45661 Assign: Clean bad data from DB after MDL-42526 2014-05-26 14:43:10 +08:00
Marina Glancy 331298218b MDL-45688 added missing library requirement 2014-05-26 12:47:52 +08:00
Damyon Wiese db52d4058d Merge branch '45499-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-05-26 12:11:39 +08:00
Mark Nelson b5d1353575 MDL-45629 mod_assign: removed use of '$this->objectid' in the submission_status_viewed event 2014-05-26 11:59:25 +08:00
Mark Nielsen fb3663ae5c MDL-44014 Navigation: Set the correct context when retrieved via AJAX 2014-05-26 11:59:19 +08:00
Mark Nelson 6825f882e2 MDL-45677 mod_assign: removed treatment of an array as an object 2014-05-25 20:25:31 -07:00
Mark Nelson 04b949a8f5 MDL-45676 mod_data: added missing additional name fields 2014-05-25 20:23:13 -07:00
Ankit Agarwal 86976c5bd9 MDL-33763 notes: Fix issue with incorrect node highlighting in the nav tree 2014-05-26 10:42:14 +08:00
Mark Nelson 33238bb24b MDL-45675 mod_data: initialise options as an empty array to avoid error when there are none 2014-05-25 19:29:44 -07:00
Mark Nelson 2b548c27ee MDL-45650 events: ensure correct objectid passed when triggering user_profile_viewed event 2014-05-26 13:59:52 +12:00
David Monllao e0cd7e44db 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-26 13:57:23 +12:00
Mohamed Alsharaf 184cdf0d52 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-26 13:57:18 +12:00
Tim Hunt 472896acdd MDL-45660 question statistics: make comparison more robust. 2014-05-26 11:53:06 +12:00
Sam Hemelryk 1ff977a5e5 Merge branch 'MDL-45686_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2014-05-26 10:55:17 +12:00
Andrew Nicols 68a1c2a8d9 MDL-45635 javascript: Make core dialogue translatable 2014-05-26 10:38:59 +12:00
Simon Coggins db77228155 MDL-45623: Fix assigned users count on role delete confirmation page 2014-05-26 10:00:51 +12:00
Mark Nelson 8a0dcb91cc MDL-45607 events: changed the context passed to the user_profile_viewed event 2014-05-26 09:54:42 +12:00
Sam Hemelryk 11b5d9b763 Merge branch 'MDL-42526-27' of git://github.com/jamiepratt/moodle into MOODLE_27_STABLE 2014-05-26 09:02:53 +12:00
Sam Hemelryk dc195425ee MDL-45499 admin: fixed error when displaying page settings 2014-05-26 09:01:14 +12:00
Sam Hemelryk 72cf8ec5eb Merge branch 'MDL-45654-27' of https://github.com/rtcn2/moodle into MOODLE_27_STABLE 2014-05-26 08:58:13 +12:00
Jean-Michel Vedrine 1130c181f9 MDL-45686 qtype_multichoice get_num_selected_choices return wrong result 2014-05-25 09:23:26 +02:00
Rajesh Taneja 443d4dae06 MDL-45565 core_message: Added unit tests. 2014-05-23 16:48:18 +08:00
Rajesh Taneja a2720952c2 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:48:15 +08:00
Eloy Lafuente (stronk7) 89262fa9f1 weekly release 2.7+ 2014-05-22 16:47:19 +02:00
James Pratt bc3c2a8eed MDL-42526 mod_assignment : fix record insert with assigment.id 0 2014-05-22 13:01:47 +07:00
Andrew Nicols fb7e5c42cd MDL-45239 editor_atto: On Android do not restore focus in the callbackWrapper
It seems that Android automatically focuses the cursor in the last position
when the content editable region is programatically re-focused.

Whilst this does not cause an issue on it's own, when combined with the
behaviour of the dictionary auto-completion to restore focus on the start
of the word when a word has not yet been finished, this was causing us to
change focus when pressing buttons.
2014-05-22 13:02:26 +08:00
Andrew Nicols 2e2a229f58 MDL-45536 atto_html: Update the textarea size when switching to HTML view 2014-05-22 11:47:37 +08:00
Rod Norfor d12b20d022 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:20:16 +01:00
Sam Hemelryk 5ce5bc6bdd MDL-44711 course: fixed navigation expansion in course tests 2014-05-21 20:58:27 +12:00
Marina Glancy 54c9048405 MDL-45469 profile: make sure profile fields can be initialised without arguments 2014-05-21 12:04:48 +08:00
Marina Glancy 7b04f1fa49 MDL-45371 behat: Tests for block glossary_random 2014-05-21 10:03:26 +08:00
Marina Glancy eebd7f8964 MDL-45320 behat: change to block selector 2014-05-21 09:32:18 +12:00
Marina Glancy 871af2ebc5 MDL-45320 block_html: behat tests 2014-05-21 09:32:14 +12:00
Marina Glancy 0d4b11ff88 MDL-45320 behat: Step definitions for blocks 2014-05-21 09:32:12 +12:00
David Monllao e342149a37 MDL-45294 behat: Updating block references to aria label value
Also improving moodle selectors xpath expressions
readability.
2014-05-21 09:31:50 +12:00
David Monllao 9054cd2a25 MDL-45294 behat: Supporting an aria-label as a block ref 2014-05-21 09:31:46 +12:00
Dan Poltawski 7d5e56cffd Merge branch '44711-27-r2' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-05-20 20:32:10 +08:00
Sam Hemelryk 137c0261ee MDL-44711 block_navigation: fixed typo in behat tests 2014-05-20 23:39:17 +12:00
Damyon Wiese 1c500e2157 MDL-45606 Unit test fix for MySQL and added a comment about the removed code. 2014-05-20 18:07:13 +08:00
Dan Poltawski 46021b98b2 Merge branch 'MDL-45496-m27' of https://github.com/micaherne/moodle into MOODLE_27_STABLE 2014-05-20 15:55:12 +08:00
Dan Poltawski 55739cdfb6 Merge branch 'MDL-45563-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-20 15:50:29 +08:00
Tim Hunt 63e5416f5b MDL-45618 Fix @since PHPdoc tags. 2014-05-20 15:03:34 +08:00
Jetha Chan 689a8f383c MDL-45525 themes: minor forum improvements
Fixed an RTL style that wasn't kicking in properly.

Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 14:29:25 +08:00
Andrew Nicols 10f981a794 MDL-45536 theme: Use width auto for inputs and textareas specifying them
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 14:25:45 +08:00
Adrian Greeve 556a760d0c MDL-45512 comments: Added full date to comment details. 2014-05-20 14:22:32 +08:00
Michael Aherne 2ba0565d7d MDL-43669 messaging Enable sending email only from no-reply address 2014-05-20 14:16:05 +08:00
Tim Hunt 16d5729223 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-20 14:11:39 +08:00
Mark Nelson 38ef7ab379 MDL-45571 events: included enrolment method in the 'user_enrolment_created' event description 2014-05-20 14:08:14 +08:00
Damyon Wiese 740cb942ce Merge branch 'master_MDL-45583' of github.com:danmarsden/moodle into MOODLE_27_STABLE 2014-05-20 13:30:51 +08:00
Damyon Wiese 3725adf852 Merge branch 'MDL-45323-master' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-05-20 13:28:09 +08:00
Dan Poltawski b9c49aefb2 Merge branch 'MDL-45501-27' of git://github.com/ankitagarwal/moodle into MOODLE_27_STABLE 2014-05-20 13:23:40 +08:00
Dan Poltawski 60f8e19ce1 Merge branch 'MDL-45566-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-20 13:17:41 +08:00
Damyon Wiese d0f43772fb Merge branch 'MDL-45476-master' of git://github.com/phalacee/moodle into MOODLE_27_STABLE 2014-05-20 13:12:16 +08:00
Dan Poltawski 106be68e82 Merge branch 'MDL-45545-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-20 12:21:12 +08:00
Marina Glancy f12ad8521f MDL-45469 Move profile tests to the location recognised by phpunit 2014-05-20 11:59:58 +08:00
Marina Glancy 9efa210e32 MDL-45466 forum: performance improvement for mass (un)subscriptions 2014-05-20 11:52:23 +08:00
Dan Poltawski 79b146cb5c 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/style/moodle.css
2014-05-20 15:48:48 +12:00
Sam Hemelryk 8711ce1f4a Merge branch 'MDL-44027-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-05-20 15:39:36 +12:00
Damyon Wiese 417fa07162 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-20 10:51:58 +08:00
Dan Poltawski 1910d01a86 Merge branch 'MDL-45546-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-20 10:24:42 +08:00
Dan Poltawski c9c530fd6e Merge branch '44711-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-05-20 10:14:22 +08:00
Sam Hemelryk dadeff80c9 Merge branch 'MDL-45603-27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-05-20 13:59:36 +12:00
sam marshall cc41096ad5 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.
2014-05-20 09:52:36 +08:00
Tim Hunt db9987c267 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-20 09:51:16 +08:00
Dan Poltawski 8d8a5e8035 Merge branch 'MDL-45550-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-05-20 09:30:19 +08:00
Andrew Nicols b60373f3e4 MDL-45479 atto_image: Improve the preview area
This changes the preview area:
* to show the image at the requested size; and
* to fix the scaling issues.
2014-05-20 13:20:17 +12:00
Damyon Wiese 1d8bebfeaf Merge branch '44974-27' of git://github.com/samhemelryk/moodle into MOODLE_27_STABLE 2014-05-20 09:00:35 +08:00
Ankit Agarwal 41d178f9da MDL-45543 availability: Use correct namespace for global classes 2014-05-20 12:07:39 +12:00
Sam Hemelryk d144e53188 Merge branch 'MDL-45477-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE 2014-05-20 11:58:24 +12:00
sam marshall 49b50ef5ab 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-20 11:57:54 +12:00
Sam Hemelryk 4fac06549a Merge branch 'MDL-44953-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-20 11:43:17 +12:00
Sam Hemelryk 7141921ad4 Merge branch 'MDL-45474-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-20 10:46:34 +12:00
Sam Hemelryk 70e78a4315 Merge branch 'MDL-37838-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-05-20 10:42:23 +12:00
Sam Hemelryk 520592c43d Merge branch 'MDL-45380-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-05-20 08:53:18 +12:00
Dan Poltawski 553b1e6f6d 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-20 08:49:01 +12:00
Damyon Wiese bb5652829f Merge branch 'MDL-45130-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-19 21:27:47 +08:00
Damyon Wiese 288a79ccd4 Merge branch 'MDL-45472-master' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-05-19 20:47:27 +08:00
Damyon Wiese 8f6d8a5653 Merge branch 'MDL-45447-master' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-19 20:23:09 +08:00
Tim Hunt c64368bb1d MDL-43833 quiz reports: persist states settings between pages. 2014-05-19 20:12:09 +08:00
Damyon Wiese 177beaf23a Merge branch 'MDL-45527-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-19 20:05:25 +08:00
Tim Hunt 147d7af758 MDL-45455 quiz cron must rollback transaction on error. 2014-05-19 19:57:21 +08:00
Tony Butler 20bd24b70d MDL-45432 mod_assign Declare character encoding in onlinetext export
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-05-19 18:48:06 +08:00
sam marshall 7c75924319 MDL-45478 Conditional availability: Custom user restriction missing
There was an error in the JavaScript and custom user field
restrictions did not show correctly when editing the form.

Behat tests didn't cover custom user fields, so I added a
scenario.
2014-05-19 17:30:43 +08:00
Andrew Nicols d90846033b MDL-45239 editor_atto: The editor cannot be active if it is not the active element
FireFox thinks that you can have an active selection on an element which
currently does not have focus. How this can be the case is a mystery.

Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2014-05-19 16:15:50 +08:00
Andrew Nicols da02a3c472 MDL-45468 editor_atto: Check that the common ancestor is within the editor
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2014-05-19 16:15:43 +08:00
Andrew Nicols 61609ec274 MDL-41109 dndupload: Add missing error string 2014-05-19 15:07:59 +08:00
Dan Poltawski 228fc821e0 Merge branch 'wip-MDL-34914-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-05-19 14:58:51 +08:00
Damyon Wiese d44071ee09 MDL-32543 upgrade: Increment the version bump 2014-05-19 13:02:10 +08:00
Damyon Wiese 91fae7e9b4 Merge branch 'MDL-32543' of https://github.com/danielneis/moodle into MOODLE_27_STABLE 2014-05-19 13:00:00 +08:00
Damyon Wiese 3e7b9158f4 Merge branch 'MDL-23566' of https://github.com/aolley/moodle into MOODLE_27_STABLE 2014-05-19 12:44:31 +08:00
Marina Glancy 95f9c8f716 Merge branch 'MDL-45537-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-19 12:39:43 +08:00
Marina Glancy 170392d4a0 Merge branch 'wip-MDL-45483-MOODLE_27_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_27_STABLE 2014-05-19 12:37:59 +08:00
Damyon Wiese 3724b3aa8d Merge branch 'MDL-45533-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2014-05-19 12:28:10 +08:00
Damyon Wiese 9af90f03bb Merge branch 'MDL-44634-27' of https://github.com/dbezborodovrp/moodle into MOODLE_27_STABLE 2014-05-19 12:14:42 +08:00
Jetha Chan 64a2dfba1f MDL-45561 themes: horizontal scroll in RTL base 2014-05-19 13:38:22 +12:00
Sam Hemelryk 043cf8bab7 MDL-44974 admin: repositioned call to initialise renderer 2014-05-19 08:41:27 +12:00
Sam Hemelryk 832393cfc9 MDL-44711 navigation: better handling of course expansion exception 2014-05-19 08:41:12 +12:00
Eric Merrill d8e7fa9196 MDL-45603 cache Fix the mappingsonly option to work as advertised. 2014-05-17 23:58:05 -04:00
Marina Glancy 075e999c1a MDL-34914 cohorts: more understandable filter of user list by cohort 2014-05-16 17:14:29 +08:00
Frederic Massart 8efb66741f MDL-45566 message: Send blocking events when user is not in contact list 2014-05-15 16:43:01 +08:00
Frederic Massart fa348b5d46 MDL-45563 message: Inverting IDs in description of event message_viewed 2014-05-15 16:17:03 +08:00
Frederic Massart ac2eafee91 MDL-45537 mod_assign: Requiring locallib for class assign 2014-05-15 15:52:48 +08:00
Damyon Wiese e6c69d835d weekly release 2.7+ 2014-05-15 15:32:36 +08:00
Simey Lameze 1468444f42 MDL-45323 grade: Unit test for grade_get_grade_items_for_activity() 2014-05-15 15:00:56 +08:00
Simey Lameze 3a34659252 MDL-45323 grade: Fix query errors on grade_get_grade_for_activity method. 2014-05-15 15:00:03 +08:00
Ankit Agarwal bfa6c5080e MDL-45501 availability: Add uninstall support for conditional plugins 2014-05-15 14:07:05 +08:00
Damyon Wiese 0f0729b157 MDL-41383 Filepicker: whitespace fix 2014-05-15 13:33:04 +08:00
Jetha Chan f75d82450a MDL-41383: RTL fix for base when zoomed out 2014-05-15 13:29:03 +08:00
Frederic Massart 9389ff572b MDL-45533 editor_atto: Default paragraph is removed from empty Atto 2014-05-15 11:10:54 +08:00
Damien Bezborodov 3dd33e3862 MDL-44634 Regression: link to user profile in comments block fails due to double URI encoding 2014-05-15 11:46:32 +09:30
Damien Bezborodov e3b98ac6b6 MDL-44634 Regression: link to user profile in comments block fails due to double URI encoding 2014-05-15 10:43:06 +09:30
sam marshall 3951213860 MDL-45550 Conditional availability: Missing lang string for save settings error 2014-05-14 11:48:33 +01:00
sam marshall 24b81e0566 MDL-45477 Behat: List of steps takes too long to load, times out
Increase time limit to 300 seconds (5 minutes).
2014-05-14 11:05:38 +01:00
Juan Leyva 0ab271dcfd MDL-36670 logging: action parameter length restricted to 40 chars 2014-05-14 16:35:18 +08:00
Frederic Massart b9cb39eaf6 MDL-45546 mod_forum: Login the user before getting its context 2014-05-14 16:16:40 +08:00
Frederic Massart c83407f033 MDL-45545 csslib: Chunking handles commas in media query definitions 2014-05-14 15:28:11 +08:00
Jetha Chan da75ffce68 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 15:07:44 +08:00
David Monllao ee9f6db7a2 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-13 17:25:26 +07:00
David Monllao d46979ec3a 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-13 17:24:33 +07:00
Frederic Massart d48b1de9f7 MDL-45474 atto_undo: Remove notice when undo stack is empty 2014-05-13 17:49:26 +08:00
Frederic Massart da6b4b9bf9 MDL-45527 task: Already deleted unconfirmed users are ignored 2014-05-13 17:11:18 +08:00
Dan Poltawski 38d1c9a886 MDL-44027 groups: remove some junk html 2014-05-13 16:17:14 +08:00
Damyon Wiese 1c48d7e188 Merge branch 'MDL-41383-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2014-05-13 16:01:50 +08:00
Dan Poltawski 11b39253d2 Merge branch 'MDL-45523_m27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-05-13 14:46:55 +08:00
Dan Poltawski 56e84a7985 Merge branch 'MDL-45522_m27' of https://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2014-05-13 14:37:23 +08:00
Dan Poltawski 133f83d557 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:16 +08:00
Jason Fowler 1d20cf37cb MDL-45476 Quiz: Fixing atto on multiple choice pages 2014-05-13 08:06:04 +08:00
Eric Merrill 17e57aa07d MDL-45523 quiz Cleanup duplicate question instances. 2014-05-12 16:01:32 -04:00
Eric Merrill 710b364b44 MDL-45522 quiz Check that sumgrade is valid before saving. 2014-05-12 15:21:44 -04:00
Daniel Neis Araujo d277c441da MDL-32543 Make sure the action and url fields of log table have correct sizes 2014-05-12 12:05:25 -03:00
Jetha Chan b993411de1 MDL-41383 theme: filepicker zoom resiliency
Fixed an issue that broke the file picker on bootstrapbase when zooming in and out.
2014-05-12 17:16:58 +08:00
Frederic Massart 81d72831b8 MDL-44953 theme_more: Removing odd-looking text-shadow 2014-05-12 16:51:37 +08:00
Frederic Massart 3cfabf7190 MDL-45130 editor_atto: Remove debugging messages for missing plugins
This is no longer required as the toolbar configuration prevents
missing plugins from being set. However, even if we do not output
any notice, we ignore missing plugins to prevent errors in case
one was uninstalled but left in the editor toolbar.
2014-05-12 16:09:40 +08:00
Michael Aherne 0e5791a6cd MDL-45496 core Added space to logged in as line 2014-05-12 08:58:41 +01:00
Frederic Massart da3e5e0c5c MDL-45380 theme_bootstrapbase: Restore config override highlight 2014-05-12 15:50:08 +08:00
Rajesh Taneja ae3b9e1e1f MDL-45514 behat: Fixed should_not_exist timout param 2014-05-12 14:13:21 +08:00
Kevin Wiliarty 3485ecf225 MDL-45483 mod_forum: corrects values for maxattachments in forum settings 2014-05-11 23:51:57 -04:00
Andrew Nicols 83e8f495f2 MDL-45472 AJAX: Whitelist prototype values form JS Error in exception dialogue 2014-05-08 16:44:11 +08:00
Frederic Massart ba4e81d249 MDL-45447 editor_atto: Highlight collapse and html icons when toggled 2014-05-07 17:44:06 +08:00
Adam Olley c3af87ac64 MDL-23566 mod_lesson: Float answers so paragraphs line up correctly next to the inputs 2014-05-07 15:44:36 +09:30
1174 changed files with 24470 additions and 8270 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);
}
+19 -20
View File
@@ -17,7 +17,7 @@
/**
* This file is used to display a categories sub categories, external pages, and settings.
*
* @since 2.3
* @since Moodle 2.3
* @package admin
* @copyright 2011 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -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>
+14 -7
View File
@@ -378,9 +378,6 @@ 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');
@@ -398,6 +395,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);
@@ -421,6 +421,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)) {
/** @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();
@@ -553,7 +555,8 @@ if (isset($SESSION->pluginuninstallreturn)) {
// Print default admin page with notifications.
$errorsdisplayed = defined('WARN_DISPLAY_ERRORS_ENABLED');
$lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}');
// We make the assumption that at least one schedule task should run once per day.
$lastcron = $DB->get_field_sql('SELECT MAX(lastruntime) FROM {task_scheduled}');
$cronoverdue = ($lastcron < time() - 3600 * 24);
$dbproblems = $DB->diagnose();
$maintenancemode = !empty($CFG->maintenance_enabled);
@@ -587,10 +590,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);
+1 -1
View File
@@ -18,7 +18,7 @@
/**
* This file contains functions used by the admin pages
*
* @since 2.1
* @since Moodle 2.1
* @package admin
* @copyright 2011 Andrew Davis
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+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);
//////////////////////////////////////////////////////////////////////////////////////////////////
@@ -595,6 +597,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
@@ -1024,19 +1039,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) {
@@ -1044,11 +1068,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));
}
@@ -1370,7 +1394,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) {
@@ -1382,9 +1406,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';
@@ -1394,9 +1419,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';
@@ -1412,6 +1438,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();
@@ -1488,7 +1515,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));
@@ -1514,9 +1542,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
)
);
+1 -1
View File
@@ -358,7 +358,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"
+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.
core_php_time_limit::raise(300);
$filter = optional_param('filter', '', PARAM_ALPHANUMEXT);
$type = optional_param('type', false, PARAM_ALPHAEXT);
$component = optional_param('component', '', PARAM_ALPHAEXT);
@@ -252,3 +252,58 @@ Feature: Set up contextual data for tests
And the "members" select box should contain "Student 1"
And I set the field "groups" to "Group 2 (1)"
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"
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Moodle v2.6.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -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)';
@@ -28,20 +28,20 @@ defined('MOODLE_INTERNAL') || die();
$string['acknowledgement'] = 'Acknowledgement';
$string['acknowledgementmust'] = 'You must acknowledge this';
$string['acknowledgementtext'] = 'I understand that it is my responsibility to have full backups of this site prior to installing add-ons. I accept and understand that add-ons (especially but not only those originating in unofficial sources) may contain security holes, can make the site unavailable, or cause private data leaks or loss.';
$string['featuredisabled'] = 'The add-on installer is disabled on this site.';
$string['installaddon'] = 'Install add-on!';
$string['installaddons'] = 'Install add-ons';
$string['installexception'] = 'Oops... An error occurred while trying to install the add-on. Turn debugging mode on to see details of the error.';
$string['installfromrepo'] = 'Install add-ons from the Moodle plugins directory';
$string['installfromrepo_help'] = 'You will be redirected to the Moodle plugins directory to search for and install an add-on. Note that your site full name, URL and Moodle version will be sent as well, to make the installation process easier for you.';
$string['installfromzip'] = 'Install add-on from ZIP file';
$string['installfromzip_help'] = 'An alternative to installing an add-on directly from the Moodle plugins directory is to upload a ZIP package of the add-on. The ZIP package should have the same structure as a package downloaded from the Moodle plugins directory.';
$string['acknowledgementtext'] = 'I understand that it is my responsibility to have full backups of this site prior to installing additional plugins. I accept and understand that plugins (especially but not only those originating in unofficial sources) may contain security holes, can make the site unavailable, or cause private data leaks or loss.';
$string['featuredisabled'] = 'The plugin installer is disabled on this site.';
$string['installaddon'] = 'Install plugin!';
$string['installaddons'] = 'Install plugins';
$string['installexception'] = 'Oops... An error occurred while trying to install the plugin. Turn debugging mode on to see details of the error.';
$string['installfromrepo'] = 'Install plugins from the Moodle plugins directory';
$string['installfromrepo_help'] = 'You will be redirected to the Moodle plugins directory to search for and install a plugin. Note that your site full name, URL and Moodle version will be sent as well, to make the installation process easier for you.';
$string['installfromzip'] = 'Install plugin from ZIP file';
$string['installfromzip_help'] = 'An alternative to installing a plugin directly from the Moodle plugins directory is to upload a ZIP package of the plugin. The ZIP package should have the same structure as a package downloaded from the Moodle plugins directory.';
$string['installfromzipfile'] = 'ZIP package';
$string['installfromzipfile_help'] = 'The plugin ZIP package must contain just one directory, named to match the plugin. The ZIP will be extracted into an appropriate location for the plugin type. If the package has been downloaded from the Moodle plugins directory then it will have this structure.';
$string['installfromziprootdir'] = 'Rename the root directory';
$string['installfromziprootdir_help'] = 'Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. If so, the correct name may be entered here.';
$string['installfromzipsubmit'] = 'Install add-on from the ZIP file';
$string['installfromzipsubmit'] = 'Install plugin from the ZIP file';
$string['installfromziptype'] = 'Plugin type';
$string['installfromziptype_help'] = 'Choose the correct type of plugin you are about to install. Warning: The installation procedure can fail badly if an incorrect plugin type is specified.';
$string['permcheck'] = 'Make sure the plugin type root location is writable by the web server process.';
@@ -49,54 +49,55 @@ $string['permcheckerror'] = 'Error while checking for write permission';
$string['permcheckprogress'] = 'Checking for write permission ...';
$string['permcheckresultno'] = 'Plugin type location <em>{$a->path}</em> is not writable';
$string['permcheckresultyes'] = 'Plugin type location <em>{$a->path}</em> is writable';
$string['pluginname'] = 'Add-on installer';
$string['remoterequestalreadyinstalled'] = 'There is a request to install add-on {$a->name} ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. However, this plugin is <strong>already installed</strong> on the site.';
$string['remoterequestconfirm'] = 'There is a request to install add-on <strong>{$a->name}</strong> ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. If you continue, the add-on ZIP package will be downloaded for validation. Nothing will be installed yet.';
$string['remoterequestinvalid'] = 'There is a request to install an add-on from the Moodle plugins directory on this site. Unfortunately the request is not valid and so the add-on cannot be installed.';
$string['remoterequestpermcheck'] = 'There is a request to install add-on {$a->name} ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. However, the plugin type location <strong>{$a->typepath}</strong> is <strong>not writable</strong>. You need to give write access for the web server user to the plugin type location, then press the continue button to repeat the check.';
$string['remoterequestpluginfoexception'] = 'Oops... An error occurred while trying to obtain information about the add-on {$a->name} ({$a->component}) version {$a->version}. The add-on cannot be installed. Turn debugging mode on to see details of the error.';
$string['validation'] = 'Add-on package validation';
$string['pluginname'] = 'Plugin installer';
$string['remoterequestalreadyinstalled'] = 'There is a request to install plugin {$a->name} ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. However, this plugin is <strong>already installed</strong> on the site.';
$string['remoterequestconfirm'] = 'There is a request to install plugin <strong>{$a->name}</strong> ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. If you continue, the plugin ZIP package will be downloaded for validation. Nothing will be installed yet.';
$string['remoterequestinvalid'] = 'There is a request to install a plugin from the Moodle plugins directory on this site. Unfortunately the request is not valid and so the plugin cannot be installed.';
$string['remoterequestpermcheck'] = 'There is a request to install plugin {$a->name} ({$a->component}) version {$a->version} from the Moodle plugins directory on this site. However, the location <strong>{$a->typepath}</strong> is <strong>not writable</strong>. You need to give write access for the web server user to the location, then press the continue button to repeat the check.';
$string['remoterequestpluginfoexception'] = 'Oops... An error occurred while trying to obtain information about the plugin {$a->name} ({$a->component}) version {$a->version}. The plugin cannot be installed. Turn debugging mode on to see details of the error.';
$string['validation'] = 'Plugin package validation';
$string['validationmsg_componentmatch'] = 'Full component name';
$string['validationmsg_componentmismatchname'] = 'Add-on name mismatch';
$string['validationmsg_componentmismatchname_help'] = 'Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. You need to fix the name of the root directory to match the declared add-on name.';
$string['validationmsg_componentmismatchname_info'] = 'The add-on declares its name is \'{$a}\' but that does not match the name of the root directory.';
$string['validationmsg_componentmismatchtype'] = 'Add-on type mismatch';
$string['validationmsg_componentmismatchtype_info'] = 'You have selected the type \'{$a->expected}\' but the add-on declares its type is \'{$a->found}\'.';
$string['validationmsg_componentmismatchname'] = 'Plugin name mismatch';
$string['validationmsg_componentmismatchname_help'] = 'Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. You need to fix the name of the root directory to match the declared plugin name.';
$string['validationmsg_componentmismatchname_info'] = 'The plugin declares its name is \'{$a}\' but that does not match the name of the root directory.';
$string['validationmsg_componentmismatchtype'] = 'Plugin type mismatch';
$string['validationmsg_componentmismatchtype_info'] = 'You have selected the type \'{$a->expected}\' but the plugin declares its type is \'{$a->found}\'.';
$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_maturity_help'] = 'The plugin can declare its maturity level. If the maintainer considers the plugin 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';
$string['validationmsg_missingexpectedlangenfile_info'] = 'The given add-on type is missing the expected English language file {$a}.';
$string['validationmsg_missingexpectedlangenfile_info'] = 'The given plugin type is missing the expected English language file {$a}.';
$string['validationmsg_missinglangenfile'] = 'No English language file found';
$string['validationmsg_missinglangenfolder'] = 'Missing English language folder';
$string['validationmsg_missingversion'] = 'Add-on does not declare its version';
$string['validationmsg_missingversion'] = 'Plugin does not declare its version';
$string['validationmsg_missingversionphp'] = 'File version.php not found';
$string['validationmsg_multiplelangenfiles'] = 'Multiple English language files found';
$string['validationmsg_onedir'] = 'Invalid structure of the ZIP package.';
$string['validationmsg_onedir_help'] = 'The ZIP package must contain just one root directory that holds the add-on code. The name of that root directory must match the name of the plugin.';
$string['validationmsg_onedir_help'] = 'The ZIP package must contain just one root directory that holds the plugin code. The name of that root directory must match the name of the plugin.';
$string['validationmsg_pathwritable'] = 'Write access check';
$string['validationmsg_pluginversion'] = 'Add-on version';
$string['validationmsg_release'] = 'Add-on release';
$string['validationmsg_pluginversion'] = 'Plugin version';
$string['validationmsg_release'] = 'Plugin release';
$string['validationmsg_requiresmoodle'] = 'Required Moodle version';
$string['validationmsg_rootdir'] = 'Name of the add-on to be installed';
$string['validationmsg_rootdir_help'] = 'The name of the root directory in the ZIP package forms the name of the add-on to be installed. If the name is not correct, you may wish to rename the root directory in the ZIP prior to installing the add-on.';
$string['validationmsg_rootdirinvalid'] = 'Invalid add-on name';
$string['validationmsg_rootdirinvalid_help'] = 'The name of the root directory in the ZIP package violates formal syntax requirements. Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. You need to fix the name of the root directory to match the add-on name.';
$string['validationmsg_rootdir'] = 'Name of the plugin to be installed';
$string['validationmsg_rootdir_help'] = 'The name of the root directory in the ZIP package forms the name of the plugin to be installed. If the name is not correct, you may wish to rename the root directory in the ZIP prior to installing the plugin.';
$string['validationmsg_rootdirinvalid'] = 'Invalid plugin name';
$string['validationmsg_rootdirinvalid_help'] = 'The name of the root directory in the ZIP package violates formal syntax requirements. Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. You need to fix the name of the root directory to match the plugin name.';
$string['validationmsg_targetexists'] = 'Target location already exists';
$string['validationmsg_targetexists_help'] = 'The directory that the add-on is to be installed to, must not exist yet.';
$string['validationmsg_targetexists_help'] = 'The directory that the plugin is to be installed to must not yet exist.';
$string['validationmsg_unknowntype'] = 'Unknown plugin type';
$string['validationmsglevel_debug'] = 'Debug';
$string['validationmsglevel_error'] = 'Error';
$string['validationmsglevel_info'] = 'OK';
$string['validationmsglevel_warning'] = 'Warning';
$string['validationresult0'] = 'Validation failed!';
$string['validationresult0_help'] = 'A serious problem was detected and so it is not safe to install the add-on. See the validation log messages for details.';
$string['validationresult0_help'] = 'A serious problem was detected and so it is not safe to install the plugin. See the validation log messages for details.';
$string['validationresult1'] = 'Validation passed!';
$string['validationresult1_help'] = 'No serious problems were detected. You can continue with the add-on installation. See the validation log messages for more details and eventual warnings.';
$string['validationresult1_help'] = 'The add-on package has been validated and no serious problems were detected.';
$string['validationresult2_help'] = 'No serious problems were detected. You can continue with the plugin installation. See the validation log messages for more details and eventual warnings.';
$string['validationresult1_help'] = 'The plugin package has been validated and no serious problems were detected.';
$string['validationresultinfo'] = 'Info';
$string['validationresultmsg'] = 'Message';
$string['validationresultstatus'] = 'Status';
+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';
@@ -72,7 +72,7 @@ trait buffered_writer {
$entry['other'] = serialize($entry['other']);
$entry['origin'] = $PAGE->requestorigin;
$entry['ip'] = $PAGE->requestip;
$entry['realuserid'] = \core\session\manager::is_loggedinas() ? $_SESSION['USER']->realuser : null;
$entry['realuserid'] = \core\session\manager::is_loggedinas() ? $GLOBALS['USER']->realuser : null;
$this->buffer[] = $entry;
$this->count++;
+3
View File
@@ -43,5 +43,8 @@ function xmldb_tool_log_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2014040600, 'tool', 'log');
}
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -23,7 +23,7 @@
*/
$string['actlogshdr'] = 'Available log stores';
$string['configlogplugins'] = 'Please enable all required plugins and arrange then in appropriate order.';
$string['configlogplugins'] = 'Please enable all required plugins and arrange them in appropriate order.';
$string['logging'] = 'Logging';
$string['managelogging'] = 'Manage log stores';
$string['reportssupported'] = 'Reports supported';
@@ -33,5 +33,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2014041700, 'logstore', 'database');
}
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -130,8 +130,7 @@ class logstore_database_store_testcase extends advanced_testcase {
array('context' => context_module::instance($module2->cmid), 'other' => array('sample' => 6, 'xx' => 9)));
$event2->trigger();
$_SESSION['SESSION'] = new \stdClass();
$this->setUser(0);
\core\session\manager::init_empty_session();
$this->assertFalse(\core\session\manager::is_loggedinas());
$logs = $DB->get_records('logstore_standard_log', array(), 'id ASC');
@@ -185,6 +185,11 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
// database so that it doesn't cause a DB error. Log a warning so that
// developers can avoid doing things which are likely to cause this on a
// routine basis.
if (\core_text::strlen($action) > 40) {
$action = \core_text::substr($action, 0, 37) . '...';
debugging('Warning: logged very long action', DEBUG_DEVELOPER);
}
if (!empty($info) && \core_text::strlen($info) > 255) {
$info = \core_text::substr($info, 0, 252) . '...';
debugging('Warning: logged very long info', DEBUG_DEVELOPER);
@@ -111,5 +111,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2014041500, 'logstore', 'standard');
}
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -95,8 +95,7 @@ class logstore_standard_store_testcase extends advanced_testcase {
$event2->trigger();
logstore_standard_restore::hack_executing(0);
$_SESSION['SESSION'] = new \stdClass();
$this->setUser(0);
\core\session\manager::init_empty_session();
$this->assertFalse(\core\session\manager::is_loggedinas());
$logs = $DB->get_records('logstore_standard_log', array(), 'id ASC');
+2 -2
View File
@@ -104,11 +104,11 @@ if ($mform && ($mform->is_cancelled() || !empty($CFG->preventscheduledtaskchange
} else {
echo $OUTPUT->header();
$error = optional_param('error', '', PARAM_RAW);
$error = optional_param('error', '', PARAM_NOTAGS);
if ($error) {
echo $OUTPUT->notification($error, 'notifyerror');
}
$success = optional_param('success', '', PARAM_RAW);
$success = optional_param('success', '', PARAM_NOTAGS);
if ($success) {
echo $OUTPUT->notification($success, 'notifysuccess');
}
+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);
@@ -875,7 +875,6 @@ class tool_uploadcourse_course {
$resetdata = new stdClass();
$resetdata->id = $course->id;
$resetdata->reset_start_date = time();
$resetdata->reset_logs = true;
$resetdata->reset_events = true;
$resetdata->reset_notes = true;
$resetdata->delete_blog_associations = true;
@@ -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);
}
}
+3
View File
@@ -52,5 +52,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Moodle v2.6.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+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));
}
+12 -13
View File
@@ -31,7 +31,7 @@ class auth_db_testcase extends advanced_testcase {
/** @var string Original error log */
protected $oldlog;
protected function init_auth_database() {
public function init_auth_database() {
global $DB, $CFG;
require_once("$CFG->dirroot/auth/db/auth.php");
@@ -52,14 +52,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');
@@ -72,12 +67,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'])) {
@@ -98,13 +93,17 @@ class auth_db_testcase extends advanced_testcase {
}
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;
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Moodle v2.6.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+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'] = '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.';
+137
View File
@@ -279,6 +279,143 @@ 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_password_updated', $event);
$this->assertEventContextNotUsed($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');
+4 -1
View File
@@ -41,13 +41,16 @@ class auth_plugin_manual extends auth_plugin_base {
* The name of the component. Used by the configuration.
*/
const COMPONENT_NAME = 'auth_manual';
const LEGACY_COMPONENT_NAME = 'auth/manual';
/**
* Constructor.
*/
function auth_plugin_manual() {
$this->authtype = 'manual';
$this->config = get_config(self::COMPONENT_NAME);
$config = get_config(self::COMPONENT_NAME);
$legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
$this->config = (object)array_merge((array)$legacyconfig, (array)$config);
}
/**
+3
View File
@@ -47,5 +47,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Moodle v2.6.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -17,7 +17,7 @@
/**
* This file contains the mnet services for the mnet authentication plugin
*
* @since 2.0
* @since Moodle 2.0
* @package auth_mnet
* @copyright 2010 Penny Leach
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+3
View File
@@ -47,5 +47,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Moodle v2.6.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v2.7.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+7 -3
View File
@@ -40,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
+1 -1
View File
@@ -180,7 +180,7 @@ abstract class condition extends tree_node {
*
* Default implementation returns false.
*
* @param stdClass $course Moodle course object
* @param \stdClass $course Moodle course object
* @param int $cmid ID of activity whose completion value is considered
* @return boolean True if the availability of something else may rely on it
*/
+3 -3
View File
@@ -46,7 +46,7 @@ abstract class frontend {
*
* Default returns true.
*
* @param stdClass $course Course object
* @param \stdClass $course Course object
* @param \cm_info $cm Course-module currently being edited (null if none)
* @param \section_info $section Section currently being edited (null if none)
*/
@@ -73,7 +73,7 @@ abstract class frontend {
*
* Default returns no parameters.
*
* @param stdClass $course Course object
* @param \stdClass $course Course object
* @param \cm_info $cm Course-module currently being edited (null if none)
* @param \section_info $section Section currently being edited (null if none)
* @return array Array of parameters for the JavaScript function
@@ -95,7 +95,7 @@ abstract class frontend {
/**
* Includes JavaScript for the main system and all plugins.
*
* @param stdClass $course Course object
* @param \stdClass $course Course object
* @param \cm_info $cm Course-module currently being edited (null if none)
* @param \section_info $section Section currently being edited (null if none)
*/
+38 -14
View File
@@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die();
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class info {
/** @var stdClass Course */
/** @var \stdClass Course */
protected $course;
/** @var \course_modinfo Modinfo (available only during some functions) */
@@ -49,13 +49,16 @@ abstract class info {
/** @var tree Availability configuration, decoded from JSON; null if unset */
protected $availabilitytree;
/** @var array|null Array of information about current restore if any */
protected static $restoreinfo = null;
/**
* Constructs with item details.
*
* @param stdClass $course Course object
* @param \stdClass $course Course object
* @param int $visible Value of visible flag (eye icon)
* @param string $availability Availability definition (JSON format) or null
* @throws coding_exception If data is not valid JSON format
* @throws \coding_exception If data is not valid JSON format
*/
public function __construct($course, $visible, $availability) {
// Set basic values.
@@ -67,7 +70,7 @@ abstract class info {
/**
* Obtains the course associated with this availability information.
*
* @return stdClass Moodle course object
* @return \stdClass Moodle course object
*/
public function get_course() {
return $this->course;
@@ -128,7 +131,7 @@ abstract class info {
* @param string $availability Availability string in JSON format
* @param boolean $lax If true, throw exceptions only for invalid structure
* @return tree Availability tree
* @throws coding_exception If data is not valid JSON format
* @throws \coding_exception If data is not valid JSON format
*/
protected function decode_availability($availability, $lax) {
// Decode JSON data.
@@ -306,10 +309,13 @@ abstract class info {
*
* @param string $restoreid Restore identifier
* @param int $courseid Target course id
* @param base_logger $logger Logger for any warnings
* @param \base_logger $logger Logger for any warnings
* @param int $dateoffset Date offset to be added to any dates (0 = none)
*/
public function update_after_restore($restoreid, $courseid, \base_logger $logger) {
public function update_after_restore($restoreid, $courseid, \base_logger $logger, $dateoffset) {
$tree = $this->get_availability_tree();
// Set static data for use by get_restore_date_offset function.
self::$restoreinfo = array('restoreid' => $restoreid, 'dateoffset' => $dateoffset);
$changed = $tree->update_after_restore($restoreid, $courseid, $logger,
$this->get_thing_name());
if ($changed) {
@@ -319,6 +325,24 @@ abstract class info {
}
}
/**
* Gets the date offset (amount by which any date values should be
* adjusted) for the current restore.
*
* @param string $restoreid Restore identifier
* @return int Date offset (0 if none)
* @throws coding_exception If not in a restore (or not in that restore)
*/
public static function get_restore_date_offset($restoreid) {
if (!self::$restoreinfo) {
throw new coding_exception('Only valid during restore');
}
if (self::$restoreinfo['restoreid'] !== $restoreid) {
throw new coding_exception('Data not available for that restore id');
}
return self::$restoreinfo['dateoffset'];
}
/**
* Obtains the name of the item (cm_info or section_info, at present) that
* this is controlling availability of. Name should be formatted ready
@@ -342,7 +366,7 @@ abstract class info {
* function does that for the conditional availability data for all
* modules and sections on the course.
*
* @param int|stdClass $courseorid Course id or object
* @param int|\stdClass $courseorid Course id or object
* @param string $table Table name e.g. 'course_modules'
* @param int $oldid Previous ID
* @param int $newid New ID
@@ -407,7 +431,7 @@ abstract class info {
* groupmembersonly field for modules. This is off by default because
* we are not yet moving the groupmembersonly option into this new API.
*
* @param stdClass $rec Object possibly containing legacy fields
* @param \stdClass $rec Object possibly containing legacy fields
* @param bool $section True if this is a section
* @param bool $modgroupmembersonly True if groupmembersonly is converted for mods
* @return string|null New availability value or null if none
@@ -468,7 +492,7 @@ abstract class info {
* that it has an AND tree with one or more conditions.
*
* @param string|null $availability Current availability conditions
* @param stdClass $rec Object containing information from old table
* @param \stdClass $rec Object containing information from old table
* @param bool $show True if 'show' option should be enabled
* @return string New availability conditions
*/
@@ -501,7 +525,7 @@ abstract class info {
* that it has an AND tree with one or more conditions.
*
* @param string|null $availability Current availability conditions
* @param stdClass $rec Object containing information from old table
* @param \stdClass $rec Object containing information from old table
* @param bool $show True if 'show' option should be enabled
* @return string New availability conditions
*/
@@ -598,8 +622,8 @@ abstract class info {
* object.
*
* @param string $info Info string
* @param int|stdClass $courseorid
* @return Correctly formatted info string
* @param int|\stdClass $courseorid
* @return string Correctly formatted info string
*/
public static function format_info($info, $courseorid) {
// Don't waste time if there are no special tags.
@@ -624,7 +648,7 @@ abstract class info {
* JS (using the non-JS version instead, which causes a page reload) if a
* completion tickbox value may affect a conditional activity.
*
* @param stdClass $course Moodle course object
* @param \stdClass $course Moodle course object
* @param int $cmid Course-module id
* @return bool True if this is used in a condition, false otherwise
*/
+11 -4
View File
@@ -63,7 +63,7 @@ class info_module extends info {
/**
* Gets the course-module object. Intended for use by conditions.
*
* @return cm_info Course module
* @return \cm_info Course module
*/
public function get_course_module() {
return $this->cm;
@@ -130,11 +130,11 @@ class info_module extends info {
* disabled, and you supply a $cm object with necessary fields, and you
* don't check course access.
*
* @param int|stdClass|cm_info $cmorid Object or id representing activity
* @param int|\stdClass|\cm_info $cmorid Object or id representing activity
* @param int $userid User id (0 = current user)
* @param bool $checkcourse If true, checks whether the user has course access
* @return bool True if the activity is visible to the specified user
* @throws moodle_exception If the cmid doesn't exist
* @throws \moodle_exception If the cmid doesn't exist
*/
public static function is_user_visible($cmorid, $userid = 0, $checkcourse = true) {
global $USER, $DB, $CFG;
@@ -187,6 +187,13 @@ class info_module extends info {
// As a result we cannot take short cuts any longer and must get
// standard modinfo.
$modinfo = get_fast_modinfo($cm->course, $userid);
return $modinfo->get_cm($cm->id)->uservisible;
$cms = $modinfo->get_cms();
if (!isset($cms[$cm->id])) {
// In some cases this might get called with a cmid that is no longer
// available, for example when a module is hidden at system level.
debugging('info_module::is_user_visible called with invalid cmid ' . $cm->id, DEBUG_DEVELOPER);
return false;
}
return $cms[$cm->id]->uservisible;
}
}
+1 -1
View File
@@ -65,7 +65,7 @@ class info_section extends info {
/**
* Gets the section object. Intended for use by conditions.
*
* @return section_info Section
* @return \section_info Section
*/
public function get_section() {
return $this->section;
+23 -12
View File
@@ -128,11 +128,11 @@ class tree extends tree_node {
* coding_exception (if $lax is false).
*
* @see decode_availability
* @param stdClass $structure Structure (decoded from JSON)
* @param \stdClass $structure Structure (decoded from JSON)
* @param boolean $lax If true, throw exceptions only for invalid structure
* @param boolean $root If true, this is the root tree
* @return tree Availability tree
* @throws coding_exception If data is not valid structure
* @throws \coding_exception If data is not valid structure
*/
public function __construct($structure, $lax = false, $root = true) {
$this->root = $root;
@@ -389,12 +389,12 @@ class tree extends tree_node {
* for display to staff.
*
* @param info $info Information about location of condition tree
* @throws coding_exception If you call on a non-root tree
* @throws \coding_exception If you call on a non-root tree
* @return string HTML data (empty string if none)
*/
public function get_full_information(info $info) {
if (!$this->root) {
throw new coding_exception('Only supported on root item');
throw new \coding_exception('Only supported on root item');
}
return $this->get_full_information_recursive(false, $info, null, true);
}
@@ -406,12 +406,12 @@ class tree extends tree_node {
*
* @param info $info Information about location of condition tree
* @param result $result Result object
* @throws coding_exception If you call on a non-root tree
* @throws \coding_exception If you call on a non-root tree
* @return string HTML data (empty string if none)
*/
public function get_result_information(info $info, result $result) {
if (!$this->root) {
throw new coding_exception('Only supported on root item');
throw new \coding_exception('Only supported on root item');
}
return $this->get_full_information_recursive(false, $info, $result, true);
}
@@ -530,7 +530,7 @@ class tree extends tree_node {
$negative = true;
break;
default:
throw new coding_exception('Unknown operator');
throw new \coding_exception('Unknown operator');
}
switch($this->op) {
case self::OP_AND:
@@ -542,7 +542,7 @@ class tree extends tree_node {
$andoperator = false;
break;
default:
throw new coding_exception('Unknown operator');
throw new \coding_exception('Unknown operator');
}
// Select NOT (or not) for children. It flips if this is a 'not' group.
@@ -560,10 +560,13 @@ class tree extends tree_node {
public function save() {
$result = new \stdClass();
$result->op = $this->op;
if ($this->op === self::OP_AND || $this->op === self::OP_NOT_OR) {
$result->showc = $this->showchildren;
} else {
$result->show = $this->show;
// Only root tree has the 'show' options.
if ($this->root) {
if ($this->op === self::OP_AND || $this->op === self::OP_NOT_OR) {
$result->showc = $this->showchildren;
} else {
$result->show = $this->show;
}
}
$result->c = array();
foreach ($this->children as $child) {
@@ -572,6 +575,14 @@ class tree extends tree_node {
return $result;
}
/**
* Checks whether this tree is empty (contains no children).
* @return boolean True if empty
*/
public function is_empty() {
return count($this->children) === 0;
}
/**
* Recursively gets all children of a particular class (you can use a base
* class to get all conditions, or a specific class).
+6 -3
View File
@@ -78,7 +78,7 @@ abstract class tree_node {
/**
* Saves tree data back to a structure object.
*
* @return stdClass Structure object (ready to be made into JSON format)
* @return \stdClass Structure object (ready to be made into JSON format)
*/
public abstract function save();
@@ -87,6 +87,9 @@ abstract class tree_node {
* The default behaviour is simply to return false. If there is a problem
* with the update, $logger can be used to output a warning.
*
* Note: If you need information about the date offset, call
* \core_availability\info::get_restore_date_offset($restoreid).
*
* @param string $restoreid Restore ID
* @param int $courseid ID of target course
* @param \base_logger $logger Logger for any warnings
@@ -152,11 +155,11 @@ abstract class tree_node {
* @param \core_availability\info $info Item we're checking
* @param capability_checker $checker
* @return array Filtered version of input array
* @throws coding_exception If called on a condition that doesn't apply to user lists
* @throws \coding_exception If called on a condition that doesn't apply to user lists
*/
public function filter_user_list(array $users, $not,
\core_availability\info $info, capability_checker $checker) {
throw new coding_exception('Not implemented (do not call unless '.
throw new \coding_exception('Not implemented (do not call unless '.
'is_applied_to_user_lists is true)');
}
}
@@ -48,8 +48,8 @@ class condition extends \core_availability\condition {
/**
* Constructor.
*
* @param stdClass $structure Data structure from JSON decode
* @throws coding_exception If invalid data structure.
* @param \stdClass $structure Data structure from JSON decode
* @throws \coding_exception If invalid data structure.
*/
public function __construct($structure) {
// Get cmid.
@@ -212,7 +212,7 @@ class condition extends \core_availability\condition {
* Used in course/lib.php because we need to disable the completion JS if
* a completion value affects a conditional activity.
*
* @param stdClass $course Moodle course object
* @param \stdClass $course Moodle course object
* @param int $cmid Course-module id
* @return bool True if this is used in a condition, false otherwise
*/
@@ -47,10 +47,10 @@ M.availability_completion.form.getNode = function(json) {
// Set initial values.
if (json.cm !== undefined &&
node.one('select[name=cm] > option[value=' + json.cm + ']')) {
node.one('select[name=cm]').set('value', json.cm);
node.one('select[name=cm]').set('value', '' + json.cm);
}
if (json.e !== undefined) {
node.one('select[name=e]').set('value', json.e);
node.one('select[name=e]').set('value', '' + json.e);
}
// Add event handlers (first time only).
@@ -1 +1 @@
YUI.add("moodle-availability_completion-form",function(e,t){M.availability_completion=M.availability_completion||{},M.availability_completion.form=e.Object(M.core_availability.plugin),M.availability_completion.form.initInner=function(e){this.cms=e},M.availability_completion.form.getNode=function(t){var n=M.str.availability_completion,r=n.title+' <span class="availability-group"><label>'+'<span class="accesshide">'+n.label_cm+" </span>"+'<select name="cm" title="'+n.label_cm+'">'+'<option value="0">'+M.str.moodle.choosedots+"</option>";for(var i=0;i<this.cms.length;i++){var s=this.cms[i];r+='<option value="'+s.id+'">'+s.name+"</option>"}r+='</select></label> <label><span class="accesshide">'+n.label_completion+' </span><select name="e" title="'+n.label_completion+'">'+'<option value="1">'+n.option_complete+"</option>"+'<option value="0">'+n.option_incomplete+"</option>"+'<option value="2">'+n.option_pass+"</option>"+'<option value="3">'+n.option_fail+"</option>"+"</select></label></span>";var o=e.Node.create("<span>"+r+"</span>");t.cm!==undefined&&o.one("select[name=cm] > option[value="+t.cm+"]")&&o.one("select[name=cm]").set("value",t.cm),t.e!==undefined&&o.one("select[name=e]").set("value",t.e);if(!M.availability_completion.form.addedEvents){M.availability_completion.form.addedEvents=!0;var u=e.one("#fitem_id_availabilityconditionsjson");u.delegate("change",function(){M.core_availability.form.update()},".availability_completion select")}return o},M.availability_completion.form.fillValue=function(e,t){e.cm=parseInt(t.one("select[name=cm]").get("value"),10),e.e=parseInt(t.one("select[name=e]").get("value"),10)},M.availability_completion.form.fillErrors=function(e,t){var n=parseInt(t.one("select[name=cm]").get("value"),10);n===0&&e.push("availability_completion:error_selectcmid")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
YUI.add("moodle-availability_completion-form",function(e,t){M.availability_completion=M.availability_completion||{},M.availability_completion.form=e.Object(M.core_availability.plugin),M.availability_completion.form.initInner=function(e){this.cms=e},M.availability_completion.form.getNode=function(t){var n=M.str.availability_completion,r=n.title+' <span class="availability-group"><label>'+'<span class="accesshide">'+n.label_cm+" </span>"+'<select name="cm" title="'+n.label_cm+'">'+'<option value="0">'+M.str.moodle.choosedots+"</option>";for(var i=0;i<this.cms.length;i++){var s=this.cms[i];r+='<option value="'+s.id+'">'+s.name+"</option>"}r+='</select></label> <label><span class="accesshide">'+n.label_completion+' </span><select name="e" title="'+n.label_completion+'">'+'<option value="1">'+n.option_complete+"</option>"+'<option value="0">'+n.option_incomplete+"</option>"+'<option value="2">'+n.option_pass+"</option>"+'<option value="3">'+n.option_fail+"</option>"+"</select></label></span>";var o=e.Node.create("<span>"+r+"</span>");t.cm!==undefined&&o.one("select[name=cm] > option[value="+t.cm+"]")&&o.one("select[name=cm]").set("value",""+t.cm),t.e!==undefined&&o.one("select[name=e]").set("value",""+t.e);if(!M.availability_completion.form.addedEvents){M.availability_completion.form.addedEvents=!0;var u=e.one("#fitem_id_availabilityconditionsjson");u.delegate("change",function(){M.core_availability.form.update()},".availability_completion select")}return o},M.availability_completion.form.fillValue=function(e,t){e.cm=parseInt(t.one("select[name=cm]").get("value"),10),e.e=parseInt(t.one("select[name=e]").get("value"),10)},M.availability_completion.form.fillErrors=function(e,t){var n=parseInt(t.one("select[name=cm]").get("value"),10);n===0&&e.push("availability_completion:error_selectcmid")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
@@ -47,10 +47,10 @@ M.availability_completion.form.getNode = function(json) {
// Set initial values.
if (json.cm !== undefined &&
node.one('select[name=cm] > option[value=' + json.cm + ']')) {
node.one('select[name=cm]').set('value', json.cm);
node.one('select[name=cm]').set('value', '' + json.cm);
}
if (json.e !== undefined) {
node.one('select[name=e]').set('value', json.e);
node.one('select[name=e]').set('value', '' + json.e);
}
// Add event handlers (first time only).
+2 -2
View File
@@ -45,10 +45,10 @@ M.availability_completion.form.getNode = function(json) {
// Set initial values.
if (json.cm !== undefined &&
node.one('select[name=cm] > option[value=' + json.cm + ']')) {
node.one('select[name=cm]').set('value', json.cm);
node.one('select[name=cm]').set('value', '' + json.cm);
}
if (json.e !== undefined) {
node.one('select[name=e]').set('value', json.e);
node.one('select[name=e]').set('value', '' + json.e);
}
// Add event handlers (first time only).
@@ -52,8 +52,8 @@ class condition extends \core_availability\condition {
/**
* Constructor.
*
* @param stdClass $structure Data structure from JSON decode
* @throws coding_exception If invalid data structure.
* @param \stdClass $structure Data structure from JSON decode
* @throws \coding_exception If invalid data structure.
*/
public function __construct($structure) {
// Get direction.
@@ -209,4 +209,15 @@ class condition extends \core_availability\condition {
protected static function is_midnight($time) {
return usergetmidnight($time) == $time;
}
public function update_after_restore(
$restoreid, $courseid, \base_logger $logger, $name) {
// Update the date, if restoring with changed date.
$dateoffset = \core_availability\info::get_restore_date_offset($restoreid);
if ($dateoffset) {
$this->time += $dateoffset;
return true;
}
return false;
}
}
@@ -74,7 +74,7 @@ class frontend extends \core_availability\frontend {
* Given a timestamp, obtains corresponding field values.
*
* @param int $time Timestamp
* @return stdClass Object with fields for year, month, day, hour, minute
* @return \stdClass Object with fields for year, month, day, hour, minute
*/
public static function get_fields_from_time($time) {
$calendartype = \core_calendar\type_factory::get_calendar_instance();
@@ -53,7 +53,7 @@ M.availability_date.form.getNode = function(json) {
var fields = Y.JSON.parse(response.responseText);
for (var field in fields) {
var select = node.one('select[name=x\\[' + field + '\\]]');
select.set('value', fields[field]);
select.set('value', '' + fields[field]);
select.set('disabled', false);
}
},
@@ -1 +1 @@
YUI.add("moodle-availability_date-form",function(e,t){M.availability_date=M.availability_date||{},M.availability_date.form=e.Object(M.core_availability.plugin),M.availability_date.form.initInner=function(e,t){this.html=e,this.defaultTime=t},M.availability_date.form.getNode=function(t){var n=M.str.availability_date,r=n.direction_before+' <span class="availability-group">'+'<label><span class="accesshide">'+n.direction_label+" </span>"+'<select name="direction">'+'<option value="&gt;=">'+n.direction_from+"</option>"+'<option value="&lt;">'+n.direction_until+"</option>"+"</select></label></span> "+this.html,i=e.Node.create("<span>"+r+"</span>");if(t.t!==undefined){i.setData("time",t.t),i.all("select:not([name=direction])").each(function(e){e.set("disabled",!0)});var s=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=fromtime"+"&time="+t.t;e.io(s,{on:{success:function(t,n){var r=e.JSON.parse(n.responseText);for(var s in r){var o=i.one("select[name=x\\["+s+"\\]]");o.set("value",r[s]),o.set("disabled",!1)}},failure:function(){window.alert(M.str.availability_date.ajaxerror)}}})}else i.setData("time",this.defaultTime);t.d!==undefined&&i.one("select[name=direction]").set("value",t.d);if(!M.availability_date.form.addedEvents){M.availability_date.form.addedEvents=!0;var o=e.one("#fitem_id_availabilityconditionsjson");o.delegate("change",function(){M.core_availability.form.update()},".availability_date select[name=direction]"),o.delegate("change",function(){M.availability_date.form.updateTime(this.ancestor("span.availability_date"))},".availability_date select:not([name=direction])")}if(i.one("a[href=#]")){M.form.dateselector.init_single_date_selector(i);var u=i.one("select[name=x\\[year\\]]"),a=u.set;u.set=function(e,t){a.call(u,e,t),e==="selectedIndex"&&setTimeout(function(){M.availability_date.form.updateTime(i)},0)}}return i},M.availability_date.form.updateTime=function(t){var n=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=totime"+"&year="+t.one("select[name=x\\[year\\]]").get("value")+"&month="+t.one("select[name=x\\[month\\]]").get("value")+"&day="+t.one("select[name=x\\[day\\]]").get("value")+"&hour="+t.one("select[name=x\\[hour\\]]").get("value")+"&minute="+t.one("select[name=x\\[minute\\]]").get("value");e.io(n,{on:{success:function(e,n){t.setData("time",n.responseText),M.core_availability.form.update()},failure:function(){window.alert(M.str.availability_date.ajaxerror)}}})},M.availability_date.form.fillValue=function(e,t){e.d=t.one("select[name=direction]").get("value"),e.t=parseInt(t.getData("time"),10)}},"@VERSION@",{requires:["base","node","event","io","moodle-core_availability-form"]});
YUI.add("moodle-availability_date-form",function(e,t){M.availability_date=M.availability_date||{},M.availability_date.form=e.Object(M.core_availability.plugin),M.availability_date.form.initInner=function(e,t){this.html=e,this.defaultTime=t},M.availability_date.form.getNode=function(t){var n=M.str.availability_date,r=n.direction_before+' <span class="availability-group">'+'<label><span class="accesshide">'+n.direction_label+" </span>"+'<select name="direction">'+'<option value="&gt;=">'+n.direction_from+"</option>"+'<option value="&lt;">'+n.direction_until+"</option>"+"</select></label></span> "+this.html,i=e.Node.create("<span>"+r+"</span>");if(t.t!==undefined){i.setData("time",t.t),i.all("select:not([name=direction])").each(function(e){e.set("disabled",!0)});var s=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=fromtime"+"&time="+t.t;e.io(s,{on:{success:function(t,n){var r=e.JSON.parse(n.responseText);for(var s in r){var o=i.one("select[name=x\\["+s+"\\]]");o.set("value",""+r[s]),o.set("disabled",!1)}},failure:function(){window.alert(M.str.availability_date.ajaxerror)}}})}else i.setData("time",this.defaultTime);t.d!==undefined&&i.one("select[name=direction]").set("value",t.d);if(!M.availability_date.form.addedEvents){M.availability_date.form.addedEvents=!0;var o=e.one("#fitem_id_availabilityconditionsjson");o.delegate("change",function(){M.core_availability.form.update()},".availability_date select[name=direction]"),o.delegate("change",function(){M.availability_date.form.updateTime(this.ancestor("span.availability_date"))},".availability_date select:not([name=direction])")}if(i.one("a[href=#]")){M.form.dateselector.init_single_date_selector(i);var u=i.one("select[name=x\\[year\\]]"),a=u.set;u.set=function(e,t){a.call(u,e,t),e==="selectedIndex"&&setTimeout(function(){M.availability_date.form.updateTime(i)},0)}}return i},M.availability_date.form.updateTime=function(t){var n=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=totime"+"&year="+t.one("select[name=x\\[year\\]]").get("value")+"&month="+t.one("select[name=x\\[month\\]]").get("value")+"&day="+t.one("select[name=x\\[day\\]]").get("value")+"&hour="+t.one("select[name=x\\[hour\\]]").get("value")+"&minute="+t.one("select[name=x\\[minute\\]]").get("value");e.io(n,{on:{success:function(e,n){t.setData("time",n.responseText),M.core_availability.form.update()},failure:function(){window.alert(M.str.availability_date.ajaxerror)}}})},M.availability_date.form.fillValue=function(e,t){e.d=t.one("select[name=direction]").get("value"),e.t=parseInt(t.getData("time"),10)}},"@VERSION@",{requires:["base","node","event","io","moodle-core_availability-form"]});
@@ -53,7 +53,7 @@ M.availability_date.form.getNode = function(json) {
var fields = Y.JSON.parse(response.responseText);
for (var field in fields) {
var select = node.one('select[name=x\\[' + field + '\\]]');
select.set('value', fields[field]);
select.set('value', '' + fields[field]);
select.set('disabled', false);
}
},
+1 -1
View File
@@ -51,7 +51,7 @@ M.availability_date.form.getNode = function(json) {
var fields = Y.JSON.parse(response.responseText);
for (var field in fields) {
var select = node.one('select[name=x\\[' + field + '\\]]');
select.set('value', fields[field]);
select.set('value', '' + fields[field]);
select.set('disabled', false);
}
},

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