From: P G. L. <gl...@um...> - 2005-07-14 18:12:45
|
Hi John, I think * in all cases, when storing "" in the database, store it as NULL. It will be promoted back when the information is retrieved. I think this is safe. is the easiest fix. Aesthetically I like the idea of calling something that has integer values an integer when defining the database, so from a purely artistic viewpoint I'd vote against * stop using integer types in the database. Gavin On Thu, 14 Jul 2005 at 11:03 John Jones wrote: > This discussion of storing the student's score refers to the > student-problem field status. It was not affected by my changes to the > types of fields in mysql databases - it is still stored as type text > rather than type int. (Maybe it should be stored as an int, but that's > a different question.) > > The problem Gavin discovered was with value - the number of points the > problem is worth. It is one of several fields currently stored as type > int, and they probably all will suffer the same difficulty if they are > override fields for a more global value. It is a pretty serious bug, so > I will attempt to fix this as soon as we know which way we want to go. > > I think our options are: > * in all cases, when storing "" in the database, store it as NULL. > It will be promoted back when the information is retrieved. I > think this is safe. > * when storing back to the database, only demote "" to NULL if the > field is of integer type. > * stop using integer types in the database. > > > John > > > Michael Gage wrote: > > > > > On Jul 14, 2005, at 12:45 PM, P Gavin LaRose wrote: > > > >> > >> Isn't the distinction between "haven't tried" and "score of zero" also > >> captured by the attempted field in problem_user? I think if the status > >> codes this also, it's redundant information. > >> > >> Am I making sense? > >> Gavin > >> > > That makes sense to me. I believe that we tried to eliminate all of > > the null responses > > when extracting scoring data because we were getting a lot spurious > > "undefined variables" warnings. We also get a lot of "non-numeric in > > comparison" errors > > when sorting, etc. etc. etc. In any case I think this is why most > > things are promoted > > from null at least to "" or to 0. > > > > In light of what you have pointed out I suggest that we "insist" that > > the student score > > be a number. I believe that blanks are automatically converted to 0, > > so they would be ok in sorts. > > (I haven't checked this.) Otherwise we'll need checks in every sort > > routine as well as other places. > > Use the "attempts" field to determine if the problem hasn't been tried > > yet. > > > > We may need to fix some assumptions in the grading and scoring > > packages to conform to this. > > The simplification in sorts that we gain by assuming that score is > > always a number seems to > > me to outweigh desires for more, occasionally non-numeric states. > > > > Take care, > > > > Mike > > > > > >> On Thu, 14 Jul 2005 at 12:39 Michael Gage wrote: > >> > >>> Could we get a list of what states are needed for the student score? > >>> > >>> number -- means the student has achieved this score on this problem > >>> 0 -- means the student has tried this problem but > >>> hasn't gotten in correct > >>> null/ blank -- means that the student hasn't tried the problem. > >>> > >>> Are there are other states we need? > >>> > >>> Do we need the state that distinguishes between "hasn't tried the > >>> problem" and the one where the score is zero? > >>> I think perhaps we do, so that we can warn the student they haven't yet > >>> completed an assignment while not > >>> bugging them about problems that they haven't successfully completed. > >>> > >>> any other thoughts on what is needed? > >>> > >>> Take care, > >>> Mike > >> > >> > >> -- > >> P. Gavin LaRose, Ph.D. Program Manager (Instructional Tech.) > >> Math Dept., University of Michigan > >> gl...@um... "There's no use in trying," > >> [Alice] > >> 734.764.6454 said. "One Can't believe > >> impossible > >> http://www.math.lsa.umich.edu/~glarose/ things." "I daresay you > >> haven't had > >> much practice," said the Queen. > >> - Lewis > >> Carrol > >> > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > _______________________________________________ > > OpenWeBWorK-Devel mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openwebwork-devel > > > -- P. Gavin LaRose, Ph.D. Program Manager (Instructional Tech.) Math Dept., University of Michigan gl...@um... "There's no use in trying," [Alice] 734.764.6454 said. "One Can't believe impossible http://www.math.lsa.umich.edu/~glarose/ things." "I daresay you haven't had much practice," said the Queen. - Lewis Carrol |