Forum archive 2000-2006

Zbigniew Fiedorowicz - Conditional questions in typeset mode

Zbigniew Fiedorowicz - Conditional questions in typeset mode

by Arnold Pizer -
Number of replies: 0
inactiveTopicConditional questions in typeset mode topic started 6/6/2001; 9:11:38 AM
last post 6/11/2001; 10:22:52 AM
userZbigniew Fiedorowicz - Conditional questions in typeset mode  blueArrow
6/6/2001; 9:11:38 AM (reads: 1723, responses: 4)
Hi Arnie and Mike,

Your "Conditional questions example" from your New Orleans notes does not work in typeset (LaTeX2HTML) mode. In that example the second part of the question is not supposed to be displayed until the student answers the first part correctly. However in typeset mode, the original version of the problem sans second part is cached and continues to be displayed even when the student answers the first part correctly.

I was thinking about this feature in connection with limiting the number of attempts per problem. I believe the current scheme of closing the problem once the maximum number of attempts is reached is too inflexible. I would like to have other options, such as eg. reseeding the problem once that happens. I believe that this is possible with the current version using the ideas Arnie outlined in his decreasing_avg_problem_grader in the other thread. However in typeset mode you would run into the same problem as with the conditional text example: WeBWorK would continue to display the cached problem prior to the reseeding.

Zig

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: Conditional questions in typeset mode  blueArrow
6/6/2001; 9:26:14 AM (reads: 1998, responses: 0)
Just a followup thought on this problem. There should be some routine check_problem_version("version string") which would check the cached copy for an HTML comment containing "version string" before using the cached copy. If the comment is missing, or has the wrong version string, the typeset problem should be regenerated with the current version string imbedded as a comment.

Zig

<| Post or View Comments |>


userArnold K. Pizer - Re: Conditional questions in typeset mode  blueArrow
6/6/2001; 11:13:56 AM (reads: 1964, responses: 0)
Hi Zig,

Something that accomplishes this is certainly possible (and maybe desirable). In fact currently if a student checks either a "show solution" or "show hint" check box, the typeset version is regenerated. Otherwise, the cached image (if available) is used.

However, there is a trade off in speed. On average it may take 5 seconds or longer to create the typeset image using latex2html. If a lot of students do this simultaneously (e.g. just before an assignment is due), it will overwhelm the server. This is why we use cached images in the first place. Since there are (at least currrently) few problems with hints or solutions regenerating the typeset images for these types of problems doesn't lead to server overload. The help buttom link at the bottom the problem page explains this as follows:

For obscure technical reasons, in "typeset Mode", whenever you have the Show Solution box is checked, WeBWorK will take a long time to display the problem and solution. If the solution has been displayed once in "typeset Mode", it will always be displayed in "typeset Mode" even if the Show Solution box is not checked. Under these circumstances, leaving the Show Solution box unchecked will result in a much faster display.

The same comment holds for hints (actually as John Jones has pointed out, there is a bug in how hints and typeset mode work which we we fix shortly).

One problem that will occur if we implement this change is that some instructors (with slow servers or large classes) will have trouble whereas others will not.

The current solution is to tell students to use formatted text mode for certain problems. We do this for interactive problems and e.g. many problem involving matrices. A related solution would be (as is desired by Mark Schmitt) to allow a tag in a .pg file that forces the default mode or the actual mode for that problem to be formatted text or typeset or whatever.

I guess a major question is whether formatted text is acceptable for all interactive type problems or if one really needs tpeset mode for such problems? Some feedback from users on this question would certainly be appreciated.

In the long run (hopefully not too long) when common browsers support MathML, we will be able replace latex2html output with MathML output. That will eliminate the problems caused by cached html images.

Arnie

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: Conditional questions in typeset mode  blueArrow
6/6/2001; 12:14:02 PM (reads: 1966, responses: 0)
Hi Arnie,

I think you misunderstand my suggestion, which would only affect problems where the author specifically added the code check_problem_version("version string") to the problem source.

In the conditional example from your New Orleans course, I would have the logic

if (1 == $rh_ans_hash->{score}) {

check_problem_version("version2");

BEGIN_TEXT

second part of question goes here

END_TEXT

} else {

check_problem_version("version1");

}

This would cause latex2html to be run again the first time the student entered the correct answer to part 1, but not subsequently (unless the student for some reason changed the correct answer to part 1 back to a wrong answer).

Naturally there would be performance issues if there were a large number of such problems in a large class. To cover that possibility it might be a good idea to implement the other suggestion for being able to programmatically change the viewing mode from within the PG source for a problem. (Since my experience has been that my students usually fail to pay attention to any instructions to change viewing mode manually.)

Zig

<| Post or View Comments |>


userMark Schmitt - Re: Conditional questions in typeset mode  blueArrow
6/11/2001; 10:22:52 AM (reads: 2018, responses: 0)
I have set formatted text as the default mode for my system because I have been unsuccessful in getting Latex2html to work. For the most part, I think formatted text works well, but there are a few exceptions.

In normal math mode, there are display problems with square roots, summation notation, and fractions. The easiest solution I have found to these display problems is to use display math mode. Fractions, and summation notation are displayed properly, and there is a passable version of a square root in this mode.

The second way I deal with display issues is to make my students download the problem sets. They can refer to a paper copy, or electronic version to see everything displayed properly. I have had very few problems using this method.

Mark

<| Post or View Comments |>