commit
ca965ee61c
|
@ -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
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
</tr>
|
||||
<% @stundet_works.each_with_index do |student_work, i|%>
|
||||
<% score_open = @homework.score_open == 1 || student_work.user == User.current %>
|
||||
<a name="<%= student_work.id%>"></a>
|
||||
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open}%>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<% is_expand = st.student_work_projects.empty? %>
|
||||
<a name="<%= st.id%>"></a>
|
||||
<ul id="syllabus_course_ul">
|
||||
<li class="syllabus_class_list" style="line-height:44px; vertical-align:middle;">
|
||||
<div class="syllabus_class_w fontGrey3" style="cursor: pointer;">
|
||||
|
@ -90,7 +90,7 @@
|
|||
<% if @homework.anonymous_appeal == 1 %>
|
||||
违规匿评扣分
|
||||
<span class="c_red">
|
||||
<%= student_work.appeal_penalty%>
|
||||
<%= st.appeal_penalty%>
|
||||
</span>分<br/>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -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 %>
|
||||
<a name="<%= student_work.id%>"></a>
|
||||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open} %>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<%#= render :partial => 'evaluation_un_group_work', :locals => {:student_work => student_work, :index => index} %>
|
||||
<%# else %>
|
||||
<tr class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<td class="none"><a name="<%= student_work.id%>"></a></td>
|
||||
<td class="hworkList40 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
|
||||
<td class="hworkPortrait pr10 float-none">
|
||||
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_path(student_work.user), :target => '_blank') %>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||
<tr class="hworkListRow" id="student_work_<%= student_work.id%>">
|
||||
<td class="none"><a name="<%= student_work.id%>"></a></td>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<% is_my_work = student_work.user == User.current%>
|
||||
<% else %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= f.text_area 'comment', :id => 'appeal_comment', :style => 'height: 70px; width: 414px;', :placeholder => "请输入你的申诉理由,最多250个字符。",:maxlength => 250 %>
|
||||
<p id="notice_notes" class="c_red none" style="margin-left: 68px;">请输入申诉理由</p>
|
||||
<div class="alert alert-orange mb10 mt10 mr20">
|
||||
教师或者助教将受到您的申诉<br/>
|
||||
教师或者助教将收到您的申诉<br/>
|
||||
申诉被接受后,此匿评成绩将被废弃,且评阅人的作品将被违规扣分
|
||||
</div>
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<% if !@is_evaluation && (!@is_teacher || params[:show_work_id].present?) || @message_student_work_id || (@is_evaluation && @is_focus == 1) %>
|
||||
<% if !@is_evaluation && (!@is_teacher || params[:show_work_id].present?) || @message_student_work_id || (@is_evaluation && (@is_focus == 1 || params[:show_work_id].present?)) %>
|
||||
<% if @message_student_work_id %>
|
||||
<% work = @homework.student_works.where("id =?", @message_student_work_id).first %>
|
||||
<% else %>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<% if homework.student_works.has_committed.count == 0 %>
|
||||
<%= link_to '编 辑'.html_safe, edit_homework_common_path(homework, :is_manage => is_manage), :class => 'hw_btn_green fr mt5', :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to '评 分'.html_safe, student_work_index_path(:homework => homework.id), :class => 'hw_btn_green fr mt5', :target => '_blank' %>
|
||||
<%= link_to '评 分'.html_safe, student_work_index_path(:homework => homework.id, :tab => 2), :class => 'hw_btn_green fr mt5', :target => '_blank' %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue