Changeset 9654


Ignore:
Timestamp:
17 Nov 2012, 07:41:41 (12 years ago)
Author:
Henrik Bettermann
Message:

Log the creation and download of reports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports.py

    r9653 r9654  
    198198            user_id = self.request.principal.id
    199199            kw = dict(
    200                 #session=self._session_value_dict[session],
    201200                session=int(session),
    202201                mode=mode)
     
    204203            container.start_report_job(
    205204                self.generator_name, user_id, kw=kw)
     205            ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
     206            grok.getSite().logger.info(
     207                '%s - created: %s (session=%s, mode=%s)' % (
     208                ob_class, self.context.title, session, mode))
    206209            self.redirect(self.parent_url)
    207210            return
     
    211214        vocab_terms = academic_sessions_vocab.by_value.values()
    212215        self.sessions = [(x.title, x.token) for x in vocab_terms]
    213         #self._session_value_dict = dict([(x.token, x.value) for x in vocab_terms])
    214216        return
    215217
     
    232234            'Content-Disposition:', 'attachment; filename="%s' % filename)
    233235        pdf_stream = self.context.create_pdf()
     236        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
     237        grok.getSite().logger.info('%s - downloaded: %s' % (ob_class, filename))
    234238        return pdf_stream
Note: See TracChangeset for help on using the changeset viewer.