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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
19 deletions
+30
-19
lms/djangoapps/branding/views.py
+4
-4
lms/envs/common.py
+3
-0
lms/templates/dashboard.html
+7
-3
lms/templates/index.html
+11
-9
lms/templates/navigation.html
+5
-3
No files found.
lms/djangoapps/branding/views.py
View file @
316b4eee
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
django.http
import
Http404
from
django.shortcuts
import
redirect
from
django_future.csrf
import
ensure_csrf_cookie
from
mitxmako.shortcuts
import
render_to_response
...
...
@@ -48,10 +49,9 @@ def courses(request):
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_MKTG_SITE'
,
False
):
return
redirect
(
marketing_link
(
'COURSES'
),
permanent
=
True
)
university
=
branding
.
get_university
(
request
.
META
.
get
(
'HTTP_HOST'
))
if
university
==
'edge'
:
return
render_to_response
(
'university_profile/edge.html'
,
{})
if
not
settings
.
MITX_FEATURES
.
get
(
'COURSES_ARE_BROWSABLE'
):
raise
Http404
# 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
)
lms/envs/common.py
View file @
316b4eee
...
...
@@ -105,6 +105,9 @@ MITX_FEATURES = {
# with Shib. Feature was requested by Stanford's office of general counsel
'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
'RESTRICT_ENROLL_BY_REG_METHOD'
:
False
,
...
...
lms/templates/dashboard.html
View file @
316b4eee
...
...
@@ -338,10 +338,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('COURSES_ARE_BROWSABLE'):
<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 been enrolled in any courses yet.")}
</p>
%endif
</section>
% endif
...
...
lms/templates/index.html
View file @
316b4eee
...
...
@@ -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>
...
...
lms/templates/navigation.html
View file @
316b4eee
...
...
@@ -59,9 +59,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('COURSES_ARE_BROWSABLE'):
<li
class=
"nav-global-01"
>
<a
href=
"${marketing_link('COURSES')}"
>
${_('Find Courses')}
</a>
</li>
% endif
</
%
block>
</ol>
<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