indexes for tables
remove debugging code
change getcoursemodule to context_instance
changing report directory to tempdir
adding sesskey for ajax request