增加错误信息的显示

This commit is contained in:
sw 2015-07-23 10:12:07 +08:00
parent 61808a5152
commit c0eea86132
2 changed files with 36 additions and 19 deletions

View File

@ -23,35 +23,44 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<li ><span class="tit_fb ">测试结果:</span> <li ><span class="tit_fb ">测试结果:</span>
<table class="border_ce" cellpadding="0" cellspacing="0"> <table class="border_ce" cellpadding="0" cellspacing="0">
<tbody> <tbody>
<!--<%#@work.student_work_test.each do |test|%>--> <tr class=" b_lblue fb c_w">
<!--<tr class="<%#= cycle("", "b_grey") %>">--> <td class="td_tit ">输入</td>
<!--<td class="td_tit">--> <td class="td_tit border_l ">输出</td>
<!--<%#= test.homework_test.input%>--> <td class="td_50 border_l ">测试结果</td>
<!--</td>--> </tr>
<!--<td class="td_tit">-->
<!--<%#= test.homework_test.output%>-->
<!--</td>-->
<!--<td class="td_50 c_red"><%#= test.status_to_s%></td>-->
<!--<td class="td_50 "><%#= test.test_score%></td>-->
<!--</tr>-->
<!--<%# end%>-->
<%@homework.homework_tests.each do |test|%> <%@homework.homework_tests.each do |test|%>
<tr class="<%= cycle("", "b_grey") %>"> <tr class="<%= cycle("", "b_grey") %>">
<td class="td_tit"> <td class="td_tit hidden">
<%= test.input%> <%= test.input%>
</td> </td>
<td class="td_tit"> <td class="td_tit border_l hidden">
<%= test.output%> <%= test.output%>
</td> </td>
<% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%> <% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
<td class="td_50 c_red"><%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%></td> <td class="td_50 c_red border_l"><%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%></td>
<input type="hidden" value="<%= student_work_test.result if student_work_test%>"> <input type="hidden" value="<%= student_work_test.result if student_work_test%>">
</tr> </tr>
<% end%> <% end%>
<% student_work_test = @work.student_work_test.first%>
<% if student_work_test && student_work_test.error_msg && !student_work_test.error_msg.empty?%>
<tr class="border_t" >
<td colspan="3" class="td_end" >编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息编程错误信息</td>
</tr>
<% end%>
</tbody>
</table>
<div class="cl"></div>
</li>
<li ><span class="tit_fb ">测试结果:</span>
<table class="border_ce" cellpadding="0" cellspacing="0">
<tbody>
</tbody> </tbody>
</table> </table>

View File

@ -685,12 +685,18 @@ input#score{ width:40px;}
.ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus{background:#64bdd9;} .ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus{background:#64bdd9;}
.ui-slider .ui-slider-handle:active{background-image:none;} .ui-slider .ui-slider-handle:active{background-image:none;}
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;} .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;}
/* 编程作品 */ /* 编程作品 */
.border_ce{ border:1px solid #e4e4e4; } .border_ce{ border:1px solid #e4e4e4; }
.border_ce tr td{ height:26px; } .border_ce tr td{ height:26px; }
.td_tit{width:155px; text-align:center;} .td_tit{width:170px; text-align:center;}
.td_50{width:50px; text-align:center;} .td_50{width:60px; text-align:center;}
a.work_list_tit{width:610px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; font-weight:bold; white-space: nowrap; text-overflow:ellipsis;}
.work_list_pro{ width:670px;}
.border_l{border-left:1px solid #e4e4e4;}
.border_t{ border-top:1px solid #e4e4e4;}
.td_end{border-top:1px solid #e4e4e4; height:auto; padding:5px; }
.c_w{ color:#fff;}
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;} .evaluation{position: relative;}
@ -708,3 +714,5 @@ a:hover.about_me{ color:#0781b4;}