Changeset 423 for WAeUP_SRP/trunk/Students.py
- Timestamp:
- 25 Aug 2006, 17:19:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r422 r423 23 23 def generateStudentId(): 24 24 import random 25 r = random .random()26 return "%c%d" % (r.choice('ABCDEFG IJHKLMNOPQRSTUVWXYZ'),r.randint(99999,1000000))25 r = random 26 return "%c%d" % (r.choice('ABCDEFGHKLMNPQRSTUVWXY'),r.randint(99999,1000000)) 27 27 28 28 … … 59 59 for s in l: 60 60 matrics.append(s.getObject().getContent().matric_no) 61 print matrics 61 62 l = self.portal_catalog({'meta_type': "Certificate"}) 62 63 certs = {} … … 167 168 tr_count = 0 168 169 tr_count += 1 170 return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1')) 169 171 return self.students.academics_contents() 170 172 ###) … … 391 393 ###) 392 394 395 class 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 411 InitializeClass(StudentClearance) 412 413 def 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 393 420 class StudentStudyCourse(CPSDocument): ###( 394 421 """ … … 415 442 ###) 416 443 417 class Student Eligibility(CPSDocument): ###(444 class StudentAdmission(CPSDocument): ###( 418 445 """ 419 446 WAeUP Student container for the various student data 420 447 """ 421 meta_type = 'Student Eligibility'422 portal_type = meta_type 423 security = ClassSecurityInfo() 424 425 security.declareProtected(View,"Title") 426 def Title(self): 427 """compose title""" 428 return " EligibilityData"429 430 431 InitializeClass(Student Eligibility)432 433 def addStudent Eligibility(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 458 InitializeClass(StudentAdmission) 459 460 def addStudentAdmission(container, id, REQUEST=None, **kw): 434 461 """Add a Students eligibility data.""" 435 ob = Student Eligibility(id, **kw)462 ob = StudentAdmission(id, **kw) 436 463 return CPSBase_adder(container, ob, REQUEST=REQUEST) 437 464
Note: See TracChangeset for help on using the changeset viewer.