- Timestamp:
- 17 Feb 2012, 12:06:10 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt
r7627 r7665 365 365 366 366 >>> open('mycertcourses.csv', 'wb').write( 367 ... """course,faculty_code,department_code,certificate_code,level, core_or_elective367 ... """course,faculty_code,department_code,certificate_code,level,mandatory 368 368 ... CRS1,FAC1,DEP1,CERT1,100,True 369 369 ... CRS2,FAC1,DEP1,CERT1,100,True -
main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt
r7657 r7665 1225 1225 1226 1226 >>> open('certcourses.csv', 'wb').write( 1227 ... """code,faculty_code,department_code,certificate_code,level, core_or_elective1227 ... """code,faculty_code,department_code,certificate_code,level,mandatory 1228 1228 ... LI1,FA,LIT,LBA,100,True 1229 1229 ... LI2,FA,LIT,LBA,200,True -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatecoursepage.pt
r7465 r7665 29 29 <tr> 30 30 <td>Is mandatory course (not elective):</td> 31 <td tal:content="context/ core_or_elective">MANDATORY</td>31 <td tal:content="context/mandatory">MANDATORY</td> 32 32 </tr> 33 33 </tbody> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatemanagepage.pt
r7484 r7665 81 81 </td> 82 82 <td> 83 <span tal:content="cc/ core_or_elective">83 <span tal:content="cc/mandatory"> 84 84 MANDATORY 85 85 </span> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt
r7465 r7665 53 53 </td> 54 54 <td> 55 <span tal:content="cc/ core_or_elective">55 <span tal:content="cc/mandatory"> 56 56 MANDATORY 57 57 </span> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7663 r7665 681 681 ('Dept.','dcode', 1.5), ('Faculty','fcode', 1.5), 682 682 ('Cred.', 'credits', 1.5), 683 ('Mand.', ' core_or_elective', 1.5),683 ('Mand.', 'mandatory', 1.5), 684 684 ('Score', 'score', 1.5),('Auto', 'automatic', 1.5) 685 685 ], … … 1684 1684 for id in child_id: 1685 1685 # Students are not allowed to remove core tickets 1686 if not self.context[id]. core_or_elective:1686 if not self.context[id].mandatory: 1687 1687 try: 1688 1688 del self.context[id] … … 1710 1710 grok.require('waeup.handleStudent') 1711 1711 form_fields = grok.AutoFields(ICourseTicketAdd).omit( 1712 'grade', 'score', ' core_or_elective', 'automatic', 'carry_over')1712 'grade', 'score', 'mandatory', 'automatic', 'carry_over') 1713 1713 1714 1714 def update(self): -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studyleveleditpage.pt
r7663 r7665 22 22 <input type="checkbox" name="val_id" 23 23 tal:attributes="value value/__name__" 24 tal:condition="not: value/ core_or_elective" />24 tal:condition="not: value/mandatory" /> 25 25 </td> 26 26 <td tal:content="value/semester">SEMESTER</td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelmanagepage.pt
r7663 r7665 73 73 <td tal:content="value/fcode">FACULTY</td> 74 74 <td tal:content="value/credits">CREDITS</td> 75 <td tal:content="value/ core_or_elective">MANDATORY</td>75 <td tal:content="value/mandatory">MANDATORY</td> 76 76 <td tal:content="value/score">SCORE</td> 77 77 <td tal:content="value/carry_over">CO</td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelpage.pt
r7663 r7665 53 53 <td tal:content="value/fcode">FACULTY</td> 54 54 <td tal:content="value/credits">CREDITS</td> 55 <td tal:content="value/ core_or_elective">MANDATORY</td>55 <td tal:content="value/mandatory">MANDATORY</td> 56 56 <td tal:content="value/score">SCORE</td> 57 57 <td tal:content="value/carry_over">CO</td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
r7661 r7665 357 357 dcode = Attribute('department code of the original course') 358 358 359 core_or_elective= schema.Bool(359 mandatory = schema.Bool( 360 360 title = u'Mandatory', 361 361 default = False, -
main/waeup.sirp/trunk/src/waeup/sirp/students/studycourse.py
r7664 r7665 57 57 ticket.code = val.getCourseCode() 58 58 ticket.automatic = True 59 ticket. core_or_elective = val.core_or_elective59 ticket.mandatory = val.mandatory 60 60 ticket.title = val.course.title 61 61 ticket.fcode = val.course.__parent__.__parent__.__parent__.code … … 83 83 co_ticket = CourseTicket() 84 84 for name in ['code', 'title', 'credits', 'passmark', 85 'semester', ' core_or_elective',85 'semester', 'mandatory', 86 86 'fcode', 'dcode']: 87 87 setattr(co_ticket, name, getattr(val, name)) -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_courseticket_data.csv
r7548 r7665 1 reg_number,matric_number,level,code,score, core_or_elective1 reg_number,matric_number,level,code,score,mandatory 2 2 1,,100,COURSE1,1,True 3 3 2,,100,COURSE1,2,False -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_batching.py
r7649 r7665 523 523 self.assertEqual(courseticket.__parent__.__parent__.certificate.code, u'CERT1') 524 524 self.assertEqual(courseticket.score, 1) 525 self.assertEqual(courseticket. core_or_elective, True)525 self.assertEqual(courseticket.mandatory, True) 526 526 self.assertEqual(courseticket.fcode, 'NA') 527 527 self.assertEqual(courseticket.dcode, 'NA') -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7664 r7665 1206 1206 self.assertRaises( 1207 1207 LookupError, self.browser.getControl, name='val_id') 1208 self.student['studycourse']['200']['COURSE1']. core_or_elective= False1208 self.student['studycourse']['200']['COURSE1'].mandatory = False 1209 1209 self.browser.open(self.student_path + '/studycourse/200/edit') 1210 1210 # Now the student can remove the ticket -
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.