4250 Commits

Author SHA1 Message Date
Sara Arjona
3a07ee3191 Merge branch 'MDL-60331-master_take3' of git://github.com/lucaboesch/moodle 2021-04-29 17:49:43 +02:00
Luca Bösch
7dd58aac64 MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:30:46 +02:00
Andrew Nicols
1b8bd1228d Merge branch 'MDL-70372-master-oldstrings' of git://github.com/mudrd8mz/moodle 2021-04-28 10:45:08 +08:00
abgreeve
d1be6cf1d8 Merge branch 'MDL-71205' of https://github.com/mkassaei/moodle 2021-04-21 13:32:14 +08:00
Jake Dallimore
49c97a866c Merge branch 'MDL-71030-master' of https://github.com/NashTechOpenUniversity/moodle 2021-04-21 12:06:50 +08:00
Thong Bui
a8c868822f MDL-71030 Quiz: Add 'who' made changes in question response history 2021-04-20 09:06:15 +07:00
Víctor Déniz
f7dd6b26b7 Merge branch 'MDL-71118-master' of git://github.com/lucaboesch/moodle 2021-04-19 19:43:32 +01:00
Sara Arjona
9ffe994b4c Merge branch 'MDL-71262' of https://github.com/mkassaei/moodle 2021-04-19 17:44:03 +02:00
Sara Arjona
5013604f18 MDL-71225 questions: Remove duplicated empty line 2021-04-19 17:28:19 +02:00
Luca Bösch
aee27d0a9b MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:46:09 +02:00
Mahmoud Kassaei
42a4c30ec4 MDL-71225 Questions: Default options for
ddimageortext, ddmarker and match qtypes
2021-04-14 18:02:09 +01:00
Mahmoud Kassaei
4971015e38 MDL-71262 Questions: Default options for qtype_essay 2021-04-14 18:00:34 +01:00
Jake Dallimore
0bbdf3b910 Merge branch 'MDL-71251-master' of git://github.com/jleyva/moodle 2021-04-12 14:48:28 +08:00
Mahmoud Kassaei
2d18de87ce MDL-71205 Default options for qtype_numerical 2021-04-09 18:39:37 +01:00
Juan Leyva
46a9a2b6c4 MDL-71251 qtype_essay: Return new min/max word limit settings via WS
Those settings are required by external clients such as the Moodle App
2021-04-09 17:15:18 +02:00
Eloy Lafuente (stronk7)
c33b5efaad Merge branch 'master_MDL-32226' of https://github.com/danmarsden/moodle 2021-04-08 17:30:12 +02:00
David Mudrák
f54b8f9c64 MDL-70372 qtype_numerical: Remove unused format description strings
All these three strings were introduced in MDL-20296. The screenshots
there show some examples of where and how they were used. They stopped
being used shortly after in MDL-20636.

Given that they are specific strings with narrow semantic; they are
provided by a plugin and not by the core component; they have not been
used for 10 years; and no other plugin in the Plugins directory use
them, I feel we can safely bypass the deprecation phase and simply drop
them.
2021-04-02 09:40:18 +02:00
Mahmoud Kassaei
01403b2f0d MDL-70895 Questions: Default options when creating a question 2021-03-31 09:26:54 +01:00
Dan Marsden
21778d8d16 MDL-32226 mod_quiz: Add Plagiarism hooks to quiz and essay question. 2021-03-27 09:13:41 +13:00
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