- Modified to use build_navigation() for breadcrumb generation.
Author: Matt Clarkson <mattc@catalyst.net.nz>
if ($frameset == "top") {
// removed <base target="_parent" />
// because it does not validate MDL-7861
- print_header_simple(format_string($workshop->name), "",
- "<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
- <a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> -> $strassess",
+ $crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $crumbs[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header_simple(format_string($workshop->name), "",$navigation,
"", '', true);
// there can be an assessment record (for teacher submissions), if there isn't...
require_login($course->id, false, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
- $navigation = "";
- if ($course->id != SITEID) {
- $navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
- }
-
$strworkshops = get_string("modulenameplural", "workshop");
$strworkshop = get_string("modulename", "workshop");
$strassessments = get_string("assessments", "workshop");
// ... print the header and...
- print_header_simple(format_string($workshop->name), "",
- "<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
- <a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> -> $strassessments",
+
+ $crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $crumbs[] = array('name' => $strassessments, 'link' => '', 'type' => 'title');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header_simple(format_string($workshop->name), "", $navigation,
"", "", true);
/*************** add comment to assessment (by author, assessor or teacher) ***************************/
$strinfo = get_string("grade")."/".$strinfo = get_string("phase", "workshop");
$strdeadline = get_string("deadline", "workshop");
$strsubmitted = get_string("submitted", "assignment");
-
- print_header_simple("$strworkshops", "", "$strworkshops", "", "", true, "", navmenu($course));
+
+ $crumbs[] = array('name' => $strworkshops, 'link' => '', 'type' => 'activity');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header_simple("$strworkshops", "", $navigation, "", "", true, "", navmenu($course));
if (! $workshops = get_all_instances_in_course("workshop", $course)) {
notice("There are no workshops", "../../course/view.php?id=$course->id");
$strsubmissions = get_string("submissions", "workshop");
// ... print the header and...
- print_header_simple(format_string($workshop->name), "",
- "<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
- <a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> -> $strsubmissions",
+ $crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $crumbs[] = array('name' => $strsubmissions, 'link' => '', 'type' => 'title');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header_simple(format_string($workshop->name), "", $navigation,
"", "", true);
//...get the action or set up an suitable default
$strworkshop = get_string('modulename', 'workshop');
$strsubmission = get_string('submission', 'workshop');
- print_header_simple(format_string($workshop->name)." : $strsubmission", "",
- "<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
- <a href=\"view.php?a=$workshop->id\">".format_string($workshop->name,true)."</a> -> $strsubmission",
+ $crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $crumbs[] = array('name' => $strsubmission, 'link' => '', 'type' => 'title');
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header_simple(format_string($workshop->name)." : $strsubmission", "", $navigation,
"", "", true);
$timenow = time();
}
// ...display header...
- print_header_simple(format_string($workshop->name), "",
- "<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
- <a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> $straction",
+ $crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ if ($straction) {
+ $crumbs[] = array('name' => $straction, 'link' => '', 'type' => 'title');
+ }
+ $navigation = build_navigation($crumbs, $course);
+
+ print_header_simple(format_string($workshop->name), "", $navigation,
"", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));
/// top frame with the navigation bar and the assessment form
if ($frameset == "top") {
-
+ $crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
+ $crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
+ $crumbs[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
+ $navigation = build_navigation($crumbs, $course);
+
// removed <base target="_parent" /> as it does not validate
- print_header_simple(format_string($workshop->name), "",
- "<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
- <a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> -> $strassess",
+ print_header_simple(format_string($workshop->name), "", $navigation,
"", '', true);
// show assessment but don't allow changes