<% # Copyright (C) 2012 - 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 . %>
<% if @fixed_warnings.present? %> <% @fixed_warnings.each_with_index do |warning, index| %> <% end %> <% end %> <% if @current_user && @real_current_user && @real_current_user != @current_user %> <% if @current_user.fake_student? %>
<% student_view_course = @current_user.all_courses.first %>
<%= t('student_view.warning_title', "You are currently logged into Student View") %>
<%= t('student_view.reset_explanation', "Resetting the test student will clear all history for this student, allowing you to view the course as a brand new student.") %>
<%= link_to t('student_view.reset', "Reset Student"), course_test_student_path(student_view_course), 'data-method' => :delete, :rel => 'nofollow', :class => 'Button reset_test_student'%> <%= link_to t('student_view.leave', "Leave Student View"), course_student_view_path(student_view_course), 'data-method' => :delete, :rel => 'nofollow', :class => 'Button leave_student_view'%>
<% else %>
<% if service_enabled?(:avatars) %>
<%= avatar(@current_user, url: nil) %>
<% end %>
<%= t("You are currently acting as %{user_name}", :user_name => @current_user.short_name) %>
<%= link_to t("Stop Acting as User"), user_masquerade_url(@real_current_user.id), 'data-method' => :post, :rel => 'nofollow', :class => 'Button stop_masquerading' %>
<% end %> <% end %>