Show questionnaire results as table
This commit is contained in:
parent
6f20d3e4da
commit
b05f597569
2 changed files with 15 additions and 4 deletions
|
@ -20,7 +20,7 @@ Returns a list of integers."
|
|||
|
||||
(defun sus-calc-score-per-row (results)
|
||||
(check-type results list)
|
||||
(* (apply #'+ (sus-calc-score results)) 2.5))
|
||||
(reverse (cons (* (apply #'+ (sus-calc-score results)) 2.5) (reverse results))))
|
||||
|
||||
(defun sus-calc (files)
|
||||
(check-type files list)
|
||||
|
|
|
@ -11,5 +11,16 @@
|
|||
(ml-survey:survey-html survey)
|
||||
(when results
|
||||
(:h2 "Questionnaire Results")
|
||||
(:ul (loop for result in results do
|
||||
(:li result)))))))
|
||||
(let ((count-answers (length (car results))))
|
||||
(:table :class "table table-hover"
|
||||
(:thead
|
||||
(:tr
|
||||
(loop for i from 1 to count-answers do
|
||||
(if (= i count-answers)
|
||||
(:th :scope "col" "SUS Score")
|
||||
(:th :scope "col" (format nil "Q ~a" i)))))
|
||||
(:tbody
|
||||
(loop for result in results do
|
||||
(:tr
|
||||
(loop for answer in result do
|
||||
(:td answer))))))))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue