diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb
index dd0b498a7..8385b0fde 100644
--- a/app/controllers/poll_controller.rb
+++ b/app/controllers/poll_controller.rb
@@ -7,7 +7,11 @@ class PollController < ApplicationController
def index
if @course
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
- polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id}")
+ if @is_teacher
+ polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id}")
+ else
+ polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id} and polls_status = 2")
+ end
@polls = paginateHelper polls,10 #分页
respond_to do |format|
format.html{render :layout => 'base_courses'}
diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb
index de5e2e713..49e04a3ba 100644
--- a/app/views/poll/_poll_form.html.erb
+++ b/app/views/poll/_poll_form.html.erb
@@ -58,13 +58,14 @@
function poll_submit()
{
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { poll: @poll}) %>');
- showModal('ajax-modal', '500px');
- $('#ajax-modal').css('height','180px');
+ showModal('ajax-modal', '310px');
+ $('#ajax-modal').css('height','100px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("" +
"");
+ $('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
- $('#ajax-modal').parent().addClass("anonymos");
+ $('#ajax-modal').parent().addClass("popbox_polls");
}
diff --git a/app/views/poll/_poll_submit.html.erb b/app/views/poll/_poll_submit.html.erb
index 0f9e96b73..cdc41dd9d 100644
--- a/app/views/poll/_poll_submit.html.erb
+++ b/app/views/poll/_poll_submit.html.erb
@@ -1,28 +1,6 @@