## Script (Python) "script_registration" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind state=state ##bind subpath=traverse_subpath ##parameters=answer='' ##title=ScriptRegistration ## REQUEST=context.REQUEST practice = int(REQUEST.get('practice')) location = 'registration_view' action = REQUEST.get('action') if action == 'add': context.addStudentToPractice(REQUEST) state.set( portal_status_message="You are now registrated, your status is pending" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/'+location) elif action == 'del': context.delFromRegistrationData(REQUEST) state.set( portal_status_message="You are removed from queue" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/'+location) elif action == 'accept': context.acceptRegistrationDataByUser(REQUEST) state.set( portal_status_message="Selected users are accepted" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/'+location) elif action == 'reject': context.rejectRegistrationDataByUser(REQUEST) state.set( portal_status_message="Selected users are removed" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/'+location) else: pass