original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Perform some internal checks.
  These are not errors, just situations
  where it's not appropriate to add the button
  
  @return bool
docstring_tokens: Perform some internal checks . These are not errors just situations where it s not appropriate to add the button