Index: /WAeUP_SRP/base/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/base/WAeUPTool.py	(revision 3032)
+++ /WAeUP_SRP/base/WAeUPTool.py	(revision 3033)
@@ -1921,4 +1921,73 @@
     ###)
 
+    security.declareProtected(ModifyPortalContent,'mass_edit_verdict') ###(
+    def mass_edit_verdict(self,mapping):
+        wftool = self.portal_workflow
+        "edit a students verdict"
+        logger = logging.getLogger('WAeUPTool.mass_edit_verdict')
+        students_folder = self.portal_url.getPortalObject().campus.students
+        student_id = mapping.get('id',None)
+        matric_no = mapping.get('matric_no',None)
+        editable_keys = mapping.keys()
+        if student_id:
+            student_record = self.students_catalog.getRecordById(student_id)
+            if student_record is None:
+                return '',"no student with id %s" % student_id
+            if matric_no and student_record.matric_no and\
+              matric_no != student_record.matric_no:
+                logger.info("%s, old matric_no %s overwritten with %s" % (student_record.id,student_record.matric_no,matric_no))
+        elif matric_no:
+            res = self.students_catalog(matric_no = matric_no)
+            if not res:
+                return '',"no student with matric_no %s" % matric_no
+            student_record = res[0]
+            editable_keys.remove('matric_no')
+
+        student_id = student_record.id
+        student_review_state =  student_record.review_state
+        if student_review_state not in ('courses_validated',):
+            return '',"student %s in wrong review_state %s" % (student_id, student_review_state)
+        student_obj = getattr(students_folder,student_id)
+        f2t = self.field2types_student
+        d = {}
+        #import pdb;pdb.set_trace()
+        any_change = False
+        #special treatment for StudentStudyLevel
+        current_session = mapping.get('current_session','')
+        if current_session and student_record.session != current_session:
+            return '','student_id: %s imported session %s does not match session %s' % (student_id,
+                                                                                        current_session,
+                                                                                        student_record.session)
+                                                                                        
+        current_level = mapping.get('current_level','')
+        if current_level and student_record.level != current_level:
+            return '','student_id %s: imported level %s does not match level %s' % (student_id,
+                                                                                    current_level,
+                                                                                    student_record.level)
+        sub_obj = getattr(student_obj,'study_course',None)
+        if sub_obj is None:
+            return '','student_id %s: no study_course-object' % student_id
+        level_obj = getattr(sub_obj,current_level,None)
+        if  level_obj is None:
+            return '','student_id %s: no study_level-object for level %s' % (student_id,
+                                                                             current_level)
+        verdict = d['verdict']  = mapping.get('current_verdict','')
+        if verdict == student_record.verdict:
+            return '','student_id %s: verdict already set to %s' % (student_id,
+                                                                    verdict)
+            
+        level_review_state = wftool.getInfoFor(level_obj,'review_state',None)
+        if level_review_state != "closed":
+            return '','student_id %s: level %s is not closed' % (student_id,
+                                                                 current_level)
+        
+        level_obj.getContent().edit(mapping = d)
+        try:
+            wftool.doActionFor(level_obj,'close')
+        except:
+            pass
+        return student_id,''
+    ###)
+
     security.declareProtected(ModifyPortalContent,"importData")###(
     def importData(self,filename,name,edit=False,bypass_queue_catalog=False):
@@ -1983,5 +2052,5 @@
                 logger.info('%s starts import from %s.csv in %s mode with schema and layout %s' % (member,filename,mode,iname))
                 attrs = csv.reader(open("%s/import/%s.csv" % (i_home,filename),"rb")).next()
-                import_keys = [k.strip() for k in attrs if not k.startswith('ignore')]
+                import_keys = [k.strip() for k in attrs if not k.strip().startswith('ignore')]
                 diff2schema = set(import_keys).difference(set(schema.keys()))
                 diff2layout = set(import_keys).difference(set(layout.keys()))
Index: /WAeUP_SRP/uniben/profiles/default/layouts.xml
===================================================================
--- /WAeUP_SRP/uniben/profiles/default/layouts.xml	(revision 3032)
+++ /WAeUP_SRP/uniben/profiles/default/layouts.xml	(revision 3033)
@@ -24,4 +24,5 @@
   <object name="import_application" meta_type="CPS Layout"/>
   <object name="import_faculty" meta_type="CPS Layout"/>
+  <object name="import_verdict" meta_type="CPS Layout"/>
 
   <object name="department" meta_type="CPS Layout"/>
