Merge pull request #119 from SELab-2/test/service-test-correction
test: testen bug opgelost
This commit is contained in:
commit
46e9e8d6a0
3 changed files with 1962 additions and 2301 deletions
|
@ -1,117 +0,0 @@
|
||||||
import { describe, it, expect, vi } from 'vitest';
|
|
||||||
import { LearningObjectMetadata, LearningPath } from '../../src/interfaces/learningPath';
|
|
||||||
import { fetchWithLogging } from '../../src/util/apiHelper';
|
|
||||||
import { getLearningObjectById, getLearningObjectsFromPath } from '../../src/services/learningObjects';
|
|
||||||
import { fetchLearningPaths } from '../../src/services/learningPaths';
|
|
||||||
|
|
||||||
// Mock API functions
|
|
||||||
vi.mock('../../src/util/apiHelper', () => ({
|
|
||||||
fetchWithLogging: vi.fn(),
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock('../../src/services/learningPaths', () => ({
|
|
||||||
fetchLearningPaths: vi.fn(),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('getLearningObjectById', () => {
|
|
||||||
const hruid = 'test-object';
|
|
||||||
const language = 'en';
|
|
||||||
const mockMetadata: LearningObjectMetadata = {
|
|
||||||
hruid,
|
|
||||||
_id: '123',
|
|
||||||
uuid: 'uuid-123',
|
|
||||||
version: 1,
|
|
||||||
title: 'Test Object',
|
|
||||||
language,
|
|
||||||
difficulty: 5,
|
|
||||||
estimated_time: 120,
|
|
||||||
available: true,
|
|
||||||
teacher_exclusive: false,
|
|
||||||
educational_goals: [{ source: 'source', id: 'id' }],
|
|
||||||
keywords: ['robotics'],
|
|
||||||
description: 'A test object',
|
|
||||||
target_ages: [10, 12],
|
|
||||||
content_type: 'markdown',
|
|
||||||
content_location: '',
|
|
||||||
};
|
|
||||||
|
|
||||||
it('✅ Should return a filtered learning object when API provides data', async () => {
|
|
||||||
vi.mocked(fetchWithLogging).mockResolvedValueOnce(mockMetadata);
|
|
||||||
|
|
||||||
const result = await getLearningObjectById(hruid, language);
|
|
||||||
|
|
||||||
expect(result).toEqual({
|
|
||||||
key: hruid,
|
|
||||||
_id: '123',
|
|
||||||
uuid: 'uuid-123',
|
|
||||||
version: 1,
|
|
||||||
title: 'Test Object',
|
|
||||||
htmlUrl: expect.stringContaining('/learningObject/getRaw?hruid=test-object&language=en'),
|
|
||||||
language,
|
|
||||||
difficulty: 5,
|
|
||||||
estimatedTime: 120,
|
|
||||||
available: true,
|
|
||||||
teacherExclusive: false,
|
|
||||||
educationalGoals: [{ source: 'source', id: 'id' }],
|
|
||||||
keywords: ['robotics'],
|
|
||||||
description: 'A test object',
|
|
||||||
targetAges: [10, 12],
|
|
||||||
contentType: 'markdown',
|
|
||||||
contentLocation: '',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('⚠️ Should return null if API returns no metadata', async () => {
|
|
||||||
vi.mocked(fetchWithLogging).mockResolvedValueOnce(null);
|
|
||||||
const result = await getLearningObjectById(hruid, language);
|
|
||||||
expect(result).toBeNull();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('getLearningObjectsFromPath', () => {
|
|
||||||
const hruid = 'test-path';
|
|
||||||
const language = 'en';
|
|
||||||
|
|
||||||
it('✅ Should not give error or warning', async () => {
|
|
||||||
const mockPathResponse: LearningPath[] = [
|
|
||||||
{
|
|
||||||
_id: 'path-1',
|
|
||||||
hruid,
|
|
||||||
language,
|
|
||||||
title: 'Test Path',
|
|
||||||
description: '',
|
|
||||||
num_nodes: 1,
|
|
||||||
num_nodes_left: 0,
|
|
||||||
nodes: [],
|
|
||||||
keywords: '',
|
|
||||||
target_ages: [],
|
|
||||||
min_age: 10,
|
|
||||||
max_age: 12,
|
|
||||||
__order: 1,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
vi.mocked(fetchLearningPaths).mockResolvedValueOnce({
|
|
||||||
success: true,
|
|
||||||
source: 'Test Source',
|
|
||||||
data: mockPathResponse,
|
|
||||||
});
|
|
||||||
|
|
||||||
const result = await getLearningObjectsFromPath(hruid, language);
|
|
||||||
expect(result).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('⚠️ Should give a warning', async () => {
|
|
||||||
vi.mocked(fetchLearningPaths).mockResolvedValueOnce({ success: false, source: 'Test Source', data: [] });
|
|
||||||
|
|
||||||
const result = await getLearningObjectsFromPath(hruid, language);
|
|
||||||
expect(result).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('❌ Should give an error', async () => {
|
|
||||||
vi.mocked(fetchLearningPaths).mockRejectedValueOnce(new Error('API Error'));
|
|
||||||
|
|
||||||
const result = await getLearningObjectsFromPath(hruid, language);
|
|
||||||
expect(result).toEqual([]);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,90 +0,0 @@
|
||||||
import { describe, it, expect, vi } from 'vitest';
|
|
||||||
import { fetchLearningPaths, searchLearningPaths } from '../../src/services/learningPaths';
|
|
||||||
import { fetchWithLogging } from '../../src/util/apiHelper';
|
|
||||||
import { LearningPathResponse } from '../../src/interfaces/learningPath';
|
|
||||||
|
|
||||||
// Mock the fetchWithLogging module using vi
|
|
||||||
vi.mock('../../src/util/apiHelper', () => ({
|
|
||||||
fetchWithLogging: vi.fn(),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('fetchLearningPaths', () => {
|
|
||||||
// Mock data and response
|
|
||||||
const mockHruids = ['pn_werking', 'art1'];
|
|
||||||
const language = 'en';
|
|
||||||
const source = 'Test Source';
|
|
||||||
const mockResponse = [{ title: 'Test Path', hruids: mockHruids }];
|
|
||||||
|
|
||||||
it('✅ Should return a successful response when HRUIDs are provided', async () => {
|
|
||||||
// Mock the function to return mockResponse
|
|
||||||
vi.mocked(fetchWithLogging).mockResolvedValue(mockResponse);
|
|
||||||
|
|
||||||
const result: LearningPathResponse = await fetchLearningPaths(mockHruids, language, source);
|
|
||||||
|
|
||||||
expect(result.success).toBe(true);
|
|
||||||
expect(result.data).toEqual(mockResponse);
|
|
||||||
expect(result.source).toBe(source);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('⚠️ Should return an error when no HRUIDs are provided', async () => {
|
|
||||||
vi.mocked(fetchWithLogging).mockResolvedValue(mockResponse);
|
|
||||||
|
|
||||||
const result: LearningPathResponse = await fetchLearningPaths([], language, source);
|
|
||||||
|
|
||||||
expect(result.success).toBe(false);
|
|
||||||
expect(result.data).toBeNull();
|
|
||||||
expect(result.message).toBe(`No HRUIDs provided for ${source}.`);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('⚠️ Should return a failure response when no learning paths are found', async () => {
|
|
||||||
// Mock fetchWithLogging to return an empty array
|
|
||||||
vi.mocked(fetchWithLogging).mockResolvedValue([]);
|
|
||||||
|
|
||||||
const result: LearningPathResponse = await fetchLearningPaths(mockHruids, language, source);
|
|
||||||
|
|
||||||
expect(result.success).toBe(false);
|
|
||||||
expect(result.data).toEqual([]);
|
|
||||||
expect(result.message).toBe(`No learning paths found for ${source}.`);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('searchLearningPaths', () => {
|
|
||||||
const query =
|
|
||||||
'https://dwengo.org/backend/api/learningPath/getPathsFromIdList?pathIdList=%7B%22hruids%22:%5B%22pn_werking%22,%22un_artificiele_intelligentie%22%5D%7D&language=nl';
|
|
||||||
const language = 'nl';
|
|
||||||
|
|
||||||
it('✅ Should return search results when API responds with data', async () => {
|
|
||||||
const mockResults = [
|
|
||||||
{
|
|
||||||
_id: '67b4488c9dadb305c4104618',
|
|
||||||
language: 'nl',
|
|
||||||
hruid: 'pn_werking',
|
|
||||||
title: 'Werken met notebooks',
|
|
||||||
description: 'Een korte inleiding tot Python notebooks. Hoe ga je gemakkelijk en efficiënt met de notebooks aan de slag?',
|
|
||||||
num_nodes: 0,
|
|
||||||
num_nodes_left: 0,
|
|
||||||
nodes: [],
|
|
||||||
keywords: 'Python KIKS Wiskunde STEM AI',
|
|
||||||
target_ages: [14, 15, 16, 17, 18],
|
|
||||||
min_age: 14,
|
|
||||||
max_age: 18,
|
|
||||||
__order: 0,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// Mock fetchWithLogging to return search results
|
|
||||||
vi.mocked(fetchWithLogging).mockResolvedValue(mockResults);
|
|
||||||
|
|
||||||
const result = await searchLearningPaths(query, language);
|
|
||||||
|
|
||||||
expect(result).toEqual(mockResults);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('⚠️ Should return an empty array when API returns no results', async () => {
|
|
||||||
vi.mocked(fetchWithLogging).mockResolvedValue([]);
|
|
||||||
|
|
||||||
const result = await searchLearningPaths(query, language);
|
|
||||||
|
|
||||||
expect(result).toEqual([]);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -32,9 +32,7 @@
|
||||||
},
|
},
|
||||||
"/api/student/": {
|
"/api/student/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -55,9 +53,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
|
@ -89,9 +85,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -108,9 +102,7 @@
|
||||||
},
|
},
|
||||||
"/api/student/{username}": {
|
"/api/student/{username}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -135,9 +127,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -164,9 +154,7 @@
|
||||||
},
|
},
|
||||||
"/api/student/{id}/classes": {
|
"/api/student/{id}/classes": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -197,9 +185,7 @@
|
||||||
},
|
},
|
||||||
"/api/student/{id}/submissions": {
|
"/api/student/{id}/submissions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -220,9 +206,7 @@
|
||||||
},
|
},
|
||||||
"/api/student/{id}/assignments": {
|
"/api/student/{id}/assignments": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -250,9 +234,7 @@
|
||||||
},
|
},
|
||||||
"/api/student/{id}/groups": {
|
"/api/student/{id}/groups": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -280,9 +262,7 @@
|
||||||
},
|
},
|
||||||
"/api/student/{id}/questions": {
|
"/api/student/{id}/questions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Student"],
|
||||||
"Student"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -303,9 +283,7 @@
|
||||||
},
|
},
|
||||||
"/api/group/": {
|
"/api/group/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Group"],
|
||||||
"Group"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -326,9 +304,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Group"],
|
||||||
"Group"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
|
@ -345,9 +321,7 @@
|
||||||
},
|
},
|
||||||
"/api/group/{groupid}": {
|
"/api/group/{groupid}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Group"],
|
||||||
"Group"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -371,9 +345,7 @@
|
||||||
},
|
},
|
||||||
"/api/group/{id}/questions": {
|
"/api/group/{id}/questions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Group"],
|
||||||
"Group"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -394,9 +366,7 @@
|
||||||
},
|
},
|
||||||
"/api/assignment/": {
|
"/api/assignment/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -414,9 +384,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
|
@ -456,9 +424,7 @@
|
||||||
},
|
},
|
||||||
"/api/assignment/{id}": {
|
"/api/assignment/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -485,9 +451,7 @@
|
||||||
},
|
},
|
||||||
"/api/assignment/{id}/submissions": {
|
"/api/assignment/{id}/submissions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -511,9 +475,7 @@
|
||||||
},
|
},
|
||||||
"/api/assignment/{id}/questions": {
|
"/api/assignment/{id}/questions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -534,9 +496,7 @@
|
||||||
},
|
},
|
||||||
"/api/assignment/{assignmentid}/groups/": {
|
"/api/assignment/{assignmentid}/groups/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -565,9 +525,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -594,9 +552,7 @@
|
||||||
},
|
},
|
||||||
"/api/assignment/{assignmentid}/groups/{groupid}": {
|
"/api/assignment/{assignmentid}/groups/{groupid}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -628,9 +584,7 @@
|
||||||
},
|
},
|
||||||
"/api/assignment/{assignmentid}/groups/{id}/questions": {
|
"/api/assignment/{assignmentid}/groups/{id}/questions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Assignment"],
|
||||||
"Assignment"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -659,9 +613,7 @@
|
||||||
},
|
},
|
||||||
"/api/submission/": {
|
"/api/submission/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Submission"],
|
||||||
"Submission"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -672,9 +624,7 @@
|
||||||
},
|
},
|
||||||
"/api/submission/{id}": {
|
"/api/submission/{id}": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Submission"],
|
||||||
"Submission"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -696,9 +646,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Submission"],
|
||||||
"Submission"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -737,9 +685,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
"tags": [
|
"tags": ["Submission"],
|
||||||
"Submission"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -777,9 +723,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/": {
|
"/api/class/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -797,9 +741,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
|
@ -830,9 +772,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{id}": {
|
"/api/class/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -859,9 +799,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{id}/teacher-invitations": {
|
"/api/class/{id}/teacher-invitations": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -889,9 +827,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{id}/students": {
|
"/api/class/{id}/students": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -919,9 +855,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{classid}/assignments/": {
|
"/api/class/{classid}/assignments/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -947,9 +881,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -999,9 +931,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{classid}/assignments/{id}": {
|
"/api/class/{classid}/assignments/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1036,9 +966,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{classid}/assignments/{id}/submissions": {
|
"/api/class/{classid}/assignments/{id}/submissions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1070,9 +998,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{classid}/assignments/{id}/questions": {
|
"/api/class/{classid}/assignments/{id}/questions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1101,9 +1027,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{classid}/assignments/{assignmentid}/groups/": {
|
"/api/class/{classid}/assignments/{assignmentid}/groups/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1140,9 +1064,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1177,9 +1099,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{classid}/assignments/{assignmentid}/groups/{groupid}": {
|
"/api/class/{classid}/assignments/{assignmentid}/groups/{groupid}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1219,9 +1139,7 @@
|
||||||
},
|
},
|
||||||
"/api/class/{classid}/assignments/{assignmentid}/groups/{id}/questions": {
|
"/api/class/{classid}/assignments/{assignmentid}/groups/{id}/questions": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Class"],
|
||||||
"Class"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1258,9 +1176,7 @@
|
||||||
},
|
},
|
||||||
"/api/question/": {
|
"/api/question/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Question"],
|
||||||
"Question"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1281,9 +1197,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Question"],
|
||||||
"Question"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -1317,9 +1231,7 @@
|
||||||
},
|
},
|
||||||
"/api/question/{seq}": {
|
"/api/question/{seq}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"tags": [
|
"tags": ["Question"],
|
||||||
"Question"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1341,9 +1253,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Question"],
|
||||||
"Question"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1367,9 +1277,7 @@
|
||||||
},
|
},
|
||||||
"/api/question/answers/{seq}": {
|
"/api/question/answers/{seq}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Question"],
|
||||||
"Question"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1400,9 +1308,7 @@
|
||||||
},
|
},
|
||||||
"/api/auth/config": {
|
"/api/auth/config": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Auth"],
|
||||||
"Auth"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -1413,9 +1319,7 @@
|
||||||
},
|
},
|
||||||
"/api/auth/testAuthenticatedOnly": {
|
"/api/auth/testAuthenticatedOnly": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Auth"],
|
||||||
"Auth"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -1434,9 +1338,7 @@
|
||||||
},
|
},
|
||||||
"/api/auth/testStudentsOnly": {
|
"/api/auth/testStudentsOnly": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Auth"],
|
||||||
"Auth"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -1452,9 +1354,7 @@
|
||||||
},
|
},
|
||||||
"/api/auth/testTeachersOnly": {
|
"/api/auth/testTeachersOnly": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Auth"],
|
||||||
"Auth"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -1470,9 +1370,7 @@
|
||||||
},
|
},
|
||||||
"/api/theme/": {
|
"/api/theme/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Theme"],
|
||||||
"Theme"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1492,9 +1390,7 @@
|
||||||
},
|
},
|
||||||
"/api/theme/{theme}": {
|
"/api/theme/{theme}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Theme"],
|
||||||
"Theme"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1518,9 +1414,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningPath/": {
|
"/api/learningPath/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Path"],
|
||||||
"Learning Path"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1589,9 +1483,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/": {
|
"/api/learningObject/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1611,9 +1503,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}": {
|
"/api/learningObject/{hruid}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1634,9 +1524,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}/html": {
|
"/api/learningObject/{hruid}/html": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1657,9 +1545,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}/html/{attachmentName}": {
|
"/api/learningObject/{hruid}/html/{attachmentName}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1688,9 +1574,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}/submissions/": {
|
"/api/learningObject/{hruid}/submissions/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1711,9 +1595,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}/submissions/{id}": {
|
"/api/learningObject/{hruid}/submissions/{id}": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1743,9 +1625,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1792,9 +1672,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1840,9 +1718,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}/{version}/questions/": {
|
"/api/learningObject/{hruid}/{version}/questions/": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1879,9 +1755,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1933,9 +1807,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}/{version}/questions/{seq}": {
|
"/api/learningObject/{hruid}/{version}/questions/{seq}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -1973,9 +1845,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
@ -2015,9 +1885,7 @@
|
||||||
},
|
},
|
||||||
"/api/learningObject/{hruid}/{version}/questions/answers/{seq}": {
|
"/api/learningObject/{hruid}/{version}/questions/answers/{seq}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": ["Learning Object"],
|
||||||
"Learning Object"
|
|
||||||
],
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue