{# Template For UG Students In MES VIMALA STJOSEPH Collagees  #}
<style>
    @media print {
        #printBtnDiv { display : none !important; }
    }
    td, th { 
        padding: 5px; 
    }
    body {
        font-family: "Times New Roman", Times, serif; 
    }

    .primary-table {
        border-collapse: collapse !important;
        page-break-inside: auto;
        width: 100% !important;
    }

    .primary-table th {
        text-align: center;
        background: none !important;
        height: 4mm !important;
        border: 1px solid #000 !important;
        padding: 1mm !important;
    }
    .primary-table td {
        padding: 3px;
        line-height: 20px !important;
        height: 4mm !important;
        border: 1px solid #000;
        text-align: center;
        vertical-align: middle !important;
    }
    #subjectHeader {
        width: 100% !important;
    }
    #subjectHeader td {
        padding: 2mm;
        line-height: 15px !important;
        height: 4mm !important;
        vertical-align: middle !important;
        text-align: center !important;
    }
    .no-border {
        border-left: 1px solid #fff !important;
        border-right: 1px solid #fff !important;
        border-top: 1px solid #fff !important;
        border-bottom: 1px solid #fff !important;
    }
    .college-header {
        height: 35mm;
        width: auto;
        margin: 0 10%;
    }
    .outer-border {
        border: 1px solid black;
        border-collapse: collapse;
    }
    .center {
        margin-left: auto;
        margin-right: auto;
    }
    .abbr-table td {
        padding: 2mm 10mm 2mm 10mm;
        line-height: 14px !important;
        margin-top: 5mm;
    }
    .text-left {
        text-align: left !important;
    }
    .text-center {
        text-align: center !important;
    }
    .text-right {
        text-align: right !important;
    }
    .border-0 {
        border: 1px solid #fff !important;
    }
    .border-trl-0 {
        border-top: 1px solid #fff !important;
        border-left: 1px solid #fff !important;
        border-right: 1px solid #fff !important;
    }
    .border-rl-0 {
        border-left: 1px solid #fff !important;
        border-right: 1px solid #fff !important;
    }
    .border-b-0 {
        border-bottom: 1px solid #fff !important;
        border-top: 1px solid #000 !important;
    }
    .border-t-0 {
        border-top: 1px solid #fff !important;
        border-bottom: 1px solid #000 !important;
    }
    .noborder-r-0 {
        border-right-style: none;
    }
    .border-bt-0 {
        border-bottom: 1px solid #fff !important;
        border-top: 1px solid #fff !important;
    }
    .markTab {
        width: 100%;
        margin: 20px auto;
        font-size: 16px;
        padding: 0;
        text-align: center;
        border-collapse: collapse;
    }
    .markTab td {
        margin: 0;
        font-size: 16px;
        padding: 3px;
        color: #000;
        text-align: center;
        border-collapse: collapse;
    }
    .rotate {
        transform: rotate(270deg);
        text-align: center;
        line-height: 13px;
        height: 70px;
        width: 70px;
        margin: 0px -43px 0px 5px;
        text-align: center;
    }
    .failed {
        background-color: #c0c0c0 !important;
    }
    .removeTdBorder {
        border-left: 1px solid #fff !important;
        border-right: 1px solid #fff !important;
        border-bottom: 1px solid #fff !important;
        border-top: 1px solid #fff !important;
    }
    .tabular-table {
        border-collapse: collapse !important;
        page-break-inside: auto;
        page-break-after: always;
        width: 100% !important;
    }

    .tabular-table th {
        text-align: center;
        background: none !important;
        height: 3mm !important;
        padding: 1mm !important;
    }
    .tabular-table-border {
        border: 1px solid #000 !important;
    }
    .tabular-table td {
        padding: 2px;
        line-height: 20px !important;
        height: 4mm !important;
        border: 1px solid #000;
        text-align: center;
        vertical-align: middle !important;
    }
    .tabular-table tr {
        height: 6mm !important;
    }
    .small-font {
        font-weight: normal !important;
        font-size: 15px !important;
    }
    .b-b-0 {
        border-bottom: none !important;
    }
    .b-t-0 {
        border-top: none !important;
    }
    .b-r-0 {
        border-right: none !important;
    }
    .b-l-0 {
        border-left: none !important;
    }
    #details-table tr {
        height: 5mm !important;
    }
    tr.head-details-main th {
        line-height: 5mm !important;
    }
    tr.head-details-main th label {
        margin: 2mm 0 !important;
        width: 100% !important;
    }
