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
c0855783
Commit
c0855783
authored
May 20, 2014
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix student progress @sarina bug
parent
3ab925a1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
7 deletions
+17
-7
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
+3
-2
common/lib/xmodule/xmodule/open_ended_grading_classes/peer_grading_service.py
+10
-2
common/lib/xmodule/xmodule/peer_grading_module.py
+2
-1
common/lib/xmodule/xmodule/tests/test_peer_grading.py
+1
-1
lms/templates/peer_grading/peer_grading_problem.html
+1
-1
No files found.
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
View file @
c0855783
...
@@ -10,8 +10,9 @@ from xmodule.open_ended_grading_classes import self_assessment_module
...
@@ -10,8 +10,9 @@ from xmodule.open_ended_grading_classes import self_assessment_module
from
xmodule.open_ended_grading_classes
import
open_ended_module
from
xmodule.open_ended_grading_classes
import
open_ended_module
from
xmodule.util.duedate
import
get_extended_due_date
from
xmodule.util.duedate
import
get_extended_due_date
from
.combined_open_ended_rubric
import
CombinedOpenEndedRubric
,
GRADER_TYPE_IMAGE_DICT
,
HUMAN_GRADER_TYPE
,
LEGEND_LIST
from
.combined_open_ended_rubric
import
CombinedOpenEndedRubric
,
GRADER_TYPE_IMAGE_DICT
,
HUMAN_GRADER_TYPE
,
LEGEND_LIST
from
xmodule.open_ended_grading_classes.peer_grading_service
import
PeerGradingService
,
MockPeerGradingService
,
GradingServiceError
from
xmodule.open_ended_grading_classes.peer_grading_service
import
PeerGradingService
,
MockPeerGradingService
from
xmodule.open_ended_grading_classes.openendedchild
import
OpenEndedChild
from
xmodule.open_ended_grading_classes.openendedchild
import
OpenEndedChild
from
xmodule.open_ended_grading_classes.grading_service_module
import
GradingServiceError
log
=
logging
.
getLogger
(
"edx.courseware"
)
log
=
logging
.
getLogger
(
"edx.courseware"
)
...
@@ -800,7 +801,7 @@ class CombinedOpenEndedV1Module():
...
@@ -800,7 +801,7 @@ class CombinedOpenEndedV1Module():
success
=
False
success
=
False
allowed_to_submit
=
True
allowed_to_submit
=
True
try
:
try
:
response
=
self
.
peer_gs
.
get_data_for_location
(
self
.
location
.
to_deprecated_string
()
,
student_id
)
response
=
self
.
peer_gs
.
get_data_for_location
(
self
.
location
,
student_id
)
count_graded
=
response
[
'count_graded'
]
count_graded
=
response
[
'count_graded'
]
count_required
=
response
[
'count_required'
]
count_required
=
response
[
'count_required'
]
student_sub_count
=
response
[
'student_sub_count'
]
student_sub_count
=
response
[
'student_sub_count'
]
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/peer_grading_service.py
View file @
c0855783
import
json
import
logging
import
logging
from
dogapi
import
dog_stats_api
from
dogapi
import
dog_stats_api
from
.grading_service_module
import
GradingService
,
GradingServiceError
from
.grading_service_module
import
GradingService
from
xmodule.modulestore.keys
import
UsageKey
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -30,6 +30,8 @@ class PeerGradingService(GradingService):
...
@@ -30,6 +30,8 @@ class PeerGradingService(GradingService):
self
.
system
=
system
self
.
system
=
system
def
get_data_for_location
(
self
,
problem_location
,
student_id
):
def
get_data_for_location
(
self
,
problem_location
,
student_id
):
if
isinstance
(
problem_location
,
UsageKey
):
problem_location
=
problem_location
.
to_deprecated_string
()
params
=
{
'location'
:
problem_location
,
'student_id'
:
student_id
}
params
=
{
'location'
:
problem_location
,
'student_id'
:
student_id
}
result
=
self
.
get
(
self
.
get_data_for_location_url
,
params
)
result
=
self
.
get
(
self
.
get_data_for_location_url
,
params
)
self
.
_record_result
(
'get_data_for_location'
,
result
)
self
.
_record_result
(
'get_data_for_location'
,
result
)
...
@@ -44,6 +46,8 @@ class PeerGradingService(GradingService):
...
@@ -44,6 +46,8 @@ class PeerGradingService(GradingService):
return
result
return
result
def
get_next_submission
(
self
,
problem_location
,
grader_id
):
def
get_next_submission
(
self
,
problem_location
,
grader_id
):
if
isinstance
(
problem_location
,
UsageKey
):
problem_location
=
problem_location
.
to_deprecated_string
()
result
=
self
.
_render_rubric
(
self
.
get
(
result
=
self
.
_render_rubric
(
self
.
get
(
self
.
get_next_submission_url
,
self
.
get_next_submission_url
,
{
{
...
@@ -62,6 +66,8 @@ class PeerGradingService(GradingService):
...
@@ -62,6 +66,8 @@ class PeerGradingService(GradingService):
return
result
return
result
def
is_student_calibrated
(
self
,
problem_location
,
grader_id
):
def
is_student_calibrated
(
self
,
problem_location
,
grader_id
):
if
isinstance
(
problem_location
,
UsageKey
):
problem_location
=
problem_location
.
to_deprecated_string
()
params
=
{
'problem_id'
:
problem_location
,
'student_id'
:
grader_id
}
params
=
{
'problem_id'
:
problem_location
,
'student_id'
:
grader_id
}
result
=
self
.
get
(
self
.
is_student_calibrated_url
,
params
)
result
=
self
.
get
(
self
.
is_student_calibrated_url
,
params
)
self
.
_record_result
(
self
.
_record_result
(
...
@@ -72,6 +78,8 @@ class PeerGradingService(GradingService):
...
@@ -72,6 +78,8 @@ class PeerGradingService(GradingService):
return
result
return
result
def
show_calibration_essay
(
self
,
problem_location
,
grader_id
):
def
show_calibration_essay
(
self
,
problem_location
,
grader_id
):
if
isinstance
(
problem_location
,
UsageKey
):
problem_location
=
problem_location
.
to_deprecated_string
()
params
=
{
'problem_id'
:
problem_location
,
'student_id'
:
grader_id
}
params
=
{
'problem_id'
:
problem_location
,
'student_id'
:
grader_id
}
result
=
self
.
_render_rubric
(
self
.
get
(
self
.
show_calibration_essay_url
,
params
))
result
=
self
.
_render_rubric
(
self
.
get
(
self
.
show_calibration_essay_url
,
params
))
self
.
_record_result
(
'show_calibration_essay'
,
result
)
self
.
_record_result
(
'show_calibration_essay'
,
result
)
...
...
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
c0855783
...
@@ -13,10 +13,11 @@ from xmodule.raw_module import RawDescriptor
...
@@ -13,10 +13,11 @@ from xmodule.raw_module import RawDescriptor
from
xmodule.timeinfo
import
TimeInfo
from
xmodule.timeinfo
import
TimeInfo
from
xmodule.util.duedate
import
get_extended_due_date
from
xmodule.util.duedate
import
get_extended_due_date
from
xmodule.x_module
import
XModule
,
module_attr
from
xmodule.x_module
import
XModule
,
module_attr
from
xmodule.open_ended_grading_classes.peer_grading_service
import
PeerGradingService
,
GradingServiceError
,
MockPeerGradingService
from
xmodule.open_ended_grading_classes.peer_grading_service
import
PeerGradingService
,
MockPeerGradingService
from
open_ended_grading_classes
import
combined_open_ended_rubric
from
open_ended_grading_classes
import
combined_open_ended_rubric
from
django.utils.timezone
import
UTC
from
django.utils.timezone
import
UTC
from
xmodule.open_ended_grading_classes.grading_service_module
import
GradingServiceError
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
...
common/lib/xmodule/xmodule/tests/test_peer_grading.py
View file @
c0855783
...
@@ -72,7 +72,7 @@ class PeerGradingModuleTest(unittest.TestCase, DummyModulestore):
...
@@ -72,7 +72,7 @@ class PeerGradingModuleTest(unittest.TestCase, DummyModulestore):
Try getting data from the external grading service
Try getting data from the external grading service
@return:
@return:
"""
"""
success
,
_data
=
self
.
peer_grading
.
query_data_for_location
(
self
.
problem_location
.
to_deprecated_string
()
)
success
,
_data
=
self
.
peer_grading
.
query_data_for_location
(
self
.
problem_location
)
self
.
assertTrue
(
success
)
self
.
assertTrue
(
success
)
def
test_get_score_none
(
self
):
def
test_get_score_none
(
self
):
...
...
lms/templates/peer_grading/peer_grading_problem.html
View file @
c0855783
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<section
class=
"container peer-grading-container"
>
<section
class=
"container peer-grading-container"
>
<div
class=
"peer-grading"
data-ajax-url=
"${ajax_url}"
data-location=
"${problem_location}"
data-use-single-location=
"${use_single_location}"
>
<div
class=
"peer-grading"
data-ajax-url=
"${ajax_url}"
data-location=
"${problem_location
.to_deprecated_string()
}"
data-use-single-location=
"${use_single_location}"
>
<div
class=
"error-container"
></div>
<div
class=
"error-container"
></div>
<section
class=
"content-panel"
>
<section
class=
"content-panel"
>
...
...
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