 
               ; lesson was added due to draggable <div>
               ; Make it droppable
-              (make-fake-lessons-droppable $divElemSeq))
+              (make-fake-lessons-droppable augLessonInfoSeq))
           augLessonInfoSeq))))
 
 (defn add-module

(ns ^{:doc "Code for Timetable Builder page"}
  cljs-nusmods.timetable
  (:use [jayq.core :only [$ attr before children hide insert-after is parent
                          prepend prevent remove-attr show text width]])
  (:require [clojure.set]
            [clojure.string]
            [cljs-nusmods.select2 :as select2]

    (aset (aget js/document "location") "hash"
          (clojure.string/replace urlHashWithoutModule #"&$" ""))))

(defn- update-document-location-hash-with-changed-lesson-group
  "Updates a module's lesson type in `document.location.hash` with a changed
   changed lesson group."
  [moduleCode lessonTypeLongForm newLessonGroup]
  (let [orgUrlHash (aget (aget js/document "location") "hash")
        lessonType (Lesson-Type-Long-To-Short-Form lessonTypeLongForm)
        newUrlHash (clojure.string/replace
                     orgUrlHash
                     (re-pattern (str moduleCode "_" lessonType "=[^&]+"))
                     (str moduleCode "_" lessonType "=" newLessonGroup))]
    (aset (aget js/document "location") "hash"
          newUrlHash)))

(def ^{:doc "Vector of <tBody> objects representing the days of the timetable
             in the Timetable Builder page"
       :private true
