Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
5b367e83
Commit
5b367e83
authored
11 years ago
by
Don Mitchell
Browse files
Options
Downloads
Patches
Plain Diff
Missing comma on template -> category refactoring
And several pep8 changes
parent
d3993653
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/courseware/features/common.py
+11
-10
11 additions, 10 deletions
lms/djangoapps/courseware/features/common.py
with
11 additions
and
10 deletions
lms/djangoapps/courseware/features/common.py
+
11
−
10
View file @
5b367e83
...
...
@@ -5,11 +5,10 @@ from __future__ import absolute_import
from
lettuce
import
world
,
step
from
nose.tools
import
assert_equals
,
assert_in
from
lettuce.django
import
django_url
from
django.contrib.auth.models
import
User
from
student.models
import
CourseEnrollment
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
courseware.courses
import
get_course_by_id
from
xmodule
import
seq_module
,
vertical_module
...
...
@@ -19,7 +18,7 @@ logger = getLogger(__name__)
@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
# the same course twice
...
...
@@ -37,9 +36,10 @@ def create_course(step, course):
world
.
scenario_dict
[
'
SECTION
'
]
=
world
.
ItemFactory
.
create
(
parent_location
=
world
.
scenario_dict
[
'
COURSE
'
].
location
,
display_name
=
'
Test Section
'
)
problem_section
=
world
.
ItemFactory
.
create
(
parent_location
=
world
.
scenario_dict
[
'
SECTION
'
].
location
,
category
=
'
sequential
'
display_name
=
'
Test Section
'
)
world
.
ItemFactory
.
create
(
parent_location
=
world
.
scenario_dict
[
'
SECTION
'
].
location
,
category
=
'
sequential
'
,
display_name
=
'
Test Section
'
)
@step
(
u
'
I am registered for the course
"
([^
"
]*)
"
$
'
)
...
...
@@ -59,10 +59,11 @@ def i_am_registered_for_the_course(step, course):
@step
(
u
'
The course
"
([^
"
]*)
"
has extra tab
"
([^
"
]*)
"
$
'
)
def
add_tab_to_course
(
step
,
course
,
extra_tab_name
):
section_item
=
world
.
ItemFactory
.
create
(
parent_location
=
course_location
(
course
),
category
=
"
static_tab
"
,
display_name
=
str
(
extra_tab_name
))
def
add_tab_to_course
(
_step
,
course
,
extra_tab_name
):
world
.
ItemFactory
.
create
(
parent_location
=
course_location
(
course
),
category
=
"
static_tab
"
,
display_name
=
str
(
extra_tab_name
))
def
course_id
(
course_num
):
...
...
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