4820 Commits

Author SHA1 Message Date
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
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