muesli-hd / muesli

Mathematisches Übungsgruppen- und Scheinlisten-Interface
GNU General Public License v3.0
26 stars 13 forks source link

Display relative percentage of achieved points on view_points #145

Closed alyaeanyx closed 2 years ago

alyaeanyx commented 2 years ago

Currently, the view_points page only displays the "total achieved points / total achievable points" percentage in the "Punkte" section. Personally, I found this to be inconvenient when comparing my points with the exam admission threshold because the points of exercise sheets that are not yet released or corrected are included in the number of total achievable points.

This PR adds a second percentage, namely "total achieved points / total achievable points of already graded exercise sheets" and displays it next to the other percentage in a way similar to the Übungsgruppenverwaltungssystem of the Faculty of Physics and Astronomy. This percentage is shown iff there are ungraded sheets.

image

christian-heusel commented 2 years ago

Also if you need assistance moving forward, I am happy to help over christmas 🎅🏻 🎄

alyaeanyx commented 2 years ago

Thanks for your suggestions! :smile: I've fixed the divide by zero issue and improved the code style in models.py.

christian-heusel commented 2 years ago

and improved the code style in models.py.

Did you forget to push that part? 😄 Your latest commit 3474534 only contains changes to view_points.pt

codecov-commenter commented 2 years ago

Codecov Report

Merging #145 (18da6f9) into master (cdaadd2) will increase coverage by 0.00%. The diff coverage is 83.33%.

@@           Coverage Diff           @@
##           master     #145   +/-   ##
=======================================
  Coverage   77.05%   77.06%           
=======================================
  Files          30       30           
  Lines        4494     4499    +5     
=======================================
+ Hits         3463     3467    +4     
- Misses       1031     1032    +1     
Impacted Files Coverage Δ
muesli/models.py 89.63% <75.00%> (-0.15%) :arrow_down:
muesli/web/viewsLecture.py 68.90% <100.00%> (+0.10%) :arrow_up:
alyaeanyx commented 2 years ago

Oops, you're absolutely right, I forgot to stage models.py for the commit :sweat_smile:

tynsh commented 2 years ago

Really cool! Thanks for your contribution :) That looks really well.

tynsh commented 2 years ago

@alyaeanyx On an other note: MÜSLI is looking for a new maintainer beginning January. If you are interested, send me a message :) (That's a 20h HiWi position)

alyaeanyx commented 2 years ago

Haha, sounds great, but I think I don't really have the time for that because of my studies :sweat_smile: