Index: main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py	(revision 13833)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py	(revision 13834)
@@ -31,4 +31,6 @@
     CourseTicketAddFormPage,
     StudyLevelDisplayFormPage,
+    StudyLevelManageFormPage,
+    StudyLevelEditFormPage,
     ExportPDFTranscriptSlip,
     ExportPDFAdmissionSlip,
@@ -204,4 +206,14 @@
         'validation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
 
+class CustomStudyLevelManageFormPage(StudyLevelManageFormPage):
+    """ Page to edit the student study level data
+    """
+    grok.context(ICustomStudentStudyLevel)
+
+class CustomStudyLevelEditFormPage(StudyLevelEditFormPage):
+    """ Page to edit the student study level data by students
+    """
+    grok.context(ICustomStudentStudyLevel)
+
 class CustomExportPDFCourseRegistrationSlip(
     NigeriaExportPDFCourseRegistrationSlip):
@@ -289,4 +301,5 @@
         Cred = translate('Cred.', 'waeup.kofa', target_language=portal_language)
         Score = translate('Score', 'waeup.kofa', target_language=portal_language)
+        CA = translate('CA', 'waeup.kofa', target_language=portal_language)
         Grade = translate('Grade', 'waeup.kofa', target_language=portal_language)
         Signature = translate(_('Lecturer\'s Signature'), 'waeup.aaue',
@@ -307,4 +320,5 @@
                                (Cred, 'credits', 1.5),
                                (Score, 'score', 1.4),
+                               (CA, 'ca', 1.4),
                                (Grade, 'grade', 1.4),
                                (Signature, 'dummy', 3),
@@ -337,4 +351,35 @@
             'Akhimien Felicia O. (MANUPA) <br /> Principal Assistant Registrar  <br /> '
             'Exams, Records and Data Processing Division <br /> For: Registrar')],)
