How do I handle a button being clicked?

Re: How do I handle a button being clicked?

by Benjamin Ellis -
Number of replies: 0
Picture of Particularly helpful Moodlers
It shouldn't need JS to work. Your button has to be defined in the 'content' of the block so you need to append output from the single_button() function to the list e.g. $content = $mystudentlist . $OUTPUT->single_button(.....) ;