Permalink
Browse files

MDL-35436: mod_assign : Usability issues: add validation rules in the…

… confirmation page for invalid grades uploaded via csv files
  • Loading branch information...
1 parent ae0f6ad commit 45a64c19bf2a38c4856de93d007c5a84375da7b4 Raymond Wijaya committed Sep 13, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 mod/assign/feedback/offline/importgradesform.php
@@ -123,6 +123,11 @@ public function definition() {
} else if ($assignment->grading_disabled($user->id)) {
// Skip grade is locked.
$skip = true;
+ } else if (!is_numeric($gradedesc) && ($assignment->get_instance()->grade) > -1) {
+ $skip = true;
+ } else if (($assignment->get_instance()->grade > -1) &&
+ (($gradedesc < 0) || ($gradedesc > $assignment->get_instance()->grade))) {
+ $skip = true;
}
if (!$skip) {

0 comments on commit 45a64c1

Please sign in to comment.