only teachers can request course, how to do that?

only teachers can request course, how to do that?

by Mohd Radzi Abdul Kadir -
Number of replies: 9

how do I set a role so that only teachers and non-edited teachers can request a new course.. FYI I'm using version 2

Average of ratings: -
In reply to Mohd Radzi Abdul Kadir

Re: only teachers can request course, how to do that?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

This question has had no reply in 5 months. I"m sure it is a common request for institutions. Anyone knows?

Joseph

In reply to Joseph Rézeau

Re: only teachers can request course, how to do that?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well, course requests happen in the system context, and teachers are only teachers in specific courses.

This is a classic situation where the roles system does not easily let you do what you want. You need to define some other role, e.g. 'Institutional staff member', which can be assigned in the system context, and used to manage permissions like the ablity to request courses.

In reply to Tim Hunt

Re: only teachers can request course, how to do that?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Tim, I had already tried, but now I hope to have found the "recipe" to achieve this. It is fairly complex.wink

Here we go Moodle 2.2.3+ (Build: 20120612)

1.- Site administration ► Courses ► Course request, Check Enable course requests.

2.- Site administration ► Users ► Permissions ► Define roles : Manage roles : Edit Authenticated user and set Request new courses to Prevent. [Depending on your choice of User policies, you may have to also set other roles such as Authenticated user on frontpage to Request new courses Prevent.] If all your User policies roles have been left to their Moodle default values, you don't have to Edit any other role.

3.- Create new role "Staff member" :

Role archetype None
Context types where this role may be assigned:
System
Block

capability : System : Request new courses Allow

4.- Site administration ► Users ► Permissions ► Assign system roles
Assign roles in System Staff member
Select users to be assigned the Staff Member role from the Potential users list. Those would be your institution's "teachers".

Now, this will work fine for those users who already have a Teacher role in at least ONE course. When they log in, they will see the list of course(s) that they are enrolled in as Teacher(s) plus an All courses button. Clicking on that All courses button will show the complete list of courses on the site, plus a Request a course button, which is OK.

However, those Moodle site users whom we have assigned to the Staff member role in System will not see that All courses button, since by default all the available courses will be displayed. And consequently, the Request a course button will not appear to them. To solve this, a further step is required, viz. creating an HTML block on the front page with a direct link to /course/request.php! And of course that block will have to be made invisible to students etc.

5.- On the front page, Add a block: HTML: title: Course request contents: Click here to request a course with a link to <yourmoodlesite>/course/request.php

Edit that block's settings: Permissions: View block: Staff Member, Teacher (only). So that only users with Staff Member or Teacher role will be able to view that block; students won't see it.

Now Staff Members who are not yet enroled as Teachers in Courses will be able to see that HTML block, click on the link and request a course. Of course, this block is redundant for those Staff Members who are also Teachers, but tant pis.

Et voila!

Joseph

In reply to Joseph Rézeau

Re: only teachers can request course, how to do that?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That is a good explanation. Thanks Joseph.

While it is a lot of work just for this, the next time there is something that you want to make available just for 'techers' it will be much, much easier. You will just need to edit the permissions for the Staff member role.

In reply to Tim Hunt

Re: only teachers can request course, how to do that?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I went to document this only to find it was there already (albeit not in as much detail) http://docs.moodle.org/22/en/Course_requester_role

and had been for quite some timeblush

In reply to Mary Cooch

Re: only teachers can request course, how to do that?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Tim and Mary.

I will have a look at the doc page mentioned by Mary and add the necessary details.

I expect what is missing from the doc explanations is my point #5 above, i.e. how to make the request course button available for those "Course requesters/Staff members" who are not yet enroled in a course. But I will check this thoroughly ASAP.

Joseph

In reply to Joseph Rézeau

Re: only teachers can request course, how to do that?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I have amended the doc pages for the Course requester role for 2.2 and 2.3. As expected I did find out that the addition of an HTML block with a link to the request course is necessary for teachers's first request of a course on a site.

Joseph

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: only teachers can request course, how to do that?

by Federica Marra -

Hi Joseph,
your procedure is perfect but I don't know where to look for the HTML block permissions. 
Should they be in "Configure HTML block"? I don't see them when I open the settings.

In reply to Federica Marra

Re: only teachers can request course, how to do that?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Federica,

If you click the Assign roles link for the HTML block, you'll then find a permissions link in the administration block. (The documentation Block settings explains it in more detail.)