Skip to content

Add a Course Info tab (read-only by default, editable via toggle) to the platform course page #681

Description

@payamnj

Feature request

On the platform course detail page, add a new tab after the existing "Course Analytics" tab that shows the course's own info/settings using the same form used for course creation/editing.

Where

Behavior

  • New tab (e.g. value="course_info"), positioned right after analytics, following the existing tab pattern (icon + responsive full/short label, see the content/analytics tabs for reference).
  • Renders CourseForm inline (not in a dialog) in edit mode for the current courseId.
  • All fields should be disabled by default when this tab is shown.
  • An edit (pencil) icon should be available to toggle the form into an editable state.
  • The slug field must never be editable here, even when the rest of the form is toggled into edit mode. Note: CourseForm already disables the slug field whenever createMode is false (https://github.com/AvaCodeSolutions/django-email-learning/blob/master/frontend/platform/courses/components/CourseForm.jsx#L399-L400), so this should already hold as long as this new tab always passes createMode={false} — just needs verifying once the rest of the form becomes editable.

Implementation notes

  • CourseForm currently has no concept of a read-only/disabled state — it always renders fully interactive fields plus Cancel/Create-or-Update actions meant for a dialog. It'll need a new prop (e.g. readOnly) that:
    • Disables all fields (name, description, language, image upload, references, IMAP connection, newsletter, etc.) when true.
    • Hides or repurposes the Cancel/Update actions appropriately for an inline (non-dialog) context.
  • The new tab needs its own local state to toggle readOnly on/off via the edit icon, and should reset back to read-only after a successful save (mirroring how other forms in this app return to a resting state after successCallback).
  • Consider whether unsaved edits should be discarded when navigating away from the tab or toggling the icon off without saving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions