Skip to content

Course-to-Group Linking

This feature ties an LMS course to one or more PeepSo groups. It is backend-agnostic (it works for any active LMS module by course post type) and only loads when the PeepSo Groups addon is active. Without the Groups addon the rest of the plugin runs unchanged and nothing here appears.

Edit any course in your LMS and find the PeepSo Groups metabox. It offers three link types:

  • Related groups - groups shown as related to this course on the course page (via the widget below). Members can discover the course’s community.
  • Auto-join groups - members are added to these groups automatically when they enroll in the course.
  • Default activity group - a single group. Course activity (enroll, complete, lesson, quiz, certificate) is also posted into this group’s stream.

If no PeepSo groups exist yet, the metabox tells you to create a group first.

Selections are saved to a dedicated linking table ({prefix}peepso_lms_course_group), keyed by provider, course, group, and link type - not to post meta - so links are queryable and shared across LMS backends.

When a member enrolls in a course, the plugin adds them to every group linked as Auto-join for that course. This runs through each LMS module’s enrollment hook, so it fires for whichever platform the course belongs to. Members who cannot access a group are skipped.

When a course has a Default activity group, any LMS activity the plugin posts for that course is also surfaced in the group’s stream. The activity post is stamped with the group and the peepso_groups_new_post action fires so PeepSo Groups renders it. This is skipped when:

  • the Groups addon is not active,
  • the course has no configured activity group, or
  • the member cannot access that group.

Lesson and quiz activities carry the course reference too, so they mirror into the same group.

The plugin registers a PeepSo LMS: Course Groups widget. Placed in a sidebar, it renders the course’s Related groups (avatar + name, linking to each group) only when viewing a single course page. It shows nothing off a course page, without the Groups addon, or when the course has no accessible related groups. The widget title is editable (default: Related groups).

If the legacy peepso-learndash plugin’s course-group table is present, its links are migrated once into the new table as LearnDash Auto-join links. This runs automatically and is guarded so it only happens once per site.