protected function add_data_for_post($post) {
        if (!isset($this->adhocdata[$post->course])) {
            $this->adhocdata[$post->course] = [];
        }

        if (!isset($this->adhocdata[$post->course][$post->forum])) {
            $this->adhocdata[$post->course][$post->forum] = [];
        }

        if (!isset($this->adhocdata[$post->course][$post->forum][$post->discussion])) {
            $this->adhocdata[$post->course][$post->forum][$post->discussion] = [];
        }

        $this->adhocdata[$post->course][$post->forum][$post->discussion][$post->id] = $post->id;
    }
protected function add_data_for_post($post) {
        if (!isset($this->adhocdata[$post->course])) {
            $this->adhocdata[$post->course] = [];
        }

        if (!isset($this->adhocdata[$post->course][$post->forum])) {
            $this->adhocdata[$post->course][$post->forum] = [];
        }

        if (!isset($this->adhocdata[$post->course][$post->forum][$post->discussion])) {
            $this->adhocdata[$post->course][$post->forum][$post->discussion] = [];
        }

        $this->adhocdata[$post->course][$post->forum][$post->discussion][$post->id] = $post->id;
    }
protected function add_data_for_post ( $ post ) { if ( ! isset ( $ this -> adhocdata [ $ post -> course ] ) ) { $ this -> adhocdata [ $ post -> course ] = [ ] ; } if ( ! isset ( $ this -> adhocdata [ $ post -> course ] [ $ post -> forum ] ) ) { $ this -> adhocdata [ $ post -> course ] [ $ post -> forum ] = [ ] ; } if ( ! isset ( $ this -> adhocdata [ $ post -> course ] [ $ post -> forum ] [ $ post -> discussion ] ) ) { $ this -> adhocdata [ $ post -> course ] [ $ post -> forum ] [ $ post -> discussion ] = [ ] ; } $ this -> adhocdata [ $ post -> course ] [ $ post -> forum ] [ $ post -> discussion ] [ $ post -> id ] = $ post -> id ; }
Add dsta for the current forum post to the structure of adhoc data.

@param   \stdClass   $post
Add dsta for the current forum post to the structure of adhoc data .