Compare commits

..

350 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) fa54db9c03 Moodle release 2.7.9 2015-07-03 13:38:11 +02:00
Eloy Lafuente (stronk7) a7c5b8b2c7 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-07-03 13:38:05 +02:00
Juan Leyva ffe5c78488 MDL-50130 users: Filter profile fields data in external functions 2015-06-30 19:50:48 +02:00
AMOS bot 6ac71df086 Automatically generated installer lang files 2015-07-01 00:05:08 +08:00
Dan Marsden f3e7afedb9 MDL-50614 mod_scorm: Improve validation on currentorg 2015-06-30 10:14:56 +08:00
Eloy Lafuente (stronk7) 630b8fdaea MDL-50688 lib: small cleanup + http/https coverage. 2015-06-29 17:50:23 +02:00
Petr Skoda 5673aae914 MDL-50688 lib: fix local url validation bug
Change-Id: I350bb8c9ace5cc0403f083f728c100097be7aa7e
Reviewed-on: https://review.totaralms.com/8101
Tested-by: Jenkins Automation <jenkins@totaralms.com>
Reviewed-by: Sam Hemelryk <sam.hemelryk@totaralms.com>
Reviewed-by: Alastair Munro <alastair.munro@totaralms.com>
2015-06-29 17:50:16 +02:00
AMOS bot 5b25b33fa7 Automatically generated installer lang files 2015-06-19 00:04:18 +08:00
Dan Poltawski c8a1646ab8 weekly release 2.7.8+ 2015-06-18 16:11:43 +01:00
Dan Poltawski 76cd16e6e4 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-06-18 16:11:41 +01:00
AMOS bot f886f76e7f Automatically generated installer lang files 2015-06-17 00:04:15 +08:00
AMOS bot 2d6c0ecd0d Automatically generated installer lang files 2015-06-17 00:04:14 +08:00
Andrew Nicols 920d2d9585 Merge branch 'MDL-50380-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-06-16 07:59:12 +08:00
Simey Lameze 2bd8a55dfd MDL-50380 mod_wiki: fix missing parameter on wiki edit files page
Also fixing a typo on the $referer variable.
2015-06-03 16:49:55 +08:00
AMOS bot 2f6c18c88c Automatically generated installer lang files 2015-06-02 00:04:22 +08:00
AMOS bot baa9517b57 Automatically generated installer lang files 2015-05-30 00:04:15 +08:00
AMOS bot 5330c5c2d4 Automatically generated installer lang files 2015-05-29 00:04:08 +08:00
AMOS bot 30aeabb79e Automatically generated installer lang files 2015-05-27 00:03:57 +08:00
AMOS bot 2f63a6883f Automatically generated installer lang files 2015-05-23 00:04:11 +08:00
AMOS bot ebb8f60603 Automatically generated installer lang files 2015-05-22 00:03:58 +08:00
Eloy Lafuente (stronk7) 37fd0a3d81 weekly release 2.7.8+ 2015-05-21 12:37:12 +02:00
Eloy Lafuente (stronk7) 547932e130 Merge branch 'MDL-50275-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-05-19 17:45:33 +02:00
Dan Poltawski ee612f1ed2 MDL-50275 quiz: version bump for MDL-49941
Otherwise the new capability risk does not get loaded
2015-05-19 15:47:13 +01:00
Dan Poltawski 67ac2b0cee Merge branch 'MDL-50177_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-05-18 13:05:02 +01:00
David Monllao a5155586fe MDL-50177 completion: Also accepting cm integer strings 2015-05-12 12:22:07 +08:00
Eloy Lafuente (stronk7) 12e29080e1 Moodle release 2.7.8 2015-05-10 11:39:14 +02:00
Eloy Lafuente (stronk7) 70a3da5396 weekly release 2.7.7+ 2015-05-08 12:14:24 +02:00
Eloy Lafuente (stronk7) 3109a202db Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-05-08 12:14:09 +02:00
Rajesh Taneja 3a22694267 MDL-50154 behat: Click on Grades link under navigation 2015-05-08 13:36:49 +08:00
Rajesh Taneja bda6ef6fe9 MDL-50154 behat: Resize pdf window so toolbar is always visible 2015-05-08 13:36:42 +08:00
Frederic Massart a13f667276 MDL-50128 mod_data: String needed escaping before being used in regex 2015-05-07 11:26:09 +08:00
Andrew Nicols 295fad3d07 Merge branch 'm27_MDL-50133' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-05-07 10:26:45 +08:00
Andrew Nicols fee5de5adf Merge branch 'MDL-49783-27' of git://github.com/mastnym/moodle into MOODLE_27_STABLE 2015-05-07 09:43:58 +08:00
Martin Mastny dfea73010d MDL-49783 forms: Collapsed form section is opened on error 2015-05-07 09:28:22 +08:00
Dan Marsden 3c542cdda5 MDL-50133 mod_scorm: use correct captypes 2015-05-07 11:47:15 +12:00
Dan Poltawski 9f1cd92626 Merge branch 'MDL-49664' of git://github.com/stronk7/moodle into MOODLE_27_STABLE 2015-05-06 09:33:04 +01:00
Dan Poltawski 045be2b1a7 Merge branch 'MDL-49664-27' of https://github.com/LukeCarrier/moodle into MOODLE_27_STABLE 2015-05-06 08:04:38 +01:00
Marina Glancy b7d307e807 MDL-49788 navigation: Ensure we only check active enrolments 2015-05-06 08:02:47 +01:00
Salih Gedik 70bd537332 MDL-49789 mod_book: filter book chapter content 2015-05-06 13:55:21 +08:00
Marina Glancy b4da1e0ae4 MDL-49718 externallib: unittest correction 2015-05-06 13:02:02 +08:00
Marina Glancy 78ec6751fc MDL-50090 user: suspended user can login upon conrimation 2015-05-06 11:02:26 +08:00
Juan Leyva 28947c1d7d MDL-49718 webservices: Fix forced format and force external text cleaning 2015-05-06 10:56:23 +08:00
Juan Leyva 350397da93 MDL-49994 files: Prevent to browse private files when are disabled 2015-05-06 10:27:40 +08:00
AMOS bot 4068025c04 Automatically generated installer lang files 2015-05-06 00:04:03 +08:00
Marina Glancy 80eb5bc7b7 MDL-50099 auth: less verbose account confirmed message 2015-05-05 15:34:02 +01:00
Frederic Massart 19bf8ae268 MDL-49179 setuplib: print_error() uses local URLs exclusively 2015-05-05 18:31:14 +08:00
Frederic Massart 7f426dd24f MDL-49179 weblib: Secure the direct usage of $_SERVER['HTTP_REFERER'] 2015-05-05 18:31:14 +08:00
Frederic Massart 278cd8f20f MDL-49179 mod_forum, mod_quiz: Prevent misuse of get_referer() 2015-05-05 18:31:14 +08:00
Tim Hunt 39ae18a2f9 MDL-49941 quiz: mod/quiz:grade should declare RISK_XSS 2015-05-05 18:31:14 +08:00
Frederic Massart df96662b0e MDL-49401 moodlelib: PARAM_LOCALURL supports loginhttps 2015-05-05 18:31:14 +08:00
Eloy Lafuente (stronk7) 323f3745fe weekly release 2.7.7+ 2015-05-05 12:28:40 +02:00
David Monllao 8cad4af03e Merge branch 'MDL-50055-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-05-05 10:52:29 +08:00
John Okely afa1a8e3fb MDL-49848 message: Make messaging interface responsive 2015-05-05 10:31:08 +08:00
Andrew Nicols 0a2c4e7eca MDL-50055 enrol: Stop requiring javascript for behat tests 2015-05-05 10:25:18 +08:00
Andrew Nicols 79da0b1581 MDL-50055 tests: Add new step to deal with Single Selects 2015-05-05 10:25:13 +08:00
David Monllao 03e35c77fd Merge branch 'MDL-49954-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-05-04 15:16:47 +08:00
David Monllao 8e20b6da45 MDL-50103 mod_assign: Fixing behat test
The participant number is dynamically generated so it is not possible to
match known values.

Match on the submission text instead.
2015-05-04 09:36:15 +08:00
David Monllao dbfaa2da32 weekly release 2.7.7+ 2015-05-01 16:47:20 +08:00
David Monllao 7f99e1d1ea MDL-49232 enrol_self: Adapting unit test to new can_self_enrol() output 2015-05-01 15:49:44 +08:00
Andrew Nicols e534e99afd Merge branch 'MDL-49232_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-05-01 09:28:13 +08:00
Dan Poltawski 29b97d94bb Merge branch 'MDL-50028_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-04-30 16:07:01 +01:00
Andrew Nicols a25eef762f Merge branch 'MDL-49583-m27' of https://github.com/NeillM/moodle into MOODLE_27_STABLE 2015-04-30 15:23:21 +08:00
Andrew Nicols 5473b69ade Merge branch 'MDL-50038-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-30 14:56:54 +08:00
Andrew Nicols 4d711ff280 Merge branch 'MDL-50033-27-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2015-04-30 10:52:27 +08:00
Andrew Nicols 04b42e3077 MDL-49232 enrol_self: Add behat test for non-guest self-enrolment 2015-04-29 18:02:51 -07:00
Mark Nelson 1a8400f5eb MDL-49232 enrol_self: display continue button 2015-04-29 18:02:50 -07:00
David Mudrák a1b09ffb52 MDL-50033 lang: Update Behat scenario to use the new string 2015-04-29 23:49:38 +02:00
Helen Foster ffce507736 MDL-50033 lang: Merge English strings from the en_fix language pack 2015-04-29 23:48:24 +02:00
Frederic Massart f78f3fb749 MDL-50038 my: Redirect admin users to the notifications page when needed 2015-04-29 19:05:14 +08:00
Neill Magill e4e261bd7e MDL-49583 enrol: enrol/index.php page doesn't handle direct access well
Before this patch if a user who is not logged in to Moodle accesses the
enrol/index.php page directly they were redirected to the Moodle front
page after login, rather than back to a page that would allow them to
self enrol, if it is enabled on the course.

This change will cause a user who directly accesses the page to be
redirected back to it after they have logged in, unless the course has guest
access enabled.

Thanks to Marina Glancy for suggesting the use of get_referer()
2015-04-29 09:14:38 +01:00
David Monllao 1354593011 Merge branch 'MDL-49637-m27' of git://github.com/NeillM/moodle into MOODLE_27_STABLE 2015-04-29 12:05:36 +08:00
Tim Hunt be18b7c593 MDL-50028 qtype_match: fix correct answer display
Atto's stupid tendency to create HTML like
<p>You don't need a br at the end of a paragraph!</br></p>
was breaking it.
2015-04-28 13:08:23 +01:00
Tim Hunt f7db06401e MDL-50028 questions: split into one testcase class per file 2015-04-28 13:08:21 +01:00
Dan Poltawski 697929847f weekly release 2.7.7+ 2015-04-28 09:28:14 +01:00
Dan Poltawski bbeaad5052 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-04-28 09:28:12 +01:00
Neill Magill 21c59d05e1 MDL-49637 assign: Workflow & blind marking do not always show feedback
Before this patch if an assignment has workflow and blind marking enabled if a teacher
sets a submission to have its grades released to students before they reveal student
identities the feedback they have given is not displayed to the student.

The patch causes the reveal_identities() method to pass the correct value to the
get_feedback_plugin_by_type() function in the assign class.
2015-04-28 09:12:12 +01:00
Neill Magill 62099b3be0 MDL-49637 assign: Behat test for blind marking with workflow
This test checks that that if reveal student identities is used before or after the submissions grades have
been set released that the teacher's feedback is displayed to students.
2015-04-28 09:11:59 +01:00
David Monllao 3a33d06d85 Merge branch 'MDL-42449-2.7' of git://github.com/andrewhancox/moodle into MOODLE_27_STABLE 2015-04-28 11:08:40 +08:00
David Monllao e22d6ad0ed Merge branch 'MDL-49911-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-28 09:47:16 +08:00
Eloy Lafuente (stronk7) a9074a2649 MDL-49664 renderers: Verify expected render methods are called.
For various renderables (core, plugin, namespaced), all them
against the base and plugin renderers.
2015-04-27 18:41:24 +02:00
Juan Leyva d89e4bc0e6 MDL-49954 forum: Use clean_returnvalue properly in external unit tests 2015-04-27 18:25:55 +02:00
AMOS bot df967d0185 Automatically generated installer lang files 2015-04-28 00:04:18 +08:00
Dan Poltawski d9f965c1e4 Merge branch 'MDL-49993_27' of git://github.com/grabs/moodle into MOODLE_27_STABLE 2015-04-27 14:48:01 +01:00
Dan Poltawski 2842b48847 Merge branch 'MDL-49913_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-04-27 14:28:36 +01:00
Dan Poltawski bba516205b Merge branch 'MDL-49977_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-04-27 10:53:21 +01:00
Andreas Grabs ade5a860b5 MDL-49993 mod_feedback: Question auto numbers have no space between number and question 2015-04-26 19:03:34 +02:00
AMOS bot 5452cc62f2 Automatically generated installer lang files 2015-04-25 00:04:12 +08:00
Andrew Hancox 9aae67ec07 MDL-42449 backup: Fix for activity grade category
Retain grade category when restoring an activity into the course that
it came from
2015-04-24 14:04:51 +01:00
Dan Poltawski e47d9d12c6 weekly release 2.7.7+ 2015-04-24 12:10:41 +01:00
Dan Poltawski e07cff97f1 Merge branch 'MDL-49960-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-24 09:06:38 +01:00
Frederic Massart 056e2ea0be MDL-49911 admin: Prevent notices when updatenotifications is disabled 2015-04-24 14:49:16 +08:00
Andrew Nicols 436463209e Merge branch 'MDL-49311-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-04-24 11:53:00 +08:00
papillon 2a9e7de93c MDL-49311 user: fix default sorting problem 2015-04-24 09:12:06 +08:00
Mark Nelson 86a79e2578 MDL-49977 mod_assign: added missing page titles 2015-04-23 17:08:55 -07:00
Dan Poltawski 40d66dfdd0 Merge branch 'MDL-49946_27' of https://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-04-23 13:32:36 +01:00
Andrew Nicols d2d64d0264 Merge branch 'MDL-49319_backport_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-04-23 15:24:28 +08:00
Frederic Massart 467fe2e4b1 MDL-49960 message: Adding behat test for recent conversations 2015-04-23 14:56:03 +08:00
Jean-Michel Vedrine 16ade9d88c MDL-49913 mod_lesson: studentanswer format should be HTML 2015-04-23 08:44:13 +02:00
Jean-Michel Vedrine b34be49db4 MDL-49913 mod_lesson: fix import scores and jumps 2015-04-23 08:44:11 +02:00
Jean-Michel Vedrine a5f4089c68 MDL-49913 mod_lesson: defaultanswer to avoid duplication 2015-04-23 08:39:05 +02:00
Jean-Michel Vedrine a6e090b15f MDL-49913 mod_lesson: round question grades on import 2015-04-23 08:31:05 +02:00
Andrew Nicols 26507a9a67 Merge branch 'MDL-49477-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-04-23 13:53:56 +08:00
Andrew Nicols 83180e040a Merge branch 'MDL-34921_27_unwanted-sitehome-redirects' of https://github.com/colin-umn/moodle into MOODLE_27_STABLE 2015-04-23 12:34:49 +08:00
Andrew Nicols 2ab166e39e Merge branch 'MDL-49613-m27' of https://github.com/NeillM/moodle into MOODLE_27_STABLE 2015-04-23 11:28:41 +08:00
Jean-Michel Vedrine 46ebedce58 MDL-49946 mod_lesson: improve qformat_default::defaultquestion 2015-04-22 19:57:17 +02:00
Dan Poltawski 70cb53466d Merge branch 'MDL-49921-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-22 16:40:58 +01:00
Andrew Davis a164589209 MDL-49319 core_registration: altered registration strings 2015-04-22 20:28:08 +08:00
Viduranga Wijesooriya 5ae7cc6255 MDL-49477 availability_grade-form: checkbox disable problem fixed
Signed-off-by: Viduranga Wijesooriya <vpowerrc@gmail.com>
2015-04-22 17:35:09 +08:00
Tony Butler 52cdd42a89 MDL-49933 mod_assign: Sort marker select lists alphabetically by name 2015-04-22 17:02:45 +08:00
Neill Magill 43f35d037e MDL-49613 access: count_role_users gives unexpected results
The count_role_users function in lib/accesslib.php gives the wrong results if a user has the
same role at multiple levels in a context path.

For example a user is a coursecreator on a course and the category that the course is in,
in this case they would be counted twice, rather than being recognised as the same user.

