@extends('admin.admin-master') 
@section('content')
<div>&nbsp; </div>
<div>&nbsp; </div>
@if(empty($data))
<h3> No result found ! </h3>
@else
<h3><i class="fa fa-user"></i> {{isset($data[0]->name)?$data[0]->name:''}}'s  Results  </h3>
<div>&nbsp; </div>
<!--- User Result List --->
<div class="col-md-12">
    <div class="col-md-12">
        <table class="table input-sm table-condensed table-striped">
            <tr>
                <th> Quiz date </th>
                <th>Group </th>
                <th> Correct  </th>
                <th> Incorrect  </th>
                <th> %  </th>
                <th> Total  </th>
                <th> Share  </th>
                @foreach($data as $u)
            <tr>
                <td>{{Util::getdate($u->quiz_date,'Y-m-d H:i A')}}</td>
                <td>{{$u->group_name}}</td>
                <td>{{($u->true_ans=='')?'Not completed':$u->true_ans}}</td>
                <td>{{($u->false_ans=='')?'Not completed':$u->false_ans}}</td>
                <td>{{($u->avg_grade=='')?'Not completed':$u->avg_grade}}</td>
                <td>{{$u->total}}</td>
                <td>{{($u->is_shared==1)?'<span class="label label-success">Shared</span>':'<span class="label label-danger">Not Shared</span>'}}</td>
            </tr>
            @endforeach
        </table>
        <center>{{$data->links()}} </center>
        <div>&nbsp; </div>
        <div>&nbsp; </div>
    </div>
</div>
@endif
<!--- End User Result List --->
<!---- Modal ------>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Update new quiz</h4>
            </div>
            <div class="modal-body quiz-form">
            </div>
            <p class="">&nbsp;</p>
        </div>
    </div>
</div>
<!---// Modal ------->
@stop
