original_string: protected function get_activity($instanceid) {
          global $DB;
  
          if (empty($this->activitiesdata[$this->get_module_name()][$instanceid])) {
              $this->activitiesdata[$this->get_module_name()][$instanceid] = $DB->get_record($this->get_module_name(),
                  array('id' => $instanceid), '*', MUST_EXIST);
          }
          return $this->activitiesdata[$this->get_module_name()][$instanceid];
  
      }
code: protected function get_activity($instanceid) {
          global $DB;
  
          if (empty($this->activitiesdata[$this->get_module_name()][$instanceid])) {
              $this->activitiesdata[$this->get_module_name()][$instanceid] = $DB->get_record($this->get_module_name(),
                  array('id' => $instanceid), '*', MUST_EXIST);
          }
          return $this->activitiesdata[$this->get_module_name()][$instanceid];
  
      }
code_tokens: protected function get_activity ( $ instanceid ) { global $ DB ; if ( empty ( $ this -> activitiesdata [ $ this -> get_module_name ( ) ] [ $ instanceid ] ) ) { $ this -> activitiesdata [ $ this -> get_module_name ( ) ] [ $ instanceid ] = $ DB -> get_record ( $ this -> get_module_name ( ) , array ( 'id' => $ instanceid ) , '*' , MUST_EXIST ) ; } return $ this -> activitiesdata [ $ this -> get_module_name ( ) ] [ $ instanceid ] ; }
docstring: Returns an activity instance. Internally uses the class component to know which activity module should be retrieved.
  
  @param int $instanceid
  @return stdClass
docstring_tokens: Returns an activity instance . Internally uses the class component to know which activity module should be retrieved .