3535 * @property array _customdata
3636 */
3737class edit_question_form extends \moodleform {
38-
3938 /**
4039 * Form definition.
4140 */
@@ -75,7 +74,7 @@ public function validation($data, $files) {
7574 $ errors ["length " ] = get_string ('notenoughscaleitems ' , 'questionnaire ' );
7675 }
7776 // If this is a rate question with no duplicates option.
78- if ($ data ['precise ' ] == 2 ) {
77+ if ($ data ['precise ' ] == 2 ) {
7978 $ allchoices = $ data ['allchoices ' ];
8079 $ allchoices = explode ("\n" , $ allchoices );
8180 $ nbvalues = 0 ;
@@ -92,8 +91,12 @@ public function validation($data, $files) {
9291
9392 // If this is a slider question.
9493 if ($ data ['type_id ' ] == QUESSLIDER ) {
95- if (isset ($ data ['minrange ' ]) && isset ($ data ['maxrange ' ]) && isset ($ data ['startingvalue ' ]) &&
96- isset ($ data ['stepvalue ' ])) {
94+ if (
95+ isset ($ data ['minrange ' ]) &&
96+ isset ($ data ['maxrange ' ]) &&
97+ isset ($ data ['startingvalue ' ]) &&
98+ isset ($ data ['stepvalue ' ])
99+ ) {
97100 if ($ data ['minrange ' ] >= $ data ['maxrange ' ]) {
98101 $ errors ['maxrange ' ] = get_string ('invalidrange ' , 'questionnaire ' );
99102 }
@@ -134,7 +137,7 @@ public function __get($name) {
134137 } else if ($ name == '_customdata ' ) {
135138 return $ this ->_customdata ;
136139 } else {
137- throw new \coding_exception ($ name. ' is not a publicly accessible property of ' . get_class ($ this ));
140+ throw new \coding_exception ($ name . ' is not a publicly accessible property of ' . get_class ($ this ));
138141 }
139142 }
140143}
0 commit comments