批改程序作业时,如果一个同学A的程序打开后没有收起,则后面打开的学生的程序就和A的程序一样

This commit is contained in:
cxt 2016-03-17 15:17:00 +08:00
parent a8780be9b4
commit 2eefdcd0ee
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@
<li >
<span class="tit_fb ">编程代码:</span>
<div class="showHworkP break_word"><pre id="work-src" style="display: none;"><%= work.description if work.description%></pre><div class="fontGrey2 font_cus" id="work-code_<%= work.id%>">
<div class="showHworkP break_word"><pre id="work-src_<%= work.id%>" style="display: none;"><%= work.description if work.description%></pre><div class="fontGrey2 font_cus" id="work-code_<%= work.id%>">
</div>
</div>
<div class="cl"></div>

View File

@ -71,7 +71,7 @@
indentUnit: 2,
matchBrackets: true,
readOnly: true,
value: $("#work-src").text()
value: $("#work-src_<%= work.id%>").text()
});
<% elsif @homework.homework_type == 1 %>
$("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work => work, :score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc")}) %>");

View File

@ -25,7 +25,7 @@ else{
indentUnit: 2,
matchBrackets: true,
readOnly: true,
value: $("#work-src").text()
value: $("#work-src_<%= @work.id%>").text()
}
);