Skip to content

Commit

Permalink
move one helper closer to where it is used
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsbailey committed May 9, 2024
1 parent c1a53a3 commit 7cf5ff8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dashboard/app/jobs/evaluate_rubric_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,12 @@ def perform(user_id:, requester_id:, script_level_id:, rubric_ai_evaluation_id:
end
end

private def confidence_s_to_i(confidence_level)
confidence_levels = LearningGoalAiEvaluation::AI_CONFIDENCE_LEVELS.keys.map(&:to_s)
raise "Unexpected confidence level: #{confidence_level.inspect}" unless confidence_levels.include?(confidence_level)
LearningGoalAiEvaluation::AI_CONFIDENCE_LEVELS[confidence_level.to_sym]
end

private def write_ai_evaluations(user, ai_evaluations, rubric, rubric_ai_evaluation, project_version)
ActiveRecord::Base.transaction do
# Update the base rubric status
Expand Down Expand Up @@ -380,10 +386,4 @@ def perform(user_id:, requester_id:, script_level_id:, rubric_ai_evaluation_id:
raise "Unexpected understanding: #{understanding}"
end
end

private def confidence_s_to_i(confidence_level)
confidence_levels = LearningGoalAiEvaluation::AI_CONFIDENCE_LEVELS.keys.map(&:to_s)
raise "Unexpected confidence level: #{confidence_level.inspect}" unless confidence_levels.include?(confidence_level)
LearningGoalAiEvaluation::AI_CONFIDENCE_LEVELS[confidence_level.to_sym]
end
end

0 comments on commit 7cf5ff8

Please sign in to comment.