<% # 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 . %>
  • <% recent_feedback ||= nil show_context ||= false comment = nil grade = nil score = nil cache(['recent_feedback_render3', @current_user&.course_nickname_hash, recent_feedback || 'blank_feedback', Time.zone.utc_offset].cache_key) do assignment = recent_feedback.assignment context = recent_feedback.assignment.context url = context_url(context, :context_assignment_submission_url, :assignment_id => recent_feedback.assignment_id, :id=>@current_user.id) grade = readable_grade(recent_feedback) score = recent_feedback.score comment = recent_feedback.last_teacher_comment comment_text = HtmlTextHelper.strip_and_truncate(comment.comment, :max_length => 120) if comment icon_explanation, _, icon_class = icon_data(:context => context, :current_user => @current_user, :recent_event => assignment, :submission => recent_feedback, :student_only => true) %>
    <% if comment && comment.media_comment? %> <% kaltura_thumbnail_url = CanvasKaltura::ClientV3.new.thumbnail_url(comment.media_comment_id, :width => 50, :height => 35, :bgcolor => "F3F4F5") %> <% end %> <%= recent_feedback.assignment.title %> <% if show_context %>

    <%= context.nickname_for(@current_user, :short_name) %>

    <% end %> <% if grade %>

    <%= grade %>

    <% end %> <% if comment_text %>

    "<%= comment_text %>"

    <% end %>
    <% end %>