What are replace strings? How do I use them?

About Replace Strings

Replace strings are special bits of text that D2L recognizes and automatically replaces with information. The automatic replacement happens not when you enter and save content that includes a replace string, but later, when the content is used---viewed by, or emailed out to, someone.

Each replace string is a word, or a short series of words, wrapped in braces.

Available Replace Strings

Tool-independent Replace Strings

These replace strings work throughout the D2L system, in almost every text area, in almost every tool.

One major exception is email. Replace strings do not work in email messages sent from D2L, except for messages sent by the Intelligent Agent tool.

Enter these replace strings into a text field or box inside D2L. Then, later, when someone views that D2L item, D2L will replace the strings with the appropriate information about that viewer.

Replace String

Description

Example

{FirstName}

first name

John

{LastName}

last name

Stoddard

{UserName}

D2L username

jstoddard

{ExternalEmail}

email address

John.Stoddard@millersville.edu

Like the user-related replace strings above, D2L automatically replaces these strings with information about person who views the item that contains the strings. In the case of these strings though, the information all relates to the viewer's role.

If you use these strings in an item within a D2L course, D2L will replace the strings with the viewer's role within that specific course. For example, someone who is a staff member at Millersville University, but a student in your course, will see {RoleName} replaced by "Student" (her or his course-level role) not "Instructor" (her or his university-level role).

Replace String

Description

Example

{RoleName}

the D2L role of the user who views the item containing the string

Student

D2L automatically replaces these strings with information about the course in which you use the replace strings.

If you happen to be working within a template or a department rather than a course, these strings will work there too, because technically, they are org unit-related replace strings.

Replace String

Description

Example

{OrgUnitName}

name of the course

ENGL110.01 English Composition

{OrgUnitCode}internal identifier of course2012301234

D2L automatically replaces these strings with information about the university.

Replace String

Description

Example

{OrgName}

name of university

Millersville University of Pennsylvania

Intelligent Agent Replace Strings

In intelligent agents, you can use all the replace strings above, plus these special replace strings that are just for intelligent agents. These replace strings will not work in other tools.

Replace String

Description

Example

{InitiatingUser}

person who performed the triggering action

 

{InitiatingUserFirstName}

first name of person who performed the triggering action

James

{InitiatingUserLastName}

last name of person who performed the triggering action

Wickersham

{InitiatingUserUsername}

D2L username of person who performed the triggering action

jwickersham

{LoginPath}

web address for D2L

https://millersville.desire2learn.com/


Help Desk

Help Desk Contact Info

717-871-7777

Location: Boyer Building

Email: help@millersville.edu

Classroom Hotline: 717-871-7280

After Hours D2L Help: 877-325-7778

Hours:
Call Center/Technical Assistance Center

  • Fall/Spring Semesters:
    • M-TH 8AM - 7PM EST, F 8AM - 5PM EST
  • Winter/Summer Sessions:
    • M-F 8AM - 4PM EST

By Appointment - book an appointment

Technical Operations (Audio/Video/Lighting/Electronic Support for University Campus functions): 717-871-7689

Search D2L Resources