4809 Commits

Author SHA1 Message Date
Andrew Madden
d1863734d4 MDL-72188 quizaccess_seb: Implement Safe Exam Browser JS API
* Replaces checking header for SEB config keys to assess quiz access.
* Adds new web service accessible via Ajax
* Forces the use of the new API where available
* Stores access in Moodle SESSION for quiz instead of checking every
page.
2022-08-31 13:10:28 +10:00
Laurent David
025e0297b6 MDL-75210 mod_quiz: fix sequential quiz access
* As a student I should only be able to access the next question or the current question
* The API should not show more than the current question
* Once the quiz is previewed we can see the question in any order (existing behaviour)
* Related to ticket MDL-71728

Co-authored-by: Rajneel Totaram <rjnlfj@yahoo.com>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
2022-08-18 08:07:38 +04:00
Tim Hunt
8babdbd396 MDL-74608 activities: a new option to force the activity language
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
2022-08-15 22:15:52 +01:00
Simey Lameze
b522d7652d MDL-74211 behat: replace steps to use new categories page type 2022-07-29 13:02:16 +08:00
Simey Lameze
8b4f423c05 MDL-74211 quiz: make use of question data generators 2022-07-29 13:02:16 +08:00
Jun Pataleta
3e67cccbcd Merge branch 'master_MDL-74768-bulkmove-question-after-affects' of https://github.com/catalyst/moodle-MDL-72752 2022-07-18 13:49:44 +08:00
Safat Shahin
0fcea11234 MDL-74768 core_question: Fix for question category movement 2022-07-14 11:11:54 +10:00
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Eloy Lafuente (stronk7)
58b56e2395 MDL-71747 upgrade: remove all the < 3.9.0 upgrade steps
This just deletes all the upgrade steps previous to 3.9.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2020061500 (v3.9.0) as anti-cheating measure.

The next commits will proceed to deprecate / remove functions
that were exclusively (usually belonging to upgradelib) being
used by those, now removed, upgrade steps. This is the list
of code to remove and document in upgrade.txt files:

  - upgrade_analytics_fix_contextids_defaults()
  - upgrade_convert_hub_config_site_param_names()
  - upgrade_rename_prediction_actions_useful_incorrectly_flagged()
  - \mod_forum\task\refresh_forum_post_counts adhoc task.

And these is the code that has NOT been removed
because it may be needed later (no matter there aren't uses now):

  - \core_search\manager::clean_up_non_existing_area(), used by
  - \core\task\clean_up_deleted_search_area_task adhoc task
2022-07-07 19:16:37 +02:00
Jun Pataleta
f9af45eff5 Merge branch 'MDL-75058-master' of https://github.com/jleyva/moodle 2022-07-07 12:07:55 +08:00
Víctor Déniz
ee325b4bf8 Merge branch 'MDL-74981-master' of https://github.com/stevandoMoodle/moodle 2022-07-07 00:49:18 +01:00
Jun Pataleta
27b5573e51 Merge branch 'MDL-74516' of https://github.com/stronk7/moodle 2022-07-04 23:17:20 +08:00
Jun Pataleta
986e9a2777 Merge branch 'MDL-75008-master-enfix' of https://github.com/mudrd8mz/moodle 2022-07-04 22:18:39 +08:00
Eloy Lafuente (stronk7)
b3b1006201 MDL-74516 activities: Better handling of floats for gradepass fields
Current code was relying on grade_floatval() that is not a validation
function. Instead, the gradepass field must be defined as proper float
and then perform the needed validations using unformat_float().

Note that the float element form has some particularities, see
MDL-73994 for more information and that makes us to have to check
for some values (null, zero) manually. Once that form element type
gets its behaviour fixed, the code will need to be revisited, hence
we have annotated it as comments for easier finding it in the future
(the same changes already were applied to other gradebook forms).

Also, remove an unreachable line of code (comparing with empty string)
within the grade_floatval() function because it's not possible anymore
to pass any string to it, as far as it's "?float" typed.

Covered as many cases with quiz completion as have been able to imagine.
2022-07-01 13:55:51 +02:00
David Mudrák
0c1d4b219a MDL-75008 lang: Use the fixed strings in Behat scenario files 2022-06-30 20:48:16 +02:00
Jun Pataleta
028cbda036 Merge branch 'MDL-75048-master' of https://github.com/jleyva/moodle 2022-06-30 11:30:30 +08:00
Andrew Nicols
68cc906825 Merge branch 'MDL-74744-master' of https://github.com/andelacruz/moodle 2022-06-30 10:51:22 +08:00
Juan Leyva
51c9c709a9 MDL-75058 course: Fix support for dates on WebServices 2022-06-27 15:29:36 +02:00
stevando
05dcc9eb12 MDL-74981 mod_quiz: set limited width on overrides pages 2022-06-23 18:01:56 +08:00
Juan Leyva
a3201673be MDL-75048 mod_quiz: Use new way to check if subcats are included 2022-06-22 18:14:05 +02:00
Jun Pataleta
8f947b8ebd Merge branch 'MDL-74533-master' of https://github.com/BruceGoodGuy/moodle 2022-06-17 10:17:12 +08:00
Shamim Rezaie
34a78332ca Merge branch 'MDL-74495-feedback-on-manual-grading' of https://github.com/PhilippImhof/moodle 2022-06-10 13:12:12 +02:00
Sara Arjona
bb5831c623 Merge branch 'MDL-74733-master' of https://github.com/sammarshallou/moodle 2022-06-10 13:12:10 +02:00
sam marshall
96e2caeaa2 MDL-74733 core_navigation: Secondary nav in plugins, change namespace
Secondary nav previously had to be in my_plugin\local\views\secondary; this
location continues to work but is deprecated. The new location is
my_plugin\navigation\views\secondary.
2022-06-08 15:40:44 +01:00
Tim Hunt
6c161f3b99 MDL-74760 activity web services: refactor duplicate code 2022-06-07 12:53:34 +01:00
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