mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-31362 grade: removed GRADE_UPDATE_ITEM_DELETED as it is not genuinely being used anywhere
This commit is contained in:
parent
5bbf3cb72b
commit
ca540697f1
@ -112,11 +112,6 @@ define('GRADE_UPDATE_FAILED', 1);
|
||||
*/
|
||||
define('GRADE_UPDATE_MULTIPLE', 2);
|
||||
|
||||
/**
|
||||
* GRADE_UPDATE_DELETED - Grade item deleted (MDL-31362)
|
||||
*/
|
||||
define('GRADE_UPDATE_ITEM_DELETED', 3);
|
||||
|
||||
/**
|
||||
* GRADE_UPDATE_DELETED - Grade item cannot be updated as it is locked
|
||||
*/
|
||||
|
@ -56,7 +56,7 @@ require_once($CFG->libdir . '/grade/grade_outcome.php');
|
||||
* @param int $itemnumber Most probably 0. Modules can use other numbers when having more than one grade for each user
|
||||
* @param mixed $grades Grade (object, array) or several grades (arrays of arrays or objects), NULL if updating grade_item definition only
|
||||
* @param mixed $itemdetails Object or array describing the grading item, NULL if no change
|
||||
* @return int Returns GRADE_UPDATE_OK, GRADE_UPDATE_FAILED, GRADE_UPDATE_MULTIPLE, GRADE_UPDATE_ITEM_DELETED (MDL-31362) or GRADE_UPDATE_ITEM_LOCKED
|
||||
* @return int Returns GRADE_UPDATE_OK, GRADE_UPDATE_FAILED, GRADE_UPDATE_MULTIPLE or GRADE_UPDATE_ITEM_LOCKED
|
||||
*/
|
||||
function grade_update($source, $courseid, $itemtype, $itemmodule, $iteminstance, $itemnumber, $grades=NULL, $itemdetails=NULL) {
|
||||
global $USER, $CFG, $DB;
|
||||
|
@ -192,7 +192,7 @@ function lti_delete_grade($ltiinstance, $userid) {
|
||||
|
||||
$status = grade_update(LTI_SOURCE, $ltiinstance->course, LTI_ITEM_TYPE, LTI_ITEM_MODULE, $ltiinstance->id, 0, $grade, array('deleted'=>1));
|
||||
|
||||
return $status == GRADE_UPDATE_OK || $status == GRADE_UPDATE_ITEM_DELETED; //grade_update seems to return ok now, but could reasonably return deleted in the future
|
||||
return $status == GRADE_UPDATE_OK;
|
||||
}
|
||||
|
||||
function lti_verify_message($key, $sharedsecrets, $body, $headers = null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user