@extends('layouts.frontend') @section('content')

{!! Lang::get('core.mycourses')!!}

@if (defined('CNF_CURRENCY')) @php $currency = SiteHelpers::getCurrentcurrency(CNF_CURRENCY) @endphp @endif
{!! Form::select('q', array( 'all' => Lang::get('core.ALL'), 'completed' => Lang::get('core.complete'), ),Input::get('q'),array('class' => 'selectpicker select_mrg','id'=>'mycourseFilter'))!!}

{!! Lang::get('core.mycourse_text') !!}

@if(count($courses)>0) @if(isset($search)) {!! str_replace('?', '?q='.$search.'&', $courses->render()) !!} @else {!! str_replace('?', '?', $courses->render()) !!} @endif @endif
@if(count($mycourse) == 0)

{!! Lang::get('core.learning_empty')!!}

{!! Lang::get('core.discover_course') !!} {{ CNF_APPNAME }} {!! Lang::get('core.discover_course1') !!}

@endif @php $j=0 @endphp @foreach($mycourse as $course) @php $cpercentage = \bsetecHelpers::completedPercentage($course->course_id) @endphp @php $completion = explode('--X--',$cpercentage); @endphp @php $total = json_decode($course->curriculum); @endphp @php $tot_count = 1 @endphp @if($total) @for ($tot=0; $tot < count(@$total->MainTitle); $tot++) @if($total->MainTitle[$tot] != 'Section') @php $couting = $tot_count++; @endphp @endif @endfor @else @php $couting = 1; @endphp @endif @php ( $percentage = round((count($completion) / $couting ) * 100) ) @if(Input::get('By') == 'completed') @if($percentage == 100 )
{{{ $course->course_title }}} @if($course->featured) @else @endif

{{{ str_limit(ucfirst($course->course_title),30) }}}

@if($course->pricing != 0) {!! SiteHelpers::getCurrencymethod($course->user_id,$course->pricing) !!} @else {!! Lang::get('core.free') !!} @endif

@endif @else
{{{ $course->course_title }}} @if($course->featured =='') @else @endif

{{{ str_limit(ucfirst($course->course_title),30) }}}

@if($course->pricing != 0) {{ $currency.' '.$course->pricing}} @else {!! Lang::get('core.free') !!} @endif

@endif @endforeach
@stop