From 5925d0ef5b6bf892b4e5cadb95329944b49e2218 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 18 Aug 2003 17:46:51 +0000 Subject: [PATCH] New configuration screen for the resources module --- lang/en/resource.php | 1 + mod/resource/config.html | 19 +++++++++++++++++++ mod/resource/lib.php | 4 +++- mod/resource/view.php | 4 ++-- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 mod/resource/config.html diff --git a/lang/en/resource.php b/lang/en/resource.php index 9250791a0e..4b0567e93d 100644 --- a/lang/en/resource.php +++ b/lang/en/resource.php @@ -6,6 +6,7 @@ $string['modulenameplural'] = "Resources"; #------------------------------------------------------------ $string['addresource'] = "Add resource"; +$string['configframesize'] = "When a web page or an uploaded file is displayed within a frame, this value is the size (in pixels) of the top frame (which contains the navigation)."; $string['editingaresource'] = "Editing a resource"; $string['example'] = "Example"; $string['examplereference'] = "Tobin, K. & Tippins, D (1993) Constructivism as a Referent for Teaching and Learning. In: K. Tobin (Ed) The Practice of Constructivism in Science Education, pp 3-21, Lawrence-Erlbaum, Hillsdale, NJ."; diff --git a/mod/resource/config.html b/mod/resource/config.html new file mode 100644 index 0000000000..dc6480e1c4 --- /dev/null +++ b/mod/resource/config.html @@ -0,0 +1,19 @@ +
+ + + + + + + + + + +

resource_framesize:

+ + + +
+ ">
+ +
diff --git a/mod/resource/lib.php b/mod/resource/lib.php index 680cbcddd4..f86f332e4c 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -18,7 +18,9 @@ $RESOURCE_TYPE = array (REFERENCE => get_string("resourcetype1", "resource"), PROGRAM => get_string("resourcetype7", "resource"), WIKITEXT => get_string("resourcetype8", "resource") ); -$RESOURCE_FRAME_SIZE = 130; +if (!isset($CFG->resource_framesize)) { + set_config("resource_framesize", 130); +} $RESOURCE_WINDOW_OPTIONS = array("resizable", "scrollbars", "directories", "location", "menubar", "toolbar", "status", "height", "width"); diff --git a/mod/resource/view.php b/mod/resource/view.php index 5a7879ddc1..ae339f9681 100644 --- a/mod/resource/view.php +++ b/mod/resource/view.php @@ -70,7 +70,7 @@ } else { add_to_log($course->id, "resource", "view", "view.php?id=$cm->id", "$resource->id"); echo "$course->shortname: $resource->name\n"; - echo ""; + echo "resource_framesize,*>"; echo "id&frameset=top\">"; echo "reference\">"; echo ""; @@ -116,7 +116,7 @@ } else { // Display resource in a frame of it's own. echo "$course->shortname: $resource->name\n"; - echo ""; + echo "resource_framesize,*>"; echo "id&frameset=top\">"; echo ""; echo ""; -- 2.39.5