I tried but its not working. When i alert the php variable in js it is giving null value. I am using 2nd option of DOM
General developer forum
How to get user id of current user in moodle?
This discussion has been locked so you can no longer reply to it.