Skip to content

Commit

Permalink
MDL-49819 navigation: User profile string improvement.
Browse files Browse the repository at this point in the history
Part of MDL-45774.
  • Loading branch information
abgreeve committed Apr 13, 2015
1 parent 3a13707 commit e29866b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion blog/lib.php
Expand Up @@ -1035,7 +1035,7 @@ function core_blog_myprofile_navigation(core_user\output\myprofile\tree $tree, $
if ($iscurrentuser) {
$title = get_string('myprofilemyblogs', 'core_blog');
} else {
$title = get_string('myprofileuserblogs', 'core_blog', fullname($user));
$title = get_string('myprofileuserblogs', 'core_blog');
}
$blognode = new core_user\output\myprofile\node('miscellaneous', 'blogs', $title, null, $url);
$tree->add_node($blognode);
Expand Down
2 changes: 1 addition & 1 deletion lang/en/blog.php
Expand Up @@ -109,7 +109,7 @@
$string['linktooriginalentry'] = 'Link to original blog entry';
$string['maxexternalblogsperuser'] = 'Maximum number of external blogs per user';
$string['myprofilemyblogs'] = 'My blog entries';
$string['myprofileuserblogs'] = 'View all blog entries by {$a}';
$string['myprofileuserblogs'] = 'View all blog entries';
$string['name'] = 'Name';
$string['name_help'] = 'Enter a descriptive name for your external blog. (If no name is supplied, the title of your external blog will be used).';
$string['noentriesyet'] = 'No visible entries here';
Expand Down
1 change: 0 additions & 1 deletion lang/en/notes.php
Expand Up @@ -44,7 +44,6 @@
$string['invalidid'] = 'Invalid note ID specified';
$string['invaliduserid'] = 'Invalid user id: {$a}';
$string['myprofileownnotes'] = 'My notes';
$string['myprofileothernotes'] = 'Notes by {$a}';
$string['nocontent'] = 'Note content can not be empty';
$string['nonotes'] = 'There are no notes of this type yet';
$string['nopermissiontodelete'] = 'You may not delete this note';
Expand Down
3 changes: 1 addition & 2 deletions mod/forum/lang/en/forum.php
Expand Up @@ -326,9 +326,8 @@
$string['movethisdiscussionto'] = 'Move this discussion to ...';
$string['mustprovidediscussionorpost'] = 'You must provide either a discussion id or post id to export';
$string['myprofileownpost'] = 'My forum posts';
$string['myprofileotherpost'] = 'Forum posts by {$a}';
$string['myprofileowndis'] = 'My forum discussions';
$string['myprofileotherdis'] = 'Forum discussions by {$a}';
$string['myprofileotherdis'] = 'Forum discussions';
$string['namenews'] = 'News forum';
$string['namenews_help'] = 'The news forum is a special forum for announcements that is automatically created when a course is created. A course can have only one news forum. Only teachers and administrators can post in the news forum. The "Latest news" block will display recent discussions from the news forum.';
$string['namesocial'] = 'Social forum';
Expand Down
4 changes: 2 additions & 2 deletions mod/forum/lib.php
Expand Up @@ -7834,7 +7834,7 @@ function mod_forum_myprofile_navigation(core_user\output\myprofile\tree $tree, $
$postsurl->param('course', $course->id);
}
$string = $iscurrentuser ? get_string('myprofileownpost', 'mod_forum') :
get_string('myprofileotherpost', 'mod_forum', fullname($user));
get_string('forumposts', 'mod_forum');
$node = new core_user\output\myprofile\node('miscellaneous', 'forumposts', $string, null, $postsurl);
$tree->add_node($node);

Expand All @@ -7843,7 +7843,7 @@ function mod_forum_myprofile_navigation(core_user\output\myprofile\tree $tree, $
$postsurl->param('course', $course->id);
}
$string = $iscurrentuser ? get_string('myprofileowndis', 'mod_forum') :
get_string('myprofileotherdis', 'mod_forum', fullname($user));
get_string('myprofileotherdis', 'mod_forum');
$node = new core_user\output\myprofile\node('miscellaneous', 'forumdiscussions', $string, null,
$discussionssurl);
$tree->add_node($node);
Expand Down
2 changes: 1 addition & 1 deletion notes/lib.php
Expand Up @@ -381,7 +381,7 @@ function note_view($context, $userid) {
function core_notes_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) {
$url = new moodle_url("/notes/index.php", array('user' => $user->id));
$title = $iscurrentuser ? get_string('myprofileownnotes', 'core_notes') :
get_string('myprofileothernotes', 'core_notes', fullname($user));;
get_string('notes', 'core_notes');
if (empty($course)) {
// Site level profile.
if (!has_capability('moodle/notes:view', context_system::instance())) {
Expand Down

0 comments on commit e29866b

Please sign in to comment.