Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new procedure to provide access to non-student learners #698

Closed
saschaben opened this issue Sep 25, 2014 · 2 comments
Closed

Add new procedure to provide access to non-student learners #698

saschaben opened this issue Sep 25, 2014 · 2 comments
Labels
Milestone

Comments

@saschaben
Copy link
Member

the way it is now:

If a user is a non-student but has been added to events via a secondary cohort group, they do not see a calendar of events for that learner view, since they have no student role in the user_x_user_role table. Similarly, if a new user is added via the admin console without any roles, evn if they are assigned to a secondary cohort they will not have access to the system, since there is not recordof them in the user_x_user_role table. While this will be obviated by the architecture of 3.0, in the meantime it is an issue.

Solution: create a stored procedure which will update the user_x_user_role table when a secondary cohort value is added to a user account.

When a secondary cohort gets selected and assigned,

  1. test to see if any role exists for the user in the user_x_user_role table.
    [1a. If there is one or more records, test for a record with a user_role_id of 4.]
  2. If no role_id of 4 exists for the user, add a new row with a user_role_id of 4.
@saschaben saschaben added this to the v2.4.8 milestone Sep 25, 2014
@saschaben saschaben reopened this Sep 25, 2014
@saschaben saschaben modified the milestones: v2.4.8, 2.4.7.1 Oct 6, 2014
@saschaben
Copy link
Member Author

in other words:
//when adding a secondary cohort to a user from the admin panel

IF (SELECT COUNT(user_id) FROM user_x_user_role WHERE user_id = $userId AND user_role_id = 4) = 0
INSERT INTO user_x_user_role (user_id, user_role_id) VALUES ($userId, 4)

this will make a mess of the ability to identify students vs non-student learners though...

@saschaben saschaben modified the milestones: 2.4.8, Hold Pending Oct 7, 2014
@saschaben
Copy link
Member Author

see also #315, #217.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants