Forum archive 2000-2006

Danny Glin - Division by Zero Error

Danny Glin - Division by Zero Error

by Arnold Pizer -
Number of replies: 0
inactiveTopicDivision by Zero Error topic started 8/23/2004; 4:00:37 PM
last post 8/23/2004; 5:17:40 PM
userDanny Glin - Division by Zero Error  blueArrow
8/23/2004; 4:00:37 PM (reads: 914, responses: 1)
Howdy folks, We've been running some test courses in webwork 2.0, and have run into a couple of interesting phenomena. First off, when a student attempts a problem, the number of tries immediately defaults to -1, regardless of how many attempts they were given to begin with, thus students are only getting one attempt at any problem. The second issue is in regards to the scoring. Each time a new problem is attempted, the "out of" value on the Student Progress page decreases by one, when this value should be constant. Thus once a student has attempted all of the problems in a set, their progress can no longer be viewed as we get the following error: Illegal division by zero at /home/webwork/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm line 410.

Has anyone else experienced similar difficulties, or does anyone have any suggestions?

Thanx, Danny Glin University of Calgary

<| Post or View Comments |>


userJohn Jones - Re: Division by Zero Error  blueArrow
8/23/2004; 5:17:40 PM (reads: 1135, responses: 0)
Hi,

We say this sort of problem when we upgraded webwork, and used it on an existing course. In short, there was a change in how webwork stored data for sql courses, and it lead to values being read as the number 0 when they were really undefined. I think the changes were done consistently, so the problem should only pop up on old courses and new webwork. Is that the case here?

When we had it happen, it was in sql courses. If that is also the case, you can test by starting mysql, tell it to use webwork_mycourse (for the course in question), and then have it describe the problem_user table. If all the fields have type TEXT, then I am stumped. If some have other types (like integer), then you probably have the same problem I did.

John

<| Post or View Comments |>