MDL-65959 core_badges: Allow ability to upload badges cross domain.
[moodle.git] / badges / upgrade.txt
1This files describes API changes in /badges/*,
2information provided here is intended especially for developers.
f958f5c1 3
4=== 3.10 ===
5* Users can now specify a backpack that differs from the site backpack. In order to do this, connection details need to
6be set in 'Manage backpacks' with OR without auth details.
7* Introduced new functions in backpack_api
8** 'import_badge_assertion' to facilitate cross domain badge imports.
9** 'update_assertion' updates a previously defined/created assertion.
10* New badge lib functions introduced
11** badges_save_external_backpack() - This method handles inserts/updates to the site wide backpacks' configuration details.
12** 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
13** badges_get_user_backpack() - Gets a specific user's backpack. Defaults to current user's backpack if none provided.
14** badges_get_site_primary_backpack() - Get the primary backpack set for the site as defined in $CFG->badges_site_backpack
15* badges_open_badges_backpack_api() - Now accepts a backpackid(badge_external_backpack id) to check whether the version of the provided backpack.
16 This was introduced because now there is a difference between a site and user backpack. If null, defaults to site_backpack.
17* 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
18* badges_external_get_mapping() - Accepts an additional argument to indicate which value it wants returned. Defaults to 'externalid' which contains the OBv2 badge URL
20=== 3.9 ===
21* BADGE_BACKPACKAPIURL and BADGE_BACKPACKWEBURL are deprecated and should not be used.
64062819 22* OBv2 has been set to the default value when the obversion is not defined.
f958f5c1 23
e8bfd9b4 24=== 3.7 ===
7444ba74 25* BADGE_BACKPACKURL is deprecated and should not be used.
e8bfd9b4 26* Incorrect term "badge competencies" has been refactored to "alignments" everywhere.
c8d2f392 27
5bb1889f 28=== 3.6 ===
30* 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.
32=== 2.7 ===
34* get_completed_criteria_sql() - This method was added to award_criteria class and must be overriden
35 in all criteria classes. This method returns an array consisting of SQL JOIN statement, WHERE conditions,
36 and any parameters that might be required. The results are used in lib/badgeslib.php in review_all_criteria()
37 to reduce to the minimum the number of users to review and award badges.
38* New optional parameter $filtered in review() allows to indicate that some expensive checks can be skipped
39 if the list of users has been initially filtered based on met criteria.
40* New optional parameter $archive in delete() in badge class in badgeslib.php
41 allows to indicate that a badge should be archived instead of fully deleted.
42 If this parameter is set to FALSE, a badge will all its information, criteria,
43 and awards will be removed from the database.
44* BADGE_BACKPACKURL constant has been moved from badges/lib/backpacklib.php to lib/badgeslib.php, and URI scheme
45 name ('http://') has been removed.