mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Checking in some unchecked-in code
This commit is contained in:
parent
613c1fcf49
commit
1ec13950d1
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.9 KiB |
@ -22,7 +22,10 @@
|
||||
if ($format != 'orig') {
|
||||
$hive_ret = 'HIVE_RET=CNV';
|
||||
}
|
||||
$resource = $hive_ref.'&'. $hive_ret .'&HIVE_REQ=2113';
|
||||
|
||||
$reference = $hive_ref.'&'. $hive_ret .'&HIVE_REQ=2113';
|
||||
|
||||
$resource = $CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath . '/'.$filename.'?'. $reference;
|
||||
|
||||
|
||||
?>
|
||||
|
@ -17,7 +17,7 @@
|
||||
die;
|
||||
}
|
||||
|
||||
$query .= '&HISTORY=';
|
||||
$query .= 'HISTORY=';
|
||||
$query .= '&hiveLanguage=en_AU';
|
||||
$query .= '&PUBCATEGORY_LIST=';
|
||||
$query .= '&CATEGORY_LIST=';
|
||||
@ -30,6 +30,7 @@ $query .= '&HIVE_REQ=2113';
|
||||
$query .= '&HIVE_ERRCODE=0';
|
||||
$query .= '&mklms=Doodle';
|
||||
$query .= '&HIVE_PROD=0';
|
||||
$query .= '&HIVE_CURRENTBUREAUID='.$CFG->decsbureauid;
|
||||
$query .= '&HIVE_REF=hin:hive@Hive%20Login%20HTML%20Template';
|
||||
$query .= '&HIVE_LITEMODE=liteBrowse';
|
||||
$query .= '&HIVE_SEREF='.$CFG->wwwroot.'/sso/hive/expired.php';
|
||||
|
@ -18,7 +18,8 @@
|
||||
}
|
||||
|
||||
// MW Redirect to the Hive page. No need for a self-posting form as there is no sensitive data.
|
||||
$query .= '&HISTORY=';
|
||||
$query ='';
|
||||
$query .= 'HISTORY=';
|
||||
$query .= '&hiveLanguage=en_AU';
|
||||
$query .= '&PUBCATEGORY_LIST=';
|
||||
$query .= '&CATEGORY_LIST=';
|
||||
@ -32,38 +33,37 @@ $query .= '&mklms=Moodle';
|
||||
$query .= '&HIVE_PROD=0';
|
||||
$query .= '&HIVE_REF=hin:hive@Hive%20Login%20HTML%20Template';
|
||||
$query .= '&HIVE_LITEMODE=liteBrowse';
|
||||
$query .= '&HIVE_ITEMTYPE='.$CFG->decsitemtypeid;
|
||||
$query .= '&HIVE_CURRENTBUREAUID='.$CFG->decsbureauid;
|
||||
$query .= '&HIVE_SEREF='.$CFG->wwwroot.'/sso/hive/expired.php';
|
||||
$query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
|
||||
//$query = '';
|
||||
|
||||
|
||||
//================================================
|
||||
$stylesheets = '';
|
||||
foreach ($CFG->stylesheets as $stylesheet) {
|
||||
if(empty($stylesheets)) {
|
||||
$stylesheets = $stylesheet;
|
||||
} else {
|
||||
$stylesheets .= '%26'.$stylesheet;
|
||||
}
|
||||
}
|
||||
|
||||
$query = '';
|
||||
// $query .= 'HIVE_REF=hin:hive@Demo%20LMS%20Browse';
|
||||
$query .= 'HIVE_REF=hin:hive@LMS%20Browse';
|
||||
$query .= '&HIVE_RET=ORG';
|
||||
$query .= '&HIVE_REQ=2113';
|
||||
$query .= '&HIVE_PROD=0';
|
||||
$query .= '&HIVE_CURRENTBUREAUID='.$CFG->decsbureauid;
|
||||
$query .= '&HIVE_BUREAU='.$CFG->decsbureauid;
|
||||
$query .= '&HIVE_ITEMTYPE='.$CFG->decsitemtypeid;
|
||||
$query .= '&mkurl='.$CFG->wwwroot.'/mod/resource/type/repository/hive/makelink.php';
|
||||
$query .= '&mklms=Moodle';
|
||||
$query .= '&HIVE_SEREF='.$CFG->wwwroot.'/sso/hive/expired.php';
|
||||
$query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
|
||||
$query .= '&mklmsstyle='.$stylesheets;
|
||||
|
||||
redirect($CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'?'.$query);
|
||||
/***********
|
||||
// MW The original form
|
||||
notify('Opening HarvestRoad Hive. Please wait. Contacting '. $CFG->hivehost );
|
||||
|
||||
echo '<form name="OPEN_HIVE_FORM" action="'. $CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'" method="post">';
|
||||
|
||||
echo '<input type="hidden" name="HISTORY" value="">';
|
||||
echo '<input type="hidden" name="hiveLanguage" value="en_AU">';
|
||||
echo '<input type="hidden" name="PUBCATEGORY_LIST" value="">';
|
||||
echo '<input type="hidden" name="CATEGORY_LIST" value="">';
|
||||
echo '<input type="hidden" name="HIDE_LOGOUT" value="Y">';
|
||||
echo '<input type="hidden" name="mkurl" value="'.$CFG->wwwroot.'/mod/resource/type/repository/hive/makelink.php">';
|
||||
echo '<input type="hidden" name="HIDE_CHANGEUSERDETAILS" value="Y">';
|
||||
echo '<input type="hidden" name="HIVE_RET" value="ORG">';
|
||||
echo '<input type="hidden" name="HIVE_PAGE" value="Lite Browse">';
|
||||
echo '<input type="hidden" name="HIVE_REQ" value="2113">';
|
||||
echo '<input type="hidden" name="HIVE_ERRCODE" value="0">';
|
||||
echo '<input type="hidden" name="mklms" value="Moodle">';
|
||||
echo '<input type="hidden" name="HIVE_PROD" value="0">';
|
||||
echo '<input type="hidden" name="HIVE_REF" value="hin:hive@Hive Login HTML Template">';
|
||||
echo '<input type="hidden" name="HIVE_LITEMODE" value="liteBrowse">';
|
||||
echo '<input type="hidden" name="HIVE_SEREF" value="'.$CFG->wwwroot.'/sso/hive/expired.php">';
|
||||
echo '<input type="hidden" name="HIVE_SESSION" value="'.$SESSION->HIVE_SESSION.'">';
|
||||
echo '</form>';
|
||||
echo '<script language="javascript"/>';
|
||||
echo 'document.OPEN_HIVE_FORM.submit();';
|
||||
echo '</script>';
|
||||
|
||||
print_footer();
|
||||
*************/
|
||||
?>
|
||||
|
@ -18,52 +18,30 @@
|
||||
}
|
||||
|
||||
// MW Redirect to the Hive page. No need for a self-posting form as there is no sensitive data.
|
||||
$query .= '&HISTORY=';
|
||||
$query .= '&hiveLanguage=en_AU';
|
||||
$query .= '&PUBCATEGORY_LIST=';
|
||||
$query .= '&CATEGORY_LIST=';
|
||||
$query .= '&HIDE_LOGOUT=Y';
|
||||
$query .= '&mkurl='.$CFG->wwwroot.'/mod/resource/type/repository/hive/makelink.php';
|
||||
$query .= '&HIDE_CHANGEUSERDETAILS=Y';
|
||||
$query .= '&HIVE_RET=ORG';
|
||||
$query .= '&HIVE_REQ=2113';
|
||||
$query .= '&HIVE_ERRCODE=0';
|
||||
$query .= '&mklms=Moodle';
|
||||
$query .= '&HIVE_PROD=0';
|
||||
$query .= '&HIVE_REF=hin:hive@Hive%20Login%20HTML%20Template';
|
||||
$query .= '&HIVE_LITEMODE=liteSearch';
|
||||
$query .= '&HIVE_SEREF='.$CFG->wwwroot.'/sso/hive/expired.php';
|
||||
$query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
|
||||
|
||||
///=====================================================
|
||||
$stylesheets = '';
|
||||
foreach ($CFG->stylesheets as $stylesheet) {
|
||||
if(empty($stylesheets)) {
|
||||
$stylesheets = $stylesheet;
|
||||
} else {
|
||||
$stylesheets .= '%26'.$stylesheet;
|
||||
}
|
||||
}
|
||||
|
||||
$query = '';
|
||||
/// $query .= 'HIVE_REF=hin:hive@Demo%20LMS%20Browse';
|
||||
$query .= 'HIVE_REF=hin:hive@LMS%20Search';
|
||||
$query .= '&HIVE_RET=ORG';
|
||||
$query .= '&HIVE_REQ=2113';
|
||||
$query .= '&HIVE_PROD=0';
|
||||
$query .= '&HIVE_CURRENTBUREAUID='.$CFG->decsbureauid;
|
||||
$query .= '&HIVE_BUREAU='.$CFG->decsbureauid;
|
||||
$query .= '&HIVE_ITEMTYPE='.$CFG->decsitemtypeid;
|
||||
$query .= '&mkurl='.$CFG->wwwroot.'/mod/resource/type/repository/hive/makelink.php';
|
||||
$query .= '&mklms=Moodle';
|
||||
$query .= '&HIVE_SEREF='.$CFG->wwwroot.'/sso/hive/expired.php';
|
||||
$query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
|
||||
$query .= '&mklmsstyle='.$stylesheets;
|
||||
redirect($CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'?'.$query);
|
||||
/***********
|
||||
// MW The original form
|
||||
notify('Opening HarvestRoad Hive. Please wait. Contacting '. $CFG->hivehost );
|
||||
|
||||
echo '<form name="OPEN_HIVE_FORM" action="'. $CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'" method="post">';
|
||||
|
||||
echo '<input type="hidden" name="HISTORY" value="">';
|
||||
echo '<input type="hidden" name="hiveLanguage" value="en_AU">';
|
||||
echo '<input type="hidden" name="PUBCATEGORY_LIST" value="">';
|
||||
echo '<input type="hidden" name="CATEGORY_LIST" value="">';
|
||||
echo '<input type="hidden" name="HIDE_LOGOUT" value="Y">';
|
||||
echo '<input type="hidden" name="mkurl" value="'.$CFG->wwwroot.'/mod/resource/type/repository/hive/makelink.php">';
|
||||
echo '<input type="hidden" name="HIDE_CHANGEUSERDETAILS" value="Y">';
|
||||
echo '<input type="hidden" name="HIVE_RET" value="ORG">';
|
||||
echo '<input type="hidden" name="HIVE_PAGE" value="Lite Browse">';
|
||||
echo '<input type="hidden" name="HIVE_REQ" value="2113">';
|
||||
echo '<input type="hidden" name="HIVE_ERRCODE" value="0">';
|
||||
echo '<input type="hidden" name="mklms" value="Moodle">';
|
||||
echo '<input type="hidden" name="HIVE_PROD" value="0">';
|
||||
echo '<input type="hidden" name="HIVE_REF" value="hin:hive@Hive Login HTML Template">';
|
||||
echo '<input type="hidden" name="HIVE_LITEMODE" value="liteBrowse">';
|
||||
echo '<input type="hidden" name="HIVE_SEREF" value="'.$CFG->wwwroot.'/sso/hive/expired.php">';
|
||||
echo '<input type="hidden" name="HIVE_SESSION" value="'.$SESSION->HIVE_SESSION.'">';
|
||||
echo '</form>';
|
||||
echo '<script language="javascript"/>';
|
||||
echo 'document.OPEN_HIVE_FORM.submit();';
|
||||
echo '</script>';
|
||||
|
||||
print_footer();
|
||||
*************/
|
||||
?>
|
||||
|
@ -1,215 +1,210 @@
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right" nowrap="nowrap">
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function showhide (id, set) {
|
||||
divobj = document.getElementById(id);
|
||||
butobj = document.getElementById(id+'button');
|
||||
prefobj = document.getElementById(id+'pref');
|
||||
if (set == true) {
|
||||
if (prefobj.value == '1') {
|
||||
divobj.style.display = 'block';
|
||||
butobj.value = '<?php print_string("hidesettings") ?>';
|
||||
} else {
|
||||
divobj.style.display = 'none';
|
||||
butobj.value = '<?php print_string("showsettings") ?>...';
|
||||
}
|
||||
} else {
|
||||
if (prefobj.value == '1') {
|
||||
divobj.style.display = 'none';
|
||||
butobj.value = '<?php print_string("showsettings") ?>...';
|
||||
prefobj.value = '0';
|
||||
} else {
|
||||
divobj.style.display = 'block';
|
||||
butobj.value = '<?php print_string("hidesettings") ?>';
|
||||
prefobj.value = '1';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<b><?php echo $strfilename ?>:</b>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
echo "<input type=\"text\" name=\"reference\" size=\"90\" value=\"$form->reference\" alt=\"reference\" /><br />";
|
||||
//MW add image icon next to Hive... button
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td align="right" nowrap="nowrap">
|
||||
<img src="<?php echo $CFG->wwwroot.'/mod/resource/type/repository/hive/hp-footer-hive-powered.gif' ?>" align="top" />
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
//MW END
|
||||
//MW add controls to popup
|
||||
$options = 'menubar,location,toolbar,scrollbars,resizable,width=750,height=500';
|
||||
button_to_popup_window ('/mod/resource/type/repository/hive/openlitebrowse.php',
|
||||
'LiteBrowse', 'Browse for content in Hive', 500, 750,
|
||||
'Browse for content in the HarvestRoad Hive repository', $options);
|
||||
button_to_popup_window ('/mod/resource/type/repository/hive/openlitesearch.php',
|
||||
'LiteSearch', 'Search for content in Hive ', 500, 750,
|
||||
'Search for content in the HarvestRoad Hive repository', $options);
|
||||
helpbutton("hive", "HarvestRoad Hive", "resource/type", true);
|
||||
//MW END
|
||||
// button_to_popup_window ('/mod/resource/type/repository/hive/openhive.php', 'Hive', 'Hive', 500, 750, $strchooseafile);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2"><hr /></td></tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("display", "resource") ?>:</b></td>
|
||||
<td>
|
||||
<input type="button" value="hide settings" id="windowsettingsbutton" onclick="javascript: return showhide('windowsettings');" />
|
||||
<input type="hidden" name="windowsettingspref" id="windowsettingspref"
|
||||
value="<?php echo get_user_preferences('resource_windowsettingspref', $CFG->resource_windowsettings); ?>" />
|
||||
<?php helpbutton("window", get_string("display", "resource"), "resource", true) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2">
|
||||
|
||||
<div id="windowsettings">
|
||||
|
||||
<table align="center">
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
|
||||
<td colspan="2">
|
||||
<script type="text/javascript">
|
||||
var popupitems = [<?php echo $popupoptions; ?>];
|
||||
var frameitem = [<?php echo $frameoption; ?>];
|
||||
var allitems = [<?php echo $alloptions; ?>];
|
||||
</script>
|
||||
<input type="radio" name="windowpopup" value="0" alt="<?php print_string('pagewindow', 'resource') ?>" <?php echo ($windowtype != "popup") ? "checked=\"checked\"" : "" ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', frameitem);
|
||||
return lockoptions('form', 'windowpopup[1]', popupitems);" />
|
||||
<b title="<?php print_string("pagedisplay", "resource") ?>"><?php print_string("pagewindow", "resource") ?></b>
|
||||
<blockquote>
|
||||
<input type="hidden" name="hframepage" value="0" />
|
||||
<input type="checkbox" name="framepage" value="1" <?php echo ($form->options == "frame") ? "checked=\"checked\"" : "" ?> alt="<?php print_string('frameifpossible', 'resource') ?>" />
|
||||
<?php print_string("frameifpossible", "resource") ?>
|
||||
</blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
|
||||
<td colspan="2">
|
||||
<input name="windowpopup" type="radio" value="1" alt="<?php p($strnewwindow)?>" <?php echo ($windowtype == "popup") ? "checked=\"checked\"" : "" ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', frameitem);
|
||||
return lockoptions('form', 'windowpopup[1]', popupitems);" />
|
||||
<b title="<?php p($strnewwindowopen) ?>"><?php p($strnewwindow) ?></b>
|
||||
<blockquote>
|
||||
<?php
|
||||
foreach ($window as $name => $value) {
|
||||
if ($name == "height" or $name == "width") {
|
||||
continue;
|
||||
}
|
||||
echo "<input name=\"h$name\" type=\"hidden\" value=\"0\" />";
|
||||
echo "<input name=\"$name\" type=\"checkbox\" value=\"1\" ".$window->$name." alt=\"$name\" />";
|
||||
$stringname = "str$name";
|
||||
echo $$stringname."<br />";
|
||||
}
|
||||
?>
|
||||
|
||||
<input name="hwidth" type="hidden" value="0" />
|
||||
<input name="width" type="text" size="4" value="<?php p($window->width) ?>" alt="<?php p($strwidth) ?>" />
|
||||
<?php p($strwidth) ?><br />
|
||||
|
||||
<input name="hheight" type="hidden" value="0" />
|
||||
<input name="height" type="text" size="4" value="<?php p($window->height) ?>" alt="<?php p($strheight) ?>" />
|
||||
<?php p($strheight) ?><br />
|
||||
<?php
|
||||
if ($windowtype == "page") {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "lockoptions('form','windowpopup[1]', popupitems);";
|
||||
echo "</script>";
|
||||
} else {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "lockoptions('form','windowpopup[0]', frameitem);";
|
||||
echo "</script>";
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("parameters", "resource") ?>:</b></td>
|
||||
<td>
|
||||
<input type="button" value="hide settings" id="parametersettingsbutton" onclick="javascript: return showhide('parametersettings');" />
|
||||
<input type="hidden" name="parametersettingspref" id="parametersettingspref"
|
||||
value="<?php echo get_user_preferences('resource_parametersettingspref', $CFG->resource_parametersettings); ?>" />
|
||||
<?php helpbutton("parameters", get_string("parameters", "resource"), "resource", true) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2">
|
||||
|
||||
<div id="parametersettings">
|
||||
|
||||
<table align="center">
|
||||
|
||||
<tr>
|
||||
<td align="center"><?php print_string("parameter", "resource") ?></td>
|
||||
<td align="center"><?php print_string("variablename", "resource") ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
for ($i=0; $i < $this->maxparameters; $i++) {
|
||||
echo "<tr>\n";
|
||||
echo "<td valign=\"top\">\n";
|
||||
echo "<select name=\"parameter$i\">\n";
|
||||
echo "<option value=\"-\">-- ".get_string('chooseparameter', 'resource')." --</option>\n";
|
||||
foreach ($this->parameters as $field=>$fieldarr) {
|
||||
if ($fieldarr['value'] === "optgroup") {
|
||||
echo "<optgroup label=\"{$fieldarr['langstr']}\">\n";
|
||||
} elseif ($fieldarr['value'] === "/optgroup") {
|
||||
echo "</optgroup>\n";
|
||||
} else {
|
||||
echo "<option value=\"$field\"";
|
||||
if ($alltextfield[$i]['parameter'] == $field) {
|
||||
echo " selected=\"selected\"";
|
||||
}
|
||||
echo ">{$fieldarr['langstr']}</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td valign=\"top\">\n";
|
||||
echo "<input type=\"text\" name=\"parse$i\" value=\"{$alltextfield[$i]['parse']}\" alt=\"parameter$i\"/>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
showhide('parametersettings', true);
|
||||
showhide('windowsettings', true);
|
||||
</script>
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
<?php print_visible_setting($form); ?>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right" nowrap="nowrap">
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function showhide (id, set) {
|
||||
divobj = document.getElementById(id);
|
||||
butobj = document.getElementById(id+'button');
|
||||
prefobj = document.getElementById(id+'pref');
|
||||
if (set == true) {
|
||||
if (prefobj.value == '1') {
|
||||
divobj.style.display = 'block';
|
||||
butobj.value = '<?php print_string("hidesettings") ?>';
|
||||
} else {
|
||||
divobj.style.display = 'none';
|
||||
butobj.value = '<?php print_string("showsettings") ?>...';
|
||||
}
|
||||
} else {
|
||||
if (prefobj.value == '1') {
|
||||
divobj.style.display = 'none';
|
||||
butobj.value = '<?php print_string("showsettings") ?>...';
|
||||
prefobj.value = '0';
|
||||
} else {
|
||||
divobj.style.display = 'block';
|
||||
butobj.value = '<?php print_string("hidesettings") ?>';
|
||||
prefobj.value = '1';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<b><?php echo $strfilename ?>:</b>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
echo "<input type=\"text\" name=\"reference\" size=\"90\" value=\"$form->reference\" alt=\"reference\" /><br />";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td align="right" nowrap="nowrap">
|
||||
<img src="<?php echo $CFG->wwwroot.'/mod/resource/type/repository/hive/hp-footer-hive-powered.gif' ?>" align="top" />
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$options = 'menubar,location,toolbar,scrollbars,resizable,width=750,height=500';
|
||||
button_to_popup_window ('/mod/resource/type/repository/hive/openlitebrowse.php',
|
||||
'LiteBrowse', 'Browse for content in Hive', 500, 750,
|
||||
'Browse for content in the HarvestRoad Hive repository', $options);
|
||||
button_to_popup_window ('/mod/resource/type/repository/hive/openlitesearch.php',
|
||||
'LiteSearch', 'Search for content in Hive ', 500, 750,
|
||||
'Search for content in the HarvestRoad Hive repository', $options);
|
||||
helpbutton("hive", "HarvestRoad Hive", "resource/type", true);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2"><hr /></td></tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("display", "resource") ?>:</b></td>
|
||||
<td>
|
||||
<input type="button" value="hide settings" id="windowsettingsbutton" onclick="javascript: return showhide('windowsettings');" />
|
||||
<input type="hidden" name="windowsettingspref" id="windowsettingspref"
|
||||
value="<?php echo get_user_preferences('resource_windowsettingspref', $CFG->resource_windowsettings); ?>" />
|
||||
<?php helpbutton("window", get_string("display", "resource"), "resource", true) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2">
|
||||
|
||||
<div id="windowsettings">
|
||||
|
||||
<table align="center">
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
|
||||
<td colspan="2">
|
||||
<script type="text/javascript">
|
||||
var popupitems = [<?php echo $popupoptions; ?>];
|
||||
var frameitem = [<?php echo $frameoption; ?>];
|
||||
var allitems = [<?php echo $alloptions; ?>];
|
||||
</script>
|
||||
<input type="radio" name="windowpopup" value="0" alt="<?php print_string('pagewindow', 'resource') ?>" <?php echo ($windowtype != "popup") ? "checked=\"checked\"" : "" ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', frameitem);
|
||||
return lockoptions('form', 'windowpopup[1]', popupitems);" />
|
||||
<b title="<?php print_string("pagedisplay", "resource") ?>"><?php print_string("pagewindow", "resource") ?></b>
|
||||
<blockquote>
|
||||
<input type="hidden" name="hframepage" value="0" />
|
||||
<input type="checkbox" name="framepage" value="1" <?php echo ($form->options == "frame") ? "checked=\"checked\"" : "" ?> alt="<?php print_string('frameifpossible', 'resource') ?>" />
|
||||
<?php print_string("frameifpossible", "resource") ?>
|
||||
</blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
|
||||
<td colspan="2">
|
||||
<input name="windowpopup" type="radio" value="1" alt="<?php p($strnewwindow)?>" <?php echo ($windowtype == "popup") ? "checked=\"checked\"" : "" ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', frameitem);
|
||||
return lockoptions('form', 'windowpopup[1]', popupitems);" />
|
||||
<b title="<?php p($strnewwindowopen) ?>"><?php p($strnewwindow) ?></b>
|
||||
<blockquote>
|
||||
<?php
|
||||
foreach ($window as $name => $value) {
|
||||
if ($name == "height" or $name == "width") {
|
||||
continue;
|
||||
}
|
||||
echo "<input name=\"h$name\" type=\"hidden\" value=\"0\" />";
|
||||
echo "<input name=\"$name\" type=\"checkbox\" value=\"1\" ".$window->$name." alt=\"$name\" />";
|
||||
$stringname = "str$name";
|
||||
echo $$stringname."<br />";
|
||||
}
|
||||
?>
|
||||
|
||||
<input name="hwidth" type="hidden" value="0" />
|
||||
<input name="width" type="text" size="4" value="<?php p($window->width) ?>" alt="<?php p($strwidth) ?>" />
|
||||
<?php p($strwidth) ?><br />
|
||||
|
||||
<input name="hheight" type="hidden" value="0" />
|
||||
<input name="height" type="text" size="4" value="<?php p($window->height) ?>" alt="<?php p($strheight) ?>" />
|
||||
<?php p($strheight) ?><br />
|
||||
<?php
|
||||
if ($windowtype == "page") {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "lockoptions('form','windowpopup[1]', popupitems);";
|
||||
echo "</script>";
|
||||
} else {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "lockoptions('form','windowpopup[0]', frameitem);";
|
||||
echo "</script>";
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("parameters", "resource") ?>:</b></td>
|
||||
<td>
|
||||
<input type="button" value="hide settings" id="parametersettingsbutton" onclick="javascript: return showhide('parametersettings');" />
|
||||
<input type="hidden" name="parametersettingspref" id="parametersettingspref"
|
||||
value="<?php echo get_user_preferences('resource_parametersettingspref', $CFG->resource_parametersettings); ?>" />
|
||||
<?php helpbutton("parameters", get_string("parameters", "resource"), "resource", true) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2">
|
||||
|
||||
<div id="parametersettings">
|
||||
|
||||
<table align="center">
|
||||
|
||||
<tr>
|
||||
<td align="center"><?php print_string("parameter", "resource") ?></td>
|
||||
<td align="center"><?php print_string("variablename", "resource") ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
for ($i=0; $i < $this->maxparameters; $i++) {
|
||||
echo "<tr>\n";
|
||||
echo "<td valign=\"top\">\n";
|
||||
echo "<select name=\"parameter$i\">\n";
|
||||
echo "<option value=\"-\">-- ".get_string('chooseparameter', 'resource')." --</option>\n";
|
||||
foreach ($this->parameters as $field=>$fieldarr) {
|
||||
if ($fieldarr['value'] === "optgroup") {
|
||||
echo "<optgroup label=\"{$fieldarr['langstr']}\">\n";
|
||||
} elseif ($fieldarr['value'] === "/optgroup") {
|
||||
echo "</optgroup>\n";
|
||||
} else {
|
||||
echo "<option value=\"$field\"";
|
||||
if ($alltextfield[$i]['parameter'] == $field) {
|
||||
echo " selected=\"selected\"";
|
||||
}
|
||||
echo ">{$fieldarr['langstr']}</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td valign=\"top\">\n";
|
||||
echo "<input type=\"text\" name=\"parse$i\" value=\"{$alltextfield[$i]['parse']}\" alt=\"parameter$i\"/>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
showhide('parametersettings', true);
|
||||
showhide('windowsettings', true);
|
||||
</script>
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
<?php print_visible_setting($form); ?>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user