Setting Up LearnDash Slack
Initially configuring LearnDash – Slack requires only a few simple steps.
- Install and activate the plugin
- Navigate to LearnDash LMS – > Settings – > LMS License and activate your license key (which you can find on your purchase history page)
- Navigate to LearnDash LMS -> Settings -> Slack and follow the link in the description for the Webhook URL to where you can generate a Webhook URL from Slack
- After selecting the channel (which will only be used as the default channel and can be overridden for each Notification in LearnDash Slack), you will be shown your unique URL which you can then select and copy
- Go back to your plugin settings and paste the new Webhook URL into the Webhook URL settings field
- Click off of that field and it will flash green. Now the base configuration is complete and you can continue to Creating Notifications!
Setting up new notifications in LearnDash Slack
With LearnDash Slack it is possible to configure an unlimited number of notifications. Here’s what you need to do to set one up:
Once you’ve completed the setup process, you can click on the Add Notification button in the plugin’s settings. Then you’ll see a series of fields appear like this:
The current fields are:
- Slack trigger: Defines the trigger which results in this notification sending a message to Slack.
- Slack Webhook URL: Allows for an alternate Webhook URL to be used in special cases.
- Slack Channel: For defining the channel to send notification to. If you desire to send notifications to a specific user, use the @username syntax. Leave blank for default.
- Message: If the default message is not what you want to appear in Slack, enter a custom message here.
- Message Title: Optional custom title for the message when it appears in Slack.
- Message Pre-text: Optional text which will be prepended before the message in Slack.
- Color: Messages sent to Slack will have this color appear in a bar before the message.
- Username: Defines the name of the user that the message will appear to be from. User does not need to exist in Slack.
- Icon Emoji or Image URL: If the default image or emoji used for notifications isn’t your style, this field will allow for custom graphics to be specified.
- Identifier for this notification: Only used within the settings interface for quickly identifying which notifications are which.
- Additional fields will appear depending on the selected Slack trigger.
%timestamp%to Topic Complete and Lesson Complete Triggers
- Remove Course Point Related Merge Tags from Lesson, Topic, and Quiz Triggers where they did not do anything
- Quiz Triggers: Adds
%questions_pending_grading%Replacement Text so that any Questions pending manual Grading can have Edit Links for them added to the Slack Notification.
- Updates our Licensing and Support module to the latest version
- Show the
%course_link%merge tags for the Assignment Upload trigger
- Fixes Course Point-related Merge Tags for Expiring Courses
- Uses LearnDash’s new methods for obtaining Course Settings
- Added a checkbox below the License Key field at LearnDash LMS -> Settings -> LMS License to opt-in to Beta Releases.
- Fixes PHP error on upgrade
- Groups are now supported for any Trigger having to do with a Student (Most of the Triggers)
- The “Group” Field does not show if no Groups exist
- LearnDash Gradebook integration
- Adds itself into the Quiz Triggers, Assignment Triggers, and a new Trigger is added for adding manual grades to the Gradebook
- Requires LearnDash Gradebook v1.2.0 or higher
- Multiple Webhooks Support. You can now save multiple Webhooks URLs and assign them Names to quickly access within your Notifications via a Dropdown. This helps you keep straight which Notifications are going where if you’re using multiple Webhooks to send to a completely different Slack Team for example.
- Any previously defined Webhook URLs will be copied into the new system. Their Names will match the Notification Identifier of the first Notification that it finds using it.
- Added the ability to select multiple items from Dropdowns when making a Notification
- You can also exclude results from most of these if you choose “All”
- All the Webhook URL fields and the Timestamp Format field save automatically once you click outside of them. A little icon will appear to indicate it is saving, and it will flash green briefly once saved, similarly to how the Notifications do.
- Textarea for Notification Message now auto-expands as you type
- When editing a Notification, hitting “Back” in your Browser will ask you for confirmation. This is mostly helpful on MacBooks or other devices with swipe gestures that are easy to accidentally use.
- Support Form has been added
- Support Form is on the “LMS License” page
- Markdown now allowed within Notification pre-text and text
%points_possible%added for Assignment Triggers
- Delete Button now matches Admin Theme
- Labels in the Notification Form now show above the fields instead of below
- Fixes bug with detecting Active/Valid Notification status
- Fixed a bug where defining an alternate Webhook for a Notification would use the Default Webhook instead
- New Notification creation workflow
- All of your old Notifications are preserved
- LearnDash v2.4 support
- Course Points Merge Tags are added if LearnDash version is greater than or equal to v2.4
- Text Domain is no longer a Constant
- Ampersands don’t break Notifications if they are in any of the Message Fields
- Update Plugin Updater to Latest Version.
- Prevents a PHP Error from showing for Non-Admin Users.
- Notifications were able to cancel each other out. Now they no longer do.
- Example: A Notification for all Completed Quizzes would get canceled by a Failed Quiz Notification that wasn’t being triggered by the correct Quiz.
- Fixed an issue where Notifications would send when they weren’t supposed to.
- Example: A Notification for Failed Quizzes that was set to only send for a specific Quiz would instead send for all Quizzes.
- Fixed potential fatal error if there are no Quizzes available
- Included translation files
- Added help text and resource link for Webhook URL setting
- Initial release