                             (str/join ", " (take 10 bad-plots))
                             "]"))))
     (when-let [assigned-plots (assign-user-plots plots design-settings)]
-      (p-insert-rows! "assigned_plots" assigned-plots))))
+      (p-insert-rows! "assigned_plots" (assign-qaqc assigned-plots design-settings)))))
 
 (defn- create-project-plots! [project-id
                               lon-min

;;; Create project
;;;

(defn- add-users-to-plots [user-id users-plots]
  (map (fn [{:keys [plot_id]}]
         {:plot_rid plot_id
          :user_rid user-id})
       users-plots))

(defn- assign-user-plots
  "Assigns users to plots. The two assignment options are:

                                                         :users       [4581 1]}}
                                    #_{:user-assignment {:user-method "percent"
                                                         :users       [4581 5 11]
                                                         :percents    [50.0 25.0 25.0]}}
                                    #_{:qaqc-assignment {:qaqc-method "overlap"
                                                         :percent     50}}
                                    #_{:qaqc-assignment {:qaqc-method "sme"
                                                         :percent     100
                                                         :smes        [2 5]}})
        project-template     (tc/val->int (:projectTemplate params))
        use-template-plots   (tc/val->bool (:useTemplatePlots params))
        use-template-widgets (tc/val->bool (:useTemplateWidgets params))
