@extends('layouts.vertical') @section('css') @endsection @php $is_duplicate = false; if(Route::currentRouteName() == 'curriculum.duplicate'){ $is_duplicate = true; } $is_update = false; $themes = []; if(isset($curriculum) && !empty($curriculum)){ $is_update = true; foreach($curriculum->themes as $theme){ $theme->key = $theme->_id; if(!isset($theme->aims) || (isset($theme->aims) && empty($theme->aims))){ $theme->hasAim = false; } if(isset($theme->aims) && !empty($theme->aims)){ foreach ($theme->aims as $aims) { $aims->key = $aims->_id; if(isset($aims->goals) && !empty($aims->goals)){ foreach ($aims->goals as $goal) { $goal->key = $goal->_id; $goal->keywords = implode(',', $goal->keywords); } } } } if(isset($theme->goals) && !empty($theme->goals)){ foreach ($theme->goals as $goal) { $goal->key = $goal->_id; $goal->keywords = implode(',', $goal->keywords); } } $themes[] = $theme; } } @endphp @section('breadcrumb')

{{$is_duplicate ? 'Add' : 'Edit' }} curriculum

@if($is_duplicate==false && $is_update && isset($curriculum->reference)) Reset curriculum @endif Save curriculum
@endsection @section('content')
@csrf @if($is_update && isset($curriculum->reference)) @endif
Curriculum details
hasKeywords == "true" ? 'checked' : '' }}>
Add new theme
@if($is_update && isset($curriculum->themes) && !empty($curriculum->themes)) @php $count=0; @endphp @foreach($curriculum->themes as $theme)
hasAim==true && isset($theme->aims) && !empty($theme->aims) ?'checked':''}}>
@php $count++; @endphp @endforeach @else
@endif
Add new aim
{{--

Note: Please tick the box 'Does this theme have an aim?' from above.

--}}
Name Description
Add learning goals
List of goals Keywords
@include('school.curriculum.addGoalModal') @include('school.curriculum.editGoalModal') @include('school.curriculum.addAimModal') @include('school.curriculum.editAimModal') @endsection @php // $themes = stripslashes(json_encode($themes, JSON_HEX_QUOT | JSON_HEX_APOS )); // $themes = str_ireplace(array('u0022'),"\\'",$themes); // $themes = str_ireplace(array('rnrn','rnt'),'',$themes); // $themes = str_ireplace(array("\r\n\t",'\r\n\t',"\r\n",'\r\n',"\n",'\n',"\t",'\t'),'
',$themes); @endphp @section('script-bottom') @endsection