diff --git a/helper/exercises.py b/helper/exercises.py index 14fe762..4e3e5ae 100644 --- a/helper/exercises.py +++ b/helper/exercises.py @@ -114,7 +114,7 @@ def build_write_blanks_text(questions: [], start_id): def build_write_blanks_text_form(form: [], start_id): result = "" replaced_words = [] - for i, entry in enumerate(form, start=1): + for i, entry in enumerate(form, start=start_id): placeholder = '{{' + str(i) + '}}' # Use regular expression to find the string after ':' match = re.search(r'(?<=:)\s*(.*)', entry) @@ -594,7 +594,7 @@ def gen_write_blanks_notes_exercise_listening_conversation(text: str, quantity: replaced_notes = replace_first_occurrences_with_placeholders_notes(questions, words, start_id) return { "id": str(uuid.uuid4()), - "maxWords": 1, + "maxWords": 3, "prompt": "Fill the blank space with the word missing from the audio.", "solutions": build_write_blanks_solutions_listening(words, start_id), "text": "\\n".join(replaced_notes), @@ -619,7 +619,7 @@ def gen_write_blanks_notes_exercise_listening_monologue(text: str, quantity: int replaced_notes = replace_first_occurrences_with_placeholders_notes(questions, words, start_id) return { "id": str(uuid.uuid4()), - "maxWords": 1, + "maxWords": 3, "prompt": "Fill the blank space with the word missing from the audio.", "solutions": build_write_blanks_solutions_listening(words, start_id), "text": "\\n".join(replaced_notes), @@ -642,7 +642,7 @@ def gen_write_blanks_form_exercise_listening_conversation(text: str, quantity: i replaced_form, words = build_write_blanks_text_form(parsed_form, start_id) return { "id": str(uuid.uuid4()), - "maxWords": 1, + "maxWords": 3, "prompt": "You will hear a conversation. Fill the form with words/numbers missing.", "solutions": build_write_blanks_solutions_listening(words, start_id), "text": replaced_form, @@ -665,7 +665,7 @@ def gen_write_blanks_form_exercise_listening_monologue(text: str, quantity: int, replaced_form, words = build_write_blanks_text_form(parsed_form, start_id) return { "id": str(uuid.uuid4()), - "maxWords": 1, + "maxWords": 3, "prompt": "You will hear a monologue. Fill the form with words/numbers missing.", "solutions": build_write_blanks_solutions_listening(words, start_id), "text": replaced_form,