<commit_before><%
# 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 <http://www.gnu.org/licenses/>.
%>

<% content_for :page_title, t(:page_title, "Rubrics") %>
<% add_crumb t('#crumbs.rubrics', "Rubrics") %>
<% content_for :right_side do %>
  <a href="<%= context_url(@context, :context_rubrics_url) %>" class="btn button-sidebar-wide add_rubric_link">
    <i class="icon-add"></i>
    <%= t('buttons.add_rubric', 'Add Rubric') %>
  </a>
<% end %>

<% js_bundle :edit_rubric %>
<% css_bundle :learning_outcomes %>
<% css_bundle :proficiency_table %>
<% content_for :stylesheets do %>
  <style>
    #rubrics .find_rubric_link {
      display: none;
    }
  </style>
<% end %>
<% js_bundle 'legacy/rubrics_index' %>
<h1>
  <% case @context.class.to_s %>
    <% when 'Course' %>
      <%= t 'course_rubrics', "Course Rubrics" %>
    <% when 'User' %>
      <%= t 'user_rubrics', "User Rubrics" %>
    <% when 'Account' %>
      <%= t 'account_rubrics', "Account Rubrics" %>
  <% end %>
</h1>
<a href="<%= context_url(@context, :context_rubrics_url) %>" id="add_rubric_url" style="display: none;">&nbsp;</a>
<% if @context.class.to_s == 'Account' %>
<div id="rubric_management"></div>
<% end %>
<div id="rubrics" class="raw_listing">
  <ul>
  <% @rubric_associations.each do |association| %>
    <% rubric = association.rubric %>
    <li>
      <a href="<%= context_url(@context, :context_rubric_url, association.rubric_id) %>" class="title"><%= rubric.title %></a>
      <span class="links">
        <% if can_do(rubric, @current_user, :update) %>
          <a href="<%= context_url(@context, :context_rubric_url, association.rubric_id) %>#edit" class="hide-till-hover" aria-label="<%= t('edit_rubric', 'Edit Rubric') %>" title="<%= t('edit_rubric', 'Edit Rubric') %>"><i class="icon-edit standalone-icon"></i></a>
        <% end %>
        <% if can_do(association, @current_user, :delete) %>
          <a href="<%= context_url(@context, :context_rubric_url, rubric.id) %>" class="delete_rubric_link hide-till-hover" title="<%= t('delete_rubric', 'Delete Rubric') %>" aria-label="<%= t('delete_rubric', 'Delete Rubric') %>"><i class="icon-end standalone-icon"></i></a>
        <% end %>
      </span>
      <span class="details"><commit_msg>fix edit and delete icons not specifying rubric for SR users<commit_after><%
# 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 <http://www.gnu.org/licenses/>.
%>

<% content_for :page_title, t(:page_title, "Rubrics") %>
<% add_crumb t('#crumbs.rubrics', "Rubrics") %>
<% content_for :right_side do %>
  <a href="<%= context_url(@context, :context_rubrics_url) %>" class="btn button-sidebar-wide add_rubric_link">
    <i class="icon-add"></i>
    <%= t('buttons.add_rubric', 'Add Rubric') %>
  </a>
<% end %>

<% js_bundle :edit_rubric %>
<% css_bundle :learning_outcomes %>
<% css_bundle :proficiency_table %>
<% content_for :stylesheets do %>
  <style>
    #rubrics .find_rubric_link {
      display: none;
    }
  </style>
<% end %>
<% js_bundle 'legacy/rubrics_index' %>
<h1>
  <% case @context.class.to_s %>
    <% when 'Course' %>
      <%= t 'course_rubrics', "Course Rubrics" %>
    <% when 'User' %>
      <%= t 'user_rubrics', "User Rubrics" %>
    <% when 'Account' %>
      <%= t 'account_rubrics', "Account Rubrics" %>
  <% end %>
</h1>
<a href="<%= context_url(@context, :context_rubrics_url) %>" id="add_rubric_url" style="display: none;">&nbsp;</a>
<% if @context.class.to_s == 'Account' %>
<div id="rubric_management"></div>
<% end %>
<div id="rubrics" class="raw_listing">
  <ul>
  <% @rubric_associations.each do |association| %>
    <% rubric = association.rubric %>
    <li>
      <a href="<%= context_url(@context, :context_rubric_url, association.rubric_id) %>" class="title"><%= rubric.title %></a>
      <span class="links">
        <% if can_do(rubric, @current_user, :update) %>
          <a href="<%= context_url(@context, :context_rubric_url, association.rubric_id) %>#edit" class="hide-till-hover" title="<%= t('Edit Rubric: %{title}', title: rubric.title) %>" aria-label="<%= t('Edit Rubric: %{title}', title: rubric.title) %>"><i class="icon-edit standalone-icon"></i></a>
        <% end %>
        <% if can_do(association, @current_user, :delete) %>
          <a href="<%= context_url(@context, :context_rubric_url, rubric.id) %>" class="delete_rubric_link hide-till-hover" title="<%= t('Delete Rubric: %{title}', title: rubric.title) %>" aria-label="<%= t('Delete Rubric: %{title}', title: rubric.title) %>"><i class="icon-end standalone-icon"></i></a>
        <% end %>
      </span>
      <span class="details">
{'fraction_non_alphanumeric': 0.18037043448156484, 'fraction_numerical': 0.0024234031504240957, 'mean_word_length': 4.238440616500453, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 137, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4716763', 'n_tokens_mistral': 2077, 'n_tokens_neox': 1914, 'n_words': 521}