1 |
efrain |
1 |
This files describes API changes in /badges/*,
|
|
|
2 |
information provided here is intended especially for developers.
|
|
|
3 |
|
|
|
4 |
=== 4.4 ===
|
|
|
5 |
* The following methods have been deprecated and now Report builder reports are used instead:
|
|
|
6 |
- render_badge_collection()
|
|
|
7 |
- render_badge_recipients()
|
|
|
8 |
* The following previously deprecated method has been removed and can no longer be used:
|
|
|
9 |
- `core_badges_renderer::print_badge_tabs`
|
|
|
10 |
|
|
|
11 |
=== 4.3 ===
|
|
|
12 |
* The following, deprecated since 3.11, have been removed and can no longer be used:
|
|
|
13 |
- `badges/ajax.js`
|
|
|
14 |
- `badges_check_backpack_accessibility`
|
|
|
15 |
- `badges_setup_backpack_js`
|
|
|
16 |
- `badges_local_backpack_js`
|
|
|
17 |
* Functions render_badge_management and print_badge_table_actions have been deprecated when converting the
|
|
|
18 |
section "Manage badges" to a Report Builder system report.
|
|
|
19 |
|
|
|
20 |
=== 4.0 ===
|
|
|
21 |
* Function print_badge_tabs has been deprecated in favour of manage_badge_action_bar instead
|
|
|
22 |
|
|
|
23 |
=== 3.11 ===
|
|
|
24 |
* $CFG->badges_site_backpack setting has been completely removed because it's not required anymore. From now, the primary
|
|
|
25 |
site backpack will be the first one in the "Manage backpacks" list (so, the one with lower sortorder value).
|
|
|
26 |
* Final deprecation for:
|
|
|
27 |
- BADGE_BACKPACKURL constant has been removed.
|
|
|
28 |
- badges/backpack.js file has been removed.
|
|
|
29 |
* The following methods have been deprecated:
|
|
|
30 |
- badges_check_backpack_accessibility()
|
|
|
31 |
- badges_setup_backpack_js()
|
|
|
32 |
- badges_local_backpack_js()
|
|
|
33 |
|
|
|
34 |
=== 3.10 ===
|
|
|
35 |
* Users can now specify a backpack that differs from the site backpack. In order to do this, connection details need to
|
|
|
36 |
be set in 'Manage backpacks' with OR without auth details.
|
|
|
37 |
* Introduced new functions in backpack_api
|
|
|
38 |
** 'import_badge_assertion' to facilitate cross domain badge imports.
|
|
|
39 |
** 'update_assertion' updates a previously defined/created assertion.
|
|
|
40 |
* New badge lib functions introduced
|
|
|
41 |
** badges_save_external_backpack() - This method handles inserts/updates to the site wide backpacks' configuration details.
|
|
|
42 |
** badges_save_backpack_credentials() - This method handles inserts/updates any authentication details to connect to the backpacks created. This can either be site OR user backpack authentication details
|
|
|
43 |
** badges_get_user_backpack() - Gets a specific user's backpack. Defaults to current user's backpack if none provided.
|
|
|
44 |
** badges_get_site_primary_backpack() - Get the primary backpack set for the site as defined in $CFG->badges_site_backpack
|
|
|
45 |
* badges_open_badges_backpack_api() - Now accepts a backpackid(badge_external_backpack id) to check whether the version of the provided backpack.
|
|
|
46 |
This was introduced because now there is a difference between a site and user backpack. If null, defaults to site_backpack.
|
|
|
47 |
* badges_get_site_backpack() - Accepts an additional $userid param if we want to get a specific user's backpack. Defaults to 0 if we are trying to get the site/admin level backpack
|
|
|
48 |
* badges_external_get_mapping() - Accepts an additional argument to indicate which value it wants returned. Defaults to 'externalid' which contains the OBv2 badge URL
|
|
|
49 |
|
|
|
50 |
=== 3.9 ===
|
|
|
51 |
* BADGE_BACKPACKAPIURL and BADGE_BACKPACKWEBURL are deprecated and should not be used.
|
|
|
52 |
* OBv2 has been set to the default value when the obversion is not defined.
|
|
|
53 |
|
|
|
54 |
=== 3.7 ===
|
|
|
55 |
* BADGE_BACKPACKURL is deprecated and should not be used.
|
|
|
56 |
* Incorrect term "badge competencies" has been refactored to "alignments" everywhere.
|
|
|
57 |
|
|
|
58 |
=== 3.6 ===
|
|
|
59 |
|
|
|
60 |
* The WebService core_badges_get_user_badges now returns more information for each badge: notification, nextcron, email, version, language, imageauthorname, imageauthoremail, imageauthorurl, imagecaption, endorsement, competencies and relatedbadges.
|
|
|
61 |
|
|
|
62 |
=== 2.7 ===
|
|
|
63 |
|
|
|
64 |
* get_completed_criteria_sql() - This method was added to award_criteria class and must be overriden
|
|
|
65 |
in all criteria classes. This method returns an array consisting of SQL JOIN statement, WHERE conditions,
|
|
|
66 |
and any parameters that might be required. The results are used in lib/badgeslib.php in review_all_criteria()
|
|
|
67 |
to reduce to the minimum the number of users to review and award badges.
|
|
|
68 |
* New optional parameter $filtered in review() allows to indicate that some expensive checks can be skipped
|
|
|
69 |
if the list of users has been initially filtered based on met criteria.
|
|
|
70 |
* New optional parameter $archive in delete() in badge class in badgeslib.php
|
|
|
71 |
allows to indicate that a badge should be archived instead of fully deleted.
|
|
|
72 |
If this parameter is set to FALSE, a badge will all its information, criteria,
|
|
|
73 |
and awards will be removed from the database.
|
|
|
74 |
* BADGE_BACKPACKURL constant has been moved from badges/lib/backpacklib.php to lib/badgeslib.php, and URI scheme
|
|
|
75 |
name ('http://') has been removed.
|