Пример #1
0
 def exportIMS(self, client, filename, stylesDir):
     """
     Exports this package to a ims package file
     """
     log.debug(u"exportIMS")
     if not filename.lower().endswith('.zip'): 
         filename += '.zip'
     filename = Path(filename)
     if filename.exists(): 
         filename.remove()
     imsExport = IMSExport(self.config, stylesDir, filename)
     imsExport.export(self.package)
     client.alert(_(u'Exported to %s' % filename))
Пример #2
0
 def exportIMS(self, client, filename, stylesDir):
     """
     Exports this package to a ims package file
     """
     try:
         log.debug(u"exportIMS")
         if not filename.lower().endswith('.zip'):
             filename += '.zip'
             if Path(filename).exists():
                 msg = _(u'"%s" already exists.\nPlease try again with a different filename') % filename
                 client.alert(_(u'EXPORT FAILED!\n%s' % msg))
                 return
         imsExport = IMSExport(self.config, stylesDir, filename)
         imsExport.export(self.package)
     except Exception, e:
         client.alert(_('EXPORT FAILED!\n%s' % str(e)))
         raise
 def exportIMS(self, client, filename, stylesDir):
     """
     Exports this package to a ims package file
     """
     try:
         log.debug(u"exportIMS")
         # Append an extension if required
         if not filename.lower().endswith('.zip'):
             filename += '.zip'
             if Path(filename).exists():
                 msg = _(
                     u'"%s" already exists.\nPlease try again with a different filename'
                 ) % filename
                 client.alert(_(u'EXPORT FAILED!\n%s' % msg))
                 return
         # Do the export
         imsExport = IMSExport(self.config, stylesDir, filename)
         imsExport.export(self.package)
     except Exception, e:
         client.alert(_('EXPORT FAILED!\n%s' % str(e)))
         raise
Пример #4
0
 def export_ims(self, pkg, outputf):
     imsExport = IMSExport(self.config, self.styles_dir, outputf)
     imsExport.export(pkg)
Пример #5
0
 def export_ims(self, pkg, outputf):
     imsExport = IMSExport(self.config, self.styles_dir, outputf)
     imsExport.export(pkg)