@@ -51,7 +51,7 @@ def cast_list_int(cell: str) -> List[int]:
5151 return items
5252
5353
54- PREFIX = "cs161extensions_ "
54+ PREFIX = "FLEXTENSIONS_ "
5555
5656
5757class Environment :
@@ -79,6 +79,22 @@ def get(key: str) -> Any:
7979 if not os .getenv (PREFIX + key ):
8080 raise ConfigurationError ("Environment variable not set: " + key )
8181 return os .getenv (PREFIX + key )
82+
83+ @staticmethod
84+ def get_email_from () -> str :
85+ return str (Environment .get ("EMAIL_FROM" ))
86+
87+ @staticmethod
88+ def get_email_signature () -> str :
89+ return str (Environment .safe_get ("EMAIL_SIGNATURE" , "Data 000 Staff" ))
90+
91+ @staticmethod
92+ def get_email_subject () -> str :
93+ return str (Environment .safe_get ("EMAIL_SUBJECT" , "[DATA 000] Extension Request Update" ))
94+
95+ @staticmethod
96+ def get_email_reply_to () -> str :
97+ return str (Environment .get ("EMAIL_REPLY_TO" ))
8298
8399 @staticmethod
84100 def get_auto_approve_threshold () -> int :
@@ -87,6 +103,10 @@ def get_auto_approve_threshold() -> int:
87103 @staticmethod
88104 def get_auto_approve_threshold_dsp () -> int :
89105 return int (Environment .get ("AUTO_APPROVE_THRESHOLD_DSP" ))
106+
107+ @staticmethod
108+ def get_auto_approve_assignment_threshold () -> int :
109+ return int (Environment .get ("AUTO_APPROVE_ASSIGNMENT_THRESHOLD" ))
90110
91111 @staticmethod
92112 def get_max_total_requested_extensions_threshold () -> int :
@@ -96,8 +116,8 @@ def get_max_total_requested_extensions_threshold() -> int:
96116 return int (Environment .safe_get ("MAX_TOTAL_REQUESTED_EXTENSIONS_THRESHOLD" , default = - 1 ))
97117
98118 @staticmethod
99- def get_auto_approve_assignment_threshold () -> int :
100- return int (Environment .get ( "AUTO_APPROVE_ASSIGNMENT_THRESHOLD " ))
119+ def get_extend_gradescope_assignments () -> bool :
120+ return cast_bool (Environment .safe_get ( "EXTEND_GRADESCOPE_ASSIGNMENTS" , "No " ))
101121
102122 @staticmethod
103123 def get_course_name () -> str :
@@ -120,6 +140,7 @@ def configure_env_vars(sheet: Sheet):
120140 # Load local environment variables now from .env, which override remote provided variables for debugging
121141 if os .path .exists (".env-pytest" ):
122142 for key , value in dotenv_values (".env-pytest" ).items ():
143+ # TODO: is this still needed?
123144 if key == "APP_MASTER_SECRET" :
124145 os .environ [key ] = value
125146 else :
0 commit comments