protected function load_category($categoryid) {
        global $DB;
        $category = $DB->get_record('course_categories', array('id' => $categoryid));
        if (!$category) {
            throw new moodle_exception('unknowncategory');
        }
        $this->_categories[$category->id] = $category;
        $parentcategoryids = explode('/', trim($category->path, '/'));
        array_pop($parentcategoryids);
        foreach (array_reverse($parentcategoryids) as $catid) {
            $this->_categories[$catid] = null;
        }
    }
protected function load_category($categoryid) {
        global $DB;
        $category = $DB->get_record('course_categories', array('id' => $categoryid));
        if (!$category) {
            throw new moodle_exception('unknowncategory');
        }
        $this->_categories[$category->id] = $category;
        $parentcategoryids = explode('/', trim($category->path, '/'));
        array_pop($parentcategoryids);
        foreach (array_reverse($parentcategoryids) as $catid) {
            $this->_categories[$catid] = null;
        }
    }
protected function load_category ( $ categoryid ) { global $ DB ; $ category = $ DB -> get_record ( 'course_categories' , array ( 'id' => $ categoryid ) ) ; if ( ! $ category ) { throw new moodle_exception ( 'unknowncategory' ) ; } $ this -> _categories [ $ category -> id ] = $ category ; $ parentcategoryids = explode ( '/' , trim ( $ category -> path , '/' ) ) ; array_pop ( $ parentcategoryids ) ; foreach ( array_reverse ( $ parentcategoryids ) as $ catid ) { $ this -> _categories [ $ catid ] = null ; } }
Loads the requested category into the pages categories array.

@param int $categoryid
@throws moodle_exception
Loads the requested category into the pages categories array .