Skip to content

feat: add Course Feedback tab to new instructor dashboard - #75

Draft
farhan wants to merge 1 commit into
openedx:mainfrom
farhan:farhan/feedback-tab-new-instructor-dashboard
Draft

feat: add Course Feedback tab to new instructor dashboard#75
farhan wants to merge 1 commit into
openedx:mainfrom
farhan:farhan/feedback-tab-new-instructor-dashboard

Conversation

@farhan

@farhan farhan commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Caution

Agentically root-caused and fixed via Claude. Human review is pending.

Issue: #62

Per the code-history investigation, the Feedback tab was never supported on the new (frontend-base) instructor dashboard — the integration was built in 2023 for the legacy dashboard only and was never ported when the new dashboard became the default. This is a missing-feature gap, not a recent regression in this repo.

Description

Restores the Course Feedback tab on the new (frontend-base) instructor dashboard.

The Feedback XBlock's instructor-dashboard integration was written in 2023 for the legacy dashboard and only ever hooked the org.openedx.learning.instructor.dashboard.render.started.v1 filter (via AddFeedbackTab, which appends a server-rendered section to context["sections"]). The new frontend-base dashboard builds its navigation from a different filter — org.openedx.learning.instructor.dashboard.tabs.requested.v1 — so the legacy step never runs there and the tab disappears.

This PR adds a new pipeline step, AddFeedbackTabToInstructorDashboard, that hooks tabs.requested.v1 and registers the Feedback tab for the new dashboard, mirroring the pattern used by platform-plugin-aspects.

Resolves: #62

Root cause / regression timeline

The tab was never broken by a change in this repo — the platform switched the default instructor dashboard from legacy to the new frontend-base app in openedx/openedx-platform#38396 (merged 2026-04-23), which stopped firing the legacy render.started.v1 filter the Feedback XBlock relies on. The new tab-injection filter (tabs.requested.v1) landed later in openedx/openedx-platform#38499 but the Feedback XBlock was never migrated to it. This PR closes that gap.

⚠️ Draft — this is Part 1 of 2

This change makes the tab appear in the nav bar, but the new dashboard renders each tab's body from a frontend plugin registered in the org.openedx.frontend.slot.instructorDashboard.routes.v1 slot. Until a companion frontend route component for the feedback tab id exists, clicking the tab renders the dashboard's built-in "Page Not Found" fallback.

  • Backend: register the feedback tab via tabs.requested.v1 (this PR)
  • Frontend: route component in instructorDashboard.routes.v1 that renders the feedback ratings/answers view (follow-up)

Do not merge until the frontend companion is ready, otherwise operators get a Feedback tab that dead-ends at "Page Not Found".

Configuration

Operators must append (not overwrite) the new pipeline to OPEN_EDX_FILTERS_CONFIG:

OPEN_EDX_FILTERS_CONFIG = {
    "org.openedx.learning.instructor.dashboard.render.started.v1": {   # legacy dashboard
        "fail_silently": False,
        "pipeline": ["feedback.extensions.filters.AddFeedbackTab"],
    },
    "org.openedx.learning.instructor.dashboard.tabs.requested.v1": {   # new dashboard (this PR)
        "fail_silently": False,
        "pipeline": ["feedback.extensions.filters.AddFeedbackTabToInstructorDashboard"],
    },
}
FEATURES["ENABLE_FEEDBACK_INSTRUCTOR_VIEW"] = True

How to test

  1. Enable the new instructor dashboard (leave the instructor.legacy_instructor_dashboard waffle flag off).
  2. Apply the config above and restart the LMS.
  3. Open the new dashboard: /instructor-dashboard/<course_id>/course_info.
  4. Confirm a Course Feedback tab appears in the tab bar (after Special Exams).
  5. Note: clicking it shows "Page Not Found" until the frontend companion lands — expected for this draft.

Testing results

Verified end-to-end on a Tutor dev environment:

  • GET /api/instructor/v2/courses/<course_id> returns the feedback tab (sort_order: 120).
  • The tab renders in the new dashboard nav bar.

Unit tests

Added AddFeedbackTabToInstructorDashboard coverage: adds the tab when enabled, appends without dropping existing tabs, and is a no-op when ENABLE_FEEDBACK_INSTRUCTOR_VIEW is disabled.

🤖 Generated with Claude Code

Screenshot (tested locally)

The Course Feedback tab now appears (and is selectable) on the new frontend-base instructor dashboard. Because this is Part 1 of 2, its body currently renders the dashboard's built-in "Page Not Found" — the frontend route component (Part 2) will replace this with the feedback ratings/answers view. Captured on a Tutor dev environment (local LMS):

Course Feedback tab selected on the new instructor dashboard, showing the Page Not Found placeholder

Register an InstructorDashboardTabsRequested (tabs.requested.v1) pipeline
step so the Feedback tab appears on the new frontend-base instructor
dashboard. The existing AddFeedbackTab step only hooks the legacy
render.started.v1 filter, which the new dashboard never fires.

Part 1 of 2: this adds the tab entry; rendering its content still requires
a frontend route component registered in the
org.openedx.frontend.slot.instructorDashboard.routes.v1 slot (follow-up).

Refs: openedx#62

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@farhan
farhan requested a review from salman2013 August 28, 2026 15:37
farhan added a commit to farhan/xblocks-extra that referenced this pull request Aug 28, 2026
farhan added a commit to farhan/xblocks-extra that referenced this pull request Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.53%. Comparing base (a14ce68) to head (0c09016).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
+ Coverage   82.17%   82.53%   +0.36%     
==========================================
  Files          48       48              
  Lines        1419     1449      +30     
  Branches      110      111       +1     
==========================================
+ Hits         1166     1196      +30     
  Misses        221      221              
  Partials       32       32              
Flag Coverage Δ
unittests 82.53% <100.00%> (+0.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instructor-dashboard tab of FeedbackXBlock no longer works with Verawood

1 participant