source: WAeUP_SRP/trunk/skins/waeup_default/getNextSessionId.py @ 1764

Last change on this file since 1764 was 1764, checked in by Henrik Bettermann, 17 years ago

at the moment getSessionId returns the year not the Id so that getNextSessionId and pay_by_sc did not work properly

  • Property svn:keywords set to Id
File size: 416 bytes
RevLine 
[1758]1## Script (Python) "getSessionId"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=session
8##title=
9##
10# $Id: getNextSessionId.py 1764 2007-05-10 04:41:04Z henrik $
11"""
[1764]12return the next Session Id
[1758]13"""
[1764]14
15if session != context.getSessionId()[2:]:
[1758]16    ns = int(session) + 1
17else:
18    ns = int(session)
19ns = "%02d" % ns
20ns_str = context.portal_vocabularies.sessions.get(ns)
21
22return ns,ns_str
Note: See TracBrowser for help on using the repository browser.