This repository has been archived on 2021-01-24. You can view files and clone it, but cannot push or open issues or pull requests.
laravel-elearning/resources/views/tests/new.blade.php

50 lines
2.1 KiB
PHP

@extends('layouts.base')
@section('content')
<div class="container-fluid">
<div class="col-md-6 col-md-offset-3">
@include('shared.session-flash')
@include('shared.validation-errors')
<h1>Create New Test</h1>
</br>
<form method="POST" action="/{{ Auth::user()->getAdminPath() }}/tests/new">
{{ csrf_field() }}
<div class="form-group">
<label>Title</label>
<input type="text" class="form-control" name="title" required maxlength="255">
</div>
<div class="form-group">
<label>Number of Questions</label>
<input type="number" class="form-control" name="question_count" min="1" required>
</div>
<div class="form-group">
<label>Number of Wrong Questions Allowed</label>
<input type="number" class="form-control" name="question_count_to_fail" min="0">
</div>
<div class="form-group">
<label>Time Limit</label>
<select class="form-control" name="time_limit">
<option value="0">No time limit</option>
<option value="1800">30 Min</option>
<option value="3600">60 Min</option>
<option value="5400">90 Min</option>
<option value="7200">120 Min</option>
</select>
</div>
@if (Auth::user()->isAdministrator())
<div class="form-group">
<label>Group</label>
<select class="form-control" name="group_id">
@foreach ($groups as $group)
<option value="{{ $group->id }}">{{ $group->name }}</option>
@endforeach
</select>
</div>
@endif
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
@stop