function is_cancelled(){
        $mform =& $this->_form;
        if ($mform->isSubmitted()){
            foreach ($mform->_cancelButtons as $cancelbutton){
                if (optional_param($cancelbutton, 0, PARAM_RAW)){
                    return true;
                }
            }
        }
        return false;
    }
function is_cancelled(){
        $mform =& $this->_form;
        if ($mform->isSubmitted()){
            foreach ($mform->_cancelButtons as $cancelbutton){
                if (optional_param($cancelbutton, 0, PARAM_RAW)){
                    return true;
                }
            }
        }
        return false;
    }
function is_cancelled ( ) { $ mform = & $ this -> _form ; if ( $ mform -> isSubmitted ( ) ) { foreach ( $ mform -> _cancelButtons as $ cancelbutton ) { if ( optional_param ( $ cancelbutton , 0 , PARAM_RAW ) ) { return true ; } } } return false ; }
Return true if a cancel button has been pressed resulting in the form being submitted.

@return bool true if a cancel button has been pressed
Return true if a cancel button has been pressed resulting in the form being submitted .