dev_SaaS
hjm 6 years ago
commit f01796beb5

@ -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

Loading…
Cancel
Save