Ignore:
Timestamp:
5 Oct 2012, 17:18:18 (12 years ago)
Author:
Henrik Bettermann
Message:

Add delEntry method.

Extend level range.

File:
1 edited

Legend:

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

    r9296 r9301  
    488488        return studycourse.get(row['level'])
    489489
     490    def delEntry(self, row, site):
     491        studylevel = self.getEntry(row, site)
     492        parent = self.getParent(row, site)
     493        if studylevel is not None:
     494            student = self._getStudent(row, site)
     495            student.__parent__.logger.info('%s - Level removed: %s'
     496                % (student.student_id, studylevel.__name__))
     497            del parent[studylevel.__name__]
     498        return
     499
    490500    def updateEntry(self, obj, row, site):
    491501        """Update obj to the values given in row.
     
    515525        try:
    516526            level = int(row['level'])
    517             if level not in range(0,700,10):
     527            if level not in range(0,1000,10) + [999]:
    518528                errs.append(('level','no valid integer'))
    519529        except ValueError:
Note: See TracChangeset for help on using the changeset viewer.