Commit graph

4983 commits

Author SHA1 Message Date
Tim Hunt
e230bfa47f MDL-74752 qtype_multichoice: fix regrading logic
The implements the new regrade-related hooks, and also has
tests for the changes to the core system, now that we have a question
type we can use for them.
2022-05-31 09:22:22 +01:00
Tim Hunt
39abc01197 MDL-74752 question regrading: implement the required hooks
This commit implements the necessary core hooks to ensure we only
allow a regrade of a quetion attempt to take place if the new and old
versions of the question are sufficiently similar.

It will be followed by commits to each question type where the
new method needs to be implemented.

Automated tests will be included in the first of those (mulitple choice)
becuse we need a question type that implements the hooks to test
the core changes.
2022-05-31 09:22:22 +01:00
Philipp Imhof
1c9c6c4139
MDL-74495 quiz override mark: do not hide_all_feedback 2022-05-27 08:47:25 +02:00
Angelia Dela Cruz
8db6d451d7 MDL-74744 behat: Quiz behat generators use UI
Replace steps that manually add Quiz instances via the UI and use
Behat generators. This improves the speed of Behat test runs.
2022-05-24 10:54:26 +08:00
hieuvu
5cfaa18cad MDL-74533 core_completion: Update using new grade pass for completion 2022-05-23 15:14:12 +07:00
Jun Pataleta
60fcabfa6d MDL-73386 mod_quiz: Use plain text for quiz navigation fake block title
* No need to enclose the title of the quiz navigation fake block in
a span tag. The block title also gets appended to the skip link which
means that a block title with a span tag assigned with an identifier
can cause duplicate ID errors on the DOM.
2022-05-21 00:32:38 +08:00
Jun Pataleta
817db2b7f3 Merge branch 'MDL-74041' of https://github.com/timhunt/moodle 2022-05-10 17:59:45 +08:00
Tim Hunt
aac5b47cea MDL-74041 quiz: use own size for paging the question bank 2022-05-04 11:01:44 +01:00
Tim Hunt
7d3eaf892d MDL-74543 quiz attemptlib: covert string comparison to ===
Where obviously safe.
2022-05-03 13:45:39 +01:00
Tim Hunt
52b8962dbd MDL-74543 quiz: correctly record time when overdue attempt submitted 2022-05-03 13:41:45 +01:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Ilya Tregubov
e39a1fff2c Merge branch 'MDL-74471-master' of https://github.com/junpataleta/moodle 2022-04-13 14:59:21 +06:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Tim Hunt
2e1a632302 MDL-74470 quiz: put back random Q description on the Question page
This got lost in the 4.0 question bank work.

We are trying to phase out qtype_random, that is where the old
code and lang strings for describing random questions is, so
OK to add back a call to it. When we get better qbank filtering
we can replace this again.

Note, the asserts in the Behat were copied from my 3.11, checkout,
to really verify we are restoring the previous behaviour.
2022-04-11 19:01:00 +01:00
Tim Hunt
95b0f86ed3 MDL-74470 quiz: fix typos & small bug from MDL-74255.
I think that, because how PHP works, the MDL-74255 bug (lack
of explode) generally does not break anything, which is why
no tests failed. Still. Good to fix.
2022-04-11 12:21:50 +01:00
Tim Hunt
5be2fc1ddc MDL-74255 quiz/question versions: update SQL to work in Oracle 2022-04-08 12:19:53 +01:00
Tim Hunt
a43f56836a MDL-74255 quiz: fix redo and regrade question version handling 2022-04-08 12:19:53 +01:00
Tim Hunt
839cccead4 MDL-74255 quiz: handle draft question status correctly
The main issue to fix is that questions vesions which should not have
been used (that is, hidden or draft versions) were getting offered
as an option and acutally being used.

As part of this I was able to substantially un-tangle
mod_quiz\question\bank\qbank_helper, which previously was
a mass of functions calling other functions in a complicated way.
Hopefully, it is now a bit easer to understand, and perhaps
less buggy.
2022-04-08 12:19:53 +01:00
Tim Hunt
5fff990e25 MDL-74255 quiz: clean up lots of stuff mainly in the tests
This fixes lots of stuff like outdated or incomplete PHPdoc comments
or test heler functions where the arguments don't have their types
declared.

