Skip to content

Commit

Permalink
Merge 7d0fea7 into bd0ecad
Browse files Browse the repository at this point in the history
  • Loading branch information
qureshi-ali committed Nov 14, 2023
2 parents bd0ecad + 7d0fea7 commit 9bd38d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/grades_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def view
end
end
@scores = review_grades(@assignment, @questions)
@original_length = @scores[:teams].length # After rejecting nil scores need original length to iterate over hash
averages = vector(@scores)
@average_chart = bar_chart(averages, 300, 100, 5)
@avg_of_avg = mean(averages)
Expand Down
2 changes: 1 addition & 1 deletion app/views/grades/_teams.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</thead>
<!--E1877: tbody tag added to the table structure-->
<tbody>
<% 0.upto(@scores[:teams].length).each do |index| %>
<% 0.upto(@original_length).each do |index| %>
<%= render :partial => 'grades/team',
:locals => {:prefix => 'team'+index.to_s,
:tscore => @scores[:teams][index.to_s.to_sym],
Expand Down

0 comments on commit 9bd38d5

Please sign in to comment.