function no_submit_button_pressed(){
        static $nosubmit = null; // one check is enough
        if (!is_null($nosubmit)){
            return $nosubmit;
        }
        $mform =& $this->_form;
        $nosubmit = false;
        if (!$this->is_submitted()){
            return false;
        }
        foreach ($mform->_noSubmitButtons as $nosubmitbutton){
            if (optional_param($nosubmitbutton, 0, PARAM_RAW)){
                $nosubmit = true;
                break;
            }
        }
        return $nosubmit;
    }
function no_submit_button_pressed(){
        static $nosubmit = null; // one check is enough
        if (!is_null($nosubmit)){
            return $nosubmit;
        }
        $mform =& $this->_form;
        $nosubmit = false;
        if (!$this->is_submitted()){
            return false;
        }
        foreach ($mform->_noSubmitButtons as $nosubmitbutton){
            if (optional_param($nosubmitbutton, 0, PARAM_RAW)){
                $nosubmit = true;
                break;
            }
        }
        return $nosubmit;
    }
function no_submit_button_pressed ( ) { static $ nosubmit = null ; // one check is enough if ( ! is_null ( $ nosubmit ) ) { return $ nosubmit ; } $ mform = & $ this -> _form ; $ nosubmit = false ; if ( ! $ this -> is_submitted ( ) ) { return false ; } foreach ( $ mform -> _noSubmitButtons as $ nosubmitbutton ) { if ( optional_param ( $ nosubmitbutton , 0 , PARAM_RAW ) ) { $ nosubmit = true ; break ; } } return $ nosubmit ; }
Checks if button pressed is not for submitting the form

@staticvar bool $nosubmit keeps track of no submit button
@return bool
Checks if button pressed is not for submitting the form