Skip to content

Commit

Permalink
update assignment and grading service postman endpoints json files, a…
Browse files Browse the repository at this point in the history
…nd also update submissions page title
  • Loading branch information
tryyang2001 committed Apr 19, 2024
1 parent 85d3677 commit 8dfd925
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 12 deletions.
14 changes: 14 additions & 0 deletions frontend/src/app/assignments/submissions/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Metadata } from "next";

export const metadata: Metadata = {
title: "View Submissions - Intelligent Tutoring System",
description: "Accelerate code assessment.",
};

export default function AssignmentLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return <div>{children}</div>;
}
44 changes: 39 additions & 5 deletions postman/Assignments.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@
},
"response": []
},
{
"name": "/assignments?userId={id}",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{ASSIGNMENT_API_URL}}/assignment/api/assignments?userId={{userId}}",
"protocol": "http",
"host": [
"{{ASSIGNMENT_API_URL}}"
],
"path": [
"assignment",
"api",
"assignments"
],
"query": [
{
"key": "userId",
"value": "{{userId}}"
}
]
}
},
"response": []
},
{
"name": "/assignments",
"event": [
Expand All @@ -50,7 +76,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"title\": \"Assignment 6 Demo\",\r\n \"deadline\": 1735689599999,\r\n \"authors\": [\"rui_yang_tan_user_id_1\"],\r\n \"isPublished\": true\r\n}",
"raw": "{\r\n \"title\": \"Demo Assignment\",\r\n \"deadline\": 1735689599999,\r\n \"authors\": [{{userId}}],\r\n \"description\": \"This is an example of the assignment description field\",\r\n \"isPublished\": false\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -100,7 +126,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"title\": \"Assignment 6 Demoo\"\r\n}",
"raw": "{\r\n \"title\": \"Assignment Demoo\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -245,7 +271,7 @@
" var test_case_ids = [];\r",
"\r",
" responseBody.forEach(testCase => {\r",
" if (!testCase.isPublic) {\r",
" if (testCase.isPublic) {\r",
" test_case_ids.add(testCase.id);\r",
" }\r",
" })\r",
Expand All @@ -261,8 +287,11 @@
{
"listen": "prerequest",
"script": {
"exec": [],
"type": "text/javascript"
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
Expand Down Expand Up @@ -585,6 +614,11 @@
{
"key": "reference_solution_id",
"value": ""
},
{
"key": "userId",
"value": "",
"type": "string"
}
]
}
74 changes: 67 additions & 7 deletions postman/Grading.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@
{
"listen": "prerequest",
"script": {
"exec": [],
"type": "text/javascript"
"exec": [
""
],
"type": "text/javascript",
"packages": {}
}
}
],
Expand All @@ -59,7 +62,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"language\": \"python\",\r\n \"source_code\": \"def is_odd(x):\\r\\n if x % 2 == 1:\\r\\n return False\\r\\n else:\\r\\n return True\"\r\n}",
"raw": "{\r\n \"language\": \"python\",\r\n \"source_code\": \"def is_even(x):\\r\\n if x % 2 == 1:\\r\\n return True\\r\\n else:\\r\\n return False\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -118,7 +121,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "http://{{GRADING_API_URL}}/grading/api/questions/{{question_id}}/submissions?studentId=1",
"raw": "http://{{GRADING_API_URL}}/grading/api/questions/{{question_id}}/submissions?studentId={{student_id}}",
"protocol": "http",
"host": [
"{{GRADING_API_URL}}"
Expand All @@ -133,12 +136,64 @@
"query": [
{
"key": "studentId",
"value": "1"
"value": "{{student_id}}"
}
]
}
},
"response": []
},
{
"name": "/questions/:id/submission/latest",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{GRADING_API_URL}}/grading/api/questions/{{question_id}}/submission/latest?studentId={{student_id}}",
"protocol": "http",
"host": [
"{{GRADING_API_URL}}"
],
"path": [
"grading",
"api",
"questions",
"{{question_id}}",
"submission",
"latest"
],
"query": [
{
"key": "studentId",
"value": "{{student_id}}"
}
]
}
},
"response": []
},
{
"name": "/assignments/:id/submitters",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8088/grading/api/assignments/cluuv699a0000cwsuv1oha0a9/submitters",
"protocol": "http",
"host": [
"localhost"
],
"port": "8088",
"path": [
"grading",
"api",
"assignments",
"cluuv699a0000cwsuv1oha0a9",
"submitters"
]
}
},
"response": []
}
],
"event": [
Expand Down Expand Up @@ -175,12 +230,17 @@
},
{
"key": "question_id",
"value": "cltu7sh7b0007rdzclqfnzbt9",
"value": "cluz73c350002jaef02llnse4",
"type": "string"
},
{
"key": "student_id",
"value": "1",
"value": "3",
"type": "string"
},
{
"key": "assignment_id",
"value": "cluz6vdlk0000jaeflamfqla0",
"type": "string"
}
]
Expand Down

0 comments on commit 8dfd925

Please sign in to comment.