Sha256: ea387b39bf8f60308886362c0b88c8e07d4f66a6f10635aa785491f94220cd12
Contents?: true
Size: 426 Bytes
Versions: 10
Compression:
Stored size: 426 Bytes
Contents
class Gaku::Grading::Single::Score < Gaku::Grading::Single::BaseMethod def grade_exam @score = nil exam = @gradable exam.exam_portions.each_with_index do |exam_portion, index| ep_score = @student.exam_portion_scores.where(exam_portion_id: exam_portion.id).first_or_create! @score = @score.to_f + ep_score.score if ep_score.score end @result = { id: @student.id, score: @score } end end
Version data entries
10 entries across 10 versions & 2 rubygems