@app.route('/filter/<course_id>/', methods=['GET'])
@check_valid_user
@lti(error=error, request='session', role='staff', app=app)
def filter(lti=lti, course_id=None):
    '\n    Display a filtered and paginated list of students in the course.\n\n    :param course_id:\n    :type: int\n    :rtype: str\n    :returns: A list of students in the course using the template\n        user_list.html.\n    '
    query = request.args.get('query', '').lower()
    page = int(request.args.get('page', 1))
    per_page = int(request.args.get('per_page', config.DEFAULT_PER_PAGE))
    (user_list, max_pages) = search_students(course_id, per_page=per_page, page=page, search_term=query)
    if ((not user_list) or (max_pages < 1)):
        user_list = []
        max_pages = 1
    return render_template('user_list.html', users=user_list, current_page_number=page, max_pages=max_pages)
Display a filtered and paginated list of students in the course.

:param course_id:
:type: int
:rtype: str
:returns: A list of students in the course using the template
    user_list.html.
@app.route('/filter/<course_id>/', methods=['GET'])
@check_valid_user
@lti(error=error, request='session', role='staff', app=app)
def filter(lti=lti, course_id=None):
    '\n    Display a filtered and paginated list of students in the course.\n\n    :param course_id:\n    :type: int\n    :rtype: str\n    :returns: A list of students in the course using the template\n        user_list.html.\n    '
    query = request.args.get('query', ).lower()
    page = int(request.args.get('page', 1))
    per_page = int(request.args.get('per_page', config.DEFAULT_PER_PAGE))
    (user_list, max_pages) = search_students(course_id, per_page=per_page, page=page, search_term=query)
    if ((not user_list) or (max_pages < 1)):
        user_list = []
        max_pages = 1
    return render_template('user_list.html', users=user_list, current_page_number=page, max_pages=max_pages)