Changeset 13124 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 1 Jul 2015, 16:24:58 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r13076 r13124 323 323 """ Define what happens after school fee payment 324 324 depending on the student's senate verdict. 325 326 325 In the base configuration current level is always increased 327 326 by 100 no matter which verdict has been assigned. … … 334 333 """ Define what happens after school fee payment 335 334 depending on the student's senate verdict. 336 337 This method folllows the same algorithm as getReturningData but 335 This method folllows the same algorithm as `getReturningData` but 338 336 it also sets the new values. 339 337 """ … … 376 374 def setPaymentDetails(self, category, student, 377 375 previous_session, previous_level): 378 """Create a payment ticket objectand set the payment data of a376 """Create a payment ticket and set the payment data of a 379 377 student for the payment category specified. 380 378 """ … … 491 489 def setBalanceDetails(self, category, student, 492 490 balance_session, balance_level, balance_amount): 493 """Create Payment object and set the payment data of a student for.494 491 """Create a balance payment ticket and set the payment data 492 as selected by the student. 495 493 """ 496 494 p_item = u'Balance' … … 519 517 def increaseMatricInteger(self, student): 520 518 """Increase counter for matric numbers. 521 522 519 This counter can be a centrally stored attribute or an attribute of 523 520 faculties, departments or certificates. In the base package the counter 524 is as an attribute of the site configuration object.521 is as an attribute of the site configuration container. 525 522 """ 526 523 grok.getSite()['configuration'].next_matric_integer += 1 … … 530 527 """Fetch the matric number counter which fits the student and 531 528 construct the new matric number of the student. 532 533 529 In the base package the counter is returned which is as an attribute 534 of the site configuration object.530 of the site configuration container. 535 531 """ 536 532 next_integer = grok.getSite()['configuration'].next_matric_integer … … 540 536 541 537 def setMatricNumber(self, student): 542 """Set matriculation number of student. 543 544 If the student's matric number is unset a new matric number is 538 """Set matriculation number of student. If the student's matric number 539 is unset a new matric number is 545 540 constructed according to the matriculation number construction rules 546 defined in the constructMatricNumber method. The new matric number is541 defined in the `constructMatricNumber` method. The new matric number is 547 542 set, the students catalog updated. The corresponding matric number 548 543 counter is increased by one. … … 550 545 This method is tested but not used in the base package. It can 551 546 be used in custom packages by adding respective views 552 and by customizing increaseMatricInteger and constructMatricNumber547 and by customizing `increaseMatricInteger` and `constructMatricNumber` 553 548 according to the university's matriculation number construction rules. 554 549 … … 607 602 def selectBed(self, available_beds): 608 603 """Select a bed from a list of available beds. 609 610 604 In the base configuration we select the first bed found, 611 605 but can also randomize the selection if we like. … … 680 674 def getPDFCreator(self, context): 681 675 """Get a pdf creator suitable for `context`. 682 683 676 The default implementation always returns the default creator. 684 677 """ … … 800 793 omit_fields=(), 801 794 tableheader=None): 802 """Render pdf slips for transcript .795 """Render pdf slips for transcripts. 803 796 """ 804 797 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE … … 905 898 def maxCredits(self, studylevel): 906 899 """Return maximum credits. 907 908 In some universities maximum credits is not constant, it 909 depends on the student's study level. Set maxCredits None or 0 900 At some universities maximum credits is not constant, it 901 depends on the student's study level. Set `maxCredits` None or 0 910 902 in order to deactivate the limitation. 911 903 """ … … 921 913 def getBedCoordinates(self, bedticket): 922 914 """Return bed coordinates. 923 924 This method can be used to customize the display_coordinates 915 This method can be used to customize the `display_coordinates` 925 916 property method. 926 917 """ -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r13031 r13124 80 80 class KofaUtils(grok.GlobalUtility): 81 81 """A collection of parameters and methods subject to customization. 82 83 82 """ 84 83 grok.implements(IKofaUtils) … … 242 241 @property 243 242 def tzinfo(self): 243 """Time zone of the university. 244 """ 244 245 # For Nigeria: pytz.timezone('Africa/Lagos') 245 246 # For Germany: pytz.timezone('Europe/Berlin') … … 247 248 248 249 def fullname(self, firstname, lastname, middlename=None): 249 """ Full name constructor.250 """Construct fullname. 250 251 """ 251 252 # We do not necessarily have the middlename attribute … … 263 264 264 265 def sendCredentials(self, user, password=None, url_info=None, msg=None): 265 """Send credentials as email. 266 267 Input is the applicant for which credentials are sent and the 268 password. 269 270 Returns True or False to indicate successful operation. 266 """Send credentials as email. Input is the user for which credentials 267 are sent and the password. Method returns True or False to indicate 268 successful operation. 271 269 """ 272 270 subject = 'Your Kofa credentials' … … 308 306 309 307 def getPaymentItem(self, payment): 310 """Return payment item. 311 312 This method can be used to customize the display_item property method.308 """Return payment item. This method can be used to customize the 309 `display_item` property attribute, e.g. in order to hide bed coordinates 310 if maintenance fee is not paid. 313 311 """ 314 312 return payment.p_item … … 316 314 def expensive_actions_allowed(self, type=None, request=None): 317 315 """Tell, whether expensive actions are currently allowed. 318 319 316 Check system load/health (or other external circumstances) and 320 317 locally set values to see, whether expensive actions should be 321 318 allowed (`True`) or better avoided (`False`). 322 323 319 Use this to allow or forbid exports, report generations, or 324 320 similar actions.
Note: See TracChangeset for help on using the changeset viewer.