Basic report view implemented, View_lessons fix

Implemented the first version of report views for individual lessons.
Also fixed the 'view' option for the aggregate user lesson view,
although this is still temporary code and will be changed to use one of
the standard tables in time.