<?php
/** @var yii\web\View $this */
/** @var app\models\MasAssessment $model */
/** @var array $courses */

use yii\helpers\Url;
use yii\widgets\ActiveForm;

$this->title = 'New Assessment';
?>

<div class="page-title">
    <i class="fas fa-clipboard-list"></i> New Assessment
    <a href="<?= Url::to(['assessment/index']) ?>" class="lms-btn lms-btn-primary lms-btn-sm" style="margin-left:auto;">
        <i class="fas fa-arrow-left"></i> Back
    </a>
</div>

<?php $form = ActiveForm::begin([
    'id'      => 'assessment-form',
    'options' => ['enctype' => 'multipart/form-data', 'autocomplete' => 'off'],
    'fieldConfig' => ['errorOptions' => ['class' => 'field-error']],
]); ?>

<?= $this->render('_form', compact('model', 'courses', 'form')) ?>

<div style="margin-top:20px;">
    <?= \yii\helpers\Html::submitButton('<i class="fas fa-save"></i> Save Assessment', ['class' => 'lms-btn lms-btn-success']) ?>
    <a href="<?= Url::to(['assessment/index']) ?>" class="lms-btn lms-btn-secondary" style="margin-left:8px;">Cancel</a>
</div>

<?php ActiveForm::end(); ?>
