New configuration screen for the resources module

This commit is contained in:
moodler
2003-08-18 17:46:51 +00:00
parent 42282810f8
commit 5925d0ef5b
4 changed files with 25 additions and 3 deletions
+1
View File
@@ -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.";
+19
View File
@@ -0,0 +1,19 @@
<form method="post" action="module.php" name="form">
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td align=right><p>resource_framesize:</td>
<td>
<input name=resource_framesize type=text size=5 value="<?php p($CFG->resource_framesize) ?>">
</td>
<td>
<?php print_string("configframesize", "resource") ?>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</table>
</form>
+3 -1
View File
@@ -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");
+2 -2
View File
@@ -70,7 +70,7 @@
} else {
add_to_log($course->id, "resource", "view", "view.php?id=$cm->id", "$resource->id");
echo "<head><title>$course->shortname: $resource->name</title></head>\n";
echo "<frameset rows=$RESOURCE_FRAME_SIZE,*>";
echo "<frameset rows=$CFG->resource_framesize,*>";
echo "<frame src=\"view.php?id=$cm->id&frameset=top\">";
echo "<frame src=\"$resource->reference\">";
echo "</frameset>";
@@ -116,7 +116,7 @@
} else { // Display resource in a frame of it's own.
echo "<head><title>$course->shortname: $resource->name</title></head>\n";
echo "<frameset rows=$RESOURCE_FRAME_SIZE,*>";
echo "<frameset rows=$CFG->resource_framesize,*>";
echo "<frame src=\"view.php?id=$cm->id&frameset=top\">";
echo "<frame src=\"$fullurl\">";
echo "</frameset>";