Changeset 3481


Ignore:
Timestamp:
1 May 2008, 05:53:28 (16 years ago)
Author:
Henrik Bettermann
Message:

fix addStudent (fetch dictionary correctly)

remove Title completely (Title was still indexed in portal_catalog)

remove Title method from PaymentsFolder? class

Location:
WAeUP_SRP/base
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Payment.py

    r3274 r3481  
    2626    security = ClassSecurityInfo()
    2727
    28     security.declareProtected(View,"Title")
    29     def Title(self):
    30         """compose title"""
    31         return "Payments"
     28    #security.declareProtected(View,"Title")
     29    #def Title(self):
     30    #    """compose title"""
     31    #    return "Payments"
    3232
    3333
     
    7070#        return "%(description)s, Naira %(amount)s, %(pay_date)s" % vars()
    7171
    72     security.declareProtected(View,"Title")
    73     def Title(self):
    74         """compose title"""
    75         payment = self.getContent()
    76         vocabularies = self.portal_vocabularies
    77        
    78         if payment.status == 'invalid':
    79             return "Invalid Payment, Naira %s, %s" % (payment.amount,
    80                                                       payment.date.strftime("%d/%m/%y %H:%M:%S"))             
    81        
    82         return "%s for Session %s, Naira %s, %s" % (vocabularies.payment_categories.get(payment.category),
    83                                                     vocabularies.sessions.get(payment.session_id),
    84                                                     payment.amount,
    85                                                     payment.date.strftime("%d/%m/%y %H:%M:%S"))       
     72    #security.declareProtected(View,"Title")
     73    #def Title(self):
     74    #    """compose title"""
     75    #    payment = self.getContent()
     76    #    vocabularies = self.portal_vocabularies
     77   
     78    #    if payment.status == 'invalid':
     79    #        return "Invalid Payment, Naira %s, %s" % (payment.amount,
     80    #                                                  payment.date.strftime("%d/%m/%y %H:%M:%S"))
     81
     82    #    return "%s for Session %s, Naira %s, %s" % (vocabularies.payment_categories.get(payment.category),
     83    #                                                vocabularies.sessions.get(payment.session_id),
     84    #                                                payment.amount,
     85    #                                                payment.date.strftime("%d/%m/%y %H:%M:%S"))
    8686
    8787
  • WAeUP_SRP/base/Students.py

    r3473 r3481  
    666666    def createSubObjects(self):
    667667        """make the student a member"""
    668         dp = {'Title': 'Personal Data'}
     668        #dp = {'Title': 'Personal Data'}
    669669        app_doc = self.application.getContent()
    670670        names = app_doc.jamb_lastname.split()
     
    898898    #         return "%s" % ce.Title
    899899    #     return "No course with id %s" % cid
    900  
     900
    901901InitializeClass(StudentCourseResult)
    902902
  • WAeUP_SRP/base/WAeUPImport.py

    r3431 r3481  
    672672                      'StudentApplication':
    673673                          {'id': 'application',
    674                            'title': 'Application Data',
     674                           #'title': 'Application Data',
    675675                           'wf_transition_return': 'close',
    676676                           'wf_transition_admit': 'remain',
     
    698698                      'StudentClearance':
    699699                          {'id': 'clearance',
    700                            'title': 'Clearance/Eligibility Record',
     700                           #'title': 'Clearance/Eligibility Record',
    701701                           'wf_transition_return': 'close',
    702702                           'wf_transition_admit': 'remain',
     
    710710                         'StudentPersonal':
    711711                          {'id': 'personal',
    712                            'title': 'Personal Data',
     712                           #'title': 'Personal Data',
    713713                           'wf_transition_return': 'open',
    714714                           'wf_transition_admit': 'remain',
     
    725725                         'StudentStudyCourse':
    726726                          {'id': 'study_course',
    727                            'title': 'Study Course',
     727                           #'title': 'Study Course',
    728728                           'wf_transition_return': 'open',
    729729                           'wf_transition_admit': 'remain',
     
    749749                         'PaymentsFolder':
    750750                          {'id': 'payments',
    751                            'title': 'Payments',
     751                           #'title': 'Payments',
    752752                           'wf_transition_return': 'open',
    753753                           'wf_transition_admit': 'open',
     
    796796                sub_obj = getattr(student_obj,f2t[pt]['id'])
    797797                sub_doc = sub_obj.getContent()
    798                 d['Title'] = f2t[pt]['title']
     798                #d['Title'] = f2t[pt]['title']
    799799                for field in f2t[pt]['fields']:
    800800                    d[field] = mapping.get(field,'')
     
    915915                            continue
    916916                        sub_obj = getattr(student_obj,object_id)
    917                         if f2t[pt]['title'] != '':
    918                             d['Title'] = f2t[pt]['title']
     917                        #if f2t[pt]['title'] != '':
     918                        #    d['Title'] = f2t[pt]['title']
    919919                    sub_doc = sub_obj.getContent()
    920920                    for field in intersect:
  • WAeUP_SRP/base/WAeUPTool.py

    r3473 r3481  
    697697        students_folder.invokeFactory('Student', sid)
    698698        student_obj = getattr(students_folder,sid)
    699         f2t = self.field2types_student
     699        f2t = StudentImport.field2types_student
    700700        #from pdb import set_trace; set_trace()
    701701        d = {}
     
    720720            sub_doc = sub_obj.getContent()
    721721            #self.portal_workflow.doActionFor(sub_obj,'open',dest_container=sub_obj)
    722             d['Title'] = f2t[pt]['title']
     722            #d['Title'] = f2t[pt]['title']
    723723            for field in f2t[pt]['fields']:
    724724                d[field] = dict.get(field,'')
  • WAeUP_SRP/base/skins/waeup_epayment/payments_view.pt

    r3226 r3481  
    1919          <span tal:condition="not:is_student" tal:omit-tag="">
    2020            <span tal:content="s_name" />:</span>
    21           <span tal:condition="is_student" tal:omit-tag="">My</span> <span tal:content="here/title_or_id" />
     21          <span tal:condition="is_student" tal:omit-tag="">My</span> Payments
    2222        </h3>
    2323        <br />
Note: See TracChangeset for help on using the changeset viewer.