Index: eup_product/trunk/skins/waeup_student/add_course_ticket.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/add_course_ticket.py	(revision 162)
+++ 	(revision )
@@ -1,67 +1,0 @@
-##parameters=REQUEST
-# $Id$
-"""
-book an accomodation
-"""
-type_name = 'CourseTicket'
-ti = context.portal_types[type_name]
-pm = context.portal_membership
-REQUEST.set('type_name',type_name)
-
-validate = REQUEST.has_key("cpsdocument_create_button")
-
-
-lt = context.portal_layouts
-pv = context.portal_vocabularies
-#pr = context.portal_registration
-
-res,psm,ds = lt.renderLayout(layout_id= 'study_level',
-                      schema_id= 'metadata',
-                      context=context,
-                      mapping=validate and REQUEST,
-                      ob={},
-                      layout_mode='create',
-                      create_action = 'add_course_ticket',
-                      )
-if True or psm == 'invalid':
-    return context.common_edit_form(rendered = res,
-                                 create = 1,
-                                 type_name = type_name,
-                                 psm = 'Not yet active',
-                                 #psm = 'Please correct your errors',
-                                 )
-elif psm == '':
-    return context.common_edit_form(rendered = res,
-                                 create = 1,
-                                 type_name = type_name,
-                                 psm = psm,
-                                 #psm = str(ds),
-                                 )
-    
-elif psm == 'valid':
-    psm = (ds)
-    oid = ds.get('Title')
-    if hasattr(context,oid):
-        return context.common_edit_form(rendered = res,
-                                 create = 1,
-                                 type_name = type_name,
-                                 psm = 'You already registered for that level',
-                                 )
-    context.invokeFactory(type_name,oid) 
-    object = getattr(context,oid)
-    voc = pv.courselevel
-    ds.set('Title',voc.get(oid))
-    object.getContent().edit(mapping=ds,proxy=object)
-    context.notifyCPSDocumentCreation(ob=object)
-    psm = 'new %s created' % oid
-    semester_id = 'Semester_1_%s_%s' % (oid,context.getId())
-    object.invokeFactory('Semester',semester_id)
-    semester = getattr(object,semester_id)
-    semester.getContent().edit(mapping={'Title': 'First Semester'})
-    semester_id = 'Semester_2_%s_%s' % (oid,context.getId())
-    object.invokeFactory('Semester',semester_id)
-    semester = getattr(object,semester_id)
-    semester.getContent().edit(mapping={'Title': 'Second Semester'})
-    context_ti = context.portal_types[context.portal_type] 
-    index = context_ti.getActionById('view','university_view')
-    return getattr(context,index)(psm=psm)
Index: /waeup_product/trunk/skins/waeup_student/book_accommodation.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/book_accommodation.py	(revision 162)
+++ /waeup_product/trunk/skins/waeup_student/book_accommodation.py	(revision 163)
@@ -36,5 +36,5 @@
     halls = getattr(context,'accommodation').contentValues()
     beds = []
-    student = context.PERSONAL.getContent()
+    student = context.getContent()
     sf = context.getContent()
     for hall in halls:
@@ -59,7 +59,8 @@
     bal.append(('%s:%d' % (pm.getAuthenticatedMember(),ba)))
     dict['beds_assigned_list'] = bal
+    h.edit(mapping = dict)
+    ds.set('accommodation', "Bed # %(beds_assigned)s in %(heading)s" % dict)
+    sf.edit(mapping = ds)
+    #psm = "Your not admitted"
     psm = "h:%(heading)s free:%(nr_of_free)s %(beds_assigned)s" % dict
-    sf.edit(mapping = ds)
-    h.edit(mapping = dict)
-    #psm = "Your not admitted"
     return context.booked_accommodation(v=dict)
Index: /waeup_product/trunk/skins/waeup_student/register_study_level.py
===================================================================
--- /waeup_product/trunk/skins/waeup_student/register_study_level.py	(revision 163)
+++ /waeup_product/trunk/skins/waeup_student/register_study_level.py	(revision 163)
@@ -0,0 +1,67 @@
+##parameters=REQUEST
+# $Id$
+"""
+book an accomodation
+"""
+type_name = 'CourseTicket'
+ti = context.portal_types[type_name]
+pm = context.portal_membership
+REQUEST.set('type_name',type_name)
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+
+lt = context.portal_layouts
+pv = context.portal_vocabularies
+#pr = context.portal_registration
+
+res,psm,ds = lt.renderLayout(layout_id= 'study_level',
+                      schema_id= 'study_level',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'register_study_level',
+                      )
+if True or psm == 'invalid':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'Not yet active',
+                                 #psm = 'Please correct your errors',
+                                 )
+elif psm == '':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = psm,
+                                 #psm = str(ds),
+                                 )
+    
+elif psm == 'valid':
+    psm = (ds)
+    oid = ds.get('Title')
+    if hasattr(context,oid):
+        return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'You already registered for that level',
+                                 )
+    context.invokeFactory(type_name,oid) 
+    object = getattr(context,oid)
+    voc = pv.courselevel
+    ds.set('Title',voc.get(oid))
+    object.getContent().edit(mapping=ds,proxy=object)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created' % oid
+    semester_id = 'Semester_1_%s_%s' % (oid,context.getId())
+    object.invokeFactory('Semester',semester_id)
+    semester = getattr(object,semester_id)
+    semester.getContent().edit(mapping={'Title': 'First Semester'})
+    semester_id = 'Semester_2_%s_%s' % (oid,context.getId())
+    object.invokeFactory('Semester',semester_id)
+    semester = getattr(object,semester_id)
+    semester.getContent().edit(mapping={'Title': 'Second Semester'})
+    context_ti = context.portal_types[context.portal_type] 
+    index = context_ti.getActionById('view','university_view')
+    return getattr(context,index)(psm=psm)
