4500 Commits

Author SHA1 Message Date
Sara Arjona
187801ccf5 Merge branch 'MDL-70966-master' of git://github.com/marinaglancy/moodle 2021-03-03 09:30:41 +01: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
Helen Foster
422e70e308 MDL-70964 lang: Import fixed English strings (en_fix) 2021-02-25 16:18:57 +01:00
Mahmoud Kassaei
4a571882db MDL-66600 quiz manual grading: show any automated grading and feedback 2021-02-15 08:19:31 +00:00
Adrian Greeve
007c270507 Merge branch 'MDL-70755' of https://github.com/mkassaei/moodle 2021-02-11 10:54:38 +08:00
Adrian Greeve
e54ee9e512 Merge branch 'MDL-70773' of https://github.com/mkassaei/moodle 2021-02-11 10:19:39 +08:00
Adrian Greeve
f83156fcf9 Merge branch 'MDL-70513' of https://github.com/timhunt/moodle 2021-02-11 10:06:50 +08:00
Sara Arjona
fd31854480 Merge branch 'MDL-70732-master' of git://github.com/aanabit/moodle 2021-02-10 17:20:22 +01:00
Sara Arjona
1d6b734108 Merge branch 'MDL-70173-master' of git://github.com/rezaies/moodle 2021-02-09 08:29:13 +01:00
Shamim Rezaie
805df4f846 MDL-70173 theme_boost: Fix empty link issue on the "Go to top" button
On behat, we have to use a more specific test step if we are looking
for a "Go" button on a modal. The reason is that the html of the modal
content is put after the html of the "Go to top" button, so behat
may find the "Go to top" button if we just look for "Go".
2021-02-09 16:16:09 +11:00
Mahmoud Kassaei
d2f8ea2073 MDL-70719 quiz overrides: only show Actions column header if needed 2021-02-05 15:46:37 +00:00
Amaia Anabitarte
248d4ff200 MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:22 +01:00
Tim Hunt
f44bff98fb MDL-70513 quiz manual grading: use formchangechecker to avoid dataloss 2021-02-03 16:06:54 +00:00
Mahmoud Kassaei
32b645fd03 MDL-70773 Quiz overrides: User links don't point to user profile page 2021-02-03 11:47:23 +00:00
Mahmoud Kassaei
b297faa4ab MDL-70755 Quiz overrides: Broken layout for Group overrides 2021-02-03 09:29:11 +00:00
Sara Arjona
4d5c3c3914 Merge branch 'MDL-68970' of https://github.com/timhunt/moodle 2021-02-03 08:51:11 +01:00
Bas Brands
12bc605457 MDL-59782 core_question: improve questionbank highlighting 2021-01-28 08:12:58 +01:00
Tim Hunt
bdbe3cd268 MDL-68970 quiz: prevent page caching during attempts
This ensures that the page reloads if the student uses
the Back or Forwards buttons within an attempt. This
avoids questions being in a stale state, or
the timer showing the wrong time.

Thanks to Jake Dallimore and Russell Boyatt for suggestions
which lead to this fix.
2021-01-25 18:33:51 +00:00
Luca Bösch
0daf89a0e3 MDL-70562 mod_quiz: "Edit quiz" and "Back to the course" button spacing 2021-01-15 11:59:38 +01: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
Eloy Lafuente (stronk7)
36ef29a8e9 Merge branch 'MDL-70266' of https://github.com/timhunt/moodle 2021-01-11 16:11:50 +01:00
Helen Foster
8e080c9703 MDL-70550 lang: Import fixed English strings (en_fix) 2021-01-07 19:35:32 +01:00
Tim Hunt
3fbf8529ab MDL-70266 quiz overrides: respect show user identity setting 2021-01-07 10:38:39 +00:00
Jun Pataleta
d27c4f8566 Merge branch 'MDL-68831' of https://github.com/timhunt/moodle 2020-12-17 00:04:33 +08:00
Jun Pataleta
037417af1d Merge branch 'MDL-69735' of https://github.com/timhunt/moodle 2020-12-16 23:01:28 +08:00
Tim Hunt
7d11dcfde2 MDL-68831 quiz overrides: show a summary on the quiz info page 2020-12-16 14:21:45 +00:00
Jun Pataleta
d4b9511bbe Merge branch 'MDL-54907' of https://github.com/timhunt/moodle 2020-12-16 10:34:58 +08:00
Tim Hunt
7350f41bf8 MDL-69735 quiz: new capability for read-only view of setting overrides 2020-12-11 19:54:40 +00:00
Tim Hunt
040c15c27e MDL-54907 quiz unit tests: clean up code style in attempts_test.php 2020-11-27 18:29:25 +00:00
Tim Hunt
fc9d2e0843 MDL-54907 quiz: better timefinish for attempts finished asynchronously
There are serveral ways a quiz attempt can be submitted:

