Commit graph

4278 commits

Author SHA1 Message Date
Juan Leyva
a5dcaee31c MDL-69823 mod_quiz: Return question options via WS 2020-11-10 19:21:32 +01:00
Jun Pataleta
e803a24401 Merge branch 'MDL-69930-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE
# Conflicts:
#	question/type/ddimageortext/amd/build/question.min.js
#	question/type/ddimageortext/amd/build/question.min.js.map
#	question/type/ddimageortext/amd/src/question.js
2020-11-10 14:08:57 +08:00
Víctor Déniz
849c7704f7 Merge branch 'MDL-69955-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-11-09 21:47:22 +00:00
Eloy Lafuente (stronk7)
4aa83d92bf MDL-70146 upgrade: add 3.10.0 separation line to all upgrade scripts 2020-11-07 23:26:09 +01:00
Víctor Déniz
fa79a1876c Merge branch 'MDL-70112_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-11-04 19:17:34 +00:00
Huong Nguyen
ab542b6e98 MDL-69955 qtype_ddimageortext: drop zone disappear in special case 2020-11-04 09:52:31 +07:00
Tim Hunt
a8efb07714 MDL-70112 drag-drop qtypes: fix form preview 2020-11-03 21:36:00 +00:00
Eloy Lafuente (stronk7)
b0a1b4ce8b MDL-70089 versions: bump all versions and requires near release
version = 2020110900 release version
requires= 2020110300 current beta+ (week6roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_310_STABLE already existing) for Moodle 3.10.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2020-11-03 19:34:52 +01:00
Víctor Déniz
04569f819f Merge branch 'MDL-70032-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-10-29 22:26:35 +00:00
Tim Hunt
c611f94e04 MDL-70065 quiz: fix paging when adding questions from the bank 2020-10-29 20:29:26 +00:00
Jun Pataleta
8ea746fa79 MDL-70032 qtype_multichoice: Use custom partial named selector
* With the removal of the label element, Behat now has to click on the
answer text. In order to achieve this, the custom partial named selector
"qtype_multichoice > Answer" was now added and have replaced the
instances where the label of the answer's checkbox/radio button is
being clicked.
2020-10-29 16:21:53 +08:00
Jun Pataleta
5d7bd0208a MDL-70032 qtype_multichoice: Fix answer labelling
* Discard the use of the label element in order to be able to render
multiple choice answers as they are and have these act as the radio
button/checkbox' label through the aria-labelledby attribute.
* New JS module qtype_multichoice/answers that listens for click events
on the answer text container and selects the appropriate answer radio
button/checkbox.
2020-10-29 16:21:53 +08:00
Andrew Nicols
f7ad3eaca3 Merge branch 'MDL-70004-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-10-28 13:14:12 +08:00
Jun Pataleta
c978fa26e2 MDL-70004 qtype_multichoice: Set appropriate clear my choice role 2020-10-27 09:57:32 +08:00
Huong Nguyen
ef6f42a825 MDL-69930 qtype_ddimageortext: Duplication items in drag-onto-image question 2020-10-25 20:14:43 +07:00
Sara Arjona
b13ec3c353 Merge branch 'MDL-67673_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-10-21 17:38:16 +02:00
Eloy Lafuente (stronk7)
46606b3ddd 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:05 +02:00
Eloy Lafuente (stronk7)
35bc26b516 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:05 +02:00
Eloy Lafuente (stronk7)
106c64ac24 MDL-67673 phpunit: Remove deprecated non-public attribute assertions
With PHPUnit 8 a good number of assertions, all them related with
operations on non-public attributes have been deprecated. And will
be removed with PHPUnit 9.

The main point is that unit tests shouldn't be testing non-public
APIs (good practice) and those assertions were an error originally.

See https://github.com/sebastianbergmann/phpunit/issues/3338 for
the complete list and other details.

When possible (the attributes being checked are public), the change
is simple, just switching to normal assertions.

When the attributes are not public we need to find a workaround
to be able to test the same using public APIs, or use Reflection,
or remove the tests.

For the records, this is the regexp used to find all the cases:

ag '>(assertAttribute|attribute\(|readAttributte|getStaticAttribute| \
    getObjectAttribute)' -G "test.php"
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
ddf72dd60d MDL-67673 phpunit: Remove expectedException annotations
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

The annotations `@expectedException`, `@expectedExceptionCode`,
`@expectedExceptionMessage`, and `@expectedExceptionMessageRegExp`
are now deprecated.
Using these annotations will trigger a deprecation warning
in PHPUnit 8 and in PHPUnit 9 these annotations will be removed.

Also, all uses of expectExceptionMessageRegExp() has been moved
to expectExceptionMessageMatches(). See https://github.com/sebastianbergmann/phpunit/issues/3957

