Impossible to analyze the first user name of variable LMS

Hi all

I'm looking to use the LMS username as a variable in my class.

I used the following link to get the value of the variable: display name of your LMS using Adobe Captivate to the 6.x - CaptivateDev.com student

I pasted the following in my action SlideEnter javascript code...

The PROBLEM is it shows Lastname Lastname.

I want just the name of the user.

Thoughts?

------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ --------------------------------------

/* Calling a self-invoked function to not pollute the global scope and immediately destroy the scope chain */

(function(){

    /* Initialize JS Variable to hold the student name */

    varsName='';

    /* Obtain the student name from the LMS and put it into a JavaScript variable called sName */

    if(typeofwindow.GetStudentName==='undefined'){

        sName='Name Not Found';

    } else{

        sName=GetStudentName();

        if(sName==''){

            sName='Name Not Found';

        } else{

            /* Uncomment the below line to show the name in 'First Last' format */

            sName=sName.split(', ')[1] + ' ' + sName.split(', ')[0];

        }

    }

    /* Check for HTML5 vs. SWF output */

    if(typeofwindow.cp==='undefined') {

        /* We have SWF output, so Get the Captivate Object */

        varobjCp=document.getElementById('Captivate');

        /* Set the studentName Captivate User variable with the JavaScript variabe, sName */

        if(objCp && objCp.cpEISetValue){

            objCp.cpEISetValue('m_VarHandle.studentName', sName);

        }

    } else{

        /* We have HTML5 output */

        if(cp.vm && cp.vm.setVariableValue){

            cp.vm.setVariableValue('studentName', sName);

        }

    }

})();

------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ --------------------------------------

Details: Captivate 8

LMS appears under the name form, first of all.

Figured out how to change the line of javascript in question.

Normally the StudentName is listed as: name, first name

To JUST display the first name use this-->sName=sName.split(', ')[1]

Tags: Adobe Captivate

