Index: /WAeUP_SRP/trunk/CHANGES.txt
===================================================================
--- /WAeUP_SRP/trunk/CHANGES.txt	(revision 3823)
+++ /WAeUP_SRP/trunk/CHANGES.txt	(revision 3824)
@@ -130,2 +130,6 @@
 -----------------
 - implement NAU Awka
+
+1.26 (2008-12-19)
+-----------------
+- implement configuration object (step 1)
Index: /WAeUP_SRP/trunk/Documents.py
===================================================================
--- /WAeUP_SRP/trunk/Documents.py	(revision 3823)
+++ /WAeUP_SRP/trunk/Documents.py	(revision 3824)
@@ -79,4 +79,7 @@
     ob = WAeUPDocument(id, **kw)
     return CPSBase_adder(container, ob, REQUEST=REQUEST)
+    
+    
+
 
 ###)
Index: /WAeUP_SRP/trunk/University.py
===================================================================
--- /WAeUP_SRP/trunk/University.py	(revision 3823)
+++ /WAeUP_SRP/trunk/University.py	(revision 3824)
@@ -28,3 +28,22 @@
     ob = University(id, **kw)
     return CPSBase_adder(container, ob, REQUEST=REQUEST)
+    
+        
+class WAeUPConfiguration(CPSDocument): ###(
+    """
+    WAeUP Configuration
+    """
+    meta_type = 'WAeUP Configuration'
+    portal_type = meta_type
+    security = ClassSecurityInfo()
 
+    def __init__(self, id, **kw):
+        CPSDocument.__init__(self, id, **kw)
+
+InitializeClass(WAeUPConfiguration)
+
+def addWAeUPConfiguration(container, id, REQUEST=None, **kw):
+    """Add a WAeUP Configuration."""
+    ob = WAeUPConfiguration(id, **kw)
+    return CPSBase_adder(container, ob, REQUEST=REQUEST)        
+
Index: /WAeUP_SRP/trunk/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/trunk/WAeUPTool.py	(revision 3823)
+++ /WAeUP_SRP/trunk/WAeUPTool.py	(revision 3824)
@@ -1882,4 +1882,17 @@
                 open(filename,"wb").write(str(image.data))
     ###)
+    
+    
+    security.declarePublic('getConfigParams')
+    def getConfigParams(self,conf_id="configuration"):
+        conf = getattr(self.portal_url.getPortalObject().campus,conf_id)
+        conf_obj = conf.getContent()
+        stool = getToolByName(self, 'portal_schemas')
+        schema = stool._getOb('configuration')
+        d = {}
+        for key in schema.keys():
+            d[key] = getattr(conf_obj,key,None)
+        return d
+
 
 InitializeClass(WAeUPTool)
