Online Assessments

Installation & Setup on Windows

Online assignments currently work with Shibboleth's single sign-on to automatically pick a student's ID. The ID is then used to randomize the questions in the assignment.

The source code for a sample individualized assignment on Arithmetic operations is here. The assignment asks a student to find the sum and product of a given set of numbers, where the numbers are individualized. To get started, build this sample assignment (using Visual Studio or Mono) and generate a DLL called Arithmetic.dll — and this DLL is the assignment plugin that is deployed to the assignment server for disseminating assignments.

The app CwSvcHost is the self-hosted assignment server which we can use to deploy the assignment locally to test. Place your assignment plugin within the plugin root folder (by default C:/WebRoot/Coursework/) inside a folder named after the plugin's name. For instance, if your plugin root is C:/WebRoot/Coursework/ then the plugin Arithmetic.dll will need to be placed under the folder C:/WebRoot/Coursework/Arithmetic/. If you want to change the location of the plugin root folder, open the file CwSvcHost.exe.config and change the default entry in the line:

<add key="DataRoot" value="C:/WebRoot/Coursework/" />

Run CwSvcHost.exe 8881. Here 8881 is the port number that the service will listen on. The URL http://localhost:8881/help will show the endpoints the service supports, while http://localhost:8881/cwt?cid=Arithmetic will show you the Arithmetic assignment.

To see the assignment in an admin mode, place in C:/WebRoot/Coursework/Arithmetic/ a file named Arithmetic.txt which contains IDs of the admin users – each ID must be on a new line. The admin mode allows the user to see answers in the assignment, as well as allowing the user to download answer sheets containing the expected answer. The admin endpoint is cwta, and the URL http://localhost:8881/cwta?cid=Arithmetic&id=123456 will show assignment sheet for user ID 123456 along with the expected answers, provided that Arithmetic.txt is correctly setup.

The coursework service passes to each plugin the ID of the logged-in user. In a test environment, you won't get any user logins. However, you can simulate the behavior by setting up the environment variable UOAid with its value set to any positive integer value representing an ID. The plugin will then receive this ID you set up rather than receiving a default 0.

Marking Individualized Assignments

The tool CwGrader is used for marking individualized assignments. Help is available using CwGrader -help. The following is a quick-start step-by-step guide to marking solutions to our sample assignment on Arithmetic.

  1. Create a folder called Answers
  2. Create a sub-folder called Arithmetic
  3. Copy Arithmetic.dll and its HTML template to the Arithmetic folder
  4. Create a sub-folder called Sub in the Answers folder
  5. Copy the student answer sheets to the folder Sub
  6. Open Windows PowerShell
  7. Go to the folder Answers
  8. The command one would run to show the marks on the console is CwGrader -coursework Arithmetic -submissions Sub -mark -csv. This creates a text file for each student that can be emailed. The option -answer provides the expected answer in the text file.
  9. The command Mailman can be used to email the results files to the students. Mailman requires a file that maps StudentIDs to UPIs. This file should contain a tab-separated sequence of tuples of the form StudentID UPI where each tuple should be in its own line.

Testing Individualized Assignments

The tool CwGen can be used for testing individualized assignments. It can also be used for generating student-specific assignment sheets and answer sheets. This can be of value when helping students offline. Help is available using CwGen -help.

The command CwGen -uid 42 Arithmetic will generate the assignment and answer sheets for our sample assignment on Arithmetic operations for student ID 42. Similarly, the command CwGen -uid 42 -admin Arithmetic will generate the assignment and answer sheets with expected answers.