Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Not a bug
-
Affects Version/s: 1.9.5
-
Fix Version/s: None
-
Component/s: Forms Library
-
Labels:None
-
Environment:Windows XP / ubuntu
-
Database:MySQL
-
Difficulty:Moderate
-
Affected Branches:MOODLE_19_STABLE
Description
if you use the Forms library function
$mform->setAdvanced(formControlName);
to toggle the visibility of form controls, and then set the form action to be the same page (containing the form), it is possible for an attempt to be made to insert a duplicate key into user_preferences:
eg
INSERT INTO mdl2_user_preferences ( USERID, NAME, VALUE ) VALUES ( 66, 'mod_rclearningresource_mod_form_search_showadvanced', '0' )
where userid and name are a key of type unique
Hi,
Could you provide an example of code for a form where you see this problem?
Jamie