PlayerGroup

Student self-service group formation activity for Moodle โ€” full documentation.

English | Portuguรชs

View on GitHub Download .zip

Moodle License Status Latest Release PlayerGames Ecosystem Role Author

Moodle Plugin CI Last Commit Open Issues

PlayerGroup lets students autonomously form their own groups directly from the activity page โ€” no teacher intervention needed. It replaces manual group assignment with a self-service experience that works for any course format.

๐Ÿ‘ˆ Use the sidebar to jump to any section on this page.


๐Ÿ–ผ๏ธ Screenshots

Browse with the arrows, the dots, or the left/right keys. Click the image to zoom.

โœจ Features

๐ŸŽ“ Educational Purpose

PlayerGroup is designed to:

Suitable for:

๐Ÿ•น๏ธ PlayerGames Ecosystem

PlayerGroup is part of the PlayerGames gamification ecosystem for Moodle. Together, these plugins transform Moodle into an immersive experience:

See the PlayerGames hub for the full plugin family.

๐Ÿ“ฆ Requirements

Component Version
Moodle 4.5+
PHP 8.1+

๐Ÿ› ๏ธ Installation & Configuration

  1. Download the .zip file or clone this repository.
  2. Extract the folder into your Moodle mod/ directory.
  3. Rename the folder to playergroup (if necessary). Final path: your-moodle/mod/playergroup/
  4. Visit Site administration > Notifications to complete installation.
  5. Add a PlayerGroup activity to any course.

This plugin has no separate site-level settings to configure after installation โ€” every setting is configured by the teacher when adding the activity to a course, as covered in Usage below.

๐Ÿ“– Usage

  1. Add a PlayerGroup activity to your course.
  2. Configure:
    • Minimum / maximum members per group
    • Grouping mode โ€” create a new grouping automatically, use an existing one, or none
    • Allow students to leave their group, and whether an emptied group is deleted automatically
    • Delete groups on activity deletion โ€” only ever removes groups and a grouping this activity actually created; a pre-existing grouping pointed at via โ€œuse an existing groupingโ€ is left alone
    • Foundation reward โ€” grade automatically awarded to every student who joins or creates a group
  3. Students open the activity and create a group (name, description, emoji badge, privacy level) or join an existing one โ€” open, password-protected, or by accepting an invite.
  4. From any group card, students can:
    • Click the member count to see who is in that group, with the founder marked as leader
    • Invite an enrolled colleague who has no group yet (only shown to students who can also see the course participant list)
    • Leave their own group, if the teacher allows it
  5. The activity completes and the grade is awarded automatically the moment a student joins or creates a group.
  6. Teachers get two report tabs from the activity page: the activity log (who did what, when) and groups and members (a full roster, one row per member) โ€” both exportable to CSV and Excel.

๐Ÿงช Automated Tests

PlayerGroup ships with a PHPUnit suite covering business logic, web services, reports/exports, the renderer and mobile app output, the public API, and Privacy API compliance, plus a Behat suite for browser acceptance. Every CI push runs against the full matrix (Moodle 4.5 โ†’ 5.x, PostgreSQL & MariaDB).

PHPUnit โ€” By Area

Area Files Cases
Web services (tests/external/) 8 53
Core (lib_test.php, grading, completion, locking, member ordering, backup, privacy) 7 36
Reports & exports (tests/controller/) 2 5
Output & mobile app (tests/output/) 2 14
Public API (tests/api/) 1 6
Grand Total 20 114
vendor/bin/phpunit --testsuite mod_playergroup

Overall line coverage (moodle-coverage, PHPUnit + Xdebug): 80%.

Behat โ€” Acceptance Tests

Feature file Scenarios
create_group.feature 2
join_group.feature 2
join_protected_group.feature 3
view.feature 3
invite_colleagues.feature 1
view_members.feature 1
Total 12
php admin/tool/behat/cli/init.php
vendor/bin/behat --tags=@mod_playergroup --profile=chrome

Full test-by-test breakdown and coverage table โ†’

๐Ÿ” Security & Compliance

๐Ÿ“„ License

This project is licensed under the GNU General Public License v3 (GPLv3).

Copyright: 2026 Jean Lรบcio