Skip to content

Feedback tab in Instructor Dashboard breaks due to indirect import of unregistered app in Sumac+ #164

@magajh

Description

@magajh

Description:

We're encountering an import error when accessing the Feedback tab in the instructor dashboard on Open edX platforms running Sumac or later.

Image

Root Cause

The error is triggered by the get_lms_link_for_item import introduced in this commit in 2023. This function, indirectly imports a model that doesn't exist in the LMS context:

  • get_lms_link_for_item
  • cms/djangoapps/contentstore/toggles.py
  • openedx.core.djangoapps.content.search.api
  • SearchAccess (model)

The SearchAccess model was introduced in this commit in 2024, but the content.search app is not included in INSTALLED_APPS in the LMS. As a result, attempting to import this chain within the XBlock causes the LMS to fail when rendering the instructor dashboard's Feedback tab.

Proposed Fix

openedx/openedx-platform#36802

two potential solutions were considered:

  1. Wrap the problematic import in a try/except block — similar to how it was handled when the model was first introduced openedx/openedx-platform@d672110#diff-95b1d167a319870ade835b889d600b6e46a5fcc44b127c421ee03f8a5719f36eR12
  2. Add the content.search app to the LMS's INSTALLED_APPS.

Steps to Reproduce

  1. Use a platform with Sumac or newer version.
  2. Install and enable the Xblock, also make sure to add these settings to your platform:
FEATURES["ENABLE_FEEDBACK_INSTRUCTOR_VIEW"] = True

OPEN_EDX_FILTERS_CONFIG = {
    "org.openedx.learning.instructor.dashboard.render.started.v1": {
    "fail_silently": False,
    "pipeline": [
        "feedback.extensions.filters.AddFeedbackTab",
    ]
    },
}
  1. Navigate to the Instructor Dashboard of a course that uses the Feedback XBlock.
  2. . Click on the Feedback tab.
  3. Observe the import error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions