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? %> +