2003-09-29 03:06:30 +00:00
|
|
|
<?php
|
2003-09-18 23:53:05 +00:00
|
|
|
global $CFG, $THEME;
|
|
|
|
require_once("../../config.php");
|
|
|
|
?>
|
2003-09-16 18:51:40 +00:00
|
|
|
<FORM name="theform" method="post" <?=$onsubmit ?> action="edit.php" enctype="multipart/form-data">
|
2003-09-29 03:06:30 +00:00
|
|
|
<table class=generalbox cellpadding=5 bgcolor="<?php p($THEME->cellheading)?>">
|
2003-09-18 23:53:05 +00:00
|
|
|
<tr valign=top>
|
|
|
|
<td align=right><p><b><?php echo get_string("concept","glossary") ?>:</b></p></td>
|
|
|
|
<td>
|
2003-09-29 03:06:30 +00:00
|
|
|
<INPUT type="text" name="concept" size=30 value="<?php p($form->concept) ?>">
|
2003-09-18 23:53:05 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2003-09-21 17:08:41 +00:00
|
|
|
<tr valign=top>
|
|
|
|
<td align=right><p><b><?php echo get_string("categories","glossary") ?>:</b></p></td>
|
|
|
|
<td>
|
2003-09-29 03:06:30 +00:00
|
|
|
<?php
|
2003-09-21 17:08:41 +00:00
|
|
|
$categories = get_records("glossary_categories","glossaryid",$glossary->id);
|
2003-09-23 12:34:47 +00:00
|
|
|
echo "<select size=\"6\" name=\"categories[]\" multiple=\"yes\">";
|
|
|
|
echo "<option value=0>" . get_string("nocategorized","glossary") . "</optioon>";
|
2003-09-21 17:08:41 +00:00
|
|
|
|
2003-09-29 03:06:30 +00:00
|
|
|
if ( $categories ) {
|
|
|
|
foreach ( $categories as $category ) {
|
|
|
|
echo " <option ";
|
2003-09-21 17:08:41 +00:00
|
|
|
|
2003-09-29 03:06:30 +00:00
|
|
|
if ( record_exists("glossary_entries_categories","entryid",$entry->id,"categoryid",$category->id) ) {
|
|
|
|
echo "selected " ;
|
|
|
|
}
|
|
|
|
echo "value=\"$category->id\">$category->name</option>\n";
|
|
|
|
}
|
2003-09-21 17:08:41 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2003-09-18 23:53:05 +00:00
|
|
|
<tr valign=top>
|
2003-09-29 03:06:30 +00:00
|
|
|
<td align=right><p><b><?php echo get_string("definition","glossary") ?>:</b></p>
|
2003-09-16 03:07:21 +00:00
|
|
|
<font size="1">
|
2003-09-18 23:53:05 +00:00
|
|
|
<?php
|
2003-09-16 03:07:21 +00:00
|
|
|
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
|
|
|
|
echo "<br />";
|
|
|
|
if ($usehtmleditor) {
|
|
|
|
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
|
|
|
|
} else {
|
2003-09-18 23:53:05 +00:00
|
|
|
emoticonhelpbutton("form", "description");
|
2003-09-16 03:07:21 +00:00
|
|
|
}
|
|
|
|
?>
|
2003-09-18 23:53:05 +00:00
|
|
|
<br />
|
2003-09-16 03:07:21 +00:00
|
|
|
</font>
|
|
|
|
</td>
|
2003-09-18 23:53:05 +00:00
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
print_textarea($usehtmleditor, 20, 60, 680, 400, "text", $entry->text);
|
|
|
|
|
|
|
|
echo "<p align=right>";
|
|
|
|
helpbutton("textformat", get_string("helpformatting"));
|
|
|
|
print_string("formattexttype");
|
|
|
|
echo ": ";
|
|
|
|
if (!$form->format) {
|
|
|
|
$form->format = $defaultformat;
|
|
|
|
}
|
|
|
|
choose_from_menu(format_text_menu(), "format", $entry->format, "");
|
|
|
|
echo "</p>";
|
|
|
|
?>
|
2003-09-16 03:07:21 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2003-09-16 18:51:40 +00:00
|
|
|
<tr valign=top>
|
|
|
|
<td align=right><p><b><?php print_string("attachment", "glossary") ?>:<br \>(<?php print_string("optional") ?>) </b></p></td>
|
|
|
|
<td>
|
|
|
|
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_max_upload_file_size() ?>">
|
|
|
|
<input type="file" name="attachment" size=40>
|
|
|
|
<?php
|
|
|
|
helpbutton("attachment", get_string("attachment", "glossary"), "glossary");
|
|
|
|
print_string("maxsize", "", display_size(get_max_upload_file_size()));
|
|
|
|
?>
|
|
|
|
</td>
|
2003-09-18 23:53:05 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan=2>
|
|
|
|
<p align=center>
|
2003-09-29 03:06:30 +00:00
|
|
|
<?php if ($entry->id) {
|
2003-09-21 17:08:41 +00:00
|
|
|
echo "<input type=\"hidden\" name=entry value=\"$entry->id\">";
|
|
|
|
}
|
|
|
|
?>
|
2003-09-18 23:53:05 +00:00
|
|
|
<input type="hidden" name=id value="<?=$cm->id ?>">
|
2003-09-21 17:08:41 +00:00
|
|
|
<input type="hidden" name=currentview value="<?=$currentview ?>">
|
|
|
|
<input type="hidden" name=cat value="<?=$cat ?>">
|
|
|
|
|
2003-09-29 03:06:30 +00:00
|
|
|
<input type="submit" value="<?php print_string("savechanges") ?>">
|
|
|
|
<input type="reset" value="<?php print_string("revert") ?>">
|
2003-09-18 23:53:05 +00:00
|
|
|
</P>
|
|
|
|
</td>
|
2003-09-16 18:51:40 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2003-09-18 23:53:05 +00:00
|
|
|
</p>
|
|
|
|
|
2003-09-16 18:51:40 +00:00
|
|
|
|
2003-09-16 03:07:21 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<?PHP
|
|
|
|
if ($usehtmleditor) {
|
|
|
|
print_richedit_javascript("theform", "text", "no");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|