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
b222e66f
Commit
b222e66f
authored
Sep 08, 2013
by
Vik Paruchuri
Committed by
Vik Paruchuri
Sep 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix nopathtoitem error in peer grading
parent
473e80f5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lms/djangoapps/open_ended_grading/views.py
+7
-3
No files found.
lms/djangoapps/open_ended_grading/views.py
View file @
b222e66f
...
@@ -20,7 +20,7 @@ import open_ended_notifications
...
@@ -20,7 +20,7 @@ import open_ended_notifications
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore
import
search
from
xmodule.modulestore
import
search
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
,
NoPathToItem
from
django.http
import
HttpResponse
,
Http404
,
HttpResponseRedirect
from
django.http
import
HttpResponse
,
Http404
,
HttpResponseRedirect
from
mitxmako.shortcuts
import
render_to_string
from
mitxmako.shortcuts
import
render_to_string
...
@@ -112,10 +112,14 @@ def find_peer_grading_module(course):
...
@@ -112,10 +112,14 @@ def find_peer_grading_module(course):
#See if any of the modules are centralized modules (ie display info from multiple problems)
#See if any of the modules are centralized modules (ie display info from multiple problems)
items
=
[
i
for
i
in
items
if
not
getattr
(
i
,
"use_for_single_location"
,
True
)]
items
=
[
i
for
i
in
items
if
not
getattr
(
i
,
"use_for_single_location"
,
True
)]
#Get the first one
#Get the first one
if
len
(
items
)
>
0
:
for
item
in
items
:
item_location
=
item
s
[
0
]
.
location
item_location
=
item
.
location
#Generate a url for the first module and redirect the user to it
#Generate a url for the first module and redirect the user to it
try
:
problem_url_parts
=
search
.
path_to_location
(
modulestore
(),
course
.
id
,
item_location
)
problem_url_parts
=
search
.
path_to_location
(
modulestore
(),
course
.
id
,
item_location
)
except
NoPathToItem
:
log
.
info
(
"Invalid peer grading module location {0} in course {1}."
.
format
(
item_location
,
course
.
id
))
continue
problem_url
=
generate_problem_url
(
problem_url_parts
,
base_course_url
)
problem_url
=
generate_problem_url
(
problem_url_parts
,
base_course_url
)
found_module
=
True
found_module
=
True
...
...
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