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
4608bb27
Commit
4608bb27
authored
Jan 31, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix system passing issues
parent
edce6edb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
common/lib/xmodule/xmodule/peer_grading_module.py
+10
-3
No files found.
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
4608bb27
...
...
@@ -38,6 +38,9 @@ from peer_grading_service import peer_grading_service, GradingServiceError
log
=
logging
.
getLogger
(
__name__
)
USE_FOR_SINGLE_LOCATION
=
False
TRUE_DICT
=
[
True
,
"True"
,
"true"
,
"TRUE"
]
class
PeerGradingModule
(
XModule
):
_VERSION
=
1
...
...
@@ -67,6 +70,10 @@ class PeerGradingModule(XModule):
self
.
peer_gs
=
peer_grading_service
()
log
.
debug
(
self
.
system
)
self
.
use_for_single_location
=
self
.
metadata
.
get
(
'use_for_single_location'
,
USE_FOR_SINGLE_LOCATION
)
if
isinstance
(
self
.
use_for_single_location
,
basestring
):
self
.
use_for_single_location
=
(
self
.
use_for_single_location
in
TRUE_DICT
)
def
_err_response
(
self
,
msg
):
"""
Return a HttpResponse with a json dump with success=False, and the given error message.
...
...
@@ -331,7 +338,7 @@ class PeerGradingModule(XModule):
error_text
=
""
problem_list
=
[]
try
:
problem_list_json
=
self
.
peer_gs
.
get_problem_list
(
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
=
json
.
loads
(
problem_list_json
)
success
=
problem_list_dict
[
'success'
]
if
'error'
in
problem_list_dict
:
...
...
@@ -351,7 +358,7 @@ class PeerGradingModule(XModule):
return
self
.
system
.
render_template
(
'peer_grading/peer_grading.html'
,
{
'course'
:
course
,
'course_id'
:
course_id
,
'course_id'
:
self
.
system
.
course_id
,
'ajax_url'
:
ajax_url
,
'success'
:
success
,
'problem_list'
:
problem_list
,
...
...
@@ -377,7 +384,7 @@ class PeerGradingModule(XModule):
'view_html'
:
''
,
'course'
:
course
,
'problem_location'
:
problem_location
,
'course_id'
:
course_id
,
'course_id'
:
self
.
system
.
course_id
,
'ajax_url'
:
ajax_url
,
# Checked above
'staff_access'
:
False
,
})
...
...
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