@@ -80,12 +80,6 @@ public function createAnswersForm($form)
8080 // Can be more options in the future
8181 $ optionData = Question::readQuestionOption ($ this ->id , $ course_id );
8282
83- // Safe input attrs (force visibility even if global CSS sets appearance:none)
84- $ choiceInputAttrs = [
85- 'class ' => 'h-4 w-4 cursor-pointer ' ,
86- 'style ' => 'appearance:auto;-webkit-appearance:auto; ' ,
87- ];
88-
8983 for ($ i = 1 ; $ i <= $ nb_answers ; $ i ++) {
9084 $ form ->addHtml ('<tr> ' );
9185
@@ -139,7 +133,7 @@ public function createAnswersForm($form)
139133 foreach ($ optionData as $ data ) {
140134 $ value = (int ) ($ data ['iid ' ] ?? 0 );
141135 if ($ value > 0 ) {
142- $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , $ value, $ choiceInputAttrs );
136+ $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , $ value );
143137 $ count ++;
144138 }
145139 if ($ count >= 2 ) {
@@ -148,13 +142,13 @@ public function createAnswersForm($form)
148142 }
149143 } else {
150144 // Fallback
151- $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 1 , $ choiceInputAttrs );
152- $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 2 , $ choiceInputAttrs );
145+ $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 1 );
146+ $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 2 );
153147 }
154148 } else {
155149 // New question: positions 1/2 are mapped to the real option iids on save
156- $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 1 , $ choiceInputAttrs );
157- $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 2 , $ choiceInputAttrs );
150+ $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 1 );
151+ $ form ->addElement ('radio ' , 'correct[ ' .$ i .'] ' , null , null , 2 );
158152
159153 $ defaults ['answer[ ' .$ i .'] ' ] = '' ;
160154 $ defaults ['comment[ ' .$ i .'] ' ] = '' ;
0 commit comments