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
932a130b
Commit
932a130b
authored
Aug 05, 2014
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8/pylint
parent
ec89d3da
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
13 deletions
+11
-13
cms/djangoapps/contentstore/tests/utils.py
+1
-1
cms/djangoapps/contentstore/utils.py
+1
-0
cms/djangoapps/contentstore/views/course.py
+1
-1
cms/djangoapps/contentstore/views/tests/test_course_index.py
+1
-3
common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
+0
-1
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+1
-1
common/test/acceptance/pages/studio/overview.py
+4
-4
common/test/acceptance/tests/test_studio_container.py
+1
-1
common/test/acceptance/tests/test_studio_outline.py
+1
-1
No files found.
cms/djangoapps/contentstore/tests/utils.py
View file @
932a130b
...
...
@@ -9,7 +9,7 @@ from django.test.client import Client
from
django.contrib.auth.models
import
User
from
xmodule.contentstore.django
import
contentstore
from
xmodule.modulestore
import
PublishState
,
ModuleStoreEnum
,
mongo
from
xmodule.modulestore
import
PublishState
,
ModuleStoreEnum
from
xmodule.modulestore.inheritance
import
own_metadata
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
...
...
cms/djangoapps/contentstore/utils.py
View file @
932a130b
...
...
@@ -149,6 +149,7 @@ def course_image_url(course):
path
=
loc
.
to_deprecated_string
()
return
path
# pylint: disable=invalid-name
def
is_currently_visible_to_students
(
xblock
):
"""
...
...
cms/djangoapps/contentstore/views/course.py
View file @
932a130b
...
...
@@ -379,7 +379,7 @@ def course_index(request, course_key):
current_action
=
CourseRerunState
.
objects
.
find_first
(
course_key
=
course_key
,
should_display
=
True
)
except
(
ItemNotFoundError
,
CourseActionStateItemNotFoundError
):
current_action
=
None
return
render_to_response
(
'course_outline.html'
,
{
'context_course'
:
course_module
,
'lms_link'
:
lms_link
,
...
...
cms/djangoapps/contentstore/views/tests/test_course_index.py
View file @
932a130b
...
...
@@ -10,7 +10,6 @@ from contentstore.views.access import has_course_access
from
contentstore.views.course
import
course_outline_initial_state
from
contentstore.views.item
import
create_xblock_info
,
VisibilityState
from
course_action_state.models
import
CourseRerunState
from
contentstore.views.item
import
create_xblock_info
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
opaque_keys.edx.locator
import
CourseLocator
...
...
@@ -273,4 +272,4 @@ class TestCourseOutline(CourseTestCase):
self
.
assertEqual
(
initial_state
[
'locator_to_show'
],
chapter_locator
)
expanded_locators
=
initial_state
[
'expanded_locators'
]
self
.
assertIn
(
unicode
(
self
.
sequential
.
location
),
expanded_locators
)
self
.
assertIn
(
unicode
(
self
.
vertical
.
location
),
expanded_locators
)
\ No newline at end of file
self
.
assertIn
(
unicode
(
self
.
vertical
.
location
),
expanded_locators
)
common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
View file @
932a130b
...
...
@@ -255,7 +255,6 @@ class DraftVersioningModuleStore(ModuleStoreDraftAndPublished, SplitMongoModuleS
PublishState.public - published exists and is the same as draft
PublishState.private - no published version exists
"""
# TODO figure out what to say if xblock is not from the HEAD of its branch
def
get_head
(
branch
):
course_structure
=
self
.
_lookup_course
(
xblock
.
location
.
course_key
.
for_branch
(
branch
))[
'structure'
]
return
self
.
_get_block_from_structure
(
course_structure
,
xblock
.
location
.
block_id
)
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
932a130b
...
...
@@ -875,7 +875,7 @@ class TestMixedModuleStore(unittest.TestCase):
)
self
.
assertEqual
(
self
.
user_id
,
block
.
edited_by
)
self
.
assertGreater
(
datetime
.
datetime
.
now
(
UTC
),
block
.
edited_on
)
@ddt.data
(
'draft'
)
def
test_create_item_populates_subtree_edited_info
(
self
,
default_ms
):
self
.
initdb
(
default_ms
)
...
...
common/test/acceptance/pages/studio/overview.py
View file @
932a130b
...
...
@@ -247,7 +247,7 @@ class CourseOutlineUnit(CourseOutlineChild):
an initialized :class:`.ContainerPage` for that unit.
"""
return
ContainerPage
(
self
.
browser
,
self
.
locator
)
.
visit
()
def
is_browser_on_page
(
self
):
return
self
.
q
(
css
=
self
.
BODY_SELECTOR
)
.
present
...
...
@@ -356,13 +356,13 @@ class CourseOutlinePage(CoursePage, CourseOutlineContainer):
Return the :class:`.CourseOutlineSection` with the title `title`.
"""
return
self
.
child
(
title
)
def
section_at
(
self
,
index
):
"""
Returns the :class:`.CourseOutlineSection` at the specified index.
"""
return
self
.
child_at
(
index
)
def
click_section_name
(
self
,
parent_css
=
''
):
"""
Find and click on first section name in course outline
...
...
@@ -495,7 +495,7 @@ class CourseOutlineModal(object):
self
.
click
(
input_selector
)
if
getattr
(
self
,
property_name
):
current_month
,
current_year
=
map
(
int
,
getattr
(
self
,
property_name
)
.
split
(
'/'
)[
1
:])
else
:
# Use default timepicker values, which are current month and year.
else
:
# Use default timepicker values, which are current month and year.
current_month
,
current_year
=
datetime
.
datetime
.
today
()
.
month
,
datetime
.
datetime
.
today
()
.
year
date_diff
=
12
*
(
year
-
current_year
)
+
month
-
current_month
selector
=
"a.ui-datepicker-{}"
.
format
(
'next'
if
date_diff
>
0
else
'prev'
)
...
...
common/test/acceptance/tests/test_studio_container.py
View file @
932a130b
...
...
@@ -415,7 +415,7 @@ class UnitPublishingTest(ContainerBase):
XBlockFixtureDesc
(
'problem'
,
'<problem></problem>'
,
data
=
self
.
html_content
)
)
)
),
),
XBlockFixtureDesc
(
'chapter'
,
'Section With Locked Unit'
)
.
add_children
(
XBlockFixtureDesc
(
'sequential'
,
'Subsection With Locked Unit'
,
metadata
=
{
'start'
:
past_start_date
.
isoformat
()})
.
add_children
(
...
...
common/test/acceptance/tests/test_studio_outline.py
View file @
932a130b
...
...
@@ -55,7 +55,7 @@ class WarningMessagesTest(CourseOutlineTest):
"""
Feature: Warning messages on sections, subsections, and units
"""
__test__
=
True
STAFF_ONLY_WARNING
=
'Contains staff only content'
...
...
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