|
|
@ -604,7 +604,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
def toggleCourse
|
|
|
|
def toggleCourse
|
|
|
|
@course_prefs = Course.find_by_extra(@course.extra)
|
|
|
|
@course_prefs = Course.find_by_extra(@course.extra)
|
|
|
|
unless (@course_prefs.student != User.current || User.current.admin?)
|
|
|
|
unless (User.current.allowed_to?(:as_teacher,@course_prefs) || User.current.admin?)
|
|
|
|
render_403
|
|
|
|
render_403
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|