Changeset 8865 for main/waeup.uniben/trunk
- Timestamp:
- 1 Jul 2012, 17:16:25 (12 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/payments/interfaces.py
r8821 r8865 18 18 from zope.interface import Attribute 19 19 from zope import schema 20 from waeup.kofa.payments.interfaces import IPayment20 from kofacustom.nigeria.payments.interfaces import INigeriaOnlinePayment 21 21 from waeup.uniben.interfaces import MessageFactory as _ 22 22 23 class ICustomOnlinePayment(I Payment):23 class ICustomOnlinePayment(INigeriaOnlinePayment): 24 24 """A payment via payment gateways. 25 25 26 26 """ 27 27 28 ac = schema.TextLine(29 title = _(u'Activation Code'),30 default = None,31 required = False,32 readonly = False,33 )34 35 r_amount_approved = schema.Float(36 title = _(u'Response Amount Approved'),37 default = 0.0,38 required = False,39 readonly = False,40 )41 42 r_code = schema.TextLine(43 title = _(u'Response Code'),44 default = None,45 required = False,46 readonly = False,47 )48 49 r_desc = schema.TextLine(50 title = _(u'Response Description'),51 default = None,52 required = False,53 readonly = False,54 )55 56 # Only defined in custom package57 58 r_pay_reference = schema.TextLine(59 title = _(u'Response Payment Reference'),60 default = None,61 required = False,62 readonly = False,63 )64 65 r_card_num = schema.TextLine(66 title = _(u'Response Card Number'),67 default = None,68 required = False,69 readonly = False,70 ) -
main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py
r8821 r8865 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 from zope import schema 19 from waeup.kofa.schema import TextLineChoice 20 from waeup.kofa.interfaces import SimpleKofaVocabulary, academic_sessions_vocab 21 from waeup.kofa.schema import FormattedDate 22 from waeup.kofa.schoolgrades import ResultEntryField 23 from waeup.kofa.students.vocabularies import nats_vocab 24 from waeup.kofa.students.interfaces import ( 25 IStudentBase, IUGStudentClearance, IPGStudentClearance, 26 IStudentPersonal, IStudentNavigation, IStudentStudyLevel, 27 IStudentStudyCourse, ICourseTicket 18 19 from kofacustom.nigeria.students.interfaces import ( 20 INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance, 21 INigeriaStudentPersonal, INigeriaStudentStudyLevel, 22 INigeriaStudentStudyCourse, INigeriaCourseTicket, 23 INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo, 24 INigeriaStudentOnlinePayment 28 25 ) 29 from waeup.kofa.students.vocabularies import (30 nats_vocab, contextual_reg_num_source)31 from kofacustom.nigeria.interfaces import (32 high_qual, high_grade, exam_types, LGASource)33 from waeup.uniben.interfaces import MessageFactory as _34 from waeup.uniben.payments.interfaces import ICustomOnlinePayment35 26 36 37 class ICustomStudentBase(IStudentBase): 27 class ICustomStudentBase(INigeriaStudentBase): 38 28 """Representation of student base data. 39 29 40 30 """ 41 31 42 reg_number = TextLineChoice( 43 title = _(u'Registration Number'), 44 required = False, 45 readonly = False, 46 source = contextual_reg_num_source, 47 ) 48 49 class ICustomStudentPersonal(IStudentPersonal): 32 class ICustomStudentPersonal(INigeriaStudentPersonal): 50 33 """Student personal data. 51 34 52 35 """ 53 36 54 marit_stat = schema.Choice( 55 title = u'Maritual Status', 56 default = 'unmarried', 57 required = False, 58 vocabulary = SimpleKofaVocabulary( 59 (_('Unmarried'), 'unmarried'), 60 (_('Married'), 'married'),) 61 ) 62 63 class ICustomUGStudentClearance(IUGStudentClearance): 37 class ICustomUGStudentClearance(INigeriaUGStudentClearance): 64 38 """Representation of ug student clearance data. 65 39 66 40 """ 67 date_of_birth = FormattedDate(68 title = _(u'Date of Birth'),69 required = False,70 show_year = True,71 )72 41 73 nationality = schema.Choice( 74 source = nats_vocab, 75 title = _(u'Nationality'), 76 required = False, 77 ) 78 79 lga = schema.Choice( 80 source = LGASource(), 81 title = _(u'State/LGA (Nigerians only)'), 82 required = False, 83 ) 84 85 def_adm = schema.Bool( 86 title = _(u'Deferent of Admission'), 87 required = False, 88 readonly = False, 89 ) 90 91 fst_sit_fname = schema.TextLine( 92 title = _(u'Full Name'), 93 required = False, 94 readonly = False, 95 ) 96 fst_sit_no = schema.TextLine( 97 title = _(u'Exam Number'), 98 required = False, 99 readonly = False, 100 ) 101 102 fst_sit_date = FormattedDate( 103 title = _(u'Exam Date'), 104 required = False, 105 readonly = False, 106 show_year = True, 107 ) 108 109 fst_sit_type = schema.Choice( 110 title = _(u'Exam Type'), 111 required = False, 112 readonly = False, 113 vocabulary = exam_types, 114 ) 115 116 fst_sit_results = schema.List( 117 title = _(u'Exam Results'), 118 value_type = ResultEntryField(), 119 required = False, 120 readonly = False, 121 default = [], 122 ) 123 124 scd_sit_fname = schema.TextLine( 125 title = _(u'Full Name'), 126 required = False, 127 readonly = False, 128 ) 129 scd_sit_no = schema.TextLine( 130 title = _(u'Exam Number'), 131 required = False, 132 readonly = False, 133 ) 134 135 scd_sit_date = FormattedDate( 136 title = _(u'Exam Date'), 137 required = False, 138 readonly = False, 139 show_year = True, 140 ) 141 142 scd_sit_type = schema.Choice( 143 title = _(u'Exam Type'), 144 required = False, 145 readonly = False, 146 vocabulary = exam_types, 147 ) 148 149 scd_sit_results = schema.List( 150 title = _(u'Exam Results'), 151 value_type = ResultEntryField(), 152 required = False, 153 readonly = False, 154 default = [], 155 ) 156 157 alr_fname = schema.TextLine( 158 title = _(u'Full Name'), 159 required = False, 160 readonly = False, 161 ) 162 alr_no = schema.TextLine( 163 title = _(u'Exam Number'), 164 required = False, 165 readonly = False, 166 ) 167 168 alr_date = FormattedDate( 169 title = _(u'Exam Date'), 170 required = False, 171 readonly = False, 172 show_year = True, 173 ) 174 175 alr_results = schema.List( 176 title = _(u'Exam Results'), 177 value_type = ResultEntryField(), 178 required = False, 179 readonly = False, 180 default = [], 181 ) 182 183 hq_type = schema.Choice( 184 title = _(u'Qualification Obtained'), 185 required = False, 186 readonly = False, 187 vocabulary = high_qual, 188 ) 189 190 hq_matric_no = schema.TextLine( 191 title = _(u'Former Matric Number'), 192 required = False, 193 readonly = False, 194 ) 195 196 hq_degree = schema.Choice( 197 title = _(u'Class of Degree'), 198 required = False, 199 readonly = False, 200 vocabulary = high_grade, 201 ) 202 203 hq_school = schema.TextLine( 204 title = _(u'Institution Attended'), 205 required = False, 206 readonly = False, 207 ) 208 209 hq_session = schema.TextLine( 210 title = _(u'Years Attended'), 211 required = False, 212 readonly = False, 213 ) 214 215 hq_disc = schema.TextLine( 216 title = _(u'Discipline'), 217 required = False, 218 readonly = False, 219 ) 220 221 222 class ICustomPGStudentClearance(ICustomUGStudentClearance): 42 class ICustomPGStudentClearance(INigeriaPGStudentClearance): 223 43 """Representation of pg student clearance data. 224 44 225 45 """ 226 227 hq2_type = schema.Choice(228 title = _(u'Qualification Obtained'),229 required = False,230 readonly = False,231 vocabulary = high_qual,232 )233 234 hq2_matric_no = schema.TextLine(235 title = _(u'Former Matric Number'),236 required = False,237 readonly = False,238 )239 240 hq2_degree = schema.Choice(241 title = _(u'Class of Degree'),242 required = False,243 readonly = False,244 vocabulary = high_grade,245 )246 247 hq2_school = schema.TextLine(248 title = _(u'Institution Attended'),249 required = False,250 readonly = False,251 )252 253 hq2_session = schema.TextLine(254 title = _(u'Years Attended'),255 required = False,256 readonly = False,257 )258 259 hq2_disc = schema.TextLine(260 title = _(u'Discipline'),261 required = False,262 readonly = False,263 )264 265 nysc_year = schema.Int(266 title = _(u'Nysc Year'),267 required = False,268 readonly = False,269 )270 271 nysc_lga = schema.Choice(272 source = LGASource(),273 title = _(u'Nysc Location'),274 required = False,275 )276 277 employer = schema.TextLine(278 title = _(u'Employer'),279 required = False,280 readonly = False,281 )282 283 emp_position = schema.TextLine(284 title = _(u'Employer Position'),285 required = False,286 readonly = False,287 )288 289 emp_start = FormattedDate(290 title = _(u'Start Date'),291 required = False,292 readonly = False,293 show_year = True,294 )295 296 emp_end = FormattedDate(297 title = _(u'End Date'),298 required = False,299 readonly = False,300 show_year = True,301 )302 303 emp_reason = schema.TextLine(304 title = _(u'Reason for Leaving'),305 required = False,306 readonly = False,307 )308 309 employer2 = schema.TextLine(310 title = _(u'2nd Employer'),311 required = False,312 readonly = False,313 )314 315 emp2_position = schema.TextLine(316 title = _(u'2nd Employer Position'),317 required = False,318 readonly = False,319 )320 321 emp2_start = FormattedDate(322 title = _(u'Start Date'),323 required = False,324 readonly = False,325 show_year = True,326 )327 emp2_end = FormattedDate(328 title = _(u'End Date'),329 required = False,330 readonly = False,331 show_year = True,332 )333 334 emp2_reason = schema.TextLine(335 title = _(u'Reason for Leaving'),336 required = False,337 readonly = False,338 )339 340 former_matric = schema.TextLine(341 title = _(u'If yes, matric number'),342 required = False,343 readonly = False,344 )345 46 346 47 … … 351 52 """ 352 53 353 class ICustomStudentStudyCourse(I StudentStudyCourse):54 class ICustomStudentStudyCourse(INigeriaStudentStudyCourse): 354 55 """A container for student study levels. 355 56 356 57 """ 357 58 358 class ICustomStudentStudyLevel(I StudentStudyLevel):59 class ICustomStudentStudyLevel(INigeriaStudentStudyLevel): 359 60 """A container for course tickets. 360 61 361 62 """ 362 63 363 class ICustomStudentOnlinePayment(I CustomOnlinePayment):64 class ICustomStudentOnlinePayment(INigeriaStudentOnlinePayment): 364 65 """A student payment via payment gateways. 365 66 366 This Interface does not inherit from IStudentOnlinePayment.367 Thus all fields from IStudentOnlinePayment have to be repeated here.368 67 """ 369 68 370 p_level = schema.Int( 371 title = _(u'Payment Level'), 372 required = False, 373 readonly = True, 374 ) 375 376 ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[ 377 'p_session'].order 378 379 class ICustomCourseTicket(ICourseTicket): 69 class ICustomCourseTicket(INigeriaCourseTicket): 380 70 """A course ticket. 381 71 382 72 """ 383 73 384 class ICustomStudentUpdateByRegNo(I CustomStudent):74 class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo): 385 75 """Representation of a student. Skip regular reg_number validation. 386 76 387 77 """ 388 reg_number = schema.TextLine(389 title = _(u'Registration Number'),390 required = False,391 )392 78 393 class ICustomStudentUpdateByMatricNo(I CustomStudent):79 class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo): 394 80 """Representation of a student. Skip regular matric_number validation. 395 81 396 82 """ 397 matric_number = schema.TextLine(398 title = _(u'Matriculation Number'),399 required = False,400 ) -
main/waeup.uniben/trunk/src/waeup/uniben/students/student.py
r8204 r8865 23 23 from waeup.kofa.utils.helpers import attrs_to_fields 24 24 from waeup.kofa.students.student import Student, StudentFactory 25 from waeup.uniben.students.interfaces import ICustomStudent, IStudentNavigation 25 from waeup.kofa.students.interfaces import IStudentNavigation 26 from waeup.uniben.students.interfaces import ICustomStudent 26 27 27 28 -
main/waeup.uniben/trunk/src/waeup/uniben/students/studycourse.py
r8741 r8865 25 25 StudentStudyCourse, StudentStudyCourseFactory) 26 26 from waeup.kofa.utils.helpers import attrs_to_fields 27 from waeup.kofa.students.interfaces import IStudentNavigation 27 28 from waeup.kofa.students.workflow import CLEARED, RETURNING, PAID 28 from waeup.uniben.students.interfaces import ( 29 ICustomStudentStudyCourse, IStudentNavigation) 29 from waeup.uniben.students.interfaces import ICustomStudentStudyCourse 30 30 31 31 class CustomStudentStudyCourse(StudentStudyCourse): -
main/waeup.uniben/trunk/src/waeup/uniben/students/studylevel.py
r8326 r8865 27 27 StudentStudyLevel, CourseTicket, 28 28 CourseTicketFactory, StudentStudyLevelFactory) 29 from waeup.kofa.students.interfaces import IStudentNavigation 29 30 from waeup.uniben.students.interfaces import ( 30 ICustomStudentStudyLevel, I StudentNavigation, ICustomCourseTicket)31 ICustomStudentStudyLevel, ICustomCourseTicket) 31 32 32 33
Note: See TracChangeset for help on using the changeset viewer.