diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb
index b88ecf775..ec224515b 100644
--- a/app/controllers/poll_controller.rb
+++ b/app/controllers/poll_controller.rb
@@ -299,7 +299,8 @@ class PollController < ApplicationController
def commit_answer
pq = PollQuestion.find(params[:poll_question_id])
if has_commit_poll?(@poll.id,User.current.id) && (!User.current.admin?)
- render :json => {:text => "failure"}
+ @percent = get_percent(@poll,User.current)
+ render :json => {:text => "ok" ,:percent => format("%.2f" ,@percent)}
return
end
if pq.question_type == 1
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index b5f300986..806a2e13b 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -1017,7 +1017,7 @@ class StudentWorkController < ApplicationController
end
end
- unless (params[:anonymous_appeal].to_i == 1 && @homework.anonymous_appeal == 1 && params[:appeal_penalty].to_i == homework_detail_manual.homework_detail_manual) || (params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal == 0)
+ unless (params[:anonymous_appeal].to_i == 1 && @homework.anonymous_appeal == 1 && params[:appeal_penalty].to_i == homework_detail_manual.appeal_penalty) || (params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal == 0)
if params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal != 0
homework_detail_manual.appeal_penalty = 0
StudentWork.where("homework_common_id = #{@homework.id} and work_status != 0").each do |student_work|
diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb
index 57cccc51a..eacdb5e16 100644
--- a/app/views/student_work/_evaluation_title.html.erb
+++ b/app/views/student_work/_evaluation_title.html.erb
@@ -31,6 +31,7 @@
<% @stundet_works.each_with_index do |student_work, i|%>
<% score_open = @homework.score_open == 1 || student_work.user == User.current %>
+
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open}%>
diff --git a/app/views/student_work/_evaluation_un_group_member_work.html.erb b/app/views/student_work/_evaluation_un_group_member_work.html.erb
index d170c676d..073e79fc4 100644
--- a/app/views/student_work/_evaluation_un_group_member_work.html.erb
+++ b/app/views/student_work/_evaluation_un_group_member_work.html.erb
@@ -1,5 +1,5 @@
-
<% is_expand = st.student_work_projects.empty? %>
+
-
@@ -90,7 +90,7 @@
<% if @homework.anonymous_appeal == 1 %>
违规匿评扣分
- <%= student_work.appeal_penalty%>
+ <%= st.appeal_penalty%>
分
<% end %>
<% end %>
diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb
index 99c8d86eb..a55d90f68 100644
--- a/app/views/student_work/_evaluation_un_title.html.erb
+++ b/app/views/student_work/_evaluation_un_title.html.erb
@@ -76,6 +76,7 @@
<%# end %>
<% @stundet_works.each_with_index do |student_work, i| %>
<% score_open = @is_teacher || @homework.score_open == 1 || student_work.user == User.current %>
+
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open} %>
diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb
index 254b75321..71a1c7788 100644
--- a/app/views/student_work/_evaluation_un_work.html.erb
+++ b/app/views/student_work/_evaluation_un_work.html.erb
@@ -7,7 +7,6 @@
<%#= render :partial => 'evaluation_un_group_work', :locals => {:student_work => student_work, :index => index} %>
<%# else %>
|
- |
<%=index + 1 %> |
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_path(student_work.user), :target => '_blank') %>
diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb
index 43742bf8d..169fe5ea7 100644
--- a/app/views/student_work/_evaluation_work.html.erb
+++ b/app/views/student_work/_evaluation_work.html.erb
@@ -1,6 +1,5 @@
|
- |
<% if @homework.homework_type != 3 %>
<% is_my_work = student_work.user == User.current%>
<% else %>
diff --git a/app/views/student_work/_score_appeal_box.html.erb b/app/views/student_work/_score_appeal_box.html.erb
index 4d04208f5..874da4fd5 100644
--- a/app/views/student_work/_score_appeal_box.html.erb
+++ b/app/views/student_work/_score_appeal_box.html.erb
@@ -12,7 +12,7 @@
<%= f.text_area 'comment', :id => 'appeal_comment', :style => 'height: 70px; width: 414px;', :placeholder => "请输入你的申诉理由,最多250个字符。",:maxlength => 250 %>
请输入申诉理由
- 教师或者助教将受到您的申诉
+ 教师或者助教将收到您的申诉
申诉被接受后,此匿评成绩将被废弃,且评阅人的作品将被违规扣分
diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb
index 1db52169f..152bd290f 100644
--- a/app/views/student_work/_student_work_list.html.erb
+++ b/app/views/student_work/_student_work_list.html.erb
@@ -80,7 +80,7 @@
|