make_categories_list($displaylist, $parentlist, "");
- echo '<table align="center"><tr><td align="right">';
- echo "<p>$strcategories:</p>";
- echo "</td><td>";
- popup_form("category.php?id=", $displaylist, "switchcategory", "$category->id", "", "", "", false);
- echo "</td></tr></table><br />";
+ echo '<div class="categorypicker">';
+ popup_form('category.php?id=', $displaylist, 'switchcategory', $category->id, '', '', '', false, 'self', $strcategories.':');
+ echo '</div>';
/// Editing functions
echo '<br />';
}
- echo '<center>';
if (has_capability('moodle/category:update', get_context_instance(CONTEXT_SYSTEM, SITEID)) and $numcourses > 1) { /// Print button to re-sort courses by name
unset($options);
$options['id'] = $category->id;
print_course_search();
- echo "</center>";
-
if ($adminediting) {
admin_externalpage_print_footer($adminroot);
} else {
print_paging_bar($totalcount, $page, $perpage, "$url&perpage=$perpage&");
- echo "<table class=\"logtable\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\">\n";
+ echo "<table class=\"logtable\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\">\n";
echo "<tr>";
if ($course->id == SITEID) {
echo "<th class=\"c0 header\" scope=\"col\">".get_string('course')."</th>\n";
print_paging_bar($totalcount, $page, $perpage, "$url&perpage=$perpage&");
- echo "<table class=\"logtable\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\">\n";
+ echo "<table class=\"logtable\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\">\n";
echo "<tr>";
if ($course->id == SITEID) {
echo "<th class=\"c0 header\">".get_string('course')."</th>\n";
$coursecount = count_records('course') <= FRONTPAGECOURSELIMIT;
if ($files and $coursecount) {
- $catimage = '<img src="'.$CFG->pixpath.'/i/course.gif" width="16" height="16" border="0" alt="" />';
+ $catimage = '<img src="'.$CFG->pixpath.'/i/course.gif" alt="" />';
} else {
$catimage = " ";
}
- echo "\n\n".'<table border="0" cellpadding="3" cellspacing="0" width="100%">';
+ echo "\n\n".'<table class="categorylist">';
if ($files and $coursecount) {
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.guest,c.cost,c.currency');
}
echo '<td valign="top">'.$catimage.'</td>';
- echo '<td valign="top" width="100%" class="category name">';
+ echo '<td valign="top" class="category name">';
echo '<a '.$catlinkcss.' href="'.$CFG->wwwroot.'/course/category.php?id='.$category->id.'">'.$category->name.'</a>';
echo '</td>';
echo '<td class="category info"> </td>';
if ($courses && !(isset($CFG->max_category_depth)&&($depth>=$CFG->max_category_depth-1))) {
foreach ($courses as $course) {
$linkcss = $course->visible ? '' : ' class="dimmed" ';
- echo '<tr><td valign="top" width="30"> ';
- echo '</td><td valign="top" width="100%" class="course name">';
+ echo '<tr><td valign="top"> ';
+ echo '</td><td valign="top" class="course name">';
echo '<a '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->fullname.'</a>';
- echo '</td><td align="right" valign="top" nowrap="nowrap" class="course info">';
+ echo '</td><td align="right" valign="top" class="course info">';
if ($course->guest ) {
echo '<a title="'.$strallowguests.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
- echo '<img hspace="1" alt="'.$strallowguests.'" height="16" width="16" border="0" src="'.$CFG->pixpath.'/i/guest.gif" /></a>';
+ echo '<img alt="'.$strallowguests.'" src="'.$CFG->pixpath.'/i/guest.gif" /></a>';
} else {
- echo '<img alt="" height="16" width="18" border="0" src="'.$CFG->pixpath.'/spacer.gif" />';
+ echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
}
if ($course->password) {
echo '<a title="'.$strrequireskey.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
- echo '<img hspace="1" alt="'.$strrequireskey.'" height="16" width="16" border="0" src="'.$CFG->pixpath.'/i/key.gif" /></a>';
+ echo '<img alt="'.$strrequireskey.'" src="'.$CFG->pixpath.'/i/key.gif" /></a>';
} else {
- echo '<img alt="" height="16" width="18" border="0" src="'.$CFG->pixpath.'/spacer.gif" />';
+ echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
}
if ($course->summary) {
link_to_popup_window ('/course/info.php?id='.$course->id, 'courseinfo',
- '<img hspace="1" alt="'.$strsummary.'" height="16" width="16" border="0" src="'.$CFG->pixpath.'/i/info.gif" />',
+ '<img alt="'.$strsummary.'" src="'.$CFG->pixpath.'/i/info.gif" />',
400, 500, $strsummary);
} else {
- echo '<img alt="" height="16" width="18" border="0" src="'.$CFG->pixpath.'/spacer.gif" />';
+ echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
}
echo '</td></tr>';
}
echo '</td>';
}
- echo '<td valign="top" width="100%" class="category name">';
+ echo '<td valign="top" class="category name">';
echo '<a '.$catlinkcss.' href="'.$CFG->wwwroot.'/course/category.php?id='.$category->id.'">'.$category->name.'</a>';
echo '</td>';
echo '<td valign="top" class="category number">';
if ($format == 'plain') {
$output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
- $output .= '<center><p align="center" class="coursesearchbox">';
+ $output .= '<fieldset class="coursesearchbox invisiblefieldset">';
$output .= '<input type="text" size="30" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
- $output .= '</p></center></form>';
+ $output .= '</fieldset></form>';
} else if ($format == 'short') {
$output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
- $output .= '<center><p align="center" class="coursesearchbox">';
+ $output .= '<fieldset class="coursesearchbox invisiblefieldset">';
$output .= '<input type="text" size="12" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
- $output .= '</p></center></form>';
+ $output .= '</fieldset></form>';
} else if ($format == 'navbar') {
- $output = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
- $output .= '<table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap="nowrap">';
+ $output = '<form id="coursesearchnavbar" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
+ $output .= '<fieldset class="coursesearchbox invisiblefieldset">';
$output .= '<input type="text" size="20" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
$output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
- $output .= '</td></tr></table>';
- $output .= '</form>';
+ $output .= '</fieldset></form>';
}
if ($return) {
* @return string If $return is true then the entire form is returned as a string.
* @todo Finish documenting this function<br>
*/
-function popup_form($common, $options, $formid, $selected='', $nothing='choose', $help='', $helptext='', $return=false, $targetwindow='self') {
+function popup_form($common, $options, $formid, $selected='', $nothing='choose', $help='', $helptext='', $return=false,
+$targetwindow='self', $selectlabel='') {
global $CFG;
static $go, $choose; /// Locally cached, in case there's lots on a page
$button = '';
}
- $output .= '<div>'.$button.'<select name="jump" onchange="'.$targetwindow.'.location=document.getElementById(\''.$formid.'\').jump.options[document.getElementById(\''.$formid.'\').jump.selectedIndex].value;">'."\n";
+ if ($selectlabel) {
+ $selectlabel = '<label for="'.$formid.'_jump">'.$selectlabel.'</label>';
+ }
+
+ $output .= '<fieldset class="invisiblefieldset">'.$selectlabel.$button.'<select id="'.$formid.'_jump" name="jump" onchange="'.$targetwindow.'.location=document.getElementById(\''.$formid.'\').jump.options[document.getElementById(\''.$formid.'\').jump.selectedIndex].value;">'."\n";
if ($nothing != '') {
$output .= " <option value=\"javascript:void(0)\">$nothing</option>\n";
"\n//<![CDATA[\n".
'document.getElementById("noscript'.$formid.'").style.display = "none";'.
"\n//]]>\n".'</script>';
- $output .= '</div>';
+ $output .= '</fieldset>';
$output .= '</form>' . "\n";
if ($return) {