5006 Commits

Author SHA1 Message Date
Ilya Tregubov
e93d2b0cbe Merge branch 'MDL-76399' of https://github.com/paulholden/moodle 2022-12-29 09:40:51 +07:00
Tim Hunt
7622b4a1f7 MDL-74609 Quiz: question number customisation - fixup Behat 2022-12-22 12:24:57 +07:00
Andrew Nicols
411d3730d9 Merge branch 'MDL-74609' of https://github.com/mkassaei/moodle 2022-12-22 12:24:57 +07:00
Paul Holden
88339b4e67 Merge branch 'MDL-75914-master' of https://github.com/meirzamoodle/moodle 2022-12-22 12:24:57 +07:00
Mahmoud Kassaei
2074448b34 MDL-74609 Quiz: allow the displayed question numbers to be customised 2022-12-21 12:04:30 +00:00
Meirza
e33194755f MDL-75914 webservice: Added fake URL to avoid debugging output.
Webservice doesn't need to set the page URL. Hence,
any function that requires a page URL will raise debugging output.
The patch fixes it by adding a fake URL for the webservice.
The patch also removed assertDebuggingCalled because it is no longer needed.
2022-12-21 16:30:21 +07:00
Paul Holden
5185558105 MDL-76399 question: switch to appropriate Behat step for selects. 2022-12-16 13:08:56 +00:00
Paul Holden
d73a92ca4a Merge branch 'MDL-76026' of https://github.com/AnupamaSarjoshi/moodle 2022-12-16 09:53:40 +00:00
Andrew Nicols
793b0f0ed9 MDL-74923 quiz: Remove erroneous merge conflict line 2022-12-15 14:45:41 +08:00
Andrew Nicols
ee48f4ab99 Merge branch 'MDL-74923' of https://github.com/timhunt/moodle 2022-12-15 07:35:46 +08:00
Tim Hunt
66c3c378a0 MDL-74923 quiz: tidy the report base classes 2022-12-14 22:38:11 +00:00
Tim Hunt
8cbc6acb17 MDL-74923 quiz: move report base classes to local folder 2022-12-14 22:38:11 +00:00
Anupama Sarjoshi
89287ec744 MDL-76026 Question bank: Fix errors related to categories renaming
This part of the code in 'question_category_object.php' 'update_category' method was used before Moodle 4.0 version for renaming
the random questions in an updated category. For Moodle 4.0 and later versions, it is unnecessary as the details of
random questions are no more stored in 'question' table but in 'question_set_references' table.
The method call move_question_set_references handles the same.
2022-12-13 18:16:52 +00:00
Tim Hunt
9efec07f77 MDL-74923 quiz: move admin setting classes to mod_quiz\admin namespace 2022-12-13 16:24:58 +00:00
Tim Hunt
48ffa04076 MDL-74923 quiz: tidy qubaids classes
Including removing an almost duplicate task
2022-12-13 16:24:58 +00:00
Tim Hunt
066b7f33d7 MDL-74923 quiz: move qubaids_for_quiz & ..._user to classes folder 2022-12-13 16:24:57 +00:00
Tim Hunt
3e05d77874 MDL-74923 quiz: clean up the display_options class 2022-12-13 16:24:57 +00:00
Tim Hunt
cefbf74d02 MDL-74923 quiz: move mod_quiz_display_options to classes folder 2022-12-13 16:24:57 +00:00
Sara Arjona
86218ccb3d Merge branch 'MDL-72451_master' of https://github.com/marxjohnson/moodle 2022-12-12 17:34:07 +01:00
Rex Lorenzo
ebeaa4b3f2 MDL-71261 mod_quiz: Quiz user override should only get enrolled users
Also update similar code in mod_assign to use the improved APIs.

Co-Authored-By: Tim Hunt <T.J.Hunt@open.ac.uk>
2022-12-12 12:29:19 +00:00
Andrew Nicols
1e594c9777 Merge branch 'MDL-76550' of https://github.com/AnupamaSarjoshi/moodle 2022-12-08 07:53:09 +08:00
Tim Hunt
83c9a6d311 MDL-76571 quiz reports: should not show description items
... or anything else with length = 0. This got broken in MDL-71696.

The only way to fix this kind-of involves and API change to
quiz_report_get_significant_questions. However, it is only changing
the external API of this function back to how it was before the 4.0 release,
and the chnages in 4.0 were never documented, nor, I would guess, intended,
since they just broke things.
2022-12-07 14:54:40 +00:00
Anupama Sarjoshi
9e77d14a7b MDL-76550 Quiz and qbank: Fix display of Category and question names 2022-12-05 11:48:43 +00:00
Jun Pataleta
c6ab792ddf MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-11-28 14:43:04 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
David Mudrák
5e2e7562b6 MDL-76105 lang: Use fixed strings in tests, too. 2022-11-17 10:37:45 +00:00
Helen Foster
ae2f8cfa67 MDL-76105 lang: Import fixed English strings (en_fix) 2022-11-17 09:44:35 +00:00
Tomo Tsuyuki
b3e046df7e MDL-72451 core: Stop keep regrading when there is an error
Set needsupdate to finish to avoid regrading each call.
Add error messages for regrading.
Display the error message on the quiz page.

