Merge branch 'MDL-79664' of https://github.com/paulholden/moodle
[moodle.git] / grade / upgrade.txt
blobcef75903a95e50e907125b9ea443b62129b8262c
1 This file describes API changes in /grade/* ;
2 Information provided here is intended especially for developers.
4 === 4.4 ===
5 * The grade_structure::get_element_icon() function has been deprecated. Please use grade_helper::get_element_icon() instead.
6 * The grade_structure::get_element_type_string() function has been deprecated. Please use grade_helper::get_element_type_string() instead.
7 * The grade_structure::get_element_header() function has been deprecated. Please use grade_helper::get_element_header() instead.
8 * The grade_structure::get_activity_link() functions has been deprecated. Please use grade_helper::get_activity_link() instead.
9 * The `grade_helper::get_activity_link` method will only return URL to activities view.php page (no longer to the grade.php page)
10 * Some changes to how print_grade_page_head() sets the page title:
11   * If a non-empty `$heading` parameter is passed, it will be used as the page title's unique identifying information.
12   * Add support for grade report plugins that define an `editingmode_title` lang string. If the grade report plugin defines this
13     language string, it will be used for the page title's unique identifying information when editing mode is turned on.
14 * The function gradeimport_csv_load_data::insert_grade_record() now has extra parameter $gradeitem to carry over the grade item related info
15   for validation.
16 * The function get_gradable_users() in grade/lib.php has extra param now to retrieve only active enrolments.
17 * A new webservice core_grades_get_gradable_users has been added to retrieve gradable users for a course.
18 * The following previously deprecated methods have been removed and can no longer be used:
19   - `grade_print_tabs`
20   - `print_grade_plugin_selector`
22 === 4.3 ===
23 * The $showtitle parameter in the print_grade_page_head function located inside grade/lib.php has been deprecated and is not used anymore.
24 * The deprecated `core_grades_create_gradecategory` external method has been removed, in addition to the accompanying
25   `core_grades_external::create_gradecategory` methods
26 * User, Group & Grade item JS classes have been added to easily enable the creation of combobox search components.
27   Refer to the dev docs on details of how to implement this feature if desired.
28 * basewidget.js has been deprecated and its uses replaced with the new JS classes mentioned above.
29 * With the basewidget being deprecated all usages of it in core have now been migrated and the files that used it removed.
30   The basewidget itself will go through the proper deprecation process and be removed in a future version.
31 * The following webservices have had some optional parameters changed:
32   - grade/classes/external/get_enrolled_users_for_selector
33     - profileimage -> profileimageurl & profileimageurlsmall
34     - return changed to use the core_user_external::user_description() method instead of a custom baked one.
35   - grade/classes/external/get_groups_for_selector
36     - Has been relocated to core_group_external::get_groups_for_selector()
37     - groupimageurl is now available as an optional parameter to give the user an image either set or generated for the group.
38 * The grade `itemname` property contained in the return structure of the following external methods is now PARAM_CLEANHTML:
39   - `core_grades_get_gradeitems`
40   - `gradereport_user_get_grade_items`
41 * The grade_helper::get_lang_string() function has been deprecated. Please use get_string() instead.
43 === 4.1 ===
44 * The $importactiveurl parameter in the constructor of the core_grades\output\import_action_bar class has been deprecated and is not used anymore.
45 * The $exportactiveurl parameter in the constructor of the core_grades\output\export_action_bar class has been deprecated and is not used anymore.
46 * The select_in_gradebook_navigation_selector() function in behat_grade.php has been deprecated. Please use
47   behat_forms::i_set_the_field_to() instead.
49 === 4.0 ===
51 * The select_in_gradebook_tabs() function in behat_grade.php has been deprecated. Please use the function
52   select_in_gradebook_navigation_selector() instead.
53 * The setting $CFG->grade_navmethod setting has been completely removed because it's not required anymore. This setting
54   was used to set the type of navigation (tabs or dropdown box) used in gradebook which is now replaced with tertiary
55   navigation.
56 * The print_grade_plugin_selector() function has been deprecated. This function was used to generate and output the
57   dropdown box navigation in gradebook which is now replaced with tertiary navigation.
58 * The grade_print_tabs() function has been deprecated. This function was used to generate and output the tabs navigation
59   in gradebook which is now replaced with tertiary navigation.
60 * There is a new callback inside of grade_get_plugin_info called extend_gradebook_plugininfo
61   which allows for new tabs to be added to the gradebook.
63 === 3.7 ===
65 * The grade_cron() function has been removed. Please use grade_history_cleanup_task and grade_cron_task scheduled tasks instead.
67 === 3.6 ===
69 * The grade_plugin_return constructor now uses parameters from the
70   request as defaults, which can be overridden by parameters supplied
71   to the constructor. This may lead to a change in behaviour if only
72   some of the possible parameters are supplied.
73 * The grade_plugin_return class now tracks groupid as well as the
74   type, plugin, courseid, userid and page parameters that were tracked
75   previously. The groupid parameter will be set using
76   groups_get_course_group for the relevant course if the group is
77   otherwise unspecified.
78 * The above changes mean that code using grade_plugin_return objects
79   should generally no longer call groups_get_course_group directly,
80   but should use the gpr->groupid parameter instead.
81 * The grade_plugin_return constructor now accepts either course or
82   courseid as a parameter to specify course.