Quiz regrading script

Quiz regrading script

by Steve Maher -
Number of replies: 6

Good Afternoon,

I have a need to be able to manually regrade and and all quizzes in a course at will from the command line. Right now I have to open all the quizzes and do the regrade all option under reports and that is not gonna be enough. I am not a programmer and I need a php admin cli script that will execute the regrade_all function on the report page for a quiz. this is Moodle 3.5.10 on ubuntu, mysql 5.7 if that helps. Any help would be wonderful. 

Steve



Average of ratings: -
In reply to Steve Maher

Re: Quiz regrading script

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
You can grade quizzes by the student or by the question. As far as I know, there is no off-line grading system for quizzes. Yes, you can off-line grade assignments. I am not sure if I am answering your question, but your question makes me wonder "Why?"
In reply to Rick Jerz

Re: Quiz regrading script

by Steve Maher -

Rick,

Why is a good question. I am trying to work around an issue where the quiz completion and score of 100% does not then cause the checkmark to appear to the right of the quiz and the certificate of completion at the end of the course doesnt "open up" or allow download because the system doesnt realize that the quiz was 100%. If I do a manual regrade via the web interface, then all is right with the world and the course behaves as it should. Until my moodle person fixes the issue it would be ideal if i could run a php admin cli script that say regrade the quiz thus replicating what i am doing manually from a browser every 30 mins so that my customers stop getting annoyed. 

Steve

In reply to Steve Maher

Re: Quiz regrading script

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Okay, I think what you are saying is that in your Moodle, when a student completes a quiz with a 100%, the "activity completion" checkbox does not "check-off." Perhaps?
In reply to Rick Jerz

Re: Quiz regrading script

by Steve Maher -

that is correct and the only way i can make the system behave is to go to https://mysite.com/mod/quiz/report.php?id=48&mode=overview and then click on "regrade all" which goes to 

https://mysite.com/mod/quiz/report.php?id=48&mode=overview&attempts=enrolled_with&onlygraded=&onlyregraded=&slotmarks=0&sesskey=yUx6FoY3qx&regradeall=Regrade+all

So I need an admin php cli script so i can automate this process.


In reply to Steve Maher

Re: Quiz regrading script

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I am not a scriptwriter. However, maybe you have provided enough information for someone else to help.
In reply to Rick Jerz

Re: Quiz regrading script

by Steve Maher -

OK, very good. Thanks Rick. I think these extra messages on this thread may help to get me a little help. Thanks very much for your kind help and concern. --Steve