Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
316b4eee
Commit
316b4eee
authored
Sep 27, 2013
by
Usman Khalid
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1073 from edx/usman/lms1026-find-courses-link-optional
Added setting to disable 'find courses' links
parents
8d7b40f4
724fc5ad
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
4 deletions
+15
-4
lms/djangoapps/branding/views.py
+4
-4
lms/envs/common.py
+3
-0
lms/templates/dashboard.html
+4
-0
lms/templates/index.html
+2
-0
lms/templates/navigation.html
+2
-0
No files found.
lms/djangoapps/branding/views.py
View file @
316b4eee
from
django.conf
import
settings
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
django.http
import
Http404
from
django.shortcuts
import
redirect
from
django.shortcuts
import
redirect
from
django_future.csrf
import
ensure_csrf_cookie
from
django_future.csrf
import
ensure_csrf_cookie
from
mitxmako.shortcuts
import
render_to_response
from
mitxmako.shortcuts
import
render_to_response
...
@@ -48,10 +49,9 @@ def courses(request):
...
@@ -48,10 +49,9 @@ def courses(request):
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_MKTG_SITE'
,
False
):
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_MKTG_SITE'
,
False
):
return
redirect
(
marketing_link
(
'COURSES'
),
permanent
=
True
)
return
redirect
(
marketing_link
(
'COURSES'
),
permanent
=
True
)
university
=
branding
.
get_university
(
request
.
META
.
get
(
'HTTP_HOST'
))
if
not
settings
.
MITX_FEATURES
.
get
(
'COURSES_ARE_BROWSABLE'
):
if
university
==
'edge'
:
raise
Http404
return
render_to_response
(
'university_profile/edge.html'
,
{})
# we do not expect this case to be reached in cases where
# we do not expect this case to be reached in cases where
# marketing
and edge are enabled
# marketing
is enabled or the courses are not browsable
return
courseware
.
views
.
courses
(
request
)
return
courseware
.
views
.
courses
(
request
)
lms/envs/common.py
View file @
316b4eee
...
@@ -105,6 +105,9 @@ MITX_FEATURES = {
...
@@ -105,6 +105,9 @@ MITX_FEATURES = {
# with Shib. Feature was requested by Stanford's office of general counsel
# with Shib. Feature was requested by Stanford's office of general counsel
'SHIB_DISABLE_TOS'
:
False
,
'SHIB_DISABLE_TOS'
:
False
,
# 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
# Enables ability to restrict enrollment in specific courses by the user account login method
'RESTRICT_ENROLL_BY_REG_METHOD'
:
False
,
'RESTRICT_ENROLL_BY_REG_METHOD'
:
False
,
...
...
lms/templates/dashboard.html
View file @
316b4eee
...
@@ -338,10 +338,14 @@
...
@@ -338,10 +338,14 @@
</ul>
</ul>
% else:
% else:
<section
class=
"empty-dashboard-message"
>
<section
class=
"empty-dashboard-message"
>
% if settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'):
<p>
${_("Looks like you haven't registered for any courses yet.")}
</p>
<p>
${_("Looks like you haven't registered for any courses yet.")}
</p>
<a
href=
"${marketing_link('COURSES')}"
>
<a
href=
"${marketing_link('COURSES')}"
>
${_("Find courses now!")}
${_("Find courses now!")}
</a>
</a>
% else:
<p>
${_("Looks like you haven't been enrolled in any courses yet.")}
</p>
%endif
</section>
</section>
% endif
% endif
...
...
lms/templates/index.html
View file @
316b4eee
...
@@ -165,6 +165,7 @@
...
@@ -165,6 +165,7 @@
</section>
</section>
% endif
% endif
% if settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'):
<section
class=
"courses"
>
<section
class=
"courses"
>
<ul
class=
"courses-listing"
>
<ul
class=
"courses-listing"
>
%for course in courses:
%for course in courses:
...
@@ -174,6 +175,7 @@
...
@@ -174,6 +175,7 @@
%endfor
%endfor
</ul>
</ul>
</section>
</section>
% endif
</section>
</section>
</section>
</section>
</section>
</section>
...
...
lms/templates/navigation.html
View file @
316b4eee
...
@@ -59,9 +59,11 @@ site_status_msg = get_site_status_msg(course_id)
...
@@ -59,9 +59,11 @@ site_status_msg = get_site_status_msg(course_id)
<ol
class=
"left nav-global authenticated"
>
<ol
class=
"left nav-global authenticated"
>
<
%
block
name=
"navigation_global_links_authenticated"
>
<
%
block
name=
"navigation_global_links_authenticated"
>
% if settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'):
<li
class=
"nav-global-01"
>
<li
class=
"nav-global-01"
>
<a
href=
"${marketing_link('COURSES')}"
>
${_('Find Courses')}
</a>
<a
href=
"${marketing_link('COURSES')}"
>
${_('Find Courses')}
</a>
</li>
</li>
% endif
</
%
block>
</
%
block>
</ol>
</ol>
<ol
class=
"user"
>
<ol
class=
"user"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment