Changeset 6628 for main/waeup.sirp/trunk
- Timestamp:
- 25 Aug 2011, 16:21:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/batching.py
r6243 r6628 18 18 """A batch processor for IFaculty objects. 19 19 """ 20 grok.implements(IBatchProcessor) 20 21 grok.provides(IBatchProcessor) 21 22 grok.context(Interface) … … 29 30 factory_name = 'waeup.Faculty' 30 31 32 mode = None 33 31 34 def parentsExist(self, row, site): 32 35 return 'faculties' in site.keys() … … 43 46 parent = self.getParent(row, site) 44 47 return parent.get(row['code']) 45 48 46 49 def addEntry(self, obj, row, site): 47 50 parent = self.getParent(row, site) … … 57 60 """A batch processor for IDepartment objects. 58 61 """ 62 grok.implements(IBatchProcessor) 59 63 grok.provides(IBatchProcessor) 60 64 grok.context(Interface) … … 68 72 factory_name = 'waeup.Department' 69 73 74 mode = None 75 70 76 def parentsExist(self, row, site): 71 77 if not 'faculties' in site.keys(): … … 87 93 parent = self.getParent(row, site) 88 94 return parent.get(row['code']) 89 95 90 96 def addEntry(self, obj, row, site): 91 97 parent = self.getParent(row, site) … … 101 107 """A batch processor for ICourse objects. 102 108 """ 109 grok.implements(IBatchProcessor) 103 110 grok.provides(IBatchProcessor) 104 111 grok.context(Interface) … … 112 119 factory_name = 'waeup.Course' 113 120 121 mode = None 122 114 123 def parentsExist(self, row, site): 115 124 if not 'faculties' in site.keys(): … … 135 144 parent = self.getParent(row, site) 136 145 return parent.get(row['code']) 137 146 138 147 def addEntry(self, obj, row, site): 139 148 parent = self.getParent(row, site) … … 149 158 """A batch processor for ICertificate objects. 150 159 """ 160 grok.implements(IBatchProcessor) 151 161 grok.provides(IBatchProcessor) 152 162 grok.context(Interface) … … 160 170 factory_name = 'waeup.Certificate' 161 171 172 mode = None 173 162 174 def parentsExist(self, row, site): 163 175 if not 'faculties' in site.keys(): … … 197 209 """A batch processor for ICertificateCourse objects. 198 210 """ 211 grok.implements(IBatchProcessor) 199 212 grok.provides(IBatchProcessor) 200 213 grok.context(Interface) … … 209 222 factory_name = 'waeup.CertificateCourse' 210 223 224 mode = None 225 211 226 def parentsExist(self, row, site): 212 227 if not 'faculties' in site.keys(): … … 235 250 return None 236 251 parent = self.getParent(row, site) 237 return parent.get( row['course'])252 return parent.get("%s_%s" % (row['course'].code, row['level'])) 238 253 239 254 def addEntry(self, obj, row, site):
Note: See TracChangeset for help on using the changeset viewer.