To not allow to the Theachers enroll students in theirs courses

To not allow to the Theachers enroll students in theirs courses

Iván Fuentes發表於
Number of replies: 5
Hi,

I have this situation:
When I enter in moodle configurations, in the permissions exists the option "allowunenroll" this is describe as:
If this is set 'Yes', then students are allowed to unenroll themselves from courses whenever they like. Otherwise they are not allowed, and this process will be solely controlled by the teachers and administrators.
How I can separate that only the administrator be the one and only user that is allowed to enroll student in a course, and not the theachers???
Please help.
Iván
評比平均分數: -
In reply to Iván Fuentes

Re: To not allow to the Theachers enroll students in theirs courses

Iñaki Arenaza發表於
Core developers的相片 Documentation writers的相片 Peer reviewers的相片 Plugin developers的相片
As far as I know, you can't do that without modifying the code.

Saludos. Iñaki.
In reply to Iván Fuentes

Re: To not allow to the Theachers enroll students in theirs courses

N Hansen發表於
I think this is a very good idea, and also the course settings themselves I'm not too happy with the teacher having the ability to control what the course cost is etc. I'm going to start another thread about this elsewhere as I think this could be a roles issue.
In reply to Iván Fuentes

Re: To not allow to the Theachers enroll students in theirs courses

Ken Wilson發表於

Hi Iván

AFAIK non-editing teachers cannot unenrol students from a course. This may not be the ideal solution for your needs - there seems to be more that is relevant in the roles work being done for moodle 1.7 smile.

Ken

In reply to Ken Wilson

Re: To not allow to the Theachers enroll students in theirs courses

Ken Wilson發表於

... or if you just want a simple way to restrict to admins only, add these 5 lines in the file moodle/course/student.php above the "if (! $site = get_site()) {" line:

  //Hack to only allow admins to access this page
 if (!isadmin()) {
        error("You must be an administrator to use this page.");
    }
  //End hack

Below these lines should be these 3 lines

    if (! $site = get_site()) {
        redirect("$CFG->wwwroot/$CFG->admin/index.php");
    }

You may also want to prevent students enrolling themselves onto courses. Do this by the flat file enrolment variable: admin -> users -> enrolments -> flat file -> uncheck enrol_allowinternal.

Hope this helps!

Ken

 

In reply to Ken Wilson

Re: To not allow to the Theachers enroll students in theirs courses

Murray Davis發表於
Thanks for the hack Ken. Just the medicine the patient needed. Works beautifully!