Ignore:
Timestamp:
5 Jul 2012, 14:48:51 (13 years ago)
Author:
Henrik Bettermann
Message:

Rename course referrers to certificate courses (according to the discussion long time ago).

Edit some button labels and titles.

Move code from view to content components.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/university
Files:
10 edited
1 moved

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/university/api.txt

    r7811 r8920  
    2828   :maxdepth: 1
    2929
    30    courserefs.txt
     30   certcourses.txt
  • main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py

    r8302 r8920  
    317317    def addEntry(self, obj, row, site):
    318318        parent = self.getParent(row, site)
    319         parent.addCourseRef(row['course'],
     319        parent.addCertCourse(row['course'],
    320320                            row['level'], row['mandatory'])
    321321        return
     
    323323    def delEntry(self, row, site):
    324324        parent = self.getParent(row, site)
    325         parent.delCourseRef(row['course'].code, row['level'])
    326         return
     325        parent.delCertCourse(row['course'].code, row['level'])
     326        return
  • main/waeup.kofa/trunk/src/waeup/kofa/university/catalog.py

    r7811 r8920  
    159159        self.title = context.course.title
    160160        self.code = context.getCourseCode
    161         self.type = 'Course Referrer'
     161        self.type = 'Certificate Course'
    162162
    163163def search(query=None, view=None):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certcourses.txt

    r8898 r8920  
    1 Course referrers
    2 ****************
     1Certificate Courses
     2*******************
    33
    44Courses are referred to by certificate courses.
     
    6464    >>> fac['DEPT'].certificates.addCertificate(cert)
    6565
    66     >>> fac['DEPT'].certificates['CERT'].addCourseRef(
     66    >>> fac['DEPT'].certificates['CERT'].addCertCourse(
    6767    ...   fac['DEPT'].courses['CRS1'])
    6868
    69     >>> fac['DEPT'].certificates['CERT'].addCourseRef(
     69    >>> fac['DEPT'].certificates['CERT'].addCertCourse(
    7070    ...   fac['DEPT2'].courses['CRS2'])
    7171
    7272We add the latter course again, but this time for the second level:
    7373
    74     >>> fac['DEPT'].certificates['CERT'].addCourseRef(
     74    >>> fac['DEPT'].certificates['CERT'].addCertCourse(
    7575    ...   fac['DEPT2'].courses['CRS2'], level=200)
    7676
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py

    r8738 r8920  
    6363        return "%s (%s)" % (self.title,self.code)
    6464
    65     def addCourseRef(self, course, level=100, mandatory=True):
    66         """Add a course referrer.
     65    def addCertCourse(self, course, level=100, mandatory=True):
     66        """Add a certificate course.
    6767        """
    6868        code = "%s_%s" % (course.code, level)
     
    7272        self._p_changed = True
    7373
    74     def delCourseRef(self, code, level=None):
    75         """Delete a course referrer denoted by its code.
     74    def delCertCourse(self, code, level=None):
     75        """Delete a certificate course denoted by its code.
    7676        """
    7777        keys = list(self.keys()) # create list copy
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.txt

    r7819 r8920  
    9696      .. XXX: This is not a proper description
    9797
    98    .. method:: addCourseRef(course[, level=100,[ mandatory=True]])
    99 
    100       Add a referrer of a course. A course is an object implementing
     98   .. method:: addCertCourse(course[, level=100,[ mandatory=True]])
     99
     100      Add a certificate course. A course is an object implementing
    101101      :class:`waeup.kofa.interfaces.ICourse`.
    102102
    103       Please don't be confused by the term 'referrer'. As course objects
    104       will normaly be  stored
    105       in a department, the course referrer refers to
     103      Please don't be confused by the term 'certificate course'.
     104      As course objects will normaly be  stored
     105      in a department, the certificate course refers to
    106106      the 'real' course in the department container.
    107107
    108    .. method:: delCourseRef(code)
    109 
    110       Remove a course referrer from a certificate.
    111 
    112       The referrer must be given by its code number.
     108   .. method:: delCertCourse(code)
     109
     110      Remove a certificate course from a certificate.
     111
     112      The certificate course must be given by its code number.
    113113
    114114:class:`CertificateCourse`
     
    117117.. class:: CertificateCourse(course[, level=100[, mandatory=True]])
    118118
    119    Create a course referrer.
    120 
    121    A certificate course (old term) or course referrer are held in
     119   Create a certificate course.
     120
     121   A certificate course are held in
    122122   certificates and refer to an existing :class:`Course` instance held
    123123   elsewhere.
    124124
    125    A certificate can require several course referrers and one
    126    course referrer can be required by several certificates.
     125   A certificate can require several certificate courses and one
     126   certificate course can be required by several certificates.
    127127
    128128   .. attribute:: course
     
    225225
    226226   To accomplish that, the parents of the removed course are looked up
    227    for a certifcate container which contains a course referrer that
     227   for a certifcate container which contains a certificate course that
    228228   refers to the deleted course.
    229229
     
    341341    >>> mycert.code = 'MYCERT'
    342342    >>> mydept.certificates.addCertificate(mycert)
    343     >>> mycert.addCourseRef(mycourse)
     343    >>> mycert.addCertCourse(mycourse)
    344344
    345345    >>> transaction.commit()
     
    354354    ['mydept']
    355355
    356 The course referrer we stored in the certificate is indeed a
     356The certificate course we stored in the certificate is indeed a
    357357referrer of the course, not a copy of it:
    358358
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.py

    r7811 r8920  
    7878        # Remove that referrer...
    7979        cert = certcourse.__parent__
    80         cert.delCourseRef(code)
     80        cert.delCertCourse(code)
    8181        cert._p_changed = True
    8282    return
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r8472 r8920  
    286286    """
    287287    course = schema.Choice(
    288         title = _(u'Course Referrer'),
     288        title = _(u'Course'),
    289289        source = CourseSource(),
    290290        readonly = True,
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_batching.py

    r7811 r8920  
    266266        self.department2.certificates['CRT'] = self.certificate
    267267        self.course = Course(code='CRS')
    268         self.department2.certificates['CRT'].addCourseRef(self.course)
     268        self.department2.certificates['CRT'].addCertCourse(self.course)
    269269        self.cert_course = self.certificate['CRS_100']
    270270        self.department2.courses['CRS'] = self.course
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py

    r8303 r8920  
    444444        self.dept1.certificates.addCertificate(self.cert2)
    445445        self.dept2.certificates.addCertificate(self.cert3)
    446         self.cert1.addCourseRef(self.course1, 100, True)
    447         self.cert1.addCourseRef(self.course2, 400, False)
    448         self.cert3.addCourseRef(self.course3, 100, False)
     446        self.cert1.addCertCourse(self.course1, 100, True)
     447        self.cert1.addCertCourse(self.course2, 400, False)
     448        self.cert3.addCertCourse(self.course3, 100, False)
    449449        self.certcourse1 = self.cert1['C1_100']
    450450        self.certcourse2 = self.cert1['C2_400']
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_university.py

    r7811 r8920  
    3333def test_suite():
    3434    # collect doctests for university subpackage
    35     suite = get_doctest_suite(['university/courserefs.txt',])
     35    suite = get_doctest_suite(['university/certcourses.txt',])
    3636    # add local unittests (actually only one)
    3737    for testcase in [UniversitySubpackageTests,]:
Note: See TracChangeset for help on using the changeset viewer.