Changeset 16786 for main/waeup.aaue/trunk
- Timestamp:
- 8 Feb 2022, 21:35:52 (3 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/applicant.py
r15991 r16786 22 22 from waeup.kofa.interfaces import IExtFileStore 23 23 from waeup.kofa.applicants.applicant import ApplicantFactory 24 from waeup.kofa.applicants.refereereport import ( 25 ApplicantRefereeReport, ApplicantRefereeReportFactory) 24 26 from waeup.kofa.utils.helpers import attrs_to_fields 25 27 from kofacustom.nigeria.applicants.applicant import NigeriaApplicant … … 27 29 ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, 28 30 IPUTMEApplicantEdit, ITranscriptApplicant, ICertificateRequest, 29 IFedexRequest, IRecruitment )31 IFedexRequest, IRecruitment, ICustomApplicantRefereeReport) 30 32 31 33 class CustomApplicant(NigeriaApplicant): … … 64 66 def getInterfaces(self): 65 67 return implementedBy(CustomApplicant) 68 69 class CustomApplicantRefereeReport(ApplicantRefereeReport): 70 """This is a custom referee report. 71 """ 72 grok.implements(ICustomApplicantRefereeReport) 73 grok.provides(ICustomApplicantRefereeReport) 74 75 CustomApplicantRefereeReport = attrs_to_fields(CustomApplicantRefereeReport) 76 77 class CustomApplicantRefereeReportFactory(ApplicantRefereeReportFactory): 78 """A factory for applicant online payments. 79 """ 80 81 def __call__(self, *args, **kw): 82 return CustomApplicantRefereeReport() 83 84 def getInterfaces(self): 85 return implementedBy(CustomApplicantRefereeReport) -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r16774 r16786 31 31 from waeup.kofa.applicants.browser import ( 32 32 ApplicantCheckStatusPage, 33 AdditionalFile) 33 AdditionalFile, 34 RefereeReportAddFormPage, 35 RefereeReportDisplayFormPage, 36 ExportPDFReportSlipPage, 37 ExportPDFReportSlipPage2) 34 38 from waeup.kofa.applicants.workflow import STARTED, PAID 35 39 from waeup.kofa.applicants.viewlets import PDFActionButton … … 62 66 IRecruitment, 63 67 ICustomApplicantOnlinePayment, 68 ICustomApplicantRefereeReport, 64 69 ) 65 70 … … 781 786 self.context, applicantview, note=self.note) 782 787 788 class CustomRefereeReportAddFormPage(RefereeReportAddFormPage): 789 """Add-form to add an referee report. This form 790 is protected by a mandate. 791 """ 792 form_fields = grok.AutoFields( 793 ICustomApplicantRefereeReport).omit('creation_date') 794 795 class CustomRefereeReportDisplayFormPage(RefereeReportDisplayFormPage): 796 """A display view for referee reports. 797 """ 798 form_fields = grok.AutoFields(ICustomApplicantRefereeReport) 799 form_fields[ 800 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 801 802 class CustomExportPDFReportSlipPage(ExportPDFReportSlipPage): 803 form_fields = grok.AutoFields(ICustomApplicantRefereeReport) 804 form_fields[ 805 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 806 807 class CustomExportPDFReportSlipPage2(ExportPDFReportSlipPage2): 808 form_fields = grok.AutoFields(ICustomApplicantRefereeReport) 809 form_fields[ 810 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 811 783 812 class StateResult(AdditionalFile): 784 813 """Renders the pdf form extension for applicants. -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/export.py
r14304 r16786 21 21 from waeup.kofa.applicants.interfaces import IApplicantBaseData 22 22 from waeup.kofa.utils.helpers import iface_names 23 from waeup.kofa.applicants.export import ApplicantRefereeReportExporter 23 24 from kofacustom.nigeria.applicants.export import NigeriaApplicantExporter 24 25 from kofacustom.nigeria.applicants.interfaces import ( 25 26 INigeriaUGApplicant, INigeriaPGApplicant) 26 27 from waeup.aaue.applicants.interfaces import ( 27 ICustomUGApplicant, ITranscriptApplicant, ICertificateRequest) 28 ICustomUGApplicant, ITranscriptApplicant, ICertificateRequest, 29 ICustomApplicantRefereeReport) 28 30 29 31 class CustomApplicantExporter(NigeriaApplicantExporter): … … 41 43 'password', 'state', 'history', 'container_code', 'application_number', 42 44 'display_fullname', 'application_date') 45 46 class CustomApplicantRefereeReportExporter(ApplicantRefereeReportExporter): 47 48 fields = tuple(sorted(iface_names( 49 ICustomApplicantRefereeReport, 50 exclude_attribs=False))) + ( 51 'applicant_id', 52 'reg_number', 53 'display_fullname',) 54 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r16763 r16786 33 33 from waeup.kofa.applicants.interfaces import ( 34 34 contextual_reg_num_source, 35 IApplicantBaseData) 35 IApplicantBaseData, 36 IApplicantRefereeReport) 36 37 from waeup.kofa.refereeentries import RefereeEntryField 37 38 from waeup.kofa.university.vocabularies import StudyModeSource … … 81 82 (_('Proficiency in English Language'), 'english'), 82 83 ) 84 85 rating_vocab = SimpleKofaVocabulary( 86 (_('Excellent'), 'e'), 87 (_('Very good'), 'vg'), 88 (_('Good'), 'g'), 89 (_('Slightly above average'), 'saa'), 90 (_('Average'), 'a'), 91 (_('Below average'), 'ba'), 92 (_('Unable to assess'), 'unable'), 93 ) 94 95 overallpromise_vocab = SimpleKofaVocabulary( 96 (_('Very good (highest 10%)'), 'vg'), 97 (_('Good (next 15%)'), 'g'), 98 (_('Above average (next 15%)'), 'aa'), 99 (_('Average (middle 20%)'), 'a'), 100 (_('Below average (lower 10%)'), 'ba'), 101 ) 102 83 103 84 104 class ICustomUGApplicant(IApplicantBaseData): … … 1647 1667 ) 1648 1668 1649 1650 1651 1669 class ICustomApplicantRefereeReport(IApplicantRefereeReport): 1670 """A referee report. 1671 """ 1672 1673 duration = schema.Text( 1674 title = _(u'How long and in what capacity have you known the candidate?'), 1675 required = False, 1676 ) 1677 1678 itellectual = schema.Choice( 1679 title = _(u'Intellectual Capacity'), 1680 required = False, 1681 readonly = False, 1682 vocabulary = rating_vocab, 1683 ) 1684 1685 persistent = schema.Choice( 1686 title = _(u'Capacity for Persistent and Independent Academic Study'), 1687 required = False, 1688 readonly = False, 1689 vocabulary = rating_vocab, 1690 ) 1691 1692 imaginative = schema.Choice( 1693 title = _(u'Ability for Imaginative Thought'), 1694 required = False, 1695 readonly = False, 1696 vocabulary = rating_vocab, 1697 ) 1698 1699 productive = schema.Choice( 1700 title = _(u'Promise of Productive Scholarship'), 1701 required = False, 1702 readonly = False, 1703 vocabulary = rating_vocab, 1704 ) 1705 1706 previous = schema.Choice( 1707 title = _(u'Quality of Previous Work'), 1708 required = False, 1709 readonly = False, 1710 vocabulary = rating_vocab, 1711 ) 1712 1713 expression = schema.Choice( 1714 title = _(u'Oral and Written Expression in English'), 1715 required = False, 1716 readonly = False, 1717 vocabulary = rating_vocab, 1718 ) 1719 1720 personality = schema.Text( 1721 title = _(u'Please comment on the candidate\'s personality ' 1722 'with particular reference to his/her moral character, emotional ' 1723 'and physical stabilty'), 1724 required = False, 1725 ) 1726 1727 promise = schema.Choice( 1728 title = _(u'Candidate\'s overall promise'), 1729 required = False, 1730 readonly = False, 1731 vocabulary = overallpromise_vocab, 1732 ) 1733 1734 report = schema.Text( 1735 title = _(u'Any other relevant information which would help ' 1736 'in determining the candidate\'s suitability?'), 1737 required = False, 1738 ) 1739 1740 objection = schema.Text( 1741 title = _(u'Have you any objection to the contents of this ' 1742 'evaluation being disclosed to any award-given body if ' 1743 'the need arises?'), 1744 required = False, 1745 ) 1746
Note: See TracChangeset for help on using the changeset viewer.