summaryrefslogtreecommitdiff
path: root/app/controllers/matches_controller.rb
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-26 21:05:46 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-26 21:05:46 -0400
commita9a59bf0199c761ada889f23274aa0a56da50554 (patch)
treef7699c5d2c851bee1e56db1c4ec6e5a41686d15f /app/controllers/matches_controller.rb
parentedcca83c6c251a79afcd83760cf20ebaf00b3b32 (diff)
lib methods for tournament_stage
Diffstat (limited to 'app/controllers/matches_controller.rb')
-rw-r--r--app/controllers/matches_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb
index a2a1269..4a20df2 100644
--- a/app/controllers/matches_controller.rb
+++ b/app/controllers/matches_controller.rb
@@ -230,11 +230,14 @@ class MatchesController < ApplicationController
base_score = next_score
next_score += base_score
end
+
@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|
if @match.save
format.html { redirect_to tournament_match_path(@tournament, @match), notice: 'Scores Submitted' }