From: urs_hunkler Date: Tue, 18 Jan 2005 11:08:58 +0000 (+0000) Subject: _ added the div framework X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=daa27ce409174f37a1e45930fa08c29a1853729f;p=moodle.git _ added the div framework --- diff --git a/course/category.php b/course/category.php index b0356a2487..3056860654 100644 --- a/course/category.php +++ b/course/category.php @@ -1,6 +1,6 @@ shortname: $category->name", "$site->fullname: $strcourses", + print_header("$site->shortname: $category->name", "$site->fullname: $strcourses", "admin/index.php\">$stradministration -> ". "$strcategories -> $category->name", "", "", true, $navbaritem); } else { - print_header("$site->shortname: $category->name", "$site->fullname: $strcourses", + print_header("$site->shortname: $category->name", "$site->fullname: $strcourses", "$strcategories -> $category->name", "", "", true, $navbaritem); } } else { - print_header("$site->shortname: $category->name", "$site->fullname: $strcourses", + print_header("$site->shortname: $category->name", "$site->fullname: $strcourses", "$strcategories -> $category->name", "", "", true, $navbaritem); } + echo '
'; // course wrapper start /// Print the category selector $displaylist = array(); $parentlist = array(); - + make_categories_list($displaylist, $parentlist, ""); - + echo '"; echo ""; @@ -400,7 +401,7 @@ echo ''; echo ""; } - + echo "
'; echo "

$strcategories:

"; echo "
"; @@ -117,7 +118,7 @@ if ($adminediting) { - /// Move a specified course to a new category + /// Move a specified course to a new category if (isset($moveto) and $data = data_submitted() and confirm_sesskey()) { // Some courses are being moved @@ -131,7 +132,7 @@ if ($data) { foreach ($data as $code => $junk) { - + $courseid = substr($code, 1); if (! $course = get_record("course", "id", $courseid)) { @@ -140,7 +141,7 @@ // figure out a sortorder that we can use in the destination category $sortorder = get_field_sql('SELECT MIN(sortorder)-1 AS min FROM ' . $CFG->prefix . 'course WHERE category=' . $destcategory->id); - if ($sortorder < 1) { + if ($sortorder < 1) { // rather than let the db default to 0 // set it to > 100 and avoid extra work in fix_coursesortorder() $sortorder = 200; @@ -148,7 +149,7 @@ $course->category = $destcategory->id; $course->sortorder = $sortorder; - + if (!update_record('course', $course)) { notify("An error occurred - course not moved!"); } @@ -160,8 +161,8 @@ } - /// Hide or show a course - + /// Hide or show a course + if ((isset($hide) or isset($show)) and confirm_sesskey()) { if (isset($hide)) { $course = get_record("course", "id", $hide); @@ -188,24 +189,24 @@ // ensure the course order has no gaps // and isn't at 0 fix_course_sortorder($category->id); - + // we are going to need to know the range $max = get_record_sql('SELECT MAX(sortorder) AS max, 1 FROM ' . $CFG->prefix . 'course WHERE category=' . $category->id); $max = $max->max + 100; - + if (isset($moveup)) { $movecourse = get_record('course', 'id', $moveup); - $swapcourse = get_record('course', - 'category', $category->id, + $swapcourse = get_record('course', + 'category', $category->id, 'sortorder', $movecourse->sortorder - 1); } else { $movecourse = get_record('course', 'id', $movedown); - $swapcourse = get_record('course', - 'category', $category->id, + $swapcourse = get_record('course', + 'category', $category->id, 'sortorder', $movecourse->sortorder + 1); } - + if ($swapcourse and $movecourse) { // Renumber everything for robustness begin_sql(); if (!( set_field("course", "sortorder", $max, "id", $swapcourse->id) @@ -243,13 +244,13 @@ echo "
"; } } - + /// Print out all the courses unset($course); // To avoid unwanted language effects later - $courses = get_courses_page($category->id, 'c.sortorder ASC', - 'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible,c.teacher,c.guest,c.password', + $courses = get_courses_page($category->id, 'c.sortorder ASC', + 'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible,c.teacher,c.guest,c.password', $totalcount, $page*$perpage, $perpage); $numcourses = count($courses); @@ -261,7 +262,7 @@ } else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$creatorediting) { print_courses($category, "80%"); - } else { + } else { print_paging_bar($totalcount, $page, $perpage, "category.php?id=$category->id&perpage=$perpage&"); $strcourses = get_string("courses"); @@ -333,14 +334,14 @@ '&show='.$acourse->id.'&sesskey='.$USER->sesskey.'">'. ' '; } - + echo ''. ' '; echo ''. ' '; - + if ($up) { echo ''. @@ -348,7 +349,7 @@ } else { echo ' '; } - + if ($down) { echo ''. @@ -356,7 +357,7 @@ } else { echo ' '; } - + echo "
"; echo ''; @@ -383,8 +384,8 @@ $pixpath.'/i/key.gif" />'; } if (!empty($acourse->summary)) { - link_to_popup_window ("/course/info.php?id=$acourse->id", "courseinfo", - 'info', + link_to_popup_window ("/course/info.php?id=$acourse->id", "courseinfo", + 'info', 400, 500, $strsummary); } echo "
"; echo ""; echo "
"; @@ -434,7 +435,9 @@ echo "
"; } echo ""; - + + echo '
'; // course wrapper end + print_footer(); ?> diff --git a/course/view.php b/course/view.php index 6c2986a108..64adeb0e04 100644 --- a/course/view.php +++ b/course/view.php @@ -39,7 +39,7 @@ $PAGE = page_create_object(MOODLE_PAGE_COURSE, $course->id); $pageblocks = blocks_get_by_page($PAGE); - + if (!isset($USER->editing)) { $USER->editing = false; } @@ -68,7 +68,7 @@ if (!empty($blockaction) && confirm_sesskey()) { if (!empty($blockid)) { blocks_execute_action($PAGE, $pageblocks, strtolower($blockaction), intval($blockid)); - + } else if (!empty($instanceid)) { $instance = blocks_find_instance($instanceid, $pageblocks); @@ -100,6 +100,8 @@ $PAGE->print_header(get_string('course').': %fullname%'); + echo '
'; // course wrapper start + get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused); if (! $sections = get_all_sections($course->id)) { // No sections found @@ -124,6 +126,7 @@ require("$CFG->dirroot/course/format/$course->format/format.php"); // Include the actual course format + echo '
'; // content wrapper end print_footer(NULL, $course); ?>