206 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
40de097e65 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Andrew Nicols
f908e8beef MDL-69192 mod_assign: Stop clicking OK on non-existent modal 2020-10-08 08:04:10 +08:00
Andrew Nicols
eed4650028 MDL-69149 core_grade: Correct xpath attribute selector 2020-06-26 19:59:56 +08:00
Matt Davidson
887679e510 MDL-68163 gradebook: add grade item duplication 2020-06-02 09:28:29 -04:00
David Mudrák
2615e429f4 MDL-68753 lang: Remove a redundant okay string and use "OK" everywhere
The "Ok" (with lower-case "k") string was added in MDL-68409 to keep
backwards compatibility with YUI alerts that had it hard-coded. But we
should not need to explain to translators why we have two OK strings
like this and why they use different wording.

Additionally, there would be inconsistency in Behat tests and everywhere
depending on which "OK" or "Ok" string is used for buttons.

So instead, this patch changes the hard-coded 'Ok' string in the YUI and
we should stick to "OK" from now on everywhere.
2020-05-27 09:59:44 +02:00
Marina Glancy
5b529aca15 MDL-68333 testing: trigger user_created event in user generator 2020-05-19 19:11:54 +02:00
Andrew Nicols
149d80e819 MDL-66109 behat: Fix Example usage in feature files
The gherkin-lint package now understands the use of "Examples" and
requries that their indentation be correct and consistent.

This change sets the indentatation for these to:

    "Examples": 4,
    "example": 6,

This is in-line with the examples given in the offical Cucumber/Gherkin
documentation at
https://cucumber.io/docs/gherkin/reference/#scenario-outline whereby the
Examples and individual rows of the Examples table are children of the
Scenario outline.

This is contrary to the default for Gherkin-lint which places them as
top-level nodes with an indentatio of 0, and 2 respectively.
2020-05-11 10:55:58 +08:00
Mathew May
97ba6091ab MDL-67165 core_grade: Add the grader name to webservices 2019-12-17 10:46:02 +08:00
Andrew Nicols
9359533972 MDL-66360 forum: Fix unit tests in integration 2019-11-11 17:38:02 +08:00
Simey Lameze
c189319e9c MDL-66360 mod_forum: fix cibot issues 2019-11-11 16:08:08 +08:00
Simey Lameze
6143a75136 MDL-66360 grade: fix unit tests failures and errors 2019-11-11 15:39:28 +08:00
Mathew May
9f1195fa66 MDL-66074 core_grade: Documentation 2019-10-30 13:03:59 +08:00
Andrew Nicols
b253a4f21d MDL-66809 core_grades: Implement scale-based marking
Part of MDL-66074
2019-10-30 10:23:41 +08:00
Andrew Nicols
9adedccd2b MDL-66722 core_grades: Add simple direct grading to gradingpanel
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Andrew Nicols
f8da1b9353 MDL-66722 forum: Add gradeitem storage handler
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Andrew Nicols
92b229c5f4 MDL-66079 mod_forum: Add forum grade support
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Andrew Nicols
fcc88fddba MDL-66079 core_grades: Add support for multiple grade items in an activity
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Andrew Nicols
bb6315f281 MDL-66550 forum: Target fields in a fieldset for behat test 2019-09-10 21:29:03 +08:00
Mathew May
f38a9caeef MDL-58428 renderer: Correct paths & xpaths 2019-02-26 12:56:14 +01:00
Mathew May
e3652936f3 MDL-58428 theme: Shift templates ready for Bootstrapbase removal
Move behat override steps from boost into their Moodle core locations &
Move the effected core behat steps into bootstrapbase as override steps.
2019-02-22 15:19:33 +08:00
Mark Nelson
b564a55153 MDL-63591 core_grades: updated privacy provider 2018-11-21 16:15:12 +08:00
Peter
a1e8c6d497 MDL-63488 core_grade: Use the rewrite_pluginurls to handle files
* Use the rewrite_plugin_urls to handled embedded files
* Add phpunit tests for default and updated functionality of format_text
2018-11-14 09:44:18 +08:00
Andrew Nicols
faa673e36a MDL-63488 grade: Add tests for format_feedback
Signed-off-by: Peter <peter@moodle.com>
2018-11-14 09:28:16 +08:00
Jun Pataleta
ad2737c9c9 MDL-63711 core_grade: Use canonicalize for checking userlist IDs 2018-11-06 15:48:30 +01:00
Adrian Greeve
d5f8687a92 MDL-63711 core_grades: Delete data for specified users in a context. 2018-11-03 02:26:24 +08:00
Damyon Wiese
cfd390ee94 MDL-63765 behat: Fix behat tests opening a menu
If javascript is disabled, we don't need to open the menus at all. If it is enabled
we should use the custom step where possible.

