Instructor v2 grading-config returns an HTML debug dump, but its spec says JSON GradingConfig
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, python
Hướng nghiên cứu
Start in GradingConfigView in lms/djangoapps/instructor/views/api_v2.py, where the HTML response from instructor_analytics.basic.dump_grading_context is returned, and compare it with the getGradingConfig entry in instructor-v2-grading-api-spec.yaml. Done means either a JSON GradingConfig built from course.grading_policy (GRADER and GRADE_CUTOFFS), or an updated spec and MFE handling of the preformatted text. The issue leaves the choice between these open, so confirm it with a maintainer before writing code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
GET /api/instructor/v2/courses/<course_key>/grading-config returns text/html: the v1 debugging dump from instructor_analytics.basic.dump_grading_context, wrapped in <pre>…</pre>. The published v2 spec describes it differently: instructor-v2-grading-api-spec.yaml (getGradingConfig) says it produces application/json matching the GradingConfig schema (graders[] with type/min_count/drop_count/weight, plus grade_cutoffs).
The view's docstring (GradingConfigView, lms/djangoapps/instructor/views/api_v2.py:2834) calls the HTML deliberate, carried over from v1 "so the MFE can render it directly inside a <pre> block". But the MFE doesn't render it as HTML. frontend-app-instructor-dashboard passes the response to a CodeEditor in the "View Grading Configuration" modal, so instructors see the raw dump, <pre> tags included, with Python class reprs such as <class 'xmodule.graders.WeightedSubsectionsGrader'>.
Every other endpoint in the v2 instructor API returns JSON, and #38989 (CCX grading policy) was written assuming this one did too.
Suggested fix: implement the endpoint as specified, returning JSON GradingConfig built from course.grading_policy (GRADER + GRADE_CUTOFFS), and have the MFE render that. If the HTML dump is meant to stay, update the spec and the MFE to treat it as preformatted text.
Environment: Tutor main, 2026-09-15; code references are to master @ 2e46ebdf50.
Found by the Open edX end-to-end test suite (INSTR-003).
- Ngôn ngữ chính
- Python
- Star
- 8.2k
- Fork
- 4.4k
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 40
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openedx/openedx-platform
-
Discussion API: missing thread returns 500 (ForumV2RequestError not mapped to ThreadNotFoundError)Có thể làm lại được @mbhavu2007-lang đã nhận 17 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openedx/openedx-platform#39225 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
v3 notification preferences: PUT with email_cadence but no notification_channel raises KeyError (500)Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
openedx/openedx-platform#39221 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
openedx/openedx-platform#39169 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openedx/openedx-platform#39084 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 82/100
openedx/openedx-platform#38792 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openedx/openedx-platform
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
readthedocs/readthedocs-builder#73 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ci bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
hffgzktbcc-blip/ounce-core#484 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
vllm-project/vllm-torchtpu#3395 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Hermes plugin: MITM-domain discovery misses the model: block (provider/base_url nested under model:) — traffic blind-tunnels silently, zero compressionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
ranxianglei/billion-context#7063 ·
Maintainer thường phản hồi trong vòng 1 ngày