</select> <?php helpbutton("linkcategory", get_string("linkcategory", "glossary"), "glossary") ?>
</td>
</tr>
+<tr>
<td colspan="2">
- <p align="center">
+ <p style="text-align:center">
+ <div>
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="action" value="<?php p($action) ?>" />
<input type="hidden" name="confirm" value="1" />
<input type="hidden" name="hook" value="<?php p($hook) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="reset" value="<?php print_string("back","glossary") ?>" onclick="javascript:history.go(-1);" />
+ </div>
</p>
</td>
</tr>
if (! $cm = get_coursemodule_from_id('glossary', $id)) {
error("Course Module ID was incorrect");
}
-
-
if (! $course = get_record("course", "id", $cm->course)) {
error("Course is misconfigured");
add_to_log($course->id, "glossary", "edit category", "editcategories.php?id=$cm->id", $hook,$cm->id);
}
} else {
- echo "<p align=\"center\">" . get_string("edit"). " " . get_string("category","glossary") . "<font size=\"3\">";
+ echo "<p style=\"text-align:center\">" . get_string("edit"). " " . get_string("category","glossary") . "<span style=\"font-size:1.5em\">";
$name = $category->name;
$usedynalink = $category->usedynalink;
redirect("editcategories.php?id=$cm->id");
} else {
- echo "<p align=\"center\">" . get_string("delete"). " " . get_string("category","glossary") . "<font size=\"3\">";
+ echo "<p style=\"text-align:center\">" . get_string("delete"). " " . get_string("category","glossary"). "</p>";
print_simple_box_start("center","40%", "#FFBBBB");
- echo "<div class=\"boxaligncenter\"><b>".format_text($category->name)."</b><br/>";
+ echo "<div class=\"boxaligncenter\"><b>".format_text($category->name, FORMAT_PLAIN)."</b><br/>";
$num_entries = count_records("glossary_entries_categories","categoryid",$category->id);
if ( $num_entries ) {
}
echo "<p>";
print_string("areyousuredelete","glossary");
+ echo "</p>";
?>
- <form id="form" method="post" action="editcategories.php">
-
- <input type="hidden" name="id" value="<?php p($cm->id) ?>" />
- <input type="hidden" name="action" value="delete" />
- <input type="hidden" name="confirm" value="1" />
- <input type="hidden" name="mode" value="<?php echo $mode ?>" />
- <input type="hidden" name="hook" value="<?php echo $hook ?>" />
- <table border="0" width="100"><tr><td align="right" width="50%" />
- <input type="submit" value=" <?php print_string("yes")?> " />
- </form>
- </td><td align="left" width="50%">
+
+ <table border="0" width="100">
+ <tr>
+ <td align="right" style="width:50%">
+ <form id="form" method="post" action="editcategories.php">
+ <div>
+ <input type="hidden" name="id" value="<?php p($cm->id) ?>" />
+ <input type="hidden" name="action" value="delete" />
+ <input type="hidden" name="confirm" value="1" />
+ <input type="hidden" name="mode" value="<?php echo $mode ?>" />
+ <input type="hidden" name="hook" value="<?php echo $hook ?>" />
+ <input type="submit" value=" <?php print_string("yes")?> " />
+ </div>
+ </form>
+ </td>
+ <td align="left" style="width:50%">
<?php
unset($options);
$ILIKE = sql_ilike();
$dupcategory = get_records_sql("SELECT * FROM {$CFG->prefix}glossary_categories WHERE name $ILIKE '$name' AND glossaryid=$glossary->id");
if ( $dupcategory ) {
- echo "<p align=\"center\">" . get_string("add"). " " . get_string("category","glossary") . "<font size=\"3\">";
+ echo "<p style=\"text-align:center\">" . get_string("add"). " " . get_string("category","glossary");
print_simple_box_start("center","40%", "#FFBBBB");
echo "<div style=\"text-align:center\">" . get_string("duplicatedcategory","glossary") ."</div>";
- echo "</center>";
print_simple_box_end();
redirect("editcategories.php?id=$cm->id&action=add&&name=$name");
}
}
} else {
- echo "<p align=\"center\">" . get_string("add"). " " . get_string("category","glossary") . "<font size=\"3\">";
+ echo "<p style=\"text-align:center\">" . get_string("add"). " " . get_string("category","glossary"). "</p>";
$name="";
require "editcategories.html";
}
?>
-
-<div align="center">
-
<form method="post" action="editcategories.php">
-<table width="40%" class="generalbox" cellpadding="5">
+<table width="40%" class="boxaligncenter generalbox" cellpadding="5">
<tr>
- <td width="90%" align="center"><b>
+ <td style="width:90%" align="center"><b>
<?php p(get_string("categories","glossary")) ?></b></td>
- <td width="10%" align="center"><b>
+ <td style="width:10%" align="center"><b>
<?php p(get_string("action")) ?></b></td>
</tr>
- <tr><td width="100%" colspan="2">
+ <tr><td style="width:100%" colspan="2">
- <table width="100%">
+
<?php
$categories = get_records("glossary_categories","glossaryid",$glossary->id,"name ASC");
if ( $categories ) {
+ echo '<table width="100%">';
foreach ($categories as $category) {
$num_entries = count_records("glossary_entries_categories","categoryid",$category->id);
?>
<tr>
- <td width="90%" align="left">
+ <td style="width:90%" align="left">
<?php
- echo "<b>".format_text($category->name)."</b> <font size=-1>($num_entries " . get_string("entries","glossary") . ")</font>";
+ echo "<b>".format_text($category->name, FORMAT_PLAIN)."</b> <span style=\"font-size:0.75em\">($num_entries " . get_string("entries","glossary") . ")</span>";
?>
</td>
- <td width="10%" align="center"><b>
+ <td style="width:10%" align="center"><b>
<?php
echo "<a href=\"editcategories.php?id=$cm->id&action=delete&mode=cat&hook=$category->id\"><img alt=\"" . get_string("delete") . "\"src=\"../../pix/t/delete.gif\" class=\"iconsmall\" /></a> ";
echo "<a href=\"editcategories.php?id=$cm->id&action=edit&mode=cat&hook=$category->id\"><img alt=\"" . get_string("edit") . "\" src=\"../../pix/t/edit.gif\" class=\"iconsmall\" /></a>";
</tr>
<?php
+
}
+ echo '</table>';
}
?>
- </table>
- </td>
+ </td></tr>
<tr>
- <td width="100%" colspan="2" align="center">
+ <td style="width:100%" colspan="2" align="center">
<?php
$options['id'] = $cm->id;
</tr>
</table>
-</table>
-</p>
-
</form>
<tr><td align="center">
<input type="submit" value="<?php p($strexportfile)?>" />
</td></tr></table>
+ <div>
<input type="hidden" name="id" value="<?php p($id)?>" />
<input type="hidden" name="cat" value="<?php p($cat)?>" />
+ </div>
</form>
<?php
print_box_end();
$encodedconcept = urlencode($concept->concept);
$title = str_replace('"', "'", strip_tags($glossaryname.': '.$concept->concept));
}
- $href_tag_begin = '<a target="entry" class="glossary autolink glossaryid'.$concept->glossaryid.'" title="'.$title.'" '.
+ $href_tag_begin = '<a class="glossary autolink glossaryid'.$concept->glossaryid.'" title="'.$title.'" '.
'href="'.$CFG->wwwroot.'/mod/glossary/showentry.php?courseid='.$courseid.
'&concept='.$encodedconcept.'" '.
'onclick="return openpopup(\'/mod/glossary/showentry.php?courseid='.$courseid.
<form method="post" action="import.php" enctype="multipart/form-data">
<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tr>
- <td align="right" valign="top" width="30%"><b><?php print_string("filetoimport","glossary") ?>:<br />
+ <td align="right" style="width:30%;vertical-align:top"><b><?php print_string("filetoimport","glossary") ?>:<br />
<?php
echo '(';
print_string("maxsize", "", display_size(get_max_upload_file_size($CFG->maxbytes, $course->maxbytes)));
helpbutton("filetoimport", get_string("filetoimport", "glossary"), "glossary");
?>
</b></td>
- <td width="70%">
+ <td style="width:70%">
<?php
require_once($CFG->dirroot.'/lib/uploadlib.php');
upload_print_form_fragment(1,array('file'),null,false,null,0,0);
<td align="right" colspan="2">
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr>
- <td width="25%" align="right"><?php print_string("destination","glossary") ?>:</td>
- <td width="25%"><select size="1" name="dest">
+ <td align="right" style="width:25%"><?php print_string("destination","glossary") ?>:</td>
+ <td style="width:25%"><select size="1" name="dest">
<option selected="selected" value="current"><?php print_string("currentglossary","glossary") ?></option>
<option value="new"><?php print_string("newglossary","glossary") ?></option>
</select> <?php helpbutton("destination", get_string("destination", "glossary"), "glossary") ?></td>
- <td width="25%" align="right"><?php print_string("importcategories","glossary") ?>:</td>
- <td width="25%"><input type="checkbox" name="catsincl" value="1" alt="<?php print_string("importcategories","glossary") ?>" /> <?php helpbutton("importcategories", get_string("importcategories", "glossary"), "glossary") ?></td>
+ <td style="width:25%" align="right"><?php print_string("importcategories","glossary") ?>:</td>
+ <td style="width:25%"><input type="checkbox" name="catsincl" value="1" alt="<?php print_string("importcategories","glossary") ?>" /> <?php helpbutton("importcategories", get_string("importcategories", "glossary"), "glossary") ?></td>
</tr>
</table>
</td>
<td align="right" colspan="2">
<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tr>
- <td width="50%" align="right"><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
- <td width="50%"><input type="reset" value="<?php print_string("revert") ?>" /></td>
+ <td style="width:50%" align="right"><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
+ <td style="width:50%"><input type="reset" value="<?php print_string("revert") ?>" /></td>
</tr>
</table>
</td>
</tr>
</table>
+<div>
<input type="hidden" name="id" value="<?php p($id) ?>" />
<input type="hidden" name="step" value="1" />
+</div>
</form>
echo '<table border="0" width="100%">';
echo '<tr>';
- echo '<td align="center" width="20%">';
+ echo '<td align="center" style="width:20%">';
if (has_capability('mod/glossary:managecategories', $context)) {
$options['id'] = $cm->id;
$options['mode'] = 'cat';
}
echo '</td>';
- echo '<td align="center" width="60%">';
+ echo '<td align="center" style="width:60%">';
echo '<b>';
$menu[GLOSSARY_SHOW_ALL_CATEGORIES] = get_string("allcategories","glossary");
}
if ( $category ) {
- echo format_text($category->name);
+ echo format_text($category->name, FORMAT_PLAIN);
} else {
if ( $hook == GLOSSARY_SHOW_NOT_CATEGORISED ) {
}
}
echo '</b></td>';
- echo '<td align="center" width="20%">';
+ echo '<td align="center" style="width:20%">';
echo popup_form("$CFG->wwwroot/mod/glossary/view.php?id=$cm->id&mode=cat&hook=", $menu, "catmenu", $selected, "",
"", "", false);
}
$site = get_record("course","id",1);
- echo '<p align="right"><font size="-1">' . userdate(time()) . '</font></p>';
+ echo '<p style="text-align:right"><span style="font-size:0.75em">' . userdate(time()) . '</span></p>';
echo get_string("site") . ': <strong>' . format_string($site->fullname) . '</strong><br />';
echo get_string("course") . ': <strong>' . format_string($course->fullname) . ' ('. format_string($course->shortname) . ')</strong><br />';
echo get_string("modulename","glossary") . ': <strong>' . format_string($glossary->name, true) . '</strong>';
}
if ($data = data_submitted("$CFG->wwwroot/mod/glossary/view.php")) { // form submitted
-
+ print_object($data);
foreach ((array)$data as $entry => $rating) {
if ($entry == "id") {
continue;
echo "<tr>";
echo "<th class=\"header\" scope=\"col\"> </th>";
echo "<th class=\"header\" scope=\"col\"><a href=\"report.php?id=$entry->id&sort=firstname\">$strname</a></th>";
- echo "<th width=\"100%\" class=\"header\" scope=\"col\"><a href=\"report.php?id=$entry->id&sort=rating\">$strrating</a></th>";
+ echo "<th class=\"header\" scope=\"col\" style=\"width:100%\"><a href=\"report.php?id=$entry->id&sort=rating\">$strrating</a></th>";
echo "<th class=\"header\" scope=\"col\"><a href=\"report.php?id=$entry->id&sort=time\">$strtime</a></th>";
+ echo "</tr>";
foreach ($ratings as $rating) {
if (has_capability('mod/glossary:manageentries', $context)) {
echo '<tr class="teacher">';
echo '<tr>';
}
echo '<td class="picture">';
- print_user_picture($rating->id, $glossary->course, $rating->picture, false, false, true, true);
+ print_user_picture($rating->id, $glossary->course, $rating->picture, false, false, true);
echo '</td>';
- echo '<td nowrap="nowrap" class="author"><a target="_blank" href="'.$CFG->wwwroot.'/user/view.php?id='.$rating->id.'&course='.$glossary->course.'">'.fullname($rating).'</a></td>';
- echo '<td nowrap="nowrap" align="center" class="rating">'.$scalemenu[$rating->rating].'</td>';
- echo '<td nowrap="nowrap" align="center" class="time">'.userdate($rating->time).'</td>';
+ echo '<td class="author"><a href="'.$CFG->wwwroot.'/user/view.php?id='.$rating->id.'&course='.$glossary->course.'">'.fullname($rating).'</a></td>';
+ echo '<td style="white-space:nowrap" align="center" class="rating">'.$scalemenu[$rating->rating].'</td>';
+ echo '<td style="white-space:nowrap" align="center" class="time">'.userdate($rating->time).'</td>';
echo "</tr>\n";
}
echo "</table>";
}
close_window_button();
-
+ print_footer();
?>
if ($entries) {
foreach ($entries as $key => $entry) {
//$entries[$key]->footer = "<p align=\"right\">» <a onClick=\"if (window.opener) {window.opener.location.href='$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid'; return false;} else {openpopup('/mod/glossary/view.php?g=$entry->glossaryid', 'glossary', 'menubar=1,location=1,toolbar=1,scrollbars=1,directories=1,status=1,resizable=1', 0); return false;}\" href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\" target=\"_blank\">".format_string($entry->glossaryname,true)."</a></p>"; // Could not get this to work satisfactorily in all cases - Martin
- $entries[$key]->footer = "<p align=\"right\">» <a target=\"_blank\" href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">".format_string($entry->glossaryname,true)."</a></p>";
+ $entries[$key]->footer = "<p style=\"text-align:right\">» <a href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">".format_string($entry->glossaryname,true)."</a></p>";
add_to_log($entry->courseid, "glossary", "view entry", "showentry.php?eid=$entry->id", $entry->id, $entry->cmid);
}
}
if ( $showcommonelements and $mode != 'search') {
if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) {
print_box_start('printicon');
- echo " <a title =\"". get_string("printerfriendly","glossary") ."\" target=\"printview\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
+ echo " <a title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
print_box_end();
}
}
if ($showcommonelements ) {
echo '<form method="post" action="view.php">';
- echo '<table align="center" width="70%" border="0">';
+ echo '<table class="boxaligncenter" width="70%" border="0">';
echo '<tr><td align="center" class="glossarysearchbox">';
echo '<input type="submit" value="'.$strsearch.'" name="searchbutton" /> ';
} else {
$ratings->allow = true;
}
-
+ $formsent = 1;
echo "<form method=\"post\" action=\"rate.php\">";
+ echo "<div>";
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
}
if ($ratingsmenuused) {
+
echo "<div class=\"boxaligncenter\"><input type=\"submit\" value=\"".get_string("sendinratings", "glossary")."\" />";
if ($glossary->scale < 0) {
if ($scale = get_record("scale", "id", abs($glossary->scale))) {
}
}
echo "</div>";
+ echo "</div>";
echo "</form>";
+ } else if (!empty($formsent)) {
+ // close the form properly if not used
+ echo "</div>";
+ echo "</form>";
}
if ( $paging ) {