Added setting to disable find courses links

This commit is contained in:
Usman Khalid
2013-09-20 15:59:34 +05:00
parent c65e21c779
commit d2cd8a6a58
3 changed files with 15 additions and 6 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -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">