Minor changes on dashboard

This commit is contained in:
Adil Mohammed 2023-01-13 10:16:46 +03:00
parent f23478653e
commit 26c01a22a2
11 changed files with 216 additions and 300 deletions

115
.gitignore vendored
View File

@ -1,53 +1,31 @@
# Created by https://www.gitignore.io
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Python ###
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/
*.py[cod] *.py[cod]
*$py.class
# C extensions # C extensions
*.so *.so
# Distribution / packaging # Distribution / packaging
.Python .Python
env/
build/ build/
develop-eggs/ develop-eggs/
dist/ dist/
downloads/ downloads/
eggs/ eggs/
.eggs/
lib/ lib/
lib64/ lib64/
parts/ parts/
sdist/ sdist/
var/ var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/ *.egg-info/
.installed.cfg .installed.cfg
*.egg *.egg
MANIFEST
# PyInstaller # PyInstaller
# Usually these files are written by a python script from a template # Usually these files are written by a python script from a template
@ -62,34 +40,97 @@ pip-delete-this-directory.txt
# Unit test / coverage reports # Unit test / coverage reports
htmlcov/ htmlcov/
.tox/ .tox/
.nox/
.coverage .coverage
.coverage.*
.cache .cache
nosetests.xml nosetests.xml
coverage.xml coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations # Translations
*.mo *.mo
*.pot *.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation # Sphinx documentation
docs/_build/ docs/_build/
# PyBuilder # PyBuilder
target/ target/
# Jupyter Notebook
.ipynb_checkpoints
### Django ### # IPython
*.log profile_default/
*.pot ipython_config.py
*.pyc
__pycache__/
local_settings.py
.vscode # pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env .env
db.sqlite3 .venv
env/
venv/
ENV/
env.bak/
venv.bak/
media # Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# Custome
docs docs
datadump.json datadump.json
local_note.txt local_note.txt
media/

View File

