From: moodler Date: Sat, 28 Aug 2004 17:20:55 +0000 (+0000) Subject: Merged new settings from stable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=339352427cd8ebeef16c2966a0713e3bbf7fcace;p=moodle.git Merged new settings from stable --- diff --git a/mod/resource/config.html b/mod/resource/config.html index 1380d66136..0e81fff2d7 100644 --- a/mod/resource/config.html +++ b/mod/resource/config.html @@ -82,6 +82,34 @@ echo ""; } ?> + +

resource_windowsettings: + + resource_windowsettings, ""); + ?> + + + + + + +

resource_parametersettings: + + resource_parametersettings, ""); + ?> + + + + + "> diff --git a/mod/resource/lib.php b/mod/resource/lib.php index feb0ff9b2a..1dc6eb051d 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -24,6 +24,14 @@ if (!isset($CFG->resource_popup)) { set_config("resource_popup", ""); } +if (!isset($CFG->resource_windowsettings)) { + set_config("resource_windowsettings", "0"); +} + +if (!isset($CFG->resource_parametersettings)) { + set_config("resource_parametersettings", "0"); +} + $RESOURCE_WINDOW_OPTIONS = array("resizable", "scrollbars", "directories", "location", "menubar", "toolbar", "status", "height", "width"); @@ -155,6 +163,13 @@ function add_instance($resource) { } } + if (isset($resource->parametersettingspref)) { + set_user_preference('resource_parametersettingspref', $resource->parametersettingspref); + } + if (isset($resource->windowsettingspref)) { + set_user_preference('resource_windowsettingspref', $resource->windowsettingspref); + } + return insert_record("resource", $resource); } @@ -189,6 +204,13 @@ function update_instance($resource) { } } + if (isset($resource->parametersettingspref)) { + set_user_preference('resource_parametersettingspref', $resource->parametersettingspref); + } + if (isset($resource->windowsettingspref)) { + set_user_preference('resource_windowsettingspref', $resource->windowsettingspref); + } + return update_record("resource", $resource); } diff --git a/mod/resource/type/file/file.html b/mod/resource/type/file/file.html index 34ad7755fd..2c0ac837e5 100644 --- a/mod/resource/type/file/file.html +++ b/mod/resource/type/file/file.html @@ -1,13 +1,26 @@ @@ -35,6 +48,8 @@

:

+ @@ -116,6 +131,8 @@

:

+ @@ -169,6 +186,6 @@ for ($i=0; $i < $this->maxparameters; $i++) { diff --git a/mod/resource/type/html/html.html b/mod/resource/type/html/html.html index ff41f1bfe9..9c3807a8c1 100644 --- a/mod/resource/type/html/html.html +++ b/mod/resource/type/html/html.html @@ -1,19 +1,31 @@ -

:


@@ -34,6 +46,8 @@

:

+ @@ -101,6 +115,6 @@ diff --git a/mod/resource/type/html/resource.class.php b/mod/resource/type/html/resource.class.php index 8289cfa793..e1facc8266 100644 --- a/mod/resource/type/html/resource.class.php +++ b/mod/resource/type/html/resource.class.php @@ -30,6 +30,13 @@ function add_instance($resource) { $resource->popup = ""; } + if (isset($resource->parametersettingspref)) { + set_user_preference('resource_parametersettingspref', $resource->parametersettingspref); + } + if (isset($resource->windowsettingspref)) { + set_user_preference('resource_windowsettingspref', $resource->windowsettingspref); + } + return insert_record("resource", $resource); } @@ -57,6 +64,13 @@ function update_instance($resource) { $resource->popup = ""; } + if (isset($resource->parametersettingspref)) { + set_user_preference('resource_parametersettingspref', $resource->parametersettingspref); + } + if (isset($resource->windowsettingspref)) { + set_user_preference('resource_windowsettingspref', $resource->windowsettingspref); + } + return update_record("resource", $resource); } diff --git a/mod/resource/type/text/resource.class.php b/mod/resource/type/text/resource.class.php index 60160a40c1..8447440a1f 100644 --- a/mod/resource/type/text/resource.class.php +++ b/mod/resource/type/text/resource.class.php @@ -31,6 +31,13 @@ function add_instance($resource) { $resource->popup = ""; } + if (isset($resource->parametersettingspref)) { + set_user_preference('resource_parametersettingspref', $resource->parametersettingspref); + } + if (isset($resource->windowsettingspref)) { + set_user_preference('resource_windowsettingspref', $resource->windowsettingspref); + } + return insert_record("resource", $resource); } @@ -57,6 +64,13 @@ function update_instance($resource) { $resource->popup = ""; } + if (isset($resource->parametersettingspref)) { + set_user_preference('resource_parametersettingspref', $resource->parametersettingspref); + } + if (isset($resource->windowsettingspref)) { + set_user_preference('resource_windowsettingspref', $resource->windowsettingspref); + } + return update_record("resource", $resource); } diff --git a/mod/resource/type/text/text.html b/mod/resource/type/text/text.html index e2bac3aacf..2f92431f15 100644 --- a/mod/resource/type/text/text.html +++ b/mod/resource/type/text/text.html @@ -1,13 +1,26 @@ @@ -45,6 +58,8 @@

:

+ @@ -114,6 +129,6 @@