MDL-51373 grade: Deprecate WS core_grade_get_grades

This commit is contained in:
Juan Leyva 2016-07-01 13:27:39 +01:00
parent 5a1728df39
commit aa7e371af6
3 changed files with 22 additions and 1 deletions

View File

@ -38,6 +38,8 @@ class core_grades_external extends external_api {
*
* @return external_function_parameters
* @since Moodle 2.7
* @deprecated Moodle 3.2 MDL-51373 - Please do not call this function any more.
* @see gradereport_user_external::get_grades_table for a similar function
*/
public static function get_grades_parameters() {
return new external_function_parameters(
@ -65,6 +67,8 @@ class core_grades_external extends external_api {
* @param array $userids Array of user ids
* @return array Array of grades
* @since Moodle 2.7
* @deprecated Moodle 3.2 MDL-51373 - Please do not call this function any more.
* @see gradereport_user_external::get_grades_table for a similar function
*/
public static function get_grades($courseid, $component = null, $activityid = null, $userids = array()) {
global $CFG, $USER, $DB;
@ -293,6 +297,8 @@ class core_grades_external extends external_api {
* @param int $iteminstance Item instance
* @param int $itemnumber Item number
* @return grade_item A grade_item instance
* @deprecated Moodle 3.2 MDL-51373 - Please do not call this function any more.
* @see gradereport_user_external::get_grades_table for a similar function
*/
private static function get_grade_item($courseid, $itemtype, $itemmodule = null, $iteminstance = null, $itemnumber = null) {
$gradeiteminstance = null;
@ -311,6 +317,8 @@ class core_grades_external extends external_api {
*
* @return external_description
* @since Moodle 2.7
* @deprecated Moodle 3.2 MDL-51373 - Please do not call this function any more.
* @see gradereport_user_external::get_grades_table for a similar function
*/
public static function get_grades_returns() {
return new external_single_structure(
@ -405,6 +413,15 @@ class core_grades_external extends external_api {
}
/**
* Marking the method as deprecated.
*
* @return bool
*/
public static function get_grades_is_deprecated() {
return true;
}
/**
* Returns description of method parameters
*

View File

@ -393,7 +393,8 @@ $functions = array(
'core_grades_get_grades' => array(
'classname' => 'core_grades_external',
'methodname' => 'get_grades',
'description' => 'Returns student course total grade and grades for activities.
'description' => '** DEPRECATED ** Please do not call this function any more.
Returns student course total grade and grades for activities.
This function does not return category or manual items.
This function is suitable for managers or teachers not students.',
'type' => 'read',

View File

@ -13,6 +13,9 @@ information provided here is intended especially for developers.
- get_user_max_upload_file_size()
* The following functions have been removed and should not be used any more:
- file_modify_html_header() - See MDL-29738 for more information.
* core_grades_external::get_grades has been deprecated. Please do not call this function any more.
External function gradereport_user_external::get_grades_table can be used for retrieving the course grades table.
Please note that the information returned from that WS is intended for displaying (not for data consumption).
=== 3.1 ===