MDL-20447 - add heading to the page
This commit is contained in:
+5
-3
@@ -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 = '';
|
||||
}
|
||||
|
||||
+1
-1
@@ -74,7 +74,6 @@ foreach ($fieldrecords as $fieldrecord) {
|
||||
$fields[]= data_get_field($fieldrecord, $data);
|
||||
}
|
||||
|
||||
$PAGE->navbar->add(get_string('export','data'));
|
||||
|
||||
$mform = new mod_data_export_form('export.php?d='.$data->id, $fields, $cm);
|
||||
|
||||
@@ -83,6 +82,7 @@ if($mform->is_cancelled()) {
|
||||
} elseif (!$formdata = (array) $mform->get_data()) {
|
||||
// build header to match the rest of the UI
|
||||
$PAGE->set_title($data->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name));
|
||||
|
||||
|
||||
+2
-1
@@ -246,9 +246,10 @@ foreach ($directories as $directory){
|
||||
$menufield[$directory] = get_string($directory,'data'); //get from language files
|
||||
}
|
||||
asort($menufield); //sort in alphabetical order
|
||||
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
$PAGE->set_pagetype('mod-data-field-' . $newtype);
|
||||
$PAGE->navbar->add(get_string('fields', 'data'));
|
||||
if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) { /// Adding a new field
|
||||
data_print_header($course, $cm, $data,'fields');
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@ require_capability('mod/data:manageentries', $context);
|
||||
/// Print the page header
|
||||
$strdata = get_string('modulenameplural','data');
|
||||
|
||||
$PAGE->navbar->add(get_string('add', 'data'));
|
||||
$PAGE->set_title($data->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name));
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ $strdataplural = get_string('modulenameplural','data');
|
||||
|
||||
$PAGE->navbar->add($strdata, new moodle_url('/mod/data/index.php', array('id'=>$course->id)));
|
||||
$PAGE->set_title($strdata);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
if (! $datas = get_all_instances_in_course("data", $course)) {
|
||||
|
||||
+2
-2
@@ -104,8 +104,8 @@ if ($userid && ($userid != $USER->id) && !has_capability('mod/data:viewalluserpr
|
||||
|
||||
/* Need sesskey security check here for import instruction */
|
||||
$sesskey = sesskey();
|
||||
|
||||
$PAGE->navbar->add(get_string('presets', 'data'));
|
||||
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
/********************************************************************/
|
||||
/* Output */
|
||||
|
||||
@@ -88,9 +88,13 @@ $bodytag .= 'if (typeof('.$editorobj.') != \'undefined\') { currEditor = '.$edit
|
||||
$bodytag .= 'currTextarea = document.getElementById(\'tempform\').template;';
|
||||
$bodytag .= '" ';
|
||||
|
||||
$PAGE->navbar->add(get_string($mode,'data'));
|
||||
if ($mode == 'singletemplate') {
|
||||
$PAGE->navbar->add(get_string($mode,'data'));
|
||||
}
|
||||
|
||||
$PAGE->requires->js('/mod/data/data.js');
|
||||
$PAGE->set_title($data->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($data->name));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user