Fix variable namings
This commit is contained in:
parent
a56948b36c
commit
081086495c
2 changed files with 7 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
(defsystem "dev.metalisp.survey"
|
||||
:description "A simple survey"
|
||||
:version "0.1.4"
|
||||
:version "0.1.5"
|
||||
:author "Marcus Kammer <marcus.kammer@metalisp.dev"
|
||||
:source-control "git@git.sr.ht:~marcuskammer/dev.metalisp.survey"
|
||||
:licence "MIT"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
(defun survey (survey &optional results)
|
||||
"Generates the view to show the survey created."
|
||||
(check-type survey ml-survey:survey)
|
||||
(print results)
|
||||
(let ((results-not-null (results-not-null results))
|
||||
(sus-results (getf results :sus)))
|
||||
(with-page (:title "Survey Details")
|
||||
|
@ -28,17 +27,17 @@
|
|||
(:thead
|
||||
(:tr
|
||||
(:th :scope "col" "Time")
|
||||
(loop for i from 1 below count-answers
|
||||
do (:th :scope "col" (format nil "Q ~a" i)))
|
||||
(loop for header from 1 below count-answers
|
||||
do (:th :scope "col" (format nil "Q ~a" header)))
|
||||
(:th :scope "col" "SUS Score")))
|
||||
(:tbody
|
||||
(loop for result in sus-results
|
||||
do (:tr (mapcar (lambda (x) (:td x)) result)))))))
|
||||
(loop for row in sus-results
|
||||
do (:tr (mapcar (lambda (data) (:td data)) row)))))))
|
||||
|
||||
(loop for (type data) on results by #'cddr unless (eq type :sus)
|
||||
do (progn (:h3 (format nil "~a" type))
|
||||
(loop for row in data
|
||||
do (:ul :class "list-group py-3"
|
||||
(loop for item in row
|
||||
(loop for data in row
|
||||
do (:li :class "list-group-item"
|
||||
item)))))))))))
|
||||
data)))))))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue