learningequality/ka-lite — pull request #399 by bcipolli (2013-08-03 06:26:30+00:00)
Title: updating error logic in tabular view coach report

This addresses issue #394

Background:
tabular view coach reports GET parameters from the querystring. When those parameters are not present, no student data is returned, and an error message is shown. However, this is not disambiguated from the case where student data doesn't return simply because none is available.

Design:
* Show errors as red, not black
* When no user data is returned, separate error messages into all levels of granularity:
* No groups available: then "ungrouped" is selected, and "no students" returned.
* Groups are available, but none was specified, and no "ungrouped" users exist (otherwise they would have been returned).
* Group was selected, but data not queried because a topic was not selected (NOTE: this required knowledge of how the view queries data)
* Everything specified, but no users fit the query.

Implementation:
* This was done with template-side code.
* Since this logic is rather complex / dependent on very specific checks, I implemented automated tests to verify that it's following the design.

Suggested testing:
* Pull, start the server, and try each scenario to see if the UX is reasonable.

@sophia2901 could you try this out for manual verification?
@rtibbles could you review the code?