I'm wanting a course that is only enrollable by teachers.... it's for some ICT training / PD and while I know that an enrolment key that is only given to teachers is a reasonable solution, I would prefer to hide the entire Category of Teacher content from Students....
I have looked into the "Override permissions" section and really just want a "is visible" option so that I can say that certain Categories are not visible to "students" but only "teachers".
Alternatively, "enrollable by teachers only" would be another option - if it's visible, but only teachers can join that course... the reason I'm reluctant to put an enrollment key on it is that I want teachers to be able to get to it at any stage, not just all join at the start of the year, which makes an enrollment key a bit of a nuisance and hinderance to them...
Is this possible? Any thoughts? Should it be a suggestion for future? (Or is it possible in Moodle 2.0? I'm running 1.9.1 currently...)
This might do the trick - give your teachers the right to view hidden categories and make a teachers only category into which you pit your training course. I personally would enrol them all myself at the start of the year anyway,then it is always available for them to access, rather than have them enrol themselves. But if it is hidden but viewable by them that might do for you.
Yea that seems to partially work, because it allows staff to enrol if they know where it is, but it actually doesn't show up on the homepage then (in a hidden category)...
So what I'm now trying to do is to link it via a HTML block that will only be visible to teachers. As far as I can tell I've done everything right in the override permissions section, but both teachers and students can either both view it, or both not view it (seems to depend upon the "Authenticated Users" override, nothing else...).
BTW - I'm using LDAP authentication for both teachers and students - teachers become "Course Creators" because they are in a special group in AD. Hope this might help. This is also the reason I can't just enrol them all at the start of the year, because they don't show up in the Participants until they've logged in once...
So what I'm now trying to do is to link it via a HTML block that will only be visible to teachers. As far as I can tell I've done everything right in the override permissions section, but both teachers and students can either both view it, or both not view it (seems to depend upon the "Authenticated Users" override, nothing else...).
BTW - I'm using LDAP authentication for both teachers and students - teachers become "Course Creators" because they are in a special group in AD. Hope this might help. This is also the reason I can't just enrol them all at the start of the year, because they don't show up in the Participants until they've logged in once...
Did you create a new role to do this? Perhaps this forum post willl help.
I have checked that out, and posted a reply on that forum to try to clarify why that needs to be done, and whether you can get LDAP authentication to put teachers into this group automatically.
I have a staff only area of our Moodle that is not hidden at all but uses 64 random character enrolment keys. This pretty much ensures no one is going to guess the enrolment key and get into the course. We then have a script that runs via cron to manually go through the moodle user database and enrol only our staff users (students have numbers in their email addresses, staff do not) as students into the staff only category.
This works really well for us and means that after a member of staff logs into Moodle for the first time, they are assigned to all the staff only courses within ten minutes.
We use these courses for distributing all of our staff news and information and have stopped producing paper bulletins since moving over to this method.
If you want some pointers on producing such a script I would be happy to help.
Jon
This works really well for us and means that after a member of staff logs into Moodle for the first time, they are assigned to all the staff only courses within ten minutes.
We use these courses for distributing all of our staff news and information and have stopped producing paper bulletins since moving over to this method.
If you want some pointers on producing such a script I would be happy to help.
Jon
So... MT PM'd me to ask for the script so I thought I would post it here for all to see...
$query will need to be adjusted to enable you to separate staff from students and the role_assign at the end of the script will need adjusting to match the category or course that you want it to update... You can then add this as a cron script to run every 10 minutes or so...
Jon
<?php
// script to automatically add users to a course or a category in Moodle 1.9
// edited to be run from outside of the web root...
// Jon Witts 21 May 2009 - edited 2 July 2009
require_once('www/vle/config.php');
$ids = array();
mysql_connect($CFG->dbhost, $CFG->dbuser, $CFG->dbpass);
mysql_select_db($CFG->dbname);
$query = 'SELECT * FROM `vle154_user` WHERE `email` LIKE "%shunsley.eril.net" and 'email' not like "0%";
$res = mysql_query($query);
while(list($userid) = mysql_fetch_row($res))
{
$ids[] = $userid;
}
//echo '<h2>Processing UserIDs</h2>';
foreach($ids as $uid)
{
//student roleid 5, staff category context is 53...
//role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $timeend$
role_assign('5', $uid, '0', '53');
}
?>
Jon