Update use_stats/locallib.php

Error accessing to the scorm tables. 
Merge pull request #2 from jcmg/patch-1

Update use_stats/locallib.php fixing scorm access to DB with Moodle 2 syntax + Course module reference