MDL-20447 - add heading to the page

This commit is contained in:
Rossiani Wijaya
2010-05-28 02:30:14 +00:00
parent 66b250fd9d
commit 91bc072a31
7 changed files with 18 additions and 8 deletions
+5 -3
View File
@@ -85,6 +85,7 @@ if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities'
$strdatabases = get_string("modulenameplural", "data");
$PAGE->set_title(format_string($data->name));
$PAGE->set_heading(format_string($course->fullname));
echo $OUTPUT->header();
notice(get_string("activityiscurrentlyhidden"));
}
@@ -134,11 +135,12 @@ $strdata = get_string('modulenameplural','data');
if ($rid) {
$PAGE->navbar->add(get_string('editentry', 'data'));
} else {
} else if ($import) {
$PAGE->navbar->add(get_string('add', 'data'));
}
$PAGE->set_title($data->name);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
/// Check to see if groups are being used here
@@ -305,9 +307,9 @@ if ($data->addtemplate){
$patterns[]="[[".$field->field->name."#id]]";
$replacements[] = 'field_'.$field->field->id;
}
$newtext = str_ireplace($patterns, $replacements, $data->{$mode});
$newtext = str_ireplace($patterns, $replacements, $data->{$mode});
} else { //if the add template is not yet defined, print the default form!
} else { //if the add template is not yet defined, print the default form!
echo data_generate_default_template($data, 'addtemplate', $rid, true, false);
$newtext = '';
}