+ def build_pdf(self, student=False, infile=None):
+ from .publish import PdfFormat
+ wldoc = self.wldocument(infile)
+ if student:
+ pdf = PdfFormat(wldoc).build()
+ self.student_pdf.save("%s.pdf" % self.slug,
+ File(open(pdf.get_filename())))
+ else:
+ pdf = PdfFormat(wldoc, teacher=True).build()
+ self.pdf.save("%s.pdf" % self.slug,
+ File(open(pdf.get_filename())))
+