@login_required
def course_survey(request, course_id):
 course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id)
 course = get_course_with_access(request.user, 'load', course_key)
 redirect_url = reverse('info', args=[course_id])
 if (not course.course_survey_name):
  return redirect(redirect_url)
 return survey.views.view_student_survey(request.user, course.course_survey_name, course=course, redirect_url=redirect_url, is_required=course.course_survey_required)

@ login_required def course_survey ( request , course_id ) : course_key = SlashSeparatedCourseKey . from_deprecated_string ( course_id ) course = get_course_with_access ( request . user , 'load' , course_key ) redirect_url = reverse ( 'info' , args = [ course_id ] ) if ( not course . course_survey_name ) : return redirect ( redirect_url ) return survey . views . view_student_survey ( request . user , course . course_survey_name , course = course , redirect_url = redirect_url , is_required = course . course_survey_required )
url endpoint to present a survey that is associated with a course_id note that the actual implementation of course survey is handled in the views .