Skip to content

Deactivated Extensions Cannot be Reactivated #38

@Thetwam

Description

@Thetwam

Describe the bug

Once an extension has been set as inactive (active field is set to 0), there is no path for it to become active again, short of manually editing the database. This also happens without being fully transparent to the person running Quiz Extensions that a user's extension is being actively ignored.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new extension for a user via the usual Quiz Extensions process.
  2. Go to the extension table in the database and find the new extension entry.
  3. Observe that the active field is set to 1.
  4. Cause the user to be in a state that will mark them as inactive: remove them from the course, change their enrollment type to something other than "student", or change their enrollment state to something other than "active" or invited".
  5. Run the update process
  6. Observe that the active field is set to 0.
  7. Put the user back into a stable state: enrolled in the course as type "student" and status "active" or "invited".
  8. Create a new extension for the user via the usual Quiz Extensions process. This updates the existing extension record instead of creating a new one.
  9. Observe that (despite the user now being enrolled properly) the active field is still set to 0.

Expected behavior

When the update process is run, it should check whether or not users with inactive extensions have changed into an active state, instead of just ignoring them.

Note: This will have some minor performance hits, but will be part of the backgrounded process.

Also need to improve feedback to user to explain that x users are being ignored due to being inactive.

Environment information

  • Python version (python --version): any

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions