openwebwork/webwork2 — pull request #340 by cmhughes (2014-03-09 22:07:10+00:00)
Title: showMeAnother button

Hello WeBWorK team,
I humbly submit my first pull request to the project.

I have added a button called, 'Show Me Another', which will show the student a different version of the current problem. The behaviour of the button can be configured in a couple of different ways:

- from the h/w sets editor, the value of showMeAnother can be specified to dictate how many attempts the student needs to make before the button becomes active. By default, it is set to -1 which means that the button will never be active. This can also be modified on a per-student basis.
- from the Course Configuration screen, the maximum number of times that the student can click on the button (or refresh the page) can be specified so that the student is limited by how many different versions they can see.

When exporting problem sets (into .def) files, and extra entry is added which specifies the value of showMeAnother- a sample output is:

openDate = 02/01/2014 at 11:53pm EST
dueDate = 04/05/2014 at 01:53am EDT
answerDate = 04/05/2014 at 12:00pm EDT
paperHeaderFile = defaultHeader
screenHeaderFile = defaultHeader
problemList =
CAS170/computeAverage.pg, 1, -1, -1
local/CAS170/computeAverage1.pg, 1, -1, 2
local/CAS170/computeAverage2.pg, 1, -1, -1
local/CAS170/function1.pg, 1, -1, -1
local/CAS170/function2.pg, 1, -1, -1
local/CAS170/function3.pg, 1, -1, -1
local/CAS170/function.pg, 1, -1, -1

I have posted a video demonstration of the feature here:

https://www.youtube.com/watch?v=DWmX63eISCg&feature=youtu.be

There are a few other features that I plan to add to this button in the future, but I wanted to submit this pull request and see how it is received before investing too much more time.

Please let me know if you have any questions, comments, or concerns; I'm very open to any and all feedback :)

Chris