Skip to content

Commit

Permalink
MDL-83764 core_courseformat: Deprecate externservercourse.php feature
Browse files Browse the repository at this point in the history
* Add deprecation message and testing
  • Loading branch information
laurentdavid committed Jan 7, 2025
1 parent ab5692a commit bd9bde0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .upgradenotes/MDL-83764-2024112809033570.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
issueNumber: MDL-83764
notes:
core_courseformat:
- message: >-
The externservercourse.php feature used to override the course view page has
been deprecated in favor of using hooks. The following hooks are available to do
something similar: \core_course\hook\before_course_viewed.
type: deprecated
3 changes: 3 additions & 0 deletions course/format/classes/hook_listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ public static function remove_members_from_group(
* Redirect to external course url using the before_course_viewed hook.
*
* @param before_course_viewed $hook The hook object containing course data.
* @deprecated since 5.0
* @todo MDL-83839 This method will be removed in Moodle 6.0.
*/
#[\core\attribute\deprecated('core_courseformat\hook\hook_listener::before_course_viewed', since: '5.0', mdl: 'MDL-83764')]
public static function before_course_viewed(before_course_viewed $hook): void {
global $CFG;
if (file_exists($CFG->dirroot . '/course/externservercourse.php')) {
Expand Down

0 comments on commit bd9bde0

Please sign in to comment.