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
484e217d
Commit
484e217d
authored
Jun 27, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some errors
parent
1f1bba55
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
cms/djangoapps/contentstore/features/common.py
+1
-1
common/djangoapps/terrain/course_helpers.py
+2
-2
lms/djangoapps/courseware/features/problems.py
+3
-3
lms/djangoapps/courseware/features/video.py
+2
-2
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
484e217d
...
...
@@ -156,7 +156,7 @@ def create_a_course():
# Add the user to the instructor group of the course
# so they will have the permissions to see it in studio
course
=
world
.
GroupFactory
.
create
(
name
=
'instructor_MITx/{course_num}/{course_name}'
.
format
(
course_num
=
world
.
scenario_dict
[
'COURSE'
]
.
number
,
course_name
=
world
.
scenario_dict
[
'COURSE
_NAME
'
]
.
display_name
.
replace
(
" "
,
"_"
)))
course
=
world
.
GroupFactory
.
create
(
name
=
'instructor_MITx/{course_num}/{course_name}'
.
format
(
course_num
=
world
.
scenario_dict
[
'COURSE'
]
.
number
,
course_name
=
world
.
scenario_dict
[
'COURSE'
]
.
display_name
.
replace
(
" "
,
"_"
)))
if
world
.
scenario_dict
[
'USER'
]:
user
=
world
.
scenario_dict
[
'USER'
]
else
:
...
...
common/djangoapps/terrain/course_helpers.py
View file @
484e217d
...
...
@@ -44,7 +44,7 @@ def log_in(username, password):
# Authenticate the user
world
.
scenario_dict
[
'USER'
]
=
authenticate
(
username
=
username
,
password
=
password
)
assert
(
user
is
not
None
and
user
.
is_active
)
assert
(
world
.
scenario_dict
[
'USER'
]
is
not
None
and
world
.
scenario_dict
[
'USER'
]
.
is_active
)
# Send a fake HttpRequest to log the user in
# We need to process the request using
...
...
@@ -53,7 +53,7 @@ def log_in(username, password):
request
=
HttpRequest
()
SessionMiddleware
()
.
process_request
(
request
)
AuthenticationMiddleware
()
.
process_request
(
request
)
login
(
request
,
user
)
login
(
request
,
world
.
scenario_dict
[
'USER'
]
)
# Save the session
request
.
session
.
save
()
...
...
lms/djangoapps/courseware/features/problems.py
View file @
484e217d
...
...
@@ -21,7 +21,7 @@ def view_problem_with_attempts(step, problem_type, attempts):
# Go to the one section in the factory-created course
# which should be loaded with the correct problem
chapter_name
=
world
.
scenario_dict
[
'SECTION
_NAME'
]
.
replace
(
" "
,
"_"
)
chapter_name
=
world
.
scenario_dict
[
'SECTION
'
]
.
display_name
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/
%
s/
%
s/
%
s/courseware/
%
s/
%
s'
%
(
world
.
scenario_dict
[
'COURSE'
]
.
org
,
world
.
scenario_dict
[
'COURSE'
]
.
number
,
world
.
scenario_dict
[
'COURSE'
]
.
display_name
.
replace
(
' '
,
'_'
),
...
...
@@ -38,7 +38,7 @@ def view_problem_with_show_answer(step, problem_type, answer):
# Go to the one section in the factory-created course
# which should be loaded with the correct problem
chapter_name
=
world
.
scenario_dict
[
'SECTION
_NAME'
]
.
replace
(
" "
,
"_"
)
chapter_name
=
world
.
scenario_dict
[
'SECTION
'
]
.
display_name
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/
%
s/
%
s/
%
s/courseware/
%
s/
%
s'
%
(
world
.
scenario_dict
[
'COURSE'
]
.
org
,
world
.
scenario_dict
[
'COURSE'
]
.
number
,
world
.
scenario_dict
[
'COURSE'
]
.
display_name
.
replace
(
' '
,
'_'
),
...
...
@@ -55,7 +55,7 @@ def view_problem(step, problem_type):
# Go to the one section in the factory-created course
# which should be loaded with the correct problem
chapter_name
=
world
.
scenario_dict
[
'SECTION
_NAME'
]
.
replace
(
" "
,
"_"
)
chapter_name
=
world
.
scenario_dict
[
'SECTION
'
]
.
display_name
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/
%
s/
%
s/
%
s/courseware/
%
s/
%
s'
%
(
world
.
scenario_dict
[
'COURSE'
]
.
org
,
world
.
scenario_dict
[
'COURSE'
]
.
number
,
world
.
scenario_dict
[
'COURSE'
]
.
display_name
.
replace
(
' '
,
'_'
),
...
...
lms/djangoapps/courseware/features/video.py
View file @
484e217d
...
...
@@ -19,7 +19,7 @@ def view_video(_step):
# Make sure we have a video
add_video_to_course
(
coursenum
)
chapter_name
=
world
.
scenario_dict
[
'SECTION
_NAME'
]
.
replace
(
" "
,
"_"
)
chapter_name
=
world
.
scenario_dict
[
'SECTION
'
]
.
display_name
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/
%
s/
%
s/
%
s/courseware/
%
s/
%
s'
%
(
world
.
scenario_dict
[
'COURSE'
]
.
org
,
world
.
scenario_dict
[
'COURSE'
]
.
number
,
world
.
scenario_dict
[
'COURSE'
]
.
display_name
.
replace
(
' '
,
'_'
),
...
...
@@ -34,7 +34,7 @@ def view_videoalpha(step):
# Make sure we have a videoalpha
add_videoalpha_to_course
(
coursenum
)
chapter_name
=
world
.
scenario_dict
[
'SECTION
_NAME'
]
.
replace
(
" "
,
"_"
)
chapter_name
=
world
.
scenario_dict
[
'SECTION
'
]
.
display_name
.
replace
(
" "
,
"_"
)
section_name
=
chapter_name
url
=
django_url
(
'/courses/
%
s/
%
s/
%
s/courseware/
%
s/
%
s'
%
(
world
.
scenario_dict
[
'COURSE'
]
.
org
,
world
.
scenario_dict
[
'COURSE'
]
.
number
,
world
.
scenario_dict
[
'COURSE'
]
.
display_name
.
replace
(
' '
,
'_'
),
...
...
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