MDL-31362 grade: removed GRADE_UPDATE_ITEM_DELETED as it is not genuinely being used anywhere

This commit is contained in:
Andrew Davis 2012-03-03 10:00:01 +07:00
parent 5bbf3cb72b
commit ca540697f1
3 changed files with 2 additions and 7 deletions

View File

@ -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
*/

View File

@ -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;

View File

@ -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) {