Changeset 3177


Ignore:
Timestamp:
18 Feb 2008, 10:06:25 (17 years ago)
Author:
joachim
Message:

pending only only depends on "pending data only" some fixes for FacultyImport?

Location:
WAeUP_SRP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPImport.py

    r3172 r3177  
    506506class FacultyImport(WAeUPImport):###(
    507507    name = "faculty"
    508     plural_name = "%ss" % name
     508    plural_name = "faculties"
    509509    commit_after = 100
    510510
     
    526526            f = getattr(academics_folder,fid,None)
    527527            f.getContent().edit(mapping=mapping)
    528             return fid,msg,mapping
     528            break
     529        return fid,msg,mapping
    529530        ###)
    530531
     
    538539            if f is None:
    539540                msg =  "Faculty with ID: %s does not exist" % fid
    540                 break
    541541            f.getContent().edit(mapping=mapping)
     542            break
    542543        return fid,msg,mapping
    543544    ###)
  • WAeUP_SRP/base/WAeUPTool.py

    r3176 r3177  
    13461346        students_folder = self.portal_url.getPortalObject().campus.students
    13471347        pending_only = False
    1348         pend_str = '_pending'
     1348        pend_str = '--'
    13491349        elapse = time.time()
    13501350        #
    13511351        # preparations
    13521352        #
    1353         if name.endswith(pend_str):
     1353        if filename == pend_str:
    13541354            pending_only = True
    1355             name = name[:-len(pend_str)]
    13561355        mode = "create"
    13571356        if edit:
     
    13601359            else:
    13611360                mode = "edit"
    1362         # schema = stool._getOb(iname)
    1363         # if schema is None:
    1364         #     em = 'No such schema %s' % iname
    1365         #     logger.error('No such schema %s' % iname)
    1366         #     return em
    1367         # pending_schema = stool._getOb("%s_pending" % iname)
    1368         # if pending_schema is None:
    1369         #     em = 'No such schema %s_pending' % iname
    1370         #     logger.error('No such schema %s_pending' % iname)
    1371         #     return em
    1372         # layout = ltool._getOb(iname)
    1373         # if layout is None:
    1374         #     em = 'No such layout %s' % iname
    1375         #     logger.error(em)
    1376         #     return em
    13771361        importer_name = ''.join([part.capitalize() for part in name.split('_')])
    13781362        importer = eval("%sImport" % importer_name)(mode,self)
     
    15701554        else:
    15711555            added_pending = total_pending - pending_at_start
    1572             msg += "%(pending_fn)s: added = %(added_pending)d, already in = %(already_in)s " % vars()
    1573         msg += ", total %(total_pending)d; " % vars()
     1556            msg += "%(pending_fn)s: added = %(added_pending)d, already in = %(already_in)s, " % vars()
     1557        msg += " total %(total_pending)d; " % vars()
    15741558        logger.info(msg)
    15751559        return msg
  • WAeUP_SRP/uniben/profiles/default/vocabularies/import_names.xml

    r3134 r3177  
    1111 <item key="course" msgid="">Course Data</item>
    1212 <item key="course_result" msgid="">Course Result Data</item>
    13  <item key="course_result_pending" msgid="">Pending Course Results only</item>
    1413 <item key="certificate" msgid="">Certificate Data</item>
    1514 <item key="certificate_course" msgid="">Certificate Course Data</item>
    1615 <item key="application" msgid="">Application Data</item>
    1716 <item key="verdict" msgid="">Verdicts</item>
    18  <item key="verdict_pending" msgid="">Pending Verdicts only</item>
    1917</object>
Note: See TracChangeset for help on using the changeset viewer.