%
# 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 .
%>
<%
item = deleted_item
url_asset_string = item.asset_string
# This is pretty hacky, but the controller expects an asset string that it
# can split into a scope and an id, and it expects the scope to be a method
# it can call on the context (in this case a course). I'm fixing it here so
# we don't have a colon in the url. See ContextController#undelete
url_asset_string = url_asset_string.gsub('quizzes:', '')
%>
<% if item.is_a?(Enrollment) %>
<%= item.short_name %> - <%= item.user.name %>
<% elsif item.respond_to?(:name) %>
<%= item.name %>
<% elsif item.respond_to?(:title) %>
<%= item.title %>
<% else %>
<%= item.class.to_s %>:<%= item.id %>
<% end %>
<%= item.class.to_s %>
<% if item.respond_to?(:description) %>
<%= HtmlTextHelper.strip_and_truncate(item.description, :max_length => 200) %>
<% elsif item.respond_to?(:message) %>
<%= HtmlTextHelper.strip_and_truncate(item.message, :max_length => 200) %>
<% end %>
<%= t('created', %{created}) %> |
<%= datetime_string(item.created_at) %> |
<%= t('last_updated', %{last updated}) %> |
<%= datetime_string(item.updated_at) %> |