Code Duplication    Length = 3-6 lines in 3 locations

main/gradebook/exercise_jump.php 1 location

@@ 71-73 (lines=3) @@
68
                    if ($count == 1) {
69
                        // If the exercise was added once redirect to the LP
70
                        $firstLp = current($exercise->lpList);
71
                        if (isset($firstLp['lp_id'])) {
72
                            $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&lp_id='.$firstLp['lp_id'].'&action=view&isStudentView=true';
73
                        }
74
                    } else {
75
                        // If the exercise was added multiple times show the LP list
76
                        $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&action=list';

main/forum/forumfunction.inc.php 1 location

@@ 4141-4143 (lines=3) @@
4138
    $_course = api_get_course_info();
4139
    $user_id = api_get_user_id();
4140
    $subject = get_lang('NewForumPost').' - '.$_course['official_code'];
4141
    if (isset($thread_information) && is_array($thread_information)) {
4142
        $thread_link = api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'.api_get_cidreq().'&forum='.$thread_information['forum_id'].'&thread='.$thread_information['thread_id'];
4143
    }
4144
    $email_body = get_lang('Dear').' '.api_get_person_name($user_info['firstname'], $user_info['lastname'], null, PERSON_NAME_EMAIL_ADDRESS).", <br />\n\r";
4145
    $email_body .= get_lang('NewForumPost')."\n";
4146
    $email_body .= get_lang('Course').': '.$_course['name'].' - ['.$_course['official_code']."] - <br />\n";

main/work/work.lib.php 1 location

@@ 2179-2184 (lines=6) @@
2176
                $correction = '';
2177
                $action = '';
2178
                $hasCorrection = '';
2179
                if (!empty($work['url_correction'])) {
2180
                    $hasCorrection = Display::url(
2181
                        $correctionIcon,
2182
                        api_get_path(WEB_CODE_PATH).'work/download.php?id='.$item_id.'&'.api_get_cidreq().'&correction=1'
2183
                    );
2184
                }
2185
2186
                $work['status'] = $hasCorrection;
2187
                $work['has_correction'] = $hasCorrection;