+
+    def render(self):
+        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
+        Term = translate(_('Term'), 'waeup.kofa', target_language=portal_language)
+        Code = translate(_('Code'), 'waeup.kofa', target_language=portal_language)
+        Title = translate(_('Title'), 'waeup.kofa', target_language=portal_language)
+        Cred = translate(_('Credits'), 'waeup.kofa', target_language=portal_language)
+        Score = translate(_('Score'), 'waeup.kofa', target_language=portal_language)
+        CA = translate(_('CA'), 'waeup.kofa', target_language=portal_language)
+        Grade = translate(_('Grade'), 'waeup.kofa', target_language=portal_language)
+        studentview = StudentBasePDFFormPage(self.context.student,
+            self.request, self.omit_fields)
+        students_utils = getUtility(IStudentsUtils)
+
+        tableheader = [(Code,'code', 2.5),
+                         (Title,'title', 7),
+                         (Term, 'semester', 1.5),
+                         (Cred, 'credits', 1.5),
+                         (Score, 'score', 1.5),
+                         (CA, 'ca', 1.5),
+                         (Grade, 'grade', 1.5),
+                         ]
+
+        return students_utils.renderPDFTranscript(
+            self, 'transcript.pdf',
+            self.context.student, studentview,
+            omit_fields=self.omit_fields,
+            tableheader=tableheader,
+            signatures=self._signatures(),
+            sigs_in_footer=self._sigsInFooter(),
+            )
 
 class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip):
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studyleveleditpage.pt
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studyleveleditpage.pt	(revision 13834)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studyleveleditpage.pt	(revision 13834)
@@ -0,0 +1,73 @@
+<form action="." tal:attributes="action request/URL" method="POST"
+      i18n:domain="waeup.kofa" enctype="multipart/form-data">
+
+  <h3 i18n:translate="">
+    Course Tickets
+    (Total Credits:
+    <span i18n:name="total_credits"
+      tal:replace="view/context/total_credits">TOTAL</span>)
+  </h3>
+  <table class="kofa-data-table dataTableManage">
+  <thead>
+    <tr>
+      <th>&nbsp;</th>
+      <th i18n:translate="">Term</th>
+      <th i18n:translate="">Code</th>
+      <th i18n:translate="">Title</th>
+      <th i18n:translate="">Department</th>
+      <th i18n:translate="">Faculty</th>
+      <th i18n:translate="">Credits</th>
+      <th i18n:translate="">Score</th>
+      <th i18n:translate="">CA</th>
+      <th i18n:translate="">CO</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr tal:repeat="value view/translated_values">
+       <td>
+        <input type="checkbox" name="val_id"
+  		  tal:attributes="value value/__name__"
+        tal:condition="value/removable_by_student" />
+      </td>
+      <td tal:content="value/semester" nowrap>TERM</td>
+      <td> <a tal:attributes="href value/url">
+      <span tal:content="value/code">CODE</span>
+      </a></td>
+      <td tal:content="value/title">TITLE</td>
+      <td tal:content="value/dcode">DEPARTMENT</td>
+      <td tal:content="value/fcode">FACULTY</td>
+      <td tal:content="value/credits">CREDITS</td>
+      <td tal:content="value/score|nothing">SCORE</td>
+      <td tal:content="value/ca|nothing">CA</td>
+      <td tal:content="value/carry_over">CO</td>
+    </tr>
+  </tbody>
+  </table>
+
+  <div tal:condition="view/availableActions">
+    <span tal:repeat="action view/actions"
+          tal:omit-tag="">
+      <input tal:replace="structure action/render"/>
+    </span>
+  </div>
+  <br /><br /><br />
+  <div class="form-inline">
+    <div class="form-group">
+        <input class="btn btn-primary" type="submit" name="ADD"
+               i18n:translate=""
+               value="Add course ticket" />
+    </div>
+    <div class="form-group">
+        <input type="text" name="course" class="form-control"
+               tal:attributes="placeholder view/placeholder" />
+    </div>
+  </div>
+  <br />
+  <p i18n:translate="">
+    You don't know the course code? Then select a course
+    <a href="ctadd">here</a>.
+  </p>
+</form>  
+
+
+
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelmanagepage.pt
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelmanagepage.pt	(revision 13834)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelmanagepage.pt	(revision 13834)
@@ -0,0 +1,106 @@
+<form action="." tal:attributes="action request/URL" method="POST"
+      i18n:domain="waeup.kofa" enctype="multipart/form-data">
+
+  <ul class="tabs nav nav-tabs" data-tabs="tabs">
+    <li class="active">
+      <a href="#tab1" data-toggle="tab">
+        <span i18n:translate="">Study Level Data</span>
+      </a>
+    </li>
+    <li>
+      <a href="#tab2" data-toggle="tab">
+        <span i18n:translate="">Course Tickets</span>
+      </a>
+    </li>
+  </ul>
+
+  <div class="tab-content">
+    <div id="tab1" class="active tab-pane">
+      <br />
+      <table class="form-table">
+      <tbody>
+        <tal:widgets content="structure provider:widgets" />
+      </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions"
+              tal:omit-tag="">
+          <input tal:condition="python:action.label in view.taboneactions"
+                 tal:replace="structure action/render"/>
+        </span>
+      </div>
+    </div>
+
+    <div id="tab2" class="tab-pane">
+      <br /><br />
+      <table class="kofa-data-table dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;</th>
+            <th i18n:translate="">Term</th>
+            <th i18n:translate="">Code</th>
+            <th i18n:translate="">Title</th>
+            <th i18n:translate="">Dept.</th>
+            <th i18n:translate="">Fact.</th>
+            <th i18n:translate="">Cred.</th>
+            <th i18n:translate="">Requ.</th>
+            <th i18n:translate="">Score</th>
+            <th i18n:translate="">CA</th>
+            <th i18n:translate="">CO</th>
+            <th i18n:translate="">Auto</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="value view/translated_values">
+            <td>
+              <input type="checkbox" name="val_id"
+        		  tal:attributes="value value/__name__" />
+            </td>
+            <td tal:content="value/semester" nowrap>TERM</td>
+            <td> <a tal:attributes="href value/url">
+            <span tal:content="value/code">CODE</span>
+            </a></td>
+            <td tal:content="value/title">TITLE</td>
+            <td tal:content="value/dcode">DEPARTMENT</td>
+            <td tal:content="value/fcode">FACULTY</td>
+            <td tal:content="value/credits">CREDITS</td>
+            <td tal:content="value/mandatory">MANDATORY</td>
+            <td tal:content="value/score|nothing">SCORE</td>
+            <td tal:content="value/ca|nothing">CA</td>
+            <td tal:content="value/carry_over">CO</td>
+            <td tal:content="value/automatic">AUTO</td>
+          </tr>
+        </tbody>
+      </table>
+
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions"
+              tal:omit-tag="">
+          <input tal:condition="python:action.label in view.tabtwoactions"
+                 tal:replace="structure action/render"/>
+        </span>
+      </div>
+      <br /><br /><br />
+      <div class="form-inline">
+        <div class="form-group">
+            <input class="btn btn-primary" type="submit" name="ADD"
+                   i18n:translate=""
+                   value="Add course ticket" />
+        </div>
+        <div class="form-group">
+            <input type="text" name="course" class="form-control"
+                   tal:attributes="placeholder view/placeholder" />
+        </div>
+      </div>
+      <br />
+      <p i18n:translate="">
+        You don't know the course code? Then select a course
+        <a href="add">here</a>.
+      </p>
+
+    </div>
+  </div>
+</form>
+
+
+
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelpage.pt
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelpage.pt	(revision 13834)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/studylevelpage.pt	(revision 13834)
@@ -0,0 +1,60 @@
+<table class="form-table" i18n:domain="waeup.kofa">
+  <tbody>
+    <tal:block repeat="widget view/widgets">
+      <tr>
+        <td class="fieldname">
+          <span tal:content="widget/label">label</span>:
+        </td>
+        <td tal:on-error="default">
+          <div tal:content="structure widget">
+            <input type="text" />
+          </div>
+        </td>
+      </tr>
+    </tal:block>
+  </tbody>
+</table>
+
+<h3 i18n:domain="waeup.kofa" i18n:translate="">Course Tickets</h3>
+
+<table class="kofa-data-table dataTable" i18n:domain="waeup.kofa">
+  <thead>
+    <tr>
+      <th i18n:translate="">Term</th>
+      <th i18n:translate="">Code</th>
+      <th i18n:translate="">Title</th>
+      <th i18n:translate="">Dep.</th>
+      <th i18n:translate="">Fac.</th>
+      <th i18n:translate="">Cred.</th>
+      <th i18n:translate="">Requ.</th>
+      <th i18n:translate="">Score</th>
+      <th i18n:translate="">CA</th>
+      <th i18n:translate="">Grade</th>
+      <th i18n:translate="">CO</th>
+      <th i18n:translate="">Auto</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr tal:repeat="value view/translated_values">
+      <td tal:content="value/semester" nowrap>TERM</td>
+      <td> <a tal:attributes="href value/url">
+      <span tal:content="value/code">CODE</span>
+      </a></td>
+      <td tal:content="value/title">TITLE</td>
+      <td tal:content="value/dcode">DEPARTMENT</td>
+      <td tal:content="value/fcode">FACULTY</td>
+      <td tal:content="value/credits">CREDITS</td>
+      <td tal:content="value/mandatory">MANDATORY</td>
+      <td tal:content="value/score|nothing">SCORE</td>
+      <td tal:content="value/ca|nothing">CA</td>
+      <td tal:content="value/grade|nothing">GRADE</td>
+      <td tal:content="value/carry_over">CO</td>
+      <td tal:content="value/automatic">AUTO</td>
+    </tr>
+  </tbody>
+</table>
+
+<div i18n:domain="waeup.kofa"
+  tal:condition="python: not len(context.keys())" i18n:translate="">
+  The're no tickets added yet.
+</div>
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py	(revision 13833)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py	(revision 13834)
@@ -304,5 +304,5 @@
 
     ca = schema.Int(
-        title = _(u'Continuous Assessment'),
+        title = _(u'CA'),
         default = None,
         required = False,
@@ -310,5 +310,5 @@
         )
 
