diff --git a/app/views/exercise/_exercise.html.erb b/app/views/exercise/_exercise.html.erb index 19bc520d4..c3f356a5d 100644 --- a/app/views/exercise/_exercise.html.erb +++ b/app/views/exercise/_exercise.html.erb @@ -63,4 +63,11 @@ <%#end%> <% end%>
  • 截止时间:<%= format_time(exercise.end_time.to_s)%>
  • + <% if exercise.show_result == 1 %> + <% if exercise.end_time <= Time.now %> +
  • <%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%>
  • + <% else %> +
  • 统计结果
  • + <%end%> + <% end %> <% end%> \ No newline at end of file diff --git a/app/views/exercise/_exercise_student_result.html.erb b/app/views/exercise/_exercise_student_result.html.erb index d8b4f55bf..59a58901c 100644 --- a/app/views/exercise/_exercise_student_result.html.erb +++ b/app/views/exercise/_exercise_student_result.html.erb @@ -22,7 +22,9 @@
    得分:<%=exercise_user.score %>分
    - <%= link_to '返回统计列表>>',student_exercise_list_exercise_path(exercise.id,:course_id => exercise.course.id) , :class => "fr linkBlue" %> + <% 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 %>
    <% mc_question_list = exercise.exercise_questions.where("question_type=1") %>