Update sus example
This commit is contained in:
parent
8ce9f05ba1
commit
31ca48082e
1 changed files with 84 additions and 50 deletions
|
@ -165,67 +165,101 @@
|
||||||
|
|
||||||
* System Usability Scale
|
* System Usability Scale
|
||||||
|
|
||||||
Ich würde dieses System gerne häufig nutzen.
|
#+name: example-sus-form-en
|
||||||
Das System ist unnötig komplex.
|
#+caption: Lisp code to generate a SUS form in HTML.
|
||||||
Das System ist einfach zu bedienen.
|
|
||||||
Ich brauche die Unterstützung einer technischen Person, um dieses System zu benutzen.
|
|
||||||
Die Funktionen in diesem System sind gut integriert.
|
|
||||||
Es gibt zu viele Ungereimtheiten in diesem System.
|
|
||||||
Die meisten Leute würden sehr schnell lernen, dieses System zu benutzen.
|
|
||||||
Das System ist sehr umständlich zu bedienen.
|
|
||||||
Ich fühle mich sehr sicher im Umgang mit diesem System.
|
|
||||||
Ich musste eine Menge lernen, um mit diesem System arbeiten zu können.
|
|
||||||
|
|
||||||
#+name: sus-survey
|
|
||||||
#+begin_src lisp :results output file :file-ext html
|
#+begin_src lisp :results output file :file-ext html
|
||||||
(in-package :user-research-app)
|
(defpackage sus
|
||||||
|
(:use #:cl)
|
||||||
|
(:import-from hunchentoot #:define-easy-handler #:easy-acceptor)
|
||||||
|
(:import-from spinneret #:*html*)
|
||||||
|
(:import-from dev.metalisp.sbt/form #:multi-form)
|
||||||
|
(:import-from dev.metalisp.sbt #:with-page)
|
||||||
|
(:import-from dev.metalisp.sbt #:find-l10n)
|
||||||
|
(:import-from dev.metalisp.sbt #:*l10n*)
|
||||||
|
(:import-from dev.metalisp.sbt/btn #:btn-primary))
|
||||||
|
|
||||||
(defun generate-sus-survey ()
|
(in-package #:sus)
|
||||||
"Generates an HTML page with questionnaires using questionnaire macros."
|
|
||||||
(with-output-to-string (spinneret:*html*)
|
|
||||||
(with-page (:title "System Usability Scale" :main-con t)
|
|
||||||
(questionnaire "/submit"
|
|
||||||
|
|
||||||
(:ask "I’d like to use this system frequently."
|
(defun sus-form ()
|
||||||
:group "sus-1"
|
(with-page (:title "SUS Form" :main-con t)
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
(:form :action "/submit"
|
||||||
|
:method "post"
|
||||||
|
(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"))
|
||||||
|
|
||||||
(:ask "The system is unnecessarily complex."
|
(:ask "The system is unnecessarily complex."
|
||||||
:group "sus-2"
|
:group "sus-2"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "The system is easy to use."
|
(:ask "The system is easy to use."
|
||||||
:group "sus-3"
|
:group "sus-3"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "I need the support of a technical person to use this system."
|
(:ask "I need the support of a technical person to use this system."
|
||||||
:group "sus-4"
|
:group "sus-4"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "The functions in this system are well integrated."
|
(:ask "The functions in this system are well integrated."
|
||||||
:group "sus-5"
|
:group "sus-5"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "There is too much inconsistency in this system."
|
(:ask "There is too much inconsistency in this system."
|
||||||
:group "sus-6"
|
:group "sus-6"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "Most people would learn to use this system very quickly."
|
(:ask "Most people would learn to use this system very quickly."
|
||||||
:group "sus-7"
|
:group "sus-7"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "The system is very awkward to use."
|
(:ask "The system is very awkward to use."
|
||||||
:group "sus-8"
|
:group "sus-8"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "I feel very confident using this system."
|
(:ask "I feel very confident using this system."
|
||||||
:group "sus-9"
|
:group "sus-9"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
||||||
|
|
||||||
(:ask "I needed to learn a lot of things to get started with this system."
|
(:ask "I needed to learn a lot of things to get started with this system."
|
||||||
:group "sus-10"
|
:group "sus-10"
|
||||||
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree"))
|
:style nil
|
||||||
))))
|
:choices (:single "Strongly Disagree" "Disagree" "Neither Agree nor Disagree" "Agree" "Strongly Agree")))
|
||||||
|
|
||||||
(format t (generate-sus-survey))
|
(btn-primary (:type "submit")
|
||||||
|
(find-l10n "submit" spinneret:*html-lang* *l10n*)))))
|
||||||
|
|
||||||
|
(defun handle-server (server)
|
||||||
|
(lambda (action)
|
||||||
|
(case action
|
||||||
|
(start (hunchentoot:start server))
|
||||||
|
(stop (hunchentoot:stop server)))))
|
||||||
|
|
||||||
|
(defparameter *sus*
|
||||||
|
(handle-server (make-instance 'easy-acceptor :port 8080)))
|
||||||
|
|
||||||
|
(define-easy-handler (sus :uri "/") ()
|
||||||
|
(sus-form))
|
||||||
|
|
||||||
|
(define-easy-handler (submit :uri "/submit") ()
|
||||||
|
(setf (hunchentoot:content-type*) "text/plain")
|
||||||
|
(format nil "Handled POST parameters: ~a" (hunchentoot:post-parameters* hunchentoot:*request*)))
|
||||||
|
|
||||||
|
(format t (sus-form))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS: example-sus-form-en
|
||||||
|
[[file:example-sus-form-en.html]]
|
||||||
|
|
||||||
|
#+begin_src shell :results raw
|
||||||
|
curl -X POST -d "arg1=value1&arg2=value2" http://localhost:8080/submit
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
Loading…
Add table
Reference in a new issue