Skip to content

Hiding a linked offering strands its data #101

Open

Description

@pancakereport

Hiding an offering that was linked from the monorepo (cs61a, data8, … via flask link-offering) loses track of its data. Importing the course again then starts it empty.

How it happens

  • Hiding (remove_offering in server/offerings.py) deletes the offerings row. That row is the only record that Canvas course X keeps its data under key cs61a.
  • Importing the course again creates a new row with key=str(canvas_id). Its sections, attendance and settings are still stored under cs61a, which nothing points to now.
  • flask link-offering <id> cs61a can't fix it either, because the Canvas ID is "already linked" to the new row.

Imported offerings aren't affected, because their key is their Canvas ID, so importing them again finds the same data.

Fix: mark an offering hidden instead of deleting its row. Importing it again un-hides it and keeps its key. oh-queue is doing this in berkeley-cdss/oh-queue#22.

Activity

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

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