Skip to end of metadata
Go to start of metadata

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

Location: Boyer Building

Phone: 717-871-7777

Email: help@millersville.edu

Classroom Hotline: 717-871-7820

Hours:
Call Center

  • Fall/Spring Semesters:
    • M-Th 8:00am - 7:00pm EST
    • F 8:00am - 5:00pm EST
  • Summer Sessions:
    • M-F 8:00am - 4:00pm EST

Walk-in TAC

Technical Assistance Center - access via W. Frederick Street side of building

  • Fall/Spring Semesters:
    • M-Th 8:00 am - 7:00pm, F 8:00am - 5:00pm EST
  • Winter/Summer Sessions:
    • M-F 8:00am - 4:00pm EST

After Hours D2L Help

Email and Live Chat

Search D2L Resources