Ignore:
Timestamp:
30 Jan 2014, 14:13:41 (11 years ago)
Author:
Henrik Bettermann
Message:

Merge with changes made in trunk till r10944.

Location:
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa

    • Property svn:mergeinfo set to (toggle deleted branches)
      /main/waeup.kofa/trunk/src/waeup/kofamergedeligible
      /main/waeup.kofa/branches/uli-autoinclude-less/src/waeup/kofa8871-8888
      /main/waeup.sirp/branches/uli-studentpw/src/waeup/kofa6703-6755
      /main/waeup.sirp/branches/ulif-extimgstore/src/waeup/kofa7001-7062
      /main/waeup.sirp/branches/ulif-schoolgrades/src/waeup/kofa7761-7794
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/applicants/browser.py

    r11011 r11012  
    547547            IWorkflowState(self.context).getState() == INITIALIZED:
    548548            IWorkflowInfo(self.context).fireTransition('start')
     549        if usertype == 'applicant' and self.context.state == 'created':
     550            session = '%s/%s' % (self.context.__parent__.year,
     551                                 self.context.__parent__.year+1)
     552            title = getattr(grok.getSite()['configuration'], 'name', u'Sample University')
     553            msg = _(
     554                '\n <strong>Congratulations!</strong>' +
     555                ' You have been offered provisional admission into the' +
     556                ' ${c} Academic Session of ${d}.'
     557                ' Your student record has been created for you.' +
     558                ' Please, logout again and proceed to the' +
     559                ' login page of the portal.'
     560                ' Then enter your new student credentials:' +
     561                ' user name= ${a}, password = ${b}.' +
     562                ' Change your password when you have logged in.',
     563                mapping = {
     564                    'a':self.context.student_id,
     565                    'b':self.context.application_number,
     566                    'c':session,
     567                    'd':title}
     568                )
     569            self.flash(msg)
    549570        return
    550571
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/applicants/payment.py

    r10392 r11012  
    111111        return 'N/A'
    112112
     113    @property
     114    def email(self):
     115        "Email of payer"
     116        return self.context.__parent__.email
     117
     118    @property
     119    def phone(self):
     120        "Phone number of payer"
     121        return self.context.__parent__.phone
     122
     123    @property
     124    def current_mode(self):
     125        "Current study mode of payer"
     126        return 'N/A'
     127
     128    @property
     129    def current_level(self):
     130        "Current level of payer"
     131        return 'N/A'
     132
    113133# Applicant online payments must be importable. So we might need a factory.
    114134class ApplicantOnlinePaymentFactory(grok.GlobalUtility):
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/applicants/tests/test_browser.py

    r10874 r11012  
    566566        return
    567567
     568    def test_message_for_created(self):
     569        IWorkflowState(self.applicant).setState('created')
     570        self.applicant.student_id = u'my id'
     571        self.browser.open(self.login_path)
     572        self.login()
     573        self.assertTrue(
     574            'You logged in.' in self.browser.contents)
     575        self.assertTrue(
     576            '<strong>Congratulations!</strong> You have been offered provisional'
     577            ' admission into the %s/%s Academic Session of'
     578            ' Sample University. Your student record has been created for you.'
     579            % (session_1, session_1 + 1) in self.browser.contents)
     580        self.assertTrue(
     581            'Then enter your new student credentials: user name= my id,'
     582            ' password = %s.' % self.applicant.application_number
     583            in self.browser.contents)
     584        return
     585
    568586    def image_url(self, filename):
    569587        return self.edit_path.replace('edit', filename)
Note: See TracChangeset for help on using the changeset viewer.