Explore the community Forums Lectora Lectora Questions & Answers Student's First Name as variable

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #344700 Score: 0
    Profile photo of Jennifer Mohr
    Jennifer Mohr
    Member
    beginner
    intermediate
    friend finder
    picture perfect
    profile
    curious george
    wise owl
    contributor
    LUC17 Attendee
    @jmohr4076

    Hello!

    I’m seeking assistance with including only the student’s first name as a variable.  Lectora is set up to display the student’s name as Doe, Jane when using the already created student name variable.  I’m wanting to have text appear within the Lectora project that says “Dear Jane,” instead.  Has anyone found a way to do this?

    #344705 Score: 0
    Profile photo of Dana Musser
    Dana Musser
    Member
    beginner
    intermediate
    junior moderator
    contributor
    friend finder
    LUC16 Attendee
    curious george
    wise owl
    5 pts
    @danam

    That all depends on how you are retrieving the name of the student.
    If your LMS separates the names like CourseMill, it is a no-brainer. ACTION: ON SHOW CHANGE CONTENTS TEXT BOX 2 VARIABLE = <#USER_FIRSTNAME#>
    If it is hosted with a different LMS you may have to research how they handle it.
    If these are not options I would look for a script person in the community to help to get rid of the “Doe,”.

    #344722 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    204 pts
    @timk
    #344845 Score: 0
    Profile photo of Jennifer Mohr
    Jennifer Mohr
    Member
    beginner
    intermediate
    friend finder
    picture perfect
    profile
    curious george
    wise owl
    contributor
    LUC17 Attendee
    @jmohr4076

    Thank you! We do host on CourseMill, and I can use that variable in the CourseMill notifications, but it can’t be used in Lectora. 🙁

    • This reply was modified 5 months, 2 weeks ago by Profile photo of Jennifer Mohr Jennifer Mohr.
    #349325 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    67 pts
    @mnotermans5114

    It might be a bit overcomplicated… mostly due to i already have this setup for more then just getting the first name… but well it works..and maybe its of use for you..

    Action in Lectora: Run Javascript -> Javascript: getUserData(Varuser_name.getValue());
    ** this Lectora action calls a function that passes the usersname to Javascript **

    In the external JS file i then have:

    var dataFromLectora;
    var tempArray;
    var firstNameUser;

    function getUserData(_username){
    dataFromLectora = _username;
    pushnewData();
    }

    function pushnewData(){ // this function splits the data received into an array

    tempArray = dataFromLectora.split(“,”);
    firstNameUser = tempArray[1].toLowerCase(); //getting the first name of the user

    }

     

    #349404 Score: 0
    Profile photo of Jennifer Mohr
    Jennifer Mohr
    Member
    beginner
    intermediate
    friend finder
    picture perfect
    profile
    curious george
    wise owl
    contributor
    LUC17 Attendee
    @jmohr4076

    Thank you!

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

You must be logged in to reply to this topic.