Esempio n. 1
0
def course_dashboard(request, course_id):
    course = get_course(int(course_id))
    assignments = get_assignments(course)
    course_materials = CourseMaterial.objects.all().filter(course=course)
    lectures = course.lecture_set.all()
    context = {'assignments' : assignments,
		       'course' : course,
		       'course_materials' : course_materials,
		       'lectures' : lectures}
    return render(request, 'instructor_portal/course_dashboard.html', context)
Esempio n. 2
0
def course_dashboard(request, course_id):
    course = get_course(int(course_id))
    assignments = get_assignments(course)
    course_materials = CourseMaterial.objects.all().filter(course=course)
    lectures = course.lecture_set.all()
    context = {
        'assignments': assignments,
        'course': course,
        'course_materials': course_materials,
        'lectures': lectures
    }
    return render(request, 'instructor_portal/course_dashboard.html', context)
Esempio n. 3
0
def display_course_info(request, course_department, course_id):
    course = get_course(int(course_id))
    lecture_list = get_lectures(course)
    assignment_list = get_assignments(course)
    print assignment_list
    if request.user.is_authenticated():
	instructor = Instructor.objects.all().get(id=request.user.instructor.id)
	taught_courses, not_taught_courses = get_separated_course_list(instructor, Course.objects.all())
	is_taught = course in taught_courses
    
    is_enrolled = False
    return render(request, 'course_info.html', { 'course' : course,
					     'is_enrolled': is_enrolled,
					     'lecture_list' : lecture_list,
					     'assignment_list': assignment_list,
					     'is_student' : False})
Esempio n. 4
0
def display_course_info(request, course_department, course_id):
    course = get_course(int(course_id))
    lecture_list = get_lectures(course)
    assignment_list = get_assignments(course)
    print assignment_list
    if request.user.is_authenticated():
        instructor = Instructor.objects.all().get(
            id=request.user.instructor.id)
        taught_courses, not_taught_courses = get_separated_course_list(
            instructor, Course.objects.all())
        is_taught = course in taught_courses

    is_enrolled = False
    return render(
        request, 'course_info.html', {
            'course': course,
            'is_enrolled': is_enrolled,
            'lecture_list': lecture_list,
            'assignment_list': assignment_list,
            'is_student': False
        })