增加开发语言的显示

This commit is contained in:
sw 2015-07-24 15:19:01 +08:00
parent 4a781ea6b2
commit 4f8170700e
2 changed files with 40 additions and 8 deletions

View File

@ -71,18 +71,30 @@
<% end%>
</tbody>
</table>
<% end%>
<div class="cl"></div>
<div class="cl"></div>
<div class="mt5">
<% unless homework.attachments.empty?%>
<div class="mt5">
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
<div class="fl">
<% if homework.homework_detail_programing.language.to_i == 1%>
C
<% elsif homework.homework_detail_programing.language.to_i == 2%>
C++
<% end%>
</div>
</div>
<div class="cl"></div>
<% end%>
<% unless homework.attachments.empty?%>
<div class="mt5">
<span class="tit_fb" style="width: auto;"> 附件:</span>
<div class="fl mb5">
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework.attachments} %>
</div>
<% end%>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
<% end%>
<div class="mt5">
<span class="tit_fb" style="width: auto;"> 扣分标准:</span>

View File

@ -139,6 +139,14 @@
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
<table class="border_ce" cellpadding="0" cellspacing="0">
<tbody>
<tr class="<%= cycle("", "b_grey") %>">
<td class="td_tit">
输入
</td>
<td class="td_tit">
输出
</td>
</tr>
<% @homework.homework_tests.each do |test|%>
<tr class="<%= cycle("", "b_grey") %>">
<td class="td_tit">
@ -151,8 +159,20 @@
<% end%>
</tbody>
</table>
<div class="cl"></div>
<div class="mt5">
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
<div class="fl">
<% if @homework.homework_detail_programing.language.to_i == 1%>
C
<% elsif @homework.homework_detail_programing.language.to_i == 2%>
C++
<% end%>
</div>
</div>
<div class="cl"></div>
<% end%>
<div class="cl"></div>
<div class="mt5">
<% unless @homework.attachments.empty?%>