- Timestamp:
- 30 Jan 2007, 16:53:16 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Widgets.py
r1343 r1376 693 693 datastructure[widget_id+'_b'] = b 694 694 datastructure[widget_id+'_n'] = n 695 696 ###) 695 ###) 697 696 698 697 def validate(self, datastructure, **kw): ###( … … 710 709 pins = self.portal_pins 711 710 pin = "%(prefix)s%(b)s%(n)s" % vars() 711 pin_str = "%(prefix)s-%(b)-s%(n)s" % vars() 712 712 do = 1 713 713 s_id = str(self.portal_membership.getAuthenticatedMember()) … … 716 716 do = 0 717 717 err ='You are not a Student. PIN neither checked nor used.' 718 s_logger.info('"%s","tried to use Scratchcard", "%s"' % (s_id,pin)) 718 s_logger.info('"%s","tried to use Scratchcard", "%s"' % (s_id,pin_str)) 719 elif len(n) != 10: 720 do = 0 721 err = 'Invalid PIN-Number length %d' % len(n) 722 s_logger.info('"%s","Invalid PIN-Number length", "%d"' % (s_id,len(n))) 719 723 elif self.reference == "": 720 724 ref = s_id … … 724 728 do = 0 725 729 datastructure.setError(widget_id, 'Errors in other data, PIN neither checked nor used.') 726 s_logger.info('"%s", "%s","entered wrong data together with pin", "%s"' % (s_id,ref,pin ))730 s_logger.info('"%s", "%s","entered wrong data together with pin", "%s"' % (s_id,ref,pin_str)) 727 731 while do: 728 732 ok = pins.searchAndSetRecord(pin,ref,prefix) 729 733 if ok < -2 or ok > 2: 730 734 err = 'Unknown error, please report!' 731 s_logger.info('"%s","%s", "caused unknown error with pin", "%s"' % (s_id,ref,pin ))735 s_logger.info('"%s","%s", "caused unknown error with pin", "%s"' % (s_id,ref,pin_str)) 732 736 break 733 737 elif ok == -2: 734 738 err = 'Service already activated but with a different PIN.' 735 s_logger.info('"%s","%s", "repeatedly activated service but with different pin", "%s"' % (s_id,ref,pin ))739 s_logger.info('"%s","%s", "repeatedly activated service but with different pin", "%s"' % (s_id,ref,pin_str)) 736 740 break 737 741 elif ok == -1: 738 742 err = 'Invalid PIN' 739 s_logger.info('"%s","%s", "entered invalid pin", "%s"' % (s_id,ref,pin ))743 s_logger.info('"%s","%s", "entered invalid pin", "%s"' % (s_id,ref,pin_str)) 740 744 break 741 745 if ok == 0: 742 746 err = 'PIN already used.' 743 s_logger.info('"%s","%s", "entered used pin", "%s"' % (s_id,ref,pin ))747 s_logger.info('"%s","%s", "entered used pin", "%s"' % (s_id,ref,pin_str)) 744 748 break 745 749 if ok >= 1: … … 748 752 if self.reference == "jamb_reg_no": 749 753 err = "You are already logged in." 750 s_logger.info('"%s","%s", "checked admission though logged in", "%s"' % (s_id,ref,pin ))754 s_logger.info('"%s","%s", "checked admission though logged in", "%s"' % (s_id,ref,pin_str)) 751 755 break 752 756 if ok == 1: 753 s_logger.info('"%s","%s", "successfully used pin", "%s"' % (s_id,ref,pin ))757 s_logger.info('"%s","%s", "successfully used pin", "%s"' % (s_id,ref,pin_str)) 754 758 else: 755 s_logger.info('"%s","%s", "repeatedly used pin", "%s"' % (s_id,ref,pin ))759 s_logger.info('"%s","%s", "repeatedly used pin", "%s"' % (s_id,ref,pin_str)) 756 760 break 757 761 else: 758 762 student = getStudentByRegNo(self,ref) 759 s_logger.info('"%s","%s","successfully used pin","%s"' % (s_id,ref,pin ))763 s_logger.info('"%s","%s","successfully used pin","%s"' % (s_id,ref,pin_str)) 760 764 if student is None: 761 765 err = "Student not found." … … 767 771 if hasattr(self.portal_directories.students,s_id): 768 772 err = "Please login with your Student Id %s and 10-digit PIN." % s_id 769 s_logger.info('"%s","%s", "repeatedly checked admission with pin", "%s"' % (s_id,ref,pin ))773 s_logger.info('"%s","%s", "repeatedly checked admission with pin", "%s"' % (s_id,ref,pin_str)) 770 774 break 771 775 else: 772 s_logger.info('"%s","%s","(non-member) repeatedly checked admission with pin", "%s"' % (s_id,ref,pin ))776 s_logger.info('"%s","%s","(non-member) repeatedly checked admission with pin", "%s"' % (s_id,ref,pin_str)) 773 777 else: 774 778 err = "Unknown error" % s_id 775 s_logger.info('"%s","%s", "repeatedly activated service with pin", "%s"' % (s_id,ref,pin ))779 s_logger.info('"%s","%s", "repeatedly activated service with pin", "%s"' % (s_id,ref,pin_str)) 776 780 break 777 781 try: 778 782 student.getContent().makeStudentMember(s_id,password=pin[4:]) 779 s_logger.info('"%s","%s", "has been created using pin", "%s"' % (s_id,ref,pin ))783 s_logger.info('"%s","%s", "has been created using pin", "%s"' % (s_id,ref,pin_str)) 780 784 except: 781 785 err = "Please login with your Student Id %s and 10-digit PIN." % s_id 782 s_logger.info('"%s","%s", "could not be made a member with pin", "%s"' % (s_id,ref,pin ))786 s_logger.info('"%s","%s", "could not be made a member with pin", "%s"' % (s_id,ref,pin_str)) 783 787 break 784 788 break -
WAeUP_SRP/trunk/profiles/default/layouts/student_schoolfee.xml
r1286 r1376 10 10 <property name="title">Schoolfee Scratch Card</property> 11 11 <property name="fields"> 12 <element value=" payment_id"/>12 <element value="order_id"/> 13 13 </property> 14 14 <property name="label">Access Code</property> -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py
r1371 r1376 33 33 validate = request.has_key("cpsdocument_create_button") 34 34 res,psm,ds = lt.renderLayout(layout_id= 'student_schoolfee', 35 schema_id= ' epayment',35 schema_id= 'payment', 36 36 context=context, 37 37 mapping=validate and request,
Note: See TracChangeset for help on using the changeset viewer.