← Back to team overview

schooltool-developers team mailing list archive

New schooltool.report package

 

Hey Guys,

I'm creating a new package in schooltool core, called
schooltool.report, which will include a handy reference view to what
schooltool reports exist in any given instance of schooltool.  The
Manage tab link, Reports, will take the user to a view that lists all
reports registered via a new utility, the interface of which will be
defined in schooltool.report.  The idea is that the packages where the
reports are created will register a named utility for each report they
have, so that a utility lookup will find every report that is
registered in this manner.  This includes add-on packages like
schootool.gradebook and schooltool.lyceum.journal as well as any
custom packages that we make for the various pilots.

The interface for the utiltity, IReportDescription, would contain the following:

- title
- description
- interface

An example utiltiy in schooltool.gradebook would look like:

from schooltool.report.description import DescriptionUtility (which
has the provides IReportDescription statement)

class ReportCardDescription(DescriptionUtility):
    title = _('Student Report Card')
    description = _('This report runs the Report Card for a student')
    interface = IPerson

It would be registered as a named utility:

<utility

      provides="schooltool.report.interfaces.IReportDescription "

      component="schooltool.gradebook.browser.descriptions.ReportCardDescription"

      name="schooltool.gradebook.report_card”
      />

The Manage->Reports view will use a table that lists the reports
alphabetically by title with additional columns for description and
context type (interface).  The user will be able to search (filter) by
title and/or context type.  The links provided in the table merely
take the user to the view that makes the most sense for the context
type.  In the case of the schoolyear, that would be the active school
year.  For a group report, the link would be for the group container
for the active schoolyear.  In the case of a person report, it would
go to the same place as Manage->Persons.

Originally, I had envisioned that the links in the table would take
the user to an object select view (depending on context type) where
the user selects an object, and the report is directly run and the pdf
returned.  In that case,  IReportDescription would need to have one
more field called view_class to allow the report to be called
directly.  However, considering the fact that we only have two weeks
until code freeze, and since Tom wants at least the report lookup
feature in the next release, the automatic report requesting machinery
will have to wait until after the sprint, if we decide to do it at
all.

For now, at least the user would have a way of knowing what reports
existed for what context types, all listed in one place.  In that way,
it would be similar to the security descriptions page, informative
more than action-oriented.  Considering the fact that there is no way
currently in schooltool to know what reports are out there without
stumbling on them as one navigates the various objects, it would be a
nice improvement in itself.  Any thoughts?

Thanks,
Alan