File size: 892 Bytes
d0f716d
 
 
 
 
 
 
 
 
 
 
f612514
d0f716d
 
f612514
 
 
 
 
d0f716d
 
f612514
 
 
d0f716d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
File: practical_tasks.py
Author: Elena Ryumina and Dmitry Ryumin
Description: Event handler for Gradio app to filter practical tasks based on selected practical tasks.
License: MIT License
"""

# Importing necessary components for the Gradio app
from app.config import config_data
from app.practical_tasks import supported_practical_tasks
from app.components import radio_create_ui
from app.utils import get_language_settings


def event_handler_practical_tasks(
    language, practical_tasks, practical_subtasks_selected
):
    lang_id, _ = get_language_settings(language)

    return radio_create_ui(
        practical_subtasks_selected[practical_tasks],
        config_data.Labels_PRACTICAL_SUBTASKS_LABEL[lang_id],
        supported_practical_tasks[lang_id][practical_tasks],
        config_data.InformationMessages_PRACTICAL_SUBTASKS_INFO[lang_id],
        True,
        True,
    )