How can we disable the students from editing there username and changing password?
RAFI
Student shouldn't edit there username provided by the teachers.
What change should i make in edit.php for the above said??
rafi
after making comment on edit.php what will happen to the student creating new profile??
RAFI
Tom thanks for your help.
RAFI.
Use an external authentication, then edit the "edit.html" to prevent users in changing thier profile... see sample attachment below (temporary solution???)
Thank you.
One more,How to add photo's to the profile?
Thanks
RAF
The above sample may cause you some error in data storage. So better edit the edit.php
TOM:
What part of edit.php should be edited?
Martin,
Can I add this in the config.php:
$CFG->disableuserfirstname = true;
$CFG->disableuserlastname = true;
How can this be done to disable changes in the personal profile...?
I'd love to know the same thing only I would need to disable email as well!
Thanks
Ger this solution implies a security problem, becouse the user can change the html in the client side and send it back modified.
Martin, thank you VERY much. I have been such a tremendous devotee of Moodle. Your product is wonderful. These students have been driving me crazy! THANK YOU!!!!!!!!!
Actually, doesn't that just solve half the problem? The students create additional profiles for themselves so that then I have their original profile as a user and enrolled in the course. The new profile then isn't in the class because they can't enrol themselves - I don't want them to be able to enrol themselves or I have 2 of JoeWhoDunItAgain in the grade book. As a result, however, they find they can't get into the course and email me incessantly.
I've now made it so that they cannot progress into the site without logging in - and they also cannot edit their profiles. I don't think they can even create a new profile, although I'm not sure of this.
In a nutshell, I'd like to make it so that no one can create a new user account and that no one can edit his/her profile. While this sounds to be counter-Moodle, I believe it's the only way to control who's in the site and classes.
hi Ellen
no too sure if i'm reading into this too much, but what authentication type are you using?
i had a similar issue [students being sent to a profile page upon login] when initially implementing LDAP authentication. the issue was that our students do not have email addresses. therefore, an import from our LDAP server resulted in invalid profiles [moodle 'requires' an email address].
the end result was that i modified some of the code to import 'dummy' email addresses as part of the import, then disabled the options in code on the profile page [as well as the verification pages].
you may need to consider which authentication option you want. there are so many out there [most in my opinion preferable to 'email']. Of course as martin mentioned you could just set auth to 'manual', and then the site admin would have to setup all accounts.
regards,
Kieran
Kieran, I don't want them to be able to either create new or edit profiles. I've added the code so that they cannot edit their profiles. This was important because as many times as I've explained it in class, they still go in and remove student id's and create weird names for themselves.
Worst of all is the fact that they keep creating duplicates of themselves, as opposed to editing the profile that exists. For them, it seems like the easier route, to just create a new profile (and the wording on the site invites them to do that - can't find the coding to change the wording!). This means that I then have 2 of whomever in my gradebook.
Can I make it so that they cannot create user accounts.
Disable editing of User Profile for all users excluding admin
To disable editing of the user profile by students and teachers and only allow your admins to edit these you can add a couple of lines to the user/edit.php file. see below.
require_once("../config.php");
require_once("$CFG->libdir/gdlib.php");
require_variable($id); // user id
require_variable($course); // course id
if (! $user = get_record("user", "id", $id)) {
error("User ID was incorrect");
}
if (!isadmin()) {
error("You do not have permission to access this area");
}
if (! $course = get_record("course", "id", $course)) {
error("Course ID was incorrect");
}
If you find this useful or have any other queries please could you let me know.
Regards.
DK
I'm getting kicked out also. My site now says access denied even when just typing in the address after dumping all internet files online and off.
This method removes any way for users to create their own accounts. All accounts must be manually created by the admin user. |
I'd missed this.
Between this and locking various fields, I believe the problem is solved!!!!
Will this work with the latest version of Moodle?
Thanks
Hi Leonidas,
Thanks for your tips. This solve my problem . I'm using Moodle 2.9 and its still work.
May i ask one question ,
How to disable user to update their profile picture ?
If you want to prevent users changing their profile picture, please see Administration > Site administration > Security > Site policies >Disable user profile images.