|
[
Permalink
| « Hide
]
Mark Duffy added a comment - 07/May/08 09:39 PM - edited
See Screenshot: Set as Required. Not required on Edit Advanced Page or Email signup page.
See Screenshot: Field set as Required.
Hi Mark,
if I'm not wrong that's because you are editing user profiles as admin, and that role has permissions to update any user profile bypassing the "required" property. But for normal users... the required property will be enforced. Closing this as not a bug. Thanks for the report, feel free to comment/reopen it if necessary. Ciao Recently I had this issue on one of our sites... I have come up with a quick fix
which has been tested with Custom (menu) Lists only. In this instance the Admin wanted to force the Student to select an option from a custom menu field. I have verified this modification works on 1.8 and up. Most of the problems I have seen involving this is not actually a Moodle bug but a matter of implementing validation using Pear HTML_QuickForm_Rules. Here is what I came up with for user profiles (./user/edit.php) . This will File: ./user/edit.php Notes: FileName: ./lib/pear/HTML/QuickForm/RuleRegistry.php (Starting Line 284) } elseif ($element->getType() == 'select') { Make sure First Option of Custom Lists are of type Select-One: FileName: ./usr/profile/field/menu/field.class.php (Line 12-28) /*
function profile_field_menu($fieldid=0, $userid=0) { /// Param 1 for menu type is the options /// Set the data key Adding Jamie and Petr here to see the proposed patch above about enforcing required menus... they are the specialists in that area....
After looking at the code, I'm with Eloy on this one that it is not a bug but instead a feature for the admin. At first, when I was looking at the code I didn't see why the user capability would matter but Eloy's explanation makes sense to me. So I think this is my second time for claiming that this is a feature, not a bug
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||