Skip to content

Commit

Permalink
Remove code for deprecated V1 profile
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsoble committed Apr 5, 2016
1 parent 4ced1dd commit 6506eb5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 201 deletions.
35 changes: 2 additions & 33 deletions app/controllers/students_controller.rb
Expand Up @@ -36,37 +36,6 @@ def profile
}
end

def deprecated_v1_profile
@student = Student.find(params[:id]).decorate
@chart_start = params[:chart_start] || "mcas-growth"
@chart_data = StudentProfileChart.new(@student).chart_data

@student_risk_level = @student.student_risk_level.decorate

@student_school_years = @student.student_school_years.includes(
:discipline_incidents,
:student_assessments,
:interventions
)

interventions = @student.interventions.order(start_date: :desc)
@serialized_interventions = interventions.map { |intervention| serialize_intervention(intervention) }

student_notes = @student.student_notes
@serialized_student_notes = student_notes.map { |note| serialize_student_note(note) }

@roster_url = homeroom_path(@student.homeroom)
@csv_url = deprecated_v1_profile_student_path(@student) + ".csv"

respond_to do |format|
format.html
format.csv {
render csv: StudentProfileCsvExporter.new(@student).profile_csv_export,
filename: 'export'
}
end
end

def sped_referral
@student = Student.find(params[:id])
respond_to do |format|
Expand Down Expand Up @@ -151,7 +120,7 @@ def search_and_score(query, students)
# range: [0.0, 1.0]
def calculate_student_score(student, search_tokens)
student_tokens = [student.first_name, student.last_name].compact

search_token_scores = []
search_tokens.each do |search_token|
student_tokens.each do |student_token|
Expand All @@ -161,7 +130,7 @@ def calculate_student_score(student, search_tokens)
end
end
end

(search_token_scores.sum.to_f / search_tokens.length)
end

Expand Down
167 changes: 0 additions & 167 deletions app/views/students/deprecated_v1_profile.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion config/routes.rb
Expand Up @@ -16,7 +16,6 @@
resources :students, only: [:show] do
member do
get :profile
get :deprecated_v1_profile
get :sped_referral
post :event_note
post :service
Expand Down

0 comments on commit 6506eb5

Please sign in to comment.