Ignore:
Timestamp:
3 Oct 2012, 20:46:34 (12 years ago)
Author:
Henrik Bettermann
Message:

Check if new verdict is provided.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py

    r9161 r9282  
    732732        if obj.student.state != VALIDATED:
    733733            return 'Student in wrong state.'
     734        # Check if new verdict is provided
     735        if row['current_verdict'] in (IGNORE_MARKER, ''):
     736            return 'Verdict is missing.'
    734737        return None
    735738
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv

    r8287 r9282  
    44,Susann,Berson,3,1990-01-04,100002,aa@aa.ng,1234,f,courses validated
    55,Else,Mueller,4,1990-01-05,100003,aa@aa.ng,1234,f,courses registered
     6X888888,Alfons,Meier,5,1990-01-02,100004,aa@aa.ng,1234,m,courses validated
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_studycourse_data.csv

    r7953 r9282  
    551,,CERT1,2008,100
    664,,CERT1,2008,200
     75,,CERT1,2008,200
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_verdict_data.csv

    r7952 r9282  
    44100002,2007,200,C
    55100003,2008,200,A
     6100004,2008,200,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r9272 r9282  
    360360            self.csv_file, STUDENT_HEADER_FIELDS)
    361361        self.assertEqual(num_warns,0)
    362         assert len(self.app['students'].keys()) == 5
     362        assert len(self.app['students'].keys()) == 6
    363363        self.assertEqual(self.app['students']['X666666'].reg_number,'1')
    364364        self.assertEqual(
     
    605605        num, num_warns, fin_file, fail_file = self.processor.doImport(
    606606            self.csv_file, VERDICT_HEADER_FIELDS,'update')
    607         self.assertEqual(num_warns,3)
     607        self.assertEqual(num_warns,4)
    608608        studycourse = self.processor.getEntry(dict(matric_number='100000'),
    609609                                              self.app)
     
    620620            '2007,C,100002,200,Current session does not correspond.\r\n'
    621621            '2008,A,100003,200,Student in wrong state.\r\n'
     622            '2008,<IGNORE>,100004,200,Verdict is missing.\r\n'
    622623            )
    623624        shutil.rmtree(os.path.dirname(fin_file))
Note: See TracChangeset for help on using the changeset viewer.