General developer forum

If I wanted to have a link on every course page that took the user to an enrollment setting page how would I do so?

moodlesite.com/enrol/editinstance.php?courseid=15&id=47&type=manual

If that is the structure how would I build this link structure?

I've used a structure like this before to send teachers to a backup page:

new moodle_url('/backup/backup.php', array('id' => $PAGE->course->id)); I guess I just need the structure for building course enrollment links if it is possible. Thank you very much, Chris Average of ratings: - Re: Programming link to Enrollment Method The missing piece turns out to be this: 'id' =>$instance->courseid

to make it all work.

Average of ratings: -
Re: Programming link to Enrollment Method

Well, I thought I had it figured out but unless there is a trick we had to do some fancy database calls to get the instance of the enrollment plugin.

Is there a cleaner way to do so without the DB calls with a built in function?

Average of ratings: -