Repository navigation
Conversation
16efec9 to
e752e76
Compare
e752e76 to
aa7023d
Compare
drgrice1
left a comment
There was a problem hiding this comment.
Generally this looks good. However, there are some things I see in the code that I don't like, and one notable behavioral change to consider.
|
What needs to be done to fix the |
|
By the way see line 50 of |
aa7023d to
4515271
Compare
|
@drgrice1 I applied your suggested fix for the issue of something changing in the background, and Claude pointed out that it is fragile because it relies on the order of the inputs and what parameter returned first. In addition mentioned the FIXME in Controler.pm about no longer overriding the param method could cause the order to reverse breaking this because that forces the first value to return. Claude's suggestion, which I used was to avoid order altogether and get all values: Mentioning this in case you want to update the other locations this is done. |
|
Code suggestions updated. There is a bigger change, I now have checks to ensure that any changes in the background don't get silently overwritten. This is done for the unassigned achievements, changing the earned status or the counter to make sure if a student earns or updates a counter in the background it isn't reverted. |
4515271 to
6af2acb
Compare
|
I updated the "Assign" tab to also allow assigning to current users. I am still unsure on what is best here. I could have read the intent wrong, I was going off the button was "Assign to All Current Users", which could have been a copy/paste that was never fixed. The code was clear that it was always "All" users. @Alex-Jordan as someone who I think uses achievements, do you have an opinion on if the idea of assigning to only current users is useful here, or just remove the complication and always assign to all users? After looking thinks over a bit more, I'm now leaning on the side that "current" doesn't really mean anything here and is extra complication. |
Claude said that because, as I always say, Claude is an idiot. There is nothing fragile about the approach and using is is standard procedure for checkbox fallback. If the FIXME is dealt with, then the order would need to be fixed, but that is expected, and not hard to do. It is simply a matter of changing the order of inputs in the DOM since our In any case, you added the "All Users" versus "Current Users" option when assigning achievements from the "Achievements Manager" page, and you mention that in the help. However, that is not good enough. You need to explain what "all" versus "current" means. I noted this before, but that is entirely unclear and confusing. In fact, I would rather not see that option added, because I don't think it even makes sense to have this distinction of terms that is so utterly unclear and meaningless. I don't even know what it means or where you came up with that distinction really. |
|
Just to clarify what I meant by there is nothing fragile about the approach further, anytime you are working according to the design of the system, it cannot be called "fragile", and that is what the approach of calling |
|
Sorry to rant about this, but the "Claude says this is fragile" comment just pissed me off. The fact is that Claude is fragile. It is further worth noting that if that FIXME in the code regarding the |
|
I didn't realize Mojolicious |
f9f5c16 to
380e46a
Compare
|
I removed the idea of 'Current Users' on this page, and it is now just assign or unassign from all users. I did notice one open question (not new with this PR). If a user edits the earned status or counter of some achievements, then clicks the assign to all button, any edits will also be saved. Should this be done? Or when assign to all is clicked, should I reset the earned/counter fields and only preform the assign? |
Use JavaScript conformation when unassigning achievements instead of the old radio button option. Also use JavaScript to confirm when deleting an achievement evaluator override. This makes the assign achievement to users page act similar to the users assigned to sets page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
380e46a to
a576e59
Compare
|
I also reverted Claude's suggestion on the action change it thought was fragile. |
Use JavaScript conformation when unassigning achievements instead of the old radio button option. Also use JavaScript to confirm when deleting an achievement evaluator override. This makes the assign achievement to users page act similar to the users assigned to sets page.
This is built on top of #3215, so I will keep this a draft request until that one finally gets merged. One could test both PRs using this branch though.
Claude did spot one possible issue with the 'allow_unassign' approach here and on the users assigned to sets page. If a page goes stale (a user gets assigned to a set by another instructor/tab/etc), and the form is submitted, the users would then be unassigned without any confirmation (it won't be listed on the confirmation here because this page didn't know the user was assigned, but would still be unassigned because the checkbox was not selected). I have left this alone for now, as it isn't new behavior, but it is something to consider looking into in the future.