Forum Discussion
XavierToyos
5 months agoCommunity Member
Problems with a javascript
Hello everyone. There are two things happening to me in the same project and I wanted to share it with you in case someone has encountered the same problem and, most import...
KarlManning-f1e
5 months agoCommunity Member
Hi,
If it's not separating the names, it might be because of this line
var array = myName.split(',');
You may have names separated by a space or other piece of punctuation, not a comma.
Also within Moodle, you may be storing the names in the reverse order.
Add
var myName = lmsAPI.GetStudentName();
alert(myName);
to see what the actual value is you are getting from Moodle.
Karl