A few more significant fixes, like places were a silly method
was used to get a context which was readily available.
2022-04-08 12:19:52 +01:00
Tim Hunt
37e8faf0ed MDL-74255 quiz: Remove un-needed method question_array_sort 2022-04-08 12:19:52 +01:00
Jun Pataleta
d848bc7ece Merge branch 'MDL-74329' of https://github.com/odeialba/moodle 2022-04-07 20:14:14 +08:00
Odei Alba
9446af726d MDL-74329 mod_quiz: scroll to top and to question container
When reviewing the answers:
1- When there are all the questions in one page and you click in the first question,
it will scroll to the first question.
2- When there is one question per page and you click in the question number,
it will go to that question page and scroll to the top.
If you click again the question number, it will scroll to the question container.
2022-04-07 12:49:42 +02:00
Ilya Tregubov
29da0c7f2a Merge branch 'MDL-74235-master-2' of https://github.com/andrewnicols/moodle 2022-04-07 12:06:38 +06:00
Andrew Nicols
4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Andrew Nicols
eb0a95956f MDL-74235 mod: Rename activity icons to new monologo naming 2022-04-07 12:56:14 +08:00
Ilya Tregubov
e2a8a3cbf9 Merge branch 'MDL-74381-master' of https://github.com/aanabit/moodle 2022-04-06 15:37:42 +06:00
Amaia Anabitarte
8d8b8d9066 MDL-74381 core_themes: Resizing svg mod icons to 24px 2022-04-06 11:19:10 +02:00
Eloy Lafuente (stronk7)
70e29b77f0 Merge branch 'MDL-74330-master-enfix' of https://github.com/vmdef/moodle 2022-04-05 18:39:23 +02:00
Jun Pataleta
f949a28d1d Merge branch 'MDL-74302-master' of https://github.com/rezaies/moodle 2022-04-05 12:05:55 +08:00
Shamim Rezaie
abbb55eadf MDL-74302 mod_quiz: Users with preview cap should see prevent messages 2022-04-04 19:03:20 +10:00
Shamim Rezaie
2b5be06b68 MDL-74302 mod_quiz: use notification renderable to display quiz notices 2022-04-04 19:03:20 +10:00
Shamim Rezaie
3a25a52375 MDL-74302 mod_quiz: preview cap has higher priority than the attempt cap 2022-04-04 19:03:20 +10:00
Jake Dallimore
bd58b70e66 Merge branch 'MDL-74276-master-linkfarm' of https://github.com/peterRd/moodle 2022-04-04 15:59:19 +08:00
Ilya Tregubov
39ff636316 Merge branch 'master_MDL-74361-course-restore' of https://github.com/catalyst/moodle-MDL-70329 2022-04-04 10:28:32 +06:00
Safat Shahin
294c77d8f7 MDL-74361 quiz: pre4.0 course restore bug fix for random question tags 2022-04-03 23:20:44 +10:00
Helen Foster
3719878cbf MDL-74330 lang: Import fixed English strings (en_fix) 2022-04-01 13:17:08 +01:00
Peter Dias
2c27a33213 MDL-74276 report: Update behat tests to account for new page. 2022-04-01 12:44:04 +08:00
Huong Nguyen
b307f3df02 MDL-69552 Quiz: Fix tag filter does not work when adding random question 2022-03-31 11:55:21 +07:00
Eloy Lafuente (stronk7)
1c2fd1cfb9 Merge branch 'MDL-74309' of https://github.com/timhunt/moodle 2022-03-27 16:47:08 +02:00
Eloy Lafuente (stronk7)
4344d4b55b Merge branch 'MDL-72958' of https://github.com/timhunt/moodle 2022-03-27 16:43:15 +02:00
Tim Hunt
de8472df88 MDL-74309 quiz: removed obsolete code related to random tags 2022-03-25 09:53:46 +00:00
Ilya Tregubov
7bedf54f5b Merge branch 'master_MDL-73763_index-fix' of https://github.com/catalyst/moodle-MDL-70329 2022-03-24 13:14:03 +06:00
Marc-Alexandre Ghaly
c3ac868bf7 MDL-73763 core : Index fixes for reference tables
This commit will add the index for the question_reference
and the question_set_reference table if its not already
added. This commit will also implement the logic of adding
the question area and component in the joins of the question
reference table in order to make sure any other plugin using
the qbank api does not conflict with each other.
2022-03-24 18:04:47 +11:00
Ilya Tregubov
a824011103 Merge branch 'MDL-74091-master' of https://github.com/lucaboesch/moodle 2022-03-23 09:11:30 +06:00
Tim Hunt
ee80bc47b7 MDL-72958 questions: tidy up all question-related upgrade.txt files 2022-03-22 14:53:43 +00:00
Luca Bösch
96581087a9 MDL-74091 core_question: 'table-responsive' qtable avoids overlap. 2022-03-22 14:19:42 +01:00
Tim Hunt
439ecc57fd MDL-74184 quiz: prevent repagination of quizzes with attepts
There was a loophole to this rule on the settings form, which is now fixed.
2022-03-22 10:32:24 +00:00
Ilya Tregubov
ff0b43830a Merge branch 'MDL-73999' of https://github.com/paulholden/moodle 2022-03-17 15:23:56 +06:00
Víctor Déniz
3f1e26b54e Merge branch 'MDL-73489-master' of https://github.com/HuongNV13/moodle 2022-03-16 15:12:30 +00:00
Huong Nguyen
2e3c9f10c4 MDL-73489 Quiz: Fix question was added in the wrong place 2022-03-15 12:22:18 +07:00