From 7efe78c83a16b4f985982d658ae588ba46053c5b Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 24 May 2019 15:42:24 +0800 Subject: [PATCH 1/2] fix copy ec year --- app/services/copy_ec_year_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/copy_ec_year_service.rb b/app/services/copy_ec_year_service.rb index 83073d53..7ad46c5f 100644 --- a/app/services/copy_ec_year_service.rb +++ b/app/services/copy_ec_year_service.rb @@ -197,7 +197,7 @@ def copy_graduation_subitem_course_targets!(target, to_target) target.ec_graduation_subitem_course_targets.each do |support| to_support = to_target.ec_graduation_subitem_course_targets.new - to_support.attributes = support.attributes.except('id', 'ec_graduation_subitem_id', 'created_at', 'updated_at') + to_support.attributes = support.attributes.except('id', 'ec_course_target_id', 'ec_graduation_subitem_id', 'created_at', 'updated_at') to_support.ec_graduation_subitem_id = graduation_subitem_map[support.ec_graduation_subitem_id] to_support.save! end From 9d00433565a526e4fca2a647d1d2ef8b271fffad Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 24 May 2019 15:51:00 +0800 Subject: [PATCH 2/2] add students_url to get nav api --- app/controllers/ec_major_schools_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/ec_major_schools_controller.rb b/app/controllers/ec_major_schools_controller.rb index 236f57d5..c47899f6 100644 --- a/app/controllers/ec_major_schools_controller.rb +++ b/app/controllers/ec_major_schools_controller.rb @@ -122,6 +122,7 @@ class EcMajorSchoolsController < ApplicationController requirement_vs_objective_url: "#{requirement_vs_objective_ec_major_school_ec_year_path(@year, :ec_major_school_id => @year.ec_major_school_id)}", requirement_vs_standard: "#{requirement_vs_standard_ec_major_school_ec_year_path(@year, :ec_major_school_id => @year.ec_major_school_id)}", requirement_vs_courses: "#{requirement_vs_courses_ec_major_school_ec_year_path(@year, :ec_major_school_id => @year.ec_major_school_id)}", + students_url: student_lists_ec_major_schools_ec_years_path(@year, ec_major_school_id: @year.ec_major_school_id), go_back_url: ec_major_school_path(major), ec_course_support_setting_url: ec_course_support_setting_url, ec_course_reach_setting_url: ec_course_reach_setting_url,