Changeset 153 for waeup_product


Ignore:
Timestamp:
4 Nov 2005, 17:29:06 (19 years ago)
Author:
joachim
Message:

=corrected some typos

Location:
waeup_product/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/Students.py

    r152 r153  
    5353    def Title(self):
    5454        """compose title"""
    55        
     55        reg_nr = self.getId()[1:]
    5656        data = getattr(self,'PERSONAL',None)
    5757        if data is None:
     
    6161            return "%s %s" % (content.firstname,content.lastname)
    6262        return self.title
     63       
     64InitializeClass(Student)
     65
     66def addStudent(container, id, REQUEST=None, **kw):
     67    """Add a Student."""
     68    ob = Student(id, **kw)
     69    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     70
     71###)
     72
     73studentpersonal_fti = { ###(
     74    'title': 'WAeUP StudentPersonal',
     75    'description': '',
     76    'content_icon': 'student.gif',
     77    'content_meta_type': 'StudentPersonal',
     78    'factory': 'addStudent',
     79    'immediate_view': 'student_personal_index_html',
     80    'global_allow': True,
     81    'filter_content_types': True,
     82    'allowed_content_types': (),
     83    'allow_discussion': False,
     84}
     85
     86###)
     87
     88class StudentPersonal(CPSDocument): ###(
     89    """
     90    WAeUP Student container for the various student data
     91    """
     92    meta_type = 'StudentPersonal'
     93    portal_type = meta_type
     94    security = ClassSecurityInfo()
     95
     96    security.declareProtected(View,"Title")
     97    def Title(self):
     98        """compose title"""
     99        content = self.getContent()
     100        return "Personal Data for %s %s" % (content.firstname,content.lastname)
     101
     102   
     103InitializeClass(StudentPersonal)
     104
     105def addStudentPersonal(container, id, REQUEST=None, **kw):
     106    """Add a Students personal data."""
     107    ob = StudentPersonal(id, **kw)
     108    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     109
     110###)
     111
     112jamb_fti = { ###(
     113    'title': 'WAeUP Jamb',
     114    'description': '',
     115    'content_icon': '',
     116    'content_meta_type': 'Jamb',
     117    'factory': 'addJamb',
     118    'immediate_view': 'cpsdocument_view',
     119    'global_allow': True,
     120    'filter_content_types': True,
     121    'allowed_content_types': ('Course',),
     122    'allow_discussion': False,
     123}
     124###)
     125
     126class Jamb(CPSDocument): ###(
     127    """
     128    WAeUP Jamb containing the courses and students
     129    """
     130    meta_type = 'Jamb'
     131    portal_type = meta_type
     132    security = ClassSecurityInfo()
     133   
     134    security.declareProtected(View,"Title")
     135    def Title(self):
     136        """compose title"""
     137        content = self.getContent()
     138        return "JAMB Data for %s %s" % (content.firstname,content.lastname)
    63139
    64140    security.declareProtected(View,"setOwnership")
     
    68144        member = pm.getMemberById(member_id)
    69145        self.changeOwnership(member)
    70        
    71 InitializeClass(Student)
    72 
    73 def addStudent(container, id, REQUEST=None, **kw):
    74     """Add a Student."""
    75     ob = Student(id, **kw)
    76     return CPSBase_adder(container, ob, REQUEST=REQUEST)
    77 
    78 ###)
    79 
    80 studentpersonal_fti = { ###(
    81     'title': 'WAeUP StudentPersonal',
    82     'description': '',
    83     'content_icon': 'student.gif',
    84     'content_meta_type': 'StudentPersonal',
    85     'factory': 'addStudent',
    86     'immediate_view': 'student_personal_index_html',
    87     'global_allow': True,
    88     'filter_content_types': True,
    89     'allowed_content_types': (),
    90     'allow_discussion': False,
    91 }
    92 
    93 ###)
    94 
    95 class StudentPersonal(CPSDocument): ###(
    96     """
    97     WAeUP Student container for the various student data
    98     """
    99     meta_type = 'StudentPersonal'
    100     portal_type = meta_type
    101     security = ClassSecurityInfo()
    102 
    103     security.declareProtected(View,"Title")
    104     def Title(self):
    105         """compose title"""
    106         content = self.getContent()
    107         return "Personal Data for %s %s" % (content.firstname,content.lastname)
    108 
    109    
    110 InitializeClass(StudentPersonal)
    111 
    112 def addStudentPersonal(container, id, REQUEST=None, **kw):
    113     """Add a Students personal data."""
    114     ob = StudentPersonal(id, **kw)
    115     return CPSBase_adder(container, ob, REQUEST=REQUEST)
    116 
    117 ###)
    118 
    119 jamb_fti = { ###(
    120     'title': 'WAeUP Jamb',
    121     'description': '',
    122     'content_icon': '',
    123     'content_meta_type': 'Jamb',
    124     'factory': 'addJamb',
    125     'immediate_view': 'cpsdocument_view',
    126     'global_allow': True,
    127     'filter_content_types': True,
    128     'allowed_content_types': ('Course',),
    129     'allow_discussion': False,
    130 }
    131 ###)
    132 
    133 class Jamb(CPSDocument): ###(
    134     """
    135     WAeUP Jamb containing the courses and students
    136     """
    137     meta_type = 'Jamb'
    138     portal_type = meta_type
    139     security = ClassSecurityInfo()
    140    
    141     security.declareProtected(View,"Title")
    142     def Title(self):
    143         """compose title"""
    144         content = self.getContent()
    145         return "JAMB Data for %s %s" % (content.firstname,content.lastname)
    146 
    147     security.declareProtected(View,"setOwnership")
    148     def setOwnership(self,member_id):
    149         """set ownership"""
    150         pm = getattr(self,'portal_membership')
    151         member = pm.getMemberById(member_id)
    152         self.changeOwnership(member)
    153146
    154147InitializeClass(Jamb)
  • waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py

    r152 r153  
    221221          'action': 'temporary_view_all',
    222222          'condition': '',
    223           'permission': (View,),
     223          'permission': (StudentManage,UniversityManage),
    224224          'category': 'object',
    225225          'visible': True,},
  • waeup_product/trunk/skins/waeup_default/getWAeUPVocabularies.py

    r136 r153  
     1#-*- mode: python; mode: fold -*-
    12##parameters=
    23# $Id$
     
    1213vocabularies = {}
    1314
    14 nigerian_states_voc = {
     15nigerian_states = { ###(
    1516        'type': 'CPS Vocabulary',
    1617        'data': {'tuples': (
     
    5455            )},
    5556        }
    56 vocabularies['nigerian_states'] = nigerian_states_voc
     57vocabularies['nigerian_states'] = nigerian_states
     58###)
    5759
    58 faculties_voc = {
     60faculties = { ###(
    5961        'type': 'CPS Vocabulary',
    6062        'data': {'tuples': (
     
    7274            )},
    7375        }
    74 vocabularies['faculties'] = faculties_voc
    75 level_voc = {
     76vocabularies['faculties'] = faculties
     77###)
     78
     79level = { ###(
    7680        'type': 'CPS Vocabulary',
    7781        'data': {'tuples': (
     
    8286            )},
    8387        }
    84 vocabularies['courselevel'] = level_voc
     88vocabularies['courselevel'] = level
     89
     90###)
    8591
    8692vocabularies['range5'] = {'type': 'CPS Vocabulary',
Note: See TracChangeset for help on using the changeset viewer.