System administrators can use Homepage Widget Expansion Pack (HWEP) configuration variables to manage the behavior of each system widget included in the pack.
These variables follow the format:
d2l.Custom.LCSWidgets.[WidgetName].ContextOverride
This format lets you update contextual information, such as role definitions, directly through the configuration variable. It replaces the need to edit custom widget code.
The Learner Awards, Multi-Profile, Slim Announcements, and Welcome Window widgets use this variable to connect widget permissions to system roles through a JavaScript string. Other HWEP widgets also include the variable, but they do not currently make use of it.
This page provides a list of the available configuration variables for Homepage Widgets. Select a widget name below to view its details.
Widget Configuration Variables
Awards Leaderboard Widget
Variable: d2l.Custom.LCSWidgets.AwardsLeaderboard.ForceSortBy
Type: Org
Default Value: NotSet
Description: Overrides the widget's configuration settings at the course level for all instances of the Awards Leaderboard widget across the organization.
This variable offers three options: Awards, Credits, and NotSet.
- NotSet: Course-level sorting preferences remain unchanged.
- Awards or Credits: Override all course-level settings, and disable the Sort by option in the widget’s Customize this widget dialog.
Example Values: NotSet, Awards, Credits
Variable: d2l.Custom.LCSWidgets.AwardsLeaderboard.MaskUsernames
Type: Org
Default Value: Off
Description: Masks the usernames and profile images of learners in the Awards Leaderboard widget across all instances of the widget within the organization.
Note: Users with the Awards Leaderboard > See Masked User Details permission can still view user details. Learners always see their own name and profile image, even when masking is enabled.
Example Values: Off, On
Content Navigator Widget
Variable:d2l.Custom.LCSWidgets.ContentNavigator.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Content Navigator Widget.
Example Value: Currently not in use
Learner Awards Widget
Variable: d2l.Custom.LCSWidgets.LearnerAwards.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Learner Awards Widget.
Note: Roles listed in the “learner” array are treated as learners. Hidden awards remain hidden until earned.
Example Value: var roleDefinitions = { "learner": [ "Role1", "Role2" ] };
Photo Banner Widget
Variable: d2l.Custom.LCSWidgets.PhotoBanner.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Photo Banner Widget.
Example Value: Currently not in use
Multi-Profile Widget
Variable: d2l.Custom.LCSWidgets.Profiles.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Multi-Profile Widget.
Roles in the “administrator” array have full configuration access. Roles in the “instructor” array can only update user settings.
Example Value: var roleDefinitions = { "administrator": [ "Role1", "Role2" ], "instructor": [ "Role1", "Role2" ] };
Single Profile Card Widget
Variable: d2l.Custom.LCSWidgets.SingleProfile.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Single Profile Widget.
Example Value: Currently not in use
Slim Announcements Widget
Variable: d2l.Custom.LCSWidgets.SlimAnnouncements.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Slim Announcements Widget. Roles in the “moderator” array can create new announcements.
Example Value: var roleDefinitions = { "moderator": [ "Role1", "Role2" ] };
Visual Table of Contents Widget
Variable: d2l.Custom.LCSWidgets.VisualTOC.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Visual Table of Contents Widget.
Example Value: Currently not in use
Welcome Widget
Variable: d2l.Custom.LCSWidgets.WelcomeWindow.ContextOverride
Type: Org
Default Value: null
Description: Override the context for the Welcome Widget.
Roles in the “editor” array are editors of the widget. Editors can view default content and configure setup.
Example Value: var roleDefinitions = { "editor": ["Role1", "Role2" ] };