def assignments(course_id): if not g.user.in_course(course_id): return redirect(url_for('courses.index')) assignments = Assignment.get_available() groups = AssignmentGroup.query.all() course_groups = Course.get_all_groups() editable_courses = g.user.get_editable_courses() return render_template('courses/assignments.html', assignments=assignments, groups=groups, editable_courses=editable_courses, course_groups=course_groups, course_id=course_id)
def select(lti, menu='select', lti_exception=None): """ Let's the user select from a list of assignments. """ # Store current user_id and context_id assignments = Assignment.get_available() groups = AssignmentGroup.query.all() return_url = get_lti_property('launch_presentation_return_url') course_groups = Course.get_all_groups(menu) editable_courses = g.user.get_editable_courses() return render_template('lti/select.html', assignments=assignments, groups=groups, return_url=return_url, menu=menu, editable_courses=editable_courses, course_groups=course_groups)