Code Duplication    Length = 5-9 lines in 4 locations

main/messages/new_message.php 1 location

@@ 248-255 (lines=8) @@
245
                        $group_id,
246
                        $parent_id
247
                    );
248
                    if ($res) {
249
                        $userInfo = api_get_user_info($userId);
250
                        Display::addFlash(Display::return_message(
251
                            get_lang('MessageSentTo')."&nbsp;<b>".$userInfo['complete_name']."</b>",
252
                            'confirmation',
253
                            false
254
                        ));
255
                    }
256
                }
257
            } else {
258
                Display::addFlash(Display::return_message('ErrorSendingMessage', 'error'));

main/attendance/attendance_sheet.php 1 location

@@ 118-122 (lines=5) @@
115
    }
116
117
    $message_information = get_lang('AttendanceSheetDescription');
118
    if (!empty($message_information)) {
119
        $message = '<strong>'.get_lang('Information').'</strong><br />';
120
        $message .= $message_information;
121
        echo Display::return_message($message, 'normal', false);
122
    }
123
124
    if ($is_locked_attendance) {
125
        echo Display::return_message(get_lang('TheAttendanceSheetIsLocked'), 'warning', false);

main/course_progress/thematic.php 1 location

@@ 95-100 (lines=6) @@
92
            false
93
        ));
94
    }
95
    if (empty($thematic_id)) {
96
        // display information
97
        $text = '<strong>'.get_lang('Information').': </strong>';
98
        $text .= get_lang('ThematicDetailsDescription');
99
        $message = Display::return_message($text, 'info', false);
100
    }
101
    $list = [];
102
    // Display thematic data
103

main/inc/lib/tracking.lib.php 1 location

@@ 348-356 (lines=9) @@
345
                    }
346
347
                    $extend_link = '';
348
                    if (!empty($inter_num)) {
349
                        $extend_link = Display::url(
350
                            Display::return_icon(
351
                                'visible.gif',
352
                                get_lang('HideAttemptView')
353
                            ),
354
                            api_get_self().'?action=stats&fold_id='.$my_item_id.$url_suffix
355
                        );
356
                    }
357
                    $title = $row['mytitle'];
358
359
                    if (empty($title)) {