Ignore:
Timestamp:
25 Aug 2006, 17:19:21 (18 years ago)
Author:
joachim
Message:

addopted studentimport to new schemas,

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r422 r423  
    2323def generateStudentId():
    2424    import random
    25     r = random.random()
    26     return "%c%d" % (r.choice('ABCDEFGIJHKLMNOPQRSTUVWXYZ'),r.randint(99999,1000000))
     25    r = random
     26    return "%c%d" % (r.choice('ABCDEFGHKLMNPQRSTUVWXY'),r.randint(99999,1000000))
    2727   
    2828   
     
    5959        for s in l:
    6060            matrics.append(s.getObject().getContent().matric_no)
     61        print matrics
    6162        l = self.portal_catalog({'meta_type': "Certificate"})
    6263        certs = {}
     
    167168                tr_count = 0
    168169            tr_count += 1
     170        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
    169171        return self.students.academics_contents()
    170172    ###)
     
    391393###)
    392394
     395class StudentClearance(CPSDocument): ###(
     396    """
     397    WAeUP Student container for the various student data
     398    """
     399    meta_type = 'StudentClearance'
     400    portal_type = meta_type
     401    security = ClassSecurityInfo()
     402
     403    security.declareProtected(View,"Title")
     404    def Title(self):
     405        """compose title"""
     406        content = self.getContent()
     407        #return "Clearance Data for %s %s" % (content.firstname,content.lastname)
     408        return "Clearance Data"
     409
     410
     411InitializeClass(StudentClearance)
     412
     413def addStudentClearance(container, id, REQUEST=None, **kw):
     414    """Add a Students personal data."""
     415    ob = StudentClearance(id, **kw)
     416    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     417
     418###)
     419
    393420class StudentStudyCourse(CPSDocument): ###(
    394421    """
     
    415442###)
    416443
    417 class StudentEligibility(CPSDocument): ###(
     444class StudentAdmission(CPSDocument): ###(
    418445    """
    419446    WAeUP Student container for the various student data
    420447    """
    421     meta_type = 'StudentEligibility'
    422     portal_type = meta_type
    423     security = ClassSecurityInfo()
    424 
    425     security.declareProtected(View,"Title")
    426     def Title(self):
    427         """compose title"""
    428         return "Eligibility Data"
    429 
    430 
    431 InitializeClass(StudentEligibility)
    432 
    433 def addStudentEligibility(container, id, REQUEST=None, **kw):
     448    meta_type = 'StudentAdmission'
     449    portal_type = meta_type
     450    security = ClassSecurityInfo()
     451
     452    security.declareProtected(View,"Title")
     453    def Title(self):
     454        """compose title"""
     455        return "Admission Data"
     456
     457
     458InitializeClass(StudentAdmission)
     459
     460def addStudentAdmission(container, id, REQUEST=None, **kw):
    434461    """Add a Students eligibility data."""
    435     ob = StudentEligibility(id, **kw)
     462    ob = StudentAdmission(id, **kw)
    436463    return CPSBase_adder(container, ob, REQUEST=REQUEST)
    437464
Note: See TracChangeset for help on using the changeset viewer.