Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified classmanager/db.sqlite3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
357 changes: 343 additions & 14 deletions classmanager/template/classroom/add_marks.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,351 @@
<!--
Template for adding marks. This template can only be accessed by teachers and it contains form where teachers can add marks for specific student.
-->

{% extends 'classroom/base.html' %}
{% load bootstrap4 %}
{% block content %}

<div class="page-header">
<h1 class="page-title">
<i class="fas fa-plus-circle page-icon"></i>
Add Marks
</h1>
<p class="page-subtitle">Record academic performance for {{ student.name }}</p>
</div>

<div class="container">
<div class="jumbotron">
{% if marks_given %}
<h1>Marks added successfully.</h1>
<div class="success-card">
<div class="success-icon">
<i class="fas fa-check-circle"></i>
</div>
<h2 class="success-title">Marks Added Successfully</h2>
<p class="success-message">The marks have been recorded for {{ student.name }}.</p>
<div class="action-buttons">
<a href="{% url 'classroom:student_marks_list' pk=student.pk %}" class="btn btn-primary">
<i class="fas fa-eye"></i> View All Marks
</a>
<a href="{% url 'classroom:enter_marks' pk=student.pk %}" class="btn btn-outline-primary">
<i class="fas fa-plus"></i> Add More Marks
</a>
</div>
</div>
{% else %}
<h1>Give Marks to {{ student.name }}</h1>
<form method="post">
{% csrf_token %}
{% bootstrap_form form %}
<input type="submit" class="btn btn-danger" name="" value="Add Marks">
</form>
<div class="form-card">
<div class="card-header-custom">
<div class="header-icon">
<i class="fas fa-award"></i>
</div>
<h2>Record Marks for {{ student.name }}</h2>
</div>

<div class="form-content">
<form method="post" class="update-form">
{% csrf_token %}
<div class="custom-form-container">
{% bootstrap_form form %}
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary btn-submit">
<i class="fas fa-save"></i> Save Marks
</button>
<a href="javascript:history.back()" class="btn btn-outline-secondary">
<i class="fas fa-times"></i> Cancel
</a>
</div>
</form>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}

<style>
/* Page header styling */
.page-header {
margin-bottom: 2rem;
animation: fadeInDown 0.6s ease;
}

.page-title {
font-size: 2rem;
font-weight: 700;
color: var(--text-color);
margin-bottom: 0.5rem;
display: flex;
align-items: center;
}

.page-icon {
color: var(--primary-color);
font-size: 1.8rem;
margin-right: 0.75rem;
}

.page-subtitle {
font-size: 1.1rem;
color: var(--text-muted);
}

/* Card styling */
.form-card {
background-color: var(--card-bg);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
overflow: hidden;
margin-bottom: 2rem;
animation: fadeIn 0.8s ease;
transform: translateY(0);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
transform: translateY(-5px);
box-shadow: var(--box-shadow-lg);
}

.card-header-custom {
display: flex;
align-items: center;
padding: 1.5rem;
border-bottom: 1px solid var(--border-color);
background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(76, 201, 240, 0.05));
}

.header-icon {
width: 48px;
height: 48px;
border-radius: 50%;
background-color: rgba(67, 97, 238, 0.1);
color: var(--primary-color);
display: flex;
align-items: center;
justify-content: center;
margin-right: 1rem;
font-size: 1.5rem;
}

.card-header-custom h2 {
font-size: 1.5rem;
font-weight: 600;
color: var(--text-color);
margin: 0;
}

/* Form styling */
.form-content {
padding: 1.5rem;
}

.custom-form-container {
margin-bottom: 1.5rem;
}

/* Bootstrap form enhancements */
.form-group {
margin-bottom: 1.5rem;
animation: fadeIn 0.6s ease;
animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

.form-group label {
font-weight: 600;
color: var(--text-color);
margin-bottom: 0.5rem;
display: block;
}

.form-control {
border-radius: var(--border-radius-sm);
border: 1px solid var(--border-color);
padding: 0.75rem 1rem;
transition: all 0.3s;
font-size: 1rem;
background-color: white;
}

.form-control:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.15);
}

.form-text {
color: var(--text-muted);
font-size: 0.85rem;
margin-top: 0.25rem;
}

/* Form actions */
.form-actions {
display: flex;
gap: 1rem;
margin-top: 1rem;
}

.btn-submit {
background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
border: none;
padding: 0.75rem 1.5rem;
font-weight: 600;
transition: all 0.3s;
}

.btn-submit:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Success state styling */
.success-card {
background-color: var(--card-bg);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
padding: 3rem 2rem;
margin-bottom: 2rem;
text-align: center;
animation: successPulse 0.5s ease;
}

@keyframes successPulse {
0% { transform: scale(0.95); opacity: 0; }
70% { transform: scale(1.05); }
100% { transform: scale(1); opacity: 1; }
}

.success-icon {
width: 90px;
height: 90px;
border-radius: 50%;
background-color: rgba(52, 199, 89, 0.1);
color: var(--success-color);
display: flex;
align-items: center;
justify-content: center;
font-size: 2.5rem;
margin: 0 auto 1.5rem;
animation: checkmark 0.8s ease-in-out;
}

@keyframes checkmark {
0% { transform: scale(0); }
60% { transform: scale(1.25); }
100% { transform: scale(1); }
}

.success-title {
font-size: 1.8rem;
font-weight: 700;
color: var(--success-color);
margin-bottom: 0.75rem;
}

.success-message {
font-size: 1.1rem;
color: var(--text-color);
margin-bottom: 2rem;
}

.action-buttons {
display: flex;
justify-content: center;
gap: 1rem;
}

/* Button styling */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.65rem 1.25rem;
border-radius: var(--border-radius-sm);
font-weight: 500;
transition: all 0.3s;
border: none;
text-decoration: none;
}

.btn i {
margin-right: 0.5rem;
}

.btn-primary {
background-color: var(--primary-color);
color: white;
}

.btn-primary:hover {
background-color: var(--primary-dark);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
color: white;
text-decoration: none;
}

.btn-outline-primary {
background: transparent;
border: 1px solid var(--primary-color);
color: var(--primary-color);
}

.btn-outline-primary:hover {
background-color: rgba(67, 97, 238, 0.1);
transform: translateY(-2px);
text-decoration: none;
}

.btn-outline-secondary {
background: transparent;
border: 1px solid var(--border-color);
color: var(--text-muted);
}

.btn-outline-secondary:hover {
background-color: var(--bg-accent);
color: var(--text-color);
text-decoration: none;
}

/* Animations */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

@keyframes fadeInDown {
from {
opacity: 0;
transform: translate3d(0, -20px, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}

/* Responsive styles */
@media (max-width: 576px) {
.action-buttons,
.form-actions {
flex-direction: column;
width: 100%;
}

.action-buttons .btn,
.form-actions .btn {
width: 100%;
margin-bottom: 0.5rem;
}

.card-header-custom {
flex-direction: column;
text-align: center;
}

.header-icon {
margin-right: 0;
margin-bottom: 1rem;
}
}
</style>

{% endblock %}
Loading