Skip to content

Commit

Permalink
MVP v1. Admin, Student, Tutor dashboards created and tested
Browse files Browse the repository at this point in the history
  • Loading branch information
charlestang06 committed Mar 5, 2024
1 parent e55296c commit 10386b9
Show file tree
Hide file tree
Showing 13 changed files with 317 additions and 39 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Iridium Tutoring](https://www.iridiumtutoring.org) is a nationwide 501(c)(3) nonprofit tutoring organization serving K-12 students with free, personalized educational support in all subjects. Our mission is to provide high-quality, accessible, and equitable tutoring to students in need, regardless of their background or financial status. We are committed to helping students reach their full potential and achieve academic success.

This dashboard streamlines the tutoring session registration process and tutor sign-up process to a non-Google-Sheets/Forms hosted platform. Developed by the 2024 Iridium Tutoring director team (Charles Tang). Utilizes Model-View-Template (MVT) architecture for Tutors, Students, and TutoringSessions.
This dashboard streamlines the tutoring session registration process and tutor sign-up process to a non-Google-Sheets/Forms-hosted platform. Developed by the 2024 Iridium Tutoring director team (Charles Tang). Utilizes Model-View-Template (MVT) architecture for `Tutors`, `Students`, and `Tutoring-Sessions`.


## Tech Stack
Expand All @@ -13,8 +13,9 @@ This dashboard streamlines the tutoring session registration process and tutor s
## Features
[x] Admin dashboard (manage tutor, student, session registrations)
[x] Student session registration (sign up for tutoring sessions, email confirmation, automatic account generation)
[] Student dashboard (login/logout, see past/upcoming sessions, register session, see tutor details)
[] Tutor dashboard (login/logout, see available sessions, see historical sessions, volunteering hours, sign up for sessions, past taken sessions, add sessions)
[x] Student dashboard (login/logout, see past/upcoming sessions, register session, see session details, see tutor details)
[x] Tutor session dashboard (login/logout, see available sessions, see historical sessions, sign up for sessions, past taken sessions, add session)
[] Tutor profile dashboard (volunteering hours)
[] Admin dashboard (sort by model, create new tutor form, create new session form)
[] Deployed onto DigitalOcean (thanks to nonprofit credits), subdomain of iridiumtutoring.org

Expand Down
Binary file modified db.sqlite3
Binary file not shown.
Binary file modified iridisite/__pycache__/urls.cpython-312.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion iridisite/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from django.urls import include, path

urlpatterns = [
path("tutoring_student/", include("tutoring_student.urls")),
path("", include("tutoring_student.urls")),
path('admin/', admin.site.urls),
path("__debug__/", include("debug_toolbar.urls")),
]
Binary file modified tutoring_student/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file modified tutoring_student/__pycache__/views.cpython-312.pyc
Binary file not shown.
40 changes: 34 additions & 6 deletions tutoring_student/templates/tutoring_student/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<!-- Header -->
<head>
<meta charset="UTF-8" />
<link
Expand All @@ -11,8 +12,11 @@
<title>Iridium Tutoring</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<!-- Body -->
<body>
{% load static %}

<!-- Nav Bar-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
Expand All @@ -39,18 +43,18 @@
<a class="nav-link active" aria-current="page" href="{% url 'tutoring_student:index' %}">Home</a>
<a class="nav-link" href="{% url 'tutoring_student:studentView' %}">Student Portal</a>
<a class="nav-link" href="{% url 'tutoring_student:tutorView' %}">Tutor Portal</a>
<a class="nav-link" href="https://www.iridiumtutoring.org"
>Back To Main Site</a
>
s
</div>
</div>
<div class="nav navbar-nav ml-auto mr-0">
<a class="nav-link" href="https://www.iridiumtutoring.org">Back To Main Site</a>
</div>
</div>
</nav>

<!-- Form to create a new tutoring session -->
<div class="container mt-3">
<h1 class="text-center">Register for a Tutoring Session</h1>
<h1 class="text-center mt-5">Register for a Tutoring Session</h1>

<div class="row justify-content-md-center">
<div class="col d-none d-md-block"></div>
Expand Down Expand Up @@ -122,14 +126,26 @@ <h1 class="text-center">Register for a Tutoring Session</h1>

<div class="mb-3">
<label for="duration" class="form-label">Duration (hours)</label>
<input
{% comment %} <input
type="number"
name="duration"
id="duration"
class="form-control"
value="{{duration}}"
required
/>
/> {% endcomment %}
<select
name="duration"
id="duration"
class="form-select"
type="number"
value={{duration}}
required
>
<option value="0.5">0.5</option>
<option value="1">1</option>
<option value="1.5">1.5</option>
</select>
<div id="durationHelp" class="form-text">
Most commonly, sessions are 0.5, 1, or 1.5 hours.
</div>
Expand Down Expand Up @@ -205,10 +221,22 @@ <h1 class="text-center">Register for a Tutoring Session</h1>
<div class="col d-none d-md-block"></div>
</div>
</div>

<!-- Footer-->
<footer class="bg-body-tertiary text-center">
<div class="container p-4"></div>
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.05);">
© 2024 Copyright.
<a class="text-body" href="https://www.iridiumtutoring.org/">iridiumtutoring.org</a>
</div>
</footer>
</body>

