General developer forum

 
 
Picture of Jitendra Gaur
Re: Implementing Admin Settings pages, etc
 
Average of ratings: -
Picture of Joshua Johnston
Re: Implementing Admin Settings pages, etc
 

I was hoping to find an example or documentation of how to make a group of settings that would be enabled/disabled based upon a checkbox on the same settings page. The wiki page says to find an example in the existing settings and copy it but I cannot find one nor any reference to creating one "The Moodle Way"

Am I just missing it because of being new to Moodle or has this not been done?

 
Average of ratings: -
Picture of Jitendra Gaur
Re: Implementing Admin Settings pages, etc
 

Hi Joshua,

you can use  external admin page and create a form if you dont want to use standart admin setting functions.

moodle form has a function called ($mform->disabledIf())

In which you can mention the condition.

Hope it will help you.

Thanks

 
Average of ratings: -
Picture of Shawn Drake
Re: Implementing Admin Settings pages, etc
 

Hi Joshua,

I am currently looking for a way to do the exact same type of thing with my plugin. You are correct that it is either not a part of the "Moodle Way" at this point, or it's terribly hard to find the documentation to support it.... or even an example of it. 

What was your solution to the problem? I thought about doing it the way Jitendra mentions, but I'd much prefer to do it on the admin settings page. 

 
Average of ratings: -
Picture of Shawn Drake
Re: Implementing Admin Settings pages, etc
 

FYI, I found this post which was very helpful: https://moodle.org/mod/forum/discuss.php?d=169124)

 
Average of ratings: -