Breadcrumbs: mod/hotpot changes
- Modified to use build_navigation() for breadcrumb generation. Author: Matt Clarkson <[email protected]>
This commit is contained in:
@@ -36,10 +36,10 @@
|
||||
|
||||
$title = format_string($course->shortname) . ": $strmodulenameplural";
|
||||
$heading = $course->fullname;
|
||||
$navigation = $strmodulenameplural;
|
||||
if ($course->id != SITEID) {
|
||||
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
|
||||
}
|
||||
|
||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($crumbs, $course);
|
||||
|
||||
print_header($title, $heading, $navigation, "", "", true, "", navmenu($course));
|
||||
|
||||
$next_url = "$CFG->wwwroot/course/view.php?id=$course->id";
|
||||
|
||||
+11
-9
@@ -401,9 +401,10 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||
|
||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||
$heading = $course->fullname;
|
||||
|
||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
||||
$crumbs[] = array('name' => $hotpot->name, 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
|
||||
$navigation = "<a href=index.php?id=$course->id>$strmodulenameplural</a> -> ";
|
||||
$navigation .= "<a href=\"view.php?id=$cm->id\">$hotpot->name</a> -> ";
|
||||
|
||||
$modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
if (has_capability('mod/hotpot:viewreport',$modulecontext)) {
|
||||
@@ -412,16 +413,17 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||
} else {
|
||||
$module = "hotpot";
|
||||
}
|
||||
$navigation .= get_string("report$mode", $module);
|
||||
|
||||
$crumbs[] = array('name' => get_string("report$mode", $module), 'link' => '', 'type' => 'title');
|
||||
|
||||
|
||||
} else {
|
||||
$navigation .= get_string("report", "quiz");
|
||||
}
|
||||
if ($course->id != SITEID) {
|
||||
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
|
||||
}
|
||||
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
||||
|
||||
$crumbs[] = array('name' => get_string("report", "quiz"), 'link' => '', 'type' => 'title');
|
||||
}
|
||||
|
||||
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
||||
$navigation = build_navigation($crumbs, $course);
|
||||
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
|
||||
|
||||
print_heading($hotpot->name);
|
||||
|
||||
@@ -52,10 +52,12 @@
|
||||
// print header
|
||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||
$heading = $course->fullname;
|
||||
$navigation = "<a href=\"index.php?id=$course->id\">$strmodulenameplural</a> -> ".get_string("review", "quiz");
|
||||
if ($course->id != SITEID) {
|
||||
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
|
||||
}
|
||||
|
||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
||||
$crumbs[] = array('name' => get_string("review", "quiz"), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($crumbs, $course);
|
||||
|
||||
|
||||
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
||||
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
|
||||
print '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
|
||||
|
||||
+5
-4
@@ -42,10 +42,11 @@
|
||||
// header strings
|
||||
$title = format_string($course->shortname.': '.$hotpot->name, true);
|
||||
$heading = $course->fullname;
|
||||
$navigation = '<a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id.'">'.get_string("modulenameplural", "hotpot")."</a> -> $hotpot->name";
|
||||
if ($course->id != SITEID) {
|
||||
$navigation = '<a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$navigation;
|
||||
}
|
||||
$crumbs[] = array('name' => get_string("modulenameplural", "hotpot"), 'link' => $CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id, 'type' => 'activity');
|
||||
$crumbs[] = array('name' => $hotpot->name, 'link' => '', 'type' => 'activityinstance');
|
||||
|
||||
$navigation = build_navigation($crumbs, $course);
|
||||
|
||||
$button = update_module_button($cm->id, $course->id, get_string("modulename", "hotpot"));
|
||||
$button = '<div style="font-size:0.75em;">'.$button.'</div>';
|
||||
$loggedinas = '<span class="logininfo">'.user_login_string($course, $USER).'</span>';
|
||||
|
||||
Reference in New Issue
Block a user