Your Moodle version

General plugins (Local): Meta-course group synchronization

local_metagroups
Maintained by Picture of Paul Holden Paul Holden
Automatically synchronize groups from child courses into meta-courses.
1k
Moodle 2.6, 2.7

Meta-course functionality in Moodle currently lacks the ability to synchronize groups from child courses in to a meta-course. This plugin implements this functionality by listening for relevant events related to groups.

After installing the plugin, any amendments to groups (add, update and delete) and their membership (add or remove users) from child courses will be automatically reflected in the linked meta-course.

Meta groups

See the project readme file for the most up-to-date instructions.

The latest release is 1.3 (build 2014103100):

  • CLI script can now synchronize specific courses.
  • API & documentation updates.

Screenshots

Screenshot

Contributors

Picture of Paul Holden
Paul Holden (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Salvador Banderas Rovira
    Mon, Apr 14, 2014, 8:01 PM
    Talked too soon. I found something that could be an expected behavior, but it represents a major problem for the organization I work for.

    When having the same name for groups in two or more child courses, the plugin creates the same number of duplicate groups in the meta-course instead of using just one.

    Example:
    - course A has group "org_es"
    - course B has group "org_es"
    - course C is meta-linked to courses A and B
    - two groups "org_es" are created in course C (one with course A students, the other with course B students) instead of just one group "org_es" (with both course A and course B students)

    Also, it doesn't matter if group "org_es" was already created in course C. Three groups remain: one with course A students, another one with course B students and the one already created in course C.

    Again, maybe this is the expected behavior.
  • Picture of Paul Holden
    Wed, Apr 23, 2014, 4:27 PM
    Hi Salvador,

    That is the current behaviour, yes. If you take a look at the group_created event observer, you'll see that it currently matches on the 'idnumber' property of the group:

    https://github.com/paulholden/moodle-local_metagroups/blob/master/classes/observers.php#L46-53

    Perhaps a configuration option to match on group name could be added..?
  • Picture of Ahmad Faridi
    Sat, Jul 5, 2014, 4:59 PM
    Hi guys, I followed the installation instruction as specified in the read me file. But, when i went to the part where i had to run the sync.php script, it is giving me database connection failed error.

    I figured that this error is caused by this line in the script.
    require_once (__DIR__ . '/../../../config.php');

    moodle, is working just fine. So, I am not sure why it is the script is giving me this error.

    any idea why, this is happening.?
  • Picture of samuel teixeira
    Sat, Oct 11, 2014, 3:27 AM
    Hello, does anyone knows if it works with moodle 2.7? There is any modification that I can do?
  • Picture of Paul Holden
    Fri, Oct 17, 2014, 11:20 PM
    Hi Samuel,
    Although the plugin was designed for Moodle 2.6, it should continue to work fine in later versions - please let me know if not!
  • Picture of David Challoner
    Thu, Nov 6, 2014, 4:52 PM
    I've installed this plugin, but can't seem to run the sync.php file. When I try to run it from the browser it says I can't. When I try to run it from the Windows Command Line on the server (we use Windows Servers) it just opens the file in notepad and doesn't execute it. Can anyone help me with what I am doing wrong?
  • Picture of Rob McCart
    Wed, Nov 12, 2014, 8:56 AM
    I've installed this plugin on a Moodle 2.6.6 site and can't seem to get groups to transfer. I've created a child course with 4 students manually enroled into 2 groups. I've created another course and enroll students from the child course using the meta-link method, the students are enroled but they are not put into groups. Is there something I'[ve missed?
  • Picture of Paul Holden
    Thu, Nov 13, 2014, 4:52 PM
    Hi Rob,

    The plugin works best if you create the meta course enrolment between courses before creating groups in the child course.

    Not a problem to do it vice-versa - you just need to run the CLI sync.php script. See: https://github.com/paulholden/moodle-local_metagroups/blob/master/README.md#usage
  • Picture of Zaid Ghansar
    Wed, Dec 3, 2014, 3:20 AM
    Is there anything for moodle 1.9?? ye syes one of my installation is still on it smile
  • Picture of Thibaut Dupuy
    Mon, Dec 22, 2014, 6:47 PM
    Hello,

    I tried your plugin but it doesn't really match my needs.

    Is it a way to synchronised group from parent course to meta-courses child ? Or maybe I just didn't understand how the plugin work .
  • Just wondering . . .
    Mon, Jan 26, 2015, 11:00 AM
    Has anyone tested this out on 2.8?

    -Derek
  • Picture of Michael Veit
    Sun, Mar 1, 2015, 6:11 AM
    Hi Paul,

    I haven't any function with this plugin.
    I had created the meta course enrolment between courses before I created groups in the child courses.

    Then I wanted to start the cli/sync.php but I coudn't it: Not by command line (./sync.php) , not by URL. How can I start the sync.php? The description I've read but I couldn't read the help (--help).
    Why I don't have any function?

    Any idea?

    Regards
    Michael
  • Picture of Michael Veit
    Thu, Mar 5, 2015, 7:04 AM
    Hi Paul,

    Thanks for the Link 'https://docs.moodle.org/28/en/Administration_via_command_line'. I could run the scritp sync.php. A (very) old meta course and two old child courses have been synchronized.
    But I still have no function for new courses:
    1. Create a meta course and a child course
    2. Choose as enrolment 'meta course'
    3. Create groups in the child course
    4. Writing the participants in the groups of the child course
    But after that happens no transfer in the meta course. Nothing happens after start of the scripts cron.php and sync.php.

    What is missing? What else to do? Any idea?

    Regards
    Michael
  • Picture of Michael Veit
    Thu, Mar 5, 2015, 7:19 AM
    Hi Paul,

    I don't have any function if I used the command '$sudo /usr/bin/php local/metagroups/cli/sync.php --course=278'

    Michael
  • On the jetty
    Fri, May 1, 2015, 7:23 PM
    Well this is truly a thing of beauty. Works really well on a Moodle 2.6 system.

    I use Auto Enrol for the Child Course track which places users into custom groups automatically based on Institution and then they get propagated with their groups into meta sub courses and enrolled into the matching groups as well using this plug in..

    That you so much for this, really appreciated!

    Roger
1 2
Please login to post comments