Skip to content

Commit

Permalink
Merge pull request #428 from eduNEXT/ju/ednx/HA-24
Browse files Browse the repository at this point in the history
ju/ednx/HA-24: allowing to show welcome message after dismissed using settings
  • Loading branch information
mariajgrimaldi authored Oct 4, 2020
2 parents 727ae82 + b2e0daa commit 83e8546
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openedx/features/course_experience/views/welcome_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import six
from django.http import HttpResponse
from django.conf import settings
from django.template.loader import render_to_string
from django.urls import reverse
from django.views.decorators.csrf import ensure_csrf_cookie
Expand Down Expand Up @@ -45,7 +46,9 @@ def render_to_fragment(self, request, course_id=None, **kwargs):
'welcome_message_html': welcome_message_html,
}

if get_course_tag(request.user, course_key, PREFERENCE_KEY) == 'False':
# HA-24 added by edunext in order to disable the permanent welcome message dismiss
if (not settings.FEATURES.get('EDNX_DISABLE_DISMISS_WELCOME_MESSAGE', False) and
get_course_tag(request.user, course_key, PREFERENCE_KEY) == 'False'):
return None
else:
html = render_to_string('course_experience/welcome-message-fragment.html', context)
Expand Down

0 comments on commit 83e8546

Please sign in to comment.