Search code examples
urlquery-stringdesire2learn

putting userid (or username) in url as querystring in Desire2Learn


I need to put a link in D2L to an external website. When the user click the link, his username should be included in the url, something like: www.abc.com/index.aspx?username=user1

Is there any parameter that can allow me do that easily? Like: index.aspx?username={userid}

Thanks!


Solution

  • I believe that the user name of the currently-logged-in user is one of the replacement strings that you can use in links placed in the LMS' UI. However, replacement strings do not get processed in all the places you could put a link in the LMS: for example, if you write a link into a discussion thread post or the like, I'm not sure that a replacement string used there would get expanded.

    If you search on the web for "Desire2Learn replacement strings", you'll find a variety of pages hosted by various educational institutions that document a list of replacement strings that might work for you (in fact, {UserName} seems to be the one you want).

    You should be aware thought that when you use a replacement string in an outbound URL that sends the information in the clear through the network: you may want to do this with caution, for privacy/security reasons.