Ignore:
Timestamp:
17 Sep 2011, 16:12:37 (13 years ago)
Author:
Henrik Bettermann
Message:

Copy all data from the course and its course referrer into course tickets.

A course ticket contains a copy of the original course and
course referrer data. If the courses and/or their referrers are removed, the
corresponding tickets remain unchanged. So we do not need any event
triggered actions on course ticket.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r6782 r6783  
    560560    grok.require('waeup.viewStudent')
    561561    form_fields = grok.AutoFields(IStudentStudyLevel)
    562     #grok.template('studylevelpage')
     562    grok.template('studylevelpage')
    563563    title = 'Study Level'
    564564    pnav = 4
  • main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py

    r6781 r6783  
    213213
    214214    """
    215     code = Attribute('Course code')
    216     title = Attribute('Course title')
    217     course_level = Attribute('level of the original course referrer')
     215    code = Attribute('code of the original course')
     216    title = Attribute('title of the original course')
     217    credits = Attribute('credits of the original course')
     218    passmark = Attribute('passmark of the original course')
     219    semester = Attribute('semester of the original course')
     220    faculty = Attribute('faculty of the original course')
     221    department = Attribute('department of the original course')
    218222    core_or_elective = Attribute('core_or_elective of the original course referrer')
    219 
    220     credits = schema.Int(
    221         title = u'Credits',
    222         default = 0,
    223         required = False,
    224         readonly = False,
    225         )
     223    level = Attribute('level of the original course referrer')
    226224
    227225    score = schema.Int(
  • main/waeup.sirp/trunk/src/waeup/sirp/students/studycourse.py

    r6782 r6783  
    5252                val.getCourseCode(),
    5353                val.course.title,
     54                val.course.credits,
     55                val.course.passmark,
     56                val.course.semester,
     57                val.course.__parent__.__parent__.__parent__.title,
     58                val.course.__parent__.__parent__.title,
    5459                val.level,
    5560                val.core_or_elective)
  • main/waeup.sirp/trunk/src/waeup/sirp/students/studylevel.py

    r6782 r6783  
    6060    student to attend the course. Lecturers will enter scores and more at
    6161    the end of the term.
     62
     63    A course ticket contains a copy of the original course and
     64    course referrer data. If the courses and/or their referrers are removed, the
     65    corresponding tickets remain unchanged. So we do not need any event
     66    triggered actions on course tickets.
    6267    """
    6368    grok.implements(ICourseTicket, IStudentNavigation)
    6469    grok.provides(ICourseTicket)
    6570
    66     def __init__(self, code, title, course_level, core_or_elective):
     71    def __init__(self, code, title, credits,
     72        passmark, semester, faculty, department, level, core_or_elective):
     73
    6774        super(CourseTicket, self).__init__()
    6875        self.title = title
    6976        self.code = code
    70         self.course_level = course_level
     77        self.faculty = faculty
     78        self.department = department
     79        self.level = level
     80        self.credits = credits
     81        self.passmark = passmark
     82        self.semester = semester
    7183        self.core_or_elective = core_or_elective
    7284        return
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_student.py

    r6781 r6783  
    3737        self.studycourse = StudentStudyCourse()
    3838        self.studylevel = StudentStudyLevel()
    39         self.courseticket = CourseTicket('CERT', 'Title', 100, True)
     39        self.courseticket = CourseTicket('CERT', 'Title', 100, 10, 40, 1,
     40            'Faculty', 'Department', True)
    4041        self.payments = StudentPayments()
    4142        self.accommodation = StudentAccommodation()
Note: See TracChangeset for help on using the changeset viewer.