private function is_renderable() {
        global $CFG;
        if (empty($CFG->enableportfolios)) {
            return false;
        }
        if (defined('PORTFOLIO_INTERNAL')) {
            // something somewhere has detected a risk of this being called during inside the preparation
            // eg forum_print_attachments
            return false;
        }
        if (empty($this->instances) || count($this->instances) == 0) {
            return false;
        }
        return true;
    }
private function is_renderable() {
        global $CFG;
        if (empty($CFG->enableportfolios)) {
            return false;
        }
        if (defined('PORTFOLIO_INTERNAL')) {
            // something somewhere has detected a risk of this being called during inside the preparation
            // eg forum_print_attachments
            return false;
        }
        if (empty($this->instances) || count($this->instances) == 0) {
            return false;
        }
        return true;
    }
private function is_renderable ( ) { global $ CFG ; if ( empty ( $ CFG -> enableportfolios ) ) { return false ; } if ( defined ( 'PORTFOLIO_INTERNAL' ) ) { // something somewhere has detected a risk of this being called during inside the preparation // eg forum_print_attachments return false ; } if ( empty ( $ this -> instances ) || count ( $ this -> instances ) == 0 ) { return false ; } return true ; }
Perform some internal checks.
These are not errors, just situations
where it's not appropriate to add the button

@return bool
Perform some internal checks . These are not errors just situations where it s not appropriate to add the button