Skip to content

Commit

Permalink
Remove load_add_signup_topics()
Browse files Browse the repository at this point in the history
1. Because it doesn't provide any useful param for other methods
2. And it does nothing for add_signup_topics()
  • Loading branch information
weichic-ncsu committed Oct 22, 2022
1 parent 14059f8 commit e648df8
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions app/controllers/sign_up_sheet_controller.rb
Expand Up @@ -137,25 +137,9 @@ def load_all_selected_topics
# Contains links that let an admin or Instructor edit, delete, view enrolled/waitlisted members for each topic
# Also contains links to delete topics and modify the deadlines for individual topics. Staggered means that different topics can have different deadlines.
def add_signup_topics
load_add_signup_topics(params[:id])
SignUpSheet.add_signup_topic(params[:id])
end

# retrieves all the data associated with the given assignment. Includes all topics,
def load_add_signup_topics(assignment_id)
@id = assignment_id
@sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)
@slots_filled = SignUpTopic.find_slots_filled(assignment_id)
@slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)

@assignment = Assignment.find(assignment_id)
# ACS Removed the if condition (and corresponding else) which differentiate assignments as team and individual assignments
# to treat all assignments as team assignments
# Though called participants, @participants are actually records in signed_up_teams table, which
# is a mapping table between teams and topics (waitlisted recorded are also counted)
@participants = SignedUpTeam.find_team_participants(assignment_id, session[:ip])
end

def set_values_for_new_topic
@sign_up_topic = SignUpTopic.new
@sign_up_topic.topic_identifier = params[:topic][:topic_identifier]
Expand Down

0 comments on commit e648df8

Please sign in to comment.