3015 Commits

Author SHA1 Message Date
Paul Holden
dec3d56032
MDL-76838 backup: remove invalid utf8 code sequences writing XML.
The surrogate blocks FFFE and FFFF are non-characters, specifically
disallowed in the character range for XML documents.
2023-05-22 21:04:12 +01:00
Ilya Tregubov
dc38a92ec6
Merge branch 'MDL-77840-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-05-16 09:47:48 +08:00
Ilya Tregubov
1d5ef6aa9a
Merge branch 'MDL-75623-MOODLE_401_STABLE' of https://github.com/sh-csg/moodle into MOODLE_401_STABLE 2023-05-10 11:46:40 +08:00
Ilya Tregubov
3994ab206b Merge branch 'MDL-77987_401' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_401_STABLE 2023-05-03 12:40:34 +08:00
David Woloszyn
f25ecd9bfa MDL-77840 backup: Avoid passing nulls to base64_encode 2023-05-02 13:52:12 +10:00
Anupama Sarjoshi
c6708db889 MDL-77987 Backup: add progress tracking to some slow steps 2023-04-24 11:17:34 +01:00
Paul Holden
f3ae5116d0
MDL-77313 restore: re-add field to indicate course/category search.
When the two restore forms for searching courses and categories were
converted to core templates in eb9935c9 they lost the named submit
button, which broke searching.
2023-04-24 11:04:26 +01:00
Stefan Hanauska
df0f9fa06d MDL-75623 backup: Encode pluginfile URLs 2023-04-01 09:09:39 +02:00
Jun Pataleta
bb61d8392b Merge branch 'MDL-77559-401-2' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-03-09 15:57:44 +08:00
Tim Hunt
42f41fc174 MDL-77467 retore: add progress tracking to potentially slow steps 2023-03-09 10:46:51 +08:00
Andrew Nicols
cd48ae56c7 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Jun Pataleta
a377bf30c4 Merge branch 'MDL-75012-401-5' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-03-02 12:31:09 +08:00
Andrew Nicols
288620b0b4 MDL-75012 js: Full build of all grunt things 2023-03-02 12:15:25 +08:00
Jun Pataleta
a3b8e7867a Merge branch 'MDL-76938_restore_comments_401' of https://github.com/davosmith/moodle into MOODLE_401_STABLE 2023-03-02 08:42:05 +08:00
Jonathon Fowler
39e58054b1 MDL-74698 backup: correctly restore course format options
Old-version backups (< 3.11.7, < 4.0.1) lose their course-level format
options when restoring into newer versions after the backup structure
was changed.

Also, course-level format options were not accurately restored against
the appropriate format type. And section-level format options were
redundantly stored at course-level and restored without mapping their
sectionids, thus creating lint.
2023-02-03 10:18:19 +10:00
Davo Smith
dcd48987f7 MDL-76938 backup: fix restore of comments linked to a course format 2023-01-26 12:32:35 +00:00
Andrew Nicols
8f4bd4ce11 MDL-76362 core: Coding style fixes 2023-01-23 09:16:08 +08:00
Marina Glancy
2dd7290ccb MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:16:06 +08:00
Tim Hunt
2ea89b98a7 MDL-76810 redirect handling: ensure return URLs are properly sanitised 2023-01-11 11:43:12 +08:00
Sara Arjona
151de4586d Merge branch 'MDL-76193-401' of https://github.com/JBThong/moodle into MOODLE_401_STABLE 2022-12-07 17:26:22 +01:00
Andrew Nicols
e7c70fd2c0 Merge branch 'MDL-75573-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2022-12-06 13:55:58 +08:00
Sara Arjona
05c53f2c44 Merge branch 'MDL-75789-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2022-12-05 12:53:43 +01:00
Thong Bui
2370255e4c MDL-76193 Questions: Backup and Restore with tags fails 2022-12-05 10:01:48 +07:00
Paul Holden
1d98d162a1 MDL-75573 backup: translate async operation type in messages. 2022-12-01 19:48:58 +00:00
Paul Holden
530e06da6d MDL-75789 restore: multi-byte safe substring calculating course names.
Co-authored-by: Leon Stringer <leon.stringer@ntlworld.com>
2022-11-29 08:36:00 +00:00
Marina Glancy
a5f92c041e MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:32 +01:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Adrian Greeve
f865b326ca Merge branch 'MDL-76099-master' of https://github.com/stevandoMoodle/moodle 2022-11-11 12:26:12 +08:00
Paul Holden
8aaede0e7d MDL-75862 backup: omit sesskey for continue buttons using get method.
It's automatically added by the rendered single_button instance when
using post method, so no need to add it unconditionally.
2022-11-10 10:17:04 +08:00
Jake Dallimore
36a0c85187 MDL-76099 core_backup: set selected overflow node in restore and copy
These pages sit under the 'restore' and 'copy' menu items respectively
but the selected menu item isn't correct because the 'restore.php' and
'copyprogress.php' page URLs don't match the node action for their
respective 'restore' and 'copy' nodes. Force set the selected node in
each case to resolve this.
2022-11-09 15:15:50 +08:00
Frédéric Massart
3345519b48 MDL-74201 backup: Restore reference to content bank files 2022-11-08 20:13:14 +01:00
Sara Arjona
4cf81fd3c2 Merge branch 'MDL-73030' of https://github.com/paulholden/moodle 2022-10-24 15:47:21 +02:00
Ilya Tregubov
057f732bf1 Merge branch 'MDL-58266-master' of https://github.com/JBThong/moodle 2022-10-17 12:51:59 +03:00
Matthew Hilton
cfb643293c MDL-56567 competency: Course module competency option to override grade
Previously, if a course module had already been graded, course module
completion linked to the course module would not update. This
commit adds the option to enable overriding the grade at the course
module competency level.

