Global Search block - not working on demo site, or anywhere!

Re: Global Search block - not working on demo site, or anywhere!

by Sean Farrell -
Number of replies: 0
Hi Michael,

It looks like there is a minor issue with the search block settings page.
It appears to forget the setting of 'use moodle root' each time you edit the settings.

blocks/search/config_global.html

At top of file add

if (!isset($CFG->block_search_usemoodleroot)){
$CFG->block_search_usemoodleroot = 0;
}


And then replace the links which define $usemoodleroot as follows:

$usemoodleroot = $CFG->block_search_usemoodleroot ? 'checked="checked"' : '' ;
$notusemoodleroot = (!$CFG->block_search_usemoodleroot) ? 'checked="checked"' : '';


Entered and attached patch to MDL-21832