Merge pull request #19837 from open-craft/opencraft/edx-platform/devan/show-enroll-links-on-public-courses-only-if-self-enrollment-allowed
Show enroll links on public courses only if self enrollment allowed
This commit is contained in:
@@ -551,7 +551,7 @@ class CourseTabView(EdxFragmentView):
|
||||
else:
|
||||
if not CourseEnrollment.is_enrolled(request.user, course.id) and not allow_anonymous:
|
||||
# Only show enroll button if course is open for enrollment.
|
||||
if course_open_for_self_enrollment(course.id):
|
||||
if course_open_for_self_enrollment(course.id) and not course.invitation_only:
|
||||
enroll_message = _(u'You must be enrolled in the course to see course content. \
|
||||
{enroll_link_start}Enroll now{enroll_link_end}.')
|
||||
PageLevelMessages.register_warning_message(
|
||||
|
||||
Reference in New Issue
Block a user