Skip to content

Commit

Permalink
Disregarding empty reviews when calculating teammate review averages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
qureshi-ali committed Apr 15, 2024
1 parent 9af77f5 commit ef449f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/assessment360_controller.rb
Expand Up @@ -163,6 +163,8 @@ def calc_overall_review_info(assignment,
# assign it as 0 instead of leaving it blank. This helps in easier calculation of overall grade
overall_review_grade_hash[assignment.id] = 0 unless overall_review_grade_hash.key?(assignment.id)
overall_review_count_hash[assignment.id] = 0 unless overall_review_count_hash.key?(assignment.id)
# Do not consider reviews that have not been filled out by teammates when calculating averages.
reviews = reviews.reject { |review| review.average_score == 'N/A' }
grades = 0
# Check if they person has gotten any review for the assignment
if reviews.count > 0
Expand Down

0 comments on commit ef449f6

Please sign in to comment.