|
|
@ -101,6 +101,16 @@ class EcCoursesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def ec_course_support_setting_data
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
|
|
|
format.json {
|
|
|
|
|
|
|
|
course_targets = @ec_course.ec_course_targets.includes(:ec_graduation_subitems)
|
|
|
|
|
|
|
|
json_data = target_list_data(course_targets)
|
|
|
|
|
|
|
|
render :json => json_data
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# 课程目标配置的更新操作()
|
|
|
|
# 课程目标配置的更新操作()
|
|
|
|
# /ec_courses/1/crud_targets
|
|
|
|
# /ec_courses/1/crud_targets
|
|
|
|
def crud_targets
|
|
|
|
def crud_targets
|
|
|
@ -432,8 +442,26 @@ class EcCoursesController < ApplicationController
|
|
|
|
{score: 70, level: "中"},
|
|
|
|
{score: 70, level: "中"},
|
|
|
|
{score: 60, level: "差"}]
|
|
|
|
{score: 60, level: "差"}]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
Rails.logger.info("222222222222222222222template_major: #{@template_major}")
|
|
|
|
render :json => {levels: ls, is_manager: @is_manager}
|
|
|
|
Rails.logger.info("2222222222222222222222222is_manager: #{@is_manager}")
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def score_level_data
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
|
|
|
format.json{
|
|
|
|
|
|
|
|
levels = @ec_course.ec_score_levels
|
|
|
|
|
|
|
|
ls = []
|
|
|
|
|
|
|
|
if levels.present?
|
|
|
|
|
|
|
|
levels.each do |l|
|
|
|
|
|
|
|
|
ls << {score: l.score, level: l.level}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
ls = [{score: 90, level: "优"},
|
|
|
|
|
|
|
|
{score: 80, level: "良"},
|
|
|
|
|
|
|
|
{score: 70, level: "中"},
|
|
|
|
|
|
|
|
{score: 60, level: "差"}]
|
|
|
|
|
|
|
|
end
|
|
|
|
render :json => {levels: ls, is_manager: @is_manager}
|
|
|
|
render :json => {levels: ls, is_manager: @is_manager}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -600,6 +628,7 @@ class EcCoursesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rails.logger.info("111111111111111user_id: #{User.current.try(:id)}")
|
|
|
|
Rails.logger.info("template_major: #{@template_major}")
|
|
|
|
Rails.logger.info("template_major: #{@template_major}")
|
|
|
|
Rails.logger.info("is_manager: #{@is_manager}")
|
|
|
|
Rails.logger.info("is_manager: #{@is_manager}")
|
|
|
|
|
|
|
|
|
|
|
|