编程作品show页面

This commit is contained in:
sw 2015-07-08 16:54:27 +08:00
parent 2eff8cce6a
commit 2ed2ba97fa
1 changed files with 46 additions and 57 deletions

View File

@ -1,72 +1,61 @@
<div class="show_hwork_arrow"></div>
<div class="show_hwork">
<ul>
<li class="fl" ><span class="tit_fb">上交时间:</span>2015-05-07</li>
<li class="fr" ><a href="javascript:void(0);" class="orange_btn" style="font-size:12px;" >赞(10)</a></li>
<li class="fl" >
<span class="tit_fb">
上交时间:
</span>
<%=format_time @work.created_at %>
</li>
<% if @work.user != User.current%>
<!-- 不是自己显示为点赞,编程作业不可编辑和删除 -->
<li class="fr" id="student_work_praise_<%= @work.id%>">
<%= render :partial => 'student_work_praise' %>
</li>
<% end%>
<div class="cl"></div>
<li ><span class="tit_fb"> 参与人员:</span>程梦雯&nbsp;&nbsp;王强</li>
<li ><span class="tit_fb"> 关联项目:</span><a href="javascript:void(0);" class="c_blue02" >Trustie Forge</a></li>
<li ><span class="tit_fb ">编程代码:</span><p class="show_hwork_p">编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码编程作品代码</p><div class="cl"></div></li>
<li >
<span class="tit_fb ">
编程代码:
</span>
<div class="show_hwork_p break_word">
<%= textilizable @work.description%>
</div>
<div class="cl"></div>
</li>
<li ><span class="tit_fb ">测试结果:</span>
<table class="border_ce" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="td_tit">测试结果一</td>
<td class="td_50 c_red">错误</td>
<td class="td_50 ">0</td>
</tr>
<tr class="b_grey">
<td class="td_tit">测试结果二</td>
<td class="td_50 c_green">正确</td>
<td class="td_50 ">20</td>
</tr>
<tr >
<td class="td_tit">测试结果三</td>
<td class="td_50 c_green">正确</td>
<td class="td_50 ">20</td>
</tr>
<tr class="b_grey">
<td class="td_tit">测试结果四</td>
<td class="td_50 c_green">正确</td>
<td class="td_50 ">20</td>
</tr>
<tr >
<td class="td_tit">测试结果五</td>
<td class="td_50 c_green">正确</td>
<td class="td_50 ">20</td>
</tr>
<tr class="b_grey">
<td class="td_tit">最后得分</td>
<td class="td_50 ">&nbsp;</td>
<td class="td_50 c_red">80</td>
</tr>
<%@homework.homework_tests.each do |test|%>
<tr class="<%= cycle("", "b_grey") %>">
<td class="td_tit">
<%= test.input%>
</td>
<td class="td_tit">
<%= test.output%>
</td>
<td class="td_50 c_red">错误</td>
<td class="td_50 ">0</td>
</tr>
<% end%>
</tbody>
</table>
<div class="cl"></div>
</li>
<li ><span class="tit_fb"> 评价:</span><textarea class="hwork_ping_text "></textarea><div class="cl"></div></li>
<li ><span class="tit_fb mt2"> 评分:</span><input type="number" name="score" id="score" value="50" min="0" max="100" size="4" data-units="dollars" /><span class=" ml5">分</span><div class="cl"></div></li>
<li ><span class="tit_fb"> 批阅结果:</span><input type="submit" name="" value="文件浏览" class="sub_btn">&nbsp;&nbsp;&nbsp;&nbsp;<span class=" c_grey ">-文件不超过200MB</span><a href="javascript:void(0);" class="blue_n_btn fr" >提交</a><div class="cl"></div></li>
<% if @is_teacher%>
<!-- 编程作业老师才可以评分 -->
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
</div>
<% end%>
</ul>
<div class="ping_box">
<ul class="ping_box_ul">
<a href="javascript:void(0);" class="ping_pic fl" ><img src="images/courses/pic_01.jpg" width="34" height="34" /></a>
<div class="ping_box_tit">
<a href="javascript:void(0);" class="c_blue fl" >jacknudt</a><span class="ml5 fl">(教师)</span>
<span class="ml20 fl">评分:</span><a href="javascript:void(0);" class="c_orange fl" >80分</a>
<a href="javascript:void(0);" class="fr c_purple" >删除</a>
<a href="javascript:void(0);" class="fr c_purple mr5" >回复</a>
<span class=" fr c_grey mr20">一小时前</span>
<div class="cl mb5"></div>
<p >基本逻辑还是正确的,代码有点问题,批阅结果在附件里,及时改正!</p>
<a href="javascript:void(0);" class="link_file" >批阅结果-王强.zip</a><span class="ml5">(123KB)</span>
</div>
<div class="cl"></div>
</ul>
<div class="ping_box mt10" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
<%@work.student_works_scores.order("updated_at desc").each do |score|%>
<div id="work_score_<%= score.id%>">
<%= render :partial => 'student_work_score',:locals => {:score => score}%>
</div>
<% end%>
</div><!---ping_box end--->
<a href="javascript:void(0);" class="fr c_blue mt5 mb5">收起</a>
<div class="cl"></div>
<a href="javascript:void(0);" class="fr c_blue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
</div><!---show_hwork end--->