4 posts / 0 new
Last post
pat
Offline
Last seen: 4 months 2 weeks ago
Joined: 11/06/2018
Group Membership Status

Hi,

I was wondering if group membership status was already built into Opigno?

Im thinking of getting our students on a monthly billed course, but if a user wouldn't pay for any reason, Credit Card didn't go through etc, I do not want to remove the user from the group / Class, Id enjoy if I could simply set the user status to: Disabled with a reason or something. Pending, etc.

Id like to implement this for Members of Classes or Training.

Regards, Pat

nikolay
Offline
Last seen: 1 hour 48 min ago
Joined: 12/12/2018
Toogle group membership status

Hi, pat.

You can use this link to toggle the membership status for each user in Training - /group/{group_id}/members/default.

You can apply the attached patch for adding this link to the "Members" page in Training edition interface (assumes you are using Opigno 8.x-1.0 version installed with Composer).

pat
Offline
Last seen: 4 months 2 weeks ago
Joined: 11/06/2018
Thanks a lot, let me look at

Thanks a lot, let me look at that patch.

pat
Offline
Last seen: 4 months 2 weeks ago
Joined: 11/06/2018
So, the patch works for

So, the patch works for Training members page.. but if you want to alter a "Class", then you're looking into trouble, because MembershipStatus isn't defined on a Class. Actually I think this is a bug in the code for not looking if the group has this specific status field. Ill provide a patch on Drupal.org to fix this though.

Error: Notice: Undefined offset: 0 in Drupal\opigno_learning_path\LearningPathAccess::getMembershipStatus() (line 193 of modules/contrib/opigno_learning_path/src/LearningPathAccess.php).

This said, I'll be looking into implementing the Membership status handling within a Class & not from the Training itself. I totally understand Classes can be applied on multiple training, so, Ill try and see what would be the best way to get this working :).