fixed problem where course/lib.php was not univerally loaded