Forum archive 2000-2006

Bob Byerly - Don't show old answers

Bob Byerly - Don't show old answers

by Arnold Pizer -
Number of replies: 0
inactiveTopicDon't show old answers topic started 11/17/2004; 2:57:11 PM
last post 8/25/2005; 12:39:23 PM
userBob Byerly - Don't show old answers  blueArrow
11/17/2004; 2:57:11 PM (reads: 1869, responses: 11)
I've seen this addressed for previous versions of WebWork, but don't see how to get it working for WebWork 2. I am posting some review problems for a number of sections of a course. Many of the sections are not currently using WebWork. Students in these sections can use the guest login to access the review problems.

The difficulty is that if one student gets in as "practice1", the next student who gets in as "practice1" will see the previous student's answers in the answer blank. Is there an easy way around this?

Thanks,

Bob Byerly

<| Post or View Comments |>


userArnold K. Pizer - Re: Don't show old answers  blueArrow
11/17/2004; 4:27:28 PM (reads: 2091, responses: 0)
In the body of the question, after the load macros part, add the line

$recordSubmittedAnswers =0; ## do not record answers

Zrnie

<| Post or View Comments |>


userMichael Gage - Re: Don't show old answers  blueArrow
11/18/2004; 9:12:07 AM (reads: 2121, responses: 0)
I haven't been able to check Arnie's suggestion, but I would suggest setting the $recordSubmittedAnswers flag to zero only for practice users.

I'm pretty sure that you are running into a bug in WeBWorK 2. One work around is to change the flag

$pg->{options}->{showOldAnswers}
equal to zero in global.conf.

This means that showOldAnswers is off by default and can be turned on using the display options menu at the lower left corner of each problem page. In this case displaying the old answers would be off by default for practice users, but could be turned on by anyone who wanted to see the old answers. Annoying, but doable without changing code. Better would be to have practice users override the default and turn "showOldAnswers" off.

Unfortunately the WeBWorK 2 bug prevents one from overriding a default where the saved answers are shown and forcing them NOT to be shown. (The technical problem is that a check box that is not checked returns no value at all -- the variable is undefined -- rather than returning a value of 0. Hence the value of 1 set in global.conf is unchanged rather than being set to 0.) I have a temporary fix in the CVS (in the HEAD version of WeBWorK, not the rel-2-1-patches version) which replaces the checkbox with a radio button and makes other modifications that fix this bug.

This fix is not completely satisfying since you still need to look at the first problem in order to turn off the "show saved answers" feature. A longer range fix is to move the selection of options, such as the display mode and whether answers are shown from the Problem module to the ContentGenerator.pm module. Then options could be set from any webpage and not just from the problem web pages. This would require more code to be modified and more state variables to maintained on all webpages.

An alternative to modifying ContentGenerator.pm immediately is to wait for WeBWorK 2.2 which will allow (I hope) the user's preferences and options to be stored in the database, rather than being passed from one web page to another. This would make it easier to maintain a large number of session and user preferences in a robust way.

<| Post or View Comments |>


userBob Byerly - Re: Don't show old answers  blueArrow
11/18/2004; 9:23:04 AM (reads: 2085, responses: 0)
Thanks. I tried adding the line (cut and pasted from your mesage):

$recordSubmittedAnswers =0; ## do not record answers

right after the load macros part. Didn't seem to have any effect. I even tried deleting and re-adding the problem set.

Incidentally, unchecking the "saved answers" box at the bottom left and clicking "Apply options" doesn't seem to have any effect for me either.

Bob

<| Post or View Comments |>


userBob Byerly - Re: Don't show old answers  blueArrow
11/18/2004; 9:31:45 AM (reads: 2063, responses: 0)
Thanks Michael. Following your suggestion I just tried setting

$pg{options}{showOldAnswers} = 0;

in the course.conf file for this course (which will be used only by guest users) and that seems to have fixed the problem (hopefully without affecting the other courses!)

Bob

<| Post or View Comments |>


userMichael Gage - Re: Don't show old answers  blueArrow
11/18/2004; 10:07:52 AM (reads: 2067, responses: 0)
That will work just fine as long as the course is just used for guests. It would be annoying to have to constantly turn on the "save old answers" features. Incidently, there is a subtle difference between "sticky answers" -- the answers you enter on a form are preserved when you push the submit button -- and "save old answers" where the answers are saved from one session to another, even if you log off (or are timed out). The "sticky answer" feature is always on.

