Last active
September 9, 2016 09:07
-
-
Save stronk7/29fe38510bc88c3b5579617bd4676a5c to your computer and use it in GitHub Desktop.
hide and lock grade items example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php | |
index 18e7c16..a246696 100644 | |
--- a/grade/report/grader/lib.php | |
+++ b/grade/report/grader/lib.php | |
@@ -838,6 +838,12 @@ class grade_report_grader extends grade_report { | |
} | |
} else { | |
// Element is a grade_item | |
+ if ($element['object']->itemname == 'One database') { | |
+ $element['object']->itemname = 'Deletion in progress'; | |
+ $element['object']->hidden = true; | |
+ $element['object']->locked = true; | |
+ $element['object']->lockedtime = time(); | |
+ } | |
if ($element['object']->id == $this->sortitemid) { | |
if ($this->sortorder == 'ASC') { | |
$arrow = $this->get_sort_arrow('up', $sortlink); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment