Index: /main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/studylevel.py
===================================================================
--- /main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/studylevel.py	(revision 14406)
+++ /main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/studylevel.py	(revision 14407)
@@ -30,4 +30,19 @@
 from kofacustom.coewarri.students.interfaces import (
     ICustomStudentStudyLevel, ICustomCourseTicket)
+
+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)
 
 
@@ -64,4 +79,15 @@
     grok.provides(ICustomCourseTicket)
 
+    @property
+    def grade(self):
+        """Returns the grade calculated from total score.
+        """
+        return getGradeWeightFromScore(self.total_score, self.student)[0]
+
+    @property
+    def weight(self):
+        """Returns the weight calculated from total score.
+        """
+        return getGradeWeightFromScore(self.total_score, self.student)[1]
 
 CustomCourseTicket = attrs_to_fields(CustomCourseTicket)
Index: /main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/tests/test_export.py
===================================================================
--- /main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/tests/test_export.py	(revision 14406)
+++ /main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/tests/test_export.py	(revision 14407)
@@ -4,5 +4,6 @@
 from waeup.kofa.interfaces import ICSVExporter
 from waeup.kofa.schoolgrades import ResultEntry
-from waeup.kofa.students.tests.test_batching import StudentImportExportSetup
+from waeup.kofa.students.tests.test_batching import (
+    StudentImportExportSetup, curr_year)
 from kofacustom.coewarri.utils.utils import CustomKofaUtils
 from kofacustom.coewarri.students.export import (
@@ -107,8 +108,8 @@
             'r_pay_reference,thirdparty_amt,student_id,state,'
             'current_session\r\n'
-            '666,12.12,2012-04-01 13:12:01#,,schoolfee,1,my-id,p-item,'
-            '100,2012,paid,2012-04-01 14:12:01#,,12.12,'
-            '789,r-code,interswatch,,,,A111111,created,2012\r\n',
-            result
+            '666,12.12,%s-04-01 13:12:01#,,schoolfee,1,my-id,p-item,'
+            '100,%s,paid,%s-04-01 14:12:01#,,12.12,'
+            '789,r-code,interswatch,,,,A111111,created,2012\r\n'
+            % (curr_year-6, curr_year-6, curr_year-6), result
             )
         return