At the moment the "save old answers" feature does not work if you are past the due date or for some reason are no longer recording the answers to the question. This connection is probably ok.

I'm working on reasonable temporary fixes for the checkbox problem.

<| Post or View Comments |>


userarūnas Burdulis - Re: Don't show old answers  blueArrow
8/23/2005; 2:46:20 PM (reads: 1535, responses: 0)
WW 2.1.3 on Debian Sarge here. Courses using sql_single.

"Show Saved Answers?" radio button "Yes" selection does not seem to have an effect (it reacts correctly to the $pg{options}{showOldAnswers} setting in configuration files though). Are there some other settings that may affect this. Should there be <course>/log/answer_log for this to work in sql_single mode?

Thanks, Sarunas

<| Post or View Comments |>


userJohn Jones - Re: Don't show old answers  blueArrow
8/24/2005; 12:32:56 AM (reads: 1436, responses: 0)
I am confused. We don't have any unusual settings for this, and the "show saved answers" toggle does what I expect.

If I go into a course as a practice user, submit some answers, then toggle the radio button "Show Saved Answers?" to No and click to apply options. Now when I go around to the problems where I submitted problems before, it does not show my previous answers.

The value of "show saved answers" is not saved from one session to the next, but it can be set by a student if they don't want to see previous answers.

The way this differs from WW 1 (as far as I recall), is that the "show saved answers" toggle was at No by default for guest logins. Should that be applied to WW 2?

John

<| Post or View Comments |>


userThomas R. Shemanske - Re: Don't show old answers  blueArrow
8/24/2005; 8:27:30 AM (reads: 1418, responses: 0)
John-

Perhaps we should start a new thread for the variation on the problem mentioned by Sarunas, but the new issue regards that old answers are not being displayed for regular students.

The global.conf settings say:

# Fill in answer blanks with the student's last answer by default? $pg{options}{showOldAnswers} = 1;

and this is corroborated by the radio button being selected on the problem page.

The issue is that old answers are not displayed, though they are recorded for the instructor to see.

This $pg line seems to be the only place to affect this option. I added it to the course.conf to see if it was not being read, but there is no change in behavior.

Not sure what could be overriding this.

Tom

<| Post or View Comments |>


userJohn Jones - Re: Don't show old answers  blueArrow
8/24/2005; 11:42:25 AM (reads: 1395, responses: 0)
Maybe that's been fixed. I tested this on a machine running the latest cvs copy. I do see a minor bug, which I'll explain below.

I just logged in as a student. I had $pg{options}{showOldAnswers} = 1; in global.conf. I submitted a correct answer, then logged in again and went to that problem. It showed my most recently submitted answer in the answer blank. I changed the option via the left panel, went to another problem and came back, and it did not show my saved answer.

I set $pg{options}{showOldAnswers} =0; in global.conf, and went in again as that student. Now it did not show my old answer, which is correct. The bug I saw was that the left panel had the wrong value for the toggle on the first problem I looked at. I clicked to go to the next problem and it fixed itself (to No). Also, changing the toggle and using the Apply options button still works.

Note, answers which are "checked" after the due date are not recorded, and will not be visible with the show saved answers toggle. This provides another possible solution for the original question. Some people make the due dates for practice users to be in the past. Then when students are practicing, there are no saved answers and they can see the correct answers if they want to.

We have people who do that for practice users so that students can use that in a way analogous to "odd numbered textbook problems". Some students complained that they didn't like webwork because they like to be able to work on the odd numbered problems in a text which have answers available as a way of understanding a problem. Practice users with due dates set in the past turned out to provide the same facility.

John

<| Post or View Comments |>


userJohn Jones - Re: Don't show old answers  blueArrow
8/24/2005; 12:58:26 PM (reads: 1388, responses: 0)
Hi,

The minor bug I mentioned above is now fixed in cvs.

John

<| Post or View Comments |>


userarūnas Burdulis - Re: Don't show old answers  blueArrow
8/25/2005; 12:39:23 PM (reads: 1351, responses: 0)
The problem where old answers were not dispalyed (in spite of config file settings and radio button selection) appears to be in fixed in CVS version (CVS log for Utils.pm). global.conf now also has a related permissionLevel option: can_show_old_answers_by_default.

Sarunas

<| Post or View Comments |>