</style>
<div class="page" style="width:100%;" id="sem-wise-result-sheet" data-cols-width="10,10,30">

    {% if data.displayContentOptions.rules.showFirstPageForSupply %}
        <table id="subjectHeader">
            <tr style="padding-top:300px!important">
                <td><img src="{{data.collegeData.collegeHeader}}" class="college-header"></td>
            </tr>
            <tr>
                <td><b style="font-size: 18px;">{{data.examRegistrationData.name}}</br></td>
            </tr>
            <tr>
                <td><b style="font-size: 18px;">TABULATION REGISTER</br></td>
            </tr>
        </table>
        <table style="width:100%!important;">
            <tr>
                <th data-f-bold='true' class="text-left" width="15%" style="padding: 2px !important;">Programme : </th>
                <th data-f-bold='true' class="text-left" width="85%" style="padding: 2px !important;">{{data.examRegistrationData.programName| raw}}</th>
            </tr>
            <tr>
                <th data-f-bold='true' class="text-left" width="15%" style="padding: 2px !important;">Date Of Publication of Result : </th>
                <th data-f-bold='true' class="text-left" width="85%" style="padding: 2px !important;">{{data.examRegistrationData.resultPublishDate}}</th>
            </tr>
            <tr>
                <th data-f-bold='true' class="text-left" width="15%" style="padding: 2px !important;">Month & Year :</th>
                <th data-f-bold='true' class="text-left" width="85%" style="padding: 2px !important;">{{data.examRegistrationData.examMonthName}} {{data.examRegistrationData.examYear}}</th>
            </tr>
        </table>
        <br>
        <br>
        <table style="width:100%!important;">
            <tr>
                <th data-f-bold='true' class="text-center" style="padding: 2px !important;">Board Meeting Held on : {{data.examRegistrationData.boardMeatingDate| raw}}</th>
            </tr>
            <tr>
                <th data-f-bold='true' class="text-center" style="padding: 2px !important;">Result Published on : {{data.examRegistrationData.resultPublishDate| raw}}</th>
            </tr>
            <tr>
                <th data-f-bold='true' class="text-center" style="padding: 2px !important;">Moderation : {{data.examRegistrationData.moderation}} </th>
            </tr>
        </table>
        <br>
        <br>
        <!-- start index tables   -->
        {% set subject_count = data.examRegistrationData.subjects|length %}
        {% set split_table = subject_count > 20 %}
        {% set mid_index = (subject_count // 2) + (subject_count is odd ? 1 : 0) %}
        
        {% macro render_subjects(subjects) %}
            {% for subject in subjects %}
                <tr>
                    <td class="text-left">{{ subject.code | raw }}</td>
                    <td class="text-left">{{ subject.name | raw }}</td>
                    <td>{{ subject.credit }}</td>
                </tr>
            {% endfor %}
        {% endmacro %}
        
        {% macro render_table(subjects) %}
            <table class="primary-table" style="width: 100%;">
                <tr>
                    <th data-f-bold='true' style="width:15%">Course Code</th>
                    <th data-f-bold='true' style="width:45%">Course</th>
                    <th data-f-bold='true' style="width:10%">Credit</th>
                </tr>
                {{ _self.render_subjects(subjects) }}
            </table>
        {% endmacro %}
        
        {% if split_table %}
            <div style="width: 100%; overflow: hidden;">
                <div style="float: left; width: 48%;">
                    {{ _self.render_table(data.examRegistrationData.subjects[:mid_index]) }}
                </div>
                <div style="float: right; width: 48%;">
                    {{ _self.render_table(data.examRegistrationData.subjects[mid_index:]) }}
                </div>
            </div>
        {% else %}
            {{ _self.render_table(data.examRegistrationData.subjects) }}
        {% endif %}
        
        <!-- end index table -->

        <br>
        <table class="primary-table center" style="width:20%!important;">
            <tr>
                <td><b>Total Credit :</b></td>
                <td><b>{{data.examRegistrationData.totalCredit}}</b></td>
            </tr>
        </table>
        <br>
        <table class="center outer-border abbr-table" style="width:60%!important;">

            <tr>
                <td class="text-center" colspan="3"><b>Abbreviations :</b></td>
            </tr>
            <tr>
                <td class="text-left">C => Credit</td>
                <td class="text-left">P => Practical</td>
                <td class="text-left">AB => ABSENT</td>
            </tr>
            <tr>
                <td class="text-left">T => Theory</td>
                <td class="text-left">D => Project / Dissertation</td>
                <td class="text-left">V => Viva</td>
            </tr>
            <tr>
                <td class="text-left">IA => Internal Mark</td>
                <td class="text-left">G => Grade</td>
                <td class="text-left">IC => Incomplete</td>
            </tr>
            <tr>
                <td class="text-left">Tot => Total Marks</td>
                <td class="text-left">ESE => External Mark</td>
                <td class="text-left">EC => Exam Cancelled</td>
            </tr>
            <tr>    
                <td class="text-left">CP => Credit Point</td> 
                <td class="text-left">GP => Grade Point</td>  
                <td></td>
            </tr>
        </table>
        <br>
    {% endif %}

    {% set subjectColSpan =   subjectLen * 5 %}
    {% set trcolSpan =  subjectColSpan + 5  %}
    {% set colspan =  7  %}
    {% set subjectLen =  data.examRegistrationData.subjects|length   %}
    {% set colspan = colspan + subjectLen * 9  %}
    {% set widthtr =  80 / subjectLen %}
    {% set extraColspan =  colspan - 4 %}
    <table class="markTab" border="0" cellpadding="0" cellspacing="0" style="{{data.displayContentOptions.rules.showFirstPageForSupply ? 'page-break-before: always' : ''}}">
    {% if not data.displayContentOptions.rules.showFirstPageForSupply %}
        <tr align = 'center'>
            <td colspan = "{{colspan}}" style = "text-align:center">
                <div style = "width:100%; text-align:center !important; display:inline-block; vertical-align:top">
                    <div style="text-align:center;">
                        <img style='height:40mm !important; width:auto;' src="{{data.collegeData.collegeHeader}}" class="college-header">
                    </div>
				</div>
            </td>
            <td colspan = "{{colspan}}">
               
			</td>
        </tr>
    {% endif %}
        <tr align = 'center'>
            <td colspan = "{{colspan}}" style = "text-align:center; position:relative;">
                <div style = "font-size: 15px; text-align:center !important; display:inline-block;">
                    <b style = "font-size: 18px;\">PROGRAMME : {{data.examRegistrationData.programName}} </b>
				</div>
                <div style = "width:20%; text-align:center !important; vertical-align:top; line-height: 22px; padding:0px; position:absolute; top:0; right:0;">
                    <table class="markTab" border="1" cellpadding="0" cellspacing="0" style = "">
                        <tr style="padding: 0px">
                            <th style="text-align:center !important" class="tabular-table-border">Credit Point Calculation</th>
                        </tr>
                        <tr style="padding: 0px">
                            <th style="text-align:left !important" class="tabular-table-border">Extwt = (Ewgp) / 30 * 4</th>
                        </tr>
                        <tr style="padding: 0px">
                            <th style="text-align:left !important" class="tabular-table-border">Wgpa = (Extwt + Iwgpa) / 5</th>
                        </tr>
                        <tr style="padding: 0px">
                            <th style="text-align:left !important" class="tabular-table-border">Crpt = Wgpa * Credit</th>
                        </tr>
                        <tr style="padding: 0px">
                            <th style="text-align:left !important" class="tabular-table-border">Minimum SGPA - 2.00 (P)</th>
                        </tr>
                        <tr style="padding: 0px">
                            <th style="text-align:left !important" class="tabular-table-border">Minimum WGPA - 2.00 (P)</th>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr align = 'center'>
            <td colspan = "{{colspan}}" style = "text-align:center ">
                <div style = "font-size: 15px; text-align:center !important; display:inline-block;">
                    <b style = "font-size: 18px;\">{{data.examRegistrationData.name}}</b>
				</div>
            </td>
        </tr>
        <tr align = 'center'>
            <td colspan = "{{colspan}}" style = "text-align:center ; padding:0px !important; position:relative;">
                <div style = "width:100%; text-align:center !important; vertical-align:top; line-height: 22px; margin: 0 auto;">
                    <table class="markTab" border="0" cellpadding="0" cellspacing="0" style="margin:0 auto; width:auto;">
                        <tr>
                            <td style="text-align:center !important;height: 22px;">
                                <span style="font-size: 18px;">{{data.examRegistrationData.programName}}</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center !important;height: 22px;">
                                <span style="font-size: 18px;">Semester {{data.examRegistrationData.semInSemNumber}} ({{data.examRegistrationData.examMonth}} / {{data.examRegistrationData.examYear}}) CSS</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center !important;height: 22px;">
                                <span style="font-size: 18px;">{{data.examRegistrationData.batchStartYear}} Admission</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center !important;height: 22px;">
                                <span style="font-size: 18px;">Board Meeting Held on : {{data.examRegistrationData.boardMeatingDate ? data.examRegistrationData.boardMeatingDate : '-'}}</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center !important;height: 22px;">
                                <span style="font-size: 18px;">Result Published on : {{data.examRegistrationData.resultPublishDate ? data.examRegistrationData.resultPublishDate : '-'}}</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center !important;height: 22px;">
                                <span style="font-size: 18px;">Moderation : {{data.examRegistrationData.moderation ? data.examRegistrationData.moderation : '-'}}</span>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
    <table class="markTab" border="1" cellpadding="0" cellspacing="0" style = "">
        <thead>
            <tr>
                {% if data.isPrint == false and data.displayContentOptions.printForSelectedStudents == 1 %}
                    <th data-f-bold='true' data-exclude="true" class="tabular-table-border sticky-column sticky-column-1 sticky-header" style="width:2%" rowspan="3">Select</th>
                {% endif %}
                <th rowspan="3" class='tabular-table-border text-center bold ' data-a-h='center' data-a-v='middle'>
                    <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Sl.No</text>
                    </svg>
                </th>
                <th rowspan="3"class='tabular-table-border text-center bold' data-a-h='center' data-a-v='middle'>
                    <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Register</text>
                    </svg>
                    <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>No /</text>
                    </svg>
                    <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Name</text>
                    </svg>
                </th>
                {% set subHeadColspan = 9 %}
                {% if data.displayContentOptions.rules.showModerationMark %}
                {% set subHeadColspan = subHeadColspan + 1 %}
                {% endif %}
                {% if data.displayContentOptions.rules.showGraceMark %}
                {% set subHeadColspan = subHeadColspan + 1 %}
                {% endif %}
                {% for subject in data.examRegistrationData.subjects %}
                    <th colspan="{{subHeadColspan}}" width='{{widthtr}}'  class='tabular-table-border text-center' data-a-h='center' data-a-v='middle'>{{subject.code}} <br> {{subject.name}}</th>
                {% endfor %}
                <th rowspan="3"class='tabular-table-border text-center bold' data-a-h='center' data-a-v='middle'>
                    <div style="width: 66px;">
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Total</text>
                        </svg>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Credit</text>
                        </svg>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Points</text>
                        </svg>
                    </div>
                </th>
                <th rowspan="3"class='tabular-table-border text-center bold' data-a-h='center' data-a-v='middle'>
                    <div style="width:50px;">
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Session</text>
                        </svg>
                    </div>
                </th>
                <th rowspan="3"class=' tabular-table-border text-center bold' data-a-h='center' data-a-v='middle'>
                    <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>SGPA</text>
                    </svg>
                </th>
                <th rowspan="3"class='tabular-table-border text-center bold' data-a-h='center' data-a-v='middle'>
                      <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Grade</text>
                    </svg>
                </th>
                 <th rowspan="3"class='tabular-table-border text-center bold' data-a-h='center' data-a-v='middle'>
                      <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Remarks</text>
                    </svg>
                </th>
            </tr>
            <tr>
                {% for subject in data.examRegistrationData.subjects %}
                    <th colspan="{{subHeadColspan}}" class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>Credit : {{subject.credit}}</th>
                {% endfor %} 
            </tr>
            <tr>
                {% for subject in data.examRegistrationData.subjects %}
                {% if data.displayContentOptions.rules.showModerationMark %}
                <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                    <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>MDN</text>
                    </svg>
                </th>
                {% endif %}
                {% if data.displayContentOptions.rules.showGraceMark %}
                <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                    <svg width='5mm' height='30mm'>
                        <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>GRM</text>
                    </svg>
                </th>
                {% endif %}
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>IWGP</text>
                        </svg>
                    </th>
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>IGrade</text>
                        </svg>
                    </th>
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>EWGP</text>
                        </svg>
                    </th>
                     <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>EWCPA</text>
                        </svg>
                    </th>
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>EGrade</text>
                        </svg>
                    </th>
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>WGPA</text>
                        </svg>
                    </th>
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Grade</text>
                        </svg>
                    </th>
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Cr Pt</text>
                        </svg>
                    </th>
                    <th class='tabular-table-border text-center ' data-a-h='center' data-a-v='middle'>
                        <svg width='5mm' height='30mm'>
                            <text transform='rotate(180)' y='-50%' x='-50%' style='writing-mode: tb;text-anchor: middle;'>Status</text>
                        </svg>
                    </th>
                {% endfor %} 
            </tr>
        </thead>
        <tbody>
            {% set slno = 0 %}
            {% for student in data.studentData %}
            {% for academicTerm in student.academicTerms %}
                {% set slno = slno + 1 %}
                <tr>
                    {% if data.isPrint == false and data.displayContentOptions.printForSelectedStudents == 1%}
                        <td data-exclude="true" rowspan="1" class="text-center tabular-table-border text-center tabular-table-border sticky-column sticky-column-1"><input type="checkbox" class="studentName" value='{{student.id}}'/></td>
                    {% endif %}
                    <td class="align-middle text-center ">{{slno}}</td>
                    <td style="text-align:left;padding: 4px; ">({{student.registerNo}}) <br/>{{student.name}} </td>
                        {% for subject in data.examRegistrationData.subjects %}
                            {% set isEntered = false %}
                            {% for studentSubject in academicTerm.subjects %}
                                {% if studentSubject.id == subject.id %}
                                    {% if data.displayContentOptions.rules.showModerationMark %}
                                        <td class="tabular-table-border text-center">{{studentSubject.moderationMark ? studentSubject.moderationMark | round:'0' }}</td>
                                    {% endif %}
                                    {% if data.displayContentOptions.rules.showGraceMark %}
                                        <td class="tabular-table-border text-center">{{studentSubject.graceMark ? studentSubject.graceMark | round:'0'}}</td>
                                    {% endif %}
                                    {% if studentSubject.isInternal %}
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">{{ studentSubject.percentageObtainedInternal|number_format(2, '.') }}</td>
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">{{ studentSubject.internalGrade }}</td>
                                    {% else %}
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">-</td>
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">-</td>
                                    {% endif %}
                                    {% if studentSubject.isExternal %}
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}} noborder-r-0">
                                            {% if studentSubject.attendanceStatus == "PRESENT" %}
                                                {{  studentSubject.percentageObtainedExternal|number_format(2, '.') }}
                                            {% elseif studentSubject.attendanceStatus == "MALPRACTICE" %}
                                                <span style="color:red;">MAL </span> 
                                            {% else %}
                                                <span style="color:red;"> AB </span> 
                                            {% endif %}
                                        </td>
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}} noborder-r-0">
                                            {% if studentSubject.attendanceStatus == "PRESENT" %}
                                                {{  studentSubject.externalMark|round(2) }}
                                            {% elseif studentSubject.attendanceStatus == "MALPRACTICE" %}
                                                <span style="color:red;">MAL </span> 
                                            {% else %}
                                                <span style="color:red;"> AB </span> 
                                            {% endif %}
                                        </td>
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}} noborder-r-0">{{ studentSubject.externalGrade }}</td>
                                    {% else %}
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">-</td>
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">-</td>
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">-</td>
                                    {% endif %}
                                    <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}} ">{{ studentSubject.wgpa|number_format(2, '.') }}</td>
                                    <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}} ">{{ studentSubject.grade }}</td>
                                    <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">{{ studentSubject.creditGradePoint }}</td>
                                    {% if studentSubject.failedStatus == 'PASSED' %}
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">Pass</td>
                                    {% else %}
                                        <td class="tabular-table-border text-center {{ studentSubject.failedStatus == "PASSED" ? '' : 'failed'}}">Fail</td>
                                    {% endif %}
                                    {% set isEntered = true %}
                                {% endif %}
                            {% endfor %}
                            {% if isEntered == false %}
                                {% if data.displayContentOptions.rules.showModerationMark %}
                                    <td class="tabular-table-border text-center"></td>
                                {% endif %}
                                {% if data.displayContentOptions.rules.showGraceMark %}
                                    <td class="tabular-table-border text-center"></td>
                                {% endif %}
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                                <td class="tabular-table-border text-center"> * </td>
                            {% endif %}
                        {% endfor %}
                    {% if academicTerm.failedStatus == 'PASSED' %}
                        <td class="tabular-table-border align-middle text-center">{{academicTerm.semesterCreditGradePoint}}</td>
                        <td class="tabular-table-border align-middle text-center">{{'%02d'|format(data.examRegistrationData.examMonth)}}/{{data.examRegistrationData.examYear}}</td>
                        <td class="tabular-table-border align-middle text-center">{{academicTerm.semesterSgpa}}</td>
                        <td class="tabular-table-border align-middle text-center">{{academicTerm.semesterGrade}}</td>
                    {% else %}
                        <td class="tabular-table-border">-</td>
                        <td class="tabular-table-border">-</td>
                        <td class="tabular-table-border">-</td>
                        <td class="tabular-table-border">-</td>
                    {% endif %}
                    {# <td></td> #}
                    <td class="tabular-table-border"></td>
                </tr>
            {% endfor %} 
            {% endfor %}
        </tbody>
    </table>
    <div style="margin: 100px 0 0 0; width: 100%; font-size: 16px">
        <div style = "width:16%;margin:0 auto; text-align:center;float:left;"><b>Chairman</b></div>
        <div style = "width:16%;margin:0 auto; text-align:center;float:left;"><b>Clerk</b></div>
        <div style = "width:16%;margin:0 auto; text-align:center;float:left;"><b>Seal</b></div>
        <div style = "width:16%;margin:0 auto; text-align:center;float:left;"><b>ACE</b></div>
        <div style = "width:16%;margin:0 auto; text-align:center;float:left;"><b>CE</b></div>
        <div style = "width:16%;margin:0 auto; text-align:center;float:left;"><b>Principal</b></div>
    </div>
</div>
