Changeset 986


Ignore:
Timestamp:
4 Dec 2006, 23:51:35 (18 years ago)
Author:
joachim
Message:

log more cases to students_pin_usage
handle the case when student enters same pin and jamb_reg_no, and that is
not found by searchAndSetRecord
makeStudentMember surrounded by try: except:
Error Text now contains the student_id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Widgets.py

    r977 r986  
    490490                else:
    491491                    student = getStudentByRegNo(self,ref)
     492                    s_logger.info("Student RegNo %s used Pin %s" % (s_id,ref))
    492493                if student is None:
    493494                    err = "Student not found."
     
    495496                s_id = student.getId()
    496497                if ok == 2:
    497                     err = "You are a portal member, please login with your Student Id and Password."
     498                    err = "Please login with your Student Id %s and Password." % s_id
     499                    s_logger.info("Student %s double used Pin %s" % (s_id,ref))
    498500                    break
    499                 student.getContent().makeStudentMember(s_id,password=pin[4:])
    500                 s_logger.info("Student %s created using Pin %s" % (s_id,pin))
     501                if self.reference == "jamb_reg_no":
     502                    res = self.students_catalog(jamb_reg_no = ref)
     503                    if len(res) > 0:
     504                        err = "Please login with your Student Id %s and Password." % s_id
     505                        s_logger.info("Student %s double checked Admission Pin %s" % (s_id,ref))
     506                        break
     507                try:
     508                    student.getContent().makeStudentMember(s_id,password=pin[4:])
     509                    s_logger.info("Student %s created using Pin %s" % (s_id,pin))
     510                except:
     511                    err = "Please login with your Student Id %s and Password." % s_id
     512                    s_logger.info("Student %s double creation with Pin %s" % (s_id,ref))
     513                    break
    501514            break
    502515        if err:
Note: See TracChangeset for help on using the changeset viewer.