Anubis icon indicating copy to clipboard operation
Anubis copied to clipboard

ADD ability to manually trigger regrade for specific student

Open wabscale opened this issue 2 years ago • 13 comments

Add endpoints for admin users (TAs/Profs) to be able to manually trigger the functions found here:

https://github.com/AnubisLMS/Anubis/blob/main/api/anubis/lms/autograde.py

Then add a button to the frontend autograde pages for these endpoints to be hit.

wabscale avatar Sep 18 '22 15:09 wabscale

bro, do you want the admin users could manually trigger all the functions in lms/autograde.py ? this means i should set an endpoint that when admin users call all the functions get executed , am I right ?l

devbazregari avatar Sep 19 '22 09:09 devbazregari

There is a bit more to this than just calling the function. The autograde functions generally take quite a while to run. We'll need the endpoints to enqueue the bulk_autograde function to run in an rpc queue.

wabscale avatar Sep 19 '22 19:09 wabscale

sorry bro it's beyond my abilities. I haven't worked with RPC. but I know about celery and async if you can handle your work with these two techs I can be a little helpful

devbazregari avatar Sep 20 '22 04:09 devbazregari

We dont use celery, we use python-rq. It is just like celery, but significantly simpler. I did half of the backend bit for this issue here if you want to see how it was put together. It was basically just making an enqueue function (something we do to keep our rpc calls organized) for the bulk_autograde.

https://github.com/AnubisLMS/Anubis/commit/ee32af19479b2290f435b01bc0888f2a7ed7b8ba

wabscale avatar Sep 20 '22 14:09 wabscale

@wabscale Is somebody working on this(asking because its in progress on the board)

dolf321 avatar Apr 07 '23 03:04 dolf321

No, no one is working on this right now. Go ahead if you would like to take it

wabscale avatar Apr 07 '23 03:04 wabscale

Yes, ill take it up thanks!

dolf321 avatar Apr 07 '23 16:04 dolf321

Clarifying @wabscale :

You want an autograde button here: Image

And you want me to call this "enqueue_bulk_autograde" function in the backend:

Image

Let me know if i'm missing anything here.

dolf321 avatar Apr 07 '23 16:04 dolf321

Oh the title of this is slightly misleading. We actually already have a button for regrading an entire assignment. We need a button for regrading all the submissions for a given student.

I guess it likely makes sense to put the actual button on the admin assignment page (the one with the assignment specific settings) that opens a dialog with an autocomplete that has all the students. TA then selects the student from the dropdown, and clicks regrade. That hits the endpoint that will call the enqueue_bulk_regrade_submissions function with all the submissions from that student. Let me know if this makes sense.

You don't need to do the frontend if that is too much react/mui stuff. If you do half, I'll do the other half.

wabscale avatar Apr 07 '23 17:04 wabscale

Oh! Okay well I've definitely misconstrued that issue sorry(my poor button what a waste), yes i'll be on it. Hopefully will finish half of the frontend by today, would you like commit access to my fork or would you like me to pr unfinished frontend code? Or i could PR to a new branch as well.

dolf321 avatar Apr 07 '23 18:04 dolf321

When you open the PR, I think you can check a box to allow maintainers (so me) to be able to push to the branch in your repo.

wabscale avatar Apr 07 '23 20:04 wabscale

@wabscale do you think it should go in the autograde results section instead? Or i can stick to assignments as agreed if you'd like.

dolf321 avatar Apr 11 '23 02:04 dolf321

Well this action would completely invalidate everything on the student's results page. The new results will not be recalculated for at least a minute or two. So you would need to redirect after clicking somewhere else.

Feel free to add that too if you want, but the main way of doing it should be the way I described.

wabscale avatar Apr 11 '23 03:04 wabscale