Compare commits

...

315 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 5d35d7b884 Moodle release 3.0.2 2016-01-09 00:49:58 +01:00
Dan Poltawski 7817f82c15 weekly release 3.0.1+ 2016-01-07 08:32:46 +00:00
Dan Poltawski cabf0dbd40 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2016-01-07 08:32:44 +00:00
AMOS bot cd326efb57 Automatically generated installer lang files 2016-01-07 00:04:35 +08:00
Rajesh Taneja 39f2c0f711 MDL-52614 mod_workshop: right align for dir-rtl only 2016-01-06 13:38:15 +08:00
AMOS bot 02dae40716 Automatically generated installer lang files 2016-01-06 00:04:05 +08:00
Dan Poltawski 408beb96d6 Merge branch 'MDL-52503_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2016-01-05 15:30:55 +00:00
Juan Leyva c4e2c3ba9b MDL-52072 enrol: Fix course visibility checks in external functions 2016-01-05 10:31:26 +00:00
David Monllao 4d59af4afa MDL-52503 mod_assign: Removing session cache
Replaced with a global $SESSION var, deferring cleanup to session
destroy.
2016-01-05 17:50:58 +08:00
Andrew Nicols 695ecfc67d Merge branch 'wip-mdl-51881-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-05 14:09:22 +08:00
Rajesh Taneja e02155048a MDL-51881 behat: updated composer pointing to new tag 2016-01-05 14:02:39 +08:00
Rajesh Taneja 0177319237 MDL-51881 behat: Set navbar to be absolutely positioned
All behat drivers are now replicating human behavior
so when the browser scrolls something into view it doesn't account
for fixed positioned elements that end up obscuring the item thus
leading to errors that could be avoided by scrolling an additional amount.
2016-01-05 14:02:39 +08:00
Andrew Nicols e5f8c4d2e3 Merge branch 'MDL-52078-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2016-01-05 13:55:29 +08:00
Cameron Ball edbb4f6e53 MDL-52078 gradebook: Behat tests for hidden grade items. 2016-01-05 13:49:28 +08:00
Peter Miller 07b51eebf3 MDL-52078 gradebook: Stop totals including hidden items.
This patch fixes a problem where the course and user reports, when viewed by
a student, were incorrectly including hidden grade items in the course totals,
making the percentages lower than they should be.
2016-01-05 13:49:28 +08:00
Nadav Kavalerchik 5240013d21 MDL-52625 Badges: Right align manage badges table content, in RTL mode. 2016-01-05 08:12:06 +08:00
Nadav Kavalerchik a0984c46a1 MDL-52614 Workshop: Right align user's picture on Assessed submission. 2016-01-04 18:14:00 +00:00
Dan Poltawski f361d3e20f Merge branch 'MDL-52645-30-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2016-01-04 15:32:05 +00:00
Dan Poltawski b238a8658f Merge branch 'MDL-52576_user_profile_30' of https://github.com/BenKelada/moodle into MOODLE_30_STABLE 2016-01-04 15:06:18 +00:00
Dan Poltawski 4513906883 Merge branch 'wip-mdl-52605-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2016-01-04 13:41:57 +00:00
Dan Poltawski 1052567d7e Merge branch 'MDL-52638_m30v2' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-04 11:36:38 +00:00
Helen Foster 1f43996636 MDL-52645 lang: Merge English strings from the en_fix language pack 2016-01-04 11:37:51 +01:00
Andrew Nicols 0d18a2c74d Merge branch 'MDL-49566_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2016-01-04 13:54:18 +08:00
Dan Poltawski 3302964844 MDL-52552 course management: insufficient cleaning of search output 2016-01-04 10:14:16 +08:00
Stephen Bourget 70d71d3af7 MDL-52638 activity_results: Improve Behat tests 2016-01-03 21:02:35 -05:00
Andrew Nicols 0b841c0c72 Merge branch 'MDL-51445_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2016-01-04 09:21:50 +08:00
Ben Kelada bc66f3d7b2 MDL-52576 forum: fix user profile picture in external service 2016-01-04 11:38:15 +11:00
Mark Nielsen f3008d2a08 MDL-52605 phpunit: Improve get_message_processors reset 2016-01-04 07:52:49 +08:00
Mark Nielsen 7de2aa1a95 MDL-52605 phpunit: Prevent querying database metadata 2016-01-04 07:52:49 +08:00
Rajesh Taneja 69b2e68d27 MDL-52605 phpunit: Check file only if needed 2016-01-04 07:52:49 +08:00
Rajesh Taneja b7327c6c19 MDL-52605 phpunit: Keep track of initial reset sequence 2016-01-04 07:52:48 +08:00
AMOS bot f06196976a Automatically generated installer lang files 2016-01-04 00:04:29 +08:00
Stephen Bourget 44f9a36089 MDL-51445 Chat: Fix broken profile links 2015-12-31 11:08:37 -05:00
Dan Poltawski d92624e11f weekly release 3.0.1+ 2015-12-31 08:16:47 +00:00
Dan Poltawski 2264a0454c Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-31 08:16:45 +00:00
David Monllao 0944647413 MDL-52347 format_social: Replicate wait between new discussions 2015-12-31 13:22:11 +08:00
AMOS bot 8917f657a1 Automatically generated installer lang files 2015-12-31 00:04:00 +08:00
Dan Poltawski 41d53f9bd5 Merge branch 'MDL-50357_30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-30 09:19:35 +00:00
AMOS bot 793d034c4a Automatically generated installer lang files 2015-12-30 00:04:07 +08:00
Michael Aherne 45b9bcd9a0 MDL-52439 assign: correct get_user_submission() phpdoc 2015-12-29 10:38:22 +00:00
Dan Poltawski f45a62e469 Merge branch 'MDL-52275_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-29 10:04:47 +00:00
Mark Nelson 650d4000cb MDL-49566 core: used reflection in unit tests
Also split the tests into multiple functions for each scenario.
2015-12-29 17:44:35 +08:00
Ankit Agarwal a411fd9ad7 MDL-49566 core: Write unittests for MDL-45898 2015-12-29 17:43:51 +08:00
Ankit Agarwal 9c35910821 MDL-49566 myprofile: Fix bugs in myprofilelib 2015-12-29 17:43:02 +08:00
Ankit Agarwal 47e5ed8e30 MDL-49566 notes: Notes link should not show up for guests 2015-12-29 17:43:02 +08:00
David Monllao b2e6bee53e Merge branch 'MDL-51889_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-29 15:35:38 +08:00
Eugene Venter e217f4914a MDL-52530 unittest: more robust capability assignments for guest
for core_files_file_storage_testcase and core_repositorylib_testcase
2015-12-29 14:06:32 +08:00
David Monllao 1ba350d146 Merge branch 'wip-mdl-52347-m30' of git://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-29 14:03:22 +08:00
David Monllao ec921c9d7b Merge branch 'MDL-52591-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-29 13:47:23 +08:00
Mark Nelson ec3be4584c MDL-51889 enrol_guest: always check password before re-enabling 2015-12-29 13:43:32 +08:00
David Monllao e8f73b9edd MDL-52597 mod_forum: Remove duplicated query 2015-12-29 10:04:10 +08:00
David Monllao e9716eda2f Merge branch 'MDL-52597-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2015-12-29 10:01:32 +08:00
AMOS bot df8d12b685 Automatically generated installer lang files 2015-12-29 00:04:08 +08:00
AMOS bot 1c529d9897 Automatically generated installer lang files 2015-12-28 00:04:13 +08:00
AMOS bot 4ac2ded44b Automatically generated installer lang files 2015-12-25 00:04:15 +08:00
Marina Glancy f11ab3b3ed MDL-52347 behat: fix random failures on fast computer 2015-12-24 14:17:52 +08:00
Rajesh Taneja 471b5b73a3 MDL-52606 behat: Added time delay to avoid random fails
If attempts are created at same timestamp, then results are
not same, and lesson module finds that attmpt was in progress.
To avoid this problem, attempts should be created at different
timestamp.
2015-12-24 14:02:16 +08:00
Dan Poltawski ebc7b73150 weekly release 3.0.1+ 2015-12-23 11:36:03 +00:00
Dan Poltawski a06ed7e888 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-23 11:36:00 +00:00
Dan Poltawski 92a25cff43 Merge branch 'MDL-52595-30' of git://github.com/andrewnicols/moodle into MOODLE_30_STABLE 2015-12-23 11:29:09 +00:00
Mark Nelson e5549f4f16 MDL-52275 core: fixed grade-to-pass being overwritten
Thanks goes to W.J. Roes for the patch.
2015-12-23 16:51:26 +08:00
Andrew Nicols 0d4fda7843 MDL-52597 mod_forum: Remove sleep from tests 2015-12-23 14:26:57 +08:00
Andrew Nicols f083859e96 MDL-52595 tests: Disable xdebug for travis runs 2015-12-23 13:15:25 +08:00
Andrew Nicols 29d83deae9 Merge branch 'MDL-52355-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-23 10:05:20 +08:00
Jun Pataleta 2217e2fea9 MDL-52355 mod_data: Added Gregorian hour and minute values 2015-12-23 09:56:46 +08:00
Shamim Rezaie 68927e83e5 MDL-52355 mod_data: Make date field respect the calendar type in use
Updated the date subplugin to consider that the input date element
values might be for any calendar type and not just the Gregorian
calendar.
2015-12-23 09:56:46 +08:00
Shamim Rezaie 819020ac57 MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-23 09:56:46 +08:00
Dan Poltawski 1e5a066247 MDL-52591 grunt: make shifter task respect --no-color 2015-12-22 18:37:48 +00:00
Eloy Lafuente (stronk7) 24a7fc2f07 Merge branch 'MDL-49743-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 17:14:36 +01:00
AMOS bot 03f0b4fc14 Automatically generated installer lang files 2015-12-23 00:04:14 +08:00
Dan Poltawski 17af025b52 Merge branch 'm30_MDL-51916' of https://github.com/danmarsden/moodle into MOODLE_30_STABLE 2015-12-22 13:17:54 +00:00
Dan Poltawski ac56855bbc Merge branch 'MDL-52365_30_new' of git://github.com/mkassaei/moodle into MOODLE_30_STABLE 2015-12-22 13:14:48 +00:00
Eloy Lafuente (stronk7) 6f6ef56253 Merge branch 'MDL-51719-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 13:13:58 +01:00
M Kassaei 79d202c36d MDL-52365 qtype ddwtos & ddimageortext: 20 drag items IE11/Edge 2015-12-22 12:13:23 +00:00
Dan Poltawski 962aca6ad6 MDL-52017 enrol_self: fix incorrect empty statement
Ironically this was detected by causing a syntax error on php54
2015-12-22 09:52:10 +00:00
David Monllao 7473e54a3d Merge branch 'MDL-52017_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-22 16:37:03 +08:00
Andrew Nicols 105370c407 Merge branch 'MDL-52250-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 15:06:58 +08:00
Andrew Nicols 869ffde772 Merge branch 'MDL-23128-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-22 13:11:46 +08:00
Andrew Nicols 73d2934ba5 Merge branch 'MDL-52363_30' of git://github.com/mkassaei/moodle into MOODLE_30_STABLE 2015-12-22 12:34:21 +08:00
David Monllao 74a51dd48a Merge branch 'wip-mdl-52376-m30' of git://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-22 11:25:01 +08:00
David Monllao 9005a3bb96 Merge branch 'MDL-52558-m30' of git://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2015-12-22 11:16:53 +08:00
Rajesh Taneja 6fccd1fe35 MDL-52427 behat: Fixed question selectors
As class is changed, we need to convert selector
to check if class is contained, rather then checking
selecting with specific class.
2015-12-22 10:43:18 +08:00
Andrew Nicols ea78dbdf50 Merge branch 'MDL-52334_30' of git://github.com/aolley/moodle into MOODLE_30_STABLE 2015-12-22 09:14:34 +08:00
Dan Poltawski db3cdb6d25 Merge branch 'MDL-52380-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-21 16:47:21 +00:00
Dan Poltawski ccc297f01a Merge branch 'MDL-52354-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-21 16:44:25 +00:00
Dan Poltawski 8dd7e73294 Merge branch 'MDL-52427_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 13:27:40 +00:00
Dan Poltawski f2087a7fcb Merge branch 'MDL-52402_30' of git://github.com/mr-russ/moodle into MOODLE_30_STABLE 2015-12-21 12:46:20 +00:00
Dan Poltawski b1fe9348db Merge branch 'MDL-52455_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 12:43:53 +00:00
Dan Poltawski c3183cb6fe Merge branch 'MDL-52542_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 11:07:23 +00:00
Mark Nelson d47064c4b2 MDL-50357 core_group: tidy up the function groups_delete_group_members 2015-12-21 17:41:12 +08:00
David Monllao 66a28fbaa4 Merge branch 'MDL-51257-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE 2015-12-21 17:33:05 +08:00
David Monllao d5d7d57d6d Merge branch 'MDL-52429-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2015-12-21 17:17:10 +08:00
David Monllao db3bcaba14 Merge branch 'MDL-49758-30' of git://github.com/StudiUM/moodle into MOODLE_30_STABLE 2015-12-21 17:06:04 +08:00
David Monllao 145467fadf MDL-52226 tests: Fix behat phpunit naming conflict 2015-12-21 08:32:06 +00:00
David Monllao 07021369d7 Merge branch 'MDL-52226-m30' of git://github.com/sammarshallou/moodle into MOODLE_30_STABLE 2015-12-21 14:42:47 +08:00
Andrew Nicols 836172f366 Merge branch 'm30_MDL-50972' of https://github.com/danmarsden/moodle into MOODLE_30_STABLE 2015-12-21 14:03:47 +08:00
Andrew Nicols 2c3d0c3b6f Merge branch 'MDL-52457-30' of git://github.com/jleyva/moodle into MOODLE_30_STABLE 2015-12-21 12:10:58 +08:00
David Monllao 1388dece19 Merge branch 'MDL-47106_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 11:33:09 +08:00
David Monllao 41ec284720 Merge branch 'MDL-52523_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-21 10:48:06 +08:00
Eloy Lafuente (stronk7) 62e799ac84 Moodle release 3.0.1 2015-12-19 19:03:16 +01:00
AMOS bot 2945fe403b Automatically generated installer lang files 2015-12-20 00:05:24 +08:00
Dan Poltawski 6af9a4e21c weekly release 3.0+ 2015-12-18 12:27:09 +00:00
Dan Poltawski 86c5e56baf Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-18 12:27:07 +00:00
sam marshall bde99c5a4b MDL-52558 Data generator: enrol_user should allow shortname 2015-12-18 11:01:30 +00:00
Dan Poltawski abde041907 Merge branch 'MDL-52553_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-18 10:56:31 +00:00
David Monllao bba453b9ed MDL-52553 question: Adding missing required constants 2015-12-18 14:43:31 +08:00
Shamim Rezaie 8abf3701a6 MDL-52380 mod_forum: Non-Gregorian dates in forum advance search
Convert the fromdate and todate date parts to Gregorian before passing them to make_timestamp
2015-12-17 18:04:16 -06:00
Shamim Rezaie d607b840b8 MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-17 18:04:16 -06:00
Shamim Rezaie c65d2ccb13 MDL-52354 select_time: Make select_time respect the set calendar type
The select_time method updated to display form elements in accordance
to the calendar type plugin that is in use.
2015-12-17 15:49:20 -06:00
Eloy Lafuente (stronk7) 9149eaae18 Merge branch 'wip-mdl-52540-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-17 10:18:58 +01:00
Tim Hunt b35e24e254 MDL-52542 qtype_multianswer: field names must match string placeholders 2015-12-17 08:36:34 +00:00
Rajesh Taneja 8a0c8192c8 MDL-52540 behat: mouse events are not handled well with phantomjs 2015-12-17 12:06:06 +08:00
Dan Marsden f5f86a68ac MDL-51916 mod_scorm: allow html5 scorm content fullscreen 2015-12-16 20:28:06 +13:00
Tim Hunt 57b1d3ea85 MDL-52523 backup of subplugins: add missing global 2015-12-15 16:00:23 +00:00
M Kassaei 9611df0f92 MDL-52363 qtype_ddimageortext: Incorrectly sized drag item 2015-12-15 11:21:29 +00:00
Marina Glancy 74c19577c9 MDL-52286 core: mute erros in adodb destructor 2015-12-15 13:11:45 +08:00
AMOS bot c7231d5235 Automatically generated installer lang files 2015-12-15 00:04:13 +08:00
Dan Poltawski 3cf111c8d3 Merge branch 'MDL-52451-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-14 10:46:33 +00:00
Dan Poltawski e0518a0940 Merge branch 'wip-MDL-52286-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-14 10:24:50 +00:00
Marina Glancy b000642c03 MDL-52286 core: corrected version of adodb to 5.20.1 2015-12-14 18:12:17 +08:00
Marina Glancy aae5800486 MDL-52286 core: several fixes to ADOdb 2015-12-14 18:11:48 +08:00
Dan Poltawski 9ef2475cdd Merge branch 'MDL-52499-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-14 09:44:19 +00:00
Dan Poltawski 8513fdd0ba Merge branch 'MDL-52487_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-14 09:23:14 +00:00
David Monllao 19da0bad13 MDL-52487 rss: PHP 7 compatible error supression
PHP5 used to update error_reporting to 0 on functions called with the
suppress errors operator (@). In PHP7 it is not updated.

