public function load_choices() {
        if (is_array($this->choices)) {
            return true;
        }
        $this->choices = array(FRONTPAGENEWS          => get_string('frontpagenews'),
            FRONTPAGEALLCOURSELIST => get_string('frontpagecourselist'),
            FRONTPAGEENROLLEDCOURSELIST => get_string('frontpageenrolledcourselist'),
            FRONTPAGECATEGORYNAMES => get_string('frontpagecategorynames'),
            FRONTPAGECATEGORYCOMBO => get_string('frontpagecategorycombo'),
            FRONTPAGECOURSESEARCH  => get_string('frontpagecoursesearch'),
            'none'                 => get_string('none'));
        if ($this->name === 'frontpage') {
            unset($this->choices[FRONTPAGEENROLLEDCOURSELIST]);
        }
        return true;
    }
public function load_choices() {
        if (is_array($this->choices)) {
            return true;
        }
        $this->choices = array(FRONTPAGENEWS          => get_string('frontpagenews'),
            FRONTPAGEALLCOURSELIST => get_string('frontpagecourselist'),
            FRONTPAGEENROLLEDCOURSELIST => get_string('frontpageenrolledcourselist'),
            FRONTPAGECATEGORYNAMES => get_string('frontpagecategorynames'),
            FRONTPAGECATEGORYCOMBO => get_string('frontpagecategorycombo'),
            FRONTPAGECOURSESEARCH  => get_string('frontpagecoursesearch'),
            'none'                 => get_string('none'));
        if ($this->name === 'frontpage') {
            unset($this->choices[FRONTPAGEENROLLEDCOURSELIST]);
        }
        return true;
    }
public function load_choices ( ) { if ( is_array ( $ this -> choices ) ) { return true ; } $ this -> choices = array ( FRONTPAGENEWS => get_string ( 'frontpagenews' ) , FRONTPAGEALLCOURSELIST => get_string ( 'frontpagecourselist' ) , FRONTPAGEENROLLEDCOURSELIST => get_string ( 'frontpageenrolledcourselist' ) , FRONTPAGECATEGORYNAMES => get_string ( 'frontpagecategorynames' ) , FRONTPAGECATEGORYCOMBO => get_string ( 'frontpagecategorycombo' ) , FRONTPAGECOURSESEARCH => get_string ( 'frontpagecoursesearch' ) , 'none' => get_string ( 'none' ) ) ; if ( $ this -> name === 'frontpage' ) { unset ( $ this -> choices [ FRONTPAGEENROLLEDCOURSELIST ] ) ; } return true ; }
Loads the choices available

@return bool always returns true
Loads the choices available