instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.71k stars 2.52k forks source link

Add Students to the Course #863

Closed harut-hokhanyan closed 8 years ago

harut-hokhanyan commented 8 years ago

I have a sub-account and a user who is the account's admin. I logged in with this user and created a course for sub-account. I need to add users to that account with the help of CanvasLMS API.

I want to limit the user's abilities of adding new students; the user will be able to add students who will belong only to his/her sub-account.

Can you please advise me if CanvasLMS gives such an ability? If not, how can I implement it?

Thanks.

simonista commented 8 years ago

Hey @harut-hokhanyan, a few clarifications on the data model:

So you cannot have a sub-account admin add users/pseudonyms only for a sub-account, but you can have that admin only add enrollments for that sub-account, with the "Add/remove other teachers, course designers or TAs to the course" and "Add/remove students for the course" permissions. Changing the data model to allow pseudonyms at the sub-account level would be a very large undertaking -- there isn't really an easy way to point you in a the right direction for that change.

As an aside, we try to reserve github issues for bugs in the code. This question would be better suited for our mailing list: https://groups.google.com/forum/#!forum/canvas-lms-users

Good luck!

harut-hokhanyan commented 8 years ago

pseudonyms are what tie users to accounts, and they can only be linked to root accounts How can I connect users with sub-accounts with using pseudonyms during creating a user. User adds in the user list of sub-accounts when I add user into the course, which is created by sub-account. I want to do the same using the api.

And when I disable "Add/remove other teachers, course designers or TAs to the course" and "Add/remove students for the course" permissions for a sub-account, still I can add other users into the course. Why?

Thanks.

simonista commented 8 years ago

I don't understand what you mean by "User adds in the user list of sub-accounts when I add user into the course, which is created by sub-account."

And "And when I disable "Add/remove other teachers, course designers or TAs to the course" and "Add/remove students for the course" permissions for a sub-account, still I can add other users into the course. Why?" Sounds wrong, can you provide more detailed reproduction steps?

simonista commented 8 years ago

@ccutrer just pointed out to me that this may also be because permission's are cached for an hour, and so permission changes may not take effect immediately.

harut-hokhanyan commented 8 years ago

I don't understand what you mean by "User adds in the user list of sub-accounts when I add user into the course, which is created by sub-account."

I mean, for example, I have a sub-account (A) and admin user for this account (U). Also my sub-account has some sub-accounts (SA) which have admin users for him (SU), etc. When I log in as admin user (U), and go to Admin > account_name (A) > users, I can see there all users-admins (SU) of sub-accounts (SA). And I can see there all users, which is added into the course of this sub-accounts.

Can I insist, that this users are connected with my sub-account (A).
If yes, how?

If no, can I connect them in some way?


My issue is the following:

I want to set user an opportunity to add in his courses only users, which is connected with his sub-account.

simonista commented 8 years ago

No, you cannot. Users are only linked to root accounts.