|
|
@ -399,7 +399,7 @@ class ExercisesController < ApplicationController
|
|
|
|
choice_random = params[:choice_random] ? true : false
|
|
|
|
choice_random = params[:choice_random] ? true : false
|
|
|
|
score_open = params[:score_open] ? true : false #分数是否公开
|
|
|
|
score_open = params[:score_open] ? true : false #分数是否公开
|
|
|
|
answer_open = params[:answer_open] ? true : false #答案是否公开
|
|
|
|
answer_open = params[:answer_open] ? true : false #答案是否公开
|
|
|
|
assistant_auth = params[:assistant_auth] ? true : false # 助教权限
|
|
|
|
assistant_auth = params[:assistant_auth] # 助教权限
|
|
|
|
|
|
|
|
|
|
|
|
# 统一设置或者分班为0,则更新试卷,并删除试卷分组
|
|
|
|
# 统一设置或者分班为0,则更新试卷,并删除试卷分组
|
|
|
|
if unified_setting || (course_group_ids.size == 0)
|
|
|
|
if unified_setting || (course_group_ids.size == 0)
|
|
|
@ -532,7 +532,8 @@ class ExercisesController < ApplicationController
|
|
|
|
:answer_open => answer_open,
|
|
|
|
:answer_open => answer_open,
|
|
|
|
:exercise_status => exercise_status,
|
|
|
|
:exercise_status => exercise_status,
|
|
|
|
:publish_time => p_time,
|
|
|
|
:publish_time => p_time,
|
|
|
|
:end_time => e_time
|
|
|
|
:end_time => e_time,
|
|
|
|
|
|
|
|
:assistant_auth => assistant_auth
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@exercise.update!(exercise_params)
|
|
|
|
@exercise.update!(exercise_params)
|
|
|
|
if @exercise.exercise_status == Exercise::PUBLISHED
|
|
|
|
if @exercise.exercise_status == Exercise::PUBLISHED
|
|
|
|