|
|
|
@ -448,23 +448,19 @@ class EcCoursesController < ApplicationController
|
|
|
|
|
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}
|
|
|
|
|
}
|
|
|
|
|
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}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def crud_score_level
|
|
|
|
|