非课程参与人员无法查看私有课程的测验列表

sw_new_course
cxt 10 years ago
parent 2b6cae5418
commit 6b72b4bb17

@ -5,8 +5,11 @@ class ExerciseController < ApplicationController
before_filter :find_course, :only => [:index,:new,:create,:student_exercise_list]
include ExerciseHelper
include ExerciseHelper
def index
if @course.is_public == 0 && !User.current.member_of_course?(@course)
render_403
return
end
remove_invalid_exercise(@course)
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
if @is_teacher

Loading…
Cancel
Save