From 88a46c0f1e72abb4dd47769741ed98b593af3a46 Mon Sep 17 00:00:00 2001 From: Melanie Treitinger Date: Tue, 21 Feb 2023 15:15:16 +0100 Subject: [PATCH] Add admin option to set default response type option - solves #468 --- settings.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/settings.php b/settings.php index 732ed0b5..707a9a5a 100644 --- a/settings.php +++ b/settings.php @@ -51,4 +51,14 @@ $settings->add(new admin_setting_configcheckbox('questionnaire/allowemailreporting', get_string('configemailreporting', 'questionnaire'), get_string('configemailreportinglong', 'questionnaire'), 0)); + + $questionnairetypes = array (1 => get_string('qtypeonce', 'questionnaire'), + 0 => get_string('qtypeunlimited', 'questionnaire'), + 2 => get_string('qtypedaily', 'questionnaire'), + 3 => get_string('qtypeweekly', 'questionnaire'), + 4 => get_string('qtypemonthly', 'questionnaire')); + + $settings->add(new admin_setting_configselect('questionnaire/qtype', + get_string('default').': '.get_string('qtype', 'questionnaire'), + get_string('qtype_help', 'questionnaire'), 1, $questionnairetypes)); }