Stop user from uploading avatar

Stop user from uploading avatar

door Matthew Harris -
Aantal antwoorden: 14
Hi,

Is there anyway I can disable this option for a particular user?

Some students seem to like uploading inappropriate images.

Thankyou
Gemiddelde van de beoordelingen:  -
Als antwoord op Matthew Harris

Re: Stop user from uploading avatar

door Art Lader -
Hi, Matthew,

I believe that you can set this variable in config.php. I think that uncommenting the appropriate line below will do the trick.

Hope this helps a bit. 

Regards,
Art
Gemiddelde van de beoordelingen:  -
Als antwoord op Art Lader

Re: Stop user from uploading avatar

door Robert Brenstein -
The disableuserimages flag will block avatar uploads for all users not a particular one, which is what I think the original poster inquired. I think, however, it would not be difficult to make a hack to block selected users. I would try simple unix-like locking mechanism: place a file of specific name in user's folder and add code on the profile page check the presence of that file: if the lock file is found, the avatar section is not shown to student. Or better, if there are some unused fields in user profile, made one field invisible and use it for controlling avatars on user level.
Gemiddelde van de beoordelingen: Useful (1)
Als antwoord op Robert Brenstein

Re: Stop user from uploading avatar

door David Cockayne -
I'm not sure if this will work, I've not tested it but it is worth a shot.
Find out what the unique id of the naughty student account is, if you view or edit the student profile it shows up in the address bar as ?id=234

Open up the moodledata store, there is a folder called users/
Inside you should see a load of folders with just numbers for names.
Open the folder that has the same number as the student's id.
You should see 2 images f1.jpg and f2.jpg
Replace these images with non-offensive ones ( 100x100 pixels & 35x35 pixels)
Now make the images read only.
On my testing 1.7 moodle (windows) moodle fails to write the new images silently.

Gemiddelde van de beoordelingen: Useful (1)
Als antwoord op Robert Brenstein

Re: Stop user from uploading avatar

door Jon Lunn -

I would like the ability to reward users who obey the rules with the ability to customise their profiles more and use things like the instant messaging system etc.  At present I have to disable all the fun stuff due to unacceptable use by a few students.

So if anyone plans to write this funtionality into a future release I would very much appreciate it.

Gemiddelde van de beoordelingen:  -
Als antwoord op Jon Lunn

Re: Stop user from uploading avatar

door Art Lader -
Hi, Jon,

I wonder if it would not be possible to write one role for students who behave well and another for students who do not? I think that might, indeed, be doable for folks who are running 1.7 and above.

Regards,
Art
Gemiddelde van de beoordelingen:  -
Als antwoord op Art Lader

Re: Stop user from uploading avatar

door Jeff Wood -
Great idea Art,

I'm going to give it a try (1.7).

Jeff

PS - Did try it and every "student" that submitted an assignment no longer did when I changed their role. I'll have to investigate further.
Gemiddelde van de beoordelingen:  -
Als antwoord op Art Lader

Re: Stop user from uploading avatar

door Greg Jeffrey -

Hi Matthew

Sadly it's not just the kids!  We haven't gone live with them and already I have teachers replacing their mugshots with Superman and Darth Vader avatars!!!  How on  earth am I to get the students to behave themselves with this example?

In adding this block are administrators still able to set images through the usual edit profile screen? 

Gemiddelde van de beoordelingen:  -
Als antwoord op Greg Jeffrey

Re: Stop user from uploading avatar

door Anthony Borrow -
Foto van Core developers Foto van Plugin developers Foto van Testers
Yes, the admin can still change pictures.
Gemiddelde van de beoordelingen:  -
Als antwoord op Anthony Borrow

Re: Stop user from uploading avatar

door Russell Myers -
Hi All,

I am looking into this request on my moodle, and I tried to deny students from editing the profile using 1.7.1, but it didn't work. Which capability do I need to deny? Anyone have other ways to do this for certain users?

Thanks!
Gemiddelde van de beoordelingen:  -
Als antwoord op Matthew Harris

Re: Stop user from uploading avatar

door Shane Elliott -
Foto van Core developers Foto van Plugin developers
If you are using 1.7 or higher then you could create a role with permission to edit their own profile switched off.
Gemiddelde van de beoordelingen: Useful (2)
Als antwoord op Shane Elliott

Re: Stop user from uploading avatar

door Janice Smith -

If you remove the permission to edit their own profile, does that stop them being able to change their password?

We like the idea of students unable to edit their profiles/upload inappropriate avatars etc, but not being able to change their password would be a disaster for us!

Gemiddelde van de beoordelingen:  -