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
ded76820
Commit
ded76820
authored
Jun 12, 2015
by
Awais Jibran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Studio "Schedule & Details" page is broken in IDBx+IDB9x+2015_T2
TNL-2435
parent
65a36a64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
cms/djangoapps/contentstore/tests/test_utils.py
+19
-7
cms/djangoapps/contentstore/utils.py
+5
-2
requirements/edx/github.txt
+1
-1
No files found.
cms/djangoapps/contentstore/tests/test_utils.py
View file @
ded76820
""" Tests for utils. """
import
collections
import
copy
import
mock
from
datetime
import
datetime
,
timedelta
from
pytz
import
UTC
import
mock
import
ddt
from
pytz
import
UTC
from
django.test
import
TestCase
from
django.test.utils
import
override_settings
from
contentstore
import
utils
from
contentstore.tests.utils
import
CourseTestCase
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
xmodule.modulestore.django
import
modulestore
from
contentstore
import
utils
from
contentstore.tests.utils
import
CourseTestCase
class
LMSLinksTestCase
(
TestCase
):
""" Tests for LMS links. """
def
about_page_test
(
self
):
""" Get URL for about page, no marketing site """
# default for ENABLE_MKTG_SITE is False.
...
...
@@ -109,6 +109,7 @@ class ExtraPanelTabTestCase(TestCase):
return
course
@ddt.ddt
class
CourseImageTestCase
(
ModuleStoreTestCase
):
"""Tests for course image URLs."""
...
...
@@ -146,6 +147,16 @@ class CourseImageTestCase(ModuleStoreTestCase):
utils
.
course_image_url
(
course
)
)
@ddt.data
(
ModuleStoreEnum
.
Type
.
split
,
ModuleStoreEnum
.
Type
.
mongo
)
def
test_empty_image_name
(
self
,
default_store
):
""" Verify that empty image names are cleaned """
course_image
=
u''
course
=
CourseFactory
.
create
(
course_image
=
course_image
,
default_store
=
default_store
)
self
.
assertEquals
(
course_image
,
utils
.
course_image_url
(
course
),
)
class
XBlockVisibilityTestCase
(
ModuleStoreTestCase
):
"""Tests for xblock visibility for students."""
...
...
@@ -386,6 +397,7 @@ class GroupVisibilityTest(CourseTestCase):
"""
Test content group access rules.
"""
def
setUp
(
self
):
super
(
GroupVisibilityTest
,
self
)
.
setUp
()
...
...
cms/djangoapps/contentstore/utils.py
View file @
ded76820
...
...
@@ -4,12 +4,12 @@ Common utility functions useful throughout the contentstore
# pylint: disable=no-member
import
logging
from
opaque_keys
import
InvalidKeyError
import
re
from
datetime
import
datetime
from
pytz
import
UTC
from
django.conf
import
settings
from
django.utils.translation
import
ugettext
as
_
from
django.core.urlresolvers
import
reverse
from
django_comment_common.models
import
assign_default_role
from
django_comment_common.utils
import
seed_permissions_roles
...
...
@@ -160,7 +160,10 @@ def get_lms_link_for_certificate_web_view(user_id, course_key, mode):
def
course_image_url
(
course
):
"""Returns the image url for the course."""
loc
=
StaticContent
.
compute_location
(
course
.
location
.
course_key
,
course
.
course_image
)
try
:
loc
=
StaticContent
.
compute_location
(
course
.
location
.
course_key
,
course
.
course_image
)
except
InvalidKeyError
:
return
''
path
=
StaticContent
.
serialize_asset_key_with_slash
(
loc
)
return
path
...
...
requirements/edx/github.txt
View file @
ded76820
...
...
@@ -40,7 +40,7 @@ git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c
-e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock
-e git+https://github.com/edx/edx-ora2.git@release-2015-05-08T16.15#egg=edx-ora2
-e git+https://github.com/edx/edx-submissions.git@7c766502058e04bc9094e6cbe286e949794b80b3#egg=edx-submissions
-e git+https://github.com/edx/opaque-keys.git@
df0dd602869e498e512659bb4bd243309e30e19a
#egg=opaque-keys
-e git+https://github.com/edx/opaque-keys.git@
27dc382ea587483b1e3889a3d19cbd90b9023a06
#egg=opaque-keys
-e git+https://github.com/edx/ease.git@b67d2928a26fe497826b6ea359b9a3d0371548a7#egg=ease==0.1.3
-e git+https://github.com/edx/i18n-tools.git@v0.1.1#egg=i18n-tools
-e git+https://github.com/edx/edx-oauth2-provider.git@0.5.1#egg=oauth2-provider
...
...
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