Index: /WAeUP_SRP/uniben/profiles/default/layouts/import_verdict.xml
===================================================================
--- /WAeUP_SRP/uniben/profiles/default/layouts/import_verdict.xml	(revision 3033)
+++ /WAeUP_SRP/uniben/profiles/default/layouts/import_verdict.xml	(revision 3033)
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="import_verdict" meta_type="CPS Layout">
+  <property name="layout_create_method"></property>
+  <property name="layout_edit_method"></property>
+  <property name="layout_view_method"></property>
+  <property name="style_prefix">layout_waeup_</property>
+  <property name="flexible_widgets"/>
+  <property name="validate_values_expr"></property>
+  <widget name="id" meta_type="String Widget">
+    <property name="title">Id</property>
+    <property name="fields">
+      <element value="student_id"/>
+    </property>
+    <property name="is_required">False</property>
+    <property name="label">Id</property>
+    <property name="label_edit">Id</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+  </widget>
+  <widget name="matric_no" meta_type="String Widget">
+    <property name="title">Matriculation No</property>
+    <property name="fields">
+      <element value="matric_no"/>
+    </property>
+    <property name="label">Matriculation No</property>
+    <property name="label_edit">Matriculation No</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="display_width">10</property>
+  </widget>
+  <widget name="current_session" meta_type="String Widget">
+    <property name="title">Session</property>
+    <property name="fields">
+      <element value="current_session"/>
+    </property>
+    <property name="is_required">True</property>
+    <property name="label">Session</property>
+    <property name="label_edit">Session</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+  </widget>
+  <widget name="current_level" meta_type="WAeUP Level Widget">
+    <property name="title">Current Level</property>
+    <property name="fields">
+      <element value="current_level"/>
+    </property>
+    <property name="label">Current Level</property>
+    <property name="label_edit">Current Level</property>
+    <property name="is_required">True</property>
+  <property name="description">The last level school fee has been paid for</property>
+  <property name="help">The last level school fee has been paid for</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="vocabulary">unset</property>
+  <property name="sorted">True</property>
+ </widget>
+  <widget name="current_verdict" meta_type="WAeUP Verdict Widget">
+    <property name="title">Current Verdict</property>
+    <property name="fields">
+      <element value="current_verdict"/>
+    </property>
+    <property name="label">Current Verdict</property>
+    <property name="label_edit">Current Verdict</property>
+    <property name="description">The verdict of the current level</property>
+    <property name="help">The verdict of the current level</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+    <property name="vocabulary">verdicts</property>
+    <property name="sorted">True</property>
+  </widget>
+  <table>
+    <row>
+      <cell name="student_id"/>
+    </row>
+    <row>
+      <cell name="matric_no"/>
+    </row>
+    <row>
+      <cell name="current_session"/>
+    </row>
+    <row>
+      <cell name="verdict"/>
+    </row>
+  </table>
+</object>
Index: /WAeUP_SRP/uniben/profiles/default/schemas.xml
===================================================================
--- /WAeUP_SRP/uniben/profiles/default/schemas.xml	(revision 3032)
+++ /WAeUP_SRP/uniben/profiles/default/schemas.xml	(revision 3033)
@@ -20,4 +20,5 @@
  <object name="import_student_level_data" meta_type="CPS Schema"/>
  <object name="import_student_course_results" meta_type="CPS Schema"/>
+ <object name="import_verdict" meta_type="CPS Schema"/>
  
  <object name="course" meta_type="CPS Schema"/>
Index: /WAeUP_SRP/uniben/profiles/default/schemas/import_verdict.xml
===================================================================
--- /WAeUP_SRP/uniben/profiles/default/schemas/import_verdict.xml	(revision 3033)
+++ /WAeUP_SRP/uniben/profiles/default/schemas/import_verdict.xml	(revision 3033)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="import_verdict" meta_type="CPS Schema">
+ <field name="student_id" meta_type="CPS String Field"/>
+ <field name="matric_no" meta_type="CPS String Field"/>
+ <field name="current_level" meta_type="CPS String Field"/>
+ <field name="current_session" meta_type="CPS String Field"/>
+ <field name="current_verdict" meta_type="CPS String Field"/>
+</object>
Index: /WAeUP_SRP/uniben/profiles/default/vocabularies/import_names.xml
===================================================================
--- /WAeUP_SRP/uniben/profiles/default/vocabularies/import_names.xml	(revision 3032)
+++ /WAeUP_SRP/uniben/profiles/default/vocabularies/import_names.xml	(revision 3033)
@@ -14,3 +14,4 @@
  <item key="certificate_course" msgid="">Certificate Course Data</item>
  <item key="application" msgid="">Application Data</item>
+ <item key="verdict" msgid="">Verdicts</item>
 </object>
