Google Drive - Prompt for Student Name - Variable

mcofield_08 Community Member Posts: 16

When outside an LMS and submitting to a Google Drive Doc, the prompt “Prompt for Student Name”  captures the students name to a variable (debugging says variable name is TrivantisUserName). Does anyone know a way to retrieve this value to use elsewhere, say on a certificate page, as it doesn’t seem to be an accessible variable from any method I’ve tried.





  • wheels
    wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 665 eLearning ROCKSTAR Admin Team
    This is a tricky one because we do not expose it well...

    You would need to do the following in JavaScript to get the value back into a user defined variable:

    Var<strong>MyUserVar</strong>.set(readVariable('TrivantisUserName', '', null, '<strong><replace with title name></strong>'));

    Notice the Var prefix on your variable, this is shown also in the variable manager as the JavaScript name.

    For the "replace with title name" you can look at one of the published html files to see what is being written out for your course. You should see something like this:

    var VarTriMuteAllFLV = new Variable( 'VarTriMuteAllFLV', '', 0, 0, null, null, 'mytitlename.html'  );

    Where mytitlename.html would be what replaces <replace with title name> above.

    Sorry this is not easier, I am writing an issue to make this variable available.

    - Joe