Bug fixed for looking up userid fail

Change retrieving "userid" from quiz_attempts table to the global
variable $USER