Changeset 154


Ignore:
Timestamp:
4 Nov 2005, 20:50:15 (19 years ago)
Author:
Henrik Bettermann
Message:
 
Location:
waeup_product/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/Students.py

    r153 r154  
    66from Products.CMFCore.permissions import View
    77from Products.CMFCore.permissions import ModifyPortalContent
    8 from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder 
    9 #from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument 
    10 from Products.CPSDocument.CPSDocument import CPSDocument 
    11 from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder 
     8from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
     9#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
     10from Products.CPSDocument.CPSDocument import CPSDocument
     11from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
    1212class StudentsFolder(BaseBTreeFolder): ###(
    1313    """
    14     WAeUP container for the various WAeUP containers data 
     14    WAeUP container for the various WAeUP containers data
    1515    """
    1616    meta_type = 'Students Folder'
    1717    portal_type = meta_type
    1818    security = ClassSecurityInfo()
    19    
    20        
     19
     20
    2121InitializeClass(StudentsFolder)
    2222
     
    4444class Student(CPSDocument): ###(
    4545    """
    46     WAeUP Student container for the various student data 
     46    WAeUP Student container for the various student data
    4747    """
    4848    meta_type = 'Student'
    4949    portal_type = meta_type
    5050    security = ClassSecurityInfo()
    51    
     51
    5252    security.declareProtected(View,"Title")
    5353    def Title(self):
     
    6161            return "%s %s" % (content.firstname,content.lastname)
    6262        return self.title
    63        
     63
     64    def Description(self):
     65        """compose description"""
     66        data = getattr(self,'JAMB',None)
     67        if data:
     68            content = data.getContent()
     69            return "Faculty: %s, Course: %s" % (content.faculty,content.course)
     70        return self.description
     71
    6472InitializeClass(Student)
    6573
     
    8896class StudentPersonal(CPSDocument): ###(
    8997    """
    90     WAeUP Student container for the various student data 
     98    WAeUP Student container for the various student data
    9199    """
    92100    meta_type = 'StudentPersonal'
     
    100108        return "Personal Data for %s %s" % (content.firstname,content.lastname)
    101109
    102    
     110
    103111InitializeClass(StudentPersonal)
    104112
     
    131139    portal_type = meta_type
    132140    security = ClassSecurityInfo()
    133    
     141
    134142    security.declareProtected(View,"Title")
    135143    def Title(self):
     
    174182    portal_type = meta_type
    175183    security = ClassSecurityInfo()
    176    
     184
    177185InitializeClass(StudyLevel)
    178186
     
    204212    portal_type = meta_type
    205213    security = ClassSecurityInfo()
    206    
     214
    207215InitializeClass(Semester)
    208216
  • waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py

    r153 r154  
    132132                 'action': 'folder_localrole_form',
    133133                 'permissions': (ModifyPortalContent,UniversityManage),
    134                  'visible' : 1,
     134                 'visible' : 0,
    135135                },
    136136##                {'id': 'contents',
     
    871871types['StudentPersonal'] = student_personal_type
    872872types['StudyLevel'] = study_level_folder
    873 types['Semester'] = semester_folder 
    874 types['CourseTicket'] = course_ticket 
     873types['Semester'] = semester_folder
     874types['CourseTicket'] = course_ticket
    875875types['AccoFolder'] = acco_folder
    876876types['Accommodation'] = accommodation
Note: See TracChangeset for help on using the changeset viewer.