def edit_assignment(P, req): uid = UR.getUserId(req) if not auth.canEditAssignment(uid, P["id"]): return UR.prepare_response({}, 1, "NOT ALLOWED") return UR.prepare_response({"files": annotations.edit_assignment(uid, P)})