Skip to content

Mdl 82767 main v03#1

Open
ferranrecio wants to merge 4 commits intomainfrom
MDL-82767-main-v03
Open

Mdl 82767 main v03#1
ferranrecio wants to merge 4 commits intomainfrom
MDL-82767-main-v03

Conversation

@ferranrecio
Copy link
Owner

Pull request for MDL-82767 review.

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.
notes:
core_courseformat:
- message: >-
From now on, deleting an activity without Ajax will be consistent with
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note added about the activity deletion being consistent with the recycle bin.

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).
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action listed in the upgrade note

} 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.',
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depreciation message has been fixed.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File deleted at last ;-)

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"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeated "then" removed

* 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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an incomplete documentation. Nothing to worry about, the logic remains the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant