openwebwork / webwork2

Course management front end for WeBWorK
http://webwork.maa.org/wiki/Main_Page
Other
145 stars 165 forks source link

Acheivement item access is not based on userSet #2280

Closed Alex-Jordan closed 2 months ago

Alex-Jordan commented 10 months ago

Certain achievement items can only be used on sets that are open (or not open, or...). When you click to use an item, you get a list of all the sets that it could apply to. The problem is that this list is based on the class values, not that user's values.

For example, suppose a set closes for the class on Monday night. Monday afternoon, a student uses an item to extend its close date by 24 hours. Fast forward to Tuesday, and they want to use another item to extend it by an additional 48 hours. But they can't, because the set is no longer open in the sense of being open for the entire class.

drgrice1 commented 9 months ago

Analyzing the code seems to show that this is not a valid issue. Testing things as you describe seems to support the conclusion that this issue is invalid.

Looking at the code for which sets are shown I see that the merged user set is used to obtain dates for sets. That means the dates for the user are used. I tested by setting the due date for a set to be due yesterday, and then setting the due date for my user to be due today. Essentially setting things up to be in your "fast forward" scenario. I then see that the achievement items that should be available for open sets are available for this set. I can also use these items on this set, and the due date does get pushed further into the future with each use.

Perhaps I am missing something. Can you give a precise scenario where what you see happening occurs?

Alex-Jordan commented 9 months ago

I'll try to recreate what led to this. I'll have to see if I can recreate the exact scenario from an email exchange with a student. Hard to remember from a month ago now at the moment. But I'm guessing I thought I understood things and then tried to describe it with a simpler scenario for this report, to avoid irrelevant details, but apparently I oversimplified things.