Skip to content

Commit

Permalink
lesson MDL-19812 Updated print_header and build_navigation to OUTPUT …
Browse files Browse the repository at this point in the history
…and PAGE equivalents
  • Loading branch information
samhemelryk committed Sep 7, 2009
1 parent 55c7042 commit 2458610
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
6 changes: 4 additions & 2 deletions mod/lesson/import.php
Expand Up @@ -35,8 +35,10 @@
$strimportquestions = get_string("importquestions", "lesson");
$strlessons = get_string("modulenameplural", "lesson");

$navigation = build_navigation($strimportquestions, $cm);
print_header_simple("$strimportquestions", " $strimportquestions", $navigation);
$PAGE->navbar->add($strimportquestions);
$PAGE->set_title($strimportquestions);
$PAGE->set_heading($strimportquestions);
echo $OUTPUT->header();

if ($form = data_submitted()) { /// Filename

Expand Down
6 changes: 4 additions & 2 deletions mod/lesson/importppt.php
Expand Up @@ -44,8 +44,10 @@
$strimportppt = get_string("importppt", "lesson");
$strlessons = get_string("modulenameplural", "lesson");

$navigation = build_navigation($strimportppt, $cm);
print_header_simple("$strimportppt", " $strimportppt", $navigation);
$PAGE->navbar->add($strimportppt);
$PAGE->set_title($strimportppt);
$PAGE->set_heading($strimportppt);
echo $OUTPUT->header();

if ($form = data_submitted()) { /// Filename

Expand Down
10 changes: 4 additions & 6 deletions mod/lesson/index.php
Expand Up @@ -29,12 +29,10 @@


/// Print the header
$navlinks = array();
$navlinks[] = array('name' => $strlessons, 'link' => '', 'type' => 'activity');

$navigation = build_navigation($navlinks);

print_header("$course->shortname: $strlessons", $course->fullname, $navigation, "", "", true, "", navmenu($course));
$PAGE->navbar->add($strlessons);
$PAGE->set_title("$course->shortname: $strlessons");
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();

/// Get all the appropriate data

Expand Down
6 changes: 4 additions & 2 deletions mod/lesson/locallib.php
Expand Up @@ -260,8 +260,10 @@ function lesson_print_header($cm, $course, $lesson, $currenttab = '', $extraedit
}

/// Header setup
$navigation = build_navigation(array(), $cm);
print_header($title, $course->fullname, $navigation, '', '', true, $buttons, navmenu($course, $cm));
$PAGE->set_title($title);
$PAGE->set_heading($course->fullname);
$PAGE->set_button($buttons);
echo $OUTPUT->header();

if (has_capability('mod/lesson:manage', $context)) {
print_heading_with_help($activityname, 'overview', 'lesson');
Expand Down
6 changes: 4 additions & 2 deletions mod/lesson/mediafile.php
Expand Up @@ -36,12 +36,14 @@
$mimetype = mimeinfo("type", $lesson->mediafile);

if (!is_url($lesson->mediafile) and !in_array($mimetype, array('text/plain', 'text/html'))) {
print_header($course->shortname);
$PAGE->set_title($course->shortname);
echo $OUTPUT->header();
}

if ($printclose) { // this is for framesets
if ($lesson->mediaclose) {
print_header($course->shortname);
$PAGE->set_title($course->shortname);
echo $OUTPUT->header();
echo '<div class="lessonmediafilecontrol">
<form>
<div>
Expand Down

0 comments on commit 2458610

Please sign in to comment.