From 55f4c94d089ce622bd4fe0b4c915e8e4cb4122aa Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 28 Apr 2014 19:32:32 -0400 Subject: changes to peer review and manual sampling --- lib/sampling/manual.html.erb | 11 +++++------ lib/sampling/manual.rb | 2 +- lib/sampling/peer_review.html.erb | 2 +- lib/sampling/peer_review.rb | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/sampling/manual.html.erb b/lib/sampling/manual.html.erb index c9dd2fe..7b71c29 100644 --- a/lib/sampling/manual.html.erb +++ b/lib/sampling/manual.html.erb @@ -1,12 +1,11 @@ -<% if @tournament.hosts.include? current_user %> - +<% if @tournament.hosts.include? @current_user %> + <% @match.teams.each do |team| %> - <%= tag :input, {"type" => "radio", "name" => "winner", "value" => "#{team.id}" } %> + <%= "Team #{team.id} Won" %> <% end %> - - <%= submit_tag("Finish match") %> - <%= @tournament.settings['ScoringMethod'] %> +
+ <% else %>

The match is running; the host has yet to post the scores of the match.

<% end %> \ No newline at end of file diff --git a/lib/sampling/manual.rb b/lib/sampling/manual.rb index 1787cb7..4e86925 100644 --- a/lib/sampling/manual.rb +++ b/lib/sampling/manual.rb @@ -40,7 +40,7 @@ module Sampling erb_filename = File.join(__FILE__.sub(/\.rb$/, '.html.erb')) erb = ERB.new(File.read(erb_filename)) erb.filename = erb_filename - return erb.result.html_safe + return erb.result(binding).html_safe end def handle_user_interaction(user, sampling_params) diff --git a/lib/sampling/peer_review.html.erb b/lib/sampling/peer_review.html.erb index e744936..a0b9c4d 100644 --- a/lib/sampling/peer_review.html.erb +++ b/lib/sampling/peer_review.html.erb @@ -18,7 +18,7 @@ <%# TODO: display more statistics %> <% end %> - <%= submit_tag("Submit peer evaluation", :onsubmit => "score_peers()") %> + <% else %>

Still waiting for peer feedback from the following users: