diff --git a/codeGrader/frontend/config/Config.py b/codeGrader/frontend/config/Config.py index 3d02471..d6050b0 100644 --- a/codeGrader/frontend/config/Config.py +++ b/codeGrader/frontend/config/Config.py @@ -73,5 +73,6 @@ def __init__(self): self.good_gifs = self.config["GIFS"]["Good_GIFS"].split(',') self.bad_gifs = self.config["GIFS"]["Bad_GIFS"].split(',') self.medium_gifs = self.config["GIFS"]["Medium_GIFS"].split(',') + self.gif_loading = self.config["GIFS"]["Loading_GIF"] self.gif_404 = self.config["GIFS"]["404_GIF"] self.gif_500 = self.config["GIFS"]["500_GIF"] diff --git a/codeGrader/frontend/config/config.conf b/codeGrader/frontend/config/config.conf index 5b95bfa..36b59b7 100644 --- a/codeGrader/frontend/config/config.conf +++ b/codeGrader/frontend/config/config.conf @@ -28,6 +28,8 @@ Medium_GIFS = [ 500_GIF = Chicago Med Hannah Asher GIF - Chicago Med Hannah Asher Error GIFs +Loading_GIF = One Hundred Percent Sophie GIF - One Hundred Percent Sophie How I Met Your Father GIFs + [API] Name = CodeGrader diff --git a/codeGrader/frontend/user/handlers/Submission.py b/codeGrader/frontend/user/handlers/Submission.py index f43ce58..93318d2 100644 --- a/codeGrader/frontend/user/handlers/Submission.py +++ b/codeGrader/frontend/user/handlers/Submission.py @@ -56,7 +56,7 @@ def get_gamification(self, id_: int) -> str: score = float(submission["max_score"]) if state != "finished": - return 'Hi GIF - Hi GIFs' + return config.gif_loading else: # submission has finished in the backend, need to calculate the result base on the score.