Separate/independent groups of learners in a Course simultaneously?

Hi folks, First of all, love to Opigno! Thanks for your hard work! I am helping to move several online courses that have been using Moodle for many years into Drupal/Opigno. I have run into some Moodle functionality that I wonder if I can replicate somehow with Drupal related to managing separate groups of learners overlapping in a course. In Moodle, there can be "separate groups" of learners in each course. Each group can move through course discussions/activities/forums independently of other groups in the same course, while the static content is available to all. We name our separate groups after the start date (for example, a group called "Spring 2013"). The members of each separate group CAN'T see the private content (discussion, mostly) that's generated by preceding or following groups. However, all members of all groups can all see the static course content (Lessons). So, if some learners don't complete a course on time and need a few extra weeks with the material, then we can still start a new group on the exact same course material, and they can't see the content generated by the past group. New groups see a fresh course with empty discussion forums and they can only see the members of their own, separate group. Past learners can come in and review the materials they covered, but can't see the confidential posts from other past/future groups. Then, when the summer comes, we "reset" all our courses, all groups are removed and all dynamic learner-generated content (mostly discussions/forum posts) are removed via a "reset" button. We also use the "separate groups" for reporting purposes, so we can keep track of the various sessions/start dates for each learner -- because we name our "separate groups" after the start date (Ex: "Spring 2013" would be name of a separate group). We gather our learner completion statistics per session (or, separate group). Is there a way to do this with Opigno/Drupal? I know that Courses are organic groups -- is there some way for me to create another level of groups within the Course organic group, so that learners are all members of the same course, but are also members of independent sessions? I hope this is the right place to post my question about that -- if not, please let me know where would be the best place to ask this. Thanks again! Please let me know if you have any questions.

Subgroups module?

I forgot to mention that I had also happened upon this Subgroups module for OG the other day while trying to figure this out, Maybe I could maybe add forums to a subgroup instead of the main Course group to help separate content? I'll experiment a little and see if it's possible, and post back if I have any success.
James Aparicio

Hi Solesum,

Hi Solesum, Thank you for your interest in opigno. We are planning on developing a migration tool for Moodle, how are migrating the content? Manually? Or analyzing the db structure and using scripts? At the moment out of the box it is not possible to manage separate groups inside a course. But it seems you are on the right track, please let us know of your progress regarding this and let us know if you have major problems with it. Best regards James Aparicio

Some progress but no solution yet

