Help
Course Variables

Variables provide another way to simply and uniquely customize each user's learning experience. Take a few minutes to learn the basics of variables and you'll be able to add a personal touch to each of your courses. Within your content you can specify homemade variable names, or use the pre-defined variables listed below. At run-time, BrainHoney replaces the variables with appropriate values. You can optionally specify an encoding (HTML, URL, or Javascript) for the substituted value, or no encoding (PLAIN). The default encoding for BrainHoney-defined variables is HTML. The default encoding for variables you define is PLAIN. Define variables with this syntax:

$<Variable Name>[^(HTML|URL|JS|PLAIN)]$

For example, this snippet uses the current user's username and user ID:

<html>
Welcome $USER$, to this course! Click
<a href="http://www.sample.com/pay.aspx?id=$USERID^URL$">here</a>
to purchase!
</html>

You can use any of BrainHoney's pre-defined variables, which are listed below, or you can define your own variables on a couse, section, or domain. You define course or section variables, use the Course/Section Settings editor. You define domain variables in BrainHoney's domain customization editor. (See Customizing a Domain for more details.)

BrainHoney searches for variables in the following order, using the value from the first encountered source: 1) pre-defined variables, 2) section variables 3) course variables 4) domain variables.

Pre-defined Variables
NameMeaning
DOMAINIDThe ID of the current user's domain
DOMAINNAMEThe current user's domain name
USERIDThe current user's ID. This ID is unique only within the Userspace; i.e., the USERSPACE/USERID value uniquely identifies a user in BrainHoney
USERNAMEThe current user's username. This name is unique only within the userspace.
USERSPACEThe current user's userspace. The USERSPACE/USERNAME or USERSPACE/USERID combination uniquely identifies a user.
USERThe current user's full display name
USERDISPLAYSame as USER
USERFIRSTThe current user's first name
USERLASTThe current user's last name
USERREFERENCEThe current user's external ID
ENROLLMENTIDThe current user's enrollment ID for the content they are viewing
ENROLLMENTFIRSTFirst name of the current enrollment user
ENROLLMENTLASTLast name of the current enrollment user
ENROLLMENTREFERENCEThe external ID of the current enrollment
ENROLLMENTUSERFull name (first and last name) of the current enrollment user
ENROLLMENTUSERNAMEUsername of the current enrollment user
ENROLLMENTUSERREFERENCEExternal ID of the current enrollment user
COURSEIDThe ID of the course the current user is viewing
COURSENAMEThe name of the course the current user is viewing
COURSEREFERENCEThe external ID of the course the current user is viewing
SECTIONIDThe ID of the section the current user is viewing
SECTIONNAMEThe name of the section the current user is viewing
SECTIONREFERENCEThe external ID of the section the current user is viewing
ITEMIDThe ID of the item that the current user is viewing
ITEMNAMEThe item's title that the current user is viewing
See Also
Customizing a Domain