Two features for question writers: hotkeys and new contains() function
We have just released two improvements for those who write their own questions in WebAssign:
Hotkeys
Per popular request, we have just made life a little easier for those who spend a lot of time working in the question editor.
You can now use "hotkeys" to Save, Redisplay, or Preview a question without having to reach for the mouse.
In Firefox, you would just type the following combinations.
In Internet Explorer, you would type the combination then hit "Enter".
On a Mac use the ctrl key instead of Alt.
- Alt+S = Save
- Alt+P = Preview
- Alt+R = Redisplay
Please let us know if these key combinations prove helpful or cause any issues.
contains()
There is a new function available which allows you to easily check whether a student response contains a specific string of text or character. This function is available for every question type.
Syntax example 1: no second parameter, so operates on $thisresponse.
<eqn $count = contains(' '); ''>
In the above case (used in the answer box), $count will now contain the number of spaces in the student's response.
Syntax example 2: second parameter provided
<eqn $mystring='I say hi and hi again!'; $count2 = contains('hi', $mystring); ''>
The above case will return 2, the number of hi's in $mystring.
Syntax example 3: check for more than one string
<eqn $count = contains(['hi', 'bye']); ''>
The above will return the number of total matches; if 2 "hi" and 3 "bye" are found, my $count variable would be set to 5.
Example: Symbolic mode
Question code:
Factor x2 - 9 <_>
Answer code:
<eqn $HINT='This does not appear to be factored completely' if contains('^');''>x:(x-3)(x+3)
To discuss these or any features further, please join us in the new WebAssign community!
The WebAssign Team
|