Create new user by student manager

msharma
Forums
Hi, Recently i have downloaded and install Opigno locally. I have found opigno a good LMS tool as i am already familiar with the drupal. I have few questions which i am list one by one below, please look into and let me know the resolution. 1) I want there if user doing their registration on my website and if he is belonging to the any company then user role must be set to Student Manager and he can add their multiple users and these users can be view by his/her or admin only. 2) The users belongs to one or added by any student Manager then that student manager can add these users to perticular course or class. No other Student Manger can see or add them, even notification can view by these only not other belongs to other student manager. 3) Course or classes can be purchase by student manager for their student or users and these users need not to pay anything. If i have any other issue i will put those question here for further clarification.
Amermod

Hi msharma,

Hi msharma,

For your first question, you can create your own module and implement the hook hook_user_insert. Then when a user is inserted, you can check his company and give him the good permissions.

For your two next questions, it would be really too long to answer here. But a simple search gave me these two links:

If you are not into the web development, I suggest you to contact us with this form and ask for a custom development. We will come back to you quickly.

Thank you for using Opigno.
Have a nice day.
  Allan

memelissaann

RE: Create new user by student manager

I have created nearly the exact same set up using cck, rules, and views. New Content Type create a custom content type titled "Student" with the title field renamed to "Username" (field will still be called in rules using 'node:title') -add email field titled "Email Address" -delete the body field. (You may not need to create a custom content type, I did this so I could use node limits to limit the number of students that an manager could register. ) User Profile Add an 'integer' type field on the main user profile titled "Manager ID" and hide it on the registration and profile forms. New Rule Create a new rule titled "New Student Registration" -- the final product should look something like this: EVENTS --After saving new content of type Student ACTIONS --Create a new entity ----Parameter: Entity type: User ----Name: [node:title] ----Email: [node:field-email-address] ----Provides variables: New Student (new_student) --Add user role ----Parameter: User: [new-student] ----Roles: student --Set a data value ----Parameter: Data: [new-student:field-manager-id ----Value: [site:current-user:uid] --Set a data value ----Parameter: Data: [node:field-uid] ----Value: [new-student:uid] --Save entity ----Parameter: Entity: [node] ----Force saving immediately: true --Save entity ----Parameter: Entity: [new-student] ----Force saving immediately: true --Unblock a user ----Parameter: User: [new-student] --Send account e-mail ----Parameter: Account: [new-student] ----E-mail type: Welcome (new user created by administrator) Your configuration may differ based on your actual field names and such. If you are applying a limit to the number of students each manager can create, you will want to create another rule that deletes the user when the node is deleted or deletes the node when the use is deleted. New View or Edit Existing View Finally, in views click on the "advanced" tab on the right to expand it. Add a contextual filter for "Manager ID" in the filter edit window, choose "Provide default value" and then select the type "User ID from logged in user." This will filter all the results to the students of the logged in manager. Add Links and Fine Tune Now you can add a link for users to create a student node, they fill out 2 fields and the student gets an email with their account info, the manager's ID will be saved on the new student profile and can be filtered using contextual filters in views so that only that manager can see that student. The new student ID is saved to the student node so that you can filter those in views or use them as conditions or fetch fields in rules. There is also a module called subuser which may meet your needs if they are basic, but is still is alpha and some of the features are not developed enough to be useful. The messaging system in Opigno is already configured to filter available contacts to only those who are members of the same group so you can create a rule to create a group for each manager upon registration and then create a rule to add any new students to that base group. this works as a good space to managers to organize their students anyway and a manager will always be able to message their students and vice versa without any confusion for the end user. I have a membership setup on my deployment so all managers have access to view and copy any courses from the training catalog to their private course list where they can then edit, assign, etc. the course without affecting the original course in the catalog. A similar setup could work if you give permission for managers to only view (not join/copy/edit) courses in the training catalog then set up rules to copy a course to a managers account when they purchase the corresponding product in whatever shopping cart that you use. It's a lot of set-up though, there is probably a simpler way or maybe a module that can handle selling access to one role that allows that role to manage permissions on only the purchased content with other users.
msharma

Thanks memelissaann and Amermod

Thanks memelissaann and Amermod for your valuable response. It looks sub user module doing the same thing that i want. Now have another problem related to membership and subscriptions. I have already post my question on this forum, i am also repeating the same here please look. I want to create few subscription for individual/company like Bronze, Silver, Gold and Platinum and custom like other companies or website provide these days and company or individual can buy. The Bronze subscription available for individual and can access any course for the period of month or more depending the time period for which he/she pay. The Silver subscription available for company and can access any course for the period of month or more depending the time period for which company pay. Here company can add their own employees for the training and enroll the employees, but can not unroll the employees. Company can view all the badges, reports etc related to their employees and other company can not view or access other company record, but admin or manager can. A company can add maximum of 25 employees. If they want to add more employees then the company should upgrade their subscription plan. The Gold subscription available for company and can access any course for the period of month or more depending the time period for which company pay. Here company can add their own employees for the training and enroll the employees, but can not unroll the employees. Company can view all the badges, reports etc related to their employees and other company can not view or access other company record, but admin or manager can. A company can add maximum of 50 employees. If they want to add more employees then the company should upgrade their subscription plan. Rest subscriptions are same as Gold except company limit to add maximum number of employees for training. Each Subscription plan will be associate to a manager except bronze which is for individual. Manager will track and assist the company and a single manager can be associate to multiple company. Their can be multiple Managers, but One company can be handle by one manager only. Their can only one administrator in the application. Please someone assist me to develop this kind of service or architecture in Drupal Opigno