source: waeup_product/trunk/skins/waeup_student/check_admission.py @ 47

Last change on this file since 47 was 47, checked in by joachim, 19 years ago

=weitere

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1##parameters=REQUEST
2# $Id: check_admission.py 47 2005-10-14 13:01:35Z joachim $
3"""
4process the Admission Form
5
6return html renderer + psm
7"""
8type_name = 'Jamb'
9ti = context.portal_types[type_name]
10
11REQUEST.set('type_name',type_name)
12
13validate = REQUEST.has_key("cpsdocument_edit_button")
14
15#student = context.getContent()
16student = context
17
18#jamb = getattr(student,'my-jamb').getContent()
19jamb = getattr(student,'my-jamb')
20
21##res = jamb.validateStoreRender(request=REQUEST,
22##                               layout_mode='create',
23##                               layout_mode_ok='admitted',
24##                               layout_mode_err='create',
25##                               layout_id='admission',
26##                               )
27
28lt = context.portal_layouts
29
30res,psm,ds = lt.renderLayout(layout_id= 'admission',
31                      schema_id= 'jamb',
32                      context=context,
33                      mapping=validate and REQUEST,
34                      ob={},
35                      layout_mode='create',
36                      )
37if psm == 'invalid':
38    return context.check_admission_form(rendered = res,
39                                 psm = psm,
40                                 ds = ds,
41                                 )
42   
43elif psm == 'valid':
44    return context.student_admitted_form(rendered = res,
45                                 psm = psm,
46                                 student = student,
47                                 jamb = jamb,
48                                 )
49   
50return res,psm,ds
51
Note: See TracBrowser for help on using the repository browser.