ztechguy
Saludos. Iñaki.
Re: Can you disable the edit profile option for students?
Is there a way to lock/disable the fields that are revealed by the "Advanced" button? Or, is there a way to prevent students (but not admins) from accessing the "Advanced" section altogether?
Also, is there a way to disable the "Interests" field of the profile?
Thanks.
Craig.
Re: Can you disable the edit profile option for students?
Thanks,
Alan
I want to put an anchor link on the advance edit page where Registering Students put in the custom data about themselves.

I know html but lost in php. I don't want to mess up the php code.
Any ideas on how or where I put in the anchor on the editadvance.php or editadvance_form.php page?
It would be nice if there was an add anchor option when you set up custom fields.
Timothy Kane
training@nvabc.com
Thanks,
Jason
Re: Can you disable the edit profile option for students?
The user/editlib.php is responsible for print out (and set default values) for user fields. So you just need to comment out some fields that you don't want to use, or just make them hidden:
The field won't show up, and is not in using:
// Moodle optional fields
// $mform->addElement('header', 'moodle_optional', get_string('optional', 'form'));
// $mform->setAdvanced('moodle_optional');
The field won't show up, but it is in use just hidden, and passing default values to the database:
$choices = array();
$choices['1'] = get_string('autosubscribeyes');
$choices['0'] = get_string('autosubscribeno');
// $mform->addElement('select', 'autosubscribe', get_string('autosubscribe'), $choices);
$mform->addElement('hidden', 'autosubscribe', get_string('autosubscribe'), $choices);
$mform->setDefault('autosubscribe', 1);
$mform->setAdvanced('autosubscribe');
The commented line is the original, under it is the new one. Changed the field type from 'select' to 'hidden'. Then at the 'setDefault' you can set the value of this field.
Cheers
Re: Can you disable the edit profile option for students?
Thanks, that helped me. Moodle 2.3
I actually want to export each students' group name when I export grades from the grader report. A work around I figure from your advice here is to use the now unused Department as a place to store it, however, it would be better to change the grade_export_xls.php file to query the database for that information directly. My level of Moodle knowledge is too limited to know how to tell that file where to find it. I tried replacing 'department' with 'group,' it updated the column correctly, but it mustn't be the associated field because it exported null in each cell.
Find the advice I used in GB export to excel doesn't include all mandatory fields
'city' worked and pulled the city name from the profiles,
groupname, group1, and several others did not work.
It would also be useful to export some custom user profile fields but they appear as profile_field_section or *whatever surrounded by square brackets in the column heading instead of the field name; as with 'idnumber' appears as ID Number, 'department' appears as Department, 'group' appeared as Group, etc.