Index: main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py	(revision 15412)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py	(revision 15414)
@@ -1035,5 +1035,6 @@
 
         We expect uploadfile to be a regular CSV file with columns
-        ``student_id``, ``score`` and ``ca`` (other cols are ignored).
+        ``student_id``, ``score``, ``imported_ts``
+        and ``ca`` (other cols are ignored).
         """
         result = dict()
@@ -1041,7 +1042,9 @@
         reader = csv.DictReader(data)
         for row in reader:
-            if not ('student_id' in row and 'score' in row and 'ca' in row):
+            if not ('student_id' in row and 'score' in row and 'ca' in row and
+                'imported_ts' in row):
                 continue
-            result[row['student_id']] = (row['score'], row['ca'])
+            result[row['student_id']] = (
+                row['score'], row['ca'], row['imported_ts'])
         return result
 
@@ -1063,9 +1066,11 @@
                 return False
         else:
-            formvals = dict(zip(form['sids'], zip(form['scores'], form['cas'])))
+            formvals = dict(zip(form['sids'], zip(
+                form['scores'], form['cas'], form['imported_tss'])))
         for ticket in self.editable_tickets:
             ticket_error = False
             score = ticket.score
             ca = ticket.ca
+            imported_ts = ticket.imported_ts
             sid = ticket.student.student_id
             if formvals[sid][0] == '':
@@ -1073,4 +1078,6 @@
             if formvals[sid][1] == '':
                 ca = None
+            if formvals[sid][2] == '':
+                imported_ts = None
             try:
                 if formvals[sid][0]:
@@ -1078,4 +1085,6 @@
                 if formvals[sid][1]:
                     ca = int(formvals[sid][1])
+                if formvals[sid][2]:
+                    imported_ts = int(formvals[sid][2])
             except ValueError:
                 error += '%s, ' % ticket.student.display_fullname
@@ -1102,6 +1111,16 @@
                     (ob_class, ticket.student.student_id,
                      ticket.level, ticket.code, ca))
+            if not ticket_error and ticket.imported_ts != imported_ts:
+                try:
+                    ticket.imported_ts = imported_ts
+                except TooBig:
+                    error += '%s, ' % ticket.student.display_fullname
+                    pass
+                ticket.student.__parent__.logger.info(
+                    '%s - %s %s/%s imported_ts updated (%s)' %
+                    (ob_class, ticket.student.student_id,
+                     ticket.level, ticket.code, imported_ts))
         if error:
-            self.flash(_('Error: Score(s) and CA(s) of %s have not be updated. '
+            self.flash(_('Error: Score(s), CA(s) and Imported TS(s) of %s have not be updated. '
               % error.strip(', ')), type="danger")
         return True
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/editscorespage.pt
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/editscorespage.pt	(revision 15412)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/browser_templates/editscorespage.pt	(revision 15414)
@@ -1,8 +1,8 @@
 <p i18n:domain="waeup.kofa" i18n:translate="edit_scores_info">
   This page helps you to update your students' course results.
-  You can either update scores and CAs by importing a csv file
+  You can either update Scores, CAs and Imported Total Scores by importing a csv file
   (press 'Help' for further information) or by
-  changing score or CA values in the table below. Only scores and CAs
-  of students in current session
+  changing Score, CA or Imported Total Score values in the table below.
+  Only course results of students in current session
   <span  i18n:name="current_academic_session"
          tal:replace="view/session_title"></span>
@@ -81,7 +81,7 @@
       <th i18n:translate="">Course of Studies</th>
       <th i18n:translate="">Level</th>
-      <th i18n:translate="">Imp. TS</th>
       <th i18n:translate="">Score</th>
       <th i18n:translate="">CA</th>
+      <th i18n:translate="">Imp. Total Score</th>
     </tr>
     </thead>
@@ -94,5 +94,4 @@
       <td tal:content="ticket/student/certcode">CERTCODE</td>
       <td tal:content="ticket/level">LEVEL</td>
-      <td tal:content="ticket/imported_ts">IMPORTED TS</td>
       <td style="width: 65px;">
           <input type="text" name="scores:list" class="form-control"
@@ -105,4 +104,8 @@
                  tal:attributes="value ticket/ca" />
       </td>
+      <td style="width: 65px;">
+          <input type="text" name="imported_tss:list" class="form-control"
+                 tal:attributes="value ticket/imported_ts" />
+      </td>
     </tr>
     </tbody>
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/export.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/export.py	(revision 15412)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/export.py	(revision 15414)
@@ -117,5 +117,5 @@
               'depcode', 'faccode',
               'level', 'code', 'level_session', 'ca', 'score',
-              'total_score', 'grade')
+              'total_score', 'grade', 'imported_ts')
 
     def mangle_value(self, value, name, context=None):
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 15412)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 15414)
@@ -46,6 +46,6 @@
 UPLOAD_CSV_TEMPLATE = (
     'matric_number,student_id,display_fullname,level,code,level_session,'
-    'score,ca\r\n'
-    '234,E1000000,Anna Tester,100,COURSE1,2004,%s,%s\r\n')
+    'score,ca,imported_ts\r\n'
+    '234,E1000000,Anna Tester,100,COURSE1,2004,%s,%s,%s\r\n')
 
 class OfficerUITests(StudentsFullSetup):
@@ -371,5 +371,5 @@
         self.browser.open(self.edit_scores_url)
         upload_ctrl = self.browser.getControl(name='uploadfile:file')
-        upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22'))
+        upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22','77'))
         upload_ctrl.add_file(upload_file, 'text/csv', 'myscores.csv')
         self.browser.getControl("Update editable scores from").click()
@@ -379,4 +379,6 @@
         self.assertEqual(
             self.student['studycourse']['100']['COURSE1'].ca, 22)
+        self.assertEqual(
+            self.student['studycourse']['100']['COURSE1'].imported_ts, 77)
 
     def test_scores_previous_session(self):
@@ -400,9 +402,9 @@
             'matric_number,student_id,display_fullname,'
             'depcode,faccode,level,code,level_session,ca,score,'
-            'total_score,grade\r\n234,E1000000,"TESTER, Anna",dep1,fac1,'
-            '100,COURSE1,2003,,55,,\r\n')
+            'total_score,grade,imported_ts\r\n234,E1000000,"TESTER, Anna",dep1,fac1,'
+            '100,COURSE1,2003,,55,,,\r\n')
         self.browser.open(self.edit_prev_scores_url)
         upload_ctrl = self.browser.getControl(name='uploadfile:file')
-        upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22'))
+        upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22','77'))
         upload_ctrl.add_file(upload_file, 'text/csv', 'myscores.csv')
         self.browser.getControl("Update editable scores from").click()
@@ -412,4 +414,6 @@
         self.assertEqual(
             self.student['studycourse']['100']['COURSE1'].ca, 22)
+        self.assertEqual(
+            self.student['studycourse']['100']['COURSE1'].imported_ts, 77)
 
     def test_lecturers_can_download_course_tickets(self):
@@ -1244,5 +1248,5 @@
         self.browser.getControl(name="scores:list", index=0).value = 'abc'
         self.browser.getControl("Update scores").click()
-        self.assertTrue('Error: Score(s) and CA(s) of TESTER, Anna have not be updated.'
+        self.assertTrue('Error: Score(s), CA(s) and Imported TS(s) of TESTER, Anna have not be updated.'
             in self.browser.contents)
         # Scores can be removed.
