Index: /WAeUP_SRP/trunk/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1466)
+++ /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1467)
@@ -96,5 +96,5 @@
 
     security.declarePublic('checkPassword') ###(
-    def checkPassword(self,password):
+    def checkPassword(self,student_id,password):
         "return a student password"
         student_entry = getattr(self.portal_directories.students,student_id,None)
@@ -102,4 +102,13 @@
             return False
         return getattr(student_entry,"password","not set") == password
+    ###)
+
+    security.declarePublic('editPassword') ###(
+    def editPassword(self,student_id,password):
+        "edit a student password"
+        student_entry = getattr(self.portal_directories.students,student_id,None)
+        if student_entry is None:
+            return 
+        setattr(student_entry,'password',password)
     ###)
 
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_change_password.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_change_password.xml	(revision 1466)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_change_password.xml	(revision 1467)
@@ -13,4 +13,5 @@
       <element value="old_password"/>
     </property>
+    <property name="is_required">True</property>
     <property name="label">Old Password</property>
     <property name="label_edit">Old Password</property>
@@ -18,6 +19,6 @@
     <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="password_widget"></property>
+    <property name="check_digit">False</property>
     <property name="size_min">6</property>
   </widget>
@@ -41,4 +42,5 @@
       <element value="repeat_password"/>
     </property>
+    <property name="is_required">True</property>
     <property name="label">Repeat Password</property>
     <property name="label_edit">Repeat Password</property>
Index: /WAeUP_SRP/trunk/skins/waeup_student/change_password.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/change_password.py	(revision 1466)
+++ /WAeUP_SRP/trunk/skins/waeup_student/change_password.py	(revision 1467)
@@ -7,5 +7,10 @@
 request = context.REQUEST
 import DateTime,logging
-
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+    
 current = DateTime.DateTime()
 #pr = context.portal_registration
@@ -14,4 +19,6 @@
 students_dir = context.portal_directories.students
 lt = context.portal_layouts
+wt = context.waeup_tool
+student_id = context.getStudentId()
 res,psm,ds = lt.renderLayout(layout_id= 'student_change_password',
                       schema_id= 'student_change_password',
@@ -34,5 +41,5 @@
     psm = "Please correct your input!"
     return context.change_password_form(rendered = res,
-                                 psm = None,
+                                 psm = psm,
                                  ds = ds,
                                  mode = "edit",
@@ -41,15 +48,22 @@
                                  )
 else:
-    student_id = context.getStudentId()
-    old_password = request.get('widget__old_password')
-    password = request.get('widget__password')
-    entry = students_dir.getEntry
-    context.portal_membership.setPassword(password)
-    psm = "Your Password has been changed"
+    pass
+old_password = request.get('widget__old_password')
+if not wt.checkPassword(student_id,old_password):
+    psm = "Old Password is not correct"
     return context.change_password_form(rendered = res,
-                                 psm = None,
-                                 ds = ds,
-                                 mode = "edit",
-                                 formaction = "change_password",
-                                 button = "Change Password",
-                                 )
+                             psm = psm,
+                             ds = ds,
+                             mode = "edit",
+                             formaction = "change_password",
+                             button = "Change Password",
+                             )
+#set_trace()
+password = request.get('widget__password')
+wt.editPassword(student_id,password)
+args = {}
+args['__ac_name'] = student_id
+args['__ac_password'] = password
+from urllib import urlencode
+url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args))
+return request.RESPONSE.redirect(url)
