<% # 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 . %> <% set_active_tab "question_banks" %> <% provide :page_title, t(:page_title, "Question Banks") %> <% css_bundle :quizzes %> <% js_bundle :question_banks %> <% provide :right_side do %> <% if [email protected]_a?(User) && @context.assessment_question_banks.temp_record.grants_right?(@current_user, session, :create) %> <% end %> <% if @current_user && @context != @current_user %> <%= t 'see_bookmarked_banks', 'View Bookmarked Banks' %> <% end %> <% end %>

<% case @context.class.to_s %> <% when 'Course' %> <%= t 'course_question_banks', "Course Question Banks" %> <% when 'User' %> <%= t 'user_question_banks', "User Question Banks" %> <% when 'Account' %> <%= t 'account_question_banks', "Account Question Banks" %> <% end %>

<% if @context != @current_user %> <%= render :partial => "question_bank" %> <%= form_for :assessment_question_bank, :url => "", :html => {:id => "edit_bank_form", :style => "display: none;"} do |f| %> <%= f.blabel :title, :en => "Bank Name" %> <%= f.text_field :title, :class => "bank_name_box" %> <% end %>
<% end %>
<%= render :partial => "question_bank", :collection => @question_banks %>