Ignore:
Timestamp:
25 Nov 2016, 09:51:58 (8 years ago)
Author:
Henrik Bettermann
Message:

Add option to render transcripts without passport picture and QR code.

Location:
main/waeup.kofa/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r14256 r14292  
    441.4.2.dev0 (unreleased)
    55=======================
     6
     7* Add option to render transcripts without passport picture and QR code.
    68
    79* Catch Reportlab `LayoutError`.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r14256 r14292  
    111111
    112112def render_student_data(studentview, context, omit_fields=(),
    113                         lang='en', slipname=None):
     113                        lang='en', slipname=None, no_passport=False):
    114114    """Render student table for an existing frame.
    115115    """
     
    209209            f_text = Paragraph(f_text, ENTRY1_STYLE)
    210210            data_middle.append([f_label,f_text])
     211
     212    if no_passport:
     213        table = Table(data_middle,style=SLIP_STYLE, colWidths=[5*cm, 5*cm])
     214        table.hAlign = 'LEFT'
     215        return table
    211216
    212217    # append QR code to the right
     
    843848                  show_scans=True, topMargin=1.5,
    844849                  omit_fields=(),
    845                   tableheader=None):
     850                  tableheader=None,
     851                  no_passport=False):
    846852        """Render pdf slips for transcripts.
    847853        """
     
    871877                studentview, view.context,
    872878                omit_fields, lang=portal_language,
    873                 slipname=filename))
     879                slipname=filename,
     880                no_passport=no_passport))
    874881
    875882        transcript_data = view.context.getTranscriptData()
Note: See TracChangeset for help on using the changeset viewer.