Removing a whole class of users

sean.middlemore
Forums
Hi all, I need to remove the users of a whole class then the class themselves. What would be the best way to do this. I've seen the view for adding and removing users to a class but I can't seem to adapt it to delete users. Sean
Profile picture for user James Aparicio
James Aparicio

Hi sean

Hi sean

If you want to remove the class aswell, you can go to the admin tab. Content.

Inside filter by content type = "class" and on the right you have the button delete.

Best regards

sean.middlemore

Hi James,

Hi James, Sorry, I may have not made myself clear. I would like some sort of VBO that I select a class from a filter, tick the users and remove their accounts. Kind Regards, Sean
Profile picture for user James Aparicio
James Aparicio

Hi sean,

Hi sean,

For that i would implement a hook_menu_alter.

And print the items to have a look at the menu item node/%/group.

You can duplicate it for example to node/%/groupduplicated and change the page callback. Duplicate the page callback, should be a form, and alter the form_submit to remove the user.

Best regards 

Profile picture for user James Aparicio
James Aparicio

Since it is a view, you can

Since it is a view, you can add another action, to node/%/group

Take a look at the file og.views.inc inside profiles/opigno_lms/modules/contrib/og/includes/views.

 

Best regards