New configuration screen for the resources module
This commit is contained in:
@@ -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.";
|
||||
|
||||
@@ -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>
|
||||
@@ -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");
|
||||
|
||||
@@ -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>";
|
||||
|
||||
Reference in New Issue
Block a user