{# Template For BLISc SHRIST Collage  #}
<style>
    @media print {
        #printBtnDiv { display : none !important; }
    }
	.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;
	}
	#succesRateReportHeader {
		width: 100% !important;
		height: 4mm !important;
	}

	#succesRateReportHeader td {
		padding: 2mm;
		line-height: 15px !important;
		height: 4mm !important;
		border: 1px solid #000;
		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%;
	}
    .text-left{
        text-align:left!important;
    }
    .text-center{
        text-align:center!important;
    }
    .text-right{
        text-align:right!important;
    }
    .p-t-20{
        padding-top:10px!important;
    }
	.p-t-50{
        padding-top:50px!important;
    }
	
    .p-b-10{
        padding-bottom:10px!important;
    }
    .p-20{
        padding:20px!important;
    }
    .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;
    }
	.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;
	}
    .addTdBorder{
		border-left:1px solid #000 !important;
		border-right:1px solid #000 !important;
		border-bottom:1px solid #000 !important;
		border-top:1px solid #000 !important;
	}
	.tabular-table {
		border-collapse: collapse !important;
		page-break-inside: auto;
		width: 100% !important;
	}

	.tabular-table th {
		text-align: center;
		background: none !important;
		height: 3mm !important;
		/* border: 1px solid #000 !important; */
		padding: 1mm !important;
		font-size:13px;
	}
	.tabular-table-border{
		border: 1px solid #000 !important;
	}
	.tabular-table td {
		padding: 2px;
		line-height: 16px !important;
		height: 4mm !important;
		border: 1px solid #000;
		text-align: center;
		vertical-align: middle !important;
		/* page-break-after:always; */
	}
	.tabular-table tr{
		/* page-break-after:always; */
		height: 6mm !important;
	}
	.small-font{
		font-weight: normal !important;
		font-size: 16px !important;
	}
	.failed{
		/* background-color:#c0c0c0 !important; */
	}
	.b-r-t {
            border-right-width: thick !important;
    }
    /* 1. Base sticky column styling */
    @media screen {
    .sticky-column {
        position: sticky;
        left: 0;
        background-color: white !important;
        z-index: 3; 
        border: 1px solid #000 !important;

    }

    /* 2. Specific column adjustments */
    .sticky-column-1 { 
        left: 0;
        min-width: 30px;
        max-width: 30px;
    }
    .sticky-column-2 { 
        left: 30px;
        min-width: 35px;
        max-width: 35px;
    }
    .sticky-column-3 { 
        left: 65px;
        min-width: 100px;
        max-width: 200px;
    }
    .sticky-column-4 { 
        left: 165px;
        min-width: 150px;
        max-width: 150px;
    }
    .tabular-table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }
    .tabular-table td {
        border-bottom: 1px solid #000 !important;
    }

    .tabular-table thead th.sticky-header {
        position: sticky;
        top: 0;
        z-index: 4; 
        background-color: white !important;
        border: 1px solid #000 !important;
        box-shadow: 0 1px 0 #000;
    }
    .stud-row td{
		font-size: 18px !important;
	}
}
    
