/// If user has never visited this page before, install 2 blocks for him
blog_check_and_install_blocks();
-if (!$site = get_site()) {
- redirect($CFG->wwwroot.'/index.php');
-}
// now check that they are logged in and allowed into the course (if specified)
if ($courseid != SITEID) {
}
require_login($course->id);
} else {
- $course = get_site();
+ $course = $SITE;
}
// Bounds for block widths within this page
$formHeading = get_string('addnewentry', 'blog');
}
- print_header("$site->shortname: $blogstring", "$site->fullname",
+ print_header("$SITE->shortname: $blogstring", "$SITE->fullname",
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
<a href="'.$CFG->wwwroot.'/blog/index.php?userid='.$user->id.'">'.$blogstring.'</a> -> '. $formHeading,'','',true);
switch ($filtertype) {
case 'site':
if ($tagid || !empty($tag)) {
- print_header("$site->shortname: $blogstring", "",
+ print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="index.php?filtertype=site">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
- print_header("$site->shortname: $blogstring", "",
+ print_header("$SITE->shortname: $blogstring", $SITE->fullname,
$blogstring,'','',true,$PAGE->get_extra_header_string());
}
break;
case 'course':
if ($tagid || !empty($tag)) {
- print_header_simple("$course->shortname: $blogstring", "",
+ print_header_simple("$course->shortname: $blogstring", $course->fullname,
'<a href="index.php?filtertype=course&filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
- print_header_simple("$course->shortname: $blogstring", "",
+ print_header_simple("$course->shortname: $blogstring", $course->fullname,
$blogstring,'','',true,$PAGE->get_extra_header_string());
}
break;
$thisgroup = get_record('groups', 'id', $filterselect);
if ($tagid || !empty($tag)) {
- print_header_simple("$course->shortname: $blogstring", "$course->fullname",
+ print_header_simple("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&group='.$filterselect.'">'.$thisgroup->name.'</a> ->
<a href="index.php?filtertype=group&filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
- print_header_simple("$course->shortname: $blogstring", "$course->fullname",
+ print_header_simple("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&group='.$filterselect.'">'.$thisgroup->name."</a> ->
$blogstring",'','',true,$PAGE->get_extra_header_string());
if (isset($course->id) && $course->id && $course->id != SITEID) {
if ($tagid || !empty($tag)) {
- print_header("$course->shortname: $blogstring", "$course->fullname",
+ print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> ->
<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'">'.$participants.'</a> ->
<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'&course='.$course->id.'">'.fullname($user).'</a> ->
<a href="index.php?courseid='.optional_param('courseid', 0, PARAM_INT).'&filtertype=user&filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
- print_header("$course->shortname: $blogstring", "$course->fullname",
+ print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> ->
<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'">'.$participants.'</a> ->
<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'&course='.$course->id.'">'.fullname($user).'</a> ->
else {
if ($tagid || !empty($tag)) {
- print_header("$site->shortname: $blogstring", "$site->fullname",
+ print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
<a href="index.php?filtertype=user&filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else {
- print_header("$site->shortname: $blogstring", "$site->fullname",
+ print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
'.$blogstring,'','',true,$PAGE->get_extra_header_string());
break;
default: //user click on add from block
- print_header("$site->shortname: $blogstring", "$site->fullname",
+ print_header("$SITE->shortname: $blogstring", $SITE->fullname,
'<a href="'.$CFG->wwwroot.'/user/view.php?id='.$filterselect.'">'.fullname($user).'</a> ->
<a href="'.$CFG->wwwroot.'/blog/index.php?userid='.$user->id.'">'.$blogstring.'</a> -> '.get_string('addentry','blog'),'','',true,$PAGE->get_extra_header_string());
break;