Get the list of all options of the course-reset moosh command

Get the list of all options of the course-reset moosh command

by Zabelle Motte -
Number of replies: 4
Picture of Particularly helpful Moodlers

Hello,

We noted that our teachers did not impement the recommanded manual course reset each year, and we suspect that this is a cause of course backup problems.
We want to implement an automated course reset of all courses (with some exceptions for courses that last more than one year).

We read this interresting forum post about massive bulk reset course and the Moosh documentation on the course-reset command and here are our questions:

  1. Are Moosh course-reset options implemented for additionnal plugins ?
  2. Is there a way to obtain all possible course-reset options for one Moodle instance ?
Thanks in advance for answer ...

Kisses

Zabelle
Average of ratings: -
In reply to Zabelle Motte

Re: Get the list of all options of the course-reset moosh command

by Asoc. LiberaTIC -
Hi @Zabelle,

1. I have no answer for your first question.
2. I don't know if I've well understood, but on mood command page say that "Add -n or --no-action to display all reset setting that would be used on course restore. When -n is used, no action is actually performed."

I hope it to be useful
Average of ratings: Useful (1)
In reply to Asoc. LiberaTIC

Re: Get the list of all options of the course-reset moosh command

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
"Are Moosh course-reset options implemented for additionnal plugins ?"
I have a vague memory of writing some course reset code for something and that it would be down to the plugins rather than moosh. This would seem to confirm it.
https://docs.moodle.org/dev/Implementing_Reset_course_functionality_in_a_module
So checkout your plugins code for the functions referred to there.
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Get the list of all options of the course-reset moosh command

by Zabelle Motte -
Picture of Particularly helpful Moodlers
It seems indeed that most additionnal plugins implement moosh command for reset.
For information, in our Moodle, we found Moosh reset options for the following plugins :
Cobra, H5P, HotPot, Scheduler, ChoiceGroup, Checklist, Game and our TeamUp.

Our tests seem to show that the reset actions that are implemented trough the interface may be accessed trough moosh command while using the lang label as option name. It is perhaps a convention, but it seems to work.

Thanks for suggesting us to analyze the reset actions code Marcus wink


In reply to Asoc. LiberaTIC

Re: Get the list of all options of the course-reset moosh command

by Zabelle Motte -
Picture of Particularly helpful Moodlers
The course reset -n command gave us the list of implemented options.
Thanks for this precision.