Changeset 18368 for main/kofacustom.unidel
- Timestamp:
- 27 Nov 2026, 11:38:22 (12 hours ago)
- Location:
- main/kofacustom.unidel/trunk/src/kofacustom/unidel/students
- Files:
-
- 2 edited
-
browser.py (modified) (2 diffs)
-
browser_templates/notificationofresult.pt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py
r18366 r18368 908 908 session, self.data(session), lecturers, '', 45, self.note) 909 909 910 class ResultNotificationPage( grok.View):910 class ResultNotificationPage(UtilityView, grok.View): 911 911 """ Simple HTML Layout Page 912 912 """ … … 918 918 def update(self): 919 919 if not self.context.state in (GRADUATED,): 920 self.flash(_('Not yet graduated!'), 921 type="danger") 920 self.flash('Not yet graduated.', type="danger") 921 self.redirect(self.url(self.context)) 922 return 923 if not (self.context['studycourse'].award_date): 924 self.flash('No award data yet.', type="danger") 922 925 self.redirect(self.url(self.context)) 923 926 return 924 927 self.response.setHeader('Content-Type', 'text/html; charset=utf-8') 925 certificate = self.context['studycourse'].certificate 926 self.certificate = certificate.title 928 #self.dep = certificate.__parent__.__parent__.longtitle 929 #self.fac = certificate.__parent__.__parent__.__parent__.longtitle 930 #final_grade_dict = getUtility(IKofaUtils).FINAL_GRADE_DICT 931 #final_grade = final_grade_dict[self.context['studycourse'].final_grade] 932 transcript_data = self.context['studycourse'].getTranscriptData() 933 students_utils = getUtility(IStudentsUtils) 934 final_grade = students_utils.getClassFromCGPA(transcript_data[1], self.context)[1] 935 certificate = self.context['studycourse'].certificate.title 927 936 self.fullname = self.context.display_fullname 928 937 self.firstname = self.context.firstname 929 938 self.lastname = self.context.lastname 930 939 self.matric_number = self.context.matric_number 931 self. dep = certificate.__parent__.__parent__.longtitle932 self. fac = certificate.__parent__.__parent__.__parent__.longtitle940 self.qualification = "%s, %s" % (certificate, final_grade) 941 self.award_date = self.context['studycourse'].award_date.strftime('%d/%m/%Y') 933 942 tz = getattr(queryUtility(IKofaUtils), 'tzinfo', pytz.utc) 934 943 self.date = now(tz).strftime('%d/%m/%Y') -
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser_templates/notificationofresult.pt
r18328 r18368 1 <title> Notificationof Result Template</title>1 <title>Statement of Result Template</title> 2 2 <style> 3 :root{ 4 --paper: #ffffff; 5 --ink: #000000; 6 } 7 8 *{ box-sizing: border-box; } 9 10 body{ 11 margin: 0; 3 :root { --paper: #ffffff; --ink: #000000; } 4 * { box-sizing: border-box; } 5 @page { size: A4; margin: 18mm; } 6 html, body { width: 100%; } 7 body { 8 margin: 0 auto; 9 padding: 20mm 0 0; 10 max-width: 174mm; 12 11 background: var(--paper); 13 12 color: var(--ink); 14 font-family: "Times New Roman", Times, Georgia,serif;13 font-family: Calibri, Arial, sans-serif; 15 14 font-size: 12pt; 16 line-height: 1.4; 17 padding: 25mm 20mm; 18 max-width: 210mm; 19 margin-inline: auto; 15 line-height: 1.25; 20 16 } 21 22 .meta-row{ 17 .matric-date { 23 18 display: flex; 24 19 justify-content: space-between; 25 gap: 12px; 26 flex-wrap: wrap; 27 margin-bottom: 28px; 20 align-items: baseline; 21 white-space: nowrap; 22 margin: 0 7mm 22mm; 23 font-size: 12pt; 28 24 } 29 30 .addressee div{ margin: 0 0 2px; } 31 32 .salutation{ margin: 22px 0; } 33 34 .title{ 35 text-align: center; 25 .statement { text-align: center; width: 100%; } 26 .title { font-size: 12.5pt; font-style: italic; margin: 0 0 18mm; } 27 .intro { font-style: italic; margin: 0 0 11mm; } 28 .student { 29 margin: 0 0 4mm; 30 padding: 0 0 4mm; 31 border-bottom: 1px solid #333; 32 font-size: 12.5pt; 33 } 34 .award-text { margin: 0 7mm 8mm; } 35 .qualification { 36 36 font-weight: bold; 37 margin: 0 0 22px; 37 font-style: italic; 38 font-size: 12.5pt; 39 margin: 0 0 9mm; 40 padding: 0 0 6mm; 41 border-bottom: 1px solid #333; 38 42 } 39 40 p{ margin: 0 0 16px; } 41 42 .signature div{ font-weight: bold; } 43 .signature{ margin-top: 60px; } 44 45 @media (max-width: 480px){ 46 body{ padding: 8mm; } 47 .meta-row{ flex-direction: column; gap: 2px; } 43 .award-date { 44 font-style: italic; 45 margin: 0 0 9mm; 46 padding: 0 0 12mm; 47 border-bottom: 1px solid #333; 48 48 } 49 50 @media print{ 51 body{ padding: 0; max-width: none; } 52 } 53 54 @page{ 55 size: A4; 56 margin: 25mm 20mm; 49 .signature { font-style: italic; margin: 0; line-height: 1.35; } 50 @media print { 51 html, body { width: auto; } 52 body { padding-top: 20mm; max-width: none; } 57 53 } 58 54 </style> 59 55 60 <div class="m eta-row">61 <div> Our Ref:</div>62 <div> <span tal:content="view/date">DATE</span></div>56 <div class="matric-date"> 57 <div>Matric. No. <span tal:content="view/matric_number">MATRICNUMBER</span></div> 58 <div>Date <span tal:content="view/date">DATE</span></div> 63 59 </div> 64 60 65 <div class="addressee"> 66 <div>Name of Student: <span tal:content="view/fullname">FULLNAME</span></div> 67 <div>Matric Number: <span tal:content="view/matric_number">MATRICNUMBER</span></div> 68 <div>Department: <span tal:content="view/dep">DEPARTMENT</span></div> 69 <div>Faculty: <span tal:content="view/fac">FACULTY</span></div> 61 <div class="statement"> 62 <div class="title">STATEMENT OF RESULT</div> 63 <div class="intro">This is to certify that</div> 64 <div class="student"><span tal:content="view/fullname">FULLNAME</span></div> 65 <p class="award-text">having completed the approved course of study and passed the prescribed examinations, has under the authority of the Senate, been awarded the</p> 66 <div class="qualification"><span tal:content="view/qualification">QUALIFICATION</span></div> 67 <div class="award-date">on <span tal:content="view/award_date">DATE</span></div> 68 <div class="signature"> 69 <div>Mr. Aghagbon, Fidelis</div> 70 <div>For: Registrar</div> 71 </div> 70 72 </div> 71 72 <div class="salutation">Dear <span tal:content="view/firstname">FIRSTNAME</span> <span tal:content="view/lastname">LASTNAME</span>,</div>73 74 <div class="title">NOTIFICATION OF RESULT, FINAL DEGREE EXAMINATION</div>75 76 <p>I am pleased to inform you that as a result of your having satisfied the Academic Requirements in the Final Degree Examinations and fulfilled the other relevant requirements, Senate has accordingly approved that the Degree of:</p>77 78 <p><b><span tal:content="view/certificate">CERTIFICATE</span></b> of this University be awarded to you.</p>79 80 <p>The effective date of the award is:</p>81 82 <p>Please accept our Congratulations</p>83 84 <p>Yours Sincerely,</p>85 86 <div class="signature">87 <div>Dr. (Mrs.) Esther I. Akpojuvie</div>88 <div>Senior Deputy Registrar (Examinations & Records)</div>89 <div>For: Registrar</div>90 </div>
Note: See TracChangeset for help on using the changeset viewer.
