Changeset 440 for WAeUP_SRP/trunk/Students.py
- Timestamp:
- 29 Aug 2006, 11:56:53 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r435 r440 33 33 portal_type = meta_type 34 34 security = ClassSecurityInfo() 35 use_catalog_for_folder_contents = True36 35 37 36 security.declareProtected(ModifyPortalContent,"loadFullTimeStudentsFromCSV")###( … … 470 469 ###) 471 470 472 class StudentDocuments(CPSDocument): ###(473 """474 WAeUP Student container for the various student data475 """476 meta_type = 'StudentDocuments'477 portal_type = meta_type478 security = ClassSecurityInfo()479 480 security.declareProtected(View,"Title")481 def Title(self):482 """compose title"""483 content = self.getContent()484 return "Scanned Documents"485 486 487 InitializeClass(StudentDocuments)488 489 def addStudentDocuments(container, id, REQUEST=None, **kw):490 """Add a Students documents"""491 ob = StudentDocuments(id, **kw)492 return CPSBase_adder(container, ob, REQUEST=REQUEST)493 494 ###)495 496 class Jamb(CPSDocument): ###(497 """498 WAeUP Jamb containing the courses and students499 """500 meta_type = 'Jamb'501 portal_type = meta_type502 security = ClassSecurityInfo()503 504 security.declareProtected(View,"Title")505 def Title(self):506 """compose title"""507 content = self.getContent()508 return "JAMB Data for %s %s" % (content.firstname,content.lastname)509 510 security.declareProtected(View,"setOwnership")511 def setOwnership(self,member_id):512 """set ownership"""513 pm = getattr(self,'portal_membership')514 member = pm.getMemberById(member_id)515 self.changeOwnership(member)516 517 InitializeClass(Jamb)518 519 def addJamb(container, id, REQUEST=None, **kw):520 """Add a Jamb."""521 ob = Jamb(id, **kw)522 return CPSBase_adder(container, ob, REQUEST=REQUEST)523 524 ###)525 526 471 class StudyLevel(CPSDocument): ###( 527 472 """ … … 531 476 portal_type = meta_type 532 477 security = ClassSecurityInfo() 478 479 security.declareProtected(View,"Title") 480 def Title(self): 481 """compose title""" 482 return "Level %s" % self.aq_parent.getId() 483 533 484 534 485 InitializeClass(StudyLevel) … … 558 509 ###) 559 510 511 class ScratchCardBatchesFolder(CPSDocument): ###( 512 """ 513 WAeUP Student container for the various student data 514 """ 515 meta_type = 'ScratchCardBatchesFolder' 516 portal_type = meta_type 517 security = ClassSecurityInfo() 518 519 security.declareProtected(View,"Title") 520 def Title(self): 521 """compose title""" 522 return "Pin Batches" 523 524 525 InitializeClass(ScratchCardBatchesFolder) 526 527 def addScratchCardBatchesFolder(container, id, REQUEST=None, **kw): 528 """Add a Students personal data.""" 529 ob = ScratchCardBatchesFolder(id, **kw) 530 return CPSBase_adder(container, ob, REQUEST=REQUEST) 531 532 ###) 533 534 from Products.WAeUP_SRP.WAeUPTables import PinTable 535 536 class ScratchCardBatch(CPSDocument): ###( 537 """ 538 WAeUP Student container for the various student data 539 """ 540 meta_type = 'ScratchCardBatch' 541 portal_type = meta_type 542 security = ClassSecurityInfo() 543 544 security.declareProtected(View,"Title") 545 def Title(self): 546 """compose title""" 547 doc = self.getContent() 548 return "Pin Batch %s BatchNo %d" % (doc.prefix, doc.batch_no) 549 550 551 InitializeClass(ScratchCardBatch) 552 553 def addScratchCardBatch(container, id, REQUEST=None, **kw): 554 """Add a Students personal data.""" 555 ob = ScratchCardBatch(id, **kw) 556 return CPSBase_adder(container, ob, REQUEST=REQUEST) 557 558 ###)
Note: See TracChangeset for help on using the changeset viewer.