def topdf_mark(self,settings,studentId): from knst.utils import xml2pdf from knst.knstdoc import makePlain session = DBSession() result = session.query(Result).get((self.id,studentId)) if not result: return None version, tallies = result.info xml_data = self.mark(settings,version,tallies) return xml2pdf(settings, unicode(xml_data,'utf8'), makePlain)
def topdf_mark(self, settings, studentId): from knst.utils import xml2pdf from knst.knstdoc import makePlain session = DBSession() result = session.query(Result).get((self.id, studentId)) if not result: return None version, tallies = result.info xml_data = self.mark(settings, version, tallies) return xml2pdf(settings, unicode(xml_data, 'utf8'), makePlain)
def topdf_scramble(self,settings,copies): from knst.knstdoc import makeScrambled from knst.utils import xml2pdf self.normalize(settings) xml_data = self.scramble(settings,copies) return xml2pdf(settings, xml_data, makeScrambled)
def topdf_plain(self,settings): from knst.knstdoc import makePlain from knst.utils import xml2pdf self.normalize(settings) return xml2pdf(settings,self.xml,makePlain)
def topdf_scramble(self, settings, copies): from knst.knstdoc import makeScrambled from knst.utils import xml2pdf self.normalize(settings) xml_data = self.scramble(settings, copies) return xml2pdf(settings, xml_data, makeScrambled)
def topdf_plain(self, settings): from knst.knstdoc import makePlain from knst.utils import xml2pdf self.normalize(settings) return xml2pdf(settings, self.xml, makePlain)