学生查看测验的统计结果

This commit is contained in:
cxt 2016-06-16 16:58:59 +08:00
parent 439841fbd7
commit 28ee609eed
2 changed files with 10 additions and 1 deletions

View File

@ -63,4 +63,11 @@
<%#end%>
<% end%>
<li class="polls_date fr mr10">截止时间:<%= format_time(exercise.end_time.to_s)%></li>
<% if exercise.show_result == 1 %>
<% if exercise.end_time <= Time.now %>
<li><%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%></li>
<% else %>
<li class="pollsbtn fr mr10 pollsbtn_grey" title="截止时间未到,暂不能查看统计结果">统计结果</li>
<%end%>
<% end %>
<% end%>

View File

@ -22,7 +22,9 @@
</div>
<div>
<div class="fl mb5">得分:<span class="c_red"><%=exercise_user.score %>分</span></div>
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,exercise.course) || (exercise.exercise_status == 3 && exercise.show_result == 1) %>
<%= link_to '返回统计列表>>',student_exercise_list_exercise_path(exercise.id,:course_id => exercise.course.id) , :class => "fr linkBlue" %>
<% end %>
</div>
<div class="cl"></div>
<% mc_question_list = exercise.exercise_questions.where("question_type=1") %>