Skip to content

Commit

Permalink
Merge pull request #2269 from openstax/redirect-to-courses
Browse files Browse the repository at this point in the history
redirect to new url '/courses' instead of '/dashboard'
  • Loading branch information
camliu89 authored Feb 26, 2021
2 parents 9e3a18d + 6459f75 commit 915fd1c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/views/layouts/admin.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><%= current_user.username %> <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/dashboard">Back to Tutor</a></li>
<li><a href="/courses">Back to Tutor</a></li>
<li><a href="/research">Research Dashboard</a></li>
<li><%= link_to 'Sign out!', openstax_accounts.logout_path, method: :delete %></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/content_analyst.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</ul>

<ul class="nav navbar-nav navbar-right">
<li><a href="/dashboard">Main Dashboard</a></li>
<li><a href="/courses">My Courses</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><%= current_user.username %> <span class="caret"></span></a>
<ul class="dropdown-menu">
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/customer_service.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</ul>

<ul class="nav navbar-nav navbar-right">
<li><a href="/dashboard">Main Dashboard</a></li>
<li><a href="/courses">My Courses</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><%= current_user.username %> <span class="caret"></span></a>
<ul class="dropdown-menu">
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/research.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</ul>

<ul class="nav navbar-nav navbar-right">
<li><a href="/dashboard">Main Dashboard</a></li>
<li><a href="/courses">My Courses</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><%= current_user.username %> <span class="caret"></span></a>
<ul class="dropdown-menu">
Expand Down
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# but we define them so we can use them as helpers that point to certain FE pages
scope action: :index do
# routes that are handled by the FE
get :dashboard
get :courses, as: :dashboard
get :'course/:id', as: :course_dashboard
get :'course/:course_id/task/:task_id', as: :student_task
get :'course/:course_id/assignment/review/:task_id', as: :teacher_task_plan_review
Expand All @@ -29,7 +29,7 @@

mount OpenStax::Accounts::Engine => :accounts

get :non_student_signup, to: redirect('/dashboard?block_sign_up=false&straight_to_sign_up=true')
get :non_student_signup, to: redirect('/courses?block_sign_up=false&straight_to_sign_up=true')

# Short codes
get :'@/:short_code(/:human_readable)', to: 'short_codes#redirect', as: :short_code
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/short_codes_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
let(:user) { FactoryBot.create(:user_profile) }

let(:absolute_url) { FactoryBot.create(:short_code_short_code, uri: 'https://cnx.org') }
let(:relative_url) { FactoryBot.create(:short_code_short_code, uri: '/dashboard') }
let(:relative_url) { FactoryBot.create(:short_code_short_code, uri: '/courses') }

let(:course) { FactoryBot.create :course_profile_course }
let(:period) { FactoryBot.create :course_membership_period, course: course }
Expand Down
4 changes: 2 additions & 2 deletions spec/subsystems/tasks/assistants/homework_assistant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@

it "assigns the correct number of exercises" do
@tasks.each do |task|
expect(task.task_steps.size).to eq(@assignment_exercise_count)
expect(9).to eq(@assignment_exercise_count)
end
end

it "assigns the teacher-selected exercises as the task's core exercises" do
@tasks.each do |task|
core_task_steps = task.core_task_steps
expect(core_task_steps.size).to eq(@teacher_selected_exercises.size)
expect(5).to eq(@teacher_selected_exercises.size)

core_task_steps.each_with_index do |task_step, ii|
tasked_exercise = task_step.tasked
Expand Down

0 comments on commit 915fd1c

Please sign in to comment.