Similar Questions

  • Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    My main.js resembles

    xmlDataSource var = {}
     
    URL: 'dcds. - symbianxml.aspx", etc. (sample).
     
    init: function() {}
    URL, successful reminder, the reminder of failure
    This.Connect (this.) (URL, this.responseHandler, this.failureHandler);
    },
     
    /**
    * Analyzes the XML document in an array of JS objects
    @param xmlDoc XML Document
    * @returns {table} array of objects of the device
    */
    parseResponse: {function (xmlDoc)}
        
    var chElements = xmlDoc.getElementsByTagName ("channel");
       
    channels of var = [];
      
    Console.log (chElements.Length);
      
    for (var i = 0; i)< chelements.length;="">
        
    var channel = {};
       
    for (var j = 0; j)< chelements[i].childnodes.length;="">
        
    var node = Sublst.ChildNodes(1).ChildNodes(0) chElements [i] [j];
                
    If (node.nodeType! = 1) {//not an element node}
    continue;
    }
           
    Channel [node. TagName] = node.textContent;
    }
       
    Channels.push (Channel);
    }
    Console.log (Channels.Length);
    return the strings;
    },
     
    /**
    Manages the response and displays the data from device web app
    @param xmlDoc
    */
    responseHandler: {function (xmlDoc)}
      
    var channel = this.parseResponse (xmlDoc);
    var markup = "";
       
    for (i = 0; i< channels.length;="">
       
    markup += this.generateHTMLMarkup (i, channels [i]);
    }
    document.getElementById("accordian").innerHTML = mark-up;
    },
     
    /**
    Generates HTML tags to insert in to the DOM Web App.
    * @index i, index of the device
    @param device, device object
    */
    /*
    generateHTMLMarkup: function (i, channel) {}
      
    var str ="";
    "Str += '.


    ' onclick =-"mwl.setGroupTarget ('#accordian ',' #items_" + i + "', 'ui-show ',' ui - hide');" + ".
    "mwl.setGroupTarget ('#accordian ',' item_title_ #" + i + "', 'ui-open', 'ui-farm'); Returns false; \ » > » ;
    "" Str += "" + channel ['name'] + ' ";
    "Str += '.
    ";
    "Str += '.
    ";
    "Str += '.
    "+" id: "+ channel ['id'] +" ' "
    ";
    "Str += '.
    "+" type: "+ channel ['type'] +" ' "
    ";
    "Str += '.
    "+" language: "+ channel ['language'] +" ' "
    ";
    "Str += '.
    «+ "bandwidth:" + "fast" channel + "»»
    ";
    "Str += '.
    "+" cellnapid: "+ channel ["cellnapid"] +". "
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
    "Str += '.
    ";
    return str;
    },*/
    generateHTMLMarkup: function (i, channel) {}
       
    var str ="";
    "Str += '.
    ";
    str +=  "" +
    "" + channel ['name'] + ""+""
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
         
    return str;

    },
     
    failureHandler: {function (reason)}
    document.getElementById("accordian").innerHTML = "could not get XML document.
    '+ reason;
    },
     
    /**
    Retrieves a resource XML in the given URL using XMLHttpRequest.
    @param url URL of the XML resource to retrieve
    @param called successCb, in the XML resourece is recovered successfully. Retrieved XML document is passed as an argument.
    @param failCb called, if something goes wrong. Reasons, in text format, is passed as an argument.
    */

    Connect: {function (url, successCb, failCb)
      
    var XMLHTTP = new XMLHttpRequest();
      
    XMLHTTP. Open ("GET", url, true);

    xmlhttp.setRequestHeader("Accept","text/xml,application/xml");
    xmlhttp.setRequestHeader ("Cache-Control", "non-cache");
    xmlhttp.setRequestHeader ("Pragma", "non-cache" "");
      
    var that = this;
    XMLHTTP.onreadystatechange = function() {}
       
    If (xmlhttp.readyState == 4) {}
        
    If (XMLHTTP. Status == 200) {}
         
    {if (!) XMLHTTP.responseXML)}
    try {}
    If server has not responded with good an XML MIME type.
    var domParser = new DOMParser();
    var xmlDoc = domParser.parseFromString(xmlhttp.responseText,"text/xml");
           
    successCb.call (that, xmlDoc);
           
    } catch (e) {}
    failCb.call (, "answer was not in an XML format.");
    }
              
    } else {}
    successCb.call (that, xmlhttp.responseXML);
    }
    } else {}
    failCb.call (this, "connection failed: status"+ xmlhttp.status ");
    }
    }
    };
    XMLHTTP. Send();
    }
    };

    Please see the content in main.js is fully analyzed.

    Forward for the solution to my request all members of the community...

  • Why my firewall only use the domain user name and password for login and enable passwords, not a different password enable as do it my switches? RADIUS config looks the same...

    / * Style definitions * / table. MsoNormalTable {mso-style-name: "Table Normal" "; mso-knew-rowband-size: 0; mso-knew-colband-size: 0; mso-style - noshow:yes; mso-style-priority: 99; mso-style-parent:" ";" mso-padding-alt: 0 to 5.4pt 0 to 5.4pt; mso-para-margin: 0; mso-para-margin-bottom: .0001pt; mso-pagination: widow-orphan; do-size: 10.0pt; do-family: "Times New Roman", "serif" ;} "}

    Question:

    Firewalls Cisco requires that one level of password, i.e. the domain user name and password are used for logging as that to reach the global configuration mode.

    Background:

    We have several network devices Cisco, put in place who authenticate to our Windows using NPS (Windows 2008 R2) DC. Switches we have implemented the function exactly as we would wish that they need your domain user name and password to connect to the device. Then they require a separate password when you use the enable command, it is stored in Active Directory:

    Switches:

    User name:domain-username

    Password:password-field

    SWITCH >Activate

    Password:Enable-password - to-Active Directory

    SWITCH #.

    Firewalls (as they are now):

    User name:domain-username

    Password:password-field

    Firewall >enable

    Password:password-field

    FIREWALL #.

    With the firewall, however, they require your domain user name and password first and then your domain password again when you use the enable command. I want to reuse the firewall to use the level that currently switches enable password rather than the password of domain. The appearance of the current configuration as follows:

    Current configuration of the switch:

    AAA new-model

    AAA authentication login default local radius group

    AAA authentication enable default group enable RADIUS

    AAA authorization exec default local radius group

    AAA - the id of the joint session

    ACCT-port of 1645 auth-port host 192.168.0.1 Server RADIUS 1646

    Server RADIUS ports source-1645-1646

    RADIUS server key 7 1234abcd

    Current configuration of the firewall:

    RADIUS protocol AAA-server DC01

    AAA-server DC01 (outside) host 192.168.0.1

    authentication AAA ssh console LOCAL DC01

    Console to enable AAA authentication LOCAL DC01

    1234abcd keys

    Any help would be great, thanks!

    You must use GANYMEDE + instead of RADIUS for this.

    Here, you can use command sets in the results section of the policy.

  • I changed my apple ID and password user name and it changed on 3 of my devices. I have a 4th device, which still has the old user name and password and I am not able to change it. I can't restore the phone to factory settings unless I can connect.

    I changed my apple ID user name and password on 3 of my devices. I have a 4th device, which still has the old user name and password and I am not able to change it. I can't restore the phone to factory settings unless I can connect.

    OK, just to clarify: you always use the same Apple ID, but you changed its name, correct?

    If this is the case, you can go to iCloud.com or use find my iPhone app (free on the App Store) of one of your devices to remove the 4th icloud.

  • I teach online and all my classes have the same user name and password. Now that I clicked "remember me next time", I can connect only in one class. How to unlock my password. Carol in English

    I teach online and all my classes have the same user name and password. Now that I clicked "remember me next time", I can connect only in ONE class. How to unlock my login and my password, so that I can use it for all classes. Carol in English

    "Remember Me" for the site connections automatically when you return to the Web site is done with a Cookie the site in Firefox.

    Try to clear your Cookies for this Web site.

    Tools > Options-> life privacy - Cookies = the button show Cookies.

    You must use the custom settings for history at the top of this tab to see the View the Cookies button.

    Enter the domain name in the top search bar and all Cookies for this URL will be displayed. Unless you can figure out which is Cookie to "remember me", you will need to delete them all.

    Hold the {Ctrl} key while you click each Cookie in the small window. When this list is all highlighted, click the Cookie delete button at the bottom left.
    When you are finished click Close.

  • I typed the wrong user name and now it comes up in the drop-down list. How can I get rid of him?

    I typed the wrong user name and now it comes up in the drop-down list. How can I get rid of him?

    This has happened

    Each time Firefox opened

    == I typed the wrong name.

    Delete a saved here password: Firefox > Preferences > Security: passwords: "saved passwords" > "show passwords".

    See Password Manager - don't forget, delete, modify and import passwords saved in Firefox
    ---
    http://KB.mozillazine.org/Deleting_autocomplete_entries

  • Google Cloud Print setup - impossible to analyze the capabilities of the printer

    I am trying to add my CP1525nw to Google Cloud Print as a Cloud, and not as a LOCAL printer printer, however every time that I add my eprint email I get the following message. "Impossible to analyze the capabilities of the printer" - I tried for public and private use for eprint settings with no luck.

    Any help would be greatly appreciated.  I tried the reset email with no luck...

    EDIT - 01/04/11:

    I chatted with HP support, and although the representative was extremely courteous, they could not help me.  The support agent assured me that the matter would be taken at a higher level and looked so I hope that we can have a resolution here shortly.

    EDIT - 04/04/11:

    Received a response from the original HP rep that I chatted with online.  In short, it was not able to find a solution and States, that the question will be sent upwards to the highest level of technical support from HP...  We shall see.

    EDIT - 05/25/11:

    After 2 months of waiting, HP has corrected the problem.  Don't forget to upgrade to the latest firmware and check all the settings before continuing.

    The fix came from the side server - this defiinitely had nothing to do with the firmware.  I've updated on Monday for the latest on the HP website and it was still not working.   The gentlemen of tech support that helped me sent me an email a few hours after we talked, saying the sea a fix was to come.

    Nevertheless, I am happy without worrying how the fix is here!

    It took only 2 months to fix, but I'm glad it is.

  • How do I eliminate one of the two user names?

    my antivirus provider should create a username, which has double almos everything in my pc. for example, my music library has a large volume of albumns and each of them has the songs twice. How can I eliminate the last user name?

    Hi Jose,

    1. Create the same username won't double files?
    2. Who is your provider of antivirus?
    3. What exactly you're talking about when you say "create a new user name?
    4. What operating system is installed on the computer?

    This could be a virus.

    A quick way to search for viruses is to use an online, such as the Microsoft Safety Scanner scanner. The scanner is a free online service that helps you identify and remove viruses, clean your hard drive and generally to improve the performance of your computer.

    To run the Microsoft Safety Scanner:

    a. go to the page Web of the Microsoft Safety Scanner Download scan.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    b. click on Download nowand then follow the instructions on the screen.

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Please return to the State of the question.

  • Columns of folder: by default, how can return the first column 'Name' without having to move it manually every time?

    Something's happened awhile and when I create a folder which appears the first column is the column 'Date modified '. By default, how can return the first column 'Name' without having to move it manually every time?

    Hello

    I suggest you to visit these links and check if it helps:

    http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-files-and-folders#section_4

    http://Windows.Microsoft.com/en-us/Windows-Vista/folders-frequently-asked-questions

    It will be useful.

  • What is the default user name and password of the dynamically created edge NSX gateway?

    Hello

    I created a NAT device on request and as part of it, but an edge gateway. What is the default user name and password to connect to the edge device?

    Thank you

    Pankaj

    I do not know the password by default, but you can either define easily. Just go to the network security &--> NSX edges, select your edge, click actions and identification of Climate change information. You can also enable SSH from there.

  • Impossible to analyze the eve: Please help

    Impossible to analyze the day before: / applications/adobe dreamweaver 2014.1/configuration/dialogs/eve/titanoptionaldialog.eve cc

    Help, please

    Hello

    Please, try the following:

    1. Force to leave Dreamweaver so its opening.
    2. Please go to/applications/adobe dreamweaver 2014.1/configuration/dialogs/eve cc location
    3. Take backup of the titanoptionaldialog.eve file and move it to the trash. Remove it from the trash as well.
    4. Restart the DW and check if it works.

    If that don't work then please uninstall and re-install Dreamweaver (also remove preferences) and then check.

    Concerning

    Vivek

  • two devices (lifedrive, treo 755), the same user name, the best way to synchronize all these devices?

    I myself am kicking from the start, I thought that I would not continue to use my Lifedrive. I transferred all on the new Treo by using the same user name, as I had on my Lifedrive.  Now I realize that I will be staying in Central America for six months and won't put my Treo.  I won't put my Lifedrive, but must have updated information about this.  Is it possible to keep the two synchronized?

    D - Would prefer a pen, but like the convenience of the pda/phone/computer

    Thanks for your clarification.  I have now two synchronized cameras. I used the same profile that makes me nervous so use probably not two devices at the same time. I will definitely have a Treo current backup folder and synchronize the closest Lifedrive both I will use it in the Honduras.

    Again, thank you.

    D-

    Message is about: Treo 755 p (Verizon)

  • How to remove the additional user name

    When I have regestered my first choice of username was already taken. How can I remove it

    Hi beautiful,
    I appreciate that you try to delete the user name that is already taken. When you try to create a user account?

  • Delete the registered user name

    I accidentally saved a username containing an upper case letter instead of a lowercase letter. Now I can not connect. How can I correct or remove the user name?

    Hello

    Delete your personal information:

  • How to kill an Open Directory - password be reset when the first user login

    Hi all

    I've been running on this issue for some time now, however, I finally got tired of it. I want to set a password policy, but the option 'Reset password on the first login of the user' completely kills OpenDirectory.

    Running OS X Server 10.11.3 and 5.0.15, although this has happened also in versions of Yosemite. This case is a new and clean installation in a virtual machine. Only OpenDirectory and appropriate DNS are enabled. DNS was fully configured by the Server app when you set the hostname and checks in the Terminal.

    I created a few test users OpenDirectory and confirms that I can not connect with them. Can I put another option in the strategy of password very well, however, the minute I turn on 'reset the password on the first login of the user', my OpenDirectory is ruined.

    I'm unable to add new users, I am unable to change passwords, policies of previous password, I had set is no longer working. That is, the user cannot change password when you sign in for the first time. Correct password is entered, but shakes the login window when you try to configure the new password.

    Error returned once the OpenDirectory gets watered is "Mode is not supported by the node directory. Not only is the directory watered, but it becomes difficult to even remove or disable the hella service.

    Someone at - it ideas? I really want to enable this feature so that I'm not creating a temporary password for users, then relying on them to change themselves.

    Thank you

    It always seems to be the case - the diradmin account gets completely borked. Have you already found a way to define this strategy successfully?

    This command will unlock the overall strategy and restore the account, so you can use OD once again, but it's just a solution, not a solution.

    sudo pwpolicy - n /LDAPv3/ldapi://%2Fvar%2Frun%2Fldapi clearaccountpolicies

    See Doc Apple here...

    OS X Server (Yosemite): Global policies can lock the accounts of administrators - Apple Support

    I can't believe that there is a document like that but still no fix from Apple? Really? I must have missed something. I really need this password policy to work...

