Fix student progress @sarina bug
This commit is contained in:
@@ -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.util.duedate import get_extended_due_date
|
||||
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.grading_service_module import GradingServiceError
|
||||
|
||||
log = logging.getLogger("edx.courseware")
|
||||
|
||||
@@ -800,7 +801,7 @@ class CombinedOpenEndedV1Module():
|
||||
success = False
|
||||
allowed_to_submit = True
|
||||
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_required = response['count_required']
|
||||
student_sub_count = response['student_sub_count']
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import json
|
||||
import logging
|
||||
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__)
|
||||
|
||||
@@ -30,6 +30,8 @@ class PeerGradingService(GradingService):
|
||||
self.system = system
|
||||
|
||||
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}
|
||||
result = self.get(self.get_data_for_location_url, params)
|
||||
self._record_result('get_data_for_location', result)
|
||||
@@ -44,6 +46,8 @@ class PeerGradingService(GradingService):
|
||||
return result
|
||||
|
||||
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(
|
||||
self.get_next_submission_url,
|
||||
{
|
||||
@@ -62,6 +66,8 @@ class PeerGradingService(GradingService):
|
||||
return result
|
||||
|
||||
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}
|
||||
result = self.get(self.is_student_calibrated_url, params)
|
||||
self._record_result(
|
||||
@@ -72,6 +78,8 @@ class PeerGradingService(GradingService):
|
||||
return result
|
||||
|
||||
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}
|
||||
result = self._render_rubric(self.get(self.show_calibration_essay_url, params))
|
||||
self._record_result('show_calibration_essay', result)
|
||||
|
||||
@@ -13,10 +13,11 @@ from xmodule.raw_module import RawDescriptor
|
||||
from xmodule.timeinfo import TimeInfo
|
||||
from xmodule.util.duedate import get_extended_due_date
|
||||
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 django.utils.timezone import UTC
|
||||
from xmodule.open_ended_grading_classes.grading_service_module import GradingServiceError
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ class PeerGradingModuleTest(unittest.TestCase, DummyModulestore):
|
||||
Try getting data from the external grading service
|
||||
@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)
|
||||
|
||||
def test_get_score_none(self):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%! from django.utils.translation import ugettext as _ %>
|
||||
<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>
|
||||
|
||||
<section class="content-panel">
|
||||
|
||||
Reference in New Issue
Block a user