From: moodler Date: Fri, 5 Jan 2007 14:13:26 +0000 (+0000) Subject: Sundry fixes related to course categpry page for XHTRML strict MDL-7861 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fcf9577a28d54d3ef4a11329c841f400b0b90d1c;p=moodle.git Sundry fixes related to course categpry page for XHTRML strict MDL-7861 --- diff --git a/course/category.php b/course/category.php index d667bf3b95..5fcce5afad 100644 --- a/course/category.php +++ b/course/category.php @@ -123,11 +123,9 @@ make_categories_list($displaylist, $parentlist, ""); - echo '
'; - echo "

$strcategories:

"; - echo "
"; - popup_form("category.php?id=", $displaylist, "switchcategory", "$category->id", "", "", "", false); - echo "

"; + echo '
'; + popup_form('category.php?id=', $displaylist, 'switchcategory', $category->id, '', '', '', false, 'self', $strcategories.':'); + echo '
'; /// Editing functions @@ -412,7 +410,6 @@ echo '
'; } - echo '
'; 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; @@ -441,8 +438,6 @@ print_course_search(); - echo "
"; - if ($adminediting) { admin_externalpage_print_footer($adminroot); } else { diff --git a/course/lib.php b/course/lib.php index ae8133bcac..d443e7ce08 100644 --- a/course/lib.php +++ b/course/lib.php @@ -472,7 +472,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per print_paging_bar($totalcount, $page, $perpage, "$url&perpage=$perpage&"); - echo "\n"; + echo "
\n"; echo ""; if ($course->id == SITEID) { echo "\n"; @@ -578,7 +578,7 @@ function print_mnet_log($hostid, $course, $user=0, $date=0, $order="l.time ASC", print_paging_bar($totalcount, $page, $perpage, "$url&perpage=$perpage&"); - echo "
".get_string('course')."
\n"; + echo "
\n"; echo ""; if ($course->id == SITEID) { echo "\n"; @@ -1650,12 +1650,12 @@ function print_category_info($category, $depth, $files = false) { $coursecount = count_records('course') <= FRONTPAGECOURSELIMIT; if ($files and $coursecount) { - $catimage = ''; + $catimage = ''; } else { $catimage = " "; } - echo "\n\n".'
".get_string('course')."
'; + echo "\n\n".'
'; 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'); @@ -1671,7 +1671,7 @@ function print_category_info($category, $depth, $files = false) { } echo ''; - echo ''; echo ''; @@ -1680,28 +1680,28 @@ function print_category_info($category, $depth, $files = false) { if ($courses && !(isset($CFG->max_category_depth)&&($depth>=$CFG->max_category_depth-1))) { foreach ($courses as $course) { $linkcss = $course->visible ? '' : ' class="dimmed" '; - echo ''; } @@ -1717,7 +1717,7 @@ function print_category_info($category, $depth, $files = false) { echo ''; } - echo ''; echo '
'.$catimage.''; + echo ''; echo ''.$category->name.''; echo ' 
 '; - echo ''; + echo '
 '; + echo ''; echo ''.$course->fullname.''; - echo ''; + echo ''; if ($course->guest ) { echo ''; - echo ''.$strallowguests.''; + echo ''.$strallowguests.''; } else { - echo ''; + echo ''; } if ($course->password) { echo ''; - echo ''.$strrequireskey.''; + echo ''.$strrequireskey.''; } else { - echo ''; + echo ''; } if ($course->summary) { link_to_popup_window ('/course/info.php?id='.$course->id, 'courseinfo', - ''.$strsummary.'', + ''.$strsummary.'', 400, 500, $strsummary); } else { - echo ''; + echo ''; } echo '
'; + echo ''; echo ''.$category->name.''; echo ''; @@ -1865,23 +1865,22 @@ function print_course_search($value="", $return=false, $format="plain") { if ($format == 'plain') { $output = '
'; - $output .= '

'; + $output .= '

'; $output .= ''; $output .= ''; - $output .= '

'; + $output .= ''; } else if ($format == 'short') { $output = '
'; - $output .= '

'; + $output .= '

'; $output .= ''; $output .= ''; - $output .= '

'; + $output .= ''; } else if ($format == 'navbar') { - $output = '
'; - $output .= '
'; + $output = ''; + $output .= '
'; $output .= ''; $output .= ''; - $output .= '
'; - $output .= '
'; + $output .= ''; } if ($return) { diff --git a/lib/weblib.php b/lib/weblib.php index 9bf4b33b0e..e609d26b51 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -930,7 +930,8 @@ function print_textfield ($name, $value, $alt = '',$size=50,$maxlength=0, $retur * @return string If $return is true then the entire form is returned as a string. * @todo Finish documenting this function
*/ -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 @@ -963,7 +964,11 @@ function popup_form($common, $options, $formid, $selected='', $nothing='choose', $button = ''; } - $output .= '
'.$button.''."\n"; if ($nothing != '') { $output .= " \n"; @@ -1043,7 +1048,7 @@ function popup_form($common, $options, $formid, $selected='', $nothing='choose', "\n//\n".''; - $output .= '
'; + $output .= ''; $output .= '' . "\n"; if ($return) { diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index f3d136ceed..f0a226886c 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -1354,6 +1354,11 @@ body#course-view .headingblock { border-style:solid; } +.categorypicker { + text-align:center; + padding-bottom:10px; +} + .coursebox .cost { padding-top: 20px; } @@ -1364,6 +1369,18 @@ body#course-view .headingblock { margin:0; } +#course-category #renameform { + text-align:center; +} + +#course-category .singlebutton { + text-align:center; +} + +#course-category #coursesearch { + text-align:center; +} + /*** *** Doc