Ignore:
Timestamp:
22 Sep 2013, 05:07:40 (11 years ago)
Author:
Henrik Bettermann
Message:

Scores can be removed.

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

Legend:

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

    r10634 r10637  
    30973097            for ticket in editable_tickets:
    30983098                score = ticket.score
    3099                 try:
    3100                     score = int(scores[tno])
    3101                 except ValueError:
    3102                     error += '%s, ' % ticket.student.display_fullname
     3099                if scores[tno] == '':
     3100                    score = None
     3101                else:
     3102                    try:
     3103                        score = int(scores[tno])
     3104                    except ValueError:
     3105                        error += '%s, ' % ticket.student.display_fullname
    31033106                if ticket.score != score:
    31043107                    ticket.score = score
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r10553 r10637  
    647647        default = None,
    648648        required = False,
     649        missing_value = None,
    649650        )
    650651
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r10636 r10637  
    17311731        self.assertTrue('Error: Score(s) of Anna Tester have not be updated'
    17321732            in self.browser.contents)
     1733        # Scores can be removed
     1734        self.browser.open(
     1735            "http://localhost/app/faculties/fac1/dep1/courses/COURSE1/edit_scores")
     1736        self.browser.getControl(name="scores", index=0).value = ''
     1737        self.browser.getControl("Update scores").click()
     1738        self.assertEqual(
     1739            self.student['studycourse']['100']['COURSE1'].score, None)
     1740        logcontent = open(logfile).read()
     1741        self.assertTrue('mrslecturer - students.browser.EditScoresPage - '
     1742                        'K1000000 100/COURSE1 score updated (None)' in logcontent)
    17331743
    17341744    def test_change_current_mode(self):
Note: See TracChangeset for help on using the changeset viewer.