学生匿评打分时必须填写评语
This commit is contained in:
parent
c381ce177f
commit
a5cc1390f2
|
@ -1,9 +1,10 @@
|
|||
<%= form_for('new_form', :remote => true, :method => :post,:url => add_score_student_work_path(work.id)) do |f|%>
|
||||
<%= form_for('new_form', :remote => true, :method => :post,:url => add_score_student_work_path(work.id),:id=>'add_score_'+work.id.to_s) do |f|%>
|
||||
<li >
|
||||
<span class="tit_fb"> 评价:</span>
|
||||
<%= f.text_area 'user_message', :class => 'hwork_ping_text', :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %>
|
||||
<%= f.text_area 'user_message', :class => 'hwork_ping_text', :id => 'score_comment_'+work.id.to_s, :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<p id="hint_message_<%=work.id %>" style="margin-left: 65px;"></p>
|
||||
<li >
|
||||
<span class="tit_fb mt2"> 评分:</span>
|
||||
<input type="number" name="score" id="score_<%= work.id%>" value="<%= score.nil? ? 60 : score.score%>" min="0" max="100" size="4" data-units="dollars" />
|
||||
|
@ -16,7 +17,19 @@
|
|||
<%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %>
|
||||
</div>
|
||||
<%end%>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr evaluation_submit" onclick="$(this).parent().parent().submit();$('#about_hwork_<%= work.id%>').html('');">提交</a>
|
||||
<a href="javascript:void(0);" id="work_submit_<%= work.id %>" class="blue_n_btn fr evaluation_submit" onclick="score_submit('<%=work.id %>');">提交</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<script type="text/javascript">
|
||||
function score_submit(id){
|
||||
if ($.trim($('#score_comment_'+id).val()) == "") {
|
||||
$('#hint_message_'+id).html("为了对其他学生的作品负责,请您务必填写评语");
|
||||
$("#hint_message_"+id).css('color','#ff0000');
|
||||
$("#score_comment_"+id).focus();
|
||||
} else {
|
||||
$("#work_submit_"+id).parent().parent().submit();
|
||||
$('#about_hwork_'+id).html('');
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue