|
|
@ -1178,6 +1178,7 @@ class CoursesController < ApplicationController
|
|
|
|
# Use callbacks to share common setup or constraints between actions.
|
|
|
|
# Use callbacks to share common setup or constraints between actions.
|
|
|
|
def set_course
|
|
|
|
def set_course
|
|
|
|
@course = Course.find_by!(id: params[:id])
|
|
|
|
@course = Course.find_by!(id: params[:id])
|
|
|
|
|
|
|
|
tip_exception(404, "") if @course.is_delete == 1 && !current_user.admin?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# Never trust parameters from the scary internet, only allow the white list through.
|
|
|
|
# Never trust parameters from the scary internet, only allow the white list through.
|
|
|
|