Credit to Rajesh Taneja
2015-12-14 15:29:34 +08:00
Marina Glancy ff64873ece MDL-52499 core: link to php7 documentation 2015-12-14 12:56:34 +08:00
Marina Glancy 7bd6de4822 MDL-52451 forms: replace deprecated function 2015-12-14 12:43:54 +08:00
Dan Marsden eb127e0b21 MDL-50972 mod_scorm: set autocommit as boolean
var currently passed as string so not evaluated correctly
2015-12-14 14:26:55 +13:00
Matthew Pruett 9797983c6f MDL-47106 quiz 'secure' window: Finish review link did not work 2015-12-13 22:08:53 +00:00
Amanda Doughty 6767a5d631 MDL-52455 quiz: doesn't include all user fields required by messaging 2015-12-13 20:48:52 +00:00
Tim Hunt 1507697d9f MDL-52427 questions: all parts of a Q should be clearfix
Otherwise large floated images may overflow.
2015-12-13 20:32:13 +00:00
Jean-Philippe Gaudreau daf7e2a478 MDL-49758 mod_quiz: Fix require on completionlib.php
Credits: Gordon Bateson
2015-12-11 13:01:56 -05:00
Dan Poltawski 771e49de0c Merge branch 'wip-MDL-52286-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-11 09:16:53 +00:00
David Monllao c19896ff95 Merge branch 'MDL-52472-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-11 16:03:28 +08:00
David Monllao 68494c8ef2 Merge branch 'MDL-52361-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-11 15:20:48 +08:00
David Monllao 0a44e7d8cc MDL-51784 general: Adding missing php4 style constructors
Adding them to maintain backwards compatibility.
2015-12-11 14:56:31 +08:00
Marina Glancy 345f365555 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 13:53:59 +08:00
David Monllao 8079f3343f MDL-52471 setuplib: Removing debugging message from stables 2015-12-11 12:02:00 +08:00
David Monllao 005f7c8b24 Merge branch 'MDL-52471-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-11 11:53:37 +08:00
David Monllao a6f084c9c5 Merge branch 'wip-MDL-52475-m30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-11 11:24:35 +08:00
Tony Levi 0e7a5b346f MDL-52475 core: workaround PHP7 bug #70110 with preg_match 2015-12-11 08:30:37 +08:00
Dan Poltawski 8640c059d8 MDL-52471 tests: simplify setup code
Test code was not using the generator for simple enrollments, couldn't
help to fix when noticed.
2015-12-10 18:00:41 +00:00
Dan Poltawski a3f65f8b5b MDL-52471 completion: fix deprecated use of 'object'
And add a unit test covering completion_can_view_data() without
full course object passed.
2015-12-10 18:00:40 +00:00
Dan Poltawski 88cece4bd7 MDL-52471 quiz: remove broken code question_print_comment_fields() 2015-12-10 18:00:40 +00:00
Dan Poltawski ddfebd633e MDL-52471 setuplib: depreciate class object properly
Previously was marked depricated but not throwwing debugging
2015-12-10 17:57:47 +00:00
Dan Poltawski ac4baac8b9 MDL-52472 travis: remove mongo/memcached testing
At the moment the extensions aren't available in php7 env:
https://github.com/travis-ci/travis-ci/issues/5256

And really its probably not worth the effort/buildtime to
enable them IMO so simpler to just disable.
2015-12-10 17:38:56 +00:00
Dan Poltawski a0ef20cfe4 MDL-52472 travis: enable php7
Relegate 5.6 runs (following the principle of highest and lowest version
only, to conserve travis resources and get faster test completions)
2015-12-10 17:38:55 +00:00
Eloy Lafuente (stronk7) e819a58b6e Merge branch 'MDL-52284-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 16:16:09 +01:00
Dan Poltawski 2adbbcac0a Merge branch 'MDL-52333_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-10 11:03:57 +00:00
Dan Poltawski 4e5e185f80 MDL-52285 auth: Add constructors for backwards compat
These are very unlikely to be used but just to be safe..
2015-12-10 10:36:20 +00:00
Dan Poltawski 68cbd0599d Merge branch 'MDL-52285-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 10:36:14 +00:00
David Monllao 2134746dea Merge branch 'MDL-52336-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 17:40:10 +08:00
David Monllao 4d56fe7d60 Merge branch 'MDL-52081-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 17:15:54 +08:00
David Monllao 1c4bc77d44 MDL-52333: qtype_calculated: Adding division by zero test 2015-12-10 16:40:16 +08:00
Tony Levi bc91b91ab1 MDL-52333 qtype: PHP7-compatibility in calculate_raw()
Code also modified by Tim Hunt
2015-12-10 16:40:08 +08:00
David Monllao 9887a4cbae Merge branch 'MDL-52335-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 15:48:28 +08:00
David Monllao 7d8fb1962e Merge branch 'MDL-52438-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-10 15:32:43 +08:00
David Monllao 07fbf4515c Merge branch 'MDL-52312_m30' of git://github.com/markn86/moodle into MOODLE_30_STABLE 2015-12-10 13:56:43 +08:00
Marina Glancy e81e12cd79 MDL-52285 auth: use __construct() for constructors 2015-12-10 13:51:11 +08:00
Marina Glancy f318ef32bc MDL-52081 forms: indicate usage of grandparent constructor 2015-12-10 13:45:18 +08:00
Marina Glancy 696f3dcc83 MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:45:16 +08:00
Marina Glancy 804a5f59ce MDL-52284 core: PHP7 engine errors have type Throwable 2015-12-10 10:50:12 +08:00
Tony Levi 3f45d8fece MDL-52284 core: compatibility with Exception/Throwable changes in PHP7 2015-12-10 10:50:12 +08:00
AMOS bot dfe989c826 Automatically generated installer lang files 2015-12-10 00:04:26 +08:00
Juan Leyva ed6277f9f7 MDL-52457 mod_scorm: Fix return types definitions in SCORM WS
Incorrect return types definitions in external function
mod_scorm_external::get_scorm_by_courses (hidetoc, displayattemptstatus
and skipview)
2015-12-09 14:07:10 +01:00
sam marshall 48db0e02cd MDL-52226 Forms: max_input_vars problems with advanced checkbox 2015-12-09 12:17:13 +00:00
Dan Poltawski 6ace0f59ae weekly release 3.0+ 2015-12-09 12:09:37 +00:00
Dan Poltawski fbf528eb95 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-09 12:09:36 +00:00
Eloy Lafuente (stronk7) 220ea7cd09 Merge branch 'MDL-51483_30' of https://github.com/jinhofer/moodle into MOODLE_30_STABLE 2015-12-09 02:22:39 +01:00
Adam Olley 7f1c642112 MDL-52334 enrol_database: Add missing filter to user_enrolment lookup
Without the user filter, the left join to the user enrolment table
results in a much larger set of data being returned than before
MDL-28420. Which makes login time for users in many busy courses much
worse than before (3x worse on average, observed upto 40x).
2015-12-09 09:26:33 +10:30
Dan Poltawski 6530c22a11 Merge branch 'MDL-51097_m30v1' of https://github.com/sbourget/moodle into MOODLE_30_STABLE 2015-12-08 10:07:46 +00:00
Dan Poltawski ab37a1c815 Merge branch 'MDL-51411_30' of https://github.com/andrewhancox/moodle into MOODLE_30_STABLE 2015-12-08 09:05:47 +00:00
Marina Glancy 75b13bba36 MDL-52438 core: allow Moodle 3.0 to be used with PHP7 2015-12-08 12:54:54 +08:00
Marina Glancy 2cebc825e9 MDL-52361 core: patch Horde library for PHP7 compatibility 2015-12-08 12:48:21 +08:00
Marina Glancy ffe7dd3769 MDL-52336 core: patch PHPExcel for PHP7 compatibility 2015-12-08 12:14:15 +08:00
Marina Glancy f41205a84c MDL-52286 core: update ADODB library to 5.21 2015-12-08 12:04:05 +08:00
Mark Nelson 3046ae85cc MDL-52312 assignfeedback_editpdf: changes to files after FPDI update
1) Change the fpdi_bridge class so that it extends the pdf class,
rather than the TCPDF class.
2) Updated the editpdf/fpdi/readme_moodle.txt file to document the changes.
3) Updated the editpdf/thirdpartylibs.xml to reflect the update to the
FPDI library.
2015-12-08 11:41:22 +08:00
Mark Nelson 536892fd4c MDL-52312 assignfeedback_editpdf: updated the FPDI libary to 1.6.1 2015-12-08 11:41:22 +08:00
Marina Glancy 2cae0d3b15 MDL-52193 questions: add missing require_once 2015-12-07 15:38:02 +00:00
jinhofer bdb1cab348 MDL-51483 lib/moodlelib.php: Added conditional checks to shorten_text 2015-12-07 09:21:26 -06:00
Juan Leyva d08bcc4ded MDL-52429 mod_scorm: Fix SCORM completion checking in nested SCOs 2015-12-07 11:29:43 +01:00
Dan Poltawski 2f1473ac6d Merge branch 'MDL-50258_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-07 09:04:39 +00:00
David Monllao 899f21fc26 Merge branch 'MDL-52204-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-07 16:35:09 +08:00
Dan Poltawski c60a3ef656 Merge branch 'MDL-52304_30' of https://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-12-07 08:21:35 +00:00
Dan Poltawski 8262d6133a MDL-52271 install: don't allow installer to be indexed
Following guidance from:
https://support.google.com/webmasters/answer/93710?hl=en
2015-12-07 15:42:47 +08:00
David Monllao e662941230 Merge branch 'MDL-52370-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-07 15:02:03 +08:00
Russell Smith 89feea07d3 MDL-52402 backup, quiz: Fix attempt token and add missing rule. 2015-12-05 10:11:36 +11:00
Russell Smith 9c2784ca30 MDL-52402 backup: Improve debugging output on failed log restores 2015-12-05 10:11:35 +11:00
Dan Poltawski e18b4b0918 MDL-51582 readme: update less building instructions
I forgot to update this after the changes in 490c5cabb4
2015-12-04 16:41:24 +00:00
Eloy Lafuente (stronk7) 14d8971cd6 Merge branch 'MDL-51582-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-04 17:15:20 +01:00
AMOS bot 7c8149d6af Automatically generated installer lang files 2015-12-05 00:04:37 +08:00
Dan Poltawski 096a908dbe MDL-52250 npm: shrinkwrap to lock down dependencies
We've tried various approaches to lock down our dependencies and they
have been flawed because dependencies in our included packages may not
be locked down and previous attempts to do that have not been correct.

With npm shrinkwrap we lock down versions so that any npm install will
always install the exact same versions for all developers - see:
https://docs.npmjs.com/cli/shrinkwrap

(This is a lot like composer.lock for those more fluent with composer)
2015-12-04 15:35:33 +00:00
Dan Poltawski 68dfa89fea MDL-52250 npm: remove uglify-js dependency/bump grunt-contrib-uglify
A) Remove direct dependency on uglify-js:

This dependency was added in MDL-50277, but it isn't quite correct, the
way npm installs dependencies means that grunt-contrib-uglify *could* use
'our' version if its satisifed. But does not *always* and especially does
not if the grunt-contrib-uglify requirement is higher than ours.

Long story short, in many cases this means that this is used:
 node_modules/grunt-contrib-uglify/node_modules/uglify-js
But this is not:
  node_modules/uglify-js

In MDL-50277 we thought we were making the version sticky, but in
reality we were just fixing previous problems by updating
grunt-contrib-uglify to a version which fixed a bug:

 https://github.com/gruntjs/grunt-contrib-uglify/issues/313

It seems the better solution will come with using npm shrinkwrap to lock
down depdencies.

B) Bump grunt-contrib-uglify to 0.11.0

This moves us to uglify-js ~2.6.0 - which doens't change any output
files.
2015-12-04 15:34:16 +00:00
Dan Poltawski e64751fb8a MDL-52204 grunt: update to grunt-contrib-jshint v0.11.3
This version of grunt-contrib-jshint itself uses a better fixed
requirement on "~2.8.0" rather than "^2.8.0" which was giving variable
results with some people updating to 2.9-rc1.

See also https://github.com/gruntjs/grunt-contrib-jshint/pull/219
2015-12-04 11:40:28 +00:00
Dan Poltawski 490c5cabb4 MDL-51582 grunt: task improvements
* Introduce the 'css' task - this will give us flexibility to do things
  in future rather than relying on the inbuilt 'less' task (e.g. sourcemap
  generating task which doesn't run by default)

* Introduce 'amd' task which runs only amd tasks

* Introduce 'js' task which runs all JS (amd/shifter) tasks

* Tweak the ordering so that slow shifter always runs last (useful for
  people like me who forget to specif the task)
2015-12-04 10:45:24 +00:00
Dan Poltawski 4269cac414 MDL-51582 css: built with new grunt task 2015-12-04 10:45:24 +00:00
Dan Poltawski cd319f3f2f MDL-51582 grunt: add less complilation support
Previously we were using recess to build bootstrap base as it was what
was used by the original project. But recess is no longer maintained.

Now we use grunt for building js, it makes sense to use it for less too.

(If you really don't want to use grunt, you almost certainly can just
use lessc -x as it uses the same less.js on backend).
2015-12-04 10:44:54 +00:00
Michael Aherne da14ce45dd MDL-52304 media: Allow full screen in Flash player 2015-12-04 10:06:52 +08:00
David Monllao 818f90abd3 MDL-50258 themes: Fix CSS source maps 2015-12-04 09:02:57 +08:00
Eloy Lafuente (stronk7) 13ce9a38a2 weekly release 3.0+ 2015-12-03 19:41:23 +01:00
Eloy Lafuente (stronk7) d5699018b0 Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-12-03 19:41:17 +01:00
Eloy Lafuente (stronk7) fbb8579c1a MDL-52141 backup: test restore_log_rule don't modify passed log anymore 2015-12-03 19:01:48 +01:00
David Monllao f248c81e5a Merge branch 'MDL-48004-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-03 19:01:47 +01:00
Andrew Nicols 7d05696b12 Merge branch 'wip-mdl-52357-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-12-03 19:01:46 +01:00
David Monllao 716c7536cb Merge branch 'MDL-50710-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-12-03 19:01:45 +01:00
AMOS bot 4cdf94a602 Automatically generated installer lang files 2015-12-04 00:04:23 +08:00
Mark Nelson c9f2b241e0 MDL-52017 enrol_self: always check password before re-enabling 2015-12-03 19:26:56 +08:00
David Monllao 8dbe8449e0 Merge branch 'MDL-52260-30-2' of git://github.com/xow/moodle into MOODLE_30_STABLE 2015-12-03 11:53:13 +01:00
Eloy Lafuente (stronk7) 4841169211 Merge branch 'MDL-45364-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-12-03 11:53:12 +01:00
Dan Poltawski 3fe4b72c34 MDL-35982 behat: fix incorrectly backported test
Due to alterations with release/freeze, the lang string change
didn't get backported to 3.x, but the behat did.
2015-12-03 11:53:12 +01:00
Dan Poltawski 3c1e7a0759 MDL-52292 testing: block generator fix
Stop errors when no $options supplied
2015-12-03 11:53:11 +01:00
Dan Poltawski 98ad5c6191 Merge branch 'MDL-52292_30' of git://github.com/timhunt/moodle into MOODLE_30_STABLE 2015-12-03 11:53:10 +01:00
Dan Poltawski 0872bf3175 MDL-26935 behat: add coverage for role renaming in course 2015-12-03 11:53:10 +01:00
Russell Smith 6e8ca8a6ce MDL-52141 backup: Ensure we don't alter the log record when parsing it. 2015-12-03 11:53:09 +01:00
Dan Poltawski e2de9c6b6d Merge branch 'MDL-37308-30' of git://github.com/junpataleta/moodle into MOODLE_30_STABLE 2015-12-03 11:53:09 +01:00
Tony Levi 59b25acd22 MDL-51757 mod_scorm: Remove duplicate function param
convert invalid break calls to exceptions for PHP 7
2015-12-03 11:53:08 +01:00
Rajesh Taneja af145cdac1 MDL-52376 behat: Add 1 sec delay to ensure cron works
course completion record should be created at time
which is before the time cron is run. On fast machine
this both might be done at same time. So added 1 sec delay
2015-12-03 13:17:49 +08:00
Cameron Ball bf68d558af MDL-51257 messages: Improve message form.
- Add sudmit button
- Add formchangechecker
- Update behat tests
2015-12-03 10:23:43 +08:00
Marina Glancy f3d159dea1 MDL-52335 tool_uploaduser: php7 compatibility in variable syntax 2015-12-03 09:33:24 +08:00
Marina Glancy 3af4f54efb MDL-52335 mod_data: php7 compatibility in variable syntax 2015-12-03 09:33:24 +08:00
Marina Glancy 6698b06b11 MDL-52335 mod_lti: php7 compatibility in variable syntax 2015-12-03 09:33:24 +08:00
Marina Glancy 545d2c9290 MDL-52335 core: php7 compatibility in XMPP library 2015-12-03 09:33:24 +08:00
Tim Hunt 7cac3f6fe9 MDL-52292 block testing generators: improve the API
* Refactor the block generator base class, to remove the amount
  of duplication required in base classes.

* Change the defaults that are filled in to be a little more natural.

* Make the Behat step 'Given the following "block" exist:' work.
2015-12-01 13:49:24 +00:00
Dan Poltawski db198f615a MDL-52370 role: purge coursecontacts when role is edited
This is perhaps a bit more brutal purge than you'd like, but it only
affects coursecat role edits.
2015-12-01 13:14:55 +00:00
Dan Poltawski bbf7cf2c44 MDL-52370 course: purge contacts cache on role rename
Previously teachers would rename roles and the change would not be
reflected in course listings.
2015-12-01 13:14:54 +00:00
Rajesh Taneja 0f62dd32c7 MDL-52357 behat: add 2 sec delay to ensure window is stable 2015-12-01 15:46:30 +08:00
Ryan Wyllie 67e82ebe0b MDL-52042 autocomplete: close suggestion box
Close the suggestion box when the input loses focus for more
than half a second.
2015-11-30 13:21:07 +00:00
Dan Poltawski ac16eaa936 Merge branch 'MDL-52283-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-11-30 11:27:50 +00:00
Dan Poltawski bfe6b3cdd1 Merge branch 'MDL-52332-30' of git://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-11-30 10:22:52 +00:00
David Monllao f1bf39c2f8 Merge branch 'MDL-35982-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-30 15:46:25 +08:00
Marina Glancy 6064114c32 MDL-52332 calendar: load settings using API 2015-11-30 11:47:09 +08:00
Rajesh Taneja e0d74e610a MDL-52279 core_lib: Remove php4 style constructor
filterobject is called from core and as it's
using php4 style constructor, global USER is
not set properly because of deprecation warning
2015-11-30 11:31:33 +08:00
Jun Pataleta 8948d04695 MDL-37308 files: Additional fixes for transparency
Fixed transparency support when resizing and when not resizing.
2015-11-29 20:28:23 -06:00
Jetha Chan 9993c6bcc0 MDL-37308 files: support transparency when not resizing; new unit test 2015-11-29 20:28:23 -06:00
Adrian Greeve 1da82165ef MDL-37308 files: convert_image() now supports transparency. 2015-11-29 20:28:23 -06:00
Marina Glancy cf139e224e MDL-50710 block_glossary_random: more precise sorting 2015-11-30 09:17:03 +08:00
AMOS bot f8bce590ba Automatically generated installer lang files 2015-11-28 00:04:50 +08:00
Dan Poltawski 715eb9438c MDL-51719 atto_rtl: RTL/LTR buttons now indicate state
Previously the RTL buttons did not indiciate wether RTL or LTR was
selected. Thanks to Andrew Nicols for guiding how to do this.
2015-11-27 14:10:18 +00:00
John Okely 9c461eae4e MDL-52260 user: Fix error when saving profile with locked field 2015-11-27 11:02:45 +08:00
Tony Levi fe6a3c0531 MDL-52283 core: password_hash() deprecation in PHP7 2015-11-27 09:13:08 +08:00
Dan Poltawski 793c80165d MDL-45364 ddimageortext: refine naming & docs of new methods 2015-11-26 19:50:03 +00:00
Andrew Nicols a4f457e111 MDL-45364 qtype_ddimageortext: Fix JS Lint issues 2015-11-26 19:50:03 +00:00
Andrew Nicols 4110561f3e MDL-45364 atto_rtl: Fix JS lint 2015-11-26 19:50:03 +00:00
Dan Poltawski b1549e4127 MDL-48004 question: prevent notices on import screen
If query params were not passed the page would previously display debug
notices as setting the $requirecourseid param to question_edit_setup()
was buggy.
2015-11-26 15:03:43 +00:00
Dan Poltawski 724513e5d8 MDL-35982 behat: delete blog entry coverage 2015-11-26 14:12:22 +00:00
Dan Poltawski c14fbe69f5 MDL-35982 blog: reorder blog delete confirmation
Improves accessibility to be ordered logically in page
2015-11-26 14:12:00 +00:00
Dan Poltawski 8b4e2418f6 MDL-35982 blog: prevent index throwing errors with 0 courseid
Regression from MDL-49845 where Dave made the page not handle courseid = 0
and so now some urls will send you back to a db error..
2015-11-26 14:11:59 +00:00
David Monllao 8568798f76 weekly release 3.0+ 2015-11-26 10:54:50 +08:00
David Monllao 66533b249e Merge branch 'install_30_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_30_STABLE 2015-11-26 10:54:48 +08:00
Dan Poltawski e5baddebcd MDL-23128 tex: silence dvips output
This was causing spewwing of lots of messages to the error log..

Thanks to Fred Woolard for the suggestion
2015-11-25 17:07:40 +00:00
AMOS bot 0efd3318b2 Automatically generated installer lang files 2015-11-26 00:04:31 +08:00
Dan Poltawski 16acfc55f4 MDL-49743 singleview: slightly clarify logic
Make it clearer what the 'unset' behaviour is because previously
we've set the default for 'empty' values twice.
2015-11-25 15:12:02 +00:00
Conn 31328e3ede MDL-49743 singleview: Prevent errors when no itemid was selected
Signed-off-by: Conn <conn@cmrwarwicker.com>
2015-11-25 15:12:02 +00:00
Andrew Hancox c83c1ee838 MDL-51411 course: Fixed warning when deleting activity with js disabled 2015-11-25 14:39:59 +00:00
Eloy Lafuente (stronk7) 95f83b70b0 MDL-52291 questions: fix upgrade from 2.5 and earlier
Because of some changes performed to the multichoice qtype
for Moodle 2.6, older sites are not able to upgrade properly.

This commits does introduce DB introspection to decide which
table and column names must be used. Nasty but enough.

Note MDL-52298 has been created about to avoid/minimize the
chances of this happening again.
2015-11-25 11:23:34 +00:00
Frederic Massart 53253aea3a MDL-52160 navigation: Mark category and module settings nodes as branch 2015-11-25 13:13:05 +08:00
AMOS bot c244cd14b7 Automatically generated installer lang files 2015-11-25 00:04:24 +08:00
David Monllao a1b7cd7090 Merge branch 'MDL-44330-m30' of git://github.com/NeillM/moodle into MOODLE_30_STABLE 2015-11-24 17:03:42 +08:00
David Monllao e4ffce07cf Merge branch 'MDL-45934-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-24 16:55:56 +08:00
Neill Magill 6b4ce43d1d MDL-44330 Assign: Assignment grading may not display expected student
Before this patch it was possible for the student displayed on the grading page to
not be the student that the user selected to grade. This would occur if:

1) The user had the table ordered by a value that could be modified,
   for example Last modified (submission), Grade, Last modified (grade)
2) Another user performed an action that was recorded in Moodle in the time
   between the user generating the table and clicking on a grade link.

If a user did not notice a different user had been loaded it could result in them giving
a grade to the incorrect user.

This patch ensures that the state of the table is cached every time it is viewed by a user
who has the capability to grade.
2015-11-24 08:41:27 +00:00
Rajesh Taneja 107ab59c29 MDL-50163 behat: wait to ensure elements are placed properly by js. 2015-11-24 12:25:16 +08:00
David Monllao 4cd0bc7ece MDL-52095 themes: Padding to the left on RTL langs 2015-11-23 19:30:56 +01:00
Eloy Lafuente (stronk7) 42952482c9 Merge branch 'MDL-52185-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 19:27:03 +01:00
AMOS bot 3804a59fb6 Automatically generated installer lang files 2015-11-24 00:04:33 +08:00
Dan Poltawski 174faea612 Merge branch 'wip-mdl-51063-m30' of https://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE 2015-11-23 11:33:51 +00:00
Tim Hunt dec56ff204 MDL-52166 gradebook: overview report fails with separate groups 2015-11-23 09:44:25 +00:00
David Monllao c6d3f0d107 Merge branch 'MDL-52214-30-crawler' of git://github.com/mudrd8mz/moodle into MOODLE_30_STABLE 2015-11-23 17:01:51 +08:00
David Mudrák 8f36db0be5 MDL-52214 core: Fix case sensitivity in user agent comparison
The previous 2.9 implementation of is_web_crawler() used stripos() in
certain cases. The unit tests re-added in the previous commit revealed
that certain crawlers (such as BaiDuSpider) were not correctly detected
in the new refactored implementation.

