4485 Commits

Author SHA1 Message Date
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
Juan Leyva
ba2d9643e7 MDL-54956 quiz: Fix WS to support files submission 2020-09-22 18:03:23 +02:00
Juan Leyva
8bec429a98 MDL-54956 quiz: Return response files in attempts 2020-09-22 18:03:23 +02:00
Bas Brands
d910726704 MDL-66587 mod_quiz: visible quiz timer 2020-09-16 15:21:27 +02:00
Eloy Lafuente (stronk7)
1ab5d74983 Merge branch 'MDL-69658' of https://github.com/paulholden/moodle into master 2020-09-14 22:56:11 +02:00
Paul Holden
416dd35832 MDL-69658 quizaccess_seb: progress bar on install only when necessary. 2020-09-08 19:31:36 +01:00
Luca Bösch
5423b68b08 MDL-69645 quizaccess: Set allowPreferencesWindow to false in manual conf
Signed-off-by: Luca Bösch <luca.boesch@bfh.ch>
2020-09-07 21:26:23 +02:00
Andrew Nicols
f24aae4cad Merge branch 'MDL-67735-master' of git://github.com/bmbrands/moodle 2020-08-19 08:28:49 +08:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
Bas Brands
4394f9e358 MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00:00
Andrew Nicols
e0f91914a7 Merge branch 'MDL-69253' of https://github.com/timhunt/moodle 2020-08-13 11:50:09 +08:00
Eloy Lafuente (stronk7)
d40cecdb8a Merge branch 'MDL-67002' of https://github.com/timhunt/moodle into master 2020-08-13 00:08:17 +02:00
Tim Hunt
5516275fda MDL-69253 mod_quiz: unit test for the last commit 2020-08-04 14:37:25 +01:00
Josh Ebarvia
380534b0a1 MDL-69253 mod_quiz: Fix timecreated is 0 when creating a quiz activity 2020-08-04 13:43:45 +01:00
Eloy Lafuente (stronk7)
c39b0d178c Merge branch 'MDL-69367' of https://github.com/paulholden/moodle into master 2020-08-03 16:26:59 +02:00
Paul Holden
279d691f58 MDL-69367 quizaccess_seb: correct foreign key table reference. 2020-07-28 13:27:45 +01:00