|
|
|
@ -205,15 +205,15 @@ class PollsController < ApplicationController
|
|
|
|
|
@is_teacher_or = 1
|
|
|
|
|
@user_poll_answer = 3 #教师页面
|
|
|
|
|
end
|
|
|
|
|
poll_status = @poll.get_poll_status(current_user)
|
|
|
|
|
@poll_status = @poll.get_poll_status(current_user)
|
|
|
|
|
poll_id_array = [@poll.id]
|
|
|
|
|
@poll_publish_count = get_user_permission_course(poll_id_array,2).count #是否存在已发布的
|
|
|
|
|
@poll_unpublish_count = get_user_permission_course(poll_id_array,1).count #是否存在未发布的
|
|
|
|
|
|
|
|
|
|
if (@poll_publish_count == 0) && (@poll_unpublish_count == 0) #即表示没有分班
|
|
|
|
|
if poll_status == 1
|
|
|
|
|
if @poll_status == 1
|
|
|
|
|
@poll_unpublish_count = 1 #试卷未发布,且课堂没有分班的时候
|
|
|
|
|
elsif poll_status == 2
|
|
|
|
|
elsif @poll_status == 2
|
|
|
|
|
@poll_publish_count = 1 #试卷未发布,且课堂没有分班的时候
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|