WeBWorK Main Forum

Some achievements do not work correctly for individual deadlines

Some achievements do not work correctly for individual deadlines

by Robert Mařík -
Number of replies: 1

Hello, I recently turned on achievements on my  server. I was surprised that some of my students got Last Minute (submitting on last 30 minutes) despite the deadline was many hours in future. These students have extended deadline. So I did the following (before each step I removed achievements and reassigned the HW)

1. I opened new HW for a short time and completed it. Got two Early bird and one Last minute, as expected.

2. I opened new HW with start and deadline far in past and future, respectively. Finished the HW and got no achievement, as expected.

3. I opened new HW with both start and deadline far in the past. Then edited custom start and end just for me. I set the start just few minutes ago, deadline many days in future and completed the HW. I expected to get Early bird and not last minute, but the opposite was true. I did not get Early bird and got Last minute. This does not reflect that fact that the HW has been opened just few minutes ago and there are still 15 days left.

4. I wondered what is going on. I tried to add the lines

open(FH, '>', "/tmp/lasttime");
print FH $set->due_date;
close(FH);

to the achievement. I got error "There were errors in achievement last_minute\n'open' trapped by operation mask at"

So I wonder what is wrong and how to find out which due_time is used in the comparison for the achievement due date. Is there any other trick than the file in temp directory?  The error is probably caused by the Safe module.

With best regards

Robert


In reply to Robert Mařík

Re: Some achievements do not work correctly for individual deadlines

by Robert Mařík -

Btw: some other achievements also can be fooled. For example if you give correct answer and then two incorrect ones you get the "third_time" achievements, since it checks one correct and two incorrect attempts. 

Robert