This change will make the function only count unique users.
2015-04-22 09:28:42 +01:00
Neill Magill 07f50b7284 MDL-49613 access: Unit test for count_role_users 2015-04-22 09:28:41 +01:00
Juan Leyva 852d96580b MDL-49921 forum: Handle exceptions correctly in get_forums_by_courses 2015-04-22 09:52:40 +02:00
Andrew Nicols 4d3bad7e51 Merge branch 'MDL-49753-m27' of https://github.com/alexmitin/moodle into MOODLE_27_STABLE 2015-04-22 11:07:04 +08:00
Dan Poltawski b4a592aa3b weekly release 2.7.7+ 2015-04-21 11:16:50 +01:00
Andrew Nicols a94e5a405d MDL-40811 uploaduser: Optimise testuser code 2015-04-21 11:38:58 +08:00
Andrew Nicols 3428cd4c9b Merge branch 'wip-mdl-40881-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-21 11:38:45 +08:00
Brian Barnes 6cb449dc0f MDL-49782 general: removed uses of window.status 2015-04-21 10:46:22 +08:00
Nadav Kavalerchik de8958e8ac MDL-40881 uploaduser: Validate profile fields unique values 2015-04-21 10:21:23 +08:00
Andrew Nicols 267f12abe1 Merge branch 'wip-mdl-49799-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-20 12:32:34 +08:00
Rajesh Taneja e69a1a6b6f MDL-49799 behat: use example.com as test email
asd.com is a valid domain, we should use reserved domain names for testing
2015-04-20 12:30:32 +08:00
David Monllao 83503c9838 Merge branch 'MDL-48187_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-04-20 12:19:50 +08:00
David Monllao fca58b02df Merge branch 'wip-MDL-49880-27' of git://github.com/abgreeve/moodle into MOODLE_27_STABLE 2015-04-20 12:13:10 +08:00
Mark Nelson c0ffc90640 MDL-48187 core_course: use updated '$grade_item' 2015-04-19 20:30:42 -07:00
David Monllao 5ee0d1d3ee Merge branch 'm27_MDL-49904' of git://github.com/totara/moodle into MOODLE_27_STABLE 2015-04-20 10:42:02 +08:00
Adrian Greeve fd6358feaa MDL-49880 mod_lesson: Fixed notice while importing questions.
Cloze questions (not supported by lesson) threw up a notice saying that
the course wasn't set.
2015-04-20 08:43:46 +08:00
Dan Poltawski 99a5af9eda weekly release 2.7.7+ 2015-04-17 10:53:49 +01:00
David Monllao e0caa3031d Merge branch 'MDL-48723_27_forum-plagiarism_errors' of git://github.com/colin-umn/moodle into MOODLE_27_STABLE 2015-04-17 10:41:48 +08:00
Brian Barnes 62990c9d11 MDL-49904 user: set title when editing another user 2015-04-17 11:46:58 +12:00
Dan Poltawski 0bbacc0e2f Merge branch 'MDL-49837-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-16 12:17:32 +01:00
David Monllao 300503ddd6 Merge branch 'MDL-45131-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-16 17:05:23 +08:00
Juan Leyva 3d1c374bd5 MDL-45131 notes: Add validation for returned parameters in WS tests 2015-04-16 10:31:19 +02:00
Juan Leyva 59061012b8 MDL-45131 user: Add validation for returned parameters in WS tests 2015-04-16 10:31:07 +02:00
Juan Leyva df2f832789 MDL-45131 message: Add validation for returned parameters in WS tests 2015-04-16 10:30:52 +02:00
Juan Leyva 3135752ba0 MDL-45131 files: Add validation for returned parameters in WS tests 2015-04-16 10:30:41 +02:00
Juan Leyva d6fd894a76 MDL-45131 enrol: Add validation for returned parameters in WS tests 2015-04-16 10:30:28 +02:00
Juan Leyva 433b5c28db MDL-45131 course: Add validation for returned parameters in WS tests 2015-04-16 10:30:12 +02:00
Juan Leyva ef394f5aa9 MDL-45131 cohort: Add validation for returned parameters in WS tests 2015-04-16 10:28:33 +02:00
Juan Leyva 982440c14f MDL-45131 calendar: Add validation for returned parameters in WS tests 2015-04-16 10:28:22 +02:00
Skylar Kelty 715d55c963 MDL-49489 caching: Prevent full coursecontact purge 2015-04-16 07:50:08 +08:00
Dan Poltawski 8b011c7b2e Merge branch 'MDL-49803_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-04-15 15:06:20 +01:00
David Monllao 1106aa4c4c Revert "MDL-46963 core_upgrade: change the call to guess_antelope_row_size"
This reverts commit c85de44a7b.
2015-04-15 15:53:07 +08:00
David Monllao 840cb4e4d6 MDL-49803 mod_quiz: Fixing overrides restore 2015-04-15 15:31:18 +08:00
Simey Lameze c85de44a7b MDL-46963 core_upgrade: change the call to guess_antelope_row_size 2015-04-15 15:01:42 +08:00
David Monllao 59728f1a7c Merge branch 'MDL-46963-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-04-15 13:37:00 +08:00
Dan Poltawski 6378ece404 weekly release 2.7.7+ 2015-04-14 16:49:08 +01:00
Dan Poltawski a82add34eb Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-04-14 16:49:06 +01:00
Rajesh Taneja 8a8ae4df07 MDL-44611 behat: Description is required field and should be set 2015-04-14 12:17:26 +08:00
AMOS bot 62f8da23af Automatically generated installer lang files 2015-04-14 00:04:19 +08:00
Juan Leyva 24eae8af65 MDL-49837 assign: Use correct assertions and fix return params cleaning 2015-04-13 17:36:54 +02:00
Juan Leyva 16dde93127 MDL-49837 assign: Fix external functions return declaration
Incorrect use of external_warnings function
2015-04-13 17:36:53 +02:00
Dan Poltawski 81c0cd9644 Merge branch 'MDL-48702_backport_log_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-04-13 16:26:50 +01:00
Dan Poltawski ab3ac68481 Merge branch 'MDL-49166_site_rego_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-04-13 15:34:48 +01:00
Dan Poltawski 55b5acd0a8 Merge branch 'MDL-49756-27' of git://github.com/mr-russ/moodle into MOODLE_27_STABLE 2015-04-13 15:05:58 +01:00
Andrew Nicols b0761ac9bd Merge branch 'MDL-49426-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-04-13 14:33:06 +08:00
Simey Lameze d0a74e4db9 MDL-46963 environment: add check for antelope row format 2015-04-13 14:30:55 +08:00
Andrew Nicols 91afdf5f61 Merge branch 'MDL-33328_search_enrol_users_MDL27' of https://github.com/barrysspace/moodle into MOODLE_27_STABLE 2015-04-13 13:49:35 +08:00
Andrew Nicols 9eb5bab913 Merge branch 'MDL-48836_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-04-13 13:33:15 +08:00
Ramindu Deshapriya 8ecc51ed61 MDL-44611 core_course: Added Behat test to automate MDLQA 5252 2015-04-13 11:13:21 +08:00
Russell Smith 409722bf2f MDL-49756 course: Add unit tests for section_options. 2015-04-11 08:07:43 +10:00
Russell Smith 3b19fb6319 MDL-49756 course: Allow unit tests to set course formats.
This is a backport of 2.8 changes that allows testing using custom
course format classes that aren't plugins.  It's required to add
unit tests in MDL-49756 for 2.7.
2015-04-11 08:07:43 +10:00
Russell Smith 3e7ae2b7da MDL-48836 backup: Use a trie for grouped path detection.
Backport of MDL-41674.
2015-04-10 14:10:33 -07:00
Juan Leyva b09e0ba6c4 MDL-49426 webservices: Allow upload to draft area always 2015-04-10 10:43:50 +02:00
Barry Oosthuizen e5e2a01924 MDL-33328 enrol_manual: use correct parameter in search function
Searching for user from "Enrol users" panel causes blocks to dock in IE
2015-04-09 18:58:43 +01:00
Dan Poltawski b0682b9333 weekly release 2.7.7+ 2015-04-09 10:27:02 +01:00
Dan Poltawski 5e5a7b24b3 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-04-09 10:27:00 +01:00
Colin Campbell 2bcfe2567e MDL-48723 mod/forum: Fix cron task error on digest attachments. 2015-04-08 13:24:40 -05:00
Andrew Davis 70cbcfe454 MDL-49166 registration: now states whether or not site is registered 2015-04-08 20:45:59 +08:00
AMOS bot 68f9c67088 Automatically generated installer lang files 2015-04-08 00:04:18 +08:00
Eloy Lafuente (stronk7) 4f1e546cc7 Merge branch 'MDL-48205_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2015-04-07 14:21:53 +02:00
Brendan Heywood 6d2f958fc5 MDL-49740 Lock: Fixed task lock release bugs 2015-04-07 13:09:45 +01:00
David Monllao 41fecc5d7f MDL-43558 theme_base: We don't need edit toggle if modeditingmenu is disabled 2015-04-07 16:25:37 +08:00
Alex Mitin c428924fbf MDL-49753 enrolments: preselct status filter if needed 2015-04-07 16:15:52 +08:00
David Monllao 3c5c1fc348 Merge branch 'MDL-37984-27' of git://github.com/mastnym/moodle into MOODLE_27_STABLE 2015-04-07 16:09:08 +08:00
Andrew Nicols bef2cf1d28 MDL-49395 core: add more unit tests for get_enrolled_sql 2015-04-07 15:28:16 +08:00
Andrew Nicols 52df0b99ee Merge branch 'suspended_userids_memory_27' of git://github.com/tlevi/moodle into MOODLE_27_STABLE 2015-04-07 15:28:14 +08:00
Dan Poltawski a0c267eaa8 Merge branch 'mdl38210-moodle27' of https://github.com/tlock/moodle into MOODLE_27_STABLE 2015-04-06 12:36:21 +01:00
Colin Campbell e9d861b105 MDL-34921 course/format: Fix unwanted redirects from Site home 2015-04-04 21:33:37 -05:00
Luke Carrier c57d132ebb MDL-49664 output: backport renderer namespacing fix 2015-04-02 16:16:16 +01:00
Eloy Lafuente (stronk7) 06d2bb239e weekly release 2.7.7+ 2015-04-02 11:48:54 +02:00
Tony Levi 5bc1cf85db MDL-49395 accesslib: Make get_suspended_userids more efficient 2015-04-02 13:55:17 +10:30
Andrew Nicols 8f59956765 Merge branch 'MDL-49686-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-04-01 18:48:10 +08:00
Andrew Nicols 56e611331e Merge branch 'wip-mdl-49513-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-01 18:32:55 +08:00
Rajesh Taneja a1952e8f70 MDL-49513 behat: Set admin config using php api
Added a new set to set config using set_config() api
to make steps faster and more efficient
2015-04-01 14:31:01 +08:00
Andrew Nicols e9a4047b81 Merge branch 'MDL-49693-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-04-01 12:39:04 +08:00
Tim Lock 0f8a6f5696 MDL-38210 report_participation: implement get view/post actions 2015-04-01 10:29:08 +10:30
Eloy Lafuente (stronk7) 08c50738b3 Merge branch 'wip-mdl-48605-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-04-01 01:13:28 +02:00
Dan Poltawski 55588fd82e Merge branch 'MDL-49564-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-03-31 19:35:47 +01:00
Dan Poltawski ab0fb67e46 Merge branch 'MDL-49666_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-31 19:18:11 +01:00
Tim Hunt 39cf27cf64 MDL-49666 qbehaviour_informationitem: respect $options->readonly 2015-03-31 15:18:58 +01:00
Dan Poltawski 453a4c9202 Merge branch 'MDL-49671-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-31 15:11:08 +01:00
Rajesh Taneja 9070a896ae MDL-48605 unit_test: Only touch real file/dir 2015-03-31 21:46:49 +08:00
Dan Poltawski 2003c6ef66 Merge branch 'MDL-49547_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-31 14:44:10 +01:00
Dan Poltawski d77da9c15a Merge branch 'MDL-49645_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-03-31 13:28:22 +01:00
Dan Poltawski 0edc188114 Merge branch 'MDL-49641-get_external_files_m27' of https://github.com/jpahullo/moodle into MOODLE_27_STABLE 2015-03-31 13:15:10 +01:00
Dan Poltawski aa6b26be8c Merge branch 'MDL-49674-27-commentformat' of git://github.com/mudrd8mz/moodle into MOODLE_27_STABLE 2015-03-31 12:17:27 +01:00
Dan Poltawski 1cd346e6a7 Merge branch 'MDL-48880_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-31 11:19:24 +01:00
Dan Poltawski 2bce61f247 Merge branch 'm27_MDL-43818_Unable_Download_Package_Via_URL' of https://github.com/scara/moodle into MOODLE_27_STABLE 2015-03-31 09:27:56 +01:00
Andrew Nicols 85978ff0d1 Merge branch 'MDL-49695_m27' of git://github.com/markn86/moodle into MOODLE_27_STABLE 2015-03-31 15:15:48 +08:00
Rajesh Taneja f679a1e068 MDL-48605 unit_test: Fixed file_temp_cleanup_task
touch should only work on temp and below
dir's. With path we get temp/.. and temp/.
So we were modfying moodledata dir as well
and it was failing because of permission issues.
2015-03-31 14:57:40 +08:00
Andrew Nicols ca92a72426 MDL-49294 logging: Improve cleanup tests 2015-03-31 14:15:38 +08:00
Andrew Nicols cdca415c62 Merge branch 'log_cleanup_27' of https://github.com/tlevi/moodle into MOODLE_27_STABLE 2015-03-31 14:15:32 +08:00
Andrew Nicols 9225863595 MDL-49669 badges: Add comment to explain CURLOPT_POSTREDIR 2015-03-31 12:26:19 +08:00
Andrew Nicols ebfb2e51e3 Merge branch 'MDL-49669_27' of https://github.com/totara/openbadges into MOODLE_27_STABLE 2015-03-31 12:25:40 +08:00
Yuliya Bozhko 4659117d2e MDL-48205 badges: Get rid of ucfirst() and make modnames translatable
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-31 16:46:41 +13:00
David Monllao 877ea00888 Merge branch 'MDL-49114-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-03-31 11:29:42 +08:00
Andrew Nicols f6267b1f20 Merge branch 'm27_MDL-46805' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-31 08:18:36 +08:00
Dan Marsden 847de86adf MDL-46805 SCORM: AICC restricts allowed characters in the username 2015-03-31 10:41:27 +13:00
Matteo Scaramuccia 1d86f3c18e MDL-43818 SCORM: unable to download the Package via URL. 2015-03-30 20:40:21 +02:00
Eloy Lafuente (stronk7) c2217dea2c Merge branch 'wip-mdl-49708-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-30 13:27:45 +02:00
Dan Poltawski f5afe1acb0 Merge branch 'wip-MDL-47337-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-03-30 11:06:40 +01:00
Rajesh Taneja 1280d41691 MDL-49708 behat: Resize window back to default
Leaving window size to large fails in chrome
Reset it to default size works to ensure stamp
is visible by selenium driver
2015-03-30 17:30:32 +08:00
Rajesh Taneja 7c6628941b MDL-49708 behat: Fix chromedriver failure
Chromedriver tries to click in center of link
As these links wrap on next line it fails to
click on links on small screen
2015-03-30 12:36:33 +08:00
David Monllao 38ebaa270d Merge branch 'mdl36506-moodle27' of git://github.com/tlock/moodle into MOODLE_27_STABLE 2015-03-30 10:32:32 +08:00
Simey Lameze 22335cfd9d MDL-49114 environment: add slasharguments warning message 2015-03-30 10:17:55 +08:00
Jean-Michel Vedrine 7198eb72d9 MDL-48880 mod_lesson: clean lesson_branch on update and restore 2015-03-29 21:53:26 +02:00
Jean-Michel Vedrine b582e4b1f1 MDL-48880 mod_lesson: clean lesson_branch when a page is deleted 2015-03-29 21:53:26 +02:00
Mark Nelson ba8240b429 MDL-49695 tool_behat: fixed URL 2015-03-27 16:54:51 -07:00
Eric Merrill c25f161423 MDL-49693 atto: Clean textarea contents before inserting into editor 2015-03-27 12:27:35 -04:00
Eric Merrill 737df5ca1b MDL-49686 atto: Process style and class attributes in sub-functions
To ensure we only clean style and classes, first we select the inside
of those attributes and "replace" them with handler functions. Those
functions scan the actual attribute values for class or styles that
we want to exclude.

The first level regex has 3 groups. group1 selects everything in the
tag leading up to the attribute values, group2 has the attributes,
group3 has the trailing quote mark. We work on group2 then return
the combination of group1, group2, and group3.
2015-03-27 11:36:39 -04:00
Eric Merrill 0fddb5735c MDL-49671 atto: Any pastes that don't have html should clean everything
Browsers may not provide html content in the clipboard object event
though it will really be pasted as such. This includes Firefox on
Windows, Internet Explorer, and some niche cases in Safari.

Because of this, we need to scrub the entire editor anytime we can't
intercept a paste event.

