1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-27 02:53:29 +01:00

4231 Commits

Author SHA1 Message Date
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Eloy Lafuente (stronk7)
cfba0366db Merge branch 'MDL-70893-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:23:26 +01:00
Eloy Lafuente (stronk7)
713722c3fb MDL-71036 phpunit: Coding style changes, 99% whitespace only
I've gone over a few of the mofified files (those
which were showing warnings and errors to CiBoT. Some of them
have been fixed completely, while others only have fixed
for the lines belonging to this issue (lib/tests/moodlelib_test.php)
for example.
2021-03-11 23:04:32 +01:00
Eloy Lafuente (stronk7)
8a14a7bd22 MDL-71036 phpunit: assertContains() now performs strict comparison
The methods assertContains() and assertNotContains() now perform
strict (type and value) comparison, pretty much like assertSame()
does.

A couple of new assertContainsEquals() and assertNotContainsEquals()
methods have been created to provide old (non-strict) behavior, pretty
much like assertEquals() do.

Apart from replacing the calls needing a relaxed comparison to those
new methods, there are also a couple of alternative, about how to
fix this, depending of every case:

- If the test is making any array_values() conversion, then it's better
  to remove that conversion and use assertArrayHasKey(), that is not
  strict.
- Sometimes if may be also possible to, simply, cast the expectation
  to the exact type coming in the array. I've not applied this technique
  to any of the cases in core.

Link: https://github.com/sebastianbergmann/phpunit/issues/3426
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7)
ba5b6089d5 MDL-71036 phpunit: Renamed various regexp-related assertions
In PHPUnit 9.1, the following regexp-related assertions
have been deprecated and there are new alternatives for
all them:
    - assertRegExp()     -> assertMatchesRegularExpression()
    - assertNotRegExp()  -> assertDoesNotMatchRegularExpression()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

    ag 'assertRegExp|assertNotRegExp' -li
2021-03-11 19:22:24 +01:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Ilya Tregubov
da0fe0df66 MDL-69680 lib: Fix behat test backup_and_restore.feature 2021-03-04 22:50:58 +01:00
Sara Arjona
187801ccf5 Merge branch 'MDL-70966-master' of git://github.com/marinaglancy/moodle 2021-03-03 09:30:41 +01:00
Jun Pataleta
44001630d8 Merge branch 'MDL-71009' of https://github.com/timhunt/moodle 2021-03-03 16:22:50 +08:00
Marina Glancy
612c230709 MDL-70966 various: Under PHP8 empty string is no longer equals to 0 2021-02-28 19:16:09 +01:00
Tim Hunt
9216860b88 MDL-71009 question bank: escape idnumbers when displayed 2021-02-26 12:46:32 +00:00
Tim Hunt
1d552eca6c MDL-70916 Essay/Moodle XML: min and max word limits not imported 2021-02-17 11:32:05 +00:00
Marina Glancy
0eada7a5f9 MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
Sara Arjona
3b15de89c7 Merge branch 'MDL-70796' of https://github.com/timhunt/moodle 2021-02-10 16:50:04 +01:00
Sara Arjona
be575645e0 Merge branch 'MDL-69101' of https://github.com/timhunt/moodle 2021-02-10 15:11:52 +01:00
Mahmoud Kassaei
8544b09e7b MDL-70377 qtype_essay: When reviewing an attempt as a teacher
In the Response history table, Action Saved: does not display the value
of $a in the language string.
2021-02-08 17:11:06 +00:00
Tim Hunt
6c7cf1123e MDL-70796 count_words: match the count from LibraOffice & MS Word 2021-02-05 11:59:48 +00:00
Tim Hunt
99778a61a3 MDL-69101 Essay/Moodle XML: recent new settings not imported/exported 2021-02-03 08:09:27 +00:00
Sara Arjona
d0ff6939bb Merge branch 'MDL-70574' of https://github.com/timhunt/moodle 2021-02-02 08:20:17 +01:00
Jun Pataleta
2961feb71c MDL-70288 qtype: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 13:53:05 +08:00
Andrew Nicols
cedb58f642 MDL-66979 question: Improve behat test reliability
Expand all fieldsets rather than individual fieldsets.

