From d2cd8a6a58a40e8c55da06f68dc06972e529dd7e Mon Sep 17 00:00:00 2001 From: Usman Khalid Date: Fri, 20 Sep 2013 15:59:34 +0500 Subject: [PATCH] Added setting to disable find courses links --- lms/envs/common.py | 3 +++ lms/templates/dashboard.html | 10 +++++++--- lms/templates/navigation.html | 8 +++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 3fa1918769..b09af34b38 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 0a5892e3ea..3e851ecbc6 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -332,10 +332,14 @@ % else:
-

${_("Looks like you haven't registered for any courses yet.")}

- + % if settings.MITX_FEATURES.get('ENABLE_STUDENT_SELF_ENROLLMENT'): +

${_("Looks like you haven't registered for any courses yet.")}

+
${_("Find courses now!")} - + + % else: +

${_("Looks like you haven't joined any courses yet.")}

+ %endif
% endif diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 1dd5aa5229..d44cd0e1b2 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -57,9 +57,11 @@ site_status_msg = get_site_status_msg(course_id)