mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-42339 - removed double formatting for set_title() and set_heading()
This commit is contained in:
parent
183515da23
commit
8c6ca6961a
@ -61,7 +61,7 @@ $PAGE->set_context($context);
|
||||
|
||||
// show some info for guests
|
||||
if (isguestuser()) {
|
||||
$PAGE->set_title(format_string($chat->name));
|
||||
$PAGE->set_title($chat->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->confirm('<p>'.get_string('noguests', 'chat').'</p>'.get_string('liketologin'),
|
||||
get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
|
@ -45,7 +45,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$PAGE->set_title(format_string($choice->name));
|
||||
$PAGE->set_title($choice->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
// Mark viewed by user (if required)
|
||||
|
@ -81,8 +81,8 @@ $context = context_module::instance($cm->id);
|
||||
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities', $context)) {
|
||||
$strdatabases = get_string("modulenameplural", "data");
|
||||
|
||||
$PAGE->set_title(format_string($data->name));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title($data->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
notice(get_string("activityiscurrentlyhidden"));
|
||||
}
|
||||
|
@ -77,8 +77,8 @@ $strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->navbar->add(get_string('analysis', 'feedback'));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($feedback->name));
|
||||
|
||||
|
@ -80,8 +80,8 @@ if (!($feedback->publish_stats OR has_capability('mod/feedback:viewreports', $co
|
||||
$strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// print the tabs
|
||||
|
@ -154,8 +154,8 @@ if ($course->id == SITEID) {
|
||||
$PAGE->navbar->add(get_string('feedback:complete', 'feedback'));
|
||||
$urlparams = array('id'=>$cm->id, 'gopage'=>$gopage, 'courseid'=>$course->id);
|
||||
$PAGE->set_url('/mod/feedback/complete.php', $urlparams);
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
//ishidden check.
|
||||
|
@ -162,8 +162,8 @@ $PAGE->set_pagelayout('incourse');
|
||||
$urlparams = array('id'=>$course->id);
|
||||
$PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', $urlparams));
|
||||
$PAGE->navbar->add(format_string($feedback->name));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
//ishidden check.
|
||||
|
@ -89,8 +89,8 @@ $strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->navbar->add(get_string('delete_entry', 'feedback'));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// Print the main part of the page
|
||||
|
@ -71,8 +71,8 @@ $strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->navbar->add(get_string('delete_item', 'feedback'));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// Print the main part of the page
|
||||
|
@ -107,8 +107,8 @@ $strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
$strdeletefeedback = get_string('delete_template', 'feedback');
|
||||
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($feedback->name));
|
||||
/// print the tabs
|
||||
|
@ -155,8 +155,8 @@ $strfeedbacks = get_string('modulenameplural', 'feedback');
|
||||
$strfeedback = get_string('modulename', 'feedback');
|
||||
|
||||
$PAGE->set_url('/mod/feedback/edit.php', array('id'=>$cm->id, 'do_show'=>$do_show));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
|
||||
//Adding the javascript module for the items dragdrop.
|
||||
if (count($feedbackitems) > 1) {
|
||||
|
@ -121,8 +121,8 @@ if ($item->id) {
|
||||
} else {
|
||||
$PAGE->navbar->add(get_string('add_item', 'feedback'));
|
||||
}
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// Print the main part of the page.
|
||||
|
@ -92,8 +92,8 @@ if ($choosefile) {
|
||||
$strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($feedback->name));
|
||||
/// print the tabs
|
||||
|
@ -49,7 +49,7 @@ $strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->navbar->add($strfeedbacks);
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title(get_string('modulename', 'feedback').' '.get_string('activities'));
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strfeedbacks);
|
||||
|
@ -84,8 +84,8 @@ if ($coursefilter) {
|
||||
$strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($feedback->name));
|
||||
|
||||
|
@ -56,8 +56,8 @@ $feedback_url = new moodle_url('/mod/feedback/index.php', array('id'=>$course->i
|
||||
$PAGE->navbar->add($strfeedbacks, $feedback_url);
|
||||
$PAGE->navbar->add(format_string($feedback->name));
|
||||
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title($feedback->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// Print the main part of the page
|
||||
|
@ -81,8 +81,8 @@ if ($do_show == 'showoneentry') {
|
||||
$strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($feedback->name));
|
||||
|
||||
|
@ -62,8 +62,8 @@ require_capability('mod/feedback:viewreports', $context);
|
||||
$strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($feedback->name));
|
||||
|
||||
|
@ -131,8 +131,8 @@ if ($action == 'sendmessage' AND has_capability('moodle/course:bulkmessaging', $
|
||||
|
||||
/// Print the page header
|
||||
$PAGE->navbar->add(get_string('show_nonrespondents', 'feedback'));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
require('tabs.php');
|
||||
|
@ -82,8 +82,8 @@ $strfeedback = get_string("modulename", "feedback");
|
||||
|
||||
$PAGE->navbar->add($strfeedbacks, new moodle_url('/mod/feedback/index.php', array('id'=>$course->id)));
|
||||
$PAGE->navbar->add(format_string($feedback->name));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_title($feedback->name);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// Print the main part of the page
|
||||
|
@ -121,8 +121,8 @@ if ($course->id == SITEID) {
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
}
|
||||
$PAGE->set_url('/mod/feedback/view.php', array('id'=>$cm->id, 'do_show'=>'view'));
|
||||
$PAGE->set_title(format_string($feedback->name));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title($feedback->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
//ishidden check.
|
||||
|
@ -42,7 +42,7 @@ $strunsubscribeall = get_string('unsubscribeall', 'forum');
|
||||
$PAGE->navbar->add(get_string('modulename', 'forum'));
|
||||
$PAGE->navbar->add($strunsubscribeall);
|
||||
$PAGE->set_title($strunsubscribeall);
|
||||
$PAGE->set_heading(format_string($COURSE->fullname));
|
||||
$PAGE->set_heading($COURSE->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strunsubscribeall);
|
||||
|
||||
|
@ -106,9 +106,9 @@
|
||||
|
||||
/// Print header.
|
||||
|
||||
$PAGE->set_title(format_string($forum->name));
|
||||
$PAGE->set_title($forum->name);
|
||||
$PAGE->add_body_class('forumtype-'.$forum->type);
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
||||
|
@ -118,7 +118,7 @@ if ($confirm and confirm_sesskey()) { // the operation was confirmed.
|
||||
|
||||
} else { // the operation has not been confirmed yet so ask the user to do so
|
||||
$PAGE->navbar->add(get_string('delete'));
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
$areyousure = "<b>".format_string($entry->concept)."</b><p>$strareyousuredelete</p>";
|
||||
|
@ -182,7 +182,7 @@ if (!empty($id)) {
|
||||
$PAGE->navbar->add(get_string('edit'));
|
||||
}
|
||||
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($glossary->name), 2);
|
||||
|
@ -75,7 +75,7 @@ if (!empty($action)) {
|
||||
$navaction = get_string($action). " " . core_text::strtolower(get_string("category","glossary"));
|
||||
$PAGE->navbar->add($navaction);
|
||||
}
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($glossary->name), 2);
|
||||
|
@ -48,7 +48,7 @@ $strexportentries = get_string('exportentriestoxml', 'glossary');
|
||||
|
||||
$PAGE->set_url('/mod/glossary/export.php', array('id'=>$cm->id));
|
||||
$PAGE->navbar->add($strexportentries);
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
@ -73,7 +73,7 @@ if (!$mainglossary->allowduplicatedentries) {
|
||||
'glossaryid = :glossaryid AND LOWER(concept) = :concept', array(
|
||||
'glossaryid' => $mainglossary->id,
|
||||
'concept' => core_text::strtolower($entry->concept)))) {
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->notification(get_string('errconceptalreadyexists', 'glossary'));
|
||||
@ -85,8 +85,8 @@ if (!$mainglossary->allowduplicatedentries) {
|
||||
}
|
||||
|
||||
if (!data_submitted() or !$confirm or !confirm_sesskey()) {
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo '<div class="boxaligncenter">';
|
||||
$areyousure = '<h2>'.format_string($entry->concept).'</h2><p align="center">'.get_string('areyousureexport','glossary').'<br /><b>'.format_string($mainglossary->name).'</b>?';
|
||||
|
@ -46,7 +46,7 @@ $strsearch = get_string("search");
|
||||
$strimportentries = get_string('importentriesfromxml', 'glossary');
|
||||
|
||||
$PAGE->navbar->add($strimportentries);
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
@ -240,7 +240,7 @@ $strsearch = get_string("search");
|
||||
$strwaitingapproval = get_string('waitingapproval', 'glossary');
|
||||
|
||||
/// If we are in approval mode, prit special header
|
||||
$PAGE->set_title(format_string($glossary->name));
|
||||
$PAGE->set_title($glossary->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$url = new moodle_url('/mod/glossary/view.php', array('id'=>$cm->id));
|
||||
if (isset($mode)) {
|
||||
|
@ -57,7 +57,7 @@ $mform->set_data($data);
|
||||
|
||||
$PAGE->navbar->add($strimportquestions);
|
||||
$PAGE->set_title($strimportquestions);
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($lesson->name), 2);
|
||||
echo $OUTPUT->heading_with_help($strimportquestions, 'importquestions', 'lesson', '', '', 3);
|
||||
|
@ -155,7 +155,7 @@ $table = str_replace('<!--table body-->', $rows, $html);
|
||||
|
||||
$title = get_string('submissionsfor', 'lti', $lti->name);
|
||||
|
||||
$PAGE->set_title(format_string($title , true));
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
@ -73,7 +73,7 @@ $options = empty($page->displayoptions) ? array() : unserialize($page->displayop
|
||||
if ($inpopup and $page->display == RESOURCELIB_DISPLAY_POPUP) {
|
||||
$PAGE->set_pagelayout('popup');
|
||||
$PAGE->set_title($course->shortname.': '.$page->name);
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
} else {
|
||||
$PAGE->set_title($course->shortname.': '.$page->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
@ -127,7 +127,7 @@ $PAGE->blocks->add_fake_block($navbc, reset($regions));
|
||||
|
||||
$title = get_string('attempt', 'quiz', $attemptobj->get_attempt_number());
|
||||
$headtags = $attemptobj->get_html_head_contributions($page);
|
||||
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
|
||||
$PAGE->set_title($attemptobj->get_quiz_name());
|
||||
$PAGE->set_heading($attemptobj->get_course()->fullname);
|
||||
|
||||
if ($attemptobj->is_last_page($page)) {
|
||||
|
@ -64,7 +64,7 @@ abstract class quiz_default_report {
|
||||
global $PAGE, $OUTPUT;
|
||||
|
||||
// Print the page header.
|
||||
$PAGE->set_title(format_string($quiz->name));
|
||||
$PAGE->set_title($quiz->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
$context = context_module::instance($cm->id);
|
||||
|
@ -103,7 +103,7 @@ if ($attemptobj->is_preview_user() && $attemptobj->is_own_attempt()) {
|
||||
|
||||
// Set up the page header.
|
||||
$headtags = $attemptobj->get_html_head_contributions($page, $showall);
|
||||
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
|
||||
$PAGE->set_title($attemptobj->get_quiz_name());
|
||||
$PAGE->set_heading($attemptobj->get_course()->fullname);
|
||||
|
||||
// Summary table start. ============================================================================
|
||||
|
@ -143,7 +143,7 @@ if ($accessmanager->is_preflight_check_required($currentattemptid)) {
|
||||
|
||||
// Form not submitted successfully, re-display it and stop.
|
||||
$PAGE->set_url($quizobj->start_attempt_url($page));
|
||||
$PAGE->set_title(format_string($quizobj->get_quiz_name()));
|
||||
$PAGE->set_title($quizobj->get_quiz_name());
|
||||
$accessmanager->setup_attempt_page($PAGE);
|
||||
if (empty($quizobj->get_quiz()->showblocks)) {
|
||||
$PAGE->blocks->show_only_fake_blocks();
|
||||
|
@ -92,7 +92,7 @@ $regions = $PAGE->blocks->get_regions();
|
||||
$PAGE->blocks->add_fake_block($navbc, reset($regions));
|
||||
|
||||
$PAGE->navbar->add(get_string('summaryofattempt', 'quiz'));
|
||||
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
|
||||
$PAGE->set_title($attemptobj->get_quiz_name());
|
||||
$PAGE->set_heading($attemptobj->get_course()->fullname);
|
||||
|
||||
// Display the page.
|
||||
|
@ -63,7 +63,7 @@ $completion->set_module_viewed($cm);
|
||||
$showscales = ($template->name != 'ciqname');
|
||||
|
||||
$strsurvey = get_string("modulename", "survey");
|
||||
$PAGE->set_title(format_string($survey->name));
|
||||
$PAGE->set_title($survey->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($survey->name);
|
||||
|
@ -119,7 +119,7 @@ abstract class page_wiki {
|
||||
function print_header() {
|
||||
global $OUTPUT, $PAGE, $CFG, $USER, $SESSION;
|
||||
|
||||
$PAGE->set_heading(format_string($PAGE->course->fullname));
|
||||
$PAGE->set_heading($PAGE->course->fullname);
|
||||
|
||||
$this->set_url();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user