%
# 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 .
%>
<%
css_bundle :learning_outcomes
js_bundle :react_outcome_alignment
provide :page_title, @outcome.short_description
%>
<% provide :right_side do %>
<% end %>
<%= t "#titles.aligned_items", "Aligned Items" %>
<%= t(:no_aligned_items, "No aligned items") if @alignments.empty? %>
<% @alignments.each do |alignment| %>
<%= render :partial => "outcome_alignment", :object => alignment %>
<% end %>
<%= t("#titles.outcome_artifacts", "Outcome Artifacts") %>
<%= t(:no_artifacts, "No artifacts") if @results.empty? %>
<% @results.each do |result| %>
<%#
There are a few old LearningOutcomeResults that have a nil artifact, and
many that have a Submission as an artifact. We want to get rid of these
because they come from bad data, and step 1 toward that goal is to stop
creating them and hide them in the UI.
The LORs with a nil artifact are very old and I believe came from a very
early incarnation of outcomes. The LORs with a Submission as an artifact
came from a combination of two code problems. The first was old code
that allowed an assignment that was aligned with an outcome but did not
have a rubric to create LORs directly based on it's submission. The
second was a bug that prevented the assignment <-> outcome link from
being destroyed when a rubric with an outcome was removed from an
assignment.
%>
<% if result.artifact_type.present? && result.artifact_type != 'Submission' %>
<%= render :partial => "outcome_result", :object => result %>
<% end %>
<% end %>
<%= will_paginate(@results) %>
<%= @results.total_pages %>
<%= render :partial => "outcome_result" %>
<%= render :partial => "outcome_alignment" %>