Changeset 7665 for main/waeup.sirp/trunk/src/waeup/sirp/university
- Timestamp:
- 17 Feb 2012, 12:06:10 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/university
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/batching.py
r7333 r7665 272 272 parent = self.getParent(row, site) 273 273 parent.addCourseRef(row['course'], 274 row['level'], row[' core_or_elective'])274 row['level'], row['mandatory']) 275 275 return 276 276 -
main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py
r7349 r7665 57 57 return "%s (%s)" % (self.title,self.code) 58 58 59 def addCourseRef(self, course, level=100, core_or_elective=True):59 def addCourseRef(self, course, level=100, mandatory=True): 60 60 """Add a course referrer. 61 61 """ 62 62 code = "%s_%s" % (course.code, level) 63 self[code] = CertificateCourse(course, level, core_or_elective)63 self[code] = CertificateCourse(course, level, mandatory) 64 64 self[code].__parent__ = self 65 65 self[code].__name__ = code … … 97 97 grok.implements(ICertificateCourse) 98 98 99 def __init__(self, course=None, level=100, core_or_elective=True):99 def __init__(self, course=None, level=100, mandatory=True): 100 100 self.course = course 101 101 self.level = level 102 self. core_or_elective = core_or_elective102 self.mandatory = mandatory 103 103 104 104 def getCourseCode(self): -
main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.txt
r7321 r7665 96 96 .. XXX: This is not a proper description 97 97 98 .. method:: addCourseRef(course[, level=100,[ core_or_elective=True]])98 .. method:: addCourseRef(course[, level=100,[ mandatory=True]]) 99 99 100 100 Add a referrer of a course. A course is an object implementing … … 115 115 -------------------------- 116 116 117 .. class:: CertificateCourse(course[, level=100[, core_or_elective=True]])117 .. class:: CertificateCourse(course[, level=100[, mandatory=True]]) 118 118 119 119 Create a course referrer. … … 134 134 An integer telling the level to which this course applies. 135 135 136 .. attribute:: core_or_elective136 .. attribute:: mandatory 137 137 138 138 A bool stating whether this course is required or optional to -
main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py
r7601 r7665 274 274 ) 275 275 276 core_or_elective= schema.Bool(276 mandatory = schema.Bool( 277 277 title = u'Is mandatory course (not elective)', 278 278 required = True,
Note: See TracChangeset for help on using the changeset viewer.