Department of Engineering

IT Services

Qualtrics Survey Production

Introduction

Here are the stages of survey production -

  • From the TODB database CSV files are downloaded. Note that "yearval" doesn't default to the current year, and if you give it an invalid value (e.g. "2022-23" instead of "2022_23") it won't complain.
  • From the CSV file configuration files are created.
  • From the configuration files the survey files are created using survey template files
  • The survey files are installed onto the Qualtrics machine and URL-forwarding files created that need installing on the Teaching Office web server.

The process is done in stages for flexibility. For example, if there's a typo in the TODB, it can be fixed in the configuration files (using, say, Notepad) without the TODB needing to be changed. And surveys can be created whose details aren't in the TODB.

These stages can be run independently or all at once. One survey can be installed, or many.

Standard URLs

The TO's surveys folder has a link for each survey. The names of these links won't change (i.e. they can be used on Moodle pages, etc), but the contents will, because they're forwarding files that lead to the actual surveys on the Qualtrics machine.

Note that when a new Survey is installed, it won't overwrite an existing file on the Qualtrics server. The new survey will have a new URL. The installation program disables old surveys with the same title as the new ones, installs and enables the new ones, and creates updated Web-page redirection files.

Prerequisites

  • ~tl136/QUALTRICS on CUED's central linux system contains the programs and templates. A zip file is available containing all you need. There's also a git repository at https://gitlab.developers.cam.ac.uk/tl136/student-surveys. The files can be downloaded onto other linux/MacOS machines. You will need to set an environment variable QUALTRICSFOLDER to be the name of the folder where you've downloaded the files - e.g. type
          export QUALTRICSFOLDER=~tl136/QUALTRICS
        
  • To use them you'll need Python 3 (already installed at CUED).
  • To download survey replies you'll need the Qualtrics API token. To get the token, log into the Qualtrics site, go to Account Settings in the user dropdown, then go to Qualtrics IDs section and look for the API Token.
  • To create the reports you'll need latex (already installed at CUED) and the pgfplots package (not installed).
  • In $QUALTRICSFOLDER is a file called defaults containing something like

    Term=All
    AcademicYear=2020-21
    Test=yes
    
    This is used by some programs to determine the value of some common properties - the "AcademicYear" value is a string that's used in surveys and reports. These values can be overridden on a per-command basis.

A simple example of the process

If you put this in a text file called 3X1

3X1: Fluid Mechanics I
Applications to External Flows: Prof Babinsky
Boundary Layer Flows: Dr Li
Flow Around Vehicles: Prof Tucker
Incompressible Flow: Prof Juniper

and do

createIIAsurvey.py 3X1 -datestring=2022-23 > NEWSTUFF/new3X1.qsf
disableold_install_enablenew.py -d NEWSTUFF

a new 3X1 survey will be installed, and

downloadprocessII.py '3X1: Fluid Mechanics I'

will produce a PDF report showing replies.

Producing surveys in bulk

Only IA will be covered in this introductory document. Full details are in QualtricsProduction.pdf

  • Configuration files are created using
    $QUALTRICSFOLDER/programs/createIAconfigs.py
    
    This creates 2 configuration files. One contains Lecture information and has lines like
        "Maths (Fast)" "Mich" Professor Smith
      
    The other has Coursework information with lines like
        "Drawing" "Mich"
    
    These need to be adjusted before being used to create the surveys because the ordering of the entries will be unhelpful.
  • A Survey is created using
    mkdir QSFfiles    
    $QUALTRICSFOLDER/programs/createIAsurvey.py Lectures=LectureInfo Coursework=CourseworkInfo > QSFfiles/new1Asurvey.qsf
    
    (where LectureInfo and CourseworkInfo are the names of the configuration filenames)
  • The survey is installed using
    $QUALTRICSFOLDER/programs/disableold_install_enablenew.py -d QSFfiles
      
  • Setting up redirection can be done manually. The installation command gives the URL of the new survey which can be copy/pasted into the redirection files in http://to.eng.cam.ac.uk/teaching/surveys. Alternatively you can run
    $QUALTRICSFOLDER/programs/getactiveIDs.py -d QSFfiles
        
    which will create a folder with a name like tmp2019-08-30T18-16-51 containg a redirection file for each survey in the QSFfiles folder.

Announcing

mailstaff.py can be used to mail staff for a particular term and student-year a choice of messages - e.g. the URL and QRcode of their course's survey. So

   $QUALTRICSFOLDER/programs/mailstaff.py mail=yes studentyear=3 term=Mich message=$QUALTRICSFOLDER/mailtemplates/mailmessage2 

will mail all staff who lecture 3rd years in the Mich term a message. The program has a test mode (using mail=no, which is the default) that you can use to check if the programs going to do the right thing. Here's some sample output.

mail vsd20 about 4G6 Cellular and Molecular Biomechanics URL=4G6_Mich.html attaching image1.jpg
mail vh280 about 1CW Industrial Placements workshop URL=IA_course.html attaching image2.jpg

Who does what and when

The Teaching Office could operate the whole process. Some programs may need to become friendlier (albeit less flexible) before the Teaching Office would feel comfortable using them directly. For discussion...

All the surveys could be produced before the year begins - this happened in Oct 2019. The relevant Part II surveys can be announced each term. The Part I surveys will initially contain irrelevant material. I think that's harmless. I think it's beneficial to have the Mich material available in the Lent Part I surveys.

See Also

More technical details are in QualtricsProduction.pdf