<?php echo csrf_field(); ?>
        
<div class="accordion" id="accordionExample">
	<!-- Empiezan topicos -->
	<?php $__currentLoopData = $modulo; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $m): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
	
		<div class="card">
	    <div class="card-header p-0" id="heading<?php echo e($m->id); ?>" >
	      
	      <div class="row">
	      	<div class="col-md-12 col-sm-12">
	      		<button class="btn btn-link btn-link-green btn-block text-left" type="button" data-toggle="collapse" data-target="#modulo_<?php echo e($m->id); ?>" aria-expanded="true" aria-controls="modulo_<?php echo e($m->id); ?>" id='btn-<?php echo e($m->id); ?>'>
		          Tópico <?php echo e($m->nombre); ?> - <?php echo e($m->descripcion); ?>

		        </button>
	      	</div>
	      	
	      </div>

	      
	    </div>
			<div id="modulo_<?php echo e($m->id); ?>" class="collapse <?php echo e($i==0 ? 'show' : ''); ?>" aria-labelledby="heading<?php echo e($m->id); ?>" data-parent="#accordionExample">
      	<div class="card-body">
      		<?php if($m->seccion->count()>0): ?>

						<?php $__currentLoopData = $m->seccion; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
							<div class="table mt-3">
			          <div class="row encabezado">
			            <div class="col-md-12 col-sm-12 col-12 d-block d-sm-none bg-dark-blue text-white text-center"><?php echo e($s->indicacion); ?></div>
			            <div class="col-md-12 col-sm-12 col-12 d-none d-sm-block text-center"><?php echo e($s->indicacion); ?></div>
			          </div>
			          
			          <?php if($s->texto!=""): ?>
		              <div class="row encabezado" style="color:#8c8c8c; background:white; font-weight:normal;">
		     
		                <div class="col-md-12 col-sm-12 col-12 text-justify"><?php echo e($s->texto); ?></div>
		            	</div> 
		            <?php endif; ?>
		        		
		        		<?php if($s->audio!=""): ?>
		              <div class="row encabezado" style="color:#8c8c8c; background:white; font-weight:normal;">
		              	<div class="col-md-12 col-sm-12 col-12 text-center">
										  <section class="player mb-1" data-id='<?php echo e($s->id); ?>'>
										    <audio id='audio_<?php echo e($s->id); ?>'>
										      <source src="https://escolares.itzitacuaro.edu.mx/laravel/storage/audios/<?php echo e($s->audio); ?>" type="audio/mp3">
										    </audio>
							          <section class="btn-group" role="group" aria-label="Basic example">
							            <button type="button" class="btn btn-dark" onclick="reproducir('<?php echo e('audio_'.$s->id); ?>');"><i class="fa fa-play"></i></button>
							            <button type="button" class="btn btn-dark" onclick="pausar('<?php echo e('audio_'.$s->id); ?>');"><i class="fa fa-pause"></i></button>
							            <button type="button" class="btn btn-dark" onclick="bajar_volumen('<?php echo e('audio_'.$s->id); ?>');"><i class="fa fa-volume-down"></i></button>
							            <button type="button" class="btn btn-dark" onclick="subir_volumen('<?php echo e('audio_'.$s->id); ?>');"><i class="fa fa-volume-up"></i></button>
							          </section>
										  </section>
										</div>
		            	</div> 
		      			<?php endif; ?>

		      			<?php if( count($s->pregunta) > 0 ): ?>
		      				<?php
		      					$q = count($s->pregunta)/2;
		      					if (count($s->pregunta) % 2 > 0) { $q++; }
		      					$i = 0;
		      				?>
				          
				          
					        <div class="row">
					        	<?php $__currentLoopData = $s->pregunta->chunk($q); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $chunk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>    

					            <div class="col-md-6 col-sm-6 d-none d-sm-block">
					            	
					            	<div class="row encabezado gris">
						            	<div class="col-md-1 col-sm-1 d-none d-sm-block">No.</div>
						            	<div class="col-md-9 col-sm-9 d-none d-sm-block">Pregunta</div>
						            	<div class="col-md-2 col-sm-2 d-none d-sm-block">Acciones</div>
						            </div>

						            <div class="row contenido-700">
						            	<?php $__currentLoopData = $chunk; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
									          <div class="col-md-12">
									          	<div class="row cuerpo">
								                <div class="col-6 d-block d-sm-none bg-dark-blue text-white text-center">No.</div>
								                <div class="col-md-1 col-sm-1 col-6 d-block d-sm-none bg-dark-blue text-white text-center"><?php echo e($i+1); ?></div>
								                <div class="col-md-1 col-sm-1 col-6 d-none d-sm-block text-center"><?php echo e($i+1); ?></div>
								                
								                <div class="col-6 d-block d-sm-none text-center">Pregunta</div>
								                <div class="col-md-9 col-sm-9 col-6 "><?php echo e($p->pregunta); ?>

								                	<ol>
								                		<?php if($p->resp_1!=""): ?><li><?php echo e($p->resp_1); ?></li><?php endif; ?>
								                		<?php if($p->resp_2!=""): ?><li><?php echo e($p->resp_2); ?></li><?php endif; ?>
								                		<?php if($p->resp_3!=""): ?><li><?php echo e($p->resp_3); ?></li><?php endif; ?>
								                		<?php if($p->resp_4!=""): ?><li><?php echo e($p->resp_4); ?></li><?php endif; ?>
								                		<?php if($p->resp_5!=""): ?><li><?php echo e($p->resp_5); ?></li><?php endif; ?>
								                	</ol>
								                </div>

								                <div class="col-6 d-block d-sm-none text-center">Acciones</div>
								                <div class="col-md-2 col-sm-2 col-6 text-center">
								                	<nav class="btn-group btn-group-xs mr-3" role="group" aria-label="..." style="margin: 0px;">
									                  <!--respetar los colores y botones para consultar, modificar y eliminar -->
									                  <button class="btn btn-outline-info"    type="button" onclick="ngl_pregunta_show(<?php echo e($p->id); ?>);">
									                  	<i class="fa fa-pencil" data-toggle="popover" data-placement="top" data-trigger="hover" data-content="Modificar Pregunta"></i></button>
									                  <button class="btn btn-outline-danger"  type="button" onclick="ngl_pregunta_delete(<?php echo e($p->id); ?>);">
									                  	<i class="fa fa-trash-o" data-toggle="popover" data-placement="top" data-trigger="hover" data-content="Eliminar Pregunta"></i></button>
									                </nav>
								                </div>
							                
							              	</div> 
							              </div>
								          	<?php $i++; ?>
									        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
									      </div>
					            </div>
					          
					        	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
					        </div>

				          
				      	<?php else: ?>
				      		<div class="text-center">Aun no se han registrado ninguna pregunta en esta sección.</div>
				      	<?php endif; ?>
			          
			          
				    	</div>
				    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
				  <?php else: ?> 
				  	<div class="text-center">Aun no se han registrado secciones.</div>
				  <?php endif; ?>
				</div>
   	 	</div>
		</div>

  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>	
  <!-- Fin de  topicos -->
</div> 


<div class="row mt-3">
	<div class="col"></div>
	<div class="col">
		<button type="button" class="btn btn-outline-dark btn-block" onclick="ngl_consulta_regresar();"><i class="fa fa-times"></i> Regresar</button>
	</div>
	<div class="col"></div>
</div>

				    
				  <?php /**PATH /home3/itzitacu/public_html/poa/laravel/resources/views/examen_ingles/examen/consulta.blade.php ENDPATH**/ ?>