<?php
	// Assets::add( 'select2' );
	// Assets::add( 'courses.min.js' );
	// Assets::add( 'courses.css' );
	// AMIB::add_js_translation( trans( 'course.js-msgs' ) );
?>
<?php $__env->startSection( 'head' ); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection( 'content' ); ?>
	<h2>نفرات برتر <?php echo e($exam->name); ?></h2>
	<hr>
	<?php foreach( $top_results as $lesson ): ?>
		<h3><?php echo $lesson[ 'name' ]; ?></h3>

		<table class="default">
			<thead>
				<tr>
					<th>نام درس</th>
					<th>شماره</th>
					<th>نام و نام خانوادگی</th>
					<th>درصد</th>
					<th>رتبه</th>
				</tr>
			</thead>
			<?php foreach( $lesson as $index => $rank ): ?>

				<?php if( false == is_array( $rank ) ) continue; ?>

				<?php foreach( $rank[ 'users' ] as $user ): ?>
					<tr>
						<td><?php echo $lesson[ 'name' ]; ?></td>
						<td><?php echo en2fa( $user->code ); ?></td>
						<td><?php echo e($user->full_name); ?></td>
						<td><?php echo en2fa( $rank[ 'mark' ] ); ?></td>
						<td><?php echo en2fa( $index + 1 ); ?></td>
					</tr>
				<?php endforeach; ?>

			<?php endforeach; ?>
		</table>

	<?php endforeach; ?>
<?php $__env->stopSection(); ?>