{# Template For SFS revaluation Memo    #}
<style>
    .markdisplay{
        border-right:1px solid #000 !important;
        border-left:1px solid #000 !important;
        border-top:1px solid #000 !important;
        border-bottom:1px solid #000 !important;
    }
    .no-border-table tr td{
        border-right:1px solid #fff !important;
        border-left:1px solid #fff !important;
        border-top:1px solid #fff !important;
        border-bottom:1px solid #fff !important;
    }
	.heading { font-weight: bold; }
	.footer-class { font-size: 12px; text-align: center;}
    .pages {
        font-family: 'Times New Roman', serif;
        width: 100%;
        padding-right: .5cm;
        padding-left: .5cm;
        padding-top: .5cm;
        padding-bottom: .5cm;
        background: no-repeat;
        -webkit-background-size: contain;
        -moz-background-size: contain;
        -o-background-size: contain;
        background-size: contain;
        page-break-after: always;
    }
    .college-header{
        height:35mm;
        width:80%;
        margin:0 10%;
    }
    
</style>
{% for student in data.studentData %}
    <div class="pages" >
        {% set trcolSpan =  2 %}
        <table id='markTable' style=" margin:0 auto; text-align:center;width: 100%; font-size:12px;border:1px solid #fff;" cellpadding="0" cellspacing="0" border="0">
            <tr style=''>
                <td colspan="{{trcolSpan}}" style="height:auto; vertical-align:top; text-align:left;border-bottom:1px solid #fff !important; " >
                    
                    <div style="text-align:center;margin-top:10px">
                    {% if data.collegeAndOtherData.isHeaderEnabled %}
                        <img id='college_header' class = 'college-header' src = '{{data.collegeAndOtherData.collegeHeader}}'>
                    {% else %}
                        <img id='college_logo' class = 'college_logo' src = '{{data.collegeAndOtherData.collageLogo}}' style = 'width: 85px; height: 115px;'>
                        <div style="width:67%;margin:5px auto;text-align:center;">
                            <div style='font-size:20px; margin-top:10px;'>OFFICE OF THE CONTROLLER OF EXAMINATIONS</div>
                        </div>
                            <div align="center">
                            <div style='font-size:20px; margin-top:10px;'>{{data.collegeAndOtherData.collegeName}} </div>
                            <div>{{data.collegeAndOtherData.collegeAddress}}</div>
                            <div>{{data.collegeAndOtherData.collegeAddress2 |escape}}</div>
                           
                        </div>
                    {% endif %}
                    </div>
                </td>
            </tr>
            <tr>
                <td style='width:50%;height:15px;text-align:left;padding:0px 0px 0 25px; border-bottom:1px solid #fff !important;'  >
                </td>
                <td style='width:50%;height:15px;text-align:right;padding:0px 25px 0 0px; border-bottom:1px solid #fff !important;'  >  
                    <div style="text-align:right;font-size:16px; "> Date : {{ data.displayContentOptions.markListDate }}</div>
                </td>
            </tr>
            <tr >
                <td colspan="{{trcolSpan}}" style="padding:10px 0 0 0; height:auto; vertical-align:top;border-bottom:1px solid #fff !important; text-align:center;" >
                    <div style='font-size:20px; margin-top:10px;'>REVALUATION RESULT MEMO</div>
                </td>
            </tr>
            <tr >
                <td colspan="{{trcolSpan}}" style=" text-align:left;border-bottom:1px solid #fff !important; padding:0px 30px 0px 30px;" >
                   <div style='font-size:18px; margin-top:10px;line-height: 1.6;text-align: justify;text-justify: inter-word;'>
                        With reference to the application for Revaluation dated 
                        {{ student.memoDate}}, &nbsp;{{ student.name }} with Register No. {{ student.registerNo }}  is hereby informed that the following is the result of the 
                        Revaluation of answer paper(s) of {{data.examRegistrationData.parentExamRegistrationName}}. 
                   
                   </div>
                </td>
            </tr>

            <tr>
                <td colspan="{{trcolSpan}}" style="border-bottom:1px solid #fff !important;padding:10px 10px 10px 10px;">
                    <table class="markdisplay" cellpadding="0" cellspacing="0" border="1" align="left" style="font-size:14px;width:100%;">
                        <tr style="height:60px;" class='heading'>
                            <th rowspan="2" width='3%' style="text-align:center;">Sl.<br>No.</th>
                            <th rowspan="2" width='12%' style="text-align:center;">Course Code</th>
                            <th rowspan="2" width='33%' style="text-align:center;">Course Name</th>
                            <th colspan="2" width='12%' style="text-align:center;">Internal Mark</th>
                            <th rowspan="2" width='8%' style="text-align:center;">Mark obtained on original valuation</th>
                            <th rowspan="2" width='8%' style="text-align:center;">Maximum External Mark</th>
                            <th rowspan="2" width='8%' style="text-align:center;">Mark obtained on Revaluation</th>
                            <th rowspan="2" width='8%' style="text-align:center;">Grade obtained on original valuation</th>
                            <th rowspan="2" width='8%' style="text-align:center;">Grade obtained on Revaluation</th>
                        </tr>
                        <tr style="height:60px;" class='heading'>
                            <th width='5%' style="text-align:center;">Obtained</th>
                            <th width='5%' style="text-align:center;">Maximum</th>
                        </tr>
                        {% set slno = 0 %}
                        {% for subject in student.subjects %}
                            <tr style="height:35px;" class='inner-tr'>
                            {% set slno = slno + 1 %}
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">{{slno |raw}}</td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">{{subject.code |raw}}</td>
                                <td class="align-middle" style=" text-align:left; vertical-align: middle; padding-left:10px;">{{subject.name |raw}}</td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">{{subject.internalMark |number_format(2, '.', ',')}}</td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">{{subject.internalMaxMark |number_format(2, '.', ',')}}</td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">{{subject.externalMarkObtainedInExam |number_format(2, '.', ',')}}</td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">{{subject.externalMaxMark |number_format(2, '.', ',')}}</td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">
                                    {% if subject.isChangeMarkByRevaluation %}
                                        {{subject.revaluationMark |number_format(2, '.', ',')}}
                                    {% else %}
                                        <span style="color:red;">No Change</span>
                                    {% endif %}
                                </td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">{{subject.externalMarkObtainedInExamGrade |raw}}</td>
                                <td class="align-middle" style=" text-align:center; vertical-align: middle; ">
                                    {% if subject.isChangeGradeByRevaluation %}
                                        {{subject.revaluationGradeUpdated |raw}}
                                    {% else %}
                                        <span style="color:red;">No Change</span>
                                    {% endif %}
                                    
                                </td>
                            </tr>
                        {% endfor %}
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="{{trcolSpan}}" style="padding:10px 25px 10px 25px;">
                   <ul>
                        <li>
                            <div style="text-align:left;font-size:16px; "> The above marks are before effecting moderation/ grace marks, if any.</div>
                        </li>
                   </ul>
                </td>
            </tr>
            <tr>
                <td colspan="{{trcolSpan}}" style="padding:10px 25px 40px 25px;">
                    <table class='footer-class no-border-table' border="0" style='width:100%;'>
                        <tr>
                            <td style='width:37%'>
                                {# <img src='{{data.collegeAndOtherData.principalSign}}' style='width:100px;height:40px;padding-left:10px;'/> <br/> #}
                                <br/>
                                {# <b style='padding-left: 16px;padding-right: 1px;'>{{data.collegeAndOtherData.principalName}}</b> #}
                                <br>{{data.collegeAndOtherData.principalVar}}
                            </td>
                            <td style='width:31%' >
                                <img src='{{data.collegeAndOtherData.collegeSeal}}' style='width:120px;height:90px;padding-left:10px;'/> <br/>
                                Seal
                            </td>
                            <td style='width:33%' >
                                {# <img src='{{data.collegeAndOtherData.coeSign}}' style='width:100px;height:33px;padding-left:10px;'/>  #}
                                <br/>
                                {# <b style='padding-left:6px;padding-right: 0px;'>{{data.collegeAndOtherData.examControllerName}}</b>  #}
                                <br>Controller of Examinations
                            </td>
                        </tr>
                    </table>
                </td>  
            </tr>
        </table>
    </div>
{% endfor %}
