<% # Copyright (C) 2019 - 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 . %> <% add_crumb t(:eportfolio_moderation_crumb, "Eportfolio Moderation") %> <% set_active_tab "eportfolio_moderation" %> <% css_bundle :eportfolio_moderation %> <% provide :page_title do %> <%= t(:page_title, "Eportfolio Moderation") %> <% end %>

<%= t(:title, "Eportfolio Moderation") %>

<%= t("Deleting a user will destroy all of their ePortfolios. Alternatively, ePortfolios can be individually marked as 'spam' or 'safe' to modify their visibility.") %>

<%= t("Explanation of statuses:") %>

<%= will_paginate(@eportfolios) %> <% @eportfolios.group_by(&:user_id).values.each do |eportfolios_for_user| %> <% eportfolios_for_user.each_with_index do |eportfolio, index| %> <% if index == 0 %> <% user = eportfolios_for_user.first.user %> <% end %> <% display_status = case eportfolio.spam_status when "flagged_as_possible_spam" t("Needs review: flagged as possible spam") when "marked_as_spam" t("Marked as spam") when "marked_as_safe" t("Marked as safe") else t("Not reviewed") end eportfolio_name = eportfolio.name.presence || t("Untitled") path = if eportfolio.public? eportfolio_path(eportfolio) else eportfolio_path(eportfolio, verifier: eportfolio.uuid) end current_visibility = if eportfolio.flagged_as_possible_spam? t("Administrators and author only (flagged as possible spam)") elsif eportfolio.spam?(include_possible_spam: false) t("Administrators and author only (marked as spam)") elsif eportfolio.public? t("Everyone (public)") else t("Anyone with a direct link (private)") end %> <% end %> <% end %>
<%= t("Author") %> <%= t("Eportfolio") %> <%= t("Currently Visible To") %>
<%= link_to(user.short_name.truncate(30), user_path(user)) %> <%= link_to(eportfolio_name.truncate(30), path) %>
"><%= display_status %>
<%= current_visibility %>