TODO: Various weirdness found while doing the changes with these tests:
- vendor/bin/phpunit lib/tests/exporter_test.php (created MDL-69700)
- vendor/bin/phpunit competency/tests/external_test.php (same issue than prev one)
- vendor/bin/phpunit question/engine/tests/questionengine_test.php (created MDL-69624)
- vendor/bin/phpunit lib/tests/event_test.php (created MDL-69688)
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
a6674bf8a4 MDL-67673 phpunit: Remove deprecated assertInternalType()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertInternalType() is deprecated and will be removed in
PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(),
assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(),
assertIsResource(), assertIsString(), assertIsScalar(),
assertIsCallable(), or assertIsIterable() instead.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
d81a94807b 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:46:04 +02:00
Jun Pataleta
8312eeacb0 MDL-69392 question: Fix Try again button styling 2020-10-21 14:54:24 +08:00
Jake Dallimore
04a02b5bd9 Merge branch 'MOODLE_310_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-16 11:52:29 +08:00
Huong Nguyen
873b4847f5 MDL-69266 qtype_ddwtos: 'unlimited' options fail in 3.9 2020-10-15 20:05:52 +07:00
Adrian Greeve
407dcd4922 Merge branch 'MDL-69798_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-10-08 13:34:30 +08:00
Mikhail Golenkov
1f3aacf8fc MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:33:56 +11:00
Tim Hunt
651dbb729c MDL-69798 XML question export: excape special chars in idnumbers 2020-10-01 17:10:28 +01:00
Sara Arjona
7db1a61a72 Merge branch 'MDL-69050-310-allowlist' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-01 14:51:12 +02:00
Mahmoud Kassaei
95d1f1f18d MDL-68562 Qtype_essay: Adding file-size limit to the attachment files 2020-09-25 08:52:59 +01:00
David Mudrák
bd686af064 MDL-69050 lang: Fix the variable name in the Essay question type 2020-09-24 19:32:40 +02:00
Eloy Lafuente (stronk7)
8f0297915c Merge branch 'MDL-69116-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-09-08 23:16:24 +02:00
Shamim Rezaie
e6f0b5a3a3 MDL-69116 qtype_multichoice: accessibility improvement
- Screen-readers should not see 'clear my choice' when it is not visible
- 'clear my choice' option should only become visible when a choice is
selected
2020-08-31 23:53:54 +10:00
Shamim Rezaie
7a85cc6d2e MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link 2020-08-31 23:53:54 +10:00
Tim Hunt
e3bfcb1cde MDL-69246 questions: allow for float issues when validating manual marks
As well as fixing the bug, I also rewrote the test to use
data providers, which should lead to more useful failure messages.

And, I moved the magic number we used as the float tolerence to
be a named constant.
2020-08-27 17:39:15 +01:00
Eloy Lafuente (stronk7)
fe9ecef92b MDL-69479 upgrade: Change all 4.0 occurrences to 3.10
Under parallel development, when something is worth being commented
in upgrade.txt notes, it will be applied to all the development branches
using the "earliest" one to be released. So, if something changes
in 3.10 (and also is applied to master), the upgrade.txt notes will
show 3.10 in both branches.

Of course, if something only goes to one dev branch (say master), then the
master version will be used in the notes (4.0 in this case).
2020-08-24 14:08:46 +08:00
Bas Brands
49f1803c9d MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-19 08:29:50 +08:00
Nadav Kavalerchik
67dfb55d49 MDL-69414 qtype/ddimageortext: Fix dropzones display in RTL mode 2020-08-17 14:53:20 +08:00
Adrian Greeve
17e99314a2 Merge branch 'MDL-67657-master' of git://github.com/andrewnicols/moodle 2020-07-21 14:47:14 +08:00
Eloy Lafuente (stronk7)
5a32562f82 Merge branch 'MDL-69165-master' of https://github.com/HuongNV13/moodle 2020-07-16 16:21:27 +02:00
Andrew Nicols
cd6eadd407 MDL-67657 behat: Convert existing uses of executeScript 2020-07-16 11:06:31 +08:00
Andrew Nicols
45871ec48e MDL-69068 behat: Allow singular, pivotted data generators 2020-07-15 15:27:31 +08:00
Andrew Nicols
b49cb92e82 MDL-69068 behat: New step to support singular generators 2020-07-15 15:27:31 +08:00
Jake Dallimore
0524f3ae5b Merge branch 'MDL-69104-master' of https://github.com/HuongNV13/moodle 2020-07-08 13:06:45 +08:00
Huong Nguyen
579da44a70 MDL-69165 Questions: Incorrect id used in init_submit_button function 2020-07-08 10:54:24 +07:00
Huong Nguyen
5fa8f1c811 MDL-69104 Questions: Drag and drop question family don't work with iOS
- Drag and Drop marker question type
 - Drag and Drop onto image question type
 - Drag and Drop into text question type
2020-06-30 13:15:48 +07:00
Luca Bösch
8dfa3027a0 MDL-68584 core_question: flexbox compatible separator for question types
* the br tag does not work well in a flexbox context, a 100% with div
works in both classic and boost.
2020-06-25 22:01:15 +02:00
Eloy Lafuente (stronk7)
b764343e5a MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:08:09 +02:00
Jake Dallimore
337e2e2b23 Merge branch 'MDL-68973' of https://github.com/stronk7/moodle 2020-06-10 16:13:57 +08:00
Jun Pataleta
4baa3d1280 MDL-68864 qtype_multichoice: Rebuild clearchoice source map 2020-06-10 11:20:22 +08:00