What on earth are restricted users?

What on earth are restricted users?

de către Tim Hunt-
Număr de răspunsuri: 8
Imaginea Core developers Imaginea Documentation writers Imaginea Particularly helpful Moodlers Imaginea Peer reviewers Imaginea Plugin developers
Actually, I have worked it out on my own: They are a bit of a hack.

See this comment in config-dist.php:

 
// Restrict certain usernames from doing things that may mess up a site
// This is especially useful for demonstration teacher accounts
// $CFG->restrictusers = 'teacher,fred,jim';


and the functions check_for_restricted_user() and is_restricted_user() in moodlelib.php.

Can this nastiness be removed as part of the roles and permissions work?

There are only two calls to is_restricted_user, and 11 calls to check_for_restricted_user in the codebase,
Media notelor: -
Ca răspuns la Tim Hunt

Re: What on earth are restricted users?

de către Martin Dougiamas-
Imaginea Core developers Imaginea Documentation writers Imaginea Moodle HQ Imaginea Particularly helpful Moodlers Imaginea Plugin developers Imaginea Testers
It's now ancient history and gone from HEAD.

It was an old hack primarily for sites like moodle.org that used to have demo teacher accounts. Of course all that is now possible using Roles.
Ca răspuns la Martin Dougiamas

Re: What on earth are restricted users?

de către J. Chan-

Hello everyone,

The restricted users at my site are first configured to disable their access to change passwords. (following the advice from http://moodle.org/mod/forum/discuss.php?d=10973#176076 )

However, I found out that courses (eg. Course A) that do not need a password to enrol refuse to accept the "restricted users" to enter. Moreover, even I gave the "restricted users" the enrollment keys to some other courses (e.g. Course B), the restricted users are not given a screen to key in password or "key". They are simply refused. I double check the situation by removing one student from the restricted user list, and he could then successfully enrol in Courses A and B.

The problem is : all the students at my site are "restricted users". They are NOT allowed to change their passwords. It's our policy. But this year, when we try not to enrol students manually (as such we did in the past) and let them enrol in some selective courses, all of them failed to do so.

Any ideas ?

James

Ca răspuns la Martin Dougiamas

Re: What on earth are restricted users?

de către Samuli Karevaara-
"Of course all that is now possible using Roles"

For anyone finding this out the same way I did (the hard way): in 1.7 and 1.8 the restricted users config setting has been removed, but the roles implementation does not make it possible to simulate that. It looks like 1.9 is good for that.

But a small grunt: the setting should have been removed only after the roles implementation simulates it...
Ca răspuns la Samuli Karevaara

Re: What on earth are restricted users?

de către Martin Dougiamas-
Imaginea Core developers Imaginea Documentation writers Imaginea Moodle HQ Imaginea Particularly helpful Moodlers Imaginea Plugin developers Imaginea Testers
Sorry ... can you be more specific? What wasn't possible in 1.7?
Ca răspuns la Martin Dougiamas

Re: What on earth are restricted users?

de către Séverin TERRIER-
Imaginea Documentation writers Imaginea Particularly helpful Moodlers Imaginea Testers Imaginea Translators
Reading that, i mainly think at the capability moodle/user:editownprofile, available since Moodle 1.9.

Séverin
Ca răspuns la Séverin TERRIER

Re: What on earth are restricted users?

de către Martin Dougiamas-
Imaginea Core developers Imaginea Documentation writers Imaginea Moodle HQ Imaginea Particularly helpful Moodlers Imaginea Plugin developers Imaginea Testers
Ah, yes, a bug. I remember wrongly assuming moodle/user:editprofile would be able to do the job.
Ca răspuns la Martin Dougiamas

Re: What on earth are restricted users?

de către Samuli Karevaara-
Also, I made a silly mistake of not noticing that the bug about this that was fixed almost a year ago (last April) was marked fixed for 1.9 only. No biggie, but we did have a creative use of the demo account profile information by a prankster surprise Now we locked a bit more than was necessary and are waiting for the upgrade to 1.9 surâs