Co-authored-by: Mark Johnson <mark.johnson@catalyst-eu.net>
2022-11-17 08:54:47 +00:00
Huong Nguyen
2a74b873d7 MDL-74996 Quiz: Convert submission confirmation to saveCancelPromise 2022-11-07 09:40:06 +07:00
Huong Nguyen
c55d8aca6a MDL-74996 Quiz: Unanswered question warning for submission confirmations
Including in this commit:
 - New method called get_number_of_unanswered_questions() for getting the unanswered questions
 - PHPUnit and Behat tests for the new dialogue
2022-11-07 09:40:06 +07:00
Huong Nguyen
d4d666cdf4 MDL-74996 Quiz: Change the submission confirmation dialogue content
- Changed the title from "Confirm" to "Submit all your answers and finish?"
 - Changed the content from "Once you submit, you will no longer be able to change your answers for this attempt."
   to "You will no longer be able to change your answers for this attempt."
 - Changed some Behat scenarios to match with the new dialogue content
2022-11-07 09:40:04 +07:00
Huong Nguyen
783a5c8ce7 MDL-74996 Quiz: Convert submission confirmation to core/modal_factory 2022-11-07 09:37:56 +07:00
Andrew Nicols
3d70f457cb MDL-76169 mod_quiz: Add quiz question bank behat resolver 2022-11-03 21:39:15 +08:00
Andrew Nicols
d396af9393 MDL-76120 behat: Swap click on select option to set field
Recent versions of Marionette do not like to click on the option
element so we must always use the set field option.
2022-10-28 20:53:22 +08:00
Andrew Nicols
79952f5084 Merge branch 'MDL-76049' of https://github.com/timhunt/moodle 2022-10-25 11:49:25 +08:00
Tim Hunt
1944c03e7e MDL-76049 quiz generator: update calendar events for new overrides 2022-10-20 23:44:23 +01:00
sam marshall
b5e805071a MDL-74958 core_navigation: Add renamed classes to renamedclasses.php
The renamed secondary navigation classes have been adeed to
renamedclasses.php files.
2022-10-17 10:54:24 +01:00
Shamim Rezaie
3fa533a2de Merge branch 'MDL-75642-master' of https://github.com/BruceGoodGuy/moodle 2022-10-13 16:28:10 +11:00
Simey Lameze
a91499c9f1 MDL-75922 behat: Apply @editor_atto tag to tests requiring Atto
These steps are currently using Atto-specific UI features and must
therefore make use of the @editor_atto tag to ensure that they continue
to run using Atto.

A new issue will be raised to migrate each of these to be
editor-agnostic.
2022-10-09 20:26:01 +08:00
Khoa Nguyen Dang
c093cb3263 MDL-75642 quiz: Delete multiple (random) questions from quiz 2022-10-07 11:00:32 +07:00
Jun Pataleta
590a695677 Merge branch 'MDL-75782-master' of https://github.com/andrewnicols/moodle 2022-09-29 11:54:09 +08:00
Andrew Nicols
8a8f0094c1 Merge branch 'MDL-27570' of https://github.com/timhunt/moodle 2022-09-27 16:41:17 +08:00
Tim Hunt
dc3e9e1522 MDL-27570 quiz timing: add unit test and simplify top of process_attempt 2022-09-22 11:11:37 +01:00
Philipp Imhof
58f3d8f191 MDL-27570 quiz: check if time is really up 2022-09-21 09:52:37 +01:00
Andrew Nicols
a0afccfd5a MDL-75782 mod_quiz: Make TinyMCE autosave less fragile
This commit amends the quiz autosave feature to not assume the
components of the Tiny API as much, and add support for newer versions
of TinyMCE.
2022-09-19 12:55:10 +08:00
Nathan Nguyen
f02c16c445 MDL-74762 qbank_statistics: improve performance loading the data
This issue greatly improves the performance of displaying statistics in
the question bank.

1. The required quiz statistics are now pre-computed by a scheduled task.

2. Cached statistics in the database are now never cleaned up, so the
   pre-computed stats are always available.

3. The way the cached statistics are loaded for each question
   that is being displayed is now a bit more efficient.

4. Related to that, there is a new callback which activities can implement,
   if they want their question statistics to be included in the ones shown
   in the question bank.

Note, there is still further improvement possible to load the statistics
for all questions being displayed in bulk. However, that must wait for a
future issue, MDL-75576. The other improvements in this issue are
significant and we did not want to delay releasing them.

Co-authored-by: Jonathan Champ <jrchamp@ncsu.edu>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
2022-09-16 21:34:00 +10:00
Eloy Lafuente (stronk7)
81f05b3239 MDL-75716 phpunit: Move tests to use correct names and ns (take#5)
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- In lib/tests/blocklib_test.php 2 helper classes have been
  moved to tests/fixtures, because they needed to be namespace-free.
2022-09-12 19:29:34 +02:00
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