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
eab0cbdd
Commit
eab0cbdd
authored
Jul 03, 2015
by
Jonathan Piacenti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better fix for open ended grading.
parent
405b266f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
lms/djangoapps/open_ended_grading/utils.py
+5
-1
No files found.
lms/djangoapps/open_ended_grading/utils.py
View file @
eab0cbdd
import
logging
from
urllib
import
urlencode
from
xmodule.modulestore
import
search
from
xmodule.modulestore.django
import
modulestore
...
...
@@ -33,6 +34,8 @@ def generate_problem_url(problem_url_parts, base_course_url):
@param base_course_url: Base url of a given course
@return: A path to the problem
"""
activate_block_id
=
problem_url_parts
[
-
1
]
problem_url_parts
=
problem_url_parts
[
0
:
-
1
]
problem_url
=
base_course_url
+
"/"
for
i
,
part
in
enumerate
(
problem_url_parts
):
if
part
is
not
None
:
...
...
@@ -43,7 +46,8 @@ def generate_problem_url(problem_url_parts, base_course_url):
# This is placed between the course id and the rest of the url.
if
i
==
1
:
problem_url
+=
"courseware/"
problem_url
+=
unicode
(
part
)
+
"/"
problem_url
+=
part
+
"/"
problem_url
+=
'?{}'
.
format
(
urlencode
({
'activate_block_id'
:
unicode
(
activate_block_id
)}))
return
problem_url
...
...
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