This ensures that if enabled and a user completes a module associated
with a competency, that competency will be graded appropriately.
2022-10-17 08:00:20 +10:00
hieuvu
c6e018e04e MDL-58266 core_completion: Add new view table. 2022-10-14 00:30:28 +07: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
Paul Holden
65f9976478 MDL-73030 backup: case-insensitive detection of Moodle backups. 2022-10-03 09:32:17 +01:00
Jake Dallimore
ad46fbf76c Merge branch 'mdl75668' of https://github.com/danmarsden/moodle 2022-09-28 16:34:12 +08:00
Dan Marsden
ddcd4de74d MDL-75668 backup: Save context mapping of duplicate blocks. 2022-09-07 12:38:56 +12:00
David Mudrák
aa49eb24fb MDL-75553 lang: Fix Behat regressions in scenario files 2022-09-06 21:47:18 +02:00
Philipp Memmel
9a8e108655 MDL-75092 backup: Fix selector for adding select all/none link 2022-08-19 17:17:29 +02: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
Andrew Nicols
b32b4865c0 Merge branch 'MDL-73788-master' of https://github.com/andelacruz/moodle 2022-07-26 11:37:51 +08:00
Angelia Dela Cruz
2b28996a2e MDL-73788 behat: URL behat generators use UI
Replace steps that manually add URL instances via the UI and use
Behat generators. This improves the speed of Behat test runs.
2022-07-18 17:40:22 +08:00
Iñigo Zendegi
919ea1dde1 MDL-74857 language: Start using the 'statusok' string for status 2022-07-18 10:55:47 +02:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Cameron Ball
2ac93db399 MDL-74548 backup: Deprecate get/set copy from base controller 2022-06-29 09:14:02 +08:00
Cameron Ball
07e5f432a0 MDL-74548 backup: Deprecate core_backup\copy\copy 2022-06-29 09:14:02 +08:00
Cameron Ball
bc9c536335 MDL-74548 backup: Unit tests for course copy refactor 2022-06-29 09:13:29 +08:00
Cameron Ball
29df52af19 MDL-74548 backup: Refactor course copies
This patch modifies the way copy data is shared in order to mitigate potential race conditions
and ensure that the serialised controller stored in the DB is always in a valid state.

The restore controller is now considered the "source of truth" for all information about the
copy operation. Backup controllers can no longer contain information about course copies.

As copy creation is not atomic, it is still possible for copy controllers to become orphaned or
exist in an invalid state. To mitigate this the backup cleanup task has been modified to call
a new helper method copy_helper::cleanup_orphaned_copy_controllers.

Summary of changes in this patch:

    - Copy data must now be passed through the restore controller's constructor
    - base_controller::get_copy has been deprecated in favour of restore_controller::get_copy
    - base_controller::set_copy has been deprecated without replacement
    - core_backup\copy\copy has been deprecated, use copy_helper.class.php's copy_helper instead
    - backup_cleanup_task will now clean up orphaned controllers from copy operations that went awry

Thanks to Peter Burnett for assiting with testing this patch.
2022-06-29 09:13:29 +08:00