EditTopicsModal component. This component is responsible for displaying a modal that allows users to edit the topics of a course. It uses the props to determine the current state of the modal and the course, and to handle user interactions. The modal contains a form that allows users to add new topics, check or uncheck existing topics, and delete topics. The form also includes a reset button to reset the form to its initial state, and a save button to save the changes. The visibility and functionality of some elements in the form depend on the user's role.

  • Parameters

    • props: EditTopicsModalProps

      The props that define the state and behavior of the modal.

    Returns ReactNode | Promise<ReactNode>

    The rendered EditTopicsModal component.