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
5b367e83
Commit
5b367e83
authored
Jul 17, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missing comma on template -> category refactoring
And several pep8 changes
parent
d3993653
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
lms/djangoapps/courseware/features/common.py
+11
-10
No files found.
lms/djangoapps/courseware/features/common.py
View file @
5b367e83
...
@@ -5,11 +5,10 @@ from __future__ import absolute_import
...
@@ -5,11 +5,10 @@ from __future__ import absolute_import
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
from
nose.tools
import
assert_equals
,
assert_in
from
nose.tools
import
assert_equals
,
assert_in
from
lettuce.django
import
django_url
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
student.models
import
CourseEnrollment
from
student.models
import
CourseEnrollment
from
xmodule.modulestore
import
Location
from
xmodule.modulestore
import
Location
from
xmodule.modulestore.django
import
_MODULESTORES
,
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.course_module
import
CourseDescriptor
from
xmodule.course_module
import
CourseDescriptor
from
courseware.courses
import
get_course_by_id
from
courseware.courses
import
get_course_by_id
from
xmodule
import
seq_module
,
vertical_module
from
xmodule
import
seq_module
,
vertical_module
...
@@ -19,7 +18,7 @@ logger = getLogger(__name__)
...
@@ -19,7 +18,7 @@ logger = getLogger(__name__)
@step
(
u'The course "([^"]*)" exists$'
)
@step
(
u'The course "([^"]*)" exists$'
)
def
create_course
(
step
,
course
):
def
create_course
(
_
step
,
course
):
# First clear the modulestore so we don't try to recreate
# First clear the modulestore so we don't try to recreate
# the same course twice
# the same course twice
...
@@ -37,9 +36,10 @@ def create_course(step, course):
...
@@ -37,9 +36,10 @@ def create_course(step, course):
world
.
scenario_dict
[
'SECTION'
]
=
world
.
ItemFactory
.
create
(
parent_location
=
world
.
scenario_dict
[
'COURSE'
]
.
location
,
world
.
scenario_dict
[
'SECTION'
]
=
world
.
ItemFactory
.
create
(
parent_location
=
world
.
scenario_dict
[
'COURSE'
]
.
location
,
display_name
=
'Test Section'
)
display_name
=
'Test Section'
)
problem_section
=
world
.
ItemFactory
.
create
(
parent_location
=
world
.
scenario_dict
[
'SECTION'
]
.
location
,
world
.
ItemFactory
.
create
(
category
=
'sequential'
parent_location
=
world
.
scenario_dict
[
'SECTION'
]
.
location
,
display_name
=
'Test Section'
)
category
=
'sequential'
,
display_name
=
'Test Section'
)
@step
(
u'I am registered for the course "([^"]*)"$'
)
@step
(
u'I am registered for the course "([^"]*)"$'
)
...
@@ -59,10 +59,11 @@ def i_am_registered_for_the_course(step, course):
...
@@ -59,10 +59,11 @@ def i_am_registered_for_the_course(step, course):
@step
(
u'The course "([^"]*)" has extra tab "([^"]*)"$'
)
@step
(
u'The course "([^"]*)" has extra tab "([^"]*)"$'
)
def
add_tab_to_course
(
step
,
course
,
extra_tab_name
):
def
add_tab_to_course
(
_step
,
course
,
extra_tab_name
):
section_item
=
world
.
ItemFactory
.
create
(
parent_location
=
course_location
(
course
),
world
.
ItemFactory
.
create
(
category
=
"static_tab"
,
parent_location
=
course_location
(
course
),
display_name
=
str
(
extra_tab_name
))
category
=
"static_tab"
,
display_name
=
str
(
extra_tab_name
))
def
course_id
(
course_num
):
def
course_id
(
course_num
):
...
...
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