LearnDash Slack

Documentation

Setting Up LearnDash Slack

Initially configuring LearnDash – Slack requires only a few simple steps.

  1. Install and activate the plugin
  2. Navigate to LearnDash LMS – > Settings – > LMS License and activate your license key (which you can find on your purchase history page)
  3. 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
    Select a Slack channel for a webhook URL
  4. 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
  5. Go back to your plugin settings and paste the new Webhook URL into the Webhook URL settings field
  6. 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.

Changelog

1.2.4 08/13/2018

  • Add %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

1.2.3 07/31/2018

  • 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

1.2.2 06/05/2018

  • Show the %course_name% and %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.

1.2.1 12/18/2017

  • Fixes PHP error on upgrade

1.2.0 12/05/2017

  • 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_earned% and %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

1.1.0 03/28/2017

  • 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
    • %awarded_course_points%
    • %student_course_points%
    • %access_course_points%
  • Text Domain is no longer a Constant
  • Ampersands don’t break Notifications if they are in any of the Message Fields

1.0.6 12/22/2016

  • Update Plugin Updater to Latest Version.

1.0.5 12/22/2016

  • Prevents a PHP Error from showing for Non-Admin Users.

1.0.4 11/7/2016

  • 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.

1.0.3 11/7/2016

  • 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.

1.0.2 11/1/2016

  • Fixed potential fatal error if there are no Quizzes available

1.0.1 9/16/2016

  • Included translation files
  • Added help text and resource link for Webhook URL setting

1.0.0 9/13/2016

  • Initial release