This can fail in some situations where the page moves as the first
fieldset opens and HTML transitions take effect. This causes subsequent
fieldsets to move after WebDriver has calculated the click target.
2021-01-22 14:52:11 +08:00
Tim Hunt
f6a665a84a MDL-70134 essay qtype: Provide options for smaller response boxes
And make the default box size 10
2021-01-18 09:21:43 +00:00
Tim Hunt
f0934f6db9 MDL-70134 manual grading: make starting comment box size 3 lines
I am guessing most comments are short, and the box can be expanded if needed.
2021-01-18 09:13:56 +00:00
Sara Arjona
7d24686e59 Merge branch 'MDL-69308' of https://github.com/stronk7/moodle 2021-01-14 12:03:30 +01:00
Eloy Lafuente (stronk7)
77342b96fc MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018120300 (v3.6.0) as anti-cheating measure.

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:11:19 +01:00
Tim Hunt
c4e2b67c22 MDL-68597 qtype_essay: show the word count on the review screen 2021-01-13 10:27:40 +00:00
Tim Hunt
6fc462ad4d MDL-68597 qtype_essay: switch the form to consistently use hideIf 2021-01-13 10:27:40 +00:00
Tim Hunt
d9b0da85cc MDL-68597 essay word limits: fixes requested by the integrator 2021-01-13 10:27:40 +00:00
Mahmoud Kassaei
997a407b37 MDL-68597 qtype_essay: add word min/max for online text input 2021-01-13 10:27:14 +00:00
Tim Hunt
937cb2cfa4 MDL-70574 qtype_multianswer: fractional scores should be possible 2021-01-11 17:31:23 +00:00
Jun Pataleta
50fdadffc0 Merge branch 'MDL-70374' of https://github.com/timhunt/moodle 2021-01-07 12:37:08 +08:00
Jake Dallimore
cc1ad82037 Merge branch 'MDL-70426-master' of https://github.com/HuongNV13/moodle 2020-12-22 15:15:56 +08:00
Tim Hunt
add7ebab30 MDL-70374 qtype_multichoice: code cleanup
* Remove some obsoliete CSS.
* Put the CSS in a more logical order.
* Rename some variables in the renderer, for more clarity.
2020-12-18 13:12:54 +00:00
Tim Hunt
4d23573182 MDL-70374 qtype_multichoice: improve alignment of choices 2020-12-18 12:59:30 +00:00
Sara Arjona
45bbc5a4cf Merge branch 'MDL-70373' of https://github.com/timhunt/moodle 2020-12-16 12:40:36 +01:00
Jake Dallimore
5c10b07c6f Merge branch 'MDL-70324-master' of https://github.com/JBThong/moodle 2020-12-14 11:29:37 +08:00
Huong Nguyen
d07c7ae33e MDL-70426 qtype_ddmarker: infinite markers keep duplicating 2020-12-09 11:16:31 +07:00
Andrew Nicols
9e12342aa5 Merge branch 'MDL-70321' of https://github.com/timhunt/moodle 2020-12-03 11:39:13 +08:00
Tim Hunt
7a1da781a9 MDL-70373 qtype_essay: missing border on atto input 2020-12-02 20:08:53 +00:00
Thong Bui
017b1252ed MDL-70324 Question: get_all_response_file_areas() not work correctly 2020-12-01 16:03:44 +07:00
Andrew Nicols
0aecabf004 MDL-70153 qtype_essay: Whitespace/behat fixes 2020-11-26 12:46:10 +01:00
Andrew Nicols
22388c9e7f Merge branch 'MDL-70153-master' of git://github.com/dpalou/moodle 2020-11-26 12:46:10 +01:00
Sara Arjona
42d23f2ddf Merge branch 'MDL-70248-master' of https://github.com/HuongNV13/moodle 2020-11-26 12:46:10 +01:00
Tim Hunt
32bd113761 MDL-70321 question backup: fix MDL-47178 unit tests
They were failing if you had CodeRunner installed
2020-11-24 15:26:32 +00:00
Jun Pataleta
1ce10609f3 Merge branch 'MDL-70094-master' of https://github.com/SangNguyen2601/moodle 2020-11-19 09:38:39 +08:00
sangnguyen2601
39652702f0 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 18:03:08 +07:00
Dani Palou
98dac07d54 MDL-70153 qtype_essay: Add behat test for attachments max size 2020-11-18 10:15:43 +01:00
Huong Nguyen
a03b08abaf MDL-70248 qtype_ddimageortext: Drop zones have UI issue in Editing form 2020-11-18 16:09:05 +07:00
Andrew Nicols
bce0d4b80f MDL-70148 qtype: Update qtype steps to new key interaction
Note: The ddmarker question type was previously getting the number of
keypresses wrong. This was because it was using both keyDown/keyUp, and
also keyPress. As a result each keypress was essentially happening two
times.
2020-11-17 15:14:43 +08:00
Andrew Nicols
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00