Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9683)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9684)
@@ -1286,4 +1286,5 @@
     grok.require('waeup.viewStudent')
     form_fields = grok.AutoFields(ICourseTicket)
+    grok.template('courseticketpage')
     pnav = 4
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/courseticketpage.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/courseticketpage.pt	(revision 9684)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/courseticketpage.pt	(revision 9684)
@@ -0,0 +1,21 @@
+<table class="form-table" i18n:domain="waeup.kofa">
+  <tbody>
+    <tal:widgets content="structure provider:widgets" />
+    <tr tal:condition="context/grade">
+      <td class="fieldname">
+        <span i18n:translate="">Grade</span>:
+      </td>
+      <td>
+        <span tal:replace="context/grade">C</span>
+      </td>
+    </tr>
+    <tr tal:condition="python: context.weight is not None">
+      <td class="fieldname">
+        <span i18n:translate="">Weight</span>:
+      </td>
+      <td>
+        <span tal:replace="context/weight">1</span>
+      </td>
+    </tr>
+  </tbody>
+</table>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 9683)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 9684)
@@ -522,4 +522,6 @@
     code = Attribute('code of the original course')
     certcode = Attribute('certificate code of the study course')
+    grade = Attribute('grade calculated from score')
+    weight = Attribute('weight calculated from score')
 
     title = schema.TextLine(
@@ -562,5 +564,5 @@
     score = schema.Int(
         title = _(u'Score'),
-        default = 0,
+        default = None,
         required = False,
         )
@@ -578,5 +580,4 @@
         )
 
-
     def getLevel():
         """Returns the id of the level the ticket has been added to.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py	(revision 9683)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py	(revision 9684)
@@ -29,4 +29,19 @@
 from waeup.kofa.students.vocabularies import StudyLevelSource
 
+def getGradeWeightFromScore(score):
+    if score is None:
+        return (None, None)
+    if score >= 70:
+        return ('A',5)
+    if score >= 60:
+        return ('B',4)
+    if score >= 50:
+        return ('C',3)
+    if score >= 45:
+        return ('D',2)
+    if score >= 40:
+        return ('E',1)
+    return ('F',0)
+
 class StudentStudyLevel(grok.Container):
     """This is a container for course tickets.
@@ -183,4 +198,15 @@
             return None
 
+    @property
+    def grade(self):
+        """Returns the grade calculated from score.
+        """
+        return getGradeWeightFromScore(self.score)[0]
+
+    @property
+    def weight(self):
+        """Returns the weight calculated from score.
+        """
+        return getGradeWeightFromScore(self.score)[1]
 
 CourseTicket = attrs_to_fields(CourseTicket)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9683)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9684)
@@ -752,10 +752,21 @@
         self.browser.getLink("COURSE1").click()
         self.browser.getLink("Manage").click()
-        self.browser.getControl(name="form.score").value = '10'
+        #self.browser.getControl(name="form.score").value = '10'
         self.browser.getControl("Save").click()
         self.assertTrue('Form has been saved' in self.browser.contents)
+        # Grade and weight have been determined
+        self.browser.open(self.studycourse_path + '/100/COURSE1')
+        self.assertFalse('Grade' in self.browser.contents)
+        self.assertFalse('Weight' in self.browser.contents)
+        self.student['studycourse']['100']['COURSE1'].score = 55
+        self.browser.open(self.studycourse_path + '/100/COURSE1')
+        self.assertTrue('Grade' in self.browser.contents)
+        self.assertTrue('Weight' in self.browser.contents)
+        self.assertEqual(self.student['studycourse']['100']['COURSE1'].grade, 'C')
+        self.assertEqual(self.student['studycourse']['100']['COURSE1'].weight, 3)
         # Carry-over courses will be collected when next level is created
         self.browser.open(self.student_path + '/studycourse/manage')
         # Add next level
+        self.student['studycourse']['100']['COURSE1'].score = 10
         self.browser.getControl(name="addlevel").value = ['200']
         self.browser.getControl(name="level_session").value = ['2005']
@@ -764,5 +775,5 @@
         self.assertMatches(
             '...: Study Level 200 (Year 2)...', self.browser.contents)
-        # COURSE1 has score 0 and thus will become a carry-over course
+        # If COURSE1 has score 10 it becomes a carry-over course
         # in level 200
         self.assertEqual(
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 9683)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 9684)
@@ -303,5 +303,5 @@
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
             'passmark,score,semester,title,student_id,certcode\r\n'
-            '0,0,,,,,,0,,0,,,,\r\n'
+            '0,0,,,,,,0,,,,,,\r\n'
             )
         return
@@ -321,5 +321,5 @@
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
             'passmark,score,semester,title,student_id,certcode\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111,CERT1\r\n'
+            '1,1,CRS1,100,DEP1,FAC1,100,0,100,,2,Course 1,A111111,CERT1\r\n'
             )
         return
@@ -336,5 +336,5 @@
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
             'passmark,score,semester,title,student_id,certcode\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111,CERT1\r\n'
+            '1,1,CRS1,100,DEP1,FAC1,100,0,100,,2,Course 1,A111111,CERT1\r\n'
             )
         return
@@ -350,5 +350,5 @@
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
             'passmark,score,semester,title,student_id,certcode\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111,CERT1\r\n'
+            '1,1,CRS1,100,DEP1,FAC1,100,0,100,,2,Course 1,A111111,CERT1\r\n'
             )
         return
