[7191] | 1 | ## $Id: interfaces.py 8160 2012-04-15 06:40:01Z henrik $ |
---|
[6621] | 2 | ## |
---|
[7191] | 3 | ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
[6996] | 18 | from datetime import datetime |
---|
[7620] | 19 | from zope.component import getUtility |
---|
[7256] | 20 | from zope.interface import Attribute, Interface |
---|
[6621] | 21 | from zope import schema |
---|
[7620] | 22 | from zc.sourcefactory.contextual import BasicContextualSourceFactory |
---|
[7811] | 23 | from waeup.kofa.interfaces import ( |
---|
[7819] | 24 | IKofaObject, academic_sessions_vocab, validate_email, IKofaUtils) |
---|
[7811] | 25 | from waeup.kofa.interfaces import MessageFactory as _ |
---|
[8160] | 26 | from waeup.kofa.schema import TextLineChoice, FormattedDate, FormattedDatetime |
---|
[7811] | 27 | from waeup.kofa.students.vocabularies import ( |
---|
[7915] | 28 | StudyLevelSource, contextual_reg_num_source, contextual_mat_num_source, |
---|
| 29 | GenderSource, nats_vocab, |
---|
| 30 | ) |
---|
[8160] | 31 | from waeup.kofa.payments.interfaces import ( |
---|
| 32 | IPaymentsContainer, IOnlinePayment, IOnlinePaymentImportExport) |
---|
[7915] | 33 | from waeup.kofa.university.vocabularies import ( |
---|
| 34 | CourseSource, StudyModeSource, CertificateSource) |
---|
[6621] | 35 | |
---|
[7620] | 36 | # VerdictSource can't be placed into the vocabularies module because it |
---|
| 37 | # requires importing IStudentsUtils which then leads to circular imports. |
---|
| 38 | class VerdictSource(BasicContextualSourceFactory): |
---|
| 39 | """A verdicts source delivers all verdicts provided |
---|
| 40 | in the portal. |
---|
| 41 | """ |
---|
| 42 | def getValues(self, context): |
---|
[7841] | 43 | verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT |
---|
[7688] | 44 | return verdicts_dict.keys() |
---|
[7620] | 45 | |
---|
| 46 | def getToken(self, context, value): |
---|
| 47 | return value |
---|
| 48 | |
---|
| 49 | def getTitle(self, context, value): |
---|
[7841] | 50 | verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT |
---|
[7688] | 51 | return verdicts_dict[value] |
---|
[7620] | 52 | |
---|
[7681] | 53 | |
---|
[7150] | 54 | class IStudentsUtils(Interface): |
---|
| 55 | """A collection of methods which are subject to customization. |
---|
| 56 | |
---|
| 57 | """ |
---|
[7841] | 58 | def setReturningData(student): |
---|
| 59 | """ This method defines what happens after school fee payment |
---|
| 60 | depending on the student's senate verdict. |
---|
| 61 | |
---|
| 62 | In the base configuration current level is always increased |
---|
| 63 | by 100 no matter which verdict has been assigned. |
---|
| 64 | """ |
---|
| 65 | |
---|
[7186] | 66 | def getPaymentDetails(category, student): |
---|
[7150] | 67 | """Get the payment dates of a student for the payment category |
---|
| 68 | specified. |
---|
| 69 | |
---|
| 70 | """ |
---|
| 71 | |
---|
[7186] | 72 | def getAccommodation_details(student): |
---|
[7150] | 73 | """Determine the accommodation dates of a student. |
---|
| 74 | |
---|
| 75 | """ |
---|
| 76 | |
---|
[7186] | 77 | def selectBed(available_beds): |
---|
[7150] | 78 | """Select a bed from a list of available beds. |
---|
| 79 | |
---|
| 80 | In the standard configuration we select the first bed found, |
---|
| 81 | but can also randomize the selection if we like. |
---|
| 82 | """ |
---|
| 83 | |
---|
[7186] | 84 | def renderPDF(view, subject='', filename='slip.pdf',): |
---|
[7150] | 85 | """Render pdf slips for various pages. |
---|
| 86 | |
---|
| 87 | """ |
---|
| 88 | |
---|
[7819] | 89 | class IStudentsContainer(IKofaObject): |
---|
[7096] | 90 | """A students container contains university students. |
---|
[6692] | 91 | |
---|
| 92 | """ |
---|
| 93 | def addStudent(student): |
---|
| 94 | """Add an IStudent object and subcontainers. |
---|
| 95 | |
---|
| 96 | """ |
---|
| 97 | |
---|
| 98 | def archive(id=None): |
---|
| 99 | """Create on-dist archive of students. |
---|
| 100 | |
---|
| 101 | If id is `None`, all students are archived. |
---|
| 102 | |
---|
| 103 | If id contains a single id string, only the respective |
---|
| 104 | students are archived. |
---|
| 105 | |
---|
| 106 | If id contains a list of id strings all of the respective |
---|
| 107 | students types are saved to disk. |
---|
| 108 | """ |
---|
| 109 | |
---|
| 110 | def clear(id=None, archive=True): |
---|
| 111 | """Remove students of type given by 'id'. |
---|
| 112 | |
---|
| 113 | Optionally archive the students. |
---|
| 114 | |
---|
| 115 | If id is `None`, all students are archived. |
---|
| 116 | |
---|
| 117 | If id contains a single id string, only the respective |
---|
| 118 | students are archived. |
---|
| 119 | |
---|
| 120 | If id contains a list of id strings all of the respective |
---|
| 121 | student types are saved to disk. |
---|
| 122 | |
---|
| 123 | If `archive` is ``False`` none of the archive-handling is done |
---|
| 124 | and respective students are simply removed from the |
---|
| 125 | database. |
---|
| 126 | """ |
---|
| 127 | |
---|
[7819] | 128 | class IStudentNavigation(IKofaObject): |
---|
[6642] | 129 | """Interface needed for student navigation. |
---|
[7150] | 130 | |
---|
[6642] | 131 | """ |
---|
| 132 | def getStudent(): |
---|
| 133 | """Return student object. |
---|
[7150] | 134 | |
---|
[6642] | 135 | """ |
---|
| 136 | |
---|
[7819] | 137 | class IStudentBase(IKofaObject): |
---|
[6631] | 138 | """Representation of student base data. |
---|
[7150] | 139 | |
---|
[6621] | 140 | """ |
---|
[7062] | 141 | history = Attribute('Object history, a list of messages') |
---|
[6637] | 142 | state = Attribute('Returns the registration state of a student') |
---|
[6699] | 143 | password = Attribute('Encrypted password of a student') |
---|
[7203] | 144 | certcode = Attribute('The certificate code of any chosen study course') |
---|
| 145 | depcode = Attribute('The department code of any chosen study course') |
---|
| 146 | faccode = Attribute('The faculty code of any chosen study course') |
---|
[7062] | 147 | current_session = Attribute('The current session of the student') |
---|
[7641] | 148 | current_mode = Attribute('The current mode of the student') |
---|
[7364] | 149 | fullname = Attribute('All name parts separated by hyphens') |
---|
| 150 | display_fullname = Attribute('The fullname of an applicant') |
---|
[6637] | 151 | |
---|
| 152 | def loggerInfo(ob_class, comment): |
---|
[7150] | 153 | """Adds an INFO message to the log file. |
---|
| 154 | |
---|
[6637] | 155 | """ |
---|
| 156 | |
---|
[6665] | 157 | student_id = schema.TextLine( |
---|
[7723] | 158 | title = _(u'Student Id'), |
---|
[6849] | 159 | required = False, |
---|
[6665] | 160 | ) |
---|
| 161 | |
---|
[7357] | 162 | firstname = schema.TextLine( |
---|
[7723] | 163 | title = _(u'First Name'), |
---|
[6621] | 164 | required = True, |
---|
| 165 | ) |
---|
| 166 | |
---|
[7357] | 167 | middlename = schema.TextLine( |
---|
[7723] | 168 | title = _(u'Middle Name'), |
---|
[7357] | 169 | required = False, |
---|
| 170 | ) |
---|
| 171 | |
---|
| 172 | lastname = schema.TextLine( |
---|
[7723] | 173 | title = _(u'Last Name (Surname)'), |
---|
[7357] | 174 | required = True, |
---|
| 175 | ) |
---|
| 176 | |
---|
[6996] | 177 | sex = schema.Choice( |
---|
[7723] | 178 | title = _(u'Sex'), |
---|
[6996] | 179 | source = GenderSource(), |
---|
| 180 | required = True, |
---|
| 181 | ) |
---|
| 182 | |
---|
[6788] | 183 | reg_number = TextLineChoice( |
---|
[7723] | 184 | title = _(u'Registration Number'), |
---|
[6696] | 185 | required = True, |
---|
| 186 | readonly = False, |
---|
[6788] | 187 | source = contextual_reg_num_source, |
---|
[6696] | 188 | ) |
---|
| 189 | |
---|
[6788] | 190 | matric_number = TextLineChoice( |
---|
[7723] | 191 | title = _(u'Matriculation Number'), |
---|
[6750] | 192 | required = False, |
---|
| 193 | readonly = False, |
---|
[6788] | 194 | source = contextual_mat_num_source, |
---|
[6750] | 195 | ) |
---|
| 196 | |
---|
[6769] | 197 | adm_code = schema.TextLine( |
---|
[7723] | 198 | title = _(u'PWD Activation Code'), |
---|
[6769] | 199 | required = False, |
---|
| 200 | readonly = True, |
---|
| 201 | ) |
---|
| 202 | |
---|
[7133] | 203 | email = schema.ASCIILine( |
---|
[7723] | 204 | title = _(u'Email'), |
---|
[7133] | 205 | required = False, |
---|
| 206 | constraint=validate_email, |
---|
| 207 | ) |
---|
[7325] | 208 | phone = schema.TextLine( |
---|
[7723] | 209 | title = _(u'Phone'), |
---|
[7331] | 210 | description = u'', |
---|
[7133] | 211 | required = False, |
---|
| 212 | ) |
---|
| 213 | |
---|
[7993] | 214 | class IUGStudentClearance(IKofaObject): |
---|
| 215 | """Representation of undergraduate student clearance data. |
---|
[7150] | 216 | |
---|
[6631] | 217 | """ |
---|
[8160] | 218 | date_of_birth = FormattedDate( |
---|
[7723] | 219 | title = _(u'Date of Birth'), |
---|
[6631] | 220 | required = True, |
---|
[8160] | 221 | show_year = True, |
---|
[6631] | 222 | ) |
---|
| 223 | |
---|
[6695] | 224 | clearance_locked = schema.Bool( |
---|
[7723] | 225 | title = _(u'Clearance form locked'), |
---|
[6695] | 226 | default = False, |
---|
| 227 | ) |
---|
| 228 | |
---|
[6769] | 229 | clr_code = schema.TextLine( |
---|
[7723] | 230 | title = _(u'CLR Activation Code'), |
---|
[6769] | 231 | required = False, |
---|
| 232 | readonly = True, |
---|
| 233 | ) |
---|
| 234 | |
---|
[7523] | 235 | nationality = schema.Choice( |
---|
[8069] | 236 | vocabulary = nats_vocab, |
---|
[7723] | 237 | title = _(u'Nationality'), |
---|
[7983] | 238 | required = False, |
---|
[7523] | 239 | ) |
---|
| 240 | |
---|
[7993] | 241 | class IPGStudentClearance(IUGStudentClearance): |
---|
| 242 | """Representation of postgraduate student clearance data. |
---|
| 243 | |
---|
| 244 | """ |
---|
| 245 | employer = schema.TextLine( |
---|
| 246 | title = _(u'Employer'), |
---|
| 247 | required = False, |
---|
| 248 | readonly = False, |
---|
| 249 | ) |
---|
| 250 | |
---|
[7819] | 251 | class IStudentPersonal(IKofaObject): |
---|
[6631] | 252 | """Representation of student personal data. |
---|
[7150] | 253 | |
---|
[6631] | 254 | """ |
---|
[6651] | 255 | perm_address = schema.Text( |
---|
[7723] | 256 | title = _(u'Permanent Address'), |
---|
[6631] | 257 | required = False, |
---|
| 258 | ) |
---|
| 259 | |
---|
[8008] | 260 | class IStudent(IStudentBase,IUGStudentClearance,IPGStudentClearance, |
---|
| 261 | IStudentPersonal): |
---|
[6631] | 262 | """Representation of a student. |
---|
[7150] | 263 | |
---|
[6631] | 264 | """ |
---|
| 265 | |
---|
[6849] | 266 | class IStudentUpdateByRegNo(IStudent): |
---|
| 267 | """Representation of a student. Skip regular reg_number validation. |
---|
[7150] | 268 | |
---|
[6849] | 269 | """ |
---|
| 270 | reg_number = schema.TextLine( |
---|
[7723] | 271 | title = _(u'Registration Number'), |
---|
[6849] | 272 | required = False, |
---|
| 273 | ) |
---|
| 274 | |
---|
| 275 | class IStudentUpdateByMatricNo(IStudent): |
---|
| 276 | """Representation of a student. Skip regular matric_number validation. |
---|
[7150] | 277 | |
---|
[6849] | 278 | """ |
---|
| 279 | matric_number = schema.TextLine( |
---|
[7723] | 280 | title = _(u'Matriculation Number'), |
---|
[6849] | 281 | required = False, |
---|
| 282 | ) |
---|
| 283 | |
---|
[7819] | 284 | class IStudentStudyCourse(IKofaObject): |
---|
[6633] | 285 | """A container for student study levels. |
---|
| 286 | |
---|
| 287 | """ |
---|
[6648] | 288 | certificate = schema.Choice( |
---|
[7723] | 289 | title = _(u'Certificate'), |
---|
[6648] | 290 | source = CertificateSource(), |
---|
[7209] | 291 | required = False, |
---|
[6633] | 292 | ) |
---|
[6635] | 293 | |
---|
[6996] | 294 | entry_mode = schema.Choice( |
---|
[7723] | 295 | title = _(u'Entry Mode'), |
---|
[7681] | 296 | source = StudyModeSource(), |
---|
[6996] | 297 | required = True, |
---|
| 298 | readonly = False, |
---|
| 299 | ) |
---|
| 300 | |
---|
| 301 | entry_session = schema.Choice( |
---|
[7723] | 302 | title = _(u'Entry Session'), |
---|
[6996] | 303 | source = academic_sessions_vocab, |
---|
[7425] | 304 | #default = datetime.now().year, |
---|
[6996] | 305 | required = True, |
---|
| 306 | readonly = False, |
---|
| 307 | ) |
---|
| 308 | |
---|
[6724] | 309 | current_session = schema.Choice( |
---|
[7723] | 310 | title = _(u'Current Session'), |
---|
[6744] | 311 | source = academic_sessions_vocab, |
---|
[6724] | 312 | required = True, |
---|
[6996] | 313 | readonly = False, |
---|
[6724] | 314 | ) |
---|
| 315 | |
---|
| 316 | current_level = schema.Choice( |
---|
[7723] | 317 | title = _(u'Current Level'), |
---|
[6725] | 318 | source = StudyLevelSource(), |
---|
| 319 | required = False, |
---|
[6996] | 320 | readonly = False, |
---|
[6724] | 321 | ) |
---|
| 322 | |
---|
| 323 | current_verdict = schema.Choice( |
---|
[7723] | 324 | title = _(u'Current Verdict'), |
---|
[7619] | 325 | source = VerdictSource(), |
---|
[6804] | 326 | default = '0', |
---|
[6725] | 327 | required = False, |
---|
[6724] | 328 | ) |
---|
| 329 | |
---|
| 330 | previous_verdict = schema.Choice( |
---|
[7723] | 331 | title = _(u'Previous Verdict'), |
---|
[7619] | 332 | source = VerdictSource(), |
---|
[6805] | 333 | default = '0', |
---|
[6725] | 334 | required = False, |
---|
[6724] | 335 | ) |
---|
| 336 | |
---|
[7951] | 337 | class IStudentVerdictUpdate(IKofaObject): |
---|
| 338 | """A interface for verdict imports. |
---|
| 339 | |
---|
| 340 | """ |
---|
| 341 | |
---|
| 342 | current_verdict = schema.Choice( |
---|
| 343 | title = _(u'Current Verdict'), |
---|
| 344 | source = VerdictSource(), |
---|
| 345 | required = True, |
---|
| 346 | ) |
---|
| 347 | |
---|
| 348 | current_session = schema.Choice( |
---|
| 349 | title = _(u'Current Session'), |
---|
| 350 | source = academic_sessions_vocab, |
---|
| 351 | required = True, |
---|
| 352 | ) |
---|
| 353 | |
---|
| 354 | current_level = schema.Choice( |
---|
| 355 | title = _(u'Current Level'), |
---|
| 356 | source = StudyLevelSource(), |
---|
| 357 | required = True, |
---|
| 358 | ) |
---|
| 359 | |
---|
[7819] | 360 | class IStudentStudyLevel(IKofaObject): |
---|
[6774] | 361 | """A container for course tickets. |
---|
| 362 | |
---|
| 363 | """ |
---|
| 364 | level = Attribute('The level code') |
---|
[6793] | 365 | validation_date = Attribute('The date of validation') |
---|
| 366 | validated_by = Attribute('User Id of course adviser') |
---|
[6774] | 367 | |
---|
[6793] | 368 | level_session = schema.Choice( |
---|
[7723] | 369 | title = _(u'Session'), |
---|
[6793] | 370 | source = academic_sessions_vocab, |
---|
| 371 | required = True, |
---|
| 372 | ) |
---|
[6781] | 373 | |
---|
[6793] | 374 | level_verdict = schema.Choice( |
---|
[7723] | 375 | title = _(u'Verdict'), |
---|
[7619] | 376 | source = VerdictSource(), |
---|
[6805] | 377 | default = '0', |
---|
[6793] | 378 | required = False, |
---|
| 379 | ) |
---|
| 380 | |
---|
[7819] | 381 | class ICourseTicket(IKofaObject): |
---|
[6781] | 382 | """A course ticket. |
---|
| 383 | |
---|
| 384 | """ |
---|
[6783] | 385 | code = Attribute('code of the original course') |
---|
| 386 | title = Attribute('title of the original course') |
---|
| 387 | credits = Attribute('credits of the original course') |
---|
| 388 | passmark = Attribute('passmark of the original course') |
---|
| 389 | semester = Attribute('semester of the original course') |
---|
[7304] | 390 | fcode = Attribute('faculty code of the original course') |
---|
| 391 | dcode = Attribute('department code of the original course') |
---|
[6781] | 392 | |
---|
[7665] | 393 | mandatory = schema.Bool( |
---|
[7723] | 394 | title = _(u'Mandatory'), |
---|
[6795] | 395 | default = False, |
---|
| 396 | required = False, |
---|
| 397 | readonly = False, |
---|
| 398 | ) |
---|
| 399 | |
---|
[6781] | 400 | score = schema.Int( |
---|
[7723] | 401 | title = _(u'Score'), |
---|
[6781] | 402 | default = 0, |
---|
| 403 | required = False, |
---|
| 404 | readonly = False, |
---|
| 405 | ) |
---|
| 406 | |
---|
[6806] | 407 | automatic = schema.Bool( |
---|
[7723] | 408 | title = _(u'Automatical Creation'), |
---|
[6806] | 409 | default = False, |
---|
| 410 | required = False, |
---|
| 411 | readonly = True, |
---|
| 412 | ) |
---|
| 413 | |
---|
[7661] | 414 | carry_over = schema.Bool( |
---|
[7723] | 415 | title = _(u'Carry-over Course'), |
---|
[7661] | 416 | default = False, |
---|
| 417 | required = False, |
---|
| 418 | readonly = False, |
---|
| 419 | ) |
---|
| 420 | |
---|
[7633] | 421 | def getLevel(): |
---|
| 422 | """Returns the id of the level the ticket has been added to. |
---|
| 423 | """ |
---|
| 424 | |
---|
| 425 | def getLevelSession(): |
---|
| 426 | """Returns the session of the level the ticket has been added to. |
---|
| 427 | """ |
---|
| 428 | |
---|
[6795] | 429 | class ICourseTicketAdd(ICourseTicket): |
---|
[7150] | 430 | """An interface for adding course tickets. |
---|
[6795] | 431 | |
---|
| 432 | """ |
---|
| 433 | course = schema.Choice( |
---|
[7723] | 434 | title = _(u'Course'), |
---|
[6795] | 435 | source = CourseSource(), |
---|
| 436 | readonly = False, |
---|
| 437 | ) |
---|
| 438 | |
---|
[7819] | 439 | class IStudentAccommodation(IKofaObject): |
---|
[6635] | 440 | """A container for student accommodation objects. |
---|
| 441 | |
---|
| 442 | """ |
---|
| 443 | |
---|
[7819] | 444 | class IBedTicket(IKofaObject): |
---|
[6989] | 445 | """A ticket for accommodation booking. |
---|
| 446 | |
---|
| 447 | """ |
---|
[6996] | 448 | bed = Attribute('The bed object.') |
---|
| 449 | |
---|
| 450 | bed_coordinates = schema.TextLine( |
---|
[7723] | 451 | title = _(u'Bed Coordinates'), |
---|
[6992] | 452 | required = False, |
---|
[7014] | 453 | readonly = False, |
---|
[6992] | 454 | ) |
---|
| 455 | |
---|
[6996] | 456 | bed_type = schema.TextLine( |
---|
[7723] | 457 | title = _(u'Bed Type'), |
---|
[6996] | 458 | required = False, |
---|
[7014] | 459 | readonly = False, |
---|
[6996] | 460 | ) |
---|
| 461 | |
---|
[6992] | 462 | booking_session = schema.Choice( |
---|
[7723] | 463 | title = _(u'Session'), |
---|
[6992] | 464 | source = academic_sessions_vocab, |
---|
| 465 | required = True, |
---|
[7014] | 466 | readonly = True, |
---|
[6992] | 467 | ) |
---|
| 468 | |
---|
[8160] | 469 | booking_date = FormattedDatetime( |
---|
[7723] | 470 | title = _(u'Booking Date'), |
---|
[6992] | 471 | required = False, |
---|
[7014] | 472 | readonly = True, |
---|
[6992] | 473 | ) |
---|
| 474 | |
---|
| 475 | booking_code = schema.TextLine( |
---|
[7723] | 476 | title = _(u'Booking Activation Code'), |
---|
[6992] | 477 | required = False, |
---|
[7014] | 478 | readonly = True, |
---|
[6992] | 479 | ) |
---|
| 480 | |
---|
[6994] | 481 | def getSessionString(): |
---|
[7633] | 482 | """Returns the title of academic_sessions_vocab term. |
---|
[7150] | 483 | |
---|
[6994] | 484 | """ |
---|
[6992] | 485 | |
---|
[6860] | 486 | class IStudentPaymentsContainer(IPaymentsContainer): |
---|
[6635] | 487 | """A container for student payment objects. |
---|
| 488 | |
---|
| 489 | """ |
---|
| 490 | |
---|
[6877] | 491 | class IStudentOnlinePayment(IOnlinePayment): |
---|
| 492 | """A student payment via payment gateways. |
---|
| 493 | |
---|
| 494 | """ |
---|
| 495 | p_session = schema.Choice( |
---|
[7723] | 496 | title = _(u'Payment Session'), |
---|
[6877] | 497 | source = academic_sessions_vocab, |
---|
| 498 | required = False, |
---|
| 499 | ) |
---|
| 500 | |
---|
| 501 | IStudentOnlinePayment['p_session'].order = IStudentOnlinePayment[ |
---|
| 502 | 'p_item'].order |
---|
| 503 | |
---|
[8160] | 504 | |
---|
| 505 | class IStudentOnlinePaymentImportExport(IOnlinePaymentImportExport): |
---|
| 506 | """A student payment for import and export. |
---|
| 507 | |
---|
| 508 | """ |
---|
| 509 | p_session = schema.Choice( |
---|
| 510 | title = _(u'Payment Session'), |
---|
| 511 | source = academic_sessions_vocab, |
---|
| 512 | required = False, |
---|
| 513 | ) |
---|
| 514 | |
---|
[7819] | 515 | class IStudentChangePassword(IKofaObject): |
---|
[7369] | 516 | """Interface needed for change pasword page. |
---|
| 517 | |
---|
| 518 | """ |
---|
| 519 | reg_number = schema.TextLine( |
---|
[7723] | 520 | title = _(u'Registration Number'), |
---|
[7369] | 521 | required = True, |
---|
| 522 | readonly = False, |
---|
| 523 | ) |
---|
| 524 | |
---|
| 525 | email = schema.ASCIILine( |
---|
[7723] | 526 | title = _(u'Email Address'), |
---|
[7369] | 527 | required = True, |
---|
| 528 | constraint=validate_email, |
---|
| 529 | ) |
---|