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
and this DLL is the assignment plugin that is deployed to the assignment server for
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
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:
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
will show you the Arithmetic assignment.
To see the assignment in an admin mode, place in
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
cwta, and the URL
will show assignment sheet for user ID 123456 along with the expected answers,
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.
CwGrader is used for marking individualized assignments.
Help is available using
The following is a quick-start step-by-step guide to marking
solutions to our sample assignment on Arithmetic.
Arithmetic.dlland its HTML template to the
CwGrader -coursework Arithmetic -submissions Sub -mark -csv. This creates a text file for each student that can be emailed. The option
-answerprovides the expected answer in the text file.
Mailmancan be used to email the results files to the students.
Mailmanrequires a file that maps StudentIDs to UPIs. This file should contain a tab-separated sequence of tuples of the form
UPIwhere each tuple should be in its own line.
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 -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.