<% # Copyright (C) 2011 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <% provide :right_side do %>
<% chain = (@context.account_chain rescue [@domain_root_account]).select{|a| can_do(a, @current_user, :manage) }; %> <% if !chain.empty? %> <%= before_label :see_results, "See %{user_name}'s results for", :user_name => @user.short_name %> <% end %>
<%= t "#buttons.show_all_artifacts", "Show All Artifacts" %>
<% end %> <% js_bundle 'legacy/user_outcome_results' %>

<%= t :outcomes_for, "Outcomes for %{user_name}", :user_name => @user.name %>

<% @outcomes.each do |outcome| %> <% results = @results_for_outcome[outcome.id] || [] %> <% unless results.empty? %> <% end %> <% end %>
<%= t "short_title.outcome", "Outcome" %> <%= t "short_title.attempts", "Attempts" %> <%= t "short_title.latest_score", "Latest Score" %> <%= t "short_title.average_percent", "Avg Percent" %>
<%= outcome.short_description %> <%= t :attempts_from_artifacts, "%{attempts} *from %{artifacts}*", :wrapper => '
\1
', :attempts => t(:attempts, "attempt", :count => results.map{|r| [1, r.attempt || 0].max }.sum), :artifacts => t(:artifacts, "artifact", :count => results.length) %>
"> <% if results.empty? %> - <% else %> <% if results[-1].possible %> <%= t :score_out_of_possible, "%{score}* out of %{possible}*", :score => results[-1].score, :possible => results[-1].possible, :wrapper => '\1' %> <% else %> <%= results[-1].score %> <% end %> <% end %> <% results_with_percent = results.select { |r| r.percent.present? } if results_with_percent.empty? %> - <% else %> <%= results_with_percent.map(&:percent).sum.to_f * 100.0 / results.length.to_f %>% <% end %>
<%= render :partial => "shared/rubric_criterion_dialog" %>