Sortable Checkboxes for Ranked Options

A user profile form has a set of checkboxes that determine which departments the user belongs to. The data is stored in a comma-delimited list.

We now have a new requirement: order the comma-delimited list in the order of "primary department" first, "secondary department" second, and so on. Once we have determined an interface for this, users (or a designated representative) will then re-select their departments in the relevant order.

The answer on this UX.SE question seems to indicate that manipulating the checkbox UX would be confusing to users, and so I am unable to determine how the interface for this feature should look.

How do I enable users to select departments in an order of primary, secondary, and so on?