eKorpus

Source code for ekorpus.controllers.export

""":mod:`export` --- Export data in XML format
"""
import os
import cgi
from ekorpus.lib.base import *
from ekorpus.models.form import *
from ekorpus.models.schema import session_table

[docs]class ExportController(AuthorizedController): """This class exports test data. """
[docs] def export(self,id): """Export test data for test *id*. """ c.test=model.Test.get_by(id=id) c.sessions=model.Session.select(session_table.c.test_id==id) response = render('/export/testx.mak') response.headers['content-type'] = 'text/xml' return response #export.roles = 'admin'