← Back to archive

Cohort Membership

local_cohortmembership
camp Tier 2 · Verified
Actively maintained · updated 4 wk ago
Fully free

Add, remove, and sync Moodle cohort memberships via CSV, with dry-run and an HTML/CSV report — fills the gap left by MDL-61007.

Download and compatibility

1.0.4 Moodle 4.5
Verified against source
verification ledger

Source tagged by maintainer

github.com/tkorner/moodle-local_cohortmembership @ v1.0.4 · commit b3ec27a5f0f0

Rebuilt deterministically from that tag

canonical ZIP, byte-identical on every rebuild

Artifact hash recorded in the public index

sha256 8f5a7682442cad70ee15b56dab38a574cae18d5df7c2534a3eb4cbab9b6761f6

Release signed · trusted publishing

planned — TUF signing (RFC §4.3)

Recorded in public transparency log

planned — Sigstore/Rekor (RFC §4.3)

Every step is independently verifiable. CAMP never modifies plugin code; it proves the ZIP you install is exactly what the maintainer published. Verified 29 Jul 2026.
Code check ?: clean
phplintphpcs0 | 0
composer require tkorner/moodle-local_cohortmembership

All versions

VersionReleasedMoodleCode check
  • ZIP
1 older version · superseded by the releases above
  • ZIP

About

Manages cohort memberships via CSV: add users to cohorts, remove them, or sync a user's cohort memberships to a desired state. UI-based (CSV upload) with dry-run, HTML report and CSV download; two CLI entry points are also provided.

Why this plugin exists

Moodle core has no built-in way to remove users from cohorts via CSV or the UI — this is an open tracker request, MDL-61007, open since 2017. Core's tool_uploaduser already covers add via cohort1,cohort2,... columns, and the core_cohort_delete_cohort_members web service covers remove programmatically, but neither has a UI, a dry-run, or a report.

This plugin fills that gap and extends it to cover add, del and sync — one CSV format, one report, one dry-run, for all three operations.

Guardrails

  • Never auto-creates cohorts — an unknown cohort is an error row in the report, never a new cohort.
  • Dry-run is the default.
  • All membership changes go exclusively through Moodle's cohort_add_member() / cohort_remove_member().
  • A single bad CSV row never aborts the whole run.
  • Every removal is flagged if the cohort is used by an active Cohort sync enrolment method, since removal there also unenrols the user from the course.

Project

Maintainer
tkorner
2 releases in the archive
Plugin typeLocal plugins
LinksDocumentation
declared by the maintainer
Development 2 · 1 forks · 0 open issues & PRs · Upstream release v1.0.3 · 23 Jul 2026 · Tested with moodle-plugin-ci
Security advisoriesNone published