} /// close switch
+// prints the tabs
+$currenttab = 'blogs';
+$user = $USER;
+if (!$course) {
+ $course = get_record('course','id',optional_param('courseid', SITEID, PARAM_INT));
+}
+require_once($CFG->dirroot .'/user/tabs.php');
+
$editing = false;
if ($PAGE->user_allowed_editing()) {
$editing = $PAGE->user_is_editing();
include($CFG->dirroot .'/blog/header.php');
-// prints the tabs
-$currenttab = 'blogs';
-$user = $USER;
-if (!$course) {
- $course = get_record('course','id',optional_param('courseid', SITEID, PARAM_INT));
-}
-require_once($CFG->dirroot .'/user/tabs.php');
-
$blogpage = optional_param('blogpage',0,PARAM_INT);
blog_print_html_formatted_entries($userid, $postid, $limit, ($blogpage * $limit) ,$filtertype, $filterselect, $tagid, $tag, $filtertype, $filterselect);