Ignore:
Timestamp:
29 Oct 2012, 13:13:18 (12 years ago)
Author:
Henrik Bettermann
Message:

Customize renderPDF.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r9435 r9459  
    126126        self.assertMatches('...First Sitting Record...',
    127127                           self.browser.contents)
     128        self.browser.open(self.student_path + '/clearance_slip.pdf')
     129        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     130        self.assertEqual(self.browser.headers['Content-Type'],
     131                         'application/pdf')
    128132
    129133    def test_student_access(self):
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r9456 r9459  
    1818import grok
    1919from time import time
    20 from zope.component import createObject
    21 from waeup.kofa.interfaces import CLEARED, RETURNING, PAID
     20from zope.component import createObject, getUtility
     21from reportlab.lib.styles import getSampleStyleSheet
     22from reportlab.platypus import Paragraph, Image, Table, Spacer
     23from waeup.kofa.interfaces import IKofaUtils, CLEARED, RETURNING, PAID
    2224from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
    2325from waeup.kofa.accesscodes import create_accesscode
    2426from waeup.uniben.interfaces import MessageFactory as _
     27from waeup.kofa.students.utils import (trans, render_student_data,
     28    render_table_data, get_signature_table)
    2529
    2630class CustomStudentsUtils(NigeriaStudentsUtils):
     
    216220
    217221        # Insert scanned docs
    218         data.extend(docs_as_flowables(view, portal_language))
     222        #data.extend(docs_as_flowables(view, portal_language))
    219223
    220224       # Insert content table (optionally on second page)
     
    234238        # Insert history
    235239        if filename.startswith('clearance') or filename.startswith('course'):
     240            data.append(Spacer(1, 20))
    236241            hist_translation = trans(_('Workflow History'), portal_language)
    237242            data.append(Paragraph(hist_translation, style["Heading3"]))
Note: See TracChangeset for help on using the changeset viewer.