It seems lesser evil and safe enough to use /i in the regex search even
though it is not 100% same logic as before - as stripos() was used in
some cases only, not always.
2015-11-23 09:43:20 +01:00
David Mudrák f554e04a27 MDL-52214 core: Fix the is_web_crawler() regression
In MDL-50891, the is_web_crawler() was refactored into a core_useragent
method and the function itself was deprecated. However, there were no
unit tests kept to check the backwards compatible behaviour. It turned
out that the deprecated function leads to PHP fatal error due to a typo.

This patch fixes the typo and brings back the previous unit tests. To be
able to explicitly check the raised debugging message, the test case
now must be subclass of advanced_testcase.

Additionally fixes missing info about the function being deprecated.
2015-11-23 09:42:27 +01:00
David Monllao 20c532caf8 Merge branch 'MDL-52180-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 16:40:38 +08:00
David Monllao a1b0938c16 Merge branch 'MDL-52086-30' of git://github.com/bostelm/moodle into MOODLE_30_STABLE 2015-11-23 16:10:42 +08:00
Vadim Dvorovenko 3e1da76d54 MDL-52029 installer: Unstyled installer if display_errors is on
Error in MDL-43839 solution caused inclusion of unexistent file in
install/css.php.
2015-11-23 15:44:12 +08:00
David Monllao e3dcc260fb Merge branch 'MDL-52160-30' of git://github.com/FMCorz/moodle into MOODLE_30_STABLE 2015-11-23 14:09:36 +08:00
David Monllao ae50bef5e6 Merge branch 'MDL-49490-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 13:55:48 +08:00
David Monllao 1b1e4d2670 Merge branch 'MDL-43069-30' of git://github.com/danpoltawski/moodle into MOODLE_30_STABLE 2015-11-23 13:32:57 +08:00
Dan Poltawski c31a650aad MDL-37834 assign: avoid newlines in status column of csv
Previously we were generating a CSV file with newlines in it, which
seems to cause problems importing into some versions of MS Excel.

Instead seperate status lines by '-' - this column is only used to
provide context to the teacher in the spreadsheet.
2015-11-20 18:36:49 +00:00
AMOS bot 76943b900c Automatically generated installer lang files 2015-11-21 00:04:19 +08:00
AMOS bot c05a3e254c Automatically generated installer lang files 2015-11-20 00:04:20 +08:00
AMOS bot 63385ff2b5 Merge branch 'MOODLE_30_STABLE' into install_30_STABLE 2015-11-20 00:04:20 +08:00
AMOS bot 42d7bc64f5 Automatically generated installer lang files 2015-11-19 19:14:29 +08:00
Dan Poltawski f0aa5b7e3b weekly release 3.0+ 2015-11-19 09:20:30 +00:00
Marina Glancy 40e33b6e75 MDL-52203 qtype_multianswer: avoid fatal error during upgrade 2015-11-19 09:45:28 +01:00
David Monllao e06768b331 MDL-42571 editpdf: Fix search comments
They are also hidden instead of destroyed.
2015-11-19 07:06:37 +00:00
Dan Poltawski ab58f3ee49 Merge branch 'wip-MDL-52194-m30' of https://github.com/marinaglancy/moodle into MOODLE_30_STABLE 2015-11-19 06:49:52 +00:00
Dan Poltawski 6a30312beb Merge branch 'MDL-52162_30' of git://github.com/dmonllao/moodle into MOODLE_30_STABLE 2015-11-19 06:34:35 +00:00
David Monllao 8c4dbdfd56 MDL-42571 editpdf: Fix comments search and multiple views drawing 2015-11-19 12:56:55 +08:00
Stephen Bourget e9b0443000 MDL-51097 Lesson: allow resume from within a cluster 2015-11-18 23:20:57 -05:00
Henning Bostelmann fab5233096 MDL-52086 output renderers: show subtree only when tab is activated 2015-11-18 16:18:59 +00:00
Pavel Sokolov 2748bf5900 MDL-43069 assign: prevent JS error on grading table
Previously submission comments failed to expand if you hid
the file submissions column.
2015-11-18 15:42:56 +00:00
Dan Poltawski 2adf914723 MDL-45934 backup: do not reset completion enabled flag
The 'completion enabled' flag does not reflect any course data, its a
course setting. Previously when doing a backup deleteting existing
course content this was forced off when it should not have been.
2015-11-18 11:56:30 +00:00
Dan Poltawski 96a2e4086f MDL-49490 assign: can't export to portfolio on non-submission 2015-11-18 09:10:45 +00:00
Marina Glancy a2d94f3d20 MDL-52194 flowplayer: do not check request
$_REQUEST variable may contain cookies in some php configurations. See also MDL-48085
2015-11-18 15:36:48 +08:00
David Monllao 33784bd64b MDL-52162 question: Removing unnecessary dependency
APIs dependencies were correctly removed during MDL-38214 review although
this unnecessary require remained here.

Credit to Marina Glancy.
2015-11-18 13:18:09 +08:00
Rajesh Taneja 4e5efb5c0c MDL-50163 behat: Return subcontext from session
Creating a new context with new mink context
with different session was keeping the session
and was not returning proper session information
2015-11-18 12:19:19 +08:00
rajesh Taneja 5cb434f62b MDL-50163 behat: Restart session after scenario with switch_window
Restart session after a scenario with switch window
is finished. This will close all open browser windows
and open a new browser window
2015-11-18 12:19:15 +08:00
Dan Poltawski 6117291e6b Merge branch 'MDL-52140_30' of git://github.com/stronk7/moodle into MOODLE_30_STABLE 2015-11-17 16:27:52 +00:00
Eloy Lafuente (stronk7) 4e342f5397 MDL-52140 upgrade: add 3.0.0 separation line to all upgrade scripts 2015-11-17 17:11:15 +01:00
Dan Poltawski 6b85e6affd MDL-52185 report: remove ugly bullet points 2015-11-17 15:33:03 +00:00
Dan Poltawski e71116f768 MDL-52180 travis: remove weekly release checker
To prevent false positives
2015-11-17 09:40:30 +00:00
Dan Poltawski a0172a28fc MDL-51988 behat: Add coverage of participation report messaging 2015-11-17 10:23:00 +08:00
Dan Poltawski 60020ccaa9 MDL-51988 behat: select a table by <th> tag 2015-11-17 10:22:59 +08:00
Dan Poltawski 3987e19c3f MDL-51988 report_particiption: do not allow messaging when disabled
Previously the option to send messages when presented regardless of the
site setting.
2015-11-17 10:22:58 +08:00
Russell Smith 2068b31847 MDL-50700 gradereport_overview: Call $PAGE->set_course
To ensure correct blocks are displayed.
2015-11-17 10:02:51 +08:00
Dan Poltawski 9a5f3f7672 MDL-46049 chat: update calendar times on repeating chat sessions
Previously were using the invalid chat id and the calendar entry was not
updated.

Thanks to Andy McGill who worked this out.
2015-11-17 08:55:34 +08:00
Dan Poltawski 75aa0f73db MDL-46049 chat: add missing closing parenthesis 2015-11-17 08:55:32 +08:00
Syam Mohan 2efce29560 MDL-52021 enrollib: Removed repeated capability
'moodle/role:assign' replicated in the permission checking
2015-11-16 16:21:35 +00:00
Frederic Massart a4c6ffd85f MDL-52160 navigation: Really remove module settings empty nodes 2015-11-16 19:44:28 +08:00
Dan Poltawski 184169cd76 MDL-47065 notes: prevent empty spaces added as note
(And updated behat test for this test case)
2015-11-16 15:21:00 +08:00
Jun Pataleta 55d5b4168e MDL-47065 behat: improve verificaton of lack of note 2015-11-16 15:15:25 +08:00
Dan Poltawski 6ccff3ba5d MDL-47065 notes: don't add blank notes
Previously the logic was wrong and was proceeding to add a note
when content was missing.

Also add behat coverage for adding notes to participants (this test is
not perfect, but better than zero coverage we had before).
2015-11-16 15:15:24 +08:00
David Monllao 44f23c7ec1 Merge branch 'MDL-41643-master' of git://github.com/jojoob/moodle into MOODLE_30_STABLE 2015-11-16 14:54:30 +08:00
Dan Poltawski 492b025f5f MDL-50687 phpunit: error early if required locale not installed 2015-11-16 14:26:29 +08:00
Frederic Massart 7f98e36008 MDL-50564 atto: Require atto_menu in atto_plugin 2015-11-16 14:20:41 +08:00
David Monllao f53c016704 Merge branch 'MDL-42571' of git://github.com/blaky/moodle into MOODLE_30_STABLE
Conflicts:
	mod/assign/feedback/editpdf/version.php
