diff --git a/lms/envs/common.py b/lms/envs/common.py index 3fa191876927590ced1939a6082b447793addc73..b09af34b38262a9e1253116d3a07b82523aa7361 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -103,6 +103,9 @@ MITX_FEATURES = { # with Shib. Feature was requested by Stanford's office of general counsel 'SHIB_DISABLE_TOS': False, + # Can be turned off if all courses are invite-only. Effects views and templates. + 'ENABLE_STUDENT_SELF_ENROLLMENT': True, + # Enables ability to restrict enrollment in specific courses by the user account login method 'RESTRICT_ENROLL_BY_REG_METHOD': False, diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 0a5892e3ea0204a361d84b4cc97e516c742af5ba..3e851ecbc6d866f29315076b7fde43002ea9e861 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -332,10 +332,14 @@ </ul> % else: <section class="empty-dashboard-message"> - <p>${_("Looks like you haven't registered for any courses yet.")}</p> - <a href="${marketing_link('COURSES')}"> + % if settings.MITX_FEATURES.get('ENABLE_STUDENT_SELF_ENROLLMENT'): + <p>${_("Looks like you haven't registered for any courses yet.")}</p> + <a href="${marketing_link('COURSES')}"> ${_("Find courses now!")} - </a> + </a> + % else: + <p>${_("Looks like you haven't joined any courses yet.")}</p> + %endif </section> % endif diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 1dd5aa5229f8ca678f1f7c26ec32df3e411c38cf..d44cd0e1b29d4c011b7e737770c926df0c93774e 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -57,9 +57,11 @@ site_status_msg = get_site_status_msg(course_id) <ol class="left nav-global authenticated"> <%block name="navigation_global_links_authenticated"> - <li class="nav-global-01"> - <a href="${marketing_link('COURSES')}">${_('Find Courses')}</a> - </li> + % if settings.MITX_FEATURES.get('ENABLE_STUDENT_SELF_ENROLLMENT'): + <li class="nav-global-01"> + <a href="${marketing_link('COURSES')}">${_('Find Courses')}</a> + </li> + % endif </%block> </ol> <ol class="user">