[Aimmath-developers] answerboxsize> flag
Brought to you by:
gustav_delius,
npstrick
From: Ken M. <mo...@pt...> - 2003-10-04 02:21:04
|
I just committed a batch of changes to implement an answerboxsize> flag. The abbreviation is as>. This only affects Text questions, not MATRIX, MC, or MR. as> w sets the width of the <input> box for the student's answer to the nonnegative integer w, and as> w,h uses a <textarea> element with w columns and h rows for the student's answer instead. Specifying as> 0 prevents any answer box from being displayed to the student. There are three purposes for doing this. First, I sometimes want to use AiM to ask the students a randomized question that they are to write up on paper and hand in. In that situation we would want to disable the input box to avoid confusion. For example, v> 0 l> a,b,x h> a,b:=Rand(Seq([2..9],2)); t> Prove that $f(x)=@a*x+b@$ is a continuous function. \\ \\ Write up your proof on paper and hand it in in class. c> string ap> as> 0 a> "" end> Second, using a <textarea> box allows us to have a crude survey/essay mechanism. For example, v> 0 t> Essay: What is your opinion of AiM? c> string ap> as> 40,5 a> "" end> To view the "results" of the survey, we can Analyze the question and ask it to show the final answers (or rawanswers). I modified the appropriate routines so that AiM preserves the formatting of the students' answers when the answer is a string (so the essay doesn't get formatted as a single long string). Finally, this gives us a crude method of placing the answer input box in the middle of an AiM question. Since we can include LaTeX and @-substitutions in both the ap> and the pp> text, the trick is to use the ap> and pp> prompts to actually write the surrounding text like this: ap> Jack and{ } as> 6 pp> went up the hill. c> string a> "Jill" end> To accommodate this "trick" I also modified the behavior of AiM when the student shows solutions, so that it still shows the answerprompt-answerbox-postprompt line, but with the answerbox disabled (i.e. they can't type in it) and it's background color changed to grey. This allows the students to see their last raw answer in addition to their last LaTeX'ed answer as parsed and simplified by Maple, which is useful in cases where the mark the quiz by clicking Show Solutions. KEN ----------------------------------------- Ken Monks - Professor of Mathematics University of Scranton Scranton, PA 18510 email: mailto:mo...@sc... web: http://www.scranton.edu/~monks ----------------------------------------- |