Changeset 16229


Ignore:
Timestamp:
7 Sep 2020, 12:47:07 (4 years ago)
Author:
Henrik Bettermann
Message:

Enable graduated student record creation from transcript application data.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/applicants
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/applicant.py

    r16078 r16229  
    3232    grok.provides(ICustomApplicant)
    3333
     34    applicant_graduated_mapping = [
     35        ('firstname', 'firstname'),
     36        ('middlename', 'middlename'),
     37        ('lastname', 'lastname'),
     38        ('sex', 'sex'),
     39        ('date_of_birth', 'date_of_birth'),
     40        ('email', 'email'),
     41        ('phone', 'phone'),
     42        ('matric_number', 'matric_number'),
     43        ]
     44
    3445    def admchecking_fee_paid(self):
    3546        # We don't charge if admission checking fee is not set.
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r16227 r16229  
    780780    appl_url2 = 'https://uniben-alumni.waeup.org/applicants/tscs1/register'
    781781
     782class CreateGraduatedPage(UtilityView, grok.View):
     783    """Create a student object from transcript application data.
     784    """
     785    grok.context(ICustomApplicant)
     786    grok.name('creategraduated')
     787    grok.require('waeup.createStudents')
     788
     789    def update(self):
     790        success, msg = self.context.createStudent(view=self, graduated=True)
     791        if success:
     792            self.flash(msg)
     793        else:
     794            self.flash(msg, type='warning')
     795        self.redirect(self.url(self.context))
     796        return
     797
     798    def render(self):
     799        return
     800
    782801class ResultStatement(AdditionalFile):
    783802    grok.name('res_stat.pdf')
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/viewlets.py

    r14147 r16229  
    5050            return self.view.url(self.view.context, self.target)
    5151        return False
     52
     53class GraduatedStudentCreateActionButton(ManageActionButton):
     54    grok.order(5)
     55    grok.context(ICustomApplicant)
     56    grok.require('waeup.createStudents')
     57    icon = 'actionicon_entrance.png'
     58    text = _('Create graduated student')
     59    target ='creategraduated'
     60
     61    @property
     62    def target_url(self):
     63        """Get a URL to the target...
     64        """
     65        if self.context.state != 'processed':
     66            return
     67        return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.