Code Duplication    Length = 11-11 lines in 2 locations

main/exercise/hotpotatoes_exercise_result.class.php 1 location

@@ 317-327 (lines=11) @@
314
                );
315
                $column++;
316
317
                if (api_is_western_name_order()) {
318
                    $worksheet->setCellValueByColumnAndRow($column, $line,api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset));
319
                    $column++;
320
                    $worksheet->setCellValueByColumnAndRow($column, $line, api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset));
321
                    $column++;
322
                } else {
323
                    $worksheet->setCellValueByColumnAndRow($column, $line, api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset));
324
                    $column++;
325
                    $worksheet->setCellValueByColumnAndRow($column, $line, api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset));
326
                    $column++;
327
                }
328
			}
329
330
			if ($export_user_fields) {

main/exercise/exercise_result.class.php 1 location

@@ 537-547 (lines=11) @@
534
        foreach ($this->results as $row) {
535
            $column = 0;
536
            if ($with_column_user) {
537
                if (api_is_western_name_order()) {
538
                    $worksheet->setCellValueByColumnAndRow(
539
                        $column,
540
                        $line,
541
                        api_html_entity_decode(
542
                            strip_tags($row['first_name']),
543
                            ENT_QUOTES,
544
                            $charset
545
                        )
546
                    );
547
                    $column++;
548
                    $worksheet->setCellValueByColumnAndRow(
549
                        $column,
550
                        $line,