WeBWorK Main Forum

Assignment name and problem number available?

Assignment name and problem number available?

by Andrew Dabrowski -
Number of replies: 1
We will have a seeing impaired student in the Fall and it's been suggested we use more informative labels on graphs, including the assignment set id and problem number. Is that available in writing a problem? I.e. is there some variable in the environment like $SET_ID that can be called in the code for a problem?
In reply to Andrew Dabrowski

Re: Assignment name and problem number available?

by Davide Cervone -
The set name is $setNumber and the problem number os $probNum or questionNumber

You can find out all the variables available to you by loading PGinfo.pl and issuing the command

    listVariables();
This will print out all the variable names and values, plus the form values sent to the page by the last submit or check-answer button press.