What are Replace Strings?
Replace strings are a specific set of variable names enclosed in curly braces {} that are automatically replaced by the corresponding variable values. Replace strings are used in D2L Brightspace tools that support rich-text (i.e. the HTML Editor).
- Where the replace strings can be used, the replace string is evaluated each time the item containing the replace string is accessed.
- However, replace strings are not available in all tools in D2L Brightspace. Where the replace strings are not available, curly braces are stripped even if the string is a valid variable, or a replace string does not populate as expected.
Where Replace Strings are not available
Replace string are not available in all tools, even where the HTML Editor exists. For the following tools, the replace string feature is not available.
Email
Replace strings, including {FirstName}, cannot be used when sending a direct email from the Email tool, the Classlist tool, or emailing from other course tools (such as grades or assignments).
Content
Replace strings cannot be used in Content HTML file topics. When we create a HTML topic file, the curly braces are stripped even if the string is valid. At that point, there is no record of a replacement string having been entered.
Where Replace Strings can be used
The following replace strings can be used in many areas within a D2L Brightspace course.
Replace String
|
Example
|
{OrgName}
|
Minnesota State
|
{OrgUnitName}
|
Fa23 CSS 100 Intro to IS
|
{FirstName}
|
Jane
|
{LastName}
|
Doe
|
In these areas within a D2L Brightspace course, you can use the above replace strings.
- Announcements in the Headline and Content fields.
- Assignments in the Instructions and Feedback fields for assignment folders.
- Checklists in the Name and Description fields for checklists, categories, and items.
- Content in the module or topic Description fields. Important: Avoid using replace strings in content HTML Topic pages as they either (1) are stripped upon saving the topic, or (2) do not populate the expected text!
- Discussions in the Name and Description fields for a forum or topic.
- Grades in the Feedback field for a grade item.
- Groups in the Description field for a category or group.
- Instant Messages when messaging an individual user.
- Intelligent Agents in the Subject and Message fields.
- Links in the Title and Description fields.
- Quizzes in the Feedback fields.
Using Replace Strings for Personalization
First Name replace string – {FirstName}
What is displayed?
- The first name of the user (i.e. the name of the current user viewing the item)
- Example: Dakota for Dakota Begay
Last Name replace string – {LastName}
What is displayed?
- The last name of the user (i.e. the name of the current user viewing the item)
- Example: Begay for Dakota Begay
Replace Strings in Intelligent Agent emails
What about replace strings in intelligent agents? The following replace strings can only be used within an intelligent agent email, specifically the To, CC, and Bcc fields.
Replace Strings:
To, Cc, Bcc fields
|
Sample
|
{InitiatingUser}
*This replace string replaces with the individual's email address
|
Lee.Park@minnstate.edu
|
{InitiatingUserAuditor}
*We do not recommend using this replace string, since it will not send emails to students or the instructor!
|
N/A
|
In an intelligent agent email message or subject fields, you can use these replace strings.
Replace String:
Message or Subject fields
|
What is it?
|
Sample
|
{OrgName}
|
The school’s name for the D2L Brightspace site
|
Minnesota State
|
{OrgUnitName}
|
The name of the D2L Brightspace course
|
Intro to IT for IT Majors
|
{OrgUnitCode}
|
The course offering code for the D2L Brightspace course
|
20183000123
|
{OrgUnitStartDate}
|
The D2L Brightspace course start date
|
August 22, 2025
|
{OrgUnitEndDate}
|
The D2L Brightspace course end date
|
December 12, 2025
|
{OrgUnitId}
|
The identification number for the course, often referred to as the OU number
|
1234567
|
{InitiatingUserFirstName}
*This replace string can only be used in intelligent agent emails
|
First name of the user
|
Lee
|
{InitiatingUserLastName}
*This replace string can only be used in intelligent agent emails
|
Last name of the user
|
Park
|
{InitiatingUserUserName}
*This replace string can only be used in intelligent agent emails
|
The user's login username; what the user enters to log in to the site.
|
ab1234cd
|
{InitiatingUserOrgDefinedId}
*This replace string can only be used in intelligent agent emails
|
ID # of the user used internally by the system.
|
01234567
|
{LoginPath}
|
The URL of the campus D2L Brightspace site
|
https://mnsite.learn.minnstate.edu
|
{LastCourseAccessDate}
|
The date the user last accessed the course. It may list “never” is the user has not accessed the course.
|
Tuesday, September 20, 2025 9:39 AM CDT or Never
|
{LastLoginDate}
|
The date the user last logged in to the school’s D2L Brightspace site, not specific to a course. It may list “never” is the user has not accessed the site.
|
Thursday, October 30, 2025 4:14 PM CDT or Never
|