From: moodler Date: Tue, 25 Nov 2003 08:01:52 +0000 (+0000) Subject: Added a new setting called "resource_websearch" ... it is simply a X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=66c2503062af7b2ceaa7069847baea0f89f3b65c;p=moodle.git Added a new setting called "resource_websearch" ... it is simply a URL that is offered to users as a place to to find URLs. By default it's google.com, but could easily be a local repository of files. --- diff --git a/mod/resource/config.html b/mod/resource/config.html index dc6480e1c4..a9f865d8d8 100644 --- a/mod/resource/config.html +++ b/mod/resource/config.html @@ -10,6 +10,15 @@ + +

resource_websearch: + + + + + + + "> diff --git a/mod/resource/details.php b/mod/resource/details.php index 54694f3e8b..9d3e94fe7d 100644 --- a/mod/resource/details.php +++ b/mod/resource/details.php @@ -69,13 +69,20 @@ case WEBPAGE: $strexampleurl = get_string("exampleurl", "resource"); + $strsearch = get_string("search"); ?>

:

- + + "; + echo "resource_websearch\" ". + "onClick=\"return window.open('$CFG->resource_websearch', 'websearch', 'menubar=1,location=1,directories=1,toolbar=1,scrollbars,resizable,width=800,height=600');\">$strsearch\n"; + echo ""; + ?> @@ -94,6 +101,7 @@ $strexampleurl = get_string("exampleurl", "resource"); $strnewwindow = get_string("newwindow", "resource"); $strnewwindowopen = get_string("newwindowopen", "resource"); + $strsearch = get_string("search"); foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) { $stringname = "str$optionname"; @@ -145,7 +153,13 @@

:

- + + "; + echo "resource_websearch\" ". + "onClick=\"return window.open('$CFG->resource_websearch', 'websearch', 'menubar=1,location=1,directories=1,toolbar=1,scrollbars,resizable,width=800,height=600');\">$strsearch\n"; + echo ""; + ?> diff --git a/mod/resource/lib.php b/mod/resource/lib.php index 2cc390f0c4..328e8b9010 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -22,6 +22,10 @@ if (!isset($CFG->resource_framesize)) { set_config("resource_framesize", 130); } +if (!isset($CFG->resource_websearch)) { + set_config("resource_websearch", "http://google.com/"); +} + $RESOURCE_WINDOW_OPTIONS = array("resizable", "scrollbars", "directories", "location", "menubar", "toolbar", "status", "height", "width");