277 lines
11 KiB
HTML
277 lines
11 KiB
HTML
<!doctype html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" href="/static/style.css" />
|
|
<title>Ajouter une note - EduGrade</title>
|
|
</head>
|
|
<body>
|
|
<div class="dashboard-wrapper">
|
|
<nav class="navbar">
|
|
<div class="nav-brand">
|
|
<svg
|
|
width="35"
|
|
height="35"
|
|
viewBox="0 0 60 60"
|
|
fill="none"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<rect
|
|
width="60"
|
|
height="60"
|
|
rx="15"
|
|
fill="white"
|
|
fill-opacity="0.2"
|
|
/>
|
|
<path
|
|
d="M30 15L40 25L30 35L20 25L30 15Z"
|
|
fill="white"
|
|
/>
|
|
<path
|
|
d="M30 25L40 35L30 45L20 35L30 25Z"
|
|
fill="white"
|
|
fill-opacity="0.7"
|
|
/>
|
|
</svg>
|
|
<span>EduGrade</span>
|
|
</div>
|
|
<div class="nav-links">
|
|
<a href="/prof/dashboard" class="nav-link">
|
|
<svg
|
|
width="18"
|
|
height="18"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
|
|
</svg>
|
|
Dashboard
|
|
</a>
|
|
<a href="/logout" class="btn-logout">
|
|
<svg
|
|
width="18"
|
|
height="18"
|
|
viewBox="0 0 20 20"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"
|
|
/>
|
|
</svg>
|
|
Déconnexion
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="content-wrapper">
|
|
<div class="page-header">
|
|
<h1>
|
|
<svg
|
|
width="30"
|
|
height="30"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
|
</svg>
|
|
Ajouter une note
|
|
</h1>
|
|
<p class="page-subtitle">
|
|
Saisissez une nouvelle note pour un élève
|
|
</p>
|
|
</div>
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %} {% for category, message in messages %}
|
|
<div class="message {{ category }}">{{ message }}</div>
|
|
{% endfor %} {% endif %} {% endwith %} {% if not eleves %}
|
|
<div class="alert alert-warning">
|
|
<svg
|
|
width="24"
|
|
height="24"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
|
|
/>
|
|
</svg>
|
|
<div>
|
|
<strong>Attention :</strong> Aucun élève disponible.
|
|
<a href="/prof/eleves/creer">Créez d'abord un élève</a>
|
|
</div>
|
|
</div>
|
|
{% endif %} {% if not matieres %}
|
|
<div class="alert alert-warning">
|
|
<svg
|
|
width="24"
|
|
height="24"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
|
|
/>
|
|
</svg>
|
|
<div>
|
|
<strong>Attention :</strong> Aucune matière disponible.
|
|
<a href="/prof/matieres/creer"
|
|
>Créez d'abord une matière</a
|
|
>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="form-card">
|
|
<form
|
|
action="/prof/notes/ajouter"
|
|
method="post"
|
|
class="grade-form"
|
|
>
|
|
<div class="form-group">
|
|
<label for="eleve_id">
|
|
<svg
|
|
width="18"
|
|
height="18"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
/>
|
|
</svg>
|
|
Élève
|
|
</label>
|
|
<select
|
|
id="eleve_id"
|
|
name="eleve_id"
|
|
required
|
|
{%
|
|
if
|
|
not
|
|
eleves
|
|
%}disabled{%
|
|
endif
|
|
%}
|
|
>
|
|
<option value="">Sélectionner un élève</option>
|
|
{% for eleve in eleves %}
|
|
<option value="{{ eleve.id }}">
|
|
{{ eleve.nom }} {{ eleve.prenom }} ({{
|
|
eleve.login }})
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="matiere_id">
|
|
<svg
|
|
width="18"
|
|
height="18"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
d="M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1z"
|
|
/>
|
|
</svg>
|
|
Matière
|
|
</label>
|
|
<select
|
|
id="matiere_id"
|
|
name="matiere_id"
|
|
required
|
|
{%
|
|
if
|
|
not
|
|
matieres
|
|
%}disabled{%
|
|
endif
|
|
%}
|
|
>
|
|
<option value="">
|
|
Sélectionner une matière
|
|
</option>
|
|
{% for matiere in matieres %}
|
|
<option value="{{ matiere.id }}">
|
|
{{ matiere.code }} - {{ matiere.nom }} ({{
|
|
matiere.ue_code }})
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="note">
|
|
<svg
|
|
width="18"
|
|
height="18"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"
|
|
/>
|
|
</svg>
|
|
Note (sur 20)
|
|
</label>
|
|
<input
|
|
type="number"
|
|
id="note"
|
|
name="note"
|
|
step="0.25"
|
|
min="0"
|
|
max="20"
|
|
placeholder="15.5"
|
|
required
|
|
{%
|
|
if
|
|
not
|
|
eleves
|
|
or
|
|
not
|
|
matieres
|
|
%}disabled{%
|
|
endif
|
|
%}
|
|
/>
|
|
<small class="form-hint"
|
|
>Entrez une note entre 0 et 20 (ex: 15.5)</small
|
|
>
|
|
</div>
|
|
|
|
<button
|
|
type="submit"
|
|
class="btn btn-primary btn-large"
|
|
{%
|
|
if
|
|
not
|
|
eleves
|
|
or
|
|
not
|
|
matieres
|
|
%}disabled{%
|
|
endif
|
|
%}
|
|
>
|
|
<svg
|
|
width="20"
|
|
height="20"
|
|
viewBox="0 0 24 24"
|
|
fill="currentColor"
|
|
>
|
|
<path
|
|
d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
/>
|
|
</svg>
|
|
Enregistrer la note
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|