v02 until Student Login
This commit is contained in:
parent
eb00b2d192
commit
331792d992
BIN
assets/pasted-20251210-161034-71c4025f.jpg
Normal file
BIN
assets/pasted-20251210-161034-71c4025f.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
BIN
assets/vm-shot-2025-12-10T16-08-25-291Z.jpg
Normal file
BIN
assets/vm-shot-2025-12-10T16-08-25-291Z.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
@ -180,3 +180,8 @@ if EMAIL_USE_SSL:
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
# Authentication
|
||||
LOGIN_URL = 'core:login'
|
||||
LOGIN_REDIRECT_URL = 'core:student_dashboard'
|
||||
LOGOUT_REDIRECT_URL = 'core:login'
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1,13 +1,68 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}{{ article.title }}{% endblock %}
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1>{{ article.title }}</h1>
|
||||
<p class="text-muted">Published on {{ article.created_at|date:"F d, Y" }}</p>
|
||||
<hr>
|
||||
<div>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
.article-container {
|
||||
max-width: 800px;
|
||||
margin: 40px auto;
|
||||
padding: 40px;
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
||||
}
|
||||
.article-header h1 {
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.article-header .text-muted {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.article-content {
|
||||
line-height: 1.8;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.article-content h2, .article-content h3 {
|
||||
font-weight: 600;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.article-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{% url 'core:student_dashboard' %}">Student Dashboard</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'core:student_dashboard' %}">Back to Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'core:logout' %}">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="article-container">
|
||||
<header class="article-header text-center">
|
||||
<h1>{{ article.title }}</h1>
|
||||
<p class="text-muted">Published on {{ article.created_at|date:"F d, Y" }}</p>
|
||||
</header>
|
||||
<div class="article-content">
|
||||
{{ article.content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,63 +1,133 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h1 class="my-4">{{ assignment.title }}</h1>
|
||||
<p>{{ assignment.description }}</p>
|
||||
<hr>
|
||||
<h3>Exercises</h3>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
.assignment-container {
|
||||
padding: 40px;
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
}
|
||||
.assignment-header {
|
||||
margin-bottom: 32px;
|
||||
padding-bottom: 24px;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
}
|
||||
.assignment-header h2 {
|
||||
font-weight: bold;
|
||||
}
|
||||
.exercise-card {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
margin-bottom: 24px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.07);
|
||||
}
|
||||
.exercise-question {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #6a11cb;
|
||||
border-color: #6a11cb;
|
||||
}
|
||||
.btn-secondary {
|
||||
background-color: #566573;
|
||||
border-color: #566573;
|
||||
}
|
||||
.hint-container {
|
||||
background-color: #eaf2f8;
|
||||
border-left: 4px solid #3498db;
|
||||
padding: 16px;
|
||||
margin-top: 16px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{% url 'core:student_dashboard' %}">Student Dashboard</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'core:student_dashboard' %}">Back to Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'core:logout' %}">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="assignment-container">
|
||||
<header class="assignment-header">
|
||||
<h2>{{ assignment.title }}</h2>
|
||||
<p class="text-muted">{{ assignment.description }}</p>
|
||||
</header>
|
||||
|
||||
{% for exercise in assignment.exercises.all %}
|
||||
<div class="card my-3">
|
||||
<div class="card-body">
|
||||
<p class="card-text">{{ exercise.question }}</p>
|
||||
<form method="post" action="{% url 'core:assignment_detail' assignment.id %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="exercise_id" value="{{ exercise.id }}">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" name="answer" rows="3" placeholder="Your answer"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<button type="button" class="btn btn-info get-hint" data-exercise-id="{{ exercise.id }}">Get Hint</button>
|
||||
<button type="button" class="btn btn-danger call-teacher">Call Teacher</button>
|
||||
</form>
|
||||
<div class="hint-container mt-3" id="hint-for-{{ exercise.id }}" style="display: none;">
|
||||
<div class="alert alert-info hint-text"></div>
|
||||
<div class="exercise-card">
|
||||
<h4 class="border-bottom pb-2 mb-3">Exercise {{ forloop.counter }}</h4>
|
||||
<p class="exercise-question">{{ exercise.question }}</p>
|
||||
|
||||
<form method="post" action="{% url 'core:assignment_detail' assignment.id %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="exercise_id" value="{{ exercise.id }}">
|
||||
<div class="form-group mb-3">
|
||||
<textarea class="form-control" name="answer" rows="4" placeholder="Write your answer here..."></textarea>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<button type="submit" class="btn btn-primary">Submit Answer</button>
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-secondary get-hint" data-exercise-id="{{ exercise.id }}"><i class="fas fa-lightbulb me-1"></i> Get a Hint</button>
|
||||
<button type="button" class="btn btn-outline-danger call-teacher"><i class="fas fa-phone me-1"></i> Call Teacher</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="hint-container mt-3" id="hint-for-{{ exercise.id }}" style="display: none;">
|
||||
<div class="hint-text"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const hintButtons = document.querySelectorAll('.get-hint');
|
||||
hintButtons.forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
const exerciseId = this.dataset.exerciseId;
|
||||
fetch(`/hint/${exerciseId}/`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const hintContainer = document.querySelector(`#hint-for-${exerciseId}`);
|
||||
const hintText = hintContainer.querySelector('.hint-text');
|
||||
hintText.textContent = data.hint;
|
||||
hintContainer.style.display = 'block';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
const callTeacherButtons = document.querySelectorAll('.call-teacher');
|
||||
callTeacherButtons.forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
fetch(`/call-teacher/`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
alert(data.message);
|
||||
});
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const hintButtons = document.querySelectorAll('.get-hint');
|
||||
hintButtons.forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
const exerciseId = this.dataset.exerciseId;
|
||||
fetch(`/hint/${exerciseId}/`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const hintContainer = document.querySelector(`#hint-for-${exerciseId}`);
|
||||
const hintText = hintContainer.querySelector('.hint-text');
|
||||
hintText.textContent = data.hint;
|
||||
hintContainer.style.display = 'block';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
const callTeacherButtons = document.querySelectorAll('.call-teacher');
|
||||
callTeacherButtons.forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
fetch(`/call-teacher/`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
alert(data.message);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<h1 class="display-4">Welcome to CodeCraft</h1>
|
||||
<p class="lead">The ultimate platform for coding challenges and assignments. Sharpen your skills, compete with peers, and get feedback from instructors.</p>
|
||||
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
|
||||
<a href="#" class="btn btn-primary btn-lg">Student Portal</a>
|
||||
<a href="{% url 'core:login' %}" class="btn btn-primary btn-lg">Student Portal</a>
|
||||
<a href="#" class="btn btn-secondary btn-lg">Teacher Login</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
93
core/templates/core/login.html
Normal file
93
core/templates/core/login.html
Normal file
@ -0,0 +1,93 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<style>
|
||||
.login-page {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 80vh;
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
.login-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.login-branding {
|
||||
background: linear-gradient(to right, #6a11cb, #2575fc);
|
||||
color: white;
|
||||
padding: 40px;
|
||||
width: 45%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.login-branding h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.login-form-wrapper {
|
||||
background: white;
|
||||
padding: 40px;
|
||||
width: 55%;
|
||||
}
|
||||
.form-control {
|
||||
height: 48px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #6a11cb;
|
||||
border-color: #6a11cb;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="login-page">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10">
|
||||
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
||||
<div class="card-body p-0">
|
||||
<div class="row m-0">
|
||||
<div class="col-lg-6 d-none d-lg-flex align-items-center justify-content-center bg-primary text-white flex-column p-5" style="border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem;">
|
||||
<h1 class="h2 font-weight-bold">Welcome Back</h1>
|
||||
<p class="text-white-75">Sign in to access your student dashboard and continue your learning journey.</p>
|
||||
</div>
|
||||
<div class="col-lg-6 p-5">
|
||||
<h3 class="font-weight-light mb-4">Student Login</h3>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="form-group mb-3">
|
||||
{{ form.username.label_tag }}
|
||||
<input type="text" name="username" class="form-control" placeholder="Enter your username">
|
||||
</div>
|
||||
<div class="form-group mb-4">
|
||||
{{ form.password.label_tag }}
|
||||
<input type="password" name="password" class="form-control" placeholder="Enter your password">
|
||||
</div>
|
||||
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger mb-3">
|
||||
Your username and password didn't match. Please try again.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-block w-100">Sign In</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -1,17 +1,104 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h1 class="my-4">Student Dashboard</h1>
|
||||
<div class="list-group">
|
||||
<style>
|
||||
body {
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
.dashboard-container {
|
||||
padding: 40px;
|
||||
}
|
||||
.header {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.header h2 {
|
||||
font-weight: bold;
|
||||
}
|
||||
.assignment-card {
|
||||
background-color: white;
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
||||
transition: transform 0.2s;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.assignment-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
.assignment-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.assignment-due-date {
|
||||
color: #6c757d;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #6a11cb;
|
||||
border-color: #6a11cb;
|
||||
}
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 40px;
|
||||
background-color: white;
|
||||
border-radius: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Student Dashboard</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Courses</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Grades</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ user.username }}
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li><a class="dropdown-item" href="#">Profile</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="{% url 'core:logout' %}">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="dashboard-container">
|
||||
<header class="header">
|
||||
<h2>Welcome, {{ user.username }}!</h2>
|
||||
<p class="text-muted">Here are your current assignments. Stay on track!</p>
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
{% for assignment in assignments %}
|
||||
<a href="{% url 'core:assignment_detail' assignment.id %}" class="list-group-item list-group-item-action">
|
||||
<div class="d-flex w-100 justify-content-between">
|
||||
<h5 class="mb-1">{{ assignment.title }}</h5>
|
||||
<small>Due: {{ assignment.due_date }}</small>
|
||||
</div>
|
||||
<p class="mb-1">{{ assignment.description }}</p>
|
||||
</a>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="assignment-card">
|
||||
<h5 class="assignment-title">{{ assignment.title }}</h5>
|
||||
<p class="assignment-due-date">Due: {{ assignment.due_date|date:"M d, Y" }}</p>
|
||||
<p>{{ assignment.description|truncatewords:15 }}</p>
|
||||
<a href="{% url 'core:assignment_detail' assignment.id %}" class="btn btn-primary">View Details</a>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-12">
|
||||
<div class="empty-state">
|
||||
<i class="fas fa-check-circle fa-3x text-success mb-3"></i>
|
||||
<h4>You're all caught up!</h4>
|
||||
<p class="text-muted">No pending assignments at the moment. Great job!</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
12
core/urls.py
12
core/urls.py
@ -1,11 +1,21 @@
|
||||
from django.urls import path
|
||||
|
||||
from .views import home, student_dashboard, assignment_detail, get_hint, call_teacher
|
||||
from .views import (
|
||||
home,
|
||||
student_dashboard,
|
||||
assignment_detail,
|
||||
get_hint,
|
||||
call_teacher,
|
||||
login_view,
|
||||
logout_view,
|
||||
)
|
||||
|
||||
app_name = "core"
|
||||
|
||||
urlpatterns = [
|
||||
path("", home, name="home"),
|
||||
path("login/", login_view, name="login"),
|
||||
path("logout/", logout_view, name="logout"),
|
||||
path("dashboard/", student_dashboard, name="student_dashboard"),
|
||||
path("assignment/<int:assignment_id>/", assignment_detail, name="assignment_detail"),
|
||||
path("hint/<int:exercise_id>/", get_hint, name="get_hint"),
|
||||
|
||||
@ -3,14 +3,18 @@ import platform
|
||||
import random
|
||||
|
||||
from django import get_version as django_version
|
||||
from django.contrib.auth import authenticate, login, logout
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.contrib.auth.forms import AuthenticationForm
|
||||
from django.http import JsonResponse
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from django.shortcuts import render, get_object_or_404, redirect
|
||||
from django.utils import timezone
|
||||
|
||||
from .models import Assignment, Exercise, Hint, Submission
|
||||
|
||||
|
||||
def home(request):
|
||||
"""Render the landing screen with loader and environment details."""
|
||||
"""Render the landing screen with loader and environment details."""
|
||||
host_name = request.get_host().lower()
|
||||
agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic"
|
||||
now = timezone.now()
|
||||
@ -27,10 +31,34 @@ def home(request):
|
||||
}
|
||||
return render(request, "core/index.html", context)
|
||||
|
||||
|
||||
def login_view(request):
|
||||
if request.method == 'POST':
|
||||
form = AuthenticationForm(request, data=request.POST)
|
||||
if form.is_valid():
|
||||
username = form.cleaned_data.get('username')
|
||||
password = form.cleaned_data.get('password')
|
||||
user = authenticate(username=username, password=password)
|
||||
if user is not None:
|
||||
login(request, user)
|
||||
return redirect('core:student_dashboard')
|
||||
else:
|
||||
form = AuthenticationForm()
|
||||
return render(request, 'core/login.html', {'form': form})
|
||||
|
||||
|
||||
def logout_view(request):
|
||||
logout(request)
|
||||
return redirect('core:login')
|
||||
|
||||
|
||||
@login_required
|
||||
def student_dashboard(request):
|
||||
assignments = Assignment.objects.all()
|
||||
return render(request, "core/student_dashboard.html", {"assignments": assignments})
|
||||
|
||||
|
||||
@login_required
|
||||
def assignment_detail(request, assignment_id):
|
||||
assignment = get_object_or_404(Assignment, pk=assignment_id)
|
||||
if request.method == 'POST':
|
||||
@ -56,6 +84,8 @@ def assignment_detail(request, assignment_id):
|
||||
|
||||
return render(request, "core/assignment_detail.html", {"assignment": assignment})
|
||||
|
||||
|
||||
@login_required
|
||||
def get_hint(request, exercise_id):
|
||||
exercise = get_object_or_404(Exercise, pk=exercise_id)
|
||||
hints = exercise.hints.all()
|
||||
@ -64,6 +94,9 @@ def get_hint(request, exercise_id):
|
||||
return JsonResponse({'hint': hint.hint_text})
|
||||
return JsonResponse({'hint': 'No hints available for this exercise.'})
|
||||
|
||||
|
||||
@login_required
|
||||
def call_teacher(request):
|
||||
# In a real application, this would trigger a notification to the teacher
|
||||
return JsonResponse({'message': 'A teacher has been called to help you.'})
|
||||
|
||||
|
||||
62
create_dummy_data.py
Normal file
62
create_dummy_data.py
Normal file
@ -0,0 +1,62 @@
|
||||
from django.contrib.auth.models import User
|
||||
from core.models import Assignment, Exercise, Hint
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
# Create a student user
|
||||
student, created = User.objects.get_or_create(username='student', defaults={'first_name': 'John', 'last_name': 'Doe'})
|
||||
if created:
|
||||
student.set_password('password')
|
||||
student.save()
|
||||
print("Student user created.")
|
||||
else:
|
||||
print("Student user already exists.")
|
||||
|
||||
# Create an assignment
|
||||
assignment, created = Assignment.objects.get_or_create(
|
||||
title='Math Homework 1',
|
||||
defaults={
|
||||
'description': 'Complete the following exercises.',
|
||||
'due_date': datetime.now() + timedelta(days=7)
|
||||
}
|
||||
)
|
||||
if created:
|
||||
print("Assignment created.")
|
||||
else:
|
||||
print("Assignment already exists.")
|
||||
|
||||
|
||||
# Create exercises
|
||||
exercise1, created = Exercise.objects.get_or_create(
|
||||
assignment=assignment,
|
||||
question='What is 2 + 2?',
|
||||
defaults={'answer': '4'}
|
||||
)
|
||||
if created:
|
||||
print("Exercise 1 created.")
|
||||
else:
|
||||
print("Exercise 1 already exists.")
|
||||
|
||||
|
||||
exercise2, created = Exercise.objects.get_or_create(
|
||||
assignment=assignment,
|
||||
question='What is 5 * 5?',
|
||||
defaults={'answer': '25'}
|
||||
)
|
||||
if created:
|
||||
print("Exercise 2 created.")
|
||||
else:
|
||||
print("Exercise 2 already exists.")
|
||||
|
||||
|
||||
# Create a hint
|
||||
hint, created = Hint.objects.get_or_create(
|
||||
exercise=exercise1,
|
||||
defaults={'hint_text': 'The answer is a single digit number.'}
|
||||
)
|
||||
|
||||
if created:
|
||||
print("Hint created.")
|
||||
else:
|
||||
print("Hint already exists.")
|
||||
|
||||
print("Dummy data creation complete.")
|
||||
@ -3,6 +3,7 @@
|
||||
--primary-color: #4285F4;
|
||||
--secondary-color: #FBBC05;
|
||||
--accent-color: #34A853;
|
||||
--tertiary-color: #EA4335;
|
||||
--neutral-light-gray: #F8F9FA;
|
||||
--neutral-dark-text: #202124;
|
||||
--font-headings: 'Poppins', sans-serif;
|
||||
@ -12,7 +13,7 @@
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
color: var(--neutral-dark-text);
|
||||
background-color: #fff;
|
||||
background-color: var(--neutral-light-gray);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@ -53,47 +54,347 @@ h1, h2, h3, h4, h5, h6 {
|
||||
border-color: #F9A825;
|
||||
}
|
||||
|
||||
.hero {
|
||||
padding: 100px 0;
|
||||
background: linear-gradient(135deg, #E3F2FD, #FFFFFF);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.btn-tertiary {
|
||||
background-color: var(--tertiary-color);
|
||||
border-color: var(--tertiary-color);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 3.5rem;
|
||||
.btn-tertiary:hover {
|
||||
background-color: #D93025;
|
||||
border-color: #D93025;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-branding {
|
||||
background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-branding-content h1 {
|
||||
font-size: 2.8rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.login-branding-content p {
|
||||
font-size: 1.1rem;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.login-form-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-form-container {
|
||||
max-width: 400px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-form-container h2 {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 10px;
|
||||
color: var(--neutral-dark-text);
|
||||
}
|
||||
|
||||
.hero .lead {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 40px;
|
||||
color: #5f6368;
|
||||
.login-form {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.features-section {
|
||||
padding: 80px 0;
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background-color: var(--neutral-light-gray);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
padding: 30px;
|
||||
.form-group label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
color: var(--neutral-dark-text);
|
||||
}
|
||||
|
||||
.form-group input, .form-group textarea {
|
||||
width: 100%;
|
||||
padding: 12px 15px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.form-group input:focus, .form-group textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
|
||||
}
|
||||
|
||||
.btn-block {
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.login-form-footer {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* Student Dashboard */
|
||||
.dashboard-container {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 260px;
|
||||
background-color: var(--neutral-dark-text);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
padding: 25px 20px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.sidebar-header h3 {
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.sidebar-nav a {
|
||||
display: block;
|
||||
padding: 15px 20px;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.sidebar-nav a:hover, .sidebar-nav a.active {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.sidebar-nav a i {
|
||||
margin-right: 15px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding: 20px;
|
||||
border-top: 1px solid rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
display: block;
|
||||
text-align: center;
|
||||
background-color: var(--primary-color);
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.logout-btn:hover {
|
||||
background-color: #3367D6;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 260px;
|
||||
flex-grow: 1;
|
||||
background-color: var(--neutral-light-gray);
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background-color: #fff;
|
||||
padding: 30px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.header h2 {
|
||||
font-size: 2.2rem;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.assignments-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
.assignment-card {
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,0.05);
|
||||
.assignment-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 8px 20px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
.feature-card .icon {
|
||||
font-size: 3rem;
|
||||
color: var(--primary-color);
|
||||
.assignment-card-header {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.assignment-title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.assignment-due-date {
|
||||
font-size: 0.85rem;
|
||||
color: #5f6368;
|
||||
}
|
||||
|
||||
.assignment-card-body {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.assignment-card-footer {
|
||||
padding: 0 20px 20px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
grid-column: 1 / -1;
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.empty-state i {
|
||||
font-size: 4rem;
|
||||
color: var(--accent-color);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.empty-state h4 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Assignment Detail */
|
||||
.exercises-section {
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.exercise-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.exercise-card {
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.exercise-card-header {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.exercise-card-header h4 {
|
||||
margin: 0;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.exercise-card-body {
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
.exercise-question {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.exercise-actions {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.hint-container .alert {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 992px) {
|
||||
.login-container {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.login-branding {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.login-form-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: static;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
display: none; /* Or adjust to a dropdown menu */
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@
|
||||
--primary-color: #4285F4;
|
||||
--secondary-color: #FBBC05;
|
||||
--accent-color: #34A853;
|
||||
--tertiary-color: #EA4335;
|
||||
--neutral-light-gray: #F8F9FA;
|
||||
--neutral-dark-text: #202124;
|
||||
--font-headings: 'Poppins', sans-serif;
|
||||
@ -12,7 +13,7 @@
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
color: var(--neutral-dark-text);
|
||||
background-color: #fff;
|
||||
background-color: var(--neutral-light-gray);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@ -53,47 +54,347 @@ h1, h2, h3, h4, h5, h6 {
|
||||
border-color: #F9A825;
|
||||
}
|
||||
|
||||
.hero {
|
||||
padding: 100px 0;
|
||||
background: linear-gradient(135deg, #E3F2FD, #FFFFFF);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.btn-tertiary {
|
||||
background-color: var(--tertiary-color);
|
||||
border-color: var(--tertiary-color);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 3.5rem;
|
||||
.btn-tertiary:hover {
|
||||
background-color: #D93025;
|
||||
border-color: #D93025;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-branding {
|
||||
background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-branding-content h1 {
|
||||
font-size: 2.8rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.login-branding-content p {
|
||||
font-size: 1.1rem;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.login-form-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-form-container {
|
||||
max-width: 400px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-form-container h2 {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 10px;
|
||||
color: var(--neutral-dark-text);
|
||||
}
|
||||
|
||||
.hero .lead {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 40px;
|
||||
color: #5f6368;
|
||||
.login-form {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.features-section {
|
||||
padding: 80px 0;
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background-color: var(--neutral-light-gray);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
padding: 30px;
|
||||
.form-group label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
color: var(--neutral-dark-text);
|
||||
}
|
||||
|
||||
.form-group input, .form-group textarea {
|
||||
width: 100%;
|
||||
padding: 12px 15px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.form-group input:focus, .form-group textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
|
||||
}
|
||||
|
||||
.btn-block {
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.login-form-footer {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* Student Dashboard */
|
||||
.dashboard-container {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 260px;
|
||||
background-color: var(--neutral-dark-text);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
padding: 25px 20px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.sidebar-header h3 {
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.sidebar-nav a {
|
||||
display: block;
|
||||
padding: 15px 20px;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.sidebar-nav a:hover, .sidebar-nav a.active {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.sidebar-nav a i {
|
||||
margin-right: 15px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding: 20px;
|
||||
border-top: 1px solid rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
display: block;
|
||||
text-align: center;
|
||||
background-color: var(--primary-color);
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.logout-btn:hover {
|
||||
background-color: #3367D6;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 260px;
|
||||
flex-grow: 1;
|
||||
background-color: var(--neutral-light-gray);
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background-color: #fff;
|
||||
padding: 30px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.header h2 {
|
||||
font-size: 2.2rem;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.assignments-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
.assignment-card {
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,0.05);
|
||||
.assignment-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 8px 20px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
.feature-card .icon {
|
||||
font-size: 3rem;
|
||||
color: var(--primary-color);
|
||||
.assignment-card-header {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.assignment-title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.assignment-due-date {
|
||||
font-size: 0.85rem;
|
||||
color: #5f6368;
|
||||
}
|
||||
|
||||
.assignment-card-body {
|
||||
padding: 20px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.assignment-card-footer {
|
||||
padding: 0 20px 20px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
grid-column: 1 / -1;
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.empty-state i {
|
||||
font-size: 4rem;
|
||||
color: var(--accent-color);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.empty-state h4 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Assignment Detail */
|
||||
.exercises-section {
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.exercise-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.exercise-card {
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.exercise-card-header {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.exercise-card-header h4 {
|
||||
margin: 0;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.exercise-card-body {
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
.exercise-question {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.exercise-actions {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.hint-container .alert {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 992px) {
|
||||
.login-container {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.login-branding {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.login-form-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: static;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
display: none; /* Or adjust to a dropdown menu */
|
||||
}
|
||||
}
|
||||
BIN
staticfiles/pasted-20251210-161034-71c4025f.jpg
Normal file
BIN
staticfiles/pasted-20251210-161034-71c4025f.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
BIN
staticfiles/vm-shot-2025-12-10T16-08-25-291Z.jpg
Normal file
BIN
staticfiles/vm-shot-2025-12-10T16-08-25-291Z.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Loading…
x
Reference in New Issue
Block a user