</style>
<div class="page" style="width:100%;" id="sem-wise-result-sheet" data-cols-width="10,10,30,40">
    {% set columnCount = (data.examRegistrationData.subjects|length * 5) %}
    {% set catHeadCount = (data.examRegistrationData.headerCategories|length)  %}
    {% set totalColumnCount = columnCount + catHeadCount + 4 %}
    <table style="width: 100%;">
        <tr align = 'center'>
            <td data-f-bold='true' data-a-h='center' colspan = "{{totalColumnCount}}" style = "text-align:center;" class="removeTdBorder">
                <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>
        </tr>
        <tr>
            <td  data-f-bold='true' data-a-h='center' class="removeTdBorder subjectHeader" colspan="{{totalColumnCount}}" style = "text-align:center;">
                <b style="font-size: 19px;">{{data.examRegistrationData.name}}</b>
            </td>
        </tr>
        <tr>
            <td data-f-bold='true' data-a-h='center' class="removeTdBorder subjectHeader" colspan="{{totalColumnCount}}" style = "text-align:center;">
                <b style="font-size: 19px;">TABULATON REGISTER</br>
            </td>
        </tr>
    </table>
    <table style="width:100%!important;margin-bottom:2mm;">
        <tr>
            <th colspan='4' data-f-bold='true' class="text-left">Programme : {{data.examRegistrationData.programName| raw}}</th>
            <th colspan='4' data-f-bold='true' class="text-right">&nbsp;</th>
        </tr>
        <tr>
            <th colspan='4' data-f-bold='true' class="text-left">Academic Year :  {{data.examRegistrationData.academicExamYearShort}} </th>
            <th colspan='4' data-f-bold='true' class="text-right">Semester : {{data.examRegistrationData.academicTermName}}</th>
        </tr>
        <tr style="display:none;"><td data-f-bold='true'><b>Note:</b> * Indicates that internal marks have not been entered for the student.</td></tr>
    </table>
    {# --- Dynamically split subjects into two halves (ceil half on first page) --- #}
    {% set allSubjects = data.examRegistrationData.subjects %}
    {% set totalSubjects = allSubjects|length %}
    {% set firstHalfCount = ( (totalSubjects / 2) | round(0, 'ceil') ) %}
    {% set firstSubjects = allSubjects|slice(0, firstHalfCount) %}
    {% set secondSubjects = allSubjects|slice(firstHalfCount) %}

    {# ------------- FIRST TABLE (first 5 subjects or all if <=5) ------------- #}
    {% if data.examRegistrationData.hasInternalMarkNotEnteredScenario == 1 %}
        <div style = 'text-align:left'><b>Note:</b> * Indicates that internal marks have not been entered for the student.</div>
    {% endif %}
    <table class="tabular-table" id="tabulationRegisterReportExcel" style="width:100%!important;">
        <thead>
            <tr>
                {% if data.isPrint == 0 %}
                    <th data-f-bold='true' data-exclude="true" class="tabular-table-border sticky-column sticky-column-1 sticky-header" style="width:2%" rowspan="2">Select</th>
                {% endif %}
                <th data-f-bold='true' class="tabular-table-border sticky-column sticky-column-2 sticky-header" style="width:2%" rowspan="2">Sl No</th>
                <th data-f-bold='true' class="tabular-table-border sticky-column sticky-column-3 sticky-header" style="width:10%" rowspan="2">Register No.</th>
                <th data-f-bold='true' class="tabular-table-border sticky-column sticky-column-4 sticky-header" style="width:20%; padding-left:15px !important; padding-right:15px !important" rowspan="2">Name&nbsp;of&nbsp;the&nbsp;Student</th>
                {% set haslang = 0 %}
                {% for subject in firstSubjects %}
                    {% if subject.isGroup == 1 %}
                        {% set haslang = 1 %}
                        <th data-f-bold='true' class="tabular-table-border" style="width:5%" rowspan="2">{{subject.name | raw}}</th>
                    {% endif %}
                {% endfor %}
                {% for subject in firstSubjects %}
                    {% set subColspan = 3 %}
                    {% if data.displayContentOptions.rules.showModerationMark %}{% set subColspan = subColspan + 1 %}{% endif %}
                    {% if data.displayContentOptions.rules.showGraceMark %}{% set subColspan = subColspan + 1 %}{% endif %}
                    <th data-f-bold='true' class="tabular-table-border text-center" colspan="{{subColspan}}" style="width:20%">{{subject.code | raw}} <br> {{subject.name|raw}}</th>
                {% endfor %}
                {# Total appears in this table ONLY if there is no second table #}
                {% if secondSubjects|length == 0 %}
                    <th data-f-bold='true' class="tabular-table-border text-center" style="width:2%" rowspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br> Max: </th>
                {% endif %}
            </tr>
            <tr>
                {% for subject in firstSubjects %}
                    {% if data.displayContentOptions.rules.showModerationMark %}
                    <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">MDN</span></th>
                    {% endif %}
                    {% if data.displayContentOptions.rules.showGraceMark %}
                    <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">GRM</span></th>
                    {% endif %}
                    <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">INT</span><br>Max {{subject.internalMaxMark}}</th>
                    <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">EXT</span><br>Max {{subject.externalMaxMark}}</th>
                    <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">TOT</span><br>Max</th>
                {% endfor %}
            </tr>
        </thead>
        <tbody class="text-center">
            {% for student in data.studentData %}
                <tr>
                    {% set academicTerm = student.academicTerms | first %}
                    {% if data.isPrint == false %}
                        <td data-exclude="true" class="text-center tabular-table-border sticky-column sticky-column-1"><input type="checkbox" class="studentName" value='{{student.id}}' /></td>
                    {% endif %}
                    <td class="text-center sticky-column sticky-column-2">{{loop.index}}</td>
                    <td class="text-center sticky-column sticky-column-3">{{student.registerNo}}</td>
                    <td class="text-left sticky-column sticky-column-4">{{student.name}}</td>
                    {% set langcount = 0 %}
                    {% set displayHeadCount = 0 %}
                    {% set displayHeadTag3Display = displayHeadCount %}
                    {% for groupSubject in firstSubjects %}
                        {% if groupSubject.isGroup == 1 %}
                            {% for studentSubject in academicTerm.subjects %}
                                {% if studentSubject.id == groupSubject.id %}
                                    {% set haslang = 1 %}
                                    <th data-f-bold='true' class="tabular-table-border" style="width:5%" rowspan="2">{{studentSubject.name | raw}}</th>
                                {% endif %}
                            {% endfor %}
                        {% endif %}
                    {% endfor %}
                    {% if haslang and langcount == 0 %}
                        <td></td>
                    {% endif %}
                    {% for subject in firstSubjects %}
                        {% set isEntered = false %}
                        {% for studentSubject in academicTerm.subjects %}
                            {% if studentSubject.id == subject.id %}
                                {% set displayHeadCount = displayHeadCount + 1 %}
                                {% if studentSubject.attendanceStatus == "ABSENT" %}
                                    {% if data.displayContentOptions.rules.showModerationMark %}<td class="failed">{{ studentSubject.moderationMark }}</td>{% endif %}
                                    {% if data.displayContentOptions.rules.showGraceMark %}<td class="failed">{{ studentSubject.graceMark }}</td>{% endif %}
                                    <td class="failed">{{ studentSubject.isInternal == 1 ? studentSubject.internalAttendanceStatus == 'ABSENT' ? 'AB' : studentSubject.internalMark : "-" }}</td>
                                    <td class="failed">AB</td>
                                    <td class="failed b-r-t">-</td>
                                {% elseif studentSubject.attendanceStatus == "MALPRACTICE" %}
                                    {% if data.displayContentOptions.rules.showModerationMark %}<td class="failed">{{ studentSubject.moderationMark }}</td>{% endif %}
                                    {% if data.displayContentOptions.rules.showGraceMark %}<td class="failed">{{ studentSubject.graceMark }}</td>{% endif %}
                                    <td class="failed">{{ studentSubject.isInternal == 1 ? studentSubject.internalAttendanceStatus == 'ABSENT' ? 'AB' : studentSubject.internalMark : "-" }}</td>
                                    <td class="failed">MAL</td>
                                    <td class="failed b-r-t">-</td>
                                {% else %}
                                    {% if data.displayContentOptions.rules.showModerationMark %}<td class="failed">{{ studentSubject.moderationMark }}</td>{% endif %}
                                    {% if data.displayContentOptions.rules.showGraceMark %}<td class="failed">{{ studentSubject.graceMark }}</td>{% endif %}
                                    {% if studentSubject.isInternal == 1 %}
                                        <td>{{ studentSubject.internalAttendanceStatus == 'ABSENT' ? 'AB' : studentSubject.internalMark }}</td>
                                    {% else %}
                                        <td class="">-</td>
                                    {% endif %}
                                    {% if studentSubject.isExternal == 1 %}
                                        <td>{{ studentSubject.externalMark|round }}</td>
                                    {% else %}
                                        <td class="">-</td>
                                    {% endif %}
                                    <td class="b-r-t">{{ studentSubject.markObtained }}</td>
                                {% endif %}
                                {% set isEntered = true %}
                            {% endif %}
                        {% endfor %}
                        {% if isEntered == false %}
                            {% if data.displayContentOptions.rules.showModerationMark %}<td></td>{% endif %}
                            {% if data.displayContentOptions.rules.showGraceMark %}<td></td>{% endif %}
                            <td></td>
                            <td></td>
                            <td class="b-r-t"></td>
                        {% endif %}
                    {% endfor %}
                    {% if secondSubjects|length == 0 %}
                        <td>{{ academicTerm.failedStatus == 'PASSED' ? academicTerm.semesterMarkObtained : '-' }}</td>
                    {% endif %}
                </tr>
            {% endfor %}
        </tbody>
    </table>

    {# ------------- SECOND TABLE (remaining subjects + Total) ------------- #}
    {# --- Add signature footer on first page as well when there is a second page --- #}
    {% if secondSubjects|length > 0 %}
        <table style="width:100%!important; page-break-before: avoid !important">
            <tr>
                <td colspan="100" class="no-border p-t-20" style="font-weight: bold !important; padding-top:45px !important">
                    <span style="float:left!important; width:15%">&nbsp;</span>
                    <span style="float:left!important; width:25%">Checked by</span>
                    <span style="float:center!important; width:30%">Controller of Examinations</span>
                    <span style="float:right!important; width:30%">Principal</span>
                </td>
            </tr>
        </table>
    {% endif %}
    
    {% if secondSubjects|length > 0 %}
        <div style="page-break-before:always;"></div>
        {# --- Repeated Header For Second Page --- #}
        <table style="width: 100%;">
            <tr align='center'>
                <td colspan="{{totalColumnCount}}" style="text-align:center;" class="removeTdBorder">
                    <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>
            </tr>
            <tr>
                <td class="removeTdBorder subjectHeader" colspan="{{totalColumnCount}}" style="text-align:center;">
                    <b style="font-size: 19px;">{{data.examRegistrationData.name}}</b>
                </td>
            </tr>
            <tr>
                <td class="removeTdBorder subjectHeader" colspan="{{totalColumnCount}}" style="text-align:center;">
                    <b style="font-size: 19px;">TABULATON REGISTER</b>
                </td>
            </tr>
        </table>
        <table style="width:100%!important; margin-bottom:2mm;">
            <tr>
                <th data-f-bold='true' class="text-left">Programme : {{data.examRegistrationData.programName| raw}}</th>
                <th data-f-bold='true' class="text-right">&nbsp;</th>
            </tr>
            <tr>
                <th data-f-bold='true' class="text-left">Academic Year :  {{data.examRegistrationData.academicExamYearShort}}</th>
                <th data-f-bold='true' class="text-right">Semester : {{data.examRegistrationData.academicTermName}}</th>
            </tr>
        </table>
        <table class="tabular-table" style="width:100%!important;">
            <thead>
                <tr>
                    {% if data.isPrint == 0 %}
                        <th data-f-bold='true' data-exclude="true" class="tabular-table-border sticky-column sticky-column-1 sticky-header" style="width:2%" rowspan="2">Select</th>
                    {% endif %}
                    <th data-f-bold='true' class="tabular-table-border sticky-column sticky-column-2 sticky-header" style="width:2%" rowspan="2">Sl No</th>
                    <th data-f-bold='true' class="tabular-table-border sticky-column sticky-column-3 sticky-header" style="width:10%" rowspan="2">Register No.</th>
                    <th data-f-bold='true' class="tabular-table-border sticky-column sticky-column-4 sticky-header" style="width:20%; padding-left:15px !important; padding-right:15px !important" rowspan="2">Name&nbsp;of&nbsp;the&nbsp;Student</th>
                    {% set haslang2 = 0 %}
                    {% for subject in secondSubjects %}
                        {% if subject.isGroup == 1 %}
                            {% set haslang2 = 1 %}
                            <th data-f-bold='true' class="tabular-table-border" style="width:5%" rowspan="2">{{subject.name | raw}}</th>
                        {% endif %}
                    {% endfor %}
                    {% for subject in secondSubjects %}
                        {% set subColspan2 = 3 %}
                        {% if data.displayContentOptions.rules.showModerationMark %}{% set subColspan2 = subColspan2 + 1 %}{% endif %}
                        {% if data.displayContentOptions.rules.showGraceMark %}{% set subColspan2 = subColspan2 + 1 %}{% endif %}
                        <th data-f-bold='true' class="tabular-table-border text-center" colspan="{{subColspan2}}" style="width:20%">{{subject.code | raw}} <br> {{subject.name|raw}}</th>
                    {% endfor %}
                    <th data-f-bold='true' class="tabular-table-border text-center" style="width:2%" rowspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br> Max: </th>
                </tr>
                <tr>
                    {% for subject in secondSubjects %}
                        {% if data.displayContentOptions.rules.showModerationMark %}
                        <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">MDN</span></th>
                        {% endif %}
                        {% if data.displayContentOptions.rules.showGraceMark %}
                        <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">GRM</span></th>
                        {% endif %}
                        <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">INT</span><br>Max {{subject.internalMaxMark}}</th>
                        <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">EXT</span><br>Max {{subject.externalMaxMark}}</th>
                        <th data-f-bold='true' class="tabular-table-border text-center" style="font-size:11px; width:2%"><span style="padding-left: 10px;padding-right: 10px;">TOT</span><br>Max</th>
                    {% endfor %}
                </tr>
            </thead>
            <tbody class="text-center">
                {% for student in data.studentData %}
                    <tr class="stud-row">
                        {% set academicTerm = student.academicTerms | first %}
                        {% if data.isPrint == false %}
                            <td data-exclude="true" class="text-center tabular-table-border sticky-column sticky-column-1"><input type="checkbox" class="studentName" value='{{student.id}}' /></td>
                        {% endif %}
                        <td class="text-center sticky-column sticky-column-2">{{loop.index}}</td>
                        <td class="text-center sticky-column sticky-column-3">{{student.registerNo}}</td>
                        <td class="text-left sticky-column sticky-column-4">{{student.name}}</td>
                        {% set langcount = 0 %}
                        {% set displayHeadCount = 0 %}
                        {% set displayHeadTag3Display = displayHeadCount %}
                        {% for groupSubject in secondSubjects %}
                            {% if groupSubject.isGroup == 1 %}
                                {% for studentSubject in academicTerm.subjects %}
                                    {% if studentSubject.id == groupSubject.id %}
                                        {% set haslang2 = 1 %}
                                        <th data-f-bold='true' class="tabular-table-border" style="width:5%" rowspan="2">{{studentSubject.name | raw}}</th>
                                    {% endif %}
                                {% endfor %}
                            {% endif %}
                        {% endfor %}
                        {% if haslang2 and langcount == 0 %}
                            <td></td>
                        {% endif %}
                        {% for subject in secondSubjects %}
                            {% set isEntered = false %}
                            {% for studentSubject in academicTerm.subjects %}
                                {% if studentSubject.id == subject.id %}
                                    {% set displayHeadCount = displayHeadCount + 1 %}
                                    {% if studentSubject.attendanceStatus == "ABSENT" %}
                                        {% if data.displayContentOptions.rules.showModerationMark %}<td class="failed">{{ studentSubject.moderationMark }}</td>{% endif %}
                                        {% if data.displayContentOptions.rules.showGraceMark %}<td class="failed">{{ studentSubject.graceMark }}</td>{% endif %}
                                        <td class="failed">{{ studentSubject.isInternal == 1 ? studentSubject.internalMark : "-" }}</td>
                                        <td class="failed">AB</td>
                                        <td class="failed b-r-t">-</td>
                                    {% elseif studentSubject.attendanceStatus == "MALPRACTICE" %}
                                        {% if data.displayContentOptions.rules.showModerationMark %}<td class="failed">{{ studentSubject.moderationMark }}</td>{% endif %}
                                        {% if data.displayContentOptions.rules.showGraceMark %}<td class="failed">{{ studentSubject.graceMark }}</td>{% endif %}
                                        <td class="failed">{{ studentSubject.isInternal == 1 ? studentSubject.internalMark : "-" }}</td>
                                        <td class="failed">MAL</td>
                                        <td class="failed b-r-t">-</td>
                                    {% else %}
                                        {% if data.displayContentOptions.rules.showModerationMark %}<td class="failed">{{ studentSubject.moderationMark }}</td>{% endif %}
                                        {% if data.displayContentOptions.rules.showGraceMark %}<td class="failed">{{ studentSubject.graceMark }}</td>{% endif %}
                                        {% if studentSubject.isInternal == 1 %}
                                            <td>{{ studentSubject.internalMark }}</td>
                                        {% else %}
                                            <td class="">-</td>
                                        {% endif %}
                                        {% if studentSubject.isExternal == 1 %}
                                            <td>{{ studentSubject.externalMark|round }}</td>
                                        {% else %}
                                            <td class="">-</td>
                                        {% endif %}
                                        <td class="b-r-t">{{ studentSubject.markObtained }}</td>
                                    {% endif %}
                                    {% set isEntered = true %}
                                {% endif %}
                            {% endfor %}
                            {% if isEntered == false %}
                                {% if data.displayContentOptions.rules.showModerationMark %}<td></td>{% endif %}
                                {% if data.displayContentOptions.rules.showGraceMark %}<td></td>{% endif %}
                                <td></td>
                                <td></td>
                                <td class="b-r-t"></td>
                            {% endif %}
                        {% endfor %}
                        <td>{{ academicTerm.failedStatus == 'PASSED' ? academicTerm.semesterMarkObtained : '-' }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% endif %}
    <table style="width:100%!important; page-break:before: avoid !important">
        <tr>
            <td colspan="100" class="no-border p-t-50" style="font-weight: bold !important; padding-top:85px !important">
                <span style="float:left!important; width:15%">&nbsp;</span>
                <span style="float:left!important; width:25%">Checked by</span>
                <span style="float:center!important; width:30%">Controller of Examinations</span>
                <span style="float:right!important; width:30%">Principal</span>
            </td>
        </tr>
        <tr>
            <td colspan="100" class="no-border p-t-20 text-center" style="font-size:11px!important; font-weight: bold !important">
                {% set count = 0 %}
                {% for grade in data.gradeSchemes %}
                    {{grade.name}}
                    -
                    {{grade.className}}
                    ({{grade.rangeFrom|number_format(2, '.', '')}}-{{grade.rangeTo|number_format(2, '.', '')}})
                    {% if loop.last %}
                    {% else %}
                    ,{% endif %}
                {% endfor %}
            </td>
        </tr>
    </table>
</div>
