Code Duplication    Length = 5-6 lines in 4 locations

main/admin/course_request_accepted.php 1 location

@@ 66-70 (lines=5) @@
63
                break;
64
        }
65
    }
66
} else {
67
    $link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#course_validation';
68
    $message = sprintf(get_lang('PleaseActivateCourseValidationFeature'), sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation')));
69
    $is_error_message = true;
70
}
71
72
/**
73
 * Get the number of courses which will be displayed.

main/admin/course_request_edit.php 1 location

@@ 219-224 (lines=6) @@
216
            }
217
        }
218
    }
219
} else {
220
    // Prepare an error message notifying that the course validation feature has not been enabled.
221
    $link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?search_field=course_validation&submit_button=&category=search_setting';
222
    $message = sprintf(get_lang('PleaseActivateCourseValidationFeature'), sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation')));
223
    $is_error_message = true;
224
}
225
226
// Functions.
227

main/admin/course_request_rejected.php 1 location

@@ 93-97 (lines=5) @@
90
                break;
91
        }
92
    }
93
} else {
94
    $link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#course_validation';
95
    $message = sprintf(get_lang('PleaseActivateCourseValidationFeature'), sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation')));
96
    $is_error_message = true;
97
}
98
99
/**
100
 * Get the number of courses which will be displayed.

main/admin/course_request_review.php 1 location

@@ 110-114 (lines=5) @@
107
                break;
108
        }
109
    }
110
} else {
111
    $link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Platform#course_validation';
112
    $message = sprintf(get_lang('PleaseActivateCourseValidationFeature'), sprintf('<strong><a href="%s">%s</a></strong>', $link_to_setting, get_lang('EnableCourseValidation')));
113
    $is_error_message = true;
114
}
115
116
/**
117
 * Get the number of courses which will be displayed.