1. The student click the Submit and finish button. In this case,
   no problem. We record the current time as the finish time
   for the quiz attempt.

2. The student is activly working away at the quiz, and the
   count-down timer reachers zero. In this case, we also record
   the current time. Note that, if the server is under high load,
   then this could well end up being a few seconds after the
   theoretical end time, so you could have a quiz with a 30 minute
   time limit, with an attempt that lasted 30:07. However, this
   is just an accurate reflection of what happened, so should
   be recorded like this.

3. If the student is offline when the time expires, then
   (depending on the quiz settings) the attempt may be
   automatically submitted by cron, but this will happen with
   at least some delay (to prevent race conditions between cron
   and a student working online) and if cron is running slow
   on the server, it could be a lot later. Previously, this led
   to, say, a 30 minute quiz where an attempt seemed to have
   lasted 67 minutes, which confused people.

   Now, in this situation, the finsh time for the quiz attempt is
   recorded as the time when the time limit ran out. This is not
   just less confusing for teachers looking at the quiz report,
   it is also more accurate. That is the latest time at which
   students could have made any changes to their responses.
2020-11-27 17:51:55 +00:00
Tim Hunt
ec6978b9d6 MDL-54907 quiz generator: defaults should match a new Moodle install 2020-11-27 14:57:36 +00:00
Andrew Nicols
0d580d2b3e MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:01:19 +08:00
Andrew Nicols
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Sara Arjona
e7ea4ae450 Merge branch 'MDL-69823-master' of git://github.com/jleyva/moodle 2020-11-11 07:41:19 +01:00
Andrew Nicols
8d8443411d Merge branch 'MDL-70065' of https://github.com/timhunt/moodle 2020-11-11 09:49:26 +08:00
Juan Leyva
caddb8f175 MDL-69823 mod_quiz: Return question options via WS 2020-11-10 19:16:24 +01:00
Jake Dallimore
5365057493 Merge branch 'MDL-69841-master' of https://github.com/HuongNV13/moodle 2020-11-10 09:32:34 +08:00
Huong Nguyen
3dcfb904b7 MDL-69841 Quiz: Review options 'Help' icons do not work correctly 2020-10-30 10:18:20 +07:00
Tim Hunt
1622425260 MDL-70065 quiz: fix paging when adding questions from the bank 2020-10-29 20:25:53 +00:00
Amaia Anabitarte
bceb4280bf MDL-69716 mod_quiz: No timestamp for in progress attempts 2020-10-23 16:01:15 +02:00
Eloy Lafuente (stronk7)
8183def69e MDL-67673 phpunit: Move tests to use new phpunit_dataset
- Make advanced_testcase old methods to use new ones internally.
- Fix advanced_testcase, statslib, mod/quiz and mod/data tests.

Originally MDL-64600
2020-10-21 12:46:00 +02:00
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)
d95c378771 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: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
Eloy Lafuente (stronk7)
fd46cc5b37 Merge branch 'MDL-65074' of https://github.com/hitteshahuja/moodle into master 2020-10-05 23:12:01 +02:00
Adrian Greeve
d3374e8865 Merge branch 'MDL-54956-master' of git://github.com/jleyva/moodle 2020-10-01 11:19:09 +08:00
Hittesh Ahuja
68110d352c MDL-65074 mod_quiz: Quiz navigation buttons shouldnt use btn-secondary
Removing .btn-secondary as plain.scss and default.scss in bootstrap hide the button from view.
2020-09-25 15:31:57 +01:00
Jun Pataleta
1d7781be53 Merge branch 'MDL-66587-master' of git://github.com/bmbrands/moodle 2020-09-24 11:11:20 +08:00