diff --git a/.gitignore b/.gitignore index e8fb642..fdcb063 100644 --- a/.gitignore +++ b/.gitignore @@ -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 __pycache__/ *.py[cod] +*$py.class # C extensions *.so # Distribution / packaging .Python -env/ build/ develop-eggs/ dist/ downloads/ eggs/ +.eggs/ lib/ lib64/ parts/ sdist/ var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg +MANIFEST # PyInstaller # 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 htmlcov/ .tox/ +.nox/ .coverage +.coverage.* .cache nosetests.xml coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ # Translations *.mo *.pot +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + # Sphinx documentation docs/_build/ # PyBuilder target/ +# Jupyter Notebook +.ipynb_checkpoints -### Django ### -*.log -*.pot -*.pyc -__pycache__/ -local_settings.py +# IPython +profile_default/ +ipython_config.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 -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 datadump.json local_note.txt + +media/ \ No newline at end of file diff --git a/README.md b/README.md index 53aca17..e0a30c3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -# Advanced student management and e-learning system -My portfolio website -> https://ezop.herokuapp.com +# Learning management system -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 @@ -16,14 +19,12 @@ Current features * The admin can Add Lecturers * Students can Add and Drop courses * 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 * Assessment result * Grade result -* Documentations -* Video Tutorials -* PDF generator for students registration slip -* PDF generator for students result +* Upload video and documentations for each course +* PDF generator for students registration slip and grade result * Storing of quiz results under each user * Question order randomisation * 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 * 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 (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 -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 `pip install -r requirements.txt` @@ -65,4 +64,6 @@ Run the following commands Finally go to this address http://127.0.0.1:8000 +### Give it a star + # Thank You!! diff --git a/SMS/settings.py b/SMS/settings.py index 1ef2b22..6af7820 100644 --- a/SMS/settings.py +++ b/SMS/settings.py @@ -103,7 +103,9 @@ ASGI_APPLICATION = "SMS.asgi.application" # Database # https://docs.djangoproject.com/en/2.2/ref/settings/#databases +# ----------------------------- # Uncomment this if you want to use sqlite db + # DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.sqlite3', @@ -116,10 +118,10 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '[db_name]', - 'USER': '[db_user]', - 'PASSWORD': '[user_password]', + 'USER': '[username]', + 'PASSWORD': '[password]', 'HOST': 'localhost', - 'PORT': '', + 'POST': '', } } diff --git a/requirements.txt b/requirements.txt index 9ff2514..e7dab03 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,40 @@ 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-cleanup==5.1.0 django-crispy-forms==1.9.2 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 +psycopg2==2.8.6 +pyasn1==0.4.8 +pyasn1-modules==0.2.8 +pycparser==2.20 +pyOpenSSL==20.0.1 pytz==2021.1 reportlab==3.5.56 +requests==2.25.1 +service-identity==21.1.0 +six==1.16.0 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 diff --git a/static/css/style.css b/static/css/style.css index 7eb7c7a..4cdd70c 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -976,9 +976,8 @@ hr { } #side-nav ul li.active a { - background: rgba(0, 111, 255, 0.05); - color: #006fff; - text-shadow: 0 0 30px #006fff; + background: #006fff; + color: #fff; } #side-nav.toggle-active { diff --git a/static/img/dj-lms-dashboard.png b/static/img/dj-lms-dashboard.png new file mode 100644 index 0000000..8b577df Binary files /dev/null and b/static/img/dj-lms-dashboard.png differ diff --git a/static/img/logo.png b/static/img/logo.png new file mode 100644 index 0000000..c70eb18 Binary files /dev/null and b/static/img/logo.png differ diff --git a/static/img/you-logo-here.png b/static/img/you-logo-here.png deleted file mode 100644 index a1185ea..0000000 Binary files a/static/img/you-logo-here.png and /dev/null differ diff --git a/templates/app/dashboard.html b/templates/app/dashboard.html index 04bdf76..97ade88 100644 --- a/templates/app/dashboard.html +++ b/templates/app/dashboard.html @@ -247,22 +247,16 @@
- +
- +
-
- - -
-
-
@@ -281,7 +275,7 @@
-
Overall recent activities
+
Overall activities
  • Created a survey of something
  • Added new admin user
  • @@ -296,65 +290,34 @@
+
+
+ + +
+
-
-
+
+
+
+
School Demographics
+
+
- +
-
-
-
+
- +
-
-
-
Event Calender
-
-
-
School Demographics
-
-
- - -
-
- - -
-
- - -
-
-
-
-
+
- -
-
-
-
- - -
-
- -
-
- - +
@@ -406,8 +369,8 @@ }] }; - var myChart = document.getElementById('myChart'); - var chart = new Chart(myChart, { + var traffic = document.getElementById('traffic'); + var chart = new Chart(traffic, { type: 'line', data: data, options: { @@ -465,8 +428,8 @@ }] }; - var myChart2 = document.getElementById('myChart2'); - var chart = new Chart(myChart2, { + var enrollement = document.getElementById('enrollement'); + var chart = new Chart(enrollement, { type: 'bar', data: dataEnrollment, 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 chart = new Chart(attendance, { type: 'doughnut', @@ -507,35 +457,75 @@ } } }); - var quiz_status = document.getElementById('quiz_status'); - var chart = new Chart(quiz_status, { - type: 'pie', - data: data, + + // Average grade setup + const labelsGrade = [ + '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: { plugins: { title: { display: true, - text: 'Students Online Quiz Status', - 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', + text: 'Students average grade (performance)', 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 = { labels: ['Man', 'Women'], 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 - } - } - } - }); }) diff --git a/templates/aside.html b/templates/aside.html index ada7ff3..80512a2 100644 --- a/templates/aside.html +++ b/templates/aside.html @@ -15,9 +15,10 @@
-

- LOGO HERE -

+ + Logo Django LMS

{{ request.user.get_user_role }} diff --git a/templates/base.html b/templates/base.html index c099132..035f6dd 100644 --- a/templates/base.html +++ b/templates/base.html @@ -61,39 +61,3 @@ - - - - \ No newline at end of file