@ -1,7 +1,10 @@
# Advanced student management and e-learning system # Learning management system
My portfolio website -> https://ezop.herokuapp.com
I build this student management and e-learning system using django and Bootstrap for the front-end. You can watch the video on YouTube to find out how the app works in real time https://youtu.be/ytP-k95F0ug ### I would love to see you contributing :)
Feel free to contribute!!
Learning management system using django and Bootstrap. You can watch the video on YouTube to find out how the app works in real time https://youtu.be/ytP-k95F0ug
For the quiz part, I used this repo as a reference -> https://github.com/tomwalker/django_quiz For the quiz part, I used this repo as a reference -> https://github.com/tomwalker/django_quiz
@ -16,14 +19,12 @@ Current features
* The admin can Add Lecturers * The admin can Add Lecturers
* Students can Add and Drop courses * Students can Add and Drop courses
* Lecturers submit students score (Attendance, Mid exam, Final exam, assignment) * Lecturers submit students score (Attendance, Mid exam, Final exam, assignment)
* The system calculates the Total, Avarage, point, and grade of each student then save it * The system calculat students Total, Avarage, point, and grade automaticaly
* Also, the system tells the student whether he/she pass, fail or pass with a warning * Also, the system tells the student whether he/she pass, fail or pass with a warning
* Assessment result * Assessment result
* Grade result * Grade result
* Documentations * Upload video and documentations for each course
* Video Tutorials * PDF generator for students registration slip and grade result
* PDF generator for students registration slip
* PDF generator for students result
* Storing of quiz results under each user * Storing of quiz results under each user
* Question order randomisation * Question order randomisation
* Previous quiz scores can be viewed on category page * Previous quiz scores can be viewed on category page
@ -41,8 +42,6 @@ Current features
* Custom permission (view_sittings) added, allowing users with that permission to view quiz results from users * Custom permission (view_sittings) added, allowing users with that permission to view quiz results from users
* A marking page which lists completed quizzes, can be filtered by quiz or user, and is used to mark essay questions * A marking page which lists completed quizzes, can be filtered by quiz or user, and is used to mark essay questions
* Another cool feature of the app is, unnecessary files are removed automatically for memory efficiency
![Screenshot (124)](https://user-images.githubusercontent.com/60693922/112449252-3f1c5700-8d64-11eb-8549-bfe52122adf3.png) ![Screenshot (124)](https://user-images.githubusercontent.com/60693922/112449252-3f1c5700-8d64-11eb-8549-bfe52122adf3.png)
![Screenshot (118)](https://user-images.githubusercontent.com/60693922/112449489-7d197b00-8d64-11eb-9ed2-ed7dcd2fe89d.png) ![Screenshot (118)](https://user-images.githubusercontent.com/60693922/112449489-7d197b00-8d64-11eb-9ed2-ed7dcd2fe89d.png)
@ -57,7 +56,7 @@ After the student finished the quiz, here is how the result display
# Installation # Installation
First Clone the repo with `git clone https://github.com/adilmohak/django_sms_and_e-learning.git` First Clone the repo with `git clone https://github.com/adilmohak/django_lms.git`
Run the following commands Run the following commands
`pip install -r requirements.txt` `pip install -r requirements.txt`
@ -65,4 +64,6 @@ Run the following commands
Finally go to this address http://127.0.0.1:8000 Finally go to this address http://127.0.0.1:8000
### Give it a star
# Thank You!! # Thank You!!

View File

@ -103,7 +103,9 @@ ASGI_APPLICATION = "SMS.asgi.application"
# Database # Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
# -----------------------------
# Uncomment this if you want to use sqlite db # Uncomment this if you want to use sqlite db
# DATABASES = { # DATABASES = {
# 'default': { # 'default': {
# 'ENGINE': 'django.db.backends.sqlite3', # 'ENGINE': 'django.db.backends.sqlite3',
@ -116,10 +118,10 @@ DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '[db_name]', 'NAME': '[db_name]',
'USER': '[db_user]', 'USER': '[username]',
'PASSWORD': '[user_password]', 'PASSWORD': '[password]',
'HOST': 'localhost', 'HOST': 'localhost',
'PORT': '', 'POST': '',
} }
} }

View File

@ -1,9 +1,40 @@
asgiref==3.3.1 asgiref==3.3.1
attrs==21.2.0
autobahn==21.3.1
Automat==20.2.0
certifi==2020.12.5
cffi==1.14.5
channels==3.0.3
chardet==4.0.0
constantly==15.1.0
cryptography==3.4.7
daphne==3.0.2
Deprecated==1.2.12
Django==3.1.3 Django==3.1.3
django-cleanup==5.1.0 django-cleanup==5.1.0
django-crispy-forms==1.9.2 django-crispy-forms==1.9.2
django-model-utils==4.1.1 django-model-utils==4.1.1
djangorestframework==3.12.4
gopay==1.2.5
hyperlink==21.0.0
idna==2.10
incremental==21.3.0
Pillow==8.1.2 Pillow==8.1.2
psycopg2==2.8.6
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
pyOpenSSL==20.0.1
pytz==2021.1 pytz==2021.1
reportlab==3.5.56 reportlab==3.5.56
requests==2.25.1
service-identity==21.1.0
six==1.16.0
sqlparse==0.4.1 sqlparse==0.4.1
stripe==2.56.0
Twisted==21.2.0
twisted-iocpsupport==1.0.1
txaio==21.2.1
urllib3==1.26.4
wrapt==1.12.1
zope.interface==5.4.0

View File

