mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-9473: Initialise navlinks array before use
Author: Matt Clarkson <mattc@catalyst.net.nz>
This commit is contained in:
parent
3b27b0fe21
commit
01e3838853
@ -672,6 +672,7 @@
|
||||
$focuscursor = "form.name";
|
||||
}
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strmodulenameplural, 'link' => "$CFG->wwwroot/mod/$module->name/index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $streditinga, 'link' => '', 'type' => 'action');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -299,6 +299,7 @@
|
||||
$streditinga = get_string("editinga", "moodle", $fullmodulename);
|
||||
$strmodulenameplural = get_string("modulenameplural", $module->name);
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strmodulenameplural, 'link' => "$CFG->wwwroot/mod/$module->name/index.php?id=$course->id", 'type' => 'activity');
|
||||
if (isset($navlinksinstancename)) {
|
||||
$navlinks[] = $navlinksinstancename;
|
||||
|
@ -81,7 +81,7 @@
|
||||
/// Print the header
|
||||
|
||||
$strgrades = get_string('grades');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strgrades, 'link' => $CFG->wwwroot . '/grade/index.php?id='.$courseid, 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $reportnames[$report], 'link' => '', 'type' => 'misc');
|
||||
|
||||
|
@ -59,6 +59,7 @@ $strgrades = get_string('grades');
|
||||
$strgraderreport = get_string('graderreport', 'grades');
|
||||
$strgradepreferences = get_string('gradepreferences', 'grades');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strgrades, 'link' => $CFG->wwwroot . '/grade/index.php?id='.$courseid, 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $strgraderreport,
|
||||
'link' => $CFG->wwwroot . '/grade/report.php?id=' . $courseid . '&report=grader', 'type' => 'misc');
|
||||
|
@ -7027,7 +7027,8 @@ function build_navigation($extranavlinks) {
|
||||
global $CFG, $COURSE;
|
||||
|
||||
$navigation = '';
|
||||
|
||||
$navlinks = array();
|
||||
|
||||
//Site name
|
||||
if ($site = get_site()) {
|
||||
$navlinks[] = array('name' => format_string($site->shortname), 'link' => "$CFG->wwwroot/", 'type' => 'home');
|
||||
|
@ -622,7 +622,7 @@ class page_generic_activity extends page_base {
|
||||
$title = str_replace($search, $replace, $title);
|
||||
}
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => get_string('modulenameplural', $this->activityname), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/index.php?id={$this->courserecord->id}", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($this->activityrecord->name), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/view.php?id={$this->modulerecord->id}", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
$strsubmitted = get_string("submitted", "assignment");
|
||||
$strgrade = get_string("grade");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strassignments, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -958,7 +958,8 @@ class assignment_base {
|
||||
$tabindex = 1; //tabindex for quick grading tabbing; Not working for dropdowns yet
|
||||
|
||||
add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id);
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $this->strassignments, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($this->assignment->name,true), 'link' => "view.php?a={$this->assignment->id}", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $this->strsubmissions, 'link' => '', 'type' => 'title');
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
/// Print the header
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strchats, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -34,7 +34,8 @@
|
||||
$strseesession = get_string('seesession', 'chat');
|
||||
$strdeletesession = get_string('deletesession', 'chat');
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
|
||||
/// Print a session if one has been specified
|
||||
|
||||
if ($start and $end and !$confirmdelete) { // Show a full transcript
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
$strchoice = get_string("modulename", "choice");
|
||||
$strchoices = get_string("modulenameplural", "choice");
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strchoices, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
if (!$download) {
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($choice->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strresponses, 'link' => '', 'type' => 'title');
|
||||
|
@ -58,6 +58,7 @@ if ($action == 'delchoice') {
|
||||
|
||||
|
||||
/// Display the choice and possibly results
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($choice->name), 'link' => '', 'type' => 'activityinstance');
|
||||
|
||||
|
@ -69,6 +69,7 @@
|
||||
$strdatabases = get_string("modulenameplural", "data");
|
||||
$navigation = "<a href=\"index.php?id=$course->id\">$strdatabases</a> ->";
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
@ -113,6 +114,7 @@
|
||||
/// Print the page header
|
||||
$strdata = get_string('modulenameplural','data');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -57,6 +57,7 @@ require_course_login($course, true, $cm);
|
||||
|
||||
/// If it's hidden then it's don't show anything. :)
|
||||
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities',get_context_instance(CONTEXT_MODULE, $cm->id))) {
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -76,6 +76,7 @@
|
||||
/// Print the page header
|
||||
$strdata = get_string('modulenameplural','data');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -42,6 +42,7 @@
|
||||
$strname = get_string('name');
|
||||
$strdata = get_string('modulename','data');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -1687,6 +1687,8 @@ function data_print_header($course, $cm, $data, $currenttab='') {
|
||||
global $CFG, $displaynoticegood, $displaynoticebad;
|
||||
|
||||
$strdata = get_string('modulenameplural','data');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $data->name, 'link' => '', 'type' => 'activityinstance');
|
||||
|
||||
|
@ -96,6 +96,7 @@
|
||||
$meta .= '//]]>'."\n";
|
||||
$meta .= '</script>'."\n";
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -94,6 +94,7 @@
|
||||
if (empty($cm->visible) and !has_capability('mod/data:managetemplates', $context)) {
|
||||
$strdatabases = get_string("modulenameplural", "data");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -62,6 +62,7 @@
|
||||
$strassessments = get_string("assessments", "exercise");
|
||||
|
||||
// ... print the header and...
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strassessments, 'link' => '', 'type' => 'title');
|
||||
|
@ -24,6 +24,7 @@
|
||||
$strdeadline = get_string("deadline", "exercise");
|
||||
$strsubmitted = get_string("submitted", "assignment");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strexercises, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
$strsubmissions = get_string("submissions", "exercise");
|
||||
|
||||
// ... print the header and...
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strsubmissions, 'link' => '', 'type' => 'title');
|
||||
|
@ -28,6 +28,7 @@
|
||||
$strexercise = get_string("modulename", "exercise");
|
||||
$strupload = get_string("upload");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strupload, 'link' => '', 'type' => 'title');
|
||||
|
@ -47,6 +47,7 @@
|
||||
$strexercise = get_string("modulename", "exercise");
|
||||
|
||||
// ...display header...
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($exercise->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -97,6 +97,7 @@
|
||||
|
||||
unset($SESSION->fromdiscussion);
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => get_string("forums", "forum"), 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($forum->name,true), 'link' => "../forum/view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => format_string($discussion->name,true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'title');
|
||||
|
@ -451,6 +451,7 @@
|
||||
|
||||
|
||||
/// Output the page
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => '', 'type' => 'activity');
|
||||
|
||||
print_header("$course->shortname: $strforums", $course->fullname,
|
||||
|
@ -33,6 +33,7 @@
|
||||
}
|
||||
|
||||
$strforums = get_string('modulenameplural', 'forum');
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -58,6 +58,7 @@
|
||||
require_login();
|
||||
}
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => get_string("forums", "forum"), 'link' => "../forum/view.php?f=$forum->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($forum->name,true), 'link' => '../forum/index.php?id=$course->id', 'type' => 'activityinstance');
|
||||
|
||||
@ -410,6 +411,7 @@
|
||||
$course = get_record('course', 'id', $forum->course);
|
||||
$strforums = get_string("modulenameplural", "forum");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $forum->name, 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => format_string($post->subject, true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'title');
|
||||
@ -634,7 +636,7 @@
|
||||
|
||||
$strforums = get_string("modulenameplural", "forum");
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $forum->name, 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -97,6 +97,7 @@
|
||||
$strsearchresults = get_string("searchresults", "forum");
|
||||
$strpage = get_string("page");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
|
||||
if (!$search || $showform) {
|
||||
@ -119,6 +120,7 @@
|
||||
|
||||
$searchform = forum_search_form($course, $search);
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strsearch, 'link' => "search.php?id=$course->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => s($search, true), 'link' => '', 'type' => 'link');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -31,6 +31,7 @@
|
||||
}
|
||||
|
||||
$strforums = get_string('modulenameplural', 'forum');
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
}
|
||||
|
||||
$strforums = get_string('modulenameplural', 'forum');
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
$strsubscribers = get_string("subscribers", "forum");
|
||||
$strforums = get_string("forums", "forum");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strsubscribers, 'link' => '', 'type' => 'title');
|
||||
|
@ -39,7 +39,7 @@
|
||||
$strmode = get_string($mode, 'forum');
|
||||
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $syscontext));
|
||||
|
||||
// TODO: add new cookie tail here!
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'core');
|
||||
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", 'type' => 'title');
|
||||
$navlinks[] = array('name' => $strforumposts, 'link' => '', 'type' => 'title');
|
||||
|
@ -64,6 +64,7 @@
|
||||
|
||||
|
||||
/// Print header.
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -223,6 +223,7 @@ function glossary_comment_print_header($course, $cm, $glossary, $entry, $action)
|
||||
$strglossary = get_string('modulename', 'glossary');
|
||||
$strcomments = get_string('comments', 'glossary');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strcomments, 'link' => "comments.php?id=$cm->id&eid=$entry->id", 'type' => 'title');
|
||||
|
@ -42,6 +42,7 @@
|
||||
$strcomments = get_string("comments", "glossary");
|
||||
$straddcomment = get_string("addcomment", "glossary");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strcomments, 'link' => '', 'type' => 'title');
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
$strareyousuredelete = get_string("areyousuredelete","glossary");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -192,6 +192,7 @@ $strglossary = get_string("modulename", "glossary");
|
||||
$strglossaries = get_string("modulenameplural", "glossary");
|
||||
$stredit = empty($e) ? get_string('addentry', 'glossary') : get_string("edit");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $stredit, 'link' => '', 'type' => 'title');
|
||||
|
@ -47,6 +47,7 @@
|
||||
$strglossaries = get_string("modulenameplural", "glossary");
|
||||
$strglossary = get_string("modulename", "glossary");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => get_string("categories","glossary"), 'link' => '', 'type' => 'title');
|
||||
|
@ -37,6 +37,7 @@
|
||||
$strexportfile = get_string("exportfile", "glossary");
|
||||
$strexportentries = get_string('exportentries', 'glossary');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
$entryalreadyexist = get_string('entryalreadyexist','glossary');
|
||||
$entryexported = get_string('entryexported','glossary');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
$strmodulename = get_string("modulename", "glossary");
|
||||
$strdisplayformats = get_string("displayformats","glossary");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $stradmin, 'link' => "../../$CFG->admin/index.php", 'type' => 'core');
|
||||
$navlinks[] = array('name' => $strconfiguration, 'link' => "../../$CFG->admin/configure.php", 'type' => 'core');
|
||||
$navlinks[] = array('name' => $strmanagemodules, 'link' => "../../$CFG->admin/modules.php", 'type' => 'core');
|
||||
|
@ -45,6 +45,7 @@
|
||||
$strsearch = get_string("search");
|
||||
$strimportentries = get_string('importentriesfromxml', 'glossary');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strimportentries, 'link' => '', 'type' => 'title');
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
|
||||
/// Print the header
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossarys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -49,6 +49,7 @@
|
||||
|
||||
$CFG->framename = "newwindow";
|
||||
if ($course->id != SITEID) {
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => '', 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $strsearch, 'link' => '', 'type' => 'title');
|
||||
|
||||
|
@ -224,6 +224,7 @@
|
||||
$strsearch = get_string("search");
|
||||
$strwaitingapproval = get_string('waitingapproval', 'glossary');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
$title = format_string($course->shortname) . ": $strmodulenameplural";
|
||||
$heading = $course->fullname;
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strmodulenameplural, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -402,6 +402,7 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||
$heading = $course->fullname;
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $hotpot->name, 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||
$heading = $course->fullname;
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
||||
$navlinks[] = array('name' => get_string("review", "quiz"), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -42,6 +42,8 @@
|
||||
// header strings
|
||||
$title = format_string($course->shortname.': '.$hotpot->name, true);
|
||||
$heading = $course->fullname;
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => get_string("modulenameplural", "hotpot"), 'link' => $CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id, 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $hotpot->name, 'link' => '', 'type' => 'activityinstance');
|
||||
|
||||
|
@ -75,6 +75,7 @@
|
||||
$entry->format = $defaultformat;
|
||||
}
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $stredit, 'link' => '', 'type' => 'action');
|
||||
|
@ -17,6 +17,7 @@
|
||||
$strweek = get_string("week");
|
||||
$strtopic = get_string("topic");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strjournals, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
$strentries = get_string("entries", "journal");
|
||||
$strjournals = get_string("modulenameplural", "journal");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strentries, 'link' => '', 'type' => 'title');
|
||||
|
@ -28,6 +28,7 @@
|
||||
$strjournal = get_string("modulename", "journal");
|
||||
$strjournals = get_string("modulenameplural", "journal");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($journal->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -35,6 +35,7 @@
|
||||
$strimportquestions = get_string("importquestions", "lesson");
|
||||
$strlessons = get_string("modulenameplural", "lesson");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strlesson, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($lesson->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strimportquestions, 'link' => '', 'type' => 'title');
|
||||
|
@ -44,6 +44,7 @@
|
||||
$strimportppt = get_string("importppt", "lesson");
|
||||
$strlessons = get_string("modulenameplural", "lesson");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strlessons, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($mod->name,true), 'link' => "$CFG->wwwroot/mod/$modname/view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strimportppt, 'link' => '', 'type' => 'title');
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
/// Print the header
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strlessons, 'link' => '', 'type' => 'activity');
|
||||
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -239,7 +239,7 @@ function lesson_print_header($cm, $course, $lesson, $currenttab = '') {
|
||||
}
|
||||
|
||||
/// Header setup
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strlessons, 'link' => "$CFG->wwwroot/mod/lesson/index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => $strname, 'link' => '', 'type' => 'activityinstance');
|
||||
|
||||
|
@ -75,7 +75,8 @@ class page_lesson extends page_generic_activity {
|
||||
if (empty($title)) {
|
||||
$title = "{$this->courserecord->shortname}: $activityname";
|
||||
}
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => get_string('modulenameplural', $this->activityname), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/index.php?id={$this->courserecord->id}", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($this->activityrecord->name), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/view.php?id={$this->modulerecord->id}", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -396,6 +396,7 @@
|
||||
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||
: "";
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strattemptnum, 'link' => '', 'type' => 'title');
|
||||
|
@ -310,6 +310,7 @@
|
||||
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||
: "";
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?q=$quiz->instance", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $streditingquiz, 'link' => '', 'type' => 'title');
|
||||
@ -349,7 +350,7 @@
|
||||
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||
: "";
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?q=$quiz->instance", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $streditingquiz, 'link' => '', 'type' => 'title');
|
||||
|
@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</form>";
|
||||
}
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strquizzes, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -27,6 +27,7 @@ class quiz_default_report {
|
||||
$strquizzes = get_string("modulenameplural", "quiz");
|
||||
$strquiz = get_string("modulename", "quiz");
|
||||
/// Print the page header
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($quiz->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -124,7 +124,8 @@
|
||||
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||
: "";
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strreview, 'link' => '', 'type' => 'title');
|
||||
|
@ -27,7 +27,7 @@
|
||||
$strsummary = get_string("summary");
|
||||
$strlastmodified = get_string("lastmodified");
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strresources, 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
$strreport = get_string("report",'scorm');
|
||||
$strlastmodified = get_string("lastmodified");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strscorms, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -46,6 +46,8 @@
|
||||
$strpopup = get_string('popup','scorm');
|
||||
$strexit = get_string('exitactivity','scorm');
|
||||
|
||||
$navlinks = array();
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
if ($scorms = get_all_instances_in_course('scorm', $course)) {
|
||||
// The module SCORM/AICC activity with the first id is the course
|
||||
|
@ -64,6 +64,7 @@
|
||||
$strattempt = get_string('attempt', 'scorm');
|
||||
$strname = get_string('name');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
|
||||
|
@ -63,6 +63,7 @@
|
||||
//
|
||||
// Print the page header
|
||||
//
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
$strdone = get_string("done", "survey");
|
||||
$strnotdone = get_string("notdone", "survey");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strsurveys, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -65,6 +65,7 @@
|
||||
<a href=\"view.php?id=$cm->id\">".format_string($survey->name,true)."</a> -> ";
|
||||
}
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($survey->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strreport, 'link' => '', 'type' => 'title');
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
$strsurveys = get_string("modulenameplural", "survey");
|
||||
$strsurveysaved = get_string("surveysaved", "survey");
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strsurveysaved, 'link' => '', 'type' => 'title');
|
||||
|
@ -37,6 +37,7 @@
|
||||
$strsurveys = get_string("modulenameplural", "survey");
|
||||
$strsurvey = get_string("modulename", "survey");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');;
|
||||
$navlinks[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinistance');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
@ -114,6 +114,7 @@
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($wiki->name,true), 'link' => "view.php?id=$moodleID", 'type' => 'activityinstace');
|
||||
$navlinks[] = array('name' => get_string("administration","wiki"), 'link' => '', 'type' => 'title');
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
|
||||
/// Print the header
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -281,6 +281,7 @@
|
||||
$strwikis = get_string("modulenameplural", "wiki");
|
||||
$strwiki = get_string("modulename", "wiki");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($wiki->name,true), 'link' => "view.php?id=$moodleID", 'type' => 'activityinstace');
|
||||
|
||||
|
@ -61,6 +61,7 @@
|
||||
if ($frameset == "top") {
|
||||
// removed <base target="_parent" />
|
||||
// because it does not validate MDL-7861
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
|
||||
|
@ -71,6 +71,7 @@
|
||||
|
||||
// ... print the header and...
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strassessments, 'link' => '', 'type' => 'title');
|
||||
|
@ -23,6 +23,7 @@
|
||||
$strdeadline = get_string("deadline", "workshop");
|
||||
$strsubmitted = get_string("submitted", "assignment");
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strworkshops, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
$strsubmissions = get_string("submissions", "workshop");
|
||||
|
||||
// ... print the header and...
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strsubmissions, 'link' => '', 'type' => 'title');
|
||||
|
@ -23,6 +23,7 @@
|
||||
$strworkshop = get_string('modulename', 'workshop');
|
||||
$strsubmission = get_string('submission', 'workshop');
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strsubmission, 'link' => '', 'type' => 'title');
|
||||
|
@ -69,6 +69,7 @@
|
||||
}
|
||||
|
||||
// ...display header...
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
if ($straction) {
|
||||
|
@ -58,6 +58,7 @@
|
||||
/// top frame with the navigation bar and the assessment form
|
||||
|
||||
if ($frameset == "top") {
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||
$navlinks[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
|
||||
|
Loading…
x
Reference in New Issue
Block a user