Getting Variables from LMS using JavaScript
May 01, 2015
Hello,
Can anyone check my file and tell me if there is any bug. What am trying to do is to get info like name and email id from Moodle into the file that am building. Am able to get name using "FullName" variable in my file. But am not able to get email id. Whats happening here is when i type "StuID" into javascript, it automatically changes to "StuId" when saved. Thus am not able to get the email id value from Moodle. My question is why does it automatically change in JavaScript.
So now once i publish the file, i go to user.js file and change the script manually and upload in Moodle and it works perfectly. Can someone tell me what is the way to overcome this problem.
2 Replies
I have seen this happen when I have typed it incorrect once and the closed the trigger opened it back up and tried to edit it. I find the easy way is to retype the whole thing
Hi Phil, your idea worked. Thank you so much.
This discussion is closed. You can start a new discussion or contact Articulate Support.