2015-11-16 13:41:15 +08:00
Johannes Burk 64b9afa6a5 MDL-41643 datafield_checkbox: Add line breaks behind checkbox options.
Add line a break behind each checkbox option in advanced search.
2015-11-14 13:48:20 +01:00
Bence Laky da91de7821 MDL-42571 assignfeedback_editpdf: Fixed second PDF view 2015-11-12 14:16:17 +00:00
629 changed files with 14734 additions and 6942 deletions
+10 -42
View File
@@ -12,21 +12,12 @@ notifications:
language: php
php:
# Moodle supports versions 5.4, 5.5, and 5.6 of PHP.
# Order by fastest to slowest.
# We currently only run the highest and lowest versions to reduce the load on travis-ci.org.
- 5.6
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.0
# - 5.6
# - 5.5
- 5.4
# We hope to offer PHP 7 support in the near future.
- nightly
services:
# Ensure that memcached and mongodb are running for testing of those MUC stores.
- memcached
- mongodb
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
# start first so that the total run time is not too high.
@@ -50,34 +41,26 @@ matrix:
# It will not stop the jobs from running.
fast_finish: true
# Always allow failure on nightly.
# It's a nightly build and failures can happen.
allow_failures:
- php: nightly
exclude:
# PHP 7 is not yet supported for actual runs.
# Exclude it by default - we include it for CITEST only later.
- php: nightly
# MySQL - it's just too slow.
# Exclude it on all versions except for 5.6.
# Exclude it on all versions except for 7.0
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
# php: 5.6
#
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
# php: 5.5
- env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
php: 5.4
include:
# Attempt to run the CITEST set on PHP 7.
- php: nightly
env: DB=none PHPUNIT=false INSTALL=false CITEST=true
cache:
directories:
- $HOME/.composer/cache
install:
# Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
- rm /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# Set the encrypted GITHUB_TOKEN if it's available to raise the API limit.
- if [ -n "$GITHUB_APITOKEN" ]; then composer config github-oauth.github.com $GITHUB_APITOKEN; fi
@@ -86,10 +69,6 @@ install:
# Typically it should be able to use the Composer cache if any other job has already completed before we started here.
- travis_retry composer install --prefer-dist --no-interaction
- echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
before_script:
- >
if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ];
@@ -144,9 +123,6 @@ before_script:
sed -i \
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
-e "/require_once/i define('TEST_CACHESTORE_MEMCACHE_TESTSERVERS', '127.0.0.1:11211');" \
-e "/require_once/i define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211');" \
-e "/require_once/i define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://localhost:27017');" \
config.php ;
# Initialise PHPUnit for Moodle.
@@ -191,14 +167,6 @@ script:
export phpcmd=`which php`;
fi
- >
if [ "$CITEST" = "true" -a "$GIT_PREVIOUS_COMMIT" != "$UPSTREAM_FETCH_HEAD" ];
then
# This is a CI test, but it is based on an older weekly release.
# Warn in a way that will fail the test.
echo "Current commit is based on an older weekly release" && false;
fi
# Actually run the CI Tests - do this outside of the main test to make output clearer.
- >
if [ "$CITEST" = 'true' ];
+25 -6
View File
@@ -50,6 +50,17 @@ module.exports = function(grunt) {
}
)
}
},
less: {
bootstrapbase: {
files: {
"theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
"theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
},
options: {
compress: true
}
}
}
});
@@ -103,6 +114,10 @@ module.exports = function(grunt) {
args.push('--lint-stderr');
}
if (grunt.option('no-color')) {
args.push('--color=false');
}
var execShifter = function() {
shifter = exec("node", args, {
@@ -208,13 +223,11 @@ module.exports = function(grunt) {
grunt.task.run('shifter');
// Are we in an AMD directory?
} else if (path.basename(cwd) == 'amd') {
grunt.task.run('jshint');
grunt.task.run('uglify');
grunt.task.run('amd');
} else {
// Run them all!.
grunt.task.run('shifter');
grunt.task.run('jshint');
grunt.task.run('uglify');
grunt.task.run('css');
grunt.task.run('js');
}
};
@@ -222,9 +235,15 @@ module.exports = function(grunt) {
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
// Register the shifter task.
// Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
grunt.registerTask('amd', ['jshint', 'uglify']);
grunt.registerTask('js', ['amd', 'shifter']);
// Register CSS taks.
grunt.registerTask('css', ['less:bootstrapbase']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
-1
View File
@@ -1434,7 +1434,6 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -422,6 +422,12 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
} else {
// Updating role.
$DB->update_record('role', $this->role);
// This will ensure the course contacts cache is purged so name changes get updated in
// the UI. It would be better to do this only when we know that fields affected are
// updated. But thats getting into the weeds of the coursecat cache and role edits
// should not be that frequent, so here is the ugly brutal approach.
coursecat::role_assignment_changed($this->role->id, context_system::instance());
}
// Assignable contexts.
@@ -424,9 +424,9 @@ Feature: Set up contextual data for tests
And the following "grade categories" exist:
| fullname | course |
| Grade category 1 | C1 |
And the following "grade items" exist:
| itemname | course | outcome | gradecategory |
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following "grade items" exist:
| itemname | course | outcome | gradecategory |
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
@@ -441,3 +441,15 @@ Feature: Set up contextual data for tests
And I expand all fieldsets
And "//div[contains(@class, 'fitem')]/div[contains(@class, 'fitemtitle')]/div[contains(@class, fstaticlabel) and contains(., 'Grade category')]/../../div[contains(@class, 'felement') and contains(., 'Grade category 1')]" "xpath_element" should exist
And I press "Cancel"
Scenario: Add a block
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| online_users | Course | C1 | course-view-* | site-pre |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
Then I should see "Online users"
+3
View File
@@ -54,5 +54,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -52,5 +52,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -42,5 +42,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -120,5 +120,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -56,5 +56,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -232,8 +232,8 @@ if ($formdata = $mform2->is_cancelled()) {
if (isset($USER->$key) and is_array($USER->$key)) {
// this must be some hacky field that is abusing arrays to store content and format
$user->$key = array();
$user->$key['text'] = $value;
$user->$key['format'] = FORMAT_MOODLE;
$user->{$key['text']} = $value;
$user->{$key['format']} = FORMAT_MOODLE;
} else {
$user->$key = trim($value);
}
@@ -1,4 +1,4 @@
@core @core_admin @_file_upload
@tool @tool_uploaduser @_file_upload
Feature: Upload users
In order to add users to the system
As an admin
@@ -39,3 +39,25 @@ Feature: Upload users
And I follow "Groups"
And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones"
@javascript
Scenario: Upload users with custom profile fields
# Create user profile field.
Given I log in as "admin"
And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
And I set the field "datatype" to "Text area"
And I set the following fields to these values:
| Short name | superfield |
| Name | Super field |
And I click on "Save changes" "button"
# Upload users.
When I navigate to "Upload users" node in "Site administration > Users > Accounts"
And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
And I press "Upload users"
And I press "Upload users"
# Check that users were created and the superfield is filled.
And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
And I follow "Tom Jones"
And I should see "Super field"
And I should see "The big guy"
And I log out
+8 -1
View File
@@ -39,13 +39,20 @@ class auth_plugin_cas extends auth_plugin_ldap {
/**
* Constructor.
*/
function auth_plugin_cas() {
public function __construct() {
$this->authtype = 'cas';
$this->roleauth = 'auth_cas';
$this->errorlogtag = '[AUTH CAS] ';
$this->init_plugin($this->authtype);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_cas() {
self::__construct();
}
function prevent_local_passwords() {
return true;
}
+3
View File
@@ -74,5 +74,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+19 -1
View File
@@ -309,7 +309,7 @@ class auth_db_testcase extends advanced_testcase {
require_once($CFG->libdir.'/password_compat/lib/password.php');
set_config('passtype', 'saltedcrypt', 'auth/db');
$auth->config->passtype = 'saltedcrypt';
$user3->pass = password_hash('heslo', PASSWORD_BCRYPT, array('salt' => 'best_salt_ever_moodle_rocks_dont_tell'));
$user3->pass = password_hash('heslo', PASSWORD_BCRYPT);
$DB->update_record('auth_db_users', $user3);
$this->assertTrue($auth->user_login('u3', 'heslo'));
@@ -381,4 +381,22 @@ class auth_db_testcase extends advanced_testcase {
$this->cleanup_auth_database();
}
/**
* Testing the function _colonscope() from ADOdb.
*/
public function test_adodb_colonscope() {
global $CFG;
require_once($CFG->libdir.'/adodb/adodb.inc.php');
require_once($CFG->libdir.'/adodb/drivers/adodb-odbc.inc.php');
require_once($CFG->libdir.'/adodb/drivers/adodb-db2ora.inc.php');
$this->resetAfterTest(false);
$sql = "select * from table WHERE column=:1 AND anothercolumn > :0";
$arr = array('b', 1);
list($sqlout, $arrout) = _colonscope($sql,$arr);
$this->assertEquals("select * from table WHERE column=? AND anothercolumn > ?", $sqlout);
$this->assertEquals(array(1, 'b'), $arrout);
}
}
+8 -1
View File
@@ -34,11 +34,18 @@ class auth_plugin_email extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_email() {
public function __construct() {
$this->authtype = 'email';
$this->config = get_config('auth/email');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_email() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -37,11 +37,18 @@ class auth_plugin_fc extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_fc() {
public function __construct() {
$this->authtype = 'fc';
$this->config = get_config('auth/fc');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_fc() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+7 -1
View File
@@ -30,7 +30,7 @@ class fcFPP
var $_debug = FALSE; // set to true to see some debug info
// class constructor
function fcFPP($host="localhost", $port="3333")
public function __construct($host="localhost", $port="3333")
{
$this->_hostname = $host;
$this->_port = $port;
@@ -38,6 +38,12 @@ class fcFPP
$this->_pwd = "";
}
function fcFPP($host="localhost", $port="3333")
{
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
self::__construct($host, $port);
}
// open a connection to the FirstClass server
function open()
{
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_imap extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_imap() {
public function __construct() {
$this->authtype = 'imap';
$this->config = get_config('auth/imap');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_imap() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -143,13 +143,20 @@ class auth_plugin_ldap extends auth_plugin_base {
/**
* Constructor with initialisation.
*/
function auth_plugin_ldap() {
public function __construct() {
$this->authtype = 'ldap';
$this->roleauth = 'auth_ldap';
$this->errorlogtag = '[AUTH LDAP] ';
$this->init_plugin($this->authtype);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_ldap() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+3
View File
@@ -64,5 +64,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+8 -1
View File
@@ -46,13 +46,20 @@ class auth_plugin_manual extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_manual() {
public function __construct() {
$this->authtype = 'manual';
$config = get_config(self::COMPONENT_NAME);
$legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
$this->config = (object)array_merge((array)$legacyconfig, (array)$config);
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_manual() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist. (Non-mnet accounts only!)
+3
View File
@@ -56,5 +56,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+8 -1
View File
@@ -35,12 +35,19 @@ class auth_plugin_mnet extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_mnet() {
public function __construct() {
$this->authtype = 'mnet';
$this->config = get_config('auth_mnet');
$this->mnet = get_mnet_environment();
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_mnet() {
self::__construct();
}
/**
* This function is normally used to determine if the username and password
* are correct for local logins. Always returns false, as local users do not
+3
View File
@@ -56,5 +56,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_nntp extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_nntp() {
public function __construct() {
$this->authtype = 'nntp';
$this->config = get_config('auth/nntp');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_nntp() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -35,10 +35,17 @@ class auth_plugin_nologin extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_nologin() {
public function __construct() {
$this->authtype = 'nologin';
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_nologin() {
self::__construct();
}
/**
* Do not allow any login.
*
+8 -1
View File
@@ -34,11 +34,18 @@ class auth_plugin_none extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_none() {
public function __construct() {
$this->authtype = 'none';
$this->config = get_config('auth/none');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_none() {
self::__construct();
}
/**
* Returns true if the username and password work or don't exist and false
* if the user exists and the password is wrong.
+8 -1
View File
@@ -53,12 +53,19 @@ class auth_plugin_pam extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_pam() {
public function __construct() {
$this->authtype = 'pam';
$this->config = get_config('auth/pam');
$this->errormessage = '';
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_pam() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_pop3 extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_pop3() {
public function __construct() {
$this->authtype = 'pop3';
$this->config = get_config('auth/pop3');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_pop3() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -38,11 +38,18 @@ class auth_plugin_radius extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_radius() {
public function __construct() {
$this->authtype = 'radius';
$this->config = get_config('auth/radius');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_radius() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -38,11 +38,18 @@ class auth_plugin_shibboleth extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_shibboleth() {
public function __construct() {
$this->authtype = 'shibboleth';
$this->config = get_config('auth/shibboleth');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_shibboleth() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+8 -1
View File
@@ -35,11 +35,18 @@ class auth_plugin_webservice extends auth_plugin_base {
/**
* Constructor.
*/
function auth_plugin_webservice() {
public function __construct() {
$this->authtype = 'webservice';
$this->config = get_config('auth/webservice');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function auth_plugin_webservice() {
self::__construct();
}
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
+9 -2
View File
@@ -18,13 +18,20 @@ class cssparser {
private $css;
private $html;
function cssparser($html = true) {
public function __construct($html = true) {
// Register "destructor"
core_shutdown_manager::register_function(array(&$this, "finalize"));
$this->html = ($html != false);
$this->Clear();
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function cssparser($html = true) {
self::__construct($html);
}
function finalize() {
unset($this->css);
}
@@ -258,4 +265,4 @@ class cssparser {
}
return $result;
}
}
}
@@ -97,7 +97,10 @@ class restore_log_rule implements processable {
return $this->module . '-' . $this->action;
}
public function process($log) {
public function process($inputlog) {
// There might be multiple rules that process this log, we can't alter it in the process of checking it.
$log = clone($inputlog);
// Reset the allpairs array
$this->allpairs = array();
@@ -89,11 +89,12 @@ class restore_logs_processor {
}
// Arrived here log is empty, no rule was able to perform the conversion, log the problem
if (empty($newlog)) {
self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored', backup::LOG_DEBUG);
self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored. ' .
json_encode($log), backup::LOG_DEBUG);
}
} else { // Action not found log the problem
self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored', backup::LOG_DEBUG);
self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored. '.json_encode($log), backup::LOG_DEBUG);
$newlog = false;
}
@@ -0,0 +1,52 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package core_backup
* @category test
* @copyright 2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
class backup_restore_log_rule_testcase extends basic_testcase {
function test_process_keeps_log_unmodified() {
// Prepare a tiny log entry.
$originallog = new stdClass();
$originallog->url = 'original';
$originallog->info = 'original';
$log = clone($originallog);
// Process it with a tiny log rule, only modifying url and info.
$lr = new restore_log_rule('test', 'test', 'changed', 'changed');
$result = $lr->process($log);
// The log has been processed.
$this->assertEquals('changed', $result->url);
$this->assertEquals('changed', $result->info);
// But the original log has been kept unmodified by the process() call.
$this->assertEquals($originallog, $log);
}
}
@@ -183,6 +183,10 @@ abstract class backup_structure_step extends backup_step {
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $multiple, $plugintype = null, $pluginname = null) {
global $CFG;
// This global declaration is required, because where we do require_once($backupfile);
// That file may in turn try to do require_once($CFG->dirroot ...).
// That worked in the past, we should keep it working.
// Verify if this is a BC call for an activity backup. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
@@ -313,6 +313,10 @@ abstract class restore_structure_step extends restore_step {
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $plugintype = null, $pluginname = null) {
global $CFG;
// This global declaration is required, because where we do require_once($backupfile);
// That file may in turn try to do require_once($CFG->dirroot ...).
// That worked in the past, we should keep it working.
// Verify if this is a BC call for an activity restore. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
@@ -126,6 +126,9 @@ class backp_settings_testcase extends basic_testcase {
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
} catch (TypeError $e) {
// On PHP7+ we get a TypeError raised, lets check we've the right error.
$this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
}
restore_error_handler();
@@ -140,6 +143,9 @@ class backp_settings_testcase extends basic_testcase {
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
} catch (TypeError $e) {
// On PHP7+ we get a TypeError raised, lets check we've the right error.
$this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
}
restore_error_handler();
@@ -302,6 +308,9 @@ class backp_settings_testcase extends basic_testcase {
} catch (exception $e) {
$this->assertTrue($e instanceof backup_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
} catch (TypeError $e) {
// On PHP7+ we get a TypeError raised, lets check we've the right error.
$this->assertRegexp('/must be an instance of base_setting/', $e->getMessage());
}
restore_error_handler();
+66
View File
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/badgeslib.php');
require_once($CFG->dirroot . '/badges/lib.php');
class core_badges_badgeslib_testcase extends advanced_testcase {
protected $badgeid;
@@ -472,4 +473,69 @@ class core_badges_badgeslib_testcase extends advanced_testcase {
$this->assertStringMatchesFormat($testassertion->class, json_encode($assertion->get_badge_class()));
$this->assertStringMatchesFormat($testassertion->issuer, json_encode($assertion->get_issuer()));
}
/**
* Tests the core_badges_myprofile_navigation() function.
*/
public function test_core_badges_myprofile_navigation() {
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$badge = new badge($this->badgeid);
$badge->issue($this->user->id, true);
$iscurrentuser = true;
$course = null;
// Enable badges.
set_config('enablebadges', true);
// Check the node tree is correct.
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
}
/**
* Tests the core_badges_myprofile_navigation() function with badges disabled..
*/
public function test_core_badges_myprofile_navigation_badges_disabled() {
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$badge = new badge($this->badgeid);
$badge->issue($this->user->id, true);
$iscurrentuser = false;
$course = null;
// Disable badges.
set_config('enablebadges', false);
// Check the node tree is correct.
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayNotHasKey('localbadges', $nodes->getValue($tree));
}
/**
* Tests the core_badges_myprofile_navigation() function with a course badge.
*/
public function test_core_badges_myprofile_navigation_with_course_badge() {
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$badge = new badge($this->coursebadge);
$badge->issue($this->user->id, true);
$iscurrentuser = false;
// Check the node tree is correct.
core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $this->course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
}
}
@@ -0,0 +1,111 @@
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I navigate to "Scales" node in "Grade administration"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_modgrade_type | Scale |
| id_modgrade_scale | My Scale |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
Scenario: Configure the block on the course page to show 1 high score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes"
Then I should see "Student 1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using full names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
And I press "Save changes"
Then I should see "Student 1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "Student 2" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Student 3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display only ID numbers |
And I press "Save changes"
Then I should see "User S1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "User S2" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "User S3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Anonymous results |
And I press "Save changes"
Then I should see "User" in the "Activity results" "block"
And I should not see "Student 1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should not see "Student 2" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should not see "Student 3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
@@ -0,0 +1,153 @@
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I navigate to "Scales" node in "Grade administration"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_modgrade_type | Scale |
| id_modgrade_scale | My Scale |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "Good" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
Scenario: Try to configure the block on the course page to show 1 high score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group 1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I should see "Student 1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using full names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group 1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "Group 2" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Group 3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student3"
And I follow "Course 1"
And I should see "Student 3" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Student 4" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I should see "User S1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "User S2" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I should see "User" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
@javascript
Scenario: Configure the block on the course page to show 1 high score
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Scenario: Configure the block on the course page to show 1 high score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
Then I should see "Group 1" in the "Activity results" "block"
And I should see "95%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 high score as a fraction
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
@@ -124,37 +93,8 @@ Feature: The activity results block displays student scores
And I should see "Student 1" in the "Activity results" "block"
And I should see "100.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
@@ -171,37 +111,8 @@ Feature: The activity results block displays student scores
And I should see "Student 1" in the "Activity results" "block"
And I should see "100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores as percentages
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -225,37 +136,8 @@ Feature: The activity results block displays student scores
And I should see "Student 2" in the "Activity results" "block"
And I should see "90%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores as fractions
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -278,37 +160,8 @@ Feature: The activity results block displays student scores
And I should see "Student 4" in the "Activity results" "block"
And I should see "80.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -331,37 +184,8 @@ Feature: The activity results block displays student scores
And I should see "Student 2" in the "Activity results" "block"
And I should see "90.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -382,37 +206,8 @@ Feature: The activity results block displays student scores
And I should see "User S2" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
@javascript
Scenario: Configure the block on the course page to show 1 high score
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Scenario: Configure the block on the course page to show 1 high score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
Then I should see "Group 1" in the "Activity results" "block"
And I should see "95%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 high score as a fraction
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
@@ -122,37 +91,8 @@ Feature: The activity results block displays student scores
And I should see "Group 1" in the "Activity results" "block"
And I should see "95.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 1 |
@@ -167,37 +107,8 @@ Feature: The activity results block displays student scores
And I should see "Group 1" in the "Activity results" "block"
And I should see "95.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores as percentages
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -217,37 +128,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores as fractions
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -266,37 +148,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -315,37 +168,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -362,37 +186,8 @@ Feature: The activity results block displays student scores
And I should see "85.00%" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 3 |
@@ -0,0 +1,112 @@
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I navigate to "Scales" node in "Grade administration"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_modgrade_type | Scale |
| id_modgrade_scale | My Scale |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
Scenario: Configure the block on the course page to show 1 low score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes"
Then I should see "Student 5" in the "Activity results" "block"
And I should see "Not good enough" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple low scores using full names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_nameformat | Display full names |
And I press "Save changes"
Then I should see "Student 5" in the "Activity results" "block"
And I should see "Not good enough" in the "Activity results" "block"
And I should see "Student 4" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
And I should see "Student 3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_nameformat | Display only ID numbers |
And I press "Save changes"
Then I should see "User S5" in the "Activity results" "block"
And I should see "Not good enough" in the "Activity results" "block"
And I should see "User S4" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
And I should see "User S3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_nameformat | Anonymous results |
And I press "Save changes"
Then I should see "User" in the "Activity results" "block"
And I should not see "Student 5" in the "Activity results" "block"
And I should see "Not good enough" in the "Activity results" "block"
And I should not see "Student 4" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
And I should not see "Student 3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
@@ -0,0 +1,150 @@
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I navigate to "Scales" node in "Grade administration"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_modgrade_type | Scale |
| id_modgrade_scale | My Scale |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "Good" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
Scenario: Try to configure the block on the course page to show 1 low score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group 3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student5"
And I follow "Course 1"
And I should see "Student 6" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using full names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group 2" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Group 3" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student3"
And I follow "Course 1"
And I should see "Student 3" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Student 4" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student5"
And I follow "Course 1"
And I should see "User S5" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I should see "User S6" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes"
Then I should see "Group" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student5"
And I follow "Course 1"
And I should see "User" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
@javascript
Scenario: Configure the block on the course page to show 1 low score
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Scenario: Configure the block on the course page to show 1 low score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
Then I should see "Group 3" in the "Activity results" "block"
And I should see "75%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 low score as a fraction
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -124,37 +93,8 @@ Feature: The activity results block displays student scores
And I should see "Student 6" in the "Activity results" "block"
And I should see "70.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 low score as a absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -171,37 +111,8 @@ Feature: The activity results block displays student scores
And I should see "Student 6" in the "Activity results" "block"
And I should see "70.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores as percentages
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -223,37 +134,8 @@ Feature: The activity results block displays student scores
And I should see "Student 5" in the "Activity results" "block"
And I should see "80%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores as fractions
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -274,37 +156,8 @@ Feature: The activity results block displays student scores
And I should see "Student 4" in the "Activity results" "block"
And I should see "80.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -325,37 +178,8 @@ Feature: The activity results block displays student scores
And I should see "Student 6" in the "Activity results" "block"
And I should see "70.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -375,37 +199,8 @@ Feature: The activity results block displays student scores
And I should see "User S2" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
@javascript
Scenario: Configure the block on the course page to show 1 low score
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Scenario: Configure the block on the course page to show 1 low score
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
Then I should see "Group 3" in the "Activity results" "block"
And I should see "75%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 low score as a fraction
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -122,37 +91,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show 1 low score as a absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -167,37 +107,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores as percentages
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -219,37 +130,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores as fractions
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -266,37 +148,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00/100.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -313,37 +166,8 @@ Feature: The activity results block displays student scores
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
@@ -359,37 +183,8 @@ Feature: The activity results block displays student scores
And I should see "85.00%" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
@javascript
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
Given I log in as "teacher1"
And I follow "Course 1"
And I expand "Users" node
And I follow "Groups"
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I add "Student 2 (student2@example.com)" user to "Group 1" group members
And I add "Student 3 (student3@example.com)" user to "Group 2" group members
And I add "Student 4 (student4@example.com)" user to "Group 2" group members
And I add "Student 5 (student5@example.com)" user to "Group 3" group members
And I add "Student 6 (student6@example.com)" user to "Group 3" group members
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
And I follow "Course 1"
And I add the "Activity results" block
Given I add the "Activity results" block
When I configure the "Activity results" block
And I set the following fields to these values:
| id_config_showbest | 0 |
+3
View File
@@ -79,5 +79,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -79,5 +79,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -79,5 +79,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -69,5 +69,8 @@ function xmldb_block_community_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -76,5 +76,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -80,5 +80,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -54,7 +54,7 @@ class block_edit_form extends moodleform {
global $CFG;
$this->block = $block;
$this->page = $page;
parent::moodleform($actionurl);
parent::__construct($actionurl);
}
function definition() {
@@ -84,14 +84,13 @@ class block_glossary_random extends block_base {
$limitfrom = 0;
$limitnum = 1;
$BROWSE = 'timemodified';
$orderby = 'timemodified ASC';
switch ($this->config->type) {
case BGR_RANDOMLY:
$i = rand(1,$numberofentries);
$limitfrom = $i-1;
$SORT = 'ASC';
break;
case BGR_NEXTONE:
@@ -104,11 +103,10 @@ class block_glossary_random extends block_base {
$i = 1;
}
$limitfrom = $i-1;
$SORT = 'ASC';
break;
case BGR_NEXTALPHA:
$BROWSE = 'concept';
$orderby = 'concept ASC';
if (isset($this->config->previous)) {
$i = $this->config->previous + 1;
} else {
@@ -118,20 +116,19 @@ class block_glossary_random extends block_base {
$i = 1;
}
$limitfrom = $i-1;
$SORT = 'ASC';
break;
default: // BGR_LASTMODIFIED
$i = $numberofentries;
$limitfrom = 0;
$SORT = 'DESC';
$orderby = 'timemodified DESC, id DESC';
break;
}
if ($entry = $DB->get_records_sql("SELECT id, concept, definition, definitionformat, definitiontrust
FROM {glossary_entries}
WHERE glossaryid = ? AND approved = 1
ORDER BY $BROWSE $SORT", array($this->config->glossary), $limitfrom, $limitnum)) {
ORDER BY $orderby", array($this->config->glossary), $limitfrom, $limitnum)) {
$entry = reset($entry);
+3
View File
@@ -56,5 +56,8 @@ function xmldb_block_html_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -81,5 +81,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -36,31 +36,6 @@ defined('MOODLE_INTERNAL') || die();
*/
class block_online_users_generator extends testing_block_generator {
/**
* Create new block instance
* @param array|stdClass $record
* @param array $options
* @return stdClass activity record with extra cmid field
*/
public function create_instance($record = null, array $options = null) {
global $DB, $CFG;
require_once("$CFG->dirroot/mod/page/locallib.php");
$this->instancecount++;
$record = (object)(array)$record;
$options = (array)$options;
$record = $this->prepare_record($record);
$id = $DB->insert_record('block_instances', $record);
context_block::instance($id);
$instance = $DB->get_record('block_instances', array('id'=>$id), '*', MUST_EXIST);
return $instance;
}
/**
* Create (simulated) logged in users and add some of them to groups in a course
*/
+3
View File
@@ -104,5 +104,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -90,5 +90,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -50,5 +50,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
upgrade_block_savepoint(true, 2015071700, 'rss_client');
}
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -36,7 +36,7 @@ class feed_edit_form extends moodleform {
function __construct($actionurl, $isadding, $caneditshared) {
$this->isadding = $isadding;
$this->caneditshared = $caneditshared;
parent::moodleform($actionurl);
parent::__construct($actionurl);
}
function definition() {
+12 -4
View File
@@ -40,7 +40,7 @@ class block_rss_client_cron_testcase extends advanced_testcase {
* than the current time the attempt is skipped.
*/
public function test_skip() {
global $DB;
global $DB, $CFG;
$this->resetAfterTest();
// Create a RSS feed record with a skip until time set to the future.
$record = (object) array(
@@ -57,8 +57,12 @@ class block_rss_client_cron_testcase extends advanced_testcase {
$block = new block_rss_client();
ob_start();
// Silence SimplePie php notices.
@$block->cron();
$errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
$block->cron();
error_reporting($errorlevel);
$cronoutput = ob_get_clean();
$this->assertContains('skipping until ' . userdate($record->skipuntil), $cronoutput);
$this->assertContains('0 feeds refreshed (took ', $cronoutput);
@@ -68,7 +72,7 @@ class block_rss_client_cron_testcase extends advanced_testcase {
* Test that when a feed has an error the skip time is increaed correctly.
*/
public function test_error() {
global $DB;
global $DB, $CFG;
$this->resetAfterTest();
$time = time();
// A record that has failed before.
@@ -113,8 +117,12 @@ class block_rss_client_cron_testcase extends advanced_testcase {
// Run the cron.
$block = new block_rss_client();
ob_start();
// Silence SimplePie php notices.
@$block->cron();
$errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
$block->cron();
error_reporting($errorlevel);
$cronoutput = ob_get_clean();
$skiptime1 = $record->skiptime * 2;
$message1 = 'http://example.com/rss Error: could not load/find the RSS feed - skipping for ' . $skiptime1 . ' seconds.';
+3
View File
@@ -92,5 +92,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -80,5 +80,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -81,5 +81,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+5 -4
View File
@@ -141,14 +141,15 @@ if ($action === 'delete') {
// Output edit mode title.
echo $OUTPUT->heading($strblogs . ': ' . get_string('deleteentry', 'blog'), 2);
echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'),
new moodle_url('edit.php', $optionsyes),
new moodle_url('index.php', $optionsno));
echo '<br />';
// Output the entry.
$entry->prepare_render();
echo $output->render($entry);
echo '<br />';
echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'),
new moodle_url('edit.php', $optionsyes),
new moodle_url('index.php', $optionsno));
echo $OUTPUT->footer();
die;
}
+2 -2
View File
@@ -63,9 +63,9 @@ if ($entryid and !isset($userid)) {
$userid = $entry->userid;
}
if (isset($userid) && !isset($courseid)) {
if (isset($userid) && empty($courseid)) {
$context = context_user::instance($userid);
} else if (isset($courseid) && $courseid != SITEID) {
} else if (!empty($courseid) && $courseid != SITEID) {
$context = context_course::instance($courseid);
} else {
$context = context_system::instance();
+43
View File
@@ -0,0 +1,43 @@
@core @core_blog
Feature: Delete a blog entry
In order to manage my blog entries
As a user
I need to be able to delete entries I no longer wish to appear
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
And I log in as "testuser"
And I expand "Site pages" node
And I follow "Site blogs"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | Blog post one |
| Blog entry body | User 1 blog post content |
And I press "Save changes"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | Blog post two |
| Blog entry body | User 1 blog post content |
And I press "Save changes"
And I am on site homepage
And I expand "Site pages" node
And I follow "Site blogs"
Scenario: Delete blog post results in post deleted
Given I follow "Blog post one"
And I follow "Delete"
And I should see "Delete this blog entry?"
When I press "Continue"
Then I should not see "Blog post one"
And I should see "Blog post two"
Scenario: Delete confirmation screen works and allows cancel
Given I follow "Blog post one"
When I follow "Delete"
Then I should see "Delete this blog entry?"
And I press "Cancel"
And I should see "Blog post one"
And I should see "Blog post two"
@@ -30,7 +30,7 @@ require_once($CFG->dirroot . '/blog/lib.php');
/**
* Test functions that rely on the DB tables
*/
class core_bloglib_testcase extends advanced_testcase {
class core_blog_lib_testcase extends advanced_testcase {
private $courseid;
private $cmid;
@@ -472,5 +472,73 @@ class core_bloglib_testcase extends advanced_testcase {
$this->assertEquals($url, $event->get_url());
$this->assertEventContextNotUsed($event);
}
/**
* Tests the core_blog_myprofile_navigation() function.
*/
public function test_core_blog_myprofile_navigation() {
global $USER;
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$iscurrentuser = true;
$course = null;
// Enable blogs.
set_config('enableblogs', true);
// Check the node tree is correct.
core_blog_myprofile_navigation($tree, $USER, $iscurrentuser, $course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayHasKey('blogs', $nodes->getValue($tree));
}
/**
* Tests the core_blog_myprofile_navigation() function as a guest.
*/
public function test_core_blog_myprofile_navigation_as_guest() {
global $USER;
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$iscurrentuser = false;
$course = null;
// Set user as guest.
$this->setGuestUser();
// Check the node tree is correct.
core_blog_myprofile_navigation($tree, $USER, $iscurrentuser, $course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayNotHasKey('blogs', $nodes->getValue($tree));
}
/**
* Tests the core_blog_myprofile_navigation() function when blogs are disabled.
*/
public function test_core_blog_myprofile_navigation_blogs_disabled() {
global $USER;
// Set up the test.
$tree = new \core_user\output\myprofile\tree();
$this->setAdminUser();
$iscurrentuser = false;
$course = null;
// Disable blogs.
set_config('enableblogs', false);
// Check the node tree is correct.
core_blog_myprofile_navigation($tree, $USER, $iscurrentuser, $course);
$reflector = new ReflectionObject($tree);
$nodes = $reflector->getProperty('nodes');
$nodes->setAccessible(true);
$this->assertArrayNotHasKey('blogs', $nodes->getValue($tree));
}
}
@@ -41,12 +41,9 @@ Feature: Allow teachers to manually mark users as complete when configured
And I follow "View course report"
And I should see "Student First"
And I follow "Click to mark user complete"
# Running cron just after clicking sometimes fail, so navigate back
# and ensure the student completion is updated before running cron.
And I am on site homepage
And I follow "Completion course"
And I follow "View course report"
And "//img[contains(@alt, 'Completed')]" "xpath_element" should exist in the "student1" "table_row"
# Running cron just after clicking sometimes fail, as record
# should be created before the cron runs.
And I wait "1" seconds
And I trigger cron
And I am on site homepage
And I log out
+1 -1
View File
@@ -2,6 +2,6 @@
"require-dev": {
"phpunit/phpunit": "4.8.*",
"phpunit/dbUnit": "1.4.*",
"moodlehq/behat-extension": "1.30.1"
"moodlehq/behat-extension": "1.30.2"
}
}
Generated
+189 -119
View File
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "85888280993254379afb3dd9a13fbf48",
"content-hash": "2660fb1bd1498fa3f4f106caede044f4",
"hash": "14326394ae10e01040808e94f1dd15b1",
"content-hash": "cab7cffb6f9057c428c3ad41e61548ac",
"packages": [],
"packages-dev": [
{
@@ -663,16 +663,16 @@
},
{
"name": "moodlehq/behat-extension",
"version": "v1.30.1",
"version": "v1.30.2",
"source": {
"type": "git",
"url": "https://github.com/moodlehq/moodle-behat-extension.git",
"reference": "7882d9331de46327c430b1572111e722378ab941"
"reference": "89c0eb601d75bb60d77cb03b2ad09846265c604e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/7882d9331de46327c430b1572111e722378ab941",
"reference": "7882d9331de46327c430b1572111e722378ab941",
"url": "https://api.github.com/repos/moodlehq/moodle-behat-extension/zipball/89c0eb601d75bb60d77cb03b2ad09846265c604e",
"reference": "89c0eb601d75bb60d77cb03b2ad09846265c604e",
"shasum": ""
},
"require": {
@@ -686,6 +686,7 @@
"symfony/browser-kit": "2.7.5",
"symfony/css-selector": "2.7.5",
"symfony/dom-crawler": "2.7.5",
"symfony/filesystem": "2.7.5",
"symfony/finder": "2.7.5"
},
"type": "library",
@@ -712,7 +713,7 @@
"Behat",
"moodle"
],
"time": "2015-10-06 02:38:45"
"time": "2016-01-05 02:43:00"
},
{
"name": "phpdocumentor/reflection-docblock",
@@ -884,16 +885,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "2.2.3",
"version": "2.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f"
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef1ca6835468857944d5c3b48fa503d5554cff2f",
"reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
"shasum": ""
},
"require": {
@@ -942,7 +943,7 @@
"testing",
"xunit"
],
"time": "2015-09-14 06:51:16"
"time": "2015-10-06 15:47:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -1124,16 +1125,16 @@
},
{
"name": "phpunit/phpunit",
"version": "4.8.10",
"version": "4.8.21",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "463163747474815c5ccd4ae12b5b355ec12158e8"
"reference": "ea76b17bced0500a28098626b84eda12dbcf119c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/463163747474815c5ccd4ae12b5b355ec12158e8",
"reference": "463163747474815c5ccd4ae12b5b355ec12158e8",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c",
"reference": "ea76b17bced0500a28098626b84eda12dbcf119c",
"shasum": ""
},
"require": {
@@ -1192,7 +1193,7 @@
"testing",
"xunit"
],
"time": "2015-10-01 09:14:30"
"time": "2015-12-12 07:45:58"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -1316,28 +1317,28 @@
},
{
"name": "sebastian/diff",
"version": "1.3.0",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
"reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
"phpunit/phpunit": "~4.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"dev-master": "1.4-dev"
}
},
"autoload": {
@@ -1360,24 +1361,24 @@
}
],
"description": "Diff implementation",
"homepage": "http://www.github.com/sebastianbergmann/diff",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff"
],
"time": "2015-02-22 15:13:53"
"time": "2015-12-08 07:14:41"
},
{
"name": "sebastian/environment",
"version": "1.3.2",
"version": "1.3.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "6324c907ce7a52478eeeaede764f48733ef5ae44"
"reference": "6e7133793a8e5a5714a551a8324337374be209df"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44",
"reference": "6324c907ce7a52478eeeaede764f48733ef5ae44",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df",
"reference": "6e7133793a8e5a5714a551a8324337374be209df",
"shasum": ""
},
"require": {
@@ -1414,7 +1415,7 @@
"environment",
"hhvm"
],
"time": "2015-08-03 06:14:51"
"time": "2015-12-02 08:37:27"
},
{
"name": "sebastian/exporter",
@@ -1484,16 +1485,16 @@
},
{
"name": "sebastian/global-state",
"version": "1.0.0",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01"
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
"shasum": ""
},
"require": {
@@ -1531,20 +1532,20 @@
"keywords": [
"global state"
],
"time": "2014-10-06 09:23:50"
"time": "2015-10-12 03:26:01"
},
{
"name": "sebastian/recursion-context",
"version": "1.0.1",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "994d4a811bafe801fb06dccbee797863ba2792ba"
"reference": "913401df809e99e4f47b27cdd781f4a258d58791"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba",
"reference": "994d4a811bafe801fb06dccbee797863ba2792ba",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
"reference": "913401df809e99e4f47b27cdd781f4a258d58791",
"shasum": ""
},
"require": {
@@ -1584,7 +1585,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2015-06-21 08:04:50"
"time": "2015-11-11 19:50:13"
},
{
"name": "sebastian/version",
@@ -1678,35 +1679,35 @@
},
{
"name": "symfony/config",
"version": "v2.7.5",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "9698fdf0a750d6887d5e7729d5cf099765b20e61"
"reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/9698fdf0a750d6887d5e7729d5cf099765b20e61",
"reference": "9698fdf0a750d6887d5e7729d5cf099765b20e61",
"url": "https://api.github.com/repos/symfony/config/zipball/17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2",
"reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"symfony/filesystem": "~2.3"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
"symfony/filesystem": "~2.3|~3.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1724,30 +1725,30 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2015-09-21 15:02:29"
"time": "2015-12-26 13:37:56"
},
{
"name": "symfony/console",
"version": "v2.7.5",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "06cb17c013a82f94a3d840682b49425cd00a2161"
"reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/06cb17c013a82f94a3d840682b49425cd00a2161",
"reference": "06cb17c013a82f94a3d840682b49425cd00a2161",
"url": "https://api.github.com/repos/symfony/console/zipball/2e06a5ccb19dcf9b89f1c6a677a39a8df773635a",
"reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
"php": ">=5.3.9",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/event-dispatcher": "~2.1",
"symfony/phpunit-bridge": "~2.7",
"symfony/process": "~2.1"
"symfony/event-dispatcher": "~2.1|~3.0.0",
"symfony/process": "~2.1|~3.0.0"
},
"suggest": {
"psr/log": "For using the console logger",
@@ -1757,13 +1758,16 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1781,7 +1785,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2015-09-25 08:32:23"
"time": "2015-12-22 10:25:57"
},
{
"name": "symfony/css-selector",
@@ -1838,16 +1842,16 @@
},
{
"name": "symfony/dependency-injection",
"version": "v2.7.5",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "422c3819b110f610d79c6f1dc38af23787dc790e"
"reference": "c5086d186f538c2711b9af6f727be7b0446979cd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/422c3819b110f610d79c6f1dc38af23787dc790e",
"reference": "422c3819b110f610d79c6f1dc38af23787dc790e",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c5086d186f538c2711b9af6f727be7b0446979cd",
"reference": "c5086d186f538c2711b9af6f727be7b0446979cd",
"shasum": ""
},
"require": {
@@ -1857,10 +1861,9 @@
"symfony/expression-language": "<2.6"
},
"require-dev": {
"symfony/config": "~2.2",
"symfony/expression-language": "~2.6",
"symfony/phpunit-bridge": "~2.7",
"symfony/yaml": "~2.1"
"symfony/config": "~2.2|~3.0.0",
"symfony/expression-language": "~2.6|~3.0.0",
"symfony/yaml": "~2.1|~3.0.0"
},
"suggest": {
"symfony/config": "",
@@ -1870,13 +1873,16 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\DependencyInjection\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1894,7 +1900,7 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
"time": "2015-09-15 08:30:42"
"time": "2015-12-26 13:37:56"
},
{
"name": "symfony/dom-crawler",
@@ -1951,16 +1957,16 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v2.7.5",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9"
"reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae4dcc2a8d3de98bd794167a3ccda1311597c5d9",
"reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5eb815363c0388e83247e7e9853e5dbc14999cc",
"reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc",
"shasum": ""
},
"require": {
@@ -1968,11 +1974,10 @@
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~2.0,>=2.0.5",
"symfony/dependency-injection": "~2.6",
"symfony/expression-language": "~2.6",
"symfony/phpunit-bridge": "~2.7",
"symfony/stopwatch": "~2.3"
"symfony/config": "~2.0,>=2.0.5|~3.0.0",
"symfony/dependency-injection": "~2.6|~3.0.0",
"symfony/expression-language": "~2.6|~3.0.0",
"symfony/stopwatch": "~2.3|~3.0.0"
},
"suggest": {
"symfony/dependency-injection": "",
@@ -1981,13 +1986,16 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2005,7 +2013,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2015-09-22 13:49:29"
"time": "2015-10-30 20:15:42"
},
{
"name": "symfony/filesystem",
@@ -2106,35 +2114,94 @@
"time": "2015-09-19 19:59:23"
},
{
"name": "symfony/process",
"version": "v2.7.5",
"name": "symfony/polyfill-mbstring",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "b27c8e317922cd3cdd3600850273cf6b82b2e8e9"
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/b27c8e317922cd3cdd3600850273cf6b82b2e8e9",
"reference": "b27c8e317922cd3cdd3600850273cf6b82b2e8e9",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/49ff736bd5d41f45240cec77b44967d76e0c3d25",
"reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"time": "2015-11-20 09:19:13"
},
{
"name": "symfony/process",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "62c254438b5040bc2217156e1570cf2206e8540c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/62c254438b5040bc2217156e1570cf2206e8540c",
"reference": "62c254438b5040bc2217156e1570cf2206e8540c",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Process\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2152,34 +2219,34 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2015-09-19 19:59:23"
"time": "2015-12-23 11:03:46"
},
{
"name": "symfony/translation",
"version": "v2.7.5",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "485877661835e188cd78345c6d4eef1290d17571"
"reference": "c1db87c51251167dd91198b9d1edf897773adb4f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/485877661835e188cd78345c6d4eef1290d17571",
"reference": "485877661835e188cd78345c6d4eef1290d17571",
"url": "https://api.github.com/repos/symfony/translation/zipball/c1db87c51251167dd91198b9d1edf897773adb4f",
"reference": "c1db87c51251167dd91198b9d1edf897773adb4f",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
"php": ">=5.3.9",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/config": "<2.7"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~2.7",
"symfony/intl": "~2.4",
"symfony/phpunit-bridge": "~2.7",
"symfony/yaml": "~2.2"
"symfony/config": "~2.8",
"symfony/intl": "~2.4|~3.0.0",
"symfony/yaml": "~2.2|~3.0.0"
},
"suggest": {
"psr/log": "To use logging capability in translator",
@@ -2189,13 +2256,16 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Translation\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2213,38 +2283,38 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
"time": "2015-09-06 08:36:38"
"time": "2015-12-05 17:37:59"
},
{
"name": "symfony/yaml",
"version": "v2.7.5",
"version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770"
"reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
"reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
"url": "https://api.github.com/repos/symfony/yaml/zipball/ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966",
"reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2262,7 +2332,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2015-09-14 14:14:09"
"time": "2015-12-26 13:37:56"
}
],
"aliases": [],
+1 -1
View File
@@ -1130,7 +1130,7 @@ class core_course_management_renderer extends plugin_renderer_base {
$totalpages = ceil($totalcourses / $perpage);
if ($showtotals) {
if ($totalpages == 0) {
$str = get_string('nocoursesfound', 'moodle', $search);
$str = get_string('nocoursesfound', 'moodle', s($search));
} else if ($totalpages == 1) {
$str = get_string('showingacourses', 'moodle', $totalcourses);
} else {
@@ -23,6 +23,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 9 |
@@ -30,6 +31,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 8 |
@@ -37,6 +39,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 7 |
@@ -44,6 +47,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 6 |
@@ -51,6 +55,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 5 |
@@ -58,6 +63,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 4 |
@@ -65,6 +71,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 3 |
@@ -72,6 +79,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 2 |
@@ -79,6 +87,7 @@ Background:
And I press "Post to forum"
And I wait to be redirected
And I follow "Course 1"
And I wait "1" seconds
And I press "Add a new discussion topic"
And I set the following fields to these values:
| Subject | Forum Post 1 |
+2
View File
@@ -2486,6 +2486,8 @@ function save_local_role_names($courseid, $data) {
$rolename->name = $value;
$DB->insert_record('role_names', $rolename);
}
// This will ensure the course contacts cache is purged..
coursecat::role_assignment_changed($roleid, $context);
}
}
+3 -2
View File
@@ -106,7 +106,8 @@ if (!empty($add)) {
$optionsyes = array('confirm'=>1, 'delete'=>$cm->id, 'sesskey'=>sesskey(), 'sr' => $sectionreturn);
$strdeletecheck = get_string('deletecheck', '', $fullmodulename);
$strdeletecheckfull = get_string('deletecheckfull', '', "$fullmodulename '$cm->name'");
$strparams = (object)array('type' => $fullmodulename, 'name' => $cm->name);
$strdeletechecktypename = get_string('deletechecktypename', '', $strparams);
$PAGE->set_pagetype('mod-' . $cm->modname . '-delete');
$PAGE->set_title($strdeletecheck);
@@ -117,7 +118,7 @@ if (!empty($add)) {
echo $OUTPUT->box_start('noticebox');
$formcontinue = new single_button(new moodle_url("$CFG->wwwroot/course/mod.php", $optionsyes), get_string('yes'));
$formcancel = new single_button($return, get_string('no'), 'get');
echo $OUTPUT->confirm($strdeletecheckfull, $formcontinue, $formcancel);
echo $OUTPUT->confirm($strdeletechecktypename, $formcontinue, $formcancel);
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+4 -5
View File
@@ -187,15 +187,14 @@ if (!empty($add)) {
if ($items = grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$data->modulename,
'iteminstance'=>$data->instance, 'courseid'=>$course->id))) {
// add existing outcomes
// Add existing outcomes.
foreach ($items as $item) {
if (!empty($item->gradepass)) {
if (!empty($item->outcomeid)) {
$data->{'outcome_' . $item->outcomeid} = 1;
} else if (!empty($item->gradepass)) {
$decimalpoints = $item->get_decimals();
$data->gradepass = format_float($item->gradepass, $decimalpoints);
}
if (!empty($item->outcomeid)) {
$data->{'outcome_'.$item->outcomeid} = 1;
}
}
// set category if present
+9 -2
View File
@@ -58,7 +58,7 @@ abstract class moodleform_mod extends moodleform {
/** @var object The course format of the current course. */
protected $courseformat;
function moodleform_mod($current, $section, $cm, $course) {
public function __construct($current, $section, $cm, $course) {
global $CFG;
$this->current = $current;
@@ -83,7 +83,14 @@ abstract class moodleform_mod extends moodleform {
}
$this->_modname = $matches[1];
$this->init_features();
parent::moodleform('modedit.php');
parent::__construct('modedit.php');
}
/**
* Old syntax of class constructor for backward compatibility.
*/
public function moodleform_mod($current, $section, $cm, $course) {
self::__construct($current, $section, $cm, $course);
}
protected function init_features() {
+31
View File
@@ -0,0 +1,31 @@
@core @core_course
Feature: Rename roles in a course
In order to account for course-level differences
As a teacher
I need to be able to rename roles
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
Scenario: Teacher can rename roles
Given I log in as "teacher1"
And I follow "Course 1"
And I click on "Edit settings" "link" in the "Administration" "block"
And I should see "Role renaming"
When I set the following fields to these values:
| Your word for 'Teacher' | Lecturer |
| Your word for 'Student' | Learner |
And I press "Save and display"
And I navigate to "Enrolled users" node in "Course administration > Users"
Then I should see "Lecturer" in the "Teacher 1" "table_row"
And I should see "Learner" in the "Student 1" "table_row"
+3
View File
@@ -53,5 +53,8 @@ function xmldb_enrol_database_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -264,9 +264,9 @@ class enrol_database_plugin extends enrol_plugin {
FROM {enrol} e
JOIN {course} c ON c.id = e.courseid
JOIN {role_assignments} ra ON ra.itemid = e.id
LEFT JOIN {user_enrolments} ue ON ue.enrolid = e.id
LEFT JOIN {user_enrolments} ue ON ue.enrolid = e.id AND ue.userid = ra.userid
WHERE ra.userid = :userid AND e.enrol = 'database'";
$rs = $DB->get_recordset_sql($sql, array('userid'=>$user->id));
$rs = $DB->get_recordset_sql($sql, array('userid' => $user->id));
foreach ($rs as $instance) {
if (!$instance->cvisible and $ignorehidden) {
continue;
+10 -3
View File
@@ -618,14 +618,21 @@ class core_enrol_external extends external_api {
*
* @param int $courseid
* @return array of course enrolment methods
* @throws moodle_exception
*/
public static function get_course_enrolment_methods($courseid) {
global $DB;
$params = self::validate_parameters(self::get_course_enrolment_methods_parameters(), array('courseid' => $courseid));
$coursecontext = context_course::instance($params['courseid']);
$categorycontext = $coursecontext->get_parent_context();
self::validate_context($categorycontext);
// Note that we can't use validate_context because the user is not enrolled in the course.
require_login(null, false, null, false, true);
$course = $DB->get_record('course', array('id' => $params['courseid']), '*', MUST_EXIST);
$context = context_course::instance($course->id);
if (!$course->visible and !has_capability('moodle/course:viewhiddencourses', $context)) {
throw new moodle_exception('coursehidden');
}
$result = array();
$enrolinstances = enrol_get_instances($params['courseid'], true);
+3
View File
@@ -54,5 +54,8 @@ function xmldb_enrol_flatfile_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+18 -9
View File
@@ -58,7 +58,11 @@ class enrol_guest_edit_form extends moodleform {
$mform->addElement('passwordunmask', 'password', get_string('password', 'enrol_guest'));
$mform->addHelpButton('password', 'password', 'enrol_guest');
if ($plugin->get_config('requirepassword')) {
// If we have a new instance and the password is required - make sure it is set. For existing
// instances we do not force the password to be required as it may have been set to empty before
// the password was required. We check in the validation function whether this check is required
// for existing instances.
if (empty($instance->id) && $plugin->get_config('requirepassword')) {
$mform->addRule('password', get_string('required'), 'required', null);
}
@@ -84,20 +88,25 @@ class enrol_guest_edit_form extends moodleform {
$checkpassword = false;
if ($data['id']) {
if ($data['status'] == ENROL_INSTANCE_ENABLED) {
if ($instance->password !== $data['password']) {
$checkpassword = true;
}
}
} else {
if ($data['status'] == ENROL_INSTANCE_ENABLED) {
// Check the password if we are enabling the plugin again.
if (($instance->status == ENROL_INSTANCE_DISABLED) && ($data['status'] == ENROL_INSTANCE_ENABLED)) {
$checkpassword = true;
}
// Check the password if the instance is enabled and the password has changed.
if (($data['status'] == ENROL_INSTANCE_ENABLED) && ($instance->password !== $data['password'])) {
$checkpassword = true;
}
} else {
$checkpassword = true;
}
if ($checkpassword) {
$require = $plugin->get_config('requirepassword');
$policy = $plugin->get_config('usepasswordpolicy');
if ($policy) {
if ($require && trim($data['password']) === '') {
$errors['password'] = get_string('required');
} else if (!empty($data['password']) && $policy) {
$errmsg = '';
if (!check_password_policy($data['password'], $errmsg)) {
$errors['password'] = $errmsg;
+3
View File
@@ -63,6 +63,9 @@ function xmldb_enrol_guest_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -1
View File
@@ -371,7 +371,8 @@ class enrol_guest_plugin extends enrol_plugin {
}
}
if ($this->get_config('usepasswordpolicy')) {
// Only check the password if it is set.
if (!empty($instance->password) && $this->get_config('usepasswordpolicy')) {
if (!check_password_policy($instance->password, $errmsg)) {
return false;
}
+3
View File
@@ -56,5 +56,8 @@ function xmldb_enrol_imsenterprise_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -72,6 +72,9 @@ function xmldb_enrol_manual_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2015091500, 'enrol', 'manual');
}
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -55,5 +55,8 @@ function xmldb_enrol_mnet_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -70,5 +70,8 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -71,6 +71,9 @@ function xmldb_enrol_self_upgrade($oldversion) {
// Moodle v2.9.0 release upgrade line.
// Put any upgrade step following this.
// Moodle v3.0.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+11 -9
View File
@@ -163,15 +163,17 @@ class enrol_self_edit_form extends moodleform {
$checkpassword = false;
if ($instance->id) {
if ($data['status'] == ENROL_INSTANCE_ENABLED) {
if ($instance->password !== $data['password']) {
$checkpassword = true;
}
}
} else {
if ($data['status'] == ENROL_INSTANCE_ENABLED) {
// Check the password if we are enabling the plugin again.
if (($instance->status == ENROL_INSTANCE_DISABLED) && ($data['status'] == ENROL_INSTANCE_ENABLED)) {
$checkpassword = true;
}
// Check the password if the instance is enabled and the password has changed.
if (($data['status'] == ENROL_INSTANCE_ENABLED) && ($instance->password !== $data['password'])) {
$checkpassword = true;
}
} else {
$checkpassword = true;
}
if ($checkpassword) {
@@ -179,8 +181,8 @@ class enrol_self_edit_form extends moodleform {
$policy = $plugin->get_config('usepasswordpolicy');
if ($require and trim($data['password']) === '') {
$errors['password'] = get_string('required');
} else if ($policy) {
$errmsg = '';//prevent eclipse warning
} else if (!empty($data['password']) && $policy) {
$errmsg = '';
if (!check_password_policy($data['password'], $errmsg)) {
$errors['password'] = $errmsg;
}
+9 -3
View File
@@ -52,6 +52,7 @@ class enrol_self_external extends external_api {
*
* @param int $instanceid instance id of self enrolment plugin.
* @return array instance information.
* @throws moodle_exception
*/
public static function get_instance_info($instanceid) {
global $DB, $CFG;
@@ -66,10 +67,15 @@ class enrol_self_external extends external_api {
throw new moodle_exception('invaliddata', 'error');
}
// Note that we can't use validate_context because the user is not enrolled in the course.
require_login(null, false, null, false, true);
$enrolinstance = $DB->get_record('enrol', array('id' => $params['instanceid']), '*', MUST_EXIST);
$coursecontext = context_course::instance($enrolinstance->courseid);
$categorycontext = $coursecontext->get_parent_context();
self::validate_context($categorycontext);
$course = $DB->get_record('course', array('id' => $enrolinstance->courseid), '*', MUST_EXIST);
$context = context_course::instance($course->id);
if (!$course->visible and !has_capability('moodle/course:viewhiddencourses', $context)) {
throw new moodle_exception('coursehidden');
}
$instanceinfo = (array) $enrolplugin->get_enrol_info($enrolinstance);
if (isset($instanceinfo['requiredparam']->enrolpassword)) {
+22 -1
View File
@@ -685,6 +685,27 @@ class enrol_self_plugin extends enrol_plugin {
*/
public function can_hide_show_instance($instance) {
$context = context_course::instance($instance->courseid);
return has_capability('enrol/self:config', $context);
if (!has_capability('enrol/self:config', $context)) {
return false;
}
// If the instance is currently disabled, before it can be enabled,
// we must check whether the password meets the password policies.
if ($instance->status == ENROL_INSTANCE_DISABLED) {
if ($this->get_config('requirepassword')) {
if (empty($instance->password)) {
return false;
}
}
// Only check the password if it is set.
if (!empty($instance->password) && $this->get_config('usepasswordpolicy')) {
if (!check_password_policy($instance->password, $errmsg)) {
return false;
}
}
}
return true;
}
}
+13 -1
View File
@@ -47,7 +47,9 @@ class enrol_self_external_testcase extends externallib_advanced_testcase {
$studentrole = $DB->get_record('role', array('shortname'=>'student'));
$this->assertNotEmpty($studentrole);
$course = self::getDataGenerator()->create_course();
$coursedata = new stdClass();
$coursedata->visible = 0;
$course = self::getDataGenerator()->create_course($coursedata);
// Add enrolment methods for course.
$instanceid1 = $selfplugin->add_instance($course, array('status' => ENROL_INSTANCE_ENABLED,
@@ -68,6 +70,7 @@ class enrol_self_external_testcase extends externallib_advanced_testcase {
$enrolmentmethods = $DB->get_records('enrol', array('courseid' => $course->id, 'status' => ENROL_INSTANCE_ENABLED));
$this->assertCount(3, $enrolmentmethods);
$this->setAdminUser();
$instanceinfo1 = enrol_self_external::get_instance_info($instanceid1);
$instanceinfo1 = external_api::clean_returnvalue(enrol_self_external::get_instance_info_returns(), $instanceinfo1);
@@ -95,6 +98,15 @@ class enrol_self_external_testcase extends externallib_advanced_testcase {
$this->assertEquals('Test instance 3', $instanceinfo3['name']);
$this->assertTrue($instanceinfo3['status']);
$this->assertEquals(get_string('password', 'enrol_self'), $instanceinfo3['enrolpassword']);
// Try to retrieve information using a normal user for a hidden course.
$user = self::getDataGenerator()->create_user();
$this->setUser($user);
try {
enrol_self_external::get_instance_info($instanceid3);
} catch (moodle_exception $e) {
$this->assertEquals('coursehidden', $e->errorcode);
}
}
/**
+14 -1
View File
@@ -428,7 +428,9 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$this->assertNotEmpty($studentrole);
$course1 = self::getDataGenerator()->create_course();
$course2 = self::getDataGenerator()->create_course();
$coursedata = new stdClass();
$coursedata->visible = 0;
$course2 = self::getDataGenerator()->create_course($coursedata);
// Add enrolment methods for course.
$instanceid1 = $selfplugin->add_instance($course1, array('status' => ENROL_INSTANCE_ENABLED,
@@ -445,6 +447,8 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$enrolmentmethods = $DB->get_records('enrol', array('courseid' => $course1->id, 'status' => ENROL_INSTANCE_ENABLED));
$this->assertCount(2, $enrolmentmethods);
$this->setAdminUser();
// Check if information is returned.
$enrolmentmethods = core_enrol_external::get_course_enrolment_methods($course1->id);
$enrolmentmethods = external_api::clean_returnvalue(core_enrol_external::get_course_enrolment_methods_returns(),
@@ -474,6 +478,15 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
$this->assertEquals('self', $enrolmentmethod['type']);
$this->assertTrue($enrolmentmethod['status']);
$this->assertEquals('enrol_self_get_instance_info', $enrolmentmethod['wsfunction']);
// Try to retrieve information using a normal user for a hidden course.
$user = self::getDataGenerator()->create_user();
$this->setUser($user);
try {
core_enrol_external::get_course_enrolment_methods($course2->id);
} catch (moodle_exception $e) {
$this->assertEquals('coursehidden', $e->errorcode);
}
}
public function get_enrolled_users_setup($capability) {
+1 -1
View File
@@ -33,7 +33,7 @@ abstract class filter_local_settings_form extends moodleform {
public function __construct($submiturl, $filter, $context) {
$this->filter = $filter;
$this->context = $context;
parent::moodleform($submiturl);
parent::__construct($submiturl);
}
/**

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