Hi James, Thanks very much for your reply, I am still working on this! I'll include details in case anyone else is working on the same thing. Also, It's great that you're planning on creating a migration script for Moodle -- in our case we are a very small non-profit advocacy organization with under 15 courses, so we are moving courses manually.There are so many new features we want to explore with Opigno/Drupal, so starting fresh is an opportunity for review and changes to our free courses as well. Here's an update on the issue -- so far I have the subgroup content type set up (it's called "Session"), but have run into a couple of issues that are preventing me from moving ahead. Details as follows: 1. I created an OG group called "Sessions" inside of the Opigno "Course" group. I specified the parent/child relationship by adding a group audience reference field to the Session content type, requiring a single course as the reference. 2. Since forums are the main thing we really need to keep separated, I set up the Session content type to create a forum when a new node is saved (same as Course type). I did this by cloning the Rule called "Forum Add", packaged with Opigno LMS, and changed the new Rule to create a forum every time a new Session node is saved. I also had to visit Structure > Taxonomy > Forums > Manage Fields to edit the groups audience field to include the target bundle "Session" in addition to "Course". 3. I installed the OG Subgroup module, which allows permissions to be inherited from parent to child groups. This inheritance does work great as long as OG role names match. Upon testing, I realized I actually need permissions to be inherited in the opposite direction (ex: instead of sessions inheriting from parent course group, I want the course group to inherit from the subgroup). I think that inheriting roles in the opposite direction might be the key to getting this working -- that way students could be subscribed to a specific Session (subgroup) and they would automatically get added to the parent Course group. The parent course group can contain all the Lesson and recyclable content, and the child Session group can contain the forums, which can be restricted by Session. This isn't exactly what we had before with Moodle, but it's a start and if I get it working it may be good enough. No success yet, but I found this patch for OG Subgroups I haven't tried yet: Will try that out today if I can, and post back. - - - - Using the steps above, I was able to add a new Session and have it create a forum of the same name. Access to the forum is determined by group membership to the Session. Great! But there are still some big problems to work out! Questions: 1. I added the Opigno Tools field (used in Courses) to the Session content type to see if I could reuse it. The select boxes show up fine when editing/adding session content, but the display of that field is non-existent, even when set to "Display the tool block (opigno--tool.tpl.php)". Is there a way to re-use the Opigno Tools field type in content types other than Courses? Do I need to modify/add a specific theme template file to make this happen? 2. If I cloned the Courses content type/OG and renamed it to Sessions, would this create a functioning duplicate? Just wondering since that might be an easier way to go! - - - So, the main two issues that are stopping me from making progress at this point are: - The child > parent (or subgroup > group) inheritance of group membership (as opposed to the other way around) - The ability to create a functional subgroup content type that has similar functionality/display as the Course Type Thanks again, I will keep this post updated and will post a final solution if I find one! Let me know about those questions if you have a moment.

Nope to cloning course content type

If I cloned the Courses content type/OG and renamed it to Sessions, would this create a functioning duplicate? Just wondering since that might be an easier way to go! Nope!
James Aparicio

Hi solesum,

Hi solesum, How is it going? Best regards

No full solution yet

Hi James, thanks for checking in. So far I am still working on this, so I haven't posted a final solution yet. :-( So far I am using Rules to achieve what we need, but it's only half working. As I mentioned before, I have the subgroup type "session" automatically creating linked forums. Here's where I am at now: - I have a registration (created via the contrib Entity Registration module) attached to the Sessions (subgroups). Users can create an account, log in complete a registration for a specific session. - Using Rules, on the event "After saving a new registration", learners are subscribed to that session using the "Subscribe user to group" action. - Because the default behaviour of the above rule is to subscribe a user with the member state of "Active", I had to create another rule that fires on the event "User has become group member" to set the member state to "Pending" (since they will need to wait for approval before they can really join the session and view the associated forum etc). Ideally I could have included this action in the "after saving new registration" rule above, but I think membership needs to be established before this action works. I also needed to give the to give it a weight that made it heavier than the initial "subscribe to group" action above. ** I should note there is a problem with this rule, as I can't seem to also specify the type of group this rule applies to (I want it to apply to sessions only, not courses), even when I set the Sessions content type as a condition. - At this stage I can have a list of Pending memberships for the session based on saved registrations for that session. Great! - The next step requires our facilitators (or, teachers) to visit the group in question, review the content of the registrations to check for eligibility, and to approve these memberships by changing the membership state to "Active". Once active, our facilitators can also assign the new members an OG role (learner, facilitator, manager, etc). At this point, the new group members are approved, have OG roles, have access to the forum associated with the session group and to the session group itself. - The idea is that these new members of the session group should then recursively become active members of the parent Course group, so they can access the shared Course content, like the lessons, files, etc. They should also be assigned an OG role. It would be great if this role was inherited from the session, but it would be fine if they started out as "Learners". At first I thought the OG Subgroups module would help by automating this backwards membership/role inheritance, but it isn't there yet. - I tried to achieve a similar functionality by creating another Rule, and I have gotten close to what we need. This rule works on the event "User membership has been approved" (so, when members have been made active in a group). I used a condition to check for the field og_group_ref field (this is the group audience field in the session type which determines the parent group), and the action is "Subscribe user to group". - This is where I am stuck. The rule doesn't quite work as expected. At one point I did get it to add members to the parent group, but their status was "pending" and I needed it to be active (to prevent our facils from having to add people to groups separately). I was pretty sure there was a conflict with the previous rule that sets memberships to pending. Upon trying to fix this, I caused more problems with this rule, so I am working on backing up a few steps and trying again. For example, the Course group I was testing on now has no members listed on the users page (besides the admin), but the group overview shows that there are 7 members. Arg. -- Also I should note that the dev version of OG now has a rules action that assigns an og role to a member, which will be great to have:

Got it working simply using Rules

I am happy to report that I think I have it working! I can now set up separate sessions/groups that are subgroups of an Opigno course, allowing me to separate out smaller groups with separate start dates and forums. The tough part was getting the reverse membership inheritance to work, but Rules provided that functionality. So, in brief here's how I did it: 1. I created a Course node (ex: Cats 101). This is the main course which contains all the lesson and files content. All learners from all start dates/sessions of a course need to have access to this. 2. I created a custom content type (a group type) called "Sessions". 3. I added a group audience field to the new Sessions type and configured it to allow us to choose parent Course node for the session. Note, I did not use the subgroups module to do this -- it is all regular OG functionality. 4. To automatically create a matching forum associated with each new session: I duplicated the "Add forum" rule provided via Opigno and created a new rule which adds a new forum for each new session with access based on session membership (same as Opigno course functionality). Then I visited the forums taxonomy field settings > group audience and selected the “Session” bundle to be included for forums. 5. I created a new session node (ex: Winter 2014) and used the groups audience field to select the correct parent course, making this essentially a "sub course" of the main Course (Cats 101). Using some Automatic Nodetitles magic, the new session is called "Cats 101: Winter 2014". Using the rule I created above, a matching forum is also created which can only be accessed by session group members. 6. Members can subscribe to the group at this point, and they should be in a pending state. In our case, we are using Entity Registration to provide a registration form for each session, and are handling subscription with Rules. So, we have an additional rule to subscribe each user who saves a registration to the session. This rule also automatically sets their role to "Learner" and their membership state to "Pending". 7. To tackle the backwards membership inheritance issue, I created a single rule which automatically adds members of a session group to the parent course referenced in the groups audience field, assigns them a role of learner and sets their membership status to active. This rule fires on the event "User membership has been approved". 8. When a user who is able to approve new group members visits the session and approves a pending membership (changes the member's state to active) then the above rule fires, and adds that member to the parent course as well. That's it! Well.... kind of. The next problem is that the above rule does not work when approving multiple pending group/session memberships (step 8) using the bulk update operations on the session's Users > Members page, but that's a separate issue! I hope this helps someone else who is coming from Moodle and/or needs this functionality.


