def METHOD_NAME(request, course_id):
    course = get_object_or_404(Course, id=course_id)
    semester = course.semester
    if semester.grade_documents_are_deleted:
        raise PermissionDenied
    template_data = {
        "semester": semester,
        "course": course,
        "grade_documents": course.grade_documents.all(),
        "disable_if_archived": "disabled" if semester.grade_documents_are_deleted else "",
        "disable_breadcrumb_course": True,
    }
    return render(request, "grades_course_view.html", template_data)