4544 Commits

Author SHA1 Message Date
Jake Dallimore
4576a34bec Merge branch 'MDL-73424-master' of https://github.com/marinaglancy/moodle 2022-10-12 11:51:40 +08:00
Marina Glancy
41b93bd7e5 MDL-73424 general: Internal methods must have same type as parent
Otherwise the error is thrown in PHP8.1
2022-10-10 16:46:13 +02:00
Anupama Sarjoshi
050853c9fe MDL-75431 qbank: fix tests with CodeRunner installed 2022-10-10 09:25:13 +01:00
Jun Pataleta
9b0f435569 Merge branch 'MDL-75818' of https://github.com/mkassaei/moodle 2022-10-06 10:14:07 +08:00
Andrew Nicols
b90c862c25 MDL-75752 question: Bind contextid param in comment backup
In source_sql, unmapped values must be bound using the
backup_helper::is_sql_param() function.
2022-10-06 09:06:12 +08:00
Andrew Nicols
29e1f713b6 Merge branch 'MDL-75752' of https://github.com/timhunt/moodle 2022-10-06 09:02:07 +08:00
Mahmoud Kassaei
9ba4b5f306 MDL-75818 qtype_multichoice: site-wide default for showstandardinstruction 2022-10-05 17:04:22 +01:00
Tim Hunt
9ab7828fe2 MDL-75351 question comments: don't hard-code system context id 2022-09-30 18:44:01 +02:00
Tim Hunt
57ee14cced MDL-75752 question comments: fix backup query so it uses the index
This should greatly improve the performance.
2022-09-29 10:51:28 +02:00
Andrew Nicols
f54d6b0144 Merge branch 'MDL-74883' of https://github.com/timhunt/moodle 2022-09-29 11:58:10 +08:00
Andrew Nicols
392bf7d58a MDL-75744 qtype_gapselect: Remove unnecessary javascript tag 2022-09-27 12:46:01 +08:00
Andrew Nicols
fc8fbb3f64 Merge branch 'MDL-75744-master' of https://github.com/NashTechOpenUniversity/moodle 2022-09-27 12:37:39 +08:00
Eloy Lafuente (stronk7)
9dcf7b0202 Merge branch 'MDL-74762-Master' of https://github.com/catalyst/moodle-MDL-72752 2022-09-21 14:26:01 +02:00
Nathan Nguyen
5b8fa8ee72 MDL-74762 qbank_statistics: fix unit test failure with Oracle DB 2022-09-21 12:14:02 +10:00
Jun Pataleta
50fe735e5a Merge branch 'MDL-75777' of https://github.com/stronk7/moodle 2022-09-20 15:12:34 +08:00
Víctor Déniz
06ba397c1c Merge branch 'MDL-74941-master' of https://github.com/lucaboesch/moodle 2022-09-20 08:08:55 +01:00
Steve Bader
0e18ad33a1 MDL-74941 qtype_calculated: Copy dataset from previous question version 2022-09-20 08:11:04 +02:00
Luca Bösch
27093b1893 MDL-74941 qtype_calculated: Fix for usage calculation
The patch for the helper functions is by Nathan Nguyen
<nathannguyen@catalyst-au.net> whom I wish to thank.
2022-09-20 08:10:55 +02:00
Ilya Tregubov
b6425b9ce1 Merge branch 'MDL-75065-master' of https://github.com/devlionco/moodle 2022-09-19 14:00:49 +04:00
Eloy Lafuente (stronk7)
839c2e5c18 MDL-75777 phpunit: Move tests to use correct names and ns (take#6)
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.
2022-09-19 11:01:21 +02:00
Jun Pataleta
a4c97a7d7c Merge branch 'MDL-75757' of https://github.com/stronk7/moodle 2022-09-19 13:02:02 +08:00
Eloy Lafuente (stronk7)
6be384ee8f MDL-75757 phpunit: Add some tolerance to a few failing assertions
Recently, PHPUnit (all versions) did some changes about how the
comparators worked and this has caused some float comparisons
to stop working.

We need to move them to assertEqualsWithDelta(), allowing a small
tolerance to workaround the floats comparison problem.

0.00001 has been decided. And applied to all the similar assertions
within the unittest function, so if more cases are added to them
better be copied with the agreed tolerance.
2022-09-18 15:55:36 +02: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
hieuvu
aee466c0fc MDL-75744 gapselect: remove empty choices option. 2022-09-15 15:43:57 +07:00
Mahmoud Kassaei
1edb5f7581 MDL-75051 Questions: Selecting idnumber in the question bank,
the copy/pasting, includes extraneous text in Chrome
2022-09-09 10:11:45 +01:00
Jun Pataleta
1138811649 MDL-73376 qbank: Remove uniqueidentifier fragment argument
The uniqueidentifier argument is only needed by the version selector and
can be set within the output fragment function using it. There's no need
for it to be a parameter when calling the output fragment function.
2022-09-01 14:56:20 +08:00
Safat Shahin
497a644b48 MDL-73376 qbank_comment: Version selection in modal
This commit implements version selection in the comment
modal to allow users to change the version of question
using that dropdown.
2022-09-01 11:43:55 +10:00
Sara Arjona
996b5c7d75 Merge branch 'MDL-75312' of https://github.com/paulholden/moodle 2022-08-17 12:26:38 +02:00
Petr Skoda
2f70b320bb MDL-75237 qformat_blackboard_six: sanitise blackboard import file paths 2022-08-12 04:14:18 +02:00
Petr Skoda
3e61730463 MDL-75237 qformat_blackboard_six: Revert MDL-72029
This reverts commit 3cafb305ded.
2022-08-12 04:14:18 +02:00
Anton
5e27f3a7b2 MDL-75065 qbank_editquestion: fix creating simple calculated question 2022-08-10 09:44:27 +03:00
Simey Lameze
032468d269 MDL-74211 behat: convert few more steps to use new data generators 2022-08-04 09:21:33 +08: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
e5ee04d4b9 MDL-74211 behat: add course question categories page type 2022-07-29 13:02:16 +08:00
Jun Pataleta
b8d7a5e39b Merge branch 'MDL-74808-master' of https://github.com/lameze/moodle 2022-07-27 13:21:55 +08:00
Paul Holden
3971b69bb4 MDL-75312 question: predictable ordering of available questions.
This solves sporadic test failure that tried to assert their order.
2022-07-26 17:12:48 +01:00
Jun Pataleta
0643d3acbb Merge branch 'MDL-73481' of https://github.com/paulholden/moodle 2022-07-20 11:31:05 +08:00
Paul Holden
f9bb9797c2 MDL-73481 qtype_truefalse: optional standard instructions for output.
AMOS BEGIN
 CPY [privacy:preference:showstandardinstruction,qtype_multichoice],[privacy:preference:showstandardinstruction,qtype_truefalse]
 CPY [showstandardinstruction,qtype_multichoice],[showstandardinstruction,qtype_truefalse]
AMOS END
2022-07-19 16:57:02 +01: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
Víctor Déniz
29a380afeb Merge branch 'MDL-74171-master' of https://github.com/lucaboesch/moodle 2022-07-14 02:02:01 +01: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
Simey Lameze
e7d988c85c MDL-74808 question: remove span element from label 2022-07-08 14:35:24 +08:00
Simey Lameze
d1a0105b6d MDL-74808 question: only add title attr if tooltip is set 2022-07-08 14:35:24 +08:00
Simey Lameze
7c57a9749a MDL-74808 question: use the correct attr for checked checkboxes 2022-07-08 13:01:54 +08:00
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
Luca Bösch
102c93edb5 MDL-74171 core_question: qbank_plugins page table sort. 2022-07-07 16:39:56 +02:00
Huong Nguyen
3cafb305de MDL-72029 Lesson: Prevent arbitrary file read when importing lesson questions in blackboard format 2022-07-06 05:24:15 +02:00
Jun Pataleta
d3565b60f3 Merge branch 'MDL-74505-master' of https://github.com/JBThong/moodle 2022-07-05 21:15:37 +08:00