Make this query work in installs with different roleid numbers.

Made a mistake using our local roleid, when we really should've query the roles table for the student role, since it's not guaranteed to be the same in different moodle installs. This fixes that.