Ignore:
Timestamp:
11 Aug 2006, 05:51:59 (18 years ago)
Author:
joachim
Message:

more us work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r362 r364  
    104104                d['entry_session'] = "200%s" % (cs - cl)
    105105                sc.getContent().edit(mapping=d)
     106                #
     107                # Level
     108                #
     109                level = student.get('StudentLevel')
     110                l = getattr(sc,level,None)
     111                if l is None:
     112                    #self.log('Creating Department %(DeptCode)s = %(Description)s' % dep)
     113                    logger.info('Creating Level %(StudentLevel)s for %(fullname)s' % student)
     114                    sc.invokeFactory('StudyLevel', level)
     115                    l = getattr(sc, level)
     116                    certificate = certs[certcode]
     117                    cert_level = getattr(certificate,level,None)
     118                    if cert_level is None:
     119                        logger.info('Level %(level)s not in %(certcode)s' % vars())
     120                    l.getContent().edit(mapping={'Title': "Level %s" % level})
     121                    l.invokeFactory('Semester','first')
     122                    l.invokeFactory('Semester','second')
     123                    first_s = getattr(l,'first')
     124                    first_s.getContent().edit(mapping={'Title': 'First Semester'})
     125                    second_s = getattr(l,'second')
     126                    second_s.getContent().edit(mapping={'Title': 'Second Semester'})
    106127            else:
    107128                em = 'Faculty with ID %(MatricNo)s %(fullname)s already exists' % student
     
    113134        return self.students.folder_contents()
    114135    ###)
     136   
     137    security.declareProtected(View,"Title")
     138    def Title(self):
     139        """compose title"""
     140        return "Students Section"
    115141
    116142InitializeClass(StudentsFolder)
     
    223249        """compose title"""
    224250        content = self.getContent()
    225         return "Personal Data for %s %s" % (content.firstname,content.lastname)
     251        #return "Personal Data for %s %s" % (content.firstname,content.lastname)
     252        return "Personal Data"
    226253
    227254
     
    243270    security = ClassSecurityInfo()
    244271
    245 ##    security.declareProtected(View,"Title")
    246 ##    def Title(self):
    247 ##        """compose title"""
    248 ##        content = self.getContent()
    249 ##        return "StudyCourse Data for %s %s" % (content.firstname,content.lastname)
     272    security.declareProtected(View,"Title")
     273    def Title(self):
     274        """compose title"""
     275        content = self.getContent()
     276        return "Course Major"
    250277
    251278
Note: See TracChangeset for help on using the changeset viewer.