In some tests (user profile) we have to use link_or_button because
the element that opens the menu will be a link or a button in different themes.
2018-10-26 16:14:41 +08:00
Jonathan Champ
b2f349a433 MDL-54035 accesslib: separate role definition cache clear
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
2018-09-21 09:17:42 -04:00
Jake Dallimore
805ce3de79 Merge branch 'MDL-36255-master' of https://github.com/lucaboesch/moodle 2018-08-21 16:04:17 +08:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
Luca Bösch
8ad225b431 MDL-36255 grades: allow multilang filters in grades 2018-08-20 08:29:36 +02:00
Frédéric Massart
554e6a6562 MDL-62147 core_grades: Report contexts and data related to scales 2018-05-16 13:57:26 +08:00
Frédéric Massart
3fcfc19743 MDL-62009 core_grades: Implement privacy API 2018-05-01 10:47:04 +08:00
Mark Nelson
e960152141 MDL-45837 core: minor tidy up to events 2018-02-09 12:13:48 +08:00
Stephen Bourget
b302d434ae MDL-45837 Grades: Add unit & behat tests for events 2018-02-09 11:41:38 +08:00
Luca Bösch
970dc511e2 MDL-44660 grade: Typos @package core_grade instead of core_grades 2017-12-08 14:21:34 +01:00
Damyon Wiese
5dd94c811d MDL-59370 behat: Behat fixes for enrolled users
We removed the enrolled users page, so we need to update the behats that were using it.
2017-08-14 11:06:22 +08:00
Damyon Wiese
fe9965e305 MDL-59055 grades: behat test 2017-08-07 09:57:52 +08:00
Mark Nielsen
197e2bca5b MDL-59602 behat: make use of new course nav steps 2017-07-21 13:50:47 -07:00
Simey Lameze
fdeeaff954 MDL-58265 core_test: replace I turn editing on steps
Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
c987d1b2ef MDL-58265 core_test: replace all uses of I follow course steps
Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Damyon Wiese
8857c715d1 MDL-40759 icons: Behat fixes for font-awesome 2017-03-17 15:52:18 +08:00
Dan Poltawski
75cb891b5a Merge branch 'MDL-57601-master' of https://github.com/sammarshallou/moodle 2017-01-16 12:23:55 +00:00
Eloy Lafuente (stronk7)
777361983c Merge branch 'wip-mdl-56519-m' of https://github.com/rajeshtaneja/moodle 2017-01-11 02:42:29 +01:00
sam marshall
b5f661b111 MDL-57601 Grade report: Error for ungraded quiz without view hidden
If a course contains an ungraded quiz (max grade set to 0), and there
is a user account which can view the grader reports but does not have
permission to view hidden grades, they will get errors.
2017-01-09 15:32:25 +00:00
John Okely
b7c822a546 MDL-57282 behat: Deprecate I go to X in the course gradebook 2017-01-06 13:47:19 +08:00
Rajesh Taneja
57bee542ab
MDL-56519 behat: Fixed lint errors 2017-01-03 09:12:54 +08:00
Rajesh Taneja
9bad658aaf
MDL-56614 behat: Fixed steps to use new definition 2016-12-07 07:10:35 +08:00
Marina Glancy
44f460c32a MDL-56614 behat: rename step for navigating in the gradebook 2016-12-06 11:49:14 +08:00