示例#1
0
	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)
示例#2
0
 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)
示例#3
0
	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)
示例#4
0
	def topdf_plain(self,settings):
		from knst.knstdoc import makePlain
		from knst.utils import xml2pdf
		self.normalize(settings)
		return xml2pdf(settings,self.xml,makePlain)
示例#5
0
 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)
示例#6
0
 def topdf_plain(self, settings):
     from knst.knstdoc import makePlain
     from knst.utils import xml2pdf
     self.normalize(settings)
     return xml2pdf(settings, self.xml, makePlain)