Skip to content

Commit

Permalink
Removed obsolete method that was never implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebrownlee committed Jun 6, 2024
1 parent e5e85fc commit 6ed6fd1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
14 changes: 0 additions & 14 deletions LearningAPI/views/student_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import logging
import requests
from django.contrib.auth.models import User
from django.conf import settings
from django.db import connection
from django.db import IntegrityError
from django.http import HttpResponseServerError
Expand Down Expand Up @@ -222,19 +221,6 @@ def list(self, request):
else:
return Response({'message': 'Error'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)

@action(methods=['put'], detail=True)
def selfassess(self, request, pk):
if request.method == "PUT":
auth_student = NssUser.objects.get(user=request.auth.user)

if auth_student.user.id == pk:
assessment_status = StudentAssessmentStatus.objects.get(pk=request.data['statusId'])
# What is the next assessment for this student?
# Create relationship between student and assessment
# Update status to statusId



@method_decorator(is_instructor())
@action(methods=['post', 'put'], detail=True)
def assess(self, request, pk):
Expand Down
35 changes: 35 additions & 0 deletions config/nginx.api.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
server {
server_name learningapi.nss.team;
access_log /var/log/nginx/api.log;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-NginX-Proxy true;

include proxy_params;
proxy_pass http://127.0.0.1:8000;
}

location /static/ {
autoindex off;
root /var/www/learning.nss.team/;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/learningapi.nss.team/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/learningapi.nss.team/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}


server {
if ($host = learningapi.nss.team) {
return 301 https://$host$request_uri;
} # managed by Certbot


listen 80;
server_name learningapi.nss.team;
return 404; # managed by Certbot
}

0 comments on commit 6ed6fd1

Please sign in to comment.