Changeset 9836 for main/waeup.kofa
- Timestamp:
- 7 Jan 2013, 08:01:24 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9835 r9836 1556 1556 job_id = self.context.start_export_job( 1557 1557 exporter, self.request.principal.id) 1558 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1559 self.context.logger.info( 1560 '%s - exported: %s, job_id=%s' % (ob_class, exporter, job_id)) 1558 1561 if DISCARD and job_id: 1559 1562 entry = self.context.entry_from_job_id(job_id) 1560 1563 self.context.delete_export_entry(entry) 1564 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1565 self.context.logger.info( 1566 '%s - discarded: job_id=%s' % (ob_class, job_id)) 1561 1567 self.flash(_('Discarded export') + ' %s' % job_id) 1562 1568 self.entries = doll_up(self, user=None) … … 1591 1597 # self.context.entry_from_job_id(job_id)) 1592 1598 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1593 self.context.logger.info('%s - exported: %s' % (ob_class, filename)) 1599 self.context.logger.info( 1600 '%s - downloaded: %s, job_id=%s' % (ob_class, filename, job_id)) 1594 1601 return result 1595 1602 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterexportpage.pt
r9835 r9836 34 34 <p i18n:translate=""> 35 35 Student data exports have to be further configured. You can create CSV files 36 on the corresponding <a href=" jobconfig">configuration page</a>.36 on the corresponding <a href="@@exportconfig">configuration page</a>. 37 37 </p> 38 38 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r9835 r9836 224 224 self.app['datacenter'].storage, 'logs', 'datacenter.log') 225 225 logcontent = open(logfile).read() 226 self.assertTrue('zope.mgr - browser.pages.ExportCSVPage - exported: ' 227 'faculties, job_id=' in logcontent) 226 228 self.assertTrue('zope.mgr - browser.pages.ExportCSVView - ' 227 ' exported: WAeUP.Kofa_faculties.csv' in logcontent)229 'downloaded: WAeUP.Kofa_faculties.csv, job_id=' in logcontent) 228 230 return 229 231 … … 308 310 'current_session\r\n') 309 311 self.cleanup_run_job() 312 logfile = os.path.join( 313 self.app['datacenter'].storage, 'logs', 'datacenter.log') 314 logcontent = open(logfile).read() 315 self.assertTrue( 316 'zope.mgr - students.browser.DatacenterExportJobContainerJobConfig ' 317 '- exported: students (None, None, None, None), job_id=' 318 in logcontent) 319 self.assertTrue( 320 'zope.mgr - browser.pages.ExportCSVView ' 321 '- downloaded: WAeUP.Kofa_students.csv, job_id=' in logcontent) 310 322 return 311 323 … … 317 329 self.browser.getControl("Discard").click() 318 330 self.assertTrue('Discarded export' in self.browser.contents) 331 logfile = os.path.join( 332 self.app['datacenter'].storage, 'logs', 'datacenter.log') 333 logcontent = open(logfile).read() 334 self.assertTrue( 335 'zope.mgr - browser.pages.ExportCSVPage - discarded: job_id=' 336 in logcontent) 319 337 return 320 338 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9835 r9836 2666 2666 def update(self, CREATE=None, DISCARD=None, job_id=None): 2667 2667 if CREATE: 2668 self.redirect(self.url(' jobconfig'))2668 self.redirect(self.url('@@exportconfig')) 2669 2669 return 2670 2670 if DISCARD and job_id: 2671 2671 entry = self.context.entry_from_job_id(job_id) 2672 2672 self.context.delete_export_entry(entry) 2673 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 2674 self.context.logger.info( 2675 '%s - discarded: job_id=%s' % (ob_class, job_id)) 2673 2676 self.flash(_('Discarded export') + ' %s' % job_id) 2674 2677 self.entries = doll_up(self, user=self.request.principal.id) … … 2681 2684 """ 2682 2685 grok.baseclass() 2683 grok.name(' jobconfig')2686 grok.name('exportconfig') 2684 2687 grok.require('waeup.showStudents') 2685 grok.template('export jobsjobconfig')2688 grok.template('exportconfig') 2686 2689 label = _('Configure student data export') 2687 2690 pnav = 1 … … 2735 2738 if mode == 'all': 2736 2739 mode = None 2737 self.context.start_export_job(exporter, self.request.principal.id, 2740 job_id = self.context.start_export_job(exporter, 2741 self.request.principal.id, 2738 2742 current_session=session, 2739 2743 current_level=level, 2740 2744 current_mode=mode, 2741 2745 depcode=self.depcode) 2746 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 2747 self.context.logger.info( 2748 '%s - exported: %s (%s, %s, %s, %s), job_id=%s' 2749 % (ob_class, exporter, session, level, mode, self.depcode, job_id)) 2742 2750 self.flash(_('Export started for students with') + 2743 2751 ' current_session=%s, current_level=%s, study_mode=%s' % ( -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9835 r9836 2775 2775 logcontent = open(logfile).read() 2776 2776 self.assertTrue( 2777 ' INFO - zope.mgr - students.browser.ExportJobContainerDownload -'2778 ' exported: WAeUP.Kofa_students.csv'2777 'zope.mgr - students.browser.DepartmentExportJobContainerJobConfig ' 2778 '- exported: students (2004, 100, ug_ft, dep1), job_id=' 2779 2779 ) 2780 self.assertTrue( 2781 'zope.mgr - students.browser.ExportJobContainerDownload ' 2782 '- downloaded: WAeUP.Kofa_students.csv, job_id=' 2783 ) 2784 self.assertTrue( 2785 'zope.mgr - students.browser.ExportJobContainerOverview ' 2786 '- discarded: job_id=' 2787 )
Note: See TracChangeset for help on using the changeset viewer.