@app.route('/update/<course_id>/', methods=['POST'])
@check_valid_user
@lti(error=error, request='session', role='staff', app=app)
def update(lti=lti, course_id=None):
    '\n    Creates a new `update_background` job.\n\n    :param course_id: The Canvas ID of the Course.\n    :type coruse_id: int\n    :rtype: flask.Response\n    :returns: A JSON-formatted response containing urls for the started jobs.\n    '
    refresh_job = q.enqueue_call(func=refresh_background, args=(course_id,))
    update_job = q.enqueue_call(func=update_background, args=(course_id, request.get_json()), depends_on=refresh_job)
    return Response(json.dumps({'refresh_job_url': url_for('job_status', job_key=refresh_job.get_id()), 'update_job_url': url_for('job_status', job_key=update_job.get_id())}), mimetype='application/json', status=202)
Creates a new `update_background` job.

:param course_id: The Canvas ID of the Course.
:type coruse_id: int
:rtype: flask.Response
:returns: A JSON-formatted response containing urls for the started jobs.
@app.route('/update/<course_id>/', methods=['POST'])
@check_valid_user
@lti(error=error, request='session', role='staff', app=app)
def update(lti=lti, course_id=None):
    '\n    Creates a new `update_background` job.\n\n    :param course_id: The Canvas ID of the Course.\n    :type coruse_id: int\n    :rtype: flask.Response\n    :returns: A JSON-formatted response containing urls for the started jobs.\n    '
    refresh_job = q.enqueue_call(func=refresh_background, args=(course_id,))
    update_job = q.enqueue_call(func=update_background, args=(course_id, request.get_json()), depends_on=refresh_job)
    return Response(json.dumps({'refresh_job_url': url_for('job_status', job_key=refresh_job.get_id()), 'update_job_url': url_for('job_status', job_key=update_job.get_id())}), mimetype='application/json', status=202)