From d628b19bb576b10773d457352fb53ee0447443d0 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 17 Dec 2021 06:42:36 -0600 Subject: [PATCH] Added error for too big or small scores --- Instructor/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Instructor/forms.py b/Instructor/forms.py index 364ba95..4cbd81e 100644 --- a/Instructor/forms.py +++ b/Instructor/forms.py @@ -204,6 +204,8 @@ class RubricForm(ModelForm): offending_cell_elem = error.relative_path[3] if len(error.relative_path) >= 4 else None if offending_cell_elem == "score" and "not of type 'number'" in error.message: return f"Please enter a number for the score {location}" + elif offending_cell_elem == "score" and ("max" in error.message or "minimum" in error.message): + return f"The score must be between 0 and 100 {location}" elif offending_cell_elem == "description": if "too short" in error.message: return f"Please enter a description {location}" -- knotmirror 0.0.1