Changeset 2264
- Timestamp:
- 20 Sep 2007, 17:36:42 (17 years ago)
- Location:
- WAeUP_SRP
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/PatchQueueCatalogProcessQueue.py
r2260 r2264 96 96 catalog_object(obj, uid, cat_indexes) 97 97 else: 98 import pdb;pdb.set_trace()98 #import pdb;pdb.set_trace() 99 99 self._update(uid, already_cataloged and CHANGED or ADDED) 100 100 # Update some of the indexes immediately. -
WAeUP_SRP/base/WAeUPTool.py
r2263 r2264 61 61 meta_type = 'WAeUP Tool' 62 62 _actions = () 63 64 63 security = ClassSecurityInfo() 65 64 security.declareObjectProtected(View) 66 67 65 manage_options = ( ActionProviderBase.manage_options 68 66 + SimpleItem.manage_options … … 913 911 ###) 914 912 913 security.declareProtected(ModifyPortalContent,'mass_create_faculty') ###( 914 def mass_create_faculty(self,mapping): 915 "create a faculty" 916 logger = logging.getLogger('WAeUPTool.mass_create_faculty') 917 academics_folder = self.portal_url.getPortalObject().campus.academics 918 fid = mapping['code'] 919 if getattr(academics_folder,fid,None) is not None: 920 return '', "Faculty with ID: %s exists" % fid 921 logger.info('Creating Faculty %(code)s = %(title)s' % mapping) 922 academics_folder.invokeFactory('Faculty', fid) 923 f = getattr(academics_folder,fid,None) 924 f.getContent().edit(mapping=mapping) 925 return fid,'' 926 ###) 927 928 security.declareProtected(ModifyPortalContent,'mass_edit_Faculty') ###( 929 def mass_edit_faculty(self,mapping): 930 "edit a faculty" 931 logger = logging.getLogger('WAeUPTool.mass_edit_faculty') 932 academics_folder = self.portal_url.getPortalObject().campus.academics 933 fid = mapping['code'] 934 f = getattr(academics_folder,fid,None) 935 if f is None: 936 return '', "Faculty with ID: %s does not exist" % fid 937 logger.info('Editing Faculty %(code)s = %(title)s' % mapping) 938 f.getContent().edit(mapping=mapping) 939 return fid,'' 940 ###) 941 915 942 security.declareProtected(ModifyPortalContent,'mass_create_department') ###( 916 943 def mass_create_department(self,mapping): … … 1242 1269 #import_keys = [k for k in item.keys() if not k.startswith('ignore')] 1243 1270 attrs = csv.reader(open("%s/import/%s.csv" % (i_home,filename),"rb")).next() 1244 #import pdb;pdb.set_trace()1245 1271 import_keys = [k for k in attrs if not k.startswith('ignore')] 1246 1272 diff2schema = set(import_keys).difference(set(schema.keys())) … … 1256 1282 format_error = format + ',"%(Error)s"' 1257 1283 format = '"%(id)s",'+ format 1258 by_pass_queue = getattr(self.portal_catalog,"setBypassQueue",None)1259 if by_pass_queue is not None:1260 bypass_queue(bypass_queue_catalog)1261 1284 1262 1285 dm = DataModel(item, adapters,context=self) … … 1264 1287 error_string = "" 1265 1288 for k in import_keys: 1289 #import pdb;pdb.set_trace() 1266 1290 if not validators[k](ds): 1267 error_string += " %s : %s" % (k,ds.getError(k)) 1291 error_string += " %s : %s" % (k, 1292 self.translation_service(ds.getError(k), 1293 ds.getErrorMapping(k))) 1268 1294 if not error_string: 1269 1295 item.update(dm) -
WAeUP_SRP/uniben/profiles/default/layouts.xml
r2193 r2264 13 13 <object name="import_department" meta_type="CPS Layout"/> 14 14 <object name="department" meta_type="CPS Layout"/> 15 <object name="import_faculty" meta_type="CPS Layout"/> 15 16 <object name="faculty" meta_type="CPS Layout"/> 16 17 <object name="import" meta_type="CPS Layout"/> -
WAeUP_SRP/uniben/profiles/default/schemas.xml
r2193 r2264 14 14 <object name="department" meta_type="CPS Schema"/> 15 15 <object name="faculty" meta_type="CPS Schema"/> 16 <object name="import_faculty" meta_type="CPS Schema"/> 16 17 <object name="members" meta_type="CPS Schema"/> 17 18 <object name="members_search" meta_type="CPS Schema"/> -
WAeUP_SRP/uniben/profiles/default/vocabularies/import_names.xml
r2193 r2264 7 7 <property name="acl_write_roles">Manager</property> 8 8 <item key="student" msgid="">Student Data</item> 9 <item key="faculty" msgid="">Faculty Data</item> 9 10 <item key="department" msgid="">Department Data</item> 10 11 </object>
Note: See TracChangeset for help on using the changeset viewer.