Skip to content

Commit

Permalink
fixing the wrongly rendered loading gif
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed Mar 13, 2024
1 parent 541c21c commit 8371855
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions codeGrader/frontend/config/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 2 additions & 0 deletions codeGrader/frontend/config/config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Medium_GIFS = [

500_GIF = <img src="https://media1.tenor.com/m/QJepIeRQw9AAAAAC/chicago-med-hannah-asher.gif" width="833" height="468.3534136546185" alt="Chicago Med Hannah Asher GIF - Chicago Med Hannah Asher Error GIFs" style="max-width: 833px;">

Loading_GIF = <img src="https://media1.tenor.com/m/oMnCJU2dp5oAAAAd/one-hundred-percent-sophie.gif" width="833" height="833" alt="One Hundred Percent Sophie GIF - One Hundred Percent Sophie How I Met Your Father GIFs" s>


[API]
Name = CodeGrader
Expand Down
2 changes: 1 addition & 1 deletion codeGrader/frontend/user/handlers/Submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_gamification(self, id_: int) -> str:
score = float(submission["max_score"])

if state != "finished":
return '<img src="https://media.tenor.com/aXbaXzhcVVUAAAAM/hi.gif" alt="Hi GIF - Hi GIFs" loading="lazy" style="background-color: unset;" width="158" height="127.11818181818181">'
return config.gif_loading

else:
# submission has finished in the backend, need to calculate the result base on the score.
Expand Down

0 comments on commit 8371855

Please sign in to comment.