What on earth are restricted users?

What on earth are restricted users?

από Tim Hunt -
Αριθμός απαντήσεων: 8
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Peer reviewers Φωτογραφία 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,
Μέσος όρος βαθμολογίας: -
Σε απάντηση σε Tim Hunt

Re: What on earth are restricted users?

από Martin Dougiamas -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία 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.
Σε απάντηση σε Martin Dougiamas

Re: What on earth are restricted users?

από 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

Σε απάντηση σε Martin Dougiamas

Re: What on earth are restricted users?

από 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...
Σε απάντηση σε Samuli Karevaara

Re: What on earth are restricted users?

από Martin Dougiamas -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers
Sorry ... can you be more specific? What wasn't possible in 1.7?
Σε απάντηση σε Martin Dougiamas

Re: What on earth are restricted users?

από Séverin TERRIER -
Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Testers Φωτογραφία Translators
Reading that, i mainly think at the capability moodle/user:editownprofile, available since Moodle 1.9.

Séverin
Σε απάντηση σε Séverin TERRIER

Re: What on earth are restricted users?

από Martin Dougiamas -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers
Ah, yes, a bug. I remember wrongly assuming moodle/user:editprofile would be able to do the job.
Σε απάντηση σε Martin Dougiamas

Re: What on earth are restricted users?

από 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 χαμόγελο