dev_SaaS
hjm 6 years ago
commit f01796beb5

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

Loading…
Cancel
Save