Login names losing PSVNs | topic started 10/26/2002; 3:24:15 AM last post 10/26/2002; 3:24:15 AM |
Mark Schmitt - Login names losing PSVNs 10/26/2002; 3:24:15 AM (reads: 544, responses: 0) |
I've
been having some trouble with my change due dates by recitation. For
some reason, I seem to randomly lose a PSVN number in the database. The
PSVN number still exits, but when looking it up by login name, it comes
back as "". The net effect is that the student is locked out of the
problem set. Is there some way to easily reattach the PSVN number to the login name? I tried to rebuild the set from the PSVN log, but it says that the PSVN in question is already assigned, and won't reassign it to the same person. I've found that if I move the score file out of the DATA directory, destroy the the set by PSVN, rebuild, then move the score file back in, all is well, but that's a bit intensive for my taste. I know I'm getting a blank value on PSVN, when I call detachProbSetRecord. Here's the relevant code: foreach $studentLogin (@availableStudents) { my %loginList = &getAllSetNumbersForStudentLoginHash$studentLogin}; my $psvn =$loginList{$setNumber}; &attachProbSetRecord($psvn); if ($updateMethod eq 'all') { &putOpenDate($newOpenDateTime,$psvn); &putDueDate($newDueDateTime,$psvn); &putAnswerDate($newAnswerDateTime,$psvn); } else { $oldOpenDateTime = &getOpenDate($probSetKey); &putOpenDate($newOpenDateTime,$probSetKey) unless ($oldOpenDateTime > $newOpenDateTime); $oldDueDateTime = &getDueDate($probSetKey); &putDueDate($newDueDateTime,$probSetKey) unless $oldDueDateTime > $newDueDateTime); $oldAnswerDateTime = &getAnswerDate($probSetKey); &putAnswerDate($newAnswerDateTime,$probSetKey) unless ($oldAnswerDateTime > $newAnswerDateTime); } # &putSetHeaderFileName( $newSetHeaderFileName,$probSetKey); # &putProbHeaderFileName( $newProbHeaderFileName,$probSetKey); &detachProbSetRecord($psvn); } Any help would be greatly appreciated.
Mark |