@@ -1249,22 +1249,22 @@ public function print_survey($quser, $userid=false) {
1249
1249
$ this ->survey_render ($ formdata , $ formdata ->sec , $ msg );
1250
1250
$ controlbuttons = [];
1251
1251
if ($ formdata ->sec > 1 ) {
1252
- $ controlbuttons ['prev ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-secondary ' ,
1252
+ $ controlbuttons ['prev ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-secondary control-button-prev ' ,
1253
1253
'value ' => '<< ' .get_string ('previouspage ' , 'questionnaire ' )];
1254
1254
}
1255
1255
if ($ this ->resume ) {
1256
- $ controlbuttons ['resume ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-secondary ' ,
1256
+ $ controlbuttons ['resume ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-secondary control-button-save ' ,
1257
1257
'value ' => get_string ('save_and_exit ' , 'questionnaire ' )];
1258
1258
}
1259
1259
1260
1260
// Add a 'hidden' variable for the mod's 'view.php', and use a language variable for the submit button.
1261
1261
1262
1262
if ($ formdata ->sec == $ numsections ) {
1263
1263
$ controlbuttons ['submittype ' ] = ['type ' => 'hidden ' , 'value ' => 'Submit Survey ' ];
1264
- $ controlbuttons ['submit ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-primary ' ,
1264
+ $ controlbuttons ['submit ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-primary control-button-submit ' ,
1265
1265
'value ' => get_string ('submitsurvey ' , 'questionnaire ' )];
1266
1266
} else {
1267
- $ controlbuttons ['next ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-secondary ' ,
1267
+ $ controlbuttons ['next ' ] = ['type ' => 'submit ' , 'class ' => 'btn btn-secondary control-button-next ' ,
1268
1268
'value ' => get_string ('nextpage ' , 'questionnaire ' ).' >> ' ];
1269
1269
}
1270
1270
$ this ->page ->add_to_page ('controlbuttons ' , $ this ->renderer ->complete_controlbuttons ($ controlbuttons ));
@@ -1848,7 +1848,11 @@ private function response_check_format($section, $formdata, $checkmissing = true
1848
1848
}
1849
1849
if (!$ this ->questions [$ questionid ]->response_complete ($ formdata )) {
1850
1850
$ missing ++;
1851
- $ strmissing .= get_string ('num ' , 'questionnaire ' ).$ qnum .'. ' ;
1851
+ $ strnum = get_string ('num ' , 'questionnaire ' ).$ qnum .'. ' ;
1852
+ $ strmissing .= $ strnum ;
1853
+ // Pop-up notification at the point of the error.
1854
+ $ strnoti = get_string ('missingquestion ' , 'questionnaire ' ).$ strnum ;
1855
+ $ this ->questions [$ questionid ]->add_notification ($ strnoti );
1852
1856
}
1853
1857
if (!$ this ->questions [$ questionid ]->response_valid ($ formdata )) {
1854
1858
$ wrongformat ++;
0 commit comments