Permalink
Browse files

MDL-42339 - removed double formatting for set_title() and set_heading()

  • Loading branch information...
Rossiani Wijaya
Rossiani Wijaya committed Feb 5, 2014
1 parent a7cae26 commit d5e77b4e124c2f6c25dde65442590a36e3587b65
View
@@ -1247,7 +1247,7 @@ function display_submissions($message='') {
$tabindex = 1; //tabindex for quick grading tabbing; Not working for dropdowns yet
add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->cm->id, $this->assignment->id, $this->cm->id);
- $PAGE->set_title(format_string($this->assignment->name,true));
+ $PAGE->set_title($this->assignment->name);
$PAGE->set_heading($this->course->fullname);
echo $OUTPUT->header();
View
@@ -61,7 +61,7 @@
// 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);
View
@@ -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)
View
@@ -81,8 +81,8 @@
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 @@
$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();
/// print the tabs
@@ -80,8 +80,8 @@
$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 @@
$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 @@
$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.
@@ -96,8 +96,8 @@
$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 @@
$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 @@
$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();
/// print the tabs
View
@@ -155,8 +155,8 @@
$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) {
@@ -122,8 +122,8 @@
} 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 tabs
require('tabs.php');
View
@@ -92,8 +92,8 @@
$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
View
@@ -48,7 +48,7 @@
$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();
@@ -84,8 +84,8 @@
$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();
require('tabs.php');
View
@@ -56,8 +56,8 @@
$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 @@
$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();
require('tabs.php');
@@ -62,8 +62,8 @@
$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 main part of the page
@@ -131,8 +131,8 @@
/// 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 @@
$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
View
@@ -110,8 +110,8 @@
$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 @@
$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);
View
@@ -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 @@
} 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>";
View
@@ -181,7 +181,7 @@
$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));
@@ -75,7 +75,7 @@
$navaction = get_string($action). " " . textlib::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();
View
@@ -48,7 +48,7 @@
$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 @@
'glossaryid = :glossaryid AND LOWER(concept) = :concept', array(
'glossaryid' => $mainglossary->id,
'concept' => textlib::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 (!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>?';
View
@@ -46,7 +46,7 @@
$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();
View
@@ -240,7 +240,7 @@
$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)) {
View
@@ -155,7 +155,7 @@
$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();
View
@@ -127,7 +127,7 @@
$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 @@ public function print_header_and_tabs($cm, $course, $quiz, $reportmode = 'overvi
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();
}
View
@@ -103,7 +103,7 @@
// 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. ============================================================================
@@ -142,7 +142,7 @@
// 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();
View
@@ -92,7 +92,7 @@
$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.
View
@@ -63,7 +63,7 @@
$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();
Oops, something went wrong.

0 comments on commit d5e77b4

Please sign in to comment.