Cobra Learning - Custom Widgets
Creating and editing custom widgets
Shared widgets appear on the Custom Widgets tab in the Widgets tool and they are distinguishable by a Shared Widget icon. They are available to add to your course homepage, but you cannot modify their content. You can only modify the content for custom widgets that are created within your course offering.
- Create a custom widget
- Edit a custom widget
- Properties
- Content
- Release conditions
- Replace strings
- Editing Widget Display
Create a custom widget
- On the Course Home page, click Course Admin, then click Widgets.
- Click Create Widget.
- Enter a Name and Description for the widget.
- To add your own HTML content to the widget using the HTML source editor, click the Content tab, then the Edit HTML Source icon. Add your HTML custom code.
- To apply different styling options to the widget, click Customize Widget Style.
Note: To help you meet visual accessibility standards, there is a built-in WCAG (Web Content Accessibility Guideline) checker on the Widget Settings page. Be aware that if you choose a shade that does not meet these guidelines (for example, the contrast between the text color and the background color is too low), the check mark by WCAG AA will be replaced by a warning or error icon to alert you to possible accessibility issues.
- Click Save and Close.
Edit a custom widget
- On the Course Home page, click Course Admin, then click Widgets.
- Click the Edit icon beside the widget you want to edit.
- Make your changes and click Save and Close.
Properties
The Properties tab allows you to define or change the widget name, description, and sharing settings (only available at the organization level).
Content
The Content tab allows you to add your own custom HTML (with the exception of ASP) code and incorporate your organization or course’s specific colors, and logos when creating widgets.
Use the default content window of the HTML Editor to add content to your widget and click the Edit HTML Source icon in the bottom left corner to add HTML custom code.
Add HTML custom code
- In the Content tab on the Edit Widget page, click the Edit HTML Source icon in the bottom left corner of the HTML Editor to open the HTML Source Editor.
- Add your HTML custom code. For example, the following HTML custom code can be used to create a YouTube solar car video feed using a “solar car” tag:
<iframe height="350" width="265" frameborder="0" src="http://www.youtube.com/videos_list?tag=solar car" marginheight="0" marginwidth="0" name="videos_list" id="videos_list"></iframe>
- Click Update.
- Click Customize Widget Style to apply different styling options to the widget. See Editing widget display.
Note: To help you meet visual accessibility standards, there is a built-in WCAG (Web Content Accessibility Guideline) checker on the Widget Settings page. Be aware that if you choose a shade that does not meet these guidelines (for example, the contrast between the text color and the background color is too low), the check mark by WCAG AA will be replaced by a warning or error icon to alert you to possible accessibility issues.
- Click Save and Close.
Release conditions
The Release Conditions tab allows you to define a set of criteria that must be fulfilled (e.g. a user must be enrolled in the current org unit as a specific role). If a user doesn't meet the set release conditions they won’t see this widget on their homepage. For example, you could create a widget with links visible only to instructors.
The conditions most likely to apply to widgets are as follows:
- Group Enrollment Users must belong to the selected group to see the widgets associated with the condition.
- Org Unit Enrollment Users must belong to the selected org unit to see the widgets associated with the condition.
- Section Enrollment Users must belong to the selected section within your course to see the widgets associated with the condition.
- Role in Current Org Unit Users must be enrolled in your course as a certain role to see the widgets associated with the condition.
Replace strings
Replace strings allow you to use dynamic fields in HTML content that display applicable information based on the user and org unit. They are available when you create widgets and other HTML content using the HTML Editor.
Current Org Unit {OrgUnitId}, {OrgUnitName}, {OrgUnitCode}, {OrgUnitTypeID}
Organization {OrgId}, {OrgName}
Current user {UserId}, {UserName}, {OrgDefinedId}, {FirstName}, {LastName}, {Email}
User’s role in current org unit {RoleId}, {RoleCode}
Editing widget display
You can customize the following aspects of system or custom widgets for your homepages:
- Display a title (or not)
- Display widget container style (or not)
- Prohibit minimizing the widget
- Create a custom name for the title
A custom widget with a hidden title, no widget container, and no minimizing prohibition.
A custom widget with a CUSTOM title, a visible widget container, and minimizing prohibition.
Access widget display settings
Do one of the following:
- On a homepage, click Style this widget from a widget menu.
- While editing a homepage, click on a widget in the Widgets area.
- If you want to customize the default display of a widget instead of its display on a specific homepage, access the widget from the Widgets tool. Click Customize [widget name] beside the widget you want to style.
Note Widgets shared down from parent org units will retain the style from that level. Customizing a widget from the widget tool does not override the parent org style; instead it creates an additional override at the homepage level.
Edit widget display
To | Do this |
---|---|
Hide the title | Clear the Display a Title check box |
Display widget container | Select the Display widget container style check box |
Prevent users from closing the widget on the homepage | Select the Prohibit minimizing widget check box |
Set a custom title | Select the Custom radio button, and enter your text in the field |
Note To help you meet visual accessibility standards, there is a built-in WCAG (Web Content Accessibility Guideline) checker on the Widget Settings page. Be aware that if you choose a shade that does not meet these guidelines (for example, the contrast between the text color and the background color is too low), the check mark by WCAG AA will be replaced by a warning or error icon to alert you to possible accessibility issues.