From c8b4045ba1ca02e750d6e8b15a1ced47b1930217 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 7 Apr 2014 04:47:50 -0400 Subject: It works. Users can do peer review. --- app/controllers/matches_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/controllers/matches_controller.rb') diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 3c93eac..69ea23b 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -215,8 +215,9 @@ class MatchesController < ApplicationController base_score = next_score next_score += base_score end - @match.submitted_peer_reviews += 1 - if (@match.submitted_peer_reviews == @match.players.count) + @match.submitted_peer_evaluations += 1 + players = []; @match.teams.each{|t| players.concat(t.users.all)} + if (@match.submitted_peer_evaluations == players.count) @match.status = 3 end respond_to do |format| -- cgit v1.2.3