Ignore:
Timestamp:
22 Jan 2013, 08:55:00 (12 years ago)
Author:
Henrik Bettermann
Message:

Remove school fee installment payments and restricted course registration. Seems that all these customizations have been a waste of time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py

    r9537 r9905  
    3030from waeup.aaue.payments.interfaces import ICustomOnlinePayment
    3131from waeup.aaue.interfaces import MessageFactory as _
    32 
    33 class CourseSource(BasicContextualSourceFactory):
    34     """A course source delivers all courses inside the portal by looking
    35        up a catalog.
    36     """
    37     def getValues(self, context):
    38         catalog = getUtility(ICatalog, name='courses_catalog')
    39         courses = sorted(list(catalog.searchResults(
    40             code=(None, None))),key=lambda value: value.code)
    41         payments = context.student.getPaymentTuples()
    42         if (context.student.current_session, 'schoolfee_2', 'paid') in payments:
    43             pass
    44         else:
    45             courseslist = list(courses)
    46             for course in courseslist:
    47                 if course.semester == 2:
    48                     courses.remove(course)
    49         return courses
    50 
    51     def getToken(self, context, value):
    52         return value.code
    53 
    54     def getTitle(self, context, value):
    55         return "%s - %s (%d)" % (
    56             value.code, value.title[:64], value.semester)
    5732
    5833class ICustomStudentBase(INigeriaStudentBase):
     
    11994    """
    12095
    121 class ICustomCourseTicketAdd(IKofaObject):
    122     """An interface for adding course tickets.
    123 
    124     """
    125     course = schema.Choice(
    126         title = _(u'Course'),
    127         source = CourseSource(),
    128         readonly = False,
    129         )
    130 
    13196class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
    13297    """Representation of a student. Skip regular reg_number validation.
Note: See TracChangeset for help on using the changeset viewer.