feat: add SCAssessment

This commit is contained in:
Rainer Killinger
2021-11-10 11:31:45 +01:00
parent b2d18da82a
commit 7a2e0f20d1
10 changed files with 390 additions and 154 deletions

View File

@@ -0,0 +1,36 @@
{
"errorNames": [],
"instance": {
"attempt": 1,
"date": "2020-04-01",
"ects": 20,
"grade": "N/A",
"status": "ongoing",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf404",
"name": "Introductory courses extreme math",
"categories": [
"university assessment"
],
"courseOfStudy": {
"academicDegree": "bachelor",
"academicDegreewithField": "Bachelor of Arts",
"academicDegreewithFieldShort": "B.A.",
"mainLanguage": {
"code": "de",
"name": "german"
},
"mode": "dual",
"name": "Astroturfing",
"timeMode": "parttime",
"type": "course of study",
"uid": "4c6f0a18-343d-5175-9fb1-62d28545c2aa"
},
"origin": {
"indexed": "2020-04-11T12:30:00Z",
"name": "Dummy",
"type": "remote"
},
"type": "assessment"
},
"schema": "SCAssessment"
}

View File

@@ -0,0 +1,51 @@
{
"errorNames": [],
"instance": {
"attempt": 1,
"date": "2020-04-01",
"ects": 6,
"grade": "very much 1.0",
"status": "passed",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf303",
"name": "Mathe 9001",
"categories": [
"university assessment"
],
"superAssessments": [
{
"attempt": 1,
"date": "2020-04-01",
"ects": 20,
"grade": "N/A",
"status": "ongoing",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf404",
"name": "Introductory courses extreme math",
"categories": [
"university assessment"
],
"type": "assessment"
}
],
"courseOfStudy": {
"academicDegree": "bachelor",
"academicDegreewithField": "Bachelor of Arts",
"academicDegreewithFieldShort": "B.A.",
"mainLanguage": {
"code": "de",
"name": "german"
},
"mode": "dual",
"name": "Astroturfing",
"timeMode": "parttime",
"type": "course of study",
"uid": "4c6f0a18-343d-5175-9fb1-62d28545c2aa"
},
"origin": {
"indexed": "2020-04-11T12:30:00Z",
"name": "Dummy",
"type": "remote"
},
"type": "assessment"
},
"schema": "SCAssessment"
}

View File

@@ -13,9 +13,8 @@
"code": "de",
"name": "german"
},
"major": "Astroturfing",
"mode": "dual",
"name": "Astroturfing Bachelor",
"name": "Astroturfing",
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "Dummy",
@@ -27,8 +26,8 @@
"uid": "b0f878fd-8fda-53b8-b065-a8d854c3d0d2"
},
"timeMode": "parttime",
"type": "course of studies",
"type": "course of study",
"uid": "4c6f0a18-343d-5175-9fb1-62d28545c2aa"
},
"schema": "SCCourseOfStudies"
"schema": "SCCourseOfStudy"
}

View File

@@ -16,11 +16,12 @@ import {assert, Has, IsAny, IsNever, NotHas} from 'conditional-type-checks';
import {SCThing, SCThingWithoutReferences} from '../src/things/abstract/thing';
import {SCAcademicEvent, SCAcademicEventWithoutReferences} from '../src/things/academic-event';
import {SCArticle, SCArticleWithoutReferences} from '../src/things/article';
import {SCAssessment, SCAssessmentWithoutReferences} from '../src/things/assessment';
import {SCBook, SCBookWithoutReferences} from '../src/things/book';
import {SCBuilding, SCBuildingWithoutReferences} from '../src/things/building';
import {SCCatalog, SCCatalogWithoutReferences} from '../src/things/catalog';
import {SCContactPoint, SCContactPointWithoutReferences} from '../src/things/contact-point';
import {SCCourseOfStudies, SCCourseOfStudiesWithoutReferences} from '../src/things/course-of-studies';
import {SCCourseOfStudy, SCCourseOfStudyWithoutReferences} from '../src/things/course-of-study';
import {SCDateSeries, SCDateSeriesWithoutReferences} from '../src/things/date-series';
import {SCDiff, SCDiffWithoutReferences} from '../src/things/diff';
import {SCDish, SCDishWithoutReferences} from '../src/things/dish';
@@ -107,6 +108,17 @@ assert<Has<SCArticlePropertyTypes, SCThing>>(false);
assert<Extends<SCArticleWithoutReferences, SCThing>>(false);
assert<Extends<SCArticle, SCThing>>(true);
/**
* Types of properties of SCAssessment
*/
type SCAssessmentPropertyTypes = PropertyTypesNested<SCAssessment>;
assert<NotHas<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(false);
assert<Has<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(true);
assert<NotHas<SCAssessmentPropertyTypes, SCThing>>(true);
assert<Has<SCAssessmentPropertyTypes, SCThing>>(false);
assert<Extends<SCAssessmentWithoutReferences, SCThing>>(false);
assert<Extends<SCAssessment, SCThing>>(true);
/**
* Types of properties of SCBook
*/
@@ -152,15 +164,15 @@ assert<Extends<SCCatalogWithoutReferences, SCThing>>(false);
assert<Extends<SCCatalog, SCThing>>(true);
/**
* Types of properties of SCCourseOfStudies
* Types of properties of SCCourseOfStudy
*/
type SCCourseOfStudiesPropertyTypes = PropertyTypesNested<SCCourseOfStudies>;
assert<NotHas<SCCourseOfStudiesPropertyTypes, SCThingWithoutReferences>>(false);
assert<Has<SCCourseOfStudiesPropertyTypes, SCThingWithoutReferences>>(true);
assert<NotHas<SCCourseOfStudiesPropertyTypes, SCThing>>(true);
assert<Has<SCCourseOfStudiesPropertyTypes, SCThing>>(false);
assert<Extends<SCCourseOfStudiesWithoutReferences, SCThing>>(false);
assert<Extends<SCCourseOfStudies, SCThing>>(true);
type SCCourseOfStudyPropertyTypes = PropertyTypesNested<SCCourseOfStudy>;
assert<NotHas<SCCourseOfStudyPropertyTypes, SCThingWithoutReferences>>(false);
assert<Has<SCCourseOfStudyPropertyTypes, SCThingWithoutReferences>>(true);
assert<NotHas<SCCourseOfStudyPropertyTypes, SCThing>>(true);
assert<Has<SCCourseOfStudyPropertyTypes, SCThing>>(false);
assert<Extends<SCCourseOfStudyWithoutReferences, SCThing>>(false);
assert<Extends<SCCourseOfStudy, SCThing>>(true);
/**
* Types of properties of SCDateSeries