class Ecs::EvaluationsController < Ecs::CourseBaseController
  def show
    service = Ecs::QueryCourseEvaluationService.new(current_course)

    render_ok(
      course_targets: service.course_targets,
      course_achievement: service.course_achievement,
      graduation_subitem_evaluations: service.graduation_subitem_evaluations,
      score_levels_map: service.score_levels_map
    )
  end

  def create
    Ecs::CalculateCourseEvaluationService.call(current_course)
    render_ok
  end
end