Code Duplication    Length = 6-6 lines in 2 locations

main/exercise/hotpotatoes_exercise_result.class.php 1 location

@@ 245-250 (lines=6) @@
242
243
		// check if exists column 'user'
244
		$with_column_user = false;
245
		foreach ($this->results as $result) {
246
			if (!empty($result['last_name']) && !empty($result['first_name'])) {
247
				$with_column_user = true;
248
				break;
249
			}
250
		}
251
252
		if ($with_column_user) {
253
		    $worksheet->setCellValueByColumnAndRow($column, $line, get_lang('Email'));

main/exercise/exercise_result.class.php 1 location

@@ 456-461 (lines=6) @@
453
454
        // check if exists column 'user'
455
        $with_column_user = false;
456
        foreach ($this->results as $result) {
457
            if (!empty($result['last_name']) && !empty($result['first_name'])) {
458
                $with_column_user = true;
459
                break;
460
            }
461
        }
462
463
        $officialCodeInList = api_get_setting('show_official_code_exercise_result_list');
464