%
# 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
<%= 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 %> | <% results = @results_for_outcome[outcome.id] || [] %>
<%= 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 %> |