In some magical day in the future when there is better cross browser
support, we can undo this.
2015-03-26 23:58:35 -04:00
Eric Merrill b365d5cc2d MDL-49564 atto: Improve empty span removal
Paste from MS word, followed by cleaning, may leave many many unused
spans. Try to remove them.
2015-03-26 23:09:33 -04:00
Marina Glancy c301086a1f MDL-47337 course: merge section options during restore 2015-03-27 08:49:58 +08:00
Mark Nelson 412b144b98 MDL-49645 core_backup: fixed 'expirythreshold' setting not being saved 2015-03-26 16:38:55 -07:00
Yuliya Bozhko 51a31cbec1 MDL-49669 badges: Handle curl redirects when posting to backpack
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
2015-03-27 09:31:24 +13:00
Tim Hunt 3142069285 MDL-49547 question restore: avoid tag-related notices. 2015-03-26 15:30:08 +00:00
David Mudrák e34d82ac30 MDL-49674 comment: Use correct format when displaying the comment
The plugin callback executed above can eventually change the format. We
need to use that one to have the formatting of the first AJAX response
consistent with following displays.
2015-03-26 13:02:23 +01:00
Eloy Lafuente (stronk7) 0582523ced weekly release 2.7.7+ 2015-03-26 10:47:59 +01:00
Eloy Lafuente (stronk7) a1f4486b19 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-03-26 10:47:53 +01:00
David Monllao 5aa2e6a6c8 MDL-47002 editor_atto: Remove all after html when pasting 2015-03-26 10:09:35 +01:00
David Monllao dd504eded3 MDL-47002 editor_atto: Clean the comments separately 2015-03-26 14:51:20 +08:00
Tony Levi 036c72ea8a MDL-49294 logging: Cleanup runs in smaller chunks
Just running a huge log cleanup will probably cause big problems on large sites.
So we break this down into smaller day-by-day chunks until reaching the target.
2015-03-26 12:02:08 +10:30
Eloy Lafuente (stronk7) 87f1d0aeab Merge branch 'MDL-47002-int-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-25 18:23:13 +01:00
Eric Merrill 7cf70d686e MDL-47002 atto: Prevent removal of Rangy spans 2015-03-25 10:03:08 -04:00
Martin Mastny e532ca42e5 MDL-37984 portfolio: using older Google libraries 2015-03-25 17:22:31 +08:00
Eric Merrill 8885056125 MDL-47003 atto: Update behat test for copyright symbol 2015-03-25 15:21:12 +08:00
Jordi Pujol Ahulló 16d070960d MDL-49641 repository_dropbox: preventing poor performance.
get_external_files placed with second argument as '' to prevent poor performance.
2015-03-25 07:59:12 +01:00
Martin Mastny 6d20d0f39e MDL-37984 portfolio: Google drive using official client library 2015-03-25 12:40:43 +08:00
David Monllao e2ac2c6692 MDL-45619 repository: Don't allow repository_recent to be uninstalled
We have tests that depends on it and it
is a simple repo that can just be disabled.
2015-03-25 09:40:26 +08:00
David Monllao bcecb03bbf Merge branch 'MDL-45619_m27' of git://github.com/sbourget/moodle into MOODLE_27_STABLE 2015-03-25 09:40:13 +08:00
David Monllao 7a9544773f Merge branch 'MDL-49558_M27' of git://github.com/nadavkav/moodle into MOODLE_27_STABLE 2015-03-25 08:36:46 +08:00
Nadav Kavalerchik 225526cd29 MDL-49558 user grades: Fix range & percent grade display in RTL mode 2015-03-24 19:55:23 +02:00
Dan Poltawski 83bcf92ca4 Merge branch 'MDL-49354-27' of https://github.com/mtavella-netspot/moodle into MOODLE_27_STABLE 2015-03-24 15:14:12 +00:00
Dan Poltawski 1c21735b18 Merge branch 'MDL-48918-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2015-03-24 15:10:56 +00:00
Eloy Lafuente (stronk7) 32fae6b5e3 Merge branch 'MDL-48795_27' of https://github.com/apsdehal/moodle into MOODLE_27_STABLE 2015-03-24 15:45:11 +01:00
Dan Poltawski a45058e2a4 Merge branch 'wip-mdl-49374-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-24 13:36:57 +00:00
Dan Poltawski 6eac74a233 Merge branch 'MDL-49070_scheduled_27' of https://github.com/andyjdavis/moodle into MOODLE_27_STABLE 2015-03-24 13:33:54 +00:00
Dan Poltawski a4546be3a8 Merge branch 'wip_MDL-49631_27_utfregex' of https://github.com/skodak/moodle into MOODLE_27_STABLE 2015-03-24 11:11:39 +00:00
Dan Poltawski a3aa563b60 Merge branch 'MDL-46746-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2015-03-24 11:04:29 +00:00
Dan Poltawski 1fad87a81c Merge branch 'MDL-49565-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-24 09:57:22 +00:00
Dan Poltawski 83190c6188 Merge branch 'wip_MDL-49327_2.7_guide_getinstance' of https://github.com/nixorv/moodle into MOODLE_27_STABLE
Conflicts:
	grade/grading/form/guide/tests/guide_test.php
2015-03-24 09:31:41 +00:00
David Monllao f33400b3a8 Merge branch 'MDL-49555-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-03-24 11:00:39 +08:00
David Monllao 299ea13687 Merge branch 'MDL-47003-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-24 10:17:49 +08:00
Tim Lock 9ad24a034e MDL-36506 mod_book: Skip legacy files migration if missing a CM record 2015-03-24 12:47:48 +10:30
Mohamed Alsharaf 9c1a586e4c MDL-35482 lesson: return to previous page after edit and page save 2015-03-24 00:41:32 +01:00
Nikita Kalinin 82c8214fdd MDL-49327 marking guide: Added condition on definitionid. 2015-03-24 00:10:16 +03:00
AMOS bot 72ca43735f Automatically generated installer lang files 2015-03-24 00:06:36 +08:00
Dan Poltawski 7e39143012 Merge branch 'wip_MDL-49327_2.7_guide_getinstance' of https://github.com/nixorv/moodle into MOODLE_27_STABLE 2015-03-23 15:49:07 +00:00
Dan Poltawski 51b1d8cb99 Merge branch 'MDL-48443-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-03-23 15:04:00 +00:00
Dan Poltawski 061bfe9071 Merge branch 'wip-mdl-49432-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-23 12:37:09 +00:00
Dan Poltawski 01cf3fc45e Merge branch 'MDL-48787-27' of https://github.com/pauln/moodle into MOODLE_27_STABLE 2015-03-23 11:58:12 +00:00
Dan Poltawski 194f690f1b Merge branch 'm27_MDL-48419' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-23 11:17:15 +00:00
Dan Poltawski a1df482ac4 Merge branch 'MDL-21201-27-feedback_anon' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_27_STABLE 2015-03-23 11:03:31 +00:00
David Monllao 55211a8d66 MDL-48456 course: Using default max int value 2015-03-23 15:18:27 +08:00
David Monllao 2608c20590 Merge branch 'MDL-48456-27' of git://github.com/dkns/moodle into MOODLE_27_STABLE 2015-03-23 15:18:20 +08:00
David Monllao aea1c25f07 Merge branch 'MDL-47002-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-23 14:59:45 +08:00
Petr Skoda 36d5d6d51b MDL-49631 fix incorrect whitespace remplacements 2015-03-23 17:41:26 +13:00
AMOS bot ed18a447b1 Automatically generated installer lang files 2015-03-23 00:04:22 +08:00
Daniel Kosinski f70f73517c MDL-48456 course: increase timeout when deleting all courses in category 2015-03-22 16:25:00 +01:00
AMOS bot 5ffcd725ce Automatically generated installer lang files 2015-03-21 00:04:11 +08:00
Julien Boulen baf58176f0 MDL-21201 Feedback: hide anonymous responses in recent activity reports 2015-03-20 16:25:14 +01:00
Nikita Kalinin 1a27d1b1fa MDL-49327 marking guide: Added condition on definitionid. 2015-03-20 12:19:24 +03:00
Rajesh Taneja 5cc5164228 MDL-49374 behat: Get install or re-install error code after composer
After composer is installed make sure we just process only
install or re-install
2015-03-20 14:06:20 +08:00
Rajesh Taneja e4643add2f MDL-49432 behat: guzzle packages has been unified
Current version of goutte is pointing to old guzzle packages
guzzle/common, guzzle/stream, guzzle/parser and guzzle/http.
They have been unified to guzzlehttp/guzzle, so include it to
avoid using old packages
2015-03-20 12:18:05 +08:00
Eloy Lafuente (stronk7) bac2631892 weekly release 2.7.7+ 2015-03-19 12:42:05 +01:00
Eloy Lafuente (stronk7) cfc17e4d61 NOBUG: Fixed file access permissions 2015-03-19 12:42:05 +01:00
Marina Glancy f1a1e58f91 MDL-45619 repository: corrections to uninstall, display link 2015-03-18 13:46:01 -04:00
Stephen Bourget 86fdfa6e6e MDL-45619 Repository: Allow repositories to be uninstalled 2015-03-18 13:45:57 -04:00
Eric Merrill 5cb340368f MDL-49565 atto: Allow html comments in editor code 2015-03-18 12:29:47 -04:00
Eric Merrill 0a45b86dca MDL-46746 atto: Remove unnecessary filtering of unicode characters 2015-03-18 12:09:21 -04:00
Eric Merrill 111141b38a MDL-47003 atto: Make code cleanup more targeted
Apply different, stricter, code cleanup when we receive HTML (WYSIWYG)
paste events, but be more lax the rest of the time.

Also, update the regexes to be more targeted for specific code patterns
pasted from office packages.
2015-03-18 11:47:54 -04:00
Eric Merrill b199c83c3a MDL-47002 atto: Improve paste behaviour to ensure propper cleanup
Old code failed to clean the editor div which resulted in
undesirable code being being left in the div for editing. To properly
handel incoming code, we should try to intercept and clean before the
paste, or clean the entire editable div.
2015-03-18 09:30:57 -04:00
info@ewallah.net 1359e4db0b MDL-49555 enrol_paypal: Only display icon if method available 2015-03-18 14:23:14 +01:00
Juan Leyva 37dadfe23e MDL-48443 webservices: Prevent duplicated user devices 2015-03-18 11:45:54 +01:00
Dan Marsden 7df2c28ca4 MDL-48419 mod_scorm: Check net script too agressive
in some cases high latency and network issues result in longer
than 2 sec responses from a server, increase this to avoid
excessive warnings.
2015-03-18 20:04:38 +13:00
David Monllao cc2957a8b8 Revert "Merge branch 'MDL-49445_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE"
This reverts commit b8062ad45c, reversing
changes made to d856439a71.
2015-03-18 10:51:47 +08:00
Adam Olley 788ca28e2a MDL-48787 quiz: Fix css of random question on order and paging screen 2015-03-18 14:52:14 +13:00
Eloy Lafuente (stronk7) 4e47cc03ac Merge branch 'MDL-49296_m27v3' of https://github.com/sbourget/moodle into MOODLE_27_STABLE 2015-03-17 12:05:36 +01:00
Dan Poltawski 93971a7435 Merge branch 'MDL-49359_m27' of https://github.com/markn86/moodle into MOODLE_27_STABLE 2015-03-17 08:53:33 +00:00
Mark Nelson b71319ecff MDL-49359 install: warn against using MyISAM 2015-03-16 20:47:22 -07:00
Stephen Bourget 38335b585e MDL-49296 Lesson: Add titles to action links 2015-03-16 20:37:17 -04:00
Eloy Lafuente (stronk7) 883bf7b4ba Merge branch 'MDL-49389_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-17 00:30:00 +01:00
Mike Grant dad3040e87 MDL-49276 config-dist: Removed legacy config options
Both $CFG->logsql and $CFG->dblogerror had no use in moodle core
since ages ago (just the former had one use for nothing). Good time
to get rid of both as they are 100% misleading.
2015-03-16 23:43:38 +01:00
Dan Poltawski a264c46f06 Merge branch 'MDL-48965_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-16 21:05:59 +00:00
Dan Poltawski 2c4557c760 Merge branch 'wip-MDL-49267-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-03-16 15:52:40 +00:00
Dan Poltawski d7bbbdcd39 Merge branch 'MDL-49104-27' of git://github.com/DanBennettUK/moodle into MOODLE_27_STABLE 2015-03-16 15:05:16 +00:00
Dan Poltawski e8c6bca2c8 Merge branch 'MDL-49187-27' of https://github.com/spvickers/moodle into MOODLE_27_STABLE 2015-03-16 14:48:11 +00:00
Dan Poltawski ce980d24f4 Merge branch 'MDL-49442-27' of git://github.com/jethac/moodle into MOODLE_27_STABLE 2015-03-16 13:31:09 +00:00
David Monllao b8062ad45c Merge branch 'MDL-49445_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-16 15:38:23 +08:00
David Monllao d856439a71 MDL-47712 question_multianswer: Concat as string 2015-03-16 13:51:31 +08:00
David Monllao cda5471399 Merge branch 'MDL-47712-m27-master' of git://github.com/dthies/moodle into MOODLE_27_STABLE 2015-03-16 10:33:52 +08:00
David Monllao 5dcc5dc2ba Merge branch 'm27_MDL-44548' of git://github.com/danmarsden/moodle into MOODLE_27_STABLE 2015-03-16 10:04:51 +08:00
David Monllao 1164d83897 Merge branch 'wip-MDL-47729-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2015-03-16 09:50:43 +08:00
Dan Marsden 65c0f42251 MDL-44548 mod_scorm: force an external sync to check for updated files. 2015-03-16 09:03:29 +13:00
Daniel Thies 393f5575b0 MDL-47712 qtype_multianswer: Move mathjaxloader spans to outer question 2015-03-13 21:35:05 -05:00
Tim Hunt 41f5bf1300 MDL-49446 behat: should_not_be_visible steps were not working
I fixed all similar problems in this class, even ones where it did
actually work becuase the two exceptions were of different types.
This pattern seems to have been copied and pasted a lot in this class,
and I am sure that will happen again, so I did not want to leave any
dangerous potential examples around.
2015-03-13 14:21:19 +00:00
Tim Hunt 67f6370208 MDL-49445 behat: selectors should match the most specific tr or li
I also fixed the text rule, which already did this, to use the same
idiom. It is unnecessarily inefficient to count all the things and
compare to 0. Not exists should be faster.

