班级作品列表评阅弹框中,增加“展开评阅详情”的复选项

This commit is contained in:
cxt 2018-03-16 17:37:14 +08:00
parent 2ea79057c9
commit e9aa22cdee
4 changed files with 13 additions and 6 deletions

View File

@ -24,6 +24,12 @@
<span class="c_red ml5" style="display: none;" id="none_notice_<%= work.id%>">评语、评分、批阅结果至少有一个不为空。</span>
<%end%>
<a href="javascript:void(0);" id="work_submit_<%= work.id %>" class="blue_n_btn fr evaluation_submit" onclick="score_submit('<%=work.id %>');">提交</a>
<% if show_or_hide %>
<span class="fr mr50 evaluation_submit">
<input type="checkbox" id="show_or_hide_work_score_<%= work.id %>" onclick="$('#score_list_<%= work.id%>').toggle();">
<label for="show_or_hide_work_score_<%= work.id %>">展开评阅详情</label>
</span>
<% end %>
<div class="cl"></div>
</li>
<% end%>

View File

@ -112,7 +112,7 @@
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
<ul id="add_student_score_<%= work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => work,:score => score,:is_member_work => false}%>
<%= render :partial => 'add_score',:locals => {:work => work,:score => score,:is_member_work => false, :show_or_hide => !student_work_scores.empty?}%>
</ul>
<% end%>
<div class="cl"></div>
@ -124,7 +124,7 @@
</div>
<div class="cl"></div>
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= student_work_scores.empty? ? 'padding:0px;' : ''%>">
<div class="ping_box fl" id="score_list_<%= work.id%>" style="display: none; <%= student_work_scores.empty? ? 'padding:0px;' : ''%>">
<%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => false} %>
</div>
<div class="cl"></div>

View File

@ -84,7 +84,7 @@
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && !is_my_work)%>
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => work,:score => score,:is_member_work => is_member_work}%>
<%= render :partial => 'add_score',:locals => {:work => work,:score => score,:is_member_work => is_member_work, :show_or_hide => !student_work_scores.empty?}%>
</div>
<% end%>
<div class="cl"></div>
@ -101,7 +101,7 @@
<% if @is_teacher %>
<!-- 老师 -->
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => work,:score => score,:is_member_work => is_member_work}%>
<%= render :partial => 'add_score',:locals => {:work => work,:score => score,:is_member_work => is_member_work, :show_or_hide => !student_work_scores.empty?}%>
</div>
<% end%>
<div class="cl"></div>
@ -109,7 +109,7 @@
</ul>
<% end %>
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= student_work_scores.empty? ? 'padding:0px;' : ''%>">
<div class="ping_box fl" id="score_list_<%= work.id%>" style="display: none; <%= student_work_scores.empty? ? 'padding:0px;' : ''%>">
<%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => is_member_work} %>
</div>
<div class="cl"></div>

View File

@ -1,5 +1,5 @@
<% is_member_work = @homework.homework_type == 3 && @work.student_work_projects.empty? %>
$("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'add_score',:locals => {:work => @work,:score => @new_score,:is_member_work => is_member_work}) %>");
$("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'add_score',:locals => {:work => @work,:score => @new_score,:is_member_work => is_member_work, :show_or_hide => !@student_work_scores.empty?}) %>");
$('#score_<%= @work.id%>').peSlider({range: 'min'});
<%# if @is_new%>
@ -12,6 +12,7 @@ $('#score_<%= @work.id%>').peSlider({range: 'min'});
$("#score_list_<%= @work.id%>").html("<%=escape_javascript(render :partial => 'student_work_score_records', :locals => {:student_work_scores => @student_work_scores, :is_member_work => is_member_work}) %>");
var num = $("#work_num_<%= @work.id%>").html();
$("#score_list_<%= @work.id%>").removeAttr("style");
$("#show_or_hide_work_score_<%= @work.id %>").attr("checked", true);
<% if @is_teacher %>
<% if @homework.homework_type == 3 %>