Index: /WAeUP_SRP/unilorin/waeup_custom/getTranscriptInfo.py
===================================================================
--- /WAeUP_SRP/unilorin/waeup_custom/getTranscriptInfo.py	(revision 3611)
+++ /WAeUP_SRP/unilorin/waeup_custom/getTranscriptInfo.py	(revision 3612)
@@ -18,8 +18,16 @@
 """
 
+request = context.REQUEST
+response = request.RESPONSE
+import logging
+logger = logging.getLogger('Skins.getTranscriptInfo')
 info = context.waeup_tool.getAccessInfo(context)
 student_id = info['student_id']
 if student_id is None:
     return None
+    
+mtool = context.portal_membership    
+if mtool.isAnonymousUser() or not context.isSectionOfficer():
+    return None    
 
 mtool = context.portal_membership
@@ -28,32 +36,39 @@
 
 course_results = context.course_results
-request = context.REQUEST
-response = request.RESPONSE
-import logging
-logger = logging.getLogger('Skins.getTranscriptInfo')
 
 
-info['is_so'] = is_so = info['is_sectionofficer']
-info['student'] = student = context.students_catalog.getRecordByKey(student_id)
-info['review_state'] = review_state = student.review_state
-school_fee_paid =  review_state == 'school_fee_paid'
-info['has_verdict'] = has_verdict = level_doc.verdict
-
-info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict).upper()
-info['session'] = context.portal_vocabularies.sessions.get(level_doc.session)
-
-cert_id = student.course
-info['cert_id'] = cert_id
-total_credits,gpa,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id)
-info['total_credits'] = total_credits
-
-current_session = student.session
-info['gpa'] = gpa
-
-if gpa and total_credits:
-    info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits))
-
-info['carry_overs'] = carry_overs
+student_record = context.students_catalog.getRecordByKey(student_id)
+info['student_record'] = context.getFormattedStudentEntry(student_record)
 
 
+year_courses = [[],[],[],[],[],[],[],[],[]]
+year_details = [{'year':0},{'year':1},{'year':2},{'year':3},{'year':4},{'year':5},{'year':6},{'year':7},{'year':8}]
+
+courses = course_results.getAllCourses(student_id)
+
+for course in courses:
+    year = divmod(int(course['level_id']),100)[0]
+    year_courses[year].append(course)
+    if not getattr(year_details[year],'session',None):
+        year_details[year]['session'] = context.portal_vocabularies.sessions.get(course['session_id'])
+
+year_counter = 0
+for year in year_courses:
+    gpa = 0
+    total_credits = 0
+    for course in year:
+        gpa += int(course['weight']) * int(course['credits'])
+        total_credits += int(course['credits'])    
+    if gpa and total_credits:
+        year_details[year_counter]['total_credits'] = total_credits    
+        year_details[year_counter]['gpa'] = "%4.2f" % (float(gpa)/int(total_credits))
+    year.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x,
+                                         "%(semester)s%(code)s" % y))
+    year_counter += 1
+    
+info['year_details'] = year_details
+info['year_courses'] = year_courses
+
 return info
+
+
Index: /WAeUP_SRP/unilorin/waeup_custom/transcript_view.pt
===================================================================
--- /WAeUP_SRP/unilorin/waeup_custom/transcript_view.pt	(revision 3612)
+++ /WAeUP_SRP/unilorin/waeup_custom/transcript_view.pt	(revision 3612)
@@ -0,0 +1,97 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+          tal:define="info context/getTranscriptInfo;">
+  <metal:block define-macro="edit_form">   
+              
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    
+    <span tal:condition="info">
+    <span tal:define= "is_so context/isSectionOfficer;
+                       is_student info/is_student;
+                       with_score not: info/without_score|nothing;
+                       ">       
+          
+    <a href=""
+       tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+    </a>
+
+    <h3> 
+      <span tal:condition="python: is_so or is_ca">
+        <span tal:content="info/student_record/name" />:
+      </span>
+      <span tal:condition="is_student">My </span> Transcript     
+      <br />
+    </h3>
+             
+      <span tal:repeat="details info/year_details">
+      <span tal:define="year_courses info/year_courses;
+                        year python:year_courses[details['year']]"
+            tal:condition="python:len(year)">
+      
+      <br />
+      
+      <h3> Year <span tal:replace="details/year" />  (Session <span tal:replace="details/session" />)</h3>
+      
+     
+      
+     
+      <br />
+      
+      <table  class="contentListing" width="100%" id="folder_content">
+        <tr>
+        <th align='center'></th> 
+        <th align='center'>session</th>
+        <th align='center'>level</th>
+        <th align='center'>semester</th>
+        <th align='center'>credits</th>
+        <th tal:condition="with_score" align='center'>score</th>
+        <th align='center'>grade</th>
+        <th align='center'>weight</th>
+        <th align='center'></th>       
+        </tr>  
+                      
+        <tr tal:repeat="row year"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td align="center" tal:content="row/code"></td>
+          <td align='center' tal:content="row/session_id"></td>
+          <td align='center' tal:content="row/level_id"></td>                    
+          <td align="center"><span tal:content="row/semester" /></td>
+          <td align="center" tal:content="row/credits"></td>
+          <td tal:condition="with_score" align="center"  tal:content="row/score"></td>
+          <td align="center" tal:content="row/grade"></td>
+          <td align="center" tal:content="row/weight"></td>
+          <td align="center" tal:content="row/coe|nothing"></td>
+        </tr>
+      </table>
+
+        <br />
+        <table>
+          <tr>
+            <th>Total Credits:</th>
+            <td tal:content="details/total_credits" />
+          </tr>
+          <tr tal:condition="details/gpa">
+            <th>GPA:</th> 
+            <td><span tal:content="details/gpa" /></td>
+          </tr>
+        </table>      
+
+      </span>
+      </span>
+
+      
+ 
+               
+
+    <br />
+  </span>
+  </span>        
+  </metal:block>    
+  </metal:main>
+
+</metal:body>
+
