Quantcast
Channel: General help
Viewing all articles
Browse latest Browse all 39737

Re: Front Page: Adding a new admin setting option

$
0
0
by Benjamin Lofo Follo.  

It is alright, I was able to solve my problem.

For those who are interested to know, the remaining location to include the option was in the adminlib.php file, under the load_choices() function

 

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'),
FRONTPAGEOTHERCOURSELIST => get_string('frontpageothercourselist'),
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;
}

After testing around, the module seems to work correctly. Hope it helps!


Viewing all articles
Browse latest Browse all 39737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>