예제 #1
0
 def exportWebZip(self, client, filename, stylesDir):
     try:
         log.debug(u"exportWebsite, filename=%s" % filename)
         filename = Path(filename)
         filename = self.b4save(client, filename, '.zip', _(u'EXPORT FAILED!'))
         websiteExport = WebsiteExport(self.config, stylesDir, filename)
         websiteExport.exportZip(self.package)
     except Exception, e:
         client.alert(_('EXPORT FAILED!\n%s' % str(e)))
         raise
예제 #2
0
 def exportWebZip(self, client, filename, stylesDir):
     filename = Path(filename)
     log.debug(u"exportWebsite, filename=%s" % filename)
     if not filename.ext.lower() == '.zip': 
         filename += '.zip'
     if filename.exists(): 
         filename.remove()
     websiteExport = WebsiteExport(self.config, stylesDir, filename)
     websiteExport.exportZip(self.package)
     client.alert(_(u'Exported to %s') % filename)
 def exportWebZip(self, client, filename, stylesDir):
     try:
         log.debug(u"exportWebsite, filename=%s" % filename)
         filename = Path(filename)
         # Do the export
         filename = self.b4save(client, filename, '.zip',
                                _(u'EXPORT FAILED!'))
         websiteExport = WebsiteExport(self.config, stylesDir, filename)
         websiteExport.exportZip(self.package)
     except Exception, e:
         client.alert(_('EXPORT FAILED!\n%s' % str(e)))
         raise
예제 #4
0
    def render_export(self, format):
        filename = self.package.name + '_' + str(random.randrange(1,999999))
        fullpath = self.webserver.config.dataDir/filename
        stylesDir  = self.webserver.config.stylesDir/self.package.style

        try:
            if format == 'zipFile':
                websiteExport = WebsiteExport(self.webserver.config, stylesDir, fullpath + '.zip')
                websiteExport.exportZip(self.package)
            if format == 'scorm1.2':
                scormExport = ScormExport(self.webserver.config, stylesDir, fullpath + '.zip', 'scorm1.2')
                scormExport.export(self.package)
        except:
            return False
        return File(fullpath + '.zip')
예제 #5
0
 def export_webzip(self, pkg, outputf):
     websiteExport = WebsiteExport(self.config, self.styles_dir, outputf)
     websiteExport.exportZip(pkg)
예제 #6
0
 def export_webzip(self, pkg, outputf):
     websiteExport = WebsiteExport(self.config, self.styles_dir, outputf)
     websiteExport.exportZip(pkg)