Skip to content

Commit a36d570

Browse files
committed
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>
1 parent 2e59598 commit a36d570

12 files changed

Lines changed: 26 additions & 26 deletions

File tree

app/controllers/courses_controller.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,12 @@ def statistics
287287
end
288288
end
289289

290-
def course_details
290+
def settings
291291
get_context
292292
if authorized_action(@context, @current_user, :read_as_admin)
293293
@alerts = @context.alerts
294294
@role_types = []
295295
add_crumb(t('#crumbs.settings', "Settings"), named_context_url(@context, :context_details_url))
296-
render :action => :course_details
297296
end
298297
end
299298

@@ -327,7 +326,7 @@ def re_send_invitations
327326
e.re_send_confirmation! if e.invited?
328327
end
329328
respond_to do |format|
330-
format.html { redirect_to course_details_url }
329+
format.html { redirect_to course_settings_url }
331330
format.json { render :json => {:re_sent => true}.to_json }
332331
end
333332
end
@@ -582,7 +581,7 @@ def show
582581
@user_groups = @current_user.group_memberships_for(@context) if @current_user
583582
@unauthorized_user = @finished_enrollment.user rescue nil
584583
if !@context.grants_right?(@current_user, session, :read) && @context.grants_right?(@current_user, session, :read_as_admin)
585-
return redirect_to course_details_path(@context.id)
584+
return redirect_to course_settings_path(@context.id)
586585
end
587586
if authorized_action(@context, @current_user, :read)
588587

@@ -938,6 +937,6 @@ def reset_content
938937
get_context
939938
return unless authorized_action(@context, @current_user, :manage_content)
940939
@new_course = @context.reset_content
941-
redirect_to course_details_path(@new_course.id)
940+
redirect_to course_settings_path(@new_course.id)
942941
end
943942
end

app/controllers/sections_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ def create
2525
respond_to do |format|
2626
if @section.save
2727
flash[:notice] = t('section_created', "Section successfully created!")
28-
format.html { redirect_to course_details_url(@context) }
28+
format.html { redirect_to course_settings_url(@context) }
2929
format.json { render :json => @section.to_json }
3030
else
3131
flash[:error] = t('section_creation_failed', "Section creation failed")
32-
format.html { redirect_to course_details_url(@context) }
32+
format.html { redirect_to course_settings_url(@context) }
3333
format.json { render :json => @section.errors.to_json, :status => :bad_request }
3434
end
3535
end
@@ -125,7 +125,7 @@ def destroy
125125
if @section.enrollments.empty?
126126
@section.destroy
127127
flash[:notice] = t('section_deleted', "Course section successfully deleted!")
128-
format.html { redirect_to course_details_url(@context) }
128+
format.html { redirect_to course_settings_url(@context) }
129129
format.json { render :json => @section.to_json }
130130
else
131131
flash[:error] = t('section_delete_not_allowed', "You can't delete a section that has enrollments")

app/models/course.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ def self.default_tabs
21652165
{ :id => TAB_MODULES, :label => t('#tabs.modules', "Modules"), :css_class => 'modules', :href => :course_context_modules_path },
21662166
{ :id => TAB_CONFERENCES, :label => t('#tabs.conferences', "Conferences"), :css_class => 'conferences', :href => :course_conferences_path },
21672167
{ :id => TAB_COLLABORATIONS, :label => t('#tabs.collaborations', "Collaborations"), :css_class => 'collaborations', :href => :course_collaborations_path },
2168-
{ :id => TAB_SETTINGS, :label => t('#tabs.settings', "Settings"), :css_class => 'settings', :href => :course_details_path },
2168+
{ :id => TAB_SETTINGS, :label => t('#tabs.settings', "Settings"), :css_class => 'settings', :href => :course_settings_path },
21692169
]
21702170
end
21712171

app/views/accounts/_course.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<% end %>
2626
<div class="info">
2727
<span class="links">
28-
<%= link_to t(:settings_link, "Settings"), course_details_path(course ? course : "{{ id }}") %> |
28+
<%= link_to t(:settings_link, "Settings"), course_settings_path(course ? course : "{{ id }}") %> |
2929
<%= link_to t(:statistics_link, "Statistics"), course_statistics_path(course ? course : "{{ id }}") %> |
3030
<%= link_to t(:homepage_link, "Homepage"), course_path(course ? course : "{{ id }}") %>
3131
</span>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<%
22
content_for :page_title, join_title(t(:page_title, "Course Details"), @context.name)
3-
jammit_css :course_details
4-
jammit_js :course_details
3+
jammit_css :course_settings
4+
jammit_js :course_settings
55
@active_tab = "settings"
66

77
enrollment_hashes = {}

config/assets.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ javascripts:
107107
- public/javascripts/context_inbox.js
108108
context_modules:
109109
- public/javascripts/context_modules.js
110-
course_details:
110+
course_settings:
111111
- public/javascripts/jquery.cookie.js
112112
- public/javascripts/user_lists.js
113-
- public/javascripts/course_details.js
113+
- public/javascripts/course_settings.js
114114
- public/javascripts/external_tools.js
115115
- public/javascripts/grading_standards.js
116116
grading_standards:
@@ -305,8 +305,8 @@ stylesheets:
305305
- public/stylesheets/compiled/gradebook_uploads.css
306306
calendar:
307307
- public/stylesheets/static/calendar.css
308-
course_details:
309-
- public/stylesheets/compiled/course_details.css
308+
course_settings:
309+
- public/stylesheets/compiled/course_settings.css
310310
- public/stylesheets/compiled/external_tools.css
311311
- public/stylesheets/compiled/grading_standards.css
312312
full_files:

config/locales/es.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,7 @@ es:
22672267
all: Cualquiera
22682268
only_teachers: "Sólo Profesores"
22692269
teachers_students: "Profesor y Estudiantes"
2270-
course_details:
2270+
course_settings:
22712271
buttons:
22722272
add_section: "Agregar Sección"
22732273
adding_section: "Agregando Sección..."
@@ -2396,7 +2396,7 @@ es:
23962396
start_at: "Fecha de Inicio"
23972397
titles:
23982398
copy_course: "Copiar el Curso"
2399-
course_details:
2399+
course_settings:
24002400
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."
24012401
admin_invitation_unaccepted: "%{user} aún no ha aceptado la invitación para unirse al curso. La invitación fue enviada: %{time}"
24022402
buttons:

config/routes.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
end
9090
course.undelete_items 'undelete', :controller => 'context', :action => 'undelete_index'
9191
course.undelete_item 'undelete/:asset_string', :controller => 'context', :action => 'undelete_item'
92-
course.details 'details', :controller => 'courses', :action => 'course_details'
92+
course.settings 'settings', :controller => 'courses', :action => 'settings'
93+
course.details 'details', :controller => 'courses', :action => 'settings'
9394
course.re_send_invitations 're_send_invitations', :controller => 'courses', :action => 're_send_invitations', :conditions => {:method => :post}
9495
course.enroll_users 'enroll_users', :controller => 'courses', :action => 'enroll_users'
9596
course.link_enrollment 'link_enrollment', :controller => 'courses', :action => 'link_enrollment'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
I18n.scoped('course_details', function(I18n) {
19+
I18n.scoped('course_settings', function(I18n) {
2020
function checkup() {
2121
$.ajaxJSON($("#sis_publish_link").attr('href'), 'GET', {}, function(data) {
2222
if (!data.hasOwnProperty("sis_publish_status")) {

0 commit comments

Comments
 (0)