Explore the community Forums Lectora Lectora Questions & Answers Submitting Test Results to Google Drive – Accessing student name variable?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #415812 Score: 0
    Profile photo of Cam Phillips
    Cam Phillips
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    15 pts
    @_

    Hi All,

    When submitting test results to Google Drive, students are asked to provide their name at the beginning of the test – from what I can gather from the published HTML this is saved to the TrivantisUserName variable.

    Does anybody know how I’m able to access this variable, to carry the name through for certificate generation? Currently I’m asking for their name twice which isn’t great from a UX perspective.

    I’ve tried the following to no avail:

    • VAR(TrivantisUserName)
    • VAR(username)
    • VAR(AICC_Student_Name)

    Cheers,

    Cam

    #415838 Score: 0
    Profile photo of Adam Cain
    Adam Cain
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    Group Member
    curious george
    contributor
    15 pts
    @cainam

    I’m not sure those are going to work when published to HTML vs SCORM or AICC which get the name from the LMS the course is launched from.  (I’m not positive if all 3 you list are reserved for that, or maybe just the last 2)

    I’m not sure I understand why you would ask for the name twice though even outside of that – if the first time you ask for the name, you are storing that via an Entry Field (from the Test & Survey tab), then you should be able to call up that same Field variable up when printing out the certificate.  e.g. you insert an Entry field with name: Entry_1, with associated variable name of: Entry_0001 (which would be the default), and then you call that same variable up in the certificate (change contents action to replace a regular text field with the variable data).

    So reading back – how are you asking students to provide their name at the beginning of the test?

    #415874 Score: 0
    Profile photo of Cam Phillips
    Cam Phillips
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    15 pts
    @_

    Hi Adam,

    The name prompt that appears at the beginning of the test when both “Custom Results Submission (to Google Drive)” and “Prompt for Student’s Name” are both enabled (see attached screenshot).

    So they enter their name at the beginning of the test, and this is stored in the TrivantisUserName variable (as opposed to an Entry_0001 or similar). Upon passing the test their name and results are uploaded to Google Drive.

    Once they’ve passed, they’re directed to generate a certificate – my issue is that I need to prompt for their name again, as I can’t seem to access the data stored in TrivantisUserName to reuse it! I could disable “Prompt for Student’s Name” but then the associated entry in Google Drive would be nameless. We are indeed deploying to HTML so AICC_Student_Name would be no good, as you mentioned.

    I did find another question about this on the forums but no replies: https://community.trivantis.com/forums/topic/google-drive-prompt-for-student-name-variable/

     

    Attachments:
    #415879 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    279 pts
    @timk

    I tested this successfully in Lectora 17.0.6:

    On: Show
    Action: Run javascript
    Javascript:
    Varmyusername.set(userName);

    Of course you need a variable called “myusername” and use it in a Lectora action.

    This post has received 1 vote up.
    #415916 Score: 0
    Profile photo of Adam Cain
    Adam Cain
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    Group Member
    curious george
    contributor
    15 pts
    @cainam

    I’ve used the form submission to Google docs before – never used the test results, and requiring student name.  If you can’t access that variable later, maybe just don’t use that checkbox, and require your own entry for student name that you know you can call up later.   Maybe just make that the first question in your test – a fill-in-the-blank question for student name that you can then call up later for the certificate?

    #415944 Score: 0
    Profile photo of Cam Phillips
    Cam Phillips
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    15 pts
    @_

    @timk Thank you Tim!

    This approach worked – I’m now able to store the name in a custom variable to re-use as many times as I like.

    Would be great if the Custom Results Submission feature gave a bit more visibility into name and score submission but this works really nicely for my needs.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.