Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ecdb0b27
Commit
ecdb0b27
authored
9 years ago
by
Giovanni Di Milia
Browse files
Options
Downloads
Patches
Plain Diff
Fixed pylint violation for files in lms/djangoapps/branding
parent
2b5810db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/branding/__init__.py
+12
-1
12 additions, 1 deletion
lms/djangoapps/branding/__init__.py
lms/djangoapps/branding/views.py
+2
-3
2 additions, 3 deletions
lms/djangoapps/branding/views.py
with
14 additions
and
4 deletions
lms/djangoapps/branding/__init__.py
+
12
−
1
View file @
ecdb0b27
"""
EdX Branding package.
Provides a way to retrieve
"
branded
"
parts of the site.
This module provides functions to retrieve basic branded parts
such as the site visible courses, university name and logo.
"""
from
xmodule.modulestore.django
import
modulestore
from
xmodule.course_module
import
CourseDescriptor
from
django.conf
import
settings
...
...
@@ -27,7 +36,9 @@ def get_visible_courses():
# this is legacy format which is outside of the microsite feature -- also handle dev case, which should not filter
if
hasattr
(
settings
,
'
COURSE_LISTINGS
'
)
and
subdomain
in
settings
.
COURSE_LISTINGS
and
not
settings
.
DEBUG
:
filtered_visible_ids
=
frozenset
([
SlashSeparatedCourseKey
.
from_deprecated_string
(
c
)
for
c
in
settings
.
COURSE_LISTINGS
[
subdomain
]])
filtered_visible_ids
=
frozenset
(
[
SlashSeparatedCourseKey
.
from_deprecated_string
(
c
)
for
c
in
settings
.
COURSE_LISTINGS
[
subdomain
]]
)
if
filtered_by_org
:
return
[
course
for
course
in
courses
if
course
.
location
.
org
==
filtered_by_org
]
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/branding/views.py
+
2
−
3
View file @
ecdb0b27
...
...
@@ -57,9 +57,8 @@ def index(request):
# In this case, we want to have the user stay on a course catalog
# page to make it easier to browse for courses (and register)
if
microsite
.
get_value
(
'
ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER
'
,
settings
.
FEATURES
.
get
(
'
ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER
'
,
True
)
):
'
ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER
'
,
settings
.
FEATURES
.
get
(
'
ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER
'
,
True
)):
return
redirect
(
reverse
(
'
dashboard
'
))
if
settings
.
FEATURES
.
get
(
'
AUTH_USE_CERTIFICATES
'
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment