dev_ec
p31729568 5 years ago
parent 2b01e941d3
commit cc7b52e345

@ -7,7 +7,7 @@ class Ecs::EvaluationsController < Ecs::CourseBaseController
course_achievement: service.course_achievement,
course_rate: service.course_rate,
graduation_subitem_evaluations: service.graduation_subitem_evaluations,
score_levels_map: service.score_levels_map
score_levels: service.score_levels
)
end

@ -65,10 +65,10 @@ class Ecs::QueryCourseEvaluationService < ApplicationService
end
end
def score_levels_map
@_score_levels_map ||= begin
def score_levels
@_score_levels ||= begin
index = 0
ec_course.ec_score_levels.each_with_object({}) do |level, obj|
ec_course.ec_score_levels.map do |level|
hash = level.as_json(only: %i[id position score level])
hash[:description] =
@ -79,7 +79,7 @@ class Ecs::QueryCourseEvaluationService < ApplicationService
end
index += 1
obj[level.id.to_s] = hash
hash
end
end
end

Loading…
Cancel
Save