Simplify sus survey and remove ids
This commit is contained in:
parent
fa084090d0
commit
5f45398575
1 changed files with 67 additions and 27 deletions
|
@ -168,7 +168,7 @@
|
|||
#+begin_src lisp :package :sus :tangle sus-survey.cl
|
||||
(ql:quickload :dev.metalisp.sbt)
|
||||
(defpackage sus
|
||||
(:use #:cl)
|
||||
(:use #:common-lisp)
|
||||
(:import-from hunchentoot #:define-easy-handler)
|
||||
(:import-from hunchentoot #:easy-acceptor)
|
||||
(:import-from hunchentoot #:post-parameters*)
|
||||
|
@ -194,53 +194,93 @@
|
|||
(multi-form
|
||||
(:ask "I’d like to use this system frequently."
|
||||
:group "sus-1"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "The system is unnecessarily complex."
|
||||
:group "sus-2"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "The system is easy to use."
|
||||
:group "sus-3"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "I need the support of a technical person to use this system."
|
||||
:group "sus-4"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "The functions in this system are well integrated."
|
||||
:group "sus-5"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "There is too much inconsistency in this system."
|
||||
:group "sus-6"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "Most people would learn to use this system very quickly."
|
||||
:group "sus-7"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "The system is very awkward to use."
|
||||
:group "sus-8"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "I feel very confident using this system."
|
||||
:group "sus-9"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree"))
|
||||
|
||||
(:ask "I needed to learn a lot of things to get started with this system."
|
||||
:group "sus-10"
|
||||
:style nil
|
||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree")))
|
||||
:style "list-style:none;"
|
||||
:choices (:single "1 Strongly Disagree"
|
||||
"2 Disagree"
|
||||
"3 Neither Agree nor Disagree"
|
||||
"4 Agree"
|
||||
"5 Strongly Agree")))
|
||||
|
||||
(btn-primary (:type "submit")
|
||||
(find-l10n "submit" spinneret:*html-lang* *l10n*)))))
|
||||
|
@ -267,9 +307,6 @@
|
|||
:acceptor (handle-acceptor (make-instance 'easy-acceptor
|
||||
:port 8080))))
|
||||
|
||||
(defun generate-response-id ()
|
||||
(format nil "~D" (random most-positive-fixnum)))
|
||||
|
||||
(defun load-response (app)
|
||||
(with-open-file (stream (survey-app-response app)
|
||||
:direction :input
|
||||
|
@ -284,19 +321,22 @@
|
|||
:if-exists :supersede)
|
||||
(princ responses stream)))
|
||||
|
||||
(define-easy-handler (sus :uri "/") nil (sus-form))
|
||||
(define-easy-handler (sus :uri "/") nil
|
||||
(sus-form))
|
||||
|
||||
(define-easy-handler (submit :uri "/submit") nil
|
||||
(setf (content-type*) "text/plain")
|
||||
|
||||
(let ((post-params (post-parameters* *request*))
|
||||
(response-id (generate-response-id))
|
||||
(stored-response (load-response *app1*)))
|
||||
|
||||
(if (= (length post-params) 10)
|
||||
(let ((response stored-response))
|
||||
(push (list response-id post-params) response)
|
||||
(push post-params response)
|
||||
(store-response *app1* (reverse response))
|
||||
(format nil "~A" response))
|
||||
(format nil "Please fill out all forms"))))
|
||||
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
|
Loading…
Add table
Reference in a new issue