Ignore:
Timestamp:
18 Mar 2007, 14:48:06 (18 years ago)
Author:
joachim
Message:

Fix for #121 also improve handling of "Processing in progress"

File:
1 edited

Legend:

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

    r1571 r1576  
    3030cert_id = student.course
    3131current_level = student.level
    32 in_progress =  session.get('in_progress','finished')
    33 if in_progress == 'finished':
     32in_progress =  request.get('in_progress','not started')
     33
     34if context.hasObject(current_level):
     35    response.redirect("%s/%s" % (context.absolute_url(),current_level))
     36    return
     37
     38if in_progress in ('not started','started'):
    3439    session.set('in_progress','started')
    35     view = context.in_progress_view(refresh=3,page='%s/study_level_view' % current_level)
     40    view = context.in_progress_view(refresh=3,page='create_level?in_progress=started')
    3641    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
    3742    response.setHeader('Content-length','%d' % (len(view)))
     
    3944    response.write(view)
    4045    response.write('')
    41 elif in_progress == 'started':
    42     return
    43 
    44 if context.hasObject(current_level):
    45     return
    46     level = getattr(context,current_level)
    47     return response.redirect("%s" % level.absolute_url())
     46    if in_progress == 'started':
     47        return
     48   
    4849
    4950context.invokeFactory('StudentStudyLevel',"%s" % current_level)
     
    105106        d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
    106107        course_result.getContent().edit(mapping=d)
    107 session.set('in_progress','finished')
    108108return
Note: See TracChangeset for help on using the changeset viewer.