Code Duplication    Length = 24-24 lines in 2 locations

mod/gc_mobile_api/models/opportunity.php 1 location

@@ 394-417 (lines=24) @@
391
		if(!is_array($education_list)) {
392
			$education_list = array_filter(array($education_list));
393
		}
394
		if(!empty($education_list)) {
395
			foreach ($education_list as $education) {
396
				$education = get_entity($education);
397
				$education_ending_en = date("F", mktime(null, null, null, $education->enddate)) . ', ' . $education->endyear;
398
				$education_ending_fr = $cal_month[$education->enddate] . ', ' . $education->endyear;
399
	
400
				if ($education->ongoing == 'true') {
401
					$education_ending_en = 'Present';
402
					$education_ending_fr = 'Présent';
403
				}
404
	
405
				$education_beginning_en = date("F", mktime(null, null, null, $education->startdate)) . ', ' . $education->startyear;
406
				$education_beginning_fr = $cal_month[$education->startdate] . ', ' . $education->startyear;
407
	 
408
				// TODO: This section should be in the language files eventually.
409
				$content_applicant_en .= '<br><b><font size="4">' . $education->school . ':</font></b>' . "<br>";
410
				$content_applicant_en .=  $education_beginning_en . ' - ' . $education_ending_en . "<br>";
411
				$content_applicant_en .= '<b>' . $education->degree . ':</b> ' . $education->field . "<br>";
412
	
413
				$content_applicant_fr .= '<br><b><font size="4">' . $education->school . ':</font></b>' . "<br>";
414
				$content_applicant_fr .=  $education_beginning_fr . ' - ' . $education_ending_fr . "<br>";
415
				$content_applicant_fr .= '<b>' . $education->degree . ':</b> ' . $education->field . "<br>";
416
			}
417
		}
418
		
419
		//Lists all work experiences of the applicant.
420
		$experience_list = $user_entity->work;

mod/missions/actions/missions/application-form.php 1 location

@@ 205-228 (lines=24) @@
202
	if(!is_array($education_list)) {
203
	    $education_list = array_filter(array($education_list));
204
	}
205
	if(!empty($education_list)) {
206
	    foreach ($education_list as $education) {
207
	        $education = get_entity($education);
208
	        $education_ending_en = date("F", mktime(null, null, null, $education->enddate)) . ', ' . $education->endyear;
209
	        $education_ending_fr = $cal_month[$education->enddate] . ', ' . $education->endyear;
210
211
	        if ($education->ongoing == 'true') {
212
	            $education_ending_en = 'Present';
213
	            $education_ending_fr = 'Présent';
214
	        }
215
216
	        $education_beginning_en = date("F", mktime(null, null, null, $education->startdate)) . ', ' . $education->startyear;
217
	        $education_beginning_fr = $cal_month[$education->startdate] . ', ' . $education->startyear;
218
 
219
	        // TODO: This section should be in the language files eventually.
220
	        $content_applicant_en .= '<br><b><font size="4">' . $education->school . ':</font></b>' . "<br>";
221
	        $content_applicant_en .=  $education_beginning_en . ' - ' . $education_ending_en . "<br>";
222
	        $content_applicant_en .= '<b>' . $education->degree . ':</b> ' . $education->field . "<br>";
223
224
	        $content_applicant_fr .= '<br><b><font size="4">' . $education->school . ':</font></b>' . "<br>";
225
	        $content_applicant_fr .=  $education_beginning_fr . ' - ' . $education_ending_fr . "<br>";
226
	        $content_applicant_fr .= '<b>' . $education->degree . ':</b> ' . $education->field . "<br>";
227
	    }
228
	}
229
	
230
	//Lists all work experiences of the applicant.
231
	$experience_list = $applicant->work;