Show
Ignore:
Timestamp:
07/06/09 16:29:34 (3 years ago)
Author:
jon
Message:

Adding extension for html files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • collective.imstransport/trunk/collective/imstransport/utilities/moodle/imsmoodlewriter.py

    r337 r338  
    8888                    mw.writeResourceFile(rn, path) 
    8989 
     90        import pdb; pdb.set_trace(); 
    9091        self._writeObjectData(mw.getManifest(doc), 'imsmanifest.xml', destination) 
    9192 
     
    9697 
    9798 
     99    def _getObjectPath(self, obj, context): 
     100        """ Get the path of an object. """ 
     101 
     102        root_path = context.aq_explicit.virtual_url_path() 
     103        obj_path = obj.aq_explicit.virtual_url_path() 
     104 
     105        if obj_path.find(root_path) != 0: 
     106            return '' 
     107 
     108        # Remove the path of the folder object 
     109        path = obj_path.replace(root_path, '') 
     110        if path and path[0] == '/': 
     111            path = path[1:] 
     112 
     113        if not path: 
     114            return '' 
     115 
     116        if hasattr(obj.aq_explicit, 'Format'): 
     117            if 'text/html' == obj.Format(): 
     118                path += '.html' 
     119 
     120        return path 
     121 
     122