Ignore:
Timestamp:
20 Mar 2008, 16:20:15 (17 years ago)
Author:
joachim
Message:

fix for #112 okene, make create level more errortolerant

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/create_level.py

    r3074 r3362  
    176176
    177177if records:
    178     context.course_results.addMultipleRecords(records)
     178    existing_uids = context.course_results.addMultipleRecords(records)
     179    if existing_uids:
     180        logger.info('%s level %s %s existing keys' % (student.id,
     181                                                      current_level,
     182                                                     ",".join(existing_uids)))
     183       
    179184logger.info('%s finished to create level %s' % (student.id,current_level))
    180185
  • WAeUP_SRP/base/skins/waeup_student/level_delete.py

    r2817 r3362  
    1212delete a level, fix students review if necessary
    1313"""
     14try:
     15    from Products.zdb import set_trace
     16except:
     17    def set_trace():
     18        pass
    1419
    1520import logging
    16 logger = logging.getLogger('Skins.folder_delete')
     21logger = logging.getLogger('Skins.level_delete')
    1722member_id = str(context.portal_membership.getAuthenticatedMember())
    1823
     
    5055    for level_id in ids:
    5156        context.course_results.deleteResultsHere(level_id,student_id)
     57    logger.info("%s deleted level(s) %s of %s" % (member_id,','.join(ids),student_id))
    5258    here.manage_delObjects(ids)
    53 
    5459    message = 'portal_status_message=psm_item(s)_deleted'
    5560else:
Note: See TracChangeset for help on using the changeset viewer.