分组作业的优化

This commit is contained in:
cxt 2016-09-26 14:38:07 +08:00
parent 42afe33dab
commit 0e8df56c9a
2 changed files with 16 additions and 15 deletions

View File

@ -1,8 +1,9 @@
<% is_expand = st.student_work_projects.empty? %>
<ul id="syllabus_course_ul">
<li class="syllabus_class_list" style="line-height:44px; vertical-align:middle;">
<div class="syllabus_class_w fontGrey3">
<div class="syllabus_class_w fontGrey3 student_work_<%= st.id%>" style="<%=!is_expand ? '' : 'cursor: pointer;' %>" <%= !is_expand ? '' : "onclick = "+"show_student_work('"+"#{student_work_path(st)}"+"')" %>>
<%= link_to(image_tag(url_to_avatar(st.user),:width =>"40",:height => "40", :style => "display:block;"),user_activities_path(st.user), :class => "fl") %>
<% if !st.student_work_projects.empty? %>
<% if !is_expand %>
<span class="fl student_work_<%= st.id%>" style="width:135px;">
<span class="fl hidden ml5" style="max-width:90px;"><%= st.user.show_name %></span>
<span class="fl">(组长)</span>
@ -11,10 +12,10 @@
<span class="fontGrey2">学号</span><%= st.user.user_extensions.nil? ? "--" : st.user.user_extensions.student_id%>
</span>
<% else %>
<span class="fl student_work_<%= st.id%>" style="width:135px; cursor: pointer;" onclick="show_student_work('<%= student_work_path(st)%>');">
<span class="fl student_work_<%= st.id%>" style="width:135px;">
<span class="fl hidden ml5" style="max-width:90px;"><%= st.user.show_name %></span>
</span>
<span class="fl student_work_<%= st.id%> mr15 hidden" style="width:90px; cursor: pointer;" onclick="show_student_work('<%= student_work_path(st)%>');">
<span class="fl student_work_<%= st.id%> mr15 hidden" style="width:90px;">
<span class="fontGrey2">学号</span><%= st.user.user_extensions.nil? ? "--" : st.user.user_extensions.student_id%>
</span>
<% end %>
@ -48,26 +49,26 @@
<div class="<%= score_color score%> student_final_scor_info ml35 pr" style="display: inline">
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
<% unless score.nil?%>
<div class="g_infoNi none width180">
<div class="g_infoNi none width180" style="line-height: 18px;">
作品最终评分为
<span class="c_red">&nbsp;<%= st.final_score%>&nbsp;</span>分
<span class="c_red">&nbsp;<%= st.final_score%>&nbsp;</span>分<br/>
迟交扣分
<span class="c_red">&nbsp;
<%= st.homework_common && st.homework_common.teacher_priority == 1 && st.teacher_score ? 0 : st.late_penalty %>
&nbsp;</span>分
&nbsp;</span>分<br/>
缺评扣分
<span class="c_red">&nbsp;
<%= st.homework_common && st.homework_common.teacher_priority == 1 && st.teacher_score ? 0 : st.absence_penalty%>
&nbsp;</span>分
&nbsp;</span>分<br/>
最终成绩为
<span class="c_red">&nbsp;<%= format("%.1f",score<0 ? 0 : score)%>&nbsp;</span>分
<span class="c_red">&nbsp;<%= format("%.1f",score<0 ? 0 : score)%>&nbsp;</span>分
</div>
<% end%>
</div>
</div>
</div>
</div>
<div class="hworkTip" style="display: none; left:700px; top:20px; white-space:nowrap; right:auto;" id="work_click_<%= st.id%>"><em></em><span></span><font class="fontGrey2"><%= !st.student_work_projects.empty? ? '大作品评分即组长的评分' : '点击查看详情' %></font></div>
<div class="hworkTip" style="display: none; left:700px; top:20px; white-space:nowrap; right:auto;" id="work_click_<%= st.id%>"><em></em><span></span><font class="fontGrey2"><%= !st.student_work_projects.empty? ? '大作品评分即组长的评分' : '点击进行评分' %></font></div>
</li>
</ul>

View File

@ -95,19 +95,19 @@
<td class="hworkList70 <%= score_color score%> student_final_scor_info">
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
<% unless score.nil?%>
<div class="infoNi none width180">
<div class="infoNi none width180" style="line-height: 18px;">
作品最终评分为
<span class="c_red">&nbsp;<%= student_work.final_score%>&nbsp;</span>分
<span class="c_red">&nbsp;<%= student_work.final_score%>&nbsp;</span>分<br/>
迟交扣分
<span class="c_red">&nbsp;
<%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.late_penalty %>
&nbsp;</span>分
&nbsp;</span>分<br/>
缺评扣分
<span class="c_red">&nbsp;
<%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.absence_penalty%>
&nbsp;</span>分
&nbsp;</span>分<br/>
最终成绩为
<span class="c_red">&nbsp;<%= format("%.1f",score<0 ? 0 : score)%>&nbsp;</span>分
<span class="c_red">&nbsp;<%= format("%.1f",score<0 ? 0 : score)%>&nbsp;</span>分<br/>
</div>
<% end%>
</td>