Hi I would like a similar capability but would expect the Class to Course structure to be good enough for my requirements, although I can't get it to work properly. I have created a Class and in that Class is a course. When I add a user to the class they are automatically added to the course as expected. When I add a user to the course group they are not automatically added to the Class group, which again is as expected. I then set up a Forum container and associate my Class group with it, I then add forums to it. The issue is that users can see those forums even if they are not part of the class group. For example Student 2 can see this forum even though he is not a member of the class (Actually he is not even a member of the course in the class either). The course and class are set as private. Any suggestions? Many thanks Scott
James Aparicio

Hi Scott,

Hi Scott, That dev demo website is a very old version of Opigno. Can you please create your own free instance of Opigno at, and test there? Do you mind confirming that this is the case on the new version? We plan on updating the demo website soon. Best regards

sorry didn't realise that.

sorry didn't realise that. Retested on my new SaaS site and it works fine, thanks!

in case anyone else is

in case anyone else is interested in how this works (from what I can see from testing): When a Class is created it automatically creates a group with the same name When a course is created it automatically creates a group with the same name and a forum with the same name accessible by users within the group of the same name as the course. You can add a course to many classes. You can add a user to the Class group, they will automatically be added to the courses groups within that class. You can add a user to the course group, they wont be automatically added to the Class group. (which is good) By default anyone within a course can access the associated forum that was created, even if they aren't in any of the classes that contain that course. If you want to restrict access to a course forum for a particular class, then create a new forum and associate it with the class group. You would need to do this manually for each course/class combination. Doing this allows one to restrict access to a forum by class by course. Opigno already provides a view of the statistics by class as well as course so it works well to use the "class" entity for modelling different logical groups accessing the same course If I needed this functionality it would be fine for me to do it manually as I only have small number of classes and courses but for others it might be good to have an option in Opigno for this. Works well for me anyway, perhaps more complicated for the moodle use cases. Regards Scott

Class of Classes

Hi Opigno Any plans on the road map for a Class of Classes? Would be useful to associate various classes, e.g Spring, summer, winter intake into one logical "year" class. Or in my case associate various classes with a particular entity and be able to gather the statistics at the parent level. Kind Regards Scott

Class grouping

Hi, I am also looking for some functionality for group classes. My idea is to have hierarchy like: faculty -> department -> class It's already possible to group classes using taxonomy field. But I miss possibility to group classes in user profile listbox. It would be also great to be able to filter and to group by falculty or by department in my classes result list. Opigno is great work! Regards Vladislav

Assign course to users group

Hi James Aparicio, i want to assign a course to a group of members like we do in class if we assign a class to a group of members then that particular class is accessible to all the members of that group same thing i want in course i want to assign course to a group. can you help me in that scenario that how can i do that