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
9475c6ed
Commit
9475c6ed
authored
Mar 05, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments
parent
5bbb70ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
common/lib/xmodule/xmodule/peer_grading_module.py
+0
-2
lms/djangoapps/open_ended_grading/views.py
+6
-1
No files found.
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
9475c6ed
...
@@ -456,7 +456,6 @@ class PeerGradingModule(XModule):
...
@@ -456,7 +456,6 @@ class PeerGradingModule(XModule):
try
:
try
:
problem_list_json
=
self
.
peer_gs
.
get_problem_list
(
self
.
system
.
course_id
,
self
.
system
.
anonymous_student_id
)
problem_list_json
=
self
.
peer_gs
.
get_problem_list
(
self
.
system
.
course_id
,
self
.
system
.
anonymous_student_id
)
problem_list_dict
=
problem_list_json
problem_list_dict
=
problem_list_json
log
.
debug
(
problem_list_dict
)
success
=
problem_list_dict
[
'success'
]
success
=
problem_list_dict
[
'success'
]
if
'error'
in
problem_list_dict
:
if
'error'
in
problem_list_dict
:
error_text
=
problem_list_dict
[
'error'
]
error_text
=
problem_list_dict
[
'error'
]
...
@@ -593,7 +592,6 @@ class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor):
...
@@ -593,7 +592,6 @@ class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor):
'task_xml': dictionary of xml strings,
'task_xml': dictionary of xml strings,
}
}
"""
"""
log
.
debug
(
"In definition"
)
expected_children
=
[]
expected_children
=
[]
for
child
in
expected_children
:
for
child
in
expected_children
:
if
len
(
xml_object
.
xpath
(
child
))
==
0
:
if
len
(
xml_object
.
xpath
(
child
))
==
0
:
...
...
lms/djangoapps/open_ended_grading/views.py
View file @
9475c6ed
...
@@ -89,18 +89,23 @@ def peer_grading(request, course_id):
...
@@ -89,18 +89,23 @@ def peer_grading(request, course_id):
Show a peer grading interface
Show a peer grading interface
'''
'''
#Get the current course
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
course_id_parts
=
course
.
id
.
split
(
"/"
)
course_id_parts
=
course
.
id
.
split
(
"/"
)
false_dict
=
[
False
,
"False"
,
"false"
,
"FALSE"
]
false_dict
=
[
False
,
"False"
,
"false"
,
"FALSE"
]
#Reverse the base course url
base_course_url
=
reverse
(
'courses'
)
base_course_url
=
reverse
(
'courses'
)
try
:
try
:
#TODO: This will not work with multiple runs of a course. Make it work. The last key in the Location passed
#TODO: This will not work with multiple runs of a course. Make it work. The last key in the Location passed
#to get_items is called revision. Is this the same as run?
#to get_items is called revision. Is this the same as run?
#Get the peer grading modules currently in the course
items
=
modulestore
()
.
get_items
([
'i4x'
,
None
,
course_id_parts
[
1
],
'peergrading'
,
None
])
items
=
modulestore
()
.
get_items
([
'i4x'
,
None
,
course_id_parts
[
1
],
'peergrading'
,
None
])
#See if any of the modules are centralized modules (ie display info from multiple problems)
items
=
[
i
for
i
in
items
if
i
.
metadata
.
get
(
"use_for_single_location"
,
True
)
in
false_dict
]
items
=
[
i
for
i
in
items
if
i
.
metadata
.
get
(
"use_for_single_location"
,
True
)
in
false_dict
]
#Get the first one
item_location
=
items
[
0
]
.
location
item_location
=
items
[
0
]
.
location
item_location_url
=
item_location
.
url
()
#Generate a url for the first module and redirect the user to it
problem_url_parts
=
search
.
path_to_location
(
modulestore
(),
course
.
id
,
item_location
)
problem_url_parts
=
search
.
path_to_location
(
modulestore
(),
course
.
id
,
item_location
)
problem_url
=
generate_problem_url
(
problem_url_parts
,
base_course_url
)
problem_url
=
generate_problem_url
(
problem_url_parts
,
base_course_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