From 3ff203d11f3847621b175e9174b565fac083f4d1 Mon Sep 17 00:00:00 2001
From: Usman Khalid <usman.khalid@arbisoft.com>
Date: Mon, 23 Sep 2013 15:04:11 +0000
Subject: [PATCH] Renamed setting ENABLE_STUDENT_SELF_ENROLLMENT to
 COURSES_ARE_BROWSABLE

---
 lms/envs/common.py            |  4 ++--
 lms/templates/dashboard.html  |  2 +-
 lms/templates/index.html      | 20 +++++++++++---------
 lms/templates/navigation.html |  2 +-
 4 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/lms/envs/common.py b/lms/envs/common.py
index b09af34b382..ba060f5ab1e 100644
--- a/lms/envs/common.py
+++ b/lms/envs/common.py
@@ -103,8 +103,8 @@ 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,
+    # Can be turned off if course lists need to be hidden. Effects views and templates.
+    'COURSES_ARE_BROWSABLE': 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 3e851ecbc6d..bca2bf8c381 100644
--- a/lms/templates/dashboard.html
+++ b/lms/templates/dashboard.html
@@ -332,7 +332,7 @@
       </ul>
     % else:
       <section class="empty-dashboard-message">
-        % if settings.MITX_FEATURES.get('ENABLE_STUDENT_SELF_ENROLLMENT'):
+        % if settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'):
           <p>${_("Looks like you haven't registered for any courses yet.")}</p>
           <a href="${marketing_link('COURSES')}">
             ${_("Find courses now!")}
diff --git a/lms/templates/index.html b/lms/templates/index.html
index 0fecd24e840..83024e01aa7 100644
--- a/lms/templates/index.html
+++ b/lms/templates/index.html
@@ -165,15 +165,17 @@
         </section>
       % endif
 
-      <section class="courses">
-          <ul class="courses-listing">
-          %for course in courses:
-            <li class="courses-listing-item">
-              <%include file="course.html" args="course=course" />
-            </li>
-          %endfor
-          </ul>
-      </section>
+      % if settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'):
+        <section class="courses">
+            <ul class="courses-listing">
+            %for course in courses:
+              <li class="courses-listing-item">
+                <%include file="course.html" args="course=course" />
+              </li>
+            %endfor
+            </ul>
+        </section>
+      % endif
     </section>
   </section>
 </section>
diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html
index d44cd0e1b29..680838a7199 100644
--- a/lms/templates/navigation.html
+++ b/lms/templates/navigation.html
@@ -57,7 +57,7 @@ site_status_msg = get_site_status_msg(course_id)
 
     <ol class="left nav-global authenticated">
       <%block name="navigation_global_links_authenticated">
-        % if settings.MITX_FEATURES.get('ENABLE_STUDENT_SELF_ENROLLMENT'):
+        % if settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'):
           <li class="nav-global-01">
             <a href="${marketing_link('COURSES')}">${_('Find Courses')}</a>
           </li>
-- 
GitLab