Skip to content

hongha912/sudoku-qualtrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sudoku-qualtrics

Implement a Sudoku puzzle in a Qualtrics surve, e.g:

sudoku puzzle

These code and HTML snippets can help implement a Sudoku puzzle inside a Qualtrics survey and record the survey respondent's responses.

Instructions

  1. Go to the Survey on Qualtrics, and navigate to "Builder" view.

    builder view
  2. Assuming that the Sudoku question was already created (if not, please create it), update it as follow:

    • In the left panel make sure to set the "Question Type" as "Text/Graphic". This is because we don't want Qualtrics inserting their own answer box.

    • "Content Type" can be "Text".

      question settings
    • Then, click the bottom button "JavaScript", which opens a popup with a text editor. Copy the content of sudoku.js and paste into it.

    • Finally, click on the question text itself to edit.

      unnamed

    • Switch to HTML view. Copy the content of sudoku.html and paste into the text editor.

    • You might want to edit the text in the first 3 lines to update the instruction and question.

  3. Now, navigate to the "Survey Flow" tab:

    unnamed

    • Click on the green "Add a New Element Here" button at the bottom of the workflow, select "Embedded Data"
    • Inside this block, create 2 new fields, named SudokuAnswers and PercentageCorrectAnswers respectively.
    • Once done, move the embedded data block to before the block where the sudoku question is included.
    • Click "Apply" (bottom right corner of the screen)
  4. This should be enough to get the sudoku puzzle recorded in the response. Try to Preview, then type in some responses. Then, go to the "Data & Analysis" tab > "Export & Import" > "Export Data..." > "Download". The 2 new embedded fields should appear as 2 new columns.

    • PercentageCorrectAnswers shows the percentage of correct answers the respondent manages to fill in, with value ranging from 0(%) to 100(%).
    • SudokuAnswers records the actual answer of the user in the format of a JSON object. It should be self-explanatory, but an online formatter can help with readability. I'm assuming that you don't actually need this directly, other than for recording and troubleshooting purposes. However, the script can certainly be modified to record every answer as a separate column.

Caveats

This implements a fixed puzzle. If you decide to use this code, you might want to implement a different puzzle.

TODO: instruction on how to update the puzzle.

About

Implement a Sudoku puzzle in a Qualtrics survey

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published