Code Duplication    Length = 7-7 lines in 2 locations

main/exercice/exercise_result.class.php 1 location

@@ 357-363 (lines=7) @@
354
            $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['email']), ENT_QUOTES, $charset)).';';
355
            $data .= str_replace("\r\n",'  ',implode(", ", GroupManager :: get_user_group_name($row['user_id']))).';';
356
357
			if ($export_user_fields) {
358
				//show user fields data, if any, for this user
359
				$user_fields_values = UserManager::get_extra_user_data($row['user_id'],false,false, false, true);
360
				foreach($user_fields_values as $value) {
361
					$data .= '"'.str_replace('"','""',api_html_entity_decode(strip_tags($value), ENT_QUOTES, $charset)).'";';
362
				}
363
			}
364
365
			$data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['title']), ENT_QUOTES, $charset)).';';
366
			$data .= str_replace("\r\n",'  ',$row['start_date']).';';

main/survey/survey.lib.php 1 location

@@ 3026-3032 (lines=7) @@
3023
            $return .= '-;'; // The user column
3024
        }
3025
3026
        if ($display_extra_user_fields) {
3027
            // Show user fields data, if any, for this user
3028
            $user_fields_values = UserManager::get_extra_user_data($user,false,false, false, true);
3029
            foreach ($user_fields_values as & $value) {
3030
                $return .= '"'.str_replace('"', '""', api_html_entity_decode(strip_tags($value), ENT_QUOTES)).'";';
3031
            }
3032
        }
3033
3034
        if (is_array($possible_options)) {
3035
            foreach ($possible_options as $question_id => $possible_option) {