Say 👋 hello to BusyBee, your AI-powered learning & teaching companion for Buzz. Learn more!

Teacher

How do I use replacement variables?

  • Updated:
    info
    Created:

What are replacement variables?

Replacement variables provide another way to simply and uniquely personalize each user's learning experience. Place variable codes in your content, and Buzz automatically replaces the variables with dynamic values drawn from user, course, and/or domain information.

Example

Buzz allows you to use variables in the content that appears on an activity folder's landing page. This example uses the $USERFIRST$ code, allowing the teacher to address each student by first name, and the $COURSENAME$ code, which means that they can change the name of the course without having to edit this folder's landing content.

What are replacement variables?

Now, this is what Wanda sees when she opens that activity folder.

Where can I use replacement variables?

Currently, you can use variables in the following locations:

Predefined domain-wide replacement variables

This table outlines the predefined variable codes that are available in all Buzz domains. Simply set the variable code between dollar signs ($) to activate the variable, like this: $VARIABLECODE$.

Name Value
DOMAINID The ID of the current user's domain
DOMAINNAME The current user's domain name
USERID The current user's ID. This ID is unique only within the Userspace; i.e., the USERSPACE/USERID value uniquely identifies a user in Buzz
USERNAME The current user's username. This name is unique only within the userspace.
USERSPACE The current user's userspace. The USERSPACE/USERNAME or USERSPACE/USERID combination uniquely identifies a user.
USER The current user's full display name
USERDISPLAY Same as USER
USERFIRST The current user's first name
USERLAST The current user's last name
USERREFERENCE The current user's external ID
ENROLLMENTID The current user's enrollment ID for the content they are viewing
ENROLLMENTFIRST First name of the current enrollment user
ENROLLMENTLAST Last name of the current enrollment user
ENROLLMENTREFERENCE The external ID of the current enrollment
ENROLLMENTUSER Full name (first and last name) of the current enrollment user
ENROLLMENTUSERNAME Username of the current enrollment user
ENROLLMENTUSERREFERENCE External ID of the current enrollment user
COURSEID The ID of the course the current user is viewing
COURSENAME The name of the course the current user is viewing
COURSEREFERENCE The external ID of the course the current user is viewing
ITEMID The ID of the item that the current user is viewing
ITEMNAME The item's title that the current user is viewing

How do I create my own replacement variables?

You can also create replacement variables for your own course:

  1. Open Course settings from the Editor toolbar and click Add variable on the Variables card.
  2. Provide:
    • The variable Name, which is the variable code that you enter to be replaced (e.g., SECTIONNUMBER).
    • The variable Value, which is the value you want the code to be replaced by (e.g., Section 5).
  3. Click Done and Save.
How do I create my own replacement variables?

Once you've created a course-specific replacement variable, you use it by placing it between dollar signs ($) just like you do with the other variable codes (e.g., $SECTIONNUMBER$).

forum

Have a question or feedback? Let us know over in Discussions!