Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 45a64c19bf2a38c4856de93d007c5a84375da7b4 1 parent ae0f6ad
Raymond Antonio Wijaya raymondAntonio authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 mod/assign/feedback/offline/importgradesform.php
5 mod/assign/feedback/offline/importgradesform.php
View
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.