moodle/mod/glossary/mod.html
willcast dc36351d8b Case sensitive match
Whole words match
No match at all (a bit rude (you have to get down to the HTML code), no GUI so far either)
Categories are now linked too (I forced to be a case sensitive match)
You can automatically link one or several glossaries at once no matter if it is a main one or not.
2003-10-16 22:05:00 +00:00

247 lines
7.5 KiB
HTML

<!-- This page defines the form to create or edit an instance of this module -->
<!-- It is used from /course/mod.php. The whole instance is available as $form. -->
<FORM name="form" method="post" action="<?=$ME ?>">
<CENTER>
<TABLE cellpadding=5>
<TR valign=top>
<TD align=right><P><B><?php print_string("name") ?>:</B></P></TD>
<TD>
<INPUT type="text" name="name" size=30 value="<?php p($form->name) ?>">
</TD>
</TR>
<tr valign=top>
<td align=right><p><b><?php print_string("description") ?>:</b></p>
<font size="1">
<?php
helpbutton("description", get_string("description"), "glossary", true, true);
echo "<br \>";
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br \>";
helpbutton("text", get_string("helptext"), "moodle", true, true);
?>
<br />
</font>
</td>
<td>
<textarea name="intro" rows=5 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
</td>
</tr>
<!-- More rows go in here... -->
<?php
$mainglossary = get_record("glossary","mainglossary",1,"course",$form->course);
if (!$mainglossary or $mainglossary->id == $form->instance ) {
?>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("glossarytype", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="mainglossary">
<option value="1" <?php
if ( $form->mainglossary ) {
echo "selected";
}
?>><?php echo get_string("mainglossary", "glossary") ?></option>
<option value="0" <?php
if ( !$form->mainglossary ) {
echo "selected";
}
?>><?php echo get_string("secondaryglossary", "glossary") ?>
</option>
</select> <?php helpbutton("mainglossary", get_string("mainglossary", "glossary"), "glossary") ?>
</TD>
</TR>
<?php
} else {
echo "<INPUT type=\"hidden\" name=mainglossary value=\"0\">";
}
?>
<TR valign=top>
<TD align=right><P><B><?php p(get_string("studentcanpost", "glossary")) ?>:</B><br>
<font size=1><?php p(get_string("warningstudentcapost","glossary")) ?></font></P></TD>
<TD>
<select size="1" name="studentcanpost">
<option value="1" <?php
if ( $form->studentcanpost ) {
echo "selected";
}
?>><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$form->studentcanpost ) {
echo "selected";
}
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("studentcanpost", get_string("studentcanpost", "glossary"), "glossary") ?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("allowduplicatedentries", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="allowduplicatedentries">
<option value="1" <?php
if ( $form->allowduplicatedentries ) {
echo "selected";
}
?>
><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$form->allowduplicatedentries ) {
echo "selected";
}
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("allowduplicatedentries", get_string("allowduplicatedentries", "glossary"), "glossary") ?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("allowcomments", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="allowcomments">
<option value="1" <?php
if ( $form->allowcomments ) {
echo "selected";
}
?>
><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$form->allowcomments ) {
echo "selected";
}
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("allowcomments", get_string("allowcomments", "glossary"), "glossary") ?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("usedynalink", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="usedynalink">
<option value="1" <?php
if ( $form->usedynalink ) {
echo "selected";
}
?>
><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$form->usedynalink ) {
echo "selected";
}
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("usedynalink", get_string("usedynalink", "glossary"), "glossary") ?>
</TD>
</TR>
<TR valign=top>
<td colspan=2><hr>
</tr>
</tr>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("displayformat", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="displayformat">
<option value="0" <?php
if ( $form->displayformat == 0) {
echo "selected";
}
?>><?php echo get_string("displayformatdefault", "glossary") ?></option>
<?php
global $CFG;
$basedir = opendir("$CFG->dirroot/mod/glossary/formats");
while ($dir = readdir($basedir)) {
$firstchar = substr($dir, 0, 1);
if ($firstchar == "." or $dir == "CVS" or $dir == "_vti_cnf") {
continue;
}
if (filetype("$CFG->dirroot/mod/glossary/formats/$dir") == "dir") {
continue;
}
if ( $pos = strpos($dir, ".") ) {
$dir = substr($dir, 0, $pos );
echo "<option value=\"$dir\" ";
if ( $form->displayformat == $dir) {
echo "selected ";
}
echo ">";
echo get_string("displayformat$dir", "glossary")."</option>";
}
}
?>
</select> <?php helpbutton("displayformat", get_string("displayformat", "glossary"), "glossary") ?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("showspecial", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="showspecial">
<option value="1" <?php
if ( $form->showspecial ) {
echo "selected";
}
?>
><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$form->showspecial ) {
echo "selected";
}
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("shows", get_string("showspecial", "glossary"), "glossary") ?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("showalphabet", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="showalphabet">
<option value="1" <?php
if ( $form->showalphabet ) {
echo "selected";
}
?>
><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$form->showalphabet ) {
echo "selected";
}
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("shows", get_string("showalphabet", "glossary"), "glossary") ?>
</TD>
</TR>
<TR valign=top>
<TD align=right><P><B><?php echo get_string("showall", "glossary") ?>:</B></P></TD>
<TD>
<select size="1" name="showall">
<option value="1" <?php
if ( $form->showall ) {
echo "selected";
}
?>
><?php echo get_string("yes") ?></option>
<option value="0" <?php
if ( !$form->showall ) {
echo "selected";
}
?>><?php echo get_string("no") ?>
</option>
</select> <?php helpbutton("shows", get_string("showall", "glossary"), "glossary") ?>
</TD>
</TR>
</TABLE>
<!-- These hidden variables are always the same -->
<INPUT type="hidden" name=course value="<?php p($form->course) ?>">
<INPUT type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>">
<INPUT type="hidden" name=section value="<?php p($form->section) ?>">
<INPUT type="hidden" name=module value="<?php p($form->module) ?>">
<INPUT type="hidden" name=modulename value="<?php p($form->modulename) ?>">
<INPUT type="hidden" name=instance value="<?php p($form->instance) ?>">
<INPUT type="hidden" name=mode value="<?php p($form->mode) ?>">
<INPUT type="submit" value="<?php print_string("savechanges") ?>">
</CENTER>
</FORM>