Skip to content

Commit

Permalink
feat!: upgrading api to DRF.
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 committed Oct 10, 2024
1 parent 8ad4222 commit 76d227a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lms/djangoapps/instructor/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2088,10 +2088,9 @@ def post(self, request, course_id): # lint-amnesty, pylint: disable=missing-fun
- score a value
unique_student_identifier student username or email.
"""

course_key = CourseKey.from_string(course_id)

serializer_data = self.serializer_class(data=request.data)

if not serializer_data.is_valid():
return HttpResponseBadRequest(reason=serializer_data.errors)

Expand Down Expand Up @@ -2120,6 +2119,7 @@ def post(self, request, course_id): # lint-amnesty, pylint: disable=missing-fun
'problem_to_reset': problem_to_reset,
'student': student_identifier
}

try:
task_api.submit_override_score(
request,
Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/instructor/views/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,6 @@ class ProblemSerializer(UniqueStudentIdentifierSerializer):
'blank': _("Problem URL name cannot be blank."),
}
)
score = serializers.BooleanField(
help_text=_("new score value"),
score = serializers.CharField(
help_text="Score must be a valid number or decimal, e.g., 1.00"
)

0 comments on commit 76d227a

Please sign in to comment.