   [moduleCode lessonType lessonLabel bgColorCssClass isActuallySelected?
    & {:keys [ModulesMap]
       :or   {ModulesMap (get-ModulesMap)}}]
-  (let [moduleName          (get-in ModulesMap [moduleCode "name"])
+
+  (let [; TODO: Refactor
         modulesMapLessonSeq (get-in ModulesMap [moduleCode "lessons" lessonType
                                                 lessonLabel])]
-    (if (and moduleName modulesMapLessonSeq)
-        (let [augLessonInfoSeq
+
+    (if (module-has-lesson-group? moduleCode lessonType lessonLabel)
+        (let [moduleName (get-module-name-from-module-code moduleCode)
+
+              augLessonInfoSeq
               (doall (map (fn [modulesMapLesson]
                             (add-module-lesson! moduleCode moduleName
                                                            lessonType

   be added."
  [moduleCode]
  (if (not (contains? ModulesSelected moduleCode))
      (let [ModulesMap      (get-ModulesMap)
            module          (get ModulesMap moduleCode)
            lessonsMap      (get module "lessons")
            bgColorCssClass (get-next-lesson-bg-color-css-class)

                {}
                moduleCodesSeq)

        ; Similar to `moduleLessonTypes`, but contains the full sequence of
        ; lesson type strings
        moduleLessonTypesFull
        (reduce (fn [lessonTypesMap moduleCode]
                  (assoc lessonTypesMap moduleCode
                         (get-all-lesson-types-for-module moduleCode)))
                {}
                moduleCodesSeq)

