From df691f19ff25e8c1a56c0554338b9d2d814d318b Mon Sep 17 00:00:00 2001 From: Stefan Dworschak Date: Tue, 30 Apr 2024 16:22:40 +0100 Subject: [PATCH] Adding field for support tabs to program (#126) --- .../migrations/0008_program_support_tabs.py | 18 ++++++++++++++++++ lms/djangoapps/ci_program/models.py | 6 ++++++ lms/envs/production.py | 1 + 3 files changed, 25 insertions(+) create mode 100644 lms/djangoapps/ci_program/migrations/0008_program_support_tabs.py diff --git a/lms/djangoapps/ci_program/migrations/0008_program_support_tabs.py b/lms/djangoapps/ci_program/migrations/0008_program_support_tabs.py new file mode 100644 index 0000000000..68866c1441 --- /dev/null +++ b/lms/djangoapps/ci_program/migrations/0008_program_support_tabs.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.14 on 2024-04-26 16:37 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ci_program', '0007_auto_20230613_1400'), + ] + + operations = [ + migrations.AddField( + model_name='program', + name='support_tabs', + field=models.CharField(blank=True, help_text='Comma-separated list of support tabs available for Program', max_length=255, null=True), + ), + ] diff --git a/lms/djangoapps/ci_program/models.py b/lms/djangoapps/ci_program/models.py index bdcc28b82f..2f062c65f7 100644 --- a/lms/djangoapps/ci_program/models.py +++ b/lms/djangoapps/ci_program/models.py @@ -83,6 +83,12 @@ class Meta: null=True, blank=True ) + support_tabs = models.CharField( + max_length=255, + help_text=_('Comma-separated list of support tabs available for Program'), + null=True, + blank=True, + ) enrolled_students = models.ManyToManyField( User, blank=True) # This is used for getting the path to the enrollment email files diff --git a/lms/envs/production.py b/lms/envs/production.py index 547d1bca42..5b60918253 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -1056,6 +1056,7 @@ def should_show_debug_toolbar(request): BREADCRUMB_INDEX_URL = AUTH_TOKENS.get('BREADCRUMB_INDEX_URL') PROGRAMMES_WITHOUT_PROGRESS = AUTH_TOKENS.get('PROGRAMMES_WITHOUT_PROGRESS') SUPPORT_TAB_FEATURES = AUTH_TOKENS.get('SUPPORT_TAB_FEATURES') +DEFAULT_SUPPORT_TABS = (AUTH_TOKENS.get('DEFAULT_SUPPORT_TABS', 'slack,studentcare,tutor')).split(',') INTERCOM_APP_ID = AUTH_TOKENS.get('INTERCOM_APP_ID') INTERCOM_IDENTIFICATION_SECRET_KEY = AUTH_TOKENS.get('INTERCOM_IDENTIFICATION_SECRET_KEY')