Skip to content

Commit

Permalink
@teamed_count renamed to @student_team_counts
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 6, 2024
1 parent b80585d commit 46fb4a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/assessment360_controller.rb
Expand Up @@ -18,7 +18,7 @@ def all_students_all_reviews
# hashes for view
@meta_review = {}
@teammate_review = {}
@teamed_count = {}
@student_team_counts = {} # renamed from @teamed_count
# for course
# eg. @overall_teammate_review_grades = {assgt_id1: 100, assgt_id2: 178, ...}
# @overall_teammate_review_count = {assgt_id1: 1, assgt_id2: 2, ...}
Expand All @@ -31,7 +31,7 @@ def all_students_all_reviews
# [aggregrate_review_grades_per_stu, review_count_per_stu] --> [0, 0]
%w[teammate meta].each { |type| instance_variable_set("@#{type}_review_info_per_stu", [0, 0]) }
students_teamed = StudentTask.teamed_students(cp.user)
@teamed_count[cp.id] = students_teamed[course.id].try(:size).to_i
@student_team_counts[cp.id] = students_teamed[course.id].try(:size).to_i
@assignments.each do |assignment|
@meta_review[cp.id] = {} unless @meta_review.key?(cp.id)
@teammate_review[cp.id] = {} unless @teammate_review.key?(cp.id)
Expand Down
3 changes: 2 additions & 1 deletion app/views/assessment360/all_students_all_reviews.html.erb
Expand Up @@ -22,7 +22,8 @@
<% @course_participants.each do |cp|%>
<tr>
<td align="center"><%= "#{cp.name(session[:ip])} (#{cp.fullname(session[:ip])})" %> </td>
<td><%= @teamed_count[cp.id] %></td>
#renamed from @teamed_count
<td><%= @student_team_counts[cp.id] %></td>
<% @assignments.each do |assignment|%>
<td><%= @meta_review[cp.id][assignment.id] unless @meta_review.nil? %></td>
<td><%= @teammate_review[cp.id][assignment.id] unless @teammate_review.nil? %></td>
Expand Down

0 comments on commit 46fb4a5

Please sign in to comment.