<!-- BootstrapJS -->
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"
></script>

</html>
78 changes: 78 additions & 0 deletions tutoring_student/templates/tutoring_student/session-student.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<title>Iridium Tutoring</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!-- Nav Bar-->
{% load static %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark navbar-inverse">
<div class="container-fluid">
<a class="navbar-brand" href="https://www.iridiumtutoring.org"><img src="{% static 'tutoring_student/images/iridiumbannerheader.png' %}" class="img-fluid" style="height: 3rem" alt="Iridium Tutoring Logo" /></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link" href="{% url 'tutoring_student:index' %}">Home</a>
<a class="nav-link active" aria-current="page" href="">Student Portal</a>
</div>
</div>

<!-- Align with right side of navbar -->
<div class="nav navbar-nav ml-auto mr-0">
{% if not user %}
<a class="nav-link" href="https://www.iridiumtutoring.org">Back To Main Site</a>
{% endif %}
{% if user %}
<a href="{% url 'tutoring_student:student_logout' %}">
<button class="btn btn-outline-light">Logout</button>
</a>
{% endif %}
</div>
</div>
</nav>
<!-- End Nav Bar-->
<div class="container mt-lg-5">
{% if error_message %}
<div class="alert alert-danger">
<h3>{{ error_message }}</h3>
</div>
{% if button %}
<a class="btn btn-primary btn-lg" href="{% url 'tutoring_student:index' %}" role="button">Back to Home</a>
{% endif %}
{% else %}
{% if tutoringSession %}
<div class="jumbotron">
<h2 class="display-4">Thank you for registering, {{ tutoringSession.student.studentName }}!</h2>
<p class="lead">Here are the details of your tutoring session:</p>
<ul>
<li><strong>Student:</strong> {{ tutoringSession.student.studentName }}</li>
<li><strong>Subject:</strong> {{ tutoringSession.subject }} - {{ tutoringSession.description }}</li>
<li><strong>Date:</strong> {{ tutoringSession.date }} - {{ tutoringSession.time }} ({{ tutoringSession.duration }} hours)</li>
{% if tutoringSession.tutor %}
<li><strong>Tutor:</strong> {{ tutoringSession.tutor.tutorName }} - <a href="mailto:{{tutoringSession.tutor.email}}">{{tutoringSession.tutor.email}}</a></li>
{% endif %}
</ul>
{% if not tutoringSession.tutor %}
<p class="lead">A tutor will reach out soon about the details of your session. If you have any questions, please contact us at <a href="mailto:[email protected]">[email protected]</a>.</p>
{% else %}
<p class="lead">{{tutoringSession.tutor.tutorName}} has signed up for your session and will reach out soon about the details of your session. If you have any questions, feel free to contact us at <a href="mailto:[email protected]">[email protected]</a>.</p>
{% endif %}
<a class="btn btn-primary btn-lg" href="{% url 'tutoring_student:studentView' %}" role="button">Go Back</a>
</div>
{% endif %}
{% endif %}
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

</html>
93 changes: 93 additions & 0 deletions tutoring_student/templates/tutoring_student/session-tutor.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<title>Iridium Tutoring</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!-- Nav Bar-->
{% load static %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark navbar-inverse">
<div class="container-fluid">
<a class="navbar-brand" href="https://www.iridiumtutoring.org"><img src="{% static 'tutoring_student/images/iridiumbannerheader.png' %}" class="img-fluid" style="height: 3rem" alt="Iridium Tutoring Logo" /></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link" href="{% url 'tutoring_student:index' %}">Home</a>
<a class="nav-link active" aria-current="page" href="">Tutor Portal</a>
</div>
</div>

<!-- Align with right side of navbar -->
<div class="nav navbar-nav ml-auto mr-0">
{% if not user %}
<a class="nav-link" href="https://www.iridiumtutoring.org">Back To Main Site</a>
{% endif %}
{% if user %}
<a href="{% url 'tutoring_student:tutor_logout' %}">
<button class="btn btn-outline-light">Logout</button>
</a>
{% endif %}
</div>
</div>
</nav>
<!-- End Nav Bar-->
<div class="container mt-lg-5">
{% if error_message %}
<div class="alert alert-danger">
<h3>{{ error_message }}</h3>
</div>
{% if button %}
<a class="btn btn-primary btn-lg" href="{% url 'tutoring_student:index' %}" role="button">Back to Home</a>
{% endif %}
{% else %}
{% if tutoringSession %}
<div class="jumbotron">
<h2 class="display-4">{{ tutoringSession.student.studentName }}'s registration</h2>
<p class="lead">Here are the details of your {{ tutoringSession.student.studentName }}'s session:</p>
<ul>
<li><strong>Student:</strong> {{ tutoringSession.student.studentName }}</li>
<li><strong>Email:</strong> <a href="mailto:{{tutoringSession.student.email}}">{{tutoringSession.student.email}}</a></li>
{% if tutoringSession.student.phone %}
<li><strong>Phone:</strong> {{ tutoringSession.student.phone }}</li>
{% endif %}
<li><strong>Subject:</strong> {{ tutoringSession.subject }} - {{ tutoringSession.description }}</li>
<li><strong>Date:</strong> {{ tutoringSession.date }} - {{ tutoringSession.time }} ({{ tutoringSession.duration }} hours)</li>
{% if tutoringSession.tutor %}
<li><strong>Tutor:</strong> {{ tutoringSession.tutor.tutorName }} - <a href="mailto:{{tutoringSession.tutor.email}}">{{tutoringSession.tutor.email}}</a></li>
{% endif %}
</ul>
{% if not tutoringSession.tutor %}
<p class="lead">You may contact the student via their email of phone number to ask any additional questions about their request. If the student asks to change the time/topic, please contact an administrator to update the session accordingly. To claim this session, press the claim session button below and follow up with an email to the student.</p>
<form method="post" action="{% url 'tutoring_student:session_details_tutor' tutoringSession.id%}">
{% csrf_token %}
<input type="hidden" name="claim" value="True">
<button type="submit" class="btn btn-primary btn-lg" role="button">Claim Session</button>
</form>
{% elif tutoringSession.tutor.tutorName == tutor.tutorName and tutoringSession.tutor.email == tutor.email %}
<form method="post" action="{% url 'tutoring_student:session_details_tutor' tutoringSession.id%}">
{% csrf_token %}
<input type="hidden" name="claim" value="False">
<button type="submit" class="btn btn-primary btn-lg" role="button">Unclaim Session</button>
</form>
{% else %}
<p class="lead">{{tutoringSession.tutor.tutorName}} has signed up for this session.</p>
{% endif %}
<a class="btn btn-secondary btn-lg mt-3" href="{% url 'tutoring_student:tutorView' %}" role="button">Go Back</a>
</div>
{% endif %}
{% endif %}
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

</html>
Loading

0 comments on commit 10386b9

Please sign in to comment.