Changeset 4322 for waeup/branches/ulif-rewrite
- Timestamp:
- 20 Jun 2009, 19:45:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/university/certificate.txt
r4317 r4322 17 17 ======================================= 18 18 19 19 20 :class:`Certificate` 20 21 -------------------- … … 40 41 >>> verifyObject(ICertificate, mycertificate) 41 42 True 43 44 Beside the attributes, certificates are containers for 45 certificate-courses (see :class:`CertificateCourse`). Each 46 certificate course can be accessed by the code of the course it wraps. 42 47 43 48 .. attribute:: title … … 156 161 as source state (is: 'checked') 157 162 163 .. method:: addCourseRef(course[, level=100,[ core_or_elective=True]]) 164 165 Add a reference to a course. A course is an object implementing 166 :class:`waeup.interfaces.ICourse`. 167 168 Please don't be confused by the term 'reference'. This just 169 means an ordinary :class:`waeup.university.course.Course` object 170 in almost all cases. As this object will normaly be one stored 171 in a department, the course here will simply become a reference 172 to the 'real' one in the department container. 173 174 .. method:: delCourseRef(code) 175 176 Remove a course from a certificate. 177 178 The course must be given by its code number. 179 180 :class:`CertificateCourse` 181 -------------------------- 182 183 .. class:: CertificateCourse(course[, level=100[, core_or_elective=True]]) 184 185 Create a certificate course. 186 187 A certificate-course is a course (:class:`Course`) which is part of 188 a certificate. Normally, certificate-courses are held in 189 certificates and refer to an existing :class:`Course` instance held 190 elsewhere. 191 192 A certificate can require several courses and one 193 course can be required by several certificates. 194 195 .. attribute:: course 196 197 An instance of :class:`ICourse`. 198 199 .. attribute:: level 200 201 An integer telling the level to which this course applies. 202 203 .. attribute:: core_or_elective 204 205 A bool stating whether this course is required or optional to 206 get the certificate. 207 208 158 209 159 210 Utilities … … 180 231 ======== 181 232 233 Certificates 234 ------------ 182 235 183 236 We can create certificates: … … 197 250 <waeup.university.certificate.Certificate object at 0x...> 198 251 252 CertificateCourses 253 ------------------ 254 255 :class:`CertificateCourse` instances comply with the 256 :class:`ICertificateCourse` interface: 257 258 >>> from waeup.interfaces import ICertificateCourse 259 >>> from waeup.university.certificate import CertificateCourse 260 >>> mycertcourse = CertificateCourse(None, 200, False) 261 >>> ICertificateCourse.providedBy(mycertcourse) 262 True 263 264 >>> from zope.interface.verify import verifyObject 265 >>> verifyObject(ICertificateCourse, mycertcourse) 266 True 267
Note: See TracChangeset for help on using the changeset viewer.