|
|
|
@ -135,6 +135,7 @@ class HomeworkCommonController < ApplicationController
|
|
|
|
|
#statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限
|
|
|
|
|
def start_anonymous_comment
|
|
|
|
|
@statue =4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course)
|
|
|
|
|
@statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") > Time.now.strftime("%Y-%m-%d")
|
|
|
|
|
if @homework_detail_manual.comment_status == 1
|
|
|
|
|
student_works = @homework.student_works
|
|
|
|
|
if student_works && student_works.size >=2
|
|
|
|
|