diff --git a/docker-compose.yml b/docker-compose.yml index 9ca10ec6b33a385caa07dd978d90fba568a86ced..d7735ec448b1fc44631a6fe8a44e19f6ef768bd4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: ASSIGNMENT_TITLE: "Assignment Title" SCORE_DEFAULT: 100 LATE_PENALTY: 8 + GRACE_PERIOD: "5 Days" DEFAULT_LABELS: '["Names", "Steps", "Extra Credit"]' DEFAULT_POINTS: '[[10],[15,20],[0]]' TEAM: 0 diff --git a/main.py b/main.py index d443b628cc899a839a1cf560841c20e264155426..ea5052580b2fb93364be3769b98e64794f743920 100644 --- a/main.py +++ b/main.py @@ -24,6 +24,7 @@ global pointsForRun global title global defaults global team +global gracePeriod """ Environment Variable Imports @@ -32,6 +33,7 @@ Environment Variable Imports title = os.getenv("ASSIGNMENT_TITLE", default="Assignment Title") scoreDefault = int(os.getenv("SCORE_DEFAULT", default="100")) # What the score is out of latePenalty = int(os.getenv("LATE_PENALTY", default="8")) +gracePeriod = os.getenv("GRACE_PERIOD", default="5 Days") defaults_env = os.getenv("DEFAULT_POINTS", default="[[10],[15,20],[0]]") @@ -179,7 +181,7 @@ def adjustLate(): global late global score global latePenalty - onTime = validateInput(input("Did the student turn in the assignment within 5 days? [Y/n]: ")) + onTime = validateInput(input("Did the student turn in the assignment within " + gracePeriod + "? [Y/n]: ")) if onTime: points = latePenalty else: @@ -337,7 +339,7 @@ def main(): else: plural = "" name = input("Student name" + plural + "?: ") - late = not validateInput(input("Did the student turn in the assignment within 5 days? [Y/n]: ")) + late = not validateInput(input("Did the student turn in the assignment within " + gracePeriod + "? [Y/n]: ")) if(late): score = score - latePenalty