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

@@ 4105-4107 (lines=3) @@
4102
    $_course = api_get_course_info();
4103
    $user_id = api_get_user_id();
4104
    $subject = get_lang('NewForumPost').' - '.$_course['official_code'];
4105
    if (isset($thread_information) && is_array($thread_information)) {
4106
        $thread_link = api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'.api_get_cidreq().'&forum='.$thread_information['forum_id'].'&thread='.$thread_information['thread_id'];
4107
    }
4108
    $email_body = get_lang('Dear').' '.api_get_person_name($user_info['firstname'], $user_info['lastname'], null, PERSON_NAME_EMAIL_ADDRESS).", <br />\n\r";
4109
    $email_body .= get_lang('NewForumPost')."\n";
4110
    $email_body .= get_lang('Course').': '.$_course['name'].' - ['.$_course['official_code']."] - <br />\n";

main/work/work.lib.php 1 location

@@ 2170-2175 (lines=6) @@
2167
2168
                $correction = '';
2169
                $hasCorrection = '';
2170
                if (!empty($work['url_correction'])) {
2171
                    $hasCorrection = Display::url(
2172
                        $correctionIcon,
2173
                        api_get_path(WEB_CODE_PATH).'work/download.php?id='.$item_id.'&'.api_get_cidreq().'&correction=1'
2174
                    );
2175
                }
2176
2177
                if ($qualification_exists) {
2178
                    $work['qualification'] = $qualification_string.$feedback;