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
725f0c63
Commit
725f0c63
authored
Feb 04, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove get statements, fix module_render
parent
009a8c5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
common/lib/xmodule/xmodule/peer_grading_module.py
+1
-2
lms/djangoapps/courseware/module_render.py
+7
-8
No files found.
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
725f0c63
...
@@ -259,8 +259,7 @@ class PeerGradingModule(XModule):
...
@@ -259,8 +259,7 @@ class PeerGradingModule(XModule):
submission_key
=
get
.
get
(
'submission_key'
)
submission_key
=
get
.
get
(
'submission_key'
)
rubric_scores
=
get
.
getlist
(
'rubric_scores[]'
)
rubric_scores
=
get
.
getlist
(
'rubric_scores[]'
)
submission_flagged
=
get
.
get
(
'submission_flagged'
)
submission_flagged
=
get
.
get
(
'submission_flagged'
)
log
.
debug
(
"GET: {0}"
.
format
(
get
))
log
.
debug
(
rubric_scores
)
try
:
try
:
response
=
self
.
peer_gs
.
save_grade
(
location
,
grader_id
,
submission_id
,
response
=
self
.
peer_gs
.
save_grade
(
location
,
grader_id
,
submission_id
,
score
,
feedback
,
submission_key
,
rubric_scores
,
submission_flagged
)
score
,
feedback
,
submission_key
,
rubric_scores
,
submission_flagged
)
...
...
lms/djangoapps/courseware/module_render.py
View file @
725f0c63
...
@@ -140,13 +140,12 @@ def get_module(user, request, location, student_module_cache, course_id,
...
@@ -140,13 +140,12 @@ def get_module(user, request, location, student_module_cache, course_id,
module. If there's an error, will try to return an instance of ErrorModule
module. If there's an error, will try to return an instance of ErrorModule
if possible. If not possible, return None.
if possible. If not possible, return None.
"""
"""
#try:
try
:
location
=
Location
(
location
)
location
=
Location
(
location
)
descriptor
=
modulestore
()
.
get_instance
(
course_id
,
location
,
depth
=
depth
)
descriptor
=
modulestore
()
.
get_instance
(
course_id
,
location
,
depth
=
depth
)
return
get_module_for_descriptor
(
user
,
request
,
descriptor
,
student_module_cache
,
course_id
,
return
get_module_for_descriptor
(
user
,
request
,
descriptor
,
student_module_cache
,
course_id
,
position
=
position
,
not_found_ok
=
not_found_ok
,
position
=
position
,
not_found_ok
=
not_found_ok
,
wrap_xmodule_display
=
wrap_xmodule_display
)
wrap_xmodule_display
=
wrap_xmodule_display
)
"""
except
ItemNotFoundError
:
except
ItemNotFoundError
:
if
not
not_found_ok
:
if
not
not_found_ok
:
log
.
exception
(
"Error in get_module"
)
log
.
exception
(
"Error in get_module"
)
...
@@ -155,7 +154,7 @@ def get_module(user, request, location, student_module_cache, course_id,
...
@@ -155,7 +154,7 @@ def get_module(user, request, location, student_module_cache, course_id,
# Something has gone terribly wrong, but still not letting it turn into a 500.
# Something has gone terribly wrong, but still not letting it turn into a 500.
log
.
exception
(
"Error in get_module"
)
log
.
exception
(
"Error in get_module"
)
return
None
return
None
"""
def
get_module_for_descriptor
(
user
,
request
,
descriptor
,
student_module_cache
,
course_id
,
def
get_module_for_descriptor
(
user
,
request
,
descriptor
,
student_module_cache
,
course_id
,
position
=
None
,
not_found_ok
=
False
,
wrap_xmodule_display
=
True
):
position
=
None
,
not_found_ok
=
False
,
wrap_xmodule_display
=
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