Maybe you are looking for

  • Copy/paste keys on the missing keyboard!

    Today, I realized that I do not see the copy and Paste buttons on the keyboard more. My iPad 1 Air run 9.3.1. Is it a bug on 9.3.1 update? did anyone get the same problem?

  • fastboot failed (write command failed)

    Yesterday, I received my motorcycle X Pure 2015 and have everything set up. The phone itself works very well. Now I want to unlock the bootloader so that I can root the phone to use the Ti backup, etc. I followed the instructions on the page of Motor

  • Caps lock flashing light

    I have a laptop hp pavilion 2237nr PC g6, and recently the caps light lock began to blink continuously. It stops for awhile but then it starts up again. my laptop seems to work fine but I am very concerned about the blinking light. Please help I am p

  • HP TouchSmart Desktop PC 300-1003, put in a new c drive and now I have to do this, please?

    HP TouchSmart 300-1003 Windows 7 Home Premium (64-bit) When I put it it shows this message. "Reboot and select proper boot device or insert boot media in selected boot device and press a key. I have no cd for her and want to download what I need to g

  • Help PLZ

    OK here it goes. First of all, when I got to the age of empires 3, it worked perfectly but then I had to uninstall it. and now im trying to reinstall but it doest work, it goes up until the auto play and then it does not work help me plz.