Restrict user creation with text file to a course or category

Restrict user creation with text file to a course or category

by Sylvain Martel -
Number of replies: 0
Hello everyone! Like many others, I'm a newbie here! sourire

I got a grasp this morning of how to restrict users (students, teachers) only to certain courses by using course-level role assignment. I also experimented with users upload and course enrolment via text file uploads; that works fine... for administrators!

What I need to do now is give total control to a user over ONLY specific courses or categories, and especially the ability to create and assign users using the text file upload. Logically, this user must not be able to add and assign users to courses other than the ones he has access to himself, so if the system encounters a line in the text file that refers to a course he cannot add to, it should be ignored or something like that. I don't mind if I cannot assign this particular role at category-level and have to set it manually for each course.

For example, I create Category1, which includes Course1. I then assign the user Prof1 to be the administrator ONLY for Course1. Prof1 can then use the upload file functionality to create all his users in batch and assign them to Course1. BUT, if in his text file, he assigned one user to Course2 (which he does not have access to) by mistake, it must not be processed.

I'm afraid it's not possible because all the users-uploading interfaces seem to be in the "admin" section, and you need to be a system-level admin to access them...

I'm waiting for your replies, thank you very much!
Average of ratings: -