Skip to content

Commit

Permalink
Merge branch 'MDL-78012' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 25, 2023
2 parents c1c6234 + 46d12cf commit e82aed7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 86 deletions.
48 changes: 0 additions & 48 deletions badges/ajax.php

This file was deleted.

8 changes: 8 additions & 0 deletions badges/upgrade.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
This files describes API changes in /badges/*,
information provided here is intended especially for developers.

=== 4.3 ===
* The following, deprecated since 3.11, have been removed and can no longer be used:
- `badges/ajax.js`
- `badges_check_backpack_accessibility`
- `badges_setup_backpack_js`
- `badges_local_backpack_js`

=== 4.0 ===
* Function print_badge_tabs has been deprecated in favour of manage_badge_action_bar instead

Expand Down
38 changes: 0 additions & 38 deletions lib/badgeslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,20 +632,6 @@ function badges_download($userid) {
}
}

/**
* Checks if badges can be pushed to external backpack.
*
* @deprecated Since Moodle 3.11.
* @return string Code of backpack accessibility status.
*/
function badges_check_backpack_accessibility() {
// This method was used for OBv1.0. It can be deprecated because OBv1.0 support will be removed.
// When this method will be removed, badges/ajax.php can be removed too (if it keeps containing only a call to it).
debugging('badges_check_backpack_accessibility() can not be used any more, it was only used for OBv1.0', DEBUG_DEVELOPER);

return 'curl-request-timeout';
}

/**
* Checks if user has external backpack connected.
*
Expand Down Expand Up @@ -687,30 +673,6 @@ function badges_handle_course_deletion($courseid) {
}
}

/**
* Loads JS files required for backpack support.
*
* @deprecated Since Moodle 3.11.
* @return void
*/
function badges_setup_backpack_js() {
// This method was used for OBv1.0. It can be deprecated because OBv1.0 support will be removed.
debugging('badges_setup_backpack_js() can not be used any more, it was only used for OBv1.0.', DEBUG_DEVELOPER);
}

/**
* No js files are required for backpack support.
* This only exists to directly support the custom V1 backpack api.
*
* @deprecated Since Moodle 3.11.
* @param boolean $checksite Call check site function.
* @return void
*/
function badges_local_backpack_js($checksite = false) {
// This method was used for OBv1.0. It can be deprecated because OBv1.0 support will be removed.
debugging('badges_local_backpack_js() can not be used any more, it was only used for OBv1.0.', DEBUG_DEVELOPER);
}

/**
* Create the site backpack with this data.
*
Expand Down
21 changes: 21 additions & 0 deletions lib/deprecatedlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,27 @@ function serialise_tool_proxy() {
throw new coding_exception('serialise_tool_proxy has been removed.');
}

/**
* @deprecated Since Moodle 3.11.
*/
function badges_check_backpack_accessibility() {
throw new coding_exception('badges_check_backpack_accessibility() can not be used any more, it was only used for OBv1.0');
}

/**
* @deprecated Since Moodle 3.11.
*/
function badges_setup_backpack_js() {
throw new coding_exception('badges_setup_backpack_js() can not be used any more, it was only used for OBv1.0');
}

/**
* @deprecated Since Moodle 3.11.
*/
function badges_local_backpack_js() {
throw new coding_exception('badges_local_backpack_js() can not be used any more, it was only used for OBv1.0');
}

/**
* Checks if current user is shown any extra fields when listing users.
*
Expand Down

0 comments on commit e82aed7

Please sign in to comment.