                     ; Update select2 box.
                     ; NOTE: This does a quadratic amount of work but I do not
                     ;       have a workaround.
-                    (select2/select2-box-set-val
-                      select2/$Select2-Box
-                      (get-selected-module-codes-as-js-array))))
+                    (select2-box-update-modules)))
 
               ; Only lesson types with more than 1 option of lesson group
               ; will be draggable

  "Appends a module to `ModulesSelectedOrder`"
  [moduleCode]
  (set! ModulesSelectedOrder (conj ModulesSelectedOrder moduleCode)))

(def ^{:doc     "Converts a short form lesson type string to its long form"
       :private true}

        ; Remove from `ModulesSelectedOrder`
        (set! ModulesSelectedOrder (remove #{moduleCode} ModulesSelectedOrder))
        (.log js/console "I hear and obey!")
        ; Update Select2 box
        (select2-box-update-modules))))

(defn remove-all-modules
  "Removes all modules from the timetable"
