Changeset 2754


Ignore:
Timestamp:
24 Nov 2007, 21:44:39 (17 years ago)
Author:
Henrik Bettermann
Message:
  • session string from course result must not be imported into student_study_level object
  • student_study_level object must be closed after import of verdict
  • fix mass_create_course_result
  • commit after 2000
File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2753 r2754  
    14441444        course_id = mapping.get('code')
    14451445        if course_id not in self._v_courses.keys():
    1446             return '', "No course with ID: %s" % did
     1446            return '', "No course with ID: %s" % course_id
    14471447        id_key = ''
    14481448        for id_key in ('student_id','matric_no'):
     
    14681468                level = getattr(context,"%(level_id)s" % mapping)
    14691469                self.portal_workflow.doActionFor(level,'open')
    1470                 level.getContent().edit(mapping={'session': "%(session_id)s" % mapping})
     1470
     1471                # the session string must not be copied into the level object
     1472                #level.getContent().edit(mapping={'session': "%(session_id)s" % mapping})
     1473
    14711474                #self.portal_workflow.doActionFor(level,'close_for_edit')
    14721475            self._v_level_created += mapping['student_id'],
     
    16901693    security.declareProtected(ModifyPortalContent,'mass_edit_student') ###(
    16911694    def mass_edit_student(self,mapping):
     1695        wftool = self.portal_workflow
    16921696        "edit a students record due import"
    16931697        logger = logging.getLogger('WAeUPTool.mass_edit_student')
     
    17461750                        break
    17471751                    level.getContent().edit(mapping = d)
     1752                    try:
     1753                        wftool.doActionFor(level,'close')
     1754                    except:
     1755                        pass
    17481756                    break
    17491757            intersect = set(f2t[pt]['fields']).intersection(set(editable_keys))
     
    18161824        total = 0
    18171825        iname = "import_%s" % name
    1818         if iname == 'import_application':
     1826        if iname in ('import_application','import_course_result',):
    18191827            commit_after = 2000
    18201828        else:
Note: See TracChangeset for help on using the changeset viewer.