Index: /WAeUP_SRP/trunk/__init__.py
===================================================================
--- /WAeUP_SRP/trunk/__init__.py	(revision 3823)
+++ /WAeUP_SRP/trunk/__init__.py	(revision 3824)
@@ -22,5 +22,9 @@
 
 waeup_types = (
-    ("University",('University',)),
+    ("University",
+       ('University',
+        'WAeUPConfiguration',
+        )
+    ),
     ("Academics",
        ("AcademicsFolder",
Index: /WAeUP_SRP/trunk/profiles/default/layouts.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/layouts.xml	(revision 3824)
@@ -116,4 +116,5 @@
   <object name="waeup_common" meta_type="CPS Layout"/> 
   <object name="student_gown" meta_type="CPS Layout"/>
+  <object name="configuration" meta_type="CPS Layout"/>
  
 </object>
Index: /WAeUP_SRP/trunk/profiles/default/layouts/configuration.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/configuration.xml	(revision 3824)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/configuration.xml	(revision 3824)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
+<object name="configuration" meta_type="CPS Layout">
+  <property name="layout_create_method"></property>
+  <property name="layout_edit_method"></property>
+  <property name="layout_view_method"></property>
+  <property name="style_prefix">layout_waeup_</property>
+  <property name="flexible_widgets"/>
+  <property name="validate_values_expr"></property>
+  
+  <widget name="inst_name" meta_type="String Widget">
+    <property name="title">Institution Name</property>
+    <property name="fields">
+      <element value="inst_name"/>
+    </property>
+    <property name="label">Institution Name</property>
+    <property name="label_edit">Institution Name</property>
+    <property name="readonly_layout_modes"/>
+    <property name="hidden_layout_modes"/>
+    <property name="hidden_readonly_layout_modes"/>
+  </widget>
+
+ <widget name="dead_pume" meta_type="DateTime Widget">
+  <property name="title">Deadline PUME</property>
+  <property name="fields">
+   <element value="dead_pume"/>
+  </property>
+  <property name="label">Deadline PUME</property>
+  <property name="label_edit">Deadline PUME (dd/mm/yy)</property>
+  <property name="readonly_layout_modes">
+  </property>
+  <property name="hidden_layout_modes">
+  </property>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="view_format">%d/%m/%Y</property>
+ </widget>    
+  
+  <table>
+    <row>
+      <cell name="inst_name"/>
+    </row>
+    <row>
+      <cell name="dead_pume"/>
+    </row>    
+  </table>
+</object>
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_firsttime_login.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_firsttime_login.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_firsttime_login.xml	(revision 3824)
@@ -51,6 +51,6 @@
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
-  <property name="display_width">14</property>
-  <property name="size_max">14</property>
+  <property name="display_width">18</property>
+  <property name="size_max">18</property>
   <property name="matric_no_catalog">students_catalog</property>
   <property name="results_catalog"></property>
Index: /WAeUP_SRP/trunk/profiles/default/roots/campus.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/roots/campus.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/roots/campus.xml	(revision 3824)
@@ -8,3 +8,4 @@
   <object name="uploads" portal_type="UploadsFolder" />
   <object name="documents" portal_type="DocumentsFolder" />
+  <object name="configuration" portal_type="WAeUPConfiguration" />
 </object>
Index: /WAeUP_SRP/trunk/profiles/default/roots/campus/configuration.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/roots/campus/configuration.xml	(revision 3824)
+++ /WAeUP_SRP/trunk/profiles/default/roots/campus/configuration.xml	(revision 3824)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="configuration">
+  <property name="Title">Configuration</property>
+</object>
Index: /WAeUP_SRP/trunk/profiles/default/roots/campus/documents.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/roots/campus/documents.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/roots/campus/documents.xml	(revision 3824)
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
-<object name="students">
+<object name="documents">
   <property name="Title">Documents</property>
 </object>
Index: /WAeUP_SRP/trunk/profiles/default/schemas.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/schemas.xml	(revision 3824)
@@ -88,4 +88,5 @@
  <object name="upload" meta_type="CPS Schema"/>
  <object name="waeup_common" meta_type="CPS Schema"/>
+ <object name="configuration" meta_type="CPS Schema"/>
  
  
Index: /WAeUP_SRP/trunk/profiles/default/schemas/configuration.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas/configuration.xml	(revision 3824)
+++ /WAeUP_SRP/trunk/profiles/default/schemas/configuration.xml	(revision 3824)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="schema.xsl"?>
+<object name="configuration" meta_type="CPS Schema">
+
+ <field name="inst_name" meta_type="CPS DateTime Field"/>
+ <field name="dead_pume" meta_type="CPS DateTime Field"/>
+ <field name="dead_pde" meta_type="CPS DateTime Field"/>
+ <field name="dead_prence" meta_type="CPS DateTime Field"/>
+ <field name="dead_pce" meta_type="CPS DateTime Field"/>
+ <field name="dead_cest" meta_type="CPS DateTime Field"/>
+ <field name="dead_sandwich" meta_type="CPS DateTime Field"/>
+ <field name="heading_pume" meta_type="CPS String Field"/>
+ <field name="heading_pde" meta_type="CPS String Field"/>
+ <field name="heading_prence" meta_type="CPS String Field"/>
+ <field name="heading_pce" meta_type="CPS String Field"/>
+ <field name="heading_cest" meta_type="CPS String Field"/>
+ <field name="heading_sandwich" meta_type="CPS String Field"/>
+ <field name="slip_pume" meta_type="CPS String Field"/>
+ <field name="slip_pde" meta_type="CPS String Field"/>
+ <field name="slip_prence" meta_type="CPS String Field"/>
+ <field name="slip_pce" meta_type="CPS String Field"/>
+ <field name="slip_cest" meta_type="CPS String Field"/>
+ <field name="slip_sandwich" meta_type="CPS String Field"/>
+ <field name="confirm_pume" meta_type="CPS String Field"/>
+ <field name="confirm_pde" meta_type="CPS String Field"/>
+ <field name="confirm_prence" meta_type="CPS String Field"/>
+ <field name="confirm_pce" meta_type="CPS String Field"/>
+ <field name="confirm_cest" meta_type="CPS String Field"/>
+ <field name="confirm_sandwich" meta_type="CPS String Field"/> 
+
+</object>
Index: /WAeUP_SRP/trunk/profiles/default/types.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/types.xml	(revision 3824)
@@ -139,4 +139,5 @@
  <object name="Upload" meta_type="CPS Flexible Type Information"/>
  <object name="StudentPastoralReport" meta_type="CPS Flexible Type Information"/>
+ <object name="WAeUPConfiguration" meta_type="CPS Flexible Type Information"/>
 
 
Index: /WAeUP_SRP/trunk/profiles/default/types/University.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/University.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/types/University.xml	(revision 3824)
@@ -16,4 +16,5 @@
   <element value="AccoFolder"/>
   <element value="StudentsFolder"/>
+  <element value="WAeUPConfiguration"/>
  </property>
  <property name="allow_discussion">False</property>
Index: /WAeUP_SRP/trunk/profiles/default/types/WAeUPConfiguration.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/WAeUPConfiguration.xml	(revision 3824)
+++ /WAeUP_SRP/trunk/profiles/default/types/WAeUPConfiguration.xml	(revision 3824)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="types.xsl"?>
+<object name="WAeUPConfiguration" meta_type="CPS Flexible Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">WAeUP Configuration</property>
+ <property name="description"></property>
+ <property name="content_meta_type">WAeUPConfiguration</property>
+ <property name="product">WAeUP_SRP</property>
+ <property name="factory">addWAeUPConfiguration</property>
+ <property name="immediate_view">waeup_document_view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <property name="cps_is_searchable">True</property>
+ <property name="cps_proxy_type">folder</property>
+ <property name="cps_display_as_document_in_listing">True</property>
+ <property name="schemas">
+  <element value="metadata"/>
+  <element value="waeup_common"/>
+  <element value="configuration"/>
+ </property>
+ <property name="layouts">
+  <element value="configuration"/>
+ </property>
+ <property name="layout_clusters">
+  <element value="metadata:metadata"/>
+ </property>
+ <property name="flexible_layouts"/>
+ <property name="storage_methods"/>
+ <property name="cps_is_portlet">False</property>
+ <alias from="create_do" to="waeup_document_create_do"/>
+ <alias from="(Default)" to="waeup_document_view"/>
+ <alias from="view" to="waeup_document_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    url_expr="string:${object_url}/waeup_document_view" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/waeup_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="action_metadata" action_id="metadata" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Delegate" action_id="localroles" category="object"
+    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
+    visible="False">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
Index: /WAeUP_SRP/trunk/profiles/default/workflows.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/workflows.xml	(revision 3823)
+++ /WAeUP_SRP/trunk/profiles/default/workflows.xml	(revision 3824)
@@ -136,4 +136,7 @@
    <bound-workflow workflow_id="waeup_document_wf"/>
   </type>
+  <type type_id="WAeUPConfiguration">
+   <bound-workflow workflow_id="waeup_section_wf"/>
+  </type>  
   <type type_id="StudentPastoralReport">
    <bound-workflow workflow_id="waeup_student_subobject_wf"/>
Index: /WAeUP_SRP/trunk/skins/cps_custom/cpsdocument_create.py
===================================================================
--- /WAeUP_SRP/trunk/skins/cps_custom/cpsdocument_create.py	(revision 3823)
+++ /WAeUP_SRP/trunk/skins/cps_custom/cpsdocument_create.py	(revision 3824)
@@ -25,10 +25,18 @@
 from Products.CPSDocument.utils import getFormUidUrlArg
 
+request = REQUEST
+
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
 ti = getToolByName(context, 'portal_types').getTypeInfo(type_name)
 
 while True:
     if not context.isSectionOfficer():
-        psm = "illegal access"
-        break
+        return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
     is_valid, ds = ti.validateObject(None, layout_mode='create',
                                     request=REQUEST, context=context,
Index: /WAeUP_SRP/trunk/skins/waeup_default/getConfigParams.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_default/getConfigParams.py	(revision 3824)
+++ /WAeUP_SRP/trunk/skins/waeup_default/getConfigParams.py	(revision 3824)
@@ -0,0 +1,16 @@
+## Script (Python) "getConfigParams"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+"""
+return configuration parameters
+"""
+
+params = context.waeup_tool.getConfigParams()
+
+return params
Index: /WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py	(revision 3823)
+++ /WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py	(revision 3824)
@@ -11,5 +11,5 @@
 request = context.REQUEST
 
-if type_name in ("StudyLevel","StudentStudyLevel","WAeUPDocument","StudentPastoralReport"):
+if type_name in ("StudyLevel","StudentStudyLevel","WAeUPDocument","StudentPastoralReport","WAeUPConfiguration"):
     id = datamodel.get('code')
 else:
Index: /WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py	(revision 3823)
+++ /WAeUP_SRP/trunk/skins/waeup_student/apply_admission.py	(revision 3824)
@@ -57,4 +57,8 @@
 
 deaddates = {}
+
+#config_params = context.getConfigParams()
+#deaddates['pume'] = config_params['dead_pume']
+
 deaddates['pume'] = DateTime.DateTime('2008/08/19 07:00')
 deaddates['pde'] = DateTime.DateTime('2008/10/02 23:59')
Index: /WAeUP_SRP/trunk/skins/waeup_utilities/create_configuration_file.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/create_configuration_file.py	(revision 3824)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/create_configuration_file.py	(revision 3824)
@@ -0,0 +1,26 @@
+## Script (Python) "create_configuration_file"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: create_configuration_file.py 1504 2007-02-26 21:20:40Z henrik $
+"""
+create Configuration File
+"""
+from urllib import urlencode
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+import logging
+logger = logging.getLogger('Skins.create_configuration_file')
+
+wftool = context.portal_workflow
+campus_folder = context.portal_url.getPortalObject().campus
+campus_folder.invokeFactory('WAeUPConfiguration',"configuration")
+campus_folder.configuration.getContent().edit(mapping={'title': 'Configuration Parameters'})
+
