Merge branch 'MDL-52338-30' of https://github.com/dg711/moodle into MOODLE_30_STABLE
This commit is contained in:
@@ -325,7 +325,7 @@ class block_course_overview_renderer extends plugin_renderer_base {
|
||||
* @return string html string for welcome area.
|
||||
*/
|
||||
public function welcome_area($msgcount) {
|
||||
global $USER;
|
||||
global $CFG, $USER;
|
||||
$output = $this->output->box_start('welcome_area');
|
||||
|
||||
$picture = $this->output->user_picture($USER, array('size' => 75, 'class' => 'welcome_userpicture'));
|
||||
@@ -334,16 +334,19 @@ class block_course_overview_renderer extends plugin_renderer_base {
|
||||
$output .= $this->output->box_start('welcome_message');
|
||||
$output .= $this->output->heading(get_string('welcome', 'block_course_overview', $USER->firstname));
|
||||
|
||||
$plural = 's';
|
||||
if ($msgcount > 0) {
|
||||
$output .= get_string('youhavemessages', 'block_course_overview', $msgcount);
|
||||
if ($msgcount == 1) {
|
||||
$plural = '';
|
||||
if (!empty($CFG->messaging)) {
|
||||
$plural = 's';
|
||||
if ($msgcount > 0) {
|
||||
$output .= get_string('youhavemessages', 'block_course_overview', $msgcount);
|
||||
if ($msgcount == 1) {
|
||||
$plural = '';
|
||||
}
|
||||
} else {
|
||||
$output .= get_string('youhavenomessages', 'block_course_overview');
|
||||
}
|
||||
} else {
|
||||
$output .= get_string('youhavenomessages', 'block_course_overview');
|
||||
$output .= html_writer::link(new moodle_url('/message/index.php'),
|
||||
get_string('message'.$plural, 'block_course_overview'));
|
||||
}
|
||||
$output .= html_writer::link(new moodle_url('/message/index.php'), get_string('message'.$plural, 'block_course_overview'));
|
||||
$output .= $this->output->box_end();
|
||||
$output .= $this->output->box('', 'flush');
|
||||
$output .= $this->output->box_end();
|
||||
|
||||
Reference in New Issue
Block a user