Also, updated all the selectors here to consistently start relative to
the current node (.//, not //).
2015-03-13 14:21:11 +00:00
Tim Hunt 9b3049630d MDL-49389 blocklib: avoid notices when moving blocks to the bottom 2015-03-13 14:21:03 +00:00
Marina Glancy c957fdc649 MDL-47729 repository_filesystem: smarter sync of references
It was noticed that if file content was once imported the following
synchronisations do not discover the changes
2015-03-13 11:21:30 +08:00
David Monllao c228f82bbb weekly release 2.7.7+ 2015-03-13 10:27:32 +08:00
David Monllao a0f47922fc Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-03-13 10:27:30 +08:00
AMOS bot 784fe082be Automatically generated installer lang files 2015-03-12 00:04:11 +08:00
David Monllao e495eb5a52 Merge branch 'MDL-48897_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-11 08:52:47 +08:00
David Monllao 8c4d6cc3a7 Merge branch 'MDL-48858-27' of git://github.com/mastnym/moodle into MOODLE_27_STABLE 2015-03-11 08:47:30 +08:00
Tim Hunt 4aee467e1b MDL-49315 questions: unit tests for each behaviour type class 2015-03-11 08:28:28 +08:00
Dan Poltawski 1cdc355053 Merge branch 'wip_MDL-49074_M27' of git://github.com/gjb2048/moodle into MOODLE_27_STABLE 2015-03-10 11:51:47 +00:00
Dan Poltawski 3478cf2337 Merge branch 'wip-mdl-49402-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-03-10 08:33:35 +00:00
Dan Poltawski cd5be28db8 Merge branch 'MDL-49376_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-03-10 08:27:33 +00:00
David Monllao 928f68efc6 Merge branch 'MDL-49346-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-03-10 15:32:17 +08:00
David Monllao 69067fb44b Merge branch 'MDL-49351-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE 2015-03-10 15:21:39 +08:00
David Monllao 723e307909 Merge branch 'MDL-49366_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-03-10 14:42:08 +08:00
Jetha Chan d3c05d5bab MDL-49442 javascript: add handlebars hashtable to support get_string 2015-03-10 13:07:38 +08:00
David Monllao 28a33650aa Merge branch 'MDL-49107-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE 2015-03-10 11:43:41 +08:00
David Monllao 154356ede5 Merge branch 'MDL-49332-27' of git://github.com/merrill-oakland/moodle into MOODLE_27_STABLE 2015-03-10 10:43:23 +08:00
David Monllao 9de52c1c5b Merge branch 'MDL-48572_27' of git://github.com/rlorenzo/moodle into MOODLE_27_STABLE 2015-03-10 10:35:48 +08:00
David Monllao 8581b4aaa0 Merge branch 'MDL-39262_27' of git://github.com/jmvedrine/moodle into MOODLE_27_STABLE 2015-03-10 10:13:14 +08:00
Eloy Lafuente (stronk7) fad0937a82 Moodle release 2.7.7 2015-03-10 00:42:36 +01:00
Dan Bennett 5b1e0822ac MDL-49104 repository_s3: backport of MDL-43725 2015-03-09 16:13:52 +00:00
Eloy Lafuente (stronk7) c1106792b1 weekly release 2.7.6+ 2015-03-09 16:47:46 +01:00
Marina Glancy 44b789cc6d MDL-49418 core: partial revert of MDL-48804
this is a quick fix for the issue 'Course module with two or more availability restrictions is not accessible'
MDL-49434 is created to deal with the renderer access inside availability check
2015-03-09 11:32:19 +08:00
Jean-Michel Vedrine ffd413d436 MDL-39262 mod_lesson: disable shortforms in lesson question display
Conflicts:
	mod/lesson/pagetypes/shortanswer.php
2015-03-08 11:25:07 +01:00
Amanpreet Singh cbf87a42c8 MDL-48795 lang: Update message for nothingnew
In lang/en/moodle.php file
2015-03-08 10:05:53 +05:30
Jean-Michel Vedrine 52f5987d67 MDL-48897 mod_lesson: behat tests for pages edition
This is a backport of MDL-48675.
2015-03-07 22:16:49 +01:00
Jean-Michel Vedrine f911807a10 MDL-48897 mod_lesson: Error displayed while editing content page jumps
This change also fix MDL-32343 and MDL-31778 related to problems
when editing cluster pages.

This is a backport of MDL-48675.
2015-03-07 22:16:48 +01:00
Jean-Michel Vedrine 9ab0b3da2b MDL-48965 mod_lesson: avoid short answer question without any answers 2015-03-07 22:09:10 +01:00
spvickers 37a00d0eae MDL-49187 mod_lti: Fix tool config lookup
Changed code to look for a tool ID before then matching on the URL.
2015-03-06 20:57:05 -07:00
Juan Leyva 86b1847c71 MDL-49346 ratings: ratingarea should be a required parameter 2015-03-06 11:44:59 +01:00
Juan Leyva 5f6ae21a57 MDL-49351 ratings: Correct check of viewallratings permission 2015-03-06 11:43:00 +01:00
Marina Glancy 4a3d2cf9ff MDL-49267 mod_wiki: always apply filters to the wiki name 2015-03-06 13:58:15 +08:00
Andrew Nicols 4e482832b3 MDL-48918 course: Fix keyboard drag/drop after dropped resource 2015-03-06 12:38:42 +08:00
Rajesh Taneja 6af3c65f4f MDL-49402 behat: Fixed feature file with same scenario name
1. We should not have same scanrio name in 1 feature file
   As it doesn't explain what is being tested. So modified.
2. Removed empty line, to keep it consistnet with other features
2015-03-06 11:49:21 +08:00
David Monllao ef381fdae1 MDL-49376 behat: Fixing resize step regex 2015-03-06 11:00:12 +08:00
Rex Lorenzo 4e54faadc0 MDL-48572 gradereport_grader: Average wrong with suspended users 2015-03-05 11:38:53 -08:00
Eric Merrill 69031e3e1d MDL-49332 gradebook: Raise time limit if we get into regrade
Because all regrading should (and does) start from this point, it
is safe and best to call it just once, from this point.
2015-03-05 10:10:19 -05:00
Tim Hunt 002f6fe9c0 MDL-49366 questions: avoid PHP notices from bad pluginfile URLs 2015-03-05 12:14:46 +00:00
Gareth J Barnard 4ea8fc0a7e MDL-49074 themes: WOFF2 fonts are not supported. Backport of MDL-46728. 2015-03-03 10:43:18 +00:00
Adrian Greeve e1e21e55e6 MDL-48858 mod_data: Update to behat tests
A bulk delete of entries has been added to
the behat tests.
2015-03-03 11:27:35 +08:00
Matthew Tavella b4c0270557 MDL-49354 YUI: Remove event-autohide module from yui-moodlesimple rollup 2015-03-03 10:30:47 +10:30
Frederic Massart ac5e89c4f4 MDL-49107 atto_link: Insert link even when selection is empty 2015-02-25 16:37:38 +01:00
Andrew Davis a1d4beea54 MDL-49070 core_registration: improved site registration scheduled task 2015-02-18 09:42:11 +01:00
Andrew Davis 9f1149e66a MDL-48702 logs: switched retrieval to get_recordset_select() 2015-01-08 08:54:07 +01:00
431 changed files with 5921 additions and 1765 deletions
+158
View File
@@ -1134,6 +1134,16 @@
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.8" requires="2.2">
@@ -1257,6 +1267,154 @@
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="2.9" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.1" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+21 -16
View File
@@ -561,31 +561,36 @@ $cronoverdue = ($lastcron < time() - 3600 * 24);
$dbproblems = $DB->diagnose();
$maintenancemode = !empty($CFG->maintenance_enabled);
// Available updates for Moodle core
// Available updates for Moodle core.
$updateschecker = \core\update\checker::instance();
$availableupdates = array();
$availableupdates['core'] = $updateschecker->get_update_info('core',
array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds));
$availableupdatesfetch = null;
// Available updates for contributed plugins
$pluginman = core_plugin_manager::instance();
foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
foreach ($plugintypeinstances as $pluginname => $plugininfo) {
if (!empty($plugininfo->availableupdates)) {
foreach ($plugininfo->availableupdates as $pluginavailableupdate) {
if ($pluginavailableupdate->version > $plugininfo->versiondisk) {
if (!isset($availableupdates[$plugintype.'_'.$pluginname])) {
$availableupdates[$plugintype.'_'.$pluginname] = array();
if (empty($CFG->disableupdatenotifications)) {
// Only compute the update information when it is going to be displayed to the user.
$availableupdates['core'] = $updateschecker->get_update_info('core',
array('minmaturity' => $CFG->updateminmaturity, 'notifybuilds' => $CFG->updatenotifybuilds));
// Available updates for contributed plugins
$pluginman = core_plugin_manager::instance();
foreach ($pluginman->get_plugins() as $plugintype => $plugintypeinstances) {
foreach ($plugintypeinstances as $pluginname => $plugininfo) {
if (!empty($plugininfo->availableupdates)) {
foreach ($plugininfo->availableupdates as $pluginavailableupdate) {
if ($pluginavailableupdate->version > $plugininfo->versiondisk) {
if (!isset($availableupdates[$plugintype.'_'.$pluginname])) {
$availableupdates[$plugintype.'_'.$pluginname] = array();
}
$availableupdates[$plugintype.'_'.$pluginname][] = $pluginavailableupdate;
}
$availableupdates[$plugintype.'_'.$pluginname][] = $pluginavailableupdate;
}
}
}
}
}
// The timestamp of the most recent check for available updates
$availableupdatesfetch = $updateschecker->get_last_timefetched();
// The timestamp of the most recent check for available updates
$availableupdatesfetch = $updateschecker->get_last_timefetched();
}
$buggyiconvnomb = (!function_exists('mb_convert_encoding') and @iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
//check if the site is registered on Moodle.org
+1 -1
View File
@@ -65,7 +65,7 @@ if (!empty($registeredhub) and $registeredhub->token == $token) {
$registeredhub->hubname = $hubname;
$registrationmanager->update_registeredhub($registeredhub);
//display notficiation message
// Display notification message.
$notificationmessage = $OUTPUT->notification(
get_string('registrationconfirmedon', 'hub', $hublink), 'notifysuccess');
echo $notificationmessage;
+3 -3
View File
@@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* On this page the administrator selects which hub he wants to register,
* except for MOOCH. Admins can register with MOOCH with the top admin menu "Registration" link.
* On this page the administrator can also unregister from any hubs, including MOOCH.
* On this page the administrator selects which hub he wants to register (except for moodle.net)
* Admins can register with moodle.net via the site admin menu "Registration" link.
* On this page the administrator can also unregister from any hubs including moodle.net.
*/
require('../../config.php');
+28 -24
View File
@@ -53,32 +53,36 @@ class registration_manager {
public function cron() {
global $CFG;
if (extension_loaded('xmlrpc')) {
//check if the last registration cron update was less than a week ago
$lastcron = get_config('registration', 'crontime');
if ($lastcron === false or $lastcron < strtotime("-7 day")) { //set to a week, see MDL-23704
$function = 'hub_update_site_info';
require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php");
//update all hub where the site is registered on
$hubs = $this->get_registered_on_hubs();
foreach ($hubs as $hub) {
//update the registration
$siteinfo = $this->get_site_info($hub->huburl);
$params = array('siteinfo' => $siteinfo);
$serverurl = $hub->huburl . "/local/hub/webservice/webservices.php";
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $hub->token);
try {
$result = $xmlrpcclient->call($function, $params);
mtrace(get_string('siteupdatedcron', 'hub', $hub->hubname));
} catch (Exception $e) {
$errorparam = new stdClass();
$errorparam->errormessage = $e->getMessage();
$errorparam->hubname = $hub->hubname;
mtrace(get_string('errorcron', 'hub', $errorparam));
}
}
set_config('crontime', time(), 'registration');
if ($lastcron > strtotime("-7 day")) { // Prevent this happening more than once a week.
return;
}
$function = 'hub_update_site_info';
require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php");
// Update all hubs where the site is registered.
$hubs = $this->get_registered_on_hubs();
if (empty($hubs)) {
mtrace(get_string('registrationwarning', 'admin'));
}
foreach ($hubs as $hub) {
// Update the registration.
$siteinfo = $this->get_site_info($hub->huburl);
$params = array('siteinfo' => $siteinfo);
$serverurl = $hub->huburl . "/local/hub/webservice/webservices.php";
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $hub->token);
try {
$result = $xmlrpcclient->call($function, $params);
mtrace(get_string('siteupdatedcron', 'hub', $hub->hubname));
} catch (Exception $e) {
$errorparam = new stdClass();
$errorparam->errormessage = $e->getMessage();
$errorparam->hubname = $hub->hubname;
mtrace(get_string('errorcron', 'hub', $errorparam));
}
}
set_config('crontime', time(), 'registration');
} else {
mtrace(get_string('errorcronnoxmlrpc', 'hub'));
}
+7
View File
@@ -177,6 +177,13 @@ if (!empty($error)) {
//some Moodle.org resitration explanation
if ($huburl == HUB_MOODLEORGHUBURL) {
if (!empty($registeredhub->token)) {
$registrationmessage = get_string('pleaserefreshregistration', 'admin');
} else {
$registrationmessage = get_string('registrationwarning', 'admin');
}
echo $OUTPUT->notification($registrationmessage);
echo $OUTPUT->heading(get_string('registerwithmoodleorg', 'admin'));
$renderer = $PAGE->get_renderer('core', 'register');
echo $renderer->moodleorg_registration_message();
+11 -6
View File
@@ -36,13 +36,18 @@ class core_register_renderer extends plugin_renderer_base {
* @return string
*/
public function moodleorg_registration_message() {
$moodleorgurl = html_writer::link('http://moodle.org', 'Moodle.org');
$moodleorgstatsurl = html_writer::link('http://moodle.org/stats', get_string('statsmoodleorg', 'admin'));
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, get_string('moodleorghubname', 'admin'));
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $moodleorgurl);
$moodleorgstatslink = html_writer::link('http://moodle.net/stats',
get_string('statsmoodleorg', 'admin'),
array('target' => '_blank'));
$hublink = html_writer::link('https://moodle.net/mod/page/view.php?id=1',
get_string('moodleorghubname', 'admin'),
array('target' => '_blank'));
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $hublink);
$items = array(get_string('registermoodleorgli1', 'admin'),
get_string('registermoodleorgli2', 'admin', $moodleorgstatsurl),
get_string('registermoodleorgli3', 'admin', $moochurl));
get_string('registermoodleorgli2', 'admin', $moodleorgstatslink));
$moodleorgregmsg .= html_writer::alist($items);
return $moodleorgregmsg;
}
+14 -4
View File
@@ -264,6 +264,7 @@ if (($action == 'edit') || ($action == 'new')) {
$strshow = get_string('on', 'repository');
$strhide = get_string('off', 'repository');
$strdelete = get_string('disabled', 'repository');
$struninstall = get_string('uninstallplugin', 'core_admin');
$actionchoicesforexisting = array(
'show' => $strshow,
@@ -286,9 +287,9 @@ if (($action == 'edit') || ($action == 'new')) {
// Table to list plug-ins
$table = new html_table();
$table->head = array(get_string('name'), get_string('isactive', 'repository'), get_string('order'), $settingsstr);
$table->head = array(get_string('name'), get_string('isactive', 'repository'), get_string('order'), $settingsstr, $struninstall);
$table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
$table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign', 'centeralign');
$table->id = 'repositoriessetting';
$table->data = array();
$table->attributes['class'] = 'admintable generaltable';
@@ -384,7 +385,12 @@ if (($action == 'edit') || ($action == 'new')) {
$updowncount++;
$table->data[] = array($i->get_readablename(), $OUTPUT->render($select), $updown, $settings);
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('repository_' . $typename, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$table->data[] = array($i->get_readablename(), $OUTPUT->render($select), $updown, $settings, $uninstall);
if (!in_array($typename, $alreadyplugins)) {
$alreadyplugins[] = $typename;
@@ -400,7 +406,11 @@ if (($action == 'edit') || ($action == 'new')) {
if (!in_array($plugin, $alreadyplugins)) {
$select = new single_select(repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
$select->set_label(get_string('action'), array('class' => 'accesshide'));
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('repository_' . $plugin, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '', $uninstall);
}
}
}
+24
View File
@@ -114,6 +114,30 @@ class behat_admin extends behat_base {
}
}
/**
* Sets the specified site settings. A table with | config | value | (optional)plugin | is expected.
*
* @Given /^the following config values are set as admin:$/
* @param TableNode $table
*/
public function the_following_config_values_are_set_as_admin(TableNode $table) {
if (!$data = $table->getRowsHash()) {
return;
}
foreach ($data as $config => $value) {
// Default plugin value is null.
$plugin = null;
if (is_array($value)) {
$plugin = $value[1];
$value = $value[0];
}
set_config($config, $value, $plugin);
}
}
/**
* Waits with the provided params if we are running a JS session.
*
+6 -6
View File
@@ -7,10 +7,10 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
Background:
Given the following "users" exist:
| username | firstname | lastname | email | auth | confirmed |
| user1 | User | One | one@asd.com | manual | 0 |
| user2 | User | Two | two@asd.com | ldap | 1 |
| user3 | User | Three | three@asd.com | manual | 1 |
| user4 | User | Four | four@asd.com | ldap | 0 |
| user1 | User | One | one@example.com | manual | 0 |
| user2 | User | Two | two@example.com | ldap | 1 |
| user3 | User | Three | three@example.com | manual | 1 |
| user4 | User | Four | four@example.com | ldap | 0 |
And the following "cohorts" exist:
| name | idnumber |
| Cohort 1 | CH1 |
@@ -23,8 +23,8 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
| user2 | C1 | student |
| user3 | C1 | student |
And I log in as "admin"
And I add "User Two (two@asd.com)" user to "CH1" cohort members
And I add "User Three (three@asd.com)" user to "CH1" cohort members
And I add "User Two (two@example.com)" user to "CH1" cohort members
And I add "User Three (three@example.com)" user to "CH1" cohort members
And I follow "Browse list of users"
@javascript
@@ -13,15 +13,13 @@ Feature: Set admin settings value
And I should not see "C_shortname Course fullname"
Scenario: set admin value with full name
Given I set the following administration settings values:
| Display extended course names | 1 |
When I press "Save changes"
Given the following config values are set as admin:
| courselistshortnames | 1 |
And I am on homepage
Then I should see "C_shortname Course fullname"
Scenario: set admin value with short name
Given I set the following administration settings values:
Given the following config values are set as admin:
| courselistshortnames | 1 |
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
+2 -2
View File
@@ -21,7 +21,7 @@ Feature: Upload users
And I should see "Tom"
And I should see "Jones"
And I should see "verysecret"
And I should see "jonest@someplace.edu"
And I should see "jonest@example.com"
And I should see "Reznor"
And I should see "course1"
And I should see "math102"
@@ -32,7 +32,7 @@ Feature: Upload users
And I follow "Browse list of users"
And I should see "Tom Jones"
And I should see "Trent Reznor"
And I should see "reznor@someplace.edu"
And I should see "reznor@example.com"
And I am on homepage
And I follow "Maths"
And I expand "Users" node
@@ -13,8 +13,8 @@ Feature: Manage availability conditions
Then I should not see "Availability restrictions"
# Enable it and check I can now see and click on it.
And I set the following administration settings values:
| Enable conditional access | 1 |
And the following config values are set as admin:
| enableavailability | 1 |
And I am on homepage
And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
@@ -28,9 +28,9 @@ Feature: Manage availability conditions
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I am on homepage
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
+8 -16
View File
@@ -44,13 +44,19 @@ require_once(__DIR__ . '/../../../../lib/behat/lib.php');
chdir(__DIR__);
$output = null;
exec("php util.php --diag", $output, $code);
// Ensure we have composer installed, before we install or re-install test site.
if ($code == BEHAT_EXITCODE_COMPOSER || $code == BEHAT_EXITCODE_INSTALL || $code == BEHAT_EXITCODE_REINSTALL) {
testing_update_composer_dependencies();
chdir(__DIR__);
exec("php util.php --diag", $output, $code);
}
if ($code == 0) {
echo "Behat test environment already installed\n";
} else if ($code == BEHAT_EXITCODE_INSTALL) {
testing_update_composer_dependencies();
// Behat and dependencies are installed and we need to install the test site.
chdir(__DIR__);
passthru("php util.php --install", $code);
@@ -60,8 +66,6 @@ if ($code == 0) {
} else if ($code == BEHAT_EXITCODE_REINSTALL) {
testing_update_composer_dependencies();
// Test site data is outdated.
chdir(__DIR__);
passthru("php util.php --drop", $code);
@@ -74,18 +78,6 @@ if ($code == 0) {
exit($code);
}
} else if ($code == BEHAT_EXITCODE_COMPOSER) {
// Missing Behat dependencies.
testing_update_composer_dependencies();
// Returning to admin/tool/behat/cli.
chdir(__DIR__);
passthru("php util.php --install", $code);
if ($code != 0) {
exit($code);
}
} else {
// Generic error, we just output it.
echo implode("\n", $output)."\n";
+1 -1
View File
@@ -165,7 +165,7 @@ class tool_behat_renderer extends plugin_renderer_base {
// Info.
$installurl = behat_command::DOCS_URL . '#Installation';
$installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
$writetestsurl = behat_command::DOCS_URL . '#Writting_features';
$writetestsurl = behat_command::DOCS_URL . '#Writing_features';
$writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
$writestepsurl = behat_command::DOCS_URL . '#Adding_steps_definitions';
$writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank'));
@@ -69,8 +69,8 @@ Feature: Set up contextual data for tests
Scenario: Role overrides
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
@@ -99,7 +99,7 @@ Feature: Set up contextual data for tests
Scenario: Add course enrolments
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
@@ -117,11 +117,11 @@ Feature: Set up contextual data for tests
| Custom student | custom2 | | |
And the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@moodlemoodle.com |
| user2 | User | 2 | user2@moodlemoodle.com |
| user3 | User | 3 | user3@moodlemoodle.com |
| user4 | User | 4 | user4@moodlemoodle.com |
| user5 | User | 5 | user5@moodlemoodle.com |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
| user3 | User | 3 | user3@example.com |
| user4 | User | 4 | user4@example.com |
| user5 | User | 5 | user5@example.com |
And the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
@@ -219,8 +219,8 @@ Feature: Set up contextual data for tests
Scenario: Add relations between users and groups
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
@@ -259,8 +259,8 @@ Feature: Set up contextual data for tests
| Cat 1 | 0 | CAT1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "cohorts" exist:
| name | idnumber |
| System cohort A | CHSA |
@@ -7,7 +7,7 @@ Feature: Edit capabilities
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
@@ -10,9 +10,9 @@ Feature: Verify that all form fields values can be get and set
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | email | firstname | lastname |
| student1 | s1@asd.com | Student | 1 |
| student2 | s2@asd.com | Student | 2 |
| student3 | s3@asd.com | Student | 3 |
| student1 | s1@example.com | Student | 1 |
| student2 | s2@example.com | Student | 2 |
| student3 | s3@example.com | Student | 3 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
@@ -91,19 +91,24 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
// Replace the query with hardcoded mappings required for core.
list($selectwhere, $params, $sort) = self::replace_sql_legacy($selectwhere, $params, $sort);
$events = array();
$records = array();
try {
$records = $DB->get_records_select('log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
// A custom report + on the fly SQL rewriting = a possible exception.
$records = $DB->get_recordset_select('log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
} catch (\moodle_exception $ex) {
debugging("error converting legacy event data " . $ex->getMessage() . $ex->debuginfo, DEBUG_DEVELOPER);
return array();
}
$events = array();
foreach ($records as $data) {
$events[$data->id] = \logstore_legacy\event\legacy_logged::restore_legacy($data);
}
$records->close();
return $events;
}
@@ -44,11 +44,26 @@ class cleanup_task extends \core\task\scheduled_task {
public function execute() {
global $CFG, $DB;
// Delete old logs to save space (this might need a timer to slow it down...).
if (!empty($CFG->loglifetime)) { // Value in days.
$loglifetime = time(0) - ($CFG->loglifetime * 3600 * 24);
$DB->delete_records_select("log", "time < ?", array($loglifetime));
mtrace(" Deleted old legacy log records");
if (empty($CFG->loglifetime)) {
return;
}
$loglifetime = time() - ($CFG->loglifetime * 3600 * 24); // Value in days.
$lifetimep = array($loglifetime);
$start = time();
while ($min = $DB->get_field_select("log", "MIN(time)", "time < ?", $lifetimep)) {
// Break this down into chunks to avoid transaction for too long and generally thrashing database.
// Experiments suggest deleting one day takes up to a few seconds; probably a reasonable chunk size usually.
// If the cleanup has just been enabled, it might take e.g a month to clean the years of logs.
$params = array(min($min + 3600 * 24, $loglifetime));
$DB->delete_records_select("log", "time < ?", $params);
if (time() > $start + 300) {
// Do not churn on log deletion for too long each run.
break;
}
}
mtrace(" Deleted old legacy log records");
}
}
@@ -273,4 +273,33 @@ class logstore_legacy_store_testcase extends advanced_testcase {
$this->assertContains($expectedreport, $reports);
}
}
/**
* Test that the legacy log cleanup works correctly.
*/
public function test_cleanup_task() {
global $DB;
$this->resetAfterTest();
// Create some records spread over various days; test multiple iterations in cleanup.
$record = (object) array('time' => time());
$DB->insert_record('log', $record);
$record->time -= 3600 * 24 * 30;
$DB->insert_record('log', $record);
$record->time -= 3600 * 24 * 30;
$DB->insert_record('log', $record);
$record->time -= 3600 * 24 * 30;
$DB->insert_record('log', $record);
$this->assertEquals(4, $DB->count_records('log'));
// Remove all logs before "today".
set_config('loglifetime', 1);
$this->expectOutputString(" Deleted old legacy log records\n");
$clean = new \logstore_legacy\task\cleanup_task();
$clean->execute();
$this->assertEquals(1, $DB->count_records('log'));
}
}
@@ -72,7 +72,7 @@ class store implements \tool_log\log\writer, \core\log\sql_internal_reader {
$sort = self::tweak_sort_by_id($sort);
$events = array();
$records = $DB->get_records_select('logstore_standard_log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
$records = $DB->get_recordset_select('logstore_standard_log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
foreach ($records as $data) {
$extra = array('origin' => $data->origin, 'ip' => $data->ip, 'realuserid' => $data->realuserid);
@@ -94,6 +94,8 @@ class store implements \tool_log\log\writer, \core\log\sql_internal_reader {
}
}
$records->close();
return $events;
}
@@ -43,12 +43,29 @@ class cleanup_task extends \core\task\scheduled_task {
*/
public function execute() {
global $DB;
$loglifetime = (int)get_config('logstore_standard', 'loglifetime');
if ($loglifetime > 0) {
$loglifetime = time() - ($loglifetime * 3600 * 24); // Value in days.
$DB->delete_records_select("logstore_standard_log", "timecreated < ?", array($loglifetime));
mtrace(" Deleted old log records from standard store.");
if (empty($loglifetime) || $loglifetime < 0) {
return;
}
$loglifetime = time() - ($loglifetime * 3600 * 24); // Value in days.
$lifetimep = array($loglifetime);
$start = time();
while ($min = $DB->get_field_select("logstore_standard_log", "MIN(timecreated)", "timecreated < ?", $lifetimep)) {
// Break this down into chunks to avoid transaction for too long and generally thrashing database.
// Experiments suggest deleting one day takes up to a few seconds; probably a reasonable chunk size usually.
// If the cleanup has just been enabled, it might take e.g a month to clean the years of logs.
$params = array(min($min + 3600 * 24, $loglifetime));
$DB->delete_records_select("logstore_standard_log", "timecreated < ?", $params);
if (time() > $start + 300) {
// Do not churn on log deletion for too long each run.
break;
}
}
mtrace(" Deleted old log records from standard store.");
}
}
@@ -218,4 +218,41 @@ class logstore_standard_store_testcase extends advanced_testcase {
$this->assertContains($expectedreport, $reports);
}
}
/**
* Test that the standard log cleanup works correctly.
*/
public function test_cleanup_task() {
global $DB;
$this->resetAfterTest();
// Create some records spread over various days; test multiple iterations in cleanup.
$ctx = context_course::instance(1);
$record = (object) array(
'edulevel' => 0,
'contextid' => $ctx->id,
'contextlevel' => $ctx->contextlevel,
'contextinstanceid' => $ctx->instanceid,
'userid' => 1,
'timecreated' => time(),
);
$DB->insert_record('logstore_standard_log', $record);
$record->timecreated -= 3600 * 24 * 30;
$DB->insert_record('logstore_standard_log', $record);
$record->timecreated -= 3600 * 24 * 30;
$DB->insert_record('logstore_standard_log', $record);
$record->timecreated -= 3600 * 24 * 30;
$DB->insert_record('logstore_standard_log', $record);
$this->assertEquals(4, $DB->count_records('logstore_standard_log'));
// Remove all logs before "today".
set_config('loglifetime', 1, 'logstore_standard');
$this->expectOutputString(" Deleted old log records from standard store.\n");
$clean = new \logstore_standard\task\cleanup_task();
$clean->execute();
$this->assertEquals(1, $DB->count_records('logstore_standard_log'));
}
}
+22 -18
View File
@@ -104,25 +104,29 @@ if ($execute = $options['execute']) {
$predbqueries = $DB->perf_get_queries();
$pretime = microtime(true);
mtrace("Scheduled task: " . $task->get_name());
// NOTE: it would be tricky to move this code to \core\task\manager class,
// because we want to do detailed error reporting.
$cronlockfactory = \core\lock\lock_config::get_lock_factory('cron');
if (!$cronlock = $cronlockfactory->get_lock('core_cron', 10)) {
mtrace('Cannot obtain cron lock');
exit(129);
}
if (!$lock = $cronlockfactory->get_lock('\\' . get_class($task), 10)) {
$cronlock->release();
mtrace('Cannot obtain task lock');
exit(130);
}
$task->set_lock($lock);
if (!$task->is_blocking()) {
$cronlock->release();
} else {
$task->set_cron_lock($cronlock);
}
try {
mtrace("Scheduled task: " . $task->get_name());
// NOTE: it would be tricky to move this code to \core\task\manager class,
// because we want to do detailed error reporting.
$cronlockfactory = \core\lock\lock_config::get_lock_factory('cron');
if (!$cronlock = $cronlockfactory->get_lock('core_cron', 10)) {
mtrace('Cannot obtain cron lock');
exit(129);
}
if (!$lock = $cronlockfactory->get_lock('\\' . get_class($task), 10)) {
mtrace('Cannot obtain task lock');
exit(130);
}
$task->set_lock($lock);
if (!$task->is_blocking()) {
$cronlock->release();
} else {
$task->set_cron_lock($cronlock);
}
get_mailer('buffer');
$task->execute();
if (isset($predbqueries)) {
+19 -2
View File
@@ -402,8 +402,14 @@ function uu_pre_process_custom_profile_data($data) {
function uu_check_custom_profile_data(&$data) {
global $CFG, $DB;
$noerror = true;
$testuserid = null;
// find custom profile fields and check if data needs to converted.
if (!empty($data['username'])) {
if (preg_match('/id=(.*)"/i', $data['username'], $result)) {
$testuserid = $result[1];
}
}
// Find custom profile fields and check if data needs to converted.
foreach ($data as $key => $value) {
if (preg_match('/^profile_field_/', $key)) {
$shortname = str_replace('profile_field_', '', $key);
@@ -417,9 +423,20 @@ function uu_check_custom_profile_data(&$data) {
$data['status'][] = get_string('invaliduserfield', 'error', $shortname);
$noerror = false;
}
// Check for duplicate value.
if (method_exists($formfield, 'edit_validate_field') ) {
$testuser = new stdClass();
$testuser->{$key} = $value;
$testuser->id = $testuserid;
$err = $formfield->edit_validate_field($testuser);
if (!empty($err[$key])) {
$data['status'][] = $err[$key].' ('.$key.')';
$noerror = false;
}
}
}
}
}
}
return $noerror;
}
}
+2 -2
View File
@@ -58,7 +58,7 @@ class auth_db_events_testcase extends advanced_testcase {
$user = new stdClass();
$user->name = 'mark';
$user->pass = 'password123';
$user->email = 'what@legend.com';
$user->email = 'what@example.com';
$user->id = $DB->insert_record('auth_db_users', $user);
// Run sync_users and capture the user_created event.
@@ -107,7 +107,7 @@ class auth_db_events_testcase extends advanced_testcase {
$user = new stdClass();
$user->name = 'mark';
$user->pass = 'password123';
$user->email = 'what@legend.com';
$user->email = 'what@example.com';
$user->id = $DB->insert_record('auth_db_users', $user);
// Set the config to remove the suspension on the user.
+4 -4
View File
@@ -139,12 +139,12 @@ class auth_plugin_email extends auth_plugin_base {
$user = get_complete_user_data('username', $username);
if (!empty($user)) {
if ($user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->auth != $this->authtype) {
if ($user->auth != $this->authtype) {
return AUTH_CONFIRM_ERROR;
} else if ($user->secret == $confirmsecret && $user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
$DB->set_field("user", "confirmed", 1, array("id"=>$user->id));
if ($user->firstaccess == 0) {
+1 -1
View File
@@ -24,7 +24,7 @@
$string['auth_emaildescription'] = '<p>Email-based self-registration enables a user to create their own account via a \'Create new account\' button on the login page. The user then receives an email containing a secure link to a page where they can confirm their account. Future logins just check the username and password against the stored values in the Moodle database.</p><p>Note: In addition to enabling the plugin, email-based self-registration must also be selected from the self registration drop-down menu on the \'Manage authentication\' page.</p>';
$string['auth_emailnoemail'] = 'Tried to send you an email but failed!';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the signup page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha/learnmore for more details. <br /><em>PHP cURL extension is required.</em>';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the sign-up page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha for more details.';
$string['auth_emailrecaptcha_key'] = 'Enable reCAPTCHA element';
$string['auth_emailsettings'] = 'Settings';
$string['pluginname'] = 'Email-based self-registration';
+6 -5
View File
@@ -604,12 +604,12 @@ class auth_plugin_ldap extends auth_plugin_base {
$user = get_complete_user_data('username', $username);
if (!empty($user)) {
if ($user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->auth != $this->authtype) {
if ($user->auth != $this->authtype) {
return AUTH_CONFIRM_ERROR;
} else if ($user->secret == $confirmsecret && $user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
if (!$this->user_activate($username)) {
return AUTH_CONFIRM_FAIL;
@@ -1653,7 +1653,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$_SERVER['HTTP_REFERER'] != $CFG->wwwroot &&
$_SERVER['HTTP_REFERER'] != $CFG->wwwroot.'/' &&
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/' &&
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/index.php')
$_SERVER['HTTP_REFERER'] != $CFG->httpswwwroot.'/login/index.php' &&
clean_param($_SERVER['HTTP_REFERER'], PARAM_LOCALURL) != '')
? $_SERVER['HTTP_REFERER'] : NULL;
}
+1 -1
View File
@@ -296,7 +296,7 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
'lastnamephonetic' => '最後のお名前のテスト一号',
'firstnamephonetic' => 'お名前のテスト一号',
'alternatename' => 'Alternate Name User Test 1',
'email' => 'usersignuptest1@email.com',
'email' => 'usersignuptest1@example.com',
'description' => 'This is a description for user 1',
'city' => 'Perth',
'country' => 'au',
+2 -2
View File
@@ -16,7 +16,7 @@ Feature: Authentication
Scenario: Log in as an existing admin user filling the form
Given the following "users" exist:
| username | password | firstname | lastname | email |
| testuser | testuser | Test | User | moodle@moodlemoodle.com |
| testuser | testuser | Test | User | moodle@example.com |
And I am on homepage
When I follow "Log in"
And I set the field "Username" to "testuser"
@@ -27,7 +27,7 @@ Feature: Authentication
Scenario: Log in as an unexisting user filling the form
Given the following "users" exist:
| username | password | firstname | lastname | email |
| testuser | testuser | Test | User | moodle@moodlemoodle.com |
| testuser | testuser | Test | User | moodle@example.com |
And I am on homepage
When I follow "Log in"
And I set the field "Username" to "testuser"
@@ -53,8 +53,8 @@ class condition extends \core_availability\condition {
*/
public function __construct($structure) {
// Get cmid.
if (isset($structure->cm) && is_int($structure->cm)) {
$this->cmid = $structure->cm;
if (isset($structure->cm) && is_number($structure->cm)) {
$this->cmid = (int)$structure->cm;
} else {
throw new \coding_exception('Missing or invalid ->cm for completion condition');
}
@@ -16,11 +16,9 @@ Feature: availability_completion
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
| Enable completion tracking | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
| enablecompletion | 1 |
@javascript
Scenario: Test condition
@@ -16,10 +16,8 @@ Feature: availability_date
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -10,16 +10,14 @@ Feature: availability_grade
| Course 1 | C1 | topics | 1 |
And the following "users" exist:
| username | email |
| teacher1 | t@example.org |
| student1 | s@example.org |
| teacher1 | t@example.com |
| student1 | s@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -60,8 +58,22 @@ Feature: availability_grade
And I set the field "Grade" to "A1"
And I click on "min" "checkbox" in the ".availability-item" "css_element"
And I set the field "Minimum grade percentage (inclusive)" to "50"
And I click on "max" "checkbox" in the ".availability-item" "css_element"
And I set the field "Maximum grade percentage (exclusive)" to "80"
And I press "Save and return to course"
# Check if disabling a part of the restriction is get saved.
And I open "P3" actions menu
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And I click on "max" "checkbox" in the ".availability-item" "css_element"
And I press "Save and return to course"
And I open "P3" actions menu
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And the field "Maximum grade percentage (exclusive)" matches value ""
And I follow "Course 1"
# Add a Page with a grade condition for 10%.
And I add a "Page" to section "4"
And I set the following fields to these values:
@@ -103,8 +115,8 @@ Feature: availability_grade
# Give the assignment 40%.
And I follow "A1"
And I follow "View/grade all submissions"
# Pick the grade link in the row that has s@example.org in it.
And I click on "//a[contains(@href, 'action=grade') and ancestor::tr/td[normalize-space(.) = 's@example.org']]/img" "xpath_element"
# Pick the grade link in the row that has s@example.com in it.
And I click on "//a[contains(@href, 'action=grade') and ancestor::tr/td[normalize-space(.) = 's@example.com']]/img" "xpath_element"
And I set the field "Grade out of 100" to "40"
And I click on "Save changes" "button"
@@ -95,6 +95,7 @@ M.availability_grade.form.getNode = function(json) {
root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');
root.delegate('valuechange', function() {
@@ -1 +1 @@
YUI.add("moodle-availability_grade-form",function(e,t){M.availability_grade=M.availability_grade||{},M.availability_grade.form=e.Object(M.core_availability.plugin),M.availability_grade.form.grades=null,M.availability_grade.form.initInner=function(e){this.grades=e,this.nodesSoFar=0},M.availability_grade.form.getNode=function(t){this.nodesSoFar++;var n=M.str.availability_grade,r="<label>"+n.title+' <span class="availability-group">'+'<select name="id"><option value="0">'+M.str.moodle.choosedots+"</option>";for(var i=0;i<this.grades.length;i++){var s=this.grades[i];r+='<option value="'+s.id+'">'+s.name+"</option>"}r+='</select></span></label> <span class="availability-group"><label><input type="checkbox" name="min"/>'+n.option_min+'</label> <label><span class="accesshide">'+n.label_min+'</span><input type="text" name="minval" title="'+n.label_min+'"/></label>%</span>'+'<span class="availability-group">'+'<label><input type="checkbox" name="max"/>'+n.option_max+'</label> <label><span class="accesshide">'+n.label_max+'</span><input type="text" name="maxval" title="'+n.label_max+'"/></label>%</span>';var o=e.Node.create("<span>"+r+"</span>");t.id!==undefined&&o.one("select[name=id] > option[value="+t.id+"]")&&o.one("select[name=id]").set("value",""+t.id),t.min!==undefined&&(o.one("input[name=min]").set("checked",!0),o.one("input[name=minval]").set("value",t.min)),t.max!==undefined&&(o.one("input[name=max]").set("checked",!0),o.one("input[name=maxval]").set("value",t.max));var u=function(e,t){var n=e.ancestor("label").next("label").one("input"),r=e.get("checked");return n.set("disabled",!r),t&&r&&n.focus(),r};o.all("input[type=checkbox]").each(u);if(!M.availability_grade.form.addedEvents){M.availability_grade.form.addedEvents=!0;var a=e.one("#fitem_id_availabilityconditionsjson");a.delegate("change",function(){M.core_availability.form.update()},".availability_grade select[name=id]"),a.delegate("click",function(){u(this,!0)},".availability_grade input[type=checkbox]"),a.delegate("valuechange",function(){M.core_availability.form.update()},".availability_grade input[type=text]")}return o},M.availability_grade.form.fillValue=function(e,t){e.id=parseInt(t.one("select[name=id]").get("value"),10),t.one("input[name=min]").get("checked")&&(e.min=this.getValue("minval",t)),t.one("input[name=max]").get("checked")&&(e.max=this.getValue("maxval",t))},M.availability_grade.form.getValue=function(e,t){var n=t.one("input[name="+e+"]").get("value");if(!/^[0-9]+([.,][0-9]+)?$/.test(n))return n;var r=parseFloat(n.replace(",","."));return r<0||r>100?n:r},M.availability_grade.form.fillErrors=function(e,t){var n={};this.fillValue(n,t),n.id===0&&e.push("availability_grade:error_selectgradeid"),n.min!==undefined&&typeof n.min=="string"||n.max!==undefined&&typeof n.max=="string"?e.push("availability_grade:error_invalidnumber"):n.min!==undefined&&n.max!==undefined&&n.min>=n.max&&e.push("availability_grade:error_backwardrange")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
YUI.add("moodle-availability_grade-form",function(e,t){M.availability_grade=M.availability_grade||{},M.availability_grade.form=e.Object(M.core_availability.plugin),M.availability_grade.form.grades=null,M.availability_grade.form.initInner=function(e){this.grades=e,this.nodesSoFar=0},M.availability_grade.form.getNode=function(t){this.nodesSoFar++;var n=M.str.availability_grade,r="<label>"+n.title+' <span class="availability-group">'+'<select name="id"><option value="0">'+M.str.moodle.choosedots+"</option>";for(var i=0;i<this.grades.length;i++){var s=this.grades[i];r+='<option value="'+s.id+'">'+s.name+"</option>"}r+='</select></span></label> <span class="availability-group"><label><input type="checkbox" name="min"/>'+n.option_min+'</label> <label><span class="accesshide">'+n.label_min+'</span><input type="text" name="minval" title="'+n.label_min+'"/></label>%</span>'+'<span class="availability-group">'+'<label><input type="checkbox" name="max"/>'+n.option_max+'</label> <label><span class="accesshide">'+n.label_max+'</span><input type="text" name="maxval" title="'+n.label_max+'"/></label>%</span>';var o=e.Node.create("<span>"+r+"</span>");t.id!==undefined&&o.one("select[name=id] > option[value="+t.id+"]")&&o.one("select[name=id]").set("value",""+t.id),t.min!==undefined&&(o.one("input[name=min]").set("checked",!0),o.one("input[name=minval]").set("value",t.min)),t.max!==undefined&&(o.one("input[name=max]").set("checked",!0),o.one("input[name=maxval]").set("value",t.max));var u=function(e,t){var n=e.ancestor("label").next("label").one("input"),r=e.get("checked");return n.set("disabled",!r),t&&r&&n.focus(),r};o.all("input[type=checkbox]").each(u);if(!M.availability_grade.form.addedEvents){M.availability_grade.form.addedEvents=!0;var a=e.one("#fitem_id_availabilityconditionsjson");a.delegate("change",function(){M.core_availability.form.update()},".availability_grade select[name=id]"),a.delegate("click",function(){u(this,!0),M.core_availability.form.update()},".availability_grade input[type=checkbox]"),a.delegate("valuechange",function(){M.core_availability.form.update()},".availability_grade input[type=text]")}return o},M.availability_grade.form.fillValue=function(e,t){e.id=parseInt(t.one("select[name=id]").get("value"),10),t.one("input[name=min]").get("checked")&&(e.min=this.getValue("minval",t)),t.one("input[name=max]").get("checked")&&(e.max=this.getValue("maxval",t))},M.availability_grade.form.getValue=function(e,t){var n=t.one("input[name="+e+"]").get("value");if(!/^[0-9]+([.,][0-9]+)?$/.test(n))return n;var r=parseFloat(n.replace(",","."));return r<0||r>100?n:r},M.availability_grade.form.fillErrors=function(e,t){var n={};this.fillValue(n,t),n.id===0&&e.push("availability_grade:error_selectgradeid"),n.min!==undefined&&typeof n.min=="string"||n.max!==undefined&&typeof n.max=="string"?e.push("availability_grade:error_invalidnumber"):n.min!==undefined&&n.max!==undefined&&n.min>=n.max&&e.push("availability_grade:error_backwardrange")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
@@ -95,6 +95,7 @@ M.availability_grade.form.getNode = function(json) {
root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');
root.delegate('valuechange', function() {
+1
View File
@@ -93,6 +93,7 @@ M.availability_grade.form.getNode = function(json) {
root.delegate('click', function() {
updateCheckbox(this, true);
M.core_availability.form.update();
}, '.availability_grade input[type=checkbox]');
root.delegate('valuechange', function() {
@@ -16,10 +16,8 @@ Feature: availability_group
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -22,10 +22,8 @@ Feature: availability_grouping
And the following "group members" exist:
| user | group |
| student1 | GI1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -10,16 +10,14 @@ Feature: availability_profile
| Course 1 | C1 | topics | 1 |
And the following "users" exist:
| username | email |
| teacher1 | t@example.org |
| student1 | s@example.org |
| teacher1 | t@example.com |
| student1 | s@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -38,7 +36,7 @@ Feature: availability_profile
And I click on "Add restriction..." "button"
And I click on "User profile" "button"
And I set the field "User profile field" to "Email address"
And I set the field "Value to compare against" to "s@example.org"
And I set the field "Value to compare against" to "s@example.com"
And I click on ".availability-item .availability-eye img" "css_element"
And I click on "Save and return to course" "button"
@@ -52,7 +50,7 @@ Feature: availability_profile
And I click on "Add restriction..." "button"
And I click on "User profile" "button"
And I set the field "User profile field" to "Email address"
And I set the field "Value to compare against" to "q@example.org"
And I set the field "Value to compare against" to "q@example.com"
And I click on ".availability-item .availability-eye img" "css_element"
And I click on "Save and return to course" "button"
@@ -78,7 +76,7 @@ Feature: availability_profile
# Set field value for user.
And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
And I click on "a[title=Edit]" "css_element" in the "s@example.org" "table_row"
And I click on "a[title=Edit]" "css_element" in the "s@example.com" "table_row"
And I expand all fieldsets
And I set the field "Super field" to "Bananaman"
And I click on "Update profile" "button"
@@ -34,10 +34,8 @@ Feature: display_availability
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Activity availability display
@@ -76,7 +74,7 @@ Feature: display_availability
And I press "Add restriction..."
And I click on "User profile" "button" in the "Add restriction..." "dialogue"
And I set the field "User profile field" to "Email address"
And I set the field "Value to compare against" to "email@example.org"
And I set the field "Value to compare against" to "email@example.com"
And I set the field "Method of comparison" to "is equal to"
And I press "Save and return to course"
@@ -39,15 +39,10 @@ Feature: edit_availability
When I edit the section "1"
Then "Restrict access" "fieldset" should not exist
When I log out
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And the following config values are set as admin:
| enableavailability | 1 |
When I log out
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should exist
@@ -58,10 +53,8 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in activity form
# Set up.
Given I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
@@ -153,10 +146,8 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in section form
# Set up.
Given I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -172,3 +163,4 @@ Feature: edit_availability
And I should not see "None" in the "Restrict access" "fieldset"
And "Restriction type" "select" should be visible
And I should see "Date" in the "Restrict access" "fieldset"
+3 -3
View File
@@ -299,7 +299,7 @@
<IDNUMBER>891220979</IDNUMBER>
<FIRSTNAME>Admin</FIRSTNAME>
<LASTNAME>User</LASTNAME>
<EMAIL>adamzap@gmail.com</EMAIL>
<EMAIL>adamzap@example.com</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
@@ -368,7 +368,7 @@
<IDNUMBER>891111111</IDNUMBER>
<FIRSTNAME>Adam</FIRSTNAME>
<LASTNAME>Zapletal</LASTNAME>
<EMAIL>azaple1@lsu.edu</EMAIL>
<EMAIL>azaple1@example.com</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
@@ -481,7 +481,7 @@
<IDNUMBER></IDNUMBER>
<FIRSTNAME>Philip</FIRSTNAME>
<LASTNAME>Cali</LASTNAME>
<EMAIL>pcali1@lsu.edu</EMAIL>
<EMAIL>pcali1@example.com</EMAIL>
<EMAILSTOP>0</EMAILSTOP>
<ICQ></ICQ>
<SKYPE></SKYPE>
+1 -1
View File
@@ -516,7 +516,7 @@ class backup_enrolments_structure_step extends backup_structure_step {
$enrol = new backup_nested_element('enrol', array('id'), array(
'enrol', 'status', 'name', 'enrolperiod', 'enrolstartdate',
'enrolenddate', 'expirynotify', 'expirytreshold', 'notifyall',
'enrolenddate', 'expirynotify', 'expirythreshold', 'notifyall',
'password', 'cost', 'currency', 'roleid',
'customint1', 'customint2', 'customint3', 'customint4', 'customint5', 'customint6', 'customint7', 'customint8',
'customchar1', 'customchar2', 'customchar3',
+41 -13
View File
@@ -1386,13 +1386,31 @@ class restore_section_structure_step extends restore_structure_step {
public function process_course_format_options($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
unset($data->id);
$data->sectionid = $this->task->get_sectionid();
$data->courseid = $this->get_courseid();
$newid = $DB->insert_record('course_format_options', $data);
$this->set_mapping('course_format_options', $oldid, $newid);
static $courseformats = array();
$courseid = $this->get_courseid();
if (!array_key_exists($courseid, $courseformats)) {
// It is safe to have a static cache of course formats because format can not be changed after this point.
$courseformats[$courseid] = $DB->get_field('course', 'format', array('id' => $courseid));
}
$data = (array)$data;
if ($courseformats[$courseid] === $data['format']) {
// Import section format options only if both courses (the one that was backed up
// and the one we are restoring into) have same formats.
$params = array(
'courseid' => $this->get_courseid(),
'sectionid' => $this->task->get_sectionid(),
'format' => $data['format'],
'name' => $data['name']
);
if ($record = $DB->get_record('course_format_options', $params, 'id, value')) {
// Do not overwrite existing information.
$newid = $record->id;
} else {
$params['value'] = $data['value'];
$newid = $DB->insert_record('course_format_options', $params);
}
$this->set_mapping('course_format_options', $data['id'], $newid);
}
}
protected function after_execute() {
@@ -2901,11 +2919,6 @@ class restore_activity_grades_structure_step extends restore_structure_step {
$oldparentid = $data->categoryid;
$courseid = $this->get_courseid();
// make sure top course category exists, all grade items will be associated
// to it. Later, if restoring the whole gradebook, categories will be introduced
$coursecat = grade_category::fetch_course_category($courseid);
$coursecatid = $coursecat->id; // Get the categoryid to be used
$idnumber = null;
if (!empty($data->idnumber)) {
// Don't get any idnumber from course module. Keep them as they are in grade_item->idnumber
@@ -2930,8 +2943,18 @@ class restore_activity_grades_structure_step extends restore_structure_step {
}
}
if (!empty($data->categoryid)) {
// If the grade category id of the grade item being restored belongs to this course
// then it is a fair assumption that this is the correct grade category for the activity
// and we should leave it in place, if not then unset it.
// TODO MDL-34790 Gradebook does not import if target course has gradebook categories.
$conditions = array('id' => $data->categoryid, 'courseid' => $courseid);
if (!$this->task->is_samesite() || !$DB->record_exists('grade_categories', $conditions)) {
unset($data->categoryid);
}
}
unset($data->id);
$data->categoryid = $coursecatid;
$data->courseid = $this->get_courseid();
$data->iteminstance = $this->task->get_activityid();
$data->idnumber = $idnumber;
@@ -3688,6 +3711,11 @@ class restore_create_categories_and_questions extends restore_structure_step {
$data = (object)$data;
$newquestion = $this->get_new_parentid('question');
$questioncreated = (bool) $this->get_mappingid('question_created', $this->get_old_parentid('question'));
if (!$questioncreated) {
// This question already exists in the question bank. Nothing for us to do.
return;
}
if (!empty($CFG->usetags)) { // if enabled in server
// TODO: This is highly inefficient. Each time we add one tag
@@ -0,0 +1,237 @@
<?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/>.
/**
* Tests for Moodle 2 format backup operation.
*
* @package core_backup
* @copyright 2014 Russell Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
require_once($CFG->dirroot . '/course/format/topics/lib.php');
require_once($CFG->libdir . '/completionlib.php');
/**
* Tests for Moodle 2 course format section_options backup operation.
*
* @package core_backup
* @copyright 2014 Russell Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_backup_moodle2_course_format_testcase extends advanced_testcase {
/**
* Tidy up open files that may be left open.
*/
protected function tearDown() {
gc_collect_cycles();
}
/**
* Tests a backup and restore adds the required section option data
* when the same course format is used.
*/
public function test_course_format_options_restore() {
global $DB, $CFG;
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
$CFG->enablecompletion = true;
// Create a course with some availability data set.
$generator = $this->getDataGenerator();
$course = $generator->create_course(
array('format' => 'test_cs_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$courseobject = format_base::instance($course->id);
$section = $DB->get_record('course_sections',
array('course' => $course->id, 'section' => 1), '*', MUST_EXIST);
$data = array('id' => $section->id,
'numdaystocomplete' => 2);
$courseobject->update_section_format_options($data);
// Backup and restore it.
$this->backup_and_restore($course);
$sectionoptions = $courseobject->get_format_options(1);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
$this->assertEquals(2, $sectionoptions['numdaystocomplete']);
}
/**
* Tests an import into the same subject successfully
* restores the options without error.
*/
public function test_course_format_options_import_myself() {
global $DB, $CFG;
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
$CFG->enablecompletion = true;
// Create a course with some availability data set.
$generator = $this->getDataGenerator();
$course = $generator->create_course(
array('format' => 'test_cs_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$courseobject = format_base::instance($course->id);
$section = $DB->get_record('course_sections',
array('course' => $course->id, 'section' => 1), '*', MUST_EXIST);
$data = array('id' => $section->id,
'numdaystocomplete' => 2);
$courseobject->update_section_format_options($data);
$this->backup_and_restore($course, $course);
$sectionoptions = $courseobject->get_format_options(1);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
$this->assertArrayNotHasKey('secondparameter', $sectionoptions);
$this->assertEquals(2, $sectionoptions['numdaystocomplete']);
}
/**
* Tests that all section options are copied when the course format is changed.
* None of the data is copied.
*
* It is a future enhancement to copy;
* 1. Only the relevant options.
* 2. Only the data associated with relevant options.
*/
public function test_course_format_options_restore_new_format() {
global $DB, $CFG;
$this->resetAfterTest(true);
$this->setAdminUser();
$CFG->enableavailability = true;
$CFG->enablecompletion = true;
// Create a course with some availability data set.
$generator = $this->getDataGenerator();
$course = $generator->create_course(
array('format' => 'test_cs2_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$newcourse = $generator->create_course(
array('format' => 'test_cs_options', 'numsections' => 3,
'enablecompletion' => COMPLETION_ENABLED),
array('createsections' => true));
$courseobject = format_base::instance($course->id);
$section = $DB->get_record('course_sections',
array('course' => $course->id, 'section' => 1), '*', MUST_EXIST);
$data = array('id' => $section->id,
'numdaystocomplete' => 2,
'secondparameter' => 8);
$courseobject->update_section_format_options($data);
// Backup and restore it.
$this->backup_and_restore($course, $newcourse);
$newcourseobject = format_base::instance($newcourse->id);
$sectionoptions = $newcourseobject->get_format_options(1);
$this->assertArrayHasKey('numdaystocomplete', $sectionoptions);
$this->assertArrayHasKey('secondparameter', $sectionoptions);
$this->assertEquals(0, $sectionoptions['numdaystocomplete']);
$this->assertEquals(0, $sectionoptions['secondparameter']);
}
/**
* Backs a course up and restores it.
*
* @param stdClass $srccourse Course object to backup
* @param stdClass $dstcourse Course object to restore into
* @return int ID of newly restored course
*/
protected function backup_and_restore($srccourse, $dstcourse = null) {
global $USER, $CFG;
// Turn off file logging, otherwise it can't delete the file (Windows).
$CFG->backup_file_logger_level = backup::LOG_NONE;
// Do backup with default settings. MODE_IMPORT means it will just
// create the directory and not zip it.
$bc = new backup_controller(backup::TYPE_1COURSE, $srccourse->id,
backup::FORMAT_MOODLE, backup::INTERACTIVE_NO, backup::MODE_IMPORT,
$USER->id);
$backupid = $bc->get_backupid();
$bc->execute_plan();
$bc->destroy();
// Do restore to new course with default settings.
if ($dstcourse !== null) {
$newcourseid = $dstcourse->id;
} else {
$newcourseid = restore_dbops::create_new_course(
$srccourse->fullname, $srccourse->shortname . '_2', $srccourse->category);
}
$rc = new restore_controller($backupid, $newcourseid,
backup::INTERACTIVE_NO, backup::MODE_GENERAL, $USER->id,
backup::TARGET_NEW_COURSE);
$this->assertTrue($rc->execute_precheck());
$rc->execute_plan();
$rc->destroy();
return $newcourseid;
}
}
/**
* Class format_test_cs_options
*
* Test course format that has 1 option.
*/
class format_test_cs_options extends format_topics {
public function section_format_options($foreditform = false) {
return array(
'numdaystocomplete' => array(
'type' => PARAM_INT,
'label' => 'Test days',
'element_type' => 'text',
'default' => 0,
),
);
}
}
/**
* Class format_test_cs2_options
*
* Test course format that has 2 options, 1 inherited.
*/
class format_test_cs2_options extends format_test_cs_options {
public function section_format_options($foreditform = false) {
return array(
'secondparameter' => array(
'type' => PARAM_INT,
'label' => 'Test Parmater',
'element_type' => 'text',
'default' => 0,
),
) + parent::section_format_options($foreditform);
}
}
@@ -11,7 +11,7 @@ Feature: Duplicate activities
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -12,7 +12,7 @@ Feature: Import course's contents into another course
| Course 2 | C2 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -43,6 +42,22 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
protected $groupedpaths; // Paths we are requesting grouped
protected $currentdata; // Where we'll be acummulating data
// We create a array that stores each of the paths in a tree fashion
// like the filesystem. Each element stores all the child elements that are
// part of a full path that builds the grouped parent path we are storing.
// eg Array keys are stored as follows;
// root => a => b
// => b
// => c => d
// => e => f.
// Grouped paths here are; /a/b, /b, /c/d, /c/e/f.
// There are no nested parent paths, that is an enforced rule so
// we store an empty array to designate that the particular XML path element
// is in fact a grouped path.
// eg; $this->groupedparentprefixtree['a']['b'] = array();
/** @var array Search tree storing the grouped paths. */
protected $groupedparentprefixtree;
/**
* Keep cache of parent directory paths for XML parsing.
* @var array
@@ -78,6 +93,18 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
throw new progressive_parser_exception('xml_grouped_child_found', $a);
}
$this->groupedpaths[$path] = true;
// We check earlier in the function if there is a parent that is above the path
// to be added so we can be sure no parent exists in the tree.
$patharray = explode('/', $path);
$currentpos = &$this->groupedparentprefixtree;
foreach ($patharray as $item) {
if (!isset($currentpos[$item])) {
$currentpos[$item] = array();
}
// Update the current array position using a reference to allow in-place updates to the array.
$currentpos = &$currentpos[$item];
}
}
parent::add_path($path);
}
@@ -162,13 +189,29 @@ abstract class grouped_parser_processor extends simplified_parser_processor {
* false if not
*/
protected function grouped_parent_exists($path) {
$parentpath = $this->get_parent_path($path);
while ($parentpath != '/') {
if ($this->path_is_grouped($parentpath)) {
return $parentpath;
// Search the tree structure to find out if one of the paths
// above the $path is a grouped path.
$patharray = explode('/', $this->get_parent_path($path));
$groupedpath = '';
$currentpos = &$this->groupedparentprefixtree;
foreach ($patharray as $item) {
// When the item isn't set in the array we know
// there is no parent grouped path.
if (!isset($currentpos[$item])) {
return false;
}
$parentpath = $this->get_parent_path($parentpath);
// When we aren't at the start of the path, continue to build
// a string representation of the path that is traversed. We will
// return the grouped path to the caller if we find one.
if ($item != '') {
$groupedpath .= '/'.$item;
}
if ($currentpos[$item] == array()) {
return $groupedpath;
}
$currentpos = &$currentpos[$item];
}
return false;
}
+2 -2
View File
@@ -87,7 +87,7 @@ class award_criteria_activity extends award_criteria {
if (!$mod) {
$str = $OUTPUT->error_text(get_string('error:nosuchmod', 'badges'));
} else {
$str = html_writer::tag('b', '"' . ucfirst($mod->modname) . ' - ' . $mod->name . '"');
$str = html_writer::tag('b', '"' . get_string('modulename', $mod->modname) . ' - ' . $mod->name . '"');
if (isset($p['bydate'])) {
$str .= get_string('criteria_descr_bydate', 'badges', userdate($p['bydate'], get_string('strftimedate', 'core_langconfig')));
}
@@ -142,7 +142,7 @@ class award_criteria_activity extends award_criteria {
}
$param = array('id' => $mod->id,
'checked' => $checked,
'name' => ucfirst($mod->modname) . ' - ' . $mod->name,
'name' => get_string('modulename', $mod->modname) . ' - ' . $mod->name,
'error' => false
);
+1 -1
View File
@@ -164,7 +164,7 @@ class award_criteria_courseset extends award_criteria {
$param = array(
'id' => $course->id,
'checked' => true,
'name' => ucfirst(format_string($course->fullname, true, array('context' => $coursecontext))),
'name' => format_string($course->fullname, true, array('context' => $coursecontext)),
'error' => false
);
+8 -6
View File
@@ -59,13 +59,15 @@ class OpenBadgesBackpackHandler {
break;
}
$curl->setHeader(array('Accept: application/json', 'Expect:'));
$options = array(
'FRESH_CONNECT' => true,
'RETURNTRANSFER' => true,
'FORBID_REUSE' => true,
'HEADER' => 0,
'HTTPHEADER' => array('Expect:'),
'CONNECTTIMEOUT' => 3,
'FRESH_CONNECT' => true,
'RETURNTRANSFER' => true,
'FORBID_REUSE' => true,
'HEADER' => 0,
'CONNECTTIMEOUT' => 3,
// Follow redirects with the same type of request when sent 301, or 302 redirects.
'CURLOPT_POSTREDIR' => 3
);
if ($action == 'user') {
+3 -3
View File
@@ -14,10 +14,10 @@ Feature: Add badges to the system
And I expand "Badges" node
And I follow "Badges settings"
And I set the field "Default badge issuer name" to "Test Badge Site"
And I set the field "Default badge issuer contact details" to "testuser@test-badge-site.com"
And I set the field "Default badge issuer contact details" to "testuser@example.com"
And I press "Save changes"
When I follow "Add a new badge"
Then the field "issuercontact" matches value "testuser@test-badge-site.com"
Then the field "issuercontact" matches value "testuser@example.com"
And the field "issuername" matches value "Test Badge Site"
@javascript
@@ -35,7 +35,7 @@ Feature: Add badges to the system
| Name | Test Badge |
| Description | Test badge description |
| issuername | Test Badge Site |
| issuercontact | testuser@test-badge-site.com |
| issuercontact | testuser@example.com |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
When I press "Create badge"
Then I should see "Edit details"
+20 -26
View File
@@ -12,7 +12,7 @@ Feature: Award badges
| Name | Profile Badge |
| Description | Test badge description |
| issuername | Test Badge Site |
| issuercontact | testuser@test-badge-site.com |
| issuercontact | testuser@example.com |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager
And I press "Create badge"
And I set the field "type" to "Profile completion"
@@ -39,8 +39,8 @@ Feature: Award badges
Scenario: Award site badge
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher | teacher | 1 | teacher1@asd.com |
| student | student | 1 | student1@asd.com |
| teacher | teacher | 1 | teacher1@example.com |
| student | student | 1 | student1@example.com |
And I log in as "admin"
And I navigate to "Add a new badge" node in "Site administration > Badges"
And I set the following fields to these values:
@@ -56,9 +56,9 @@ Feature: Award badges
And I press "Continue"
And I follow "Recipients (0)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "teacher 1 (teacher1@asd.com)"
And I set the field "potentialrecipients[]" to "teacher 1 (teacher1@example.com)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "student 1 (student1@asd.com)"
And I set the field "potentialrecipients[]" to "student 1 (student1@example.com)"
And I press "Award badge"
When I follow "Site Badge"
Then I should see "Recipients (2)"
@@ -72,9 +72,9 @@ Feature: Award badges
Scenario: Award course badge
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
@@ -100,9 +100,9 @@ Feature: Award badges
And I press "Continue"
And I follow "Recipients (0)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 2 (student2@asd.com)"
And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 1 (student1@asd.com)"
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
When I press "Award badge"
And I follow "Course Badge"
Then I should see "Recipients (2)"
@@ -120,16 +120,15 @@ Feature: Award badges
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I follow "Home"
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I set the following fields to these values:
@@ -139,8 +138,6 @@ Feature: Award badges
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "//span[text()='Badges']" "xpath_element" in the "Administration" "block"
And I follow "Add a new badge"
@@ -175,16 +172,15 @@ Feature: Award badges
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I follow "Home"
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I set the following fields to these values:
@@ -200,8 +196,6 @@ Feature: Award badges
And I click on "Condition: Activity completion" "link"
And I set the field "Assign - Test assignment name" to "1"
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "//span[text()='Badges']" "xpath_element" in the "Administration" "block"
And I follow "Add a new badge"
@@ -10,8 +10,8 @@ Feature: Add a comment to the comments block
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -11,8 +11,8 @@ Feature: Delete comment block messages
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | First | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -10,8 +10,8 @@ Feature: Course summary block used in a course
| Course 1 | C101 | Proved the course summary block works! |0 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@asd.com |
| teacher1 | Teacher | One | teacher1@asd.com |
| student1 | Sam | Student | student1@example.com |
| teacher1 | Teacher | One | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C101 | student |
@@ -10,8 +10,8 @@ Feature: Random glossary entry block is used in a course
| Course 1 | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@test.com |
| teacher1 | Terry1 | Teacher1 | teacher1@test.com |
| student1 | Sam1 | Student1 | student1@example.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
+2 -2
View File
@@ -7,8 +7,8 @@ Feature: HTML blocks in a course
Scenario: Adding HTML block in a course
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher@asd.com |
| student1 | Sam1 | Student1 | student1@asd.com |
| teacher1 | Terry1 | Teacher1 | teacher@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
+1 -1
View File
@@ -7,7 +7,7 @@ Feature: Login from a block
Background:
Given the following "users" exist:
| username | password | firstname | lastname | email |
| testuser | testpass | Test | User | student1@asd.com |
| testuser | testpass | Test | User | student1@example.com |
And I log in as "admin"
And I navigate to "Turn editing on" node in "Front page settings"
And I add the "Login" block
@@ -7,8 +7,8 @@ Feature: Expand the courses nodes within the navigation block
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@local.host |
| student1 | Student | 1 | student1@local.host |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist:
| name | category | idnumber | visible |
| cat1 | 0 | cat1 | 1 |
@@ -187,4 +187,4 @@ Feature: Expand the courses nodes within the navigation block
And navigation node "c1" should not be expandable
And navigation node "c2" should be expandable
And navigation node "c3" should not be expandable
And navigation node "c4" should not be expandable
And navigation node "c4" should not be expandable
@@ -7,7 +7,7 @@ Feature: View my courses in navigation block
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist:
| name | category | idnumber |
| cat1 | 0 | cat1 |
@@ -29,13 +29,11 @@ Feature: View my courses in navigation block
| student1 | c1 | student |
| student1 | c31 | student |
| student1 | c331 | student |
And I log in as "admin"
@javascript
Scenario: The plain list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 0 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 0 |
And I log in as "student1"
When I follow "My home"
Then I should not see "cat1" in the "Navigation" "block"
@@ -49,9 +47,8 @@ Feature: View my courses in navigation block
@javascript
Scenario: The nested list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 1 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 1 |
And I log in as "student1"
When I follow "My home"
Then I should see "cat1" in the "Navigation" "block"
@@ -69,10 +66,9 @@ Feature: View my courses in navigation block
@javascript
Scenario: I can expand categories and courses as guest
Given I set the following administration settings values:
| Show my course categories | 1 |
| Show all courses | 1 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 1 |
| navshowallcourses | 1 |
And I expand "Courses" node
And I should see "cat1" in the "Navigation" "block"
And I should see "cat2" in the "Navigation" "block"
@@ -8,7 +8,7 @@ Feature: Latest news block displays the course latest news
Scenario: Latest course news are displayed and can be configured
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And I log in as "admin"
And I create a course with:
| Course full name | Course 1 |
@@ -10,7 +10,7 @@ Feature: People Block used in a course
| Course 1 | C101 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@asd.com |
| student1 | Sam | Student | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C101 | student |
@@ -7,7 +7,7 @@ Feature: People Block used on frontpage
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@asd.com |
| student1 | Sam | Student | student1@example.com |
And I log in as "admin"
And I navigate to "Turn editing on" node in "Front page settings"
And I add the "People" block
@@ -40,7 +40,7 @@ $string['config_show_best'] = 'How many of the highest grades should be shown (0
$string['config_show_worst'] = 'How many of the lowest grades should be shown (0 to disable)?';
$string['configuredtoshownothing'] = 'This block\'s configuration currently does not allow it to show any results. You may want to either configure it or hide it.';
$string['config_use_groups'] = 'Show groups instead of students (only if the quiz supports groups)?';
$string['error_emptyquizid'] = 'There is an error right now with this block: you need to select which quiz it should display results from.';
$string['error_emptyquizid'] = 'Please configure this block and select which quiz it should display results from.';
$string['error_emptyquizrecord'] = 'There is an error right now with this block: the selected quiz does not seem to exist in the database.';
$string['error_nogroupsexist'] = 'There is an error right now with this block: it is set to display grades in group mode, but the course has no defined groups.';
$string['pluginname'] = 'Quiz results';
@@ -10,11 +10,11 @@ Feature: View structural changes in recent activity block
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@asd.com |
| assistant1 | Terry2 | Teacher2 | teacher2@asd.com |
| student1 | Sam1 | Student1 | student1@asd.com |
| student2 | Sam2 | Student2 | student2@asd.com |
| student3 | Sam3 | Student3 | student3@asd.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
| assistant1 | Terry2 | Teacher2 | teacher2@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| student3 | Sam3 | Student3 | student3@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -46,10 +46,8 @@ Feature: View structural changes in recent activity block
| GG3 | G2 |
Scenario: Check that Added module information is displayed respecting view capability
Given I log in as "admin"
And I set the following administration settings values:
| Enable group members only | 1 |
And I log out
Given the following config values are set as admin:
| enablegroupmembersonly | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
+2 -2
View File
@@ -7,8 +7,8 @@ Feature: Add blocks
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
@@ -10,7 +10,7 @@ Feature: Add and configure blocks throughout the site
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@asd.com |
| manager1 | Manager | 1 | manager1@example.com |
And the following "system role assigns" exist:
| user | course | role |
| manager1 | Acceptance test site | manager |
@@ -36,7 +36,7 @@ Feature: Add and configure blocks throughout the site
Scenario: My home does not allow assignation of roles on blocks
Given the following "users" exist:
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@asd.com |
| manager1 | Manager | 1 | manager1@example.com |
And I log in as "manager1"
And I click on "My home" "link" in the "Navigation" "block"
When I press "Customise this page"
+1 -1
View File
@@ -10,7 +10,7 @@ Feature: Block appearances
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | teacher | 1 | teacher1@asd.com |
| teacher1 | teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@@ -7,7 +7,7 @@ Feature: Allowed blocks controls
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
+2 -2
View File
@@ -7,8 +7,8 @@ Feature: Comment on a blog entry
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| testuser | Test | User | moodle@moodlemoodle.com |
| testuser2 | Test2 | User2 | moodle2@moodlemoodle.com |
| testuser | Test | User | moodle@example.com |
| testuser2 | Test2 | User2 | moodle2@example.com |
And I log in as "testuser"
And I am on homepage
And I expand "My profile" node
+2 -2
View File
@@ -2944,7 +2944,7 @@ function calendar_add_icalendar_event($event, $courseid, $subscriptionid, $timez
$name = $event->properties['SUMMARY'][0]->value;
$name = str_replace('\n', '<br />', $name);
$name = str_replace('\\', '', $name);
$name = preg_replace('/\s+/', ' ', $name);
$name = preg_replace('/\s+/u', ' ', $name);
$eventrecord = new stdClass;
$eventrecord->name = clean_param($name, PARAM_NOTAGS);
@@ -2956,7 +2956,7 @@ function calendar_add_icalendar_event($event, $courseid, $subscriptionid, $timez
$description = clean_param($description, PARAM_NOTAGS);
$description = str_replace('\n', '<br />', $description);
$description = str_replace('\\', '', $description);
$description = preg_replace('/\s+/', ' ', $description);
$description = preg_replace('/\s+/u', ' ', $description);
}
$eventrecord->description = $description;
+2 -2
View File
@@ -7,8 +7,8 @@ Feature: Perform basic calendar functionality
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
+2
View File
@@ -328,6 +328,7 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
$paramevents = array ('courseids' => array($course->id), 'groupids' => array($group->id));
$events = core_calendar_external::get_calendar_events($paramevents, $options);
$events = external_api::clean_returnvalue(core_calendar_external::get_calendar_events_returns(), $events);
$this->assertEquals(4, count($events['events'])); // site, user, group, one course event.
$this->assertEquals(0, count($events['warnings']));
@@ -390,6 +391,7 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
array('name' => 'user')
);
$eventsret = core_calendar_external::create_calendar_events($events);
$eventsret = external_api::clean_returnvalue(core_calendar_external::create_calendar_events_returns(), $eventsret);
// Check to see if things were created properly.
$aftercount = $DB->count_records('event');
+12 -12
View File
@@ -7,10 +7,10 @@ Feature: Add cohorts of users
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| user1 | First | User | first@user.com |
| user2 | Second | User | second@user.com |
| user3 | Third | User | third@user.com |
| user4 | Forth | User | forth@user.com |
| user1 | First | User | first@example.com |
| user2 | Second | User | second@example.com |
| user3 | Third | User | third@example.com |
| user4 | Forth | User | forth@example.com |
And I log in as "admin"
And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
And I press "Add"
@@ -31,13 +31,13 @@ Feature: Add cohorts of users
@javascript
Scenario: Add users to a cohort selecting them from the system users list
When I add "First User (first@user.com)" user to "333" cohort members
And I add "Second User (second@user.com)" user to "333" cohort members
When I add "First User (first@example.com)" user to "333" cohort members
And I add "Second User (second@example.com)" user to "333" cohort members
Then I should see "2" in the "#cohorts" "css_element"
And I follow "Assign"
And the "Current users" select box should contain "First User (first@user.com)"
And the "Current users" select box should contain "Second User (second@user.com)"
And the "Current users" select box should not contain "Forth User (forth@user.com)"
And the "Current users" select box should contain "First User (first@example.com)"
And the "Current users" select box should contain "Second User (second@example.com)"
And the "Current users" select box should not contain "Forth User (forth@example.com)"
@javascript
Scenario: Add users to a cohort using a bulk user action
@@ -53,6 +53,6 @@ Feature: Add cohorts of users
And I follow "Cohorts"
Then I should see "2" in the "#cohorts" "css_element"
And I follow "Assign"
And the "Current users" select box should contain "Third User (third@user.com)"
And the "Current users" select box should contain "Forth User (forth@user.com)"
And the "Current users" select box should not contain "First User (first@user.com)"
And the "Current users" select box should contain "Third User (third@example.com)"
And the "Current users" select box should contain "Forth User (forth@example.com)"
And the "Current users" select box should not contain "First User (first@example.com)"
+1 -1
View File
@@ -40,7 +40,7 @@ use Behat\Behat\Context\Step\Given as Given;
class behat_cohort extends behat_base {
/**
* Adds the user to the specified cohort. The user should be specified like "Firstname Lastname (user@email.com)".
* Adds the user to the specified cohort. The user should be specified like "Firstname Lastname (user@example.com)".
*
* @Given /^I add "(?P<user_fullname_string>(?:[^"]|\\")*)" user to "(?P<cohort_idnumber_string>(?:[^"]|\\")*)" cohort members$/
* @param string $user
+7
View File
@@ -66,6 +66,7 @@ class core_cohort_externallib_testcase extends externallib_advanced_testcase {
// Call the external function.
$createdcohorts = core_cohort_external::create_cohorts(array($cohort1, $cohort2));
$createdcohorts = external_api::clean_returnvalue(core_cohort_external::create_cohorts_returns(), $createdcohorts);
// Check we retrieve the good total number of created cohorts + no error on capability.
$this->assertEquals(2, count($createdcohorts));
@@ -143,6 +144,7 @@ class core_cohort_externallib_testcase extends externallib_advanced_testcase {
// Call the external function.
$returnedcohorts = core_cohort_external::get_cohorts(array(
$cohort1->id, $cohort2->id));
$returnedcohorts = external_api::clean_returnvalue(core_cohort_external::get_cohorts_returns(), $returnedcohorts);
// Check we retrieve the good total number of enrolled cohorts + no error on capability.
$this->assertEquals(2, count($returnedcohorts));
@@ -160,6 +162,7 @@ class core_cohort_externallib_testcase extends externallib_advanced_testcase {
// Call the external function.
$returnedcohorts = core_cohort_external::get_cohorts(array(
$cohort1->id, $cohort2->id));
$returnedcohorts = external_api::clean_returnvalue(core_cohort_external::get_cohorts_returns(), $returnedcohorts);
// Check we retrieve the good total number of enrolled cohorts + no error on capability.
$this->assertEquals(2, count($returnedcohorts));
@@ -345,6 +348,7 @@ class core_cohort_externallib_testcase extends externallib_advanced_testcase {
// Call the external function.
$addcohortmembers = core_cohort_external::add_cohort_members(array($cohort1));
$addcohortmembers = external_api::clean_returnvalue(core_cohort_external::add_cohort_members_returns(), $addcohortmembers);
// Check we retrieve the good total number of created cohorts + no error on capability.
$this->assertEquals(1, count($addcohortmembers));
@@ -386,11 +390,14 @@ class core_cohort_externallib_testcase extends externallib_advanced_testcase {
'usertype' => array('type' => 'id', 'value' => $user1->id)
);
$cohortmembers1 = core_cohort_external::add_cohort_members(array($cohortaddmember1));
$cohortmembers1 = external_api::clean_returnvalue(core_cohort_external::add_cohort_members_returns(), $cohortmembers1);
$cohortaddmember2 = array(
'cohorttype' => array('type' => 'id', 'value' => $cohort2->id),
'usertype' => array('type' => 'id', 'value' => $user2->id)
);
$cohortmembers2 = core_cohort_external::add_cohort_members(array($cohortaddmember2));
$cohortmembers2 = external_api::clean_returnvalue(core_cohort_external::add_cohort_members_returns(), $cohortmembers2);
// Check we retrieve no cohorts + no error on capability.
$this->assertEquals(2, $DB->count_records_select('cohort_members', ' ((cohortid = :idcohort1 AND userid = :iduser1)
+1 -1
View File
@@ -656,7 +656,7 @@ class comment {
$newcmt->fullname = fullname($USER);
$url = new moodle_url('/user/view.php', array('id' => $USER->id, 'course' => $this->courseid));
$newcmt->profileurl = $url->out();
$newcmt->content = format_text($newcmt->content, $format, array('overflowdiv'=>true));
$newcmt->content = format_text($newcmt->content, $newcmt->format, array('overflowdiv'=>true));
$newcmt->avatar = $OUTPUT->user_picture($USER, array('size'=>16));
$commentlist = array($newcmt);
@@ -11,17 +11,15 @@ Feature: Allow students to manually mark an activity as complete
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -10,16 +10,14 @@ Feature: Restrict activity availability through date conditions
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -11,16 +11,14 @@ Feature: Restrict activity availability through grade conditions
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -10,17 +10,15 @@ Feature: Restrict sections availability through completion or grade conditions
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@asd.com |
| student1 | Student | First | student1@asd.com |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
@javascript
Scenario: Show section greyed-out to student when completion condition is not satisfied
@@ -16,9 +16,9 @@ Feature: Allow teachers to manually mark users as complete when configured
| user | course | role |
| student1 | CC1 | student |
| teacher1 | CC1 | editingteacher |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I am on homepage
And I follow "Completion course"
And completion tracking is "Enabled" in current course
+1 -1
View File
@@ -8,6 +8,6 @@
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/dbUnit": "1.2.*",
"moodlehq/behat-extension": "1.27.13"
"moodlehq/behat-extension": "1.27.14"
}
}
+1 -10
View File
@@ -341,15 +341,6 @@ $CFG->admin = 'admin';
// $CFG->forcefirstname = 'Bruce';
// $CFG->forcelastname = 'Simpson';
//
// The following setting will turn SQL Error logging on. This will output an
// entry in apache error log indicating the position of the error and the statement
// called. This option will action disregarding error_reporting setting.
// $CFG->dblogerror = true;
//
// The following setting will log every database query to a table called adodb_logsql.
// Use this setting on a development server only, the table grows quickly!
// $CFG->logsql = true;
//
// The following setting will turn on username logging into Apache log. For full details regarding setting
// up of this function please refer to the install section of the document.
// $CFG->apacheloguser = 0; // Turn this feature off. Default value.
@@ -689,7 +680,7 @@ $CFG->admin = 'admin';
// (the basic and behat_* ones) to avoid problems with production environments. This setting can be
// used to expand the default white list with an array of extra settings.
// Example:
// $CFG->behat_extraallowedsettings = array('logsql', 'dblogerror');
// $CFG->behat_extraallowedsettings = array('somecoresetting', ...);
//
// You should explicitly allow the usage of the deprecated behat steps, otherwise an exception will
// be thrown when using them. The setting is disabled by default.
+7 -2
View File
@@ -109,6 +109,11 @@ abstract class format_base {
return self::$classesforformat[$format];
}
if (PHPUNIT_TEST && class_exists('format_' . $format)) {
// Allow unittests to use non-existing course formats.
return $format;
}
// Else return default format
$defaultformat = get_config('moodlecourse', 'format');
if (!in_array($defaultformat, $plugins)) {
@@ -136,7 +141,7 @@ abstract class format_base {
if (!isset($classnames[$format])) {
$plugins = core_component::get_plugin_list('format');
$usedformat = self::get_format_or_default($format);
if (file_exists($plugins[$usedformat].'/lib.php')) {
if (isset($plugins[$usedformat]) && file_exists($plugins[$usedformat].'/lib.php')) {
require_once($plugins[$usedformat].'/lib.php');
}
$classnames[$format] = 'format_'. $usedformat;
@@ -936,7 +941,7 @@ class format_site extends format_base {
* @return null|moodle_url
*/
public function get_view_url($section, $options = array()) {
return new moodle_url('/');
return new moodle_url('/', array('redirect' => 0));
}
/**
+2 -1
View File
@@ -218,13 +218,14 @@ function edit_module_post_actions($moduleinfo, $course) {
}
$moduleinfo->gradecat = $grade_category->id;
}
$gradecategory = $grade_item->get_parent_category();
foreach ($items as $itemid=>$unused) {
$items[$itemid]->set_parent($moduleinfo->gradecat);
if ($itemid == $grade_item->id) {
// Use updated grade_item.
$grade_item = $items[$itemid];
}
$gradecategory = $grade_item->get_parent_category();
if (!empty($moduleinfo->add)) {
if (grade_category::aggregation_uses_aggregationcoef($gradecategory->aggregation)) {
if ($gradecategory->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN) {
@@ -8,9 +8,9 @@ Feature: Edit completion settings of an activity
Given the following "courses" exist:
| fullname | shortname | enablecompletion |
| Course 1 | C1 | 1 |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
@@ -8,7 +8,7 @@ Feature: Open the edit menu when a block is docked
Scenario: Open the action menu with a block docked
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | weeks |
@@ -8,7 +8,7 @@ Feature: Toggle activities groups mode from the course page
Scenario: Groups mode toggle with javascript enabled
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
@@ -8,8 +8,8 @@ Feature: Indent items on the course page
Scenario: Indent course items with Javascript enabled
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | weeks |
@@ -8,8 +8,8 @@ Feature: Toggle activities visibility from the course page
Scenario: Hide/Show toggle with javascript enabled
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
@@ -44,7 +44,7 @@ Feature: Toggle activities visibility from the course page
Scenario: Activities can be shown and hidden inside a hidden section
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format | numsections |
| Course 1 | C1 | topics | 2 |
@@ -71,7 +71,7 @@ Feature: Toggle activities visibility from the course page
Scenario: Activities can be shown and hidden inside an orphaned section
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format | numsections |
| Course 1 | C1 | topics | 2 |
+2 -2
View File
@@ -7,8 +7,8 @@ Feature: Add activities to courses
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
+2 -2
View File
@@ -19,7 +19,7 @@ Feature: Course activity controls works as expected
Scenario Outline: General activities course controls using topics and weeks formats, and paged mode and not paged mode works as expected
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format | coursedisplay | numsections |
| Course 1 | C1 | <courseformat> | <coursedisplay> | 5 |
@@ -99,7 +99,7 @@ Feature: Course activity controls works as expected
Scenario Outline: General activities course controls using topics and weeks formats, and paged mode and not paged mode works as expected
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format | coursedisplay | numsections |
| Course 1 | C1 | <courseformat> | <coursedisplay> | 5 |
+2 -2
View File
@@ -8,8 +8,8 @@ Feature: Managers can create courses
Scenario: Courses are created with the default forum and blocks
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| student1 | Student | 1 | student1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And I log in as "admin"
And I create a course with:
| Course full name | Course 1 |
+1 -1
View File
@@ -8,7 +8,7 @@ Feature: Edit course settings
Scenario: Edit course settings
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | summary | format |
| Course 1 | C1 | <p>Course summary</p> | topics |

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