Solved ordering bug
made filter criteria configurable in config.inc.php
added grade in filteirng criteria
corrected bug in export.php