|
|
|
@ -223,13 +223,20 @@ module HomeworkCommonsHelper
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 作品状态
|
|
|
|
|
def homework_status homework, member
|
|
|
|
|
def practice_homework_status homework, member
|
|
|
|
|
[{id: 3, name: "未通关", count: homework.un_complete_count(member)},
|
|
|
|
|
{id: 4, name: "已通关", count: homework.complete_count(member)},
|
|
|
|
|
{id: 1, name: "按时提交", count: homework.finished_count(member)},
|
|
|
|
|
{id: 2, name: "延时提交", count: homework.delay_finished_count(member)}]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 作品状态
|
|
|
|
|
def homework_status homework, member
|
|
|
|
|
[{id: 0, name: "未提交", count: homework.unfinished_count(member)},
|
|
|
|
|
{id: 1, name: "按时提交", count: homework.finished_count(member)},
|
|
|
|
|
{id: 2, name: "延时提交", count: homework.delay_finished_count(member)}]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 作品分数的显示
|
|
|
|
|
def work_score_format score, current_user, score_open
|
|
|
|
|
score.nil? ? "--" : (current_user || score_open) ? number_with_precision(score, precision: 1) : "**"
|
|
|
|
|