-ICustomCourseTicket['ca'].order = ICustomCourseTicket['mandatory'].order
+ICustomCourseTicket['ca'].order = ICustomCourseTicket['score'].order
 
 class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py	(revision 13833)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py	(revision 13834)
@@ -36,4 +36,21 @@
 
 
+def getGradeWeightFromScore(score, ca):
+    if None in (score, ca):
+        return (None, None)
+    total = score + ca
+    if total >= 70:
+        return ('A',5)
+    if total >= 60:
+        return ('B',4)
+    if total >= 50:
+        return ('C',3)
+    if total >= 45:
+        return ('D',2)
+    if total >= 40:
+        return ('E',1)
+    return ('F',0)
+
+
 class CustomStudentStudyLevel(StudentStudyLevel):
     """This is a container for course tickets.
@@ -57,4 +74,19 @@
                 total += ticket.credits
         return total
+
+    @property
+    def gpa_params(self):
+        """Calculate gpa parameters for this level.
+        """
+        credits_weighted = 0.0
+        credits_counted = 0
+        level_gpa = 0.0
+        for ticket in self.values():
+            if None not in (ticket.score, ticket.ca):
+                credits_counted += ticket.credits
+                credits_weighted += ticket.credits * ticket.weight
+        if credits_counted:
+            level_gpa = round(credits_weighted/credits_counted, 3)
+        return level_gpa, credits_counted, credits_weighted
 
     @property
@@ -111,4 +143,16 @@
     grok.provides(ICustomCourseTicket)
 
+    @property
+    def grade(self):
+        """Returns the grade calculated from score.
+        """
+        return getGradeWeightFromScore(self.score, self.ca)[0]
+
+    @property
+    def weight(self):
+        """Returns the weight calculated from score.
+        """
+        return getGradeWeightFromScore(self.score, self.ca)[1]
+
 CustomCourseTicket = attrs_to_fields(CustomCourseTicket)
 
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 13833)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 13834)
@@ -86,5 +86,6 @@
         # First course has been added automatically.
         # Set score. 
-        studylevel['COURSE1'].score = 55
+        studylevel['COURSE1'].score = 35
+        studylevel['COURSE1'].ca = 20
         # GPA is 3.0.
         self.assertEqual(studylevel.gpa_params[0], 3.0)
@@ -93,5 +94,6 @@
         courseticket.title = u'Any TITLE'
         courseticket.credits = 13
-        courseticket.score = 66
+        courseticket.score = 44
+        courseticket.ca = 22
         courseticket.semester = 1
         courseticket.dcode = u'ANYDCODE'
