This commit is contained in:
SpudGunMan
2025-10-18 09:10:47 -07:00
parent 37bf30cbc0
commit 0da780371a
3 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -378,8 +378,10 @@ tictactoe = True
# enable or disable the quiz game module questions are in data/quiz.json
quiz = False
# enable or disable the survey game module questions are in data/survey/survey.json
# enable or disable the survey game module questions are in data/survey/*_survey.json
survey = False
# this is the default survey to use when command givcen, from data/survey/example_survey.json
defaultSurvey = example
# Whether to record user ID in responses
surveyRecordID=True
# Whether to record location on start of survey
+1
View File
@@ -405,6 +405,7 @@ try:
tictactoe_enabled = config['games'].getboolean('tictactoe', True)
quiz_enabled = config['games'].getboolean('quiz', False)
survey_enabled = config['games'].getboolean('survey', False)
default_survey = config['games'].get('defaultSurvey', 'example') # default example
surveyRecordID = config['games'].getboolean('surveyRecordID', True)
surveyRecordLocation = config['games'].getboolean('surveyRecordLocation', True)
+1 -1
View File
@@ -52,7 +52,7 @@ class SurveyModule:
try:
"""Begin a new survey session for a user."""
if not survey_name:
survey_name = 'example'
survey_name = default_survey
if survey_name not in allowedSurveys:
return f"error: survey '{survey_name}' is not allowed."
self.responses[user_id] = {