def question_export(): exp = Question.export_course(g.lti.get_course_id()) exp = yaml.dump(exp, default_flow_style=False) return Response(exp, mimetype="text/plain", headers={"Content-Disposition": "attachment;filename=questions_%s.yaml" % g.lti.get_course_name()})
def export_data(): # TODO: settings (answers, etc?) answers = request.form.get('answers', False) == 'on' exp = Question.export_course(g.lti.get_course_id(), answers) exp = yaml.dump(exp, default_flow_style=False) return Response(exp, mimetype="text/plain", headers={"Content-Disposition": "attachment;filename=questions_%s.yaml" % g.lti.get_course_name()})