diff --git a/app/controllers/signup_sheet_controller.rb b/app/controllers/signup_sheet_controller.rb index 1f4908378b7..66f8f9bc8ee 100644 --- a/app/controllers/signup_sheet_controller.rb +++ b/app/controllers/signup_sheet_controller.rb @@ -140,10 +140,10 @@ def add_signup_topics load_add_signup_topics(params[:id]) SignUpSheet.add_signup_topic(params[:id]) end - - def add_signup_topics_staggered - add_signup_topics - end + # Commented add_signup_topics_staggered because it was doing same thing as add_signup_topics. + #def add_signup_topics_staggered + # add_signup_topics + #end # retrieves all the data associated with the given assignment. Includes all topics, def load_add_signup_topics(assignment_id) @@ -174,7 +174,7 @@ def set_values_for_new_topic # staggered means that different topics can have different deadlines. def redirect_to_sign_up(assignment_id) assignment = Assignment.find(assignment_id) - assignment.staggered_deadline == true ? (redirect_to action: 'add_signup_topics_staggered', id: assignment_id) : (redirect_to action: 'add_signup_topics', id: assignment_id) + assignment.staggered_deadline == true ? (redirect_to action: 'add_signup_topics', id: assignment_id) : (redirect_to action: 'add_signup_topics', id: assignment_id) end # simple function that redirects to assignment->edit->topic panel to display /add_signup_topics or the /add_signup_topics_staggered page diff --git a/app/views/assignments/edit/_topics.html.erb b/app/views/assignments/edit/_topics.html.erb index 7626239c0be..d9abf5eb9c1 100644 --- a/app/views/assignments/edit/_topics.html.erb +++ b/app/views/assignments/edit/_topics.html.erb @@ -39,7 +39,7 @@ <%= label_tag('assignment_form[assignment][use_bookmark]', 'Allow participants to create bookmarks?') %>

<% if @assignment_form.assignment.staggered_deadline == true %> - <%= render partial: '/signup_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates} %> + <%= render partial: '/signup_sheet/add_signup_topics', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates} %> <% else %> <%= render '/signup_sheet/add_signup_topics' %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index 146ea8126df..34a642cba8c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -360,7 +360,7 @@ get :signup get :delete_signup get :add_signup_topics - get :add_signup_topics_staggered + #get :add_signup_topics_staggered get :delete_signup get :list get :signup_topics diff --git a/spec/controllers/signup_sheet_controller_spec.rb b/spec/controllers/signup_sheet_controller_spec.rb index cf5038c71ce..4770e4df395 100644 --- a/spec/controllers/signup_sheet_controller_spec.rb +++ b/spec/controllers/signup_sheet_controller_spec.rb @@ -94,7 +94,7 @@ end context 'when topic can be found' do - it 'updates the existing topic and redirects to signup_sheet#add_signup_topics_staggered page' do + it 'updates the existing topic and redirects to signup_sheet#add_signup_topics page' do allow(SignedUpTeam).to receive(:find_by).with(topic_id: 1).and_return(signed_up_team) allow(SignedUpTeam).to receive(:where).with(topic_id: 1, is_waitlisted: true).and_return([signed_up_team2]) allow(Team).to receive(:find).with(2).and_return(team) @@ -111,7 +111,7 @@ } post :create, params expect(SignedUpTeam.first.is_waitlisted).to be false - expect(response).to redirect_to('/signup_sheet/add_signup_topics_staggered?id=1') + expect(response).to redirect_to('/signup_sheet/add_signup_topics?id=1') end end end