Changeset 816 for WAeUP_SRP/trunk


Ignore:
Timestamp:
9 Nov 2006, 17:33:49 (18 years ago)
Author:
joachim
Message:

pin is now not used if jamb_no is invalid
reserve_accommodation had permission set to false instead of View
students_index got an error, when called from student in enter_clearance_pin

Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Widgets.py

    r807 r816  
    292292
    293293        valid = CPSStringWidget.validate(self, datastructure, **kw)
     294        #import pdb;pdb.set_trace()
    294295        if not valid:
    295296            return 0
     
    312313                datamodel = datastructure.getDataModel()
    313314                datamodel[self.fields[0]] = value
    314 
    315315            return not err
    316316
     
    455455    def validate(self, datastructure, **kw):
    456456        """Validate datastructure and update datamodel."""
    457         #import pdb;pdb.set_trace()
     457        import pdb;pdb.set_trace()
    458458        widget_id = self.getWidgetId()
    459459        v = datastructure[widget_id]
     
    466466        pins = self.portal_pins
    467467        pin = "%(prefix)s%(b)s%(n)s" % vars()
     468        do = 1
    468469        if self.reference == "":
    469470            ref = str(self.portal_membership.getAuthenticatedMember())
    470471        else:
    471472            ref = datastructure[self.reference]
    472         ok = pins.searchAndSetRecord(pin,ref,prefix)
    473         while 1:
     473            if datastructure.errors.get(self.reference) is not None:
     474                do = 0
     475                err = 'Invalid JAMB Number, PIN not used'
     476        while do:
     477            ok = pins.searchAndSetRecord(pin,ref,prefix)
    474478            if ok == -2:
    475479                err = 'You have already applied with a different PIN, please login.'
  • WAeUP_SRP/trunk/profiles/default/actions.xml

    r785 r816  
    154154     url_expr="string:${portal_url}/reserve_accommodation"
    155155     visible="True">
    156    <permission>False</permission>
     156   <permission>View</permission>
    157157  </action>
    158158  <action title="Register Courses" action_id="register_courses"
     
    160160     url_expr="string:${portal_url}/register_courses"
    161161     visible="True">
    162    <permission>False</permission>
     162   <permission>View</permission>
    163163  </action>
    164164  <action title="Home" action_id="students_home" category="student_navigation"
  • WAeUP_SRP/trunk/skins/waeup_student/students_index.py

    r805 r816  
    2020    return redirect("%s/srp_anonymous_view" % context.portal_url())
    2121
    22 campus = context.portal_catalog(meta_type = "University")[-1].getObject()
     22campus_url = "%s/campus" % (context.portal_url.getPortalPath())
     23#campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    2324
    2425if context.isManager():
    25     return redirect("%s/searchStudents" % campus.students.absolute_url())
     26    return redirect("%s/searchStudents" % campus_url)
    2627if context.isStudent():
    2728    info = context.getStudentInfo()
Note: See TracChangeset for help on using the changeset viewer.