s/course_details/settings/g closes #5458
leave the old route in as well Change-Id: Ifdbc4bdf9d23d866d941fac0b33cff456514e89f Reviewed-on: https://gerrit.instructure.com/5345 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
parent
2e59598df9
commit
a36d570b37
|
@ -287,13 +287,12 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def course_details
|
||||
def settings
|
||||
get_context
|
||||
if authorized_action(@context, @current_user, :read_as_admin)
|
||||
@alerts = @context.alerts
|
||||
@role_types = []
|
||||
add_crumb(t('#crumbs.settings', "Settings"), named_context_url(@context, :context_details_url))
|
||||
render :action => :course_details
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -327,7 +326,7 @@ class CoursesController < ApplicationController
|
|||
e.re_send_confirmation! if e.invited?
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html { redirect_to course_details_url }
|
||||
format.html { redirect_to course_settings_url }
|
||||
format.json { render :json => {:re_sent => true}.to_json }
|
||||
end
|
||||
end
|
||||
|
@ -582,7 +581,7 @@ class CoursesController < ApplicationController
|
|||
@user_groups = @current_user.group_memberships_for(@context) if @current_user
|
||||
@unauthorized_user = @finished_enrollment.user rescue nil
|
||||
if !@context.grants_right?(@current_user, session, :read) && @context.grants_right?(@current_user, session, :read_as_admin)
|
||||
return redirect_to course_details_path(@context.id)
|
||||
return redirect_to course_settings_path(@context.id)
|
||||
end
|
||||
if authorized_action(@context, @current_user, :read)
|
||||
|
||||
|
@ -938,6 +937,6 @@ class CoursesController < ApplicationController
|
|||
get_context
|
||||
return unless authorized_action(@context, @current_user, :manage_content)
|
||||
@new_course = @context.reset_content
|
||||
redirect_to course_details_path(@new_course.id)
|
||||
redirect_to course_settings_path(@new_course.id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,11 +25,11 @@ class SectionsController < ApplicationController
|
|||
respond_to do |format|
|
||||
if @section.save
|
||||
flash[:notice] = t('section_created', "Section successfully created!")
|
||||
format.html { redirect_to course_details_url(@context) }
|
||||
format.html { redirect_to course_settings_url(@context) }
|
||||
format.json { render :json => @section.to_json }
|
||||
else
|
||||
flash[:error] = t('section_creation_failed', "Section creation failed")
|
||||
format.html { redirect_to course_details_url(@context) }
|
||||
format.html { redirect_to course_settings_url(@context) }
|
||||
format.json { render :json => @section.errors.to_json, :status => :bad_request }
|
||||
end
|
||||
end
|
||||
|
@ -125,7 +125,7 @@ class SectionsController < ApplicationController
|
|||
if @section.enrollments.empty?
|
||||
@section.destroy
|
||||
flash[:notice] = t('section_deleted', "Course section successfully deleted!")
|
||||
format.html { redirect_to course_details_url(@context) }
|
||||
format.html { redirect_to course_settings_url(@context) }
|
||||
format.json { render :json => @section.to_json }
|
||||
else
|
||||
flash[:error] = t('section_delete_not_allowed', "You can't delete a section that has enrollments")
|
||||
|
|
|
@ -2165,7 +2165,7 @@ class Course < ActiveRecord::Base
|
|||
{ :id => TAB_MODULES, :label => t('#tabs.modules', "Modules"), :css_class => 'modules', :href => :course_context_modules_path },
|
||||
{ :id => TAB_CONFERENCES, :label => t('#tabs.conferences', "Conferences"), :css_class => 'conferences', :href => :course_conferences_path },
|
||||
{ :id => TAB_COLLABORATIONS, :label => t('#tabs.collaborations', "Collaborations"), :css_class => 'collaborations', :href => :course_collaborations_path },
|
||||
{ :id => TAB_SETTINGS, :label => t('#tabs.settings', "Settings"), :css_class => 'settings', :href => :course_details_path },
|
||||
{ :id => TAB_SETTINGS, :label => t('#tabs.settings', "Settings"), :css_class => 'settings', :href => :course_settings_path },
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<% end %>
|
||||
<div class="info">
|
||||
<span class="links">
|
||||
<%= link_to t(:settings_link, "Settings"), course_details_path(course ? course : "{{ id }}") %> |
|
||||
<%= link_to t(:settings_link, "Settings"), course_settings_path(course ? course : "{{ id }}") %> |
|
||||
<%= link_to t(:statistics_link, "Statistics"), course_statistics_path(course ? course : "{{ id }}") %> |
|
||||
<%= link_to t(:homepage_link, "Homepage"), course_path(course ? course : "{{ id }}") %>
|
||||
</span>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%
|
||||
content_for :page_title, join_title(t(:page_title, "Course Details"), @context.name)
|
||||
jammit_css :course_details
|
||||
jammit_js :course_details
|
||||
jammit_css :course_settings
|
||||
jammit_js :course_settings
|
||||
@active_tab = "settings"
|
||||
|
||||
enrollment_hashes = {}
|
|
@ -107,10 +107,10 @@ javascripts:
|
|||
- public/javascripts/context_inbox.js
|
||||
context_modules:
|
||||
- public/javascripts/context_modules.js
|
||||
course_details:
|
||||
course_settings:
|
||||
- public/javascripts/jquery.cookie.js
|
||||
- public/javascripts/user_lists.js
|
||||
- public/javascripts/course_details.js
|
||||
- public/javascripts/course_settings.js
|
||||
- public/javascripts/external_tools.js
|
||||
- public/javascripts/grading_standards.js
|
||||
grading_standards:
|
||||
|
@ -305,8 +305,8 @@ stylesheets:
|
|||
- public/stylesheets/compiled/gradebook_uploads.css
|
||||
calendar:
|
||||
- public/stylesheets/static/calendar.css
|
||||
course_details:
|
||||
- public/stylesheets/compiled/course_details.css
|
||||
course_settings:
|
||||
- public/stylesheets/compiled/course_settings.css
|
||||
- public/stylesheets/compiled/external_tools.css
|
||||
- public/stylesheets/compiled/grading_standards.css
|
||||
full_files:
|
||||
|
|
|
@ -2267,7 +2267,7 @@ es:
|
|||
all: Cualquiera
|
||||
only_teachers: "Sólo Profesores"
|
||||
teachers_students: "Profesor y Estudiantes"
|
||||
course_details:
|
||||
course_settings:
|
||||
buttons:
|
||||
add_section: "Agregar Sección"
|
||||
adding_section: "Agregando Sección..."
|
||||
|
@ -2396,7 +2396,7 @@ es:
|
|||
start_at: "Fecha de Inicio"
|
||||
titles:
|
||||
copy_course: "Copiar el Curso"
|
||||
course_details:
|
||||
course_settings:
|
||||
accepted_invitation: "%{user} ya ha recibido y aceptado la invitación a unirse al curso, pero todavía puede reenviar la invitación si la necesitan."
|
||||
admin_invitation_unaccepted: "%{user} aún no ha aceptado la invitación para unirse al curso. La invitación fue enviada: %{time}"
|
||||
buttons:
|
||||
|
|
|
@ -89,7 +89,8 @@ ActionController::Routing::Routes.draw do |map|
|
|||
end
|
||||
course.undelete_items 'undelete', :controller => 'context', :action => 'undelete_index'
|
||||
course.undelete_item 'undelete/:asset_string', :controller => 'context', :action => 'undelete_item'
|
||||
course.details 'details', :controller => 'courses', :action => 'course_details'
|
||||
course.settings 'settings', :controller => 'courses', :action => 'settings'
|
||||
course.details 'details', :controller => 'courses', :action => 'settings'
|
||||
course.re_send_invitations 're_send_invitations', :controller => 'courses', :action => 're_send_invitations', :conditions => {:method => :post}
|
||||
course.enroll_users 'enroll_users', :controller => 'courses', :action => 'enroll_users'
|
||||
course.link_enrollment 'link_enrollment', :controller => 'courses', :action => 'link_enrollment'
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
I18n.scoped('course_details', function(I18n) {
|
||||
I18n.scoped('course_settings', function(I18n) {
|
||||
function checkup() {
|
||||
$.ajaxJSON($("#sis_publish_link").attr('href'), 'GET', {}, function(data) {
|
||||
if (!data.hasOwnProperty("sis_publish_status")) {
|
|
@ -37,24 +37,24 @@ describe CoursesController do
|
|||
end
|
||||
end
|
||||
|
||||
describe "GET 'course_details'" do
|
||||
describe "GET 'settings'" do
|
||||
it "should require authorization" do
|
||||
course_with_teacher(:active_all => true)
|
||||
get 'course_details', :course_id => @course.id
|
||||
get 'settings', :course_id => @course.id
|
||||
assert_unauthorized
|
||||
end
|
||||
|
||||
it "should should not allow students" do
|
||||
course_with_student_logged_in(:active_all => true)
|
||||
get 'course_details', :course_id => @course.id
|
||||
get 'settings', :course_id => @course.id
|
||||
assert_unauthorized
|
||||
end
|
||||
|
||||
it "should render properly" do
|
||||
course_with_teacher_logged_in(:active_all => true)
|
||||
get 'course_details', :course_id => @course.id
|
||||
get 'settings', :course_id => @course.id
|
||||
response.should be_success
|
||||
response.should render_template("course_details")
|
||||
response.should render_template("settings")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../views_helper')
|
||||
|
||||
describe "courses/course_details.html.erb" do
|
||||
describe "courses/settings.html.erb" do
|
||||
describe "sis_source_id edit box" do
|
||||
before do
|
||||
course_with_teacher(:active_all => true)
|
Loading…
Reference in New Issue