diff --git a/README.md b/README.md index cd5e8e7..aec8167 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,13 @@ A free, open-source learning management system (LMS) build on Django and deployed on Heroku. ## Dev Notes -* 6/19/2021 (v.0.1.1): Patch refining existing features: +* 7/2/2021 (v0.1.2): Minor UI additions patch: + * Now use an iframe to display GitHub readme on home pages + * Added "report an issue" button to page footer + * Added social media sharing buttons to page footer + * Now display cumulative grade on student assignments overview + * Added delete button for assignments on assignment details page +* 6/19/2021 (v0.1.1): Patch refining existing features: * Used CloudFlare proxy for HTTPS protocol to get website working on secure browsers (still unsafe due to half of protocol being unsecure) * Clicking on students on the Students page for teachers now shows a tabular summary of the student assignments. * Assignment page for students and teachers has been switched from a simple list of assignment names to a tabular summary of grades and submissions. @@ -13,22 +19,17 @@ A free, open-source learning management system (LMS) build on Django and deploye * Creating assignments as a teacher and grading student submissions. * Submitting text submissions to assignments as a student and viewing the grades once available. -## Priority Backlog (Next Patch) -- [X] Use an iframe to display readme on home pages -- [X] Add "report an issue" button -- [X] Add social media sharing buttons -- [X] Display cumulative grade on student assignments overview -- [ ] Email notifications for assignment updates -- [ ] Delete option for assignments +## Priority Backlog (Next Patch - v0.1.3) +- [X] "Unsaved changes" confirmation dialogue before leaving form pages +- [X] Show assignment details on new submission form +- [X] File attachment uploading for assignments and submissions ## Backlog -* "Unsaved changes" confirmation dialogue before leaving form pages -* Show assignment details on new submission form -* File uploads for assignments and submissions +* Email notifications for assignment updates * Status tags instead of unread/read formatting for assignments * Feature voting * Non-assignment pages -* Actual SSL certification +* Full SSL certification * Switch session course tracking method from cookies to request kwargs * Render readme iframe as formatted HTML * A breadcrumbs navigation bar diff --git a/db.sqlite3 b/db.sqlite3 index 45a13c9..9ffa6f6 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/forum/__pycache__/urls.cpython-39.pyc b/forum/__pycache__/urls.cpython-39.pyc index 677be1b..af77bbc 100644 Binary files a/forum/__pycache__/urls.cpython-39.pyc and b/forum/__pycache__/urls.cpython-39.pyc differ diff --git a/forum/__pycache__/views.cpython-39.pyc b/forum/__pycache__/views.cpython-39.pyc index 726b327..3475af8 100644 Binary files a/forum/__pycache__/views.cpython-39.pyc and b/forum/__pycache__/views.cpython-39.pyc differ diff --git a/forum/templates/assignmentdetails_teacher.html b/forum/templates/assignmentdetails_teacher.html index 377649f..5a74f4f 100644 --- a/forum/templates/assignmentdetails_teacher.html +++ b/forum/templates/assignmentdetails_teacher.html @@ -4,12 +4,24 @@ {% block content %}
{% csrf_token %} -

Assignment:

-

- Start date:
- End date:
- Total points:
-

+
+
+

Assignment:

+

+ Start date:
+ End date:
+ Total points:
+

+
+
Delete assignment
+ +

Description:


diff --git a/forum/urls.py b/forum/urls.py index 826de4a..67cf332 100644 --- a/forum/urls.py +++ b/forum/urls.py @@ -14,5 +14,6 @@ path('assignments/newassignment', views.newassignment, name='newassignment'), path('assignments/', views.assignmentdetails, name='assignmentdetails'), path('assignments//submit', views.newsubmission, name='newsubmission'), + path('assignments//delete', views.delete_assignment, name='delete_assignment'), path('assignments/submissions/assignment_id=/student_id=', views.viewsubmission, name='viewsubmission'), ] diff --git a/forum/views.py b/forum/views.py index 7540cce..4d16256 100644 --- a/forum/views.py +++ b/forum/views.py @@ -263,4 +263,13 @@ def studentgrades(request, student_id): context["student"] = student return render(request, "studentgrades.html", context) else: - return redirect('home') \ No newline at end of file + return redirect('home') + +def delete_assignment(request, assignment_id): + if not request.user.is_authenticated: + return redirect('home') + course = Course.objects.filter(id=request.session.get('selected_course_id')).first() + if (course.owner != request.user): + return redirect('home') + Assignment.objects.filter(id=assignment_id).delete() + return redirect('forum:assignments') \ No newline at end of file