openedx / openedx/openedx-platform

PUT course_details updates inconsistently (possibly requires start_date?)

Open
#39,094 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

When exercising the API:

PUT /api/contentstore/v1/course_details/<key>
(cms/djangoapps/contentstore/rest_api/v1/views/course_details.py /
openedx.core.djangoapps.models.course_details.CourseDetails.update_from_json)

The view documents partial bodies ("multiple details can be updated in a single request"), and every other field measured seems to honor one. self_paced does not: {"self_paced": true} (or "true", the string the MFE sends) answers HTTP 200 with the unchanged pacing echoed back, and a subsequent GET agrees.

Adding the course's own current start_date to the same body - {"self_paced": true, "start_date": "2040-01-01T00:00:00Z"} - makes the same request take effect.

Side effect: with the pacing change dropped, the accompanying certificates_display_behavior reset to EARLY_NO_INFO still happens, leaving an instructor-paced course with the self-paced display behavior.

Note: that this doesn't impact the MFE, which always sends the whole form, but is confusing behavior for any API consumer.

Note: a body carrying self_paced: true together with a start date in the past also leaves pacing unchanged with HTTP 200.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cms/djangoapps/contentstore/rest_api/v1/views/course_details.py and openedx.core.djangoapps.models.course_details.CourseDetails.update_from_json. Reproduce a partial PUT containing self_paced, including the string value and a past start_date, then compare the response and a subsequent GET. Done means self_paced updates without requiring start_date and certificates_display_behavior is not incorrectly reset.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.