Index: WAeUP_SRP/trunk/Widgets.py
===================================================================
--- WAeUP_SRP/trunk/Widgets.py	(revision 3997)
+++ WAeUP_SRP/trunk/Widgets.py	(revision 3998)
@@ -1506,5 +1506,5 @@
                         break
                 try:
-                    student.getContent().makeStudentMember(s_id,password=b)
+                    student.getContent().makeStudentMember(s_id,password=n)
                     s_logger.info('%s/%s has been created using PIN %s' % (s_id,ref,pin_str))
                 except:
Index: WAeUP_SRP/trunk/profiles/default/layouts/student_change_password.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/layouts/student_change_password.xml	(revision 3997)
+++ WAeUP_SRP/trunk/profiles/default/layouts/student_change_password.xml	(revision 3998)
@@ -1,68 +1,70 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl" href="layout.xsl"?>
-<object name="student_password_change" 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="old_password" meta_type="Password Widget">
-    <property name="title">Old Password</property>
-    <property name="fields">
-      <element value="old_password"/>
-    </property>
-    <property name="is_required">True</property>
-    <property name="label">Old Password</property>
-    <property name="label_edit">Old Password</property>
-    <property name="readonly_layout_modes"/>
-    <property name="hidden_layout_modes"/>
-    <property name="hidden_readonly_layout_modes"/>
-    <property name="password_widget"></property>
-    <property name="check_digit">False</property>
-    <property name="size_min">3</property>
-    <property name="size_max">10</property>
-  </widget>
-  <widget name="password" meta_type="Password Widget">
-    <property name="title">New Password</property>
-    <property name="fields">
-      <element value="password"/>
-    </property>
-    <property name="label">New Password</property>
-    <property name="label_edit">New Password</property>
-    <property name="readonly_layout_modes"/>
-    <property name="hidden_layout_modes"/>
-    <property name="hidden_readonly_layout_modes"/>
-    <property name="password_widget"></property>
-    <property name="check_digit">True</property>
-    <property name="size_min">6</property>
-    <property name="size_max">10</property>
-  </widget>
-  <widget name="repeat_password" meta_type="Password Widget">
-    <property name="title">Repeat Password</property>
-    <property name="fields">
-      <element value="repeat_password"/>
-    </property>
-    <property name="is_required">True</property>
-    <property name="label">Repeat Password</property>
-    <property name="label_edit">Repeat Password</property>
-    <property name="readonly_layout_modes"/>
-    <property name="hidden_layout_modes"/>
-    <property name="hidden_readonly_layout_modes"/>
-    <property name="password_widget">password</property>
-    <property name="check_digit">True</property>
-    <property name="size_min">6</property>
-    <property name="size_max">10</property>
-  </widget>
-  <table>
-    <row>
-      <cell name="old_password"/>
-    </row>
-    <row>
-      <cell name="password"/>
-    </row>
-    <row>
-      <cell name="repeat_password"/>
-    </row>
-  </table>
+<object name="student_change_password" 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>
+ <property name="label"></property>
+ <property name="label_edit"></property>
+ <property name="is_i18n">False</property>
+ <widget name="old_password" meta_type="Password Widget">
+  <property name="title">Old Password</property>
+  <property name="fields">
+   <element value="old_password"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Old Password</property>
+  <property name="label_edit">Old Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="display_width">12</property>
+  <property name="size_min">1</property>
+  <property name="size_max">12</property>
+ </widget>
+ <widget name="password" meta_type="Password Widget">
+  <property name="title">New Password</property>
+  <property name="fields">
+   <element value="password"/>
+  </property>
+  <property name="label">New Password</property>
+  <property name="label_edit">New Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_min">6</property>
+  <property name="size_max">10</property>
+  <property name="check_digit">True</property>
+ </widget>
+ <widget name="repeat_password" meta_type="Password Widget">
+  <property name="title">Repeat Password</property>
+  <property name="fields">
+   <element value="repeat_password"/>
+  </property>
+  <property name="is_required">True</property>
+  <property name="label">Repeat Password</property>
+  <property name="label_edit">Repeat Password</property>
+  <property name="readonly_layout_modes"/>
+  <property name="hidden_layout_modes"/>
+  <property name="hidden_readonly_layout_modes"/>
+  <property name="size_min">6</property>
+  <property name="size_max">10</property>
+  <property name="password_widget">password</property>
+  <property name="check_digit">True</property>
+ </widget>
+ <table>
+  <row>
+   <cell name="old_password"/>
+  </row>
+  <row>
+   <cell name="password"/>
+  </row>
+  <row>
+   <cell name="repeat_password"/>
+  </row>
+ </table>
 </object>
+
Index: WAeUP_SRP/trunk/skins/cps_custom/logged_in.py
===================================================================
--- WAeUP_SRP/trunk/skins/cps_custom/logged_in.py	(revision 3997)
+++ WAeUP_SRP/trunk/skins/cps_custom/logged_in.py	(revision 3998)
@@ -177,5 +177,8 @@
                     p = res[0].pin
                     if len(p) > 10:
-                        pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
+                        if p.startswith('IPTP'):
+                            pin = "%s-%s-%s" % (p[:4],p[4:5],p[5:])
+                        else:
+                            pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
                     else:
                         pin = p
@@ -188,5 +191,5 @@
 
         elif s_review_state in ("admitted") and a_review_state == 'opened' and\
-                                            not app_doc.app_ac_pin:
+                                            (not app_doc.app_ac_pin or app_doc.app_ac_pin.startswith('IPT-P')):
             jamb_reg_no = app_doc.jamb_reg_no
             for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
@@ -197,5 +200,8 @@
                 p = res[0].pin
                 if len(p) > 10:
-                    pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
+                    if p.startswith('IPTP'):
+                        pin = "%s-%s-%s" % (p[:4],p[4:5],p[5:])
+                    else:
+                        pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])                    
                 else:
                     pin = p
