@@ -60,11 +60,15 @@ protected function definition() {
6060
6161 $ mform ->addElement ('hidden ' , 'cannotchangerespondenttype ' );
6262 $ mform ->setType ('cannotchangerespondenttype ' , PARAM_INT );
63- $ mform ->addElement ('select ' , 'respondenttype ' , get_string ('respondenttype ' , 'questionnaire ' ), $ questionnairerespondents );
63+ $ selectrespondenttype = $ mform ->addElement ('select ' , 'respondenttype ' , get_string ('respondenttype ' , 'questionnaire ' ),
64+ $ questionnairerespondents , array ('tabindex ' => 0 ));
65+ $ selectrespondenttype ->setSelected (get_config ('questionnaire ' , 'respondenttype ' ));
6466 $ mform ->addHelpButton ('respondenttype ' , 'respondenttype ' , 'questionnaire ' );
6567 $ mform ->disabledIf ('respondenttype ' , 'cannotchangerespondenttype ' , 'eq ' , 1 );
6668
67- $ mform ->addElement ('select ' , 'resp_view ' , get_string ('responseview ' , 'questionnaire ' ), $ questionnaireresponseviewers );
69+ $ selectrespview = $ mform ->addElement ('select ' , 'resp_view ' , get_string ('responseview ' , 'questionnaire ' ),
70+ $ questionnaireresponseviewers , array ('tabindex ' => 0 ));
71+ $ selectrespview ->setSelected (get_config ('questionnaire ' , 'resp_view ' ));
6872 $ mform ->addHelpButton ('resp_view ' , 'responseview ' , 'questionnaire ' );
6973
7074 $ notificationoptions = array (0 => get_string ('no ' ), 1 => get_string ('notificationsimple ' , 'questionnaire ' ),
@@ -144,6 +148,9 @@ protected function definition() {
144148
145149 $ this ->standard_coursemodule_elements ();
146150
151+ // Apply locked admin settings.
152+ $ this ->apply_admin_defaults ();
153+
147154 // Buttons.
148155 $ this ->add_action_buttons ();
149156 }
0 commit comments