Permalink
Browse files

MDL-31362 grade: removed GRADE_UPDATE_ITEM_DELETED as it is not genui…

…nely being used anywhere
  • Loading branch information...
1 parent 5bbf3cb commit ca540697f17ee9b276a053c37ebc5008794c6090 @andyjdavis andyjdavis committed Mar 3, 2012
Showing with 2 additions and 7 deletions.
  1. +0 −5 lib/grade/constants.php
  2. +1 −1 lib/gradelib.php
  3. +1 −1 mod/lti/servicelib.php
View
@@ -113,11 +113,6 @@
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
*/
define('GRADE_UPDATE_ITEM_LOCKED', 4);
View
@@ -56,7 +56,7 @@
* @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
@@ -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) {

0 comments on commit ca54069

Please sign in to comment.