Group formation

Activities ::: mod_groupformation
Maintained by Multimedia Communication Lab KOMMultimedia Communication Lab KOM
Formation of optimized learning groups - by topic preference or best match of individuals' charatceristics and preferences; in one easy to use Moodle acticity; languages available: German, English
Latest release:
124 sites
22 fans
Current versions available: 4


To provide a better learning experience the group formation plugin offers a great possibilities to optimize the composition of learning groups working together on the assigned (or selected) tasks.

It is designed to cover three most frequent and relevant scenarios required in university courses. Depending on the selected scenario, the plugin uses three different approaches by generating dynamic questionnaires. The questionnaires inquire several personal-dependent relevant criteria such as motivation, goal setting, character, team performance and prior knowledge.

The collected data is used by the GroupAL algorithm to form groups optimizing the learning outcome for all participants in all groups.

Following three scenarios are provided:

  •     Project teams - work intensively together to finish a project (e.g. conduct a study, delivery of a report, etc.).
  •     Homework groups - complete (smaller) assignments in regular intervals (often weekly) as a preparation for examination.
  •     Presentation groups - work together for a relatively short time period to finish a presentation (usually to be held in class).

At the Presentation groups scenario, the course executive has to define topics, which students sort to regarding their personal priority of interest.

To lower the effort barrier, group formation offers students to export/import their answers for reuse in other courses.

The questionnaires are available in English and German.


Before Installation

  • Make sure the Moodles cron job is running. The groupformation plugin will never start creating groups if cron is not running. Further information about the cron can be found here on


Unzip the zip file in the “mod” folder of the Moodle directory and, if necessary, rename the folder to "groupformation". Then visit your Moodle server's Site Administration -> Notifications page and Upgrade Moodles database, -- OR -- Go to Administration > Site Administration > Install add-ons to install the Groupformation module directly from your Moodle installation.

How to use the Groupformation Plugin (Admins/Teachers)

In Moodle start the edit mode and create the Groupformation activity.

Choose Moodle activity

Choose one of the three scenarios and enter the maximum size or number of groups.

You can include preknowledges which may be important for the activity. Depending on the scenario you have choosen, preknowledges will help to improve the matching of the groups.

After you done all the settings a questionnaire will be created.

When the students completed their questionnaire you can end the activity and start the groupformation algorithm.

Capabilities for the teachers/tutors

Group formation overview tab

In the "Overview" you can observe how many students:

  • assigned to the course
  • started to fill out the questionnaire
  • completed or submitted the questionnaire

You also can see how long the questionnaire is available to the students and end or start it at any time.

Start group formation algorithm menu

In the "Group formation" tab you can start the algorithm to forming groups. In the settings you can choose to exclude the student who not answered the questionnaire. Tutors, teachers or other not relevant roles in Moodle assigned to the course are excluded from the group formation.

When you start the algorithm to forming groups, it can take a while till it finishes(depending on server and the number of students it could take up to 30 min). If you wish to, you will be notified by email when the group formation is done.

After the group formation succeeded you can see the preview of the groups and their quality, which is the performance index(GPI). You can edit the groups by moving the students from group to group. If you satisfied with the result you can adopt the groups to Moodle. If not, you can discard the results and start the algorithm again.

Preview of the questionnaire

Here you have a preview of the questionnaire. Your answers will not be saved. Because of your role as a tutor(or similar) you not taking participation in the group formation.

Change settings

Edit plugin settings

In the navigation side bar, which is usually to your right, you can adjust the settings. Some settings will be disabled, as soon as students started to complete the questionnaire. All settings which have no effect to the questionnaire would be still available. Those are for example the group size or number and the time period in which the questionnaire is available to the students.

Installation-wide settings

Installation wide settings (for export and archiving)

As Moodle site admin, go to Site administration > Plugins > Activity Modules > groupformation.

  • Archiving time: Groupformations will aoutmatically be archived (anonymized and removal of individual users answers) after the set time.
  • Import/Export answers: if set to YES students can export and re-import their asnwers (e.g. in a different course or year after)
  • Participant code: (experimental) In case you plan to map the users' answers to other study data conducted, let students enter a participant code at the beginning of the group formation questionnaire. The format is: lldddd (l=letter, d=digit). This data can then be found in the Moodle database for each participant.

How to use the Groupformation Plugin (Developers)

As a developer you might want to edit the questionnaire content or configure the GroupAL implementation.

For manipulation of the properties and configuration of the questionnaire and GroupAL algorithm, take a look at the define_file.php ( You can edit the categories of the questionnaire and the criteria that are used for the GroupAL algorithm.

For manipulation of the questions of each category, take a look at the directory xml_question ( You can edit the xml files and add additional categories and languages.

The groupformation plugin relies on the custom library groupAL which can be found in the subfolder ./lib of the plugin. The groupal algorithm is used by the job_manager.php ( file. You can edit the used matcher and implement further algorithm types.

Potential privacy issues

The plugin asks participants for personality traits via questionaaire. This data is stored until course end or deletetion of activity or until 365 days passed (see installation wide settings; only works if cron is enabled). Make sure your university/organization regulations allow asking and storing of such personal information. The answers of individuals are never shown to the course administrators, but to the user himself. Don't hesistate to contact us at team[at] for further assistance.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7
Screenshot #8
Screenshot #9


Multimedia Communication Lab KOM
Multimedia Communication Lab KOM (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Picture of Dan Marsden
    Mon, Feb 15, 2016, 9:37 AM
    Thanks for sharing your code with us - I've just taken a very quick general look at your code and found a few security issues that should be resolved before this can be approved in the plugins database, I have reported these issues into your github tracker. Once you have addressed these issues please upload a version with the fixes here and someone will take another look. Thank you for your patience with the review process.
  • Picture of Dan Marsden
    Wed, Mar 16, 2016, 7:30 AM
    Thanks for resolving those issues - would you mind adding travis-ci support to your plugin? This runs all the automated testing tools and codechecker processes on your code - more info here: You don't need to fix all the problems it finds (I tend to ignore a lot of the php mess detector violations in my own plugins) but seeing these reports helps a lot with the plugin review process.
  • Picture of Plugins bot
    Wed, Mar 16, 2016, 8:20 PM
    Please adding a full description of the plugin. You can describe the plugin's features, purpose and typical usage scenarios there, for example.

    Please add a screenshot of your plugin to help folks get an idea of what it looks like when installed.
Please login to post comments