|
|
|
@ -15,17 +15,19 @@ json.group_settings @course_groups do |group|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if @homework.homework_type == "practice"
|
|
|
|
|
json.shixun_identifier @homework.shixuns.first.try(:identifier)
|
|
|
|
|
json.shixun_identifier @shixun.try(:identifier)
|
|
|
|
|
json.task_pass @shixun&.task_pass
|
|
|
|
|
json.(@homework, :work_efficiency, :eff_score)
|
|
|
|
|
json.(@homework.homework_detail_manual, :answer_open_evaluation, :shixun_evaluation)
|
|
|
|
|
|
|
|
|
|
total_exp = 0
|
|
|
|
|
json.challenge_settings @homework.shixuns.first.try(:challenges).each do |challenge|
|
|
|
|
|
json.challenge_settings @shixun.try(:challenges).each do |challenge|
|
|
|
|
|
json.challenge_id challenge.id
|
|
|
|
|
json.challenge_name challenge.subject
|
|
|
|
|
json.checked challenge_setting(@homework, challenge.id).present?
|
|
|
|
|
json.challenge_score challenge_setting(@homework, challenge.id).try(:score).to_f
|
|
|
|
|
json.challenge_exp challenge.score
|
|
|
|
|
json.difficulty challenge.challenge_difficulty
|
|
|
|
|
total_exp += challenge.score
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|