|
|
@ -448,23 +448,19 @@ class EcCoursesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def score_level_data
|
|
|
|
def score_level_data
|
|
|
|
respond_to do |format|
|
|
|
|
levels = @ec_course.ec_score_levels
|
|
|
|
format.json{
|
|
|
|
ls = []
|
|
|
|
levels = @ec_course.ec_score_levels
|
|
|
|
if levels.present?
|
|
|
|
ls = []
|
|
|
|
levels.each do |l|
|
|
|
|
if levels.present?
|
|
|
|
ls << {score: l.score, level: l.level}
|
|
|
|
levels.each do |l|
|
|
|
|
end
|
|
|
|
ls << {score: l.score, level: l.level}
|
|
|
|
else
|
|
|
|
end
|
|
|
|
ls = [{score: 90, level: "优"},
|
|
|
|
else
|
|
|
|
{score: 80, level: "良"},
|
|
|
|
ls = [{score: 90, level: "优"},
|
|
|
|
{score: 70, level: "中"},
|
|
|
|
{score: 80, level: "良"},
|
|
|
|
{score: 60, level: "差"}]
|
|
|
|
{score: 70, level: "中"},
|
|
|
|
|
|
|
|
{score: 60, level: "差"}]
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
render :json => {levels: ls, is_manager: @is_manager}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
render :json => {levels: ls, is_manager: @is_manager}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def crud_score_level
|
|
|
|
def crud_score_level
|
|
|
|