← Back to team overview

schooltool-developers team mailing list archive

More on schooltool.report

 

Hey Guys,

After speaking with Tom about the report utility system I'm working
on, an additional benefit of the utility became clear.  At present,
schooltool.gradebook is the only package that has extensive reporting,
and as a result, it needed to create report request pages for the
various context types, schoolyear, term, section, person.  This
included a Reports action button for each context.

What we really need is for schooltool.report to provide these pages as
well as the Reports action link for each context, and it can use the
new registered utilities to generate the request view for each
context.  This means that one single utility registration will result
in two things: a report request link in the request view and the
appearance of the report in the reports reference view.

I think this will clear up the confusion Justas and I had regarding
the need for context type versus link.  We need them both.
Definitely, we need the utility to generate the link that
automatically appears in the report request view.  However, we also
need the interface itself to be one of the attributes so that we can
sub-divide the utilities by interface type.  We only want to put
schoolyear report request links in the schoolyear report request view.

This means that the current attributes for the utility are:

title
description
interface
getRequestLink()
getReferenceLink()

The lookup code for generating the request links for a specific
context would look like:

for name, util in getUtilitiesFor(IReportUtility):
    if util.interface.providedBy(self.context):
        links.append(util.getRequestLink())

As for the reports reference view, I will need to create a vocabulary
that maps the various interfaces to text that the user could
understand (School Year, Term, Group, etc.) and provide a drop-down
that allows for filtering by context type.  I'm assuming that such a
vocabulary that maps interface classes to text would be possible and
that it could be used easily in a table view.  Please correct me if
I'm wrong.

Any thoughts?



Follow ups