IMMREX7
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
@include('layouts.partial.head')
<link rel="stylesheet" type="text/css" href="{{asset('dist/steps/jquery.steps.css')}}">
<body class="theme-purple">
<!-- Page Loader -->
<div class="page-loader-wrapper">
<div class="loader">
<div class="m-t-30"><img class="zmdi-hc-spin" src="{{asset('dist/images/logo.svg')}}" width="48" height="48" alt="schholMIS"></div>
<p>Please wait...</p>
</div>
</div>
<!-- Overlay For Sidebars -->
<div class="overlay"></div>
<!-- Right Sidebar -->
@include('layouts.partial.rightsidebar')
<section class="content" style="margin:0px;">
<div class="block-header">
<div class="row">
<div class="col-lg-7 col-md-6 col-sm-12">
<?php
$idstdsession = Session::get('idStudent');
$student = \App\AdmEntry::where('idStudent', '=', $idstdsession)->first();
$school = \App\School::where('idSchool', '=', $student->idSchool)->first();
?>
<h2>{{$school->schoolName}}
<small>Welcome to {{$school->schoolName}}</small>
</h2>
</div>
</div>
</div>
<div class="container-fluid">
@if(session()->has('message'))
<div class="alert alert-danger">
{{ session()->get('message') }}
</div>
@endif
@include('flash::message')
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Exam Questions</strong></h2>
</div>
<div class="body">
{!! Form::open(['url' => 'school/exam/questions','class'=>'form-horizontal','id'=>'form']) !!}
<div id="wizard">
<?php $j = 0; ?>
@foreach($paper as $value)
<?php $mcq = DB::table('exam_mcq_questions')->where('idMcq', $template->idMcq)->where('questionType', $value->typeName)->get();
$p = 1;
?>
@foreach($mcq as $mques)
<h2>Question ( <strong>{{$mques->marks}} mark</strong> )</h2>
<section>
<div class="row clearfix">
<div class="col-sm-10 offset-sm-2">
<div class="card">
<div class="header">
<h2><strong>Question</strong> <br>
@if($mques->questionType == "math_type")
<p style="margin-top: 20px;"><div class="mathfield" id="mv_{{$p}}">{{$mques->question}}</div></p>
@else
@if($mques->questionType != "image_image" && $mques->questionType != "images_questions" && $mques->questionType != "math_type")
<p style="margin-top: 20px;">{{$mques->question}}</p>
@else
<img src="{{ asset('storage/schools/'.$template->idSchool.'/mcq/'.$mques->question)}}" alt="questions" width="100px" style="margin: 20px;" />
@endif
@endif
</h2>
<hr>
</div>
<div class="body">
@if($mques->questionType == "mcq" || $mques->questionType == "images_questions")
<ul class="answer-group" style="list-style-type: upper-alpha !important;">
<li class="answer-group-item"> <p>{{$mques->answerA}}</p></li>
<li class="answer-group-item"> <p>{{$mques->answerB}}</p></li>
<li class="answer-group-item"> <p>{{$mques->answerC}}</p></li>
<li class="answer-group-item"> <p>{{$mques->answerD}}</p></li>
</ul>
<hr>
<p>Correct Answer is </p>
<?php $j++; ?>
<div class="row clearfix">
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="A">
<label for="radio_{{$j}}">
Option A
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="B">
<label for="radio_{{$j}}">
Option B
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="C">
<label for="radio_{{$j}}">
Option C
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="D">
<label for="radio_{{$j}}">
Option D
</label>
</div>
</div>
@else
@if($mques->questionType == "question_image" || $mques->questionType == "image_image" )
<div class="row clearfix">
<div class="col-sm-6">
A. <div class="answer-group-item"><img src="{{ asset('storage/schools/'.$template->idSchool.'/mcq/'.$mques->answerA)}}" alt="questions" width="100px"/></div>
</div><div class="col-sm-6">
B. <div class="answer-group-item"><img src="{{ asset('storage/schools/'.$template->idSchool.'/mcq/'.$mques->answerB)}}" alt="questions" width="100px"/></div>
</div><div class="row clearfix">
</div><div class="col-sm-6">
C. <div class="answer-group-item"><img src="{{ asset('storage/schools/'.$template->idSchool.'/mcq/'.$mques->answerC)}}" alt="questions" width="100px"/></div>
</div><div class="col-sm-6">
D. <div class="answer-group-item"><img src="{{ asset('storage/schools/'.$template->idSchool.'/mcq/'.$mques->answerD)}}" alt="questions" width="100px"/></div>
</div>
</div>
<hr>
<p>Correct Answer is </p>
<?php $j++; ?>
<div class="row clearfix">
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="A">
<label for="radio_{{$j}}">
Option A
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="B">
<label for="radio_{{$j}}">
Option B
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="C">
<label for="radio_{{$j}}">
Option C
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="D">
<label for="radio_{{$j}}">
Option D
</label>
</div>
</div>
@endif
@if($mques->questionType == "short" || $mques->questionType == "long")
<textarea class="form-control" placeholder="Write your answer here" rows="5"></textarea>
@endif
@if($mques->questionType == "image_long")
<div class="dropzone" id='frmFileUpload'>
<div class="dz-message">
<div class="drag-icon-cph"> <i class="material-icons">touch_app</i> </div>
<h3>Drop files here or click to upload.</h3>
<div class="fallback" id="dz-error-message">
<input name="file" type="file" multiple />
</div>
</div>
</div>
@endif
@if($mques->questionType == "math_type")
<div class="mathfield" id="mva_{{$p}}" style="margin-bottom: 10px;">A. {{$mques->answerA}}</div>
<div class="mathfield" id="mvb_{{$p}}" style="margin-bottom: 10px;">B. {{$mques->answerB}}</div>
<div class="mathfield" id="mvc_{{$p}}" style="margin-bottom: 10px;">C. {{$mques->answerC}}</div>
<div class="mathfield" id="mvd_{{$p}}">D. {{$mques->answerD}}</div>
<hr>
<p>Correct Answer is </p>
<?php $j++; ?>
<div class="row clearfix">
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="A">
<label for="radio_{{$j}}">
Option A
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="B">
<label for="radio_{{$j}}">
Option B
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="C">
<label for="radio_{{$j}}">
Option C
</label>
</div>
<?php $j++; ?>
<div class="col-sm-3 radio">
<input type="radio" name="radio[{{$mques->idQuestions}}]" id="radio_{{$j}}" value="D">
<label for="radio_{{$j}}">
Option D
</label>
</div>
</div>
<?php $p++; ?>
@endif
@endif
</div>
</div>
</div>
</div>
</section>
@endforeach
@endforeach
</div>
{!! Form::close() !!}
</div>
</div>
</div>
</div>
@include('layouts.partial.footer')
</div>
</section>
</div>
<!-- Scripts -->
@include('layouts.partial.script')
<script src="{{asset('dist/steps/jquery.steps.js')}}"></script>
<script>
$(function ()
{
$("#wizard").steps({
headerTag: "h2",
bodyTag: "section",
transitionEffect: "slideLeft",
stepsOrientation: "vertical"
});
});
</script>
<script type="module">
import MathLive from 'https://unpkg.com/mathlive/dist/mathlive.mjs';
@if(isset($template))
@foreach($paper as $value)
@if($value->typeName == "math_type")
<?php
$mcq = DB::table('exam_mcq_questions')->where('idMcq',$template->idMcq)->where('questionType',$value->typeName)->get();
$k = 1;
?>
@foreach($mcq as $mathValue)
MathLive.makeMathField('mv_{{$k}}',{
smartMode: true
});
MathLive.makeMathField('mva_{{$k}}',{
smartMode: true
});
MathLive.makeMathField('mvb_{{$k}}',{
smartMode: true
});
MathLive.makeMathField('mvc_{{$k}}',{
smartMode: true
});
MathLive.makeMathField('mvd_{{$k}}',{
smartMode: true
});
<?php $k++; ?>
@endforeach
@endif
@endforeach
@endif
</script>
<script>
Dropzone.options.frmFileUpload= {
autoProcessQueue: false,
url: "{{url('school/galleries')}}",
uploadMultiple: true,
parallelUploads: 50,
maxFiles: 20,
maxFilesize: 10,
acceptedFiles: 'image/*',
addRemoveLinks: true,
init: function() {
dzClosure = this;
this.on("error", function(file, response, xhr) {
if (response.hasOwnProperty('errors')) {
// Validation error
for (const error in response.errors) {
this.emit("error", file, response.errors[error].join(' '));
}
}
});
this.on('success', function(){
//if (this.getQueuedFiles().length == 0 && this.getUploadingFiles().length == 0) {
location.reload();
// }
});
}
}
</script>
</body>
</html>
Copyright © 2021 -