Open
Conversation
Since Moodle 4.0, most course edit actions can be executed using the core_courseformat_course_edit webservice using only four parameters (courseid, ids, targetsectionid and targetcmid). However, some actions logic is still replicated and embed in course/view.php and course/mod.php files since the beginning of time. Now the course/update.php offers a non-ajax way of executing the same actions and replace the old replicated ways of doing the same.
Now there is course/format/update.php all course actions menus must point to the new one instead of keep pointing at the course/view.php and course/mod.php.
Most edit logic embed directly into course/view.php and course/mod.php is now redirected to course/format/update.php. This commit add deprecations messages to the old get params so it can be removed in Moodle 6.0 for good.
ferranrecio
commented
Jan 22, 2025
| notes: | ||
| core_courseformat: | ||
| - message: >- | ||
| From now on, deleting an activity without Ajax will be consistent with |
Owner
Author
There was a problem hiding this comment.
Note added about the activity deletion being consistent with the recycle bin.
ferranrecio
commented
Jan 22, 2025
| Many get actions from course/view.php and course/mod.php are now | ||
| deprecated. Use the new course/format/update.php instead to replace all | ||
| direct edit urls in your code. The affected actions are: indent, | ||
| duplicate, hide, show, stealth, delete, groupmode and marker (highlight). |
Owner
Author
There was a problem hiding this comment.
Action listed in the upgrade note
ferranrecio
commented
Jan 22, 2025
| } else if (!empty($indent) and confirm_sesskey()) { | ||
| // TODO remove this else if as part of MDL-83530. | ||
| debugging( | ||
| 'The indent param deprecated. Please use action cm_moveleft and cm_moveright in course/format/update.php instead.', |
Owner
Author
There was a problem hiding this comment.
Depreciation message has been fixed.
ferranrecio
commented
Jan 22, 2025
Owner
Author
There was a problem hiding this comment.
File deleted at last ;-)
ferranrecio
commented
Jan 22, 2025
| Then I should see "Delete section?" | ||
| And I should see "This will delete Section 1 and all the activities it contains." | ||
| And I click on "Delete" "button" | ||
| And I should not see "Section 1" |
Owner
Author
There was a problem hiding this comment.
Repeated "then" removed
ferranrecio
commented
Jan 22, 2025
| * to add proper redirection. | ||
| * | ||
| * @param int|stdClass|section_info $section Section object from database or just field course_sections.section | ||
| * @param int|stdClass|section_info|null $section Section object from database or just field course_sections.section |
Owner
Author
There was a problem hiding this comment.
This is just an incomplete documentation. Nothing to worry about, the logic remains the same.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for MDL-82767 review.