@ -976,9 +976,8 @@ hr {
} }
#side-nav ul li.active a { #side-nav ul li.active a {
background: rgba(0, 111, 255, 0.05); background: #006fff;
color: #006fff; color: #fff;
text-shadow: 0 0 30px #006fff;
} }
#side-nav.toggle-active { #side-nav.toggle-active {

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
static/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -247,22 +247,16 @@
<div class="col-md-6 p-2"> <div class="col-md-6 p-2">
<div class="chart-wrap"> <div class="chart-wrap">
<i class="fas fa-expand-alt"></i> <i class="fas fa-expand-alt"></i>
<canvas id="myChart"></canvas> <canvas id="traffic"></canvas>
</div> </div>
</div> </div>
<div class="col-md-6 p-2"> <div class="col-md-6 p-2">
<div class="chart-wrap"> <div class="chart-wrap">
<i class="fas fa-expand-alt"></i> <i class="fas fa-expand-alt"></i>
<canvas id="myChart2"></canvas> <canvas id="enrollement"></canvas>
</div> </div>
</div> </div>
<div class="col-md-6 p-2"> <div class="col-md-6 p-2">
<div class="chart-wrap">
<i class="fas fa-expand-alt"></i>
<canvas id="myChart3"></canvas>
</div>
</div>
<div class="col-md-6 px-3">
<div class="row"> <div class="row">
<div class="col-md-6 p-2"> <div class="col-md-6 p-2">
<div class="card p-3 activities"> <div class="card p-3 activities">
@ -281,7 +275,7 @@
</div> </div>
<div class="col-md-6 p-2"> <div class="col-md-6 p-2">
<div class="card p-3 activities"> <div class="card p-3 activities">
<h5>Overall recent activities</h5> <h5>Overall activities</h5>
<ul class="small"> <ul class="small">
<li>Created a survey of something</li> <li>Created a survey of something</li>
<li>Added new admin user</li> <li>Added new admin user</li>
@ -296,65 +290,34 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-6 p-2">
<div class="chart-wrap">
<i class="fas fa-expand-alt"></i>
<canvas id="students_grade"></canvas>
</div>
</div>
<div class="col-md-4 p-2"> <div class="col-md-4 p-2">
<div class="chart-wrap"> <div class="chart-wrap">
<i class="fas fa-expand-alt"></i> <i class="fas fa-expand-alt"></i>
<canvas id="attendance"></canvas> <canvas id="attendance"></canvas>
</div> </div>
</div> </div>
<div class="col-md-4 p-2"> </div>
<div class="chart-wrap"> <br>
<div class="bg-white p-3">
<h5>School Demographics</h5>
<div class="row">
<div class="col-md-4">
<i class="fas fa-expand-alt"></i> <i class="fas fa-expand-alt"></i>
<canvas id="quiz_status"></canvas> <canvas id="gender"></canvas>
</div> </div>
</div> <div class="col-md-4">
<div class="col-md-4 p-2">
<div class="chart-wrap">
<i class="fas fa-expand-alt"></i> <i class="fas fa-expand-alt"></i>
<canvas id="other1"></canvas> <canvas id="ethnicity"></canvas>
</div> </div>
</div> <div class="col-md-4">
<div class="col-md-6">
<h5>Event Calender</h5>
</div>
<div class="col-md-6 p-2">
<h5>School Demographics</h5>
<div class="row">
<div class="col-md-6">
<i class="fas fa-expand-alt"></i>
<canvas id="gender"></canvas>
</div>
<div class="col-md-6">
<i class="fas fa-expand-alt"></i>
<canvas id="ethnicity"></canvas>
</div>
<div class="col-md-6">
<i class="fas fa-expand-alt"></i>
<canvas id="language"></canvas>
</div>
</div>
</div>
<div class="col-md-6 p-2">
<div class="chart-wrap">
<i class="fas fa-expand-alt"></i> <i class="fas fa-expand-alt"></i>
<canvas id="myChart7"></canvas> <canvas id="language"></canvas>
</div>
</div>
<div class="col-md-6 p-2">
<div class="chart-wrap">
<i class="fas fa-expand-alt"></i>
<canvas id="myChart8"></canvas>
</div>
</div>
<!-- <div class="col-md-6 p-2">
<div class="chart-wrap">
<i class="fas fa-expand-alt"></i>
<canvas id="myChart9"></canvas></div>
</div> -->
<div class="col-md-6 p-2">
<div class="chart-wrap">
<i class="fas fa-expand-alt"></i>
<canvas id="myChart9"></canvas>
</div> </div>
</div> </div>
</div> </div>
@ -406,8 +369,8 @@
}] }]
}; };
var myChart = document.getElementById('myChart'); var traffic = document.getElementById('traffic');
var chart = new Chart(myChart, { var chart = new Chart(traffic, {
type: 'line', type: 'line',
data: data, data: data,
options: { options: {
@ -465,8 +428,8 @@
}] }]
}; };
var myChart2 = document.getElementById('myChart2'); var enrollement = document.getElementById('enrollement');
var chart = new Chart(myChart2, { var chart = new Chart(enrollement, {
type: 'bar', type: 'bar',
data: dataEnrollment, data: dataEnrollment,
options: { options: {
@ -479,20 +442,7 @@
} }
} }
}); });
var myChart3 = document.getElementById('myChart3');
var chart = new Chart(myChart3, {
type: 'radar',
data: data,
options: {
plugins: {
title: {
display: true,
text: 'Custom Chart Title',
padding: 20
}
}
}
});
var attendance = document.getElementById('attendance'); var attendance = document.getElementById('attendance');
var chart = new Chart(attendance, { var chart = new Chart(attendance, {
type: 'doughnut', type: 'doughnut',
@ -507,35 +457,75 @@
} }
} }
}); });
var quiz_status = document.getElementById('quiz_status');
var chart = new Chart(quiz_status, { // Average grade setup
type: 'pie', const labelsGrade = [
data: data, '2017',
'2018',
'2019',
'2020',
'2022',
];
const dataGrade = {
labels: labelsGrade,
datasets: [{
label: 1,
backgroundColor: 'rgba(86, 224, 224, 0.5)',
borderColor: 'rgb(86, 224, 224)',
hoverBorderWidth: 3,
data: [0, 10, 5, 2, 20, 30, 45]
}, {
label: 2,
backgroundColor: 'rgba(253, 174, 28, 0.5)',
borderColor: 'rgb(253, 174, 28)',
hoverBorderWidth: 3,
data: [20, 0, 15, 4, 6, 4, 60],
}, {
label: 3,
backgroundColor: 'rgba(203, 31, 255, 0.5)',
borderColor: 'rgb(203, 31, 255)',
hoverBorderWidth: 3,
data: [85, 30, 34, 20, 20, 55, 45],
}, {
label: 4,
backgroundColor: 'rgba(255, 19, 157, 0.5)',
borderColor: 'rgb(255, 19, 157)',
hoverBorderWidth: 3,
data: [45, 75, 70, 80, 20, 30, 90],
}]
};
var students_grade = document.getElementById('students_grade');
var chart = new Chart(students_grade, {
type: 'bar',
data: dataGrade,
options: { options: {
plugins: { plugins: {
title: { title: {
display: true, display: true,
text: 'Students Online Quiz Status', text: 'Students average grade (performance)',
padding: 20
}
}
}
});
var other1 = document.getElementById('other1');
var chart = new Chart(other1, {
type: 'pie',
data: data,
options: {
plugins: {
title: {
display: true,
text: 'Students Online Quiz Status',
padding: 20 padding: 20
} }
} }
} }
}); });
// var students_grade = document.getElementById('students_grade');
// var chart = new Chart(students_grade, {
// type: 'pie',
// data: data,
// options: {
// plugins: {
// title: {
// display: true,
// text: 'Students average grade',
// padding: 20
// }
// }
// }
// });
const dataGender = { const dataGender = {
labels: ['Man', 'Women'], labels: ['Man', 'Women'],
datasets: [{ datasets: [{
@ -595,119 +585,6 @@
} }
} }
}); });
const dataBubble = {
datasets: [{
label: 'First Dataset',
data: [{
x: 20,
y: 30,
r: 15
}, {
x: 40,
y: 10,
r: 10
}],
backgroundColor: 'rgb(255, 99, 132)'
}]
};
var myChart7 = document.getElementById('myChart7');
var chart = new Chart(myChart7, {
type: 'bubble',
data: dataBubble,
options: {
plugins: {
title: {
display: true,
text: 'Custom Chart Title',
padding: 20
}
}
}
});
const dataScatter = {
datasets: [{
label: 'Scatter Dataset',
data: [{
x: -10,
y: 0
}, {
x: 0,
y: 10
}, {
x: 10,
y: 5
}, {
x: 0.5,
y: 5.5
}],
backgroundColor: 'rgb(255, 99, 132)'
}],
};
var myChart8 = document.getElementById('myChart8');
var chart = new Chart(myChart8, {
type: 'scatter',
data: dataScatter,
options: {
plugins: {
title: {
display: true,
text: 'Custom Chart Title',
padding: 20
}
},
scales: {
x: {
type: 'linear',
position: 'bottom'
}
}
}
});
const dataMixed = {
labels: [
'January',
'February',
'March',
'April'
],
datasets: [{
type: 'bar',
label: 'Bar Dataset',
data: [10, 20, 30, 40],
borderColor: 'rgb(255, 99, 132)',
backgroundColor: 'rgba(255, 99, 132, 0.2)'
}, {
type: 'line',
label: 'Line Dataset',
data: [50, 50, 50, 50],
fill: false,
borderColor: 'rgb(54, 162, 235)'
}]
};
var myChart9 = document.getElementById('myChart9');
var chart = new Chart(myChart9, {
type: 'mixed',
data: dataMixed,
options: {
plugins: {
title: {
display: true,
text: 'Custom Chart Title',
padding: 20
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
}) })
</script> </script>

View File

@ -15,9 +15,10 @@
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</div> </div>
</div> </div>
<h1 style="font-weight: 1000; font-size: 40px;"> <!-- <h1 style="font-weight: 1000; font-size: 40px;">
<span class="text-warning">LOGO</span> HERE <span class="text-warning">Dj</span> LMS
</h1> </h1> -->
<img src="{% static 'img/logo.png' %}" width="200px" alt="Logo Django LMS">
<p class="text-orange"> <p class="text-orange">
<i class="far fa-hand-point-right"></i> <i class="far fa-hand-point-right"></i>
{{ request.user.get_user_role }} {{ request.user.get_user_role }}

View File

@ -61,39 +61,3 @@
</body> </body>
</html> </html>
<!-- {% if request.user.is_superuser %}
<a href="{% url 'admin_panel' %}" class="text-orange"><i class="fas fa-user-tie"></i> Admin Panel</a>
{% endif %} -->
<!-- <div class="drop-down" id="drop-down">
<a href="#">
<img class="profile-pic" src="{{ request.user.picture.url }}">
{{ request.user.get_full_name|truncatechars:15 }}<i class="fas fa-angle-down ml-2"></i>
</a>
<div class="content" id="content">
<p class="container text-muted-xs text-center"> Last login: {{ request.user.last_login|date }}</p>
<div class="content-a">
{% if request.user.is_lecturer or request.user.is_student %}
<a href="{% url 'user_course_list' %}"><i class="fas fa-book"></i>My Courses</a>
{% endif %}
{% if request.user.is_superuser %}
<a href="{% url 'admin_panel' %}"><i class="fas fa-user-tie"></i>Admin Panel</a>
{% endif %}
<a href="{% url 'profile' %}"><i class="fas fa-user"></i>Profile</a>
<a href="{% url 'edit_profile' %}"><i class="fas fa-cogs"></i>Setting</a>
</div><hr>
<div class="sign-out">
<a href="{% url 'logout' %}" class="btn btn-light">
<i class="fas fa-sign-out-alt"></i>Signout
</a>
</div>
</div>
</div> -->